@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 __copyProps = (to, from, except, desc) => {
20
29
  if (from && typeof from === "object" || typeof from === "function") {
@@ -33,31 +42,40 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
42
  mod
34
43
  ));
35
44
 
36
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
37
- var isAmbiguous, isFullWidth, isWide;
45
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
46
+ var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;
38
47
  var init_utils = __esm({
39
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js"() {
48
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js"() {
40
49
  init_utils2();
41
- isAmbiguous = (x) => {
42
- return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
43
- };
50
+ getCodePointsLength = /* @__PURE__ */ (() => {
51
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
52
+ return (input) => {
53
+ let surrogatePairsNr = 0;
54
+ SURROGATE_PAIR_RE.lastIndex = 0;
55
+ while (SURROGATE_PAIR_RE.test(input)) {
56
+ surrogatePairsNr += 1;
57
+ }
58
+ return input.length - surrogatePairsNr;
59
+ };
60
+ })();
44
61
  isFullWidth = (x) => {
45
62
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
46
63
  };
47
- isWide = (x) => {
48
- return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
64
+ isWideNotCJKTNotEmoji = (x) => {
65
+ return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
49
66
  };
50
67
  }
51
68
  });
52
69
 
53
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
54
- var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
70
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
71
+ var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
55
72
  var init_dist = __esm({
56
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js"() {
73
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js"() {
57
74
  init_utils2();
58
75
  init_utils();
59
- ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
76
+ ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
60
77
  CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
78
+ CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
61
79
  TAB_RE = /\t{1,1000}/y;
62
80
  EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
63
81
  LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
@@ -67,14 +85,21 @@ var init_dist = __esm({
67
85
  const LIMIT = truncationOptions.limit ?? Infinity;
68
86
  const ELLIPSIS = truncationOptions.ellipsis ?? "";
69
87
  const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
70
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
88
+ const ANSI_WIDTH = 0;
71
89
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
72
90
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
73
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
74
91
  const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
75
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
92
+ const FULL_WIDTH_WIDTH = 2;
76
93
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
77
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
94
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
95
+ const PARSE_BLOCKS = [
96
+ [LATIN_RE, REGULAR_WIDTH],
97
+ [ANSI_RE, ANSI_WIDTH],
98
+ [CONTROL_RE, CONTROL_WIDTH],
99
+ [TAB_RE, TAB_WIDTH],
100
+ [EMOJI_RE, EMOJI_WIDTH],
101
+ [CJKT_WIDE_RE, WIDE_WIDTH]
102
+ ];
78
103
  let indexPrev = 0;
79
104
  let index = 0;
80
105
  let length = input.length;
@@ -94,10 +119,8 @@ var init_dist = __esm({
94
119
  const codePoint = char.codePointAt(0) || 0;
95
120
  if (isFullWidth(codePoint)) {
96
121
  widthExtra = FULL_WIDTH_WIDTH;
97
- } else if (isWide(codePoint)) {
122
+ } else if (isWideNotCJKTNotEmoji(codePoint)) {
98
123
  widthExtra = WIDE_WIDTH;
99
- } else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
100
- widthExtra = AMBIGUOUS_WIDTH;
101
124
  } else {
102
125
  widthExtra = REGULAR_WIDTH;
103
126
  }
@@ -113,88 +136,28 @@ var init_dist = __esm({
113
136
  }
114
137
  unmatchedStart = unmatchedEnd = 0;
115
138
  }
116
- if (index >= length)
117
- break;
118
- LATIN_RE.lastIndex = index;
119
- if (LATIN_RE.test(input)) {
120
- lengthExtra = LATIN_RE.lastIndex - index;
121
- widthExtra = lengthExtra * REGULAR_WIDTH;
122
- if (width + widthExtra > truncationLimit) {
123
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
124
- }
125
- if (width + widthExtra > LIMIT) {
126
- truncationEnabled = true;
127
- break;
128
- }
129
- width += widthExtra;
130
- unmatchedStart = indexPrev;
131
- unmatchedEnd = index;
132
- index = indexPrev = LATIN_RE.lastIndex;
133
- continue;
139
+ if (index >= length) {
140
+ break outer;
134
141
  }
135
- ANSI_RE.lastIndex = index;
136
- if (ANSI_RE.test(input)) {
137
- if (width + ANSI_WIDTH > truncationLimit) {
138
- truncationIndex = Math.min(truncationIndex, index);
139
- }
140
- if (width + ANSI_WIDTH > LIMIT) {
141
- truncationEnabled = true;
142
- break;
143
- }
144
- width += ANSI_WIDTH;
145
- unmatchedStart = indexPrev;
146
- unmatchedEnd = index;
147
- index = indexPrev = ANSI_RE.lastIndex;
148
- continue;
149
- }
150
- CONTROL_RE.lastIndex = index;
151
- if (CONTROL_RE.test(input)) {
152
- lengthExtra = CONTROL_RE.lastIndex - index;
153
- widthExtra = lengthExtra * CONTROL_WIDTH;
154
- if (width + widthExtra > truncationLimit) {
155
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
156
- }
157
- if (width + widthExtra > LIMIT) {
158
- truncationEnabled = true;
159
- break;
160
- }
161
- width += widthExtra;
162
- unmatchedStart = indexPrev;
163
- unmatchedEnd = index;
164
- index = indexPrev = CONTROL_RE.lastIndex;
165
- continue;
166
- }
167
- TAB_RE.lastIndex = index;
168
- if (TAB_RE.test(input)) {
169
- lengthExtra = TAB_RE.lastIndex - index;
170
- widthExtra = lengthExtra * TAB_WIDTH;
171
- if (width + widthExtra > truncationLimit) {
172
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
173
- }
174
- if (width + widthExtra > LIMIT) {
175
- truncationEnabled = true;
176
- break;
177
- }
178
- width += widthExtra;
179
- unmatchedStart = indexPrev;
180
- unmatchedEnd = index;
181
- index = indexPrev = TAB_RE.lastIndex;
182
- continue;
183
- }
184
- EMOJI_RE.lastIndex = index;
185
- if (EMOJI_RE.test(input)) {
186
- if (width + EMOJI_WIDTH > truncationLimit) {
187
- truncationIndex = Math.min(truncationIndex, index);
188
- }
189
- if (width + EMOJI_WIDTH > LIMIT) {
190
- truncationEnabled = true;
191
- break;
142
+ for (let i2 = 0, l = PARSE_BLOCKS.length; i2 < l; i2++) {
143
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
144
+ BLOCK_RE.lastIndex = index;
145
+ if (BLOCK_RE.test(input)) {
146
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
147
+ widthExtra = lengthExtra * BLOCK_WIDTH;
148
+ if (width + widthExtra > truncationLimit) {
149
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
150
+ }
151
+ if (width + widthExtra > LIMIT) {
152
+ truncationEnabled = true;
153
+ break outer;
154
+ }
155
+ width += widthExtra;
156
+ unmatchedStart = indexPrev;
157
+ unmatchedEnd = index;
158
+ index = indexPrev = BLOCK_RE.lastIndex;
159
+ continue outer;
192
160
  }
193
- width += EMOJI_WIDTH;
194
- unmatchedStart = indexPrev;
195
- unmatchedEnd = index;
196
- index = indexPrev = EMOJI_RE.lastIndex;
197
- continue;
198
161
  }
199
162
  index += 1;
200
163
  }
@@ -209,10 +172,10 @@ var init_dist = __esm({
209
172
  }
210
173
  });
211
174
 
212
- // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
175
+ // node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
213
176
  var NO_TRUNCATION2, fastStringWidth, dist_default2;
214
177
  var init_dist2 = __esm({
215
- "node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
178
+ "node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
216
179
  init_utils2();
217
180
  init_dist();
218
181
  NO_TRUNCATION2 = {
@@ -227,13 +190,13 @@ var init_dist2 = __esm({
227
190
  }
228
191
  });
229
192
 
230
- // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
193
+ // node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
231
194
  function wrapAnsi(string, columns, options) {
232
195
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
233
196
  }
234
197
  var ESC, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
235
198
  var init_main = __esm({
236
- "node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
199
+ "node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js"() {
237
200
  init_utils2();
238
201
  init_dist2();
239
202
  ESC = "\x1B";
@@ -397,16 +360,19 @@ var init_main = __esm({
397
360
  }
398
361
  const preString = rows.join("\n");
399
362
  let inSurrogate = false;
400
- for (let i = 0; i < preString.length; i++) {
401
- const character = preString[i];
363
+ for (let i2 = 0; i2 < preString.length; i2++) {
364
+ const character = preString[i2];
402
365
  returnValue += character;
403
366
  if (!inSurrogate) {
404
367
  inSurrogate = character >= "\uD800" && character <= "\uDBFF";
368
+ if (inSurrogate) {
369
+ continue;
370
+ }
405
371
  } else {
406
- continue;
372
+ inSurrogate = false;
407
373
  }
408
374
  if (character === ESC || character === CSI) {
409
- GROUP_REGEX.lastIndex = i + 1;
375
+ GROUP_REGEX.lastIndex = i2 + 1;
410
376
  const groupsResult = GROUP_REGEX.exec(preString);
411
377
  const groups = groupsResult?.groups;
412
378
  if (groups?.code !== void 0) {
@@ -416,7 +382,7 @@ var init_main = __esm({
416
382
  escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
417
383
  }
418
384
  }
419
- if (preString[i + 1] === "\n") {
385
+ if (preString[i2 + 1] === "\n") {
420
386
  if (escapeUrl) {
421
387
  returnValue += wrapAnsiHyperlink("");
422
388
  }
@@ -447,17 +413,17 @@ var require_src = __commonJS({
447
413
  var ESC2 = "\x1B";
448
414
  var CSI2 = `${ESC2}[`;
449
415
  var beep = "\x07";
450
- var cursor = {
451
- to(x, y2) {
452
- if (!y2) return `${CSI2}${x + 1}G`;
453
- return `${CSI2}${y2 + 1};${x + 1}H`;
416
+ var cursor3 = {
417
+ to(x, y) {
418
+ if (!y) return `${CSI2}${x + 1}G`;
419
+ return `${CSI2}${y + 1};${x + 1}H`;
454
420
  },
455
- move(x, y2) {
421
+ move(x, y) {
456
422
  let ret = "";
457
423
  if (x < 0) ret += `${CSI2}${-x}D`;
458
424
  else if (x > 0) ret += `${CSI2}${x}C`;
459
- if (y2 < 0) ret += `${CSI2}${-y2}A`;
460
- else if (y2 > 0) ret += `${CSI2}${y2}B`;
425
+ if (y < 0) ret += `${CSI2}${-y}A`;
426
+ else if (y > 0) ret += `${CSI2}${y}B`;
461
427
  return ret;
462
428
  },
463
429
  up: (count = 1) => `${CSI2}${count}A`,
@@ -476,7 +442,7 @@ var require_src = __commonJS({
476
442
  up: (count = 1) => `${CSI2}S`.repeat(count),
477
443
  down: (count = 1) => `${CSI2}T`.repeat(count)
478
444
  };
479
- var erase = {
445
+ var erase3 = {
480
446
  screen: `${CSI2}2J`,
481
447
  up: (count = 1) => `${CSI2}1J`.repeat(count),
482
448
  down: (count = 1) => `${CSI2}J`.repeat(count),
@@ -485,138 +451,225 @@ var require_src = __commonJS({
485
451
  lineStart: `${CSI2}1K`,
486
452
  lines(count) {
487
453
  let clear = "";
488
- for (let i = 0; i < count; i++)
489
- clear += this.line + (i < count - 1 ? cursor.up() : "");
454
+ for (let i2 = 0; i2 < count; i2++)
455
+ clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
490
456
  if (count)
491
- clear += cursor.left;
457
+ clear += cursor3.left;
492
458
  return clear;
493
459
  }
494
460
  };
495
- module.exports = { cursor, scroll, erase, beep };
461
+ module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
496
462
  }
497
463
  });
498
464
 
499
- // node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
500
- import { styleText as y } from "node:util";
501
- import { stdout as S, stdin as $ } from "node:process";
502
- import { ReadStream as D } from "node:tty";
503
- var import_sisteransi, E, G, u, Y, O;
465
+ // node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
466
+ import { styleText } from "node:util";
467
+ import { stdout, stdin } from "node:process";
468
+ import { ReadStream } from "node:tty";
469
+ var import_sisteransi, a$1, t, settings, R, getColumns;
504
470
  var init_dist3 = __esm({
505
- "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
471
+ "node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
506
472
  init_utils2();
507
473
  init_main();
508
474
  import_sisteransi = __toESM(require_src(), 1);
509
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
510
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
511
- 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)}` } } };
512
- Y = globalThis.process.platform.startsWith("win");
513
- O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
475
+ a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
476
+ t = [
477
+ "January",
478
+ "February",
479
+ "March",
480
+ "April",
481
+ "May",
482
+ "June",
483
+ "July",
484
+ "August",
485
+ "September",
486
+ "October",
487
+ "November",
488
+ "December"
489
+ ];
490
+ settings = {
491
+ actions: new Set(a$1),
492
+ aliases: /* @__PURE__ */ new Map([
493
+ // vim support
494
+ ["k", "up"],
495
+ ["j", "down"],
496
+ ["h", "left"],
497
+ ["l", "right"],
498
+ ["", "cancel"],
499
+ // opinionated defaults!
500
+ ["escape", "cancel"]
501
+ ]),
502
+ messages: {
503
+ cancel: "Canceled",
504
+ error: "Something went wrong"
505
+ },
506
+ withGuide: true,
507
+ accessible: void 0,
508
+ date: {
509
+ monthNames: [...t],
510
+ messages: {
511
+ required: "Please enter a valid date",
512
+ invalidMonth: "There are only 12 months in a year",
513
+ invalidDay: (n2, e) => `There are only ${n2} days in ${e}`,
514
+ afterMin: (n2) => `Date must be on or after ${n2.toISOString().slice(0, 10)}`,
515
+ beforeMax: (n2) => `Date must be on or before ${n2.toISOString().slice(0, 10)}`
516
+ }
517
+ }
518
+ };
519
+ R = globalThis.process.platform.startsWith("win");
520
+ getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
514
521
  }
515
522
  });
516
523
 
517
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
518
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
519
- import P from "node:process";
520
- import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
521
- import { dirname as be, join as Qe } from "node:path";
522
- function Ze() {
523
- 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";
524
+ // node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
525
+ import { styleText as styleText2, stripVTControlCharacters } from "node:util";
526
+ import process$1 from "node:process";
527
+ import { existsSync, lstatSync, readdirSync } from "node:fs";
528
+ import { dirname, join } from "node:path";
529
+ function isUnicodeSupported() {
530
+ if (process$1.platform !== "win32") {
531
+ return process$1.env.TERM !== "linux";
532
+ }
533
+ 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";
524
534
  }
525
- 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;
535
+ 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;
526
536
  var init_dist4 = __esm({
527
- "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
537
+ "node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
528
538
  init_utils2();
529
539
  init_dist3();
530
540
  init_dist3();
531
541
  init_main();
532
542
  init_dist2();
533
543
  import_sisteransi2 = __toESM(require_src(), 1);
534
- ee = Ze();
535
- w = (e, i) => ee ? e : i;
536
- _e = w("\u25C6", "*");
537
- oe = w("\u25A0", "x");
538
- ue = w("\u25B2", "x");
539
- F = w("\u25C7", "o");
540
- le = w("\u250C", "T");
541
- d = w("\u2502", "|");
542
- E2 = w("\u2514", "\u2014");
543
- Ie = w("\u2510", "T");
544
- Ee = w("\u2518", "\u2014");
545
- z2 = w("\u25CF", ">");
546
- H2 = w("\u25CB", " ");
547
- te = w("\u25FB", "[\u2022]");
548
- U = w("\u25FC", "[+]");
549
- J = w("\u25FB", "[ ]");
550
- xe = w("\u25AA", "\u2022");
551
- se = w("\u2500", "-");
552
- ce = w("\u256E", "+");
553
- Ge = w("\u251C", "+");
554
- $e = w("\u256F", "+");
555
- de = w("\u2570", "+");
556
- Oe = w("\u256D", "+");
557
- he = w("\u25CF", "\u2022");
558
- pe = w("\u25C6", "*");
559
- me = w("\u25B2", "!");
560
- ge = w("\u25A0", "x");
561
- O2 = { message: (e = [], { symbol: i = t("gray", d), secondarySymbol: s = t("gray", d), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
562
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
563
- for (let p = 0; p < u2; p++) o.push(a);
564
- const y2 = Array.isArray(e) ? e : e.split(`
544
+ unicode = isUnicodeSupported();
545
+ unicodeOr = (o, e) => unicode ? o : e;
546
+ S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
547
+ S_STEP_CANCEL = unicodeOr("\u25A0", "x");
548
+ S_STEP_ERROR = unicodeOr("\u25B2", "x");
549
+ S_STEP_SUBMIT = unicodeOr("\u25C7", "o");
550
+ S_BAR_START = unicodeOr("\u250C", "T");
551
+ S_BAR = unicodeOr("\u2502", "|");
552
+ S_BAR_END = unicodeOr("\u2514", "\u2014");
553
+ S_BAR_START_RIGHT = unicodeOr("\u2510", "T");
554
+ S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014");
555
+ S_RADIO_ACTIVE = unicodeOr("\u25CF", ">");
556
+ S_RADIO_INACTIVE = unicodeOr("\u25CB", " ");
557
+ S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]");
558
+ S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]");
559
+ S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]");
560
+ S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022");
561
+ S_BAR_H = unicodeOr("\u2500", "-");
562
+ S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+");
563
+ S_CONNECT_LEFT = unicodeOr("\u251C", "+");
564
+ S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+");
565
+ S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+");
566
+ S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+");
567
+ S_INFO = unicodeOr("\u25CF", "\u2022");
568
+ S_SUCCESS = unicodeOr("\u25C6", "*");
569
+ S_WARN = unicodeOr("\u25B2", "!");
570
+ S_ERROR = unicodeOr("\u25A0", "x");
571
+ MULTISELECT_INSTRUCTIONS = [
572
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
573
+ `${styleText2("dim", "Space:")} select`,
574
+ `${styleText2("dim", "Enter:")} confirm`
575
+ ];
576
+ log = {
577
+ message: (s = [], {
578
+ symbol: e = styleText2("gray", S_BAR),
579
+ secondarySymbol: r2 = styleText2("gray", S_BAR),
580
+ output: m = process.stdout,
581
+ spacing: l = 1,
582
+ withGuide: c
583
+ } = {}) => {
584
+ const t2 = [], o = c ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
585
+ for (let i2 = 0; i2 < l; i2++)
586
+ t2.push(f);
587
+ const g = Array.isArray(s) ? s : s.split(`
565
588
  `);
566
- if (y2.length > 0) {
567
- const [p, ...m] = y2;
568
- p.length > 0 ? o.push(`${l}${p}`) : o.push(c2 ? i : "");
569
- for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
570
- }
571
- r.write(`${o.join(`
589
+ if (g.length > 0) {
590
+ const [i2, ...y] = g;
591
+ i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
592
+ for (const p of y)
593
+ p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
594
+ }
595
+ m.write(`${t2.join(`
572
596
  `)}
573
597
  `);
574
- }, info: (e, i) => {
575
- O2.message(e, { ...i, symbol: t("blue", he) });
576
- }, success: (e, i) => {
577
- O2.message(e, { ...i, symbol: t("green", pe) });
578
- }, step: (e, i) => {
579
- O2.message(e, { ...i, symbol: t("green", F) });
580
- }, warn: (e, i) => {
581
- O2.message(e, { ...i, symbol: t("yellow", me) });
582
- }, warning: (e, i) => {
583
- O2.warn(e, i);
584
- }, error: (e, i) => {
585
- O2.message(e, { ...i, symbol: t("red", ge) });
586
- } };
587
- mt = (e = "", i) => {
588
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
589
- s.write(`${r}${e}
598
+ },
599
+ info: (s, e) => {
600
+ log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
601
+ },
602
+ success: (s, e) => {
603
+ log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
604
+ },
605
+ step: (s, e) => {
606
+ log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
607
+ },
608
+ warn: (s, e) => {
609
+ log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
610
+ },
611
+ /** alias for `log.warn()`. */
612
+ warning: (s, e) => {
613
+ log.warn(s, e);
614
+ },
615
+ error: (s, e) => {
616
+ log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
617
+ }
618
+ };
619
+ intro = (o = "", t2) => {
620
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_START)} ` : "";
621
+ i2.write(`${e}${o}
590
622
  `);
591
623
  };
592
- gt = (e = "", i) => {
593
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d)}
594
- ${t("gray", E2)} ` : "";
595
- s.write(`${r}${e}
624
+ outro = (o = "", t2) => {
625
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR)}
626
+ ${styleText2("gray", S_BAR_END)} ` : "";
627
+ i2.write(`${e}${o}
596
628
 
597
629
  `);
598
630
  };
599
- ft = (e) => t("dim", e);
600
- vt = (e, i, s) => {
601
- const r = { hard: true, trim: false }, u2 = wrapAnsi(e, i, r).split(`
602
- `), 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);
603
- return wrapAnsi(e, c2, r);
604
- };
605
- wt = (e = "", i = "", s) => {
606
- const r = s?.output ?? P.stdout, u2 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = ["", ...vt(e, O(r) - 6, n).split(`
607
- `).map(n), ""], c2 = dist_default2(i), a = Math.max(o.reduce((p, m) => {
608
- const g = dist_default2(m);
609
- return g > p ? g : p;
610
- }, 0), c2) + 2, l = o.map((p) => `${t("gray", d)} ${p}${" ".repeat(a - dist_default2(p))}${t("gray", d)}`).join(`
611
- `), $2 = u2 ? `${t("gray", d)}
612
- ` : "", y2 = u2 ? Ge : de;
613
- r.write(`${$2}${t("green", F)} ${t("reset", i)} ${t("gray", se.repeat(Math.max(a - c2 - 1, 1)) + ce)}
614
- ${l}
615
- ${t("gray", y2 + se.repeat(a + 2) + $e)}
616
- `);
631
+ W$1 = (o) => o;
632
+ C = (o, e, s) => {
633
+ const a2 = {
634
+ hard: true,
635
+ trim: false
636
+ }, i2 = wrapAnsi(o, e, a2).split(`
637
+ `), 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);
638
+ return wrapAnsi(o, g, a2);
639
+ };
640
+ note = (o = "", e = "", s) => {
641
+ 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(`
642
+ `).map(c), ""], n2 = dist_default2(e), t2 = Math.max(
643
+ g.reduce((m, F) => {
644
+ const O = dist_default2(F);
645
+ return O > m ? O : m;
646
+ }, 0),
647
+ n2
648
+ ) + 2, h2 = g.map(
649
+ (m) => `${styleText2("gray", S_BAR)} ${m}${" ".repeat(t2 - dist_default2(m))}${styleText2("gray", S_BAR)}`
650
+ ).join(`
651
+ `), T = i2 ? `${styleText2("gray", S_BAR)}
652
+ ` : "", l$1 = i2 ? S_CONNECT_LEFT : S_CORNER_BOTTOM_LEFT;
653
+ a2.write(
654
+ `${T}${styleText2("green", S_STEP_SUBMIT)} ${styleText2("reset", e)} ${styleText2(
655
+ "gray",
656
+ S_BAR_H.repeat(Math.max(t2 - n2 - 1, 1)) + S_CORNER_TOP_RIGHT
657
+ )}
658
+ ${h2}
659
+ ${styleText2("gray", l$1 + S_BAR_H.repeat(t2 + 2) + S_CORNER_BOTTOM_RIGHT)}
660
+ `
661
+ );
662
+ };
663
+ u2 = {
664
+ light: unicodeOr("\u2500", "-"),
665
+ heavy: unicodeOr("\u2501", "="),
666
+ block: unicodeOr("\u2588", "#")
617
667
  };
618
- Ve = { light: w("\u2500", "-"), heavy: w("\u2501", "="), block: w("\u2588", "#") };
619
- je = `${t("gray", d)} `;
668
+ SELECT_INSTRUCTIONS = [
669
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
670
+ `${styleText2("dim", "Enter:")} confirm`
671
+ ];
672
+ i = `${styleText2("gray", S_BAR)} `;
620
673
  }
621
674
  });
622
675
 
@@ -661,7 +714,7 @@ function stringify(value) {
661
714
  function formatMessage(...args) {
662
715
  return args.map(stringify).join(" ");
663
716
  }
664
- var colors, currentLogLevel, log, error, warn, info, success;
717
+ var colors, currentLogLevel, log2, error, warn, info, success;
665
718
  var init_cli_output = __esm({
666
719
  "packages/tooling/src/utils/cli-output.ts"() {
667
720
  "use strict";
@@ -694,7 +747,7 @@ var init_cli_output = __esm({
694
747
  currentLogLevel = envLevel;
695
748
  }
696
749
  }
697
- log = {
750
+ log2 = {
698
751
  /**
699
752
  * Logs an error message (always shows unless Quiet level)
700
753
  * Uses clack's log.error + explicit red color
@@ -702,7 +755,7 @@ var init_cli_output = __esm({
702
755
  error(...args) {
703
756
  if (currentLogLevel < 0 /* Quiet */) return;
704
757
  const message = formatMessage(...args);
705
- O2.error(colorize(message, colors.brightRed));
758
+ log.error(colorize(message, colors.brightRed));
706
759
  },
707
760
  /**
708
761
  * Logs a warning message (shows at Normal level and above)
@@ -711,7 +764,7 @@ var init_cli_output = __esm({
711
764
  warn(...args) {
712
765
  if (currentLogLevel < 1 /* Normal */) return;
713
766
  const message = formatMessage(...args);
714
- O2.warn(colorize(message, colors.brightYellow));
767
+ log.warn(colorize(message, colors.brightYellow));
715
768
  },
716
769
  /**
717
770
  * Logs an info message (shows at Normal level and above)
@@ -720,7 +773,7 @@ var init_cli_output = __esm({
720
773
  info(...args) {
721
774
  if (currentLogLevel < 1 /* Normal */) return;
722
775
  const message = formatMessage(...args);
723
- O2.info(colorize(message, colors.brightCyan));
776
+ log.info(colorize(message, colors.brightCyan));
724
777
  },
725
778
  /**
726
779
  * Logs a success message (shows at Normal level and above)
@@ -729,7 +782,7 @@ var init_cli_output = __esm({
729
782
  success(...args) {
730
783
  if (currentLogLevel < 1 /* Normal */) return;
731
784
  const message = formatMessage(...args);
732
- O2.success(colorize(message, colors.brightGreen));
785
+ log.success(colorize(message, colors.brightGreen));
733
786
  },
734
787
  /**
735
788
  * Logs a debug message (only shows at Verbose level and above)
@@ -738,7 +791,7 @@ var init_cli_output = __esm({
738
791
  debug(...args) {
739
792
  if (currentLogLevel < 2 /* Verbose */) return;
740
793
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
741
- O2.message(
794
+ log.message(
742
795
  colorize(
743
796
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
744
797
  colors.gray
@@ -752,7 +805,7 @@ var init_cli_output = __esm({
752
805
  trace(...args) {
753
806
  if (currentLogLevel < 3 /* Debug */) return;
754
807
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
755
- O2.message(
808
+ log.message(
756
809
  colorize(
757
810
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
758
811
  colors.gray
@@ -760,10 +813,10 @@ var init_cli_output = __esm({
760
813
  );
761
814
  }
762
815
  };
763
- error = log.error.bind(log);
764
- warn = log.warn.bind(log);
765
- info = log.info.bind(log);
766
- success = log.success.bind(log);
816
+ error = log2.error.bind(log2);
817
+ warn = log2.warn.bind(log2);
818
+ info = log2.info.bind(log2);
819
+ success = log2.success.bind(log2);
767
820
  }
768
821
  });
769
822
 
@@ -981,9 +1034,9 @@ var require_is_glob = __commonJS({
981
1034
  index += 2;
982
1035
  var close = chars[open];
983
1036
  if (close) {
984
- var n = str.indexOf(close, index);
985
- if (n !== -1) {
986
- index = n + 1;
1037
+ var n2 = str.indexOf(close, index);
1038
+ if (n2 !== -1) {
1039
+ index = n2 + 1;
987
1040
  }
988
1041
  }
989
1042
  if (str[index] === "!") {
@@ -1009,9 +1062,9 @@ var require_is_glob = __commonJS({
1009
1062
  index += 2;
1010
1063
  var close = chars[open];
1011
1064
  if (close) {
1012
- var n = str.indexOf(close, index);
1013
- if (n !== -1) {
1014
- index = n + 1;
1065
+ var n2 = str.indexOf(close, index);
1066
+ if (n2 !== -1) {
1067
+ index = n2 + 1;
1015
1068
  }
1016
1069
  }
1017
1070
  if (str[index] === "!") {
@@ -1089,8 +1142,8 @@ var require_utils = __commonJS({
1089
1142
  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
1090
1143
  return (Number(max) - Number(min)) / Number(step) >= limit;
1091
1144
  };
1092
- exports.escapeNode = (block, n = 0, type) => {
1093
- const node = block.nodes[n];
1145
+ exports.escapeNode = (block2, n2 = 0, type) => {
1146
+ const node = block2.nodes[n2];
1094
1147
  if (!node) return;
1095
1148
  if (type && node.type === type || node.type === "open" || node.type === "close") {
1096
1149
  if (node.escaped !== true) {
@@ -1107,15 +1160,15 @@ var require_utils = __commonJS({
1107
1160
  }
1108
1161
  return false;
1109
1162
  };
1110
- exports.isInvalidBrace = (block) => {
1111
- if (block.type !== "brace") return false;
1112
- if (block.invalid === true || block.dollar) return true;
1113
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
1114
- block.invalid = true;
1163
+ exports.isInvalidBrace = (block2) => {
1164
+ if (block2.type !== "brace") return false;
1165
+ if (block2.invalid === true || block2.dollar) return true;
1166
+ if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
1167
+ block2.invalid = true;
1115
1168
  return true;
1116
1169
  }
1117
- if (block.open !== true || block.close !== true) {
1118
- block.invalid = true;
1170
+ if (block2.open !== true || block2.close !== true) {
1171
+ block2.invalid = true;
1119
1172
  return true;
1120
1173
  }
1121
1174
  return false;
@@ -1134,8 +1187,8 @@ var require_utils = __commonJS({
1134
1187
  exports.flatten = (...args) => {
1135
1188
  const result = [];
1136
1189
  const flat = (arr) => {
1137
- for (let i = 0; i < arr.length; i++) {
1138
- const ele = arr[i];
1190
+ for (let i2 = 0; i2 < arr.length; i2++) {
1191
+ const ele = arr[i2];
1139
1192
  if (Array.isArray(ele)) {
1140
1193
  flat(ele);
1141
1194
  continue;
@@ -1229,9 +1282,9 @@ var require_to_regex_range = __commonJS({
1229
1282
  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
1230
1283
  return toRegexRange.cache[cacheKey].result;
1231
1284
  }
1232
- let a = Math.min(min, max);
1285
+ let a2 = Math.min(min, max);
1233
1286
  let b = Math.max(min, max);
1234
- if (Math.abs(a - b) === 1) {
1287
+ if (Math.abs(a2 - b) === 1) {
1235
1288
  let result = min + "|" + max;
1236
1289
  if (opts.capture) {
1237
1290
  return `(${result})`;
@@ -1242,20 +1295,20 @@ var require_to_regex_range = __commonJS({
1242
1295
  return `(?:${result})`;
1243
1296
  }
1244
1297
  let isPadded = hasPadding(min) || hasPadding(max);
1245
- let state = { min, max, a, b };
1298
+ let state = { min, max, a: a2, b };
1246
1299
  let positives = [];
1247
1300
  let negatives = [];
1248
1301
  if (isPadded) {
1249
1302
  state.isPadded = isPadded;
1250
1303
  state.maxLen = String(state.max).length;
1251
1304
  }
1252
- if (a < 0) {
1305
+ if (a2 < 0) {
1253
1306
  let newMin = b < 0 ? Math.abs(b) : 1;
1254
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1255
- a = state.a = 0;
1307
+ negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
1308
+ a2 = state.a = 0;
1256
1309
  }
1257
1310
  if (b >= 0) {
1258
- positives = splitToPatterns(a, b, state, opts);
1311
+ positives = splitToPatterns(a2, b, state, opts);
1259
1312
  }
1260
1313
  state.negatives = negatives;
1261
1314
  state.positives = positives;
@@ -1303,8 +1356,8 @@ var require_to_regex_range = __commonJS({
1303
1356
  let digits = zipped.length;
1304
1357
  let pattern = "";
1305
1358
  let count = 0;
1306
- for (let i = 0; i < digits; i++) {
1307
- let [startDigit, stopDigit] = zipped[i];
1359
+ for (let i2 = 0; i2 < digits; i2++) {
1360
+ let [startDigit, stopDigit] = zipped[i2];
1308
1361
  if (startDigit === stopDigit) {
1309
1362
  pattern += startDigit;
1310
1363
  } else if (startDigit !== "0" || stopDigit !== "9") {
@@ -1323,8 +1376,8 @@ var require_to_regex_range = __commonJS({
1323
1376
  let tokens = [];
1324
1377
  let start = min;
1325
1378
  let prev;
1326
- for (let i = 0; i < ranges.length; i++) {
1327
- let max2 = ranges[i];
1379
+ for (let i2 = 0; i2 < ranges.length; i2++) {
1380
+ let max2 = ranges[i2];
1328
1381
  let obj = rangeToPattern(String(start), String(max2), options);
1329
1382
  let zeros = "";
1330
1383
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
@@ -1359,13 +1412,13 @@ var require_to_regex_range = __commonJS({
1359
1412
  }
1360
1413
  return result;
1361
1414
  }
1362
- function zip(a, b) {
1415
+ function zip(a2, b) {
1363
1416
  let arr = [];
1364
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
1417
+ for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
1365
1418
  return arr;
1366
1419
  }
1367
- function compare(a, b) {
1368
- return a > b ? 1 : b > a ? -1 : 0;
1420
+ function compare(a2, b) {
1421
+ return a2 > b ? 1 : b > a2 ? -1 : 0;
1369
1422
  }
1370
1423
  function contains(arr, key, val) {
1371
1424
  return arr.some((ele) => ele[key] === val);
@@ -1383,8 +1436,8 @@ var require_to_regex_range = __commonJS({
1383
1436
  }
1384
1437
  return "";
1385
1438
  }
1386
- function toCharacterClass(a, b, options) {
1387
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
1439
+ function toCharacterClass(a2, b, options) {
1440
+ return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
1388
1441
  }
1389
1442
  function hasPadding(str) {
1390
1443
  return /^-?(0+)\d/.test(str);
@@ -1463,8 +1516,8 @@ var require_fill_range = __commonJS({
1463
1516
  return negative ? "-" + input : input;
1464
1517
  };
1465
1518
  var toSequence = (parts, options, maxLen) => {
1466
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1467
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1519
+ parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
1520
+ parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
1468
1521
  let prefix = options.capture ? "" : "?:";
1469
1522
  let positives = "";
1470
1523
  let negatives = "";
@@ -1485,12 +1538,12 @@ var require_fill_range = __commonJS({
1485
1538
  }
1486
1539
  return result;
1487
1540
  };
1488
- var toRange = (a, b, isNumbers, options) => {
1541
+ var toRange = (a2, b, isNumbers, options) => {
1489
1542
  if (isNumbers) {
1490
- return toRegexRange(a, b, { wrap: false, ...options });
1543
+ return toRegexRange(a2, b, { wrap: false, ...options });
1491
1544
  }
1492
- let start = String.fromCharCode(a);
1493
- if (a === b) return start;
1545
+ let start = String.fromCharCode(a2);
1546
+ if (a2 === b) return start;
1494
1547
  let stop = String.fromCharCode(b);
1495
1548
  return `[${start}-${stop}]`;
1496
1549
  };
@@ -1516,15 +1569,15 @@ var require_fill_range = __commonJS({
1516
1569
  return [];
1517
1570
  };
1518
1571
  var fillNumbers = (start, end, step = 1, options = {}) => {
1519
- let a = Number(start);
1572
+ let a2 = Number(start);
1520
1573
  let b = Number(end);
1521
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
1574
+ if (!Number.isInteger(a2) || !Number.isInteger(b)) {
1522
1575
  if (options.strictRanges === true) throw rangeError([start, end]);
1523
1576
  return [];
1524
1577
  }
1525
- if (a === 0) a = 0;
1578
+ if (a2 === 0) a2 = 0;
1526
1579
  if (b === 0) b = 0;
1527
- let descending = a > b;
1580
+ let descending = a2 > b;
1528
1581
  let startString = String(start);
1529
1582
  let endString = String(end);
1530
1583
  let stepString = String(step);
@@ -1540,13 +1593,13 @@ var require_fill_range = __commonJS({
1540
1593
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
1541
1594
  let range = [];
1542
1595
  let index = 0;
1543
- while (descending ? a >= b : a <= b) {
1596
+ while (descending ? a2 >= b : a2 <= b) {
1544
1597
  if (options.toRegex === true && step > 1) {
1545
- push(a);
1598
+ push(a2);
1546
1599
  } else {
1547
- range.push(pad(format(a, index), maxLen, toNumber));
1600
+ range.push(pad(format(a2, index), maxLen, toNumber));
1548
1601
  }
1549
- a = descending ? a - step : a + step;
1602
+ a2 = descending ? a2 - step : a2 + step;
1550
1603
  index++;
1551
1604
  }
1552
1605
  if (options.toRegex === true) {
@@ -1559,19 +1612,19 @@ var require_fill_range = __commonJS({
1559
1612
  return invalidRange(start, end, options);
1560
1613
  }
1561
1614
  let format = options.transform || ((val) => String.fromCharCode(val));
1562
- let a = `${start}`.charCodeAt(0);
1615
+ let a2 = `${start}`.charCodeAt(0);
1563
1616
  let b = `${end}`.charCodeAt(0);
1564
- let descending = a > b;
1565
- let min = Math.min(a, b);
1566
- let max = Math.max(a, b);
1617
+ let descending = a2 > b;
1618
+ let min = Math.min(a2, b);
1619
+ let max = Math.max(a2, b);
1567
1620
  if (options.toRegex && step === 1) {
1568
1621
  return toRange(min, max, false, options);
1569
1622
  }
1570
1623
  let range = [];
1571
1624
  let index = 0;
1572
- while (descending ? a >= b : a <= b) {
1573
- range.push(format(a, index));
1574
- a = descending ? a - step : a + step;
1625
+ while (descending ? a2 >= b : a2 <= b) {
1626
+ range.push(format(a2, index));
1627
+ a2 = descending ? a2 - step : a2 + step;
1575
1628
  index++;
1576
1629
  }
1577
1630
  if (options.toRegex === true) {
@@ -1695,17 +1748,17 @@ var require_expand = __commonJS({
1695
1748
  const walk = (node, parent = {}) => {
1696
1749
  node.queue = [];
1697
1750
  let p = parent;
1698
- let q2 = parent.queue;
1751
+ let q = parent.queue;
1699
1752
  while (p.type !== "brace" && p.type !== "root" && p.parent) {
1700
1753
  p = p.parent;
1701
- q2 = p.queue;
1754
+ q = p.queue;
1702
1755
  }
1703
1756
  if (node.invalid || node.dollar) {
1704
- q2.push(append(q2.pop(), stringify2(node, options)));
1757
+ q.push(append(q.pop(), stringify2(node, options)));
1705
1758
  return;
1706
1759
  }
1707
1760
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
1708
- q2.push(append(q2.pop(), ["{}"]));
1761
+ q.push(append(q.pop(), ["{}"]));
1709
1762
  return;
1710
1763
  }
1711
1764
  if (node.nodes && node.ranges > 0) {
@@ -1717,26 +1770,26 @@ var require_expand = __commonJS({
1717
1770
  if (range.length === 0) {
1718
1771
  range = stringify2(node, options);
1719
1772
  }
1720
- q2.push(append(q2.pop(), range));
1773
+ q.push(append(q.pop(), range));
1721
1774
  node.nodes = [];
1722
1775
  return;
1723
1776
  }
1724
1777
  const enclose = utils.encloseBrace(node);
1725
1778
  let queue = node.queue;
1726
- let block = node;
1727
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
1728
- block = block.parent;
1729
- queue = block.queue;
1779
+ let block2 = node;
1780
+ while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
1781
+ block2 = block2.parent;
1782
+ queue = block2.queue;
1730
1783
  }
1731
- for (let i = 0; i < node.nodes.length; i++) {
1732
- const child = node.nodes[i];
1784
+ for (let i2 = 0; i2 < node.nodes.length; i2++) {
1785
+ const child = node.nodes[i2];
1733
1786
  if (child.type === "comma" && node.type === "brace") {
1734
- if (i === 1) queue.push("");
1787
+ if (i2 === 1) queue.push("");
1735
1788
  queue.push("");
1736
1789
  continue;
1737
1790
  }
1738
1791
  if (child.type === "close") {
1739
- q2.push(append(q2.pop(), queue, enclose));
1792
+ q.push(append(q.pop(), queue, enclose));
1740
1793
  continue;
1741
1794
  }
1742
1795
  if (child.value && child.type !== "open") {
@@ -1903,7 +1956,7 @@ var require_parse = __commonJS({
1903
1956
  }
1904
1957
  const ast = { type: "root", input, nodes: [] };
1905
1958
  const stack = [ast];
1906
- let block = ast;
1959
+ let block2 = ast;
1907
1960
  let prev = ast;
1908
1961
  let brackets = 0;
1909
1962
  const length = input.length;
@@ -1919,15 +1972,15 @@ var require_parse = __commonJS({
1919
1972
  prev.value += node.value;
1920
1973
  return;
1921
1974
  }
1922
- block.nodes.push(node);
1923
- node.parent = block;
1975
+ block2.nodes.push(node);
1976
+ node.parent = block2;
1924
1977
  node.prev = prev;
1925
1978
  prev = node;
1926
1979
  return node;
1927
1980
  };
1928
1981
  push({ type: "bos" });
1929
1982
  while (index < length) {
1930
- block = stack[stack.length - 1];
1983
+ block2 = stack[stack.length - 1];
1931
1984
  value = advance();
1932
1985
  if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
1933
1986
  continue;
@@ -1964,19 +2017,19 @@ var require_parse = __commonJS({
1964
2017
  continue;
1965
2018
  }
1966
2019
  if (value === CHAR_LEFT_PARENTHESES) {
1967
- block = push({ type: "paren", nodes: [] });
1968
- stack.push(block);
2020
+ block2 = push({ type: "paren", nodes: [] });
2021
+ stack.push(block2);
1969
2022
  push({ type: "text", value });
1970
2023
  continue;
1971
2024
  }
1972
2025
  if (value === CHAR_RIGHT_PARENTHESES) {
1973
- if (block.type !== "paren") {
2026
+ if (block2.type !== "paren") {
1974
2027
  push({ type: "text", value });
1975
2028
  continue;
1976
2029
  }
1977
- block = stack.pop();
2030
+ block2 = stack.pop();
1978
2031
  push({ type: "text", value });
1979
- block = stack[stack.length - 1];
2032
+ block2 = stack[stack.length - 1];
1980
2033
  continue;
1981
2034
  }
1982
2035
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
@@ -2001,7 +2054,7 @@ var require_parse = __commonJS({
2001
2054
  }
2002
2055
  if (value === CHAR_LEFT_CURLY_BRACE) {
2003
2056
  depth++;
2004
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
2057
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
2005
2058
  const brace = {
2006
2059
  type: "brace",
2007
2060
  open: true,
@@ -2012,52 +2065,52 @@ var require_parse = __commonJS({
2012
2065
  ranges: 0,
2013
2066
  nodes: []
2014
2067
  };
2015
- block = push(brace);
2016
- stack.push(block);
2068
+ block2 = push(brace);
2069
+ stack.push(block2);
2017
2070
  push({ type: "open", value });
2018
2071
  continue;
2019
2072
  }
2020
2073
  if (value === CHAR_RIGHT_CURLY_BRACE) {
2021
- if (block.type !== "brace") {
2074
+ if (block2.type !== "brace") {
2022
2075
  push({ type: "text", value });
2023
2076
  continue;
2024
2077
  }
2025
2078
  const type = "close";
2026
- block = stack.pop();
2027
- block.close = true;
2079
+ block2 = stack.pop();
2080
+ block2.close = true;
2028
2081
  push({ type, value });
2029
2082
  depth--;
2030
- block = stack[stack.length - 1];
2083
+ block2 = stack[stack.length - 1];
2031
2084
  continue;
2032
2085
  }
2033
2086
  if (value === CHAR_COMMA && depth > 0) {
2034
- if (block.ranges > 0) {
2035
- block.ranges = 0;
2036
- const open = block.nodes.shift();
2037
- block.nodes = [open, { type: "text", value: stringify2(block) }];
2087
+ if (block2.ranges > 0) {
2088
+ block2.ranges = 0;
2089
+ const open = block2.nodes.shift();
2090
+ block2.nodes = [open, { type: "text", value: stringify2(block2) }];
2038
2091
  }
2039
2092
  push({ type: "comma", value });
2040
- block.commas++;
2093
+ block2.commas++;
2041
2094
  continue;
2042
2095
  }
2043
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
2044
- const siblings = block.nodes;
2096
+ if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
2097
+ const siblings = block2.nodes;
2045
2098
  if (depth === 0 || siblings.length === 0) {
2046
2099
  push({ type: "text", value });
2047
2100
  continue;
2048
2101
  }
2049
2102
  if (prev.type === "dot") {
2050
- block.range = [];
2103
+ block2.range = [];
2051
2104
  prev.value += value;
2052
2105
  prev.type = "range";
2053
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
2054
- block.invalid = true;
2055
- block.ranges = 0;
2106
+ if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
2107
+ block2.invalid = true;
2108
+ block2.ranges = 0;
2056
2109
  prev.type = "text";
2057
2110
  continue;
2058
2111
  }
2059
- block.ranges++;
2060
- block.args = [];
2112
+ block2.ranges++;
2113
+ block2.args = [];
2061
2114
  continue;
2062
2115
  }
2063
2116
  if (prev.type === "range") {
@@ -2065,7 +2118,7 @@ var require_parse = __commonJS({
2065
2118
  const before = siblings[siblings.length - 1];
2066
2119
  before.value += prev.value + value;
2067
2120
  prev = before;
2068
- block.ranges--;
2121
+ block2.ranges--;
2069
2122
  continue;
2070
2123
  }
2071
2124
  push({ type: "dot", value });
@@ -2074,9 +2127,9 @@ var require_parse = __commonJS({
2074
2127
  push({ type: "text", value });
2075
2128
  }
2076
2129
  do {
2077
- block = stack.pop();
2078
- if (block.type !== "root") {
2079
- block.nodes.forEach((node) => {
2130
+ block2 = stack.pop();
2131
+ if (block2.type !== "root") {
2132
+ block2.nodes.forEach((node) => {
2080
2133
  if (!node.nodes) {
2081
2134
  if (node.type === "open") node.isOpen = true;
2082
2135
  if (node.type === "close") node.isClose = true;
@@ -2085,8 +2138,8 @@ var require_parse = __commonJS({
2085
2138
  }
2086
2139
  });
2087
2140
  const parent = stack[stack.length - 1];
2088
- const index2 = parent.nodes.indexOf(block);
2089
- parent.nodes.splice(index2, 1, ...block.nodes);
2141
+ const index2 = parent.nodes.indexOf(block2);
2142
+ parent.nodes.splice(index2, 1, ...block2.nodes);
2090
2143
  }
2091
2144
  } while (stack.length > 0);
2092
2145
  push({ type: "eos" });
@@ -2719,9 +2772,9 @@ var require_scan = __commonJS({
2719
2772
  if (opts.parts === true || opts.tokens === true) {
2720
2773
  let prevIndex;
2721
2774
  for (let idx = 0; idx < slashes.length; idx++) {
2722
- const n = prevIndex ? prevIndex + 1 : start;
2723
- const i = slashes[idx];
2724
- const value = input.slice(n, i);
2775
+ const n2 = prevIndex ? prevIndex + 1 : start;
2776
+ const i2 = slashes[idx];
2777
+ const value = input.slice(n2, i2);
2725
2778
  if (opts.tokens) {
2726
2779
  if (idx === 0 && start !== 0) {
2727
2780
  tokens[idx].isPrefix = true;
@@ -2735,7 +2788,7 @@ var require_scan = __commonJS({
2735
2788
  if (idx !== 0 || value !== "") {
2736
2789
  parts.push(value);
2737
2790
  }
2738
- prevIndex = i;
2791
+ prevIndex = i2;
2739
2792
  }
2740
2793
  if (prevIndex && prevIndex + 1 < input.length) {
2741
2794
  const value = input.slice(prevIndex + 1);
@@ -2864,15 +2917,15 @@ var require_parse2 = __commonJS({
2864
2917
  };
2865
2918
  var hasRepeatedCharPrefixOverlap = (branches) => {
2866
2919
  const values = branches.map(normalizeSimpleBranch).filter(Boolean);
2867
- for (let i = 0; i < values.length; i++) {
2868
- for (let j = i + 1; j < values.length; j++) {
2869
- const a = values[i];
2920
+ for (let i2 = 0; i2 < values.length; i2++) {
2921
+ for (let j = i2 + 1; j < values.length; j++) {
2922
+ const a2 = values[i2];
2870
2923
  const b = values[j];
2871
- const char = a[0];
2872
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
2924
+ const char = a2[0];
2925
+ if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
2873
2926
  continue;
2874
2927
  }
2875
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
2928
+ if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
2876
2929
  return true;
2877
2930
  }
2878
2931
  }
@@ -2887,8 +2940,8 @@ var require_parse2 = __commonJS({
2887
2940
  let paren = 0;
2888
2941
  let quote = 0;
2889
2942
  let escaped = false;
2890
- for (let i = 1; i < pattern.length; i++) {
2891
- const ch = pattern[i];
2943
+ for (let i2 = 1; i2 < pattern.length; i2++) {
2944
+ const ch = pattern[i2];
2892
2945
  if (escaped === true) {
2893
2946
  escaped = false;
2894
2947
  continue;
@@ -2922,13 +2975,13 @@ var require_parse2 = __commonJS({
2922
2975
  if (ch === ")") {
2923
2976
  paren--;
2924
2977
  if (paren === 0) {
2925
- if (requireEnd === true && i !== pattern.length - 1) {
2978
+ if (requireEnd === true && i2 !== pattern.length - 1) {
2926
2979
  return;
2927
2980
  }
2928
2981
  return {
2929
2982
  type: pattern[0],
2930
- body: pattern.slice(2, i),
2931
- end: i
2983
+ body: pattern.slice(2, i2),
2984
+ end: i2
2932
2985
  };
2933
2986
  }
2934
2987
  }
@@ -3060,7 +3113,7 @@ var require_parse2 = __commonJS({
3060
3113
  let prev = bos;
3061
3114
  let value;
3062
3115
  const eos = () => state.index === len - 1;
3063
- const peek = state.peek = (n = 1) => input[state.index + n];
3116
+ const peek = state.peek = (n2 = 1) => input[state.index + n2];
3064
3117
  const advance = state.advance = () => input[++state.index] || "";
3065
3118
  const remaining = () => input.slice(state.index + 1);
3066
3119
  const consume = (value2 = "", num = 0) => {
@@ -3141,10 +3194,10 @@ var require_parse2 = __commonJS({
3141
3194
  open.type = "text";
3142
3195
  open.value = literal;
3143
3196
  open.output = safeOutput || utils.escapeRegex(literal);
3144
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
3145
- tokens[i].value = "";
3146
- tokens[i].output = "";
3147
- delete tokens[i].suffix;
3197
+ for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
3198
+ tokens[i2].value = "";
3199
+ tokens[i2].output = "";
3200
+ delete tokens[i2].suffix;
3148
3201
  }
3149
3202
  state.output = token.output + open.output;
3150
3203
  state.backtrack = true;
@@ -3387,13 +3440,13 @@ var require_parse2 = __commonJS({
3387
3440
  if (brace.dots === true) {
3388
3441
  const arr = tokens.slice();
3389
3442
  const range = [];
3390
- for (let i = arr.length - 1; i >= 0; i--) {
3443
+ for (let i2 = arr.length - 1; i2 >= 0; i2--) {
3391
3444
  tokens.pop();
3392
- if (arr[i].type === "brace") {
3445
+ if (arr[i2].type === "brace") {
3393
3446
  break;
3394
3447
  }
3395
- if (arr[i].type !== "dots") {
3396
- range.unshift(arr[i].value);
3448
+ if (arr[i2].type !== "dots") {
3449
+ range.unshift(arr[i2].value);
3397
3450
  }
3398
3451
  }
3399
3452
  output = expandRange(range, opts);
@@ -3936,8 +3989,8 @@ var require_micromatch = __commonJS({
3936
3989
  options.onResult(state);
3937
3990
  }
3938
3991
  };
3939
- for (let i = 0; i < patterns.length; i++) {
3940
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
3992
+ for (let i2 = 0; i2 < patterns.length; i2++) {
3993
+ let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
3941
3994
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
3942
3995
  if (negated) negatives++;
3943
3996
  for (let item of list) {
@@ -4185,7 +4238,7 @@ var require_pattern = __commonJS({
4185
4238
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
4186
4239
  function expandBraceExpansion(pattern) {
4187
4240
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
4188
- patterns.sort((a, b) => a.length - b.length);
4241
+ patterns.sort((a2, b) => a2.length - b.length);
4189
4242
  return patterns.filter((pattern2) => pattern2 !== "");
4190
4243
  }
4191
4244
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4266,8 +4319,8 @@ var require_merge2 = __commonJS({
4266
4319
  }
4267
4320
  const mergedStream = PassThrough(options);
4268
4321
  function addStream() {
4269
- for (let i = 0, len = arguments.length; i < len; i++) {
4270
- streamsQueue.push(pauseStreams(arguments[i], options));
4322
+ for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
4323
+ streamsQueue.push(pauseStreams(arguments[i2], options));
4271
4324
  }
4272
4325
  mergeStream();
4273
4326
  return this;
@@ -4316,8 +4369,8 @@ var require_merge2 = __commonJS({
4316
4369
  stream.pipe(mergedStream, { end: false });
4317
4370
  stream.resume();
4318
4371
  }
4319
- for (let i = 0; i < streams.length; i++) {
4320
- pipe(streams[i]);
4372
+ for (let i2 = 0; i2 < streams.length; i2++) {
4373
+ pipe(streams[i2]);
4321
4374
  }
4322
4375
  next();
4323
4376
  }
@@ -4348,8 +4401,8 @@ var require_merge2 = __commonJS({
4348
4401
  }
4349
4402
  streams.pause();
4350
4403
  } else {
4351
- for (let i = 0, len = streams.length; i < len; i++) {
4352
- streams[i] = pauseStreams(streams[i], options);
4404
+ for (let i2 = 0, len = streams.length; i2 < len; i2++) {
4405
+ streams[i2] = pauseStreams(streams[i2], options);
4353
4406
  }
4354
4407
  }
4355
4408
  return streams;
@@ -4431,13 +4484,13 @@ var require_tasks = __commonJS({
4431
4484
  Object.defineProperty(exports, "__esModule", { value: true });
4432
4485
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
4433
4486
  var utils = require_utils3();
4434
- function generate(input, settings) {
4435
- const patterns = processPatterns(input, settings);
4436
- const ignore = processPatterns(settings.ignore, settings);
4487
+ function generate(input, settings2) {
4488
+ const patterns = processPatterns(input, settings2);
4489
+ const ignore = processPatterns(settings2.ignore, settings2);
4437
4490
  const positivePatterns = getPositivePatterns(patterns);
4438
4491
  const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
4439
- const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
4440
- const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
4492
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
4493
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
4441
4494
  const staticTasks = convertPatternsToTasks(
4442
4495
  staticPatterns,
4443
4496
  negativePatterns,
@@ -4453,12 +4506,12 @@ var require_tasks = __commonJS({
4453
4506
  return staticTasks.concat(dynamicTasks);
4454
4507
  }
4455
4508
  exports.generate = generate;
4456
- function processPatterns(input, settings) {
4509
+ function processPatterns(input, settings2) {
4457
4510
  let patterns = input;
4458
- if (settings.braceExpansion) {
4511
+ if (settings2.braceExpansion) {
4459
4512
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
4460
4513
  }
4461
- if (settings.baseNameMatch) {
4514
+ if (settings2.baseNameMatch) {
4462
4515
  patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
4463
4516
  }
4464
4517
  return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
@@ -4527,26 +4580,26 @@ var require_async = __commonJS({
4527
4580
  init_utils2();
4528
4581
  Object.defineProperty(exports, "__esModule", { value: true });
4529
4582
  exports.read = void 0;
4530
- function read(path, settings, callback) {
4531
- settings.fs.lstat(path, (lstatError, lstat) => {
4583
+ function read(path, settings2, callback) {
4584
+ settings2.fs.lstat(path, (lstatError, lstat) => {
4532
4585
  if (lstatError !== null) {
4533
4586
  callFailureCallback(callback, lstatError);
4534
4587
  return;
4535
4588
  }
4536
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
4589
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
4537
4590
  callSuccessCallback(callback, lstat);
4538
4591
  return;
4539
4592
  }
4540
- settings.fs.stat(path, (statError, stat) => {
4593
+ settings2.fs.stat(path, (statError, stat) => {
4541
4594
  if (statError !== null) {
4542
- if (settings.throwErrorOnBrokenSymbolicLink) {
4595
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
4543
4596
  callFailureCallback(callback, statError);
4544
4597
  return;
4545
4598
  }
4546
4599
  callSuccessCallback(callback, lstat);
4547
4600
  return;
4548
4601
  }
4549
- if (settings.markSymbolicLink) {
4602
+ if (settings2.markSymbolicLink) {
4550
4603
  stat.isSymbolicLink = () => true;
4551
4604
  }
4552
4605
  callSuccessCallback(callback, stat);
@@ -4570,19 +4623,19 @@ var require_sync = __commonJS({
4570
4623
  init_utils2();
4571
4624
  Object.defineProperty(exports, "__esModule", { value: true });
4572
4625
  exports.read = void 0;
4573
- function read(path, settings) {
4574
- const lstat = settings.fs.lstatSync(path);
4575
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
4626
+ function read(path, settings2) {
4627
+ const lstat = settings2.fs.lstatSync(path);
4628
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
4576
4629
  return lstat;
4577
4630
  }
4578
4631
  try {
4579
- const stat = settings.fs.statSync(path);
4580
- if (settings.markSymbolicLink) {
4632
+ const stat = settings2.fs.statSync(path);
4633
+ if (settings2.markSymbolicLink) {
4581
4634
  stat.isSymbolicLink = () => true;
4582
4635
  }
4583
4636
  return stat;
4584
4637
  } catch (error2) {
4585
- if (!settings.throwErrorOnBrokenSymbolicLink) {
4638
+ if (!settings2.throwErrorOnBrokenSymbolicLink) {
4586
4639
  return lstat;
4587
4640
  }
4588
4641
  throw error2;
@@ -4659,8 +4712,8 @@ var require_out = __commonJS({
4659
4712
  }
4660
4713
  exports.stat = stat;
4661
4714
  function statSync2(path, optionsOrSettings) {
4662
- const settings = getSettings(optionsOrSettings);
4663
- return sync.read(path, settings);
4715
+ const settings2 = getSettings(optionsOrSettings);
4716
+ return sync.read(path, settings2);
4664
4717
  }
4665
4718
  exports.statSync = statSync2;
4666
4719
  function getSettings(settingsOrOptions = {}) {
@@ -4708,8 +4761,8 @@ var require_run_parallel = __commonJS({
4708
4761
  if (isSync) queueMicrotask2(end);
4709
4762
  else end();
4710
4763
  }
4711
- function each(i, err, result) {
4712
- results[i] = result;
4764
+ function each(i2, err, result) {
4765
+ results[i2] = result;
4713
4766
  if (--pending === 0 || err) {
4714
4767
  done(err);
4715
4768
  }
@@ -4723,9 +4776,9 @@ var require_run_parallel = __commonJS({
4723
4776
  });
4724
4777
  });
4725
4778
  } else {
4726
- tasks.forEach(function(task, i) {
4779
+ tasks.forEach(function(task, i2) {
4727
4780
  task(function(err, result) {
4728
- each(i, err, result);
4781
+ each(i2, err, result);
4729
4782
  });
4730
4783
  });
4731
4784
  }
@@ -4800,11 +4853,11 @@ var require_common = __commonJS({
4800
4853
  init_utils2();
4801
4854
  Object.defineProperty(exports, "__esModule", { value: true });
4802
4855
  exports.joinPathSegments = void 0;
4803
- function joinPathSegments(a, b, separator) {
4804
- if (a.endsWith(separator)) {
4805
- return a + b;
4856
+ function joinPathSegments(a2, b, separator) {
4857
+ if (a2.endsWith(separator)) {
4858
+ return a2 + b;
4806
4859
  }
4807
- return a + separator + b;
4860
+ return a2 + separator + b;
4808
4861
  }
4809
4862
  exports.joinPathSegments = joinPathSegments;
4810
4863
  }
@@ -4822,16 +4875,16 @@ var require_async2 = __commonJS({
4822
4875
  var constants_1 = require_constants3();
4823
4876
  var utils = require_utils4();
4824
4877
  var common = require_common();
4825
- function read(directory, settings, callback) {
4826
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
4827
- readdirWithFileTypes(directory, settings, callback);
4878
+ function read(directory, settings2, callback) {
4879
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
4880
+ readdirWithFileTypes(directory, settings2, callback);
4828
4881
  return;
4829
4882
  }
4830
- readdir(directory, settings, callback);
4883
+ readdir(directory, settings2, callback);
4831
4884
  }
4832
4885
  exports.read = read;
4833
- function readdirWithFileTypes(directory, settings, callback) {
4834
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
4886
+ function readdirWithFileTypes(directory, settings2, callback) {
4887
+ settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
4835
4888
  if (readdirError !== null) {
4836
4889
  callFailureCallback(callback, readdirError);
4837
4890
  return;
@@ -4839,13 +4892,13 @@ var require_async2 = __commonJS({
4839
4892
  const entries = dirents.map((dirent) => ({
4840
4893
  dirent,
4841
4894
  name: dirent.name,
4842
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
4895
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
4843
4896
  }));
4844
- if (!settings.followSymbolicLinks) {
4897
+ if (!settings2.followSymbolicLinks) {
4845
4898
  callSuccessCallback(callback, entries);
4846
4899
  return;
4847
4900
  }
4848
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
4901
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
4849
4902
  rpl(tasks, (rplError, rplEntries) => {
4850
4903
  if (rplError !== null) {
4851
4904
  callFailureCallback(callback, rplError);
@@ -4856,15 +4909,15 @@ var require_async2 = __commonJS({
4856
4909
  });
4857
4910
  }
4858
4911
  exports.readdirWithFileTypes = readdirWithFileTypes;
4859
- function makeRplTaskEntry(entry, settings) {
4912
+ function makeRplTaskEntry(entry, settings2) {
4860
4913
  return (done) => {
4861
4914
  if (!entry.dirent.isSymbolicLink()) {
4862
4915
  done(null, entry);
4863
4916
  return;
4864
4917
  }
4865
- settings.fs.stat(entry.path, (statError, stats) => {
4918
+ settings2.fs.stat(entry.path, (statError, stats) => {
4866
4919
  if (statError !== null) {
4867
- if (settings.throwErrorOnBrokenSymbolicLink) {
4920
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
4868
4921
  done(statError);
4869
4922
  return;
4870
4923
  }
@@ -4876,16 +4929,16 @@ var require_async2 = __commonJS({
4876
4929
  });
4877
4930
  };
4878
4931
  }
4879
- function readdir(directory, settings, callback) {
4880
- settings.fs.readdir(directory, (readdirError, names) => {
4932
+ function readdir(directory, settings2, callback) {
4933
+ settings2.fs.readdir(directory, (readdirError, names) => {
4881
4934
  if (readdirError !== null) {
4882
4935
  callFailureCallback(callback, readdirError);
4883
4936
  return;
4884
4937
  }
4885
4938
  const tasks = names.map((name) => {
4886
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
4939
+ const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
4887
4940
  return (done) => {
4888
- fsStat.stat(path, settings.fsStatSettings, (error2, stats) => {
4941
+ fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
4889
4942
  if (error2 !== null) {
4890
4943
  done(error2);
4891
4944
  return;
@@ -4895,7 +4948,7 @@ var require_async2 = __commonJS({
4895
4948
  path,
4896
4949
  dirent: utils.fs.createDirentFromStats(name, stats)
4897
4950
  };
4898
- if (settings.stats) {
4951
+ if (settings2.stats) {
4899
4952
  entry.stats = stats;
4900
4953
  }
4901
4954
  done(null, entry);
@@ -4932,27 +4985,27 @@ var require_sync2 = __commonJS({
4932
4985
  var constants_1 = require_constants3();
4933
4986
  var utils = require_utils4();
4934
4987
  var common = require_common();
4935
- function read(directory, settings) {
4936
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
4937
- return readdirWithFileTypes(directory, settings);
4988
+ function read(directory, settings2) {
4989
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
4990
+ return readdirWithFileTypes(directory, settings2);
4938
4991
  }
4939
- return readdir(directory, settings);
4992
+ return readdir(directory, settings2);
4940
4993
  }
4941
4994
  exports.read = read;
4942
- function readdirWithFileTypes(directory, settings) {
4943
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
4995
+ function readdirWithFileTypes(directory, settings2) {
4996
+ const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
4944
4997
  return dirents.map((dirent) => {
4945
4998
  const entry = {
4946
4999
  dirent,
4947
5000
  name: dirent.name,
4948
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5001
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
4949
5002
  };
4950
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
5003
+ if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
4951
5004
  try {
4952
- const stats = settings.fs.statSync(entry.path);
5005
+ const stats = settings2.fs.statSync(entry.path);
4953
5006
  entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
4954
5007
  } catch (error2) {
4955
- if (settings.throwErrorOnBrokenSymbolicLink) {
5008
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
4956
5009
  throw error2;
4957
5010
  }
4958
5011
  }
@@ -4961,17 +5014,17 @@ var require_sync2 = __commonJS({
4961
5014
  });
4962
5015
  }
4963
5016
  exports.readdirWithFileTypes = readdirWithFileTypes;
4964
- function readdir(directory, settings) {
4965
- const names = settings.fs.readdirSync(directory);
5017
+ function readdir(directory, settings2) {
5018
+ const names = settings2.fs.readdirSync(directory);
4966
5019
  return names.map((name) => {
4967
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
4968
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
5020
+ const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5021
+ const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
4969
5022
  const entry = {
4970
5023
  name,
4971
5024
  path: entryPath,
4972
5025
  dirent: utils.fs.createDirentFromStats(name, stats)
4973
5026
  };
4974
- if (settings.stats) {
5027
+ if (settings2.stats) {
4975
5028
  entry.stats = stats;
4976
5029
  }
4977
5030
  return entry;
@@ -5058,8 +5111,8 @@ var require_out2 = __commonJS({
5058
5111
  }
5059
5112
  exports.scandir = scandir;
5060
5113
  function scandirSync(path, optionsOrSettings) {
5061
- const settings = getSettings(optionsOrSettings);
5062
- return sync.read(path, settings);
5114
+ const settings2 = getSettings(optionsOrSettings);
5115
+ return sync.read(path, settings2);
5063
5116
  }
5064
5117
  exports.scandirSync = scandirSync;
5065
5118
  function getSettings(settingsOrOptions = {}) {
@@ -5103,9 +5156,9 @@ var require_reusify = __commonJS({
5103
5156
  }
5104
5157
  });
5105
5158
 
5106
- // node_modules/.bun/fastq@1.20.1/node_modules/fastq/queue.js
5159
+ // node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js
5107
5160
  var require_queue = __commonJS({
5108
- "node_modules/.bun/fastq@1.20.1/node_modules/fastq/queue.js"(exports, module) {
5161
+ "node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js"(exports, module) {
5109
5162
  "use strict";
5110
5163
  init_utils2();
5111
5164
  var reusify = require_reusify();
@@ -5285,11 +5338,12 @@ var require_queue = __commonJS({
5285
5338
  current.value = null;
5286
5339
  current.callback = noop;
5287
5340
  current.errorHandler = null;
5341
+ current.next = null;
5288
5342
  if (errorHandler2) {
5289
5343
  errorHandler2(new Error("abort"), val);
5290
5344
  }
5291
5345
  callback.call(context2, new Error("abort"));
5292
- current.release(current);
5346
+ cache.release(current);
5293
5347
  current = next;
5294
5348
  }
5295
5349
  self.drain = noop;
@@ -5395,11 +5449,11 @@ var require_common2 = __commonJS({
5395
5449
  init_utils2();
5396
5450
  Object.defineProperty(exports, "__esModule", { value: true });
5397
5451
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
5398
- function isFatalError(settings, error2) {
5399
- if (settings.errorFilter === null) {
5452
+ function isFatalError(settings2, error2) {
5453
+ if (settings2.errorFilter === null) {
5400
5454
  return true;
5401
5455
  }
5402
- return !settings.errorFilter(error2);
5456
+ return !settings2.errorFilter(error2);
5403
5457
  }
5404
5458
  exports.isFatalError = isFatalError;
5405
5459
  function isAppliedFilter(filter, value) {
@@ -5410,14 +5464,14 @@ var require_common2 = __commonJS({
5410
5464
  return filepath.split(/[/\\]/).join(separator);
5411
5465
  }
5412
5466
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
5413
- function joinPathSegments(a, b, separator) {
5414
- if (a === "") {
5467
+ function joinPathSegments(a2, b, separator) {
5468
+ if (a2 === "") {
5415
5469
  return b;
5416
5470
  }
5417
- if (a.endsWith(separator)) {
5418
- return a + b;
5471
+ if (a2.endsWith(separator)) {
5472
+ return a2 + b;
5419
5473
  }
5420
- return a + separator + b;
5474
+ return a2 + separator + b;
5421
5475
  }
5422
5476
  exports.joinPathSegments = joinPathSegments;
5423
5477
  }
@@ -5764,14 +5818,14 @@ var require_out3 = __commonJS({
5764
5818
  }
5765
5819
  exports.walk = walk;
5766
5820
  function walkSync(directory, optionsOrSettings) {
5767
- const settings = getSettings(optionsOrSettings);
5768
- const provider = new sync_1.default(directory, settings);
5821
+ const settings2 = getSettings(optionsOrSettings);
5822
+ const provider = new sync_1.default(directory, settings2);
5769
5823
  return provider.read();
5770
5824
  }
5771
5825
  exports.walkSync = walkSync;
5772
5826
  function walkStream(directory, optionsOrSettings) {
5773
- const settings = getSettings(optionsOrSettings);
5774
- const provider = new stream_1.default(directory, settings);
5827
+ const settings2 = getSettings(optionsOrSettings);
5828
+ const provider = new stream_1.default(directory, settings2);
5775
5829
  return provider.read();
5776
5830
  }
5777
5831
  exports.walkStream = walkStream;
@@ -5857,8 +5911,8 @@ var require_stream3 = __commonJS({
5857
5911
  done();
5858
5912
  }).catch(done);
5859
5913
  };
5860
- for (let i = 0; i < filepaths.length; i++) {
5861
- stream.write(i);
5914
+ for (let i2 = 0; i2 < filepaths.length; i2++) {
5915
+ stream.write(i2);
5862
5916
  }
5863
5917
  return stream;
5864
5918
  }
@@ -6519,14 +6573,14 @@ var require_out4 = __commonJS({
6519
6573
  function generateTasks(source, options) {
6520
6574
  assertPatternsInput(source);
6521
6575
  const patterns = [].concat(source);
6522
- const settings = new settings_1.default(options);
6523
- return taskManager.generate(patterns, settings);
6576
+ const settings2 = new settings_1.default(options);
6577
+ return taskManager.generate(patterns, settings2);
6524
6578
  }
6525
6579
  FastGlob2.generateTasks = generateTasks;
6526
6580
  function isDynamicPattern(source, options) {
6527
6581
  assertPatternsInput(source);
6528
- const settings = new settings_1.default(options);
6529
- return utils.pattern.isDynamicPattern(source, settings);
6582
+ const settings2 = new settings_1.default(options);
6583
+ return utils.pattern.isDynamicPattern(source, settings2);
6530
6584
  }
6531
6585
  FastGlob2.isDynamicPattern = isDynamicPattern;
6532
6586
  function escapePath(source) {
@@ -6568,9 +6622,9 @@ var require_out4 = __commonJS({
6568
6622
  })(FastGlob || (FastGlob = {}));
6569
6623
  function getWorks(source, _Provider, options) {
6570
6624
  const patterns = [].concat(source);
6571
- const settings = new settings_1.default(options);
6572
- const tasks = taskManager.generate(patterns, settings);
6573
- const provider = new _Provider(settings);
6625
+ const settings2 = new settings_1.default(options);
6626
+ const tasks = taskManager.generate(patterns, settings2);
6627
+ const provider = new _Provider(settings2);
6574
6628
  return tasks.map(provider.read, provider);
6575
6629
  }
6576
6630
  function assertPatternsInput(input) {
@@ -6748,14 +6802,14 @@ import "node:fs";
6748
6802
  import { createRequire } from "node:module";
6749
6803
  import {
6750
6804
  resolve,
6751
- join,
6752
- dirname,
6805
+ join as join2,
6806
+ dirname as dirname2,
6753
6807
  relative,
6754
6808
  normalize,
6755
6809
  sep,
6756
6810
  extname
6757
6811
  } from "node:path";
6758
- import "node:url";
6812
+ import { fileURLToPath } from "node:url";
6759
6813
  function safeExecuteAsync(fn, message) {
6760
6814
  return fn().catch((error2) => {
6761
6815
  throw new Error(
@@ -6763,7 +6817,7 @@ function safeExecuteAsync(fn, message) {
6763
6817
  );
6764
6818
  });
6765
6819
  }
6766
- var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
6820
+ var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
6767
6821
  var init_PathResolver = __esm({
6768
6822
  "packages/core/config/utils/PathResolver.ts"() {
6769
6823
  "use strict";
@@ -6776,7 +6830,7 @@ var init_PathResolver = __esm({
6776
6830
  getPatternsFor: getPatternsFor || void 0,
6777
6831
  I18N_PATHS: I18N_PATHS || void 0
6778
6832
  };
6779
- log2 = {
6833
+ log3 = {
6780
6834
  error: (message, error2) => {
6781
6835
  },
6782
6836
  warn: (message, error2) => {
@@ -6812,6 +6866,7 @@ var init_PathResolver = __esm({
6812
6866
  options;
6813
6867
  _repoRoot;
6814
6868
  _appRoot = null;
6869
+ _writtenPaths = null;
6815
6870
  /**
6816
6871
  * Get or create singleton instance
6817
6872
  * @param options - Configuration options
@@ -6897,7 +6952,7 @@ var init_PathResolver = __esm({
6897
6952
  */
6898
6953
  getDirname(path) {
6899
6954
  if (!path) return "";
6900
- return this.normalizePath(dirname(path));
6955
+ return this.normalizePath(dirname2(path));
6901
6956
  }
6902
6957
  /**
6903
6958
  * Resolve package path using Node's module resolution
@@ -6909,7 +6964,7 @@ var init_PathResolver = __esm({
6909
6964
  resolvePackage(packageSpecifier, fromPath = null) {
6910
6965
  try {
6911
6966
  const basePath = fromPath || this.getAppRoot();
6912
- const require3 = createRequire(join(basePath, "package.json"));
6967
+ const require3 = createRequire(join2(basePath, "package.json"));
6913
6968
  const resolved = require3.resolve(packageSpecifier);
6914
6969
  return this.normalizePath(resolved);
6915
6970
  } catch (error2) {
@@ -7061,7 +7116,7 @@ var init_PathResolver = __esm({
7061
7116
  return cleanContent;
7062
7117
  } catch (error2) {
7063
7118
  if (this.options.debug) {
7064
- log2.warn(`Failed to read file: ${filePath}`, error2);
7119
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7065
7120
  }
7066
7121
  return null;
7067
7122
  }
@@ -7089,7 +7144,7 @@ var init_PathResolver = __esm({
7089
7144
  return cleanContent;
7090
7145
  } catch (error2) {
7091
7146
  if (this.options.debug) {
7092
- log2.warn(`Failed to read file: ${filePath}`, error2);
7147
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7093
7148
  }
7094
7149
  return null;
7095
7150
  }
@@ -7111,16 +7166,16 @@ var init_PathResolver = __esm({
7111
7166
  verbose = false
7112
7167
  } = options;
7113
7168
  const normalizedPath = this.normalizePath(filePath);
7114
- const dir = this.normalizePath(dirname(normalizedPath));
7169
+ const dir = this.normalizePath(dirname2(normalizedPath));
7115
7170
  const fileExists = this.pathExists(normalizedPath);
7116
7171
  if (fileExists && !overwrite) {
7117
7172
  if (verbose) {
7118
- log2.info(`Skipping existing file: ${normalizedPath}`);
7173
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7119
7174
  }
7120
7175
  return false;
7121
7176
  }
7122
7177
  if (dryRun) {
7123
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7178
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7124
7179
  return true;
7125
7180
  }
7126
7181
  try {
@@ -7130,22 +7185,23 @@ var init_PathResolver = __esm({
7130
7185
  }
7131
7186
  const detectedFormat = this._detectFormat(filePath, format);
7132
7187
  let writeContent;
7133
- if (Buffer.isBuffer(content)) {
7188
+ if (Buffer2.isBuffer(content)) {
7134
7189
  writeContent = content;
7135
7190
  } else if (detectedFormat === "json" && typeof content === "object") {
7136
- writeContent = JSON.stringify(content, null, 2);
7191
+ writeContent = `${JSON.stringify(content, null, 2)}
7192
+ `;
7137
7193
  } else {
7138
7194
  writeContent = String(content);
7139
7195
  }
7140
7196
  try {
7141
7197
  return await safeExecuteAsync(async () => {
7142
- if (Buffer.isBuffer(writeContent)) {
7198
+ if (Buffer2.isBuffer(writeContent)) {
7143
7199
  await fs.promises.writeFile(normalizedPath, writeContent);
7144
7200
  } else {
7145
7201
  await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
7146
7202
  }
7147
7203
  if (verbose) {
7148
- log2.info(
7204
+ log3.info(
7149
7205
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7150
7206
  );
7151
7207
  }
@@ -7172,16 +7228,16 @@ var init_PathResolver = __esm({
7172
7228
  verbose = false
7173
7229
  } = options;
7174
7230
  const normalizedPath = this.normalizePath(filePath);
7175
- const dir = this.normalizePath(dirname(normalizedPath));
7231
+ const dir = this.normalizePath(dirname2(normalizedPath));
7176
7232
  const fileExists = this.pathExists(normalizedPath);
7177
7233
  if (fileExists && !overwrite) {
7178
7234
  if (verbose) {
7179
- log2.info(`Skipping existing file: ${normalizedPath}`);
7235
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7180
7236
  }
7181
7237
  return false;
7182
7238
  }
7183
7239
  if (dryRun) {
7184
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7240
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7185
7241
  return true;
7186
7242
  }
7187
7243
  try {
@@ -7191,21 +7247,23 @@ var init_PathResolver = __esm({
7191
7247
  }
7192
7248
  const detectedFormat = this._detectFormat(filePath, format);
7193
7249
  let writeContent;
7194
- if (Buffer.isBuffer(content)) {
7250
+ if (Buffer2.isBuffer(content)) {
7195
7251
  writeContent = content;
7196
7252
  } else if (detectedFormat === "json" && typeof content === "object") {
7197
- writeContent = JSON.stringify(content, null, 2);
7253
+ writeContent = `${JSON.stringify(content, null, 2)}
7254
+ `;
7198
7255
  } else {
7199
7256
  writeContent = String(content);
7200
7257
  }
7201
7258
  try {
7202
- if (Buffer.isBuffer(writeContent)) {
7259
+ if (Buffer2.isBuffer(writeContent)) {
7203
7260
  fs.writeFileSync(normalizedPath, writeContent);
7204
7261
  } else {
7205
7262
  fs.writeFileSync(normalizedPath, writeContent, "utf8");
7206
7263
  }
7264
+ this._writtenPaths?.add(normalizedPath);
7207
7265
  if (verbose) {
7208
- log2.info(
7266
+ log3.info(
7209
7267
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7210
7268
  );
7211
7269
  }
@@ -7230,15 +7288,15 @@ var init_PathResolver = __esm({
7230
7288
  const fileExists = this.pathExists(normalizedDestPath);
7231
7289
  if (fileExists && !overwrite) {
7232
7290
  if (verbose) {
7233
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
7291
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7234
7292
  }
7235
7293
  return false;
7236
7294
  }
7237
7295
  if (dryRun) {
7238
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7296
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7239
7297
  return true;
7240
7298
  }
7241
- const dir = this.normalizePath(dirname(normalizedDestPath));
7299
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7242
7300
  try {
7243
7301
  await fs.promises.mkdir(dir, { recursive: true });
7244
7302
  } catch (error2) {
@@ -7248,7 +7306,7 @@ var init_PathResolver = __esm({
7248
7306
  return await safeExecuteAsync(async () => {
7249
7307
  await fs.promises.copyFile(srcPath, normalizedDestPath);
7250
7308
  if (verbose) {
7251
- log2.info(
7309
+ log3.info(
7252
7310
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7253
7311
  );
7254
7312
  }
@@ -7272,15 +7330,15 @@ var init_PathResolver = __esm({
7272
7330
  const fileExists = this.pathExists(normalizedDestPath);
7273
7331
  if (fileExists && !overwrite) {
7274
7332
  if (verbose) {
7275
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
7333
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7276
7334
  }
7277
7335
  return false;
7278
7336
  }
7279
7337
  if (dryRun) {
7280
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7338
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7281
7339
  return true;
7282
7340
  }
7283
- const dir = this.normalizePath(dirname(normalizedDestPath));
7341
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7284
7342
  try {
7285
7343
  fs.mkdirSync(dir, { recursive: true });
7286
7344
  } catch (error2) {
@@ -7288,8 +7346,9 @@ var init_PathResolver = __esm({
7288
7346
  }
7289
7347
  try {
7290
7348
  fs.copyFileSync(srcPath, normalizedDestPath);
7349
+ this._writtenPaths?.add(normalizedDestPath);
7291
7350
  if (verbose) {
7292
- log2.info(
7351
+ log3.info(
7293
7352
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7294
7353
  );
7295
7354
  }
@@ -7306,7 +7365,7 @@ var init_PathResolver = __esm({
7306
7365
  return fs.existsSync(filePath);
7307
7366
  } catch (error2) {
7308
7367
  if (!silent) {
7309
- log2.error(`Error checking path existence: ${filePath}`, error2);
7368
+ log3.error(`Error checking path existence: ${filePath}`, error2);
7310
7369
  }
7311
7370
  return false;
7312
7371
  }
@@ -7332,7 +7391,7 @@ var init_PathResolver = __esm({
7332
7391
  return fs.readdirSync(dirPath, options);
7333
7392
  } catch (error2) {
7334
7393
  if (this.options.debug) {
7335
- log2.warn(`Failed to read directory: ${dirPath}`, error2);
7394
+ log3.warn(`Failed to read directory: ${dirPath}`, error2);
7336
7395
  }
7337
7396
  const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
7338
7397
  return isObjectOptions && options.withFileTypes ? [] : [];
@@ -7350,11 +7409,29 @@ var init_PathResolver = __esm({
7350
7409
  return fs.statSync(filePath);
7351
7410
  } catch (error2) {
7352
7411
  if (this.options.debug) {
7353
- log2.warn(`Failed to stat file: ${filePath}`, error2);
7412
+ log3.warn(`Failed to stat file: ${filePath}`, error2);
7354
7413
  }
7355
7414
  return null;
7356
7415
  }
7357
7416
  }
7417
+ /**
7418
+ * Resolve the real path of a file, following symlinks
7419
+ * @param filePath - Path to resolve
7420
+ * @returns Resolved real path
7421
+ */
7422
+ realpathSync(filePath) {
7423
+ return fs.realpathSync(filePath);
7424
+ }
7425
+ /**
7426
+ * Watch a directory for changes
7427
+ * @param dirPath - Directory to watch
7428
+ * @param options - fs.watch options
7429
+ * @param callback - Callback for change events
7430
+ * @returns FSWatcher instance
7431
+ */
7432
+ watch(dirPath, options, callback) {
7433
+ return fs.watch(dirPath, options, callback);
7434
+ }
7358
7435
  /**
7359
7436
  * Get file stats synchronously (follows symlinks)
7360
7437
  * Returns null if file doesn't exist (graceful degradation)
@@ -7367,7 +7444,7 @@ var init_PathResolver = __esm({
7367
7444
  return fs.lstatSync(filePath);
7368
7445
  } catch (error2) {
7369
7446
  if (this.options.debug) {
7370
- log2.warn(`Failed to lstat file: ${filePath}`, error2);
7447
+ log3.warn(`Failed to lstat file: ${filePath}`, error2);
7371
7448
  }
7372
7449
  return null;
7373
7450
  }
@@ -7434,6 +7511,28 @@ var init_PathResolver = __esm({
7434
7511
  * Get app root (where vite.config.ts is, Vite's config.root)
7435
7512
  * Falls back to repoRoot if not set
7436
7513
  */
7514
+ /**
7515
+ * Start recording every path written by writeSync/copySync.
7516
+ * Lets a generator know exactly which files the current run produced,
7517
+ * without comparing file timestamps to a clock.
7518
+ */
7519
+ startWriteRecording() {
7520
+ this._writtenPaths = /* @__PURE__ */ new Set();
7521
+ }
7522
+ /**
7523
+ * Stop recording and return the normalized paths written since
7524
+ * startWriteRecording().
7525
+ */
7526
+ stopWriteRecording() {
7527
+ if (!this._writtenPaths) {
7528
+ throw new Error(
7529
+ "stopWriteRecording() called without startWriteRecording()"
7530
+ );
7531
+ }
7532
+ const written = this._writtenPaths;
7533
+ this._writtenPaths = null;
7534
+ return written;
7535
+ }
7437
7536
  getAppRoot() {
7438
7537
  if (!this._appRoot) {
7439
7538
  return this._repoRoot;
@@ -7456,7 +7555,7 @@ var init_PathResolver = __esm({
7456
7555
  * @returns True if repoRoot is the monorepo (has packages directory)
7457
7556
  */
7458
7557
  isMonorepo() {
7459
- const packagesDir = join(this._repoRoot, "packages");
7558
+ const packagesDir = join2(this._repoRoot, "packages");
7460
7559
  return this.pathExists(packagesDir);
7461
7560
  }
7462
7561
  /**
@@ -7473,7 +7572,7 @@ var init_PathResolver = __esm({
7473
7572
  * Find files matching pattern within directory
7474
7573
  */
7475
7574
  async findFiles(directory, pattern, options = {}) {
7476
- const searchPattern = this.normalizePath(join(directory, pattern));
7575
+ const searchPattern = this.normalizePath(join2(directory, pattern));
7477
7576
  const appRoot = this.getAppRoot();
7478
7577
  const normalizeAppRoot = this.normalizePath(appRoot);
7479
7578
  const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
@@ -7520,7 +7619,7 @@ var init_PathResolver = __esm({
7520
7619
  return null;
7521
7620
  }
7522
7621
  const resolvedPath = this.normalizePath(
7523
- join(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
7622
+ join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
7524
7623
  );
7525
7624
  const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
7526
7625
  if (this.pathExists(resolvedDir)) {
@@ -7691,6 +7790,15 @@ var init_PathResolver = __esm({
7691
7790
  const cjsPath = this.getEmptyCjsModulePath();
7692
7791
  return cjsPath.replace(/\.cjs$/, ".js");
7693
7792
  }
7793
+ /**
7794
+ * Get absolute path to empty flag component module.
7795
+ * Returns `export default () => null;` — used by flag filtering plugins
7796
+ * to replace unused flag files at build time.
7797
+ */
7798
+ getEmptyFlagModulePath() {
7799
+ const __dirname2 = dirname2(fileURLToPath(import.meta.url));
7800
+ return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
7801
+ }
7694
7802
  /**
7695
7803
  * Get absolute path to empty CJS module for esbuild pre-bundling.
7696
7804
  * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
@@ -7716,13 +7824,13 @@ var init_PathResolver = __esm({
7716
7824
  const maxLevels = this.options.maxLevels;
7717
7825
  while (levelsChecked < maxLevels) {
7718
7826
  const toolingPath = this.normalizePath(
7719
- join(currentDir, PACKAGE_PATHS.TOOLING)
7827
+ join2(currentDir, PACKAGE_PATHS.TOOLING)
7720
7828
  );
7721
- const corePath = this.normalizePath(join(currentDir, PACKAGE_PATHS.CORE));
7829
+ const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
7722
7830
  if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
7723
7831
  return currentDir;
7724
7832
  }
7725
- const appsDir = join(currentDir, "apps");
7833
+ const appsDir = join2(currentDir, "apps");
7726
7834
  if (this.pathExists(appsDir)) {
7727
7835
  const appsDirStat = this.statSync(appsDir);
7728
7836
  if (appsDirStat?.isDirectory()) {
@@ -7730,15 +7838,15 @@ var init_PathResolver = __esm({
7730
7838
  }
7731
7839
  }
7732
7840
  const packageJsonPath = this.normalizePath(
7733
- join(currentDir, "package.json")
7841
+ join2(currentDir, "package.json")
7734
7842
  );
7735
7843
  if (this.pathExists(packageJsonPath)) {
7736
- const parentDir2 = this.normalizePath(dirname(currentDir));
7844
+ const parentDir2 = this.normalizePath(dirname2(currentDir));
7737
7845
  if (parentDir2 === currentDir) {
7738
7846
  return currentDir;
7739
7847
  }
7740
7848
  }
7741
- const parentDir = this.normalizePath(dirname(currentDir));
7849
+ const parentDir = this.normalizePath(dirname2(currentDir));
7742
7850
  if (parentDir === currentDir) {
7743
7851
  break;
7744
7852
  }
@@ -7754,8 +7862,8 @@ var init_PathResolver = __esm({
7754
7862
  // packages/tooling/src/utils/pathResolver.ts
7755
7863
  import { createRequire as createRequire2 } from "node:module";
7756
7864
  import {
7757
- join as join2,
7758
- dirname as dirname2,
7865
+ join as join3,
7866
+ dirname as dirname3,
7759
7867
  basename as basename2,
7760
7868
  extname as extname2,
7761
7869
  relative as relative2,
@@ -7772,14 +7880,14 @@ var init_pathResolver = __esm({
7772
7880
  init_PathResolver();
7773
7881
  pathResolverInstance = PathResolver.getInstance({ debug: false });
7774
7882
  normalizePath = (...pathSegments) => {
7775
- return pathResolverInstance.normalizePath(join2(...pathSegments));
7883
+ return pathResolverInstance.normalizePath(join3(...pathSegments));
7776
7884
  };
7777
7885
  pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
7778
7886
  readSync = (filePath, options) => pathResolverInstance.readSync(filePath, options);
7779
7887
  writeSync = (filePath, content, options) => pathResolverInstance.writeSync(filePath, content, options);
7780
7888
  ensureDirSync = (dirPath) => pathResolverInstance.ensureDirSync(dirPath);
7781
7889
  getDirname = (filePath) => {
7782
- return normalizePath(dirname2(filePath));
7890
+ return normalizePath(dirname3(filePath));
7783
7891
  };
7784
7892
  joinPath = (...pathSegments) => {
7785
7893
  return normalizePath(...pathSegments);
@@ -7788,10 +7896,10 @@ var init_pathResolver = __esm({
7788
7896
  });
7789
7897
 
7790
7898
  // packages/tooling/src/bundler/utils.ts
7791
- import { Buffer } from "node:buffer";
7899
+ import { Buffer as Buffer2 } from "node:buffer";
7792
7900
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
7793
7901
  import { createRequire as createRequire3 } from "node:module";
7794
- import { dirname as dirname3, resolve as resolve3 } from "node:path";
7902
+ import { dirname as dirname4, resolve as resolve3 } from "node:path";
7795
7903
  import process from "node:process";
7796
7904
  import { fileURLToPath as fileURLToPath3 } from "node:url";
7797
7905
  var require2, __filename, __dirname;
@@ -7800,12 +7908,12 @@ var init_utils2 = __esm({
7800
7908
  "use strict";
7801
7909
  require2 = createRequire3(import.meta.url);
7802
7910
  __filename = fileURLToPath3(import.meta.url);
7803
- __dirname = dirname3(__filename);
7911
+ __dirname = dirname4(__filename);
7804
7912
  if (typeof globalThis !== "undefined") {
7805
7913
  globalThis.require = require2;
7806
7914
  globalThis.__filename = __filename;
7807
7915
  globalThis.__dirname = __dirname;
7808
- globalThis.Buffer = Buffer;
7916
+ globalThis.Buffer = Buffer2;
7809
7917
  globalThis.process = process;
7810
7918
  if (typeof global === "undefined") {
7811
7919
  globalThis.global = globalThis;
@@ -7845,51 +7953,51 @@ function writeJsonConfig(filePath, data) {
7845
7953
  writeSync(filePath, data, { overwrite: true });
7846
7954
  }
7847
7955
  async function main(options = {}) {
7848
- mt("DoNotDev Agent Setup");
7956
+ intro("DoNotDev Agent Setup");
7849
7957
  const cwd = process.cwd();
7850
7958
  const isWindows = process.platform === "win32";
7851
7959
  const isMac = process.platform === "darwin";
7852
7960
  const homeDir = process.env.HOME || process.env.USERPROFILE || "";
7853
7961
  const mcpJsonPath = joinPath(cwd, ".mcp.json");
7854
7962
  if (options.dryRun) {
7855
- wt(`[DRY RUN] Would write ${mcpJsonPath}`, "Claude Code");
7963
+ note(`[DRY RUN] Would write ${mcpJsonPath}`, "Claude Code");
7856
7964
  } else {
7857
7965
  try {
7858
7966
  const config = readJsonConfig(mcpJsonPath, { mcpServers: {} });
7859
7967
  config.mcpServers = config.mcpServers || {};
7860
7968
  config.mcpServers.donotdev = mcpConfig;
7861
7969
  writeJsonConfig(mcpJsonPath, config);
7862
- log.success(".mcp.json configured (Claude Code).");
7970
+ log2.success(".mcp.json configured (Claude Code).");
7863
7971
  } catch (e) {
7864
- log.error(`Failed to configure .mcp.json: ${e.message}`);
7972
+ log2.error(`Failed to configure .mcp.json: ${e.message}`);
7865
7973
  }
7866
7974
  }
7867
7975
  const cursorMcpPath = joinPath(cwd, ".cursor", "mcp.json");
7868
7976
  if (options.dryRun) {
7869
- wt(`[DRY RUN] Would write ${cursorMcpPath}`, "Cursor");
7977
+ note(`[DRY RUN] Would write ${cursorMcpPath}`, "Cursor");
7870
7978
  } else {
7871
7979
  try {
7872
7980
  const config = readJsonConfig(cursorMcpPath, { mcpServers: {} });
7873
7981
  config.mcpServers = config.mcpServers || {};
7874
7982
  config.mcpServers.donotdev = mcpConfig;
7875
7983
  writeJsonConfig(cursorMcpPath, config);
7876
- log.success(".cursor/mcp.json configured (Cursor).");
7984
+ log2.success(".cursor/mcp.json configured (Cursor).");
7877
7985
  } catch (e) {
7878
- log.error(`Failed to configure Cursor: ${e.message}`);
7986
+ log2.error(`Failed to configure Cursor: ${e.message}`);
7879
7987
  }
7880
7988
  }
7881
7989
  const geminiConfigPath = joinPath(cwd, ".gemini", "settings.json");
7882
7990
  if (options.dryRun) {
7883
- wt(`[DRY RUN] Would write ${geminiConfigPath}`, "Gemini");
7991
+ note(`[DRY RUN] Would write ${geminiConfigPath}`, "Gemini");
7884
7992
  } else {
7885
7993
  try {
7886
7994
  const config = readJsonConfig(geminiConfigPath, { mcpServers: {} });
7887
7995
  config.mcpServers = config.mcpServers || {};
7888
7996
  config.mcpServers.donotdev = { ...mcpConfig, trust: true };
7889
7997
  writeJsonConfig(geminiConfigPath, config);
7890
- log.success(".gemini/settings.json configured (Gemini).");
7998
+ log2.success(".gemini/settings.json configured (Gemini).");
7891
7999
  } catch (e) {
7892
- log.error(`Failed to configure Gemini: ${e.message}`);
8000
+ log2.error(`Failed to configure Gemini: ${e.message}`);
7893
8001
  }
7894
8002
  }
7895
8003
  const claudeConfigPath = isWindows ? joinPath(
@@ -7905,24 +8013,24 @@ async function main(options = {}) {
7905
8013
  ) : null;
7906
8014
  if (claudeConfigPath) {
7907
8015
  if (options.dryRun) {
7908
- wt(`[DRY RUN] Would update ${claudeConfigPath}`, "Claude Desktop");
8016
+ note(`[DRY RUN] Would update ${claudeConfigPath}`, "Claude Desktop");
7909
8017
  } else {
7910
8018
  try {
7911
8019
  const config = readJsonConfig(claudeConfigPath, { mcpServers: {} });
7912
8020
  config.mcpServers = config.mcpServers || {};
7913
8021
  config.mcpServers.donotdev = mcpConfig;
7914
8022
  writeJsonConfig(claudeConfigPath, config);
7915
- log.success("Claude Desktop configured (global).");
8023
+ log2.success("Claude Desktop configured (global).");
7916
8024
  } catch (e) {
7917
- log.error(`Failed to configure Claude Desktop: ${e.message}`);
8025
+ log2.error(`Failed to configure Claude Desktop: ${e.message}`);
7918
8026
  }
7919
8027
  }
7920
8028
  }
7921
- wt(
8029
+ note(
7922
8030
  '1. Restart your IDE (Cursor, VS Code, etc.)\n2. Tell your AI agent: "Read AGENTS.md and build my app"\n3. The agent handles the rest.',
7923
8031
  "Next Steps"
7924
8032
  );
7925
- gt("Agent setup complete.");
8033
+ outro("Agent setup complete.");
7926
8034
  }
7927
8035
  export {
7928
8036
  main