@donotdev/cli 0.1.45 → 0.2.0

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.
Files changed (47) hide show
  1. package/dependencies-matrix.json +191 -150
  2. package/dist/bin/commands/agent-setup.js +632 -524
  3. package/dist/bin/commands/build.js +1239 -935
  4. package/dist/bin/commands/bump.js +1285 -946
  5. package/dist/bin/commands/cacheout.js +543 -405
  6. package/dist/bin/commands/coach.js +546 -408
  7. package/dist/bin/commands/create-app.js +1198 -862
  8. package/dist/bin/commands/create-project.js +1238 -902
  9. package/dist/bin/commands/db.js +139128 -93775
  10. package/dist/bin/commands/deploy.js +2308 -1936
  11. package/dist/bin/commands/dev.js +912 -662
  12. package/dist/bin/commands/doctor.js +634 -526
  13. package/dist/bin/commands/emu.js +1093 -785
  14. package/dist/bin/commands/format.js +588 -450
  15. package/dist/bin/commands/get-demo.js +1043 -756
  16. package/dist/bin/commands/make-admin.js +20974 -38424
  17. package/dist/bin/commands/preview.js +913 -663
  18. package/dist/bin/commands/seed.js +139129 -93776
  19. package/dist/bin/commands/setup-cicd.js +1130 -817
  20. package/dist/bin/commands/setup.js +1299 -960
  21. package/dist/bin/commands/staging.js +2308 -1936
  22. package/dist/bin/commands/sync-secrets.js +996 -733
  23. package/dist/bin/commands/type-check.js +733 -598
  24. package/dist/bin/commands/wai.js +533 -395
  25. package/dist/bin/dndev.js +9 -8
  26. package/dist/index.js +2720 -2290
  27. package/package.json +3 -3
  28. package/templates/app-next/src/app/ClientLayout.tsx.example +11 -1
  29. package/templates/app-next/src/app/layout.tsx.example +19 -1
  30. package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +8 -18
  31. package/templates/functions-firebase/src/billing/index.ts.example +0 -1
  32. package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +4 -8
  33. package/templates/functions-firebase/src/index.ts.example +0 -1
  34. package/templates/functions-supabase/supabase/config.toml.example +4 -0
  35. package/templates/functions-supabase/supabase/functions/stripe-webhook/index.ts.example +12 -0
  36. package/templates/functions-supabase/supabase/migrations/20250101000005_webhook_events.sql +133 -0
  37. package/templates/functions-vercel/.env.example +9 -0
  38. package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +12 -14
  39. package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +4 -14
  40. package/templates/overlay-supabase/src/config/providers.ts.example +2 -2
  41. package/templates/root-consumer/.claude/hooks/guard-write.sh.example +32 -0
  42. package/templates/root-consumer/.claude/hooks/record-lookup.sh.example +22 -0
  43. package/templates/root-consumer/.claude/rules/definition-of-done.md.example +7 -0
  44. package/templates/root-consumer/.claude/rules/framework.md.example +6 -0
  45. package/templates/root-consumer/.claude/settings.json.example +11 -1
  46. package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -14
  47. package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -20
@@ -5,16 +5,25 @@ 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');
12
12
  });
13
- var __esm = (fn, res) => function __init() {
14
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
13
+ var __esm = (fn, res, err) => function __init() {
14
+ if (err) throw err[0];
15
+ try {
16
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
17
+ } catch (e) {
18
+ throw err = [e], e;
19
+ }
15
20
  };
16
21
  var __commonJS = (cb, mod) => function __require2() {
17
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
22
+ try {
23
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
24
+ } catch (e) {
25
+ throw mod = 0, e;
26
+ }
18
27
  };
19
28
  var __export = (target, all) => {
20
29
  for (var name in all)
@@ -37,31 +46,40 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
46
  mod
38
47
  ));
39
48
 
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;
49
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
50
+ var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;
42
51
  var init_utils = __esm({
43
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js"() {
52
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js"() {
44
53
  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
- };
54
+ getCodePointsLength = /* @__PURE__ */ (() => {
55
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
56
+ return (input) => {
57
+ let surrogatePairsNr = 0;
58
+ SURROGATE_PAIR_RE.lastIndex = 0;
59
+ while (SURROGATE_PAIR_RE.test(input)) {
60
+ surrogatePairsNr += 1;
61
+ }
62
+ return input.length - surrogatePairsNr;
63
+ };
64
+ })();
48
65
  isFullWidth = (x) => {
49
66
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
50
67
  };
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;
68
+ isWideNotCJKTNotEmoji = (x) => {
69
+ 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
70
  };
54
71
  }
55
72
  });
