@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 __copyProps = (to, from, except, desc) => {
|
|
20
29
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -33,31 +42,40 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
42
|
mod
|
|
34
43
|
));
|
|
35
44
|
|
|
36
|
-
// node_modules/.bun/fast-string-truncated-width@
|
|
37
|
-
var
|
|
45
|
+
// node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
|
|
46
|
+
var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;
|
|
38
47
|
var init_utils = __esm({
|
|
39
|
-
"node_modules/.bun/fast-string-truncated-width@
|
|
48
|
+
"node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js"() {
|
|
40
49
|
init_utils2();
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
getCodePointsLength = /* @__PURE__ */ (() => {
|
|
51
|
+
const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
52
|
+
return (input) => {
|
|
53
|
+
let surrogatePairsNr = 0;
|
|
54
|
+
SURROGATE_PAIR_RE.lastIndex = 0;
|
|
55
|
+
while (SURROGATE_PAIR_RE.test(input)) {
|
|
56
|
+
surrogatePairsNr += 1;
|
|
57
|
+
}
|
|
58
|
+
return input.length - surrogatePairsNr;
|
|
59
|
+
};
|
|
60
|
+
})();
|
|
44
61
|
isFullWidth = (x) => {
|
|
45
62
|
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
46
63
|
};
|
|
47
|
-
|
|
48
|
-
return x
|
|
64
|
+
isWideNotCJKTNotEmoji = (x) => {
|
|
65
|
+
return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
49
66
|
};
|
|
50
67
|
}
|
|
51
68
|
});
|
|
52
69
|
|
|
53
|
-
// node_modules/.bun/fast-string-truncated-width@
|
|
54
|
-
var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
|
|
70
|
+
// node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
|
|
71
|
+
var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
|
|
55
72
|
var init_dist = __esm({
|
|
56
|
-
"node_modules/.bun/fast-string-truncated-width@
|
|
73
|
+
"node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js"() {
|
|
57
74
|
init_utils2();
|
|
58
75
|
init_utils();
|
|
59
|
-
ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
|
|
76
|
+
ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
|
|
60
77
|
CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
78
|
+
CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
|
|
61
79
|
TAB_RE = /\t{1,1000}/y;
|
|
62
80
|
EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
|
|
63
81
|
LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
@@ -67,14 +85,21 @@ var init_dist = __esm({
|
|
|
67
85
|
const LIMIT = truncationOptions.limit ?? Infinity;
|
|
68
86
|
const ELLIPSIS = truncationOptions.ellipsis ?? "";
|
|
69
87
|
const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
|
|
70
|
-
const ANSI_WIDTH =
|
|
88
|
+
const ANSI_WIDTH = 0;
|
|
71
89
|
const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
|
|
72
90
|
const TAB_WIDTH = widthOptions.tabWidth ?? 8;
|
|
73
|
-
const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
|
|
74
91
|
const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
|
|
75
|
-
const FULL_WIDTH_WIDTH =
|
|
92
|
+
const FULL_WIDTH_WIDTH = 2;
|
|
76
93
|
const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
|
|
77
|
-
const WIDE_WIDTH = widthOptions.wideWidth ??
|
|
94
|
+
const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
|
|
95
|
+
const PARSE_BLOCKS = [
|
|
96
|
+
[LATIN_RE, REGULAR_WIDTH],
|
|
97
|
+
[ANSI_RE, ANSI_WIDTH],
|
|
98
|
+
[CONTROL_RE, CONTROL_WIDTH],
|
|
99
|
+
[TAB_RE, TAB_WIDTH],
|
|
100
|
+
[EMOJI_RE, EMOJI_WIDTH],
|
|
101
|
+
[CJKT_WIDE_RE, WIDE_WIDTH]
|
|
102
|
+
];
|
|
78
103
|
let indexPrev = 0;
|
|
79
104
|
let index = 0;
|
|
80
105
|
let length = input.length;
|
|
@@ -94,10 +119,8 @@ var init_dist = __esm({
|
|
|
94
119
|
const codePoint = char.codePointAt(0) || 0;
|
|
95
120
|
if (isFullWidth(codePoint)) {
|
|
96
121
|
widthExtra = FULL_WIDTH_WIDTH;
|
|
97
|
-
} else if (
|
|
122
|
+
} else if (isWideNotCJKTNotEmoji(codePoint)) {
|
|
98
123
|
widthExtra = WIDE_WIDTH;
|
|
99
|
-
} else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
|
|
100
|
-
widthExtra = AMBIGUOUS_WIDTH;
|
|
101
124
|
} else {
|
|
102
125
|
widthExtra = REGULAR_WIDTH;
|
|
103
126
|
}
|
|
@@ -113,88 +136,28 @@ var init_dist = __esm({
|
|
|
113
136
|
}
|
|
114
137
|
unmatchedStart = unmatchedEnd = 0;
|
|
115
138
|
}
|
|
116
|
-
if (index >= length)
|
|
117
|
-
break;
|
|
118
|
-
LATIN_RE.lastIndex = index;
|
|
119
|
-
if (LATIN_RE.test(input)) {
|
|
120
|
-
lengthExtra = LATIN_RE.lastIndex - index;
|
|
121
|
-
widthExtra = lengthExtra * REGULAR_WIDTH;
|
|
122
|
-
if (width + widthExtra > truncationLimit) {
|
|
123
|
-
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
|
|
124
|
-
}
|
|
125
|
-
if (width + widthExtra > LIMIT) {
|
|
126
|
-
truncationEnabled = true;
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
width += widthExtra;
|
|
130
|
-
unmatchedStart = indexPrev;
|
|
131
|
-
unmatchedEnd = index;
|
|
132
|
-
index = indexPrev = LATIN_RE.lastIndex;
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
ANSI_RE.lastIndex = index;
|
|
136
|
-
if (ANSI_RE.test(input)) {
|
|
137
|
-
if (width + ANSI_WIDTH > truncationLimit) {
|
|
138
|
-
truncationIndex = Math.min(truncationIndex, index);
|
|
139
|
-
}
|
|
140
|
-
if (width + ANSI_WIDTH > LIMIT) {
|
|
141
|
-
truncationEnabled = true;
|
|
142
|
-
break;
|
|
143
|
-
}
|
|
144
|
-
width += ANSI_WIDTH;
|
|
145
|
-
unmatchedStart = indexPrev;
|
|
146
|
-
unmatchedEnd = index;
|
|
147
|
-
index = indexPrev = ANSI_RE.lastIndex;
|
|
148
|
-
continue;
|
|
139
|
+
if (index >= length) {
|
|
140
|
+
break outer;
|
|
149
141
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
if (TAB_RE.test(input)) {
|
|
169
|
-
lengthExtra = TAB_RE.lastIndex - index;
|
|
170
|
-
widthExtra = lengthExtra * TAB_WIDTH;
|
|
171
|
-
if (width + widthExtra > truncationLimit) {
|
|
172
|
-
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
|
|
173
|
-
}
|
|
174
|
-
if (width + widthExtra > LIMIT) {
|
|
175
|
-
truncationEnabled = true;
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
width += widthExtra;
|
|
179
|
-
unmatchedStart = indexPrev;
|
|
180
|
-
unmatchedEnd = index;
|
|
181
|
-
index = indexPrev = TAB_RE.lastIndex;
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
EMOJI_RE.lastIndex = index;
|
|
185
|
-
if (EMOJI_RE.test(input)) {
|
|
186
|
-
if (width + EMOJI_WIDTH > truncationLimit) {
|
|
187
|
-
truncationIndex = Math.min(truncationIndex, index);
|
|
188
|
-
}
|
|
189
|
-
if (width + EMOJI_WIDTH > LIMIT) {
|
|
190
|
-
truncationEnabled = true;
|
|
191
|
-
break;
|
|
142
|
+
for (let i2 = 0, l = PARSE_BLOCKS.length; i2 < l; i2++) {
|
|
143
|
+
const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
|
|
144
|
+
BLOCK_RE.lastIndex = index;
|
|
145
|
+
if (BLOCK_RE.test(input)) {
|
|
146
|
+
lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
|
|
147
|
+
widthExtra = lengthExtra * BLOCK_WIDTH;
|
|
148
|
+
if (width + widthExtra > truncationLimit) {
|
|
149
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
|
|
150
|
+
}
|
|
151
|
+
if (width + widthExtra > LIMIT) {
|
|
152
|
+
truncationEnabled = true;
|
|
153
|
+
break outer;
|
|
154
|
+
}
|
|
155
|
+
width += widthExtra;
|
|
156
|
+
unmatchedStart = indexPrev;
|
|
157
|
+
unmatchedEnd = index;
|
|
158
|
+
index = indexPrev = BLOCK_RE.lastIndex;
|
|
159
|
+
continue outer;
|
|
192
160
|
}
|
|
193
|
-
width += EMOJI_WIDTH;
|
|
194
|
-
unmatchedStart = indexPrev;
|
|
195
|
-
unmatchedEnd = index;
|
|
196
|
-
index = indexPrev = EMOJI_RE.lastIndex;
|
|
197
|
-
continue;
|
|
198
161
|
}
|
|
199
162
|
index += 1;
|
|
200
163
|
}
|
|
@@ -209,10 +172,10 @@ var init_dist = __esm({
|
|
|
209
172
|
}
|
|
210
173
|
});
|
|
211
174
|
|
|
212
|
-
// node_modules/.bun/fast-string-width@
|
|
175
|
+
// node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
|
|
213
176
|
var NO_TRUNCATION2, fastStringWidth, dist_default2;
|
|
214
177
|
var init_dist2 = __esm({
|
|
215
|
-
"node_modules/.bun/fast-string-width@
|
|
178
|
+
"node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
|
|
216
179
|
init_utils2();
|
|
217
180
|
init_dist();
|
|
218
181
|
NO_TRUNCATION2 = {
|
|
@@ -227,13 +190,13 @@ var init_dist2 = __esm({
|
|
|
227
190
|
}
|
|
228
191
|
});
|
|
229
192
|
|
|
230
|
-
// node_modules/.bun/fast-wrap-ansi@0.
|
|
193
|
+
// node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
|
|
231
194
|
function wrapAnsi(string, columns, options) {
|
|
232
195
|
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
|
|
233
196
|
}
|
|
234
197
|
var ESC, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
|
|
235
198
|
var init_main = __esm({
|
|
236
|
-
"node_modules/.bun/fast-wrap-ansi@0.
|
|
199
|
+
"node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js"() {
|
|
237
200
|
init_utils2();
|
|
238
201
|
init_dist2();
|
|
239
202
|
ESC = "\x1B";
|
|
@@ -397,16 +360,19 @@ var init_main = __esm({
|
|
|
397
360
|
}
|
|
398
361
|
const preString = rows.join("\n");
|
|
399
362
|
let inSurrogate = false;
|
|
400
|
-
for (let
|
|
401
|
-
const character = preString[
|
|
363
|
+
for (let i2 = 0; i2 < preString.length; i2++) {
|
|
364
|
+
const character = preString[i2];
|
|
402
365
|
returnValue += character;
|
|
403
366
|
if (!inSurrogate) {
|
|
404
367
|
inSurrogate = character >= "\uD800" && character <= "\uDBFF";
|
|
368
|
+
if (inSurrogate) {
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
405
371
|
} else {
|
|
406
|
-
|
|
372
|
+
inSurrogate = false;
|
|
407
373
|
}
|
|
408
374
|
if (character === ESC || character === CSI) {
|
|
409
|
-
GROUP_REGEX.lastIndex =
|
|
375
|
+
GROUP_REGEX.lastIndex = i2 + 1;
|
|
410
376
|
const groupsResult = GROUP_REGEX.exec(preString);
|
|
411
377
|
const groups = groupsResult?.groups;
|
|
412
378
|
if (groups?.code !== void 0) {
|
|
@@ -416,7 +382,7 @@ var init_main = __esm({
|
|
|
416
382
|
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
417
383
|
}
|
|
418
384
|
}
|
|
419
|
-
if (preString[
|
|
385
|
+
if (preString[i2 + 1] === "\n") {
|
|
420
386
|
if (escapeUrl) {
|
|
421
387
|
returnValue += wrapAnsiHyperlink("");
|
|
422
388
|
}
|
|
@@ -447,7 +413,7 @@ var require_src = __commonJS({
|
|
|
447
413
|
var ESC2 = "\x1B";
|
|
448
414
|
var CSI2 = `${ESC2}[`;
|
|
449
415
|
var beep = "\x07";
|
|
450
|
-
var
|
|
416
|
+
var cursor3 = {
|
|
451
417
|
to(x, y2) {
|
|
452
418
|
if (!y2) return `${CSI2}${x + 1}G`;
|
|
453
419
|
return `${CSI2}${y2 + 1};${x + 1}H`;
|
|
@@ -476,7 +442,7 @@ var require_src = __commonJS({
|
|
|
476
442
|
up: (count = 1) => `${CSI2}S`.repeat(count),
|
|
477
443
|
down: (count = 1) => `${CSI2}T`.repeat(count)
|
|
478
444
|
};
|
|
479
|
-
var
|
|
445
|
+
var erase3 = {
|
|
480
446
|
screen: `${CSI2}2J`,
|
|
481
447
|
up: (count = 1) => `${CSI2}1J`.repeat(count),
|
|
482
448
|
down: (count = 1) => `${CSI2}J`.repeat(count),
|
|
@@ -485,67 +451,137 @@ var require_src = __commonJS({
|
|
|
485
451
|
lineStart: `${CSI2}1K`,
|
|
486
452
|
lines(count) {
|
|
487
453
|
let clear = "";
|
|
488
|
-
for (let
|
|
489
|
-
clear += this.line + (
|
|
454
|
+
for (let i2 = 0; i2 < count; i2++)
|
|
455
|
+
clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
|
|
490
456
|
if (count)
|
|
491
|
-
clear +=
|
|
457
|
+
clear += cursor3.left;
|
|
492
458
|
return clear;
|
|
493
459
|
}
|
|
494
460
|
};
|
|
495
|
-
module.exports = { cursor, scroll, erase, beep };
|
|
461
|
+
module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
|
|
496
462
|
}
|
|
497
463
|
});
|
|
498
464
|
|
|
499
|
-
// node_modules/.bun/@clack+core@1.
|
|
500
|
-
import { styleText
|
|
501
|
-
import { stdout
|
|
502
|
-
import
|
|
503
|
-
import { ReadStream
|
|
504
|
-
function
|
|
505
|
-
if (!
|
|
506
|
-
|
|
507
|
-
|
|
465
|
+
// node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
|
|
466
|
+
import { styleText } from "node:util";
|
|
467
|
+
import { stdout, stdin } from "node:process";
|
|
468
|
+
import l__default from "node:readline";
|
|
469
|
+
import { ReadStream } from "node:tty";
|
|
470
|
+
function findCursor(s, o, l) {
|
|
471
|
+
if (!l.some((r2) => !r2.disabled))
|
|
472
|
+
return s;
|
|
473
|
+
const t2 = s + o, n3 = Math.max(l.length - 1, 0), e = t2 < 0 ? n3 : t2 > n3 ? 0 : t2;
|
|
474
|
+
return l[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l) : e;
|
|
475
|
+
}
|
|
476
|
+
function isAccessible(n3) {
|
|
477
|
+
if (n3 !== void 0) return n3;
|
|
478
|
+
if (settings.accessible !== void 0) return settings.accessible;
|
|
479
|
+
const e = process.env.ACCESSIBLE;
|
|
480
|
+
return e !== void 0 && e !== "" && e !== "0" && e !== "false";
|
|
508
481
|
}
|
|
509
|
-
function
|
|
510
|
-
if (typeof
|
|
511
|
-
|
|
482
|
+
function isActionKey(n3, e) {
|
|
483
|
+
if (typeof n3 == "string")
|
|
484
|
+
return settings.aliases.get(n3) === e;
|
|
485
|
+
for (const s of n3)
|
|
486
|
+
if (s !== void 0 && isActionKey(s, e))
|
|
487
|
+
return true;
|
|
512
488
|
return false;
|
|
513
489
|
}
|
|
514
|
-
function
|
|
515
|
-
if (
|
|
516
|
-
const e =
|
|
517
|
-
`),
|
|
518
|
-
`),
|
|
519
|
-
for (let
|
|
520
|
-
|
|
490
|
+
function diffLines(i2, s) {
|
|
491
|
+
if (i2 === s) return;
|
|
492
|
+
const e = i2.split(`
|
|
493
|
+
`), t2 = s.split(`
|
|
494
|
+
`), r2 = Math.max(e.length, t2.length), f = [];
|
|
495
|
+
for (let n3 = 0; n3 < r2; n3++)
|
|
496
|
+
e[n3] !== t2[n3] && f.push(n3);
|
|
497
|
+
return {
|
|
498
|
+
lines: f,
|
|
499
|
+
numLinesBefore: e.length,
|
|
500
|
+
numLinesAfter: t2.length,
|
|
501
|
+
numLines: r2
|
|
502
|
+
};
|
|
521
503
|
}
|
|
522
|
-
function
|
|
523
|
-
return
|
|
504
|
+
function isCancel(e) {
|
|
505
|
+
return e === CANCEL_SYMBOL;
|
|
524
506
|
}
|
|
525
|
-
function
|
|
526
|
-
const
|
|
527
|
-
|
|
507
|
+
function setRawMode(e, r2) {
|
|
508
|
+
const o = e;
|
|
509
|
+
o.isTTY && o.setRawMode(r2);
|
|
528
510
|
}
|
|
529
|
-
function
|
|
530
|
-
const
|
|
531
|
-
return wrapAnsi(
|
|
532
|
-
|
|
511
|
+
function wrapTextWithPrefix(e, r2, o, n3 = o, s = o, t2) {
|
|
512
|
+
const f = getColumns(e ?? stdout);
|
|
513
|
+
return wrapAnsi(r2, f - o.length, {
|
|
514
|
+
hard: true,
|
|
515
|
+
trim: false
|
|
516
|
+
}).split(`
|
|
517
|
+
`).map((c2, i2, m) => {
|
|
518
|
+
const d = t2 ? t2(c2, i2) : c2;
|
|
519
|
+
return i2 === 0 ? `${n3}${d}` : i2 === m.length - 1 ? `${s}${d}` : `${o}${d}`;
|
|
520
|
+
}).join(`
|
|
533
521
|
`);
|
|
534
522
|
}
|
|
535
|
-
|
|
523
|
+
function runValidation(e, a2) {
|
|
524
|
+
if ("~standard" in e) {
|
|
525
|
+
const n3 = e["~standard"].validate(a2);
|
|
526
|
+
return n3 instanceof Promise ? n3.then((r2) => r2.issues?.at(0)?.message) : n3.issues?.at(0)?.message;
|
|
527
|
+
}
|
|
528
|
+
return e(a2);
|
|
529
|
+
}
|
|
530
|
+
var import_sisteransi, a$1, t, settings, R, CANCEL_SYMBOL, getColumns, getRows, y, n$1;
|
|
536
531
|
var init_dist3 = __esm({
|
|
537
|
-
"node_modules/.bun/@clack+core@1.
|
|
532
|
+
"node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
|
|
538
533
|
init_utils2();
|
|
539
534
|
init_main();
|
|
540
535
|
import_sisteransi = __toESM(require_src(), 1);
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
536
|
+
a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
537
|
+
t = [
|
|
538
|
+
"January",
|
|
539
|
+
"February",
|
|
540
|
+
"March",
|
|
541
|
+
"April",
|
|
542
|
+
"May",
|
|
543
|
+
"June",
|
|
544
|
+
"July",
|
|
545
|
+
"August",
|
|
546
|
+
"September",
|
|
547
|
+
"October",
|
|
548
|
+
"November",
|
|
549
|
+
"December"
|
|
550
|
+
];
|
|
551
|
+
settings = {
|
|
552
|
+
actions: new Set(a$1),
|
|
553
|
+
aliases: /* @__PURE__ */ new Map([
|
|
554
|
+
// vim support
|
|
555
|
+
["k", "up"],
|
|
556
|
+
["j", "down"],
|
|
557
|
+
["h", "left"],
|
|
558
|
+
["l", "right"],
|
|
559
|
+
["", "cancel"],
|
|
560
|
+
// opinionated defaults!
|
|
561
|
+
["escape", "cancel"]
|
|
562
|
+
]),
|
|
563
|
+
messages: {
|
|
564
|
+
cancel: "Canceled",
|
|
565
|
+
error: "Something went wrong"
|
|
566
|
+
},
|
|
567
|
+
withGuide: true,
|
|
568
|
+
accessible: void 0,
|
|
569
|
+
date: {
|
|
570
|
+
monthNames: [...t],
|
|
571
|
+
messages: {
|
|
572
|
+
required: "Please enter a valid date",
|
|
573
|
+
invalidMonth: "There are only 12 months in a year",
|
|
574
|
+
invalidDay: (n3, e) => `There are only ${n3} days in ${e}`,
|
|
575
|
+
afterMin: (n3) => `Date must be on or after ${n3.toISOString().slice(0, 10)}`,
|
|
576
|
+
beforeMax: (n3) => `Date must be on or before ${n3.toISOString().slice(0, 10)}`
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
R = globalThis.process.platform.startsWith("win");
|
|
581
|
+
CANCEL_SYMBOL = /* @__PURE__ */ Symbol("clack:cancel");
|
|
582
|
+
getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
|
|
583
|
+
getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
|
|
584
|
+
y = class {
|
|
549
585
|
input;
|
|
550
586
|
output;
|
|
551
587
|
_abortSignal;
|
|
@@ -560,46 +596,92 @@ var init_dist3 = __esm({
|
|
|
560
596
|
error = "";
|
|
561
597
|
value;
|
|
562
598
|
userInput = "";
|
|
599
|
+
/**
|
|
600
|
+
* Whether accessible (static, screen-reader friendly) output is enabled for
|
|
601
|
+
* this prompt, resolved from the `accessible` option, the global setting,
|
|
602
|
+
* and the `ACCESSIBLE` env var.
|
|
603
|
+
*/
|
|
604
|
+
get accessible() {
|
|
605
|
+
return isAccessible(this.opts.accessible);
|
|
606
|
+
}
|
|
563
607
|
constructor(t2, e = true) {
|
|
564
|
-
const { input:
|
|
565
|
-
this.opts =
|
|
608
|
+
const { input: i2 = stdin, output: s = stdout, render: r2, signal: n3, ...o } = t2;
|
|
609
|
+
this.opts = o, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = r2.bind(this), this._track = e, this._abortSignal = n3, this.input = i2, this.output = s;
|
|
566
610
|
}
|
|
611
|
+
/**
|
|
612
|
+
* Unsubscribe all listeners
|
|
613
|
+
*/
|
|
567
614
|
unsubscribe() {
|
|
568
615
|
this._subscribers.clear();
|
|
569
616
|
}
|
|
617
|
+
/**
|
|
618
|
+
* Set a subscriber with opts
|
|
619
|
+
* @param event - The event name
|
|
620
|
+
*/
|
|
570
621
|
setSubscriber(t2, e) {
|
|
571
|
-
const
|
|
572
|
-
|
|
622
|
+
const i2 = this._subscribers.get(t2) ?? [];
|
|
623
|
+
i2.push(e), this._subscribers.set(t2, i2);
|
|
573
624
|
}
|
|
625
|
+
/**
|
|
626
|
+
* Subscribe to an event
|
|
627
|
+
* @param event - The event name
|
|
628
|
+
* @param cb - The callback
|
|
629
|
+
*/
|
|
574
630
|
on(t2, e) {
|
|
575
631
|
this.setSubscriber(t2, { cb: e });
|
|
576
632
|
}
|
|
633
|
+
/**
|
|
634
|
+
* Subscribe to an event once
|
|
635
|
+
* @param event - The event name
|
|
636
|
+
* @param cb - The callback
|
|
637
|
+
*/
|
|
577
638
|
once(t2, e) {
|
|
578
639
|
this.setSubscriber(t2, { cb: e, once: true });
|
|
579
640
|
}
|
|
641
|
+
/**
|
|
642
|
+
* Emit an event with data
|
|
643
|
+
* @param event - The event name
|
|
644
|
+
* @param data - The data to pass to the callback
|
|
645
|
+
*/
|
|
580
646
|
emit(t2, ...e) {
|
|
581
|
-
const
|
|
582
|
-
for (const
|
|
583
|
-
|
|
647
|
+
const i2 = this._subscribers.get(t2) ?? [], s = [];
|
|
648
|
+
for (const r2 of i2)
|
|
649
|
+
r2.cb(...e), r2.once && s.push(() => i2.splice(i2.indexOf(r2), 1));
|
|
650
|
+
for (const r2 of s)
|
|
651
|
+
r2();
|
|
584
652
|
}
|
|
585
653
|
prompt() {
|
|
586
654
|
return new Promise((t2) => {
|
|
587
655
|
if (this._abortSignal) {
|
|
588
|
-
if (this._abortSignal.aborted)
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
656
|
+
if (this._abortSignal.aborted)
|
|
657
|
+
return this.state = "cancel", this.close(), t2(CANCEL_SYMBOL);
|
|
658
|
+
this._abortSignal.addEventListener(
|
|
659
|
+
"abort",
|
|
660
|
+
() => {
|
|
661
|
+
this.state = "cancel", this.close();
|
|
662
|
+
},
|
|
663
|
+
{ once: true }
|
|
664
|
+
);
|
|
592
665
|
}
|
|
593
|
-
this.rl =
|
|
594
|
-
|
|
666
|
+
this.rl = l__default.createInterface({
|
|
667
|
+
input: this.input,
|
|
668
|
+
tabSize: 2,
|
|
669
|
+
prompt: "",
|
|
670
|
+
escapeCodeTimeout: 50,
|
|
671
|
+
terminal: true
|
|
672
|
+
}), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), setRawMode(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
673
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
|
|
595
674
|
}), this.once("cancel", () => {
|
|
596
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render),
|
|
675
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
|
|
597
676
|
});
|
|
598
677
|
});
|
|
599
678
|
}
|
|
600
679
|
_isActionKey(t2, e) {
|
|
601
680
|
return t2 === " ";
|
|
602
681
|
}
|
|
682
|
+
_shouldSubmit(t2, e) {
|
|
683
|
+
return true;
|
|
684
|
+
}
|
|
603
685
|
_setValue(t2) {
|
|
604
686
|
this.value = t2, this.emit("value", this.value);
|
|
605
687
|
}
|
|
@@ -609,19 +691,22 @@ var init_dist3 = __esm({
|
|
|
609
691
|
_clearUserInput() {
|
|
610
692
|
this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
|
|
611
693
|
}
|
|
612
|
-
onKeypress(t2, e) {
|
|
613
|
-
if (this.
|
|
614
|
-
if (this.
|
|
615
|
-
|
|
616
|
-
|
|
694
|
+
async onKeypress(t2, e) {
|
|
695
|
+
if (this.state !== "validating") {
|
|
696
|
+
if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && settings.aliases.has(e.name) && this.emit("cursor", settings.aliases.get(e.name)), settings.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2, e), e?.name === "return" && this._shouldSubmit(t2, e)) {
|
|
697
|
+
if (this.opts.validate) {
|
|
698
|
+
const i2 = runValidation(this.opts.validate, this.value);
|
|
699
|
+
let s;
|
|
700
|
+
i2 instanceof Promise ? (this.state = "validating", this.render(), s = await i2) : s = i2, s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
|
|
701
|
+
}
|
|
702
|
+
this.state !== "error" && (this.state = "submit");
|
|
617
703
|
}
|
|
618
|
-
this.state
|
|
704
|
+
isActionKey([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
619
705
|
}
|
|
620
|
-
V([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
621
706
|
}
|
|
622
707
|
close() {
|
|
623
708
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
624
|
-
`),
|
|
709
|
+
`), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
625
710
|
}
|
|
626
711
|
restoreCursor() {
|
|
627
712
|
const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
|
|
@@ -629,34 +714,39 @@ var init_dist3 = __esm({
|
|
|
629
714
|
this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
|
|
630
715
|
}
|
|
631
716
|
render() {
|
|
632
|
-
const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
|
|
717
|
+
const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
|
|
718
|
+
hard: true,
|
|
719
|
+
trim: false
|
|
720
|
+
});
|
|
633
721
|
if (t2 !== this._prevFrame) {
|
|
634
|
-
if (this.state === "initial")
|
|
722
|
+
if (this.state === "initial")
|
|
723
|
+
this.output.write(import_sisteransi.cursor.hide);
|
|
635
724
|
else {
|
|
636
|
-
const e =
|
|
725
|
+
const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
|
|
637
726
|
if (this.restoreCursor(), e) {
|
|
638
|
-
const
|
|
639
|
-
let
|
|
640
|
-
if (
|
|
727
|
+
const s = Math.max(0, e.numLinesAfter - i2), r2 = Math.max(0, e.numLinesBefore - i2);
|
|
728
|
+
let n3 = e.lines.find((o) => o >= s);
|
|
729
|
+
if (n3 === void 0) {
|
|
641
730
|
this._prevFrame = t2;
|
|
642
731
|
return;
|
|
643
732
|
}
|
|
644
733
|
if (e.lines.length === 1) {
|
|
645
|
-
this.output.write(import_sisteransi.cursor.move(0,
|
|
646
|
-
const
|
|
734
|
+
this.output.write(import_sisteransi.cursor.move(0, n3 - r2)), this.output.write(import_sisteransi.erase.lines(1));
|
|
735
|
+
const o = t2.split(`
|
|
647
736
|
`);
|
|
648
|
-
this.output.write(
|
|
737
|
+
this.output.write(o[n3]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, o.length - n3 - 1));
|
|
649
738
|
return;
|
|
650
739
|
} else if (e.lines.length > 1) {
|
|
651
|
-
if (
|
|
740
|
+
if (s < r2)
|
|
741
|
+
n3 = s;
|
|
652
742
|
else {
|
|
653
|
-
const
|
|
654
|
-
|
|
743
|
+
const h2 = n3 - r2;
|
|
744
|
+
h2 > 0 && this.output.write(import_sisteransi.cursor.move(0, h2));
|
|
655
745
|
}
|
|
656
746
|
this.output.write(import_sisteransi.erase.down());
|
|
657
|
-
const
|
|
658
|
-
`).slice(
|
|
659
|
-
this.output.write(
|
|
747
|
+
const f = t2.split(`
|
|
748
|
+
`).slice(n3);
|
|
749
|
+
this.output.write(f.join(`
|
|
660
750
|
`)), this._prevFrame = t2;
|
|
661
751
|
return;
|
|
662
752
|
}
|
|
@@ -667,27 +757,28 @@ var init_dist3 = __esm({
|
|
|
667
757
|
}
|
|
668
758
|
}
|
|
669
759
|
};
|
|
670
|
-
|
|
760
|
+
n$1 = class n extends y {
|
|
671
761
|
options;
|
|
672
762
|
cursor = 0;
|
|
673
763
|
get _selectedValue() {
|
|
674
764
|
return this.options[this.cursor];
|
|
675
765
|
}
|
|
676
766
|
changeValue() {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
767
|
+
const e = this._selectedValue;
|
|
768
|
+
this.value = e === void 0 ? void 0 : e.value;
|
|
769
|
+
}
|
|
770
|
+
constructor(e) {
|
|
771
|
+
super(e, false), this.options = e.options;
|
|
772
|
+
const o = this.options.findIndex(({ value: s }) => s === e.initialValue), t2 = o === -1 ? 0 : o;
|
|
773
|
+
this.cursor = this.options[t2]?.disabled ? findCursor(t2, 1, this.options) : t2, this.changeValue(), this.on("cursor", (s) => {
|
|
774
|
+
switch (s) {
|
|
684
775
|
case "left":
|
|
685
776
|
case "up":
|
|
686
|
-
this.cursor =
|
|
777
|
+
this.cursor = findCursor(this.cursor, -1, this.options);
|
|
687
778
|
break;
|
|
688
779
|
case "down":
|
|
689
780
|
case "right":
|
|
690
|
-
this.cursor =
|
|
781
|
+
this.cursor = findCursor(this.cursor, 1, this.options);
|
|
691
782
|
break;
|
|
692
783
|
}
|
|
693
784
|
this.changeValue();
|
|
@@ -697,206 +788,323 @@ var init_dist3 = __esm({
|
|
|
697
788
|
}
|
|
698
789
|
});
|
|
699
790
|
|
|
700
|
-
// node_modules/.bun/@clack+prompts@1.
|
|
701
|
-
import { styleText as
|
|
702
|
-
import
|
|
703
|
-
import { existsSync
|
|
704
|
-
import { dirname
|
|
705
|
-
function
|
|
706
|
-
|
|
791
|
+
// node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
|
|
792
|
+
import { styleText as styleText2, stripVTControlCharacters } from "node:util";
|
|
793
|
+
import process$1 from "node:process";
|
|
794
|
+
import { existsSync, lstatSync, readdirSync } from "node:fs";
|
|
795
|
+
import { dirname, join } from "node:path";
|
|
796
|
+
function isUnicodeSupported() {
|
|
797
|
+
if (process$1.platform !== "win32") {
|
|
798
|
+
return process$1.env.TERM !== "linux";
|
|
799
|
+
}
|
|
800
|
+
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";
|
|
707
801
|
}
|
|
708
|
-
|
|
802
|
+
function formatInstructionFooter(o, e) {
|
|
803
|
+
const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
|
|
804
|
+
return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
|
|
805
|
+
}
|
|
806
|
+
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, symbol, symbolBar, I, limitOptions, MULTISELECT_INSTRUCTIONS, log, cancel, W$1, C, note, u2, SELECT_INSTRUCTIONS, c, select, i;
|
|
709
807
|
var init_dist4 = __esm({
|
|
710
|
-
"node_modules/.bun/@clack+prompts@1.
|
|
808
|
+
"node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
|
|
711
809
|
init_utils2();
|
|
712
810
|
init_dist3();
|
|
713
811
|
init_dist3();
|
|
714
812
|
init_main();
|
|
715
813
|
init_dist2();
|
|
716
814
|
import_sisteransi2 = __toESM(require_src(), 1);
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
switch (
|
|
815
|
+
unicode = isUnicodeSupported();
|
|
816
|
+
unicodeOr = (o, e) => unicode ? o : e;
|
|
817
|
+
S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
|
|
818
|
+
S_STEP_CANCEL = unicodeOr("\u25A0", "x");
|
|
819
|
+
S_STEP_ERROR = unicodeOr("\u25B2", "x");
|
|
820
|
+
S_STEP_SUBMIT = unicodeOr("\u25C7", "o");
|
|
821
|
+
S_BAR_START = unicodeOr("\u250C", "T");
|
|
822
|
+
S_BAR = unicodeOr("\u2502", "|");
|
|
823
|
+
S_BAR_END = unicodeOr("\u2514", "\u2014");
|
|
824
|
+
S_BAR_START_RIGHT = unicodeOr("\u2510", "T");
|
|
825
|
+
S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014");
|
|
826
|
+
S_RADIO_ACTIVE = unicodeOr("\u25CF", ">");
|
|
827
|
+
S_RADIO_INACTIVE = unicodeOr("\u25CB", " ");
|
|
828
|
+
S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]");
|
|
829
|
+
S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]");
|
|
830
|
+
S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]");
|
|
831
|
+
S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022");
|
|
832
|
+
S_BAR_H = unicodeOr("\u2500", "-");
|
|
833
|
+
S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+");
|
|
834
|
+
S_CONNECT_LEFT = unicodeOr("\u251C", "+");
|
|
835
|
+
S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+");
|
|
836
|
+
S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+");
|
|
837
|
+
S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+");
|
|
838
|
+
S_INFO = unicodeOr("\u25CF", "\u2022");
|
|
839
|
+
S_SUCCESS = unicodeOr("\u25C6", "*");
|
|
840
|
+
S_WARN = unicodeOr("\u25B2", "!");
|
|
841
|
+
S_ERROR = unicodeOr("\u25A0", "x");
|
|
842
|
+
symbol = (o) => {
|
|
843
|
+
switch (o) {
|
|
746
844
|
case "initial":
|
|
747
845
|
case "active":
|
|
748
|
-
return
|
|
846
|
+
return styleText2("cyan", S_STEP_ACTIVE);
|
|
749
847
|
case "cancel":
|
|
750
|
-
return
|
|
848
|
+
return styleText2("red", S_STEP_CANCEL);
|
|
751
849
|
case "error":
|
|
752
|
-
return
|
|
850
|
+
return styleText2("yellow", S_STEP_ERROR);
|
|
753
851
|
case "submit":
|
|
754
|
-
return
|
|
852
|
+
return styleText2("green", S_STEP_SUBMIT);
|
|
853
|
+
case "validating":
|
|
854
|
+
return styleText2("dim", S_STEP_ACTIVE);
|
|
755
855
|
}
|
|
756
856
|
};
|
|
757
|
-
|
|
758
|
-
switch (
|
|
857
|
+
symbolBar = (o) => {
|
|
858
|
+
switch (o) {
|
|
759
859
|
case "initial":
|
|
760
860
|
case "active":
|
|
761
|
-
return
|
|
861
|
+
return styleText2("cyan", S_BAR);
|
|
762
862
|
case "cancel":
|
|
763
|
-
return
|
|
863
|
+
return styleText2("red", S_BAR);
|
|
764
864
|
case "error":
|
|
765
|
-
return
|
|
865
|
+
return styleText2("yellow", S_BAR);
|
|
766
866
|
case "submit":
|
|
767
|
-
return
|
|
768
|
-
}
|
|
769
|
-
};
|
|
770
|
-
|
|
771
|
-
let
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
867
|
+
return styleText2("green", S_BAR);
|
|
868
|
+
}
|
|
869
|
+
};
|
|
870
|
+
I = (l, e, w, p, b, C2 = false) => {
|
|
871
|
+
let r2 = e, O = 0;
|
|
872
|
+
if (C2)
|
|
873
|
+
for (let i2 = p - 1; i2 >= w; i2--) {
|
|
874
|
+
const m = l[i2];
|
|
875
|
+
if (m && (r2 -= m.length), O++, r2 <= b) break;
|
|
876
|
+
}
|
|
877
|
+
else
|
|
878
|
+
for (let i2 = w; i2 < p; i2++) {
|
|
879
|
+
const m = l[i2];
|
|
880
|
+
if (m && (r2 -= m.length), O++, r2 <= b) break;
|
|
881
|
+
}
|
|
882
|
+
return { lineCount: r2, removals: O };
|
|
883
|
+
};
|
|
884
|
+
limitOptions = ({
|
|
885
|
+
cursor: l,
|
|
886
|
+
options: e,
|
|
887
|
+
style: w,
|
|
888
|
+
output: p = process.stdout,
|
|
889
|
+
maxItems: b = Number.POSITIVE_INFINITY,
|
|
890
|
+
columnPadding: C2 = 0,
|
|
891
|
+
rowPadding: r2 = 4
|
|
892
|
+
}) => {
|
|
893
|
+
const i2 = getColumns(p) - C2, m = getRows(p), M = styleText2("dim", "..."), v = Math.max(m - r2, 0), a2 = Math.max(Math.min(b, v), 5);
|
|
784
894
|
let f = 0;
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
895
|
+
l >= a2 - 3 && (f = Math.max(
|
|
896
|
+
Math.min(l - a2 + 3, e.length - a2),
|
|
897
|
+
0
|
|
898
|
+
));
|
|
899
|
+
let d = a2 < e.length && f > 0, c2 = a2 < e.length && f + a2 < e.length;
|
|
900
|
+
const W = Math.min(
|
|
901
|
+
f + a2,
|
|
902
|
+
e.length
|
|
903
|
+
), s = [];
|
|
904
|
+
let g = 0;
|
|
905
|
+
d && g++, c2 && g++;
|
|
906
|
+
const T = f + (d ? 1 : 0), y2 = W - (c2 ? 1 : 0);
|
|
907
|
+
for (let t2 = T; t2 < y2; t2++) {
|
|
908
|
+
const n3 = e[t2], o = n3 ? w(n3, t2 === l) : "", h2 = wrapAnsi(o, i2, {
|
|
909
|
+
hard: true,
|
|
910
|
+
trim: false
|
|
911
|
+
}).split(`
|
|
789
912
|
`);
|
|
790
|
-
|
|
791
|
-
}
|
|
792
|
-
if (
|
|
793
|
-
let
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
913
|
+
s.push(h2), g += h2.length;
|
|
914
|
+
}
|
|
915
|
+
if (g > v) {
|
|
916
|
+
let t2 = 0, n3 = 0, o = g;
|
|
917
|
+
const h2 = l - T;
|
|
918
|
+
let u3 = v;
|
|
919
|
+
const L = () => I(s, o, 0, h2, u3), E = () => I(
|
|
920
|
+
s,
|
|
921
|
+
o,
|
|
922
|
+
h2 + 1,
|
|
923
|
+
s.length,
|
|
924
|
+
u3,
|
|
925
|
+
true
|
|
926
|
+
);
|
|
927
|
+
d ? ({ lineCount: o, removals: t2 } = L(), o > u3 && (c2 || (u3 -= 1), { lineCount: o, removals: n3 } = E())) : (c2 || (u3 -= 1), { lineCount: o, removals: n3 } = E(), o > u3 && (u3 -= 1, { lineCount: o, removals: t2 } = L())), t2 > 0 && (d = true, s.splice(0, t2)), n3 > 0 && (c2 = true, s.splice(s.length - n3, n3));
|
|
928
|
+
}
|
|
929
|
+
const x = [];
|
|
930
|
+
d && x.push(M);
|
|
931
|
+
for (const t2 of s)
|
|
932
|
+
for (const n3 of t2)
|
|
933
|
+
x.push(n3);
|
|
934
|
+
return c2 && x.push(M), x;
|
|
935
|
+
};
|
|
936
|
+
MULTISELECT_INSTRUCTIONS = [
|
|
937
|
+
`${styleText2("dim", "\u2191/\u2193")} to navigate`,
|
|
938
|
+
`${styleText2("dim", "Space:")} select`,
|
|
939
|
+
`${styleText2("dim", "Enter:")} confirm`
|
|
940
|
+
];
|
|
941
|
+
log = {
|
|
942
|
+
message: (s = [], {
|
|
943
|
+
symbol: e = styleText2("gray", S_BAR),
|
|
944
|
+
secondarySymbol: r2 = styleText2("gray", S_BAR),
|
|
945
|
+
output: m = process.stdout,
|
|
946
|
+
spacing: l = 1,
|
|
947
|
+
withGuide: c2
|
|
948
|
+
} = {}) => {
|
|
949
|
+
const t2 = [], o = c2 ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
|
|
950
|
+
for (let i2 = 0; i2 < l; i2++)
|
|
951
|
+
t2.push(f);
|
|
952
|
+
const g = Array.isArray(s) ? s : s.split(`
|
|
806
953
|
`);
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
954
|
+
if (g.length > 0) {
|
|
955
|
+
const [i2, ...y2] = g;
|
|
956
|
+
i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
|
|
957
|
+
for (const p of y2)
|
|
958
|
+
p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
|
|
959
|
+
}
|
|
960
|
+
m.write(`${t2.join(`
|
|
813
961
|
`)}
|
|
814
962
|
`);
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
963
|
+
},
|
|
964
|
+
info: (s, e) => {
|
|
965
|
+
log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
|
|
966
|
+
},
|
|
967
|
+
success: (s, e) => {
|
|
968
|
+
log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
|
|
969
|
+
},
|
|
970
|
+
step: (s, e) => {
|
|
971
|
+
log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
|
|
972
|
+
},
|
|
973
|
+
warn: (s, e) => {
|
|
974
|
+
log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
|
|
975
|
+
},
|
|
976
|
+
/** alias for `log.warn()`. */
|
|
977
|
+
warning: (s, e) => {
|
|
978
|
+
log.warn(s, e);
|
|
979
|
+
},
|
|
980
|
+
error: (s, e) => {
|
|
981
|
+
log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
|
|
982
|
+
}
|
|
983
|
+
};
|
|
984
|
+
cancel = (o = "", t2) => {
|
|
985
|
+
const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_END)} ` : "";
|
|
986
|
+
i2.write(`${e}${styleText2("red", o)}
|
|
831
987
|
|
|
832
988
|
`);
|
|
833
989
|
};
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
const
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
990
|
+
W$1 = (o) => o;
|
|
991
|
+
C = (o, e, s) => {
|
|
992
|
+
const a2 = {
|
|
993
|
+
hard: true,
|
|
994
|
+
trim: false
|
|
995
|
+
}, i2 = wrapAnsi(o, e, a2).split(`
|
|
996
|
+
`), c2 = i2.reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), u3 = i2.map(s).reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), g = e - (u3 - c2);
|
|
997
|
+
return wrapAnsi(o, g, a2);
|
|
998
|
+
};
|
|
999
|
+
note = (o = "", e = "", s) => {
|
|
1000
|
+
const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c2 = s?.format ?? W$1, g = ["", ...C(o, getColumns(a2) - 6, c2).split(`
|
|
1001
|
+
`).map(c2), ""], n3 = dist_default2(e), t2 = Math.max(
|
|
1002
|
+
g.reduce((m, F) => {
|
|
1003
|
+
const O = dist_default2(F);
|
|
1004
|
+
return O > m ? O : m;
|
|
1005
|
+
}, 0),
|
|
1006
|
+
n3
|
|
1007
|
+
) + 2, h2 = g.map(
|
|
1008
|
+
(m) => `${styleText2("gray", S_BAR)} ${m}${" ".repeat(t2 - dist_default2(m))}${styleText2("gray", S_BAR)}`
|
|
1009
|
+
).join(`
|
|
1010
|
+
`), T = i2 ? `${styleText2("gray", S_BAR)}
|
|
1011
|
+
` : "", l$1 = i2 ? S_CONNECT_LEFT : S_CORNER_BOTTOM_LEFT;
|
|
1012
|
+
a2.write(
|
|
1013
|
+
`${T}${styleText2("green", S_STEP_SUBMIT)} ${styleText2("reset", e)} ${styleText2(
|
|
1014
|
+
"gray",
|
|
1015
|
+
S_BAR_H.repeat(Math.max(t2 - n3 - 1, 1)) + S_CORNER_TOP_RIGHT
|
|
1016
|
+
)}
|
|
1017
|
+
${h2}
|
|
1018
|
+
${styleText2("gray", l$1 + S_BAR_H.repeat(t2 + 2) + S_CORNER_BOTTOM_RIGHT)}
|
|
1019
|
+
`
|
|
1020
|
+
);
|
|
852
1021
|
};
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
1022
|
+
u2 = {
|
|
1023
|
+
light: unicodeOr("\u2500", "-"),
|
|
1024
|
+
heavy: unicodeOr("\u2501", "="),
|
|
1025
|
+
block: unicodeOr("\u2588", "#")
|
|
1026
|
+
};
|
|
1027
|
+
SELECT_INSTRUCTIONS = [
|
|
1028
|
+
`${styleText2("dim", "\u2191/\u2193")} to navigate`,
|
|
1029
|
+
`${styleText2("dim", "Enter:")} confirm`
|
|
1030
|
+
];
|
|
1031
|
+
c = (t2, o) => t2.includes(`
|
|
1032
|
+
`) ? t2.split(`
|
|
1033
|
+
`).map((d) => o(d)).join(`
|
|
1034
|
+
`) : o(t2);
|
|
1035
|
+
select = (t2) => {
|
|
1036
|
+
const o = (n3, m) => {
|
|
1037
|
+
if (n3 === void 0)
|
|
1038
|
+
return "";
|
|
1039
|
+
const s = n3.label ?? String(n3.value);
|
|
1040
|
+
switch (m) {
|
|
862
1041
|
case "disabled":
|
|
863
|
-
return `${
|
|
1042
|
+
return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("gray", i2))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
|
|
864
1043
|
case "selected":
|
|
865
|
-
return `${
|
|
1044
|
+
return `${c(s, (i2) => styleText2("dim", i2))}`;
|
|
866
1045
|
case "active":
|
|
867
|
-
return `${
|
|
1046
|
+
return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${n3.hint ? ` ${styleText2("dim", `(${n3.hint})`)}` : ""}`;
|
|
868
1047
|
case "cancelled":
|
|
869
|
-
return `${
|
|
1048
|
+
return `${c(s, (i2) => styleText2(["strikethrough", "dim"], i2))}`;
|
|
870
1049
|
default:
|
|
871
|
-
return `${
|
|
872
|
-
}
|
|
873
|
-
};
|
|
874
|
-
return new
|
|
875
|
-
|
|
876
|
-
|
|
1050
|
+
return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("dim", i2))}`;
|
|
1051
|
+
}
|
|
1052
|
+
}, d = t2.showInstructions ?? true;
|
|
1053
|
+
return new n$1({
|
|
1054
|
+
options: t2.options,
|
|
1055
|
+
signal: t2.signal,
|
|
1056
|
+
input: t2.input,
|
|
1057
|
+
output: t2.output,
|
|
1058
|
+
initialValue: t2.initialValue,
|
|
1059
|
+
render() {
|
|
1060
|
+
const n3 = t2.withGuide ?? settings.withGuide, m = `${symbol(this.state)} `, s = `${symbolBar(this.state)} `, i2 = wrapTextWithPrefix(
|
|
1061
|
+
t2.output,
|
|
1062
|
+
t2.message,
|
|
1063
|
+
s,
|
|
1064
|
+
m
|
|
1065
|
+
), u3 = `${n3 ? `${styleText2("gray", S_BAR)}
|
|
1066
|
+
` : ""}${i2}
|
|
877
1067
|
`;
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
${
|
|
1068
|
+
switch (this.state) {
|
|
1069
|
+
case "submit": {
|
|
1070
|
+
const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
|
|
1071
|
+
t2.output,
|
|
1072
|
+
o(this.options[this.cursor], "selected"),
|
|
1073
|
+
r2
|
|
1074
|
+
);
|
|
1075
|
+
return `${u3}${a2}`;
|
|
1076
|
+
}
|
|
1077
|
+
case "cancel": {
|
|
1078
|
+
const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
|
|
1079
|
+
t2.output,
|
|
1080
|
+
o(this.options[this.cursor], "cancelled"),
|
|
1081
|
+
r2
|
|
1082
|
+
);
|
|
1083
|
+
return `${u3}${a2}${n3 ? `
|
|
1084
|
+
${styleText2("gray", S_BAR)}` : ""}`;
|
|
1085
|
+
}
|
|
1086
|
+
default: {
|
|
1087
|
+
const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u3.split(`
|
|
1088
|
+
`).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], f = p.join(`
|
|
1089
|
+
`), b = p.length + 1;
|
|
1090
|
+
return `${u3}${r2}${limitOptions({
|
|
1091
|
+
output: t2.output,
|
|
1092
|
+
cursor: this.cursor,
|
|
1093
|
+
options: this.options,
|
|
1094
|
+
maxItems: t2.maxItems,
|
|
1095
|
+
columnPadding: r2.length,
|
|
1096
|
+
rowPadding: a2 + b,
|
|
1097
|
+
style: (g, x) => o(g, g.disabled ? "disabled" : x ? "active" : "inactive")
|
|
1098
|
+
}).join(`
|
|
1099
|
+
${r2}`)}
|
|
1100
|
+
${f}
|
|
894
1101
|
`;
|
|
1102
|
+
}
|
|
895
1103
|
}
|
|
896
1104
|
}
|
|
897
|
-
}
|
|
1105
|
+
}).prompt();
|
|
898
1106
|
};
|
|
899
|
-
|
|
1107
|
+
i = `${styleText2("gray", S_BAR)} `;
|
|
900
1108
|
}
|
|
901
1109
|
});
|
|
902
1110
|
|
|
@@ -909,9 +1117,9 @@ function supportsColor() {
|
|
|
909
1117
|
}
|
|
910
1118
|
return process.stdout.isTTY === true;
|
|
911
1119
|
}
|
|
912
|
-
function colorize(
|
|
913
|
-
if (!supportsColor()) return
|
|
914
|
-
return `${color}${
|
|
1120
|
+
function colorize(text2, color) {
|
|
1121
|
+
if (!supportsColor()) return text2;
|
|
1122
|
+
return `${color}${text2}${colors.reset}`;
|
|
915
1123
|
}
|
|
916
1124
|
function stringify(value) {
|
|
917
1125
|
if (typeof value === "string") return value;
|
|
@@ -941,7 +1149,7 @@ function stringify(value) {
|
|
|
941
1149
|
function formatMessage(...args) {
|
|
942
1150
|
return args.map(stringify).join(" ");
|
|
943
1151
|
}
|
|
944
|
-
var colors, currentLogLevel,
|
|
1152
|
+
var colors, currentLogLevel, log2, error, warn, info, success;
|
|
945
1153
|
var init_cli_output = __esm({
|
|
946
1154
|
"packages/tooling/src/utils/cli-output.ts"() {
|
|
947
1155
|
"use strict";
|
|
@@ -974,7 +1182,7 @@ var init_cli_output = __esm({
|
|
|
974
1182
|
currentLogLevel = envLevel;
|
|
975
1183
|
}
|
|
976
1184
|
}
|
|
977
|
-
|
|
1185
|
+
log2 = {
|
|
978
1186
|
/**
|
|
979
1187
|
* Logs an error message (always shows unless Quiet level)
|
|
980
1188
|
* Uses clack's log.error + explicit red color
|
|
@@ -982,7 +1190,7 @@ var init_cli_output = __esm({
|
|
|
982
1190
|
error(...args) {
|
|
983
1191
|
if (currentLogLevel < 0 /* Quiet */) return;
|
|
984
1192
|
const message = formatMessage(...args);
|
|
985
|
-
|
|
1193
|
+
log.error(colorize(message, colors.brightRed));
|
|
986
1194
|
},
|
|
987
1195
|
/**
|
|
988
1196
|
* Logs a warning message (shows at Normal level and above)
|
|
@@ -991,7 +1199,7 @@ var init_cli_output = __esm({
|
|
|
991
1199
|
warn(...args) {
|
|
992
1200
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
993
1201
|
const message = formatMessage(...args);
|
|
994
|
-
|
|
1202
|
+
log.warn(colorize(message, colors.brightYellow));
|
|
995
1203
|
},
|
|
996
1204
|
/**
|
|
997
1205
|
* Logs an info message (shows at Normal level and above)
|
|
@@ -1000,7 +1208,7 @@ var init_cli_output = __esm({
|
|
|
1000
1208
|
info(...args) {
|
|
1001
1209
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
1002
1210
|
const message = formatMessage(...args);
|
|
1003
|
-
|
|
1211
|
+
log.info(colorize(message, colors.brightCyan));
|
|
1004
1212
|
},
|
|
1005
1213
|
/**
|
|
1006
1214
|
* Logs a success message (shows at Normal level and above)
|
|
@@ -1009,7 +1217,7 @@ var init_cli_output = __esm({
|
|
|
1009
1217
|
success(...args) {
|
|
1010
1218
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
1011
1219
|
const message = formatMessage(...args);
|
|
1012
|
-
|
|
1220
|
+
log.success(colorize(message, colors.brightGreen));
|
|
1013
1221
|
},
|
|
1014
1222
|
/**
|
|
1015
1223
|
* Logs a debug message (only shows at Verbose level and above)
|
|
@@ -1018,7 +1226,7 @@ var init_cli_output = __esm({
|
|
|
1018
1226
|
debug(...args) {
|
|
1019
1227
|
if (currentLogLevel < 2 /* Verbose */) return;
|
|
1020
1228
|
const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
|
|
1021
|
-
|
|
1229
|
+
log.message(
|
|
1022
1230
|
colorize(
|
|
1023
1231
|
`[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
|
|
1024
1232
|
colors.gray
|
|
@@ -1032,7 +1240,7 @@ var init_cli_output = __esm({
|
|
|
1032
1240
|
trace(...args) {
|
|
1033
1241
|
if (currentLogLevel < 3 /* Debug */) return;
|
|
1034
1242
|
const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
|
|
1035
|
-
|
|
1243
|
+
log.message(
|
|
1036
1244
|
colorize(
|
|
1037
1245
|
`[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
|
|
1038
1246
|
colors.gray
|
|
@@ -1040,10 +1248,10 @@ var init_cli_output = __esm({
|
|
|
1040
1248
|
);
|
|
1041
1249
|
}
|
|
1042
1250
|
};
|
|
1043
|
-
error =
|
|
1044
|
-
warn =
|
|
1045
|
-
info =
|
|
1046
|
-
success =
|
|
1251
|
+
error = log2.error.bind(log2);
|
|
1252
|
+
warn = log2.warn.bind(log2);
|
|
1253
|
+
info = log2.info.bind(log2);
|
|
1254
|
+
success = log2.success.bind(log2);
|
|
1047
1255
|
}
|
|
1048
1256
|
});
|
|
1049
1257
|
|
|
@@ -1403,9 +1611,9 @@ var require_is_glob = __commonJS({
|
|
|
1403
1611
|
index += 2;
|
|
1404
1612
|
var close = chars[open];
|
|
1405
1613
|
if (close) {
|
|
1406
|
-
var
|
|
1407
|
-
if (
|
|
1408
|
-
index =
|
|
1614
|
+
var n3 = str.indexOf(close, index);
|
|
1615
|
+
if (n3 !== -1) {
|
|
1616
|
+
index = n3 + 1;
|
|
1409
1617
|
}
|
|
1410
1618
|
}
|
|
1411
1619
|
if (str[index] === "!") {
|
|
@@ -1431,9 +1639,9 @@ var require_is_glob = __commonJS({
|
|
|
1431
1639
|
index += 2;
|
|
1432
1640
|
var close = chars[open];
|
|
1433
1641
|
if (close) {
|
|
1434
|
-
var
|
|
1435
|
-
if (
|
|
1436
|
-
index =
|
|
1642
|
+
var n3 = str.indexOf(close, index);
|
|
1643
|
+
if (n3 !== -1) {
|
|
1644
|
+
index = n3 + 1;
|
|
1437
1645
|
}
|
|
1438
1646
|
}
|
|
1439
1647
|
if (str[index] === "!") {
|
|
@@ -1511,8 +1719,8 @@ var require_utils = __commonJS({
|
|
|
1511
1719
|
if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
|
|
1512
1720
|
return (Number(max) - Number(min)) / Number(step) >= limit;
|
|
1513
1721
|
};
|
|
1514
|
-
exports.escapeNode = (
|
|
1515
|
-
const node =
|
|
1722
|
+
exports.escapeNode = (block2, n3 = 0, type) => {
|
|
1723
|
+
const node = block2.nodes[n3];
|
|
1516
1724
|
if (!node) return;
|
|
1517
1725
|
if (type && node.type === type || node.type === "open" || node.type === "close") {
|
|
1518
1726
|
if (node.escaped !== true) {
|
|
@@ -1529,15 +1737,15 @@ var require_utils = __commonJS({
|
|
|
1529
1737
|
}
|
|
1530
1738
|
return false;
|
|
1531
1739
|
};
|
|
1532
|
-
exports.isInvalidBrace = (
|
|
1533
|
-
if (
|
|
1534
|
-
if (
|
|
1535
|
-
if (
|
|
1536
|
-
|
|
1740
|
+
exports.isInvalidBrace = (block2) => {
|
|
1741
|
+
if (block2.type !== "brace") return false;
|
|
1742
|
+
if (block2.invalid === true || block2.dollar) return true;
|
|
1743
|
+
if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
|
|
1744
|
+
block2.invalid = true;
|
|
1537
1745
|
return true;
|
|
1538
1746
|
}
|
|
1539
|
-
if (
|
|
1540
|
-
|
|
1747
|
+
if (block2.open !== true || block2.close !== true) {
|
|
1748
|
+
block2.invalid = true;
|
|
1541
1749
|
return true;
|
|
1542
1750
|
}
|
|
1543
1751
|
return false;
|
|
@@ -1556,8 +1764,8 @@ var require_utils = __commonJS({
|
|
|
1556
1764
|
exports.flatten = (...args) => {
|
|
1557
1765
|
const result = [];
|
|
1558
1766
|
const flat = (arr) => {
|
|
1559
|
-
for (let
|
|
1560
|
-
const ele = arr[
|
|
1767
|
+
for (let i2 = 0; i2 < arr.length; i2++) {
|
|
1768
|
+
const ele = arr[i2];
|
|
1561
1769
|
if (Array.isArray(ele)) {
|
|
1562
1770
|
flat(ele);
|
|
1563
1771
|
continue;
|
|
@@ -1651,9 +1859,9 @@ var require_to_regex_range = __commonJS({
|
|
|
1651
1859
|
if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
|
|
1652
1860
|
return toRegexRange.cache[cacheKey].result;
|
|
1653
1861
|
}
|
|
1654
|
-
let
|
|
1862
|
+
let a2 = Math.min(min, max);
|
|
1655
1863
|
let b = Math.max(min, max);
|
|
1656
|
-
if (Math.abs(
|
|
1864
|
+
if (Math.abs(a2 - b) === 1) {
|
|
1657
1865
|
let result = min + "|" + max;
|
|
1658
1866
|
if (opts.capture) {
|
|
1659
1867
|
return `(${result})`;
|
|
@@ -1664,20 +1872,20 @@ var require_to_regex_range = __commonJS({
|
|
|
1664
1872
|
return `(?:${result})`;
|
|
1665
1873
|
}
|
|
1666
1874
|
let isPadded = hasPadding(min) || hasPadding(max);
|
|
1667
|
-
let state = { min, max, a, b };
|
|
1875
|
+
let state = { min, max, a: a2, b };
|
|
1668
1876
|
let positives = [];
|
|
1669
1877
|
let negatives = [];
|
|
1670
1878
|
if (isPadded) {
|
|
1671
1879
|
state.isPadded = isPadded;
|
|
1672
1880
|
state.maxLen = String(state.max).length;
|
|
1673
1881
|
}
|
|
1674
|
-
if (
|
|
1882
|
+
if (a2 < 0) {
|
|
1675
1883
|
let newMin = b < 0 ? Math.abs(b) : 1;
|
|
1676
|
-
negatives = splitToPatterns(newMin, Math.abs(
|
|
1677
|
-
|
|
1884
|
+
negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
|
|
1885
|
+
a2 = state.a = 0;
|
|
1678
1886
|
}
|
|
1679
1887
|
if (b >= 0) {
|
|
1680
|
-
positives = splitToPatterns(
|
|
1888
|
+
positives = splitToPatterns(a2, b, state, opts);
|
|
1681
1889
|
}
|
|
1682
1890
|
state.negatives = negatives;
|
|
1683
1891
|
state.positives = positives;
|
|
@@ -1725,8 +1933,8 @@ var require_to_regex_range = __commonJS({
|
|
|
1725
1933
|
let digits = zipped.length;
|
|
1726
1934
|
let pattern = "";
|
|
1727
1935
|
let count = 0;
|
|
1728
|
-
for (let
|
|
1729
|
-
let [startDigit, stopDigit] = zipped[
|
|
1936
|
+
for (let i2 = 0; i2 < digits; i2++) {
|
|
1937
|
+
let [startDigit, stopDigit] = zipped[i2];
|
|
1730
1938
|
if (startDigit === stopDigit) {
|
|
1731
1939
|
pattern += startDigit;
|
|
1732
1940
|
} else if (startDigit !== "0" || stopDigit !== "9") {
|
|
@@ -1745,8 +1953,8 @@ var require_to_regex_range = __commonJS({
|
|
|
1745
1953
|
let tokens = [];
|
|
1746
1954
|
let start = min;
|
|
1747
1955
|
let prev;
|
|
1748
|
-
for (let
|
|
1749
|
-
let max2 = ranges[
|
|
1956
|
+
for (let i2 = 0; i2 < ranges.length; i2++) {
|
|
1957
|
+
let max2 = ranges[i2];
|
|
1750
1958
|
let obj = rangeToPattern(String(start), String(max2), options);
|
|
1751
1959
|
let zeros = "";
|
|
1752
1960
|
if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
|
|
@@ -1781,13 +1989,13 @@ var require_to_regex_range = __commonJS({
|
|
|
1781
1989
|
}
|
|
1782
1990
|
return result;
|
|
1783
1991
|
}
|
|
1784
|
-
function zip(
|
|
1992
|
+
function zip(a2, b) {
|
|
1785
1993
|
let arr = [];
|
|
1786
|
-
for (let
|
|
1994
|
+
for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
|
|
1787
1995
|
return arr;
|
|
1788
1996
|
}
|
|
1789
|
-
function compare(
|
|
1790
|
-
return
|
|
1997
|
+
function compare(a2, b) {
|
|
1998
|
+
return a2 > b ? 1 : b > a2 ? -1 : 0;
|
|
1791
1999
|
}
|
|
1792
2000
|
function contains(arr, key, val) {
|
|
1793
2001
|
return arr.some((ele) => ele[key] === val);
|
|
@@ -1805,8 +2013,8 @@ var require_to_regex_range = __commonJS({
|
|
|
1805
2013
|
}
|
|
1806
2014
|
return "";
|
|
1807
2015
|
}
|
|
1808
|
-
function toCharacterClass(
|
|
1809
|
-
return `[${
|
|
2016
|
+
function toCharacterClass(a2, b, options) {
|
|
2017
|
+
return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
|
|
1810
2018
|
}
|
|
1811
2019
|
function hasPadding(str) {
|
|
1812
2020
|
return /^-?(0+)\d/.test(str);
|
|
@@ -1885,8 +2093,8 @@ var require_fill_range = __commonJS({
|
|
|
1885
2093
|
return negative ? "-" + input : input;
|
|
1886
2094
|
};
|
|
1887
2095
|
var toSequence = (parts, options, maxLen) => {
|
|
1888
|
-
parts.negatives.sort((
|
|
1889
|
-
parts.positives.sort((
|
|
2096
|
+
parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
|
|
2097
|
+
parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
|
|
1890
2098
|
let prefix = options.capture ? "" : "?:";
|
|
1891
2099
|
let positives = "";
|
|
1892
2100
|
let negatives = "";
|
|
@@ -1907,12 +2115,12 @@ var require_fill_range = __commonJS({
|
|
|
1907
2115
|
}
|
|
1908
2116
|
return result;
|
|
1909
2117
|
};
|
|
1910
|
-
var toRange = (
|
|
2118
|
+
var toRange = (a2, b, isNumbers, options) => {
|
|
1911
2119
|
if (isNumbers) {
|
|
1912
|
-
return toRegexRange(
|
|
2120
|
+
return toRegexRange(a2, b, { wrap: false, ...options });
|
|
1913
2121
|
}
|
|
1914
|
-
let start = String.fromCharCode(
|
|
1915
|
-
if (
|
|
2122
|
+
let start = String.fromCharCode(a2);
|
|
2123
|
+
if (a2 === b) return start;
|
|
1916
2124
|
let stop = String.fromCharCode(b);
|
|
1917
2125
|
return `[${start}-${stop}]`;
|
|
1918
2126
|
};
|
|
@@ -1938,15 +2146,15 @@ var require_fill_range = __commonJS({
|
|
|
1938
2146
|
return [];
|
|
1939
2147
|
};
|
|
1940
2148
|
var fillNumbers = (start, end, step = 1, options = {}) => {
|
|
1941
|
-
let
|
|
2149
|
+
let a2 = Number(start);
|
|
1942
2150
|
let b = Number(end);
|
|
1943
|
-
if (!Number.isInteger(
|
|
2151
|
+
if (!Number.isInteger(a2) || !Number.isInteger(b)) {
|
|
1944
2152
|
if (options.strictRanges === true) throw rangeError([start, end]);
|
|
1945
2153
|
return [];
|
|
1946
2154
|
}
|
|
1947
|
-
if (
|
|
2155
|
+
if (a2 === 0) a2 = 0;
|
|
1948
2156
|
if (b === 0) b = 0;
|
|
1949
|
-
let descending =
|
|
2157
|
+
let descending = a2 > b;
|
|
1950
2158
|
let startString = String(start);
|
|
1951
2159
|
let endString = String(end);
|
|
1952
2160
|
let stepString = String(step);
|
|
@@ -1962,13 +2170,13 @@ var require_fill_range = __commonJS({
|
|
|
1962
2170
|
let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
|
|
1963
2171
|
let range = [];
|
|
1964
2172
|
let index = 0;
|
|
1965
|
-
while (descending ?
|
|
2173
|
+
while (descending ? a2 >= b : a2 <= b) {
|
|
1966
2174
|
if (options.toRegex === true && step > 1) {
|
|
1967
|
-
push(
|
|
2175
|
+
push(a2);
|
|
1968
2176
|
} else {
|
|
1969
|
-
range.push(pad(format(
|
|
2177
|
+
range.push(pad(format(a2, index), maxLen, toNumber));
|
|
1970
2178
|
}
|
|
1971
|
-
|
|
2179
|
+
a2 = descending ? a2 - step : a2 + step;
|
|
1972
2180
|
index++;
|
|
1973
2181
|
}
|
|
1974
2182
|
if (options.toRegex === true) {
|
|
@@ -1981,19 +2189,19 @@ var require_fill_range = __commonJS({
|
|
|
1981
2189
|
return invalidRange(start, end, options);
|
|
1982
2190
|
}
|
|
1983
2191
|
let format = options.transform || ((val) => String.fromCharCode(val));
|
|
1984
|
-
let
|
|
2192
|
+
let a2 = `${start}`.charCodeAt(0);
|
|
1985
2193
|
let b = `${end}`.charCodeAt(0);
|
|
1986
|
-
let descending =
|
|
1987
|
-
let min = Math.min(
|
|
1988
|
-
let max = Math.max(
|
|
2194
|
+
let descending = a2 > b;
|
|
2195
|
+
let min = Math.min(a2, b);
|
|
2196
|
+
let max = Math.max(a2, b);
|
|
1989
2197
|
if (options.toRegex && step === 1) {
|
|
1990
2198
|
return toRange(min, max, false, options);
|
|
1991
2199
|
}
|
|
1992
2200
|
let range = [];
|
|
1993
2201
|
let index = 0;
|
|
1994
|
-
while (descending ?
|
|
1995
|
-
range.push(format(
|
|
1996
|
-
|
|
2202
|
+
while (descending ? a2 >= b : a2 <= b) {
|
|
2203
|
+
range.push(format(a2, index));
|
|
2204
|
+
a2 = descending ? a2 - step : a2 + step;
|
|
1997
2205
|
index++;
|
|
1998
2206
|
}
|
|
1999
2207
|
if (options.toRegex === true) {
|
|
@@ -2116,18 +2324,18 @@ var require_expand = __commonJS({
|
|
|
2116
2324
|
const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
|
|
2117
2325
|
const walk = (node, parent = {}) => {
|
|
2118
2326
|
node.queue = [];
|
|
2119
|
-
let
|
|
2120
|
-
let
|
|
2121
|
-
while (
|
|
2122
|
-
|
|
2123
|
-
|
|
2327
|
+
let p = parent;
|
|
2328
|
+
let q = parent.queue;
|
|
2329
|
+
while (p.type !== "brace" && p.type !== "root" && p.parent) {
|
|
2330
|
+
p = p.parent;
|
|
2331
|
+
q = p.queue;
|
|
2124
2332
|
}
|
|
2125
2333
|
if (node.invalid || node.dollar) {
|
|
2126
|
-
|
|
2334
|
+
q.push(append(q.pop(), stringify2(node, options)));
|
|
2127
2335
|
return;
|
|
2128
2336
|
}
|
|
2129
2337
|
if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
|
|
2130
|
-
|
|
2338
|
+
q.push(append(q.pop(), ["{}"]));
|
|
2131
2339
|
return;
|
|
2132
2340
|
}
|
|
2133
2341
|
if (node.nodes && node.ranges > 0) {
|
|
@@ -2139,26 +2347,26 @@ var require_expand = __commonJS({
|
|
|
2139
2347
|
if (range.length === 0) {
|
|
2140
2348
|
range = stringify2(node, options);
|
|
2141
2349
|
}
|
|
2142
|
-
|
|
2350
|
+
q.push(append(q.pop(), range));
|
|
2143
2351
|
node.nodes = [];
|
|
2144
2352
|
return;
|
|
2145
2353
|
}
|
|
2146
2354
|
const enclose = utils.encloseBrace(node);
|
|
2147
2355
|
let queue = node.queue;
|
|
2148
|
-
let
|
|
2149
|
-
while (
|
|
2150
|
-
|
|
2151
|
-
queue =
|
|
2356
|
+
let block2 = node;
|
|
2357
|
+
while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
|
|
2358
|
+
block2 = block2.parent;
|
|
2359
|
+
queue = block2.queue;
|
|
2152
2360
|
}
|
|
2153
|
-
for (let
|
|
2154
|
-
const child = node.nodes[
|
|
2361
|
+
for (let i2 = 0; i2 < node.nodes.length; i2++) {
|
|
2362
|
+
const child = node.nodes[i2];
|
|
2155
2363
|
if (child.type === "comma" && node.type === "brace") {
|
|
2156
|
-
if (
|
|
2364
|
+
if (i2 === 1) queue.push("");
|
|
2157
2365
|
queue.push("");
|
|
2158
2366
|
continue;
|
|
2159
2367
|
}
|
|
2160
2368
|
if (child.type === "close") {
|
|
2161
|
-
|
|
2369
|
+
q.push(append(q.pop(), queue, enclose));
|
|
2162
2370
|
continue;
|
|
2163
2371
|
}
|
|
2164
2372
|
if (child.value && child.type !== "open") {
|
|
@@ -2325,7 +2533,7 @@ var require_parse = __commonJS({
|
|
|
2325
2533
|
}
|
|
2326
2534
|
const ast = { type: "root", input, nodes: [] };
|
|
2327
2535
|
const stack = [ast];
|
|
2328
|
-
let
|
|
2536
|
+
let block2 = ast;
|
|
2329
2537
|
let prev = ast;
|
|
2330
2538
|
let brackets = 0;
|
|
2331
2539
|
const length = input.length;
|
|
@@ -2341,15 +2549,15 @@ var require_parse = __commonJS({
|
|
|
2341
2549
|
prev.value += node.value;
|
|
2342
2550
|
return;
|
|
2343
2551
|
}
|
|
2344
|
-
|
|
2345
|
-
node.parent =
|
|
2552
|
+
block2.nodes.push(node);
|
|
2553
|
+
node.parent = block2;
|
|
2346
2554
|
node.prev = prev;
|
|
2347
2555
|
prev = node;
|
|
2348
2556
|
return node;
|
|
2349
2557
|
};
|
|
2350
2558
|
push({ type: "bos" });
|
|
2351
2559
|
while (index < length) {
|
|
2352
|
-
|
|
2560
|
+
block2 = stack[stack.length - 1];
|
|
2353
2561
|
value = advance();
|
|
2354
2562
|
if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
|
|
2355
2563
|
continue;
|
|
@@ -2386,19 +2594,19 @@ var require_parse = __commonJS({
|
|
|
2386
2594
|
continue;
|
|
2387
2595
|
}
|
|
2388
2596
|
if (value === CHAR_LEFT_PARENTHESES) {
|
|
2389
|
-
|
|
2390
|
-
stack.push(
|
|
2597
|
+
block2 = push({ type: "paren", nodes: [] });
|
|
2598
|
+
stack.push(block2);
|
|
2391
2599
|
push({ type: "text", value });
|
|
2392
2600
|
continue;
|
|
2393
2601
|
}
|
|
2394
2602
|
if (value === CHAR_RIGHT_PARENTHESES) {
|
|
2395
|
-
if (
|
|
2603
|
+
if (block2.type !== "paren") {
|
|
2396
2604
|
push({ type: "text", value });
|
|
2397
2605
|
continue;
|
|
2398
2606
|
}
|
|
2399
|
-
|
|
2607
|
+
block2 = stack.pop();
|
|
2400
2608
|
push({ type: "text", value });
|
|
2401
|
-
|
|
2609
|
+
block2 = stack[stack.length - 1];
|
|
2402
2610
|
continue;
|
|
2403
2611
|
}
|
|
2404
2612
|
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
|
@@ -2423,7 +2631,7 @@ var require_parse = __commonJS({
|
|
|
2423
2631
|
}
|
|
2424
2632
|
if (value === CHAR_LEFT_CURLY_BRACE) {
|
|
2425
2633
|
depth++;
|
|
2426
|
-
const dollar = prev.value && prev.value.slice(-1) === "$" ||
|
|
2634
|
+
const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
|
|
2427
2635
|
const brace = {
|
|
2428
2636
|
type: "brace",
|
|
2429
2637
|
open: true,
|
|
@@ -2434,52 +2642,52 @@ var require_parse = __commonJS({
|
|
|
2434
2642
|
ranges: 0,
|
|
2435
2643
|
nodes: []
|
|
2436
2644
|
};
|
|
2437
|
-
|
|
2438
|
-
stack.push(
|
|
2645
|
+
block2 = push(brace);
|
|
2646
|
+
stack.push(block2);
|
|
2439
2647
|
push({ type: "open", value });
|
|
2440
2648
|
continue;
|
|
2441
2649
|
}
|
|
2442
2650
|
if (value === CHAR_RIGHT_CURLY_BRACE) {
|
|
2443
|
-
if (
|
|
2651
|
+
if (block2.type !== "brace") {
|
|
2444
2652
|
push({ type: "text", value });
|
|
2445
2653
|
continue;
|
|
2446
2654
|
}
|
|
2447
2655
|
const type = "close";
|
|
2448
|
-
|
|
2449
|
-
|
|
2656
|
+
block2 = stack.pop();
|
|
2657
|
+
block2.close = true;
|
|
2450
2658
|
push({ type, value });
|
|
2451
2659
|
depth--;
|
|
2452
|
-
|
|
2660
|
+
block2 = stack[stack.length - 1];
|
|
2453
2661
|
continue;
|
|
2454
2662
|
}
|
|
2455
2663
|
if (value === CHAR_COMMA && depth > 0) {
|
|
2456
|
-
if (
|
|
2457
|
-
|
|
2458
|
-
const open =
|
|
2459
|
-
|
|
2664
|
+
if (block2.ranges > 0) {
|
|
2665
|
+
block2.ranges = 0;
|
|
2666
|
+
const open = block2.nodes.shift();
|
|
2667
|
+
block2.nodes = [open, { type: "text", value: stringify2(block2) }];
|
|
2460
2668
|
}
|
|
2461
2669
|
push({ type: "comma", value });
|
|
2462
|
-
|
|
2670
|
+
block2.commas++;
|
|
2463
2671
|
continue;
|
|
2464
2672
|
}
|
|
2465
|
-
if (value === CHAR_DOT && depth > 0 &&
|
|
2466
|
-
const siblings =
|
|
2673
|
+
if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
|
|
2674
|
+
const siblings = block2.nodes;
|
|
2467
2675
|
if (depth === 0 || siblings.length === 0) {
|
|
2468
2676
|
push({ type: "text", value });
|
|
2469
2677
|
continue;
|
|
2470
2678
|
}
|
|
2471
2679
|
if (prev.type === "dot") {
|
|
2472
|
-
|
|
2680
|
+
block2.range = [];
|
|
2473
2681
|
prev.value += value;
|
|
2474
2682
|
prev.type = "range";
|
|
2475
|
-
if (
|
|
2476
|
-
|
|
2477
|
-
|
|
2683
|
+
if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
|
|
2684
|
+
block2.invalid = true;
|
|
2685
|
+
block2.ranges = 0;
|
|
2478
2686
|
prev.type = "text";
|
|
2479
2687
|
continue;
|
|
2480
2688
|
}
|
|
2481
|
-
|
|
2482
|
-
|
|
2689
|
+
block2.ranges++;
|
|
2690
|
+
block2.args = [];
|
|
2483
2691
|
continue;
|
|
2484
2692
|
}
|
|
2485
2693
|
if (prev.type === "range") {
|
|
@@ -2487,7 +2695,7 @@ var require_parse = __commonJS({
|
|
|
2487
2695
|
const before = siblings[siblings.length - 1];
|
|
2488
2696
|
before.value += prev.value + value;
|
|
2489
2697
|
prev = before;
|
|
2490
|
-
|
|
2698
|
+
block2.ranges--;
|
|
2491
2699
|
continue;
|
|
2492
2700
|
}
|
|
2493
2701
|
push({ type: "dot", value });
|
|
@@ -2496,9 +2704,9 @@ var require_parse = __commonJS({
|
|
|
2496
2704
|
push({ type: "text", value });
|
|
2497
2705
|
}
|
|
2498
2706
|
do {
|
|
2499
|
-
|
|
2500
|
-
if (
|
|
2501
|
-
|
|
2707
|
+
block2 = stack.pop();
|
|
2708
|
+
if (block2.type !== "root") {
|
|
2709
|
+
block2.nodes.forEach((node) => {
|
|
2502
2710
|
if (!node.nodes) {
|
|
2503
2711
|
if (node.type === "open") node.isOpen = true;
|
|
2504
2712
|
if (node.type === "close") node.isClose = true;
|
|
@@ -2507,8 +2715,8 @@ var require_parse = __commonJS({
|
|
|
2507
2715
|
}
|
|
2508
2716
|
});
|
|
2509
2717
|
const parent = stack[stack.length - 1];
|
|
2510
|
-
const index2 = parent.nodes.indexOf(
|
|
2511
|
-
parent.nodes.splice(index2, 1, ...
|
|
2718
|
+
const index2 = parent.nodes.indexOf(block2);
|
|
2719
|
+
parent.nodes.splice(index2, 1, ...block2.nodes);
|
|
2512
2720
|
}
|
|
2513
2721
|
} while (stack.length > 0);
|
|
2514
2722
|
push({ type: "eos" });
|
|
@@ -3141,9 +3349,9 @@ var require_scan = __commonJS({
|
|
|
3141
3349
|
if (opts.parts === true || opts.tokens === true) {
|
|
3142
3350
|
let prevIndex;
|
|
3143
3351
|
for (let idx = 0; idx < slashes.length; idx++) {
|
|
3144
|
-
const
|
|
3145
|
-
const
|
|
3146
|
-
const value = input.slice(
|
|
3352
|
+
const n3 = prevIndex ? prevIndex + 1 : start;
|
|
3353
|
+
const i2 = slashes[idx];
|
|
3354
|
+
const value = input.slice(n3, i2);
|
|
3147
3355
|
if (opts.tokens) {
|
|
3148
3356
|
if (idx === 0 && start !== 0) {
|
|
3149
3357
|
tokens[idx].isPrefix = true;
|
|
@@ -3157,7 +3365,7 @@ var require_scan = __commonJS({
|
|
|
3157
3365
|
if (idx !== 0 || value !== "") {
|
|
3158
3366
|
parts.push(value);
|
|
3159
3367
|
}
|
|
3160
|
-
prevIndex =
|
|
3368
|
+
prevIndex = i2;
|
|
3161
3369
|
}
|
|
3162
3370
|
if (prevIndex && prevIndex + 1 < input.length) {
|
|
3163
3371
|
const value = input.slice(prevIndex + 1);
|
|
@@ -3286,15 +3494,15 @@ var require_parse2 = __commonJS({
|
|
|
3286
3494
|
};
|
|
3287
3495
|
var hasRepeatedCharPrefixOverlap = (branches) => {
|
|
3288
3496
|
const values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
3289
|
-
for (let
|
|
3290
|
-
for (let
|
|
3291
|
-
const
|
|
3292
|
-
const b = values[
|
|
3293
|
-
const char =
|
|
3294
|
-
if (!char ||
|
|
3497
|
+
for (let i2 = 0; i2 < values.length; i2++) {
|
|
3498
|
+
for (let j = i2 + 1; j < values.length; j++) {
|
|
3499
|
+
const a2 = values[i2];
|
|
3500
|
+
const b = values[j];
|
|
3501
|
+
const char = a2[0];
|
|
3502
|
+
if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
|
|
3295
3503
|
continue;
|
|
3296
3504
|
}
|
|
3297
|
-
if (
|
|
3505
|
+
if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
|
|
3298
3506
|
return true;
|
|
3299
3507
|
}
|
|
3300
3508
|
}
|
|
@@ -3309,8 +3517,8 @@ var require_parse2 = __commonJS({
|
|
|
3309
3517
|
let paren = 0;
|
|
3310
3518
|
let quote = 0;
|
|
3311
3519
|
let escaped = false;
|
|
3312
|
-
for (let
|
|
3313
|
-
const ch = pattern[
|
|
3520
|
+
for (let i2 = 1; i2 < pattern.length; i2++) {
|
|
3521
|
+
const ch = pattern[i2];
|
|
3314
3522
|
if (escaped === true) {
|
|
3315
3523
|
escaped = false;
|
|
3316
3524
|
continue;
|
|
@@ -3344,13 +3552,13 @@ var require_parse2 = __commonJS({
|
|
|
3344
3552
|
if (ch === ")") {
|
|
3345
3553
|
paren--;
|
|
3346
3554
|
if (paren === 0) {
|
|
3347
|
-
if (requireEnd === true &&
|
|
3555
|
+
if (requireEnd === true && i2 !== pattern.length - 1) {
|
|
3348
3556
|
return;
|
|
3349
3557
|
}
|
|
3350
3558
|
return {
|
|
3351
3559
|
type: pattern[0],
|
|
3352
|
-
body: pattern.slice(2,
|
|
3353
|
-
end:
|
|
3560
|
+
body: pattern.slice(2, i2),
|
|
3561
|
+
end: i2
|
|
3354
3562
|
};
|
|
3355
3563
|
}
|
|
3356
3564
|
}
|
|
@@ -3482,7 +3690,7 @@ var require_parse2 = __commonJS({
|
|
|
3482
3690
|
let prev = bos;
|
|
3483
3691
|
let value;
|
|
3484
3692
|
const eos = () => state.index === len - 1;
|
|
3485
|
-
const peek = state.peek = (
|
|
3693
|
+
const peek = state.peek = (n3 = 1) => input[state.index + n3];
|
|
3486
3694
|
const advance = state.advance = () => input[++state.index] || "";
|
|
3487
3695
|
const remaining = () => input.slice(state.index + 1);
|
|
3488
3696
|
const consume = (value2 = "", num = 0) => {
|
|
@@ -3563,10 +3771,10 @@ var require_parse2 = __commonJS({
|
|
|
3563
3771
|
open.type = "text";
|
|
3564
3772
|
open.value = literal;
|
|
3565
3773
|
open.output = safeOutput || utils.escapeRegex(literal);
|
|
3566
|
-
for (let
|
|
3567
|
-
tokens[
|
|
3568
|
-
tokens[
|
|
3569
|
-
delete tokens[
|
|
3774
|
+
for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
|
|
3775
|
+
tokens[i2].value = "";
|
|
3776
|
+
tokens[i2].output = "";
|
|
3777
|
+
delete tokens[i2].suffix;
|
|
3570
3778
|
}
|
|
3571
3779
|
state.output = token.output + open.output;
|
|
3572
3780
|
state.backtrack = true;
|
|
@@ -3809,13 +4017,13 @@ var require_parse2 = __commonJS({
|
|
|
3809
4017
|
if (brace.dots === true) {
|
|
3810
4018
|
const arr = tokens.slice();
|
|
3811
4019
|
const range = [];
|
|
3812
|
-
for (let
|
|
4020
|
+
for (let i2 = arr.length - 1; i2 >= 0; i2--) {
|
|
3813
4021
|
tokens.pop();
|
|
3814
|
-
if (arr[
|
|
4022
|
+
if (arr[i2].type === "brace") {
|
|
3815
4023
|
break;
|
|
3816
4024
|
}
|
|
3817
|
-
if (arr[
|
|
3818
|
-
range.unshift(arr[
|
|
4025
|
+
if (arr[i2].type !== "dots") {
|
|
4026
|
+
range.unshift(arr[i2].value);
|
|
3819
4027
|
}
|
|
3820
4028
|
}
|
|
3821
4029
|
output = expandRange(range, opts);
|
|
@@ -4274,7 +4482,7 @@ var require_picomatch = __commonJS({
|
|
|
4274
4482
|
};
|
|
4275
4483
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
4276
4484
|
picomatch.parse = (pattern, options) => {
|
|
4277
|
-
if (Array.isArray(pattern)) return pattern.map((
|
|
4485
|
+
if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
|
|
4278
4486
|
return parse2(pattern, { ...options, fastpaths: false });
|
|
4279
4487
|
};
|
|
4280
4488
|
picomatch.scan = (input, options) => scan(input, options);
|
|
@@ -4358,8 +4566,8 @@ var require_micromatch = __commonJS({
|
|
|
4358
4566
|
options.onResult(state);
|
|
4359
4567
|
}
|
|
4360
4568
|
};
|
|
4361
|
-
for (let
|
|
4362
|
-
let isMatch = picomatch(String(patterns[
|
|
4569
|
+
for (let i2 = 0; i2 < patterns.length; i2++) {
|
|
4570
|
+
let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
|
|
4363
4571
|
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
4364
4572
|
if (negated) negatives++;
|
|
4365
4573
|
for (let item of list) {
|
|
@@ -4381,7 +4589,7 @@ var require_micromatch = __commonJS({
|
|
|
4381
4589
|
throw new Error(`No matches found for "${patterns.join(", ")}"`);
|
|
4382
4590
|
}
|
|
4383
4591
|
if (options.nonull === true || options.nullglob === true) {
|
|
4384
|
-
return options.unescape ? patterns.map((
|
|
4592
|
+
return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
|
|
4385
4593
|
}
|
|
4386
4594
|
}
|
|
4387
4595
|
return matches;
|
|
@@ -4411,7 +4619,7 @@ var require_micromatch = __commonJS({
|
|
|
4411
4619
|
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
4412
4620
|
}
|
|
4413
4621
|
if (Array.isArray(pattern)) {
|
|
4414
|
-
return pattern.some((
|
|
4622
|
+
return pattern.some((p) => micromatch.contains(str, p, options));
|
|
4415
4623
|
}
|
|
4416
4624
|
if (typeof pattern === "string") {
|
|
4417
4625
|
if (isEmptyString(str) || isEmptyString(pattern)) {
|
|
@@ -4456,7 +4664,7 @@ var require_micromatch = __commonJS({
|
|
|
4456
4664
|
if (typeof str !== "string") {
|
|
4457
4665
|
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
4458
4666
|
}
|
|
4459
|
-
return [].concat(patterns).every((
|
|
4667
|
+
return [].concat(patterns).every((p) => picomatch(p, options)(str));
|
|
4460
4668
|
};
|
|
4461
4669
|
micromatch.capture = (glob, input, options) => {
|
|
4462
4670
|
let posix = utils.isWindows(options);
|
|
@@ -4607,7 +4815,7 @@ var require_pattern = __commonJS({
|
|
|
4607
4815
|
exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
4608
4816
|
function expandBraceExpansion(pattern) {
|
|
4609
4817
|
const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
|
|
4610
|
-
patterns.sort((
|
|
4818
|
+
patterns.sort((a2, b) => a2.length - b.length);
|
|
4611
4819
|
return patterns.filter((pattern2) => pattern2 !== "");
|
|
4612
4820
|
}
|
|
4613
4821
|
exports.expandBraceExpansion = expandBraceExpansion;
|
|
@@ -4688,8 +4896,8 @@ var require_merge2 = __commonJS({
|
|
|
4688
4896
|
}
|
|
4689
4897
|
const mergedStream = PassThrough(options);
|
|
4690
4898
|
function addStream() {
|
|
4691
|
-
for (let
|
|
4692
|
-
streamsQueue.push(pauseStreams(arguments[
|
|
4899
|
+
for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
|
|
4900
|
+
streamsQueue.push(pauseStreams(arguments[i2], options));
|
|
4693
4901
|
}
|
|
4694
4902
|
mergeStream();
|
|
4695
4903
|
return this;
|
|
@@ -4738,8 +4946,8 @@ var require_merge2 = __commonJS({
|
|
|
4738
4946
|
stream.pipe(mergedStream, { end: false });
|
|
4739
4947
|
stream.resume();
|
|
4740
4948
|
}
|
|
4741
|
-
for (let
|
|
4742
|
-
pipe(streams[
|
|
4949
|
+
for (let i2 = 0; i2 < streams.length; i2++) {
|
|
4950
|
+
pipe(streams[i2]);
|
|
4743
4951
|
}
|
|
4744
4952
|
next();
|
|
4745
4953
|
}
|
|
@@ -4770,8 +4978,8 @@ var require_merge2 = __commonJS({
|
|
|
4770
4978
|
}
|
|
4771
4979
|
streams.pause();
|
|
4772
4980
|
} else {
|
|
4773
|
-
for (let
|
|
4774
|
-
streams[
|
|
4981
|
+
for (let i2 = 0, len = streams.length; i2 < len; i2++) {
|
|
4982
|
+
streams[i2] = pauseStreams(streams[i2], options);
|
|
4775
4983
|
}
|
|
4776
4984
|
}
|
|
4777
4985
|
return streams;
|
|
@@ -4853,13 +5061,13 @@ var require_tasks = __commonJS({
|
|
|
4853
5061
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4854
5062
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
|
|
4855
5063
|
var utils = require_utils3();
|
|
4856
|
-
function generate(input,
|
|
4857
|
-
const patterns = processPatterns(input,
|
|
4858
|
-
const ignore = processPatterns(
|
|
5064
|
+
function generate(input, settings2) {
|
|
5065
|
+
const patterns = processPatterns(input, settings2);
|
|
5066
|
+
const ignore = processPatterns(settings2.ignore, settings2);
|
|
4859
5067
|
const positivePatterns = getPositivePatterns(patterns);
|
|
4860
5068
|
const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
|
|
4861
|
-
const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern,
|
|
4862
|
-
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern,
|
|
5069
|
+
const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
|
|
5070
|
+
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
|
|
4863
5071
|
const staticTasks = convertPatternsToTasks(
|
|
4864
5072
|
staticPatterns,
|
|
4865
5073
|
negativePatterns,
|
|
@@ -4875,12 +5083,12 @@ var require_tasks = __commonJS({
|
|
|
4875
5083
|
return staticTasks.concat(dynamicTasks);
|
|
4876
5084
|
}
|
|
4877
5085
|
exports.generate = generate;
|
|
4878
|
-
function processPatterns(input,
|
|
5086
|
+
function processPatterns(input, settings2) {
|
|
4879
5087
|
let patterns = input;
|
|
4880
|
-
if (
|
|
5088
|
+
if (settings2.braceExpansion) {
|
|
4881
5089
|
patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
|
|
4882
5090
|
}
|
|
4883
|
-
if (
|
|
5091
|
+
if (settings2.baseNameMatch) {
|
|
4884
5092
|
patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
|
|
4885
5093
|
}
|
|
4886
5094
|
return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
|
|
@@ -4911,7 +5119,7 @@ var require_tasks = __commonJS({
|
|
|
4911
5119
|
}
|
|
4912
5120
|
exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
|
|
4913
5121
|
function groupPatternsByBaseDirectory(patterns) {
|
|
4914
|
-
const
|
|
5122
|
+
const group2 = {};
|
|
4915
5123
|
return patterns.reduce((collection, pattern) => {
|
|
4916
5124
|
const base = utils.pattern.getBaseDirectory(pattern);
|
|
4917
5125
|
if (base in collection) {
|
|
@@ -4920,7 +5128,7 @@ var require_tasks = __commonJS({
|
|
|
4920
5128
|
collection[base] = [pattern];
|
|
4921
5129
|
}
|
|
4922
5130
|
return collection;
|
|
4923
|
-
},
|
|
5131
|
+
}, group2);
|
|
4924
5132
|
}
|
|
4925
5133
|
exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
|
|
4926
5134
|
function convertPatternGroupsToTasks(positive, negative, dynamic) {
|
|
@@ -4949,26 +5157,26 @@ var require_async = __commonJS({
|
|
|
4949
5157
|
init_utils2();
|
|
4950
5158
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4951
5159
|
exports.read = void 0;
|
|
4952
|
-
function read(path,
|
|
4953
|
-
|
|
5160
|
+
function read(path, settings2, callback) {
|
|
5161
|
+
settings2.fs.lstat(path, (lstatError, lstat) => {
|
|
4954
5162
|
if (lstatError !== null) {
|
|
4955
5163
|
callFailureCallback(callback, lstatError);
|
|
4956
5164
|
return;
|
|
4957
5165
|
}
|
|
4958
|
-
if (!lstat.isSymbolicLink() || !
|
|
5166
|
+
if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
|
|
4959
5167
|
callSuccessCallback(callback, lstat);
|
|
4960
5168
|
return;
|
|
4961
5169
|
}
|
|
4962
|
-
|
|
5170
|
+
settings2.fs.stat(path, (statError, stat) => {
|
|
4963
5171
|
if (statError !== null) {
|
|
4964
|
-
if (
|
|
5172
|
+
if (settings2.throwErrorOnBrokenSymbolicLink) {
|
|
4965
5173
|
callFailureCallback(callback, statError);
|
|
4966
5174
|
return;
|
|
4967
5175
|
}
|
|
4968
5176
|
callSuccessCallback(callback, lstat);
|
|
4969
5177
|
return;
|
|
4970
5178
|
}
|
|
4971
|
-
if (
|
|
5179
|
+
if (settings2.markSymbolicLink) {
|
|
4972
5180
|
stat.isSymbolicLink = () => true;
|
|
4973
5181
|
}
|
|
4974
5182
|
callSuccessCallback(callback, stat);
|
|
@@ -4992,19 +5200,19 @@ var require_sync = __commonJS({
|
|
|
4992
5200
|
init_utils2();
|
|
4993
5201
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4994
5202
|
exports.read = void 0;
|
|
4995
|
-
function read(path,
|
|
4996
|
-
const lstat =
|
|
4997
|
-
if (!lstat.isSymbolicLink() || !
|
|
5203
|
+
function read(path, settings2) {
|
|
5204
|
+
const lstat = settings2.fs.lstatSync(path);
|
|
5205
|
+
if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
|
|
4998
5206
|
return lstat;
|
|
4999
5207
|
}
|
|
5000
5208
|
try {
|
|
5001
|
-
const stat =
|
|
5002
|
-
if (
|
|
5209
|
+
const stat = settings2.fs.statSync(path);
|
|
5210
|
+
if (settings2.markSymbolicLink) {
|
|
5003
5211
|
stat.isSymbolicLink = () => true;
|
|
5004
5212
|
}
|
|
5005
5213
|
return stat;
|
|
5006
5214
|
} catch (error2) {
|
|
5007
|
-
if (!
|
|
5215
|
+
if (!settings2.throwErrorOnBrokenSymbolicLink) {
|
|
5008
5216
|
return lstat;
|
|
5009
5217
|
}
|
|
5010
5218
|
throw error2;
|
|
@@ -5081,8 +5289,8 @@ var require_out = __commonJS({
|
|
|
5081
5289
|
}
|
|
5082
5290
|
exports.stat = stat;
|
|
5083
5291
|
function statSync3(path, optionsOrSettings) {
|
|
5084
|
-
const
|
|
5085
|
-
return sync.read(path,
|
|
5292
|
+
const settings2 = getSettings(optionsOrSettings);
|
|
5293
|
+
return sync.read(path, settings2);
|
|
5086
5294
|
}
|
|
5087
5295
|
exports.statSync = statSync3;
|
|
5088
5296
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -5130,8 +5338,8 @@ var require_run_parallel = __commonJS({
|
|
|
5130
5338
|
if (isSync) queueMicrotask2(end);
|
|
5131
5339
|
else end();
|
|
5132
5340
|
}
|
|
5133
|
-
function each(
|
|
5134
|
-
results[
|
|
5341
|
+
function each(i2, err, result) {
|
|
5342
|
+
results[i2] = result;
|
|
5135
5343
|
if (--pending === 0 || err) {
|
|
5136
5344
|
done(err);
|
|
5137
5345
|
}
|
|
@@ -5145,9 +5353,9 @@ var require_run_parallel = __commonJS({
|
|
|
5145
5353
|
});
|
|
5146
5354
|
});
|
|
5147
5355
|
} else {
|
|
5148
|
-
tasks.forEach(function(task,
|
|
5356
|
+
tasks.forEach(function(task, i2) {
|
|
5149
5357
|
task(function(err, result) {
|
|
5150
|
-
each(
|
|
5358
|
+
each(i2, err, result);
|
|
5151
5359
|
});
|
|
5152
5360
|
});
|
|
5153
5361
|
}
|
|
@@ -5222,11 +5430,11 @@ var require_common = __commonJS({
|
|
|
5222
5430
|
init_utils2();
|
|
5223
5431
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5224
5432
|
exports.joinPathSegments = void 0;
|
|
5225
|
-
function joinPathSegments(
|
|
5226
|
-
if (
|
|
5227
|
-
return
|
|
5433
|
+
function joinPathSegments(a2, b, separator) {
|
|
5434
|
+
if (a2.endsWith(separator)) {
|
|
5435
|
+
return a2 + b;
|
|
5228
5436
|
}
|
|
5229
|
-
return
|
|
5437
|
+
return a2 + separator + b;
|
|
5230
5438
|
}
|
|
5231
5439
|
exports.joinPathSegments = joinPathSegments;
|
|
5232
5440
|
}
|
|
@@ -5244,16 +5452,16 @@ var require_async2 = __commonJS({
|
|
|
5244
5452
|
var constants_1 = require_constants3();
|
|
5245
5453
|
var utils = require_utils4();
|
|
5246
5454
|
var common = require_common();
|
|
5247
|
-
function read(directory,
|
|
5248
|
-
if (!
|
|
5249
|
-
readdirWithFileTypes(directory,
|
|
5455
|
+
function read(directory, settings2, callback) {
|
|
5456
|
+
if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
5457
|
+
readdirWithFileTypes(directory, settings2, callback);
|
|
5250
5458
|
return;
|
|
5251
5459
|
}
|
|
5252
|
-
readdir(directory,
|
|
5460
|
+
readdir(directory, settings2, callback);
|
|
5253
5461
|
}
|
|
5254
5462
|
exports.read = read;
|
|
5255
|
-
function readdirWithFileTypes(directory,
|
|
5256
|
-
|
|
5463
|
+
function readdirWithFileTypes(directory, settings2, callback) {
|
|
5464
|
+
settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
|
|
5257
5465
|
if (readdirError !== null) {
|
|
5258
5466
|
callFailureCallback(callback, readdirError);
|
|
5259
5467
|
return;
|
|
@@ -5261,13 +5469,13 @@ var require_async2 = __commonJS({
|
|
|
5261
5469
|
const entries = dirents.map((dirent) => ({
|
|
5262
5470
|
dirent,
|
|
5263
5471
|
name: dirent.name,
|
|
5264
|
-
path: common.joinPathSegments(directory, dirent.name,
|
|
5472
|
+
path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
|
|
5265
5473
|
}));
|
|
5266
|
-
if (!
|
|
5474
|
+
if (!settings2.followSymbolicLinks) {
|
|
5267
5475
|
callSuccessCallback(callback, entries);
|
|
5268
5476
|
return;
|
|
5269
5477
|
}
|
|
5270
|
-
const tasks = entries.map((entry) => makeRplTaskEntry(entry,
|
|
5478
|
+
const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
|
|
5271
5479
|
rpl(tasks, (rplError, rplEntries) => {
|
|
5272
5480
|
if (rplError !== null) {
|
|
5273
5481
|
callFailureCallback(callback, rplError);
|
|
@@ -5278,15 +5486,15 @@ var require_async2 = __commonJS({
|
|
|
5278
5486
|
});
|
|
5279
5487
|
}
|
|
5280
5488
|
exports.readdirWithFileTypes = readdirWithFileTypes;
|
|
5281
|
-
function makeRplTaskEntry(entry,
|
|
5489
|
+
function makeRplTaskEntry(entry, settings2) {
|
|
5282
5490
|
return (done) => {
|
|
5283
5491
|
if (!entry.dirent.isSymbolicLink()) {
|
|
5284
5492
|
done(null, entry);
|
|
5285
5493
|
return;
|
|
5286
5494
|
}
|
|
5287
|
-
|
|
5495
|
+
settings2.fs.stat(entry.path, (statError, stats) => {
|
|
5288
5496
|
if (statError !== null) {
|
|
5289
|
-
if (
|
|
5497
|
+
if (settings2.throwErrorOnBrokenSymbolicLink) {
|
|
5290
5498
|
done(statError);
|
|
5291
5499
|
return;
|
|
5292
5500
|
}
|
|
@@ -5298,16 +5506,16 @@ var require_async2 = __commonJS({
|
|
|
5298
5506
|
});
|
|
5299
5507
|
};
|
|
5300
5508
|
}
|
|
5301
|
-
function readdir(directory,
|
|
5302
|
-
|
|
5509
|
+
function readdir(directory, settings2, callback) {
|
|
5510
|
+
settings2.fs.readdir(directory, (readdirError, names) => {
|
|
5303
5511
|
if (readdirError !== null) {
|
|
5304
5512
|
callFailureCallback(callback, readdirError);
|
|
5305
5513
|
return;
|
|
5306
5514
|
}
|
|
5307
5515
|
const tasks = names.map((name) => {
|
|
5308
|
-
const path = common.joinPathSegments(directory, name,
|
|
5516
|
+
const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
|
|
5309
5517
|
return (done) => {
|
|
5310
|
-
fsStat.stat(path,
|
|
5518
|
+
fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
|
|
5311
5519
|
if (error2 !== null) {
|
|
5312
5520
|
done(error2);
|
|
5313
5521
|
return;
|
|
@@ -5317,7 +5525,7 @@ var require_async2 = __commonJS({
|
|
|
5317
5525
|
path,
|
|
5318
5526
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
5319
5527
|
};
|
|
5320
|
-
if (
|
|
5528
|
+
if (settings2.stats) {
|
|
5321
5529
|
entry.stats = stats;
|
|
5322
5530
|
}
|
|
5323
5531
|
done(null, entry);
|
|
@@ -5354,27 +5562,27 @@ var require_sync2 = __commonJS({
|
|
|
5354
5562
|
var constants_1 = require_constants3();
|
|
5355
5563
|
var utils = require_utils4();
|
|
5356
5564
|
var common = require_common();
|
|
5357
|
-
function read(directory,
|
|
5358
|
-
if (!
|
|
5359
|
-
return readdirWithFileTypes(directory,
|
|
5565
|
+
function read(directory, settings2) {
|
|
5566
|
+
if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
5567
|
+
return readdirWithFileTypes(directory, settings2);
|
|
5360
5568
|
}
|
|
5361
|
-
return readdir(directory,
|
|
5569
|
+
return readdir(directory, settings2);
|
|
5362
5570
|
}
|
|
5363
5571
|
exports.read = read;
|
|
5364
|
-
function readdirWithFileTypes(directory,
|
|
5365
|
-
const dirents =
|
|
5572
|
+
function readdirWithFileTypes(directory, settings2) {
|
|
5573
|
+
const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
|
|
5366
5574
|
return dirents.map((dirent) => {
|
|
5367
5575
|
const entry = {
|
|
5368
5576
|
dirent,
|
|
5369
5577
|
name: dirent.name,
|
|
5370
|
-
path: common.joinPathSegments(directory, dirent.name,
|
|
5578
|
+
path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
|
|
5371
5579
|
};
|
|
5372
|
-
if (entry.dirent.isSymbolicLink() &&
|
|
5580
|
+
if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
|
|
5373
5581
|
try {
|
|
5374
|
-
const stats =
|
|
5582
|
+
const stats = settings2.fs.statSync(entry.path);
|
|
5375
5583
|
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
|
|
5376
5584
|
} catch (error2) {
|
|
5377
|
-
if (
|
|
5585
|
+
if (settings2.throwErrorOnBrokenSymbolicLink) {
|
|
5378
5586
|
throw error2;
|
|
5379
5587
|
}
|
|
5380
5588
|
}
|
|
@@ -5383,17 +5591,17 @@ var require_sync2 = __commonJS({
|
|
|
5383
5591
|
});
|
|
5384
5592
|
}
|
|
5385
5593
|
exports.readdirWithFileTypes = readdirWithFileTypes;
|
|
5386
|
-
function readdir(directory,
|
|
5387
|
-
const names =
|
|
5594
|
+
function readdir(directory, settings2) {
|
|
5595
|
+
const names = settings2.fs.readdirSync(directory);
|
|
5388
5596
|
return names.map((name) => {
|
|
5389
|
-
const entryPath = common.joinPathSegments(directory, name,
|
|
5390
|
-
const stats = fsStat.statSync(entryPath,
|
|
5597
|
+
const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
|
|
5598
|
+
const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
|
|
5391
5599
|
const entry = {
|
|
5392
5600
|
name,
|
|
5393
5601
|
path: entryPath,
|
|
5394
5602
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
5395
5603
|
};
|
|
5396
|
-
if (
|
|
5604
|
+
if (settings2.stats) {
|
|
5397
5605
|
entry.stats = stats;
|
|
5398
5606
|
}
|
|
5399
5607
|
return entry;
|
|
@@ -5480,8 +5688,8 @@ var require_out2 = __commonJS({
|
|
|
5480
5688
|
}
|
|
5481
5689
|
exports.scandir = scandir;
|
|
5482
5690
|
function scandirSync(path, optionsOrSettings) {
|
|
5483
|
-
const
|
|
5484
|
-
return sync.read(path,
|
|
5691
|
+
const settings2 = getSettings(optionsOrSettings);
|
|
5692
|
+
return sync.read(path, settings2);
|
|
5485
5693
|
}
|
|
5486
5694
|
exports.scandirSync = scandirSync;
|
|
5487
5695
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -5525,9 +5733,9 @@ var require_reusify = __commonJS({
|
|
|
5525
5733
|
}
|
|
5526
5734
|
});
|
|
5527
5735
|
|
|
5528
|
-
// node_modules/.bun/fastq@1.20.
|
|
5736
|
+
// node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js
|
|
5529
5737
|
var require_queue = __commonJS({
|
|
5530
|
-
"node_modules/.bun/fastq@1.20.
|
|
5738
|
+
"node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js"(exports, module) {
|
|
5531
5739
|
"use strict";
|
|
5532
5740
|
init_utils2();
|
|
5533
5741
|
var reusify = require_reusify();
|
|
@@ -5707,11 +5915,12 @@ var require_queue = __commonJS({
|
|
|
5707
5915
|
current.value = null;
|
|
5708
5916
|
current.callback = noop;
|
|
5709
5917
|
current.errorHandler = null;
|
|
5918
|
+
current.next = null;
|
|
5710
5919
|
if (errorHandler2) {
|
|
5711
5920
|
errorHandler2(new Error("abort"), val);
|
|
5712
5921
|
}
|
|
5713
5922
|
callback.call(context2, new Error("abort"));
|
|
5714
|
-
|
|
5923
|
+
cache.release(current);
|
|
5715
5924
|
current = next;
|
|
5716
5925
|
}
|
|
5717
5926
|
self.drain = noop;
|
|
@@ -5762,7 +5971,7 @@ var require_queue = __commonJS({
|
|
|
5762
5971
|
queue.drained = drained;
|
|
5763
5972
|
return queue;
|
|
5764
5973
|
function push(value) {
|
|
5765
|
-
var
|
|
5974
|
+
var p = new Promise(function(resolve4, reject) {
|
|
5766
5975
|
pushCb(value, function(err, result) {
|
|
5767
5976
|
if (err) {
|
|
5768
5977
|
reject(err);
|
|
@@ -5771,11 +5980,11 @@ var require_queue = __commonJS({
|
|
|
5771
5980
|
resolve4(result);
|
|
5772
5981
|
});
|
|
5773
5982
|
});
|
|
5774
|
-
|
|
5775
|
-
return
|
|
5983
|
+
p.catch(noop);
|
|
5984
|
+
return p;
|
|
5776
5985
|
}
|
|
5777
5986
|
function unshift(value) {
|
|
5778
|
-
var
|
|
5987
|
+
var p = new Promise(function(resolve4, reject) {
|
|
5779
5988
|
unshiftCb(value, function(err, result) {
|
|
5780
5989
|
if (err) {
|
|
5781
5990
|
reject(err);
|
|
@@ -5784,11 +5993,11 @@ var require_queue = __commonJS({
|
|
|
5784
5993
|
resolve4(result);
|
|
5785
5994
|
});
|
|
5786
5995
|
});
|
|
5787
|
-
|
|
5788
|
-
return
|
|
5996
|
+
p.catch(noop);
|
|
5997
|
+
return p;
|
|
5789
5998
|
}
|
|
5790
5999
|
function drained() {
|
|
5791
|
-
var
|
|
6000
|
+
var p = new Promise(function(resolve4) {
|
|
5792
6001
|
process.nextTick(function() {
|
|
5793
6002
|
if (queue.idle()) {
|
|
5794
6003
|
resolve4();
|
|
@@ -5802,7 +6011,7 @@ var require_queue = __commonJS({
|
|
|
5802
6011
|
}
|
|
5803
6012
|
});
|
|
5804
6013
|
});
|
|
5805
|
-
return
|
|
6014
|
+
return p;
|
|
5806
6015
|
}
|
|
5807
6016
|
}
|
|
5808
6017
|
module.exports = fastqueue;
|
|
@@ -5817,11 +6026,11 @@ var require_common2 = __commonJS({
|
|
|
5817
6026
|
init_utils2();
|
|
5818
6027
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5819
6028
|
exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
|
|
5820
|
-
function isFatalError(
|
|
5821
|
-
if (
|
|
6029
|
+
function isFatalError(settings2, error2) {
|
|
6030
|
+
if (settings2.errorFilter === null) {
|
|
5822
6031
|
return true;
|
|
5823
6032
|
}
|
|
5824
|
-
return !
|
|
6033
|
+
return !settings2.errorFilter(error2);
|
|
5825
6034
|
}
|
|
5826
6035
|
exports.isFatalError = isFatalError;
|
|
5827
6036
|
function isAppliedFilter(filter, value) {
|
|
@@ -5832,14 +6041,14 @@ var require_common2 = __commonJS({
|
|
|
5832
6041
|
return filepath.split(/[/\\]/).join(separator);
|
|
5833
6042
|
}
|
|
5834
6043
|
exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
|
|
5835
|
-
function joinPathSegments(
|
|
5836
|
-
if (
|
|
6044
|
+
function joinPathSegments(a2, b, separator) {
|
|
6045
|
+
if (a2 === "") {
|
|
5837
6046
|
return b;
|
|
5838
6047
|
}
|
|
5839
|
-
if (
|
|
5840
|
-
return
|
|
6048
|
+
if (a2.endsWith(separator)) {
|
|
6049
|
+
return a2 + b;
|
|
5841
6050
|
}
|
|
5842
|
-
return
|
|
6051
|
+
return a2 + separator + b;
|
|
5843
6052
|
}
|
|
5844
6053
|
exports.joinPathSegments = joinPathSegments;
|
|
5845
6054
|
}
|
|
@@ -6186,14 +6395,14 @@ var require_out3 = __commonJS({
|
|
|
6186
6395
|
}
|
|
6187
6396
|
exports.walk = walk;
|
|
6188
6397
|
function walkSync(directory, optionsOrSettings) {
|
|
6189
|
-
const
|
|
6190
|
-
const provider = new sync_1.default(directory,
|
|
6398
|
+
const settings2 = getSettings(optionsOrSettings);
|
|
6399
|
+
const provider = new sync_1.default(directory, settings2);
|
|
6191
6400
|
return provider.read();
|
|
6192
6401
|
}
|
|
6193
6402
|
exports.walkSync = walkSync;
|
|
6194
6403
|
function walkStream(directory, optionsOrSettings) {
|
|
6195
|
-
const
|
|
6196
|
-
const provider = new stream_1.default(directory,
|
|
6404
|
+
const settings2 = getSettings(optionsOrSettings);
|
|
6405
|
+
const provider = new stream_1.default(directory, settings2);
|
|
6197
6406
|
return provider.read();
|
|
6198
6407
|
}
|
|
6199
6408
|
exports.walkStream = walkStream;
|
|
@@ -6279,8 +6488,8 @@ var require_stream3 = __commonJS({
|
|
|
6279
6488
|
done();
|
|
6280
6489
|
}).catch(done);
|
|
6281
6490
|
};
|
|
6282
|
-
for (let
|
|
6283
|
-
stream.write(
|
|
6491
|
+
for (let i2 = 0; i2 < filepaths.length; i2++) {
|
|
6492
|
+
stream.write(i2);
|
|
6284
6493
|
}
|
|
6285
6494
|
return stream;
|
|
6286
6495
|
}
|
|
@@ -6941,14 +7150,14 @@ var require_out4 = __commonJS({
|
|
|
6941
7150
|
function generateTasks(source, options) {
|
|
6942
7151
|
assertPatternsInput(source);
|
|
6943
7152
|
const patterns = [].concat(source);
|
|
6944
|
-
const
|
|
6945
|
-
return taskManager.generate(patterns,
|
|
7153
|
+
const settings2 = new settings_1.default(options);
|
|
7154
|
+
return taskManager.generate(patterns, settings2);
|
|
6946
7155
|
}
|
|
6947
7156
|
FastGlob2.generateTasks = generateTasks;
|
|
6948
7157
|
function isDynamicPattern(source, options) {
|
|
6949
7158
|
assertPatternsInput(source);
|
|
6950
|
-
const
|
|
6951
|
-
return utils.pattern.isDynamicPattern(source,
|
|
7159
|
+
const settings2 = new settings_1.default(options);
|
|
7160
|
+
return utils.pattern.isDynamicPattern(source, settings2);
|
|
6952
7161
|
}
|
|
6953
7162
|
FastGlob2.isDynamicPattern = isDynamicPattern;
|
|
6954
7163
|
function escapePath(source) {
|
|
@@ -6990,9 +7199,9 @@ var require_out4 = __commonJS({
|
|
|
6990
7199
|
})(FastGlob || (FastGlob = {}));
|
|
6991
7200
|
function getWorks(source, _Provider, options) {
|
|
6992
7201
|
const patterns = [].concat(source);
|
|
6993
|
-
const
|
|
6994
|
-
const tasks = taskManager.generate(patterns,
|
|
6995
|
-
const provider = new _Provider(
|
|
7202
|
+
const settings2 = new settings_1.default(options);
|
|
7203
|
+
const tasks = taskManager.generate(patterns, settings2);
|
|
7204
|
+
const provider = new _Provider(settings2);
|
|
6996
7205
|
return tasks.map(provider.read, provider);
|
|
6997
7206
|
}
|
|
6998
7207
|
function assertPatternsInput(input) {
|
|
@@ -7170,14 +7379,14 @@ import "node:fs";
|
|
|
7170
7379
|
import { createRequire } from "node:module";
|
|
7171
7380
|
import {
|
|
7172
7381
|
resolve,
|
|
7173
|
-
join,
|
|
7174
|
-
dirname,
|
|
7382
|
+
join as join2,
|
|
7383
|
+
dirname as dirname2,
|
|
7175
7384
|
relative,
|
|
7176
7385
|
normalize,
|
|
7177
7386
|
sep,
|
|
7178
7387
|
extname
|
|
7179
7388
|
} from "node:path";
|
|
7180
|
-
import "node:url";
|
|
7389
|
+
import { fileURLToPath } from "node:url";
|
|
7181
7390
|
function safeExecuteAsync(fn, message) {
|
|
7182
7391
|
return fn().catch((error2) => {
|
|
7183
7392
|
throw new Error(
|
|
@@ -7185,7 +7394,7 @@ function safeExecuteAsync(fn, message) {
|
|
|
7185
7394
|
);
|
|
7186
7395
|
});
|
|
7187
7396
|
}
|
|
7188
|
-
var import_fast_glob, constants,
|
|
7397
|
+
var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
|
|
7189
7398
|
var init_PathResolver = __esm({
|
|
7190
7399
|
"packages/core/config/utils/PathResolver.ts"() {
|
|
7191
7400
|
"use strict";
|
|
@@ -7198,7 +7407,7 @@ var init_PathResolver = __esm({
|
|
|
7198
7407
|
getPatternsFor: getPatternsFor || void 0,
|
|
7199
7408
|
I18N_PATHS: I18N_PATHS || void 0
|
|
7200
7409
|
};
|
|
7201
|
-
|
|
7410
|
+
log3 = {
|
|
7202
7411
|
error: (message, error2) => {
|
|
7203
7412
|
},
|
|
7204
7413
|
warn: (message, error2) => {
|
|
@@ -7234,6 +7443,7 @@ var init_PathResolver = __esm({
|
|
|
7234
7443
|
options;
|
|
7235
7444
|
_repoRoot;
|
|
7236
7445
|
_appRoot = null;
|
|
7446
|
+
_writtenPaths = null;
|
|
7237
7447
|
/**
|
|
7238
7448
|
* Get or create singleton instance
|
|
7239
7449
|
* @param options - Configuration options
|
|
@@ -7319,7 +7529,7 @@ var init_PathResolver = __esm({
|
|
|
7319
7529
|
*/
|
|
7320
7530
|
getDirname(path) {
|
|
7321
7531
|
if (!path) return "";
|
|
7322
|
-
return this.normalizePath(
|
|
7532
|
+
return this.normalizePath(dirname2(path));
|
|
7323
7533
|
}
|
|
7324
7534
|
/**
|
|
7325
7535
|
* Resolve package path using Node's module resolution
|
|
@@ -7331,7 +7541,7 @@ var init_PathResolver = __esm({
|
|
|
7331
7541
|
resolvePackage(packageSpecifier, fromPath = null) {
|
|
7332
7542
|
try {
|
|
7333
7543
|
const basePath = fromPath || this.getAppRoot();
|
|
7334
|
-
const require3 = createRequire(
|
|
7544
|
+
const require3 = createRequire(join2(basePath, "package.json"));
|
|
7335
7545
|
const resolved = require3.resolve(packageSpecifier);
|
|
7336
7546
|
return this.normalizePath(resolved);
|
|
7337
7547
|
} catch (error2) {
|
|
@@ -7483,7 +7693,7 @@ var init_PathResolver = __esm({
|
|
|
7483
7693
|
return cleanContent;
|
|
7484
7694
|
} catch (error2) {
|
|
7485
7695
|
if (this.options.debug) {
|
|
7486
|
-
|
|
7696
|
+
log3.warn(`Failed to read file: ${filePath}`, error2);
|
|
7487
7697
|
}
|
|
7488
7698
|
return null;
|
|
7489
7699
|
}
|
|
@@ -7511,7 +7721,7 @@ var init_PathResolver = __esm({
|
|
|
7511
7721
|
return cleanContent;
|
|
7512
7722
|
} catch (error2) {
|
|
7513
7723
|
if (this.options.debug) {
|
|
7514
|
-
|
|
7724
|
+
log3.warn(`Failed to read file: ${filePath}`, error2);
|
|
7515
7725
|
}
|
|
7516
7726
|
return null;
|
|
7517
7727
|
}
|
|
@@ -7533,16 +7743,16 @@ var init_PathResolver = __esm({
|
|
|
7533
7743
|
verbose = false
|
|
7534
7744
|
} = options;
|
|
7535
7745
|
const normalizedPath = this.normalizePath(filePath);
|
|
7536
|
-
const dir = this.normalizePath(
|
|
7746
|
+
const dir = this.normalizePath(dirname2(normalizedPath));
|
|
7537
7747
|
const fileExists = this.pathExists(normalizedPath);
|
|
7538
7748
|
if (fileExists && !overwrite) {
|
|
7539
7749
|
if (verbose) {
|
|
7540
|
-
|
|
7750
|
+
log3.info(`Skipping existing file: ${normalizedPath}`);
|
|
7541
7751
|
}
|
|
7542
7752
|
return false;
|
|
7543
7753
|
}
|
|
7544
7754
|
if (dryRun) {
|
|
7545
|
-
|
|
7755
|
+
log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
|
|
7546
7756
|
return true;
|
|
7547
7757
|
}
|
|
7548
7758
|
try {
|
|
@@ -7552,22 +7762,23 @@ var init_PathResolver = __esm({
|
|
|
7552
7762
|
}
|
|
7553
7763
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
7554
7764
|
let writeContent;
|
|
7555
|
-
if (
|
|
7765
|
+
if (Buffer2.isBuffer(content)) {
|
|
7556
7766
|
writeContent = content;
|
|
7557
7767
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
7558
|
-
writeContent = JSON.stringify(content, null, 2)
|
|
7768
|
+
writeContent = `${JSON.stringify(content, null, 2)}
|
|
7769
|
+
`;
|
|
7559
7770
|
} else {
|
|
7560
7771
|
writeContent = String(content);
|
|
7561
7772
|
}
|
|
7562
7773
|
try {
|
|
7563
7774
|
return await safeExecuteAsync(async () => {
|
|
7564
|
-
if (
|
|
7775
|
+
if (Buffer2.isBuffer(writeContent)) {
|
|
7565
7776
|
await fs.promises.writeFile(normalizedPath, writeContent);
|
|
7566
7777
|
} else {
|
|
7567
7778
|
await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
|
|
7568
7779
|
}
|
|
7569
7780
|
if (verbose) {
|
|
7570
|
-
|
|
7781
|
+
log3.info(
|
|
7571
7782
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
|
|
7572
7783
|
);
|
|
7573
7784
|
}
|
|
@@ -7594,16 +7805,16 @@ var init_PathResolver = __esm({
|
|
|
7594
7805
|
verbose = false
|
|
7595
7806
|
} = options;
|
|
7596
7807
|
const normalizedPath = this.normalizePath(filePath);
|
|
7597
|
-
const dir = this.normalizePath(
|
|
7808
|
+
const dir = this.normalizePath(dirname2(normalizedPath));
|
|
7598
7809
|
const fileExists = this.pathExists(normalizedPath);
|
|
7599
7810
|
if (fileExists && !overwrite) {
|
|
7600
7811
|
if (verbose) {
|
|
7601
|
-
|
|
7812
|
+
log3.info(`Skipping existing file: ${normalizedPath}`);
|
|
7602
7813
|
}
|
|
7603
7814
|
return false;
|
|
7604
7815
|
}
|
|
7605
7816
|
if (dryRun) {
|
|
7606
|
-
|
|
7817
|
+
log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
|
|
7607
7818
|
return true;
|
|
7608
7819
|
}
|
|
7609
7820
|
try {
|
|
@@ -7613,21 +7824,23 @@ var init_PathResolver = __esm({
|
|
|
7613
7824
|
}
|
|
7614
7825
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
7615
7826
|
let writeContent;
|
|
7616
|
-
if (
|
|
7827
|
+
if (Buffer2.isBuffer(content)) {
|
|
7617
7828
|
writeContent = content;
|
|
7618
7829
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
7619
|
-
writeContent = JSON.stringify(content, null, 2)
|
|
7830
|
+
writeContent = `${JSON.stringify(content, null, 2)}
|
|
7831
|
+
`;
|
|
7620
7832
|
} else {
|
|
7621
7833
|
writeContent = String(content);
|
|
7622
7834
|
}
|
|
7623
7835
|
try {
|
|
7624
|
-
if (
|
|
7836
|
+
if (Buffer2.isBuffer(writeContent)) {
|
|
7625
7837
|
fs.writeFileSync(normalizedPath, writeContent);
|
|
7626
7838
|
} else {
|
|
7627
7839
|
fs.writeFileSync(normalizedPath, writeContent, "utf8");
|
|
7628
7840
|
}
|
|
7841
|
+
this._writtenPaths?.add(normalizedPath);
|
|
7629
7842
|
if (verbose) {
|
|
7630
|
-
|
|
7843
|
+
log3.info(
|
|
7631
7844
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
|
|
7632
7845
|
);
|
|
7633
7846
|
}
|
|
@@ -7652,15 +7865,15 @@ var init_PathResolver = __esm({
|
|
|
7652
7865
|
const fileExists = this.pathExists(normalizedDestPath);
|
|
7653
7866
|
if (fileExists && !overwrite) {
|
|
7654
7867
|
if (verbose) {
|
|
7655
|
-
|
|
7868
|
+
log3.info(`Skipping existing file: ${normalizedDestPath}`);
|
|
7656
7869
|
}
|
|
7657
7870
|
return false;
|
|
7658
7871
|
}
|
|
7659
7872
|
if (dryRun) {
|
|
7660
|
-
|
|
7873
|
+
log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
|
|
7661
7874
|
return true;
|
|
7662
7875
|
}
|
|
7663
|
-
const dir = this.normalizePath(
|
|
7876
|
+
const dir = this.normalizePath(dirname2(normalizedDestPath));
|
|
7664
7877
|
try {
|
|
7665
7878
|
await fs.promises.mkdir(dir, { recursive: true });
|
|
7666
7879
|
} catch (error2) {
|
|
@@ -7670,7 +7883,7 @@ var init_PathResolver = __esm({
|
|
|
7670
7883
|
return await safeExecuteAsync(async () => {
|
|
7671
7884
|
await fs.promises.copyFile(srcPath, normalizedDestPath);
|
|
7672
7885
|
if (verbose) {
|
|
7673
|
-
|
|
7886
|
+
log3.info(
|
|
7674
7887
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
|
|
7675
7888
|
);
|
|
7676
7889
|
}
|
|
@@ -7694,15 +7907,15 @@ var init_PathResolver = __esm({
|
|
|
7694
7907
|
const fileExists = this.pathExists(normalizedDestPath);
|
|
7695
7908
|
if (fileExists && !overwrite) {
|
|
7696
7909
|
if (verbose) {
|
|
7697
|
-
|
|
7910
|
+
log3.info(`Skipping existing file: ${normalizedDestPath}`);
|
|
7698
7911
|
}
|
|
7699
7912
|
return false;
|
|
7700
7913
|
}
|
|
7701
7914
|
if (dryRun) {
|
|
7702
|
-
|
|
7915
|
+
log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
|
|
7703
7916
|
return true;
|
|
7704
7917
|
}
|
|
7705
|
-
const dir = this.normalizePath(
|
|
7918
|
+
const dir = this.normalizePath(dirname2(normalizedDestPath));
|
|
7706
7919
|
try {
|
|
7707
7920
|
fs.mkdirSync(dir, { recursive: true });
|
|
7708
7921
|
} catch (error2) {
|
|
@@ -7710,8 +7923,9 @@ var init_PathResolver = __esm({
|
|
|
7710
7923
|
}
|
|
7711
7924
|
try {
|
|
7712
7925
|
fs.copyFileSync(srcPath, normalizedDestPath);
|
|
7926
|
+
this._writtenPaths?.add(normalizedDestPath);
|
|
7713
7927
|
if (verbose) {
|
|
7714
|
-
|
|
7928
|
+
log3.info(
|
|
7715
7929
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
|
|
7716
7930
|
);
|
|
7717
7931
|
}
|
|
@@ -7728,7 +7942,7 @@ var init_PathResolver = __esm({
|
|
|
7728
7942
|
return fs.existsSync(filePath);
|
|
7729
7943
|
} catch (error2) {
|
|
7730
7944
|
if (!silent) {
|
|
7731
|
-
|
|
7945
|
+
log3.error(`Error checking path existence: ${filePath}`, error2);
|
|
7732
7946
|
}
|
|
7733
7947
|
return false;
|
|
7734
7948
|
}
|
|
@@ -7754,7 +7968,7 @@ var init_PathResolver = __esm({
|
|
|
7754
7968
|
return fs.readdirSync(dirPath, options);
|
|
7755
7969
|
} catch (error2) {
|
|
7756
7970
|
if (this.options.debug) {
|
|
7757
|
-
|
|
7971
|
+
log3.warn(`Failed to read directory: ${dirPath}`, error2);
|
|
7758
7972
|
}
|
|
7759
7973
|
const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
|
|
7760
7974
|
return isObjectOptions && options.withFileTypes ? [] : [];
|
|
@@ -7772,11 +7986,29 @@ var init_PathResolver = __esm({
|
|
|
7772
7986
|
return fs.statSync(filePath);
|
|
7773
7987
|
} catch (error2) {
|
|
7774
7988
|
if (this.options.debug) {
|
|
7775
|
-
|
|
7989
|
+
log3.warn(`Failed to stat file: ${filePath}`, error2);
|
|
7776
7990
|
}
|
|
7777
7991
|
return null;
|
|
7778
7992
|
}
|
|
7779
7993
|
}
|
|
7994
|
+
/**
|
|
7995
|
+
* Resolve the real path of a file, following symlinks
|
|
7996
|
+
* @param filePath - Path to resolve
|
|
7997
|
+
* @returns Resolved real path
|
|
7998
|
+
*/
|
|
7999
|
+
realpathSync(filePath) {
|
|
8000
|
+
return fs.realpathSync(filePath);
|
|
8001
|
+
}
|
|
8002
|
+
/**
|
|
8003
|
+
* Watch a directory for changes
|
|
8004
|
+
* @param dirPath - Directory to watch
|
|
8005
|
+
* @param options - fs.watch options
|
|
8006
|
+
* @param callback - Callback for change events
|
|
8007
|
+
* @returns FSWatcher instance
|
|
8008
|
+
*/
|
|
8009
|
+
watch(dirPath, options, callback) {
|
|
8010
|
+
return fs.watch(dirPath, options, callback);
|
|
8011
|
+
}
|
|
7780
8012
|
/**
|
|
7781
8013
|
* Get file stats synchronously (follows symlinks)
|
|
7782
8014
|
* Returns null if file doesn't exist (graceful degradation)
|
|
@@ -7789,7 +8021,7 @@ var init_PathResolver = __esm({
|
|
|
7789
8021
|
return fs.lstatSync(filePath);
|
|
7790
8022
|
} catch (error2) {
|
|
7791
8023
|
if (this.options.debug) {
|
|
7792
|
-
|
|
8024
|
+
log3.warn(`Failed to lstat file: ${filePath}`, error2);
|
|
7793
8025
|
}
|
|
7794
8026
|
return null;
|
|
7795
8027
|
}
|
|
@@ -7856,6 +8088,28 @@ var init_PathResolver = __esm({
|
|
|
7856
8088
|
* Get app root (where vite.config.ts is, Vite's config.root)
|
|
7857
8089
|
* Falls back to repoRoot if not set
|
|
7858
8090
|
*/
|
|
8091
|
+
/**
|
|
8092
|
+
* Start recording every path written by writeSync/copySync.
|
|
8093
|
+
* Lets a generator know exactly which files the current run produced,
|
|
8094
|
+
* without comparing file timestamps to a clock.
|
|
8095
|
+
*/
|
|
8096
|
+
startWriteRecording() {
|
|
8097
|
+
this._writtenPaths = /* @__PURE__ */ new Set();
|
|
8098
|
+
}
|
|
8099
|
+
/**
|
|
8100
|
+
* Stop recording and return the normalized paths written since
|
|
8101
|
+
* startWriteRecording().
|
|
8102
|
+
*/
|
|
8103
|
+
stopWriteRecording() {
|
|
8104
|
+
if (!this._writtenPaths) {
|
|
8105
|
+
throw new Error(
|
|
8106
|
+
"stopWriteRecording() called without startWriteRecording()"
|
|
8107
|
+
);
|
|
8108
|
+
}
|
|
8109
|
+
const written = this._writtenPaths;
|
|
8110
|
+
this._writtenPaths = null;
|
|
8111
|
+
return written;
|
|
8112
|
+
}
|
|
7859
8113
|
getAppRoot() {
|
|
7860
8114
|
if (!this._appRoot) {
|
|
7861
8115
|
return this._repoRoot;
|
|
@@ -7878,7 +8132,7 @@ var init_PathResolver = __esm({
|
|
|
7878
8132
|
* @returns True if repoRoot is the monorepo (has packages directory)
|
|
7879
8133
|
*/
|
|
7880
8134
|
isMonorepo() {
|
|
7881
|
-
const packagesDir =
|
|
8135
|
+
const packagesDir = join2(this._repoRoot, "packages");
|
|
7882
8136
|
return this.pathExists(packagesDir);
|
|
7883
8137
|
}
|
|
7884
8138
|
/**
|
|
@@ -7895,7 +8149,7 @@ var init_PathResolver = __esm({
|
|
|
7895
8149
|
* Find files matching pattern within directory
|
|
7896
8150
|
*/
|
|
7897
8151
|
async findFiles(directory, pattern, options = {}) {
|
|
7898
|
-
const searchPattern = this.normalizePath(
|
|
8152
|
+
const searchPattern = this.normalizePath(join2(directory, pattern));
|
|
7899
8153
|
const appRoot = this.getAppRoot();
|
|
7900
8154
|
const normalizeAppRoot = this.normalizePath(appRoot);
|
|
7901
8155
|
const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
|
|
@@ -7942,7 +8196,7 @@ var init_PathResolver = __esm({
|
|
|
7942
8196
|
return null;
|
|
7943
8197
|
}
|
|
7944
8198
|
const resolvedPath = this.normalizePath(
|
|
7945
|
-
|
|
8199
|
+
join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
|
|
7946
8200
|
);
|
|
7947
8201
|
const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
|
|
7948
8202
|
if (this.pathExists(resolvedDir)) {
|
|
@@ -8113,6 +8367,15 @@ var init_PathResolver = __esm({
|
|
|
8113
8367
|
const cjsPath = this.getEmptyCjsModulePath();
|
|
8114
8368
|
return cjsPath.replace(/\.cjs$/, ".js");
|
|
8115
8369
|
}
|
|
8370
|
+
/**
|
|
8371
|
+
* Get absolute path to empty flag component module.
|
|
8372
|
+
* Returns `export default () => null;` — used by flag filtering plugins
|
|
8373
|
+
* to replace unused flag files at build time.
|
|
8374
|
+
*/
|
|
8375
|
+
getEmptyFlagModulePath() {
|
|
8376
|
+
const __dirname2 = dirname2(fileURLToPath(import.meta.url));
|
|
8377
|
+
return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
|
|
8378
|
+
}
|
|
8116
8379
|
/**
|
|
8117
8380
|
* Get absolute path to empty CJS module for esbuild pre-bundling.
|
|
8118
8381
|
* CJS because esbuild statically analyzes ESM exports — CJS has dynamic
|
|
@@ -8138,13 +8401,13 @@ var init_PathResolver = __esm({
|
|
|
8138
8401
|
const maxLevels = this.options.maxLevels;
|
|
8139
8402
|
while (levelsChecked < maxLevels) {
|
|
8140
8403
|
const toolingPath = this.normalizePath(
|
|
8141
|
-
|
|
8404
|
+
join2(currentDir, PACKAGE_PATHS.TOOLING)
|
|
8142
8405
|
);
|
|
8143
|
-
const corePath = this.normalizePath(
|
|
8406
|
+
const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
|
|
8144
8407
|
if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
|
|
8145
8408
|
return currentDir;
|
|
8146
8409
|
}
|
|
8147
|
-
const appsDir =
|
|
8410
|
+
const appsDir = join2(currentDir, "apps");
|
|
8148
8411
|
if (this.pathExists(appsDir)) {
|
|
8149
8412
|
const appsDirStat = this.statSync(appsDir);
|
|
8150
8413
|
if (appsDirStat?.isDirectory()) {
|
|
@@ -8152,15 +8415,15 @@ var init_PathResolver = __esm({
|
|
|
8152
8415
|
}
|
|
8153
8416
|
}
|
|
8154
8417
|
const packageJsonPath = this.normalizePath(
|
|
8155
|
-
|
|
8418
|
+
join2(currentDir, "package.json")
|
|
8156
8419
|
);
|
|
8157
8420
|
if (this.pathExists(packageJsonPath)) {
|
|
8158
|
-
const parentDir2 = this.normalizePath(
|
|
8421
|
+
const parentDir2 = this.normalizePath(dirname2(currentDir));
|
|
8159
8422
|
if (parentDir2 === currentDir) {
|
|
8160
8423
|
return currentDir;
|
|
8161
8424
|
}
|
|
8162
8425
|
}
|
|
8163
|
-
const parentDir = this.normalizePath(
|
|
8426
|
+
const parentDir = this.normalizePath(dirname2(currentDir));
|
|
8164
8427
|
if (parentDir === currentDir) {
|
|
8165
8428
|
break;
|
|
8166
8429
|
}
|
|
@@ -8176,8 +8439,8 @@ var init_PathResolver = __esm({
|
|
|
8176
8439
|
// packages/tooling/src/utils/pathResolver.ts
|
|
8177
8440
|
import { createRequire as createRequire2 } from "node:module";
|
|
8178
8441
|
import {
|
|
8179
|
-
join as
|
|
8180
|
-
dirname as
|
|
8442
|
+
join as join3,
|
|
8443
|
+
dirname as dirname3,
|
|
8181
8444
|
basename as basename2,
|
|
8182
8445
|
extname as extname2,
|
|
8183
8446
|
relative as relative2,
|
|
@@ -8186,7 +8449,7 @@ import {
|
|
|
8186
8449
|
isAbsolute as pathIsAbsolute
|
|
8187
8450
|
} from "node:path";
|
|
8188
8451
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
8189
|
-
function
|
|
8452
|
+
function readdirSync3(dirPath, options) {
|
|
8190
8453
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
8191
8454
|
}
|
|
8192
8455
|
var pathResolverInstance, getRepoRoot, normalizePath, pathExists, readSync, statSync2, getRelativePathBetween, getDirname, joinPath;
|
|
@@ -8198,7 +8461,7 @@ var init_pathResolver = __esm({
|
|
|
8198
8461
|
pathResolverInstance = PathResolver.getInstance({ debug: false });
|
|
8199
8462
|
getRepoRoot = () => pathResolverInstance.getRepoRoot();
|
|
8200
8463
|
normalizePath = (...pathSegments) => {
|
|
8201
|
-
return pathResolverInstance.normalizePath(
|
|
8464
|
+
return pathResolverInstance.normalizePath(join3(...pathSegments));
|
|
8202
8465
|
};
|
|
8203
8466
|
pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
|
|
8204
8467
|
readSync = (filePath, options) => pathResolverInstance.readSync(filePath, options);
|
|
@@ -8207,7 +8470,7 @@ var init_pathResolver = __esm({
|
|
|
8207
8470
|
return normalizePath(relative2(from, to));
|
|
8208
8471
|
};
|
|
8209
8472
|
getDirname = (filePath) => {
|
|
8210
|
-
return normalizePath(
|
|
8473
|
+
return normalizePath(dirname3(filePath));
|
|
8211
8474
|
};
|
|
8212
8475
|
joinPath = (...pathSegments) => {
|
|
8213
8476
|
return normalizePath(...pathSegments);
|
|
@@ -8216,10 +8479,10 @@ var init_pathResolver = __esm({
|
|
|
8216
8479
|
});
|
|
8217
8480
|
|
|
8218
8481
|
// packages/tooling/src/bundler/utils.ts
|
|
8219
|
-
import { Buffer } from "node:buffer";
|
|
8482
|
+
import { Buffer as Buffer2 } from "node:buffer";
|
|
8220
8483
|
import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
8221
8484
|
import { createRequire as createRequire3 } from "node:module";
|
|
8222
|
-
import { dirname as
|
|
8485
|
+
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
8223
8486
|
import process from "node:process";
|
|
8224
8487
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
8225
8488
|
var require2, __filename, __dirname;
|
|
@@ -8228,12 +8491,12 @@ var init_utils2 = __esm({
|
|
|
8228
8491
|
"use strict";
|
|
8229
8492
|
require2 = createRequire3(import.meta.url);
|
|
8230
8493
|
__filename = fileURLToPath3(import.meta.url);
|
|
8231
|
-
__dirname =
|
|
8494
|
+
__dirname = dirname4(__filename);
|
|
8232
8495
|
if (typeof globalThis !== "undefined") {
|
|
8233
8496
|
globalThis.require = require2;
|
|
8234
8497
|
globalThis.__filename = __filename;
|
|
8235
8498
|
globalThis.__dirname = __dirname;
|
|
8236
|
-
globalThis.Buffer =
|
|
8499
|
+
globalThis.Buffer = Buffer2;
|
|
8237
8500
|
globalThis.process = process;
|
|
8238
8501
|
if (typeof global === "undefined") {
|
|
8239
8502
|
globalThis.global = globalThis;
|
|
@@ -8249,13 +8512,13 @@ async function askForSelection(message, choices, defaultValue = 0) {
|
|
|
8249
8512
|
label: choice.title,
|
|
8250
8513
|
hint: choice.hint
|
|
8251
8514
|
}));
|
|
8252
|
-
const result = await
|
|
8515
|
+
const result = await select({
|
|
8253
8516
|
message,
|
|
8254
8517
|
options,
|
|
8255
8518
|
initialValue: choices[defaultValue]?.value
|
|
8256
8519
|
});
|
|
8257
|
-
if (
|
|
8258
|
-
|
|
8520
|
+
if (isCancel(result)) {
|
|
8521
|
+
cancel("Operation cancelled.");
|
|
8259
8522
|
process.exit(0);
|
|
8260
8523
|
}
|
|
8261
8524
|
return result;
|
|
@@ -8323,9 +8586,9 @@ async function validateToken(token) {
|
|
|
8323
8586
|
return { username: data.user.username, email: data.user.email };
|
|
8324
8587
|
}
|
|
8325
8588
|
async function fetchProjectDetails(token, projectId, orgId) {
|
|
8326
|
-
const
|
|
8589
|
+
const q = orgId ? `?teamId=${encodeURIComponent(orgId)}` : "";
|
|
8327
8590
|
const res = await fetch(
|
|
8328
|
-
`${VERCEL_API}/v9/projects/${encodeURIComponent(projectId)}${
|
|
8591
|
+
`${VERCEL_API}/v9/projects/${encodeURIComponent(projectId)}${q}`,
|
|
8329
8592
|
{
|
|
8330
8593
|
headers: { Authorization: `Bearer ${token}` }
|
|
8331
8594
|
}
|
|
@@ -8426,7 +8689,7 @@ function resolveSecret(name, projectRoot, opts) {
|
|
|
8426
8689
|
if (value) {
|
|
8427
8690
|
if (!opts?.silent && !warnedLegacy.has(name)) {
|
|
8428
8691
|
warnedLegacy.add(name);
|
|
8429
|
-
|
|
8692
|
+
log2.warn(
|
|
8430
8693
|
`${name} found in ${relPath} (legacy). Move it to .dndev.secrets at project root.`
|
|
8431
8694
|
);
|
|
8432
8695
|
}
|
|
@@ -8437,7 +8700,7 @@ function resolveSecret(name, projectRoot, opts) {
|
|
|
8437
8700
|
if (aliasValue) {
|
|
8438
8701
|
if (!opts?.silent && !warnedLegacy.has(name)) {
|
|
8439
8702
|
warnedLegacy.add(name);
|
|
8440
|
-
|
|
8703
|
+
log2.warn(
|
|
8441
8704
|
`${name} found in ${relPath} (legacy). Move it to .dndev.secrets at project root.`
|
|
8442
8705
|
);
|
|
8443
8706
|
}
|
|
@@ -8516,7 +8779,7 @@ function parseEnvFile2(filePath) {
|
|
|
8516
8779
|
}
|
|
8517
8780
|
const result = parseEnvFile(filePath);
|
|
8518
8781
|
if (Object.keys(result).length === 0) {
|
|
8519
|
-
|
|
8782
|
+
log2.debug(`No key-value pairs found in ${filePath}`);
|
|
8520
8783
|
}
|
|
8521
8784
|
return result;
|
|
8522
8785
|
}
|
|
@@ -8525,7 +8788,7 @@ function parseSecretsWithFallback(envFilePath, projectRoot) {
|
|
|
8525
8788
|
if (pathExists(dndevSecretsPath)) {
|
|
8526
8789
|
const secrets = parseEnvFile(dndevSecretsPath);
|
|
8527
8790
|
if (Object.keys(secrets).length > 0) {
|
|
8528
|
-
|
|
8791
|
+
log2.info(`Reading secrets from: ${dndevSecretsPath}`);
|
|
8529
8792
|
return secrets;
|
|
8530
8793
|
}
|
|
8531
8794
|
}
|
|
@@ -8539,7 +8802,7 @@ function detectPlatform() {
|
|
|
8539
8802
|
if (pathExists(joinPath(currentDir, "vercel.json")) || pathExists(joinPath(currentDir, ".vercel"))) {
|
|
8540
8803
|
return "vercel";
|
|
8541
8804
|
}
|
|
8542
|
-
|
|
8805
|
+
log2.warn("No platform detected, defaulting to Firebase");
|
|
8543
8806
|
return "firebase";
|
|
8544
8807
|
}
|
|
8545
8808
|
function findFirebaseProjectDir(envFilePath) {
|
|
@@ -8618,7 +8881,7 @@ function detectAppsWithFunctions() {
|
|
|
8618
8881
|
}
|
|
8619
8882
|
const apps = [];
|
|
8620
8883
|
try {
|
|
8621
|
-
const appsList =
|
|
8884
|
+
const appsList = readdirSync3(appsDir).filter((item) => {
|
|
8622
8885
|
const itemPath = joinPath(appsDir, item);
|
|
8623
8886
|
const stat = statSync2(itemPath);
|
|
8624
8887
|
return stat?.isDirectory() === true;
|
|
@@ -8635,7 +8898,7 @@ function detectAppsWithFunctions() {
|
|
|
8635
8898
|
}
|
|
8636
8899
|
} catch {
|
|
8637
8900
|
}
|
|
8638
|
-
return apps.sort((
|
|
8901
|
+
return apps.sort((a2, b) => a2.name.localeCompare(b.name));
|
|
8639
8902
|
}
|
|
8640
8903
|
async function setFirebaseSecret(key, value, projectId, dryRun = false, cwd) {
|
|
8641
8904
|
if (isFirebaseReservedKey(key)) {
|
|
@@ -8645,11 +8908,11 @@ async function setFirebaseSecret(key, value, projectId, dryRun = false, cwd) {
|
|
|
8645
8908
|
"FIREBASE_AUTH_DOMAIN"
|
|
8646
8909
|
];
|
|
8647
8910
|
if (configOnlyKeys.includes(key)) {
|
|
8648
|
-
|
|
8911
|
+
log2.debug(
|
|
8649
8912
|
`\u23ED\uFE0F Skipping ${key}: Configuration variable (stays in .env, not synced as secret)`
|
|
8650
8913
|
);
|
|
8651
8914
|
} else {
|
|
8652
|
-
|
|
8915
|
+
log2.warn(
|
|
8653
8916
|
`\u23ED\uFE0F Skipping ${key}: Reserved Firebase prefix (X_GOOGLE_, FIREBASE_, EXT_, GCLOUD_)`
|
|
8654
8917
|
);
|
|
8655
8918
|
}
|
|
@@ -8657,7 +8920,7 @@ async function setFirebaseSecret(key, value, projectId, dryRun = false, cwd) {
|
|
|
8657
8920
|
}
|
|
8658
8921
|
const finalProjectId = projectId || detectFirebaseProjectId(cwd);
|
|
8659
8922
|
if (dryRun) {
|
|
8660
|
-
|
|
8923
|
+
log2.info(
|
|
8661
8924
|
`[DRY RUN] Would set Firebase secret: ${key}${finalProjectId ? ` (project: ${finalProjectId})` : ""}`
|
|
8662
8925
|
);
|
|
8663
8926
|
return;
|
|
@@ -8677,7 +8940,7 @@ async function setFirebaseSecret(key, value, projectId, dryRun = false, cwd) {
|
|
|
8677
8940
|
);
|
|
8678
8941
|
}
|
|
8679
8942
|
try {
|
|
8680
|
-
|
|
8943
|
+
log2.info(`Setting Firebase secret: ${key} (project: ${finalProjectId})`);
|
|
8681
8944
|
const tempFile = "";
|
|
8682
8945
|
try {
|
|
8683
8946
|
const args = ["functions:secrets:set", key, "--project", finalProjectId];
|
|
@@ -8700,8 +8963,8 @@ async function setFirebaseSecret(key, value, projectId, dryRun = false, cwd) {
|
|
|
8700
8963
|
}
|
|
8701
8964
|
if (result.status !== 0) {
|
|
8702
8965
|
const stderr = result.stderr?.toString() || "";
|
|
8703
|
-
const
|
|
8704
|
-
const errorOutput = stderr ||
|
|
8966
|
+
const stdout2 = result.stdout?.toString() || "";
|
|
8967
|
+
const errorOutput = stderr || stdout2;
|
|
8705
8968
|
const errorLower = errorOutput.toLowerCase();
|
|
8706
8969
|
if (errorLower.includes("not logged in") || errorLower.includes("authentication required") || errorLower.includes("please login") || errorLower.includes("run firebase login") || errorLower.includes("unauthorized") || errorOutput.includes("401")) {
|
|
8707
8970
|
throw new DoNotDevError(
|
|
@@ -8751,12 +9014,12 @@ async function setFirebaseSecret(key, value, projectId, dryRun = false, cwd) {
|
|
|
8751
9014
|
${errorOutput}`
|
|
8752
9015
|
);
|
|
8753
9016
|
}
|
|
8754
|
-
|
|
9017
|
+
log2.success(`Firebase secret ${key} set successfully`);
|
|
8755
9018
|
} finally {
|
|
8756
9019
|
}
|
|
8757
9020
|
} catch (err) {
|
|
8758
9021
|
if (err instanceof DoNotDevError) throw err;
|
|
8759
|
-
|
|
9022
|
+
log2.error(`Failed to set Firebase secret ${key}:`, err);
|
|
8760
9023
|
throw new DoNotDevError(
|
|
8761
9024
|
`Failed to set Firebase secret ${key}`,
|
|
8762
9025
|
"command-failed",
|
|
@@ -8793,24 +9056,24 @@ async function resolveVercelCredentialsForSync(appDir, projectIdOverride, dryRun
|
|
|
8793
9056
|
projectId: projectIdOverride ?? credResult.credentials.projectId
|
|
8794
9057
|
};
|
|
8795
9058
|
if (!dryRun) {
|
|
8796
|
-
|
|
9059
|
+
log2.info("Validating Vercel credentials...");
|
|
8797
9060
|
const user = await validateToken(credentials.token);
|
|
8798
|
-
|
|
9061
|
+
log2.success(`Vercel token valid (${user.username})`);
|
|
8799
9062
|
const project = await validateProject(
|
|
8800
9063
|
credentials.token,
|
|
8801
9064
|
credentials.projectId,
|
|
8802
9065
|
credentials.orgId
|
|
8803
9066
|
);
|
|
8804
|
-
|
|
9067
|
+
log2.success(`Vercel project accessible (${project.projectName})`);
|
|
8805
9068
|
}
|
|
8806
9069
|
return credentials;
|
|
8807
9070
|
}
|
|
8808
9071
|
async function setVercelSecret(key, value, credentials, dryRun = false) {
|
|
8809
9072
|
if (dryRun) {
|
|
8810
|
-
|
|
9073
|
+
log2.info(`[DRY RUN] Would set Vercel environment variable: ${key}`);
|
|
8811
9074
|
return;
|
|
8812
9075
|
}
|
|
8813
|
-
|
|
9076
|
+
log2.info(`Setting Vercel environment variable: ${key}`);
|
|
8814
9077
|
try {
|
|
8815
9078
|
const { token, orgId, projectId } = credentials;
|
|
8816
9079
|
const params = ["upsert=true"];
|
|
@@ -8835,9 +9098,9 @@ async function setVercelSecret(key, value, credentials, dryRun = false) {
|
|
|
8835
9098
|
const body = await res.text();
|
|
8836
9099
|
throw formatVercelError(res.status, body, `set env var ${key}`);
|
|
8837
9100
|
}
|
|
8838
|
-
|
|
9101
|
+
log2.success(`Vercel environment variable ${key} set successfully`);
|
|
8839
9102
|
} catch (err) {
|
|
8840
|
-
|
|
9103
|
+
log2.error(`Failed to set Vercel environment variable ${key}:`, err);
|
|
8841
9104
|
if (err instanceof DoNotDevError) throw err;
|
|
8842
9105
|
throw new DoNotDevError(
|
|
8843
9106
|
`Failed to set Vercel environment variable ${key}`,
|
|
@@ -8871,13 +9134,13 @@ function detectGitHubRepo() {
|
|
|
8871
9134
|
}
|
|
8872
9135
|
function setGitHubSecret(key, value, repo, dryRun = false) {
|
|
8873
9136
|
if (dryRun) {
|
|
8874
|
-
|
|
9137
|
+
log2.info(
|
|
8875
9138
|
`[DRY RUN] Would set GitHub secret: ${key}${repo ? ` (repo: ${repo})` : ""}`
|
|
8876
9139
|
);
|
|
8877
9140
|
return;
|
|
8878
9141
|
}
|
|
8879
9142
|
try {
|
|
8880
|
-
|
|
9143
|
+
log2.info(`Setting GitHub secret: ${key}${repo ? ` (repo: ${repo})` : ""}`);
|
|
8881
9144
|
const args = ["secret", "set", key];
|
|
8882
9145
|
if (repo) {
|
|
8883
9146
|
args.push("--repo", repo);
|
|
@@ -8892,8 +9155,8 @@ function setGitHubSecret(key, value, repo, dryRun = false) {
|
|
|
8892
9155
|
}
|
|
8893
9156
|
if (result.status !== 0) {
|
|
8894
9157
|
const stderr = result.stderr?.toString() || "";
|
|
8895
|
-
const
|
|
8896
|
-
const errorOutput = stderr ||
|
|
9158
|
+
const stdout2 = result.stdout?.toString() || "";
|
|
9159
|
+
const errorOutput = stderr || stdout2;
|
|
8897
9160
|
if (errorOutput.includes("not logged in") || errorOutput.includes("authentication")) {
|
|
8898
9161
|
throw new DoNotDevError(
|
|
8899
9162
|
`GitHub CLI authentication required. Run 'gh auth login' to authenticate.`,
|
|
@@ -8906,10 +9169,10 @@ function setGitHubSecret(key, value, repo, dryRun = false) {
|
|
|
8906
9169
|
${errorOutput}`
|
|
8907
9170
|
);
|
|
8908
9171
|
}
|
|
8909
|
-
|
|
9172
|
+
log2.success(`GitHub secret ${key} set successfully`);
|
|
8910
9173
|
} catch (err) {
|
|
8911
9174
|
if (err instanceof DoNotDevError) throw err;
|
|
8912
|
-
|
|
9175
|
+
log2.error(`Failed to set GitHub secret ${key}:`, err);
|
|
8913
9176
|
throw new DoNotDevError(
|
|
8914
9177
|
`Failed to set GitHub secret ${key}`,
|
|
8915
9178
|
"command-failed",
|
|
@@ -8928,13 +9191,13 @@ function uploadServiceAccountToGitHub(appDir, repo, dryRun = false, staging = fa
|
|
|
8928
9191
|
const secretName = staging ? "FIREBASE_SERVICE_ACCOUNT_STAGING" : "FIREBASE_SERVICE_ACCOUNT";
|
|
8929
9192
|
const filePath = joinPath(appDir, fileName);
|
|
8930
9193
|
if (!pathExists(filePath)) {
|
|
8931
|
-
|
|
9194
|
+
log2.debug(`No ${fileName} found in ${appDir}, skipping GitHub upload`);
|
|
8932
9195
|
return;
|
|
8933
9196
|
}
|
|
8934
9197
|
const contentRaw = readSync(filePath, { format: "text" });
|
|
8935
9198
|
const content = typeof contentRaw === "string" ? contentRaw : null;
|
|
8936
9199
|
if (!content) return;
|
|
8937
|
-
const encoded =
|
|
9200
|
+
const encoded = Buffer2.from(content).toString("base64");
|
|
8938
9201
|
setGitHubSecret(secretName, encoded, repo, dryRun);
|
|
8939
9202
|
}
|
|
8940
9203
|
async function main(options = {}) {
|
|
@@ -8949,7 +9212,7 @@ async function main(options = {}) {
|
|
|
8949
9212
|
verbose: options.verbose ?? false
|
|
8950
9213
|
};
|
|
8951
9214
|
if (process.argv.includes("--help")) {
|
|
8952
|
-
|
|
9215
|
+
log2.info(`
|
|
8953
9216
|
Secrets Sync Tool
|
|
8954
9217
|
|
|
8955
9218
|
Usage: bun run sync-secrets [options]
|
|
@@ -8984,7 +9247,7 @@ Examples:
|
|
|
8984
9247
|
let selectedApp;
|
|
8985
9248
|
if (appsWithFunctions.length === 1) {
|
|
8986
9249
|
selectedApp = appsWithFunctions[0];
|
|
8987
|
-
|
|
9250
|
+
note(`Using app: ${selectedApp.name}`, "Auto-detected");
|
|
8988
9251
|
} else {
|
|
8989
9252
|
const appName = await askForSelection(
|
|
8990
9253
|
"Which app would you like to sync secrets for?",
|
|
@@ -8994,7 +9257,7 @@ Examples:
|
|
|
8994
9257
|
hint: `functions/.env in ${app.name}`
|
|
8995
9258
|
}))
|
|
8996
9259
|
);
|
|
8997
|
-
selectedApp = appsWithFunctions.find((
|
|
9260
|
+
selectedApp = appsWithFunctions.find((a2) => a2.name === appName);
|
|
8998
9261
|
}
|
|
8999
9262
|
if (selectedApp) {
|
|
9000
9263
|
const envFileAbsolute = normalizePath(selectedApp.envFile);
|
|
@@ -9015,19 +9278,19 @@ Examples:
|
|
|
9015
9278
|
if (syncTarget === "github") {
|
|
9016
9279
|
const repo = config.repo || detectGitHubRepo();
|
|
9017
9280
|
if (!repo) {
|
|
9018
|
-
|
|
9281
|
+
log2.error(
|
|
9019
9282
|
"Could not detect GitHub repository. Use --repo owner/repo or ensure a GitHub remote is configured."
|
|
9020
9283
|
);
|
|
9021
9284
|
return 1;
|
|
9022
9285
|
}
|
|
9023
|
-
|
|
9286
|
+
log2.info(`Syncing secrets to GitHub repository: ${repo}`);
|
|
9024
9287
|
const secrets2 = parseSecretsWithFallback(envFilePath, currentDir);
|
|
9025
9288
|
const secretKeys2 = Object.keys(secrets2);
|
|
9026
9289
|
if (secretKeys2.length === 0) {
|
|
9027
|
-
|
|
9290
|
+
log2.info("No secrets found in .env file");
|
|
9028
9291
|
} else {
|
|
9029
|
-
|
|
9030
|
-
secretKeys2.forEach((key) =>
|
|
9292
|
+
log2.info(`Found ${secretKeys2.length} secrets to sync to GitHub:`);
|
|
9293
|
+
secretKeys2.forEach((key) => log2.info(` ${key}`));
|
|
9031
9294
|
for (const [key, value] of Object.entries(secrets2)) {
|
|
9032
9295
|
setGitHubSecret(key, value, repo, config.dryRun);
|
|
9033
9296
|
}
|
|
@@ -9050,37 +9313,37 @@ Examples:
|
|
|
9050
9313
|
uploadServiceAccountToGitHub(currentDir, repo, config.dryRun, true);
|
|
9051
9314
|
}
|
|
9052
9315
|
if (config.dryRun) {
|
|
9053
|
-
|
|
9316
|
+
log2.success("\nDry run completed. No GitHub secrets were set.");
|
|
9054
9317
|
} else {
|
|
9055
|
-
|
|
9318
|
+
log2.success("\nAll secrets synced to GitHub successfully!");
|
|
9056
9319
|
}
|
|
9057
9320
|
return 0;
|
|
9058
9321
|
}
|
|
9059
9322
|
const platform = config.platform || detectPlatform();
|
|
9060
9323
|
if (config.verbose) {
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9324
|
+
log2.debug(`Working directory: ${currentDir}`);
|
|
9325
|
+
log2.debug(`Environment file: ${envFilePath}`);
|
|
9326
|
+
log2.debug(`Platform: ${platform}`);
|
|
9327
|
+
log2.debug(`Dry run mode: ${config.dryRun}`);
|
|
9065
9328
|
}
|
|
9066
9329
|
const secrets = parseSecretsWithFallback(envFilePath, currentDir);
|
|
9067
9330
|
const secretKeys = Object.keys(secrets);
|
|
9068
9331
|
if (secretKeys.length === 0) {
|
|
9069
|
-
|
|
9332
|
+
log2.info("No secrets found in .env file");
|
|
9070
9333
|
return 0;
|
|
9071
9334
|
}
|
|
9072
|
-
|
|
9335
|
+
log2.info(`Found ${secretKeys.length} secrets to sync to ${platform}:`);
|
|
9073
9336
|
secretKeys.forEach((key) => {
|
|
9074
9337
|
if (config.verbose) {
|
|
9075
9338
|
const value = secrets[key];
|
|
9076
|
-
|
|
9339
|
+
log2.debug(` ${key}: ${value ? "***" : "undefined"}`);
|
|
9077
9340
|
} else {
|
|
9078
|
-
|
|
9341
|
+
log2.info(` ${key}`);
|
|
9079
9342
|
}
|
|
9080
9343
|
});
|
|
9081
9344
|
const finalFirebaseProjectDir = platform === "firebase" ? firebaseProjectDir || findFirebaseProjectDir(config.envFile) : void 0;
|
|
9082
9345
|
if (config.verbose && finalFirebaseProjectDir) {
|
|
9083
|
-
|
|
9346
|
+
log2.debug(`Firebase project directory: ${finalFirebaseProjectDir}`);
|
|
9084
9347
|
}
|
|
9085
9348
|
const vercelCredentials = platform === "vercel" ? await resolveVercelCredentialsForSync(
|
|
9086
9349
|
currentDir,
|
|
@@ -9101,17 +9364,17 @@ Examples:
|
|
|
9101
9364
|
}
|
|
9102
9365
|
}
|
|
9103
9366
|
if (config.dryRun) {
|
|
9104
|
-
|
|
9367
|
+
log2.success(
|
|
9105
9368
|
`
|
|
9106
9369
|
Dry run completed. No secrets were actually set to ${platform}.`
|
|
9107
9370
|
);
|
|
9108
9371
|
} else {
|
|
9109
|
-
|
|
9372
|
+
log2.success(`
|
|
9110
9373
|
All secrets synced successfully to ${platform}!`);
|
|
9111
9374
|
}
|
|
9112
9375
|
return 0;
|
|
9113
9376
|
} catch (err) {
|
|
9114
|
-
|
|
9377
|
+
log2.error(
|
|
9115
9378
|
"Error syncing secrets:",
|
|
9116
9379
|
DoNotDevError.from(err, "Sync-secrets failed", "cli-execution-error")
|
|
9117
9380
|
);
|
|
@@ -9122,13 +9385,13 @@ var init_sync_secrets = __esm({
|
|
|
9122
9385
|
"packages/tooling/src/apps/sync-secrets.ts"() {
|
|
9123
9386
|
"use strict";
|
|
9124
9387
|
init_utils2();
|
|
9388
|
+
init_vercel_api();
|
|
9389
|
+
init_vercel_token();
|
|
9125
9390
|
init_cli_input();
|
|
9126
9391
|
init_cli_output();
|
|
9127
9392
|
init_errors();
|
|
9128
9393
|
init_pathResolver();
|
|
9129
9394
|
init_secrets_resolver();
|
|
9130
|
-
init_vercel_token();
|
|
9131
|
-
init_vercel_api();
|
|
9132
9395
|
}
|
|
9133
9396
|
});
|
|
9134
9397
|
|