@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;
134
- }
135
- ANSI_RE.lastIndex = index;
136
- if (ANSI_RE.test(input)) {
137
- if (width + ANSI_WIDTH > truncationLimit) {
138
- truncationIndex = Math.min(truncationIndex, index);
139
- }
140
- if (width + ANSI_WIDTH > LIMIT) {
141
- truncationEnabled = true;
142
- break;
143
- }
144
- width += ANSI_WIDTH;
145
- unmatchedStart = indexPrev;
146
- unmatchedEnd = index;
147
- index = indexPrev = ANSI_RE.lastIndex;
148
- continue;
139
+ if (index >= length) {
140
+ break outer;
149
141
  }
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, l2 = PARSE_BLOCKS.length; i2 < l2; 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,7 +413,7 @@ var require_src = __commonJS({
447
413
  var ESC2 = "\x1B";
448
414
  var CSI2 = `${ESC2}[`;
449
415
  var beep = "\x07";
450
- var cursor = {
416
+ var cursor3 = {
451
417
  to(x, y2) {
452
418
  if (!y2) return `${CSI2}${x + 1}G`;
453
419
  return `${CSI2}${y2 + 1};${x + 1}H`;
@@ -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,89 +451,169 @@ 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 * as _ from "node:readline";
503
- import P from "node:readline";
504
- import { ReadStream as D } from "node:tty";
505
- function d(r, t2, e) {
506
- if (!e.some((o) => !o.disabled)) return r;
507
- const s = r + t2, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
508
- return e[n].disabled ? d(n, t2 < 0 ? -1 : 1, e) : n;
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 * as l from "node:readline";
469
+ import l__default from "node:readline";
470
+ import { ReadStream } from "node:tty";
471
+ function findCursor(s, o, l2) {
472
+ if (!l2.some((r2) => !r2.disabled))
473
+ return s;
474
+ const t2 = s + o, n3 = Math.max(l2.length - 1, 0), e = t2 < 0 ? n3 : t2 > n3 ? 0 : t2;
475
+ return l2[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l2) : e;
509
476
  }
510
- function V(r, t2) {
511
- if (typeof r == "string") return u.aliases.get(r) === t2;
512
- for (const e of r) if (e !== void 0 && V(e, t2)) return true;
477
+ function isAccessible(n3) {
478
+ if (n3 !== void 0) return n3;
479
+ if (settings.accessible !== void 0) return settings.accessible;
480
+ const e = process.env.ACCESSIBLE;
481
+ return e !== void 0 && e !== "" && e !== "0" && e !== "false";
482
+ }
483
+ function isActionKey(n3, e) {
484
+ if (typeof n3 == "string")
485
+ return settings.aliases.get(n3) === e;
486
+ for (const s of n3)
487
+ if (s !== void 0 && isActionKey(s, e))
488
+ return true;
513
489
  return false;
514
490
  }
515
- function j(r, t2) {
516
- if (r === t2) return;
517
- const e = r.split(`
518
- `), s = t2.split(`
519
- `), i = Math.max(e.length, s.length), n = [];
520
- for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
521
- return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
491
+ function diffLines(i2, s) {
492
+ if (i2 === s) return;
493
+ const e = i2.split(`
494
+ `), t2 = s.split(`
495
+ `), r2 = Math.max(e.length, t2.length), f = [];
496
+ for (let n3 = 0; n3 < r2; n3++)
497
+ e[n3] !== t2[n3] && f.push(n3);
498
+ return {
499
+ lines: f,
500
+ numLinesBefore: e.length,
501
+ numLinesAfter: t2.length,
502
+ numLines: r2
503
+ };
522
504
  }
523
- function q(r) {
524
- return r === C;
505
+ function isCancel(e) {
506
+ return e === CANCEL_SYMBOL;
525
507
  }
526
- function w(r, t2) {
527
- const e = r;
528
- e.isTTY && e.setRawMode(t2);
508
+ function setRawMode(e, r2) {
509
+ const o = e;
510
+ o.isTTY && o.setRawMode(r2);
529
511
  }
530
- function z({ input: r = $, output: t2 = S, overwrite: e = true, hideCursor: s = true } = {}) {
531
- const i = _.createInterface({ input: r, output: t2, prompt: "", tabSize: 1 });
532
- _.emitKeypressEvents(r, i), r instanceof D && r.isTTY && r.setRawMode(true);
533
- const n = (o, { name: a, sequence: h }) => {
534
- const l = String(o);
535
- if (V([l, a, h], "cancel")) {
536
- s && t2.write(import_sisteransi.cursor.show), process.exit(0);
512
+ function block({
513
+ input: e = stdin,
514
+ output: r2 = stdout,
515
+ overwrite: o = true,
516
+ hideCursor: n3 = true
517
+ } = {}) {
518
+ const s = l.createInterface({
519
+ input: e,
520
+ output: r2,
521
+ prompt: "",
522
+ tabSize: 1
523
+ });
524
+ l.emitKeypressEvents(e, s), e instanceof ReadStream && e.isTTY && e.setRawMode(true);
525
+ const t2 = (f, { name: a2, sequence: w }) => {
526
+ const c2 = String(f);
527
+ if (isActionKey([c2, a2, w], "cancel")) {
528
+ n3 && r2.write(import_sisteransi.cursor.show), process.exit(0);
537
529
  return;
538
530
  }
539
- if (!e) return;
540
- const f = a === "return" ? 0 : -1, v = a === "return" ? -1 : 0;
541
- _.moveCursor(t2, f, v, () => {
542
- _.clearLine(t2, 1, () => {
543
- r.once("keypress", n);
531
+ if (!o) return;
532
+ const i2 = a2 === "return" ? 0 : -1, m = a2 === "return" ? -1 : 0;
533
+ l.moveCursor(r2, i2, m, () => {
534
+ l.clearLine(r2, 1, () => {
535
+ e.once("keypress", t2);
544
536
  });
545
537
  });
546
538
  };
547
- return s && t2.write(import_sisteransi.cursor.hide), r.once("keypress", n), () => {
548
- r.off("keypress", n), s && t2.write(import_sisteransi.cursor.show), r instanceof D && r.isTTY && !Y && r.setRawMode(false), i.terminal = false, i.close();
539
+ return n3 && r2.write(import_sisteransi.cursor.hide), e.once("keypress", t2), () => {
540
+ e.off("keypress", t2), n3 && r2.write(import_sisteransi.cursor.show), e instanceof ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
549
541
  };
550
542
  }
551
- function R(r, t2, e, s = e) {
552
- const i = O(r ?? S);
553
- return wrapAnsi(t2, i - e.length, { hard: true, trim: false }).split(`
554
- `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
543
+ function wrapTextWithPrefix(e, r2, o, n3 = o, s = o, t2) {
544
+ const f = getColumns(e ?? stdout);
545
+ return wrapAnsi(r2, f - o.length, {
546
+ hard: true,
547
+ trim: false
548
+ }).split(`
549
+ `).map((c2, i2, m) => {
550
+ const d = t2 ? t2(c2, i2) : c2;
551
+ return i2 === 0 ? `${n3}${d}` : i2 === m.length - 1 ? `${s}${d}` : `${o}${d}`;
552
+ }).join(`
555
553
  `);
556
554
  }
557
- var import_sisteransi, E, G, u, Y, C, O, A, p, Q, nt;
555
+ function runValidation(e, a2) {
556
+ if ("~standard" in e) {
557
+ const n3 = e["~standard"].validate(a2);
558
+ return n3 instanceof Promise ? n3.then((r2) => r2.issues?.at(0)?.message) : n3.issues?.at(0)?.message;
559
+ }
560
+ return e(a2);
561
+ }
562
+ var import_sisteransi, a$1, t, settings, R, CANCEL_SYMBOL, getColumns, getRows, y, r, n$1;
558
563
  var init_dist3 = __esm({
559
- "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
564
+ "node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
560
565
  init_utils2();
561
566
  init_main();
562
567
  import_sisteransi = __toESM(require_src(), 1);
563
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
564
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
565
- u = { actions: new Set(E), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...G], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t2) => `There are only ${r} days in ${t2}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
566
- Y = globalThis.process.platform.startsWith("win");
567
- C = /* @__PURE__ */ Symbol("clack:cancel");
568
- O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
569
- A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
570
- p = class {
568
+ a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
569
+ t = [
570
+ "January",
571
+ "February",
572
+ "March",
573
+ "April",
574
+ "May",
575
+ "June",
576
+ "July",
577
+ "August",
578
+ "September",
579
+ "October",
580
+ "November",
581
+ "December"
582
+ ];
583
+ settings = {
584
+ actions: new Set(a$1),
585
+ aliases: /* @__PURE__ */ new Map([
586
+ // vim support
587
+ ["k", "up"],
588
+ ["j", "down"],
589
+ ["h", "left"],
590
+ ["l", "right"],
591
+ ["", "cancel"],
592
+ // opinionated defaults!
593
+ ["escape", "cancel"]
594
+ ]),
595
+ messages: {
596
+ cancel: "Canceled",
597
+ error: "Something went wrong"
598
+ },
599
+ withGuide: true,
600
+ accessible: void 0,
601
+ date: {
602
+ monthNames: [...t],
603
+ messages: {
604
+ required: "Please enter a valid date",
605
+ invalidMonth: "There are only 12 months in a year",
606
+ invalidDay: (n3, e) => `There are only ${n3} days in ${e}`,
607
+ afterMin: (n3) => `Date must be on or after ${n3.toISOString().slice(0, 10)}`,
608
+ beforeMax: (n3) => `Date must be on or before ${n3.toISOString().slice(0, 10)}`
609
+ }
610
+ }
611
+ };
612
+ R = globalThis.process.platform.startsWith("win");
613
+ CANCEL_SYMBOL = /* @__PURE__ */ Symbol("clack:cancel");
614
+ getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
615
+ getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
616
+ y = class {
571
617
  input;
572
618
  output;
573
619
  _abortSignal;
@@ -582,46 +628,92 @@ var init_dist3 = __esm({
582
628
  error = "";
583
629
  value;
584
630
  userInput = "";
631
+ /**
632
+ * Whether accessible (static, screen-reader friendly) output is enabled for
633
+ * this prompt, resolved from the `accessible` option, the global setting,
634
+ * and the `ACCESSIBLE` env var.
635
+ */
636
+ get accessible() {
637
+ return isAccessible(this.opts.accessible);
638
+ }
585
639
  constructor(t2, e = true) {
586
- const { input: s = $, output: i = S, render: n, signal: o, ...a } = t2;
587
- this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = e, this._abortSignal = o, this.input = s, this.output = i;
640
+ const { input: i2 = stdin, output: s = stdout, render: r2, signal: n3, ...o } = t2;
641
+ this.opts = o, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = r2.bind(this), this._track = e, this._abortSignal = n3, this.input = i2, this.output = s;
588
642
  }
643
+ /**
644
+ * Unsubscribe all listeners
645
+ */
589
646
  unsubscribe() {
590
647
  this._subscribers.clear();
591
648
  }
649
+ /**
650
+ * Set a subscriber with opts
651
+ * @param event - The event name
652
+ */
592
653
  setSubscriber(t2, e) {
593
- const s = this._subscribers.get(t2) ?? [];
594
- s.push(e), this._subscribers.set(t2, s);
654
+ const i2 = this._subscribers.get(t2) ?? [];
655
+ i2.push(e), this._subscribers.set(t2, i2);
595
656
  }
657
+ /**
658
+ * Subscribe to an event
659
+ * @param event - The event name
660
+ * @param cb - The callback
661
+ */
596
662
  on(t2, e) {
597
663
  this.setSubscriber(t2, { cb: e });
598
664
  }
665
+ /**
666
+ * Subscribe to an event once
667
+ * @param event - The event name
668
+ * @param cb - The callback
669
+ */
599
670
  once(t2, e) {
600
671
  this.setSubscriber(t2, { cb: e, once: true });
601
672
  }
673
+ /**
674
+ * Emit an event with data
675
+ * @param event - The event name
676
+ * @param data - The data to pass to the callback
677
+ */
602
678
  emit(t2, ...e) {
603
- const s = this._subscribers.get(t2) ?? [], i = [];
604
- for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
605
- for (const n of i) n();
679
+ const i2 = this._subscribers.get(t2) ?? [], s = [];
680
+ for (const r2 of i2)
681
+ r2.cb(...e), r2.once && s.push(() => i2.splice(i2.indexOf(r2), 1));
682
+ for (const r2 of s)
683
+ r2();
606
684
  }
607
685
  prompt() {
608
686
  return new Promise((t2) => {
609
687
  if (this._abortSignal) {
610
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
611
- this._abortSignal.addEventListener("abort", () => {
612
- this.state = "cancel", this.close();
613
- }, { once: true });
688
+ if (this._abortSignal.aborted)
689
+ return this.state = "cancel", this.close(), t2(CANCEL_SYMBOL);
690
+ this._abortSignal.addEventListener(
691
+ "abort",
692
+ () => {
693
+ this.state = "cancel", this.close();
694
+ },
695
+ { once: true }
696
+ );
614
697
  }
615
- this.rl = P.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
616
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(this.value);
698
+ this.rl = l__default.createInterface({
699
+ input: this.input,
700
+ tabSize: 2,
701
+ prompt: "",
702
+ escapeCodeTimeout: 50,
703
+ terminal: true
704
+ }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), setRawMode(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
705
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
617
706
  }), this.once("cancel", () => {
618
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(C);
707
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
619
708
  });
620
709
  });
621
710
  }
622
711
  _isActionKey(t2, e) {
623
712
  return t2 === " ";
624
713
  }
714
+ _shouldSubmit(t2, e) {
715
+ return true;
716
+ }
625
717
  _setValue(t2) {
626
718
  this.value = t2, this.emit("value", this.value);
627
719
  }
@@ -631,19 +723,22 @@ var init_dist3 = __esm({
631
723
  _clearUserInput() {
632
724
  this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
633
725
  }
634
- onKeypress(t2, e) {
635
- if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2?.toLowerCase(), e), e?.name === "return") {
636
- if (this.opts.validate) {
637
- const s = this.opts.validate(this.value);
638
- s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
726
+ async onKeypress(t2, e) {
727
+ if (this.state !== "validating") {
728
+ if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && settings.aliases.has(e.name) && this.emit("cursor", settings.aliases.get(e.name)), settings.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2, e), e?.name === "return" && this._shouldSubmit(t2, e)) {
729
+ if (this.opts.validate) {
730
+ const i2 = runValidation(this.opts.validate, this.value);
731
+ let s;
732
+ i2 instanceof Promise ? (this.state = "validating", this.render(), s = await i2) : s = i2, s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
733
+ }
734
+ this.state !== "error" && (this.state = "submit");
639
735
  }
640
- this.state !== "error" && (this.state = "submit");
736
+ isActionKey([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
641
737
  }
642
- V([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
643
738
  }
644
739
  close() {
645
740
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
646
- `), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
741
+ `), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
647
742
  }
648
743
  restoreCursor() {
649
744
  const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
@@ -651,34 +746,39 @@ var init_dist3 = __esm({
651
746
  this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
652
747
  }
653
748
  render() {
654
- const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
749
+ const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
750
+ hard: true,
751
+ trim: false
752
+ });
655
753
  if (t2 !== this._prevFrame) {
656
- if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
754
+ if (this.state === "initial")
755
+ this.output.write(import_sisteransi.cursor.hide);
657
756
  else {
658
- const e = j(this._prevFrame, t2), s = A(this.output);
757
+ const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
659
758
  if (this.restoreCursor(), e) {
660
- const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
661
- let o = e.lines.find((a) => a >= i);
662
- if (o === void 0) {
759
+ const s = Math.max(0, e.numLinesAfter - i2), r2 = Math.max(0, e.numLinesBefore - i2);
760
+ let n3 = e.lines.find((o) => o >= s);
761
+ if (n3 === void 0) {
663
762
  this._prevFrame = t2;
664
763
  return;
665
764
  }
666
765
  if (e.lines.length === 1) {
667
- this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
668
- const a = t2.split(`
766
+ this.output.write(import_sisteransi.cursor.move(0, n3 - r2)), this.output.write(import_sisteransi.erase.lines(1));
767
+ const o = t2.split(`
669
768
  `);
670
- this.output.write(a[o]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
769
+ this.output.write(o[n3]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, o.length - n3 - 1));
671
770
  return;
672
771
  } else if (e.lines.length > 1) {
673
- if (i < n) o = i;
772
+ if (s < r2)
773
+ n3 = s;
674
774
  else {
675
- const h = o - n;
676
- h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
775
+ const h2 = n3 - r2;
776
+ h2 > 0 && this.output.write(import_sisteransi.cursor.move(0, h2));
677
777
  }
678
778
  this.output.write(import_sisteransi.erase.down());
679
- const a = t2.split(`
680
- `).slice(o);
681
- this.output.write(a.join(`
779
+ const f = t2.split(`
780
+ `).slice(n3);
781
+ this.output.write(f.join(`
682
782
  `)), this._prevFrame = t2;
683
783
  return;
684
784
  }
@@ -689,7 +789,7 @@ var init_dist3 = __esm({
689
789
  }
690
790
  }
691
791
  };
692
- Q = class extends p {
792
+ r = class extends y {
693
793
  get cursor() {
694
794
  return this.value ? 0 : 1;
695
795
  }
@@ -699,34 +799,35 @@ var init_dist3 = __esm({
699
799
  constructor(t2) {
700
800
  super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
701
801
  this.value = this._value;
702
- }), this.on("confirm", (e) => {
703
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
802
+ }), this.on("confirm", (i2) => {
803
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = i2, this.state = "submit", this.close();
704
804
  }), this.on("cursor", () => {
705
805
  this.value = !this.value;
706
806
  });
707
807
  }
708
808
  };
709
- nt = class extends p {
809
+ n$1 = class n extends y {
710
810
  options;
711
811
  cursor = 0;
712
812
  get _selectedValue() {
713
813
  return this.options[this.cursor];
714
814
  }
715
815
  changeValue() {
716
- this.value = this._selectedValue.value;
717
- }
718
- constructor(t2) {
719
- super(t2, false), this.options = t2.options;
720
- const e = this.options.findIndex(({ value: i }) => i === t2.initialValue), s = e === -1 ? 0 : e;
721
- this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
722
- switch (i) {
816
+ const e = this._selectedValue;
817
+ this.value = e === void 0 ? void 0 : e.value;
818
+ }
819
+ constructor(e) {
820
+ super(e, false), this.options = e.options;
821
+ const o = this.options.findIndex(({ value: s }) => s === e.initialValue), t2 = o === -1 ? 0 : o;
822
+ this.cursor = this.options[t2]?.disabled ? findCursor(t2, 1, this.options) : t2, this.changeValue(), this.on("cursor", (s) => {
823
+ switch (s) {
723
824
  case "left":
724
825
  case "up":
725
- this.cursor = d(this.cursor, -1, this.options);
826
+ this.cursor = findCursor(this.cursor, -1, this.options);
726
827
  break;
727
828
  case "down":
728
829
  case "right":
729
- this.cursor = d(this.cursor, 1, this.options);
830
+ this.cursor = findCursor(this.cursor, 1, this.options);
730
831
  break;
731
832
  }
732
833
  this.changeValue();
@@ -736,299 +837,456 @@ var init_dist3 = __esm({
736
837
  }
737
838
  });
738
839
 
739
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
740
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
741
- import P2 from "node:process";
742
- import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
743
- import { dirname as be, join as Qe } from "node:path";
744
- function Ze() {
745
- return P2.platform !== "win32" ? P2.env.TERM !== "linux" : !!P2.env.CI || !!P2.env.WT_SESSION || !!P2.env.TERMINUS_SUBLIME || P2.env.ConEmuTask === "{cmd::Cmder}" || P2.env.TERM_PROGRAM === "Terminus-Sublime" || P2.env.TERM_PROGRAM === "vscode" || P2.env.TERM === "xterm-256color" || P2.env.TERM === "alacritty" || P2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
840
+ // node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
841
+ import { styleText as styleText2, stripVTControlCharacters } from "node:util";
842
+ import process$1 from "node:process";
843
+ import { existsSync, lstatSync, readdirSync } from "node:fs";
844
+ import { dirname, join } from "node:path";
845
+ function isUnicodeSupported() {
846
+ if (process$1.platform !== "win32") {
847
+ return process$1.env.TERM !== "linux";
848
+ }
849
+ 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";
850
+ }
851
+ function formatInstructionFooter(o, e) {
852
+ const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
853
+ return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
746
854
  }
747
- var import_sisteransi2, ee, ae, w2, _e, oe, ue, F, le, d2, E2, Ie, Ee, z2, H2, te, U, J, xe, se, ce, Ge, $e, de, Oe, he, pe, me, ge, V2, ye, et2, Y2, ot2, O2, pt, mt, gt, ft, vt, wt, Ct, fe, Ve, re, _t, je;
855
+ var import_sisteransi2, unicode, isCI, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, symbol, symbolBar, I, limitOptions, confirm, MULTISELECT_INSTRUCTIONS, log, cancel, intro, outro, W$1, C, note, W, spinner, u2, SELECT_INSTRUCTIONS, c, select, i;
748
856
  var init_dist4 = __esm({
749
- "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
857
+ "node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
750
858
  init_utils2();
751
859
  init_dist3();
752
860
  init_dist3();
753
861
  init_main();
754
862
  init_dist2();
755
863
  import_sisteransi2 = __toESM(require_src(), 1);
756
- ee = Ze();
757
- ae = () => process.env.CI === "true";
758
- w2 = (e, i) => ee ? e : i;
759
- _e = w2("\u25C6", "*");
760
- oe = w2("\u25A0", "x");
761
- ue = w2("\u25B2", "x");
762
- F = w2("\u25C7", "o");
763
- le = w2("\u250C", "T");
764
- d2 = w2("\u2502", "|");
765
- E2 = w2("\u2514", "\u2014");
766
- Ie = w2("\u2510", "T");
767
- Ee = w2("\u2518", "\u2014");
768
- z2 = w2("\u25CF", ">");
769
- H2 = w2("\u25CB", " ");
770
- te = w2("\u25FB", "[\u2022]");
771
- U = w2("\u25FC", "[+]");
772
- J = w2("\u25FB", "[ ]");
773
- xe = w2("\u25AA", "\u2022");
774
- se = w2("\u2500", "-");
775
- ce = w2("\u256E", "+");
776
- Ge = w2("\u251C", "+");
777
- $e = w2("\u256F", "+");
778
- de = w2("\u2570", "+");
779
- Oe = w2("\u256D", "+");
780
- he = w2("\u25CF", "\u2022");
781
- pe = w2("\u25C6", "*");
782
- me = w2("\u25B2", "!");
783
- ge = w2("\u25A0", "x");
784
- V2 = (e) => {
785
- switch (e) {
864
+ unicode = isUnicodeSupported();
865
+ isCI = () => process.env.CI === "true";
866
+ unicodeOr = (o, e) => unicode ? o : e;
867
+ S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
868
+ S_STEP_CANCEL = unicodeOr("\u25A0", "x");
869
+ S_STEP_ERROR = unicodeOr("\u25B2", "x");
870
+ S_STEP_SUBMIT = unicodeOr("\u25C7", "o");
871
+ S_BAR_START = unicodeOr("\u250C", "T");
872
+ S_BAR = unicodeOr("\u2502", "|");
873
+ S_BAR_END = unicodeOr("\u2514", "\u2014");
874
+ S_BAR_START_RIGHT = unicodeOr("\u2510", "T");
875
+ S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014");
876
+ S_RADIO_ACTIVE = unicodeOr("\u25CF", ">");
877
+ S_RADIO_INACTIVE = unicodeOr("\u25CB", " ");
878
+ S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]");
879
+ S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]");
880
+ S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]");
881
+ S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022");
882
+ S_BAR_H = unicodeOr("\u2500", "-");
883
+ S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+");
884
+ S_CONNECT_LEFT = unicodeOr("\u251C", "+");
885
+ S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+");
886
+ S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+");
887
+ S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+");
888
+ S_INFO = unicodeOr("\u25CF", "\u2022");
889
+ S_SUCCESS = unicodeOr("\u25C6", "*");
890
+ S_WARN = unicodeOr("\u25B2", "!");
891
+ S_ERROR = unicodeOr("\u25A0", "x");
892
+ symbol = (o) => {
893
+ switch (o) {
786
894
  case "initial":
787
895
  case "active":
788
- return t("cyan", _e);
896
+ return styleText2("cyan", S_STEP_ACTIVE);
789
897
  case "cancel":
790
- return t("red", oe);
898
+ return styleText2("red", S_STEP_CANCEL);
791
899
  case "error":
792
- return t("yellow", ue);
900
+ return styleText2("yellow", S_STEP_ERROR);
793
901
  case "submit":
794
- return t("green", F);
902
+ return styleText2("green", S_STEP_SUBMIT);
903
+ case "validating":
904
+ return styleText2("dim", S_STEP_ACTIVE);
795
905
  }
796
906
  };
797
- ye = (e) => {
798
- switch (e) {
907
+ symbolBar = (o) => {
908
+ switch (o) {
799
909
  case "initial":
800
910
  case "active":
801
- return t("cyan", d2);
911
+ return styleText2("cyan", S_BAR);
802
912
  case "cancel":
803
- return t("red", d2);
913
+ return styleText2("red", S_BAR);
804
914
  case "error":
805
- return t("yellow", d2);
915
+ return styleText2("yellow", S_BAR);
806
916
  case "submit":
807
- return t("green", d2);
808
- }
809
- };
810
- et2 = (e, i, s, r, u2) => {
811
- let n = i, o = 0;
812
- for (let c2 = s; c2 < r; c2++) {
813
- const a = e[c2];
814
- if (n = n - a.length, o++, n <= u2) break;
815
- }
816
- return { lineCount: n, removals: o };
817
- };
818
- Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
819
- const c2 = O(r) - n, a = A(r), l = t("dim", "..."), $2 = Math.max(a - o, 0), y2 = Math.max(Math.min(u2, $2), 5);
820
- let p2 = 0;
821
- e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
822
- let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
823
- const S2 = Math.min(p2 + y2, i.length), h = [];
917
+ return styleText2("green", S_BAR);
918
+ }
919
+ };
920
+ I = (l2, e, w, p, b, C2 = false) => {
921
+ let r2 = e, O = 0;
922
+ if (C2)
923
+ for (let i2 = p - 1; i2 >= w; i2--) {
924
+ const m = l2[i2];
925
+ if (m && (r2 -= m.length), O++, r2 <= b) break;
926
+ }
927
+ else
928
+ for (let i2 = w; i2 < p; i2++) {
929
+ const m = l2[i2];
930
+ if (m && (r2 -= m.length), O++, r2 <= b) break;
931
+ }
932
+ return { lineCount: r2, removals: O };
933
+ };
934
+ limitOptions = ({
935
+ cursor: l2,
936
+ options: e,
937
+ style: w,
938
+ output: p = process.stdout,
939
+ maxItems: b = Number.POSITIVE_INFINITY,
940
+ columnPadding: C2 = 0,
941
+ rowPadding: r2 = 4
942
+ }) => {
943
+ const i2 = getColumns(p) - C2, m = getRows(p), M = styleText2("dim", "..."), v = Math.max(m - r2, 0), a2 = Math.max(Math.min(b, v), 5);
824
944
  let f = 0;
825
- m && f++, g && f++;
826
- const v = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
827
- for (let b = v; b < T; b++) {
828
- const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
945
+ l2 >= a2 - 3 && (f = Math.max(
946
+ Math.min(l2 - a2 + 3, e.length - a2),
947
+ 0
948
+ ));
949
+ let d = a2 < e.length && f > 0, c2 = a2 < e.length && f + a2 < e.length;
950
+ const W2 = Math.min(
951
+ f + a2,
952
+ e.length
953
+ ), s = [];
954
+ let g = 0;
955
+ d && g++, c2 && g++;
956
+ const T = f + (d ? 1 : 0), y2 = W2 - (c2 ? 1 : 0);
957
+ for (let t2 = T; t2 < y2; t2++) {
958
+ const n3 = e[t2], o = n3 ? w(n3, t2 === l2) : "", h2 = wrapAnsi(o, i2, {
959
+ hard: true,
960
+ trim: false
961
+ }).split(`
829
962
  `);
830
- h.push(x), f += x.length;
831
- }
832
- if (f > $2) {
833
- let b = 0, x = 0, G2 = f;
834
- const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
835
- m ? ({ lineCount: G2, removals: b } = R2(0, M2), G2 > $2 && ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length))) : ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length), G2 > $2 && ({ lineCount: G2, removals: b } = R2(0, M2))), b > 0 && (m = true, h.splice(0, b)), x > 0 && (g = true, h.splice(h.length - x, x));
836
- }
837
- const C2 = [];
838
- m && C2.push(l);
839
- for (const b of h) for (const x of b) C2.push(x);
840
- return g && C2.push(l), C2;
841
- };
842
- ot2 = (e) => {
843
- const i = e.active ?? "Yes", s = e.inactive ?? "No";
844
- return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
845
- const r = e.withGuide ?? u.withGuide, u2 = `${V2(this.state)} `, n = r ? `${t("gray", d2)} ` : "", o = R(e.output, e.message, n, u2), c2 = `${r ? `${t("gray", d2)}
846
- ` : ""}${o}
847
- `, a = this.value ? i : s;
848
- switch (this.state) {
849
- case "submit": {
850
- const l = r ? `${t("gray", d2)} ` : "";
851
- return `${c2}${l}${t("dim", a)}`;
852
- }
853
- case "cancel": {
854
- const l = r ? `${t("gray", d2)} ` : "";
855
- return `${c2}${l}${t(["strikethrough", "dim"], a)}${r ? `
856
- ${t("gray", d2)}` : ""}`;
857
- }
858
- default: {
859
- const l = r ? `${t("cyan", d2)} ` : "", $2 = r ? t("cyan", E2) : "";
860
- return `${c2}${l}${this.value ? `${t("green", z2)} ${i}` : `${t("dim", H2)} ${t("dim", i)}`}${e.vertical ? r ? `
861
- ${t("cyan", d2)} ` : `
862
- ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
863
- ${$2}
963
+ s.push(h2), g += h2.length;
964
+ }
965
+ if (g > v) {
966
+ let t2 = 0, n3 = 0, o = g;
967
+ const h2 = l2 - T;
968
+ let u3 = v;
969
+ const L = () => I(s, o, 0, h2, u3), E = () => I(
970
+ s,
971
+ o,
972
+ h2 + 1,
973
+ s.length,
974
+ u3,
975
+ true
976
+ );
977
+ d ? ({ lineCount: o, removals: t2 } = L(), o > u3 && (c2 || (u3 -= 1), { lineCount: o, removals: n3 } = E())) : (c2 || (u3 -= 1), { lineCount: o, removals: n3 } = E(), o > u3 && (u3 -= 1, { lineCount: o, removals: t2 } = L())), t2 > 0 && (d = true, s.splice(0, t2)), n3 > 0 && (c2 = true, s.splice(s.length - n3, n3));
978
+ }
979
+ const x = [];
980
+ d && x.push(M);
981
+ for (const t2 of s)
982
+ for (const n3 of t2)
983
+ x.push(n3);
984
+ return c2 && x.push(M), x;
985
+ };
986
+ confirm = (e) => {
987
+ const a2 = e.active ?? "Yes", o = e.inactive ?? "No";
988
+ return new r({
989
+ active: a2,
990
+ inactive: o,
991
+ signal: e.signal,
992
+ input: e.input,
993
+ output: e.output,
994
+ initialValue: e.initialValue ?? true,
995
+ render() {
996
+ const i2 = e.withGuide ?? settings.withGuide, u3 = `${symbol(this.state)} `, l2 = i2 ? `${styleText2("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(
997
+ e.output,
998
+ e.message,
999
+ l2,
1000
+ u3
1001
+ ), s = `${i2 ? `${styleText2("gray", S_BAR)}
1002
+ ` : ""}${f}
1003
+ `, c2 = this.value ? a2 : o;
1004
+ switch (this.state) {
1005
+ case "submit": {
1006
+ const r2 = i2 ? `${styleText2("gray", S_BAR)} ` : "";
1007
+ return `${s}${r2}${styleText2("dim", c2)}`;
1008
+ }
1009
+ case "cancel": {
1010
+ const r2 = i2 ? `${styleText2("gray", S_BAR)} ` : "";
1011
+ return `${s}${r2}${styleText2(["strikethrough", "dim"], c2)}${i2 ? `
1012
+ ${styleText2("gray", S_BAR)}` : ""}`;
1013
+ }
1014
+ default: {
1015
+ const r2 = i2 ? `${styleText2("cyan", S_BAR)} ` : "", g = i2 ? styleText2("cyan", S_BAR_END) : "";
1016
+ return `${s}${r2}${this.value ? `${styleText2("green", S_RADIO_ACTIVE)} ${a2}` : `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", a2)}`}${e.vertical ? i2 ? `
1017
+ ${styleText2("cyan", S_BAR)} ` : `
1018
+ ` : ` ${styleText2("dim", "/")} `}${this.value ? `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", o)}` : `${styleText2("green", S_RADIO_ACTIVE)} ${o}`}
1019
+ ${g}
864
1020
  `;
1021
+ }
865
1022
  }
866
1023
  }
867
- } }).prompt();
1024
+ }).prompt();
868
1025
  };
869
- O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
870
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
871
- for (let p2 = 0; p2 < u2; p2++) o.push(a);
872
- const y2 = Array.isArray(e) ? e : e.split(`
1026
+ MULTISELECT_INSTRUCTIONS = [
1027
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
1028
+ `${styleText2("dim", "Space:")} select`,
1029
+ `${styleText2("dim", "Enter:")} confirm`
1030
+ ];
1031
+ log = {
1032
+ message: (s = [], {
1033
+ symbol: e = styleText2("gray", S_BAR),
1034
+ secondarySymbol: r2 = styleText2("gray", S_BAR),
1035
+ output: m = process.stdout,
1036
+ spacing: l2 = 1,
1037
+ withGuide: c2
1038
+ } = {}) => {
1039
+ const t2 = [], o = c2 ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
1040
+ for (let i2 = 0; i2 < l2; i2++)
1041
+ t2.push(f);
1042
+ const g = Array.isArray(s) ? s : s.split(`
873
1043
  `);
874
- if (y2.length > 0) {
875
- const [p2, ...m] = y2;
876
- p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
877
- for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
878
- }
879
- r.write(`${o.join(`
1044
+ if (g.length > 0) {
1045
+ const [i2, ...y2] = g;
1046
+ i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
1047
+ for (const p of y2)
1048
+ p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
1049
+ }
1050
+ m.write(`${t2.join(`
880
1051
  `)}
881
1052
  `);
882
- }, info: (e, i) => {
883
- O2.message(e, { ...i, symbol: t("blue", he) });
884
- }, success: (e, i) => {
885
- O2.message(e, { ...i, symbol: t("green", pe) });
886
- }, step: (e, i) => {
887
- O2.message(e, { ...i, symbol: t("green", F) });
888
- }, warn: (e, i) => {
889
- O2.message(e, { ...i, symbol: t("yellow", me) });
890
- }, warning: (e, i) => {
891
- O2.warn(e, i);
892
- }, error: (e, i) => {
893
- O2.message(e, { ...i, symbol: t("red", ge) });
894
- } };
895
- pt = (e = "", i) => {
896
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", E2)} ` : "";
897
- s.write(`${r}${t("red", e)}
1053
+ },
1054
+ info: (s, e) => {
1055
+ log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
1056
+ },
1057
+ success: (s, e) => {
1058
+ log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
1059
+ },
1060
+ step: (s, e) => {
1061
+ log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
1062
+ },
1063
+ warn: (s, e) => {
1064
+ log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
1065
+ },
1066
+ /** alias for `log.warn()`. */
1067
+ warning: (s, e) => {
1068
+ log.warn(s, e);
1069
+ },
1070
+ error: (s, e) => {
1071
+ log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
1072
+ }
1073
+ };
1074
+ cancel = (o = "", t2) => {
1075
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_END)} ` : "";
1076
+ i2.write(`${e}${styleText2("red", o)}
898
1077
 
899
1078
  `);
900
1079
  };
901
- mt = (e = "", i) => {
902
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
903
- s.write(`${r}${e}
1080
+ intro = (o = "", t2) => {
1081
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_START)} ` : "";
1082
+ i2.write(`${e}${o}
904
1083
  `);
905
1084
  };
906
- gt = (e = "", i) => {
907
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d2)}
908
- ${t("gray", E2)} ` : "";
909
- s.write(`${r}${e}
1085
+ outro = (o = "", t2) => {
1086
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR)}
1087
+ ${styleText2("gray", S_BAR_END)} ` : "";
1088
+ i2.write(`${e}${o}
910
1089
 
911
1090
  `);
912
1091
  };
913
- ft = (e) => t("dim", e);
914
- vt = (e, i, s) => {
915
- const r = { hard: true, trim: false }, u2 = wrapAnsi(e, i, r).split(`
916
- `), n = u2.reduce((a, l) => Math.max(dist_default2(l), a), 0), o = u2.map(s).reduce((a, l) => Math.max(dist_default2(l), a), 0), c2 = i - (o - n);
917
- return wrapAnsi(e, c2, r);
918
- };
919
- wt = (e = "", i = "", s) => {
920
- const r = s?.output ?? P2.stdout, u2 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = ["", ...vt(e, O(r) - 6, n).split(`
921
- `).map(n), ""], c2 = dist_default2(i), a = Math.max(o.reduce((p2, m) => {
922
- const g = dist_default2(m);
923
- return g > p2 ? g : p2;
924
- }, 0), c2) + 2, l = o.map((p2) => `${t("gray", d2)} ${p2}${" ".repeat(a - dist_default2(p2))}${t("gray", d2)}`).join(`
925
- `), $2 = u2 ? `${t("gray", d2)}
926
- ` : "", y2 = u2 ? Ge : de;
927
- r.write(`${$2}${t("green", F)} ${t("reset", i)} ${t("gray", se.repeat(Math.max(a - c2 - 1, 1)) + ce)}
928
- ${l}
929
- ${t("gray", y2 + se.repeat(a + 2) + $e)}
930
- `);
1092
+ W$1 = (o) => o;
1093
+ C = (o, e, s) => {
1094
+ const a2 = {
1095
+ hard: true,
1096
+ trim: false
1097
+ }, i2 = wrapAnsi(o, e, a2).split(`
1098
+ `), c2 = i2.reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), u3 = i2.map(s).reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), g = e - (u3 - c2);
1099
+ return wrapAnsi(o, g, a2);
1100
+ };
1101
+ note = (o = "", e = "", s) => {
1102
+ const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c2 = s?.format ?? W$1, g = ["", ...C(o, getColumns(a2) - 6, c2).split(`
1103
+ `).map(c2), ""], n3 = dist_default2(e), t2 = Math.max(
1104
+ g.reduce((m, F) => {
1105
+ const O = dist_default2(F);
1106
+ return O > m ? O : m;
1107
+ }, 0),
1108
+ n3
1109
+ ) + 2, h2 = g.map(
1110
+ (m) => `${styleText2("gray", S_BAR)} ${m}${" ".repeat(t2 - dist_default2(m))}${styleText2("gray", S_BAR)}`
1111
+ ).join(`
1112
+ `), T = i2 ? `${styleText2("gray", S_BAR)}
1113
+ ` : "", l$1 = i2 ? S_CONNECT_LEFT : S_CORNER_BOTTOM_LEFT;
1114
+ a2.write(
1115
+ `${T}${styleText2("green", S_STEP_SUBMIT)} ${styleText2("reset", e)} ${styleText2(
1116
+ "gray",
1117
+ S_BAR_H.repeat(Math.max(t2 - n3 - 1, 1)) + S_CORNER_TOP_RIGHT
1118
+ )}
1119
+ ${h2}
1120
+ ${styleText2("gray", l$1 + S_BAR_H.repeat(t2 + 2) + S_CORNER_BOTTOM_RIGHT)}
1121
+ `
1122
+ );
931
1123
  };
932
- Ct = (e) => t("magenta", e);
933
- fe = ({ indicator: e = "dots", onCancel: i, output: s = process.stdout, cancelMessage: r, errorMessage: u2, frames: n = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: o = ee ? 80 : 120, signal: c2, ...a } = {}) => {
934
- const l = ae();
935
- let $2, y2, p2 = false, m = false, g = "", S2, h = performance.now();
936
- const f = O(s), v = a?.styleFrame ?? Ct, T = (_2) => {
937
- const A2 = _2 > 1 ? u2 ?? u.messages.error : r ?? u.messages.cancel;
938
- m = _2 === 1, p2 && (W(A2, _2), m && typeof i == "function" && i());
939
- }, C2 = () => T(2), b = () => T(1), x = () => {
940
- process.on("uncaughtExceptionMonitor", C2), process.on("unhandledRejection", C2), process.on("SIGINT", b), process.on("SIGTERM", b), process.on("exit", T), c2 && c2.addEventListener("abort", b);
941
- }, G2 = () => {
942
- process.removeListener("uncaughtExceptionMonitor", C2), process.removeListener("unhandledRejection", C2), process.removeListener("SIGINT", b), process.removeListener("SIGTERM", b), process.removeListener("exit", T), c2 && c2.removeEventListener("abort", b);
943
- }, M2 = () => {
944
- if (S2 === void 0) return;
945
- l && s.write(`
1124
+ W = (l2) => styleText2("magenta", l2);
1125
+ spinner = ({
1126
+ indicator: l2 = "dots",
1127
+ onCancel: h2,
1128
+ output: n3 = process.stdout,
1129
+ cancelMessage: G,
1130
+ errorMessage: O,
1131
+ frames: E = unicode ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"],
1132
+ delay: F = unicode ? 80 : 120,
1133
+ signal: m,
1134
+ ...I2
1135
+ } = {}) => {
1136
+ const u3 = isCI();
1137
+ let M, T, d = false, S = false, s = "", p, w = performance.now();
1138
+ const x = getColumns(n3), k = I2?.styleFrame ?? W, g = (e) => {
1139
+ const r2 = e > 1 ? O ?? settings.messages.error : G ?? settings.messages.cancel;
1140
+ S = e === 1, d && (a2(r2, e), S && typeof h2 == "function" && h2());
1141
+ }, f = () => g(2), i2 = () => g(1), A = () => {
1142
+ process.on("uncaughtExceptionMonitor", f), process.on("unhandledRejection", f), process.on("SIGINT", i2), process.on("SIGTERM", i2), process.on("exit", g), m && m.addEventListener("abort", i2);
1143
+ }, H = () => {
1144
+ process.removeListener("uncaughtExceptionMonitor", f), process.removeListener("unhandledRejection", f), process.removeListener("SIGINT", i2), process.removeListener("SIGTERM", i2), process.removeListener("exit", g), m && m.removeEventListener("abort", i2);
1145
+ }, y2 = () => {
1146
+ if (p === void 0) return;
1147
+ u3 && n3.write(`
946
1148
  `);
947
- const _2 = wrapAnsi(S2, f, { hard: true, trim: false }).split(`
1149
+ const r2 = wrapAnsi(p, x, {
1150
+ hard: true,
1151
+ trim: false
1152
+ }).split(`
948
1153
  `);
949
- _2.length > 1 && s.write(import_sisteransi2.cursor.up(_2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
950
- }, R2 = (_2) => _2.replace(/\.+$/, ""), j2 = (_2) => {
951
- const A2 = (performance.now() - _2) / 1e3, k = Math.floor(A2 / 60), L = Math.floor(A2 % 60);
952
- return k > 0 ? `[${k}m ${L}s]` : `[${L}s]`;
953
- }, D2 = a.withGuide ?? u.withGuide, ie = (_2 = "") => {
954
- p2 = true, $2 = z({ output: s }), g = R2(_2), h = performance.now(), D2 && s.write(`${t("gray", d2)}
1154
+ r2.length > 1 && n3.write(import_sisteransi2.cursor.up(r2.length - 1)), n3.write(import_sisteransi2.cursor.to(0)), n3.write(import_sisteransi2.erase.down());
1155
+ }, C2 = (e) => e.replace(/\.+$/, ""), _ = (e) => {
1156
+ const r2 = (performance.now() - e) / 1e3, t2 = Math.floor(r2 / 60), o = Math.floor(r2 % 60);
1157
+ return t2 > 0 ? `[${t2}m ${o}s]` : `[${o}s]`;
1158
+ }, N = I2.withGuide ?? settings.withGuide, P = (e = "") => {
1159
+ d = true, M = block({ output: n3 }), s = C2(e), w = performance.now(), N && n3.write(`${styleText2("gray", S_BAR)}
955
1160
  `);
956
- let A2 = 0, k = 0;
957
- x(), y2 = setInterval(() => {
958
- if (l && g === S2) return;
959
- M2(), S2 = g;
960
- const L = v(n[A2]);
961
- let Z;
962
- if (l) Z = `${L} ${g}...`;
963
- else if (e === "timer") Z = `${L} ${g} ${j2(h)}`;
1161
+ let r2 = 0, t2 = 0;
1162
+ A(), T = setInterval(() => {
1163
+ if (u3 && s === p)
1164
+ return;
1165
+ y2(), p = s;
1166
+ const o = k(E[r2]);
1167
+ let v;
1168
+ if (u3)
1169
+ v = `${o} ${s}...`;
1170
+ else if (l2 === "timer")
1171
+ v = `${o} ${s} ${_(w)}`;
964
1172
  else {
965
- const Be = ".".repeat(Math.floor(k)).slice(0, 3);
966
- Z = `${L} ${g}${Be}`;
967
- }
968
- const Ne = wrapAnsi(Z, f, { hard: true, trim: false });
969
- s.write(Ne), A2 = A2 + 1 < n.length ? A2 + 1 : 0, k = k < 4 ? k + 0.125 : 0;
970
- }, o);
971
- }, W = (_2 = "", A2 = 0, k = false) => {
972
- if (!p2) return;
973
- p2 = false, clearInterval(y2), M2();
974
- const L = A2 === 0 ? t("green", F) : A2 === 1 ? t("red", oe) : t("red", ue);
975
- g = _2 ?? g, k || (e === "timer" ? s.write(`${L} ${g} ${j2(h)}
976
- `) : s.write(`${L} ${g}
977
- `)), G2(), $2();
1173
+ const B = ".".repeat(Math.floor(t2)).slice(0, 3);
1174
+ v = `${o} ${s}${B}`;
1175
+ }
1176
+ const j = wrapAnsi(v, x, {
1177
+ hard: true,
1178
+ trim: false
1179
+ });
1180
+ n3.write(j), r2 = r2 + 1 < E.length ? r2 + 1 : 0, t2 = t2 < 4 ? t2 + 0.125 : 0;
1181
+ }, F);
1182
+ }, a2 = (e = "", r2 = 0, t2 = false) => {
1183
+ if (!d) return;
1184
+ d = false, clearInterval(T), y2();
1185
+ const o = r2 === 0 ? styleText2("green", S_STEP_SUBMIT) : r2 === 1 ? styleText2("red", S_STEP_CANCEL) : styleText2("red", S_STEP_ERROR);
1186
+ s = e ?? s, t2 || (l2 === "timer" ? n3.write(`${o} ${s} ${_(w)}
1187
+ `) : n3.write(`${o} ${s}
1188
+ `)), H(), M();
978
1189
  };
979
- return { start: ie, stop: (_2 = "") => W(_2, 0), message: (_2 = "") => {
980
- g = R2(_2 ?? g);
981
- }, cancel: (_2 = "") => W(_2, 1), error: (_2 = "") => W(_2, 2), clear: () => W("", 0, true), get isCancelled() {
982
- return m;
983
- } };
984
- };
985
- Ve = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
986
- re = (e, i) => e.includes(`
987
- `) ? e.split(`
988
- `).map((s) => i(s)).join(`
989
- `) : i(e);
990
- _t = (e) => {
991
- const i = (s, r) => {
992
- const u2 = s.label ?? String(s.value);
993
- switch (r) {
1190
+ return {
1191
+ start: P,
1192
+ stop: (e = "") => a2(e, 0),
1193
+ message: (e = "") => {
1194
+ s = C2(e ?? s);
1195
+ },
1196
+ cancel: (e = "") => a2(e, 1),
1197
+ error: (e = "") => a2(e, 2),
1198
+ clear: () => a2("", 0, true),
1199
+ get isCancelled() {
1200
+ return S;
1201
+ }
1202
+ };
1203
+ };
1204
+ u2 = {
1205
+ light: unicodeOr("\u2500", "-"),
1206
+ heavy: unicodeOr("\u2501", "="),
1207
+ block: unicodeOr("\u2588", "#")
1208
+ };
1209
+ SELECT_INSTRUCTIONS = [
1210
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
1211
+ `${styleText2("dim", "Enter:")} confirm`
1212
+ ];
1213
+ c = (t2, o) => t2.includes(`
1214
+ `) ? t2.split(`
1215
+ `).map((d) => o(d)).join(`
1216
+ `) : o(t2);
1217
+ select = (t2) => {
1218
+ const o = (n3, m) => {
1219
+ if (n3 === void 0)
1220
+ return "";
1221
+ const s = n3.label ?? String(n3.value);
1222
+ switch (m) {
994
1223
  case "disabled":
995
- return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1224
+ return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("gray", i2))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
996
1225
  case "selected":
997
- return `${re(u2, (n) => t("dim", n))}`;
1226
+ return `${c(s, (i2) => styleText2("dim", i2))}`;
998
1227
  case "active":
999
- return `${t("green", z2)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
1228
+ return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${n3.hint ? ` ${styleText2("dim", `(${n3.hint})`)}` : ""}`;
1000
1229
  case "cancelled":
1001
- return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
1230
+ return `${c(s, (i2) => styleText2(["strikethrough", "dim"], i2))}`;
1002
1231
  default:
1003
- return `${t("dim", H2)} ${re(u2, (n) => t("dim", n))}`;
1004
- }
1005
- };
1006
- return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
1007
- const s = e.withGuide ?? u.withGuide, r = `${V2(this.state)} `, u2 = `${ye(this.state)} `, n = R(e.output, e.message, u2, r), o = `${s ? `${t("gray", d2)}
1008
- ` : ""}${n}
1232
+ return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("dim", i2))}`;
1233
+ }
1234
+ }, d = t2.showInstructions ?? true;
1235
+ return new n$1({
1236
+ options: t2.options,
1237
+ signal: t2.signal,
1238
+ input: t2.input,
1239
+ output: t2.output,
1240
+ initialValue: t2.initialValue,
1241
+ render() {
1242
+ const n3 = t2.withGuide ?? settings.withGuide, m = `${symbol(this.state)} `, s = `${symbolBar(this.state)} `, i2 = wrapTextWithPrefix(
1243
+ t2.output,
1244
+ t2.message,
1245
+ s,
1246
+ m
1247
+ ), u3 = `${n3 ? `${styleText2("gray", S_BAR)}
1248
+ ` : ""}${i2}
1009
1249
  `;
1010
- switch (this.state) {
1011
- case "submit": {
1012
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
1013
- return `${o}${a}`;
1014
- }
1015
- case "cancel": {
1016
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
1017
- return `${o}${a}${s ? `
1018
- ${t("gray", d2)}` : ""}`;
1019
- }
1020
- default: {
1021
- const c2 = s ? `${t("cyan", d2)} ` : "", a = s ? t("cyan", E2) : "", l = o.split(`
1022
- `).length, $2 = s ? 2 : 1;
1023
- return `${o}${c2}${Y2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: c2.length, rowPadding: l + $2, style: (y2, p2) => i(y2, y2.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
1024
- ${c2}`)}
1025
- ${a}
1250
+ switch (this.state) {
1251
+ case "submit": {
1252
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1253
+ t2.output,
1254
+ o(this.options[this.cursor], "selected"),
1255
+ r2
1256
+ );
1257
+ return `${u3}${a2}`;
1258
+ }
1259
+ case "cancel": {
1260
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1261
+ t2.output,
1262
+ o(this.options[this.cursor], "cancelled"),
1263
+ r2
1264
+ );
1265
+ return `${u3}${a2}${n3 ? `
1266
+ ${styleText2("gray", S_BAR)}` : ""}`;
1267
+ }
1268
+ default: {
1269
+ const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u3.split(`
1270
+ `).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], f = p.join(`
1271
+ `), b = p.length + 1;
1272
+ return `${u3}${r2}${limitOptions({
1273
+ output: t2.output,
1274
+ cursor: this.cursor,
1275
+ options: this.options,
1276
+ maxItems: t2.maxItems,
1277
+ columnPadding: r2.length,
1278
+ rowPadding: a2 + b,
1279
+ style: (g, x) => o(g, g.disabled ? "disabled" : x ? "active" : "inactive")
1280
+ }).join(`
1281
+ ${r2}`)}
1282
+ ${f}
1026
1283
  `;
1284
+ }
1027
1285
  }
1028
1286
  }
1029
- } }).prompt();
1287
+ }).prompt();
1030
1288
  };
1031
- je = `${t("gray", d2)} `;
1289
+ i = `${styleText2("gray", S_BAR)} `;
1032
1290
  }
1033
1291
  });
1034
1292
 
@@ -1041,9 +1299,9 @@ function supportsColor() {
1041
1299
  }
1042
1300
  return process.stdout.isTTY === true;
1043
1301
  }
1044
- function colorize(text, color) {
1045
- if (!supportsColor()) return text;
1046
- return `${color}${text}${colors.reset}`;
1302
+ function colorize(text2, color) {
1303
+ if (!supportsColor()) return text2;
1304
+ return `${color}${text2}${colors.reset}`;
1047
1305
  }
1048
1306
  function stringify(value) {
1049
1307
  if (typeof value === "string") return value;
@@ -1073,7 +1331,7 @@ function stringify(value) {
1073
1331
  function formatMessage(...args) {
1074
1332
  return args.map(stringify).join(" ");
1075
1333
  }
1076
- var colors, currentLogLevel, log, error, warn, info, success;
1334
+ var colors, currentLogLevel, log2, error, warn, info, success;
1077
1335
  var init_cli_output = __esm({
1078
1336
  "packages/tooling/src/utils/cli-output.ts"() {
1079
1337
  "use strict";
@@ -1106,7 +1364,7 @@ var init_cli_output = __esm({
1106
1364
  currentLogLevel = envLevel;
1107
1365
  }
1108
1366
  }
1109
- log = {
1367
+ log2 = {
1110
1368
  /**
1111
1369
  * Logs an error message (always shows unless Quiet level)
1112
1370
  * Uses clack's log.error + explicit red color
@@ -1114,7 +1372,7 @@ var init_cli_output = __esm({
1114
1372
  error(...args) {
1115
1373
  if (currentLogLevel < 0 /* Quiet */) return;
1116
1374
  const message = formatMessage(...args);
1117
- O2.error(colorize(message, colors.brightRed));
1375
+ log.error(colorize(message, colors.brightRed));
1118
1376
  },
1119
1377
  /**
1120
1378
  * Logs a warning message (shows at Normal level and above)
@@ -1123,7 +1381,7 @@ var init_cli_output = __esm({
1123
1381
  warn(...args) {
1124
1382
  if (currentLogLevel < 1 /* Normal */) return;
1125
1383
  const message = formatMessage(...args);
1126
- O2.warn(colorize(message, colors.brightYellow));
1384
+ log.warn(colorize(message, colors.brightYellow));
1127
1385
  },
1128
1386
  /**
1129
1387
  * Logs an info message (shows at Normal level and above)
@@ -1132,7 +1390,7 @@ var init_cli_output = __esm({
1132
1390
  info(...args) {
1133
1391
  if (currentLogLevel < 1 /* Normal */) return;
1134
1392
  const message = formatMessage(...args);
1135
- O2.info(colorize(message, colors.brightCyan));
1393
+ log.info(colorize(message, colors.brightCyan));
1136
1394
  },
1137
1395
  /**
1138
1396
  * Logs a success message (shows at Normal level and above)
@@ -1141,7 +1399,7 @@ var init_cli_output = __esm({
1141
1399
  success(...args) {
1142
1400
  if (currentLogLevel < 1 /* Normal */) return;
1143
1401
  const message = formatMessage(...args);
1144
- O2.success(colorize(message, colors.brightGreen));
1402
+ log.success(colorize(message, colors.brightGreen));
1145
1403
  },
1146
1404
  /**
1147
1405
  * Logs a debug message (only shows at Verbose level and above)
@@ -1150,7 +1408,7 @@ var init_cli_output = __esm({
1150
1408
  debug(...args) {
1151
1409
  if (currentLogLevel < 2 /* Verbose */) return;
1152
1410
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1153
- O2.message(
1411
+ log.message(
1154
1412
  colorize(
1155
1413
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
1156
1414
  colors.gray
@@ -1164,7 +1422,7 @@ var init_cli_output = __esm({
1164
1422
  trace(...args) {
1165
1423
  if (currentLogLevel < 3 /* Debug */) return;
1166
1424
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1167
- O2.message(
1425
+ log.message(
1168
1426
  colorize(
1169
1427
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
1170
1428
  colors.gray
@@ -1172,10 +1430,10 @@ var init_cli_output = __esm({
1172
1430
  );
1173
1431
  }
1174
1432
  };
1175
- error = log.error.bind(log);
1176
- warn = log.warn.bind(log);
1177
- info = log.info.bind(log);
1178
- success = log.success.bind(log);
1433
+ error = log2.error.bind(log2);
1434
+ warn = log2.warn.bind(log2);
1435
+ info = log2.info.bind(log2);
1436
+ success = log2.success.bind(log2);
1179
1437
  }
1180
1438
  });
1181
1439
 
@@ -1535,9 +1793,9 @@ var require_is_glob = __commonJS({
1535
1793
  index += 2;
1536
1794
  var close = chars[open];
1537
1795
  if (close) {
1538
- var n = str.indexOf(close, index);
1539
- if (n !== -1) {
1540
- index = n + 1;
1796
+ var n3 = str.indexOf(close, index);
1797
+ if (n3 !== -1) {
1798
+ index = n3 + 1;
1541
1799
  }
1542
1800
  }
1543
1801
  if (str[index] === "!") {
@@ -1563,9 +1821,9 @@ var require_is_glob = __commonJS({
1563
1821
  index += 2;
1564
1822
  var close = chars[open];
1565
1823
  if (close) {
1566
- var n = str.indexOf(close, index);
1567
- if (n !== -1) {
1568
- index = n + 1;
1824
+ var n3 = str.indexOf(close, index);
1825
+ if (n3 !== -1) {
1826
+ index = n3 + 1;
1569
1827
  }
1570
1828
  }
1571
1829
  if (str[index] === "!") {
@@ -1643,8 +1901,8 @@ var require_utils = __commonJS({
1643
1901
  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
1644
1902
  return (Number(max) - Number(min)) / Number(step) >= limit;
1645
1903
  };
1646
- exports.escapeNode = (block, n = 0, type) => {
1647
- const node = block.nodes[n];
1904
+ exports.escapeNode = (block2, n3 = 0, type) => {
1905
+ const node = block2.nodes[n3];
1648
1906
  if (!node) return;
1649
1907
  if (type && node.type === type || node.type === "open" || node.type === "close") {
1650
1908
  if (node.escaped !== true) {
@@ -1661,15 +1919,15 @@ var require_utils = __commonJS({
1661
1919
  }
1662
1920
  return false;
1663
1921
  };
1664
- exports.isInvalidBrace = (block) => {
1665
- if (block.type !== "brace") return false;
1666
- if (block.invalid === true || block.dollar) return true;
1667
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
1668
- block.invalid = true;
1922
+ exports.isInvalidBrace = (block2) => {
1923
+ if (block2.type !== "brace") return false;
1924
+ if (block2.invalid === true || block2.dollar) return true;
1925
+ if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
1926
+ block2.invalid = true;
1669
1927
  return true;
1670
1928
  }
1671
- if (block.open !== true || block.close !== true) {
1672
- block.invalid = true;
1929
+ if (block2.open !== true || block2.close !== true) {
1930
+ block2.invalid = true;
1673
1931
  return true;
1674
1932
  }
1675
1933
  return false;
@@ -1688,8 +1946,8 @@ var require_utils = __commonJS({
1688
1946
  exports.flatten = (...args) => {
1689
1947
  const result = [];
1690
1948
  const flat = (arr) => {
1691
- for (let i = 0; i < arr.length; i++) {
1692
- const ele = arr[i];
1949
+ for (let i2 = 0; i2 < arr.length; i2++) {
1950
+ const ele = arr[i2];
1693
1951
  if (Array.isArray(ele)) {
1694
1952
  flat(ele);
1695
1953
  continue;
@@ -1783,9 +2041,9 @@ var require_to_regex_range = __commonJS({
1783
2041
  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
1784
2042
  return toRegexRange.cache[cacheKey].result;
1785
2043
  }
1786
- let a = Math.min(min, max);
2044
+ let a2 = Math.min(min, max);
1787
2045
  let b = Math.max(min, max);
1788
- if (Math.abs(a - b) === 1) {
2046
+ if (Math.abs(a2 - b) === 1) {
1789
2047
  let result = min + "|" + max;
1790
2048
  if (opts.capture) {
1791
2049
  return `(${result})`;
@@ -1796,20 +2054,20 @@ var require_to_regex_range = __commonJS({
1796
2054
  return `(?:${result})`;
1797
2055
  }
1798
2056
  let isPadded = hasPadding(min) || hasPadding(max);
1799
- let state = { min, max, a, b };
2057
+ let state = { min, max, a: a2, b };
1800
2058
  let positives = [];
1801
2059
  let negatives = [];
1802
2060
  if (isPadded) {
1803
2061
  state.isPadded = isPadded;
1804
2062
  state.maxLen = String(state.max).length;
1805
2063
  }
1806
- if (a < 0) {
2064
+ if (a2 < 0) {
1807
2065
  let newMin = b < 0 ? Math.abs(b) : 1;
1808
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1809
- a = state.a = 0;
2066
+ negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
2067
+ a2 = state.a = 0;
1810
2068
  }
1811
2069
  if (b >= 0) {
1812
- positives = splitToPatterns(a, b, state, opts);
2070
+ positives = splitToPatterns(a2, b, state, opts);
1813
2071
  }
1814
2072
  state.negatives = negatives;
1815
2073
  state.positives = positives;
@@ -1857,8 +2115,8 @@ var require_to_regex_range = __commonJS({
1857
2115
  let digits = zipped.length;
1858
2116
  let pattern = "";
1859
2117
  let count = 0;
1860
- for (let i = 0; i < digits; i++) {
1861
- let [startDigit, stopDigit] = zipped[i];
2118
+ for (let i2 = 0; i2 < digits; i2++) {
2119
+ let [startDigit, stopDigit] = zipped[i2];
1862
2120
  if (startDigit === stopDigit) {
1863
2121
  pattern += startDigit;
1864
2122
  } else if (startDigit !== "0" || stopDigit !== "9") {
@@ -1877,8 +2135,8 @@ var require_to_regex_range = __commonJS({
1877
2135
  let tokens = [];
1878
2136
  let start = min;
1879
2137
  let prev;
1880
- for (let i = 0; i < ranges.length; i++) {
1881
- let max2 = ranges[i];
2138
+ for (let i2 = 0; i2 < ranges.length; i2++) {
2139
+ let max2 = ranges[i2];
1882
2140
  let obj = rangeToPattern(String(start), String(max2), options);
1883
2141
  let zeros = "";
1884
2142
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
@@ -1913,13 +2171,13 @@ var require_to_regex_range = __commonJS({
1913
2171
  }
1914
2172
  return result;
1915
2173
  }
1916
- function zip(a, b) {
2174
+ function zip(a2, b) {
1917
2175
  let arr = [];
1918
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
2176
+ for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
1919
2177
  return arr;
1920
2178
  }
1921
- function compare(a, b) {
1922
- return a > b ? 1 : b > a ? -1 : 0;
2179
+ function compare(a2, b) {
2180
+ return a2 > b ? 1 : b > a2 ? -1 : 0;
1923
2181
  }
1924
2182
  function contains(arr, key, val) {
1925
2183
  return arr.some((ele) => ele[key] === val);
@@ -1937,8 +2195,8 @@ var require_to_regex_range = __commonJS({
1937
2195
  }
1938
2196
  return "";
1939
2197
  }
1940
- function toCharacterClass(a, b, options) {
1941
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
2198
+ function toCharacterClass(a2, b, options) {
2199
+ return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
1942
2200
  }
1943
2201
  function hasPadding(str) {
1944
2202
  return /^-?(0+)\d/.test(str);
@@ -2017,8 +2275,8 @@ var require_fill_range = __commonJS({
2017
2275
  return negative ? "-" + input : input;
2018
2276
  };
2019
2277
  var toSequence = (parts, options, maxLen) => {
2020
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2021
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2278
+ parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2279
+ parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2022
2280
  let prefix = options.capture ? "" : "?:";
2023
2281
  let positives = "";
2024
2282
  let negatives = "";
@@ -2039,12 +2297,12 @@ var require_fill_range = __commonJS({
2039
2297
  }
2040
2298
  return result;
2041
2299
  };
2042
- var toRange = (a, b, isNumbers, options) => {
2300
+ var toRange = (a2, b, isNumbers, options) => {
2043
2301
  if (isNumbers) {
2044
- return toRegexRange(a, b, { wrap: false, ...options });
2302
+ return toRegexRange(a2, b, { wrap: false, ...options });
2045
2303
  }
2046
- let start = String.fromCharCode(a);
2047
- if (a === b) return start;
2304
+ let start = String.fromCharCode(a2);
2305
+ if (a2 === b) return start;
2048
2306
  let stop = String.fromCharCode(b);
2049
2307
  return `[${start}-${stop}]`;
2050
2308
  };
@@ -2070,15 +2328,15 @@ var require_fill_range = __commonJS({
2070
2328
  return [];
2071
2329
  };
2072
2330
  var fillNumbers = (start, end, step = 1, options = {}) => {
2073
- let a = Number(start);
2331
+ let a2 = Number(start);
2074
2332
  let b = Number(end);
2075
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
2333
+ if (!Number.isInteger(a2) || !Number.isInteger(b)) {
2076
2334
  if (options.strictRanges === true) throw rangeError([start, end]);
2077
2335
  return [];
2078
2336
  }
2079
- if (a === 0) a = 0;
2337
+ if (a2 === 0) a2 = 0;
2080
2338
  if (b === 0) b = 0;
2081
- let descending = a > b;
2339
+ let descending = a2 > b;
2082
2340
  let startString = String(start);
2083
2341
  let endString = String(end);
2084
2342
  let stepString = String(step);
@@ -2094,13 +2352,13 @@ var require_fill_range = __commonJS({
2094
2352
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
2095
2353
  let range = [];
2096
2354
  let index = 0;
2097
- while (descending ? a >= b : a <= b) {
2355
+ while (descending ? a2 >= b : a2 <= b) {
2098
2356
  if (options.toRegex === true && step > 1) {
2099
- push(a);
2357
+ push(a2);
2100
2358
  } else {
2101
- range.push(pad(format(a, index), maxLen, toNumber));
2359
+ range.push(pad(format(a2, index), maxLen, toNumber));
2102
2360
  }
2103
- a = descending ? a - step : a + step;
2361
+ a2 = descending ? a2 - step : a2 + step;
2104
2362
  index++;
2105
2363
  }
2106
2364
  if (options.toRegex === true) {
@@ -2113,19 +2371,19 @@ var require_fill_range = __commonJS({
2113
2371
  return invalidRange(start, end, options);
2114
2372
  }
2115
2373
  let format = options.transform || ((val) => String.fromCharCode(val));
2116
- let a = `${start}`.charCodeAt(0);
2374
+ let a2 = `${start}`.charCodeAt(0);
2117
2375
  let b = `${end}`.charCodeAt(0);
2118
- let descending = a > b;
2119
- let min = Math.min(a, b);
2120
- let max = Math.max(a, b);
2376
+ let descending = a2 > b;
2377
+ let min = Math.min(a2, b);
2378
+ let max = Math.max(a2, b);
2121
2379
  if (options.toRegex && step === 1) {
2122
2380
  return toRange(min, max, false, options);
2123
2381
  }
2124
2382
  let range = [];
2125
2383
  let index = 0;
2126
- while (descending ? a >= b : a <= b) {
2127
- range.push(format(a, index));
2128
- a = descending ? a - step : a + step;
2384
+ while (descending ? a2 >= b : a2 <= b) {
2385
+ range.push(format(a2, index));
2386
+ a2 = descending ? a2 - step : a2 + step;
2129
2387
  index++;
2130
2388
  }
2131
2389
  if (options.toRegex === true) {
@@ -2248,18 +2506,18 @@ var require_expand = __commonJS({
2248
2506
  const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
2249
2507
  const walk = (node, parent = {}) => {
2250
2508
  node.queue = [];
2251
- let p2 = parent;
2252
- let q2 = parent.queue;
2253
- while (p2.type !== "brace" && p2.type !== "root" && p2.parent) {
2254
- p2 = p2.parent;
2255
- q2 = p2.queue;
2509
+ let p = parent;
2510
+ let q = parent.queue;
2511
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
2512
+ p = p.parent;
2513
+ q = p.queue;
2256
2514
  }
2257
2515
  if (node.invalid || node.dollar) {
2258
- q2.push(append(q2.pop(), stringify2(node, options)));
2516
+ q.push(append(q.pop(), stringify2(node, options)));
2259
2517
  return;
2260
2518
  }
2261
2519
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
2262
- q2.push(append(q2.pop(), ["{}"]));
2520
+ q.push(append(q.pop(), ["{}"]));
2263
2521
  return;
2264
2522
  }
2265
2523
  if (node.nodes && node.ranges > 0) {
@@ -2271,26 +2529,26 @@ var require_expand = __commonJS({
2271
2529
  if (range.length === 0) {
2272
2530
  range = stringify2(node, options);
2273
2531
  }
2274
- q2.push(append(q2.pop(), range));
2532
+ q.push(append(q.pop(), range));
2275
2533
  node.nodes = [];
2276
2534
  return;
2277
2535
  }
2278
2536
  const enclose = utils.encloseBrace(node);
2279
2537
  let queue = node.queue;
2280
- let block = node;
2281
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
2282
- block = block.parent;
2283
- queue = block.queue;
2538
+ let block2 = node;
2539
+ while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
2540
+ block2 = block2.parent;
2541
+ queue = block2.queue;
2284
2542
  }
2285
- for (let i = 0; i < node.nodes.length; i++) {
2286
- const child = node.nodes[i];
2543
+ for (let i2 = 0; i2 < node.nodes.length; i2++) {
2544
+ const child = node.nodes[i2];
2287
2545
  if (child.type === "comma" && node.type === "brace") {
2288
- if (i === 1) queue.push("");
2546
+ if (i2 === 1) queue.push("");
2289
2547
  queue.push("");
2290
2548
  continue;
2291
2549
  }
2292
2550
  if (child.type === "close") {
2293
- q2.push(append(q2.pop(), queue, enclose));
2551
+ q.push(append(q.pop(), queue, enclose));
2294
2552
  continue;
2295
2553
  }
2296
2554
  if (child.value && child.type !== "open") {
@@ -2457,7 +2715,7 @@ var require_parse = __commonJS({
2457
2715
  }
2458
2716
  const ast = { type: "root", input, nodes: [] };
2459
2717
  const stack = [ast];
2460
- let block = ast;
2718
+ let block2 = ast;
2461
2719
  let prev = ast;
2462
2720
  let brackets = 0;
2463
2721
  const length = input.length;
@@ -2473,15 +2731,15 @@ var require_parse = __commonJS({
2473
2731
  prev.value += node.value;
2474
2732
  return;
2475
2733
  }
2476
- block.nodes.push(node);
2477
- node.parent = block;
2734
+ block2.nodes.push(node);
2735
+ node.parent = block2;
2478
2736
  node.prev = prev;
2479
2737
  prev = node;
2480
2738
  return node;
2481
2739
  };
2482
2740
  push({ type: "bos" });
2483
2741
  while (index < length) {
2484
- block = stack[stack.length - 1];
2742
+ block2 = stack[stack.length - 1];
2485
2743
  value = advance();
2486
2744
  if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
2487
2745
  continue;
@@ -2518,19 +2776,19 @@ var require_parse = __commonJS({
2518
2776
  continue;
2519
2777
  }
2520
2778
  if (value === CHAR_LEFT_PARENTHESES) {
2521
- block = push({ type: "paren", nodes: [] });
2522
- stack.push(block);
2779
+ block2 = push({ type: "paren", nodes: [] });
2780
+ stack.push(block2);
2523
2781
  push({ type: "text", value });
2524
2782
  continue;
2525
2783
  }
2526
2784
  if (value === CHAR_RIGHT_PARENTHESES) {
2527
- if (block.type !== "paren") {
2785
+ if (block2.type !== "paren") {
2528
2786
  push({ type: "text", value });
2529
2787
  continue;
2530
2788
  }
2531
- block = stack.pop();
2789
+ block2 = stack.pop();
2532
2790
  push({ type: "text", value });
2533
- block = stack[stack.length - 1];
2791
+ block2 = stack[stack.length - 1];
2534
2792
  continue;
2535
2793
  }
2536
2794
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
@@ -2555,7 +2813,7 @@ var require_parse = __commonJS({
2555
2813
  }
2556
2814
  if (value === CHAR_LEFT_CURLY_BRACE) {
2557
2815
  depth++;
2558
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
2816
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
2559
2817
  const brace = {
2560
2818
  type: "brace",
2561
2819
  open: true,
@@ -2566,52 +2824,52 @@ var require_parse = __commonJS({
2566
2824
  ranges: 0,
2567
2825
  nodes: []
2568
2826
  };
2569
- block = push(brace);
2570
- stack.push(block);
2827
+ block2 = push(brace);
2828
+ stack.push(block2);
2571
2829
  push({ type: "open", value });
2572
2830
  continue;
2573
2831
  }
2574
2832
  if (value === CHAR_RIGHT_CURLY_BRACE) {
2575
- if (block.type !== "brace") {
2833
+ if (block2.type !== "brace") {
2576
2834
  push({ type: "text", value });
2577
2835
  continue;
2578
2836
  }
2579
2837
  const type = "close";
2580
- block = stack.pop();
2581
- block.close = true;
2838
+ block2 = stack.pop();
2839
+ block2.close = true;
2582
2840
  push({ type, value });
2583
2841
  depth--;
2584
- block = stack[stack.length - 1];
2842
+ block2 = stack[stack.length - 1];
2585
2843
  continue;
2586
2844
  }
2587
2845
  if (value === CHAR_COMMA && depth > 0) {
2588
- if (block.ranges > 0) {
2589
- block.ranges = 0;
2590
- const open = block.nodes.shift();
2591
- block.nodes = [open, { type: "text", value: stringify2(block) }];
2846
+ if (block2.ranges > 0) {
2847
+ block2.ranges = 0;
2848
+ const open = block2.nodes.shift();
2849
+ block2.nodes = [open, { type: "text", value: stringify2(block2) }];
2592
2850
  }
2593
2851
  push({ type: "comma", value });
2594
- block.commas++;
2852
+ block2.commas++;
2595
2853
  continue;
2596
2854
  }
2597
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
2598
- const siblings = block.nodes;
2855
+ if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
2856
+ const siblings = block2.nodes;
2599
2857
  if (depth === 0 || siblings.length === 0) {
2600
2858
  push({ type: "text", value });
2601
2859
  continue;
2602
2860
  }
2603
2861
  if (prev.type === "dot") {
2604
- block.range = [];
2862
+ block2.range = [];
2605
2863
  prev.value += value;
2606
2864
  prev.type = "range";
2607
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
2608
- block.invalid = true;
2609
- block.ranges = 0;
2865
+ if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
2866
+ block2.invalid = true;
2867
+ block2.ranges = 0;
2610
2868
  prev.type = "text";
2611
2869
  continue;
2612
2870
  }
2613
- block.ranges++;
2614
- block.args = [];
2871
+ block2.ranges++;
2872
+ block2.args = [];
2615
2873
  continue;
2616
2874
  }
2617
2875
  if (prev.type === "range") {
@@ -2619,7 +2877,7 @@ var require_parse = __commonJS({
2619
2877
  const before = siblings[siblings.length - 1];
2620
2878
  before.value += prev.value + value;
2621
2879
  prev = before;
2622
- block.ranges--;
2880
+ block2.ranges--;
2623
2881
  continue;
2624
2882
  }
2625
2883
  push({ type: "dot", value });
@@ -2628,9 +2886,9 @@ var require_parse = __commonJS({
2628
2886
  push({ type: "text", value });
2629
2887
  }
2630
2888
  do {
2631
- block = stack.pop();
2632
- if (block.type !== "root") {
2633
- block.nodes.forEach((node) => {
2889
+ block2 = stack.pop();
2890
+ if (block2.type !== "root") {
2891
+ block2.nodes.forEach((node) => {
2634
2892
  if (!node.nodes) {
2635
2893
  if (node.type === "open") node.isOpen = true;
2636
2894
  if (node.type === "close") node.isClose = true;
@@ -2639,8 +2897,8 @@ var require_parse = __commonJS({
2639
2897
  }
2640
2898
  });
2641
2899
  const parent = stack[stack.length - 1];
2642
- const index2 = parent.nodes.indexOf(block);
2643
- parent.nodes.splice(index2, 1, ...block.nodes);
2900
+ const index2 = parent.nodes.indexOf(block2);
2901
+ parent.nodes.splice(index2, 1, ...block2.nodes);
2644
2902
  }
2645
2903
  } while (stack.length > 0);
2646
2904
  push({ type: "eos" });
@@ -3273,9 +3531,9 @@ var require_scan = __commonJS({
3273
3531
  if (opts.parts === true || opts.tokens === true) {
3274
3532
  let prevIndex;
3275
3533
  for (let idx = 0; idx < slashes.length; idx++) {
3276
- const n = prevIndex ? prevIndex + 1 : start;
3277
- const i = slashes[idx];
3278
- const value = input.slice(n, i);
3534
+ const n3 = prevIndex ? prevIndex + 1 : start;
3535
+ const i2 = slashes[idx];
3536
+ const value = input.slice(n3, i2);
3279
3537
  if (opts.tokens) {
3280
3538
  if (idx === 0 && start !== 0) {
3281
3539
  tokens[idx].isPrefix = true;
@@ -3289,7 +3547,7 @@ var require_scan = __commonJS({
3289
3547
  if (idx !== 0 || value !== "") {
3290
3548
  parts.push(value);
3291
3549
  }
3292
- prevIndex = i;
3550
+ prevIndex = i2;
3293
3551
  }
3294
3552
  if (prevIndex && prevIndex + 1 < input.length) {
3295
3553
  const value = input.slice(prevIndex + 1);
@@ -3418,15 +3676,15 @@ var require_parse2 = __commonJS({
3418
3676
  };
3419
3677
  var hasRepeatedCharPrefixOverlap = (branches) => {
3420
3678
  const values = branches.map(normalizeSimpleBranch).filter(Boolean);
3421
- for (let i = 0; i < values.length; i++) {
3422
- for (let j2 = i + 1; j2 < values.length; j2++) {
3423
- const a = values[i];
3424
- const b = values[j2];
3425
- const char = a[0];
3426
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
3679
+ for (let i2 = 0; i2 < values.length; i2++) {
3680
+ for (let j = i2 + 1; j < values.length; j++) {
3681
+ const a2 = values[i2];
3682
+ const b = values[j];
3683
+ const char = a2[0];
3684
+ if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
3427
3685
  continue;
3428
3686
  }
3429
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
3687
+ if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
3430
3688
  return true;
3431
3689
  }
3432
3690
  }
@@ -3441,8 +3699,8 @@ var require_parse2 = __commonJS({
3441
3699
  let paren = 0;
3442
3700
  let quote = 0;
3443
3701
  let escaped = false;
3444
- for (let i = 1; i < pattern.length; i++) {
3445
- const ch = pattern[i];
3702
+ for (let i2 = 1; i2 < pattern.length; i2++) {
3703
+ const ch = pattern[i2];
3446
3704
  if (escaped === true) {
3447
3705
  escaped = false;
3448
3706
  continue;
@@ -3476,13 +3734,13 @@ var require_parse2 = __commonJS({
3476
3734
  if (ch === ")") {
3477
3735
  paren--;
3478
3736
  if (paren === 0) {
3479
- if (requireEnd === true && i !== pattern.length - 1) {
3737
+ if (requireEnd === true && i2 !== pattern.length - 1) {
3480
3738
  return;
3481
3739
  }
3482
3740
  return {
3483
3741
  type: pattern[0],
3484
- body: pattern.slice(2, i),
3485
- end: i
3742
+ body: pattern.slice(2, i2),
3743
+ end: i2
3486
3744
  };
3487
3745
  }
3488
3746
  }
@@ -3614,7 +3872,7 @@ var require_parse2 = __commonJS({
3614
3872
  let prev = bos;
3615
3873
  let value;
3616
3874
  const eos = () => state.index === len - 1;
3617
- const peek = state.peek = (n = 1) => input[state.index + n];
3875
+ const peek = state.peek = (n3 = 1) => input[state.index + n3];
3618
3876
  const advance = state.advance = () => input[++state.index] || "";
3619
3877
  const remaining = () => input.slice(state.index + 1);
3620
3878
  const consume = (value2 = "", num = 0) => {
@@ -3695,10 +3953,10 @@ var require_parse2 = __commonJS({
3695
3953
  open.type = "text";
3696
3954
  open.value = literal;
3697
3955
  open.output = safeOutput || utils.escapeRegex(literal);
3698
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
3699
- tokens[i].value = "";
3700
- tokens[i].output = "";
3701
- delete tokens[i].suffix;
3956
+ for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
3957
+ tokens[i2].value = "";
3958
+ tokens[i2].output = "";
3959
+ delete tokens[i2].suffix;
3702
3960
  }
3703
3961
  state.output = token.output + open.output;
3704
3962
  state.backtrack = true;
@@ -3941,13 +4199,13 @@ var require_parse2 = __commonJS({
3941
4199
  if (brace.dots === true) {
3942
4200
  const arr = tokens.slice();
3943
4201
  const range = [];
3944
- for (let i = arr.length - 1; i >= 0; i--) {
4202
+ for (let i2 = arr.length - 1; i2 >= 0; i2--) {
3945
4203
  tokens.pop();
3946
- if (arr[i].type === "brace") {
4204
+ if (arr[i2].type === "brace") {
3947
4205
  break;
3948
4206
  }
3949
- if (arr[i].type !== "dots") {
3950
- range.unshift(arr[i].value);
4207
+ if (arr[i2].type !== "dots") {
4208
+ range.unshift(arr[i2].value);
3951
4209
  }
3952
4210
  }
3953
4211
  output = expandRange(range, opts);
@@ -4406,7 +4664,7 @@ var require_picomatch = __commonJS({
4406
4664
  };
4407
4665
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
4408
4666
  picomatch.parse = (pattern, options) => {
4409
- if (Array.isArray(pattern)) return pattern.map((p2) => picomatch.parse(p2, options));
4667
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
4410
4668
  return parse2(pattern, { ...options, fastpaths: false });
4411
4669
  };
4412
4670
  picomatch.scan = (input, options) => scan(input, options);
@@ -4490,8 +4748,8 @@ var require_micromatch = __commonJS({
4490
4748
  options.onResult(state);
4491
4749
  }
4492
4750
  };
4493
- for (let i = 0; i < patterns.length; i++) {
4494
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
4751
+ for (let i2 = 0; i2 < patterns.length; i2++) {
4752
+ let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
4495
4753
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
4496
4754
  if (negated) negatives++;
4497
4755
  for (let item of list) {
@@ -4513,7 +4771,7 @@ var require_micromatch = __commonJS({
4513
4771
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
4514
4772
  }
4515
4773
  if (options.nonull === true || options.nullglob === true) {
4516
- return options.unescape ? patterns.map((p2) => p2.replace(/\\/g, "")) : patterns;
4774
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
4517
4775
  }
4518
4776
  }
4519
4777
  return matches;
@@ -4543,7 +4801,7 @@ var require_micromatch = __commonJS({
4543
4801
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4544
4802
  }
4545
4803
  if (Array.isArray(pattern)) {
4546
- return pattern.some((p2) => micromatch.contains(str, p2, options));
4804
+ return pattern.some((p) => micromatch.contains(str, p, options));
4547
4805
  }
4548
4806
  if (typeof pattern === "string") {
4549
4807
  if (isEmptyString(str) || isEmptyString(pattern)) {
@@ -4588,7 +4846,7 @@ var require_micromatch = __commonJS({
4588
4846
  if (typeof str !== "string") {
4589
4847
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4590
4848
  }
4591
- return [].concat(patterns).every((p2) => picomatch(p2, options)(str));
4849
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
4592
4850
  };
4593
4851
  micromatch.capture = (glob, input, options) => {
4594
4852
  let posix = utils.isWindows(options);
@@ -4739,7 +4997,7 @@ var require_pattern = __commonJS({
4739
4997
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
4740
4998
  function expandBraceExpansion(pattern) {
4741
4999
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
4742
- patterns.sort((a, b) => a.length - b.length);
5000
+ patterns.sort((a2, b) => a2.length - b.length);
4743
5001
  return patterns.filter((pattern2) => pattern2 !== "");
4744
5002
  }
4745
5003
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4820,8 +5078,8 @@ var require_merge2 = __commonJS({
4820
5078
  }
4821
5079
  const mergedStream = PassThrough(options);
4822
5080
  function addStream() {
4823
- for (let i = 0, len = arguments.length; i < len; i++) {
4824
- streamsQueue.push(pauseStreams(arguments[i], options));
5081
+ for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
5082
+ streamsQueue.push(pauseStreams(arguments[i2], options));
4825
5083
  }
4826
5084
  mergeStream();
4827
5085
  return this;
@@ -4870,8 +5128,8 @@ var require_merge2 = __commonJS({
4870
5128
  stream.pipe(mergedStream, { end: false });
4871
5129
  stream.resume();
4872
5130
  }
4873
- for (let i = 0; i < streams.length; i++) {
4874
- pipe(streams[i]);
5131
+ for (let i2 = 0; i2 < streams.length; i2++) {
5132
+ pipe(streams[i2]);
4875
5133
  }
4876
5134
  next();
4877
5135
  }
@@ -4902,8 +5160,8 @@ var require_merge2 = __commonJS({
4902
5160
  }
4903
5161
  streams.pause();
4904
5162
  } else {
4905
- for (let i = 0, len = streams.length; i < len; i++) {
4906
- streams[i] = pauseStreams(streams[i], options);
5163
+ for (let i2 = 0, len = streams.length; i2 < len; i2++) {
5164
+ streams[i2] = pauseStreams(streams[i2], options);
4907
5165
  }
4908
5166
  }
4909
5167
  return streams;
@@ -4985,13 +5243,13 @@ var require_tasks = __commonJS({
4985
5243
  Object.defineProperty(exports, "__esModule", { value: true });
4986
5244
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
4987
5245
  var utils = require_utils3();
4988
- function generate(input, settings) {
4989
- const patterns = processPatterns(input, settings);
4990
- const ignore = processPatterns(settings.ignore, settings);
5246
+ function generate(input, settings2) {
5247
+ const patterns = processPatterns(input, settings2);
5248
+ const ignore = processPatterns(settings2.ignore, settings2);
4991
5249
  const positivePatterns = getPositivePatterns(patterns);
4992
5250
  const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
4993
- const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
4994
- const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
5251
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
5252
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
4995
5253
  const staticTasks = convertPatternsToTasks(
4996
5254
  staticPatterns,
4997
5255
  negativePatterns,
@@ -5007,12 +5265,12 @@ var require_tasks = __commonJS({
5007
5265
  return staticTasks.concat(dynamicTasks);
5008
5266
  }
5009
5267
  exports.generate = generate;
5010
- function processPatterns(input, settings) {
5268
+ function processPatterns(input, settings2) {
5011
5269
  let patterns = input;
5012
- if (settings.braceExpansion) {
5270
+ if (settings2.braceExpansion) {
5013
5271
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
5014
5272
  }
5015
- if (settings.baseNameMatch) {
5273
+ if (settings2.baseNameMatch) {
5016
5274
  patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
5017
5275
  }
5018
5276
  return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
@@ -5043,7 +5301,7 @@ var require_tasks = __commonJS({
5043
5301
  }
5044
5302
  exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
5045
5303
  function groupPatternsByBaseDirectory(patterns) {
5046
- const group = {};
5304
+ const group2 = {};
5047
5305
  return patterns.reduce((collection, pattern) => {
5048
5306
  const base = utils.pattern.getBaseDirectory(pattern);
5049
5307
  if (base in collection) {
@@ -5052,7 +5310,7 @@ var require_tasks = __commonJS({
5052
5310
  collection[base] = [pattern];
5053
5311
  }
5054
5312
  return collection;
5055
- }, group);
5313
+ }, group2);
5056
5314
  }
5057
5315
  exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
5058
5316
  function convertPatternGroupsToTasks(positive, negative, dynamic) {
@@ -5081,26 +5339,26 @@ var require_async = __commonJS({
5081
5339
  init_utils2();
5082
5340
  Object.defineProperty(exports, "__esModule", { value: true });
5083
5341
  exports.read = void 0;
5084
- function read(path, settings, callback) {
5085
- settings.fs.lstat(path, (lstatError, lstat) => {
5342
+ function read(path, settings2, callback) {
5343
+ settings2.fs.lstat(path, (lstatError, lstat) => {
5086
5344
  if (lstatError !== null) {
5087
5345
  callFailureCallback(callback, lstatError);
5088
5346
  return;
5089
5347
  }
5090
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5348
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5091
5349
  callSuccessCallback(callback, lstat);
5092
5350
  return;
5093
5351
  }
5094
- settings.fs.stat(path, (statError, stat) => {
5352
+ settings2.fs.stat(path, (statError, stat) => {
5095
5353
  if (statError !== null) {
5096
- if (settings.throwErrorOnBrokenSymbolicLink) {
5354
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5097
5355
  callFailureCallback(callback, statError);
5098
5356
  return;
5099
5357
  }
5100
5358
  callSuccessCallback(callback, lstat);
5101
5359
  return;
5102
5360
  }
5103
- if (settings.markSymbolicLink) {
5361
+ if (settings2.markSymbolicLink) {
5104
5362
  stat.isSymbolicLink = () => true;
5105
5363
  }
5106
5364
  callSuccessCallback(callback, stat);
@@ -5124,19 +5382,19 @@ var require_sync = __commonJS({
5124
5382
  init_utils2();
5125
5383
  Object.defineProperty(exports, "__esModule", { value: true });
5126
5384
  exports.read = void 0;
5127
- function read(path, settings) {
5128
- const lstat = settings.fs.lstatSync(path);
5129
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5385
+ function read(path, settings2) {
5386
+ const lstat = settings2.fs.lstatSync(path);
5387
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5130
5388
  return lstat;
5131
5389
  }
5132
5390
  try {
5133
- const stat = settings.fs.statSync(path);
5134
- if (settings.markSymbolicLink) {
5391
+ const stat = settings2.fs.statSync(path);
5392
+ if (settings2.markSymbolicLink) {
5135
5393
  stat.isSymbolicLink = () => true;
5136
5394
  }
5137
5395
  return stat;
5138
5396
  } catch (error2) {
5139
- if (!settings.throwErrorOnBrokenSymbolicLink) {
5397
+ if (!settings2.throwErrorOnBrokenSymbolicLink) {
5140
5398
  return lstat;
5141
5399
  }
5142
5400
  throw error2;
@@ -5213,8 +5471,8 @@ var require_out = __commonJS({
5213
5471
  }
5214
5472
  exports.stat = stat;
5215
5473
  function statSync3(path, optionsOrSettings) {
5216
- const settings = getSettings(optionsOrSettings);
5217
- return sync.read(path, settings);
5474
+ const settings2 = getSettings(optionsOrSettings);
5475
+ return sync.read(path, settings2);
5218
5476
  }
5219
5477
  exports.statSync = statSync3;
5220
5478
  function getSettings(settingsOrOptions = {}) {
@@ -5262,8 +5520,8 @@ var require_run_parallel = __commonJS({
5262
5520
  if (isSync) queueMicrotask2(end);
5263
5521
  else end();
5264
5522
  }
5265
- function each(i, err, result) {
5266
- results[i] = result;
5523
+ function each(i2, err, result) {
5524
+ results[i2] = result;
5267
5525
  if (--pending === 0 || err) {
5268
5526
  done(err);
5269
5527
  }
@@ -5277,9 +5535,9 @@ var require_run_parallel = __commonJS({
5277
5535
  });
5278
5536
  });
5279
5537
  } else {
5280
- tasks.forEach(function(task, i) {
5538
+ tasks.forEach(function(task, i2) {
5281
5539
  task(function(err, result) {
5282
- each(i, err, result);
5540
+ each(i2, err, result);
5283
5541
  });
5284
5542
  });
5285
5543
  }
@@ -5354,11 +5612,11 @@ var require_common = __commonJS({
5354
5612
  init_utils2();
5355
5613
  Object.defineProperty(exports, "__esModule", { value: true });
5356
5614
  exports.joinPathSegments = void 0;
5357
- function joinPathSegments(a, b, separator) {
5358
- if (a.endsWith(separator)) {
5359
- return a + b;
5615
+ function joinPathSegments(a2, b, separator) {
5616
+ if (a2.endsWith(separator)) {
5617
+ return a2 + b;
5360
5618
  }
5361
- return a + separator + b;
5619
+ return a2 + separator + b;
5362
5620
  }
5363
5621
  exports.joinPathSegments = joinPathSegments;
5364
5622
  }
@@ -5376,16 +5634,16 @@ var require_async2 = __commonJS({
5376
5634
  var constants_1 = require_constants3();
5377
5635
  var utils = require_utils4();
5378
5636
  var common = require_common();
5379
- function read(directory, settings, callback) {
5380
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5381
- readdirWithFileTypes(directory, settings, callback);
5637
+ function read(directory, settings2, callback) {
5638
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5639
+ readdirWithFileTypes(directory, settings2, callback);
5382
5640
  return;
5383
5641
  }
5384
- readdir(directory, settings, callback);
5642
+ readdir(directory, settings2, callback);
5385
5643
  }
5386
5644
  exports.read = read;
5387
- function readdirWithFileTypes(directory, settings, callback) {
5388
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5645
+ function readdirWithFileTypes(directory, settings2, callback) {
5646
+ settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5389
5647
  if (readdirError !== null) {
5390
5648
  callFailureCallback(callback, readdirError);
5391
5649
  return;
@@ -5393,13 +5651,13 @@ var require_async2 = __commonJS({
5393
5651
  const entries = dirents.map((dirent) => ({
5394
5652
  dirent,
5395
5653
  name: dirent.name,
5396
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5654
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5397
5655
  }));
5398
- if (!settings.followSymbolicLinks) {
5656
+ if (!settings2.followSymbolicLinks) {
5399
5657
  callSuccessCallback(callback, entries);
5400
5658
  return;
5401
5659
  }
5402
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
5660
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
5403
5661
  rpl(tasks, (rplError, rplEntries) => {
5404
5662
  if (rplError !== null) {
5405
5663
  callFailureCallback(callback, rplError);
@@ -5410,15 +5668,15 @@ var require_async2 = __commonJS({
5410
5668
  });
5411
5669
  }
5412
5670
  exports.readdirWithFileTypes = readdirWithFileTypes;
5413
- function makeRplTaskEntry(entry, settings) {
5671
+ function makeRplTaskEntry(entry, settings2) {
5414
5672
  return (done) => {
5415
5673
  if (!entry.dirent.isSymbolicLink()) {
5416
5674
  done(null, entry);
5417
5675
  return;
5418
5676
  }
5419
- settings.fs.stat(entry.path, (statError, stats) => {
5677
+ settings2.fs.stat(entry.path, (statError, stats) => {
5420
5678
  if (statError !== null) {
5421
- if (settings.throwErrorOnBrokenSymbolicLink) {
5679
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5422
5680
  done(statError);
5423
5681
  return;
5424
5682
  }
@@ -5430,16 +5688,16 @@ var require_async2 = __commonJS({
5430
5688
  });
5431
5689
  };
5432
5690
  }
5433
- function readdir(directory, settings, callback) {
5434
- settings.fs.readdir(directory, (readdirError, names) => {
5691
+ function readdir(directory, settings2, callback) {
5692
+ settings2.fs.readdir(directory, (readdirError, names) => {
5435
5693
  if (readdirError !== null) {
5436
5694
  callFailureCallback(callback, readdirError);
5437
5695
  return;
5438
5696
  }
5439
5697
  const tasks = names.map((name) => {
5440
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5698
+ const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5441
5699
  return (done) => {
5442
- fsStat.stat(path, settings.fsStatSettings, (error2, stats) => {
5700
+ fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
5443
5701
  if (error2 !== null) {
5444
5702
  done(error2);
5445
5703
  return;
@@ -5449,7 +5707,7 @@ var require_async2 = __commonJS({
5449
5707
  path,
5450
5708
  dirent: utils.fs.createDirentFromStats(name, stats)
5451
5709
  };
5452
- if (settings.stats) {
5710
+ if (settings2.stats) {
5453
5711
  entry.stats = stats;
5454
5712
  }
5455
5713
  done(null, entry);
@@ -5486,27 +5744,27 @@ var require_sync2 = __commonJS({
5486
5744
  var constants_1 = require_constants3();
5487
5745
  var utils = require_utils4();
5488
5746
  var common = require_common();
5489
- function read(directory, settings) {
5490
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5491
- return readdirWithFileTypes(directory, settings);
5747
+ function read(directory, settings2) {
5748
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5749
+ return readdirWithFileTypes(directory, settings2);
5492
5750
  }
5493
- return readdir(directory, settings);
5751
+ return readdir(directory, settings2);
5494
5752
  }
5495
5753
  exports.read = read;
5496
- function readdirWithFileTypes(directory, settings) {
5497
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
5754
+ function readdirWithFileTypes(directory, settings2) {
5755
+ const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
5498
5756
  return dirents.map((dirent) => {
5499
5757
  const entry = {
5500
5758
  dirent,
5501
5759
  name: dirent.name,
5502
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5760
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5503
5761
  };
5504
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
5762
+ if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
5505
5763
  try {
5506
- const stats = settings.fs.statSync(entry.path);
5764
+ const stats = settings2.fs.statSync(entry.path);
5507
5765
  entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
5508
5766
  } catch (error2) {
5509
- if (settings.throwErrorOnBrokenSymbolicLink) {
5767
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5510
5768
  throw error2;
5511
5769
  }
5512
5770
  }
@@ -5515,17 +5773,17 @@ var require_sync2 = __commonJS({
5515
5773
  });
5516
5774
  }
5517
5775
  exports.readdirWithFileTypes = readdirWithFileTypes;
5518
- function readdir(directory, settings) {
5519
- const names = settings.fs.readdirSync(directory);
5776
+ function readdir(directory, settings2) {
5777
+ const names = settings2.fs.readdirSync(directory);
5520
5778
  return names.map((name) => {
5521
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5522
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
5779
+ const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5780
+ const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
5523
5781
  const entry = {
5524
5782
  name,
5525
5783
  path: entryPath,
5526
5784
  dirent: utils.fs.createDirentFromStats(name, stats)
5527
5785
  };
5528
- if (settings.stats) {
5786
+ if (settings2.stats) {
5529
5787
  entry.stats = stats;
5530
5788
  }
5531
5789
  return entry;
@@ -5612,8 +5870,8 @@ var require_out2 = __commonJS({
5612
5870
  }
5613
5871
  exports.scandir = scandir;
5614
5872
  function scandirSync(path, optionsOrSettings) {
5615
- const settings = getSettings(optionsOrSettings);
5616
- return sync.read(path, settings);
5873
+ const settings2 = getSettings(optionsOrSettings);
5874
+ return sync.read(path, settings2);
5617
5875
  }
5618
5876
  exports.scandirSync = scandirSync;
5619
5877
  function getSettings(settingsOrOptions = {}) {
@@ -5657,9 +5915,9 @@ var require_reusify = __commonJS({
5657
5915
  }
5658
5916
  });
5659
5917
 
5660
- // node_modules/.bun/fastq@1.20.1/node_modules/fastq/queue.js
5918
+ // node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js
5661
5919
  var require_queue = __commonJS({
5662
- "node_modules/.bun/fastq@1.20.1/node_modules/fastq/queue.js"(exports, module) {
5920
+ "node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js"(exports, module) {
5663
5921
  "use strict";
5664
5922
  init_utils2();
5665
5923
  var reusify = require_reusify();
@@ -5839,11 +6097,12 @@ var require_queue = __commonJS({
5839
6097
  current.value = null;
5840
6098
  current.callback = noop;
5841
6099
  current.errorHandler = null;
6100
+ current.next = null;
5842
6101
  if (errorHandler2) {
5843
6102
  errorHandler2(new Error("abort"), val);
5844
6103
  }
5845
6104
  callback.call(context2, new Error("abort"));
5846
- current.release(current);
6105
+ cache.release(current);
5847
6106
  current = next;
5848
6107
  }
5849
6108
  self.drain = noop;
@@ -5894,7 +6153,7 @@ var require_queue = __commonJS({
5894
6153
  queue.drained = drained;
5895
6154
  return queue;
5896
6155
  function push(value) {
5897
- var p2 = new Promise(function(resolve4, reject) {
6156
+ var p = new Promise(function(resolve4, reject) {
5898
6157
  pushCb(value, function(err, result) {
5899
6158
  if (err) {
5900
6159
  reject(err);
@@ -5903,11 +6162,11 @@ var require_queue = __commonJS({
5903
6162
  resolve4(result);
5904
6163
  });
5905
6164
  });
5906
- p2.catch(noop);
5907
- return p2;
6165
+ p.catch(noop);
6166
+ return p;
5908
6167
  }
5909
6168
  function unshift(value) {
5910
- var p2 = new Promise(function(resolve4, reject) {
6169
+ var p = new Promise(function(resolve4, reject) {
5911
6170
  unshiftCb(value, function(err, result) {
5912
6171
  if (err) {
5913
6172
  reject(err);
@@ -5916,11 +6175,11 @@ var require_queue = __commonJS({
5916
6175
  resolve4(result);
5917
6176
  });
5918
6177
  });
5919
- p2.catch(noop);
5920
- return p2;
6178
+ p.catch(noop);
6179
+ return p;
5921
6180
  }
5922
6181
  function drained() {
5923
- var p2 = new Promise(function(resolve4) {
6182
+ var p = new Promise(function(resolve4) {
5924
6183
  process.nextTick(function() {
5925
6184
  if (queue.idle()) {
5926
6185
  resolve4();
@@ -5934,7 +6193,7 @@ var require_queue = __commonJS({
5934
6193
  }
5935
6194
  });
5936
6195
  });
5937
- return p2;
6196
+ return p;
5938
6197
  }
5939
6198
  }
5940
6199
  module.exports = fastqueue;
@@ -5949,11 +6208,11 @@ var require_common2 = __commonJS({
5949
6208
  init_utils2();
5950
6209
  Object.defineProperty(exports, "__esModule", { value: true });
5951
6210
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
5952
- function isFatalError(settings, error2) {
5953
- if (settings.errorFilter === null) {
6211
+ function isFatalError(settings2, error2) {
6212
+ if (settings2.errorFilter === null) {
5954
6213
  return true;
5955
6214
  }
5956
- return !settings.errorFilter(error2);
6215
+ return !settings2.errorFilter(error2);
5957
6216
  }
5958
6217
  exports.isFatalError = isFatalError;
5959
6218
  function isAppliedFilter(filter, value) {
@@ -5964,14 +6223,14 @@ var require_common2 = __commonJS({
5964
6223
  return filepath.split(/[/\\]/).join(separator);
5965
6224
  }
5966
6225
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
5967
- function joinPathSegments(a, b, separator) {
5968
- if (a === "") {
6226
+ function joinPathSegments(a2, b, separator) {
6227
+ if (a2 === "") {
5969
6228
  return b;
5970
6229
  }
5971
- if (a.endsWith(separator)) {
5972
- return a + b;
6230
+ if (a2.endsWith(separator)) {
6231
+ return a2 + b;
5973
6232
  }
5974
- return a + separator + b;
6233
+ return a2 + separator + b;
5975
6234
  }
5976
6235
  exports.joinPathSegments = joinPathSegments;
5977
6236
  }
@@ -6318,14 +6577,14 @@ var require_out3 = __commonJS({
6318
6577
  }
6319
6578
  exports.walk = walk;
6320
6579
  function walkSync(directory, optionsOrSettings) {
6321
- const settings = getSettings(optionsOrSettings);
6322
- const provider = new sync_1.default(directory, settings);
6580
+ const settings2 = getSettings(optionsOrSettings);
6581
+ const provider = new sync_1.default(directory, settings2);
6323
6582
  return provider.read();
6324
6583
  }
6325
6584
  exports.walkSync = walkSync;
6326
6585
  function walkStream(directory, optionsOrSettings) {
6327
- const settings = getSettings(optionsOrSettings);
6328
- const provider = new stream_1.default(directory, settings);
6586
+ const settings2 = getSettings(optionsOrSettings);
6587
+ const provider = new stream_1.default(directory, settings2);
6329
6588
  return provider.read();
6330
6589
  }
6331
6590
  exports.walkStream = walkStream;
@@ -6411,8 +6670,8 @@ var require_stream3 = __commonJS({
6411
6670
  done();
6412
6671
  }).catch(done);
6413
6672
  };
6414
- for (let i = 0; i < filepaths.length; i++) {
6415
- stream.write(i);
6673
+ for (let i2 = 0; i2 < filepaths.length; i2++) {
6674
+ stream.write(i2);
6416
6675
  }
6417
6676
  return stream;
6418
6677
  }
@@ -7073,14 +7332,14 @@ var require_out4 = __commonJS({
7073
7332
  function generateTasks(source, options) {
7074
7333
  assertPatternsInput(source);
7075
7334
  const patterns = [].concat(source);
7076
- const settings = new settings_1.default(options);
7077
- return taskManager.generate(patterns, settings);
7335
+ const settings2 = new settings_1.default(options);
7336
+ return taskManager.generate(patterns, settings2);
7078
7337
  }
7079
7338
  FastGlob2.generateTasks = generateTasks;
7080
7339
  function isDynamicPattern(source, options) {
7081
7340
  assertPatternsInput(source);
7082
- const settings = new settings_1.default(options);
7083
- return utils.pattern.isDynamicPattern(source, settings);
7341
+ const settings2 = new settings_1.default(options);
7342
+ return utils.pattern.isDynamicPattern(source, settings2);
7084
7343
  }
7085
7344
  FastGlob2.isDynamicPattern = isDynamicPattern;
7086
7345
  function escapePath(source) {
@@ -7122,9 +7381,9 @@ var require_out4 = __commonJS({
7122
7381
  })(FastGlob || (FastGlob = {}));
7123
7382
  function getWorks(source, _Provider, options) {
7124
7383
  const patterns = [].concat(source);
7125
- const settings = new settings_1.default(options);
7126
- const tasks = taskManager.generate(patterns, settings);
7127
- const provider = new _Provider(settings);
7384
+ const settings2 = new settings_1.default(options);
7385
+ const tasks = taskManager.generate(patterns, settings2);
7386
+ const provider = new _Provider(settings2);
7128
7387
  return tasks.map(provider.read, provider);
7129
7388
  }
7130
7389
  function assertPatternsInput(input) {
@@ -7302,14 +7561,14 @@ import "node:fs";
7302
7561
  import { createRequire } from "node:module";
7303
7562
  import {
7304
7563
  resolve,
7305
- join,
7306
- dirname,
7564
+ join as join2,
7565
+ dirname as dirname2,
7307
7566
  relative,
7308
7567
  normalize,
7309
7568
  sep,
7310
7569
  extname
7311
7570
  } from "node:path";
7312
- import "node:url";
7571
+ import { fileURLToPath } from "node:url";
7313
7572
  function safeExecuteAsync(fn, message) {
7314
7573
  return fn().catch((error2) => {
7315
7574
  throw new Error(
@@ -7317,7 +7576,7 @@ function safeExecuteAsync(fn, message) {
7317
7576
  );
7318
7577
  });
7319
7578
  }
7320
- var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
7579
+ var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
7321
7580
  var init_PathResolver = __esm({
7322
7581
  "packages/core/config/utils/PathResolver.ts"() {
7323
7582
  "use strict";
@@ -7330,7 +7589,7 @@ var init_PathResolver = __esm({
7330
7589
  getPatternsFor: getPatternsFor || void 0,
7331
7590
  I18N_PATHS: I18N_PATHS || void 0
7332
7591
  };
7333
- log2 = {
7592
+ log3 = {
7334
7593
  error: (message, error2) => {
7335
7594
  },
7336
7595
  warn: (message, error2) => {
@@ -7366,6 +7625,7 @@ var init_PathResolver = __esm({
7366
7625
  options;
7367
7626
  _repoRoot;
7368
7627
  _appRoot = null;
7628
+ _writtenPaths = null;
7369
7629
  /**
7370
7630
  * Get or create singleton instance
7371
7631
  * @param options - Configuration options
@@ -7451,7 +7711,7 @@ var init_PathResolver = __esm({
7451
7711
  */
7452
7712
  getDirname(path) {
7453
7713
  if (!path) return "";
7454
- return this.normalizePath(dirname(path));
7714
+ return this.normalizePath(dirname2(path));
7455
7715
  }
7456
7716
  /**
7457
7717
  * Resolve package path using Node's module resolution
@@ -7463,7 +7723,7 @@ var init_PathResolver = __esm({
7463
7723
  resolvePackage(packageSpecifier, fromPath = null) {
7464
7724
  try {
7465
7725
  const basePath = fromPath || this.getAppRoot();
7466
- const require3 = createRequire(join(basePath, "package.json"));
7726
+ const require3 = createRequire(join2(basePath, "package.json"));
7467
7727
  const resolved = require3.resolve(packageSpecifier);
7468
7728
  return this.normalizePath(resolved);
7469
7729
  } catch (error2) {
@@ -7615,7 +7875,7 @@ var init_PathResolver = __esm({
7615
7875
  return cleanContent;
7616
7876
  } catch (error2) {
7617
7877
  if (this.options.debug) {
7618
- log2.warn(`Failed to read file: ${filePath}`, error2);
7878
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7619
7879
  }
7620
7880
  return null;
7621
7881
  }
@@ -7643,7 +7903,7 @@ var init_PathResolver = __esm({
7643
7903
  return cleanContent;
7644
7904
  } catch (error2) {
7645
7905
  if (this.options.debug) {
7646
- log2.warn(`Failed to read file: ${filePath}`, error2);
7906
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7647
7907
  }
7648
7908
  return null;
7649
7909
  }
@@ -7665,16 +7925,16 @@ var init_PathResolver = __esm({
7665
7925
  verbose = false
7666
7926
  } = options;
7667
7927
  const normalizedPath = this.normalizePath(filePath);
7668
- const dir = this.normalizePath(dirname(normalizedPath));
7928
+ const dir = this.normalizePath(dirname2(normalizedPath));
7669
7929
  const fileExists = this.pathExists(normalizedPath);
7670
7930
  if (fileExists && !overwrite) {
7671
7931
  if (verbose) {
7672
- log2.info(`Skipping existing file: ${normalizedPath}`);
7932
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7673
7933
  }
7674
7934
  return false;
7675
7935
  }
7676
7936
  if (dryRun) {
7677
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7937
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7678
7938
  return true;
7679
7939
  }
7680
7940
  try {
@@ -7684,22 +7944,23 @@ var init_PathResolver = __esm({
7684
7944
  }
7685
7945
  const detectedFormat = this._detectFormat(filePath, format);
7686
7946
  let writeContent;
7687
- if (Buffer.isBuffer(content)) {
7947
+ if (Buffer2.isBuffer(content)) {
7688
7948
  writeContent = content;
7689
7949
  } else if (detectedFormat === "json" && typeof content === "object") {
7690
- writeContent = JSON.stringify(content, null, 2);
7950
+ writeContent = `${JSON.stringify(content, null, 2)}
7951
+ `;
7691
7952
  } else {
7692
7953
  writeContent = String(content);
7693
7954
  }
7694
7955
  try {
7695
7956
  return await safeExecuteAsync(async () => {
7696
- if (Buffer.isBuffer(writeContent)) {
7957
+ if (Buffer2.isBuffer(writeContent)) {
7697
7958
  await fs.promises.writeFile(normalizedPath, writeContent);
7698
7959
  } else {
7699
7960
  await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
7700
7961
  }
7701
7962
  if (verbose) {
7702
- log2.info(
7963
+ log3.info(
7703
7964
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7704
7965
  );
7705
7966
  }
@@ -7726,16 +7987,16 @@ var init_PathResolver = __esm({
7726
7987
  verbose = false
7727
7988
  } = options;
7728
7989
  const normalizedPath = this.normalizePath(filePath);
7729
- const dir = this.normalizePath(dirname(normalizedPath));
7990
+ const dir = this.normalizePath(dirname2(normalizedPath));
7730
7991
  const fileExists = this.pathExists(normalizedPath);
7731
7992
  if (fileExists && !overwrite) {
7732
7993
  if (verbose) {
7733
- log2.info(`Skipping existing file: ${normalizedPath}`);
7994
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7734
7995
  }
7735
7996
  return false;
7736
7997
  }
7737
7998
  if (dryRun) {
7738
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7999
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7739
8000
  return true;
7740
8001
  }
7741
8002
  try {
@@ -7745,21 +8006,23 @@ var init_PathResolver = __esm({
7745
8006
  }
7746
8007
  const detectedFormat = this._detectFormat(filePath, format);
7747
8008
  let writeContent;
7748
- if (Buffer.isBuffer(content)) {
8009
+ if (Buffer2.isBuffer(content)) {
7749
8010
  writeContent = content;
7750
8011
  } else if (detectedFormat === "json" && typeof content === "object") {
7751
- writeContent = JSON.stringify(content, null, 2);
8012
+ writeContent = `${JSON.stringify(content, null, 2)}
8013
+ `;
7752
8014
  } else {
7753
8015
  writeContent = String(content);
7754
8016
  }
7755
8017
  try {
7756
- if (Buffer.isBuffer(writeContent)) {
8018
+ if (Buffer2.isBuffer(writeContent)) {
7757
8019
  fs.writeFileSync(normalizedPath, writeContent);
7758
8020
  } else {
7759
8021
  fs.writeFileSync(normalizedPath, writeContent, "utf8");
7760
8022
  }
8023
+ this._writtenPaths?.add(normalizedPath);
7761
8024
  if (verbose) {
7762
- log2.info(
8025
+ log3.info(
7763
8026
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7764
8027
  );
7765
8028
  }
@@ -7784,15 +8047,15 @@ var init_PathResolver = __esm({
7784
8047
  const fileExists = this.pathExists(normalizedDestPath);
7785
8048
  if (fileExists && !overwrite) {
7786
8049
  if (verbose) {
7787
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
8050
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7788
8051
  }
7789
8052
  return false;
7790
8053
  }
7791
8054
  if (dryRun) {
7792
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
8055
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7793
8056
  return true;
7794
8057
  }
7795
- const dir = this.normalizePath(dirname(normalizedDestPath));
8058
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7796
8059
  try {
7797
8060
  await fs.promises.mkdir(dir, { recursive: true });
7798
8061
  } catch (error2) {
@@ -7802,7 +8065,7 @@ var init_PathResolver = __esm({
7802
8065
  return await safeExecuteAsync(async () => {
7803
8066
  await fs.promises.copyFile(srcPath, normalizedDestPath);
7804
8067
  if (verbose) {
7805
- log2.info(
8068
+ log3.info(
7806
8069
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7807
8070
  );
7808
8071
  }
@@ -7826,15 +8089,15 @@ var init_PathResolver = __esm({
7826
8089
  const fileExists = this.pathExists(normalizedDestPath);
7827
8090
  if (fileExists && !overwrite) {
7828
8091
  if (verbose) {
7829
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
8092
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7830
8093
  }
7831
8094
  return false;
7832
8095
  }
7833
8096
  if (dryRun) {
7834
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
8097
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7835
8098
  return true;
7836
8099
  }
7837
- const dir = this.normalizePath(dirname(normalizedDestPath));
8100
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7838
8101
  try {
7839
8102
  fs.mkdirSync(dir, { recursive: true });
7840
8103
  } catch (error2) {
@@ -7842,8 +8105,9 @@ var init_PathResolver = __esm({
7842
8105
  }
7843
8106
  try {
7844
8107
  fs.copyFileSync(srcPath, normalizedDestPath);
8108
+ this._writtenPaths?.add(normalizedDestPath);
7845
8109
  if (verbose) {
7846
- log2.info(
8110
+ log3.info(
7847
8111
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7848
8112
  );
7849
8113
  }
@@ -7860,7 +8124,7 @@ var init_PathResolver = __esm({
7860
8124
  return fs.existsSync(filePath);
7861
8125
  } catch (error2) {
7862
8126
  if (!silent) {
7863
- log2.error(`Error checking path existence: ${filePath}`, error2);
8127
+ log3.error(`Error checking path existence: ${filePath}`, error2);
7864
8128
  }
7865
8129
  return false;
7866
8130
  }
@@ -7886,7 +8150,7 @@ var init_PathResolver = __esm({
7886
8150
  return fs.readdirSync(dirPath, options);
7887
8151
  } catch (error2) {
7888
8152
  if (this.options.debug) {
7889
- log2.warn(`Failed to read directory: ${dirPath}`, error2);
8153
+ log3.warn(`Failed to read directory: ${dirPath}`, error2);
7890
8154
  }
7891
8155
  const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
7892
8156
  return isObjectOptions && options.withFileTypes ? [] : [];
@@ -7904,11 +8168,29 @@ var init_PathResolver = __esm({
7904
8168
  return fs.statSync(filePath);
7905
8169
  } catch (error2) {
7906
8170
  if (this.options.debug) {
7907
- log2.warn(`Failed to stat file: ${filePath}`, error2);
8171
+ log3.warn(`Failed to stat file: ${filePath}`, error2);
7908
8172
  }
7909
8173
  return null;
7910
8174
  }
7911
8175
  }
8176
+ /**
8177
+ * Resolve the real path of a file, following symlinks
8178
+ * @param filePath - Path to resolve
8179
+ * @returns Resolved real path
8180
+ */
8181
+ realpathSync(filePath) {
8182
+ return fs.realpathSync(filePath);
8183
+ }
8184
+ /**
8185
+ * Watch a directory for changes
8186
+ * @param dirPath - Directory to watch
8187
+ * @param options - fs.watch options
8188
+ * @param callback - Callback for change events
8189
+ * @returns FSWatcher instance
8190
+ */
8191
+ watch(dirPath, options, callback) {
8192
+ return fs.watch(dirPath, options, callback);
8193
+ }
7912
8194
  /**
7913
8195
  * Get file stats synchronously (follows symlinks)
7914
8196
  * Returns null if file doesn't exist (graceful degradation)
@@ -7921,7 +8203,7 @@ var init_PathResolver = __esm({
7921
8203
  return fs.lstatSync(filePath);
7922
8204
  } catch (error2) {
7923
8205
  if (this.options.debug) {
7924
- log2.warn(`Failed to lstat file: ${filePath}`, error2);
8206
+ log3.warn(`Failed to lstat file: ${filePath}`, error2);
7925
8207
  }
7926
8208
  return null;
7927
8209
  }
@@ -7988,6 +8270,28 @@ var init_PathResolver = __esm({
7988
8270
  * Get app root (where vite.config.ts is, Vite's config.root)
7989
8271
  * Falls back to repoRoot if not set
7990
8272
  */
8273
+ /**
8274
+ * Start recording every path written by writeSync/copySync.
8275
+ * Lets a generator know exactly which files the current run produced,
8276
+ * without comparing file timestamps to a clock.
8277
+ */
8278
+ startWriteRecording() {
8279
+ this._writtenPaths = /* @__PURE__ */ new Set();
8280
+ }
8281
+ /**
8282
+ * Stop recording and return the normalized paths written since
8283
+ * startWriteRecording().
8284
+ */
8285
+ stopWriteRecording() {
8286
+ if (!this._writtenPaths) {
8287
+ throw new Error(
8288
+ "stopWriteRecording() called without startWriteRecording()"
8289
+ );
8290
+ }
8291
+ const written = this._writtenPaths;
8292
+ this._writtenPaths = null;
8293
+ return written;
8294
+ }
7991
8295
  getAppRoot() {
7992
8296
  if (!this._appRoot) {
7993
8297
  return this._repoRoot;
@@ -8010,7 +8314,7 @@ var init_PathResolver = __esm({
8010
8314
  * @returns True if repoRoot is the monorepo (has packages directory)
8011
8315
  */
8012
8316
  isMonorepo() {
8013
- const packagesDir = join(this._repoRoot, "packages");
8317
+ const packagesDir = join2(this._repoRoot, "packages");
8014
8318
  return this.pathExists(packagesDir);
8015
8319
  }
8016
8320
  /**
@@ -8027,7 +8331,7 @@ var init_PathResolver = __esm({
8027
8331
  * Find files matching pattern within directory
8028
8332
  */
8029
8333
  async findFiles(directory, pattern, options = {}) {
8030
- const searchPattern = this.normalizePath(join(directory, pattern));
8334
+ const searchPattern = this.normalizePath(join2(directory, pattern));
8031
8335
  const appRoot = this.getAppRoot();
8032
8336
  const normalizeAppRoot = this.normalizePath(appRoot);
8033
8337
  const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
@@ -8074,7 +8378,7 @@ var init_PathResolver = __esm({
8074
8378
  return null;
8075
8379
  }
8076
8380
  const resolvedPath = this.normalizePath(
8077
- join(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8381
+ join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8078
8382
  );
8079
8383
  const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
8080
8384
  if (this.pathExists(resolvedDir)) {
@@ -8245,6 +8549,15 @@ var init_PathResolver = __esm({
8245
8549
  const cjsPath = this.getEmptyCjsModulePath();
8246
8550
  return cjsPath.replace(/\.cjs$/, ".js");
8247
8551
  }
8552
+ /**
8553
+ * Get absolute path to empty flag component module.
8554
+ * Returns `export default () => null;` — used by flag filtering plugins
8555
+ * to replace unused flag files at build time.
8556
+ */
8557
+ getEmptyFlagModulePath() {
8558
+ const __dirname2 = dirname2(fileURLToPath(import.meta.url));
8559
+ return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
8560
+ }
8248
8561
  /**
8249
8562
  * Get absolute path to empty CJS module for esbuild pre-bundling.
8250
8563
  * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
@@ -8270,13 +8583,13 @@ var init_PathResolver = __esm({
8270
8583
  const maxLevels = this.options.maxLevels;
8271
8584
  while (levelsChecked < maxLevels) {
8272
8585
  const toolingPath = this.normalizePath(
8273
- join(currentDir, PACKAGE_PATHS.TOOLING)
8586
+ join2(currentDir, PACKAGE_PATHS.TOOLING)
8274
8587
  );
8275
- const corePath = this.normalizePath(join(currentDir, PACKAGE_PATHS.CORE));
8588
+ const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
8276
8589
  if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
8277
8590
  return currentDir;
8278
8591
  }
8279
- const appsDir = join(currentDir, "apps");
8592
+ const appsDir = join2(currentDir, "apps");
8280
8593
  if (this.pathExists(appsDir)) {
8281
8594
  const appsDirStat = this.statSync(appsDir);
8282
8595
  if (appsDirStat?.isDirectory()) {
@@ -8284,15 +8597,15 @@ var init_PathResolver = __esm({
8284
8597
  }
8285
8598
  }
8286
8599
  const packageJsonPath = this.normalizePath(
8287
- join(currentDir, "package.json")
8600
+ join2(currentDir, "package.json")
8288
8601
  );
8289
8602
  if (this.pathExists(packageJsonPath)) {
8290
- const parentDir2 = this.normalizePath(dirname(currentDir));
8603
+ const parentDir2 = this.normalizePath(dirname2(currentDir));
8291
8604
  if (parentDir2 === currentDir) {
8292
8605
  return currentDir;
8293
8606
  }
8294
8607
  }
8295
- const parentDir = this.normalizePath(dirname(currentDir));
8608
+ const parentDir = this.normalizePath(dirname2(currentDir));
8296
8609
  if (parentDir === currentDir) {
8297
8610
  break;
8298
8611
  }
@@ -8308,8 +8621,8 @@ var init_PathResolver = __esm({
8308
8621
  // packages/tooling/src/utils/pathResolver.ts
8309
8622
  import { createRequire as createRequire2 } from "node:module";
8310
8623
  import {
8311
- join as join2,
8312
- dirname as dirname2,
8624
+ join as join3,
8625
+ dirname as dirname3,
8313
8626
  basename as basename2,
8314
8627
  extname as extname2,
8315
8628
  relative as relative2,
@@ -8318,7 +8631,7 @@ import {
8318
8631
  isAbsolute as pathIsAbsolute
8319
8632
  } from "node:path";
8320
8633
  import { fileURLToPath as fileURLToPath2 } from "node:url";
8321
- function readdirSync2(dirPath, options) {
8634
+ function readdirSync3(dirPath, options) {
8322
8635
  return pathResolverInstance.readdirSync(dirPath, options);
8323
8636
  }
8324
8637
  var pathResolverInstance, getRepoRoot, getAppRoot, normalizePath, pathExists, readSync, write, statSync2, ensureDir, joinPath;
@@ -8331,7 +8644,7 @@ var init_pathResolver = __esm({
8331
8644
  getRepoRoot = () => pathResolverInstance.getRepoRoot();
8332
8645
  getAppRoot = () => pathResolverInstance.getAppRoot();
8333
8646
  normalizePath = (...pathSegments) => {
8334
- return pathResolverInstance.normalizePath(join2(...pathSegments));
8647
+ return pathResolverInstance.normalizePath(join3(...pathSegments));
8335
8648
  };
8336
8649
  pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
8337
8650
  readSync = (filePath, options) => pathResolverInstance.readSync(filePath, options);
@@ -8387,10 +8700,10 @@ var init_typed_file_operations = __esm({
8387
8700
  });
8388
8701
 
8389
8702
  // packages/tooling/src/bundler/utils.ts
8390
- import { Buffer } from "node:buffer";
8703
+ import { Buffer as Buffer2 } from "node:buffer";
8391
8704
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
8392
8705
  import { createRequire as createRequire3 } from "node:module";
8393
- import { dirname as dirname3, resolve as resolve3 } from "node:path";
8706
+ import { dirname as dirname4, resolve as resolve3 } from "node:path";
8394
8707
  import process from "node:process";
8395
8708
  import { fileURLToPath as fileURLToPath3 } from "node:url";
8396
8709
  var require2, __filename, __dirname;
@@ -8399,12 +8712,12 @@ var init_utils2 = __esm({
8399
8712
  "use strict";
8400
8713
  require2 = createRequire3(import.meta.url);
8401
8714
  __filename = fileURLToPath3(import.meta.url);
8402
- __dirname = dirname3(__filename);
8715
+ __dirname = dirname4(__filename);
8403
8716
  if (typeof globalThis !== "undefined") {
8404
8717
  globalThis.require = require2;
8405
8718
  globalThis.__filename = __filename;
8406
8719
  globalThis.__dirname = __dirname;
8407
- globalThis.Buffer = Buffer;
8720
+ globalThis.Buffer = Buffer2;
8408
8721
  globalThis.process = process;
8409
8722
  if (typeof global === "undefined") {
8410
8723
  globalThis.global = globalThis;
@@ -8581,12 +8894,12 @@ var init_app_detection = __esm({
8581
8894
 
8582
8895
  // packages/tooling/src/utils/cli-input.ts
8583
8896
  async function askForConfirmation(message, defaultValue = false) {
8584
- const result = await ot2({
8897
+ const result = await confirm({
8585
8898
  message,
8586
8899
  initialValue: defaultValue
8587
8900
  });
8588
- if (q(result)) {
8589
- pt("Operation cancelled.");
8901
+ if (isCancel(result)) {
8902
+ cancel("Operation cancelled.");
8590
8903
  process.exit(0);
8591
8904
  }
8592
8905
  return result;
@@ -8597,13 +8910,13 @@ async function askForSelection(message, choices, defaultValue = 0) {
8597
8910
  label: choice.title,
8598
8911
  hint: choice.hint
8599
8912
  }));
8600
- const result = await _t({
8913
+ const result = await select({
8601
8914
  message,
8602
8915
  options,
8603
8916
  initialValue: choices[defaultValue]?.value
8604
8917
  });
8605
- if (q(result)) {
8606
- pt("Operation cancelled.");
8918
+ if (isCancel(result)) {
8919
+ cancel("Operation cancelled.");
8607
8920
  process.exit(0);
8608
8921
  }
8609
8922
  return result;
@@ -8688,7 +9001,7 @@ function resolveSecret(name, projectRoot, opts) {
8688
9001
  if (value) {
8689
9002
  if (!opts?.silent && !warnedLegacy.has(name)) {
8690
9003
  warnedLegacy.add(name);
8691
- log.warn(
9004
+ log2.warn(
8692
9005
  `${name} found in ${relPath} (legacy). Move it to .dndev.secrets at project root.`
8693
9006
  );
8694
9007
  }
@@ -8699,7 +9012,7 @@ function resolveSecret(name, projectRoot, opts) {
8699
9012
  if (aliasValue) {
8700
9013
  if (!opts?.silent && !warnedLegacy.has(name)) {
8701
9014
  warnedLegacy.add(name);
8702
- log.warn(
9015
+ log2.warn(
8703
9016
  `${name} found in ${relPath} (legacy). Move it to .dndev.secrets at project root.`
8704
9017
  );
8705
9018
  }
@@ -8787,13 +9100,13 @@ function detectGitHubRepo() {
8787
9100
  }
8788
9101
  function setGitHubSecret(key, value, repo, dryRun = false) {
8789
9102
  if (dryRun) {
8790
- log.info(
9103
+ log2.info(
8791
9104
  `[DRY RUN] Would set GitHub secret: ${key}${repo ? ` (repo: ${repo})` : ""}`
8792
9105
  );
8793
9106
  return;
8794
9107
  }
8795
9108
  try {
8796
- log.info(`Setting GitHub secret: ${key}${repo ? ` (repo: ${repo})` : ""}`);
9109
+ log2.info(`Setting GitHub secret: ${key}${repo ? ` (repo: ${repo})` : ""}`);
8797
9110
  const args = ["secret", "set", key];
8798
9111
  if (repo) {
8799
9112
  args.push("--repo", repo);
@@ -8808,8 +9121,8 @@ function setGitHubSecret(key, value, repo, dryRun = false) {
8808
9121
  }
8809
9122
  if (result.status !== 0) {
8810
9123
  const stderr = result.stderr?.toString() || "";
8811
- const stdout = result.stdout?.toString() || "";
8812
- const errorOutput = stderr || stdout;
9124
+ const stdout2 = result.stdout?.toString() || "";
9125
+ const errorOutput = stderr || stdout2;
8813
9126
  if (errorOutput.includes("not logged in") || errorOutput.includes("authentication")) {
8814
9127
  throw new DoNotDevError(
8815
9128
  `GitHub CLI authentication required. Run 'gh auth login' to authenticate.`,
@@ -8822,10 +9135,10 @@ function setGitHubSecret(key, value, repo, dryRun = false) {
8822
9135
  ${errorOutput}`
8823
9136
  );
8824
9137
  }
8825
- log.success(`GitHub secret ${key} set successfully`);
9138
+ log2.success(`GitHub secret ${key} set successfully`);
8826
9139
  } catch (err) {
8827
9140
  if (err instanceof DoNotDevError) throw err;
8828
- log.error(`Failed to set GitHub secret ${key}:`, err);
9141
+ log2.error(`Failed to set GitHub secret ${key}:`, err);
8829
9142
  throw new DoNotDevError(
8830
9143
  `Failed to set GitHub secret ${key}`,
8831
9144
  "command-failed",
@@ -8844,13 +9157,13 @@ function uploadServiceAccountToGitHub(appDir, repo, dryRun = false, staging = fa
8844
9157
  const secretName = staging ? "FIREBASE_SERVICE_ACCOUNT_STAGING" : "FIREBASE_SERVICE_ACCOUNT";
8845
9158
  const filePath = joinPath(appDir, fileName);
8846
9159
  if (!pathExists(filePath)) {
8847
- log.debug(`No ${fileName} found in ${appDir}, skipping GitHub upload`);
9160
+ log2.debug(`No ${fileName} found in ${appDir}, skipping GitHub upload`);
8848
9161
  return;
8849
9162
  }
8850
9163
  const contentRaw = readSync(filePath, { format: "text" });
8851
9164
  const content = typeof contentRaw === "string" ? contentRaw : null;
8852
9165
  if (!content) return;
8853
- const encoded = Buffer.from(content).toString("base64");
9166
+ const encoded = Buffer2.from(content).toString("base64");
8854
9167
  setGitHubSecret(secretName, encoded, repo, dryRun);
8855
9168
  }
8856
9169
  var init_sync_secrets = __esm({
@@ -8883,7 +9196,7 @@ function detectAvailableApps() {
8883
9196
  if (!pathExists(appsDir)) {
8884
9197
  return [];
8885
9198
  }
8886
- return readdirSync2(appsDir).filter((item) => {
9199
+ return readdirSync3(appsDir).filter((item) => {
8887
9200
  const itemPath = joinPath(appsDir, item);
8888
9201
  const stat = statSync2(itemPath);
8889
9202
  return stat?.isDirectory() === true;
@@ -8897,7 +9210,7 @@ function detectAvailableApps() {
8897
9210
  }
8898
9211
  function readStagingProject(startDir) {
8899
9212
  let current = startDir;
8900
- for (let i = 0; i < 10; i++) {
9213
+ for (let i2 = 0; i2 < 10; i2++) {
8901
9214
  const firebasercPath = joinPath(current, ".firebaserc");
8902
9215
  if (pathExists(firebasercPath)) {
8903
9216
  try {
@@ -8920,8 +9233,8 @@ init_utils2();
8920
9233
  import { execSync } from "node:child_process";
8921
9234
  init_sync_secrets();
8922
9235
  init_vercel_token();
8923
- init_pathResolver();
8924
9236
  init_app_detection();
9237
+ init_pathResolver();
8925
9238
  init_secrets_resolver();
8926
9239
  function isGhCliAvailable() {
8927
9240
  try {
@@ -9089,7 +9402,7 @@ jobs:
9089
9402
  }
9090
9403
  function generateDeployWorkflow(providers, envSecretNames) {
9091
9404
  const appName = providers.name;
9092
- const envBlock = envSecretNames.filter((n) => n.startsWith("VITE_") || n.startsWith("NEXT_PUBLIC_")).map((n) => ` ${n}: \${{ secrets.${n} }}`).join("\n");
9405
+ const envBlock = envSecretNames.filter((n3) => n3.startsWith("VITE_") || n3.startsWith("NEXT_PUBLIC_")).map((n3) => ` ${n3}: \${{ secrets.${n3} }}`).join("\n");
9093
9406
  let steps = ` - name: Checkout repository
9094
9407
  uses: actions/checkout@v4
9095
9408
 
@@ -9191,7 +9504,7 @@ ${steps}
9191
9504
  }
9192
9505
  function generateStagingWorkflow(providers, envSecretNames) {
9193
9506
  const appName = providers.name;
9194
- const envBlock = envSecretNames.filter((n) => n.startsWith("VITE_") || n.startsWith("NEXT_PUBLIC_")).map((n) => ` ${n}: \${{ secrets.${n} }}`).join("\n");
9507
+ const envBlock = envSecretNames.filter((n3) => n3.startsWith("VITE_") || n3.startsWith("NEXT_PUBLIC_")).map((n3) => ` ${n3}: \${{ secrets.${n3} }}`).join("\n");
9195
9508
  let steps = ` - name: Checkout repository
9196
9509
  uses: actions/checkout@v4
9197
9510
 
@@ -9278,50 +9591,50 @@ ${steps}
9278
9591
  }
9279
9592
  async function main(options = {}) {
9280
9593
  const dryRun = options.dryRun ?? false;
9281
- mt("CI/CD Setup");
9594
+ intro("CI/CD Setup");
9282
9595
  if (!isGhCliAvailable()) {
9283
- log.error(
9596
+ log2.error(
9284
9597
  "GitHub CLI (gh) is required.\nInstall: https://cli.github.com/\nThen: gh auth login"
9285
9598
  );
9286
9599
  return 1;
9287
9600
  }
9288
9601
  if (!isGhAuthenticated()) {
9289
- log.error("GitHub CLI not authenticated.\nRun: gh auth login");
9602
+ log2.error("GitHub CLI not authenticated.\nRun: gh auth login");
9290
9603
  return 1;
9291
9604
  }
9292
9605
  const repo = detectGitHubRepo();
9293
9606
  if (!repo) {
9294
- log.error(
9607
+ log2.error(
9295
9608
  "Could not detect GitHub repository from git remote.\nEnsure a GitHub remote is configured."
9296
9609
  );
9297
9610
  return 1;
9298
9611
  }
9299
9612
  if (dryRun) {
9300
- log.info("DRY RUN MODE \u2014 no secrets will be uploaded, no files written");
9613
+ log2.info("DRY RUN MODE \u2014 no secrets will be uploaded, no files written");
9301
9614
  }
9302
9615
  const projectRoot = getAppRoot();
9303
9616
  let appName = options.app;
9304
9617
  if (!appName) {
9305
9618
  const availableApps = detectAvailableApps();
9306
9619
  if (availableApps.length === 0) {
9307
- log.error(
9620
+ log2.error(
9308
9621
  "No apps found with firebase.json, supabase/, or vercel.json.\nRun from a DoNotDev project with at least one configured app."
9309
9622
  );
9310
9623
  return 1;
9311
9624
  }
9312
9625
  if (availableApps.length === 1) {
9313
9626
  appName = availableApps[0];
9314
- wt(`Using app: ${appName}`, "Auto-detected");
9627
+ note(`Using app: ${appName}`, "Auto-detected");
9315
9628
  } else {
9316
9629
  appName = await askForSelection(
9317
9630
  "Which app to set up CI/CD for?",
9318
- availableApps.map((a) => ({ title: a, value: a }))
9631
+ availableApps.map((a2) => ({ title: a2, value: a2 }))
9319
9632
  );
9320
9633
  }
9321
9634
  }
9322
9635
  const appDir = joinPath(projectRoot, "apps", appName);
9323
9636
  if (!pathExists(appDir)) {
9324
- log.error(`App directory not found: ${appDir}`);
9637
+ log2.error(`App directory not found: ${appDir}`);
9325
9638
  return 1;
9326
9639
  }
9327
9640
  const providers = detectProvider(appDir);
@@ -9354,16 +9667,16 @@ async function main(options = {}) {
9354
9667
  `Staging: ${config.hasStaging ? "yes" : "no"}`,
9355
9668
  "",
9356
9669
  `Workflows to generate:`,
9357
- ...workflows.map((w3) => ` - ${w3}`),
9670
+ ...workflows.map((w) => ` - ${w}`),
9358
9671
  "",
9359
9672
  `Secrets to upload (${secrets.length}):`,
9360
9673
  ...secrets.map(
9361
9674
  (s2) => ` ${s2.source === "MISSING" ? "(!) " : ""}${s2.name} \u2014 ${s2.source}`
9362
9675
  )
9363
9676
  ];
9364
- wt(planLines.join("\n"), "CI/CD Plan");
9677
+ note(planLines.join("\n"), "CI/CD Plan");
9365
9678
  if (missingSecrets.length > 0) {
9366
- log.warn(
9679
+ log2.warn(
9367
9680
  `Missing secrets: ${missingSecrets.map((s2) => s2.name).join(", ")}
9368
9681
  These will be skipped. Add them to .dndev.secrets or .env and re-run.`
9369
9682
  );
@@ -9371,11 +9684,11 @@ These will be skipped. Add them to .dndev.secrets or .env and re-run.`
9371
9684
  if (!dryRun) {
9372
9685
  const confirmed = await askForConfirmation("Proceed with CI/CD setup?");
9373
9686
  if (!confirmed) {
9374
- gt("Setup cancelled");
9687
+ outro("Setup cancelled");
9375
9688
  return 0;
9376
9689
  }
9377
9690
  }
9378
- const s = fe();
9691
+ const s = spinner();
9379
9692
  const uploadableSecrets = secrets.filter(
9380
9693
  (sec) => sec.value !== "" && sec.source !== "MISSING" && !sec.value.startsWith("__SERVICE_ACCOUNT")
9381
9694
  );
@@ -9389,7 +9702,7 @@ These will be skipped. Add them to .dndev.secrets or .env and re-run.`
9389
9702
  successCount++;
9390
9703
  } catch (err) {
9391
9704
  failCount++;
9392
- log.error(
9705
+ log2.error(
9393
9706
  `Failed: ${sec.name} \u2014 ${err instanceof Error ? err.message : String(err)}`
9394
9707
  );
9395
9708
  }
@@ -9423,23 +9736,23 @@ These will be skipped. Add them to .dndev.secrets or .env and re-run.`
9423
9736
  stagingYaml = generateStagingWorkflow(providers, secretNames);
9424
9737
  }
9425
9738
  if (dryRun) {
9426
- log.info("\n--- ci.yml ---");
9427
- log.info(ciYaml);
9428
- log.info("\n--- deploy.yml ---");
9429
- log.info(deployYaml);
9739
+ log2.info("\n--- ci.yml ---");
9740
+ log2.info(ciYaml);
9741
+ log2.info("\n--- deploy.yml ---");
9742
+ log2.info(deployYaml);
9430
9743
  if (stagingYaml) {
9431
- log.info("\n--- deploy-staging.yml ---");
9432
- log.info(stagingYaml);
9744
+ log2.info("\n--- deploy-staging.yml ---");
9745
+ log2.info(stagingYaml);
9433
9746
  }
9434
9747
  } else {
9435
9748
  ensureDir(workflowDir);
9436
9749
  write(joinPath(workflowDir, "ci.yml"), ciYaml);
9437
- log.success("Generated .github/workflows/ci.yml");
9750
+ log2.success("Generated .github/workflows/ci.yml");
9438
9751
  write(joinPath(workflowDir, "deploy.yml"), deployYaml);
9439
- log.success("Generated .github/workflows/deploy.yml");
9752
+ log2.success("Generated .github/workflows/deploy.yml");
9440
9753
  if (stagingYaml) {
9441
9754
  write(joinPath(workflowDir, "deploy-staging.yml"), stagingYaml);
9442
- log.success("Generated .github/workflows/deploy-staging.yml");
9755
+ log2.success("Generated .github/workflows/deploy-staging.yml");
9443
9756
  }
9444
9757
  }
9445
9758
  const nextSteps = [
@@ -9456,8 +9769,8 @@ These will be skipped. Add them to .dndev.secrets or .env and re-run.`
9456
9769
  "Add GH_PAT to .dndev.secrets (needed for private dndev checkout in CI)"
9457
9770
  );
9458
9771
  }
9459
- wt(nextSteps.map((s2, i) => `${i + 1}. ${s2}`).join("\n"), "Next Steps");
9460
- gt(dryRun ? "CI/CD setup preview complete!" : "CI/CD setup complete!");
9772
+ note(nextSteps.map((s2, i2) => `${i2 + 1}. ${s2}`).join("\n"), "Next Steps");
9773
+ outro(dryRun ? "CI/CD setup preview complete!" : "CI/CD setup complete!");
9461
9774
  return 0;
9462
9775
  }
9463
9776
  export {