@donotdev/cli 0.1.45 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dependencies-matrix.json +191 -150
  2. package/dist/bin/commands/agent-setup.js +632 -524
  3. package/dist/bin/commands/build.js +1239 -935
  4. package/dist/bin/commands/bump.js +1285 -946
  5. package/dist/bin/commands/cacheout.js +543 -405
  6. package/dist/bin/commands/coach.js +546 -408
  7. package/dist/bin/commands/create-app.js +1198 -862
  8. package/dist/bin/commands/create-project.js +1238 -902
  9. package/dist/bin/commands/db.js +139128 -93775
  10. package/dist/bin/commands/deploy.js +2308 -1936
  11. package/dist/bin/commands/dev.js +912 -662
  12. package/dist/bin/commands/doctor.js +634 -526
  13. package/dist/bin/commands/emu.js +1093 -785
  14. package/dist/bin/commands/format.js +588 -450
  15. package/dist/bin/commands/get-demo.js +1043 -756
  16. package/dist/bin/commands/make-admin.js +20974 -38424
  17. package/dist/bin/commands/preview.js +913 -663
  18. package/dist/bin/commands/seed.js +139129 -93776
  19. package/dist/bin/commands/setup-cicd.js +1130 -817
  20. package/dist/bin/commands/setup.js +1299 -960
  21. package/dist/bin/commands/staging.js +2308 -1936
  22. package/dist/bin/commands/sync-secrets.js +996 -733
  23. package/dist/bin/commands/type-check.js +733 -598
  24. package/dist/bin/commands/wai.js +533 -395
  25. package/dist/bin/dndev.js +9 -8
  26. package/dist/index.js +2720 -2290
  27. package/package.json +3 -3
  28. package/templates/app-next/src/app/ClientLayout.tsx.example +11 -1
  29. package/templates/app-next/src/app/layout.tsx.example +19 -1
  30. package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +8 -18
  31. package/templates/functions-firebase/src/billing/index.ts.example +0 -1
  32. package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +4 -8
  33. package/templates/functions-firebase/src/index.ts.example +0 -1
  34. package/templates/functions-supabase/supabase/config.toml.example +4 -0
  35. package/templates/functions-supabase/supabase/functions/stripe-webhook/index.ts.example +12 -0
  36. package/templates/functions-supabase/supabase/migrations/20250101000005_webhook_events.sql +133 -0
  37. package/templates/functions-vercel/.env.example +9 -0
  38. package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +12 -14
  39. package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +4 -14
  40. package/templates/overlay-supabase/src/config/providers.ts.example +2 -2
  41. package/templates/root-consumer/.claude/hooks/guard-write.sh.example +32 -0
  42. package/templates/root-consumer/.claude/hooks/record-lookup.sh.example +22 -0
  43. package/templates/root-consumer/.claude/rules/definition-of-done.md.example +7 -0
  44. package/templates/root-consumer/.claude/rules/framework.md.example +6 -0
  45. package/templates/root-consumer/.claude/settings.json.example +11 -1
  46. package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -14
  47. package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -20
@@ -5,16 +5,25 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
8
+ get: (a2, b) => (typeof require !== "undefined" ? require : a2)[b]
9
9
  }) : x)(function(x) {
10
10
  if (typeof require !== "undefined") return require.apply(this, arguments);
11
11
  throw Error('Dynamic require of "' + x + '" is not supported');
12
12
  });
13
- var __esm = (fn, res) => function __init() {
14
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
13
+ var __esm = (fn, res, err) => function __init() {
14
+ if (err) throw err[0];
15
+ try {
16
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
17
+ } catch (e) {
18
+ throw err = [e], e;
19
+ }
15
20
  };
16
21
  var __commonJS = (cb, mod) => function __require2() {
17
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
22
+ try {
23
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
24
+ } catch (e) {
25
+ throw mod = 0, e;
26
+ }
18
27
  };
19
28
  var __export = (target, all) => {
20
29
  for (var name in all)
@@ -37,17 +46,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
46
  mod
38
47
  ));
39
48
 
40
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
49
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
41
50
  var init_utils = __esm({
42
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js"() {
51
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js"() {
43
52
  init_utils2();
44
53
  }
45
54
  });
46
55
 
47
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
56
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
48
57
  var EMOJI_RE, MODIFIER_RE;
49
58
  var init_dist = __esm({
50
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js"() {
59
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js"() {
51
60
  init_utils2();
52
61
  init_utils();
53
62
  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");
@@ -55,18 +64,18 @@ var init_dist = __esm({
55
64
  }
56
65
  });
57
66
 
58
- // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
67
+ // node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
59
68
  var init_dist2 = __esm({
60
- "node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
69
+ "node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
61
70
  init_utils2();
62
71
  init_dist();
63
72
  }
64
73
  });
65
74
 
66
- // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
75
+ // node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
67
76
  var ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_ESCAPE_LINK, GROUP_REGEX;
