@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.
- package/dependencies-matrix.json +191 -150
- package/dist/bin/commands/agent-setup.js +632 -524
- package/dist/bin/commands/build.js +1239 -935
- package/dist/bin/commands/bump.js +1285 -946
- package/dist/bin/commands/cacheout.js +543 -405
- package/dist/bin/commands/coach.js +546 -408
- package/dist/bin/commands/create-app.js +1198 -862
- package/dist/bin/commands/create-project.js +1238 -902
- package/dist/bin/commands/db.js +139128 -93775
- package/dist/bin/commands/deploy.js +2308 -1936
- package/dist/bin/commands/dev.js +912 -662
- package/dist/bin/commands/doctor.js +634 -526
- package/dist/bin/commands/emu.js +1093 -785
- package/dist/bin/commands/format.js +588 -450
- package/dist/bin/commands/get-demo.js +1043 -756
- package/dist/bin/commands/make-admin.js +20974 -38424
- package/dist/bin/commands/preview.js +913 -663
- package/dist/bin/commands/seed.js +139129 -93776
- package/dist/bin/commands/setup-cicd.js +1130 -817
- package/dist/bin/commands/setup.js +1299 -960
- package/dist/bin/commands/staging.js +2308 -1936
- package/dist/bin/commands/sync-secrets.js +996 -733
- package/dist/bin/commands/type-check.js +733 -598
- package/dist/bin/commands/wai.js +533 -395
- package/dist/bin/dndev.js +9 -8
- package/dist/index.js +2720 -2290
- package/package.json +3 -3
- package/templates/app-next/src/app/ClientLayout.tsx.example +11 -1
- package/templates/app-next/src/app/layout.tsx.example +19 -1
- package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +8 -18
- package/templates/functions-firebase/src/billing/index.ts.example +0 -1
- package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +4 -8
- package/templates/functions-firebase/src/index.ts.example +0 -1
- package/templates/functions-supabase/supabase/config.toml.example +4 -0
- package/templates/functions-supabase/supabase/functions/stripe-webhook/index.ts.example +12 -0
- package/templates/functions-supabase/supabase/migrations/20250101000005_webhook_events.sql +133 -0
- package/templates/functions-vercel/.env.example +9 -0
- package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +12 -14
- package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +4 -14
- package/templates/overlay-supabase/src/config/providers.ts.example +2 -2
- package/templates/root-consumer/.claude/hooks/guard-write.sh.example +32 -0
- package/templates/root-consumer/.claude/hooks/record-lookup.sh.example +22 -0
- package/templates/root-consumer/.claude/rules/definition-of-done.md.example +7 -0
- package/templates/root-consumer/.claude/rules/framework.md.example +6 -0
- package/templates/root-consumer/.claude/settings.json.example +11 -1
- package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -14
- 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: (
|
|
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
|
-
|
|
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
|
-
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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.
|
|
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.
|
|
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
|
|
89
|
-
to(x,
|
|
90
|
-
if (!
|
|
91
|
-
return `${CSI}${
|
|
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,
|
|
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 (
|
|
98
|
-
else if (
|
|
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
|
|
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
|
|
127
|
-
clear += this.line + (
|
|
135
|
+
for (let i2 = 0; i2 < count; i2++)
|
|
136
|
+
clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
|
|
128
137
|
if (count)
|
|
129
|
-
clear +=
|
|
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.
|
|
138
|
-
import { styleText
|
|
139
|
-
import { stdout
|
|
140
|
-
import { ReadStream
|
|
141
|
-
var import_sisteransi,
|
|
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.
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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.
|
|
155
|
-
import { styleText as
|
|
156
|
-
import
|
|
157
|
-
import { existsSync
|
|
158
|
-
import { dirname
|
|
159
|
-
function
|
|
160
|
-
|
|
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,
|
|
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.
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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
|
-
|
|
230
|
-
const
|
|
231
|
-
${
|
|
232
|
-
|
|
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
|
-
|
|
237
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
382
|
-
warn =
|
|
383
|
-
info =
|
|
384
|
-
success =
|
|
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
|
|
745
|
-
if (
|
|
746
|
-
index =
|
|
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
|
|
773
|
-
if (
|
|
774
|
-
index =
|
|
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 = (
|
|
853
|
-
const node =
|
|
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 = (
|
|
871
|
-
if (
|
|
872
|
-
if (
|
|
873
|
-
if (
|
|
874
|
-
|
|
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 (
|
|
878
|
-
|
|
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
|
|
898
|
-
const ele = arr[
|
|
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
|
|
1075
|
+
let a2 = Math.min(min, max);
|
|
993
1076
|
let b = Math.max(min, max);
|
|
994
|
-
if (Math.abs(
|
|
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 (
|
|
1095
|
+
if (a2 < 0) {
|
|
1013
1096
|
let newMin = b < 0 ? Math.abs(b) : 1;
|
|
1014
|
-
negatives = splitToPatterns(newMin, Math.abs(
|
|
1015
|
-
|
|
1097
|
+
negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
|
|
1098
|
+
a2 = state.a = 0;
|
|
1016
1099
|
}
|
|
1017
1100
|
if (b >= 0) {
|
|
1018
|
-
positives = splitToPatterns(
|
|
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
|
|
1067
|
-
let [startDigit, stopDigit] = zipped[
|
|
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
|
|
1087
|
-
let max2 = ranges[
|
|
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(
|
|
1205
|
+
function zip(a2, b) {
|
|
1123
1206
|
let arr = [];
|
|
1124
|
-
for (let
|
|
1207
|
+
for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
|
|
1125
1208
|
return arr;
|
|
1126
1209
|
}
|
|
1127
|
-
function compare(
|
|
1128
|
-
return
|
|
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(
|
|
1147
|
-
return `[${
|
|
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((
|
|
1227
|
-
parts.positives.sort((
|
|
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 = (
|
|
1331
|
+
var toRange = (a2, b, isNumbers, options) => {
|
|
1249
1332
|
if (isNumbers) {
|
|
1250
|
-
return toRegexRange(
|
|
1333
|
+
return toRegexRange(a2, b, { wrap: false, ...options });
|
|
1251
1334
|
}
|
|
1252
|
-
let start = String.fromCharCode(
|
|
1253
|
-
if (
|
|
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
|
|
1362
|
+
let a2 = Number(start);
|
|
1280
1363
|
let b = Number(end);
|
|
1281
|
-
if (!Number.isInteger(
|
|
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 (
|
|
1368
|
+
if (a2 === 0) a2 = 0;
|
|
1286
1369
|
if (b === 0) b = 0;
|
|
1287
|
-
let descending =
|
|
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 ?
|
|
1386
|
+
while (descending ? a2 >= b : a2 <= b) {
|
|
1304
1387
|
if (options.toRegex === true && step > 1) {
|
|
1305
|
-
push(
|
|
1388
|
+
push(a2);
|
|
1306
1389
|
} else {
|
|
1307
|
-
range.push(pad(format(
|
|
1390
|
+
range.push(pad(format(a2, index), maxLen, toNumber));
|
|
1308
1391
|
}
|
|
1309
|
-
|
|
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
|
|
1405
|
+
let a2 = `${start}`.charCodeAt(0);
|
|
1323
1406
|
let b = `${end}`.charCodeAt(0);
|
|
1324
|
-
let descending =
|
|
1325
|
-
let min = Math.min(
|
|
1326
|
-
let max = Math.max(
|
|
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 ?
|
|
1333
|
-
range.push(format(
|
|
1334
|
-
|
|
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
|
|
1541
|
+
let q = parent.queue;
|
|
1459
1542
|
while (p.type !== "brace" && p.type !== "root" && p.parent) {
|
|
1460
1543
|
p = p.parent;
|
|
1461
|
-
|
|
1544
|
+
q = p.queue;
|
|
1462
1545
|
}
|
|
1463
1546
|
if (node.invalid || node.dollar) {
|
|
1464
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
1487
|
-
while (
|
|
1488
|
-
|
|
1489
|
-
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
|
|
1492
|
-
const child = node.nodes[
|
|
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 (
|
|
1577
|
+
if (i2 === 1) queue.push("");
|
|
1495
1578
|
queue.push("");
|
|
1496
1579
|
continue;
|
|
1497
1580
|
}
|
|
1498
1581
|
if (child.type === "close") {
|
|
1499
|
-
|
|
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
|
|
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
|
-
|
|
1683
|
-
node.parent =
|
|
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
|
-
|
|
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
|
-
|
|
1728
|
-
stack.push(
|
|
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 (
|
|
1816
|
+
if (block2.type !== "paren") {
|
|
1734
1817
|
push({ type: "text", value });
|
|
1735
1818
|
continue;
|
|
1736
1819
|
}
|
|
1737
|
-
|
|
1820
|
+
block2 = stack.pop();
|
|
1738
1821
|
push({ type: "text", value });
|
|
1739
|
-
|
|
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) === "$" ||
|
|
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
|
-
|
|
1776
|
-
stack.push(
|
|
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 (
|
|
1864
|
+
if (block2.type !== "brace") {
|
|
1782
1865
|
push({ type: "text", value });
|
|
1783
1866
|
continue;
|
|
1784
1867
|
}
|
|
1785
1868
|
const type = "close";
|
|
1786
|
-
|
|
1787
|
-
|
|
1869
|
+
block2 = stack.pop();
|
|
1870
|
+
block2.close = true;
|
|
1788
1871
|
push({ type, value });
|
|
1789
1872
|
depth--;
|
|
1790
|
-
|
|
1873
|
+
block2 = stack[stack.length - 1];
|
|
1791
1874
|
continue;
|
|
1792
1875
|
}
|
|
1793
1876
|
if (value === CHAR_COMMA && depth > 0) {
|
|
1794
|
-
if (
|
|
1795
|
-
|
|
1796
|
-
const open =
|
|
1797
|
-
|
|
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
|
-
|
|
1883
|
+
block2.commas++;
|
|
1801
1884
|
continue;
|
|
1802
1885
|
}
|
|
1803
|
-
if (value === CHAR_DOT && depth > 0 &&
|
|
1804
|
-
const siblings =
|
|
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
|
-
|
|
1893
|
+
block2.range = [];
|
|
1811
1894
|
prev.value += value;
|
|
1812
1895
|
prev.type = "range";
|
|
1813
|
-
if (
|
|
1814
|
-
|
|
1815
|
-
|
|
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
|
-
|
|
1820
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1838
|
-
if (
|
|
1839
|
-
|
|
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(
|
|
1849
|
-
parent.nodes.splice(index2, 1, ...
|
|
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
|
|
2483
|
-
const
|
|
2484
|
-
const value = input.slice(
|
|
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 =
|
|
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
|
|
2628
|
-
for (let j =
|
|
2629
|
-
const
|
|
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 =
|
|
2632
|
-
if (!char ||
|
|
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 (
|
|
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
|
|
2651
|
-
const ch = pattern[
|
|
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 &&
|
|
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,
|
|
2691
|
-
end:
|
|
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 = (
|
|
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
|
|
2905
|
-
tokens[
|
|
2906
|
-
tokens[
|
|
2907
|
-
delete tokens[
|
|
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
|
|
3233
|
+
for (let i2 = arr.length - 1; i2 >= 0; i2--) {
|
|
3151
3234
|
tokens.pop();
|
|
3152
|
-
if (arr[
|
|
3235
|
+
if (arr[i2].type === "brace") {
|
|
3153
3236
|
break;
|
|
3154
3237
|
}
|
|
3155
|
-
if (arr[
|
|
3156
|
-
range.unshift(arr[
|
|
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
|
|
3700
|
-
let isMatch = picomatch(String(patterns[
|
|
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((
|
|
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
|
|
4030
|
-
streamsQueue.push(pauseStreams(arguments[
|
|
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
|
|
4080
|
-
pipe(streams[
|
|
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
|
|
4112
|
-
streams[
|
|
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,
|
|
4195
|
-
const patterns = processPatterns(input,
|
|
4196
|
-
const ignore = processPatterns(
|
|
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,
|
|
4200
|
-
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern,
|
|
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,
|
|
4299
|
+
function processPatterns(input, settings2) {
|
|
4217
4300
|
let patterns = input;
|
|
4218
|
-
if (
|
|
4301
|
+
if (settings2.braceExpansion) {
|
|
4219
4302
|
patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
|
|
4220
4303
|
}
|
|
4221
|
-
if (
|
|
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,
|
|
4291
|
-
|
|
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() || !
|
|
4379
|
+
if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
|
|
4297
4380
|
callSuccessCallback(callback, lstat);
|
|
4298
4381
|
return;
|
|
4299
4382
|
}
|
|
4300
|
-
|
|
4383
|
+
settings2.fs.stat(path, (statError, stat) => {
|
|
4301
4384
|
if (statError !== null) {
|
|
4302
|
-
if (
|
|
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 (
|
|
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,
|
|
4334
|
-
const lstat =
|
|
4335
|
-
if (!lstat.isSymbolicLink() || !
|
|
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 =
|
|
4340
|
-
if (
|
|
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 (!
|
|
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
|
|
4423
|
-
return sync.read(path,
|
|
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(
|
|
4472
|
-
results[
|
|
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,
|
|
4569
|
+
tasks.forEach(function(task, i2) {
|
|
4487
4570
|
task(function(err, result) {
|
|
4488
|
-
each(
|
|
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(
|
|
4564
|
-
if (
|
|
4565
|
-
return
|
|
4646
|
+
function joinPathSegments(a2, b, separator) {
|
|
4647
|
+
if (a2.endsWith(separator)) {
|
|
4648
|
+
return a2 + b;
|
|
4566
4649
|
}
|
|
4567
|
-
return
|
|
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,
|
|
4586
|
-
if (!
|
|
4587
|
-
readdirWithFileTypes(directory,
|
|
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,
|
|
4673
|
+
readdir(directory, settings2, callback);
|
|
4591
4674
|
}
|
|
4592
4675
|
exports.read = read;
|
|
4593
|
-
function readdirWithFileTypes(directory,
|
|
4594
|
-
|
|
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,
|
|
4685
|
+
path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
|
|
4603
4686
|
}));
|
|
4604
|
-
if (!
|
|
4687
|
+
if (!settings2.followSymbolicLinks) {
|
|
4605
4688
|
callSuccessCallback(callback, entries);
|
|
4606
4689
|
return;
|
|
4607
4690
|
}
|
|
4608
|
-
const tasks = entries.map((entry) => makeRplTaskEntry(entry,
|
|
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,
|
|
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
|
-
|
|
4708
|
+
settings2.fs.stat(entry.path, (statError, stats) => {
|
|
4626
4709
|
if (statError !== null) {
|
|
4627
|
-
if (
|
|
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,
|
|
4640
|
-
|
|
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,
|
|
4729
|
+
const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
|
|
4647
4730
|
return (done) => {
|
|
4648
|
-
fsStat.stat(path,
|
|
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 (
|
|
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,
|
|
4696
|
-
if (!
|
|
4697
|
-
return readdirWithFileTypes(directory,
|
|
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,
|
|
4782
|
+
return readdir(directory, settings2);
|
|
4700
4783
|
}
|
|
4701
4784
|
exports.read = read;
|
|
4702
|
-
function readdirWithFileTypes(directory,
|
|
4703
|
-
const dirents =
|
|
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,
|
|
4791
|
+
path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
|
|
4709
4792
|
};
|
|
4710
|
-
if (entry.dirent.isSymbolicLink() &&
|
|
4793
|
+
if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
|
|
4711
4794
|
try {
|
|
4712
|
-
const stats =
|
|
4795
|
+
const stats = settings2.fs.statSync(entry.path);
|
|
4713
4796
|
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
|
|
4714
4797
|
} catch (error2) {
|
|
4715
|
-
if (
|
|
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,
|
|
4725
|
-
const names =
|
|
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,
|
|
4728
|
-
const stats = fsStat.statSync(entryPath,
|
|
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 (
|
|
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
|
|
4822
|
-
return sync.read(path,
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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(
|
|
5159
|
-
if (
|
|
5242
|
+
function isFatalError(settings2, error2) {
|
|
5243
|
+
if (settings2.errorFilter === null) {
|
|
5160
5244
|
return true;
|
|
5161
5245
|
}
|
|
5162
|
-
return !
|
|
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(
|
|
5174
|
-
if (
|
|
5257
|
+
function joinPathSegments(a2, b, separator) {
|
|
5258
|
+
if (a2 === "") {
|
|
5175
5259
|
return b;
|
|
5176
5260
|
}
|
|
5177
|
-
if (
|
|
5178
|
-
return
|
|
5261
|
+
if (a2.endsWith(separator)) {
|
|
5262
|
+
return a2 + b;
|
|
5179
5263
|
}
|
|
5180
|
-
return
|
|
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
|
|
5528
|
-
const provider = new sync_1.default(directory,
|
|
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
|
|
5534
|
-
const provider = new stream_1.default(directory,
|
|
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
|
|
5621
|
-
stream.write(
|
|
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
|
|
6283
|
-
return taskManager.generate(patterns,
|
|
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
|
|
6289
|
-
return utils.pattern.isDynamicPattern(source,
|
|
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
|
|
6332
|
-
const tasks = taskManager.generate(patterns,
|
|
6333
|
-
const provider = new _Provider(
|
|
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,
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
6959
|
+
const dir = this.normalizePath(dirname2(normalizedPath));
|
|
6875
6960
|
const fileExists = this.pathExists(normalizedPath);
|
|
6876
6961
|
if (fileExists && !overwrite) {
|
|
6877
6962
|
if (verbose) {
|
|
6878
|
-
|
|
6963
|
+
log3.info(`Skipping existing file: ${normalizedPath}`);
|
|
6879
6964
|
}
|
|
6880
6965
|
return false;
|
|
6881
6966
|
}
|
|
6882
6967
|
if (dryRun) {
|
|
6883
|
-
|
|
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 (
|
|
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 (
|
|
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
|
-
|
|
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(
|
|
7021
|
+
const dir = this.normalizePath(dirname2(normalizedPath));
|
|
6936
7022
|
const fileExists = this.pathExists(normalizedPath);
|
|
6937
7023
|
if (fileExists && !overwrite) {
|
|
6938
7024
|
if (verbose) {
|
|
6939
|
-
|
|
7025
|
+
log3.info(`Skipping existing file: ${normalizedPath}`);
|
|
6940
7026
|
}
|
|
6941
7027
|
return false;
|
|
6942
7028
|
}
|
|
6943
7029
|
if (dryRun) {
|
|
6944
|
-
|
|
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 (
|
|
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 (
|
|
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
|
-
|
|
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
|
-
|
|
7081
|
+
log3.info(`Skipping existing file: ${normalizedDestPath}`);
|
|
6994
7082
|
}
|
|
6995
7083
|
return false;
|
|
6996
7084
|
}
|
|
6997
7085
|
if (dryRun) {
|
|
6998
|
-
|
|
7086
|
+
log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
|
|
6999
7087
|
return true;
|
|
7000
7088
|
}
|
|
7001
|
-
const dir = this.normalizePath(
|
|
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
|
-
|
|
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
|
-
|
|
7123
|
+
log3.info(`Skipping existing file: ${normalizedDestPath}`);
|
|
7036
7124
|
}
|
|
7037
7125
|
return false;
|
|
7038
7126
|
}
|
|
7039
7127
|
if (dryRun) {
|
|
7040
|
-
|
|
7128
|
+
log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
|
|
7041
7129
|
return true;
|
|
7042
7130
|
}
|
|
7043
|
-
const dir = this.normalizePath(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
7617
|
+
join2(currentDir, PACKAGE_PATHS.TOOLING)
|
|
7480
7618
|
);
|
|
7481
|
-
const corePath = this.normalizePath(
|
|
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 =
|
|
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
|
-
|
|
7631
|
+
join2(currentDir, "package.json")
|
|
7494
7632
|
);
|
|
7495
7633
|
if (this.pathExists(packageJsonPath)) {
|
|
7496
|
-
const parentDir2 = this.normalizePath(
|
|
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(
|
|
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
|
|
7518
|
-
dirname as
|
|
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
|
|
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(
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
8399
|
+
log2.info(` Prerequisite: ${section.prerequisite}`);
|
|
8262
8400
|
}
|
|
8263
|
-
|
|
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
|
|
8277
|
-
const otherHit = providerHits[
|
|
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
|
-
|
|
8420
|
+
log2.info(` \u2192 ${matchingStep.target}`);
|
|
8283
8421
|
}
|
|
8284
8422
|
}
|
|
8285
8423
|
}
|
|
8286
8424
|
}
|
|
8287
8425
|
}
|
|
8288
8426
|
if (stepNumber > 0) {
|
|
8289
|
-
|
|
8427
|
+
log2.info("\nWhen done, run: dndev setup");
|
|
8290
8428
|
}
|
|
8291
8429
|
}
|
|
8292
8430
|
function renderStep(num, step, appName) {
|
|
8293
|
-
|
|
8431
|
+
log2.info(` ${num}. ${step.action}`);
|
|
8294
8432
|
if (step.dashboardUrl) {
|
|
8295
|
-
|
|
8433
|
+
log2.info(` ${step.dashboardUrl}`);
|
|
8296
8434
|
}
|
|
8297
8435
|
if (step.where !== step.action) {
|
|
8298
|
-
|
|
8436
|
+
log2.info(` ${step.where}`);
|
|
8299
8437
|
}
|
|
8300
8438
|
if (step.target) {
|
|
8301
8439
|
const prefix = appName ? `[${appName}] ` : "";
|
|
8302
|
-
|
|
8440
|
+
log2.info(` \u2192 ${prefix}${step.target}`);
|
|
8303
8441
|
}
|
|
8304
8442
|
if (step.hint) {
|
|
8305
|
-
|
|
8443
|
+
log2.info(` ${step.hint}`);
|
|
8306
8444
|
}
|
|
8307
8445
|
}
|
|
8308
8446
|
async function main(_options = {}) {
|
|
8309
8447
|
const projectRoot = process.cwd();
|
|
8310
|
-
|
|
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
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
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
|
-
|
|
8476
|
+
outro("");
|
|
8339
8477
|
return 0;
|
|
8340
8478
|
}
|
|
8341
8479
|
export {
|