56
73
 
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;
74
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
75
+ var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
59
76
  var init_dist = __esm({
60
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js"() {
77
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js"() {
61
78
  init_utils2();
62
79
  init_utils();
63
- ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
80
+ ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
64
81
  CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
82
+ 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
83
  TAB_RE = /\t{1,1000}/y;
66
84
  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
85
  LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
@@ -71,14 +89,21 @@ var init_dist = __esm({
71
89
  const LIMIT = truncationOptions.limit ?? Infinity;
72
90
  const ELLIPSIS = truncationOptions.ellipsis ?? "";
73
91
  const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
74
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
92
+ const ANSI_WIDTH = 0;
75
93
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
76
94
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
77
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
78
95
  const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
79
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
96
+ const FULL_WIDTH_WIDTH = 2;
80
97
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
81
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
98
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
99
+ const PARSE_BLOCKS = [
100
+ [LATIN_RE, REGULAR_WIDTH],
101
+ [ANSI_RE, ANSI_WIDTH],
102
+ [CONTROL_RE, CONTROL_WIDTH],
103
+ [TAB_RE, TAB_WIDTH],
104
+ [EMOJI_RE, EMOJI_WIDTH],
105
+ [CJKT_WIDE_RE, WIDE_WIDTH]
106
+ ];
82
107
  let indexPrev = 0;
83
108
  let index = 0;
84
109
  let length = input.length;
@@ -98,10 +123,8 @@ var init_dist = __esm({
98
123
  const codePoint = char.codePointAt(0) || 0;
99
124
  if (isFullWidth(codePoint)) {
100
125
  widthExtra = FULL_WIDTH_WIDTH;
101
- } else if (isWide(codePoint)) {
126
+ } else if (isWideNotCJKTNotEmoji(codePoint)) {
102
127
  widthExtra = WIDE_WIDTH;
103
- } else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
104
- widthExtra = AMBIGUOUS_WIDTH;
105
128
  } else {
106
129
  widthExtra = REGULAR_WIDTH;
107
130
  }
@@ -117,88 +140,28 @@ var init_dist = __esm({
117
140
  }
118
141
  unmatchedStart = unmatchedEnd = 0;
119
142
  }
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;
143
+ if (index >= length) {
144
+ break outer;
153
145
  }
154
- CONTROL_RE.lastIndex = index;
155
- if (CONTROL_RE.test(input)) {
156
- lengthExtra = CONTROL_RE.lastIndex - index;
157
- widthExtra = lengthExtra * CONTROL_WIDTH;
158
- if (width + widthExtra > truncationLimit) {
159
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
160
- }
161
- if (width + widthExtra > LIMIT) {
162
- truncationEnabled = true;
163
- break;
164
- }
165
- width += widthExtra;
166
- unmatchedStart = indexPrev;
167
- unmatchedEnd = index;
168
- index = indexPrev = CONTROL_RE.lastIndex;
169
- continue;
170
- }
171
- TAB_RE.lastIndex = index;
172
- if (TAB_RE.test(input)) {
173
- lengthExtra = TAB_RE.lastIndex - index;
174
- widthExtra = lengthExtra * TAB_WIDTH;
175
- if (width + widthExtra > truncationLimit) {
176
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
177
- }
178
- if (width + widthExtra > LIMIT) {
179
- truncationEnabled = true;
180
- break;
181
- }
182
- width += widthExtra;
183
- unmatchedStart = indexPrev;
184
- unmatchedEnd = index;
185
- index = indexPrev = TAB_RE.lastIndex;
186
- continue;
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;
146
+ for (let i2 = 0, l = PARSE_BLOCKS.length; i2 < l; i2++) {
147
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
148
+ BLOCK_RE.lastIndex = index;
149
+ if (BLOCK_RE.test(input)) {
150
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
151
+ widthExtra = lengthExtra * BLOCK_WIDTH;
152
+ if (width + widthExtra > truncationLimit) {
153
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
154
+ }
155
+ if (width + widthExtra > LIMIT) {
156
+ truncationEnabled = true;
157
+ break outer;
158
+ }
159
+ width += widthExtra;
160
+ unmatchedStart = indexPrev;
161
+ unmatchedEnd = index;
162
+ index = indexPrev = BLOCK_RE.lastIndex;
163
+ continue outer;
196
164
  }
197
- width += EMOJI_WIDTH;
198
- unmatchedStart = indexPrev;
199
- unmatchedEnd = index;
200
- index = indexPrev = EMOJI_RE.lastIndex;
201
- continue;
202
165
  }
203
166
  index += 1;
204
167
  }
@@ -213,10 +176,10 @@ var init_dist = __esm({
213
176
  }
214
177
  });
215
178
 
216
- // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
179
+ // node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
217
180
  var NO_TRUNCATION2, fastStringWidth, dist_default2;
218
181
  var init_dist2 = __esm({
219
- "node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
182
+ "node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
220
183
  init_utils2();
221
184
  init_dist();
222
185
  NO_TRUNCATION2 = {
@@ -231,13 +194,13 @@ var init_dist2 = __esm({
231
194
  }
232
195
  });
233
196
 
234
- // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
197
+ // node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
235
198
  function wrapAnsi(string, columns, options) {
236
199
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
237
200
  }
238
201
  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
202
  var init_main = __esm({
240
- "node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
203
+ "node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js"() {
241
204
  init_utils2();
242
205
  init_dist2();
243
206
  ESC = "\x1B";
@@ -401,16 +364,19 @@ var init_main = __esm({
401
364
  }
402
365
  const preString = rows.join("\n");
403
366
  let inSurrogate = false;
404
- for (let i = 0; i < preString.length; i++) {
405
- const character = preString[i];
367
+ for (let i2 = 0; i2 < preString.length; i2++) {
368
+ const character = preString[i2];
406
369
  returnValue += character;
407
370
  if (!inSurrogate) {
408
371
  inSurrogate = character >= "\uD800" && character <= "\uDBFF";
372
+ if (inSurrogate) {
373
+ continue;
374
+ }
409
375
  } else {
410
- continue;
376
+ inSurrogate = false;
411
377
  }
412
378
  if (character === ESC || character === CSI) {
413
- GROUP_REGEX.lastIndex = i + 1;
379
+ GROUP_REGEX.lastIndex = i2 + 1;
414
380
  const groupsResult = GROUP_REGEX.exec(preString);
415
381
  const groups = groupsResult?.groups;
416
382
  if (groups?.code !== void 0) {
@@ -420,7 +386,7 @@ var init_main = __esm({
420
386
  escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
421
387
  }
422
388
  }
423
- if (preString[i + 1] === "\n") {
389
+ if (preString[i2 + 1] === "\n") {
424
390
  if (escapeUrl) {
425
391
  returnValue += wrapAnsiHyperlink("");
426
392
  }
@@ -451,17 +417,17 @@ var require_src = __commonJS({
451
417
  var ESC2 = "\x1B";
452
418
  var CSI2 = `${ESC2}[`;
453
419
  var beep = "\x07";
454
- var cursor = {
455
- to(x, y2) {
456
- if (!y2) return `${CSI2}${x + 1}G`;
457
- return `${CSI2}${y2 + 1};${x + 1}H`;
420
+ var cursor3 = {
421
+ to(x, y) {
422
+ if (!y) return `${CSI2}${x + 1}G`;
423
+ return `${CSI2}${y + 1};${x + 1}H`;
458
424
  },
459
- move(x, y2) {
425
+ move(x, y) {
460
426
  let ret = "";
461
427
  if (x < 0) ret += `${CSI2}${-x}D`;
462
428
  else if (x > 0) ret += `${CSI2}${x}C`;
463
- if (y2 < 0) ret += `${CSI2}${-y2}A`;
464
- else if (y2 > 0) ret += `${CSI2}${y2}B`;
429
+ if (y < 0) ret += `${CSI2}${-y}A`;
430
+ else if (y > 0) ret += `${CSI2}${y}B`;
465
431
  return ret;
466
432
  },
467
433
  up: (count = 1) => `${CSI2}${count}A`,
@@ -480,7 +446,7 @@ var require_src = __commonJS({
480
446
  up: (count = 1) => `${CSI2}S`.repeat(count),
481
447
  down: (count = 1) => `${CSI2}T`.repeat(count)
482
448
  };
483
- var erase = {
449
+ var erase3 = {
484
450
  screen: `${CSI2}2J`,
485
451
  up: (count = 1) => `${CSI2}1J`.repeat(count),
486
452
  down: (count = 1) => `${CSI2}J`.repeat(count),
@@ -489,138 +455,225 @@ var require_src = __commonJS({
489
455
  lineStart: `${CSI2}1K`,
490
456
  lines(count) {
491
457
  let clear = "";
492
- for (let i = 0; i < count; i++)
493
- clear += this.line + (i < count - 1 ? cursor.up() : "");
458
+ for (let i2 = 0; i2 < count; i2++)
459
+ clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
494
460
  if (count)
495
- clear += cursor.left;
461
+ clear += cursor3.left;
496
462
  return clear;
497
463
  }
498
464
  };
499
- module.exports = { cursor, scroll, erase, beep };
465
+ module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
500
466
  }
501
467
  });
502
468
 
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 { ReadStream as D } from "node:tty";
507
- var import_sisteransi, E, G, u, Y, O;
469
+ // node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
470
+ import { styleText } from "node:util";
471
+ import { stdout, stdin } from "node:process";
472
+ import { ReadStream } from "node:tty";
473
+ var import_sisteransi, a$1, t, settings, R, getColumns;
508
474
  var init_dist3 = __esm({
509
- "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
475
+ "node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
510
476
  init_utils2();
511
477
  init_main();
512
478
  import_sisteransi = __toESM(require_src(), 1);
513
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
514
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
515
- 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)}` } } };
516
- Y = globalThis.process.platform.startsWith("win");
517
- O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
479
+ a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
480
+ t = [
481
+ "January",
482
+ "February",
483
+ "March",
484
+ "April",
485
+ "May",
486
+ "June",
487
+ "July",
488
+ "August",
489
+ "September",
490
+ "October",
491
+ "November",
492
+ "December"
493
+ ];
494
+ settings = {
495
+ actions: new Set(a$1),
496
+ aliases: /* @__PURE__ */ new Map([
497
+ // vim support
498
+ ["k", "up"],
499
+ ["j", "down"],
500
+ ["h", "left"],
501
+ ["l", "right"],
502
+ ["", "cancel"],
503
+ // opinionated defaults!
504
+ ["escape", "cancel"]
505
+ ]),
506
+ messages: {
507
+ cancel: "Canceled",
508
+ error: "Something went wrong"
509
+ },
510
+ withGuide: true,
511
+ accessible: void 0,
512
+ date: {
513
+ monthNames: [...t],
514
+ messages: {
515
+ required: "Please enter a valid date",
516
+ invalidMonth: "There are only 12 months in a year",
517
+ invalidDay: (n2, e) => `There are only ${n2} days in ${e}`,
518
+ afterMin: (n2) => `Date must be on or after ${n2.toISOString().slice(0, 10)}`,
519
+ beforeMax: (n2) => `Date must be on or before ${n2.toISOString().slice(0, 10)}`
520
+ }
521
+ }
522
+ };
523
+ R = globalThis.process.platform.startsWith("win");
524
+ getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
518
525
  }
519
526
  });
520
527
 
521
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
522
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
523
- import P from "node:process";
524
- import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
525
- import { dirname as be, join as Qe } from "node:path";
526
- function Ze() {
527
- return P.platform !== "win32" ? P.env.TERM !== "linux" : !!P.env.CI || !!P.env.WT_SESSION || !!P.env.TERMINUS_SUBLIME || P.env.ConEmuTask === "{cmd::Cmder}" || P.env.TERM_PROGRAM === "Terminus-Sublime" || P.env.TERM_PROGRAM === "vscode" || P.env.TERM === "xterm-256color" || P.env.TERM === "alacritty" || P.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
528
+ // node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
529
+ import { styleText as styleText2, stripVTControlCharacters } from "node:util";
530
+ import process$1 from "node:process";
531
+ import { existsSync, lstatSync, readdirSync } from "node:fs";
532
+ import { dirname, join } from "node:path";
533
+ function isUnicodeSupported() {
534
+ if (process$1.platform !== "win32") {
535
+ return process$1.env.TERM !== "linux";
536
+ }
537
+ 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";
528
538
  }
529
- var import_sisteransi2, ee, w, _e, oe, ue, F, le, d, E2, Ie, Ee, z2, H2, te, U, J, xe, se, ce, Ge, $e, de, Oe, he, pe, me, ge, O2, mt, gt, ft, vt, wt, Ve, je;
539
+ var import_sisteransi2, unicode, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, MULTISELECT_INSTRUCTIONS, log, intro, outro, W$1, C, note, u2, SELECT_INSTRUCTIONS, i;
530
540
  var init_dist4 = __esm({
531
- "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
541
+ "node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
532
542
  init_utils2();
533
543
  init_dist3();
534
544
  init_dist3();
535
545
  init_main();
536
546
  init_dist2();
537
547
  import_sisteransi2 = __toESM(require_src(), 1);
538
- ee = Ze();
539
- w = (e, i) => ee ? e : i;
540
- _e = w("\u25C6", "*");
541
- oe = w("\u25A0", "x");
542
- ue = w("\u25B2", "x");
543
- F = w("\u25C7", "o");
544
- le = w("\u250C", "T");
545
- d = w("\u2502", "|");
546
- E2 = w("\u2514", "\u2014");
547
- Ie = w("\u2510", "T");
548
- Ee = w("\u2518", "\u2014");
549
- z2 = w("\u25CF", ">");
550
- H2 = w("\u25CB", " ");
551
- te = w("\u25FB", "[\u2022]");
552
- U = w("\u25FC", "[+]");
553
- J = w("\u25FB", "[ ]");
554
- xe = w("\u25AA", "\u2022");
555
- se = w("\u2500", "-");
556
- ce = w("\u256E", "+");
557
- Ge = w("\u251C", "+");
558
- $e = w("\u256F", "+");
559
- de = w("\u2570", "+");
560
- Oe = w("\u256D", "+");
561
- he = w("\u25CF", "\u2022");
562
- pe = w("\u25C6", "*");
563
- me = w("\u25B2", "!");
564
- ge = w("\u25A0", "x");
565
- O2 = { message: (e = [], { symbol: i = t("gray", d), secondarySymbol: s = t("gray", d), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
566
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
567
- for (let p = 0; p < u2; p++) o.push(a);
568
- const y2 = Array.isArray(e) ? e : e.split(`
548
+ unicode = isUnicodeSupported();
549
+ unicodeOr = (o, e) => unicode ? o : e;
550
+ S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
551
+ S_STEP_CANCEL = unicodeOr("\u25A0", "x");
552
+ S_STEP_ERROR = unicodeOr("\u25B2", "x");
553
+ S_STEP_SUBMIT = unicodeOr("\u25C7", "o");
554
+ S_BAR_START = unicodeOr("\u250C", "T");
555
+ S_BAR = unicodeOr("\u2502", "|");
556
+ S_BAR_END = unicodeOr("\u2514", "\u2014");
557
+ S_BAR_START_RIGHT = unicodeOr("\u2510", "T");
558
+ S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014");
559
+ S_RADIO_ACTIVE = unicodeOr("\u25CF", ">");
560
+ S_RADIO_INACTIVE = unicodeOr("\u25CB", " ");
561
+ S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]");
562
+ S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]");
563
+ S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]");
564
+ S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022");
565
+ S_BAR_H = unicodeOr("\u2500", "-");
566
+ S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+");
567
+ S_CONNECT_LEFT = unicodeOr("\u251C", "+");
568
+ S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+");
569
+ S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+");
570
+ S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+");
571
+ S_INFO = unicodeOr("\u25CF", "\u2022");
572
+ S_SUCCESS = unicodeOr("\u25C6", "*");
573
+ S_WARN = unicodeOr("\u25B2", "!");
574
+ S_ERROR = unicodeOr("\u25A0", "x");
575
+ MULTISELECT_INSTRUCTIONS = [
576
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
577
+ `${styleText2("dim", "Space:")} select`,
578
+ `${styleText2("dim", "Enter:")} confirm`
579
+ ];
580
+ log = {
581
+ message: (s = [], {
582
+ symbol: e = styleText2("gray", S_BAR),
583
+ secondarySymbol: r2 = styleText2("gray", S_BAR),
584
+ output: m = process.stdout,
585
+ spacing: l = 1,
586
+ withGuide: c
587
+ } = {}) => {
588
+ const t2 = [], o = c ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
589
+ for (let i2 = 0; i2 < l; i2++)
590
+ t2.push(f);
591
+ const g = Array.isArray(s) ? s : s.split(`
569
592
  `);
570
- if (y2.length > 0) {
571
- const [p, ...m] = y2;
572
- p.length > 0 ? o.push(`${l}${p}`) : o.push(c2 ? i : "");
573
- for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
574
- }
575
- r.write(`${o.join(`
593
+ if (g.length > 0) {
594
+ const [i2, ...y] = g;
595
+ i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
596
+ for (const p of y)
597
+ p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
598
+ }
599
+ m.write(`${t2.join(`
576
600
  `)}
577
601
  `);
578
- }, info: (e, i) => {
579
- O2.message(e, { ...i, symbol: t("blue", he) });
580
- }, success: (e, i) => {
581
- O2.message(e, { ...i, symbol: t("green", pe) });
582
- }, step: (e, i) => {
583
- O2.message(e, { ...i, symbol: t("green", F) });
584
- }, warn: (e, i) => {
585
- O2.message(e, { ...i, symbol: t("yellow", me) });
586
- }, warning: (e, i) => {
587
- O2.warn(e, i);
588
- }, error: (e, i) => {
589
- O2.message(e, { ...i, symbol: t("red", ge) });
590
- } };
591
- mt = (e = "", i) => {
592
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
593
- s.write(`${r}${e}
602
+ },
603
+ info: (s, e) => {
604
+ log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
605
+ },
606
+ success: (s, e) => {
607
+ log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
608
+ },
609
+ step: (s, e) => {
610
+ log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
611
+ },
612
+ warn: (s, e) => {
613
+ log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
614
+ },
615
+ /** alias for `log.warn()`. */
616
+ warning: (s, e) => {
617
+ log.warn(s, e);
618
+ },
619
+ error: (s, e) => {
620
+ log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
621
+ }
622
+ };
623
+ intro = (o = "", t2) => {
624
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_START)} ` : "";
625
+ i2.write(`${e}${o}
594
626
  `);
595
627
  };
596
- gt = (e = "", i) => {
597
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d)}
598
- ${t("gray", E2)} ` : "";
599
- s.write(`${r}${e}
628
+ outro = (o = "", t2) => {
629
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR)}
630
+ ${styleText2("gray", S_BAR_END)} ` : "";
631
+ i2.write(`${e}${o}
600
632
 
601
633
  `);
602
634
  };
603
- ft = (e) => t("dim", e);
604
- vt = (e, i, s) => {
605
- const r = { hard: true, trim: false }, u2 = wrapAnsi(e, i, r).split(`
606
- `), 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);
607
- return wrapAnsi(e, c2, r);
608
- };
609
- wt = (e = "", i = "", s) => {
610
- const r = s?.output ?? P.stdout, u2 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = ["", ...vt(e, O(r) - 6, n).split(`
611
- `).map(n), ""], c2 = dist_default2(i), a = Math.max(o.reduce((p, m) => {
612
- const g = dist_default2(m);
613
- return g > p ? g : p;
614
- }, 0), c2) + 2, l = o.map((p) => `${t("gray", d)} ${p}${" ".repeat(a - dist_default2(p))}${t("gray", d)}`).join(`
615
- `), $2 = u2 ? `${t("gray", d)}
616
- ` : "", y2 = u2 ? Ge : de;
617
- r.write(`${$2}${t("green", F)} ${t("reset", i)} ${t("gray", se.repeat(Math.max(a - c2 - 1, 1)) + ce)}
618
- ${l}
619
- ${t("gray", y2 + se.repeat(a + 2) + $e)}
620
- `);
635
+ W$1 = (o) => o;
636
+ C = (o, e, s) => {
637
+ const a2 = {
638
+ hard: true,
639
+ trim: false
640
+ }, i2 = wrapAnsi(o, e, a2).split(`
641
+ `), c = i2.reduce((n2, t2) => Math.max(dist_default2(t2), n2), 0), u3 = i2.map(s).reduce((n2, t2) => Math.max(dist_default2(t2), n2), 0), g = e - (u3 - c);
642
+ return wrapAnsi(o, g, a2);
643
+ };
644
+ note = (o = "", e = "", s) => {
645
+ const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c = s?.format ?? W$1, g = ["", ...C(o, getColumns(a2) - 6, c).split(`
646
+ `).map(c), ""], n2 = dist_default2(e), t2 = Math.max(
647
+ g.reduce((m, F) => {
648
+ const O = dist_default2(F);
649
+ return O > m ? O : m;
650
+ }, 0),
651
+ n2
652
+ ) + 2, h2 = g.map(
653
+ (m) => `${styleText2("gray", S_BAR)} ${m}${" ".repeat(t2 - dist_default2(m))}${styleText2("gray", S_BAR)}`
654
+ ).join(`
655
+ `), T = i2 ? `${styleText2("gray", S_BAR)}
656
+ ` : "", l$1 = i2 ? S_CONNECT_LEFT : S_CORNER_BOTTOM_LEFT;
657
+ a2.write(
658
+ `${T}${styleText2("green", S_STEP_SUBMIT)} ${styleText2("reset", e)} ${styleText2(
659
+ "gray",
660
+ S_BAR_H.repeat(Math.max(t2 - n2 - 1, 1)) + S_CORNER_TOP_RIGHT
661
+ )}
662
+ ${h2}
663
+ ${styleText2("gray", l$1 + S_BAR_H.repeat(t2 + 2) + S_CORNER_BOTTOM_RIGHT)}
664
+ `
665
+ );
621
666
  };
622
- Ve = { light: w("\u2500", "-"), heavy: w("\u2501", "="), block: w("\u2588", "#") };
623
- je = `${t("gray", d)} `;
667
+ u2 = {
668
+ light: unicodeOr("\u2500", "-"),
669
+ heavy: unicodeOr("\u2501", "="),
670
+ block: unicodeOr("\u2588", "#")
671
+ };
672
+ SELECT_INSTRUCTIONS = [
673
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
674
+ `${styleText2("dim", "Enter:")} confirm`
675
+ ];
676
+ i = `${styleText2("gray", S_BAR)} `;
624
677
  }
625
678
  });
626
679
 
@@ -665,7 +718,7 @@ function stringify(value) {
665
718
  function formatMessage(...args) {
666
719
  return args.map(stringify).join(" ");
667
720
  }
668
- var colors, currentLogLevel, log, error, warn, info, success;
721
+ var colors, currentLogLevel, log2, error, warn, info, success;
669
722
  var init_cli_output = __esm({
670
723
  "packages/tooling/src/utils/cli-output.ts"() {
671
724
  "use strict";
@@ -698,7 +751,7 @@ var init_cli_output = __esm({
698
751
  currentLogLevel = envLevel;
699
752
  }
700
753
  }
701
- log = {
754
+ log2 = {
702
755
  /**
703
756
  * Logs an error message (always shows unless Quiet level)
704
757
  * Uses clack's log.error + explicit red color
@@ -706,7 +759,7 @@ var init_cli_output = __esm({
706
759
  error(...args) {
707
760
  if (currentLogLevel < 0 /* Quiet */) return;
708
761
  const message = formatMessage(...args);
709
- O2.error(colorize(message, colors.brightRed));
762
+ log.error(colorize(message, colors.brightRed));
710
763
  },
711
764
  /**
712
765
  * Logs a warning message (shows at Normal level and above)
@@ -715,7 +768,7 @@ var init_cli_output = __esm({
715
768
  warn(...args) {
716
769
  if (currentLogLevel < 1 /* Normal */) return;
717
770
  const message = formatMessage(...args);
718
- O2.warn(colorize(message, colors.brightYellow));
771
+ log.warn(colorize(message, colors.brightYellow));
719
772
  },
720
773
  /**
721
774
  * Logs an info message (shows at Normal level and above)
@@ -724,7 +777,7 @@ var init_cli_output = __esm({
724
777
  info(...args) {
725
778
  if (currentLogLevel < 1 /* Normal */) return;
726
779
  const message = formatMessage(...args);
727
- O2.info(colorize(message, colors.brightCyan));
780
+ log.info(colorize(message, colors.brightCyan));
728
781
  },
729
782
  /**
730
783
  * Logs a success message (shows at Normal level and above)
@@ -733,7 +786,7 @@ var init_cli_output = __esm({
733
786
  success(...args) {
734
787
  if (currentLogLevel < 1 /* Normal */) return;
735
788
  const message = formatMessage(...args);
736
- O2.success(colorize(message, colors.brightGreen));
789
+ log.success(colorize(message, colors.brightGreen));
737
790
  },
738
791
  /**
739
792
  * Logs a debug message (only shows at Verbose level and above)
@@ -742,7 +795,7 @@ var init_cli_output = __esm({
742
795
  debug(...args) {
743
796
  if (currentLogLevel < 2 /* Verbose */) return;
744
797
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
745
- O2.message(
798
+ log.message(
746
799
  colorize(
747
800
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
748
801
  colors.gray
@@ -756,7 +809,7 @@ var init_cli_output = __esm({
756
809
  trace(...args) {
757
810
  if (currentLogLevel < 3 /* Debug */) return;
758
811
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
759
- O2.message(
812
+ log.message(
760
813
  colorize(
761
814
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
762
815
  colors.gray
@@ -764,10 +817,10 @@ var init_cli_output = __esm({
764
817
  );
765
818
  }
766
819
  };
767
- error = log.error.bind(log);
768
- warn = log.warn.bind(log);
769
- info = log.info.bind(log);
770
- success = log.success.bind(log);
820
+ error = log2.error.bind(log2);
821
+ warn = log2.warn.bind(log2);
822
+ info = log2.info.bind(log2);
823
+ success = log2.success.bind(log2);
771
824
  }
772
825
  });
773
826
 
@@ -1127,9 +1180,9 @@ var require_is_glob = __commonJS({
1127
1180
  index += 2;
1128
1181
  var close = chars[open];
1129
1182
  if (close) {
1130
- var n = str.indexOf(close, index);
1131
- if (n !== -1) {
1132
- index = n + 1;
1183
+ var n2 = str.indexOf(close, index);
1184
+ if (n2 !== -1) {
1185
+ index = n2 + 1;
1133
1186
  }
1134
1187
  }
1135
1188
  if (str[index] === "!") {
@@ -1155,9 +1208,9 @@ var require_is_glob = __commonJS({
1155
1208
  index += 2;
1156
1209
  var close = chars[open];
1157
1210
  if (close) {
1158
- var n = str.indexOf(close, index);
1159
- if (n !== -1) {
1160
- index = n + 1;
1211
+ var n2 = str.indexOf(close, index);
1212
+ if (n2 !== -1) {
1213
+ index = n2 + 1;
1161
1214
  }
1162
1215
  }
1163
1216
  if (str[index] === "!") {
@@ -1235,8 +1288,8 @@ var require_utils = __commonJS({
1235
1288
  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
1236
1289
  return (Number(max) - Number(min)) / Number(step) >= limit;
1237
1290
  };
1238
- exports.escapeNode = (block, n = 0, type) => {
1239
- const node = block.nodes[n];
1291
+ exports.escapeNode = (block2, n2 = 0, type) => {
1292
+ const node = block2.nodes[n2];
1240
1293
  if (!node) return;
1241
1294
  if (type && node.type === type || node.type === "open" || node.type === "close") {
1242
1295
  if (node.escaped !== true) {
@@ -1253,15 +1306,15 @@ var require_utils = __commonJS({
1253
1306
  }
1254
1307
  return false;
1255
1308
  };
1256
- exports.isInvalidBrace = (block) => {
1257
- if (block.type !== "brace") return false;
1258
- if (block.invalid === true || block.dollar) return true;
1259
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
1260
- block.invalid = true;
1309
+ exports.isInvalidBrace = (block2) => {
1310
+ if (block2.type !== "brace") return false;
1311
+ if (block2.invalid === true || block2.dollar) return true;
1312
+ if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
1313
+ block2.invalid = true;
1261
1314
  return true;
1262
1315
  }
1263
- if (block.open !== true || block.close !== true) {
1264
- block.invalid = true;
1316
+ if (block2.open !== true || block2.close !== true) {
1317
+ block2.invalid = true;
1265
1318
  return true;
1266
1319
  }
1267
1320
  return false;
@@ -1280,8 +1333,8 @@ var require_utils = __commonJS({
1280
1333
  exports.flatten = (...args) => {
1281
1334
  const result = [];
1282
1335
  const flat = (arr) => {
1283
- for (let i = 0; i < arr.length; i++) {
1284
- const ele = arr[i];
1336
+ for (let i2 = 0; i2 < arr.length; i2++) {
1337
+ const ele = arr[i2];
1285
1338
  if (Array.isArray(ele)) {
1286
1339
  flat(ele);
1287
1340
  continue;
@@ -1375,9 +1428,9 @@ var require_to_regex_range = __commonJS({
1375
1428
  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
1376
1429
  return toRegexRange.cache[cacheKey].result;
1377
1430
  }
1378
- let a = Math.min(min, max);
1431
+ let a2 = Math.min(min, max);
1379
1432
  let b = Math.max(min, max);
1380
- if (Math.abs(a - b) === 1) {
1433
+ if (Math.abs(a2 - b) === 1) {
1381
1434
  let result = min + "|" + max;
1382
1435
  if (opts.capture) {
1383
1436
  return `(${result})`;
@@ -1388,20 +1441,20 @@ var require_to_regex_range = __commonJS({
1388
1441
  return `(?:${result})`;
1389
1442
  }
1390
1443
  let isPadded = hasPadding(min) || hasPadding(max);
1391
- let state = { min, max, a, b };
1444
+ let state = { min, max, a: a2, b };
1392
1445
  let positives = [];
1393
1446
  let negatives = [];
1394
1447
  if (isPadded) {
1395
1448
  state.isPadded = isPadded;
1396
1449
  state.maxLen = String(state.max).length;
1397
1450
  }
1398
- if (a < 0) {
1451
+ if (a2 < 0) {
1399
1452
  let newMin = b < 0 ? Math.abs(b) : 1;
1400
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1401
- a = state.a = 0;
1453
+ negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
1454
+ a2 = state.a = 0;
1402
1455
  }
1403
1456
  if (b >= 0) {
1404
- positives = splitToPatterns(a, b, state, opts);
1457
+ positives = splitToPatterns(a2, b, state, opts);
1405
1458
  }
1406
1459
  state.negatives = negatives;
1407
1460
  state.positives = positives;
@@ -1449,8 +1502,8 @@ var require_to_regex_range = __commonJS({
1449
1502
  let digits = zipped.length;
1450
1503
  let pattern = "";
1451
1504
  let count = 0;
1452
- for (let i = 0; i < digits; i++) {
1453
- let [startDigit, stopDigit] = zipped[i];
1505
+ for (let i2 = 0; i2 < digits; i2++) {
1506
+ let [startDigit, stopDigit] = zipped[i2];
1454
1507
  if (startDigit === stopDigit) {
1455
1508
  pattern += startDigit;
1456
1509
  } else if (startDigit !== "0" || stopDigit !== "9") {
@@ -1469,8 +1522,8 @@ var require_to_regex_range = __commonJS({
1469
1522
  let tokens = [];
1470
1523
  let start = min;
1471
1524
  let prev;
1472
- for (let i = 0; i < ranges.length; i++) {
1473
- let max2 = ranges[i];
1525
+ for (let i2 = 0; i2 < ranges.length; i2++) {
1526
+ let max2 = ranges[i2];
1474
1527
  let obj = rangeToPattern(String(start), String(max2), options);
1475
1528
  let zeros = "";
1476
1529
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
@@ -1505,13 +1558,13 @@ var require_to_regex_range = __commonJS({
1505
1558
  }
1506
1559
  return result;
1507
1560
  }
1508
- function zip(a, b) {
1561
+ function zip(a2, b) {
1509
1562
  let arr = [];
1510
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
1563
+ for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
1511
1564
  return arr;
1512
1565
  }
1513
- function compare(a, b) {
1514
- return a > b ? 1 : b > a ? -1 : 0;
1566
+ function compare(a2, b) {
1567
+ return a2 > b ? 1 : b > a2 ? -1 : 0;
1515
1568
  }
1516
1569
  function contains(arr, key, val) {
1517
1570
  return arr.some((ele) => ele[key] === val);
@@ -1529,8 +1582,8 @@ var require_to_regex_range = __commonJS({
1529
1582
  }
1530
1583
  return "";
1531
1584
  }
1532
- function toCharacterClass(a, b, options) {
1533
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
1585
+ function toCharacterClass(a2, b, options) {
1586
+ return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
1534
1587
  }
1535
1588
  function hasPadding(str) {
1536
1589
  return /^-?(0+)\d/.test(str);
@@ -1609,8 +1662,8 @@ var require_fill_range = __commonJS({
1609
1662
  return negative ? "-" + input : input;
1610
1663
  };
1611
1664
  var toSequence = (parts, options, maxLen) => {
1612
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1613
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1665
+ parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
1666
+ parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
1614
1667
  let prefix = options.capture ? "" : "?:";
1615
1668
  let positives = "";
1616
1669
  let negatives = "";
@@ -1631,12 +1684,12 @@ var require_fill_range = __commonJS({
1631
1684
  }
1632
1685
  return result;
1633
1686
  };
1634
- var toRange = (a, b, isNumbers, options) => {
1687
+ var toRange = (a2, b, isNumbers, options) => {
1635
1688
  if (isNumbers) {
1636
- return toRegexRange(a, b, { wrap: false, ...options });
1689
+ return toRegexRange(a2, b, { wrap: false, ...options });
1637
1690
  }
1638
- let start = String.fromCharCode(a);
1639
- if (a === b) return start;
1691
+ let start = String.fromCharCode(a2);
1692
+ if (a2 === b) return start;
1640
1693
  let stop = String.fromCharCode(b);
1641
1694
  return `[${start}-${stop}]`;
1642
1695
  };
@@ -1662,15 +1715,15 @@ var require_fill_range = __commonJS({
1662
1715
  return [];
1663
1716
  };
1664
1717
  var fillNumbers = (start, end, step = 1, options = {}) => {
1665
- let a = Number(start);
1718
+ let a2 = Number(start);
1666
1719
  let b = Number(end);
1667
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
1720
+ if (!Number.isInteger(a2) || !Number.isInteger(b)) {
1668
1721
  if (options.strictRanges === true) throw rangeError([start, end]);
1669
1722
  return [];
1670
1723
  }
1671
- if (a === 0) a = 0;
1724
+ if (a2 === 0) a2 = 0;
1672
1725
  if (b === 0) b = 0;
1673
- let descending = a > b;
1726
+ let descending = a2 > b;
1674
1727
  let startString = String(start);
1675
1728
  let endString = String(end);
1676
1729
  let stepString = String(step);
@@ -1686,13 +1739,13 @@ var require_fill_range = __commonJS({
1686
1739
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
1687
1740
  let range = [];
1688
1741
  let index = 0;
1689
- while (descending ? a >= b : a <= b) {
1742
+ while (descending ? a2 >= b : a2 <= b) {
1690
1743
  if (options.toRegex === true && step > 1) {
1691
- push(a);
1744
+ push(a2);
1692
1745
  } else {
1693
- range.push(pad(format(a, index), maxLen, toNumber));
1746
+ range.push(pad(format(a2, index), maxLen, toNumber));
1694
1747
  }
1695
- a = descending ? a - step : a + step;
1748
+ a2 = descending ? a2 - step : a2 + step;
1696
1749
  index++;
1697
1750
  }
1698
1751
  if (options.toRegex === true) {
@@ -1705,19 +1758,19 @@ var require_fill_range = __commonJS({
1705
1758
  return invalidRange(start, end, options);
1706
1759
  }
1707
1760
  let format = options.transform || ((val) => String.fromCharCode(val));
1708
- let a = `${start}`.charCodeAt(0);
1761
+ let a2 = `${start}`.charCodeAt(0);
1709
1762
  let b = `${end}`.charCodeAt(0);
1710
- let descending = a > b;
1711
- let min = Math.min(a, b);
1712
- let max = Math.max(a, b);
1763
+ let descending = a2 > b;
1764
+ let min = Math.min(a2, b);
1765
+ let max = Math.max(a2, b);
1713
1766
  if (options.toRegex && step === 1) {
1714
1767
  return toRange(min, max, false, options);
1715
1768
  }
1716
1769
  let range = [];
1717
1770
  let index = 0;
1718
- while (descending ? a >= b : a <= b) {
1719
- range.push(format(a, index));
1720
- a = descending ? a - step : a + step;
1771
+ while (descending ? a2 >= b : a2 <= b) {
1772
+ range.push(format(a2, index));
1773
+ a2 = descending ? a2 - step : a2 + step;
1721
1774
  index++;
1722
1775
  }
1723
1776
  if (options.toRegex === true) {
@@ -1841,17 +1894,17 @@ var require_expand = __commonJS({
1841
1894
  const walk = (node, parent = {}) => {
1842
1895
  node.queue = [];
1843
1896
  let p = parent;
1844
- let q2 = parent.queue;
1897
+ let q = parent.queue;
1845
1898
  while (p.type !== "brace" && p.type !== "root" && p.parent) {
1846
1899
  p = p.parent;
1847
- q2 = p.queue;
1900
+ q = p.queue;
1848
1901
  }
1849
1902
  if (node.invalid || node.dollar) {
1850
- q2.push(append(q2.pop(), stringify2(node, options)));
1903
+ q.push(append(q.pop(), stringify2(node, options)));
1851
1904
  return;
1852
1905
  }
1853
1906
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
1854
- q2.push(append(q2.pop(), ["{}"]));
1907
+ q.push(append(q.pop(), ["{}"]));
1855
1908
  return;
1856
1909
  }
1857
1910
  if (node.nodes && node.ranges > 0) {
@@ -1863,26 +1916,26 @@ var require_expand = __commonJS({
1863
1916
  if (range.length === 0) {
1864
1917
  range = stringify2(node, options);
1865
1918
  }
1866
- q2.push(append(q2.pop(), range));
1919
+ q.push(append(q.pop(), range));
1867
1920
  node.nodes = [];
1868
1921
  return;
1869
1922
  }
1870
1923
  const enclose = utils.encloseBrace(node);
1871
1924
  let queue = node.queue;
1872
- let block = node;
1873
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
1874
- block = block.parent;
1875
- queue = block.queue;
1925
+ let block2 = node;
1926
+ while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
1927
+ block2 = block2.parent;
1928
+ queue = block2.queue;
1876
1929
  }
1877
- for (let i = 0; i < node.nodes.length; i++) {
1878
- const child = node.nodes[i];
1930
+ for (let i2 = 0; i2 < node.nodes.length; i2++) {
1931
+ const child = node.nodes[i2];
1879
1932
  if (child.type === "comma" && node.type === "brace") {
1880
- if (i === 1) queue.push("");
1933
+ if (i2 === 1) queue.push("");
1881
1934
  queue.push("");
1882
1935
  continue;
1883
1936
  }
1884
1937
  if (child.type === "close") {
1885
- q2.push(append(q2.pop(), queue, enclose));
1938
+ q.push(append(q.pop(), queue, enclose));
1886
1939
  continue;
1887
1940
  }
1888
1941
  if (child.value && child.type !== "open") {
@@ -2049,7 +2102,7 @@ var require_parse = __commonJS({
2049
2102
  }
2050
2103
  const ast = { type: "root", input, nodes: [] };
2051
2104
  const stack = [ast];
2052
- let block = ast;
2105
+ let block2 = ast;
2053
2106
  let prev = ast;
2054
2107
  let brackets = 0;
2055
2108
  const length = input.length;
@@ -2065,15 +2118,15 @@ var require_parse = __commonJS({
2065
2118
  prev.value += node.value;
2066
2119
  return;
2067
2120
  }
2068
- block.nodes.push(node);
2069
- node.parent = block;
2121
+ block2.nodes.push(node);
2122
+ node.parent = block2;
2070
2123
  node.prev = prev;
2071
2124
  prev = node;
2072
2125
  return node;
2073
2126
  };
2074
2127
  push({ type: "bos" });
2075
2128
  while (index < length) {
2076
- block = stack[stack.length - 1];
2129
+ block2 = stack[stack.length - 1];
2077
2130
  value = advance();
2078
2131
  if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
2079
2132
  continue;
@@ -2110,19 +2163,19 @@ var require_parse = __commonJS({
2110
2163
  continue;
2111
2164
  }
2112
2165
  if (value === CHAR_LEFT_PARENTHESES) {
2113
- block = push({ type: "paren", nodes: [] });
2114
- stack.push(block);
2166
+ block2 = push({ type: "paren", nodes: [] });
2167
+ stack.push(block2);
2115
2168
  push({ type: "text", value });
2116
2169
  continue;
2117
2170
  }
2118
2171
  if (value === CHAR_RIGHT_PARENTHESES) {
2119
- if (block.type !== "paren") {
2172
+ if (block2.type !== "paren") {
2120
2173
  push({ type: "text", value });
2121
2174
  continue;
2122
2175
  }
2123
- block = stack.pop();
2176
+ block2 = stack.pop();
2124
2177
  push({ type: "text", value });
2125
- block = stack[stack.length - 1];
2178
+ block2 = stack[stack.length - 1];
2126
2179
  continue;
2127
2180
  }
2128
2181
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
@@ -2147,7 +2200,7 @@ var require_parse = __commonJS({
2147
2200
  }
2148
2201
  if (value === CHAR_LEFT_CURLY_BRACE) {
2149
2202
  depth++;
2150
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
2203
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
2151
2204
  const brace = {
2152
2205
  type: "brace",
2153
2206
  open: true,
@@ -2158,52 +2211,52 @@ var require_parse = __commonJS({
2158
2211
  ranges: 0,
2159
2212
  nodes: []
2160
2213
  };
2161
- block = push(brace);
2162
- stack.push(block);
2214
+ block2 = push(brace);
2215
+ stack.push(block2);
2163
2216
  push({ type: "open", value });
2164
2217
  continue;
2165
2218
  }
2166
2219
  if (value === CHAR_RIGHT_CURLY_BRACE) {
2167
- if (block.type !== "brace") {
2220
+ if (block2.type !== "brace") {
2168
2221
  push({ type: "text", value });
2169
2222
  continue;
2170
2223
  }
2171
2224
  const type = "close";
2172
- block = stack.pop();
2173
- block.close = true;
2225
+ block2 = stack.pop();
2226
+ block2.close = true;
2174
2227
  push({ type, value });
2175
2228
  depth--;
2176
- block = stack[stack.length - 1];
2229
+ block2 = stack[stack.length - 1];
2177
2230
  continue;
2178
2231
  }
2179
2232
  if (value === CHAR_COMMA && depth > 0) {
2180
- if (block.ranges > 0) {
2181
- block.ranges = 0;
2182
- const open = block.nodes.shift();
2183
- block.nodes = [open, { type: "text", value: stringify2(block) }];
2233
+ if (block2.ranges > 0) {
2234
+ block2.ranges = 0;
2235
+ const open = block2.nodes.shift();
2236
+ block2.nodes = [open, { type: "text", value: stringify2(block2) }];
2184
2237
  }
2185
2238
  push({ type: "comma", value });
2186
- block.commas++;
2239
+ block2.commas++;
2187
2240
  continue;
2188
2241
  }
2189
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
2190
- const siblings = block.nodes;
2242
+ if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
2243
+ const siblings = block2.nodes;
2191
2244
  if (depth === 0 || siblings.length === 0) {
2192
2245
  push({ type: "text", value });
2193
2246
  continue;
2194
2247
  }
2195
2248
  if (prev.type === "dot") {
2196
- block.range = [];
2249
+ block2.range = [];
2197
2250
  prev.value += value;
2198
2251
  prev.type = "range";
2199
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
2200
- block.invalid = true;
2201
- block.ranges = 0;
2252
+ if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
2253
+ block2.invalid = true;
2254
+ block2.ranges = 0;
2202
2255
  prev.type = "text";
2203
2256
  continue;
2204
2257
  }
2205
- block.ranges++;
2206
- block.args = [];
2258
+ block2.ranges++;
2259
+ block2.args = [];
2207
2260
  continue;
2208
2261
  }
2209
2262
  if (prev.type === "range") {
@@ -2211,7 +2264,7 @@ var require_parse = __commonJS({
2211
2264
  const before = siblings[siblings.length - 1];
2212
2265
  before.value += prev.value + value;
2213
2266
  prev = before;
2214
- block.ranges--;
2267
+ block2.ranges--;
2215
2268
  continue;
2216
2269
  }
2217
2270
  push({ type: "dot", value });
@@ -2220,9 +2273,9 @@ var require_parse = __commonJS({
2220
2273
  push({ type: "text", value });
2221
2274
  }
2222
2275
  do {
2223
- block = stack.pop();
2224
- if (block.type !== "root") {
2225
- block.nodes.forEach((node) => {
2276
+ block2 = stack.pop();
2277
+ if (block2.type !== "root") {
2278
+ block2.nodes.forEach((node) => {
2226
2279
  if (!node.nodes) {
2227
2280
  if (node.type === "open") node.isOpen = true;
2228
2281
  if (node.type === "close") node.isClose = true;
@@ -2231,8 +2284,8 @@ var require_parse = __commonJS({
2231
2284
  }
2232
2285
  });
2233
2286
  const parent = stack[stack.length - 1];
2234
- const index2 = parent.nodes.indexOf(block);
2235
- parent.nodes.splice(index2, 1, ...block.nodes);
2287
+ const index2 = parent.nodes.indexOf(block2);
2288
+ parent.nodes.splice(index2, 1, ...block2.nodes);
2236
2289
  }
2237
2290
  } while (stack.length > 0);
2238
2291
  push({ type: "eos" });
@@ -2865,9 +2918,9 @@ var require_scan = __commonJS({
2865
2918
  if (opts.parts === true || opts.tokens === true) {
2866
2919
  let prevIndex;
2867
2920
  for (let idx = 0; idx < slashes.length; idx++) {
2868
- const n = prevIndex ? prevIndex + 1 : start;
2869
- const i = slashes[idx];
2870
- const value = input.slice(n, i);
2921
+ const n2 = prevIndex ? prevIndex + 1 : start;
2922
+ const i2 = slashes[idx];
2923
+ const value = input.slice(n2, i2);
2871
2924
  if (opts.tokens) {
2872
2925
  if (idx === 0 && start !== 0) {
2873
2926
  tokens[idx].isPrefix = true;
@@ -2881,7 +2934,7 @@ var require_scan = __commonJS({
2881
2934
  if (idx !== 0 || value !== "") {
2882
2935
  parts.push(value);
2883
2936
  }
2884
- prevIndex = i;
2937
+ prevIndex = i2;
2885
2938
  }
2886
2939
  if (prevIndex && prevIndex + 1 < input.length) {
2887
2940
  const value = input.slice(prevIndex + 1);
@@ -3010,15 +3063,15 @@ var require_parse2 = __commonJS({
3010
3063
  };
3011
3064
  var hasRepeatedCharPrefixOverlap = (branches) => {
3012
3065
  const values = branches.map(normalizeSimpleBranch).filter(Boolean);
3013
- for (let i = 0; i < values.length; i++) {
3014
- for (let j = i + 1; j < values.length; j++) {
3015
- const a = values[i];
3066
+ for (let i2 = 0; i2 < values.length; i2++) {
3067
+ for (let j = i2 + 1; j < values.length; j++) {
3068
+ const a2 = values[i2];
3016
3069
  const b = values[j];
3017
- const char = a[0];
3018
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
3070
+ const char = a2[0];
3071
+ if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
3019
3072
  continue;
3020
3073
  }
3021
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
3074
+ if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
3022
3075
  return true;
3023
3076
  }
3024
3077
  }
@@ -3033,8 +3086,8 @@ var require_parse2 = __commonJS({
3033
3086
  let paren = 0;
3034
3087
  let quote = 0;
3035
3088
  let escaped = false;
3036
- for (let i = 1; i < pattern.length; i++) {
3037
- const ch = pattern[i];
3089
+ for (let i2 = 1; i2 < pattern.length; i2++) {
3090
+ const ch = pattern[i2];
3038
3091
  if (escaped === true) {
3039
3092
  escaped = false;
3040
3093
  continue;
@@ -3068,13 +3121,13 @@ var require_parse2 = __commonJS({
3068
3121
  if (ch === ")") {
3069
3122
  paren--;
3070
3123
  if (paren === 0) {
3071
- if (requireEnd === true && i !== pattern.length - 1) {
3124
+ if (requireEnd === true && i2 !== pattern.length - 1) {
3072
3125
  return;
3073
3126
  }
3074
3127
  return {
3075
3128
  type: pattern[0],
3076
- body: pattern.slice(2, i),
3077
- end: i
3129
+ body: pattern.slice(2, i2),
3130
+ end: i2
3078
3131
  };
3079
3132
  }
3080
3133
  }
@@ -3206,7 +3259,7 @@ var require_parse2 = __commonJS({
3206
3259
  let prev = bos;
3207
3260
  let value;
3208
3261
  const eos = () => state.index === len - 1;
3209
- const peek = state.peek = (n = 1) => input[state.index + n];
3262
+ const peek = state.peek = (n2 = 1) => input[state.index + n2];
3210
3263
  const advance = state.advance = () => input[++state.index] || "";
3211
3264
  const remaining = () => input.slice(state.index + 1);
3212
3265
  const consume = (value2 = "", num = 0) => {
@@ -3287,10 +3340,10 @@ var require_parse2 = __commonJS({
3287
3340
  open.type = "text";
3288
3341
  open.value = literal;
3289
3342
  open.output = safeOutput || utils.escapeRegex(literal);
3290
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
3291
- tokens[i].value = "";
3292
- tokens[i].output = "";
3293
- delete tokens[i].suffix;
3343
+ for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
3344
+ tokens[i2].value = "";
3345
+ tokens[i2].output = "";
3346
+ delete tokens[i2].suffix;
3294
3347
  }
3295
3348
  state.output = token.output + open.output;
3296
3349
  state.backtrack = true;
@@ -3533,13 +3586,13 @@ var require_parse2 = __commonJS({
3533
3586
  if (brace.dots === true) {
3534
3587
  const arr = tokens.slice();
3535
3588
  const range = [];
3536
- for (let i = arr.length - 1; i >= 0; i--) {
3589
+ for (let i2 = arr.length - 1; i2 >= 0; i2--) {
3537
3590
  tokens.pop();
3538
- if (arr[i].type === "brace") {
3591
+ if (arr[i2].type === "brace") {
3539
3592
  break;
3540
3593
  }
3541
- if (arr[i].type !== "dots") {
3542
- range.unshift(arr[i].value);
3594
+ if (arr[i2].type !== "dots") {
3595
+ range.unshift(arr[i2].value);
3543
3596
  }
3544
3597
  }
3545
3598
  output = expandRange(range, opts);
@@ -4082,8 +4135,8 @@ var require_micromatch = __commonJS({
4082
4135
  options.onResult(state);
4083
4136
  }
4084
4137
  };
4085
- for (let i = 0; i < patterns.length; i++) {
4086
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
4138
+ for (let i2 = 0; i2 < patterns.length; i2++) {
4139
+ let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
4087
4140
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
4088
4141
  if (negated) negatives++;
4089
4142
  for (let item of list) {
@@ -4331,7 +4384,7 @@ var require_pattern = __commonJS({
4331
4384
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
4332
4385
  function expandBraceExpansion(pattern) {
4333
4386
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
4334
- patterns.sort((a, b) => a.length - b.length);
4387
+ patterns.sort((a2, b) => a2.length - b.length);
4335
4388
  return patterns.filter((pattern2) => pattern2 !== "");
4336
4389
  }
4337
4390
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4412,8 +4465,8 @@ var require_merge2 = __commonJS({
4412
4465
  }
4413
4466
  const mergedStream = PassThrough(options);
4414
4467
  function addStream() {
4415
- for (let i = 0, len = arguments.length; i < len; i++) {
4416
- streamsQueue.push(pauseStreams(arguments[i], options));
4468
+ for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
4469
+ streamsQueue.push(pauseStreams(arguments[i2], options));
4417
4470
  }
4418
4471
  mergeStream();
4419
4472
  return this;
@@ -4462,8 +4515,8 @@ var require_merge2 = __commonJS({
4462
4515
  stream.pipe(mergedStream, { end: false });
4463
4516
  stream.resume();
4464
4517
  }
4465
- for (let i = 0; i < streams.length; i++) {
4466
- pipe(streams[i]);
4518
+ for (let i2 = 0; i2 < streams.length; i2++) {
4519
+ pipe(streams[i2]);
4467
4520
  }
4468
4521
  next();
4469
4522
  }
@@ -4494,8 +4547,8 @@ var require_merge2 = __commonJS({
4494
4547
  }
4495
4548
  streams.pause();
4496
4549
  } else {
4497
- for (let i = 0, len = streams.length; i < len; i++) {
4498
- streams[i] = pauseStreams(streams[i], options);
4550
+ for (let i2 = 0, len = streams.length; i2 < len; i2++) {
4551
+ streams[i2] = pauseStreams(streams[i2], options);
4499
4552
  }
4500
4553
  }
4501
4554
  return streams;
@@ -4577,13 +4630,13 @@ var require_tasks = __commonJS({
4577
4630
  Object.defineProperty(exports, "__esModule", { value: true });
4578
4631
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
4579
4632
  var utils = require_utils3();
4580
- function generate(input, settings) {
4581
- const patterns = processPatterns(input, settings);
4582
- const ignore = processPatterns(settings.ignore, settings);
4633
+ function generate(input, settings2) {
4634
+ const patterns = processPatterns(input, settings2);
4635
+ const ignore = processPatterns(settings2.ignore, settings2);
4583
4636
  const positivePatterns = getPositivePatterns(patterns);
4584
4637
  const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
4585
- const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
4586
- const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
4638
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
4639
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
4587
4640
  const staticTasks = convertPatternsToTasks(
4588
4641
  staticPatterns,
4589
4642
  negativePatterns,
@@ -4599,12 +4652,12 @@ var require_tasks = __commonJS({
4599
4652
  return staticTasks.concat(dynamicTasks);
4600
4653
  }
4601
4654
  exports.generate = generate;
4602
- function processPatterns(input, settings) {
4655
+ function processPatterns(input, settings2) {
4603
4656
  let patterns = input;
4604
- if (settings.braceExpansion) {
4657
+ if (settings2.braceExpansion) {
4605
4658
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
4606
4659
  }
4607
- if (settings.baseNameMatch) {
4660
+ if (settings2.baseNameMatch) {
4608
4661
  patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
4609
4662
  }
4610
4663
  return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
@@ -4673,26 +4726,26 @@ var require_async = __commonJS({
4673
4726
  init_utils2();
4674
4727
  Object.defineProperty(exports, "__esModule", { value: true });
4675
4728
  exports.read = void 0;
4676
- function read(path, settings, callback) {
4677
- settings.fs.lstat(path, (lstatError, lstat) => {
4729
+ function read(path, settings2, callback) {
4730
+ settings2.fs.lstat(path, (lstatError, lstat) => {
4678
4731
  if (lstatError !== null) {
4679
4732
  callFailureCallback(callback, lstatError);
4680
4733
  return;
4681
4734
  }
4682
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
4735
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
4683
4736
  callSuccessCallback(callback, lstat);
4684
4737
  return;
4685
4738
  }
4686
- settings.fs.stat(path, (statError, stat) => {
4739
+ settings2.fs.stat(path, (statError, stat) => {
4687
4740
  if (statError !== null) {
4688
- if (settings.throwErrorOnBrokenSymbolicLink) {
4741
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
4689
4742
  callFailureCallback(callback, statError);
4690
4743
  return;
4691
4744
  }
4692
4745
  callSuccessCallback(callback, lstat);
4693
4746
  return;
4694
4747
  }
4695
- if (settings.markSymbolicLink) {
4748
+ if (settings2.markSymbolicLink) {
4696
4749
  stat.isSymbolicLink = () => true;
4697
4750
  }
4698
4751
  callSuccessCallback(callback, stat);
@@ -4716,19 +4769,19 @@ var require_sync = __commonJS({
4716
4769
  init_utils2();
4717
4770
  Object.defineProperty(exports, "__esModule", { value: true });
4718
4771
  exports.read = void 0;
4719
- function read(path, settings) {
4720
- const lstat = settings.fs.lstatSync(path);
4721
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
4772
+ function read(path, settings2) {
4773
+ const lstat = settings2.fs.lstatSync(path);
4774
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
4722
4775
  return lstat;
4723
4776
  }
4724
4777
  try {
4725
- const stat = settings.fs.statSync(path);
4726
- if (settings.markSymbolicLink) {
4778
+ const stat = settings2.fs.statSync(path);
4779
+ if (settings2.markSymbolicLink) {
4727
4780
  stat.isSymbolicLink = () => true;
4728
4781
  }
4729
4782
  return stat;
4730
4783
  } catch (error2) {
4731
- if (!settings.throwErrorOnBrokenSymbolicLink) {
4784
+ if (!settings2.throwErrorOnBrokenSymbolicLink) {
4732
4785
  return lstat;
4733
4786
  }
4734
4787
  throw error2;
@@ -4805,8 +4858,8 @@ var require_out = __commonJS({
4805
4858
  }
4806
4859
  exports.stat = stat;
4807
4860
  function statSync3(path, optionsOrSettings) {
4808
- const settings = getSettings(optionsOrSettings);
4809
- return sync.read(path, settings);
4861
+ const settings2 = getSettings(optionsOrSettings);
4862
+ return sync.read(path, settings2);
4810
4863
  }
4811
4864
  exports.statSync = statSync3;
4812
4865
  function getSettings(settingsOrOptions = {}) {
@@ -4854,8 +4907,8 @@ var require_run_parallel = __commonJS({
4854
4907
  if (isSync) queueMicrotask2(end);
4855
4908
  else end();
4856
4909
  }
4857
- function each(i, err, result) {
4858
- results[i] = result;
4910
+ function each(i2, err, result) {
4911
+ results[i2] = result;
4859
4912
  if (--pending === 0 || err) {
4860
4913
  done(err);
4861
4914
  }
@@ -4869,9 +4922,9 @@ var require_run_parallel = __commonJS({
4869
4922
  });
4870
4923
  });
4871
4924
  } else {
4872
- tasks.forEach(function(task, i) {
4925
+ tasks.forEach(function(task, i2) {
4873
4926
  task(function(err, result) {
4874
- each(i, err, result);
4927
+ each(i2, err, result);
4875
4928
  });
4876
4929
  });
4877
4930
  }
@@ -4946,11 +4999,11 @@ var require_common = __commonJS({
4946
4999
  init_utils2();
4947
5000
  Object.defineProperty(exports, "__esModule", { value: true });
4948
5001
  exports.joinPathSegments = void 0;
4949
- function joinPathSegments(a, b, separator) {
4950
- if (a.endsWith(separator)) {
4951
- return a + b;
5002
+ function joinPathSegments(a2, b, separator) {
5003
+ if (a2.endsWith(separator)) {
5004
+ return a2 + b;
4952
5005
  }
4953
- return a + separator + b;
5006
+ return a2 + separator + b;
4954
5007
  }
4955
5008
  exports.joinPathSegments = joinPathSegments;
4956
5009
  }
@@ -4968,16 +5021,16 @@ var require_async2 = __commonJS({
4968
5021
  var constants_1 = require_constants3();
4969
5022
  var utils = require_utils4();
4970
5023
  var common = require_common();
4971
- function read(directory, settings, callback) {
4972
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
4973
- readdirWithFileTypes(directory, settings, callback);
5024
+ function read(directory, settings2, callback) {
5025
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5026
+ readdirWithFileTypes(directory, settings2, callback);
4974
5027
  return;
4975
5028
  }
4976
- readdir(directory, settings, callback);
5029
+ readdir(directory, settings2, callback);
4977
5030
  }
4978
5031
  exports.read = read;
4979
- function readdirWithFileTypes(directory, settings, callback) {
4980
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5032
+ function readdirWithFileTypes(directory, settings2, callback) {
5033
+ settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
4981
5034
  if (readdirError !== null) {
4982
5035
  callFailureCallback(callback, readdirError);
4983
5036
  return;
@@ -4985,13 +5038,13 @@ var require_async2 = __commonJS({
4985
5038
  const entries = dirents.map((dirent) => ({
4986
5039
  dirent,
4987
5040
  name: dirent.name,
4988
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5041
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
4989
5042
  }));
4990
- if (!settings.followSymbolicLinks) {
5043
+ if (!settings2.followSymbolicLinks) {
4991
5044
  callSuccessCallback(callback, entries);
4992
5045
  return;
4993
5046
  }
4994
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
5047
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
4995
5048
  rpl(tasks, (rplError, rplEntries) => {
4996
5049
  if (rplError !== null) {
4997
5050
  callFailureCallback(callback, rplError);
@@ -5002,15 +5055,15 @@ var require_async2 = __commonJS({
5002
5055
  });
5003
5056
  }
5004
5057
  exports.readdirWithFileTypes = readdirWithFileTypes;
5005
- function makeRplTaskEntry(entry, settings) {
5058
+ function makeRplTaskEntry(entry, settings2) {
5006
5059
  return (done) => {
5007
5060
  if (!entry.dirent.isSymbolicLink()) {
5008
5061
  done(null, entry);
5009
5062
  return;
5010
5063
  }
5011
- settings.fs.stat(entry.path, (statError, stats) => {
5064
+ settings2.fs.stat(entry.path, (statError, stats) => {
5012
5065
  if (statError !== null) {
5013
- if (settings.throwErrorOnBrokenSymbolicLink) {
5066
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5014
5067
  done(statError);
5015
5068
  return;
5016
5069
  }
@@ -5022,16 +5075,16 @@ var require_async2 = __commonJS({
5022
5075
  });
5023
5076
  };
5024
5077
  }
5025
- function readdir(directory, settings, callback) {
5026
- settings.fs.readdir(directory, (readdirError, names) => {
5078
+ function readdir(directory, settings2, callback) {
5079
+ settings2.fs.readdir(directory, (readdirError, names) => {
5027
5080
  if (readdirError !== null) {
5028
5081
  callFailureCallback(callback, readdirError);
5029
5082
  return;
5030
5083
  }
5031
5084
  const tasks = names.map((name) => {
5032
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5085
+ const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5033
5086
  return (done) => {
5034
- fsStat.stat(path, settings.fsStatSettings, (error2, stats) => {
5087
+ fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
5035
5088
  if (error2 !== null) {
5036
5089
  done(error2);
5037
5090
  return;
@@ -5041,7 +5094,7 @@ var require_async2 = __commonJS({
5041
5094
  path,
5042
5095
  dirent: utils.fs.createDirentFromStats(name, stats)
5043
5096
  };
5044
- if (settings.stats) {
5097
+ if (settings2.stats) {
5045
5098
  entry.stats = stats;
5046
5099
  }
5047
5100
  done(null, entry);
@@ -5078,27 +5131,27 @@ var require_sync2 = __commonJS({
5078
5131
  var constants_1 = require_constants3();
5079
5132
  var utils = require_utils4();
5080
5133
  var common = require_common();
5081
- function read(directory, settings) {
5082
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5083
- return readdirWithFileTypes(directory, settings);
5134
+ function read(directory, settings2) {
5135
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5136
+ return readdirWithFileTypes(directory, settings2);
5084
5137
  }
5085
- return readdir(directory, settings);
5138
+ return readdir(directory, settings2);
5086
5139
  }
5087
5140
  exports.read = read;
5088
- function readdirWithFileTypes(directory, settings) {
5089
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
5141
+ function readdirWithFileTypes(directory, settings2) {
5142
+ const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
5090
5143
  return dirents.map((dirent) => {
5091
5144
  const entry = {
5092
5145
  dirent,
5093
5146
  name: dirent.name,
5094
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5147
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5095
5148
  };
5096
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
5149
+ if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
5097
5150
  try {
5098
- const stats = settings.fs.statSync(entry.path);
5151
+ const stats = settings2.fs.statSync(entry.path);
5099
5152
  entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
5100
5153
  } catch (error2) {
5101
- if (settings.throwErrorOnBrokenSymbolicLink) {
5154
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5102
5155
  throw error2;
5103
5156
  }
5104
5157
  }
@@ -5107,17 +5160,17 @@ var require_sync2 = __commonJS({
5107
5160
  });
5108
5161
  }
5109
5162
  exports.readdirWithFileTypes = readdirWithFileTypes;
5110
- function readdir(directory, settings) {
5111
- const names = settings.fs.readdirSync(directory);
5163
+ function readdir(directory, settings2) {
5164
+ const names = settings2.fs.readdirSync(directory);
5112
5165
  return names.map((name) => {
5113
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5114
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
5166
+ const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5167
+ const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
5115
5168
  const entry = {
5116
5169
  name,
5117
5170
  path: entryPath,
5118
5171
  dirent: utils.fs.createDirentFromStats(name, stats)
5119
5172
  };
5120
- if (settings.stats) {
5173
+ if (settings2.stats) {
5121
5174
  entry.stats = stats;
5122
5175
  }
5123
5176
  return entry;
@@ -5204,8 +5257,8 @@ var require_out2 = __commonJS({
5204
5257
  }
5205
5258
  exports.scandir = scandir;
5206
5259
  function scandirSync(path, optionsOrSettings) {
5207
- const settings = getSettings(optionsOrSettings);
5208
- return sync.read(path, settings);
5260
+ const settings2 = getSettings(optionsOrSettings);
5261
+ return sync.read(path, settings2);
5209
5262
  }
5210
5263
  exports.scandirSync = scandirSync;
5211
5264
  function getSettings(settingsOrOptions = {}) {
@@ -5249,9 +5302,9 @@ var require_reusify = __commonJS({
5249
5302
  }
5250
5303
  });
5251
5304
 
5252
- // node_modules/.bun/fastq@1.20.1/node_modules/fastq/queue.js
5305
+ // node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js
5253
5306
  var require_queue = __commonJS({
5254
- "node_modules/.bun/fastq@1.20.1/node_modules/fastq/queue.js"(exports, module) {
5307
+ "node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js"(exports, module) {
5255
5308
  "use strict";
5256
5309
  init_utils2();
5257
5310
  var reusify = require_reusify();
@@ -5431,11 +5484,12 @@ var require_queue = __commonJS({
5431
5484
  current.value = null;
5432
5485
  current.callback = noop;
5433
5486
  current.errorHandler = null;
5487
+ current.next = null;
5434
5488
  if (errorHandler2) {
5435
5489
  errorHandler2(new Error("abort"), val);
5436
5490
  }
5437
5491
  callback.call(context2, new Error("abort"));
5438
- current.release(current);
5492
+ cache.release(current);
5439
5493
  current = next;
5440
5494
  }
5441
5495
  self.drain = noop;
@@ -5541,11 +5595,11 @@ var require_common2 = __commonJS({
5541
5595
  init_utils2();
5542
5596
  Object.defineProperty(exports, "__esModule", { value: true });
5543
5597
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
5544
- function isFatalError(settings, error2) {
5545
- if (settings.errorFilter === null) {
5598
+ function isFatalError(settings2, error2) {
5599
+ if (settings2.errorFilter === null) {
5546
5600
  return true;
5547
5601
  }
5548
- return !settings.errorFilter(error2);
5602
+ return !settings2.errorFilter(error2);
5549
5603
  }
5550
5604
  exports.isFatalError = isFatalError;
5551
5605
  function isAppliedFilter(filter, value) {
@@ -5556,14 +5610,14 @@ var require_common2 = __commonJS({
5556
5610
  return filepath.split(/[/\\]/).join(separator);
5557
5611
  }
5558
5612
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
5559
- function joinPathSegments(a, b, separator) {
5560
- if (a === "") {
5613
+ function joinPathSegments(a2, b, separator) {
5614
+ if (a2 === "") {
5561
5615
  return b;
5562
5616
  }
5563
- if (a.endsWith(separator)) {
5564
- return a + b;
5617
+ if (a2.endsWith(separator)) {
5618
+ return a2 + b;
5565
5619
  }
5566
- return a + separator + b;
5620
+ return a2 + separator + b;
5567
5621
  }
5568
5622
  exports.joinPathSegments = joinPathSegments;
5569
5623
  }
@@ -5910,14 +5964,14 @@ var require_out3 = __commonJS({
5910
5964
  }
5911
5965
  exports.walk = walk;
5912
5966
  function walkSync(directory, optionsOrSettings) {
5913
- const settings = getSettings(optionsOrSettings);
5914
- const provider = new sync_1.default(directory, settings);
5967
+ const settings2 = getSettings(optionsOrSettings);
5968
+ const provider = new sync_1.default(directory, settings2);
5915
5969
  return provider.read();
5916
5970
  }
5917
5971
  exports.walkSync = walkSync;
5918
5972
  function walkStream(directory, optionsOrSettings) {
5919
- const settings = getSettings(optionsOrSettings);
5920
- const provider = new stream_1.default(directory, settings);
5973
+ const settings2 = getSettings(optionsOrSettings);
5974
+ const provider = new stream_1.default(directory, settings2);
5921
5975
  return provider.read();
5922
5976
  }
5923
5977
  exports.walkStream = walkStream;
@@ -6003,8 +6057,8 @@ var require_stream3 = __commonJS({
6003
6057
  done();
6004
6058
  }).catch(done);
6005
6059
  };
6006
- for (let i = 0; i < filepaths.length; i++) {
6007
- stream.write(i);
6060
+ for (let i2 = 0; i2 < filepaths.length; i2++) {
6061
+ stream.write(i2);
6008
6062
  }
6009
6063
  return stream;
6010
6064
  }
@@ -6665,14 +6719,14 @@ var require_out4 = __commonJS({
6665
6719
  function generateTasks(source, options) {
6666
6720
  assertPatternsInput(source);
6667
6721
  const patterns = [].concat(source);
6668
- const settings = new settings_1.default(options);
6669
- return taskManager.generate(patterns, settings);
6722
+ const settings2 = new settings_1.default(options);
6723
+ return taskManager.generate(patterns, settings2);
6670
6724
  }
6671
6725
  FastGlob2.generateTasks = generateTasks;
6672
6726
  function isDynamicPattern(source, options) {
6673
6727
  assertPatternsInput(source);
6674
- const settings = new settings_1.default(options);
6675
- return utils.pattern.isDynamicPattern(source, settings);
6728
+ const settings2 = new settings_1.default(options);
6729
+ return utils.pattern.isDynamicPattern(source, settings2);
6676
6730
  }
6677
6731
  FastGlob2.isDynamicPattern = isDynamicPattern;
6678
6732
  function escapePath(source) {
@@ -6714,9 +6768,9 @@ var require_out4 = __commonJS({
6714
6768
  })(FastGlob || (FastGlob = {}));
6715
6769
  function getWorks(source, _Provider, options) {
6716
6770
  const patterns = [].concat(source);
6717
- const settings = new settings_1.default(options);
6718
- const tasks = taskManager.generate(patterns, settings);
6719
- const provider = new _Provider(settings);
6771
+ const settings2 = new settings_1.default(options);
6772
+ const tasks = taskManager.generate(patterns, settings2);
6773
+ const provider = new _Provider(settings2);
6720
6774
  return tasks.map(provider.read, provider);
6721
6775
  }
6722
6776
  function assertPatternsInput(input) {
@@ -6894,14 +6948,14 @@ import "node:fs";
6894
6948
  import { createRequire } from "node:module";
6895
6949
  import {
6896
6950
  resolve,
6897
- join,
6898
- dirname,
6951
+ join as join2,
6952
+ dirname as dirname2,
6899
6953
  relative,
6900
6954
  normalize,
6901
6955
  sep,
6902
6956
  extname
6903
6957
  } from "node:path";
6904
- import "node:url";
6958
+ import { fileURLToPath } from "node:url";
6905
6959
  function safeExecuteAsync(fn, message) {
6906
6960
  return fn().catch((error2) => {
6907
6961
  throw new Error(
@@ -6909,7 +6963,7 @@ function safeExecuteAsync(fn, message) {
6909
6963
  );
6910
6964
  });
6911
6965
  }
6912
- var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
6966
+ var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
6913
6967
  var init_PathResolver = __esm({
6914
6968
  "packages/core/config/utils/PathResolver.ts"() {
6915
6969
  "use strict";
@@ -6922,7 +6976,7 @@ var init_PathResolver = __esm({
6922
6976
  getPatternsFor: getPatternsFor || void 0,
6923
6977
  I18N_PATHS: I18N_PATHS || void 0
6924
6978
  };
6925
- log2 = {
6979
+ log3 = {
6926
6980
  error: (message, error2) => {
6927
6981
  },
6928
6982
  warn: (message, error2) => {
@@ -6958,6 +7012,7 @@ var init_PathResolver = __esm({
6958
7012
  options;
6959
7013
  _repoRoot;
6960
7014
  _appRoot = null;
7015
+ _writtenPaths = null;
6961
7016
  /**
6962
7017
  * Get or create singleton instance
6963
7018
  * @param options - Configuration options
@@ -7043,7 +7098,7 @@ var init_PathResolver = __esm({
7043
7098
  */
7044
7099
  getDirname(path) {
7045
7100
  if (!path) return "";
7046
- return this.normalizePath(dirname(path));
7101
+ return this.normalizePath(dirname2(path));
7047
7102
  }
7048
7103
  /**
7049
7104
  * Resolve package path using Node's module resolution
@@ -7055,7 +7110,7 @@ var init_PathResolver = __esm({
7055
7110
  resolvePackage(packageSpecifier, fromPath = null) {
7056
7111
  try {
7057
7112
  const basePath = fromPath || this.getAppRoot();
7058
- const require3 = createRequire(join(basePath, "package.json"));
7113
+ const require3 = createRequire(join2(basePath, "package.json"));
7059
7114
  const resolved = require3.resolve(packageSpecifier);
7060
7115
  return this.normalizePath(resolved);
7061
7116
  } catch (error2) {
@@ -7207,7 +7262,7 @@ var init_PathResolver = __esm({
7207
7262
  return cleanContent;
7208
7263
  } catch (error2) {
7209
7264
  if (this.options.debug) {
7210
- log2.warn(`Failed to read file: ${filePath}`, error2);
7265
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7211
7266
  }
7212
7267
  return null;
7213
7268
  }
@@ -7235,7 +7290,7 @@ var init_PathResolver = __esm({
7235
7290
  return cleanContent;
7236
7291
  } catch (error2) {
7237
7292
  if (this.options.debug) {
7238
- log2.warn(`Failed to read file: ${filePath}`, error2);
7293
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7239
7294
  }
7240
7295
  return null;
7241
7296
  }
@@ -7257,16 +7312,16 @@ var init_PathResolver = __esm({
7257
7312
  verbose = false
7258
7313
  } = options;
7259
7314
  const normalizedPath = this.normalizePath(filePath);
7260
- const dir = this.normalizePath(dirname(normalizedPath));
7315
+ const dir = this.normalizePath(dirname2(normalizedPath));
7261
7316
  const fileExists = this.pathExists(normalizedPath);
7262
7317
  if (fileExists && !overwrite) {
7263
7318
  if (verbose) {
7264
- log2.info(`Skipping existing file: ${normalizedPath}`);
7319
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7265
7320
  }
7266
7321
  return false;
7267
7322
  }
7268
7323
  if (dryRun) {
7269
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7324
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7270
7325
  return true;
7271
7326
  }
7272
7327
  try {
@@ -7276,22 +7331,23 @@ var init_PathResolver = __esm({
7276
7331
  }
7277
7332
  const detectedFormat = this._detectFormat(filePath, format);
7278
7333
  let writeContent;
7279
- if (Buffer.isBuffer(content)) {
7334
+ if (Buffer2.isBuffer(content)) {
7280
7335
  writeContent = content;
7281
7336
  } else if (detectedFormat === "json" && typeof content === "object") {
7282
- writeContent = JSON.stringify(content, null, 2);
7337
+ writeContent = `${JSON.stringify(content, null, 2)}
7338
+ `;
7283
7339
  } else {
7284
7340
  writeContent = String(content);
7285
7341
  }
7286
7342
  try {
7287
7343
  return await safeExecuteAsync(async () => {
7288
- if (Buffer.isBuffer(writeContent)) {
7344
+ if (Buffer2.isBuffer(writeContent)) {
7289
7345
  await fs.promises.writeFile(normalizedPath, writeContent);
7290
7346
  } else {
7291
7347
  await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
7292
7348
  }
7293
7349
  if (verbose) {
7294
- log2.info(
7350
+ log3.info(
7295
7351
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7296
7352
  );
7297
7353
  }
@@ -7318,16 +7374,16 @@ var init_PathResolver = __esm({
7318
7374
  verbose = false
7319
7375
  } = options;
7320
7376
  const normalizedPath = this.normalizePath(filePath);
7321
- const dir = this.normalizePath(dirname(normalizedPath));
7377
+ const dir = this.normalizePath(dirname2(normalizedPath));
7322
7378
  const fileExists = this.pathExists(normalizedPath);
7323
7379
  if (fileExists && !overwrite) {
7324
7380
  if (verbose) {
7325
- log2.info(`Skipping existing file: ${normalizedPath}`);
7381
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7326
7382
  }
7327
7383
  return false;
7328
7384
  }
7329
7385
  if (dryRun) {
7330
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7386
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7331
7387
  return true;
7332
7388
  }
7333
7389
  try {
@@ -7337,21 +7393,23 @@ var init_PathResolver = __esm({
7337
7393
  }
7338
7394
  const detectedFormat = this._detectFormat(filePath, format);
7339
7395
  let writeContent;
7340
- if (Buffer.isBuffer(content)) {
7396
+ if (Buffer2.isBuffer(content)) {
7341
7397
  writeContent = content;
7342
7398
  } else if (detectedFormat === "json" && typeof content === "object") {
7343
- writeContent = JSON.stringify(content, null, 2);
7399
+ writeContent = `${JSON.stringify(content, null, 2)}
7400
+ `;
7344
7401
  } else {
7345
7402
  writeContent = String(content);
7346
7403
  }
7347
7404
  try {
7348
- if (Buffer.isBuffer(writeContent)) {
7405
+ if (Buffer2.isBuffer(writeContent)) {
7349
7406
  fs.writeFileSync(normalizedPath, writeContent);
7350
7407
  } else {
7351
7408
  fs.writeFileSync(normalizedPath, writeContent, "utf8");
7352
7409
  }
7410
+ this._writtenPaths?.add(normalizedPath);
7353
7411
  if (verbose) {
7354
- log2.info(
7412
+ log3.info(
7355
7413
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7356
7414
  );
7357
7415
  }
@@ -7376,15 +7434,15 @@ var init_PathResolver = __esm({
7376
7434
  const fileExists = this.pathExists(normalizedDestPath);
7377
7435
  if (fileExists && !overwrite) {
7378
7436
  if (verbose) {
7379
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
7437
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7380
7438
  }
7381
7439
  return false;
7382
7440
  }
7383
7441
  if (dryRun) {
7384
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7442
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7385
7443
  return true;
7386
7444
  }
7387
- const dir = this.normalizePath(dirname(normalizedDestPath));
7445
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7388
7446
  try {
7389
7447
  await fs.promises.mkdir(dir, { recursive: true });
7390
7448
  } catch (error2) {
@@ -7394,7 +7452,7 @@ var init_PathResolver = __esm({
7394
7452
  return await safeExecuteAsync(async () => {
7395
7453
  await fs.promises.copyFile(srcPath, normalizedDestPath);
7396
7454
  if (verbose) {
7397
- log2.info(
7455
+ log3.info(
7398
7456
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7399
7457
  );
7400
7458
  }
@@ -7418,15 +7476,15 @@ var init_PathResolver = __esm({
7418
7476
  const fileExists = this.pathExists(normalizedDestPath);
7419
7477
  if (fileExists && !overwrite) {
7420
7478
  if (verbose) {
7421
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
7479
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7422
7480
  }
7423
7481
  return false;
7424
7482
  }
7425
7483
  if (dryRun) {
7426
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7484
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7427
7485
  return true;
7428
7486
  }
7429
- const dir = this.normalizePath(dirname(normalizedDestPath));
7487
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7430
7488
  try {
7431
7489
  fs.mkdirSync(dir, { recursive: true });
7432
7490
  } catch (error2) {
@@ -7434,8 +7492,9 @@ var init_PathResolver = __esm({
7434
7492
  }
7435
7493
  try {
7436
7494
  fs.copyFileSync(srcPath, normalizedDestPath);
7495
+ this._writtenPaths?.add(normalizedDestPath);
7437
7496
  if (verbose) {
7438
- log2.info(
7497
+ log3.info(
7439
7498
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7440
7499
  );
7441
7500
  }
@@ -7452,7 +7511,7 @@ var init_PathResolver = __esm({
7452
7511
  return fs.existsSync(filePath);
7453
7512
  } catch (error2) {
7454
7513
  if (!silent) {
7455
- log2.error(`Error checking path existence: ${filePath}`, error2);
7514
+ log3.error(`Error checking path existence: ${filePath}`, error2);
7456
7515
  }
7457
7516
  return false;
7458
7517
  }
@@ -7478,7 +7537,7 @@ var init_PathResolver = __esm({
7478
7537
  return fs.readdirSync(dirPath, options);
7479
7538
  } catch (error2) {
7480
7539
  if (this.options.debug) {
7481
- log2.warn(`Failed to read directory: ${dirPath}`, error2);
7540
+ log3.warn(`Failed to read directory: ${dirPath}`, error2);
7482
7541
  }
7483
7542
  const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
7484
7543
  return isObjectOptions && options.withFileTypes ? [] : [];
@@ -7496,11 +7555,29 @@ var init_PathResolver = __esm({
7496
7555
  return fs.statSync(filePath);
7497
7556
  } catch (error2) {
7498
7557
  if (this.options.debug) {
7499
- log2.warn(`Failed to stat file: ${filePath}`, error2);
7558
+ log3.warn(`Failed to stat file: ${filePath}`, error2);
7500
7559
  }
7501
7560
  return null;
7502
7561
  }
7503
7562
  }
7563
+ /**
7564
+ * Resolve the real path of a file, following symlinks
7565
+ * @param filePath - Path to resolve
7566
+ * @returns Resolved real path
7567
+ */
7568
+ realpathSync(filePath) {
7569
+ return fs.realpathSync(filePath);
7570
+ }
7571
+ /**
7572
+ * Watch a directory for changes
7573
+ * @param dirPath - Directory to watch
7574
+ * @param options - fs.watch options
7575
+ * @param callback - Callback for change events
7576
+ * @returns FSWatcher instance
7577
+ */
7578
+ watch(dirPath, options, callback) {
7579
+ return fs.watch(dirPath, options, callback);
7580
+ }
7504
7581
  /**
7505
7582
  * Get file stats synchronously (follows symlinks)
7506
7583
  * Returns null if file doesn't exist (graceful degradation)
@@ -7513,7 +7590,7 @@ var init_PathResolver = __esm({
7513
7590
  return fs.lstatSync(filePath);
7514
7591
  } catch (error2) {
7515
7592
  if (this.options.debug) {
7516
- log2.warn(`Failed to lstat file: ${filePath}`, error2);
7593
+ log3.warn(`Failed to lstat file: ${filePath}`, error2);
7517
7594
  }
7518
7595
  return null;
7519
7596
  }
@@ -7580,6 +7657,28 @@ var init_PathResolver = __esm({
7580
7657
  * Get app root (where vite.config.ts is, Vite's config.root)
7581
7658
  * Falls back to repoRoot if not set
7582
7659
  */
7660
+ /**
7661
+ * Start recording every path written by writeSync/copySync.
7662
+ * Lets a generator know exactly which files the current run produced,
7663
+ * without comparing file timestamps to a clock.
7664
+ */
7665
+ startWriteRecording() {
7666
+ this._writtenPaths = /* @__PURE__ */ new Set();
7667
+ }
7668
+ /**
7669
+ * Stop recording and return the normalized paths written since
7670
+ * startWriteRecording().
7671
+ */
7672
+ stopWriteRecording() {
7673
+ if (!this._writtenPaths) {
7674
+ throw new Error(
7675
+ "stopWriteRecording() called without startWriteRecording()"
7676
+ );
7677
+ }
7678
+ const written = this._writtenPaths;
7679
+ this._writtenPaths = null;
7680
+ return written;
7681
+ }
7583
7682
  getAppRoot() {
7584
7683
  if (!this._appRoot) {
7585
7684
  return this._repoRoot;
@@ -7602,7 +7701,7 @@ var init_PathResolver = __esm({
7602
7701
  * @returns True if repoRoot is the monorepo (has packages directory)
7603
7702
  */
7604
7703
  isMonorepo() {
7605
- const packagesDir = join(this._repoRoot, "packages");
7704
+ const packagesDir = join2(this._repoRoot, "packages");
7606
7705
  return this.pathExists(packagesDir);
7607
7706
  }
7608
7707
  /**
@@ -7619,7 +7718,7 @@ var init_PathResolver = __esm({
7619
7718
  * Find files matching pattern within directory
7620
7719
  */
7621
7720
  async findFiles(directory, pattern, options = {}) {
7622
- const searchPattern = this.normalizePath(join(directory, pattern));
7721
+ const searchPattern = this.normalizePath(join2(directory, pattern));
7623
7722
  const appRoot = this.getAppRoot();
7624
7723
  const normalizeAppRoot = this.normalizePath(appRoot);
7625
7724
  const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
@@ -7666,7 +7765,7 @@ var init_PathResolver = __esm({
7666
7765
  return null;
7667
7766
  }
7668
7767
  const resolvedPath = this.normalizePath(
7669
- join(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
7768
+ join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
7670
7769
  );
7671
7770
  const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
7672
7771
  if (this.pathExists(resolvedDir)) {
@@ -7837,6 +7936,15 @@ var init_PathResolver = __esm({
7837
7936
  const cjsPath = this.getEmptyCjsModulePath();
7838
7937
  return cjsPath.replace(/\.cjs$/, ".js");
7839
7938
  }
7939
+ /**
7940
+ * Get absolute path to empty flag component module.
7941
+ * Returns `export default () => null;` — used by flag filtering plugins
7942
+ * to replace unused flag files at build time.
7943
+ */
7944
+ getEmptyFlagModulePath() {
7945
+ const __dirname2 = dirname2(fileURLToPath(import.meta.url));
7946
+ return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
7947
+ }
7840
7948
  /**
7841
7949
  * Get absolute path to empty CJS module for esbuild pre-bundling.
7842
7950
  * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
@@ -7862,13 +7970,13 @@ var init_PathResolver = __esm({
7862
7970
  const maxLevels = this.options.maxLevels;
7863
7971
  while (levelsChecked < maxLevels) {
7864
7972
  const toolingPath = this.normalizePath(
7865
- join(currentDir, PACKAGE_PATHS.TOOLING)
7973
+ join2(currentDir, PACKAGE_PATHS.TOOLING)
7866
7974
  );
7867
- const corePath = this.normalizePath(join(currentDir, PACKAGE_PATHS.CORE));
7975
+ const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
7868
7976
  if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
7869
7977
  return currentDir;
7870
7978
  }
7871
- const appsDir = join(currentDir, "apps");
7979
+ const appsDir = join2(currentDir, "apps");
7872
7980
  if (this.pathExists(appsDir)) {
7873
7981
  const appsDirStat = this.statSync(appsDir);
7874
7982
  if (appsDirStat?.isDirectory()) {
@@ -7876,15 +7984,15 @@ var init_PathResolver = __esm({
7876
7984
  }
7877
7985
  }
7878
7986
  const packageJsonPath = this.normalizePath(
7879
- join(currentDir, "package.json")
7987
+ join2(currentDir, "package.json")
7880
7988
  );
7881
7989
  if (this.pathExists(packageJsonPath)) {
7882
- const parentDir2 = this.normalizePath(dirname(currentDir));
7990
+ const parentDir2 = this.normalizePath(dirname2(currentDir));
7883
7991
  if (parentDir2 === currentDir) {
7884
7992
  return currentDir;
7885
7993
  }
7886
7994
  }
7887
- const parentDir = this.normalizePath(dirname(currentDir));
7995
+ const parentDir = this.normalizePath(dirname2(currentDir));
7888
7996
  if (parentDir === currentDir) {
7889
7997
  break;
7890
7998
  }
@@ -7900,8 +8008,8 @@ var init_PathResolver = __esm({
7900
8008
  // packages/tooling/src/utils/pathResolver.ts
7901
8009
  import { createRequire as createRequire2 } from "node:module";
7902
8010
  import {
7903
- join as join2,
7904
- dirname as dirname2,
8011
+ join as join3,
8012
+ dirname as dirname3,
7905
8013
  basename as basename2,
7906
8014
  extname as extname2,
7907
8015
  relative as relative2,
@@ -7910,7 +8018,7 @@ import {
7910
8018
  isAbsolute as pathIsAbsolute
7911
8019
  } from "node:path";
7912
8020
  import { fileURLToPath as fileURLToPath2 } from "node:url";
7913
- function readdirSync2(dirPath, options) {
8021
+ function readdirSync3(dirPath, options) {
7914
8022
  return pathResolverInstance.readdirSync(dirPath, options);
7915
8023
  }
7916
8024
  var pathResolverInstance, normalizePath, pathExists, readSync, statSync2, joinPath;
@@ -7921,7 +8029,7 @@ var init_pathResolver = __esm({
7921
8029
  init_PathResolver();
7922
8030
  pathResolverInstance = PathResolver.getInstance({ debug: false });
7923
8031
  normalizePath = (...pathSegments) => {
7924
- return pathResolverInstance.normalizePath(join2(...pathSegments));
8032
+ return pathResolverInstance.normalizePath(join3(...pathSegments));
7925
8033
  };
7926
8034
  pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
7927
8035
  readSync = (filePath, options) => pathResolverInstance.readSync(filePath, options);
@@ -7961,10 +8069,10 @@ var init_typed_file_operations = __esm({
7961
8069
  });
7962
8070
 
7963
8071
  // packages/tooling/src/bundler/utils.ts
7964
- import { Buffer } from "node:buffer";
8072
+ import { Buffer as Buffer2 } from "node:buffer";
7965
8073
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
7966
8074
  import { createRequire as createRequire3 } from "node:module";
7967
- import { dirname as dirname3, resolve as resolve3 } from "node:path";
8075
+ import { dirname as dirname4, resolve as resolve3 } from "node:path";
7968
8076
  import process from "node:process";
7969
8077
  import { fileURLToPath as fileURLToPath3 } from "node:url";
7970
8078
  var require2, __filename, __dirname;
@@ -7973,12 +8081,12 @@ var init_utils2 = __esm({
7973
8081
  "use strict";
7974
8082
  require2 = createRequire3(import.meta.url);
7975
8083
  __filename = fileURLToPath3(import.meta.url);
7976
- __dirname = dirname3(__filename);
8084
+ __dirname = dirname4(__filename);
7977
8085
  if (typeof globalThis !== "undefined") {
7978
8086
  globalThis.require = require2;
7979
8087
  globalThis.__filename = __filename;
7980
8088
  globalThis.__dirname = __dirname;
7981
- globalThis.Buffer = Buffer;
8089
+ globalThis.Buffer = Buffer2;
7982
8090
  globalThis.process = process;
7983
8091
  if (typeof global === "undefined") {
7984
8092
  globalThis.global = globalThis;
@@ -8001,7 +8109,7 @@ function detectApps(projectRoot) {
8001
8109
  const appsDir = joinPath(projectRoot, "apps");
8002
8110
  const appsDirStat = statSync2(appsDir);
8003
8111
  if (pathExists(appsDir) && appsDirStat?.isDirectory()) {
8004
- const appDirs = readdirSync2(appsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
8112
+ const appDirs = readdirSync3(appsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
8005
8113
  for (const appDir of appDirs) {
8006
8114
  const appPath = joinPath(appsDir, appDir);
8007
8115
  const packageJsonPath = joinPath(appPath, "package.json");
@@ -8295,7 +8403,7 @@ function resolveSecret(name, projectRoot, opts) {
8295
8403
  if (value) {
8296
8404
  if (!opts?.silent && !warnedLegacy.has(name)) {
8297
8405
  warnedLegacy.add(name);
8298
- log.warn(
8406
+ log2.warn(
8299
8407
  `${name} found in ${relPath} (legacy). Move it to .dndev.secrets at project root.`
8300
8408
  );
8301
8409
  }
@@ -8306,7 +8414,7 @@ function resolveSecret(name, projectRoot, opts) {
8306
8414
  if (aliasValue) {
8307
8415
  if (!opts?.silent && !warnedLegacy.has(name)) {
8308
8416
  warnedLegacy.add(name);
8309
- log.warn(
8417
+ log2.warn(
8310
8418
  `${name} found in ${relPath} (legacy). Move it to .dndev.secrets at project root.`
8311
8419
  );
8312
8420
  }
@@ -8759,7 +8867,7 @@ var init_check_auth = __esm({
8759
8867
  joinPath(ctx.appDir, "src", "config", "providers.ts"),
8760
8868
  joinPath(ctx.appDir, "src", "lib", "providers.ts")
8761
8869
  ];
8762
- const providerFile = candidates.find((c2) => pathExists(c2));
8870
+ const providerFile = candidates.find((c) => pathExists(c));
8763
8871
  if (providerFile) {
8764
8872
  results.push({
8765
8873
  name: "Providers config",
@@ -8833,8 +8941,8 @@ init_utils2();
8833
8941
  // packages/tooling/src/cli/doctor/doctor.ts
8834
8942
  init_utils2();
8835
8943
  init_app_detection();
8836
- init_cli_output();
8837
8944
  init_app_detection();
8945
+ init_cli_output();
8838
8946
  var CHECK_REGISTRY = [
8839
8947
  { id: "env", load: async () => (await Promise.resolve().then(() => (init_check_env(), check_env_exports))).envCheck },
8840
8948
  {
@@ -8870,7 +8978,7 @@ function renderResults(allResults, verbose, multiApp) {
8870
8978
  }
8871
8979
  lines.push("");
8872
8980
  }
8873
- wt(lines.join("\n"), "Health Check Results");
8981
+ note(lines.join("\n"), "Health Check Results");
8874
8982
  }
8875
8983
  function buildDoctorContext(app, projectRoot, topology, options) {
8876
8984
  const backendApp = findBackendApp(topology, app.name);
@@ -8884,7 +8992,7 @@ function buildDoctorContext(app, projectRoot, topology, options) {
8884
8992
  };
8885
8993
  }
8886
8994
  async function main(options = {}) {
8887
- mt("DoNotDev Doctor");
8995
+ intro("DoNotDev Doctor");
8888
8996
  const projectRoot = process.cwd();
8889
8997
  const topology = analyzeProjectTopology(projectRoot);
8890
8998
  let apps = topology.apps;
@@ -8894,10 +9002,10 @@ async function main(options = {}) {
8894
9002
  const multiApp = apps.length > 1;
8895
9003
  const registry = options.check ? CHECK_REGISTRY.filter((e) => e.id === options.check) : CHECK_REGISTRY;
8896
9004
  if (options.check && registry.length === 0) {
8897
- log.error(
9005
+ log2.error(
8898
9006
  `Unknown check: ${options.check}. Available: ${CHECK_REGISTRY.map((e) => e.id).join(", ")}`
8899
9007
  );
8900
- gt("Doctor aborted.");
9008
+ outro("Doctor aborted.");
8901
9009
  return 1;
8902
9010
  }
8903
9011
  const allResults = [];
@@ -8909,14 +9017,14 @@ async function main(options = {}) {
8909
9017
  if (!check.isRelevant(ctx)) continue;
8910
9018
  const results = await check.run(ctx);
8911
9019
  allResults.push({ appName: app.name, checkName: check.name, results });
8912
- if (results.some((r) => r.status === "fail")) {
9020
+ if (results.some((r2) => r2.status === "fail")) {
8913
9021
  hasFail = true;
8914
9022
  }
8915
9023
  }
8916
9024
  }
8917
9025
  if (allResults.length === 0) {
8918
- log.warn("No checks were relevant for this project.");
8919
- gt("Nothing to check.");
9026
+ log2.warn("No checks were relevant for this project.");
9027
+ outro("Nothing to check.");
8920
9028
  return 0;
8921
9029
  }
8922
9030
  renderResults(allResults, options.verbose ?? false, multiApp);
@@ -8924,10 +9032,10 @@ async function main(options = {}) {
8924
9032
  let warnings = 0;
8925
9033
  let fails = 0;
8926
9034
  for (const { results } of allResults) {
8927
- for (const r of results) {
8928
- if (r.status === "pass") passes++;
8929
- else if (r.status === "warn") warnings++;
8930
- else if (r.status === "fail") fails++;
9035
+ for (const r2 of results) {
9036
+ if (r2.status === "pass") passes++;
9037
+ else if (r2.status === "warn") warnings++;
9038
+ else if (r2.status === "fail") fails++;
8931
9039
  }
8932
9040
  }
8933
9041
  const totalChecks = passes + warnings + fails;
@@ -8935,7 +9043,7 @@ async function main(options = {}) {
8935
9043
  if (warnings > 0) summaryParts.push(`${warnings} warning(s)`);
8936
9044
  if (fails > 0) summaryParts.push(`${fails} failure(s)`);
8937
9045
  const exitCode = hasFail ? 1 : 0;
8938
- gt(
9046
+ outro(
8939
9047
  hasFail ? `Health check failed: ${summaryParts.join(", ")}` : `All clear: ${summaryParts.join(", ")}`
8940
9048
  );
8941
9049
  return exitCode;