68
77
  var init_main = __esm({
69
- "node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
78
+ "node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js"() {
70
79
  init_utils2();
71
80
  init_dist2();
72
81
  ANSI_ESCAPE_BELL = "\x07";
@@ -85,17 +94,17 @@ var require_src = __commonJS({
85
94
  var ESC = "\x1B";
86
95
  var CSI = `${ESC}[`;
87
96
  var beep = "\x07";
88
- var cursor = {
89
- to(x, y2) {
90
- if (!y2) return `${CSI}${x + 1}G`;
91
- return `${CSI}${y2 + 1};${x + 1}H`;
97
+ var cursor3 = {
98
+ to(x, y) {
99
+ if (!y) return `${CSI}${x + 1}G`;
100
+ return `${CSI}${y + 1};${x + 1}H`;
92
101
  },
93
- move(x, y2) {
102
+ move(x, y) {
94
103
  let ret = "";
95
104
  if (x < 0) ret += `${CSI}${-x}D`;
96
105
  else if (x > 0) ret += `${CSI}${x}C`;
97
- if (y2 < 0) ret += `${CSI}${-y2}A`;
98
- else if (y2 > 0) ret += `${CSI}${y2}B`;
106
+ if (y < 0) ret += `${CSI}${-y}A`;
107
+ else if (y > 0) ret += `${CSI}${y}B`;
99
108
  return ret;
100
109
  },
101
110
  up: (count = 1) => `${CSI}${count}A`,
@@ -114,7 +123,7 @@ var require_src = __commonJS({
114
123
  up: (count = 1) => `${CSI}S`.repeat(count),
115
124
  down: (count = 1) => `${CSI}T`.repeat(count)
116
125
  };
117
- var erase = {
126
+ var erase3 = {
118
127
  screen: `${CSI}2J`,
119
128
  up: (count = 1) => `${CSI}1J`.repeat(count),
120
129
  down: (count = 1) => `${CSI}J`.repeat(count),
@@ -123,118 +132,192 @@ var require_src = __commonJS({
123
132
  lineStart: `${CSI}1K`,
124
133
  lines(count) {
125
134
  let clear = "";
126
- for (let i = 0; i < count; i++)
127
- clear += this.line + (i < count - 1 ? cursor.up() : "");
135
+ for (let i2 = 0; i2 < count; i2++)
136
+ clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
128
137
  if (count)
129
- clear += cursor.left;
138
+ clear += cursor3.left;
130
139
  return clear;
131
140
  }
132
141
  };
133
- module.exports = { cursor, scroll, erase, beep };
142
+ module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
134
143
  }
135
144
  });
136
145
 
137
- // node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
138
- import { styleText as y } from "node:util";
139
- import { stdout as S, stdin as $ } from "node:process";
140
- import { ReadStream as D } from "node:tty";
141
- var import_sisteransi, E, G, u, Y;
146
+ // node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
147
+ import { styleText } from "node:util";
148
+ import { stdout, stdin } from "node:process";
149
+ import { ReadStream } from "node:tty";
150
+ var import_sisteransi, a$1, t, settings, R;
142
151
  var init_dist3 = __esm({
143
- "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
152
+ "node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
144
153
  init_utils2();
145
154
  init_main();
146
155
  import_sisteransi = __toESM(require_src(), 1);
147
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
148
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
149
- 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)}` } } };
150
- Y = globalThis.process.platform.startsWith("win");
156
+ a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
157
+ t = [
158
+ "January",
159
+ "February",
160
+ "March",
161
+ "April",
162
+ "May",
163
+ "June",
164
+ "July",
165
+ "August",
166
+ "September",
167
+ "October",
168
+ "November",
169
+ "December"
170
+ ];
171
+ settings = {
172
+ actions: new Set(a$1),
173
+ aliases: /* @__PURE__ */ new Map([
174
+ // vim support
175
+ ["k", "up"],
176
+ ["j", "down"],
177
+ ["h", "left"],
178
+ ["l", "right"],
179
+ ["", "cancel"],
180
+ // opinionated defaults!
181
+ ["escape", "cancel"]
182
+ ]),
183
+ messages: {
184
+ cancel: "Canceled",
185
+ error: "Something went wrong"
186
+ },
187
+ withGuide: true,
188
+ accessible: void 0,
189
+ date: {
190
+ monthNames: [...t],
191
+ messages: {
192
+ required: "Please enter a valid date",
193
+ invalidMonth: "There are only 12 months in a year",
194
+ invalidDay: (n2, e) => `There are only ${n2} days in ${e}`,
195
+ afterMin: (n2) => `Date must be on or after ${n2.toISOString().slice(0, 10)}`,
196
+ beforeMax: (n2) => `Date must be on or before ${n2.toISOString().slice(0, 10)}`
197
+ }
198
+ }
199
+ };
200
+ R = globalThis.process.platform.startsWith("win");
151
201
  }
152
202
  });
153
203
 
154
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
155
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
156
- import P from "node:process";
157
- import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
158
- import { dirname as be, join as Qe } from "node:path";
159
- function Ze() {
160
- return P.platform !== "win32" ? P.env.TERM !== "linux" : !!P.env.CI || !!P.env.WT_SESSION || !!P.env.TERMINUS_SUBLIME || P.env.ConEmuTask === "{cmd::Cmder}" || P.env.TERM_PROGRAM === "Terminus-Sublime" || P.env.TERM_PROGRAM === "vscode" || P.env.TERM === "xterm-256color" || P.env.TERM === "alacritty" || P.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
204
+ // node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
205
+ import { styleText as styleText2, stripVTControlCharacters } from "node:util";
206
+ import process$1 from "node:process";
207
+ import { existsSync, lstatSync, readdirSync } from "node:fs";
208
+ import { dirname, join } from "node:path";
209
+ function isUnicodeSupported() {
210
+ if (process$1.platform !== "win32") {
211
+ return process$1.env.TERM !== "linux";
212
+ }
213
+ 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";
161
214
  }
162
- var import_sisteransi2, ee, w, _e, oe, ue, F, le, d, E2, Ie, Ee, z2, H2, te, U, J, xe, se, ce, Ge, $e, de, Oe, he, pe, me, ge, O2, mt, gt, Ve, je;
215
+ var import_sisteransi2, unicode, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, MULTISELECT_INSTRUCTIONS, log, intro, outro, u2, SELECT_INSTRUCTIONS, i;
163
216
  var init_dist4 = __esm({
164
- "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
217
+ "node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
165
218
  init_utils2();
166
219
  init_dist3();
167
220
  init_dist3();
168
221
  init_main();
169
222
  init_dist2();
170
223
  import_sisteransi2 = __toESM(require_src(), 1);
171
- ee = Ze();
172
- w = (e, i) => ee ? e : i;
173
- _e = w("\u25C6", "*");
174
- oe = w("\u25A0", "x");
175
- ue = w("\u25B2", "x");
176
- F = w("\u25C7", "o");
177
- le = w("\u250C", "T");
178
- d = w("\u2502", "|");
179
- E2 = w("\u2514", "\u2014");
180
- Ie = w("\u2510", "T");
181
- Ee = w("\u2518", "\u2014");
182
- z2 = w("\u25CF", ">");
183
- H2 = w("\u25CB", " ");
184
- te = w("\u25FB", "[\u2022]");
185
- U = w("\u25FC", "[+]");
186
- J = w("\u25FB", "[ ]");
187
- xe = w("\u25AA", "\u2022");
188
- se = w("\u2500", "-");
189
- ce = w("\u256E", "+");
190
- Ge = w("\u251C", "+");
191
- $e = w("\u256F", "+");
192
- de = w("\u2570", "+");
193
- Oe = w("\u256D", "+");
194
- he = w("\u25CF", "\u2022");
195
- pe = w("\u25C6", "*");
196
- me = w("\u25B2", "!");
197
- ge = w("\u25A0", "x");
198
- O2 = { message: (e = [], { symbol: i = t("gray", d), secondarySymbol: s = t("gray", d), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
199
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
200
- for (let p = 0; p < u2; p++) o.push(a);
201
- const y2 = Array.isArray(e) ? e : e.split(`
224
+ unicode = isUnicodeSupported();
225
+ unicodeOr = (o, e) => unicode ? o : e;
226
+ S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
227
+ S_STEP_CANCEL = unicodeOr("\u25A0", "x");
228
+ S_STEP_ERROR = unicodeOr("\u25B2", "x");
229
+ S_STEP_SUBMIT = unicodeOr("\u25C7", "o");
230
+ S_BAR_START = unicodeOr("\u250C", "T");
231
+ S_BAR = unicodeOr("\u2502", "|");
232
+ S_BAR_END = unicodeOr("\u2514", "\u2014");
233
+ S_BAR_START_RIGHT = unicodeOr("\u2510", "T");
234
+ S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014");
235
+ S_RADIO_ACTIVE = unicodeOr("\u25CF", ">");
236
+ S_RADIO_INACTIVE = unicodeOr("\u25CB", " ");
237
+ S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]");
238
+ S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]");
239
+ S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]");
240
+ S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022");
241
+ S_BAR_H = unicodeOr("\u2500", "-");
242
+ S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+");
243
+ S_CONNECT_LEFT = unicodeOr("\u251C", "+");
244
+ S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+");
245
+ S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+");
246
+ S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+");
247
+ S_INFO = unicodeOr("\u25CF", "\u2022");
248
+ S_SUCCESS = unicodeOr("\u25C6", "*");
249
+ S_WARN = unicodeOr("\u25B2", "!");
250
+ S_ERROR = unicodeOr("\u25A0", "x");
251
+ MULTISELECT_INSTRUCTIONS = [
252
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
253
+ `${styleText2("dim", "Space:")} select`,
254
+ `${styleText2("dim", "Enter:")} confirm`
255
+ ];
256
+ log = {
257
+ message: (s = [], {
258
+ symbol: e = styleText2("gray", S_BAR),
259
+ secondarySymbol: r2 = styleText2("gray", S_BAR),
260
+ output: m = process.stdout,
261
+ spacing: l = 1,
262
+ withGuide: c
263
+ } = {}) => {
264
+ const t2 = [], o = c ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
265
+ for (let i2 = 0; i2 < l; i2++)
266
+ t2.push(f);
267
+ const g = Array.isArray(s) ? s : s.split(`
202
268
  `);
203
- if (y2.length > 0) {
204
- const [p, ...m] = y2;
205
- p.length > 0 ? o.push(`${l}${p}`) : o.push(c2 ? i : "");
206
- for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
207
- }
208
- r.write(`${o.join(`
269
+ if (g.length > 0) {
270
+ const [i2, ...y] = g;
271
+ i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
272
+ for (const p of y)
273
+ p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
274
+ }
275
+ m.write(`${t2.join(`
209
276
  `)}
210
277
  `);
211
- }, info: (e, i) => {
212
- O2.message(e, { ...i, symbol: t("blue", he) });
213
- }, success: (e, i) => {
214
- O2.message(e, { ...i, symbol: t("green", pe) });
215
- }, step: (e, i) => {
216
- O2.message(e, { ...i, symbol: t("green", F) });
217
- }, warn: (e, i) => {
218
- O2.message(e, { ...i, symbol: t("yellow", me) });
219
- }, warning: (e, i) => {
220
- O2.warn(e, i);
221
- }, error: (e, i) => {
222
- O2.message(e, { ...i, symbol: t("red", ge) });
223
- } };
224
- mt = (e = "", i) => {
225
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
226
- s.write(`${r}${e}
278
+ },
279
+ info: (s, e) => {
280
+ log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
281
+ },
282
+ success: (s, e) => {
283
+ log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
284
+ },
285
+ step: (s, e) => {
286
+ log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
287
+ },
288
+ warn: (s, e) => {
289
+ log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
290
+ },
291
+ /** alias for `log.warn()`. */
292
+ warning: (s, e) => {
293
+ log.warn(s, e);
294
+ },
295
+ error: (s, e) => {
296
+ log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
297
+ }
298
+ };
299
+ intro = (o = "", t2) => {
300
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_START)} ` : "";
301
+ i2.write(`${e}${o}
227
302
  `);
228
303
  };
229
- gt = (e = "", i) => {
230
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d)}
231
- ${t("gray", E2)} ` : "";
232
- s.write(`${r}${e}
304
+ outro = (o = "", t2) => {
305
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR)}
306
+ ${styleText2("gray", S_BAR_END)} ` : "";
307
+ i2.write(`${e}${o}
233
308
 
234
309
  `);
235
310
  };
236
- Ve = { light: w("\u2500", "-"), heavy: w("\u2501", "="), block: w("\u2588", "#") };
237
- je = `${t("gray", d)} `;
311
+ u2 = {
312
+ light: unicodeOr("\u2500", "-"),
313
+ heavy: unicodeOr("\u2501", "="),
314
+ block: unicodeOr("\u2588", "#")
315
+ };
316
+ SELECT_INSTRUCTIONS = [
317
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
318
+ `${styleText2("dim", "Enter:")} confirm`
319
+ ];
320
+ i = `${styleText2("gray", S_BAR)} `;
238
321
  }
239
322
  });
240
323
 
@@ -279,7 +362,7 @@ function stringify(value) {
279
362
  function formatMessage(...args) {
280
363
  return args.map(stringify).join(" ");
281
364
  }
282
- var colors, currentLogLevel, log, error, warn, info, success;
365
+ var colors, currentLogLevel, log2, error, warn, info, success;
283
366
  var init_cli_output = __esm({
284
367
  "packages/tooling/src/utils/cli-output.ts"() {
285
368
  "use strict";
@@ -312,7 +395,7 @@ var init_cli_output = __esm({
312
395
  currentLogLevel = envLevel;
313
396
  }
314
397
  }
315
- log = {
398
+ log2 = {
316
399
  /**
317
400
  * Logs an error message (always shows unless Quiet level)
318
401
  * Uses clack's log.error + explicit red color
@@ -320,7 +403,7 @@ var init_cli_output = __esm({
320
403
  error(...args) {
321
404
  if (currentLogLevel < 0 /* Quiet */) return;
322
405
  const message = formatMessage(...args);
323
- O2.error(colorize(message, colors.brightRed));
406
+ log.error(colorize(message, colors.brightRed));
324
407
  },
325
408
  /**
326
409
  * Logs a warning message (shows at Normal level and above)
@@ -329,7 +412,7 @@ var init_cli_output = __esm({
329
412
  warn(...args) {
330
413
  if (currentLogLevel < 1 /* Normal */) return;
331
414
  const message = formatMessage(...args);
332
- O2.warn(colorize(message, colors.brightYellow));
415
+ log.warn(colorize(message, colors.brightYellow));
333
416
  },
334
417
  /**
335
418
  * Logs an info message (shows at Normal level and above)
@@ -338,7 +421,7 @@ var init_cli_output = __esm({
338
421
  info(...args) {
339
422
  if (currentLogLevel < 1 /* Normal */) return;
340
423
  const message = formatMessage(...args);
341
- O2.info(colorize(message, colors.brightCyan));
424
+ log.info(colorize(message, colors.brightCyan));
342
425
  },
343
426
  /**
344
427
  * Logs a success message (shows at Normal level and above)
@@ -347,7 +430,7 @@ var init_cli_output = __esm({
347
430
  success(...args) {
348
431
  if (currentLogLevel < 1 /* Normal */) return;
349
432
  const message = formatMessage(...args);
350
- O2.success(colorize(message, colors.brightGreen));
433
+ log.success(colorize(message, colors.brightGreen));
351
434
  },
352
435
  /**
353
436
  * Logs a debug message (only shows at Verbose level and above)
@@ -356,7 +439,7 @@ var init_cli_output = __esm({
356
439
  debug(...args) {
357
440
  if (currentLogLevel < 2 /* Verbose */) return;
358
441
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
359
- O2.message(
442
+ log.message(
360
443
  colorize(
361
444
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
362
445
  colors.gray
@@ -370,7 +453,7 @@ var init_cli_output = __esm({
370
453
  trace(...args) {
371
454
  if (currentLogLevel < 3 /* Debug */) return;
372
455
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
373
- O2.message(
456
+ log.message(
374
457
  colorize(
375
458
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
376
459
  colors.gray
@@ -378,10 +461,10 @@ var init_cli_output = __esm({
378
461
  );
379
462
  }
380
463
  };
381
- error = log.error.bind(log);
382
- warn = log.warn.bind(log);
383
- info = log.info.bind(log);
384
- success = log.success.bind(log);
464
+ error = log2.error.bind(log2);
465
+ warn = log2.warn.bind(log2);
466
+ info = log2.info.bind(log2);
467
+ success = log2.success.bind(log2);
385
468
  }
386
469
  });
387
470
 
@@ -741,9 +824,9 @@ var require_is_glob = __commonJS({
741
824
  index += 2;
742
825
  var close = chars[open];
743
826
  if (close) {
744
- var n = str.indexOf(close, index);
745
- if (n !== -1) {
746
- index = n + 1;
827
+ var n2 = str.indexOf(close, index);
828
+ if (n2 !== -1) {
829
+ index = n2 + 1;
747
830
  }
748
831
  }
749
832
  if (str[index] === "!") {
@@ -769,9 +852,9 @@ var require_is_glob = __commonJS({
769
852
  index += 2;
770
853
  var close = chars[open];
771
854
  if (close) {
772
- var n = str.indexOf(close, index);
773
- if (n !== -1) {
774
- index = n + 1;
855
+ var n2 = str.indexOf(close, index);
856
+ if (n2 !== -1) {
857
+ index = n2 + 1;
775
858
  }
776
859
  }
777
860
  if (str[index] === "!") {
@@ -849,8 +932,8 @@ var require_utils = __commonJS({
849
932
  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
850
933
  return (Number(max) - Number(min)) / Number(step) >= limit;
851
934
  };
852
- exports.escapeNode = (block, n = 0, type) => {
853
- const node = block.nodes[n];
935
+ exports.escapeNode = (block2, n2 = 0, type) => {
936
+ const node = block2.nodes[n2];
854
937
  if (!node) return;
855
938
  if (type && node.type === type || node.type === "open" || node.type === "close") {
856
939
  if (node.escaped !== true) {
@@ -867,15 +950,15 @@ var require_utils = __commonJS({
867
950
  }
868
951
  return false;
869
952
  };
870
- exports.isInvalidBrace = (block) => {
871
- if (block.type !== "brace") return false;
872
- if (block.invalid === true || block.dollar) return true;
873
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
874
- block.invalid = true;
953
+ exports.isInvalidBrace = (block2) => {
954
+ if (block2.type !== "brace") return false;
955
+ if (block2.invalid === true || block2.dollar) return true;
956
+ if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
957
+ block2.invalid = true;
875
958
  return true;
876
959
  }
877
- if (block.open !== true || block.close !== true) {
878
- block.invalid = true;
960
+ if (block2.open !== true || block2.close !== true) {
961
+ block2.invalid = true;
879
962
  return true;
880
963
  }
881
964
  return false;
@@ -894,8 +977,8 @@ var require_utils = __commonJS({
894
977
  exports.flatten = (...args) => {
895
978
  const result = [];
896
979
  const flat = (arr) => {
897
- for (let i = 0; i < arr.length; i++) {
898
- const ele = arr[i];
980
+ for (let i2 = 0; i2 < arr.length; i2++) {
981
+ const ele = arr[i2];
899
982
  if (Array.isArray(ele)) {
900
983
  flat(ele);
901
984
  continue;
@@ -989,9 +1072,9 @@ var require_to_regex_range = __commonJS({
989
1072
  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
990
1073
  return toRegexRange.cache[cacheKey].result;
991
1074
  }
992
- let a = Math.min(min, max);
1075
+ let a2 = Math.min(min, max);
993
1076
  let b = Math.max(min, max);
994
- if (Math.abs(a - b) === 1) {
1077
+ if (Math.abs(a2 - b) === 1) {
995
1078
  let result = min + "|" + max;
996
1079
  if (opts.capture) {
997
1080
  return `(${result})`;
@@ -1002,20 +1085,20 @@ var require_to_regex_range = __commonJS({
1002
1085
  return `(?:${result})`;
1003
1086
  }
1004
1087
  let isPadded = hasPadding(min) || hasPadding(max);
1005
- let state = { min, max, a, b };
1088
+ let state = { min, max, a: a2, b };
1006
1089
  let positives = [];
1007
1090
  let negatives = [];
1008
1091
  if (isPadded) {
1009
1092
  state.isPadded = isPadded;
1010
1093
  state.maxLen = String(state.max).length;
1011
1094
  }
1012
- if (a < 0) {
1095
+ if (a2 < 0) {
1013
1096
  let newMin = b < 0 ? Math.abs(b) : 1;
1014
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1015
- a = state.a = 0;
1097
+ negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
1098
+ a2 = state.a = 0;
1016
1099
  }
1017
1100
  if (b >= 0) {
1018
- positives = splitToPatterns(a, b, state, opts);
1101
+ positives = splitToPatterns(a2, b, state, opts);
1019
1102
  }
1020
1103
  state.negatives = negatives;
1021
1104
  state.positives = positives;
@@ -1063,8 +1146,8 @@ var require_to_regex_range = __commonJS({
1063
1146
  let digits = zipped.length;
1064
1147
  let pattern = "";
1065
1148
  let count = 0;
1066
- for (let i = 0; i < digits; i++) {
1067
- let [startDigit, stopDigit] = zipped[i];
1149
+ for (let i2 = 0; i2 < digits; i2++) {
1150
+ let [startDigit, stopDigit] = zipped[i2];
1068
1151
  if (startDigit === stopDigit) {
1069
1152
  pattern += startDigit;
1070
1153
  } else if (startDigit !== "0" || stopDigit !== "9") {
@@ -1083,8 +1166,8 @@ var require_to_regex_range = __commonJS({
1083
1166
  let tokens = [];
1084
1167
  let start = min;
1085
1168
  let prev;
1086
- for (let i = 0; i < ranges.length; i++) {
1087
- let max2 = ranges[i];
1169
+ for (let i2 = 0; i2 < ranges.length; i2++) {
1170
+ let max2 = ranges[i2];
1088
1171
  let obj = rangeToPattern(String(start), String(max2), options);
1089
1172
  let zeros = "";
1090
1173
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
@@ -1119,13 +1202,13 @@ var require_to_regex_range = __commonJS({
1119
1202
  }
1120
1203
  return result;
1121
1204
  }
1122
- function zip(a, b) {
1205
+ function zip(a2, b) {
1123
1206
  let arr = [];
1124
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
1207
+ for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
1125
1208
  return arr;
1126
1209
  }
1127
- function compare(a, b) {
1128
- return a > b ? 1 : b > a ? -1 : 0;
1210
+ function compare(a2, b) {
1211
+ return a2 > b ? 1 : b > a2 ? -1 : 0;
1129
1212
  }
1130
1213
  function contains(arr, key, val) {
1131
1214
  return arr.some((ele) => ele[key] === val);
@@ -1143,8 +1226,8 @@ var require_to_regex_range = __commonJS({
1143
1226
  }
1144
1227
  return "";
1145
1228
  }
1146
- function toCharacterClass(a, b, options) {
1147
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
1229
+ function toCharacterClass(a2, b, options) {
1230
+ return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
1148
1231
  }
1149
1232
  function hasPadding(str) {
1150
1233
  return /^-?(0+)\d/.test(str);
@@ -1223,8 +1306,8 @@ var require_fill_range = __commonJS({
1223
1306
  return negative ? "-" + input : input;
1224
1307
  };
1225
1308
  var toSequence = (parts, options, maxLen) => {
1226
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1227
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1309
+ parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
1310
+ parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
1228
1311
  let prefix = options.capture ? "" : "?:";
1229
1312
  let positives = "";
1230
1313
  let negatives = "";
@@ -1245,12 +1328,12 @@ var require_fill_range = __commonJS({
1245
1328
  }
1246
1329
  return result;
1247
1330
  };
1248
- var toRange = (a, b, isNumbers, options) => {
1331
+ var toRange = (a2, b, isNumbers, options) => {
1249
1332
  if (isNumbers) {
1250
- return toRegexRange(a, b, { wrap: false, ...options });
1333
+ return toRegexRange(a2, b, { wrap: false, ...options });
1251
1334
  }
1252
- let start = String.fromCharCode(a);
1253
- if (a === b) return start;
1335
+ let start = String.fromCharCode(a2);
1336
+ if (a2 === b) return start;
1254
1337
  let stop = String.fromCharCode(b);
1255
1338
  return `[${start}-${stop}]`;
1256
1339
  };
@@ -1276,15 +1359,15 @@ var require_fill_range = __commonJS({
1276
1359
  return [];
1277
1360
  };
1278
1361
  var fillNumbers = (start, end, step = 1, options = {}) => {
1279
- let a = Number(start);
1362
+ let a2 = Number(start);
1280
1363
  let b = Number(end);
1281
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
1364
+ if (!Number.isInteger(a2) || !Number.isInteger(b)) {
1282
1365
  if (options.strictRanges === true) throw rangeError([start, end]);
1283
1366
  return [];
1284
1367
  }
1285
- if (a === 0) a = 0;
1368
+ if (a2 === 0) a2 = 0;
1286
1369
  if (b === 0) b = 0;
1287
- let descending = a > b;
1370
+ let descending = a2 > b;
1288
1371
  let startString = String(start);
1289
1372
  let endString = String(end);
1290
1373
  let stepString = String(step);
@@ -1300,13 +1383,13 @@ var require_fill_range = __commonJS({
1300
1383
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
1301
1384
  let range = [];
1302
1385
  let index = 0;
1303
- while (descending ? a >= b : a <= b) {
1386
+ while (descending ? a2 >= b : a2 <= b) {
1304
1387
  if (options.toRegex === true && step > 1) {
1305
- push(a);
1388
+ push(a2);
1306
1389
  } else {
1307
- range.push(pad(format(a, index), maxLen, toNumber));
1390
+ range.push(pad(format(a2, index), maxLen, toNumber));
1308
1391
  }
1309
- a = descending ? a - step : a + step;
1392
+ a2 = descending ? a2 - step : a2 + step;
1310
1393
  index++;
1311
1394
  }
1312
1395
  if (options.toRegex === true) {
@@ -1319,19 +1402,19 @@ var require_fill_range = __commonJS({
1319
1402
  return invalidRange(start, end, options);
1320
1403
  }
1321
1404
  let format = options.transform || ((val) => String.fromCharCode(val));
1322
- let a = `${start}`.charCodeAt(0);
1405
+ let a2 = `${start}`.charCodeAt(0);
1323
1406
  let b = `${end}`.charCodeAt(0);
1324
- let descending = a > b;
1325
- let min = Math.min(a, b);
1326
- let max = Math.max(a, b);
1407
+ let descending = a2 > b;
1408
+ let min = Math.min(a2, b);
1409
+ let max = Math.max(a2, b);
1327
1410
  if (options.toRegex && step === 1) {
1328
1411
  return toRange(min, max, false, options);
1329
1412
  }
1330
1413
  let range = [];
1331
1414
  let index = 0;
1332
- while (descending ? a >= b : a <= b) {
1333
- range.push(format(a, index));
1334
- a = descending ? a - step : a + step;
1415
+ while (descending ? a2 >= b : a2 <= b) {
1416
+ range.push(format(a2, index));
1417
+ a2 = descending ? a2 - step : a2 + step;
1335
1418
  index++;
1336
1419
  }
1337
1420
  if (options.toRegex === true) {
@@ -1455,17 +1538,17 @@ var require_expand = __commonJS({
1455
1538
  const walk = (node, parent = {}) => {
1456
1539
  node.queue = [];
1457
1540
  let p = parent;
1458
- let q2 = parent.queue;
1541
+ let q = parent.queue;
1459
1542
  while (p.type !== "brace" && p.type !== "root" && p.parent) {
1460
1543
  p = p.parent;
1461
- q2 = p.queue;
1544
+ q = p.queue;
1462
1545
  }
1463
1546
  if (node.invalid || node.dollar) {
1464
- q2.push(append(q2.pop(), stringify2(node, options)));
1547
+ q.push(append(q.pop(), stringify2(node, options)));
1465
1548
  return;
1466
1549
  }
1467
1550
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
1468
- q2.push(append(q2.pop(), ["{}"]));
1551
+ q.push(append(q.pop(), ["{}"]));
1469
1552
  return;
1470
1553
  }
1471
1554
  if (node.nodes && node.ranges > 0) {
@@ -1477,26 +1560,26 @@ var require_expand = __commonJS({
1477
1560
  if (range.length === 0) {
1478
1561
  range = stringify2(node, options);
1479
1562
  }
1480
- q2.push(append(q2.pop(), range));
1563
+ q.push(append(q.pop(), range));
1481
1564
  node.nodes = [];
1482
1565
  return;
1483
1566
  }
1484
1567
  const enclose = utils.encloseBrace(node);
1485
1568
  let queue = node.queue;
1486
- let block = node;
1487
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
1488
- block = block.parent;
1489
- queue = block.queue;
1569
+ let block2 = node;
1570
+ while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
1571
+ block2 = block2.parent;
1572
+ queue = block2.queue;
1490
1573
  }
1491
- for (let i = 0; i < node.nodes.length; i++) {
1492
- const child = node.nodes[i];
1574
+ for (let i2 = 0; i2 < node.nodes.length; i2++) {
1575
+ const child = node.nodes[i2];
1493
1576
  if (child.type === "comma" && node.type === "brace") {
1494
- if (i === 1) queue.push("");
1577
+ if (i2 === 1) queue.push("");
1495
1578
  queue.push("");
1496
1579
  continue;
1497
1580
  }
1498
1581
  if (child.type === "close") {
1499
- q2.push(append(q2.pop(), queue, enclose));
1582
+ q.push(append(q.pop(), queue, enclose));
1500
1583
  continue;
1501
1584
  }
1502
1585
  if (child.value && child.type !== "open") {
@@ -1663,7 +1746,7 @@ var require_parse = __commonJS({
1663
1746
  }
1664
1747
  const ast = { type: "root", input, nodes: [] };
1665
1748
  const stack = [ast];
1666
- let block = ast;
1749
+ let block2 = ast;
1667
1750
  let prev = ast;
1668
1751
  let brackets = 0;
1669
1752
  const length = input.length;
@@ -1679,15 +1762,15 @@ var require_parse = __commonJS({
1679
1762
  prev.value += node.value;
1680
1763
  return;
1681
1764
  }
1682
- block.nodes.push(node);
1683
- node.parent = block;
1765
+ block2.nodes.push(node);
1766
+ node.parent = block2;
1684
1767
  node.prev = prev;
1685
1768
  prev = node;
1686
1769
  return node;
1687
1770
  };
1688
1771
  push({ type: "bos" });
1689
1772
  while (index < length) {
1690
- block = stack[stack.length - 1];
1773
+ block2 = stack[stack.length - 1];
1691
1774
  value = advance();
1692
1775
  if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
1693
1776
  continue;
@@ -1724,19 +1807,19 @@ var require_parse = __commonJS({
1724
1807
  continue;
1725
1808
  }
1726
1809
  if (value === CHAR_LEFT_PARENTHESES) {
1727
- block = push({ type: "paren", nodes: [] });
1728
- stack.push(block);
1810
+ block2 = push({ type: "paren", nodes: [] });
1811
+ stack.push(block2);
1729
1812
  push({ type: "text", value });
1730
1813
  continue;
1731
1814
  }
1732
1815
  if (value === CHAR_RIGHT_PARENTHESES) {
1733
- if (block.type !== "paren") {
1816
+ if (block2.type !== "paren") {
1734
1817
  push({ type: "text", value });
1735
1818
  continue;
1736
1819
  }
1737
- block = stack.pop();
1820
+ block2 = stack.pop();
1738
1821
  push({ type: "text", value });
1739
- block = stack[stack.length - 1];
1822
+ block2 = stack[stack.length - 1];
1740
1823
  continue;
1741
1824
  }
1742
1825
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
@@ -1761,7 +1844,7 @@ var require_parse = __commonJS({
1761
1844
  }
1762
1845
  if (value === CHAR_LEFT_CURLY_BRACE) {
1763
1846
  depth++;
1764
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
1847
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
1765
1848
  const brace = {
1766
1849
  type: "brace",
1767
1850
  open: true,
@@ -1772,52 +1855,52 @@ var require_parse = __commonJS({
1772
1855
  ranges: 0,
1773
1856
  nodes: []
1774
1857
  };
1775
- block = push(brace);
1776
- stack.push(block);
1858
+ block2 = push(brace);
1859
+ stack.push(block2);
1777
1860
  push({ type: "open", value });
1778
1861
  continue;
1779
1862
  }
1780
1863
  if (value === CHAR_RIGHT_CURLY_BRACE) {
1781
- if (block.type !== "brace") {
1864
+ if (block2.type !== "brace") {
1782
1865
  push({ type: "text", value });
1783
1866
  continue;
1784
1867
  }
1785
1868
  const type = "close";
1786
- block = stack.pop();
1787
- block.close = true;
1869
+ block2 = stack.pop();
1870
+ block2.close = true;
1788
1871
  push({ type, value });
1789
1872
  depth--;
1790
- block = stack[stack.length - 1];
1873
+ block2 = stack[stack.length - 1];
1791
1874
  continue;
1792
1875
  }
1793
1876
  if (value === CHAR_COMMA && depth > 0) {
1794
- if (block.ranges > 0) {
1795
- block.ranges = 0;
1796
- const open = block.nodes.shift();
1797
- block.nodes = [open, { type: "text", value: stringify2(block) }];
1877
+ if (block2.ranges > 0) {
1878
+ block2.ranges = 0;
1879
+ const open = block2.nodes.shift();
1880
+ block2.nodes = [open, { type: "text", value: stringify2(block2) }];
1798
1881
  }
1799
1882
  push({ type: "comma", value });
1800
- block.commas++;
1883
+ block2.commas++;
1801
1884
  continue;
1802
1885
  }
1803
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
1804
- const siblings = block.nodes;
1886
+ if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
1887
+ const siblings = block2.nodes;
1805
1888
  if (depth === 0 || siblings.length === 0) {
1806
1889
  push({ type: "text", value });
1807
1890
  continue;
1808
1891
  }
1809
1892
  if (prev.type === "dot") {
1810
- block.range = [];
1893
+ block2.range = [];
1811
1894
  prev.value += value;
1812
1895
  prev.type = "range";
1813
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
1814
- block.invalid = true;
1815
- block.ranges = 0;
1896
+ if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
1897
+ block2.invalid = true;
1898
+ block2.ranges = 0;
1816
1899
  prev.type = "text";
1817
1900
  continue;
1818
1901
  }
1819
- block.ranges++;
1820
- block.args = [];
1902
+ block2.ranges++;
1903
+ block2.args = [];
1821
1904
  continue;
1822
1905
  }
1823
1906
  if (prev.type === "range") {
@@ -1825,7 +1908,7 @@ var require_parse = __commonJS({
1825
1908
  const before = siblings[siblings.length - 1];
1826
1909
  before.value += prev.value + value;
1827
1910
  prev = before;
1828
- block.ranges--;
1911
+ block2.ranges--;
1829
1912
  continue;
1830
1913
  }
1831
1914
  push({ type: "dot", value });
@@ -1834,9 +1917,9 @@ var require_parse = __commonJS({
1834
1917
  push({ type: "text", value });
1835
1918
  }
1836
1919
  do {
1837
- block = stack.pop();
1838
- if (block.type !== "root") {
1839
- block.nodes.forEach((node) => {
1920
+ block2 = stack.pop();
1921
+ if (block2.type !== "root") {
1922
+ block2.nodes.forEach((node) => {
1840
1923
  if (!node.nodes) {
1841
1924
  if (node.type === "open") node.isOpen = true;
1842
1925
  if (node.type === "close") node.isClose = true;
@@ -1845,8 +1928,8 @@ var require_parse = __commonJS({
1845
1928
  }
1846
1929
  });
1847
1930
  const parent = stack[stack.length - 1];
1848
- const index2 = parent.nodes.indexOf(block);
1849
- parent.nodes.splice(index2, 1, ...block.nodes);
1931
+ const index2 = parent.nodes.indexOf(block2);
1932
+ parent.nodes.splice(index2, 1, ...block2.nodes);
1850
1933
  }
1851
1934
  } while (stack.length > 0);
1852
1935
  push({ type: "eos" });
@@ -2479,9 +2562,9 @@ var require_scan = __commonJS({
2479
2562
  if (opts.parts === true || opts.tokens === true) {
2480
2563
  let prevIndex;
2481
2564
  for (let idx = 0; idx < slashes.length; idx++) {
2482
- const n = prevIndex ? prevIndex + 1 : start;
2483
- const i = slashes[idx];
2484
- const value = input.slice(n, i);
2565
+ const n2 = prevIndex ? prevIndex + 1 : start;
2566
+ const i2 = slashes[idx];
2567
+ const value = input.slice(n2, i2);
2485
2568
  if (opts.tokens) {
2486
2569
  if (idx === 0 && start !== 0) {
2487
2570
  tokens[idx].isPrefix = true;
@@ -2495,7 +2578,7 @@ var require_scan = __commonJS({
2495
2578
  if (idx !== 0 || value !== "") {
2496
2579
  parts.push(value);
2497
2580
  }
2498
- prevIndex = i;
2581
+ prevIndex = i2;
2499
2582
  }
2500
2583
  if (prevIndex && prevIndex + 1 < input.length) {
2501
2584
  const value = input.slice(prevIndex + 1);
@@ -2624,15 +2707,15 @@ var require_parse2 = __commonJS({
2624
2707
  };
2625
2708
  var hasRepeatedCharPrefixOverlap = (branches) => {
2626
2709
  const values = branches.map(normalizeSimpleBranch).filter(Boolean);
2627
- for (let i = 0; i < values.length; i++) {
2628
- for (let j = i + 1; j < values.length; j++) {
2629
- const a = values[i];
2710
+ for (let i2 = 0; i2 < values.length; i2++) {
2711
+ for (let j = i2 + 1; j < values.length; j++) {
2712
+ const a2 = values[i2];
2630
2713
  const b = values[j];
2631
- const char = a[0];
2632
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
2714
+ const char = a2[0];
2715
+ if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
2633
2716
  continue;
2634
2717
  }
2635
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
2718
+ if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
2636
2719
  return true;
2637
2720
  }
2638
2721
  }
@@ -2647,8 +2730,8 @@ var require_parse2 = __commonJS({
2647
2730
  let paren = 0;
2648
2731
  let quote = 0;
2649
2732
  let escaped = false;
2650
- for (let i = 1; i < pattern.length; i++) {
2651
- const ch = pattern[i];
2733
+ for (let i2 = 1; i2 < pattern.length; i2++) {
2734
+ const ch = pattern[i2];
2652
2735
  if (escaped === true) {
2653
2736
  escaped = false;
2654
2737
  continue;
@@ -2682,13 +2765,13 @@ var require_parse2 = __commonJS({
2682
2765
  if (ch === ")") {
2683
2766
  paren--;
2684
2767
  if (paren === 0) {
2685
- if (requireEnd === true && i !== pattern.length - 1) {
2768
+ if (requireEnd === true && i2 !== pattern.length - 1) {
2686
2769
  return;
2687
2770
  }
2688
2771
  return {
2689
2772
  type: pattern[0],
2690
- body: pattern.slice(2, i),
2691
- end: i
2773
+ body: pattern.slice(2, i2),
2774
+ end: i2
2692
2775
  };
2693
2776
  }
2694
2777
  }
@@ -2820,7 +2903,7 @@ var require_parse2 = __commonJS({
2820
2903
  let prev = bos;
2821
2904
  let value;
2822
2905
  const eos = () => state.index === len - 1;
2823
- const peek = state.peek = (n = 1) => input[state.index + n];
2906
+ const peek = state.peek = (n2 = 1) => input[state.index + n2];
2824
2907
  const advance = state.advance = () => input[++state.index] || "";
2825
2908
  const remaining = () => input.slice(state.index + 1);
2826
2909
  const consume = (value2 = "", num = 0) => {
@@ -2901,10 +2984,10 @@ var require_parse2 = __commonJS({
2901
2984
  open.type = "text";
2902
2985
  open.value = literal;
2903
2986
  open.output = safeOutput || utils.escapeRegex(literal);
2904
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
2905
- tokens[i].value = "";
2906
- tokens[i].output = "";
2907
- delete tokens[i].suffix;
2987
+ for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
2988
+ tokens[i2].value = "";
2989
+ tokens[i2].output = "";
2990
+ delete tokens[i2].suffix;
2908
2991
  }
2909
2992
  state.output = token.output + open.output;
2910
2993
  state.backtrack = true;
@@ -3147,13 +3230,13 @@ var require_parse2 = __commonJS({
3147
3230
  if (brace.dots === true) {
3148
3231
  const arr = tokens.slice();
3149
3232
  const range = [];
3150
- for (let i = arr.length - 1; i >= 0; i--) {
3233
+ for (let i2 = arr.length - 1; i2 >= 0; i2--) {
3151
3234
  tokens.pop();
3152
- if (arr[i].type === "brace") {
3235
+ if (arr[i2].type === "brace") {
3153
3236
  break;
3154
3237
  }
3155
- if (arr[i].type !== "dots") {
3156
- range.unshift(arr[i].value);
3238
+ if (arr[i2].type !== "dots") {
3239
+ range.unshift(arr[i2].value);
3157
3240
  }
3158
3241
  }
3159
3242
  output = expandRange(range, opts);
@@ -3696,8 +3779,8 @@ var require_micromatch = __commonJS({
3696
3779
  options.onResult(state);
3697
3780
  }
3698
3781
  };
3699
- for (let i = 0; i < patterns.length; i++) {
3700
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
3782
+ for (let i2 = 0; i2 < patterns.length; i2++) {
3783
+ let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
3701
3784
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
3702
3785
  if (negated) negatives++;
3703
3786
  for (let item of list) {
@@ -3945,7 +4028,7 @@ var require_pattern = __commonJS({
3945
4028
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
3946
4029
  function expandBraceExpansion(pattern) {
3947
4030
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
3948
- patterns.sort((a, b) => a.length - b.length);
4031
+ patterns.sort((a2, b) => a2.length - b.length);
3949
4032
  return patterns.filter((pattern2) => pattern2 !== "");
3950
4033
  }
3951
4034
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4026,8 +4109,8 @@ var require_merge2 = __commonJS({
4026
4109
  }
4027
4110
  const mergedStream = PassThrough(options);
4028
4111
  function addStream() {
4029
- for (let i = 0, len = arguments.length; i < len; i++) {
4030
- streamsQueue.push(pauseStreams(arguments[i], options));
4112
+ for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
4113
+ streamsQueue.push(pauseStreams(arguments[i2], options));
4031
4114
  }
4032
4115
  mergeStream();
4033
4116
  return this;
@@ -4076,8 +4159,8 @@ var require_merge2 = __commonJS({
4076
4159
  stream.pipe(mergedStream, { end: false });
4077
4160
  stream.resume();
4078
4161
  }
4079
- for (let i = 0; i < streams.length; i++) {
4080
- pipe(streams[i]);
4162
+ for (let i2 = 0; i2 < streams.length; i2++) {
4163
+ pipe(streams[i2]);
4081
4164
  }
4082
4165
  next();
4083
4166
  }
@@ -4108,8 +4191,8 @@ var require_merge2 = __commonJS({
4108
4191
  }
4109
4192
  streams.pause();
4110
4193
  } else {
4111
- for (let i = 0, len = streams.length; i < len; i++) {
4112
- streams[i] = pauseStreams(streams[i], options);
4194
+ for (let i2 = 0, len = streams.length; i2 < len; i2++) {
4195
+ streams[i2] = pauseStreams(streams[i2], options);
4113
4196
  }
4114
4197
  }
4115
4198
  return streams;
@@ -4191,13 +4274,13 @@ var require_tasks = __commonJS({
4191
4274
  Object.defineProperty(exports, "__esModule", { value: true });
4192
4275
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
4193
4276
  var utils = require_utils3();
4194
- function generate(input, settings) {
4195
- const patterns = processPatterns(input, settings);
4196
- const ignore = processPatterns(settings.ignore, settings);
4277
+ function generate(input, settings2) {
4278
+ const patterns = processPatterns(input, settings2);
4279
+ const ignore = processPatterns(settings2.ignore, settings2);
4197
4280
  const positivePatterns = getPositivePatterns(patterns);
4198
4281
  const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
4199
- const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
4200
- const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
4282
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
4283
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
4201
4284
  const staticTasks = convertPatternsToTasks(
4202
4285
  staticPatterns,
4203
4286
  negativePatterns,
@@ -4213,12 +4296,12 @@ var require_tasks = __commonJS({
4213
4296
  return staticTasks.concat(dynamicTasks);
4214
4297
  }
4215
4298
  exports.generate = generate;
4216
- function processPatterns(input, settings) {
4299
+ function processPatterns(input, settings2) {
4217
4300
  let patterns = input;
4218
- if (settings.braceExpansion) {
4301
+ if (settings2.braceExpansion) {
4219
4302
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
4220
4303
  }
4221
- if (settings.baseNameMatch) {
4304
+ if (settings2.baseNameMatch) {
4222
4305
  patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
4223
4306
  }
4224
4307
  return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
@@ -4287,26 +4370,26 @@ var require_async = __commonJS({
4287
4370
  init_utils2();
4288
4371
  Object.defineProperty(exports, "__esModule", { value: true });
4289
4372
  exports.read = void 0;
4290
- function read(path, settings, callback) {
4291
- settings.fs.lstat(path, (lstatError, lstat) => {
4373
+ function read(path, settings2, callback) {
4374
+ settings2.fs.lstat(path, (lstatError, lstat) => {
4292
4375
  if (lstatError !== null) {
4293
4376
  callFailureCallback(callback, lstatError);
4294
4377
  return;
4295
4378
  }
4296
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
4379
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
4297
4380
  callSuccessCallback(callback, lstat);
4298
4381
  return;
4299
4382
  }
4300
- settings.fs.stat(path, (statError, stat) => {
4383
+ settings2.fs.stat(path, (statError, stat) => {
4301
4384
  if (statError !== null) {
4302
- if (settings.throwErrorOnBrokenSymbolicLink) {
4385
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
4303
4386
  callFailureCallback(callback, statError);
4304
4387
  return;
4305
4388
  }
4306
4389
  callSuccessCallback(callback, lstat);
4307
4390
  return;
4308
4391
  }
4309
- if (settings.markSymbolicLink) {
4392
+ if (settings2.markSymbolicLink) {
4310
4393
  stat.isSymbolicLink = () => true;
4311
4394
  }
4312
4395
  callSuccessCallback(callback, stat);
@@ -4330,19 +4413,19 @@ var require_sync = __commonJS({
4330
4413
  init_utils2();
4331
4414
  Object.defineProperty(exports, "__esModule", { value: true });
4332
4415
  exports.read = void 0;
4333
- function read(path, settings) {
4334
- const lstat = settings.fs.lstatSync(path);
4335
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
4416
+ function read(path, settings2) {
4417
+ const lstat = settings2.fs.lstatSync(path);
4418
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
4336
4419
  return lstat;
4337
4420
  }
4338
4421
  try {
4339
- const stat = settings.fs.statSync(path);
4340
- if (settings.markSymbolicLink) {
4422
+ const stat = settings2.fs.statSync(path);
4423
+ if (settings2.markSymbolicLink) {
4341
4424
  stat.isSymbolicLink = () => true;
4342
4425
  }
4343
4426
  return stat;
4344
4427
  } catch (error2) {
4345
- if (!settings.throwErrorOnBrokenSymbolicLink) {
4428
+ if (!settings2.throwErrorOnBrokenSymbolicLink) {
4346
4429
  return lstat;
4347
4430
  }
4348
4431
  throw error2;
@@ -4419,8 +4502,8 @@ var require_out = __commonJS({
4419
4502
  }
4420
4503
  exports.stat = stat;
4421
4504
  function statSync3(path, optionsOrSettings) {
4422
- const settings = getSettings(optionsOrSettings);
4423
- return sync.read(path, settings);
4505
+ const settings2 = getSettings(optionsOrSettings);
4506
+ return sync.read(path, settings2);
4424
4507
  }
4425
4508
  exports.statSync = statSync3;
4426
4509
  function getSettings(settingsOrOptions = {}) {
@@ -4468,8 +4551,8 @@ var require_run_parallel = __commonJS({
4468
4551
  if (isSync) queueMicrotask2(end);
4469
4552
  else end();
4470
4553
  }
4471
- function each(i, err, result) {
4472
- results[i] = result;
4554
+ function each(i2, err, result) {
4555
+ results[i2] = result;
4473
4556
  if (--pending === 0 || err) {
4474
4557
  done(err);
4475
4558
  }
@@ -4483,9 +4566,9 @@ var require_run_parallel = __commonJS({
4483
4566
  });
4484
4567
  });
4485
4568
  } else {
4486
- tasks.forEach(function(task, i) {
4569
+ tasks.forEach(function(task, i2) {
4487
4570
  task(function(err, result) {
4488
- each(i, err, result);
4571
+ each(i2, err, result);
4489
4572
  });
4490
4573
  });
4491
4574
  }
@@ -4560,11 +4643,11 @@ var require_common = __commonJS({
4560
4643
  init_utils2();
4561
4644
  Object.defineProperty(exports, "__esModule", { value: true });
4562
4645
  exports.joinPathSegments = void 0;
4563
- function joinPathSegments(a, b, separator) {
4564
- if (a.endsWith(separator)) {
4565
- return a + b;
4646
+ function joinPathSegments(a2, b, separator) {
4647
+ if (a2.endsWith(separator)) {
4648
+ return a2 + b;
4566
4649
  }
4567
- return a + separator + b;
4650
+ return a2 + separator + b;
4568
4651
  }
4569
4652
  exports.joinPathSegments = joinPathSegments;
4570
4653
  }
@@ -4582,16 +4665,16 @@ var require_async2 = __commonJS({
4582
4665
  var constants_1 = require_constants3();
4583
4666
  var utils = require_utils4();
4584
4667
  var common = require_common();
4585
- function read(directory, settings, callback) {
4586
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
4587
- readdirWithFileTypes(directory, settings, callback);
4668
+ function read(directory, settings2, callback) {
4669
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
4670
+ readdirWithFileTypes(directory, settings2, callback);
4588
4671
  return;
4589
4672
  }
4590
- readdir(directory, settings, callback);
4673
+ readdir(directory, settings2, callback);
4591
4674
  }
4592
4675
  exports.read = read;
4593
- function readdirWithFileTypes(directory, settings, callback) {
4594
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
4676
+ function readdirWithFileTypes(directory, settings2, callback) {
4677
+ settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
4595
4678
  if (readdirError !== null) {
4596
4679
  callFailureCallback(callback, readdirError);
4597
4680
  return;
@@ -4599,13 +4682,13 @@ var require_async2 = __commonJS({
4599
4682
  const entries = dirents.map((dirent) => ({
4600
4683
  dirent,
4601
4684
  name: dirent.name,
4602
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
4685
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
4603
4686
  }));
4604
- if (!settings.followSymbolicLinks) {
4687
+ if (!settings2.followSymbolicLinks) {
4605
4688
  callSuccessCallback(callback, entries);
4606
4689
  return;
4607
4690
  }
4608
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
4691
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
4609
4692
  rpl(tasks, (rplError, rplEntries) => {
4610
4693
  if (rplError !== null) {
4611
4694
  callFailureCallback(callback, rplError);
@@ -4616,15 +4699,15 @@ var require_async2 = __commonJS({
4616
4699
  });
4617
4700
  }
4618
4701
  exports.readdirWithFileTypes = readdirWithFileTypes;
4619
- function makeRplTaskEntry(entry, settings) {
4702
+ function makeRplTaskEntry(entry, settings2) {
4620
4703
  return (done) => {
4621
4704
  if (!entry.dirent.isSymbolicLink()) {
4622
4705
  done(null, entry);
4623
4706
  return;
4624
4707
  }
4625
- settings.fs.stat(entry.path, (statError, stats) => {
4708
+ settings2.fs.stat(entry.path, (statError, stats) => {
4626
4709
  if (statError !== null) {
4627
- if (settings.throwErrorOnBrokenSymbolicLink) {
4710
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
4628
4711
  done(statError);
4629
4712
  return;
4630
4713
  }
@@ -4636,16 +4719,16 @@ var require_async2 = __commonJS({
4636
4719
  });
4637
4720
  };
4638
4721
  }
4639
- function readdir(directory, settings, callback) {
4640
- settings.fs.readdir(directory, (readdirError, names) => {
4722
+ function readdir(directory, settings2, callback) {
4723
+ settings2.fs.readdir(directory, (readdirError, names) => {
4641
4724
  if (readdirError !== null) {
4642
4725
  callFailureCallback(callback, readdirError);
4643
4726
  return;
4644
4727
  }
4645
4728
  const tasks = names.map((name) => {
4646
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
4729
+ const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
4647
4730
  return (done) => {
4648
- fsStat.stat(path, settings.fsStatSettings, (error2, stats) => {
4731
+ fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
4649
4732
  if (error2 !== null) {
4650
4733
  done(error2);
4651
4734
  return;
@@ -4655,7 +4738,7 @@ var require_async2 = __commonJS({
4655
4738
  path,
4656
4739
  dirent: utils.fs.createDirentFromStats(name, stats)
4657
4740
  };
4658
- if (settings.stats) {
4741
+ if (settings2.stats) {
4659
4742
  entry.stats = stats;
4660
4743
  }
4661
4744
  done(null, entry);
@@ -4692,27 +4775,27 @@ var require_sync2 = __commonJS({
4692
4775
  var constants_1 = require_constants3();
4693
4776
  var utils = require_utils4();
4694
4777
  var common = require_common();
4695
- function read(directory, settings) {
4696
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
4697
- return readdirWithFileTypes(directory, settings);
4778
+ function read(directory, settings2) {
4779
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
4780
+ return readdirWithFileTypes(directory, settings2);
4698
4781
  }
4699
- return readdir(directory, settings);
4782
+ return readdir(directory, settings2);
4700
4783
  }
4701
4784
  exports.read = read;
4702
- function readdirWithFileTypes(directory, settings) {
4703
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
4785
+ function readdirWithFileTypes(directory, settings2) {
4786
+ const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
4704
4787
  return dirents.map((dirent) => {
4705
4788
  const entry = {
4706
4789
  dirent,
4707
4790
  name: dirent.name,
4708
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
4791
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
4709
4792
  };
4710
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
4793
+ if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
4711
4794
  try {
4712
- const stats = settings.fs.statSync(entry.path);
4795
+ const stats = settings2.fs.statSync(entry.path);
4713
4796
  entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
4714
4797
  } catch (error2) {
4715
- if (settings.throwErrorOnBrokenSymbolicLink) {
4798
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
4716
4799
  throw error2;
4717
4800
  }
4718
4801
  }
@@ -4721,17 +4804,17 @@ var require_sync2 = __commonJS({
4721
4804
  });
4722
4805
  }
4723
4806
  exports.readdirWithFileTypes = readdirWithFileTypes;
4724
- function readdir(directory, settings) {
4725
- const names = settings.fs.readdirSync(directory);
4807
+ function readdir(directory, settings2) {
4808
+ const names = settings2.fs.readdirSync(directory);
4726
4809
  return names.map((name) => {
4727
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
4728
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
4810
+ const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
4811
+ const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
4729
4812
  const entry = {
4730
4813
  name,
4731
4814
  path: entryPath,
4732
4815
  dirent: utils.fs.createDirentFromStats(name, stats)
4733
4816
  };
4734
- if (settings.stats) {
4817
+ if (settings2.stats) {
4735
4818
  entry.stats = stats;
4736
4819
  }
4737
4820
  return entry;
@@ -4818,8 +4901,8 @@ var require_out2 = __commonJS({
4818
4901
  }
4819
4902
  exports.scandir = scandir;
4820
4903
  function scandirSync(path, optionsOrSettings) {
4821
- const settings = getSettings(optionsOrSettings);
4822
- return sync.read(path, settings);
4904
+ const settings2 = getSettings(optionsOrSettings);
4905
+ return sync.read(path, settings2);
4823
4906
  }
4824
4907
  exports.scandirSync = scandirSync;
4825
4908
  function getSettings(settingsOrOptions = {}) {
@@ -4863,9 +4946,9 @@ var require_reusify = __commonJS({
4863
4946
  }
4864
4947
  });
4865
4948
 
4866
- // node_modules/.bun/fastq@1.20.1/node_modules/fastq/queue.js
4949
+ // node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js
4867
4950
  var require_queue = __commonJS({
4868
- "node_modules/.bun/fastq@1.20.1/node_modules/fastq/queue.js"(exports, module) {
4951
+ "node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js"(exports, module) {
4869
4952
  "use strict";
4870
4953
  init_utils2();
4871
4954
  var reusify = require_reusify();
@@ -5045,11 +5128,12 @@ var require_queue = __commonJS({
5045
5128
  current.value = null;
5046
5129
  current.callback = noop;
5047
5130
  current.errorHandler = null;
5131
+ current.next = null;
5048
5132
  if (errorHandler2) {
5049
5133
  errorHandler2(new Error("abort"), val);
5050
5134
  }
5051
5135
  callback.call(context2, new Error("abort"));
5052
- current.release(current);
5136
+ cache.release(current);
5053
5137
  current = next;
5054
5138
  }
5055
5139
  self.drain = noop;
@@ -5155,11 +5239,11 @@ var require_common2 = __commonJS({
5155
5239
  init_utils2();
5156
5240
  Object.defineProperty(exports, "__esModule", { value: true });
5157
5241
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
5158
- function isFatalError(settings, error2) {
5159
- if (settings.errorFilter === null) {
5242
+ function isFatalError(settings2, error2) {
5243
+ if (settings2.errorFilter === null) {
5160
5244
  return true;
5161
5245
  }
5162
- return !settings.errorFilter(error2);
5246
+ return !settings2.errorFilter(error2);
5163
5247
  }
5164
5248
  exports.isFatalError = isFatalError;
5165
5249
  function isAppliedFilter(filter, value) {
@@ -5170,14 +5254,14 @@ var require_common2 = __commonJS({
5170
5254
  return filepath.split(/[/\\]/).join(separator);
5171
5255
  }
5172
5256
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
5173
- function joinPathSegments(a, b, separator) {
5174
- if (a === "") {
5257
+ function joinPathSegments(a2, b, separator) {
5258
+ if (a2 === "") {
5175
5259
  return b;
5176
5260
  }
5177
- if (a.endsWith(separator)) {
5178
- return a + b;
5261
+ if (a2.endsWith(separator)) {
5262
+ return a2 + b;
5179
5263
  }
5180
- return a + separator + b;
5264
+ return a2 + separator + b;
5181
5265
  }
5182
5266
  exports.joinPathSegments = joinPathSegments;
5183
5267
  }
@@ -5524,14 +5608,14 @@ var require_out3 = __commonJS({
5524
5608
  }
5525
5609
  exports.walk = walk;
5526
5610
  function walkSync(directory, optionsOrSettings) {
5527
- const settings = getSettings(optionsOrSettings);
5528
- const provider = new sync_1.default(directory, settings);
5611
+ const settings2 = getSettings(optionsOrSettings);
5612
+ const provider = new sync_1.default(directory, settings2);
5529
5613
  return provider.read();
5530
5614
  }
5531
5615
  exports.walkSync = walkSync;
5532
5616
  function walkStream(directory, optionsOrSettings) {
5533
- const settings = getSettings(optionsOrSettings);
5534
- const provider = new stream_1.default(directory, settings);
5617
+ const settings2 = getSettings(optionsOrSettings);
5618
+ const provider = new stream_1.default(directory, settings2);
5535
5619
  return provider.read();
5536
5620
  }
5537
5621
  exports.walkStream = walkStream;
@@ -5617,8 +5701,8 @@ var require_stream3 = __commonJS({
5617
5701
  done();
5618
5702
  }).catch(done);
5619
5703
  };
5620
- for (let i = 0; i < filepaths.length; i++) {
5621
- stream.write(i);
5704
+ for (let i2 = 0; i2 < filepaths.length; i2++) {
5705
+ stream.write(i2);
5622
5706
  }
5623
5707
  return stream;
5624
5708
  }
@@ -6279,14 +6363,14 @@ var require_out4 = __commonJS({
6279
6363
  function generateTasks(source, options) {
6280
6364
  assertPatternsInput(source);
6281
6365
  const patterns = [].concat(source);
6282
- const settings = new settings_1.default(options);
6283
- return taskManager.generate(patterns, settings);
6366
+ const settings2 = new settings_1.default(options);
6367
+ return taskManager.generate(patterns, settings2);
6284
6368
  }
6285
6369
  FastGlob2.generateTasks = generateTasks;
6286
6370
  function isDynamicPattern(source, options) {
6287
6371
  assertPatternsInput(source);
6288
- const settings = new settings_1.default(options);
6289
- return utils.pattern.isDynamicPattern(source, settings);
6372
+ const settings2 = new settings_1.default(options);
6373
+ return utils.pattern.isDynamicPattern(source, settings2);
6290
6374
  }
6291
6375
  FastGlob2.isDynamicPattern = isDynamicPattern;
6292
6376
  function escapePath(source) {
@@ -6328,9 +6412,9 @@ var require_out4 = __commonJS({
6328
6412
  })(FastGlob || (FastGlob = {}));
6329
6413
  function getWorks(source, _Provider, options) {
6330
6414
  const patterns = [].concat(source);
6331
- const settings = new settings_1.default(options);
6332
- const tasks = taskManager.generate(patterns, settings);
6333
- const provider = new _Provider(settings);
6415
+ const settings2 = new settings_1.default(options);
6416
+ const tasks = taskManager.generate(patterns, settings2);
6417
+ const provider = new _Provider(settings2);
6334
6418
  return tasks.map(provider.read, provider);
6335
6419
  }
6336
6420
  function assertPatternsInput(input) {
@@ -6508,14 +6592,14 @@ import "node:fs";
6508
6592
  import { createRequire } from "node:module";
6509
6593
  import {
6510
6594
  resolve,
6511
- join,
6512
- dirname,
6595
+ join as join2,
6596
+ dirname as dirname2,
6513
6597
  relative,
6514
6598
  normalize,
6515
6599
  sep,
6516
6600
  extname
6517
6601
  } from "node:path";
6518
- import "node:url";
6602
+ import { fileURLToPath } from "node:url";
6519
6603
  function safeExecuteAsync(fn, message) {
6520
6604
  return fn().catch((error2) => {
6521
6605
  throw new Error(
@@ -6523,7 +6607,7 @@ function safeExecuteAsync(fn, message) {
6523
6607
  );
6524
6608
  });
6525
6609
  }
6526
- var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
6610
+ var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
6527
6611
  var init_PathResolver = __esm({
6528
6612
  "packages/core/config/utils/PathResolver.ts"() {
6529
6613
  "use strict";
@@ -6536,7 +6620,7 @@ var init_PathResolver = __esm({
6536
6620
  getPatternsFor: getPatternsFor || void 0,
6537
6621
  I18N_PATHS: I18N_PATHS || void 0
6538
6622
  };
6539
- log2 = {
6623
+ log3 = {
6540
6624
  error: (message, error2) => {
6541
6625
  },
6542
6626
  warn: (message, error2) => {
@@ -6572,6 +6656,7 @@ var init_PathResolver = __esm({
6572
6656
  options;
6573
6657
  _repoRoot;
6574
6658
  _appRoot = null;
6659
+ _writtenPaths = null;
6575
6660
  /**
6576
6661
  * Get or create singleton instance
6577
6662
  * @param options - Configuration options
@@ -6657,7 +6742,7 @@ var init_PathResolver = __esm({
6657
6742
  */
6658
6743
  getDirname(path) {
6659
6744
  if (!path) return "";
6660
- return this.normalizePath(dirname(path));
6745
+ return this.normalizePath(dirname2(path));
6661
6746
  }
6662
6747
  /**
6663
6748
  * Resolve package path using Node's module resolution
@@ -6669,7 +6754,7 @@ var init_PathResolver = __esm({
6669
6754
  resolvePackage(packageSpecifier, fromPath = null) {
6670
6755
  try {
6671
6756
  const basePath = fromPath || this.getAppRoot();
6672
- const require3 = createRequire(join(basePath, "package.json"));
6757
+ const require3 = createRequire(join2(basePath, "package.json"));
6673
6758
  const resolved = require3.resolve(packageSpecifier);
6674
6759
  return this.normalizePath(resolved);
6675
6760
  } catch (error2) {
@@ -6821,7 +6906,7 @@ var init_PathResolver = __esm({
6821
6906
  return cleanContent;
6822
6907
  } catch (error2) {
6823
6908
  if (this.options.debug) {
6824
- log2.warn(`Failed to read file: ${filePath}`, error2);
6909
+ log3.warn(`Failed to read file: ${filePath}`, error2);
6825
6910
  }
6826
6911
  return null;
6827
6912
  }
@@ -6849,7 +6934,7 @@ var init_PathResolver = __esm({
6849
6934
  return cleanContent;
6850
6935
  } catch (error2) {
6851
6936
  if (this.options.debug) {
6852
- log2.warn(`Failed to read file: ${filePath}`, error2);
6937
+ log3.warn(`Failed to read file: ${filePath}`, error2);
6853
6938
  }
6854
6939
  return null;
6855
6940
  }
@@ -6871,16 +6956,16 @@ var init_PathResolver = __esm({
6871
6956
  verbose = false
6872
6957
  } = options;
6873
6958
  const normalizedPath = this.normalizePath(filePath);
6874
- const dir = this.normalizePath(dirname(normalizedPath));
6959
+ const dir = this.normalizePath(dirname2(normalizedPath));
6875
6960
  const fileExists = this.pathExists(normalizedPath);
6876
6961
  if (fileExists && !overwrite) {
6877
6962
  if (verbose) {
6878
- log2.info(`Skipping existing file: ${normalizedPath}`);
6963
+ log3.info(`Skipping existing file: ${normalizedPath}`);
6879
6964
  }
6880
6965
  return false;
6881
6966
  }
6882
6967
  if (dryRun) {
6883
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
6968
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
6884
6969
  return true;
6885
6970
  }
6886
6971
  try {
@@ -6890,22 +6975,23 @@ var init_PathResolver = __esm({
6890
6975
  }
6891
6976
  const detectedFormat = this._detectFormat(filePath, format);
6892
6977
  let writeContent;
6893
- if (Buffer.isBuffer(content)) {
6978
+ if (Buffer2.isBuffer(content)) {
6894
6979
  writeContent = content;
6895
6980
  } else if (detectedFormat === "json" && typeof content === "object") {
6896
- writeContent = JSON.stringify(content, null, 2);
6981
+ writeContent = `${JSON.stringify(content, null, 2)}
6982
+ `;
6897
6983
  } else {
6898
6984
  writeContent = String(content);
6899
6985
  }
6900
6986
  try {
6901
6987
  return await safeExecuteAsync(async () => {
6902
- if (Buffer.isBuffer(writeContent)) {
6988
+ if (Buffer2.isBuffer(writeContent)) {
6903
6989
  await fs.promises.writeFile(normalizedPath, writeContent);
6904
6990
  } else {
6905
6991
  await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
6906
6992
  }
6907
6993
  if (verbose) {
6908
- log2.info(
6994
+ log3.info(
6909
6995
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
6910
6996
  );
6911
6997
  }
@@ -6932,16 +7018,16 @@ var init_PathResolver = __esm({
6932
7018
  verbose = false
6933
7019
  } = options;
6934
7020
  const normalizedPath = this.normalizePath(filePath);
6935
- const dir = this.normalizePath(dirname(normalizedPath));
7021
+ const dir = this.normalizePath(dirname2(normalizedPath));
6936
7022
  const fileExists = this.pathExists(normalizedPath);
6937
7023
  if (fileExists && !overwrite) {
6938
7024
  if (verbose) {
6939
- log2.info(`Skipping existing file: ${normalizedPath}`);
7025
+ log3.info(`Skipping existing file: ${normalizedPath}`);
6940
7026
  }
6941
7027
  return false;
6942
7028
  }
6943
7029
  if (dryRun) {
6944
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7030
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
6945
7031
  return true;
6946
7032
  }
6947
7033
  try {
@@ -6951,21 +7037,23 @@ var init_PathResolver = __esm({
6951
7037
  }
6952
7038
  const detectedFormat = this._detectFormat(filePath, format);
6953
7039
  let writeContent;
6954
- if (Buffer.isBuffer(content)) {
7040
+ if (Buffer2.isBuffer(content)) {
6955
7041
  writeContent = content;
6956
7042
  } else if (detectedFormat === "json" && typeof content === "object") {
6957
- writeContent = JSON.stringify(content, null, 2);
7043
+ writeContent = `${JSON.stringify(content, null, 2)}
7044
+ `;
6958
7045
  } else {
6959
7046
  writeContent = String(content);
6960
7047
  }
6961
7048
  try {
6962
- if (Buffer.isBuffer(writeContent)) {
7049
+ if (Buffer2.isBuffer(writeContent)) {
6963
7050
  fs.writeFileSync(normalizedPath, writeContent);
6964
7051
  } else {
6965
7052
  fs.writeFileSync(normalizedPath, writeContent, "utf8");
6966
7053
  }
7054
+ this._writtenPaths?.add(normalizedPath);
6967
7055
  if (verbose) {
6968
- log2.info(
7056
+ log3.info(
6969
7057
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
6970
7058
  );
6971
7059
  }
@@ -6990,15 +7078,15 @@ var init_PathResolver = __esm({
6990
7078
  const fileExists = this.pathExists(normalizedDestPath);
6991
7079
  if (fileExists && !overwrite) {
6992
7080
  if (verbose) {
6993
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
7081
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
6994
7082
  }
6995
7083
  return false;
6996
7084
  }
6997
7085
  if (dryRun) {
6998
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7086
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
6999
7087
  return true;
7000
7088
  }
7001
- const dir = this.normalizePath(dirname(normalizedDestPath));
7089
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7002
7090
  try {
7003
7091
  await fs.promises.mkdir(dir, { recursive: true });
7004
7092
  } catch (error2) {
@@ -7008,7 +7096,7 @@ var init_PathResolver = __esm({
7008
7096
  return await safeExecuteAsync(async () => {
7009
7097
  await fs.promises.copyFile(srcPath, normalizedDestPath);
7010
7098
  if (verbose) {
7011
- log2.info(
7099
+ log3.info(
7012
7100
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7013
7101
  );
7014
7102
  }
@@ -7032,15 +7120,15 @@ var init_PathResolver = __esm({
7032
7120
  const fileExists = this.pathExists(normalizedDestPath);
7033
7121
  if (fileExists && !overwrite) {
7034
7122
  if (verbose) {
7035
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
7123
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7036
7124
  }
7037
7125
  return false;
7038
7126
  }
7039
7127
  if (dryRun) {
7040
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7128
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7041
7129
  return true;
7042
7130
  }
7043
- const dir = this.normalizePath(dirname(normalizedDestPath));
7131
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7044
7132
  try {
7045
7133
  fs.mkdirSync(dir, { recursive: true });
7046
7134
  } catch (error2) {
@@ -7048,8 +7136,9 @@ var init_PathResolver = __esm({
7048
7136
  }
7049
7137
  try {
7050
7138
  fs.copyFileSync(srcPath, normalizedDestPath);
7139
+ this._writtenPaths?.add(normalizedDestPath);
7051
7140
  if (verbose) {
7052
- log2.info(
7141
+ log3.info(
7053
7142
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7054
7143
  );
7055
7144
  }
@@ -7066,7 +7155,7 @@ var init_PathResolver = __esm({
7066
7155
  return fs.existsSync(filePath);
7067
7156
  } catch (error2) {
7068
7157
  if (!silent) {
7069
- log2.error(`Error checking path existence: ${filePath}`, error2);
7158
+ log3.error(`Error checking path existence: ${filePath}`, error2);
7070
7159
  }
7071
7160
  return false;
7072
7161
  }
@@ -7092,7 +7181,7 @@ var init_PathResolver = __esm({
7092
7181
  return fs.readdirSync(dirPath, options);
7093
7182
  } catch (error2) {
7094
7183
  if (this.options.debug) {
7095
- log2.warn(`Failed to read directory: ${dirPath}`, error2);
7184
+ log3.warn(`Failed to read directory: ${dirPath}`, error2);
7096
7185
  }
7097
7186
  const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
7098
7187
  return isObjectOptions && options.withFileTypes ? [] : [];
@@ -7110,11 +7199,29 @@ var init_PathResolver = __esm({
7110
7199
  return fs.statSync(filePath);
7111
7200
  } catch (error2) {
7112
7201
  if (this.options.debug) {
7113
- log2.warn(`Failed to stat file: ${filePath}`, error2);
7202
+ log3.warn(`Failed to stat file: ${filePath}`, error2);
7114
7203
  }
7115
7204
  return null;
7116
7205
  }
7117
7206
  }
7207
+ /**
7208
+ * Resolve the real path of a file, following symlinks
7209
+ * @param filePath - Path to resolve
7210
+ * @returns Resolved real path
7211
+ */
7212
+ realpathSync(filePath) {
7213
+ return fs.realpathSync(filePath);
7214
+ }
7215
+ /**
7216
+ * Watch a directory for changes
7217
+ * @param dirPath - Directory to watch
7218
+ * @param options - fs.watch options
7219
+ * @param callback - Callback for change events
7220
+ * @returns FSWatcher instance
7221
+ */
7222
+ watch(dirPath, options, callback) {
7223
+ return fs.watch(dirPath, options, callback);
7224
+ }
7118
7225
  /**
7119
7226
  * Get file stats synchronously (follows symlinks)
7120
7227
  * Returns null if file doesn't exist (graceful degradation)
@@ -7127,7 +7234,7 @@ var init_PathResolver = __esm({
7127
7234
  return fs.lstatSync(filePath);
7128
7235
  } catch (error2) {
7129
7236
  if (this.options.debug) {
7130
- log2.warn(`Failed to lstat file: ${filePath}`, error2);
7237
+ log3.warn(`Failed to lstat file: ${filePath}`, error2);
7131
7238
  }
7132
7239
  return null;
7133
7240
  }
@@ -7194,6 +7301,28 @@ var init_PathResolver = __esm({
7194
7301
  * Get app root (where vite.config.ts is, Vite's config.root)
7195
7302
  * Falls back to repoRoot if not set
7196
7303
  */
7304
+ /**
7305
+ * Start recording every path written by writeSync/copySync.
7306
+ * Lets a generator know exactly which files the current run produced,
7307
+ * without comparing file timestamps to a clock.
7308
+ */
7309
+ startWriteRecording() {
7310
+ this._writtenPaths = /* @__PURE__ */ new Set();
7311
+ }
7312
+ /**
7313
+ * Stop recording and return the normalized paths written since
7314
+ * startWriteRecording().
7315
+ */
7316
+ stopWriteRecording() {
7317
+ if (!this._writtenPaths) {
7318
+ throw new Error(
7319
+ "stopWriteRecording() called without startWriteRecording()"
7320
+ );
7321
+ }
7322
+ const written = this._writtenPaths;
7323
+ this._writtenPaths = null;
7324
+ return written;
7325
+ }
7197
7326
  getAppRoot() {
7198
7327
  if (!this._appRoot) {
7199
7328
  return this._repoRoot;
@@ -7216,7 +7345,7 @@ var init_PathResolver = __esm({
7216
7345
  * @returns True if repoRoot is the monorepo (has packages directory)
7217
7346
  */
7218
7347
  isMonorepo() {
7219
- const packagesDir = join(this._repoRoot, "packages");
7348
+ const packagesDir = join2(this._repoRoot, "packages");
7220
7349
  return this.pathExists(packagesDir);
7221
7350
  }
7222
7351
  /**
@@ -7233,7 +7362,7 @@ var init_PathResolver = __esm({
7233
7362
  * Find files matching pattern within directory
7234
7363
  */
7235
7364
  async findFiles(directory, pattern, options = {}) {
7236
- const searchPattern = this.normalizePath(join(directory, pattern));
7365
+ const searchPattern = this.normalizePath(join2(directory, pattern));
7237
7366
  const appRoot = this.getAppRoot();
7238
7367
  const normalizeAppRoot = this.normalizePath(appRoot);
7239
7368
  const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
@@ -7280,7 +7409,7 @@ var init_PathResolver = __esm({
7280
7409
  return null;
7281
7410
  }
7282
7411
  const resolvedPath = this.normalizePath(
7283
- join(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
7412
+ join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
7284
7413
  );
7285
7414
  const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
7286
7415
  if (this.pathExists(resolvedDir)) {
@@ -7451,6 +7580,15 @@ var init_PathResolver = __esm({
7451
7580
  const cjsPath = this.getEmptyCjsModulePath();
7452
7581
  return cjsPath.replace(/\.cjs$/, ".js");
7453
7582
  }
7583
+ /**
7584
+ * Get absolute path to empty flag component module.
7585
+ * Returns `export default () => null;` — used by flag filtering plugins
7586
+ * to replace unused flag files at build time.
7587
+ */
7588
+ getEmptyFlagModulePath() {
7589
+ const __dirname2 = dirname2(fileURLToPath(import.meta.url));
7590
+ return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
7591
+ }
7454
7592
  /**
7455
7593
  * Get absolute path to empty CJS module for esbuild pre-bundling.
7456
7594
  * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
@@ -7476,13 +7614,13 @@ var init_PathResolver = __esm({
7476
7614
  const maxLevels = this.options.maxLevels;
7477
7615
  while (levelsChecked < maxLevels) {
7478
7616
  const toolingPath = this.normalizePath(
7479
- join(currentDir, PACKAGE_PATHS.TOOLING)
7617
+ join2(currentDir, PACKAGE_PATHS.TOOLING)
7480
7618
  );
7481
- const corePath = this.normalizePath(join(currentDir, PACKAGE_PATHS.CORE));
7619
+ const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
7482
7620
  if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
7483
7621
  return currentDir;
7484
7622
  }
7485
- const appsDir = join(currentDir, "apps");
7623
+ const appsDir = join2(currentDir, "apps");
7486
7624
  if (this.pathExists(appsDir)) {
7487
7625
  const appsDirStat = this.statSync(appsDir);
7488
7626
  if (appsDirStat?.isDirectory()) {
@@ -7490,15 +7628,15 @@ var init_PathResolver = __esm({
7490
7628
  }
7491
7629
  }
7492
7630
  const packageJsonPath = this.normalizePath(
7493
- join(currentDir, "package.json")
7631
+ join2(currentDir, "package.json")
7494
7632
  );
7495
7633
  if (this.pathExists(packageJsonPath)) {
7496
- const parentDir2 = this.normalizePath(dirname(currentDir));
7634
+ const parentDir2 = this.normalizePath(dirname2(currentDir));
7497
7635
  if (parentDir2 === currentDir) {
7498
7636
  return currentDir;
7499
7637
  }
7500
7638
  }
7501
- const parentDir = this.normalizePath(dirname(currentDir));
7639
+ const parentDir = this.normalizePath(dirname2(currentDir));
7502
7640
  if (parentDir === currentDir) {
7503
7641
  break;
7504
7642
  }
@@ -7514,8 +7652,8 @@ var init_PathResolver = __esm({
7514
7652
  // packages/tooling/src/utils/pathResolver.ts
7515
7653
  import { createRequire as createRequire2 } from "node:module";
7516
7654
  import {
7517
- join as join2,
7518
- dirname as dirname2,
7655
+ join as join3,
7656
+ dirname as dirname3,
7519
7657
  basename as basename2,
7520
7658
  extname as extname2,
7521
7659
  relative as relative2,
@@ -7524,7 +7662,7 @@ import {
7524
7662
  isAbsolute as pathIsAbsolute
7525
7663
  } from "node:path";
7526
7664
  import { fileURLToPath as fileURLToPath2 } from "node:url";
7527
- function readdirSync2(dirPath, options) {
7665
+ function readdirSync3(dirPath, options) {
7528
7666
  return pathResolverInstance.readdirSync(dirPath, options);
7529
7667
  }
7530
7668
  var pathResolverInstance, normalizePath, pathExists, readSync, statSync2, joinPath;
@@ -7535,7 +7673,7 @@ var init_pathResolver = __esm({
7535
7673
  init_PathResolver();
7536
7674
  pathResolverInstance = PathResolver.getInstance({ debug: false });
7537
7675
  normalizePath = (...pathSegments) => {
7538
- return pathResolverInstance.normalizePath(join2(...pathSegments));
7676
+ return pathResolverInstance.normalizePath(join3(...pathSegments));
7539
7677
  };
7540
7678
  pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
7541
7679
  readSync = (filePath, options) => pathResolverInstance.readSync(filePath, options);
@@ -7575,10 +7713,10 @@ var init_typed_file_operations = __esm({
7575
7713
  });
7576
7714
 
7577
7715
  // packages/tooling/src/bundler/utils.ts
7578
- import { Buffer } from "node:buffer";
7716
+ import { Buffer as Buffer2 } from "node:buffer";
7579
7717
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
7580
7718
  import { createRequire as createRequire3 } from "node:module";
7581
- import { dirname as dirname3, resolve as resolve3 } from "node:path";
7719
+ import { dirname as dirname4, resolve as resolve3 } from "node:path";
7582
7720
  import process from "node:process";
7583
7721
  import { fileURLToPath as fileURLToPath3 } from "node:url";
7584
7722
  var require2, __filename, __dirname;
@@ -7587,12 +7725,12 @@ var init_utils2 = __esm({
7587
7725
  "use strict";
7588
7726
  require2 = createRequire3(import.meta.url);
7589
7727
  __filename = fileURLToPath3(import.meta.url);
7590
- __dirname = dirname3(__filename);
7728
+ __dirname = dirname4(__filename);
7591
7729
  if (typeof globalThis !== "undefined") {
7592
7730
  globalThis.require = require2;
7593
7731
  globalThis.__filename = __filename;
7594
7732
  globalThis.__dirname = __dirname;
7595
- globalThis.Buffer = Buffer;
7733
+ globalThis.Buffer = Buffer2;
7596
7734
  globalThis.process = process;
7597
7735
  if (typeof global === "undefined") {
7598
7736
  globalThis.global = globalThis;
@@ -7615,7 +7753,7 @@ function detectApps(projectRoot) {
7615
7753
  const appsDir = joinPath(projectRoot, "apps");
7616
7754
  const appsDirStat = statSync2(appsDir);
7617
7755
  if (pathExists(appsDir) && appsDirStat?.isDirectory()) {
7618
- const appDirs = readdirSync2(appsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
7756
+ const appDirs = readdirSync3(appsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
7619
7757
  for (const appDir of appDirs) {
7620
7758
  const appPath = joinPath(appsDir, appDir);
7621
7759
  const packageJsonPath = joinPath(appPath, "package.json");
@@ -8221,8 +8359,8 @@ init_utils2();
8221
8359
  // packages/tooling/src/cli/coach/coach.ts
8222
8360
  init_utils2();
8223
8361
  init_app_detection();
8224
- init_cli_output();
8225
8362
  init_app_detection();
8363
+ init_cli_output();
8226
8364
  var CHECKLIST_ORDER = [
8227
8365
  async () => (await Promise.resolve().then(() => (init_checklist_firebase(), checklist_firebase_exports))).firebaseChecklist,
8228
8366
  async () => (await Promise.resolve().then(() => (init_checklist_supabase(), checklist_supabase_exports))).supabaseChecklist,
@@ -8258,9 +8396,9 @@ function deduplicateAndRender(hits, multiApp) {
8258
8396
  const first = providerHits[0];
8259
8397
  const section = first.section;
8260
8398
  if (section.prerequisite) {
8261
- log.info(` Prerequisite: ${section.prerequisite}`);
8399
+ log2.info(` Prerequisite: ${section.prerequisite}`);
8262
8400
  }
8263
- log.info(
8401
+ log2.info(
8264
8402
  `
8265
8403
  ${section.provider.toUpperCase()} (${section.steps.length} step${section.steps.length !== 1 ? "s" : ""})`
8266
8404
  );
@@ -8273,41 +8411,41 @@ ${section.provider.toUpperCase()} (${section.steps.length} step${section.steps.l
8273
8411
  for (const step of section.steps) {
8274
8412
  stepNumber++;
8275
8413
  renderStep(stepNumber, step);
8276
- for (let i = 1; i < providerHits.length; i++) {
8277
- const otherHit = providerHits[i];
8414
+ for (let i2 = 1; i2 < providerHits.length; i2++) {
8415
+ const otherHit = providerHits[i2];
8278
8416
  const matchingStep = otherHit.section.steps.find(
8279
8417
  (s) => s.action === step.action
8280
8418
  );
8281
8419
  if (matchingStep && matchingStep.target !== step.target) {
8282
- log.info(` \u2192 ${matchingStep.target}`);
8420
+ log2.info(` \u2192 ${matchingStep.target}`);
8283
8421
  }
8284
8422
  }
8285
8423
  }
8286
8424
  }
8287
8425
  }
8288
8426
  if (stepNumber > 0) {
8289
- log.info("\nWhen done, run: dndev setup");
8427
+ log2.info("\nWhen done, run: dndev setup");
8290
8428
  }
8291
8429
  }
8292
8430
  function renderStep(num, step, appName) {
8293
- log.info(` ${num}. ${step.action}`);
8431
+ log2.info(` ${num}. ${step.action}`);
8294
8432
  if (step.dashboardUrl) {
8295
- log.info(` ${step.dashboardUrl}`);
8433
+ log2.info(` ${step.dashboardUrl}`);
8296
8434
  }
8297
8435
  if (step.where !== step.action) {
8298
- log.info(` ${step.where}`);
8436
+ log2.info(` ${step.where}`);
8299
8437
  }
8300
8438
  if (step.target) {
8301
8439
  const prefix = appName ? `[${appName}] ` : "";
8302
- log.info(` \u2192 ${prefix}${step.target}`);
8440
+ log2.info(` \u2192 ${prefix}${step.target}`);
8303
8441
  }
8304
8442
  if (step.hint) {
8305
- log.info(` ${step.hint}`);
8443
+ log2.info(` ${step.hint}`);
8306
8444
  }
8307
8445
  }
8308
8446
  async function main(_options = {}) {
8309
8447
  const projectRoot = process.cwd();
8310
- mt("DoNotDev Coach");
8448
+ intro("DoNotDev Coach");
8311
8449
  const topology = analyzeProjectTopology(projectRoot);
8312
8450
  let apps = topology.apps;
8313
8451
  if (apps.length === 0) {
@@ -8329,13 +8467,13 @@ async function main(_options = {}) {
8329
8467
  }
8330
8468
  }
8331
8469
  if (hits.length === 0) {
8332
- log.warn("No providers detected. Nothing to coach.");
8333
- log.info("Tip: run dndev create-app to scaffold an app first.");
8334
- gt("");
8470
+ log2.warn("No providers detected. Nothing to coach.");
8471
+ log2.info("Tip: run dndev create-app to scaffold an app first.");
8472
+ outro("");
8335
8473
  return 0;
8336
8474
  }
8337
8475
  deduplicateAndRender(hits, multiApp);
8338
- gt("");
8476
+ outro("");
8339
8477
  return 0;
8340
8478
  }
8341
8479
  export {