claudekit-cli 3.7.0 → 3.7.1
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/dist/index.js +1759 -1735
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,963 +30,6 @@ var __export = (target, all) => {
|
|
|
30
30
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
31
31
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
32
32
|
|
|
33
|
-
// node_modules/sisteransi/src/index.js
|
|
34
|
-
var require_src = __commonJS((exports, module) => {
|
|
35
|
-
var ESC = "\x1B";
|
|
36
|
-
var CSI = `${ESC}[`;
|
|
37
|
-
var beep = "\x07";
|
|
38
|
-
var cursor = {
|
|
39
|
-
to(x, y) {
|
|
40
|
-
if (!y)
|
|
41
|
-
return `${CSI}${x + 1}G`;
|
|
42
|
-
return `${CSI}${y + 1};${x + 1}H`;
|
|
43
|
-
},
|
|
44
|
-
move(x, y) {
|
|
45
|
-
let ret = "";
|
|
46
|
-
if (x < 0)
|
|
47
|
-
ret += `${CSI}${-x}D`;
|
|
48
|
-
else if (x > 0)
|
|
49
|
-
ret += `${CSI}${x}C`;
|
|
50
|
-
if (y < 0)
|
|
51
|
-
ret += `${CSI}${-y}A`;
|
|
52
|
-
else if (y > 0)
|
|
53
|
-
ret += `${CSI}${y}B`;
|
|
54
|
-
return ret;
|
|
55
|
-
},
|
|
56
|
-
up: (count = 1) => `${CSI}${count}A`,
|
|
57
|
-
down: (count = 1) => `${CSI}${count}B`,
|
|
58
|
-
forward: (count = 1) => `${CSI}${count}C`,
|
|
59
|
-
backward: (count = 1) => `${CSI}${count}D`,
|
|
60
|
-
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
61
|
-
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
62
|
-
left: `${CSI}G`,
|
|
63
|
-
hide: `${CSI}?25l`,
|
|
64
|
-
show: `${CSI}?25h`,
|
|
65
|
-
save: `${ESC}7`,
|
|
66
|
-
restore: `${ESC}8`
|
|
67
|
-
};
|
|
68
|
-
var scroll = {
|
|
69
|
-
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
70
|
-
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
71
|
-
};
|
|
72
|
-
var erase = {
|
|
73
|
-
screen: `${CSI}2J`,
|
|
74
|
-
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
75
|
-
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
76
|
-
line: `${CSI}2K`,
|
|
77
|
-
lineEnd: `${CSI}K`,
|
|
78
|
-
lineStart: `${CSI}1K`,
|
|
79
|
-
lines(count) {
|
|
80
|
-
let clear = "";
|
|
81
|
-
for (let i = 0;i < count; i++)
|
|
82
|
-
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
83
|
-
if (count)
|
|
84
|
-
clear += cursor.left;
|
|
85
|
-
return clear;
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
module.exports = { cursor, scroll, erase, beep };
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
// node_modules/picocolors/picocolors.js
|
|
92
|
-
var require_picocolors = __commonJS((exports, module) => {
|
|
93
|
-
var p = process || {};
|
|
94
|
-
var argv = p.argv || [];
|
|
95
|
-
var env = p.env || {};
|
|
96
|
-
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
97
|
-
var formatter = (open, close, replace = open) => (input) => {
|
|
98
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
|
99
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
100
|
-
};
|
|
101
|
-
var replaceClose = (string, close, replace, index) => {
|
|
102
|
-
let result = "", cursor = 0;
|
|
103
|
-
do {
|
|
104
|
-
result += string.substring(cursor, index) + replace;
|
|
105
|
-
cursor = index + close.length;
|
|
106
|
-
index = string.indexOf(close, cursor);
|
|
107
|
-
} while (~index);
|
|
108
|
-
return result + string.substring(cursor);
|
|
109
|
-
};
|
|
110
|
-
var createColors = (enabled = isColorSupported) => {
|
|
111
|
-
let f = enabled ? formatter : () => String;
|
|
112
|
-
return {
|
|
113
|
-
isColorSupported: enabled,
|
|
114
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
|
115
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
116
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
117
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
|
118
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
|
119
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
120
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
121
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
122
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
|
123
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
|
124
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
|
125
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
126
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
|
127
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
128
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
129
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
|
130
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
|
131
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
132
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
133
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
134
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
135
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
136
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
137
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
138
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
139
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
140
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
141
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
142
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
143
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
144
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
145
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
146
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
147
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
148
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
149
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
150
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
151
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
152
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
153
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
154
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
module.exports = createColors();
|
|
158
|
-
module.exports.createColors = createColors;
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
// node_modules/@clack/core/dist/index.mjs
|
|
162
|
-
import { stdin as $, stdout as k } from "node:process";
|
|
163
|
-
import * as f from "node:readline";
|
|
164
|
-
import _ from "node:readline";
|
|
165
|
-
import { WriteStream as U } from "node:tty";
|
|
166
|
-
function q({ onlyFirst: e = false } = {}) {
|
|
167
|
-
const F = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
168
|
-
return new RegExp(F, e ? undefined : "g");
|
|
169
|
-
}
|
|
170
|
-
function S(e) {
|
|
171
|
-
if (typeof e != "string")
|
|
172
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);
|
|
173
|
-
return e.replace(J, "");
|
|
174
|
-
}
|
|
175
|
-
function T(e) {
|
|
176
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
177
|
-
}
|
|
178
|
-
function A(e, u = {}) {
|
|
179
|
-
if (typeof e != "string" || e.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, e = S(e), e.length === 0))
|
|
180
|
-
return 0;
|
|
181
|
-
e = e.replace(uD(), " ");
|
|
182
|
-
const F = u.ambiguousIsNarrow ? 1 : 2;
|
|
183
|
-
let t = 0;
|
|
184
|
-
for (const s of e) {
|
|
185
|
-
const C = s.codePointAt(0);
|
|
186
|
-
if (C <= 31 || C >= 127 && C <= 159 || C >= 768 && C <= 879)
|
|
187
|
-
continue;
|
|
188
|
-
switch (X.eastAsianWidth(s)) {
|
|
189
|
-
case "F":
|
|
190
|
-
case "W":
|
|
191
|
-
t += 2;
|
|
192
|
-
break;
|
|
193
|
-
case "A":
|
|
194
|
-
t += F;
|
|
195
|
-
break;
|
|
196
|
-
default:
|
|
197
|
-
t += 1;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return t;
|
|
201
|
-
}
|
|
202
|
-
function tD() {
|
|
203
|
-
const e = new Map;
|
|
204
|
-
for (const [u, F] of Object.entries(r)) {
|
|
205
|
-
for (const [t, s] of Object.entries(F))
|
|
206
|
-
r[t] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, F[t] = r[t], e.set(s[0], s[1]);
|
|
207
|
-
Object.defineProperty(r, u, { value: F, enumerable: false });
|
|
208
|
-
}
|
|
209
|
-
return Object.defineProperty(r, "codes", { value: e, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = M(), r.color.ansi256 = P(), r.color.ansi16m = W(), r.bgColor.ansi = M(d), r.bgColor.ansi256 = P(d), r.bgColor.ansi16m = W(d), Object.defineProperties(r, { rgbToAnsi256: { value: (u, F, t) => u === F && F === t ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(F / 255 * 5) + Math.round(t / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
|
|
210
|
-
const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
|
|
211
|
-
if (!F)
|
|
212
|
-
return [0, 0, 0];
|
|
213
|
-
let [t] = F;
|
|
214
|
-
t.length === 3 && (t = [...t].map((C) => C + C).join(""));
|
|
215
|
-
const s = Number.parseInt(t, 16);
|
|
216
|
-
return [s >> 16 & 255, s >> 8 & 255, s & 255];
|
|
217
|
-
}, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
|
|
218
|
-
if (u < 8)
|
|
219
|
-
return 30 + u;
|
|
220
|
-
if (u < 16)
|
|
221
|
-
return 90 + (u - 8);
|
|
222
|
-
let F, t, s;
|
|
223
|
-
if (u >= 232)
|
|
224
|
-
F = ((u - 232) * 10 + 8) / 255, t = F, s = F;
|
|
225
|
-
else {
|
|
226
|
-
u -= 16;
|
|
227
|
-
const i = u % 36;
|
|
228
|
-
F = Math.floor(u / 36) / 5, t = Math.floor(i / 6) / 5, s = i % 6 / 5;
|
|
229
|
-
}
|
|
230
|
-
const C = Math.max(F, t, s) * 2;
|
|
231
|
-
if (C === 0)
|
|
232
|
-
return 30;
|
|
233
|
-
let D = 30 + (Math.round(s) << 2 | Math.round(t) << 1 | Math.round(F));
|
|
234
|
-
return C === 2 && (D += 60), D;
|
|
235
|
-
}, enumerable: false }, rgbToAnsi: { value: (u, F, t) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, t)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
|
|
236
|
-
}
|
|
237
|
-
function R(e, u, F) {
|
|
238
|
-
return String(e).normalize().replace(/\r\n/g, `
|
|
239
|
-
`).split(`
|
|
240
|
-
`).map((t) => oD(t, u, F)).join(`
|
|
241
|
-
`);
|
|
242
|
-
}
|
|
243
|
-
function hD(e, u) {
|
|
244
|
-
if (e === u)
|
|
245
|
-
return;
|
|
246
|
-
const F = e.split(`
|
|
247
|
-
`), t = u.split(`
|
|
248
|
-
`), s = [];
|
|
249
|
-
for (let C = 0;C < Math.max(F.length, t.length); C++)
|
|
250
|
-
F[C] !== t[C] && s.push(C);
|
|
251
|
-
return s;
|
|
252
|
-
}
|
|
253
|
-
function lD(e) {
|
|
254
|
-
return e === V;
|
|
255
|
-
}
|
|
256
|
-
function v(e, u) {
|
|
257
|
-
e.isTTY && e.setRawMode(u);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
class x {
|
|
261
|
-
constructor({ render: u, input: F = $, output: t = k, ...s }, C = true) {
|
|
262
|
-
a(this, "input"), a(this, "output"), a(this, "rl"), a(this, "opts"), a(this, "_track", false), a(this, "_render"), a(this, "_cursor", 0), a(this, "state", "initial"), a(this, "value"), a(this, "error", ""), a(this, "subscribers", new Map), a(this, "_prevFrame", ""), this.opts = s, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u.bind(this), this._track = C, this.input = F, this.output = t;
|
|
263
|
-
}
|
|
264
|
-
prompt() {
|
|
265
|
-
const u = new U(0);
|
|
266
|
-
return u._write = (F, t, s) => {
|
|
267
|
-
this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s();
|
|
268
|
-
}, this.input.pipe(u), this.rl = _.createInterface({ input: this.input, output: u, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), _.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== undefined && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), v(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F, t) => {
|
|
269
|
-
this.once("submit", () => {
|
|
270
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v(this.input, false), F(this.value);
|
|
271
|
-
}), this.once("cancel", () => {
|
|
272
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v(this.input, false), F(V);
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
on(u, F) {
|
|
277
|
-
const t = this.subscribers.get(u) ?? [];
|
|
278
|
-
t.push({ cb: F }), this.subscribers.set(u, t);
|
|
279
|
-
}
|
|
280
|
-
once(u, F) {
|
|
281
|
-
const t = this.subscribers.get(u) ?? [];
|
|
282
|
-
t.push({ cb: F, once: true }), this.subscribers.set(u, t);
|
|
283
|
-
}
|
|
284
|
-
emit(u, ...F) {
|
|
285
|
-
const t = this.subscribers.get(u) ?? [], s = [];
|
|
286
|
-
for (const C of t)
|
|
287
|
-
C.cb(...F), C.once && s.push(() => t.splice(t.indexOf(C), 1));
|
|
288
|
-
for (const C of s)
|
|
289
|
-
C();
|
|
290
|
-
}
|
|
291
|
-
unsubscribe() {
|
|
292
|
-
this.subscribers.clear();
|
|
293
|
-
}
|
|
294
|
-
onKeypress(u, F) {
|
|
295
|
-
if (this.state === "error" && (this.state = "active"), F?.name && !this._track && z.has(F.name) && this.emit("cursor", z.get(F.name)), F?.name && xD.has(F.name) && this.emit("cursor", F.name), u && (u.toLowerCase() === "y" || u.toLowerCase() === "n") && this.emit("confirm", u.toLowerCase() === "y"), u === "\t" && this.opts.placeholder && (this.value || (this.rl.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u && this.emit("key", u.toLowerCase()), F?.name === "return") {
|
|
296
|
-
if (this.opts.validate) {
|
|
297
|
-
const t = this.opts.validate(this.value);
|
|
298
|
-
t && (this.error = t, this.state = "error", this.rl.write(this.value));
|
|
299
|
-
}
|
|
300
|
-
this.state !== "error" && (this.state = "submit");
|
|
301
|
-
}
|
|
302
|
-
u === "\x03" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
303
|
-
}
|
|
304
|
-
close() {
|
|
305
|
-
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
306
|
-
`), v(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
307
|
-
}
|
|
308
|
-
restoreCursor() {
|
|
309
|
-
const u = R(this._prevFrame, process.stdout.columns, { hard: true }).split(`
|
|
310
|
-
`).length - 1;
|
|
311
|
-
this.output.write(import_sisteransi.cursor.move(-999, u * -1));
|
|
312
|
-
}
|
|
313
|
-
render() {
|
|
314
|
-
const u = R(this._render(this) ?? "", process.stdout.columns, { hard: true });
|
|
315
|
-
if (u !== this._prevFrame) {
|
|
316
|
-
if (this.state === "initial")
|
|
317
|
-
this.output.write(import_sisteransi.cursor.hide);
|
|
318
|
-
else {
|
|
319
|
-
const F = hD(this._prevFrame, u);
|
|
320
|
-
if (this.restoreCursor(), F && F?.length === 1) {
|
|
321
|
-
const t = F[0];
|
|
322
|
-
this.output.write(import_sisteransi.cursor.move(0, t)), this.output.write(import_sisteransi.erase.lines(1));
|
|
323
|
-
const s = u.split(`
|
|
324
|
-
`);
|
|
325
|
-
this.output.write(s[t]), this._prevFrame = u, this.output.write(import_sisteransi.cursor.move(0, s.length - t - 1));
|
|
326
|
-
return;
|
|
327
|
-
} else if (F && F?.length > 1) {
|
|
328
|
-
const t = F[0];
|
|
329
|
-
this.output.write(import_sisteransi.cursor.move(0, t)), this.output.write(import_sisteransi.erase.down());
|
|
330
|
-
const s = u.split(`
|
|
331
|
-
`).slice(t);
|
|
332
|
-
this.output.write(s.join(`
|
|
333
|
-
`)), this._prevFrame = u;
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
this.output.write(import_sisteransi.erase.down());
|
|
337
|
-
}
|
|
338
|
-
this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
function OD({ input: e = $, output: u = k, overwrite: F = true, hideCursor: t = true } = {}) {
|
|
343
|
-
const s = f.createInterface({ input: e, output: u, prompt: "", tabSize: 1 });
|
|
344
|
-
f.emitKeypressEvents(e, s), e.isTTY && e.setRawMode(true);
|
|
345
|
-
const C = (D, { name: i }) => {
|
|
346
|
-
if (String(D) === "\x03") {
|
|
347
|
-
t && u.write(import_sisteransi.cursor.show), process.exit(0);
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
if (!F)
|
|
351
|
-
return;
|
|
352
|
-
let n = i === "return" ? 0 : -1, E = i === "return" ? -1 : 0;
|
|
353
|
-
f.moveCursor(u, n, E, () => {
|
|
354
|
-
f.clearLine(u, 1, () => {
|
|
355
|
-
e.once("keypress", C);
|
|
356
|
-
});
|
|
357
|
-
});
|
|
358
|
-
};
|
|
359
|
-
return t && u.write(import_sisteransi.cursor.hide), e.once("keypress", C), () => {
|
|
360
|
-
e.off("keypress", C), t && u.write(import_sisteransi.cursor.show), e.isTTY && !WD && e.setRawMode(false), s.terminal = false, s.close();
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
var import_sisteransi, import_picocolors, J, j, Q, X, DD = function() {
|
|
364
|
-
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
365
|
-
}, uD, d = 10, M = (e = 0) => (u) => `\x1B[${u + e}m`, P = (e = 0) => (u) => `\x1B[${38 + e};5;${u}m`, W = (e = 0) => (u, F, t) => `\x1B[${38 + e};2;${u};${F};${t}m`, r, FD, eD, sD, g, CD = 39, b = "\x07", O = "[", iD = "]", I = "m", w, N = (e) => `${g.values().next().value}${O}${e}${I}`, L = (e) => `${g.values().next().value}${w}${e}${b}`, rD = (e) => e.split(" ").map((u) => A(u)), y = (e, u, F) => {
|
|
366
|
-
const t = [...u];
|
|
367
|
-
let s = false, C = false, D = A(S(e[e.length - 1]));
|
|
368
|
-
for (const [i, n] of t.entries()) {
|
|
369
|
-
const E = A(n);
|
|
370
|
-
if (D + E <= F ? e[e.length - 1] += n : (e.push(n), D = 0), g.has(n) && (s = true, C = t.slice(i + 1).join("").startsWith(w)), s) {
|
|
371
|
-
C ? n === b && (s = false, C = false) : n === I && (s = false);
|
|
372
|
-
continue;
|
|
373
|
-
}
|
|
374
|
-
D += E, D === F && i < t.length - 1 && (e.push(""), D = 0);
|
|
375
|
-
}
|
|
376
|
-
!D && e[e.length - 1].length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
|
|
377
|
-
}, ED = (e) => {
|
|
378
|
-
const u = e.split(" ");
|
|
379
|
-
let F = u.length;
|
|
380
|
-
for (;F > 0 && !(A(u[F - 1]) > 0); )
|
|
381
|
-
F--;
|
|
382
|
-
return F === u.length ? e : u.slice(0, F).join(" ") + u.slice(F).join("");
|
|
383
|
-
}, oD = (e, u, F = {}) => {
|
|
384
|
-
if (F.trim !== false && e.trim() === "")
|
|
385
|
-
return "";
|
|
386
|
-
let t = "", s, C;
|
|
387
|
-
const D = rD(e);
|
|
388
|
-
let i = [""];
|
|
389
|
-
for (const [E, h] of e.split(" ").entries()) {
|
|
390
|
-
F.trim !== false && (i[i.length - 1] = i[i.length - 1].trimStart());
|
|
391
|
-
let o = A(i[i.length - 1]);
|
|
392
|
-
if (E !== 0 && (o >= u && (F.wordWrap === false || F.trim === false) && (i.push(""), o = 0), (o > 0 || F.trim === false) && (i[i.length - 1] += " ", o++)), F.hard && D[E] > u) {
|
|
393
|
-
const B = u - o, p = 1 + Math.floor((D[E] - B - 1) / u);
|
|
394
|
-
Math.floor((D[E] - 1) / u) < p && i.push(""), y(i, h, u);
|
|
395
|
-
continue;
|
|
396
|
-
}
|
|
397
|
-
if (o + D[E] > u && o > 0 && D[E] > 0) {
|
|
398
|
-
if (F.wordWrap === false && o < u) {
|
|
399
|
-
y(i, h, u);
|
|
400
|
-
continue;
|
|
401
|
-
}
|
|
402
|
-
i.push("");
|
|
403
|
-
}
|
|
404
|
-
if (o + D[E] > u && F.wordWrap === false) {
|
|
405
|
-
y(i, h, u);
|
|
406
|
-
continue;
|
|
407
|
-
}
|
|
408
|
-
i[i.length - 1] += h;
|
|
409
|
-
}
|
|
410
|
-
F.trim !== false && (i = i.map((E) => ED(E)));
|
|
411
|
-
const n = [...i.join(`
|
|
412
|
-
`)];
|
|
413
|
-
for (const [E, h] of n.entries()) {
|
|
414
|
-
if (t += h, g.has(h)) {
|
|
415
|
-
const { groups: B } = new RegExp(`(?:\\${O}(?<code>\\d+)m|\\${w}(?<uri>.*)${b})`).exec(n.slice(E).join("")) || { groups: {} };
|
|
416
|
-
if (B.code !== undefined) {
|
|
417
|
-
const p = Number.parseFloat(B.code);
|
|
418
|
-
s = p === CD ? undefined : p;
|
|
419
|
-
} else
|
|
420
|
-
B.uri !== undefined && (C = B.uri.length === 0 ? undefined : B.uri);
|
|
421
|
-
}
|
|
422
|
-
const o = sD.codes.get(Number(s));
|
|
423
|
-
n[E + 1] === `
|
|
424
|
-
` ? (C && (t += L("")), s && o && (t += N(o))) : h === `
|
|
425
|
-
` && (s && o && (t += N(s)), C && (t += L(C)));
|
|
426
|
-
}
|
|
427
|
-
return t;
|
|
428
|
-
}, nD, aD = (e, u, F) => (u in e) ? nD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, a = (e, u, F) => (aD(e, typeof u != "symbol" ? u + "" : u, F), F), V, z, xD, BD, cD, AD = (e, u, F) => (u in e) ? cD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, G = (e, u, F) => (AD(e, typeof u != "symbol" ? u + "" : u, F), F), pD, fD, gD = (e, u, F) => (u in e) ? fD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, K = (e, u, F) => (gD(e, typeof u != "symbol" ? u + "" : u, F), F), vD, mD, dD = (e, u, F) => (u in e) ? mD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, Y = (e, u, F) => (dD(e, typeof u != "symbol" ? u + "" : u, F), F), bD, wD, yD = (e, u, F) => (u in e) ? wD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, Z = (e, u, F) => (yD(e, typeof u != "symbol" ? u + "" : u, F), F), $D, kD, _D = (e, u, F) => (u in e) ? kD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, H = (e, u, F) => (_D(e, typeof u != "symbol" ? u + "" : u, F), F), SD, TD, jD = (e, u, F) => (u in e) ? TD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, MD = (e, u, F) => (jD(e, typeof u != "symbol" ? u + "" : u, F), F), PD, WD;
|
|
429
|
-
var init_dist = __esm(() => {
|
|
430
|
-
import_sisteransi = __toESM(require_src(), 1);
|
|
431
|
-
import_picocolors = __toESM(require_picocolors(), 1);
|
|
432
|
-
J = q();
|
|
433
|
-
j = { exports: {} };
|
|
434
|
-
(function(e) {
|
|
435
|
-
var u = {};
|
|
436
|
-
e.exports = u, u.eastAsianWidth = function(t) {
|
|
437
|
-
var s = t.charCodeAt(0), C = t.length == 2 ? t.charCodeAt(1) : 0, D = s;
|
|
438
|
-
return 55296 <= s && s <= 56319 && 56320 <= C && C <= 57343 && (s &= 1023, C &= 1023, D = s << 10 | C, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
|
|
439
|
-
}, u.characterLength = function(t) {
|
|
440
|
-
var s = this.eastAsianWidth(t);
|
|
441
|
-
return s == "F" || s == "W" || s == "A" ? 2 : 1;
|
|
442
|
-
};
|
|
443
|
-
function F(t) {
|
|
444
|
-
return t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
445
|
-
}
|
|
446
|
-
u.length = function(t) {
|
|
447
|
-
for (var s = F(t), C = 0, D = 0;D < s.length; D++)
|
|
448
|
-
C = C + this.characterLength(s[D]);
|
|
449
|
-
return C;
|
|
450
|
-
}, u.slice = function(t, s, C) {
|
|
451
|
-
textLen = u.length(t), s = s || 0, C = C || 1, s < 0 && (s = textLen + s), C < 0 && (C = textLen + C);
|
|
452
|
-
for (var D = "", i = 0, n = F(t), E = 0;E < n.length; E++) {
|
|
453
|
-
var h = n[E], o = u.length(h);
|
|
454
|
-
if (i >= s - (o == 2 ? 1 : 0))
|
|
455
|
-
if (i + o <= C)
|
|
456
|
-
D += h;
|
|
457
|
-
else
|
|
458
|
-
break;
|
|
459
|
-
i += o;
|
|
460
|
-
}
|
|
461
|
-
return D;
|
|
462
|
-
};
|
|
463
|
-
})(j);
|
|
464
|
-
Q = j.exports;
|
|
465
|
-
X = T(Q);
|
|
466
|
-
uD = T(DD);
|
|
467
|
-
r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
|
|
468
|
-
Object.keys(r.modifier);
|
|
469
|
-
FD = Object.keys(r.color);
|
|
470
|
-
eD = Object.keys(r.bgColor);
|
|
471
|
-
[...FD, ...eD];
|
|
472
|
-
sD = tD();
|
|
473
|
-
g = new Set(["\x1B", ""]);
|
|
474
|
-
w = `${iD}8;;`;
|
|
475
|
-
nD = Object.defineProperty;
|
|
476
|
-
V = Symbol("clack:cancel");
|
|
477
|
-
z = new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
|
|
478
|
-
xD = new Set(["up", "down", "left", "right", "space", "enter"]);
|
|
479
|
-
BD = class BD extends x {
|
|
480
|
-
get cursor() {
|
|
481
|
-
return this.value ? 0 : 1;
|
|
482
|
-
}
|
|
483
|
-
get _value() {
|
|
484
|
-
return this.cursor === 0;
|
|
485
|
-
}
|
|
486
|
-
constructor(u) {
|
|
487
|
-
super(u, false), this.value = !!u.initialValue, this.on("value", () => {
|
|
488
|
-
this.value = this._value;
|
|
489
|
-
}), this.on("confirm", (F) => {
|
|
490
|
-
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
|
|
491
|
-
}), this.on("cursor", () => {
|
|
492
|
-
this.value = !this.value;
|
|
493
|
-
});
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
|
-
cD = Object.defineProperty;
|
|
497
|
-
pD = class pD extends x {
|
|
498
|
-
constructor(u) {
|
|
499
|
-
super(u, false), G(this, "options"), G(this, "cursor", 0);
|
|
500
|
-
const { options: F } = u;
|
|
501
|
-
this.options = Object.entries(F).flatMap(([t, s]) => [{ value: t, group: true, label: t }, ...s.map((C) => ({ ...C, group: t }))]), this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: t }) => t === u.cursorAt), 0), this.on("cursor", (t) => {
|
|
502
|
-
switch (t) {
|
|
503
|
-
case "left":
|
|
504
|
-
case "up":
|
|
505
|
-
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
506
|
-
break;
|
|
507
|
-
case "down":
|
|
508
|
-
case "right":
|
|
509
|
-
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
510
|
-
break;
|
|
511
|
-
case "space":
|
|
512
|
-
this.toggleValue();
|
|
513
|
-
break;
|
|
514
|
-
}
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
getGroupItems(u) {
|
|
518
|
-
return this.options.filter((F) => F.group === u);
|
|
519
|
-
}
|
|
520
|
-
isGroupSelected(u) {
|
|
521
|
-
return this.getGroupItems(u).every((F) => this.value.includes(F.value));
|
|
522
|
-
}
|
|
523
|
-
toggleValue() {
|
|
524
|
-
const u = this.options[this.cursor];
|
|
525
|
-
if (u.group === true) {
|
|
526
|
-
const F = u.value, t = this.getGroupItems(F);
|
|
527
|
-
this.isGroupSelected(F) ? this.value = this.value.filter((s) => t.findIndex((C) => C.value === s) === -1) : this.value = [...this.value, ...t.map((s) => s.value)], this.value = Array.from(new Set(this.value));
|
|
528
|
-
} else {
|
|
529
|
-
const F = this.value.includes(u.value);
|
|
530
|
-
this.value = F ? this.value.filter((t) => t !== u.value) : [...this.value, u.value];
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
|
-
fD = Object.defineProperty;
|
|
535
|
-
vD = class extends x {
|
|
536
|
-
constructor(u) {
|
|
537
|
-
super(u, false), K(this, "options"), K(this, "cursor", 0), this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
|
|
538
|
-
F === "a" && this.toggleAll();
|
|
539
|
-
}), this.on("cursor", (F) => {
|
|
540
|
-
switch (F) {
|
|
541
|
-
case "left":
|
|
542
|
-
case "up":
|
|
543
|
-
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
544
|
-
break;
|
|
545
|
-
case "down":
|
|
546
|
-
case "right":
|
|
547
|
-
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
548
|
-
break;
|
|
549
|
-
case "space":
|
|
550
|
-
this.toggleValue();
|
|
551
|
-
break;
|
|
552
|
-
}
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
get _value() {
|
|
556
|
-
return this.options[this.cursor].value;
|
|
557
|
-
}
|
|
558
|
-
toggleAll() {
|
|
559
|
-
const u = this.value.length === this.options.length;
|
|
560
|
-
this.value = u ? [] : this.options.map((F) => F.value);
|
|
561
|
-
}
|
|
562
|
-
toggleValue() {
|
|
563
|
-
const u = this.value.includes(this._value);
|
|
564
|
-
this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
|
|
565
|
-
}
|
|
566
|
-
};
|
|
567
|
-
mD = Object.defineProperty;
|
|
568
|
-
bD = class bD extends x {
|
|
569
|
-
constructor({ mask: u, ...F }) {
|
|
570
|
-
super(F), Y(this, "valueWithCursor", ""), Y(this, "_mask", "•"), this._mask = u ?? "•", this.on("finalize", () => {
|
|
571
|
-
this.valueWithCursor = this.masked;
|
|
572
|
-
}), this.on("value", () => {
|
|
573
|
-
if (this.cursor >= this.value.length)
|
|
574
|
-
this.valueWithCursor = `${this.masked}${import_picocolors.default.inverse(import_picocolors.default.hidden("_"))}`;
|
|
575
|
-
else {
|
|
576
|
-
const t = this.masked.slice(0, this.cursor), s = this.masked.slice(this.cursor);
|
|
577
|
-
this.valueWithCursor = `${t}${import_picocolors.default.inverse(s[0])}${s.slice(1)}`;
|
|
578
|
-
}
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
get cursor() {
|
|
582
|
-
return this._cursor;
|
|
583
|
-
}
|
|
584
|
-
get masked() {
|
|
585
|
-
return this.value.replaceAll(/./g, this._mask);
|
|
586
|
-
}
|
|
587
|
-
};
|
|
588
|
-
wD = Object.defineProperty;
|
|
589
|
-
$D = class extends x {
|
|
590
|
-
constructor(u) {
|
|
591
|
-
super(u, false), Z(this, "options"), Z(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
|
|
592
|
-
switch (F) {
|
|
593
|
-
case "left":
|
|
594
|
-
case "up":
|
|
595
|
-
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
596
|
-
break;
|
|
597
|
-
case "down":
|
|
598
|
-
case "right":
|
|
599
|
-
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
600
|
-
break;
|
|
601
|
-
}
|
|
602
|
-
this.changeValue();
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
get _value() {
|
|
606
|
-
return this.options[this.cursor];
|
|
607
|
-
}
|
|
608
|
-
changeValue() {
|
|
609
|
-
this.value = this._value.value;
|
|
610
|
-
}
|
|
611
|
-
};
|
|
612
|
-
kD = Object.defineProperty;
|
|
613
|
-
SD = class SD extends x {
|
|
614
|
-
constructor(u) {
|
|
615
|
-
super(u, false), H(this, "options"), H(this, "cursor", 0), this.options = u.options;
|
|
616
|
-
const F = this.options.map(({ value: [t] }) => t?.toLowerCase());
|
|
617
|
-
this.cursor = Math.max(F.indexOf(u.initialValue), 0), this.on("key", (t) => {
|
|
618
|
-
if (!F.includes(t))
|
|
619
|
-
return;
|
|
620
|
-
const s = this.options.find(({ value: [C] }) => C?.toLowerCase() === t);
|
|
621
|
-
s && (this.value = s.value, this.state = "submit", this.emit("submit"));
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
|
-
};
|
|
625
|
-
TD = Object.defineProperty;
|
|
626
|
-
PD = class PD extends x {
|
|
627
|
-
constructor(u) {
|
|
628
|
-
super(u), MD(this, "valueWithCursor", ""), this.on("finalize", () => {
|
|
629
|
-
this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
|
|
630
|
-
}), this.on("value", () => {
|
|
631
|
-
if (this.cursor >= this.value.length)
|
|
632
|
-
this.valueWithCursor = `${this.value}${import_picocolors.default.inverse(import_picocolors.default.hidden("_"))}`;
|
|
633
|
-
else {
|
|
634
|
-
const F = this.value.slice(0, this.cursor), t = this.value.slice(this.cursor);
|
|
635
|
-
this.valueWithCursor = `${F}${import_picocolors.default.inverse(t[0])}${t.slice(1)}`;
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
get cursor() {
|
|
640
|
-
return this._cursor;
|
|
641
|
-
}
|
|
642
|
-
};
|
|
643
|
-
WD = globalThis.process.platform.startsWith("win");
|
|
644
|
-
});
|
|
645
|
-
|
|
646
|
-
// node_modules/@clack/prompts/dist/index.mjs
|
|
647
|
-
var exports_dist = {};
|
|
648
|
-
__export(exports_dist, {
|
|
649
|
-
text: () => te,
|
|
650
|
-
spinner: () => de,
|
|
651
|
-
selectKey: () => ne,
|
|
652
|
-
select: () => ie,
|
|
653
|
-
password: () => re,
|
|
654
|
-
outro: () => $e,
|
|
655
|
-
note: () => le,
|
|
656
|
-
multiselect: () => ae,
|
|
657
|
-
log: () => f2,
|
|
658
|
-
isCancel: () => lD,
|
|
659
|
-
intro: () => oe,
|
|
660
|
-
groupMultiselect: () => ce,
|
|
661
|
-
group: () => he,
|
|
662
|
-
confirm: () => se,
|
|
663
|
-
cancel: () => ue
|
|
664
|
-
});
|
|
665
|
-
import h from "node:process";
|
|
666
|
-
function q2() {
|
|
667
|
-
return h.platform !== "win32" ? h.env.TERM !== "linux" : Boolean(h.env.CI) || Boolean(h.env.WT_SESSION) || Boolean(h.env.TERMINUS_SUBLIME) || h.env.ConEmuTask === "{cmd::Cmder}" || h.env.TERM_PROGRAM === "Terminus-Sublime" || h.env.TERM_PROGRAM === "vscode" || h.env.TERM === "xterm-256color" || h.env.TERM === "alacritty" || h.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
668
|
-
}
|
|
669
|
-
function me() {
|
|
670
|
-
const r2 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
671
|
-
return new RegExp(r2, "g");
|
|
672
|
-
}
|
|
673
|
-
var import_picocolors2, import_sisteransi2, _2, o = (r2, n) => _2 ? r2 : n, H2, I2, x2, S2, K2, a2, d2, b2, E, C, w2, M2, U2, B, Z2, z2, X2, J2, Y2, Q2, ee, y2 = (r2) => {
|
|
674
|
-
switch (r2) {
|
|
675
|
-
case "initial":
|
|
676
|
-
case "active":
|
|
677
|
-
return import_picocolors2.default.cyan(H2);
|
|
678
|
-
case "cancel":
|
|
679
|
-
return import_picocolors2.default.red(I2);
|
|
680
|
-
case "error":
|
|
681
|
-
return import_picocolors2.default.yellow(x2);
|
|
682
|
-
case "submit":
|
|
683
|
-
return import_picocolors2.default.green(S2);
|
|
684
|
-
}
|
|
685
|
-
}, te = (r2) => new PD({ validate: r2.validate, placeholder: r2.placeholder, defaultValue: r2.defaultValue, initialValue: r2.initialValue, render() {
|
|
686
|
-
const n = `${import_picocolors2.default.gray(a2)}
|
|
687
|
-
${y2(this.state)} ${r2.message}
|
|
688
|
-
`, i = r2.placeholder ? import_picocolors2.default.inverse(r2.placeholder[0]) + import_picocolors2.default.dim(r2.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), t = this.value ? this.valueWithCursor : i;
|
|
689
|
-
switch (this.state) {
|
|
690
|
-
case "error":
|
|
691
|
-
return `${n.trim()}
|
|
692
|
-
${import_picocolors2.default.yellow(a2)} ${t}
|
|
693
|
-
${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
|
|
694
|
-
`;
|
|
695
|
-
case "submit":
|
|
696
|
-
return `${n}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(this.value || r2.placeholder)}`;
|
|
697
|
-
case "cancel":
|
|
698
|
-
return `${n}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
699
|
-
` + import_picocolors2.default.gray(a2) : ""}`;
|
|
700
|
-
default:
|
|
701
|
-
return `${n}${import_picocolors2.default.cyan(a2)} ${t}
|
|
702
|
-
${import_picocolors2.default.cyan(d2)}
|
|
703
|
-
`;
|
|
704
|
-
}
|
|
705
|
-
} }).prompt(), re = (r2) => new bD({ validate: r2.validate, mask: r2.mask ?? U2, render() {
|
|
706
|
-
const n = `${import_picocolors2.default.gray(a2)}
|
|
707
|
-
${y2(this.state)} ${r2.message}
|
|
708
|
-
`, i = this.valueWithCursor, t = this.masked;
|
|
709
|
-
switch (this.state) {
|
|
710
|
-
case "error":
|
|
711
|
-
return `${n.trim()}
|
|
712
|
-
${import_picocolors2.default.yellow(a2)} ${t}
|
|
713
|
-
${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
|
|
714
|
-
`;
|
|
715
|
-
case "submit":
|
|
716
|
-
return `${n}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(t)}`;
|
|
717
|
-
case "cancel":
|
|
718
|
-
return `${n}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(t ?? ""))}${t ? `
|
|
719
|
-
` + import_picocolors2.default.gray(a2) : ""}`;
|
|
720
|
-
default:
|
|
721
|
-
return `${n}${import_picocolors2.default.cyan(a2)} ${i}
|
|
722
|
-
${import_picocolors2.default.cyan(d2)}
|
|
723
|
-
`;
|
|
724
|
-
}
|
|
725
|
-
} }).prompt(), se = (r2) => {
|
|
726
|
-
const n = r2.active ?? "Yes", i = r2.inactive ?? "No";
|
|
727
|
-
return new BD({ active: n, inactive: i, initialValue: r2.initialValue ?? true, render() {
|
|
728
|
-
const t = `${import_picocolors2.default.gray(a2)}
|
|
729
|
-
${y2(this.state)} ${r2.message}
|
|
730
|
-
`, s = this.value ? n : i;
|
|
731
|
-
switch (this.state) {
|
|
732
|
-
case "submit":
|
|
733
|
-
return `${t}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(s)}`;
|
|
734
|
-
case "cancel":
|
|
735
|
-
return `${t}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}
|
|
736
|
-
${import_picocolors2.default.gray(a2)}`;
|
|
737
|
-
default:
|
|
738
|
-
return `${t}${import_picocolors2.default.cyan(a2)} ${this.value ? `${import_picocolors2.default.green(b2)} ${n}` : `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(n)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(i)}` : `${import_picocolors2.default.green(b2)} ${i}`}
|
|
739
|
-
${import_picocolors2.default.cyan(d2)}
|
|
740
|
-
`;
|
|
741
|
-
}
|
|
742
|
-
} }).prompt();
|
|
743
|
-
}, ie = (r2) => {
|
|
744
|
-
const n = (t, s) => {
|
|
745
|
-
const c2 = t.label ?? String(t.value);
|
|
746
|
-
return s === "active" ? `${import_picocolors2.default.green(b2)} ${c2} ${t.hint ? import_picocolors2.default.dim(`(${t.hint})`) : ""}` : s === "selected" ? `${import_picocolors2.default.dim(c2)}` : s === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(c2))}` : `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(c2)}`;
|
|
747
|
-
};
|
|
748
|
-
let i = 0;
|
|
749
|
-
return new $D({ options: r2.options, initialValue: r2.initialValue, render() {
|
|
750
|
-
const t = `${import_picocolors2.default.gray(a2)}
|
|
751
|
-
${y2(this.state)} ${r2.message}
|
|
752
|
-
`;
|
|
753
|
-
switch (this.state) {
|
|
754
|
-
case "submit":
|
|
755
|
-
return `${t}${import_picocolors2.default.gray(a2)} ${n(this.options[this.cursor], "selected")}`;
|
|
756
|
-
case "cancel":
|
|
757
|
-
return `${t}${import_picocolors2.default.gray(a2)} ${n(this.options[this.cursor], "cancelled")}
|
|
758
|
-
${import_picocolors2.default.gray(a2)}`;
|
|
759
|
-
default: {
|
|
760
|
-
const s = r2.maxItems === undefined ? 1 / 0 : Math.max(r2.maxItems, 5);
|
|
761
|
-
this.cursor >= i + s - 3 ? i = Math.max(Math.min(this.cursor - s + 3, this.options.length - s), 0) : this.cursor < i + 2 && (i = Math.max(this.cursor - 2, 0));
|
|
762
|
-
const c2 = s < this.options.length && i > 0, l2 = s < this.options.length && i + s < this.options.length;
|
|
763
|
-
return `${t}${import_picocolors2.default.cyan(a2)} ${this.options.slice(i, i + s).map((u, m2, $2) => m2 === 0 && c2 ? import_picocolors2.default.dim("...") : m2 === $2.length - 1 && l2 ? import_picocolors2.default.dim("...") : n(u, m2 + i === this.cursor ? "active" : "inactive")).join(`
|
|
764
|
-
${import_picocolors2.default.cyan(a2)} `)}
|
|
765
|
-
${import_picocolors2.default.cyan(d2)}
|
|
766
|
-
`;
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
} }).prompt();
|
|
770
|
-
}, ne = (r2) => {
|
|
771
|
-
const n = (i, t = "inactive") => {
|
|
772
|
-
const s = i.label ?? String(i.value);
|
|
773
|
-
return t === "selected" ? `${import_picocolors2.default.dim(s)}` : t === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}` : t === "active" ? `${import_picocolors2.default.bgCyan(import_picocolors2.default.gray(` ${i.value} `))} ${s} ${i.hint ? import_picocolors2.default.dim(`(${i.hint})`) : ""}` : `${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(` ${i.value} `)))} ${s} ${i.hint ? import_picocolors2.default.dim(`(${i.hint})`) : ""}`;
|
|
774
|
-
};
|
|
775
|
-
return new SD({ options: r2.options, initialValue: r2.initialValue, render() {
|
|
776
|
-
const i = `${import_picocolors2.default.gray(a2)}
|
|
777
|
-
${y2(this.state)} ${r2.message}
|
|
778
|
-
`;
|
|
779
|
-
switch (this.state) {
|
|
780
|
-
case "submit":
|
|
781
|
-
return `${i}${import_picocolors2.default.gray(a2)} ${n(this.options.find((t) => t.value === this.value), "selected")}`;
|
|
782
|
-
case "cancel":
|
|
783
|
-
return `${i}${import_picocolors2.default.gray(a2)} ${n(this.options[0], "cancelled")}
|
|
784
|
-
${import_picocolors2.default.gray(a2)}`;
|
|
785
|
-
default:
|
|
786
|
-
return `${i}${import_picocolors2.default.cyan(a2)} ${this.options.map((t, s) => n(t, s === this.cursor ? "active" : "inactive")).join(`
|
|
787
|
-
${import_picocolors2.default.cyan(a2)} `)}
|
|
788
|
-
${import_picocolors2.default.cyan(d2)}
|
|
789
|
-
`;
|
|
790
|
-
}
|
|
791
|
-
} }).prompt();
|
|
792
|
-
}, ae = (r2) => {
|
|
793
|
-
const n = (i, t) => {
|
|
794
|
-
const s = i.label ?? String(i.value);
|
|
795
|
-
return t === "active" ? `${import_picocolors2.default.cyan(C)} ${s} ${i.hint ? import_picocolors2.default.dim(`(${i.hint})`) : ""}` : t === "selected" ? `${import_picocolors2.default.green(w2)} ${import_picocolors2.default.dim(s)}` : t === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}` : t === "active-selected" ? `${import_picocolors2.default.green(w2)} ${s} ${i.hint ? import_picocolors2.default.dim(`(${i.hint})`) : ""}` : t === "submitted" ? `${import_picocolors2.default.dim(s)}` : `${import_picocolors2.default.dim(M2)} ${import_picocolors2.default.dim(s)}`;
|
|
796
|
-
};
|
|
797
|
-
return new vD({ options: r2.options, initialValues: r2.initialValues, required: r2.required ?? true, cursorAt: r2.cursorAt, validate(i) {
|
|
798
|
-
if (this.required && i.length === 0)
|
|
799
|
-
return `Please select at least one option.
|
|
800
|
-
${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
|
|
801
|
-
}, render() {
|
|
802
|
-
let i = `${import_picocolors2.default.gray(a2)}
|
|
803
|
-
${y2(this.state)} ${r2.message}
|
|
804
|
-
`;
|
|
805
|
-
switch (this.state) {
|
|
806
|
-
case "submit":
|
|
807
|
-
return `${i}${import_picocolors2.default.gray(a2)} ${this.options.filter(({ value: t }) => this.value.includes(t)).map((t) => n(t, "submitted")).join(import_picocolors2.default.dim(", ")) || import_picocolors2.default.dim("none")}`;
|
|
808
|
-
case "cancel": {
|
|
809
|
-
const t = this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => n(s, "cancelled")).join(import_picocolors2.default.dim(", "));
|
|
810
|
-
return `${i}${import_picocolors2.default.gray(a2)} ${t.trim() ? `${t}
|
|
811
|
-
${import_picocolors2.default.gray(a2)}` : ""}`;
|
|
812
|
-
}
|
|
813
|
-
case "error": {
|
|
814
|
-
const t = this.error.split(`
|
|
815
|
-
`).map((s, c2) => c2 === 0 ? `${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(s)}` : ` ${s}`).join(`
|
|
816
|
-
`);
|
|
817
|
-
return i + import_picocolors2.default.yellow(a2) + " " + this.options.map((s, c2) => {
|
|
818
|
-
const l2 = this.value.includes(s.value), u = c2 === this.cursor;
|
|
819
|
-
return u && l2 ? n(s, "active-selected") : l2 ? n(s, "selected") : n(s, u ? "active" : "inactive");
|
|
820
|
-
}).join(`
|
|
821
|
-
${import_picocolors2.default.yellow(a2)} `) + `
|
|
822
|
-
` + t + `
|
|
823
|
-
`;
|
|
824
|
-
}
|
|
825
|
-
default:
|
|
826
|
-
return `${i}${import_picocolors2.default.cyan(a2)} ${this.options.map((t, s) => {
|
|
827
|
-
const c2 = this.value.includes(t.value), l2 = s === this.cursor;
|
|
828
|
-
return l2 && c2 ? n(t, "active-selected") : c2 ? n(t, "selected") : n(t, l2 ? "active" : "inactive");
|
|
829
|
-
}).join(`
|
|
830
|
-
${import_picocolors2.default.cyan(a2)} `)}
|
|
831
|
-
${import_picocolors2.default.cyan(d2)}
|
|
832
|
-
`;
|
|
833
|
-
}
|
|
834
|
-
} }).prompt();
|
|
835
|
-
}, ce = (r2) => {
|
|
836
|
-
const n = (i, t, s = []) => {
|
|
837
|
-
const c2 = i.label ?? String(i.value), l2 = typeof i.group == "string", u = l2 && (s[s.indexOf(i) + 1] ?? { group: true }), m2 = l2 && u.group === true, $2 = l2 ? `${m2 ? d2 : a2} ` : "";
|
|
838
|
-
return t === "active" ? `${import_picocolors2.default.dim($2)}${import_picocolors2.default.cyan(C)} ${c2} ${i.hint ? import_picocolors2.default.dim(`(${i.hint})`) : ""}` : t === "group-active" ? `${$2}${import_picocolors2.default.cyan(C)} ${import_picocolors2.default.dim(c2)}` : t === "group-active-selected" ? `${$2}${import_picocolors2.default.green(w2)} ${import_picocolors2.default.dim(c2)}` : t === "selected" ? `${import_picocolors2.default.dim($2)}${import_picocolors2.default.green(w2)} ${import_picocolors2.default.dim(c2)}` : t === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(c2))}` : t === "active-selected" ? `${import_picocolors2.default.dim($2)}${import_picocolors2.default.green(w2)} ${c2} ${i.hint ? import_picocolors2.default.dim(`(${i.hint})`) : ""}` : t === "submitted" ? `${import_picocolors2.default.dim(c2)}` : `${import_picocolors2.default.dim($2)}${import_picocolors2.default.dim(M2)} ${import_picocolors2.default.dim(c2)}`;
|
|
839
|
-
};
|
|
840
|
-
return new pD({ options: r2.options, initialValues: r2.initialValues, required: r2.required ?? true, cursorAt: r2.cursorAt, validate(i) {
|
|
841
|
-
if (this.required && i.length === 0)
|
|
842
|
-
return `Please select at least one option.
|
|
843
|
-
${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
|
|
844
|
-
}, render() {
|
|
845
|
-
let i = `${import_picocolors2.default.gray(a2)}
|
|
846
|
-
${y2(this.state)} ${r2.message}
|
|
847
|
-
`;
|
|
848
|
-
switch (this.state) {
|
|
849
|
-
case "submit":
|
|
850
|
-
return `${i}${import_picocolors2.default.gray(a2)} ${this.options.filter(({ value: t }) => this.value.includes(t)).map((t) => n(t, "submitted")).join(import_picocolors2.default.dim(", "))}`;
|
|
851
|
-
case "cancel": {
|
|
852
|
-
const t = this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => n(s, "cancelled")).join(import_picocolors2.default.dim(", "));
|
|
853
|
-
return `${i}${import_picocolors2.default.gray(a2)} ${t.trim() ? `${t}
|
|
854
|
-
${import_picocolors2.default.gray(a2)}` : ""}`;
|
|
855
|
-
}
|
|
856
|
-
case "error": {
|
|
857
|
-
const t = this.error.split(`
|
|
858
|
-
`).map((s, c2) => c2 === 0 ? `${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(s)}` : ` ${s}`).join(`
|
|
859
|
-
`);
|
|
860
|
-
return `${i}${import_picocolors2.default.yellow(a2)} ${this.options.map((s, c2, l2) => {
|
|
861
|
-
const u = this.value.includes(s.value) || s.group === true && this.isGroupSelected(`${s.value}`), m2 = c2 === this.cursor;
|
|
862
|
-
return !m2 && typeof s.group == "string" && this.options[this.cursor].value === s.group ? n(s, u ? "group-active-selected" : "group-active", l2) : m2 && u ? n(s, "active-selected", l2) : u ? n(s, "selected", l2) : n(s, m2 ? "active" : "inactive", l2);
|
|
863
|
-
}).join(`
|
|
864
|
-
${import_picocolors2.default.yellow(a2)} `)}
|
|
865
|
-
${t}
|
|
866
|
-
`;
|
|
867
|
-
}
|
|
868
|
-
default:
|
|
869
|
-
return `${i}${import_picocolors2.default.cyan(a2)} ${this.options.map((t, s, c2) => {
|
|
870
|
-
const l2 = this.value.includes(t.value) || t.group === true && this.isGroupSelected(`${t.value}`), u = s === this.cursor;
|
|
871
|
-
return !u && typeof t.group == "string" && this.options[this.cursor].value === t.group ? n(t, l2 ? "group-active-selected" : "group-active", c2) : u && l2 ? n(t, "active-selected", c2) : l2 ? n(t, "selected", c2) : n(t, u ? "active" : "inactive", c2);
|
|
872
|
-
}).join(`
|
|
873
|
-
${import_picocolors2.default.cyan(a2)} `)}
|
|
874
|
-
${import_picocolors2.default.cyan(d2)}
|
|
875
|
-
`;
|
|
876
|
-
}
|
|
877
|
-
} }).prompt();
|
|
878
|
-
}, R2 = (r2) => r2.replace(me(), ""), le = (r2 = "", n = "") => {
|
|
879
|
-
const i = `
|
|
880
|
-
${r2}
|
|
881
|
-
`.split(`
|
|
882
|
-
`), t = R2(n).length, s = Math.max(i.reduce((l2, u) => (u = R2(u), u.length > l2 ? u.length : l2), 0), t) + 2, c2 = i.map((l2) => `${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(l2)}${" ".repeat(s - R2(l2).length)}${import_picocolors2.default.gray(a2)}`).join(`
|
|
883
|
-
`);
|
|
884
|
-
process.stdout.write(`${import_picocolors2.default.gray(a2)}
|
|
885
|
-
${import_picocolors2.default.green(S2)} ${import_picocolors2.default.reset(n)} ${import_picocolors2.default.gray(B.repeat(Math.max(s - t - 1, 1)) + Z2)}
|
|
886
|
-
${c2}
|
|
887
|
-
${import_picocolors2.default.gray(z2 + B.repeat(s + 2) + X2)}
|
|
888
|
-
`);
|
|
889
|
-
}, ue = (r2 = "") => {
|
|
890
|
-
process.stdout.write(`${import_picocolors2.default.gray(d2)} ${import_picocolors2.default.red(r2)}
|
|
891
|
-
|
|
892
|
-
`);
|
|
893
|
-
}, oe = (r2 = "") => {
|
|
894
|
-
process.stdout.write(`${import_picocolors2.default.gray(K2)} ${r2}
|
|
895
|
-
`);
|
|
896
|
-
}, $e = (r2 = "") => {
|
|
897
|
-
process.stdout.write(`${import_picocolors2.default.gray(a2)}
|
|
898
|
-
${import_picocolors2.default.gray(d2)} ${r2}
|
|
899
|
-
|
|
900
|
-
`);
|
|
901
|
-
}, f2, de = () => {
|
|
902
|
-
const r2 = _2 ? ["◒", "◐", "◓", "◑"] : ["•", "o", "O", "0"], n = _2 ? 80 : 120;
|
|
903
|
-
let i, t, s = false, c2 = "";
|
|
904
|
-
const l2 = (v2 = "") => {
|
|
905
|
-
s = true, i = OD(), c2 = v2.replace(/\.+$/, ""), process.stdout.write(`${import_picocolors2.default.gray(a2)}
|
|
906
|
-
`);
|
|
907
|
-
let g2 = 0, p = 0;
|
|
908
|
-
t = setInterval(() => {
|
|
909
|
-
const O2 = import_picocolors2.default.magenta(r2[g2]), P2 = ".".repeat(Math.floor(p)).slice(0, 3);
|
|
910
|
-
process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${O2} ${c2}${P2}`), g2 = g2 + 1 < r2.length ? g2 + 1 : 0, p = p < r2.length ? p + 0.125 : 0;
|
|
911
|
-
}, n);
|
|
912
|
-
}, u = (v2 = "", g2 = 0) => {
|
|
913
|
-
c2 = v2 ?? c2, s = false, clearInterval(t);
|
|
914
|
-
const p = g2 === 0 ? import_picocolors2.default.green(S2) : g2 === 1 ? import_picocolors2.default.red(I2) : import_picocolors2.default.red(x2);
|
|
915
|
-
process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${p} ${c2}
|
|
916
|
-
`), i();
|
|
917
|
-
}, m2 = (v2 = "") => {
|
|
918
|
-
c2 = v2 ?? c2;
|
|
919
|
-
}, $2 = (v2) => {
|
|
920
|
-
const g2 = v2 > 1 ? "Something went wrong" : "Canceled";
|
|
921
|
-
s && u(g2, v2);
|
|
922
|
-
};
|
|
923
|
-
return process.on("uncaughtExceptionMonitor", () => $2(2)), process.on("unhandledRejection", () => $2(2)), process.on("SIGINT", () => $2(1)), process.on("SIGTERM", () => $2(1)), process.on("exit", $2), { start: l2, stop: u, message: m2 };
|
|
924
|
-
}, he = async (r2, n) => {
|
|
925
|
-
const i = {}, t = Object.keys(r2);
|
|
926
|
-
for (const s of t) {
|
|
927
|
-
const c2 = r2[s], l2 = await c2({ results: i })?.catch((u) => {
|
|
928
|
-
throw u;
|
|
929
|
-
});
|
|
930
|
-
if (typeof n?.onCancel == "function" && lD(l2)) {
|
|
931
|
-
i[s] = "canceled", n.onCancel({ results: i });
|
|
932
|
-
continue;
|
|
933
|
-
}
|
|
934
|
-
i[s] = l2;
|
|
935
|
-
}
|
|
936
|
-
return i;
|
|
937
|
-
};
|
|
938
|
-
var init_dist2 = __esm(() => {
|
|
939
|
-
init_dist();
|
|
940
|
-
init_dist();
|
|
941
|
-
import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
942
|
-
import_sisteransi2 = __toESM(require_src(), 1);
|
|
943
|
-
_2 = q2();
|
|
944
|
-
H2 = o("◆", "*");
|
|
945
|
-
I2 = o("■", "x");
|
|
946
|
-
x2 = o("▲", "x");
|
|
947
|
-
S2 = o("◇", "o");
|
|
948
|
-
K2 = o("┌", "T");
|
|
949
|
-
a2 = o("│", "|");
|
|
950
|
-
d2 = o("└", "—");
|
|
951
|
-
b2 = o("●", ">");
|
|
952
|
-
E = o("○", " ");
|
|
953
|
-
C = o("◻", "[•]");
|
|
954
|
-
w2 = o("◼", "[+]");
|
|
955
|
-
M2 = o("◻", "[ ]");
|
|
956
|
-
U2 = o("▪", "•");
|
|
957
|
-
B = o("─", "-");
|
|
958
|
-
Z2 = o("╮", "+");
|
|
959
|
-
z2 = o("├", "+");
|
|
960
|
-
X2 = o("╯", "+");
|
|
961
|
-
J2 = o("●", "•");
|
|
962
|
-
Y2 = o("◆", "*");
|
|
963
|
-
Q2 = o("▲", "!");
|
|
964
|
-
ee = o("■", "x");
|
|
965
|
-
f2 = { message: (r2 = "", { symbol: n = import_picocolors2.default.gray(a2) } = {}) => {
|
|
966
|
-
const i = [`${import_picocolors2.default.gray(a2)}`];
|
|
967
|
-
if (r2) {
|
|
968
|
-
const [t, ...s] = r2.split(`
|
|
969
|
-
`);
|
|
970
|
-
i.push(`${n} ${t}`, ...s.map((c2) => `${import_picocolors2.default.gray(a2)} ${c2}`));
|
|
971
|
-
}
|
|
972
|
-
process.stdout.write(`${i.join(`
|
|
973
|
-
`)}
|
|
974
|
-
`);
|
|
975
|
-
}, info: (r2) => {
|
|
976
|
-
f2.message(r2, { symbol: import_picocolors2.default.blue(J2) });
|
|
977
|
-
}, success: (r2) => {
|
|
978
|
-
f2.message(r2, { symbol: import_picocolors2.default.green(Y2) });
|
|
979
|
-
}, step: (r2) => {
|
|
980
|
-
f2.message(r2, { symbol: import_picocolors2.default.green(S2) });
|
|
981
|
-
}, warn: (r2) => {
|
|
982
|
-
f2.message(r2, { symbol: import_picocolors2.default.yellow(Q2) });
|
|
983
|
-
}, warning: (r2) => {
|
|
984
|
-
f2.warn(r2);
|
|
985
|
-
}, error: (r2) => {
|
|
986
|
-
f2.message(r2, { symbol: import_picocolors2.default.red(ee) });
|
|
987
|
-
} };
|
|
988
|
-
});
|
|
989
|
-
|
|
990
33
|
// node_modules/zod/v3/helpers/util.js
|
|
991
34
|
var util, objectUtil, ZodParsedType, getParsedType = (data) => {
|
|
992
35
|
const t = typeof data;
|
|
@@ -1031,7 +74,7 @@ var util, objectUtil, ZodParsedType, getParsedType = (data) => {
|
|
|
1031
74
|
};
|
|
1032
75
|
var init_util = __esm(() => {
|
|
1033
76
|
(function(util2) {
|
|
1034
|
-
util2.assertEqual = (
|
|
77
|
+
util2.assertEqual = (_) => {};
|
|
1035
78
|
function assertIs(_arg) {}
|
|
1036
79
|
util2.assertIs = assertIs;
|
|
1037
80
|
function assertNever(_x) {
|
|
@@ -1046,16 +89,16 @@ var init_util = __esm(() => {
|
|
|
1046
89
|
return obj;
|
|
1047
90
|
};
|
|
1048
91
|
util2.getValidEnumValues = (obj) => {
|
|
1049
|
-
const validKeys = util2.objectKeys(obj).filter((
|
|
92
|
+
const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
|
|
1050
93
|
const filtered = {};
|
|
1051
|
-
for (const
|
|
1052
|
-
filtered[
|
|
94
|
+
for (const k of validKeys) {
|
|
95
|
+
filtered[k] = obj[k];
|
|
1053
96
|
}
|
|
1054
97
|
return util2.objectValues(filtered);
|
|
1055
98
|
};
|
|
1056
99
|
util2.objectValues = (obj) => {
|
|
1057
|
-
return util2.objectKeys(obj).map(function(
|
|
1058
|
-
return obj[
|
|
100
|
+
return util2.objectKeys(obj).map(function(e) {
|
|
101
|
+
return obj[e];
|
|
1059
102
|
});
|
|
1060
103
|
};
|
|
1061
104
|
util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
|
|
@@ -1079,7 +122,7 @@ var init_util = __esm(() => {
|
|
|
1079
122
|
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
|
|
1080
123
|
}
|
|
1081
124
|
util2.joinValues = joinValues;
|
|
1082
|
-
util2.jsonStringifyReplacer = (
|
|
125
|
+
util2.jsonStringifyReplacer = (_, value) => {
|
|
1083
126
|
if (typeof value === "bigint") {
|
|
1084
127
|
return value.toString();
|
|
1085
128
|
}
|
|
@@ -1371,7 +414,7 @@ function addIssueToContext(ctx, issueData) {
|
|
|
1371
414
|
ctx.schemaErrorMap,
|
|
1372
415
|
overrideMap,
|
|
1373
416
|
overrideMap === en_default ? undefined : en_default
|
|
1374
|
-
].filter((
|
|
417
|
+
].filter((x) => !!x)
|
|
1375
418
|
});
|
|
1376
419
|
ctx.common.issues.push(issue);
|
|
1377
420
|
}
|
|
@@ -1445,7 +488,7 @@ var makeIssue = (params) => {
|
|
|
1445
488
|
};
|
|
1446
489
|
}
|
|
1447
490
|
let errorMessage = "";
|
|
1448
|
-
const maps = errorMaps.filter((
|
|
491
|
+
const maps = errorMaps.filter((m) => !!m).slice().reverse();
|
|
1449
492
|
for (const map of maps) {
|
|
1450
493
|
errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
|
|
1451
494
|
}
|
|
@@ -1454,7 +497,7 @@ var makeIssue = (params) => {
|
|
|
1454
497
|
path: fullPath,
|
|
1455
498
|
message: errorMessage
|
|
1456
499
|
};
|
|
1457
|
-
}, EMPTY_PATH, INVALID, DIRTY = (value) => ({ status: "dirty", value }), OK = (value) => ({ status: "valid", value }), isAborted = (
|
|
500
|
+
}, EMPTY_PATH, INVALID, DIRTY = (value) => ({ status: "dirty", value }), OK = (value) => ({ status: "valid", value }), isAborted = (x) => x.status === "aborted", isDirty = (x) => x.status === "dirty", isValid = (x) => x.status === "valid", isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
1458
501
|
var init_parseUtil = __esm(() => {
|
|
1459
502
|
init_errors();
|
|
1460
503
|
init_en();
|
|
@@ -1899,17 +942,17 @@ function deepPartialify(schema) {
|
|
|
1899
942
|
return schema;
|
|
1900
943
|
}
|
|
1901
944
|
}
|
|
1902
|
-
function mergeValues(
|
|
1903
|
-
const aType = getParsedType(
|
|
1904
|
-
const bType = getParsedType(
|
|
1905
|
-
if (
|
|
1906
|
-
return { valid: true, data:
|
|
945
|
+
function mergeValues(a, b) {
|
|
946
|
+
const aType = getParsedType(a);
|
|
947
|
+
const bType = getParsedType(b);
|
|
948
|
+
if (a === b) {
|
|
949
|
+
return { valid: true, data: a };
|
|
1907
950
|
} else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
|
|
1908
|
-
const bKeys = util.objectKeys(
|
|
1909
|
-
const sharedKeys = util.objectKeys(
|
|
1910
|
-
const newObj = { ...
|
|
951
|
+
const bKeys = util.objectKeys(b);
|
|
952
|
+
const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
953
|
+
const newObj = { ...a, ...b };
|
|
1911
954
|
for (const key of sharedKeys) {
|
|
1912
|
-
const sharedValue = mergeValues(
|
|
955
|
+
const sharedValue = mergeValues(a[key], b[key]);
|
|
1913
956
|
if (!sharedValue.valid) {
|
|
1914
957
|
return { valid: false };
|
|
1915
958
|
}
|
|
@@ -1917,13 +960,13 @@ function mergeValues(a3, b3) {
|
|
|
1917
960
|
}
|
|
1918
961
|
return { valid: true, data: newObj };
|
|
1919
962
|
} else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
|
|
1920
|
-
if (
|
|
963
|
+
if (a.length !== b.length) {
|
|
1921
964
|
return { valid: false };
|
|
1922
965
|
}
|
|
1923
966
|
const newArray = [];
|
|
1924
|
-
for (let index = 0;index <
|
|
1925
|
-
const itemA =
|
|
1926
|
-
const itemB =
|
|
967
|
+
for (let index = 0;index < a.length; index++) {
|
|
968
|
+
const itemA = a[index];
|
|
969
|
+
const itemB = b[index];
|
|
1927
970
|
const sharedValue = mergeValues(itemA, itemB);
|
|
1928
971
|
if (!sharedValue.valid) {
|
|
1929
972
|
return { valid: false };
|
|
@@ -1931,8 +974,8 @@ function mergeValues(a3, b3) {
|
|
|
1931
974
|
newArray.push(sharedValue.data);
|
|
1932
975
|
}
|
|
1933
976
|
return { valid: true, data: newArray };
|
|
1934
|
-
} else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +
|
|
1935
|
-
return { valid: true, data:
|
|
977
|
+
} else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
|
|
978
|
+
return { valid: true, data: a };
|
|
1936
979
|
} else {
|
|
1937
980
|
return { valid: false };
|
|
1938
981
|
}
|
|
@@ -1952,17 +995,17 @@ function cleanParams(params, data) {
|
|
|
1952
995
|
function custom(check, _params = {}, fatal) {
|
|
1953
996
|
if (check)
|
|
1954
997
|
return ZodAny.create().superRefine((data, ctx) => {
|
|
1955
|
-
const
|
|
1956
|
-
if (
|
|
1957
|
-
return
|
|
1958
|
-
if (!
|
|
998
|
+
const r = check(data);
|
|
999
|
+
if (r instanceof Promise) {
|
|
1000
|
+
return r.then((r2) => {
|
|
1001
|
+
if (!r2) {
|
|
1959
1002
|
const params = cleanParams(_params, data);
|
|
1960
1003
|
const _fatal = params.fatal ?? fatal ?? true;
|
|
1961
1004
|
ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
|
|
1962
1005
|
}
|
|
1963
1006
|
});
|
|
1964
1007
|
}
|
|
1965
|
-
if (!
|
|
1008
|
+
if (!r) {
|
|
1966
1009
|
const params = cleanParams(_params, data);
|
|
1967
1010
|
const _fatal = params.fatal ?? fatal ?? true;
|
|
1968
1011
|
ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
|
|
@@ -3858,7 +2901,7 @@ var init_types = __esm(() => {
|
|
|
3858
2901
|
if (!schema)
|
|
3859
2902
|
return null;
|
|
3860
2903
|
return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
|
|
3861
|
-
}).filter((
|
|
2904
|
+
}).filter((x) => !!x);
|
|
3862
2905
|
if (ctx.common.async) {
|
|
3863
2906
|
return Promise.all(items).then((results) => {
|
|
3864
2907
|
return ParseStatus.mergeArray(status, results);
|
|
@@ -4111,7 +3154,7 @@ var init_types = __esm(() => {
|
|
|
4111
3154
|
return makeIssue({
|
|
4112
3155
|
data: args,
|
|
4113
3156
|
path: ctx.path,
|
|
4114
|
-
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((
|
|
3157
|
+
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
|
|
4115
3158
|
issueData: {
|
|
4116
3159
|
code: ZodIssueCode.invalid_arguments,
|
|
4117
3160
|
argumentsError: error
|
|
@@ -4122,7 +3165,7 @@ var init_types = __esm(() => {
|
|
|
4122
3165
|
return makeIssue({
|
|
4123
3166
|
data: returns,
|
|
4124
3167
|
path: ctx.path,
|
|
4125
|
-
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((
|
|
3168
|
+
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
|
|
4126
3169
|
issueData: {
|
|
4127
3170
|
code: ZodIssueCode.invalid_return_type,
|
|
4128
3171
|
returnTypeError: error
|
|
@@ -4132,29 +3175,29 @@ var init_types = __esm(() => {
|
|
|
4132
3175
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
4133
3176
|
const fn = ctx.data;
|
|
4134
3177
|
if (this._def.returns instanceof ZodPromise) {
|
|
4135
|
-
const
|
|
3178
|
+
const me = this;
|
|
4136
3179
|
return OK(async function(...args) {
|
|
4137
3180
|
const error = new ZodError([]);
|
|
4138
|
-
const parsedArgs = await
|
|
4139
|
-
error.addIssue(makeArgsIssue(args,
|
|
3181
|
+
const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
|
|
3182
|
+
error.addIssue(makeArgsIssue(args, e));
|
|
4140
3183
|
throw error;
|
|
4141
3184
|
});
|
|
4142
3185
|
const result = await Reflect.apply(fn, this, parsedArgs);
|
|
4143
|
-
const parsedReturns = await
|
|
4144
|
-
error.addIssue(makeReturnsIssue(result,
|
|
3186
|
+
const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
3187
|
+
error.addIssue(makeReturnsIssue(result, e));
|
|
4145
3188
|
throw error;
|
|
4146
3189
|
});
|
|
4147
3190
|
return parsedReturns;
|
|
4148
3191
|
});
|
|
4149
3192
|
} else {
|
|
4150
|
-
const
|
|
3193
|
+
const me = this;
|
|
4151
3194
|
return OK(function(...args) {
|
|
4152
|
-
const parsedArgs =
|
|
3195
|
+
const parsedArgs = me._def.args.safeParse(args, params);
|
|
4153
3196
|
if (!parsedArgs.success) {
|
|
4154
3197
|
throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
4155
3198
|
}
|
|
4156
3199
|
const result = Reflect.apply(fn, this, parsedArgs.data);
|
|
4157
|
-
const parsedReturns =
|
|
3200
|
+
const parsedReturns = me._def.returns.safeParse(result, params);
|
|
4158
3201
|
if (!parsedReturns.success) {
|
|
4159
3202
|
throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
4160
3203
|
}
|
|
@@ -4709,10 +3752,10 @@ var init_types = __esm(() => {
|
|
|
4709
3752
|
}
|
|
4710
3753
|
}
|
|
4711
3754
|
}
|
|
4712
|
-
static create(
|
|
3755
|
+
static create(a, b) {
|
|
4713
3756
|
return new ZodPipeline({
|
|
4714
|
-
in:
|
|
4715
|
-
out:
|
|
3757
|
+
in: a,
|
|
3758
|
+
out: b,
|
|
4716
3759
|
typeName: ZodFirstPartyTypeKind.ZodPipeline
|
|
4717
3760
|
});
|
|
4718
3761
|
}
|
|
@@ -4953,6 +3996,76 @@ var init_zod = __esm(() => {
|
|
|
4953
3996
|
init_external();
|
|
4954
3997
|
});
|
|
4955
3998
|
|
|
3999
|
+
// node_modules/picocolors/picocolors.js
|
|
4000
|
+
var require_picocolors = __commonJS((exports, module) => {
|
|
4001
|
+
var p = process || {};
|
|
4002
|
+
var argv = p.argv || [];
|
|
4003
|
+
var env = p.env || {};
|
|
4004
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
4005
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
4006
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
4007
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
4008
|
+
};
|
|
4009
|
+
var replaceClose = (string, close, replace, index) => {
|
|
4010
|
+
let result = "", cursor = 0;
|
|
4011
|
+
do {
|
|
4012
|
+
result += string.substring(cursor, index) + replace;
|
|
4013
|
+
cursor = index + close.length;
|
|
4014
|
+
index = string.indexOf(close, cursor);
|
|
4015
|
+
} while (~index);
|
|
4016
|
+
return result + string.substring(cursor);
|
|
4017
|
+
};
|
|
4018
|
+
var createColors = (enabled = isColorSupported) => {
|
|
4019
|
+
let f = enabled ? formatter : () => String;
|
|
4020
|
+
return {
|
|
4021
|
+
isColorSupported: enabled,
|
|
4022
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
4023
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
4024
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
4025
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
4026
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
4027
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
4028
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
4029
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
4030
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
4031
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
4032
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
4033
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
4034
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
4035
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
4036
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
4037
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
4038
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
4039
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
4040
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
4041
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
4042
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
4043
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
4044
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
4045
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
4046
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
4047
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
4048
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
4049
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
4050
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
4051
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
4052
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
4053
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
4054
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
4055
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
4056
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
4057
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
4058
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
4059
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
4060
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
4061
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
4062
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
4063
|
+
};
|
|
4064
|
+
};
|
|
4065
|
+
module.exports = createColors();
|
|
4066
|
+
module.exports.createColors = createColors;
|
|
4067
|
+
});
|
|
4068
|
+
|
|
4956
4069
|
// src/utils/logger.ts
|
|
4957
4070
|
import { createWriteStream } from "node:fs";
|
|
4958
4071
|
|
|
@@ -4960,20 +4073,20 @@ class Logger {
|
|
|
4960
4073
|
verboseEnabled = false;
|
|
4961
4074
|
logFileStream;
|
|
4962
4075
|
info(message) {
|
|
4963
|
-
console.log(
|
|
4076
|
+
console.log(import_picocolors.default.blue(symbols.info), message);
|
|
4964
4077
|
}
|
|
4965
4078
|
success(message) {
|
|
4966
|
-
console.log(
|
|
4079
|
+
console.log(import_picocolors.default.green(symbols.success), message);
|
|
4967
4080
|
}
|
|
4968
4081
|
warning(message) {
|
|
4969
|
-
console.log(
|
|
4082
|
+
console.log(import_picocolors.default.yellow(symbols.warning), message);
|
|
4970
4083
|
}
|
|
4971
4084
|
error(message) {
|
|
4972
|
-
console.error(
|
|
4085
|
+
console.error(import_picocolors.default.red(symbols.error), message);
|
|
4973
4086
|
}
|
|
4974
4087
|
debug(message) {
|
|
4975
4088
|
if (process.env.DEBUG) {
|
|
4976
|
-
console.log(
|
|
4089
|
+
console.log(import_picocolors.default.gray("[DEBUG]"), message);
|
|
4977
4090
|
}
|
|
4978
4091
|
}
|
|
4979
4092
|
verbose(message, context) {
|
|
@@ -4982,7 +4095,7 @@ class Logger {
|
|
|
4982
4095
|
const timestamp = this.getTimestamp();
|
|
4983
4096
|
const sanitizedMessage = this.sanitize(message);
|
|
4984
4097
|
const formattedContext = context ? this.formatContext(context) : "";
|
|
4985
|
-
const logLine = `${timestamp} ${
|
|
4098
|
+
const logLine = `${timestamp} ${import_picocolors.default.gray("[VERBOSE]")} ${sanitizedMessage}${formattedContext}`;
|
|
4986
4099
|
console.error(logLine);
|
|
4987
4100
|
if (this.logFileStream) {
|
|
4988
4101
|
const plainLogLine = `${timestamp} [VERBOSE] ${sanitizedMessage}${formattedContext}`;
|
|
@@ -5041,9 +4154,9 @@ class Logger {
|
|
|
5041
4154
|
`)}`;
|
|
5042
4155
|
}
|
|
5043
4156
|
}
|
|
5044
|
-
var
|
|
4157
|
+
var import_picocolors, symbols, logger;
|
|
5045
4158
|
var init_logger = __esm(() => {
|
|
5046
|
-
|
|
4159
|
+
import_picocolors = __toESM(require_picocolors(), 1);
|
|
5047
4160
|
symbols = {
|
|
5048
4161
|
info: "[i]",
|
|
5049
4162
|
success: "[+]",
|
|
@@ -5074,7 +4187,7 @@ var require_universalify = __commonJS((exports) => {
|
|
|
5074
4187
|
return fn.apply(this, args);
|
|
5075
4188
|
else {
|
|
5076
4189
|
args.pop();
|
|
5077
|
-
fn.apply(this, args).then((
|
|
4190
|
+
fn.apply(this, args).then((r) => cb(null, r), cb);
|
|
5078
4191
|
}
|
|
5079
4192
|
}, "name", { value: fn.name });
|
|
5080
4193
|
};
|
|
@@ -5096,9 +4209,9 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
5096
4209
|
} catch (er) {}
|
|
5097
4210
|
if (typeof process.chdir === "function") {
|
|
5098
4211
|
chdir = process.chdir;
|
|
5099
|
-
process.chdir = function(
|
|
4212
|
+
process.chdir = function(d) {
|
|
5100
4213
|
cwd = null;
|
|
5101
|
-
chdir.call(process,
|
|
4214
|
+
chdir.call(process, d);
|
|
5102
4215
|
};
|
|
5103
4216
|
if (Object.setPrototypeOf)
|
|
5104
4217
|
Object.setPrototypeOf(process.chdir, chdir);
|
|
@@ -5177,7 +4290,7 @@ var require_polyfills = __commonJS((exports, module) => {
|
|
|
5177
4290
|
var callback;
|
|
5178
4291
|
if (callback_ && typeof callback_ === "function") {
|
|
5179
4292
|
var eagCounter = 0;
|
|
5180
|
-
callback = function(er,
|
|
4293
|
+
callback = function(er, _, __) {
|
|
5181
4294
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
5182
4295
|
eagCounter++;
|
|
5183
4296
|
return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
|
|
@@ -5529,10 +4642,10 @@ var require_graceful_fs = __commonJS((exports, module) => {
|
|
|
5529
4642
|
debug = util3.debuglog("gfs4");
|
|
5530
4643
|
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
|
5531
4644
|
debug = function() {
|
|
5532
|
-
var
|
|
5533
|
-
|
|
4645
|
+
var m = util3.format.apply(util3, arguments);
|
|
4646
|
+
m = "GFS4: " + m.split(/\n/).join(`
|
|
5534
4647
|
GFS4: `);
|
|
5535
|
-
console.error(
|
|
4648
|
+
console.error(m);
|
|
5536
4649
|
};
|
|
5537
4650
|
if (!fs2[gracefulQueue]) {
|
|
5538
4651
|
queue = global[gracefulQueue] || [];
|
|
@@ -6052,8 +5165,8 @@ var require_utimes = __commonJS((exports, module) => {
|
|
|
6052
5165
|
} finally {
|
|
6053
5166
|
try {
|
|
6054
5167
|
await fs2.close(fd);
|
|
6055
|
-
} catch (
|
|
6056
|
-
closeErr =
|
|
5168
|
+
} catch (e) {
|
|
5169
|
+
closeErr = e;
|
|
6057
5170
|
}
|
|
6058
5171
|
}
|
|
6059
5172
|
if (closeErr) {
|
|
@@ -6328,10 +5441,10 @@ var require_copy = __commonJS((exports, module) => {
|
|
|
6328
5441
|
let resolvedDest = null;
|
|
6329
5442
|
try {
|
|
6330
5443
|
resolvedDest = await fs2.readlink(dest);
|
|
6331
|
-
} catch (
|
|
6332
|
-
if (
|
|
5444
|
+
} catch (e) {
|
|
5445
|
+
if (e.code === "EINVAL" || e.code === "UNKNOWN")
|
|
6333
5446
|
return fs2.symlink(resolvedSrc, dest);
|
|
6334
|
-
throw
|
|
5447
|
+
throw e;
|
|
6335
5448
|
}
|
|
6336
5449
|
if (opts.dereference) {
|
|
6337
5450
|
resolvedDest = path.resolve(process.cwd(), resolvedDest);
|
|
@@ -6827,669 +5940,1556 @@ var require_symlink = __commonJS((exports, module) => {
|
|
|
6827
5940
|
createSymlink: u(createSymlink),
|
|
6828
5941
|
createSymlinkSync
|
|
6829
5942
|
};
|
|
6830
|
-
});
|
|
6831
|
-
|
|
6832
|
-
// node_modules/fs-extra/lib/ensure/index.js
|
|
6833
|
-
var require_ensure = __commonJS((exports, module) => {
|
|
6834
|
-
var { createFile, createFileSync } = require_file();
|
|
6835
|
-
var { createLink, createLinkSync } = require_link();
|
|
6836
|
-
var { createSymlink, createSymlinkSync } = require_symlink();
|
|
6837
|
-
module.exports = {
|
|
6838
|
-
createFile,
|
|
6839
|
-
createFileSync,
|
|
6840
|
-
ensureFile: createFile,
|
|
6841
|
-
ensureFileSync: createFileSync,
|
|
6842
|
-
createLink,
|
|
6843
|
-
createLinkSync,
|
|
6844
|
-
ensureLink: createLink,
|
|
6845
|
-
ensureLinkSync: createLinkSync,
|
|
6846
|
-
createSymlink,
|
|
6847
|
-
createSymlinkSync,
|
|
6848
|
-
ensureSymlink: createSymlink,
|
|
6849
|
-
ensureSymlinkSync: createSymlinkSync
|
|
5943
|
+
});
|
|
5944
|
+
|
|
5945
|
+
// node_modules/fs-extra/lib/ensure/index.js
|
|
5946
|
+
var require_ensure = __commonJS((exports, module) => {
|
|
5947
|
+
var { createFile, createFileSync } = require_file();
|
|
5948
|
+
var { createLink, createLinkSync } = require_link();
|
|
5949
|
+
var { createSymlink, createSymlinkSync } = require_symlink();
|
|
5950
|
+
module.exports = {
|
|
5951
|
+
createFile,
|
|
5952
|
+
createFileSync,
|
|
5953
|
+
ensureFile: createFile,
|
|
5954
|
+
ensureFileSync: createFileSync,
|
|
5955
|
+
createLink,
|
|
5956
|
+
createLinkSync,
|
|
5957
|
+
ensureLink: createLink,
|
|
5958
|
+
ensureLinkSync: createLinkSync,
|
|
5959
|
+
createSymlink,
|
|
5960
|
+
createSymlinkSync,
|
|
5961
|
+
ensureSymlink: createSymlink,
|
|
5962
|
+
ensureSymlinkSync: createSymlinkSync
|
|
5963
|
+
};
|
|
5964
|
+
});
|
|
5965
|
+
|
|
5966
|
+
// node_modules/jsonfile/utils.js
|
|
5967
|
+
var require_utils2 = __commonJS((exports, module) => {
|
|
5968
|
+
function stringify(obj, { EOL = `
|
|
5969
|
+
`, finalEOL = true, replacer = null, spaces } = {}) {
|
|
5970
|
+
const EOF = finalEOL ? EOL : "";
|
|
5971
|
+
const str = JSON.stringify(obj, replacer, spaces);
|
|
5972
|
+
return str.replace(/\n/g, EOL) + EOF;
|
|
5973
|
+
}
|
|
5974
|
+
function stripBom(content) {
|
|
5975
|
+
if (Buffer.isBuffer(content))
|
|
5976
|
+
content = content.toString("utf8");
|
|
5977
|
+
return content.replace(/^\uFEFF/, "");
|
|
5978
|
+
}
|
|
5979
|
+
module.exports = { stringify, stripBom };
|
|
5980
|
+
});
|
|
5981
|
+
|
|
5982
|
+
// node_modules/jsonfile/index.js
|
|
5983
|
+
var require_jsonfile = __commonJS((exports, module) => {
|
|
5984
|
+
var _fs;
|
|
5985
|
+
try {
|
|
5986
|
+
_fs = require_graceful_fs();
|
|
5987
|
+
} catch (_) {
|
|
5988
|
+
_fs = __require("fs");
|
|
5989
|
+
}
|
|
5990
|
+
var universalify = require_universalify();
|
|
5991
|
+
var { stringify, stripBom } = require_utils2();
|
|
5992
|
+
async function _readFile(file, options = {}) {
|
|
5993
|
+
if (typeof options === "string") {
|
|
5994
|
+
options = { encoding: options };
|
|
5995
|
+
}
|
|
5996
|
+
const fs2 = options.fs || _fs;
|
|
5997
|
+
const shouldThrow = "throws" in options ? options.throws : true;
|
|
5998
|
+
let data = await universalify.fromCallback(fs2.readFile)(file, options);
|
|
5999
|
+
data = stripBom(data);
|
|
6000
|
+
let obj;
|
|
6001
|
+
try {
|
|
6002
|
+
obj = JSON.parse(data, options ? options.reviver : null);
|
|
6003
|
+
} catch (err) {
|
|
6004
|
+
if (shouldThrow) {
|
|
6005
|
+
err.message = `${file}: ${err.message}`;
|
|
6006
|
+
throw err;
|
|
6007
|
+
} else {
|
|
6008
|
+
return null;
|
|
6009
|
+
}
|
|
6010
|
+
}
|
|
6011
|
+
return obj;
|
|
6012
|
+
}
|
|
6013
|
+
var readFile = universalify.fromPromise(_readFile);
|
|
6014
|
+
function readFileSync2(file, options = {}) {
|
|
6015
|
+
if (typeof options === "string") {
|
|
6016
|
+
options = { encoding: options };
|
|
6017
|
+
}
|
|
6018
|
+
const fs2 = options.fs || _fs;
|
|
6019
|
+
const shouldThrow = "throws" in options ? options.throws : true;
|
|
6020
|
+
try {
|
|
6021
|
+
let content = fs2.readFileSync(file, options);
|
|
6022
|
+
content = stripBom(content);
|
|
6023
|
+
return JSON.parse(content, options.reviver);
|
|
6024
|
+
} catch (err) {
|
|
6025
|
+
if (shouldThrow) {
|
|
6026
|
+
err.message = `${file}: ${err.message}`;
|
|
6027
|
+
throw err;
|
|
6028
|
+
} else {
|
|
6029
|
+
return null;
|
|
6030
|
+
}
|
|
6031
|
+
}
|
|
6032
|
+
}
|
|
6033
|
+
async function _writeFile(file, obj, options = {}) {
|
|
6034
|
+
const fs2 = options.fs || _fs;
|
|
6035
|
+
const str = stringify(obj, options);
|
|
6036
|
+
await universalify.fromCallback(fs2.writeFile)(file, str, options);
|
|
6037
|
+
}
|
|
6038
|
+
var writeFile = universalify.fromPromise(_writeFile);
|
|
6039
|
+
function writeFileSync(file, obj, options = {}) {
|
|
6040
|
+
const fs2 = options.fs || _fs;
|
|
6041
|
+
const str = stringify(obj, options);
|
|
6042
|
+
return fs2.writeFileSync(file, str, options);
|
|
6043
|
+
}
|
|
6044
|
+
module.exports = {
|
|
6045
|
+
readFile,
|
|
6046
|
+
readFileSync: readFileSync2,
|
|
6047
|
+
writeFile,
|
|
6048
|
+
writeFileSync
|
|
6049
|
+
};
|
|
6050
|
+
});
|
|
6051
|
+
|
|
6052
|
+
// node_modules/fs-extra/lib/json/jsonfile.js
|
|
6053
|
+
var require_jsonfile2 = __commonJS((exports, module) => {
|
|
6054
|
+
var jsonFile = require_jsonfile();
|
|
6055
|
+
module.exports = {
|
|
6056
|
+
readJson: jsonFile.readFile,
|
|
6057
|
+
readJsonSync: jsonFile.readFileSync,
|
|
6058
|
+
writeJson: jsonFile.writeFile,
|
|
6059
|
+
writeJsonSync: jsonFile.writeFileSync
|
|
6060
|
+
};
|
|
6061
|
+
});
|
|
6062
|
+
|
|
6063
|
+
// node_modules/fs-extra/lib/output-file/index.js
|
|
6064
|
+
var require_output_file = __commonJS((exports, module) => {
|
|
6065
|
+
var u = require_universalify().fromPromise;
|
|
6066
|
+
var fs2 = require_fs();
|
|
6067
|
+
var path = __require("path");
|
|
6068
|
+
var mkdir = require_mkdirs();
|
|
6069
|
+
var pathExists = require_path_exists().pathExists;
|
|
6070
|
+
async function outputFile(file, data, encoding = "utf-8") {
|
|
6071
|
+
const dir = path.dirname(file);
|
|
6072
|
+
if (!await pathExists(dir)) {
|
|
6073
|
+
await mkdir.mkdirs(dir);
|
|
6074
|
+
}
|
|
6075
|
+
return fs2.writeFile(file, data, encoding);
|
|
6076
|
+
}
|
|
6077
|
+
function outputFileSync(file, ...args) {
|
|
6078
|
+
const dir = path.dirname(file);
|
|
6079
|
+
if (!fs2.existsSync(dir)) {
|
|
6080
|
+
mkdir.mkdirsSync(dir);
|
|
6081
|
+
}
|
|
6082
|
+
fs2.writeFileSync(file, ...args);
|
|
6083
|
+
}
|
|
6084
|
+
module.exports = {
|
|
6085
|
+
outputFile: u(outputFile),
|
|
6086
|
+
outputFileSync
|
|
6087
|
+
};
|
|
6088
|
+
});
|
|
6089
|
+
|
|
6090
|
+
// node_modules/fs-extra/lib/json/output-json.js
|
|
6091
|
+
var require_output_json = __commonJS((exports, module) => {
|
|
6092
|
+
var { stringify } = require_utils2();
|
|
6093
|
+
var { outputFile } = require_output_file();
|
|
6094
|
+
async function outputJson(file, data, options = {}) {
|
|
6095
|
+
const str = stringify(data, options);
|
|
6096
|
+
await outputFile(file, str, options);
|
|
6097
|
+
}
|
|
6098
|
+
module.exports = outputJson;
|
|
6099
|
+
});
|
|
6100
|
+
|
|
6101
|
+
// node_modules/fs-extra/lib/json/output-json-sync.js
|
|
6102
|
+
var require_output_json_sync = __commonJS((exports, module) => {
|
|
6103
|
+
var { stringify } = require_utils2();
|
|
6104
|
+
var { outputFileSync } = require_output_file();
|
|
6105
|
+
function outputJsonSync(file, data, options) {
|
|
6106
|
+
const str = stringify(data, options);
|
|
6107
|
+
outputFileSync(file, str, options);
|
|
6108
|
+
}
|
|
6109
|
+
module.exports = outputJsonSync;
|
|
6110
|
+
});
|
|
6111
|
+
|
|
6112
|
+
// node_modules/fs-extra/lib/json/index.js
|
|
6113
|
+
var require_json = __commonJS((exports, module) => {
|
|
6114
|
+
var u = require_universalify().fromPromise;
|
|
6115
|
+
var jsonFile = require_jsonfile2();
|
|
6116
|
+
jsonFile.outputJson = u(require_output_json());
|
|
6117
|
+
jsonFile.outputJsonSync = require_output_json_sync();
|
|
6118
|
+
jsonFile.outputJSON = jsonFile.outputJson;
|
|
6119
|
+
jsonFile.outputJSONSync = jsonFile.outputJsonSync;
|
|
6120
|
+
jsonFile.writeJSON = jsonFile.writeJson;
|
|
6121
|
+
jsonFile.writeJSONSync = jsonFile.writeJsonSync;
|
|
6122
|
+
jsonFile.readJSON = jsonFile.readJson;
|
|
6123
|
+
jsonFile.readJSONSync = jsonFile.readJsonSync;
|
|
6124
|
+
module.exports = jsonFile;
|
|
6125
|
+
});
|
|
6126
|
+
|
|
6127
|
+
// node_modules/fs-extra/lib/move/move.js
|
|
6128
|
+
var require_move = __commonJS((exports, module) => {
|
|
6129
|
+
var fs2 = require_fs();
|
|
6130
|
+
var path = __require("path");
|
|
6131
|
+
var { copy } = require_copy2();
|
|
6132
|
+
var { remove } = require_remove();
|
|
6133
|
+
var { mkdirp } = require_mkdirs();
|
|
6134
|
+
var { pathExists } = require_path_exists();
|
|
6135
|
+
var stat = require_stat();
|
|
6136
|
+
async function move(src, dest, opts = {}) {
|
|
6137
|
+
const overwrite = opts.overwrite || opts.clobber || false;
|
|
6138
|
+
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
6139
|
+
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
6140
|
+
const destParent = path.dirname(dest);
|
|
6141
|
+
const parsedParentPath = path.parse(destParent);
|
|
6142
|
+
if (parsedParentPath.root !== destParent) {
|
|
6143
|
+
await mkdirp(destParent);
|
|
6144
|
+
}
|
|
6145
|
+
return doRename(src, dest, overwrite, isChangingCase);
|
|
6146
|
+
}
|
|
6147
|
+
async function doRename(src, dest, overwrite, isChangingCase) {
|
|
6148
|
+
if (!isChangingCase) {
|
|
6149
|
+
if (overwrite) {
|
|
6150
|
+
await remove(dest);
|
|
6151
|
+
} else if (await pathExists(dest)) {
|
|
6152
|
+
throw new Error("dest already exists.");
|
|
6153
|
+
}
|
|
6154
|
+
}
|
|
6155
|
+
try {
|
|
6156
|
+
await fs2.rename(src, dest);
|
|
6157
|
+
} catch (err) {
|
|
6158
|
+
if (err.code !== "EXDEV") {
|
|
6159
|
+
throw err;
|
|
6160
|
+
}
|
|
6161
|
+
await moveAcrossDevice(src, dest, overwrite);
|
|
6162
|
+
}
|
|
6163
|
+
}
|
|
6164
|
+
async function moveAcrossDevice(src, dest, overwrite) {
|
|
6165
|
+
const opts = {
|
|
6166
|
+
overwrite,
|
|
6167
|
+
errorOnExist: true,
|
|
6168
|
+
preserveTimestamps: true
|
|
6169
|
+
};
|
|
6170
|
+
await copy(src, dest, opts);
|
|
6171
|
+
return remove(src);
|
|
6172
|
+
}
|
|
6173
|
+
module.exports = move;
|
|
6174
|
+
});
|
|
6175
|
+
|
|
6176
|
+
// node_modules/fs-extra/lib/move/move-sync.js
|
|
6177
|
+
var require_move_sync = __commonJS((exports, module) => {
|
|
6178
|
+
var fs2 = require_graceful_fs();
|
|
6179
|
+
var path = __require("path");
|
|
6180
|
+
var copySync = require_copy2().copySync;
|
|
6181
|
+
var removeSync = require_remove().removeSync;
|
|
6182
|
+
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
6183
|
+
var stat = require_stat();
|
|
6184
|
+
function moveSync(src, dest, opts) {
|
|
6185
|
+
opts = opts || {};
|
|
6186
|
+
const overwrite = opts.overwrite || opts.clobber || false;
|
|
6187
|
+
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
6188
|
+
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
6189
|
+
if (!isParentRoot(dest))
|
|
6190
|
+
mkdirpSync(path.dirname(dest));
|
|
6191
|
+
return doRename(src, dest, overwrite, isChangingCase);
|
|
6192
|
+
}
|
|
6193
|
+
function isParentRoot(dest) {
|
|
6194
|
+
const parent = path.dirname(dest);
|
|
6195
|
+
const parsedPath = path.parse(parent);
|
|
6196
|
+
return parsedPath.root === parent;
|
|
6197
|
+
}
|
|
6198
|
+
function doRename(src, dest, overwrite, isChangingCase) {
|
|
6199
|
+
if (isChangingCase)
|
|
6200
|
+
return rename(src, dest, overwrite);
|
|
6201
|
+
if (overwrite) {
|
|
6202
|
+
removeSync(dest);
|
|
6203
|
+
return rename(src, dest, overwrite);
|
|
6204
|
+
}
|
|
6205
|
+
if (fs2.existsSync(dest))
|
|
6206
|
+
throw new Error("dest already exists.");
|
|
6207
|
+
return rename(src, dest, overwrite);
|
|
6208
|
+
}
|
|
6209
|
+
function rename(src, dest, overwrite) {
|
|
6210
|
+
try {
|
|
6211
|
+
fs2.renameSync(src, dest);
|
|
6212
|
+
} catch (err) {
|
|
6213
|
+
if (err.code !== "EXDEV")
|
|
6214
|
+
throw err;
|
|
6215
|
+
return moveAcrossDevice(src, dest, overwrite);
|
|
6216
|
+
}
|
|
6217
|
+
}
|
|
6218
|
+
function moveAcrossDevice(src, dest, overwrite) {
|
|
6219
|
+
const opts = {
|
|
6220
|
+
overwrite,
|
|
6221
|
+
errorOnExist: true,
|
|
6222
|
+
preserveTimestamps: true
|
|
6223
|
+
};
|
|
6224
|
+
copySync(src, dest, opts);
|
|
6225
|
+
return removeSync(src);
|
|
6226
|
+
}
|
|
6227
|
+
module.exports = moveSync;
|
|
6228
|
+
});
|
|
6229
|
+
|
|
6230
|
+
// node_modules/fs-extra/lib/move/index.js
|
|
6231
|
+
var require_move2 = __commonJS((exports, module) => {
|
|
6232
|
+
var u = require_universalify().fromPromise;
|
|
6233
|
+
module.exports = {
|
|
6234
|
+
move: u(require_move()),
|
|
6235
|
+
moveSync: require_move_sync()
|
|
6236
|
+
};
|
|
6237
|
+
});
|
|
6238
|
+
|
|
6239
|
+
// node_modules/fs-extra/lib/index.js
|
|
6240
|
+
var require_lib = __commonJS((exports, module) => {
|
|
6241
|
+
module.exports = {
|
|
6242
|
+
...require_fs(),
|
|
6243
|
+
...require_copy2(),
|
|
6244
|
+
...require_empty(),
|
|
6245
|
+
...require_ensure(),
|
|
6246
|
+
...require_json(),
|
|
6247
|
+
...require_mkdirs(),
|
|
6248
|
+
...require_move2(),
|
|
6249
|
+
...require_output_file(),
|
|
6250
|
+
...require_path_exists(),
|
|
6251
|
+
...require_remove()
|
|
6252
|
+
};
|
|
6253
|
+
});
|
|
6254
|
+
|
|
6255
|
+
// src/types.ts
|
|
6256
|
+
var exports_types = {};
|
|
6257
|
+
__export(exports_types, {
|
|
6258
|
+
VersionCommandOptionsSchema: () => VersionCommandOptionsSchema,
|
|
6259
|
+
UpdateCommandOptionsSchema: () => UpdateCommandOptionsSchema,
|
|
6260
|
+
UpdateCliOptionsSchema: () => UpdateCliOptionsSchema,
|
|
6261
|
+
UninstallCommandOptionsSchema: () => UninstallCommandOptionsSchema,
|
|
6262
|
+
USER_CONFIG_PATTERNS: () => USER_CONFIG_PATTERNS,
|
|
6263
|
+
TrackedFileSchema: () => TrackedFileSchema,
|
|
6264
|
+
SkillsMigrationError: () => SkillsMigrationError,
|
|
6265
|
+
SkillsManifestSchema: () => SkillsManifestSchema,
|
|
6266
|
+
PROTECTED_PATTERNS: () => PROTECTED_PATTERNS,
|
|
6267
|
+
NewCommandOptionsSchema: () => NewCommandOptionsSchema,
|
|
6268
|
+
NEVER_COPY_PATTERNS: () => NEVER_COPY_PATTERNS,
|
|
6269
|
+
MetadataSchema: () => MetadataSchema,
|
|
6270
|
+
KitType: () => KitType,
|
|
6271
|
+
KitConfigSchema: () => KitConfigSchema,
|
|
6272
|
+
GitHubReleaseSchema: () => GitHubReleaseSchema,
|
|
6273
|
+
GitHubReleaseAssetSchema: () => GitHubReleaseAssetSchema,
|
|
6274
|
+
GitHubError: () => GitHubError,
|
|
6275
|
+
FoldersConfigSchema: () => FoldersConfigSchema,
|
|
6276
|
+
ExtractionError: () => ExtractionError,
|
|
6277
|
+
ExcludePatternSchema: () => ExcludePatternSchema,
|
|
6278
|
+
DownloadError: () => DownloadError,
|
|
6279
|
+
DEFAULT_FOLDERS: () => DEFAULT_FOLDERS,
|
|
6280
|
+
ConfigSchema: () => ConfigSchema,
|
|
6281
|
+
ClaudeKitError: () => ClaudeKitError,
|
|
6282
|
+
AuthenticationError: () => AuthenticationError,
|
|
6283
|
+
AVAILABLE_KITS: () => AVAILABLE_KITS
|
|
6284
|
+
});
|
|
6285
|
+
var KitType, ExcludePatternSchema, FoldersConfigSchema, DEFAULT_FOLDERS, NewCommandOptionsSchema, UpdateCommandOptionsSchema, VersionCommandOptionsSchema, UninstallCommandOptionsSchema, UpdateCliOptionsSchema, TrackedFileSchema, MetadataSchema, ConfigSchema, GitHubReleaseAssetSchema, GitHubReleaseSchema, KitConfigSchema, AVAILABLE_KITS, NEVER_COPY_PATTERNS, USER_CONFIG_PATTERNS, PROTECTED_PATTERNS, ClaudeKitError, AuthenticationError, GitHubError, DownloadError, ExtractionError, SkillsManifestSchema, SkillsMigrationError;
|
|
6286
|
+
var init_types2 = __esm(() => {
|
|
6287
|
+
init_zod();
|
|
6288
|
+
KitType = exports_external.enum(["engineer", "marketing"]);
|
|
6289
|
+
ExcludePatternSchema = exports_external.string().trim().min(1, "Exclude pattern cannot be empty").max(500, "Exclude pattern too long").refine((val) => !val.startsWith("/"), "Absolute paths not allowed in exclude patterns").refine((val) => !val.includes(".."), "Path traversal not allowed in exclude patterns");
|
|
6290
|
+
FoldersConfigSchema = exports_external.object({
|
|
6291
|
+
docs: exports_external.string().optional(),
|
|
6292
|
+
plans: exports_external.string().optional()
|
|
6293
|
+
});
|
|
6294
|
+
DEFAULT_FOLDERS = {
|
|
6295
|
+
docs: "docs",
|
|
6296
|
+
plans: "plans"
|
|
6297
|
+
};
|
|
6298
|
+
NewCommandOptionsSchema = exports_external.object({
|
|
6299
|
+
dir: exports_external.string().default("."),
|
|
6300
|
+
kit: KitType.optional(),
|
|
6301
|
+
release: exports_external.string().optional(),
|
|
6302
|
+
force: exports_external.boolean().default(false),
|
|
6303
|
+
exclude: exports_external.array(ExcludePatternSchema).optional().default([]),
|
|
6304
|
+
opencode: exports_external.boolean().default(false),
|
|
6305
|
+
gemini: exports_external.boolean().default(false),
|
|
6306
|
+
installSkills: exports_external.boolean().default(false),
|
|
6307
|
+
prefix: exports_external.boolean().default(false),
|
|
6308
|
+
beta: exports_external.boolean().default(false),
|
|
6309
|
+
dryRun: exports_external.boolean().default(false),
|
|
6310
|
+
refresh: exports_external.boolean().default(false),
|
|
6311
|
+
docsDir: exports_external.string().optional(),
|
|
6312
|
+
plansDir: exports_external.string().optional()
|
|
6313
|
+
});
|
|
6314
|
+
UpdateCommandOptionsSchema = exports_external.object({
|
|
6315
|
+
dir: exports_external.string().default("."),
|
|
6316
|
+
kit: KitType.optional(),
|
|
6317
|
+
release: exports_external.string().optional(),
|
|
6318
|
+
exclude: exports_external.array(ExcludePatternSchema).optional().default([]),
|
|
6319
|
+
only: exports_external.array(ExcludePatternSchema).optional().default([]),
|
|
6320
|
+
global: exports_external.boolean().default(false),
|
|
6321
|
+
fresh: exports_external.boolean().default(false),
|
|
6322
|
+
installSkills: exports_external.boolean().default(false),
|
|
6323
|
+
prefix: exports_external.boolean().default(false),
|
|
6324
|
+
beta: exports_external.boolean().default(false),
|
|
6325
|
+
dryRun: exports_external.boolean().default(false),
|
|
6326
|
+
forceOverwrite: exports_external.boolean().default(false),
|
|
6327
|
+
skipSetup: exports_external.boolean().default(false),
|
|
6328
|
+
refresh: exports_external.boolean().default(false),
|
|
6329
|
+
docsDir: exports_external.string().optional(),
|
|
6330
|
+
plansDir: exports_external.string().optional(),
|
|
6331
|
+
yes: exports_external.boolean().default(false)
|
|
6332
|
+
});
|
|
6333
|
+
VersionCommandOptionsSchema = exports_external.object({
|
|
6334
|
+
kit: KitType.optional(),
|
|
6335
|
+
limit: exports_external.number().optional(),
|
|
6336
|
+
all: exports_external.boolean().optional()
|
|
6337
|
+
});
|
|
6338
|
+
UninstallCommandOptionsSchema = exports_external.object({
|
|
6339
|
+
yes: exports_external.boolean().default(false),
|
|
6340
|
+
local: exports_external.boolean().default(false),
|
|
6341
|
+
global: exports_external.boolean().default(false),
|
|
6342
|
+
all: exports_external.boolean().default(false),
|
|
6343
|
+
dryRun: exports_external.boolean().default(false),
|
|
6344
|
+
forceOverwrite: exports_external.boolean().default(false)
|
|
6345
|
+
});
|
|
6346
|
+
UpdateCliOptionsSchema = exports_external.object({
|
|
6347
|
+
release: exports_external.string().optional(),
|
|
6348
|
+
check: exports_external.boolean().default(false),
|
|
6349
|
+
yes: exports_external.boolean().default(false),
|
|
6350
|
+
beta: exports_external.boolean().default(false),
|
|
6351
|
+
registry: exports_external.string().url().optional()
|
|
6352
|
+
});
|
|
6353
|
+
TrackedFileSchema = exports_external.object({
|
|
6354
|
+
path: exports_external.string(),
|
|
6355
|
+
checksum: exports_external.string().regex(/^[a-f0-9]{64}$/, "Invalid SHA-256 checksum"),
|
|
6356
|
+
ownership: exports_external.enum(["ck", "user", "ck-modified"]),
|
|
6357
|
+
installedVersion: exports_external.string()
|
|
6358
|
+
});
|
|
6359
|
+
MetadataSchema = exports_external.object({
|
|
6360
|
+
name: exports_external.string().optional(),
|
|
6361
|
+
version: exports_external.string().optional(),
|
|
6362
|
+
installedAt: exports_external.string().optional(),
|
|
6363
|
+
scope: exports_external.enum(["local", "global"]).optional(),
|
|
6364
|
+
installedFiles: exports_external.array(exports_external.string()).optional(),
|
|
6365
|
+
userConfigFiles: exports_external.array(exports_external.string()).optional(),
|
|
6366
|
+
files: exports_external.array(TrackedFileSchema).optional()
|
|
6367
|
+
});
|
|
6368
|
+
ConfigSchema = exports_external.object({
|
|
6369
|
+
defaults: exports_external.object({
|
|
6370
|
+
kit: KitType.optional(),
|
|
6371
|
+
dir: exports_external.string().optional()
|
|
6372
|
+
}).optional(),
|
|
6373
|
+
folders: FoldersConfigSchema.optional()
|
|
6374
|
+
});
|
|
6375
|
+
GitHubReleaseAssetSchema = exports_external.object({
|
|
6376
|
+
id: exports_external.number(),
|
|
6377
|
+
name: exports_external.string(),
|
|
6378
|
+
url: exports_external.string().url(),
|
|
6379
|
+
browser_download_url: exports_external.string().url(),
|
|
6380
|
+
size: exports_external.number(),
|
|
6381
|
+
content_type: exports_external.string()
|
|
6382
|
+
});
|
|
6383
|
+
GitHubReleaseSchema = exports_external.object({
|
|
6384
|
+
id: exports_external.number(),
|
|
6385
|
+
tag_name: exports_external.string(),
|
|
6386
|
+
name: exports_external.string(),
|
|
6387
|
+
draft: exports_external.boolean(),
|
|
6388
|
+
prerelease: exports_external.boolean(),
|
|
6389
|
+
assets: exports_external.array(GitHubReleaseAssetSchema),
|
|
6390
|
+
published_at: exports_external.string().optional(),
|
|
6391
|
+
tarball_url: exports_external.string().url(),
|
|
6392
|
+
zipball_url: exports_external.string().url()
|
|
6393
|
+
});
|
|
6394
|
+
KitConfigSchema = exports_external.object({
|
|
6395
|
+
name: exports_external.string(),
|
|
6396
|
+
repo: exports_external.string(),
|
|
6397
|
+
owner: exports_external.string(),
|
|
6398
|
+
description: exports_external.string()
|
|
6399
|
+
});
|
|
6400
|
+
AVAILABLE_KITS = {
|
|
6401
|
+
engineer: {
|
|
6402
|
+
name: "ClaudeKit Engineer",
|
|
6403
|
+
repo: "claudekit-engineer",
|
|
6404
|
+
owner: "claudekit",
|
|
6405
|
+
description: "Engineering toolkit for building with Claude"
|
|
6406
|
+
},
|
|
6407
|
+
marketing: {
|
|
6408
|
+
name: "ClaudeKit Marketing",
|
|
6409
|
+
repo: "claudekit-marketing",
|
|
6410
|
+
owner: "claudekit",
|
|
6411
|
+
description: "[Coming Soon] Marketing toolkit"
|
|
6412
|
+
}
|
|
6413
|
+
};
|
|
6414
|
+
NEVER_COPY_PATTERNS = [
|
|
6415
|
+
".env",
|
|
6416
|
+
".env.local",
|
|
6417
|
+
".env.*.local",
|
|
6418
|
+
"*.key",
|
|
6419
|
+
"*.pem",
|
|
6420
|
+
"*.p12",
|
|
6421
|
+
"node_modules/**",
|
|
6422
|
+
".git/**",
|
|
6423
|
+
"dist/**",
|
|
6424
|
+
"build/**"
|
|
6425
|
+
];
|
|
6426
|
+
USER_CONFIG_PATTERNS = [
|
|
6427
|
+
".gitignore",
|
|
6428
|
+
".repomixignore",
|
|
6429
|
+
".mcp.json",
|
|
6430
|
+
".ckignore",
|
|
6431
|
+
"CLAUDE.md"
|
|
6432
|
+
];
|
|
6433
|
+
PROTECTED_PATTERNS = [...NEVER_COPY_PATTERNS, ...USER_CONFIG_PATTERNS];
|
|
6434
|
+
ClaudeKitError = class ClaudeKitError extends Error {
|
|
6435
|
+
code;
|
|
6436
|
+
statusCode;
|
|
6437
|
+
constructor(message, code, statusCode) {
|
|
6438
|
+
super(message);
|
|
6439
|
+
this.code = code;
|
|
6440
|
+
this.statusCode = statusCode;
|
|
6441
|
+
this.name = "ClaudeKitError";
|
|
6442
|
+
}
|
|
6443
|
+
};
|
|
6444
|
+
AuthenticationError = class AuthenticationError extends ClaudeKitError {
|
|
6445
|
+
constructor(message) {
|
|
6446
|
+
super(message, "AUTH_ERROR", 401);
|
|
6447
|
+
this.name = "AuthenticationError";
|
|
6448
|
+
}
|
|
6850
6449
|
};
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
function stringify(obj, { EOL = `
|
|
6856
|
-
`, finalEOL = true, replacer = null, spaces } = {}) {
|
|
6857
|
-
const EOF = finalEOL ? EOL : "";
|
|
6858
|
-
const str = JSON.stringify(obj, replacer, spaces);
|
|
6859
|
-
return str.replace(/\n/g, EOL) + EOF;
|
|
6860
|
-
}
|
|
6861
|
-
function stripBom(content) {
|
|
6862
|
-
if (Buffer.isBuffer(content))
|
|
6863
|
-
content = content.toString("utf8");
|
|
6864
|
-
return content.replace(/^\uFEFF/, "");
|
|
6865
|
-
}
|
|
6866
|
-
module.exports = { stringify, stripBom };
|
|
6867
|
-
});
|
|
6868
|
-
|
|
6869
|
-
// node_modules/jsonfile/index.js
|
|
6870
|
-
var require_jsonfile = __commonJS((exports, module) => {
|
|
6871
|
-
var _fs;
|
|
6872
|
-
try {
|
|
6873
|
-
_fs = require_graceful_fs();
|
|
6874
|
-
} catch (_3) {
|
|
6875
|
-
_fs = __require("fs");
|
|
6876
|
-
}
|
|
6877
|
-
var universalify = require_universalify();
|
|
6878
|
-
var { stringify, stripBom } = require_utils2();
|
|
6879
|
-
async function _readFile(file, options = {}) {
|
|
6880
|
-
if (typeof options === "string") {
|
|
6881
|
-
options = { encoding: options };
|
|
6450
|
+
GitHubError = class GitHubError extends ClaudeKitError {
|
|
6451
|
+
constructor(message, statusCode) {
|
|
6452
|
+
super(message, "GITHUB_ERROR", statusCode);
|
|
6453
|
+
this.name = "GitHubError";
|
|
6882
6454
|
}
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
try {
|
|
6889
|
-
obj = JSON.parse(data, options ? options.reviver : null);
|
|
6890
|
-
} catch (err) {
|
|
6891
|
-
if (shouldThrow) {
|
|
6892
|
-
err.message = `${file}: ${err.message}`;
|
|
6893
|
-
throw err;
|
|
6894
|
-
} else {
|
|
6895
|
-
return null;
|
|
6896
|
-
}
|
|
6455
|
+
};
|
|
6456
|
+
DownloadError = class DownloadError extends ClaudeKitError {
|
|
6457
|
+
constructor(message) {
|
|
6458
|
+
super(message, "DOWNLOAD_ERROR");
|
|
6459
|
+
this.name = "DownloadError";
|
|
6897
6460
|
}
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
options = { encoding: options };
|
|
6461
|
+
};
|
|
6462
|
+
ExtractionError = class ExtractionError extends ClaudeKitError {
|
|
6463
|
+
constructor(message) {
|
|
6464
|
+
super(message, "EXTRACTION_ERROR");
|
|
6465
|
+
this.name = "ExtractionError";
|
|
6904
6466
|
}
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6467
|
+
};
|
|
6468
|
+
SkillsManifestSchema = exports_external.object({
|
|
6469
|
+
version: exports_external.string(),
|
|
6470
|
+
structure: exports_external.enum(["flat", "categorized"]),
|
|
6471
|
+
timestamp: exports_external.string(),
|
|
6472
|
+
skills: exports_external.array(exports_external.object({
|
|
6473
|
+
name: exports_external.string(),
|
|
6474
|
+
category: exports_external.string().optional(),
|
|
6475
|
+
hash: exports_external.string().optional()
|
|
6476
|
+
}))
|
|
6477
|
+
});
|
|
6478
|
+
SkillsMigrationError = class SkillsMigrationError extends ClaudeKitError {
|
|
6479
|
+
constructor(message) {
|
|
6480
|
+
super(message, "SKILLS_MIGRATION_ERROR");
|
|
6481
|
+
this.name = "SkillsMigrationError";
|
|
6918
6482
|
}
|
|
6919
|
-
}
|
|
6920
|
-
async function _writeFile(file, obj, options = {}) {
|
|
6921
|
-
const fs2 = options.fs || _fs;
|
|
6922
|
-
const str = stringify(obj, options);
|
|
6923
|
-
await universalify.fromCallback(fs2.writeFile)(file, str, options);
|
|
6924
|
-
}
|
|
6925
|
-
var writeFile = universalify.fromPromise(_writeFile);
|
|
6926
|
-
function writeFileSync(file, obj, options = {}) {
|
|
6927
|
-
const fs2 = options.fs || _fs;
|
|
6928
|
-
const str = stringify(obj, options);
|
|
6929
|
-
return fs2.writeFileSync(file, str, options);
|
|
6930
|
-
}
|
|
6931
|
-
module.exports = {
|
|
6932
|
-
readFile,
|
|
6933
|
-
readFileSync: readFileSync2,
|
|
6934
|
-
writeFile,
|
|
6935
|
-
writeFileSync
|
|
6936
6483
|
};
|
|
6937
6484
|
});
|
|
6938
6485
|
|
|
6939
|
-
// node_modules/
|
|
6940
|
-
var
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6486
|
+
// node_modules/compare-versions/lib/umd/index.js
|
|
6487
|
+
var require_umd = __commonJS((exports, module) => {
|
|
6488
|
+
(function(global2, factory) {
|
|
6489
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.compareVersions = {}));
|
|
6490
|
+
})(exports, function(exports2) {
|
|
6491
|
+
const semver = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;
|
|
6492
|
+
const validateAndParse = (version) => {
|
|
6493
|
+
if (typeof version !== "string") {
|
|
6494
|
+
throw new TypeError("Invalid argument expected string");
|
|
6495
|
+
}
|
|
6496
|
+
const match = version.match(semver);
|
|
6497
|
+
if (!match) {
|
|
6498
|
+
throw new Error(`Invalid argument not valid semver ('${version}' received)`);
|
|
6499
|
+
}
|
|
6500
|
+
match.shift();
|
|
6501
|
+
return match;
|
|
6502
|
+
};
|
|
6503
|
+
const isWildcard = (s) => s === "*" || s === "x" || s === "X";
|
|
6504
|
+
const tryParse = (v) => {
|
|
6505
|
+
const n = parseInt(v, 10);
|
|
6506
|
+
return isNaN(n) ? v : n;
|
|
6507
|
+
};
|
|
6508
|
+
const forceType = (a, b) => typeof a !== typeof b ? [String(a), String(b)] : [a, b];
|
|
6509
|
+
const compareStrings = (a, b) => {
|
|
6510
|
+
if (isWildcard(a) || isWildcard(b))
|
|
6511
|
+
return 0;
|
|
6512
|
+
const [ap, bp] = forceType(tryParse(a), tryParse(b));
|
|
6513
|
+
if (ap > bp)
|
|
6514
|
+
return 1;
|
|
6515
|
+
if (ap < bp)
|
|
6516
|
+
return -1;
|
|
6517
|
+
return 0;
|
|
6518
|
+
};
|
|
6519
|
+
const compareSegments = (a, b) => {
|
|
6520
|
+
for (let i = 0;i < Math.max(a.length, b.length); i++) {
|
|
6521
|
+
const r = compareStrings(a[i] || "0", b[i] || "0");
|
|
6522
|
+
if (r !== 0)
|
|
6523
|
+
return r;
|
|
6524
|
+
}
|
|
6525
|
+
return 0;
|
|
6526
|
+
};
|
|
6527
|
+
const compareVersions3 = (v1, v2) => {
|
|
6528
|
+
const n1 = validateAndParse(v1);
|
|
6529
|
+
const n2 = validateAndParse(v2);
|
|
6530
|
+
const p1 = n1.pop();
|
|
6531
|
+
const p2 = n2.pop();
|
|
6532
|
+
const r = compareSegments(n1, n2);
|
|
6533
|
+
if (r !== 0)
|
|
6534
|
+
return r;
|
|
6535
|
+
if (p1 && p2) {
|
|
6536
|
+
return compareSegments(p1.split("."), p2.split("."));
|
|
6537
|
+
} else if (p1 || p2) {
|
|
6538
|
+
return p1 ? -1 : 1;
|
|
6539
|
+
}
|
|
6540
|
+
return 0;
|
|
6541
|
+
};
|
|
6542
|
+
const compare = (v1, v2, operator) => {
|
|
6543
|
+
assertValidOperator(operator);
|
|
6544
|
+
const res = compareVersions3(v1, v2);
|
|
6545
|
+
return operatorResMap[operator].includes(res);
|
|
6546
|
+
};
|
|
6547
|
+
const operatorResMap = {
|
|
6548
|
+
">": [1],
|
|
6549
|
+
">=": [0, 1],
|
|
6550
|
+
"=": [0],
|
|
6551
|
+
"<=": [-1, 0],
|
|
6552
|
+
"<": [-1],
|
|
6553
|
+
"!=": [-1, 1]
|
|
6554
|
+
};
|
|
6555
|
+
const allowedOperators = Object.keys(operatorResMap);
|
|
6556
|
+
const assertValidOperator = (op) => {
|
|
6557
|
+
if (typeof op !== "string") {
|
|
6558
|
+
throw new TypeError(`Invalid operator type, expected string but got ${typeof op}`);
|
|
6559
|
+
}
|
|
6560
|
+
if (allowedOperators.indexOf(op) === -1) {
|
|
6561
|
+
throw new Error(`Invalid operator, expected one of ${allowedOperators.join("|")}`);
|
|
6562
|
+
}
|
|
6563
|
+
};
|
|
6564
|
+
const satisfies = (version, range) => {
|
|
6565
|
+
range = range.replace(/([><=]+)\s+/g, "$1");
|
|
6566
|
+
if (range.includes("||")) {
|
|
6567
|
+
return range.split("||").some((r4) => satisfies(version, r4));
|
|
6568
|
+
} else if (range.includes(" - ")) {
|
|
6569
|
+
const [a, b] = range.split(" - ", 2);
|
|
6570
|
+
return satisfies(version, `>=${a} <=${b}`);
|
|
6571
|
+
} else if (range.includes(" ")) {
|
|
6572
|
+
return range.trim().replace(/\s{2,}/g, " ").split(" ").every((r4) => satisfies(version, r4));
|
|
6573
|
+
}
|
|
6574
|
+
const m = range.match(/^([<>=~^]+)/);
|
|
6575
|
+
const op = m ? m[1] : "=";
|
|
6576
|
+
if (op !== "^" && op !== "~")
|
|
6577
|
+
return compare(version, range, op);
|
|
6578
|
+
const [v1, v2, v3, , vp] = validateAndParse(version);
|
|
6579
|
+
const [r1, r2, r3, , rp] = validateAndParse(range);
|
|
6580
|
+
const v = [v1, v2, v3];
|
|
6581
|
+
const r = [r1, r2 !== null && r2 !== undefined ? r2 : "x", r3 !== null && r3 !== undefined ? r3 : "x"];
|
|
6582
|
+
if (rp) {
|
|
6583
|
+
if (!vp)
|
|
6584
|
+
return false;
|
|
6585
|
+
if (compareSegments(v, r) !== 0)
|
|
6586
|
+
return false;
|
|
6587
|
+
if (compareSegments(vp.split("."), rp.split(".")) === -1)
|
|
6588
|
+
return false;
|
|
6589
|
+
}
|
|
6590
|
+
const nonZero = r.findIndex((v4) => v4 !== "0") + 1;
|
|
6591
|
+
const i = op === "~" ? 2 : nonZero > 1 ? nonZero : 1;
|
|
6592
|
+
if (compareSegments(v.slice(0, i), r.slice(0, i)) !== 0)
|
|
6593
|
+
return false;
|
|
6594
|
+
if (compareSegments(v.slice(i), r.slice(i)) === -1)
|
|
6595
|
+
return false;
|
|
6596
|
+
return true;
|
|
6597
|
+
};
|
|
6598
|
+
const validate = (version) => typeof version === "string" && /^[v\d]/.test(version) && semver.test(version);
|
|
6599
|
+
const validateStrict = (version) => typeof version === "string" && /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(version);
|
|
6600
|
+
exports2.compare = compare;
|
|
6601
|
+
exports2.compareVersions = compareVersions3;
|
|
6602
|
+
exports2.satisfies = satisfies;
|
|
6603
|
+
exports2.validate = validate;
|
|
6604
|
+
exports2.validateStrict = validateStrict;
|
|
6605
|
+
});
|
|
6948
6606
|
});
|
|
6949
6607
|
|
|
6950
|
-
// node_modules/
|
|
6951
|
-
var
|
|
6952
|
-
var
|
|
6953
|
-
var
|
|
6954
|
-
var
|
|
6955
|
-
var
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6608
|
+
// node_modules/sisteransi/src/index.js
|
|
6609
|
+
var require_src = __commonJS((exports, module) => {
|
|
6610
|
+
var ESC = "\x1B";
|
|
6611
|
+
var CSI = `${ESC}[`;
|
|
6612
|
+
var beep = "\x07";
|
|
6613
|
+
var cursor = {
|
|
6614
|
+
to(x, y) {
|
|
6615
|
+
if (!y)
|
|
6616
|
+
return `${CSI}${x + 1}G`;
|
|
6617
|
+
return `${CSI}${y + 1};${x + 1}H`;
|
|
6618
|
+
},
|
|
6619
|
+
move(x, y) {
|
|
6620
|
+
let ret = "";
|
|
6621
|
+
if (x < 0)
|
|
6622
|
+
ret += `${CSI}${-x}D`;
|
|
6623
|
+
else if (x > 0)
|
|
6624
|
+
ret += `${CSI}${x}C`;
|
|
6625
|
+
if (y < 0)
|
|
6626
|
+
ret += `${CSI}${-y}A`;
|
|
6627
|
+
else if (y > 0)
|
|
6628
|
+
ret += `${CSI}${y}B`;
|
|
6629
|
+
return ret;
|
|
6630
|
+
},
|
|
6631
|
+
up: (count = 1) => `${CSI}${count}A`,
|
|
6632
|
+
down: (count = 1) => `${CSI}${count}B`,
|
|
6633
|
+
forward: (count = 1) => `${CSI}${count}C`,
|
|
6634
|
+
backward: (count = 1) => `${CSI}${count}D`,
|
|
6635
|
+
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
6636
|
+
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
6637
|
+
left: `${CSI}G`,
|
|
6638
|
+
hide: `${CSI}?25l`,
|
|
6639
|
+
show: `${CSI}?25h`,
|
|
6640
|
+
save: `${ESC}7`,
|
|
6641
|
+
restore: `${ESC}8`
|
|
6642
|
+
};
|
|
6643
|
+
var scroll = {
|
|
6644
|
+
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
6645
|
+
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
6646
|
+
};
|
|
6647
|
+
var erase = {
|
|
6648
|
+
screen: `${CSI}2J`,
|
|
6649
|
+
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
6650
|
+
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
6651
|
+
line: `${CSI}2K`,
|
|
6652
|
+
lineEnd: `${CSI}K`,
|
|
6653
|
+
lineStart: `${CSI}1K`,
|
|
6654
|
+
lines(count) {
|
|
6655
|
+
let clear = "";
|
|
6656
|
+
for (let i = 0;i < count; i++)
|
|
6657
|
+
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
6658
|
+
if (count)
|
|
6659
|
+
clear += cursor.left;
|
|
6660
|
+
return clear;
|
|
6968
6661
|
}
|
|
6969
|
-
fs2.writeFileSync(file, ...args);
|
|
6970
|
-
}
|
|
6971
|
-
module.exports = {
|
|
6972
|
-
outputFile: u(outputFile),
|
|
6973
|
-
outputFileSync
|
|
6974
6662
|
};
|
|
6663
|
+
module.exports = { cursor, scroll, erase, beep };
|
|
6975
6664
|
});
|
|
6976
6665
|
|
|
6977
|
-
// node_modules/
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6666
|
+
// node_modules/@clack/core/dist/index.mjs
|
|
6667
|
+
import { stdin as $, stdout as k } from "node:process";
|
|
6668
|
+
import * as f from "node:readline";
|
|
6669
|
+
import _ from "node:readline";
|
|
6670
|
+
import { WriteStream as U } from "node:tty";
|
|
6671
|
+
function q({ onlyFirst: e = false } = {}) {
|
|
6672
|
+
const F = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
6673
|
+
return new RegExp(F, e ? undefined : "g");
|
|
6674
|
+
}
|
|
6675
|
+
function S(e) {
|
|
6676
|
+
if (typeof e != "string")
|
|
6677
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);
|
|
6678
|
+
return e.replace(J, "");
|
|
6679
|
+
}
|
|
6680
|
+
function T(e) {
|
|
6681
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6682
|
+
}
|
|
6683
|
+
function A(e, u = {}) {
|
|
6684
|
+
if (typeof e != "string" || e.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, e = S(e), e.length === 0))
|
|
6685
|
+
return 0;
|
|
6686
|
+
e = e.replace(uD(), " ");
|
|
6687
|
+
const F = u.ambiguousIsNarrow ? 1 : 2;
|
|
6688
|
+
let t = 0;
|
|
6689
|
+
for (const s of e) {
|
|
6690
|
+
const C = s.codePointAt(0);
|
|
6691
|
+
if (C <= 31 || C >= 127 && C <= 159 || C >= 768 && C <= 879)
|
|
6692
|
+
continue;
|
|
6693
|
+
switch (X.eastAsianWidth(s)) {
|
|
6694
|
+
case "F":
|
|
6695
|
+
case "W":
|
|
6696
|
+
t += 2;
|
|
6697
|
+
break;
|
|
6698
|
+
case "A":
|
|
6699
|
+
t += F;
|
|
6700
|
+
break;
|
|
6701
|
+
default:
|
|
6702
|
+
t += 1;
|
|
6703
|
+
}
|
|
6984
6704
|
}
|
|
6985
|
-
|
|
6986
|
-
}
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
const str = stringify(data, options);
|
|
6994
|
-
outputFileSync(file, str, options);
|
|
6705
|
+
return t;
|
|
6706
|
+
}
|
|
6707
|
+
function tD() {
|
|
6708
|
+
const e = new Map;
|
|
6709
|
+
for (const [u, F] of Object.entries(r)) {
|
|
6710
|
+
for (const [t, s] of Object.entries(F))
|
|
6711
|
+
r[t] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, F[t] = r[t], e.set(s[0], s[1]);
|
|
6712
|
+
Object.defineProperty(r, u, { value: F, enumerable: false });
|
|
6995
6713
|
}
|
|
6996
|
-
|
|
6997
|
-
});
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
var fs2 = require_fs();
|
|
7017
|
-
var path = __require("path");
|
|
7018
|
-
var { copy } = require_copy2();
|
|
7019
|
-
var { remove } = require_remove();
|
|
7020
|
-
var { mkdirp } = require_mkdirs();
|
|
7021
|
-
var { pathExists } = require_path_exists();
|
|
7022
|
-
var stat = require_stat();
|
|
7023
|
-
async function move(src, dest, opts = {}) {
|
|
7024
|
-
const overwrite = opts.overwrite || opts.clobber || false;
|
|
7025
|
-
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
7026
|
-
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
7027
|
-
const destParent = path.dirname(dest);
|
|
7028
|
-
const parsedParentPath = path.parse(destParent);
|
|
7029
|
-
if (parsedParentPath.root !== destParent) {
|
|
7030
|
-
await mkdirp(destParent);
|
|
6714
|
+
return Object.defineProperty(r, "codes", { value: e, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = M(), r.color.ansi256 = P(), r.color.ansi16m = W(), r.bgColor.ansi = M(d), r.bgColor.ansi256 = P(d), r.bgColor.ansi16m = W(d), Object.defineProperties(r, { rgbToAnsi256: { value: (u, F, t) => u === F && F === t ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(F / 255 * 5) + Math.round(t / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
|
|
6715
|
+
const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
|
|
6716
|
+
if (!F)
|
|
6717
|
+
return [0, 0, 0];
|
|
6718
|
+
let [t] = F;
|
|
6719
|
+
t.length === 3 && (t = [...t].map((C) => C + C).join(""));
|
|
6720
|
+
const s = Number.parseInt(t, 16);
|
|
6721
|
+
return [s >> 16 & 255, s >> 8 & 255, s & 255];
|
|
6722
|
+
}, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
|
|
6723
|
+
if (u < 8)
|
|
6724
|
+
return 30 + u;
|
|
6725
|
+
if (u < 16)
|
|
6726
|
+
return 90 + (u - 8);
|
|
6727
|
+
let F, t, s;
|
|
6728
|
+
if (u >= 232)
|
|
6729
|
+
F = ((u - 232) * 10 + 8) / 255, t = F, s = F;
|
|
6730
|
+
else {
|
|
6731
|
+
u -= 16;
|
|
6732
|
+
const i = u % 36;
|
|
6733
|
+
F = Math.floor(u / 36) / 5, t = Math.floor(i / 6) / 5, s = i % 6 / 5;
|
|
7031
6734
|
}
|
|
7032
|
-
|
|
6735
|
+
const C = Math.max(F, t, s) * 2;
|
|
6736
|
+
if (C === 0)
|
|
6737
|
+
return 30;
|
|
6738
|
+
let D = 30 + (Math.round(s) << 2 | Math.round(t) << 1 | Math.round(F));
|
|
6739
|
+
return C === 2 && (D += 60), D;
|
|
6740
|
+
}, enumerable: false }, rgbToAnsi: { value: (u, F, t) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, t)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
|
|
6741
|
+
}
|
|
6742
|
+
function R(e, u, F) {
|
|
6743
|
+
return String(e).normalize().replace(/\r\n/g, `
|
|
6744
|
+
`).split(`
|
|
6745
|
+
`).map((t) => oD(t, u, F)).join(`
|
|
6746
|
+
`);
|
|
6747
|
+
}
|
|
6748
|
+
function hD(e, u) {
|
|
6749
|
+
if (e === u)
|
|
6750
|
+
return;
|
|
6751
|
+
const F = e.split(`
|
|
6752
|
+
`), t = u.split(`
|
|
6753
|
+
`), s = [];
|
|
6754
|
+
for (let C = 0;C < Math.max(F.length, t.length); C++)
|
|
6755
|
+
F[C] !== t[C] && s.push(C);
|
|
6756
|
+
return s;
|
|
6757
|
+
}
|
|
6758
|
+
function lD(e) {
|
|
6759
|
+
return e === V;
|
|
6760
|
+
}
|
|
6761
|
+
function v(e, u) {
|
|
6762
|
+
e.isTTY && e.setRawMode(u);
|
|
6763
|
+
}
|
|
6764
|
+
|
|
6765
|
+
class x {
|
|
6766
|
+
constructor({ render: u, input: F = $, output: t = k, ...s }, C = true) {
|
|
6767
|
+
a(this, "input"), a(this, "output"), a(this, "rl"), a(this, "opts"), a(this, "_track", false), a(this, "_render"), a(this, "_cursor", 0), a(this, "state", "initial"), a(this, "value"), a(this, "error", ""), a(this, "subscribers", new Map), a(this, "_prevFrame", ""), this.opts = s, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u.bind(this), this._track = C, this.input = F, this.output = t;
|
|
7033
6768
|
}
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
}
|
|
7045
|
-
|
|
7046
|
-
|
|
6769
|
+
prompt() {
|
|
6770
|
+
const u = new U(0);
|
|
6771
|
+
return u._write = (F, t, s) => {
|
|
6772
|
+
this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s();
|
|
6773
|
+
}, this.input.pipe(u), this.rl = _.createInterface({ input: this.input, output: u, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), _.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== undefined && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), v(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F, t) => {
|
|
6774
|
+
this.once("submit", () => {
|
|
6775
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v(this.input, false), F(this.value);
|
|
6776
|
+
}), this.once("cancel", () => {
|
|
6777
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v(this.input, false), F(V);
|
|
6778
|
+
});
|
|
6779
|
+
});
|
|
6780
|
+
}
|
|
6781
|
+
on(u, F) {
|
|
6782
|
+
const t = this.subscribers.get(u) ?? [];
|
|
6783
|
+
t.push({ cb: F }), this.subscribers.set(u, t);
|
|
6784
|
+
}
|
|
6785
|
+
once(u, F) {
|
|
6786
|
+
const t = this.subscribers.get(u) ?? [];
|
|
6787
|
+
t.push({ cb: F, once: true }), this.subscribers.set(u, t);
|
|
6788
|
+
}
|
|
6789
|
+
emit(u, ...F) {
|
|
6790
|
+
const t = this.subscribers.get(u) ?? [], s = [];
|
|
6791
|
+
for (const C of t)
|
|
6792
|
+
C.cb(...F), C.once && s.push(() => t.splice(t.indexOf(C), 1));
|
|
6793
|
+
for (const C of s)
|
|
6794
|
+
C();
|
|
6795
|
+
}
|
|
6796
|
+
unsubscribe() {
|
|
6797
|
+
this.subscribers.clear();
|
|
6798
|
+
}
|
|
6799
|
+
onKeypress(u, F) {
|
|
6800
|
+
if (this.state === "error" && (this.state = "active"), F?.name && !this._track && z.has(F.name) && this.emit("cursor", z.get(F.name)), F?.name && xD.has(F.name) && this.emit("cursor", F.name), u && (u.toLowerCase() === "y" || u.toLowerCase() === "n") && this.emit("confirm", u.toLowerCase() === "y"), u === "\t" && this.opts.placeholder && (this.value || (this.rl.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u && this.emit("key", u.toLowerCase()), F?.name === "return") {
|
|
6801
|
+
if (this.opts.validate) {
|
|
6802
|
+
const t = this.opts.validate(this.value);
|
|
6803
|
+
t && (this.error = t, this.state = "error", this.rl.write(this.value));
|
|
7047
6804
|
}
|
|
7048
|
-
|
|
6805
|
+
this.state !== "error" && (this.state = "submit");
|
|
7049
6806
|
}
|
|
6807
|
+
u === "\x03" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
7050
6808
|
}
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
errorOnExist: true,
|
|
7055
|
-
preserveTimestamps: true
|
|
7056
|
-
};
|
|
7057
|
-
await copy(src, dest, opts);
|
|
7058
|
-
return remove(src);
|
|
6809
|
+
close() {
|
|
6810
|
+
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
6811
|
+
`), v(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
7059
6812
|
}
|
|
7060
|
-
|
|
7061
|
-
})
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
var require_move_sync = __commonJS((exports, module) => {
|
|
7065
|
-
var fs2 = require_graceful_fs();
|
|
7066
|
-
var path = __require("path");
|
|
7067
|
-
var copySync = require_copy2().copySync;
|
|
7068
|
-
var removeSync = require_remove().removeSync;
|
|
7069
|
-
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
7070
|
-
var stat = require_stat();
|
|
7071
|
-
function moveSync(src, dest, opts) {
|
|
7072
|
-
opts = opts || {};
|
|
7073
|
-
const overwrite = opts.overwrite || opts.clobber || false;
|
|
7074
|
-
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
7075
|
-
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
7076
|
-
if (!isParentRoot(dest))
|
|
7077
|
-
mkdirpSync(path.dirname(dest));
|
|
7078
|
-
return doRename(src, dest, overwrite, isChangingCase);
|
|
6813
|
+
restoreCursor() {
|
|
6814
|
+
const u = R(this._prevFrame, process.stdout.columns, { hard: true }).split(`
|
|
6815
|
+
`).length - 1;
|
|
6816
|
+
this.output.write(import_sisteransi.cursor.move(-999, u * -1));
|
|
7079
6817
|
}
|
|
7080
|
-
|
|
7081
|
-
const
|
|
7082
|
-
|
|
7083
|
-
|
|
6818
|
+
render() {
|
|
6819
|
+
const u = R(this._render(this) ?? "", process.stdout.columns, { hard: true });
|
|
6820
|
+
if (u !== this._prevFrame) {
|
|
6821
|
+
if (this.state === "initial")
|
|
6822
|
+
this.output.write(import_sisteransi.cursor.hide);
|
|
6823
|
+
else {
|
|
6824
|
+
const F = hD(this._prevFrame, u);
|
|
6825
|
+
if (this.restoreCursor(), F && F?.length === 1) {
|
|
6826
|
+
const t = F[0];
|
|
6827
|
+
this.output.write(import_sisteransi.cursor.move(0, t)), this.output.write(import_sisteransi.erase.lines(1));
|
|
6828
|
+
const s = u.split(`
|
|
6829
|
+
`);
|
|
6830
|
+
this.output.write(s[t]), this._prevFrame = u, this.output.write(import_sisteransi.cursor.move(0, s.length - t - 1));
|
|
6831
|
+
return;
|
|
6832
|
+
} else if (F && F?.length > 1) {
|
|
6833
|
+
const t = F[0];
|
|
6834
|
+
this.output.write(import_sisteransi.cursor.move(0, t)), this.output.write(import_sisteransi.erase.down());
|
|
6835
|
+
const s = u.split(`
|
|
6836
|
+
`).slice(t);
|
|
6837
|
+
this.output.write(s.join(`
|
|
6838
|
+
`)), this._prevFrame = u;
|
|
6839
|
+
return;
|
|
6840
|
+
}
|
|
6841
|
+
this.output.write(import_sisteransi.erase.down());
|
|
6842
|
+
}
|
|
6843
|
+
this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
|
|
6844
|
+
}
|
|
7084
6845
|
}
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
6846
|
+
}
|
|
6847
|
+
function OD({ input: e = $, output: u = k, overwrite: F = true, hideCursor: t = true } = {}) {
|
|
6848
|
+
const s = f.createInterface({ input: e, output: u, prompt: "", tabSize: 1 });
|
|
6849
|
+
f.emitKeypressEvents(e, s), e.isTTY && e.setRawMode(true);
|
|
6850
|
+
const C = (D, { name: i }) => {
|
|
6851
|
+
if (String(D) === "\x03") {
|
|
6852
|
+
t && u.write(import_sisteransi.cursor.show), process.exit(0);
|
|
6853
|
+
return;
|
|
7091
6854
|
}
|
|
7092
|
-
if (
|
|
7093
|
-
|
|
7094
|
-
return
|
|
6855
|
+
if (!F)
|
|
6856
|
+
return;
|
|
6857
|
+
let n = i === "return" ? 0 : -1, E = i === "return" ? -1 : 0;
|
|
6858
|
+
f.moveCursor(u, n, E, () => {
|
|
6859
|
+
f.clearLine(u, 1, () => {
|
|
6860
|
+
e.once("keypress", C);
|
|
6861
|
+
});
|
|
6862
|
+
});
|
|
6863
|
+
};
|
|
6864
|
+
return t && u.write(import_sisteransi.cursor.hide), e.once("keypress", C), () => {
|
|
6865
|
+
e.off("keypress", C), t && u.write(import_sisteransi.cursor.show), e.isTTY && !WD && e.setRawMode(false), s.terminal = false, s.close();
|
|
6866
|
+
};
|
|
6867
|
+
}
|
|
6868
|
+
var import_sisteransi, import_picocolors2, J, j, Q, X, DD = function() {
|
|
6869
|
+
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
6870
|
+
}, uD, d = 10, M = (e = 0) => (u) => `\x1B[${u + e}m`, P = (e = 0) => (u) => `\x1B[${38 + e};5;${u}m`, W = (e = 0) => (u, F, t) => `\x1B[${38 + e};2;${u};${F};${t}m`, r, FD, eD, sD, g, CD = 39, b = "\x07", O = "[", iD = "]", I = "m", w, N = (e) => `${g.values().next().value}${O}${e}${I}`, L = (e) => `${g.values().next().value}${w}${e}${b}`, rD = (e) => e.split(" ").map((u) => A(u)), y = (e, u, F) => {
|
|
6871
|
+
const t = [...u];
|
|
6872
|
+
let s = false, C = false, D = A(S(e[e.length - 1]));
|
|
6873
|
+
for (const [i, n] of t.entries()) {
|
|
6874
|
+
const E = A(n);
|
|
6875
|
+
if (D + E <= F ? e[e.length - 1] += n : (e.push(n), D = 0), g.has(n) && (s = true, C = t.slice(i + 1).join("").startsWith(w)), s) {
|
|
6876
|
+
C ? n === b && (s = false, C = false) : n === I && (s = false);
|
|
6877
|
+
continue;
|
|
6878
|
+
}
|
|
6879
|
+
D += E, D === F && i < t.length - 1 && (e.push(""), D = 0);
|
|
7095
6880
|
}
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
6881
|
+
!D && e[e.length - 1].length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
|
|
6882
|
+
}, ED = (e) => {
|
|
6883
|
+
const u = e.split(" ");
|
|
6884
|
+
let F = u.length;
|
|
6885
|
+
for (;F > 0 && !(A(u[F - 1]) > 0); )
|
|
6886
|
+
F--;
|
|
6887
|
+
return F === u.length ? e : u.slice(0, F).join(" ") + u.slice(F).join("");
|
|
6888
|
+
}, oD = (e, u, F = {}) => {
|
|
6889
|
+
if (F.trim !== false && e.trim() === "")
|
|
6890
|
+
return "";
|
|
6891
|
+
let t = "", s, C;
|
|
6892
|
+
const D = rD(e);
|
|
6893
|
+
let i = [""];
|
|
6894
|
+
for (const [E, h] of e.split(" ").entries()) {
|
|
6895
|
+
F.trim !== false && (i[i.length - 1] = i[i.length - 1].trimStart());
|
|
6896
|
+
let o = A(i[i.length - 1]);
|
|
6897
|
+
if (E !== 0 && (o >= u && (F.wordWrap === false || F.trim === false) && (i.push(""), o = 0), (o > 0 || F.trim === false) && (i[i.length - 1] += " ", o++)), F.hard && D[E] > u) {
|
|
6898
|
+
const B = u - o, p = 1 + Math.floor((D[E] - B - 1) / u);
|
|
6899
|
+
Math.floor((D[E] - 1) / u) < p && i.push(""), y(i, h, u);
|
|
6900
|
+
continue;
|
|
6901
|
+
}
|
|
6902
|
+
if (o + D[E] > u && o > 0 && D[E] > 0) {
|
|
6903
|
+
if (F.wordWrap === false && o < u) {
|
|
6904
|
+
y(i, h, u);
|
|
6905
|
+
continue;
|
|
6906
|
+
}
|
|
6907
|
+
i.push("");
|
|
7103
6908
|
}
|
|
6909
|
+
if (o + D[E] > u && F.wordWrap === false) {
|
|
6910
|
+
y(i, h, u);
|
|
6911
|
+
continue;
|
|
6912
|
+
}
|
|
6913
|
+
i[i.length - 1] += h;
|
|
7104
6914
|
}
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
6915
|
+
F.trim !== false && (i = i.map((E) => ED(E)));
|
|
6916
|
+
const n = [...i.join(`
|
|
6917
|
+
`)];
|
|
6918
|
+
for (const [E, h] of n.entries()) {
|
|
6919
|
+
if (t += h, g.has(h)) {
|
|
6920
|
+
const { groups: B } = new RegExp(`(?:\\${O}(?<code>\\d+)m|\\${w}(?<uri>.*)${b})`).exec(n.slice(E).join("")) || { groups: {} };
|
|
6921
|
+
if (B.code !== undefined) {
|
|
6922
|
+
const p = Number.parseFloat(B.code);
|
|
6923
|
+
s = p === CD ? undefined : p;
|
|
6924
|
+
} else
|
|
6925
|
+
B.uri !== undefined && (C = B.uri.length === 0 ? undefined : B.uri);
|
|
6926
|
+
}
|
|
6927
|
+
const o = sD.codes.get(Number(s));
|
|
6928
|
+
n[E + 1] === `
|
|
6929
|
+
` ? (C && (t += L("")), s && o && (t += N(o))) : h === `
|
|
6930
|
+
` && (s && o && (t += N(s)), C && (t += L(C)));
|
|
7113
6931
|
}
|
|
7114
|
-
|
|
7115
|
-
});
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
var
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
docs: "docs",
|
|
7183
|
-
plans: "plans"
|
|
6932
|
+
return t;
|
|
6933
|
+
}, nD, aD = (e, u, F) => (u in e) ? nD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, a = (e, u, F) => (aD(e, typeof u != "symbol" ? u + "" : u, F), F), V, z, xD, BD, cD, AD = (e, u, F) => (u in e) ? cD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, G = (e, u, F) => (AD(e, typeof u != "symbol" ? u + "" : u, F), F), pD, fD, gD = (e, u, F) => (u in e) ? fD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, K = (e, u, F) => (gD(e, typeof u != "symbol" ? u + "" : u, F), F), vD, mD, dD = (e, u, F) => (u in e) ? mD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, Y = (e, u, F) => (dD(e, typeof u != "symbol" ? u + "" : u, F), F), bD, wD, yD = (e, u, F) => (u in e) ? wD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, Z = (e, u, F) => (yD(e, typeof u != "symbol" ? u + "" : u, F), F), $D, kD, _D = (e, u, F) => (u in e) ? kD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, H = (e, u, F) => (_D(e, typeof u != "symbol" ? u + "" : u, F), F), SD, TD, jD = (e, u, F) => (u in e) ? TD(e, u, { enumerable: true, configurable: true, writable: true, value: F }) : e[u] = F, MD = (e, u, F) => (jD(e, typeof u != "symbol" ? u + "" : u, F), F), PD, WD;
|
|
6934
|
+
var init_dist = __esm(() => {
|
|
6935
|
+
import_sisteransi = __toESM(require_src(), 1);
|
|
6936
|
+
import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
6937
|
+
J = q();
|
|
6938
|
+
j = { exports: {} };
|
|
6939
|
+
(function(e) {
|
|
6940
|
+
var u = {};
|
|
6941
|
+
e.exports = u, u.eastAsianWidth = function(t) {
|
|
6942
|
+
var s = t.charCodeAt(0), C = t.length == 2 ? t.charCodeAt(1) : 0, D = s;
|
|
6943
|
+
return 55296 <= s && s <= 56319 && 56320 <= C && C <= 57343 && (s &= 1023, C &= 1023, D = s << 10 | C, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
|
|
6944
|
+
}, u.characterLength = function(t) {
|
|
6945
|
+
var s = this.eastAsianWidth(t);
|
|
6946
|
+
return s == "F" || s == "W" || s == "A" ? 2 : 1;
|
|
6947
|
+
};
|
|
6948
|
+
function F(t) {
|
|
6949
|
+
return t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
6950
|
+
}
|
|
6951
|
+
u.length = function(t) {
|
|
6952
|
+
for (var s = F(t), C = 0, D = 0;D < s.length; D++)
|
|
6953
|
+
C = C + this.characterLength(s[D]);
|
|
6954
|
+
return C;
|
|
6955
|
+
}, u.slice = function(t, s, C) {
|
|
6956
|
+
textLen = u.length(t), s = s || 0, C = C || 1, s < 0 && (s = textLen + s), C < 0 && (C = textLen + C);
|
|
6957
|
+
for (var D = "", i = 0, n = F(t), E = 0;E < n.length; E++) {
|
|
6958
|
+
var h = n[E], o = u.length(h);
|
|
6959
|
+
if (i >= s - (o == 2 ? 1 : 0))
|
|
6960
|
+
if (i + o <= C)
|
|
6961
|
+
D += h;
|
|
6962
|
+
else
|
|
6963
|
+
break;
|
|
6964
|
+
i += o;
|
|
6965
|
+
}
|
|
6966
|
+
return D;
|
|
6967
|
+
};
|
|
6968
|
+
})(j);
|
|
6969
|
+
Q = j.exports;
|
|
6970
|
+
X = T(Q);
|
|
6971
|
+
uD = T(DD);
|
|
6972
|
+
r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
|
|
6973
|
+
Object.keys(r.modifier);
|
|
6974
|
+
FD = Object.keys(r.color);
|
|
6975
|
+
eD = Object.keys(r.bgColor);
|
|
6976
|
+
[...FD, ...eD];
|
|
6977
|
+
sD = tD();
|
|
6978
|
+
g = new Set(["\x1B", ""]);
|
|
6979
|
+
w = `${iD}8;;`;
|
|
6980
|
+
nD = Object.defineProperty;
|
|
6981
|
+
V = Symbol("clack:cancel");
|
|
6982
|
+
z = new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
|
|
6983
|
+
xD = new Set(["up", "down", "left", "right", "space", "enter"]);
|
|
6984
|
+
BD = class BD extends x {
|
|
6985
|
+
get cursor() {
|
|
6986
|
+
return this.value ? 0 : 1;
|
|
6987
|
+
}
|
|
6988
|
+
get _value() {
|
|
6989
|
+
return this.cursor === 0;
|
|
6990
|
+
}
|
|
6991
|
+
constructor(u) {
|
|
6992
|
+
super(u, false), this.value = !!u.initialValue, this.on("value", () => {
|
|
6993
|
+
this.value = this._value;
|
|
6994
|
+
}), this.on("confirm", (F) => {
|
|
6995
|
+
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
|
|
6996
|
+
}), this.on("cursor", () => {
|
|
6997
|
+
this.value = !this.value;
|
|
6998
|
+
});
|
|
6999
|
+
}
|
|
7184
7000
|
};
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
kit: KitType.optional(),
|
|
7222
|
-
limit: exports_external.number().optional(),
|
|
7223
|
-
all: exports_external.boolean().optional()
|
|
7224
|
-
});
|
|
7225
|
-
UninstallCommandOptionsSchema = exports_external.object({
|
|
7226
|
-
yes: exports_external.boolean().default(false),
|
|
7227
|
-
local: exports_external.boolean().default(false),
|
|
7228
|
-
global: exports_external.boolean().default(false),
|
|
7229
|
-
all: exports_external.boolean().default(false),
|
|
7230
|
-
dryRun: exports_external.boolean().default(false),
|
|
7231
|
-
forceOverwrite: exports_external.boolean().default(false)
|
|
7232
|
-
});
|
|
7233
|
-
UpdateCliOptionsSchema = exports_external.object({
|
|
7234
|
-
release: exports_external.string().optional(),
|
|
7235
|
-
check: exports_external.boolean().default(false),
|
|
7236
|
-
yes: exports_external.boolean().default(false),
|
|
7237
|
-
beta: exports_external.boolean().default(false),
|
|
7238
|
-
registry: exports_external.string().url().optional()
|
|
7239
|
-
});
|
|
7240
|
-
TrackedFileSchema = exports_external.object({
|
|
7241
|
-
path: exports_external.string(),
|
|
7242
|
-
checksum: exports_external.string().regex(/^[a-f0-9]{64}$/, "Invalid SHA-256 checksum"),
|
|
7243
|
-
ownership: exports_external.enum(["ck", "user", "ck-modified"]),
|
|
7244
|
-
installedVersion: exports_external.string()
|
|
7245
|
-
});
|
|
7246
|
-
MetadataSchema = exports_external.object({
|
|
7247
|
-
name: exports_external.string().optional(),
|
|
7248
|
-
version: exports_external.string().optional(),
|
|
7249
|
-
installedAt: exports_external.string().optional(),
|
|
7250
|
-
scope: exports_external.enum(["local", "global"]).optional(),
|
|
7251
|
-
installedFiles: exports_external.array(exports_external.string()).optional(),
|
|
7252
|
-
userConfigFiles: exports_external.array(exports_external.string()).optional(),
|
|
7253
|
-
files: exports_external.array(TrackedFileSchema).optional()
|
|
7254
|
-
});
|
|
7255
|
-
ConfigSchema = exports_external.object({
|
|
7256
|
-
defaults: exports_external.object({
|
|
7257
|
-
kit: KitType.optional(),
|
|
7258
|
-
dir: exports_external.string().optional()
|
|
7259
|
-
}).optional(),
|
|
7260
|
-
folders: FoldersConfigSchema.optional()
|
|
7261
|
-
});
|
|
7262
|
-
GitHubReleaseAssetSchema = exports_external.object({
|
|
7263
|
-
id: exports_external.number(),
|
|
7264
|
-
name: exports_external.string(),
|
|
7265
|
-
url: exports_external.string().url(),
|
|
7266
|
-
browser_download_url: exports_external.string().url(),
|
|
7267
|
-
size: exports_external.number(),
|
|
7268
|
-
content_type: exports_external.string()
|
|
7269
|
-
});
|
|
7270
|
-
GitHubReleaseSchema = exports_external.object({
|
|
7271
|
-
id: exports_external.number(),
|
|
7272
|
-
tag_name: exports_external.string(),
|
|
7273
|
-
name: exports_external.string(),
|
|
7274
|
-
draft: exports_external.boolean(),
|
|
7275
|
-
prerelease: exports_external.boolean(),
|
|
7276
|
-
assets: exports_external.array(GitHubReleaseAssetSchema),
|
|
7277
|
-
published_at: exports_external.string().optional(),
|
|
7278
|
-
tarball_url: exports_external.string().url(),
|
|
7279
|
-
zipball_url: exports_external.string().url()
|
|
7280
|
-
});
|
|
7281
|
-
KitConfigSchema = exports_external.object({
|
|
7282
|
-
name: exports_external.string(),
|
|
7283
|
-
repo: exports_external.string(),
|
|
7284
|
-
owner: exports_external.string(),
|
|
7285
|
-
description: exports_external.string()
|
|
7286
|
-
});
|
|
7287
|
-
AVAILABLE_KITS = {
|
|
7288
|
-
engineer: {
|
|
7289
|
-
name: "ClaudeKit Engineer",
|
|
7290
|
-
repo: "claudekit-engineer",
|
|
7291
|
-
owner: "claudekit",
|
|
7292
|
-
description: "Engineering toolkit for building with Claude"
|
|
7293
|
-
},
|
|
7294
|
-
marketing: {
|
|
7295
|
-
name: "ClaudeKit Marketing",
|
|
7296
|
-
repo: "claudekit-marketing",
|
|
7297
|
-
owner: "claudekit",
|
|
7298
|
-
description: "[Coming Soon] Marketing toolkit"
|
|
7001
|
+
cD = Object.defineProperty;
|
|
7002
|
+
pD = class pD extends x {
|
|
7003
|
+
constructor(u) {
|
|
7004
|
+
super(u, false), G(this, "options"), G(this, "cursor", 0);
|
|
7005
|
+
const { options: F } = u;
|
|
7006
|
+
this.options = Object.entries(F).flatMap(([t, s]) => [{ value: t, group: true, label: t }, ...s.map((C) => ({ ...C, group: t }))]), this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: t }) => t === u.cursorAt), 0), this.on("cursor", (t) => {
|
|
7007
|
+
switch (t) {
|
|
7008
|
+
case "left":
|
|
7009
|
+
case "up":
|
|
7010
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
7011
|
+
break;
|
|
7012
|
+
case "down":
|
|
7013
|
+
case "right":
|
|
7014
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
7015
|
+
break;
|
|
7016
|
+
case "space":
|
|
7017
|
+
this.toggleValue();
|
|
7018
|
+
break;
|
|
7019
|
+
}
|
|
7020
|
+
});
|
|
7021
|
+
}
|
|
7022
|
+
getGroupItems(u) {
|
|
7023
|
+
return this.options.filter((F) => F.group === u);
|
|
7024
|
+
}
|
|
7025
|
+
isGroupSelected(u) {
|
|
7026
|
+
return this.getGroupItems(u).every((F) => this.value.includes(F.value));
|
|
7027
|
+
}
|
|
7028
|
+
toggleValue() {
|
|
7029
|
+
const u = this.options[this.cursor];
|
|
7030
|
+
if (u.group === true) {
|
|
7031
|
+
const F = u.value, t = this.getGroupItems(F);
|
|
7032
|
+
this.isGroupSelected(F) ? this.value = this.value.filter((s) => t.findIndex((C) => C.value === s) === -1) : this.value = [...this.value, ...t.map((s) => s.value)], this.value = Array.from(new Set(this.value));
|
|
7033
|
+
} else {
|
|
7034
|
+
const F = this.value.includes(u.value);
|
|
7035
|
+
this.value = F ? this.value.filter((t) => t !== u.value) : [...this.value, u.value];
|
|
7036
|
+
}
|
|
7299
7037
|
}
|
|
7300
7038
|
};
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
constructor(message, code, statusCode) {
|
|
7325
|
-
super(message);
|
|
7326
|
-
this.code = code;
|
|
7327
|
-
this.statusCode = statusCode;
|
|
7328
|
-
this.name = "ClaudeKitError";
|
|
7039
|
+
fD = Object.defineProperty;
|
|
7040
|
+
vD = class extends x {
|
|
7041
|
+
constructor(u) {
|
|
7042
|
+
super(u, false), K(this, "options"), K(this, "cursor", 0), this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
|
|
7043
|
+
F === "a" && this.toggleAll();
|
|
7044
|
+
}), this.on("cursor", (F) => {
|
|
7045
|
+
switch (F) {
|
|
7046
|
+
case "left":
|
|
7047
|
+
case "up":
|
|
7048
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
7049
|
+
break;
|
|
7050
|
+
case "down":
|
|
7051
|
+
case "right":
|
|
7052
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
7053
|
+
break;
|
|
7054
|
+
case "space":
|
|
7055
|
+
this.toggleValue();
|
|
7056
|
+
break;
|
|
7057
|
+
}
|
|
7058
|
+
});
|
|
7059
|
+
}
|
|
7060
|
+
get _value() {
|
|
7061
|
+
return this.options[this.cursor].value;
|
|
7329
7062
|
}
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7063
|
+
toggleAll() {
|
|
7064
|
+
const u = this.value.length === this.options.length;
|
|
7065
|
+
this.value = u ? [] : this.options.map((F) => F.value);
|
|
7066
|
+
}
|
|
7067
|
+
toggleValue() {
|
|
7068
|
+
const u = this.value.includes(this._value);
|
|
7069
|
+
this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
|
|
7335
7070
|
}
|
|
7336
7071
|
};
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
this.
|
|
7072
|
+
mD = Object.defineProperty;
|
|
7073
|
+
bD = class bD extends x {
|
|
7074
|
+
constructor({ mask: u, ...F }) {
|
|
7075
|
+
super(F), Y(this, "valueWithCursor", ""), Y(this, "_mask", "•"), this._mask = u ?? "•", this.on("finalize", () => {
|
|
7076
|
+
this.valueWithCursor = this.masked;
|
|
7077
|
+
}), this.on("value", () => {
|
|
7078
|
+
if (this.cursor >= this.value.length)
|
|
7079
|
+
this.valueWithCursor = `${this.masked}${import_picocolors2.default.inverse(import_picocolors2.default.hidden("_"))}`;
|
|
7080
|
+
else {
|
|
7081
|
+
const t = this.masked.slice(0, this.cursor), s = this.masked.slice(this.cursor);
|
|
7082
|
+
this.valueWithCursor = `${t}${import_picocolors2.default.inverse(s[0])}${s.slice(1)}`;
|
|
7083
|
+
}
|
|
7084
|
+
});
|
|
7085
|
+
}
|
|
7086
|
+
get cursor() {
|
|
7087
|
+
return this._cursor;
|
|
7088
|
+
}
|
|
7089
|
+
get masked() {
|
|
7090
|
+
return this.value.replaceAll(/./g, this._mask);
|
|
7341
7091
|
}
|
|
7342
7092
|
};
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
this.
|
|
7093
|
+
wD = Object.defineProperty;
|
|
7094
|
+
$D = class extends x {
|
|
7095
|
+
constructor(u) {
|
|
7096
|
+
super(u, false), Z(this, "options"), Z(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
|
|
7097
|
+
switch (F) {
|
|
7098
|
+
case "left":
|
|
7099
|
+
case "up":
|
|
7100
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
7101
|
+
break;
|
|
7102
|
+
case "down":
|
|
7103
|
+
case "right":
|
|
7104
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
7105
|
+
break;
|
|
7106
|
+
}
|
|
7107
|
+
this.changeValue();
|
|
7108
|
+
});
|
|
7109
|
+
}
|
|
7110
|
+
get _value() {
|
|
7111
|
+
return this.options[this.cursor];
|
|
7112
|
+
}
|
|
7113
|
+
changeValue() {
|
|
7114
|
+
this.value = this._value.value;
|
|
7347
7115
|
}
|
|
7348
7116
|
};
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
this.
|
|
7117
|
+
kD = Object.defineProperty;
|
|
7118
|
+
SD = class SD extends x {
|
|
7119
|
+
constructor(u) {
|
|
7120
|
+
super(u, false), H(this, "options"), H(this, "cursor", 0), this.options = u.options;
|
|
7121
|
+
const F = this.options.map(({ value: [t] }) => t?.toLowerCase());
|
|
7122
|
+
this.cursor = Math.max(F.indexOf(u.initialValue), 0), this.on("key", (t) => {
|
|
7123
|
+
if (!F.includes(t))
|
|
7124
|
+
return;
|
|
7125
|
+
const s = this.options.find(({ value: [C] }) => C?.toLowerCase() === t);
|
|
7126
|
+
s && (this.value = s.value, this.state = "submit", this.emit("submit"));
|
|
7127
|
+
});
|
|
7353
7128
|
}
|
|
7354
7129
|
};
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7130
|
+
TD = Object.defineProperty;
|
|
7131
|
+
PD = class PD extends x {
|
|
7132
|
+
constructor(u) {
|
|
7133
|
+
super(u), MD(this, "valueWithCursor", ""), this.on("finalize", () => {
|
|
7134
|
+
this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
|
|
7135
|
+
}), this.on("value", () => {
|
|
7136
|
+
if (this.cursor >= this.value.length)
|
|
7137
|
+
this.valueWithCursor = `${this.value}${import_picocolors2.default.inverse(import_picocolors2.default.hidden("_"))}`;
|
|
7138
|
+
else {
|
|
7139
|
+
const F = this.value.slice(0, this.cursor), t = this.value.slice(this.cursor);
|
|
7140
|
+
this.valueWithCursor = `${F}${import_picocolors2.default.inverse(t[0])}${t.slice(1)}`;
|
|
7141
|
+
}
|
|
7142
|
+
});
|
|
7143
|
+
}
|
|
7144
|
+
get cursor() {
|
|
7145
|
+
return this._cursor;
|
|
7369
7146
|
}
|
|
7370
7147
|
};
|
|
7148
|
+
WD = globalThis.process.platform.startsWith("win");
|
|
7371
7149
|
});
|
|
7372
7150
|
|
|
7373
|
-
// node_modules/
|
|
7374
|
-
var
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
return
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7151
|
+
// node_modules/@clack/prompts/dist/index.mjs
|
|
7152
|
+
var exports_dist = {};
|
|
7153
|
+
__export(exports_dist, {
|
|
7154
|
+
text: () => te,
|
|
7155
|
+
spinner: () => de,
|
|
7156
|
+
selectKey: () => ne,
|
|
7157
|
+
select: () => ie,
|
|
7158
|
+
password: () => re,
|
|
7159
|
+
outro: () => $e,
|
|
7160
|
+
note: () => le,
|
|
7161
|
+
multiselect: () => ae,
|
|
7162
|
+
log: () => f2,
|
|
7163
|
+
isCancel: () => lD,
|
|
7164
|
+
intro: () => oe,
|
|
7165
|
+
groupMultiselect: () => ce,
|
|
7166
|
+
group: () => he,
|
|
7167
|
+
confirm: () => se,
|
|
7168
|
+
cancel: () => ue
|
|
7169
|
+
});
|
|
7170
|
+
import h from "node:process";
|
|
7171
|
+
function q2() {
|
|
7172
|
+
return h.platform !== "win32" ? h.env.TERM !== "linux" : Boolean(h.env.CI) || Boolean(h.env.WT_SESSION) || Boolean(h.env.TERMINUS_SUBLIME) || h.env.ConEmuTask === "{cmd::Cmder}" || h.env.TERM_PROGRAM === "Terminus-Sublime" || h.env.TERM_PROGRAM === "vscode" || h.env.TERM === "xterm-256color" || h.env.TERM === "alacritty" || h.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
7173
|
+
}
|
|
7174
|
+
function me() {
|
|
7175
|
+
const r2 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
7176
|
+
return new RegExp(r2, "g");
|
|
7177
|
+
}
|
|
7178
|
+
var import_picocolors3, import_sisteransi2, _2, o = (r2, n) => _2 ? r2 : n, H2, I2, x2, S2, K2, a2, d2, b2, E, C, w2, M2, U2, B, Z2, z2, X2, J2, Y2, Q2, ee, y2 = (r2) => {
|
|
7179
|
+
switch (r2) {
|
|
7180
|
+
case "initial":
|
|
7181
|
+
case "active":
|
|
7182
|
+
return import_picocolors3.default.cyan(H2);
|
|
7183
|
+
case "cancel":
|
|
7184
|
+
return import_picocolors3.default.red(I2);
|
|
7185
|
+
case "error":
|
|
7186
|
+
return import_picocolors3.default.yellow(x2);
|
|
7187
|
+
case "submit":
|
|
7188
|
+
return import_picocolors3.default.green(S2);
|
|
7189
|
+
}
|
|
7190
|
+
}, te = (r2) => new PD({ validate: r2.validate, placeholder: r2.placeholder, defaultValue: r2.defaultValue, initialValue: r2.initialValue, render() {
|
|
7191
|
+
const n = `${import_picocolors3.default.gray(a2)}
|
|
7192
|
+
${y2(this.state)} ${r2.message}
|
|
7193
|
+
`, i = r2.placeholder ? import_picocolors3.default.inverse(r2.placeholder[0]) + import_picocolors3.default.dim(r2.placeholder.slice(1)) : import_picocolors3.default.inverse(import_picocolors3.default.hidden("_")), t = this.value ? this.valueWithCursor : i;
|
|
7194
|
+
switch (this.state) {
|
|
7195
|
+
case "error":
|
|
7196
|
+
return `${n.trim()}
|
|
7197
|
+
${import_picocolors3.default.yellow(a2)} ${t}
|
|
7198
|
+
${import_picocolors3.default.yellow(d2)} ${import_picocolors3.default.yellow(this.error)}
|
|
7199
|
+
`;
|
|
7200
|
+
case "submit":
|
|
7201
|
+
return `${n}${import_picocolors3.default.gray(a2)} ${import_picocolors3.default.dim(this.value || r2.placeholder)}`;
|
|
7202
|
+
case "cancel":
|
|
7203
|
+
return `${n}${import_picocolors3.default.gray(a2)} ${import_picocolors3.default.strikethrough(import_picocolors3.default.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
7204
|
+
` + import_picocolors3.default.gray(a2) : ""}`;
|
|
7205
|
+
default:
|
|
7206
|
+
return `${n}${import_picocolors3.default.cyan(a2)} ${t}
|
|
7207
|
+
${import_picocolors3.default.cyan(d2)}
|
|
7208
|
+
`;
|
|
7209
|
+
}
|
|
7210
|
+
} }).prompt(), re = (r2) => new bD({ validate: r2.validate, mask: r2.mask ?? U2, render() {
|
|
7211
|
+
const n = `${import_picocolors3.default.gray(a2)}
|
|
7212
|
+
${y2(this.state)} ${r2.message}
|
|
7213
|
+
`, i = this.valueWithCursor, t = this.masked;
|
|
7214
|
+
switch (this.state) {
|
|
7215
|
+
case "error":
|
|
7216
|
+
return `${n.trim()}
|
|
7217
|
+
${import_picocolors3.default.yellow(a2)} ${t}
|
|
7218
|
+
${import_picocolors3.default.yellow(d2)} ${import_picocolors3.default.yellow(this.error)}
|
|
7219
|
+
`;
|
|
7220
|
+
case "submit":
|
|
7221
|
+
return `${n}${import_picocolors3.default.gray(a2)} ${import_picocolors3.default.dim(t)}`;
|
|
7222
|
+
case "cancel":
|
|
7223
|
+
return `${n}${import_picocolors3.default.gray(a2)} ${import_picocolors3.default.strikethrough(import_picocolors3.default.dim(t ?? ""))}${t ? `
|
|
7224
|
+
` + import_picocolors3.default.gray(a2) : ""}`;
|
|
7225
|
+
default:
|
|
7226
|
+
return `${n}${import_picocolors3.default.cyan(a2)} ${i}
|
|
7227
|
+
${import_picocolors3.default.cyan(d2)}
|
|
7228
|
+
`;
|
|
7229
|
+
}
|
|
7230
|
+
} }).prompt(), se = (r2) => {
|
|
7231
|
+
const n = r2.active ?? "Yes", i = r2.inactive ?? "No";
|
|
7232
|
+
return new BD({ active: n, inactive: i, initialValue: r2.initialValue ?? true, render() {
|
|
7233
|
+
const t = `${import_picocolors3.default.gray(a2)}
|
|
7234
|
+
${y2(this.state)} ${r2.message}
|
|
7235
|
+
`, s = this.value ? n : i;
|
|
7236
|
+
switch (this.state) {
|
|
7237
|
+
case "submit":
|
|
7238
|
+
return `${t}${import_picocolors3.default.gray(a2)} ${import_picocolors3.default.dim(s)}`;
|
|
7239
|
+
case "cancel":
|
|
7240
|
+
return `${t}${import_picocolors3.default.gray(a2)} ${import_picocolors3.default.strikethrough(import_picocolors3.default.dim(s))}
|
|
7241
|
+
${import_picocolors3.default.gray(a2)}`;
|
|
7242
|
+
default:
|
|
7243
|
+
return `${t}${import_picocolors3.default.cyan(a2)} ${this.value ? `${import_picocolors3.default.green(b2)} ${n}` : `${import_picocolors3.default.dim(E)} ${import_picocolors3.default.dim(n)}`} ${import_picocolors3.default.dim("/")} ${this.value ? `${import_picocolors3.default.dim(E)} ${import_picocolors3.default.dim(i)}` : `${import_picocolors3.default.green(b2)} ${i}`}
|
|
7244
|
+
${import_picocolors3.default.cyan(d2)}
|
|
7245
|
+
`;
|
|
7246
|
+
}
|
|
7247
|
+
} }).prompt();
|
|
7248
|
+
}, ie = (r2) => {
|
|
7249
|
+
const n = (t, s) => {
|
|
7250
|
+
const c2 = t.label ?? String(t.value);
|
|
7251
|
+
return s === "active" ? `${import_picocolors3.default.green(b2)} ${c2} ${t.hint ? import_picocolors3.default.dim(`(${t.hint})`) : ""}` : s === "selected" ? `${import_picocolors3.default.dim(c2)}` : s === "cancelled" ? `${import_picocolors3.default.strikethrough(import_picocolors3.default.dim(c2))}` : `${import_picocolors3.default.dim(E)} ${import_picocolors3.default.dim(c2)}`;
|
|
7252
|
+
};
|
|
7253
|
+
let i = 0;
|
|
7254
|
+
return new $D({ options: r2.options, initialValue: r2.initialValue, render() {
|
|
7255
|
+
const t = `${import_picocolors3.default.gray(a2)}
|
|
7256
|
+
${y2(this.state)} ${r2.message}
|
|
7257
|
+
`;
|
|
7258
|
+
switch (this.state) {
|
|
7259
|
+
case "submit":
|
|
7260
|
+
return `${t}${import_picocolors3.default.gray(a2)} ${n(this.options[this.cursor], "selected")}`;
|
|
7261
|
+
case "cancel":
|
|
7262
|
+
return `${t}${import_picocolors3.default.gray(a2)} ${n(this.options[this.cursor], "cancelled")}
|
|
7263
|
+
${import_picocolors3.default.gray(a2)}`;
|
|
7264
|
+
default: {
|
|
7265
|
+
const s = r2.maxItems === undefined ? 1 / 0 : Math.max(r2.maxItems, 5);
|
|
7266
|
+
this.cursor >= i + s - 3 ? i = Math.max(Math.min(this.cursor - s + 3, this.options.length - s), 0) : this.cursor < i + 2 && (i = Math.max(this.cursor - 2, 0));
|
|
7267
|
+
const c2 = s < this.options.length && i > 0, l2 = s < this.options.length && i + s < this.options.length;
|
|
7268
|
+
return `${t}${import_picocolors3.default.cyan(a2)} ${this.options.slice(i, i + s).map((u, m2, $2) => m2 === 0 && c2 ? import_picocolors3.default.dim("...") : m2 === $2.length - 1 && l2 ? import_picocolors3.default.dim("...") : n(u, m2 + i === this.cursor ? "active" : "inactive")).join(`
|
|
7269
|
+
${import_picocolors3.default.cyan(a2)} `)}
|
|
7270
|
+
${import_picocolors3.default.cyan(d2)}
|
|
7271
|
+
`;
|
|
7426
7272
|
}
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
"
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7273
|
+
}
|
|
7274
|
+
} }).prompt();
|
|
7275
|
+
}, ne = (r2) => {
|
|
7276
|
+
const n = (i, t = "inactive") => {
|
|
7277
|
+
const s = i.label ?? String(i.value);
|
|
7278
|
+
return t === "selected" ? `${import_picocolors3.default.dim(s)}` : t === "cancelled" ? `${import_picocolors3.default.strikethrough(import_picocolors3.default.dim(s))}` : t === "active" ? `${import_picocolors3.default.bgCyan(import_picocolors3.default.gray(` ${i.value} `))} ${s} ${i.hint ? import_picocolors3.default.dim(`(${i.hint})`) : ""}` : `${import_picocolors3.default.gray(import_picocolors3.default.bgWhite(import_picocolors3.default.inverse(` ${i.value} `)))} ${s} ${i.hint ? import_picocolors3.default.dim(`(${i.hint})`) : ""}`;
|
|
7279
|
+
};
|
|
7280
|
+
return new SD({ options: r2.options, initialValue: r2.initialValue, render() {
|
|
7281
|
+
const i = `${import_picocolors3.default.gray(a2)}
|
|
7282
|
+
${y2(this.state)} ${r2.message}
|
|
7283
|
+
`;
|
|
7284
|
+
switch (this.state) {
|
|
7285
|
+
case "submit":
|
|
7286
|
+
return `${i}${import_picocolors3.default.gray(a2)} ${n(this.options.find((t) => t.value === this.value), "selected")}`;
|
|
7287
|
+
case "cancel":
|
|
7288
|
+
return `${i}${import_picocolors3.default.gray(a2)} ${n(this.options[0], "cancelled")}
|
|
7289
|
+
${import_picocolors3.default.gray(a2)}`;
|
|
7290
|
+
default:
|
|
7291
|
+
return `${i}${import_picocolors3.default.cyan(a2)} ${this.options.map((t, s) => n(t, s === this.cursor ? "active" : "inactive")).join(`
|
|
7292
|
+
${import_picocolors3.default.cyan(a2)} `)}
|
|
7293
|
+
${import_picocolors3.default.cyan(d2)}
|
|
7294
|
+
`;
|
|
7295
|
+
}
|
|
7296
|
+
} }).prompt();
|
|
7297
|
+
}, ae = (r2) => {
|
|
7298
|
+
const n = (i, t) => {
|
|
7299
|
+
const s = i.label ?? String(i.value);
|
|
7300
|
+
return t === "active" ? `${import_picocolors3.default.cyan(C)} ${s} ${i.hint ? import_picocolors3.default.dim(`(${i.hint})`) : ""}` : t === "selected" ? `${import_picocolors3.default.green(w2)} ${import_picocolors3.default.dim(s)}` : t === "cancelled" ? `${import_picocolors3.default.strikethrough(import_picocolors3.default.dim(s))}` : t === "active-selected" ? `${import_picocolors3.default.green(w2)} ${s} ${i.hint ? import_picocolors3.default.dim(`(${i.hint})`) : ""}` : t === "submitted" ? `${import_picocolors3.default.dim(s)}` : `${import_picocolors3.default.dim(M2)} ${import_picocolors3.default.dim(s)}`;
|
|
7301
|
+
};
|
|
7302
|
+
return new vD({ options: r2.options, initialValues: r2.initialValues, required: r2.required ?? true, cursorAt: r2.cursorAt, validate(i) {
|
|
7303
|
+
if (this.required && i.length === 0)
|
|
7304
|
+
return `Please select at least one option.
|
|
7305
|
+
${import_picocolors3.default.reset(import_picocolors3.default.dim(`Press ${import_picocolors3.default.gray(import_picocolors3.default.bgWhite(import_picocolors3.default.inverse(" space ")))} to select, ${import_picocolors3.default.gray(import_picocolors3.default.bgWhite(import_picocolors3.default.inverse(" enter ")))} to submit`))}`;
|
|
7306
|
+
}, render() {
|
|
7307
|
+
let i = `${import_picocolors3.default.gray(a2)}
|
|
7308
|
+
${y2(this.state)} ${r2.message}
|
|
7309
|
+
`;
|
|
7310
|
+
switch (this.state) {
|
|
7311
|
+
case "submit":
|
|
7312
|
+
return `${i}${import_picocolors3.default.gray(a2)} ${this.options.filter(({ value: t }) => this.value.includes(t)).map((t) => n(t, "submitted")).join(import_picocolors3.default.dim(", ")) || import_picocolors3.default.dim("none")}`;
|
|
7313
|
+
case "cancel": {
|
|
7314
|
+
const t = this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => n(s, "cancelled")).join(import_picocolors3.default.dim(", "));
|
|
7315
|
+
return `${i}${import_picocolors3.default.gray(a2)} ${t.trim() ? `${t}
|
|
7316
|
+
${import_picocolors3.default.gray(a2)}` : ""}`;
|
|
7446
7317
|
}
|
|
7447
|
-
|
|
7448
|
-
|
|
7318
|
+
case "error": {
|
|
7319
|
+
const t = this.error.split(`
|
|
7320
|
+
`).map((s, c2) => c2 === 0 ? `${import_picocolors3.default.yellow(d2)} ${import_picocolors3.default.yellow(s)}` : ` ${s}`).join(`
|
|
7321
|
+
`);
|
|
7322
|
+
return i + import_picocolors3.default.yellow(a2) + " " + this.options.map((s, c2) => {
|
|
7323
|
+
const l2 = this.value.includes(s.value), u = c2 === this.cursor;
|
|
7324
|
+
return u && l2 ? n(s, "active-selected") : l2 ? n(s, "selected") : n(s, u ? "active" : "inactive");
|
|
7325
|
+
}).join(`
|
|
7326
|
+
${import_picocolors3.default.yellow(a2)} `) + `
|
|
7327
|
+
` + t + `
|
|
7328
|
+
`;
|
|
7449
7329
|
}
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7330
|
+
default:
|
|
7331
|
+
return `${i}${import_picocolors3.default.cyan(a2)} ${this.options.map((t, s) => {
|
|
7332
|
+
const c2 = this.value.includes(t.value), l2 = s === this.cursor;
|
|
7333
|
+
return l2 && c2 ? n(t, "active-selected") : c2 ? n(t, "selected") : n(t, l2 ? "active" : "inactive");
|
|
7334
|
+
}).join(`
|
|
7335
|
+
${import_picocolors3.default.cyan(a2)} `)}
|
|
7336
|
+
${import_picocolors3.default.cyan(d2)}
|
|
7337
|
+
`;
|
|
7338
|
+
}
|
|
7339
|
+
} }).prompt();
|
|
7340
|
+
}, ce = (r2) => {
|
|
7341
|
+
const n = (i, t, s = []) => {
|
|
7342
|
+
const c2 = i.label ?? String(i.value), l2 = typeof i.group == "string", u = l2 && (s[s.indexOf(i) + 1] ?? { group: true }), m2 = l2 && u.group === true, $2 = l2 ? `${m2 ? d2 : a2} ` : "";
|
|
7343
|
+
return t === "active" ? `${import_picocolors3.default.dim($2)}${import_picocolors3.default.cyan(C)} ${c2} ${i.hint ? import_picocolors3.default.dim(`(${i.hint})`) : ""}` : t === "group-active" ? `${$2}${import_picocolors3.default.cyan(C)} ${import_picocolors3.default.dim(c2)}` : t === "group-active-selected" ? `${$2}${import_picocolors3.default.green(w2)} ${import_picocolors3.default.dim(c2)}` : t === "selected" ? `${import_picocolors3.default.dim($2)}${import_picocolors3.default.green(w2)} ${import_picocolors3.default.dim(c2)}` : t === "cancelled" ? `${import_picocolors3.default.strikethrough(import_picocolors3.default.dim(c2))}` : t === "active-selected" ? `${import_picocolors3.default.dim($2)}${import_picocolors3.default.green(w2)} ${c2} ${i.hint ? import_picocolors3.default.dim(`(${i.hint})`) : ""}` : t === "submitted" ? `${import_picocolors3.default.dim(c2)}` : `${import_picocolors3.default.dim($2)}${import_picocolors3.default.dim(M2)} ${import_picocolors3.default.dim(c2)}`;
|
|
7344
|
+
};
|
|
7345
|
+
return new pD({ options: r2.options, initialValues: r2.initialValues, required: r2.required ?? true, cursorAt: r2.cursorAt, validate(i) {
|
|
7346
|
+
if (this.required && i.length === 0)
|
|
7347
|
+
return `Please select at least one option.
|
|
7348
|
+
${import_picocolors3.default.reset(import_picocolors3.default.dim(`Press ${import_picocolors3.default.gray(import_picocolors3.default.bgWhite(import_picocolors3.default.inverse(" space ")))} to select, ${import_picocolors3.default.gray(import_picocolors3.default.bgWhite(import_picocolors3.default.inverse(" enter ")))} to submit`))}`;
|
|
7349
|
+
}, render() {
|
|
7350
|
+
let i = `${import_picocolors3.default.gray(a2)}
|
|
7351
|
+
${y2(this.state)} ${r2.message}
|
|
7352
|
+
`;
|
|
7353
|
+
switch (this.state) {
|
|
7354
|
+
case "submit":
|
|
7355
|
+
return `${i}${import_picocolors3.default.gray(a2)} ${this.options.filter(({ value: t }) => this.value.includes(t)).map((t) => n(t, "submitted")).join(import_picocolors3.default.dim(", "))}`;
|
|
7356
|
+
case "cancel": {
|
|
7357
|
+
const t = this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => n(s, "cancelled")).join(import_picocolors3.default.dim(", "));
|
|
7358
|
+
return `${i}${import_picocolors3.default.gray(a2)} ${t.trim() ? `${t}
|
|
7359
|
+
${import_picocolors3.default.gray(a2)}` : ""}`;
|
|
7460
7360
|
}
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
if (compareSegments(v4, r4) !== 0)
|
|
7473
|
-
return false;
|
|
7474
|
-
if (compareSegments(vp.split("."), rp.split(".")) === -1)
|
|
7475
|
-
return false;
|
|
7361
|
+
case "error": {
|
|
7362
|
+
const t = this.error.split(`
|
|
7363
|
+
`).map((s, c2) => c2 === 0 ? `${import_picocolors3.default.yellow(d2)} ${import_picocolors3.default.yellow(s)}` : ` ${s}`).join(`
|
|
7364
|
+
`);
|
|
7365
|
+
return `${i}${import_picocolors3.default.yellow(a2)} ${this.options.map((s, c2, l2) => {
|
|
7366
|
+
const u = this.value.includes(s.value) || s.group === true && this.isGroupSelected(`${s.value}`), m2 = c2 === this.cursor;
|
|
7367
|
+
return !m2 && typeof s.group == "string" && this.options[this.cursor].value === s.group ? n(s, u ? "group-active-selected" : "group-active", l2) : m2 && u ? n(s, "active-selected", l2) : u ? n(s, "selected", l2) : n(s, m2 ? "active" : "inactive", l2);
|
|
7368
|
+
}).join(`
|
|
7369
|
+
${import_picocolors3.default.yellow(a2)} `)}
|
|
7370
|
+
${t}
|
|
7371
|
+
`;
|
|
7476
7372
|
}
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7373
|
+
default:
|
|
7374
|
+
return `${i}${import_picocolors3.default.cyan(a2)} ${this.options.map((t, s, c2) => {
|
|
7375
|
+
const l2 = this.value.includes(t.value) || t.group === true && this.isGroupSelected(`${t.value}`), u = s === this.cursor;
|
|
7376
|
+
return !u && typeof t.group == "string" && this.options[this.cursor].value === t.group ? n(t, l2 ? "group-active-selected" : "group-active", c2) : u && l2 ? n(t, "active-selected", c2) : l2 ? n(t, "selected", c2) : n(t, u ? "active" : "inactive", c2);
|
|
7377
|
+
}).join(`
|
|
7378
|
+
${import_picocolors3.default.cyan(a2)} `)}
|
|
7379
|
+
${import_picocolors3.default.cyan(d2)}
|
|
7380
|
+
`;
|
|
7381
|
+
}
|
|
7382
|
+
} }).prompt();
|
|
7383
|
+
}, R2 = (r2) => r2.replace(me(), ""), le = (r2 = "", n = "") => {
|
|
7384
|
+
const i = `
|
|
7385
|
+
${r2}
|
|
7386
|
+
`.split(`
|
|
7387
|
+
`), t = R2(n).length, s = Math.max(i.reduce((l2, u) => (u = R2(u), u.length > l2 ? u.length : l2), 0), t) + 2, c2 = i.map((l2) => `${import_picocolors3.default.gray(a2)} ${import_picocolors3.default.dim(l2)}${" ".repeat(s - R2(l2).length)}${import_picocolors3.default.gray(a2)}`).join(`
|
|
7388
|
+
`);
|
|
7389
|
+
process.stdout.write(`${import_picocolors3.default.gray(a2)}
|
|
7390
|
+
${import_picocolors3.default.green(S2)} ${import_picocolors3.default.reset(n)} ${import_picocolors3.default.gray(B.repeat(Math.max(s - t - 1, 1)) + Z2)}
|
|
7391
|
+
${c2}
|
|
7392
|
+
${import_picocolors3.default.gray(z2 + B.repeat(s + 2) + X2)}
|
|
7393
|
+
`);
|
|
7394
|
+
}, ue = (r2 = "") => {
|
|
7395
|
+
process.stdout.write(`${import_picocolors3.default.gray(d2)} ${import_picocolors3.default.red(r2)}
|
|
7396
|
+
|
|
7397
|
+
`);
|
|
7398
|
+
}, oe = (r2 = "") => {
|
|
7399
|
+
process.stdout.write(`${import_picocolors3.default.gray(K2)} ${r2}
|
|
7400
|
+
`);
|
|
7401
|
+
}, $e = (r2 = "") => {
|
|
7402
|
+
process.stdout.write(`${import_picocolors3.default.gray(a2)}
|
|
7403
|
+
${import_picocolors3.default.gray(d2)} ${r2}
|
|
7404
|
+
|
|
7405
|
+
`);
|
|
7406
|
+
}, f2, de = () => {
|
|
7407
|
+
const r2 = _2 ? ["◒", "◐", "◓", "◑"] : ["•", "o", "O", "0"], n = _2 ? 80 : 120;
|
|
7408
|
+
let i, t, s = false, c2 = "";
|
|
7409
|
+
const l2 = (v2 = "") => {
|
|
7410
|
+
s = true, i = OD(), c2 = v2.replace(/\.+$/, ""), process.stdout.write(`${import_picocolors3.default.gray(a2)}
|
|
7411
|
+
`);
|
|
7412
|
+
let g2 = 0, p = 0;
|
|
7413
|
+
t = setInterval(() => {
|
|
7414
|
+
const O2 = import_picocolors3.default.magenta(r2[g2]), P2 = ".".repeat(Math.floor(p)).slice(0, 3);
|
|
7415
|
+
process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${O2} ${c2}${P2}`), g2 = g2 + 1 < r2.length ? g2 + 1 : 0, p = p < r2.length ? p + 0.125 : 0;
|
|
7416
|
+
}, n);
|
|
7417
|
+
}, u = (v2 = "", g2 = 0) => {
|
|
7418
|
+
c2 = v2 ?? c2, s = false, clearInterval(t);
|
|
7419
|
+
const p = g2 === 0 ? import_picocolors3.default.green(S2) : g2 === 1 ? import_picocolors3.default.red(I2) : import_picocolors3.default.red(x2);
|
|
7420
|
+
process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${p} ${c2}
|
|
7421
|
+
`), i();
|
|
7422
|
+
}, m2 = (v2 = "") => {
|
|
7423
|
+
c2 = v2 ?? c2;
|
|
7424
|
+
}, $2 = (v2) => {
|
|
7425
|
+
const g2 = v2 > 1 ? "Something went wrong" : "Canceled";
|
|
7426
|
+
s && u(g2, v2);
|
|
7427
|
+
};
|
|
7428
|
+
return process.on("uncaughtExceptionMonitor", () => $2(2)), process.on("unhandledRejection", () => $2(2)), process.on("SIGINT", () => $2(1)), process.on("SIGTERM", () => $2(1)), process.on("exit", $2), { start: l2, stop: u, message: m2 };
|
|
7429
|
+
}, he = async (r2, n) => {
|
|
7430
|
+
const i = {}, t = Object.keys(r2);
|
|
7431
|
+
for (const s of t) {
|
|
7432
|
+
const c2 = r2[s], l2 = await c2({ results: i })?.catch((u) => {
|
|
7433
|
+
throw u;
|
|
7434
|
+
});
|
|
7435
|
+
if (typeof n?.onCancel == "function" && lD(l2)) {
|
|
7436
|
+
i[s] = "canceled", n.onCancel({ results: i });
|
|
7437
|
+
continue;
|
|
7438
|
+
}
|
|
7439
|
+
i[s] = l2;
|
|
7440
|
+
}
|
|
7441
|
+
return i;
|
|
7442
|
+
};
|
|
7443
|
+
var init_dist2 = __esm(() => {
|
|
7444
|
+
init_dist();
|
|
7445
|
+
init_dist();
|
|
7446
|
+
import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
7447
|
+
import_sisteransi2 = __toESM(require_src(), 1);
|
|
7448
|
+
_2 = q2();
|
|
7449
|
+
H2 = o("◆", "*");
|
|
7450
|
+
I2 = o("■", "x");
|
|
7451
|
+
x2 = o("▲", "x");
|
|
7452
|
+
S2 = o("◇", "o");
|
|
7453
|
+
K2 = o("┌", "T");
|
|
7454
|
+
a2 = o("│", "|");
|
|
7455
|
+
d2 = o("└", "—");
|
|
7456
|
+
b2 = o("●", ">");
|
|
7457
|
+
E = o("○", " ");
|
|
7458
|
+
C = o("◻", "[•]");
|
|
7459
|
+
w2 = o("◼", "[+]");
|
|
7460
|
+
M2 = o("◻", "[ ]");
|
|
7461
|
+
U2 = o("▪", "•");
|
|
7462
|
+
B = o("─", "-");
|
|
7463
|
+
Z2 = o("╮", "+");
|
|
7464
|
+
z2 = o("├", "+");
|
|
7465
|
+
X2 = o("╯", "+");
|
|
7466
|
+
J2 = o("●", "•");
|
|
7467
|
+
Y2 = o("◆", "*");
|
|
7468
|
+
Q2 = o("▲", "!");
|
|
7469
|
+
ee = o("■", "x");
|
|
7470
|
+
f2 = { message: (r2 = "", { symbol: n = import_picocolors3.default.gray(a2) } = {}) => {
|
|
7471
|
+
const i = [`${import_picocolors3.default.gray(a2)}`];
|
|
7472
|
+
if (r2) {
|
|
7473
|
+
const [t, ...s] = r2.split(`
|
|
7474
|
+
`);
|
|
7475
|
+
i.push(`${n} ${t}`, ...s.map((c2) => `${import_picocolors3.default.gray(a2)} ${c2}`));
|
|
7476
|
+
}
|
|
7477
|
+
process.stdout.write(`${i.join(`
|
|
7478
|
+
`)}
|
|
7479
|
+
`);
|
|
7480
|
+
}, info: (r2) => {
|
|
7481
|
+
f2.message(r2, { symbol: import_picocolors3.default.blue(J2) });
|
|
7482
|
+
}, success: (r2) => {
|
|
7483
|
+
f2.message(r2, { symbol: import_picocolors3.default.green(Y2) });
|
|
7484
|
+
}, step: (r2) => {
|
|
7485
|
+
f2.message(r2, { symbol: import_picocolors3.default.green(S2) });
|
|
7486
|
+
}, warn: (r2) => {
|
|
7487
|
+
f2.message(r2, { symbol: import_picocolors3.default.yellow(Q2) });
|
|
7488
|
+
}, warning: (r2) => {
|
|
7489
|
+
f2.warn(r2);
|
|
7490
|
+
}, error: (r2) => {
|
|
7491
|
+
f2.message(r2, { symbol: import_picocolors3.default.red(ee) });
|
|
7492
|
+
} };
|
|
7493
7493
|
});
|
|
7494
7494
|
|
|
7495
7495
|
// src/utils/environment.ts
|
|
@@ -8841,7 +8841,7 @@ var require_node = __commonJS((exports, module) => {
|
|
|
8841
8841
|
var tty = __require("tty");
|
|
8842
8842
|
var util3 = __require("util");
|
|
8843
8843
|
exports.init = init;
|
|
8844
|
-
exports.log =
|
|
8844
|
+
exports.log = log2;
|
|
8845
8845
|
exports.formatArgs = formatArgs;
|
|
8846
8846
|
exports.save = save;
|
|
8847
8847
|
exports.load = load;
|
|
@@ -8973,7 +8973,7 @@ var require_node = __commonJS((exports, module) => {
|
|
|
8973
8973
|
}
|
|
8974
8974
|
return new Date().toISOString() + " ";
|
|
8975
8975
|
}
|
|
8976
|
-
function
|
|
8976
|
+
function log2(...args) {
|
|
8977
8977
|
return process.stderr.write(util3.formatWithOptions(exports.inspectOpts, ...args) + `
|
|
8978
8978
|
`);
|
|
8979
8979
|
}
|
|
@@ -14925,7 +14925,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
14925
14925
|
// package.json
|
|
14926
14926
|
var package_default = {
|
|
14927
14927
|
name: "claudekit-cli",
|
|
14928
|
-
version: "3.7.
|
|
14928
|
+
version: "3.7.1",
|
|
14929
14929
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
14930
14930
|
type: "module",
|
|
14931
14931
|
repository: {
|
|
@@ -15010,9 +15010,6 @@ var package_default = {
|
|
|
15010
15010
|
}
|
|
15011
15011
|
};
|
|
15012
15012
|
|
|
15013
|
-
// src/commands/doctor.ts
|
|
15014
|
-
init_dist2();
|
|
15015
|
-
|
|
15016
15013
|
// src/lib/health-checks/types.ts
|
|
15017
15014
|
init_zod();
|
|
15018
15015
|
var CheckStatusSchema = exports_external.enum(["pass", "warn", "fail", "info"]);
|
|
@@ -15091,7 +15088,7 @@ class CheckRunner {
|
|
|
15091
15088
|
logger.verbose("Starting health check run");
|
|
15092
15089
|
const filteredCheckers = this.filterCheckersByGroup();
|
|
15093
15090
|
logger.verbose(`Running ${filteredCheckers.length} checker(s)`, {
|
|
15094
|
-
groups: filteredCheckers.map((
|
|
15091
|
+
groups: filteredCheckers.map((c) => c.group)
|
|
15095
15092
|
});
|
|
15096
15093
|
const allResults = await this.executeCheckersInParallel(filteredCheckers);
|
|
15097
15094
|
const filteredResults = this.filterChecksByPriority(allResults);
|
|
@@ -15535,21 +15532,21 @@ function getInstallerMethods(dependency, osInfo) {
|
|
|
15535
15532
|
installers = NODEJS_INSTALLERS;
|
|
15536
15533
|
break;
|
|
15537
15534
|
}
|
|
15538
|
-
installers = installers.filter((
|
|
15535
|
+
installers = installers.filter((m) => m.platform === osInfo.platform);
|
|
15539
15536
|
if (osInfo.platform === "darwin" && !osInfo.hasHomebrew) {
|
|
15540
|
-
installers = installers.filter((
|
|
15537
|
+
installers = installers.filter((m) => !m.command.includes("brew"));
|
|
15541
15538
|
} else if (osInfo.platform === "linux") {
|
|
15542
15539
|
if (!osInfo.hasApt) {
|
|
15543
|
-
installers = installers.filter((
|
|
15540
|
+
installers = installers.filter((m) => !m.command.includes("apt"));
|
|
15544
15541
|
}
|
|
15545
15542
|
if (!osInfo.hasDnf) {
|
|
15546
|
-
installers = installers.filter((
|
|
15543
|
+
installers = installers.filter((m) => !m.command.includes("dnf"));
|
|
15547
15544
|
}
|
|
15548
15545
|
if (!osInfo.hasPacman) {
|
|
15549
|
-
installers = installers.filter((
|
|
15546
|
+
installers = installers.filter((m) => !m.command.includes("pacman"));
|
|
15550
15547
|
}
|
|
15551
15548
|
}
|
|
15552
|
-
installers.sort((
|
|
15549
|
+
installers.sort((a, b) => a.priority - b.priority);
|
|
15553
15550
|
return installers;
|
|
15554
15551
|
}
|
|
15555
15552
|
async function installDependency(dependency, method) {
|
|
@@ -15598,9 +15595,9 @@ async function installDependency(dependency, method) {
|
|
|
15598
15595
|
init_logger();
|
|
15599
15596
|
var execAsync3 = promisify3(exec3);
|
|
15600
15597
|
var MIN_GH_CLI_VERSION = "2.20.0";
|
|
15601
|
-
function compareVersions2(
|
|
15602
|
-
const partsA =
|
|
15603
|
-
const partsB =
|
|
15598
|
+
function compareVersions2(a, b) {
|
|
15599
|
+
const partsA = a.split(".").map(Number);
|
|
15600
|
+
const partsB = b.split(".").map(Number);
|
|
15604
15601
|
const maxLen = Math.max(partsA.length, partsB.length);
|
|
15605
15602
|
for (let i = 0;i < maxLen; i++) {
|
|
15606
15603
|
const numA = partsA[i] ?? 0;
|
|
@@ -16646,7 +16643,7 @@ class ClaudekitChecker {
|
|
|
16646
16643
|
const checkedFiles = new Set;
|
|
16647
16644
|
if (globalExists) {
|
|
16648
16645
|
const files = await readdir2(globalHooksDir, { withFileTypes: false });
|
|
16649
|
-
const hooks = files.filter((
|
|
16646
|
+
const hooks = files.filter((f) => HOOK_EXTENSIONS.some((ext) => f.endsWith(ext)));
|
|
16650
16647
|
hooks.forEach((hook) => {
|
|
16651
16648
|
const fullPath = join4(globalHooksDir, hook);
|
|
16652
16649
|
checkedFiles.add(this.normalizePath(fullPath));
|
|
@@ -16656,7 +16653,7 @@ class ClaudekitChecker {
|
|
|
16656
16653
|
const normalizedProject = this.normalizePath(projectHooksDir);
|
|
16657
16654
|
if (projectExists && normalizedProject !== normalizedGlobal) {
|
|
16658
16655
|
const files = await readdir2(projectHooksDir, { withFileTypes: false });
|
|
16659
|
-
const hooks = files.filter((
|
|
16656
|
+
const hooks = files.filter((f) => HOOK_EXTENSIONS.some((ext) => f.endsWith(ext)));
|
|
16660
16657
|
hooks.forEach((hook) => {
|
|
16661
16658
|
const fullPath = join4(projectHooksDir, hook);
|
|
16662
16659
|
checkedFiles.add(this.normalizePath(fullPath));
|
|
@@ -16772,7 +16769,7 @@ class ClaudekitChecker {
|
|
|
16772
16769
|
try {
|
|
16773
16770
|
const content = await readFile3(claudeMdPath, "utf-8");
|
|
16774
16771
|
const refPattern = /@([^\s\)]+)/g;
|
|
16775
|
-
const refs = [...content.matchAll(refPattern)].map((
|
|
16772
|
+
const refs = [...content.matchAll(refPattern)].map((m) => m[1]);
|
|
16776
16773
|
if (refs.length === 0) {
|
|
16777
16774
|
return {
|
|
16778
16775
|
id: "ck-path-refs-valid",
|
|
@@ -17259,9 +17256,9 @@ class VersionFormatter {
|
|
|
17259
17256
|
return parsed ? Boolean(parsed.prerelease) : false;
|
|
17260
17257
|
}
|
|
17261
17258
|
static sortVersions(versions) {
|
|
17262
|
-
return [...versions].sort((
|
|
17263
|
-
const normA = VersionFormatter.normalize(
|
|
17264
|
-
const normB = VersionFormatter.normalize(
|
|
17259
|
+
return [...versions].sort((a, b) => {
|
|
17260
|
+
const normA = VersionFormatter.normalize(a);
|
|
17261
|
+
const normB = VersionFormatter.normalize(b);
|
|
17265
17262
|
const majorA = Number.parseInt(normA.split(".")[0], 10);
|
|
17266
17263
|
const majorB = Number.parseInt(normB.split(".")[0], 10);
|
|
17267
17264
|
if (majorA === 0 && majorB === 0) {
|
|
@@ -17290,29 +17287,29 @@ class ReleaseFilter {
|
|
|
17290
17287
|
});
|
|
17291
17288
|
}
|
|
17292
17289
|
static sortByDate(releases, order = "desc") {
|
|
17293
|
-
return [...releases].sort((
|
|
17294
|
-
if (!
|
|
17290
|
+
return [...releases].sort((a, b) => {
|
|
17291
|
+
if (!a.published_at && !b.published_at)
|
|
17295
17292
|
return 0;
|
|
17296
|
-
if (!
|
|
17293
|
+
if (!a.published_at)
|
|
17297
17294
|
return order === "desc" ? 1 : -1;
|
|
17298
|
-
if (!
|
|
17295
|
+
if (!b.published_at)
|
|
17299
17296
|
return order === "desc" ? -1 : 1;
|
|
17300
|
-
const dateA = new Date(
|
|
17301
|
-
const dateB = new Date(
|
|
17297
|
+
const dateA = new Date(a.published_at).getTime();
|
|
17298
|
+
const dateB = new Date(b.published_at).getTime();
|
|
17302
17299
|
return order === "desc" ? dateB - dateA : dateA - dateB;
|
|
17303
17300
|
});
|
|
17304
17301
|
}
|
|
17305
17302
|
static sortByVersion(releases, order = "desc") {
|
|
17306
|
-
return [...releases].sort((
|
|
17307
|
-
const comparison = VersionFormatter.compare(
|
|
17303
|
+
return [...releases].sort((a, b) => {
|
|
17304
|
+
const comparison = VersionFormatter.compare(a.tag_name, b.tag_name);
|
|
17308
17305
|
return order === "desc" ? -comparison : comparison;
|
|
17309
17306
|
});
|
|
17310
17307
|
}
|
|
17311
17308
|
static tagLatest(releases) {
|
|
17312
17309
|
const enriched = releases.map((release) => ({ ...release }));
|
|
17313
|
-
const stableReleases = enriched.filter((release) => !release.prerelease && !release.draft).sort((
|
|
17310
|
+
const stableReleases = enriched.filter((release) => !release.prerelease && !release.draft).sort((a, b) => -VersionFormatter.compare(a.tag_name, b.tag_name));
|
|
17314
17311
|
const latestStable = stableReleases.length > 0 ? stableReleases[0] : null;
|
|
17315
|
-
const betaReleases = enriched.filter((release) => release.prerelease && !release.draft).sort((
|
|
17312
|
+
const betaReleases = enriched.filter((release) => release.prerelease && !release.draft).sort((a, b) => -VersionFormatter.compare(a.tag_name, b.tag_name));
|
|
17316
17313
|
const latestBeta = betaReleases.length > 0 ? betaReleases[0] : null;
|
|
17317
17314
|
for (const release of enriched) {
|
|
17318
17315
|
if (latestStable && release.id === latestStable.id) {
|
|
@@ -17418,7 +17415,7 @@ class GitHubClient {
|
|
|
17418
17415
|
if (includePrereleases) {
|
|
17419
17416
|
logger.debug(`Fetching latest prerelease for ${kit.owner}/${kit.repo}`);
|
|
17420
17417
|
const releases = await this.listReleases(kit, 30);
|
|
17421
|
-
const prereleaseVersion = releases.find((
|
|
17418
|
+
const prereleaseVersion = releases.find((r) => r.prerelease);
|
|
17422
17419
|
if (prereleaseVersion) {
|
|
17423
17420
|
logger.debug(`Found prerelease version: ${prereleaseVersion.tag_name}`);
|
|
17424
17421
|
return prereleaseVersion;
|
|
@@ -17648,8 +17645,8 @@ Need help? Run with: ck new --verbose`, 404);
|
|
|
17648
17645
|
logger.debug(` ${index + 1}. ${asset.name} (${(asset.size / 1024 / 1024).toFixed(2)} MB)`);
|
|
17649
17646
|
});
|
|
17650
17647
|
}
|
|
17651
|
-
const packageAsset = release.assets.find((
|
|
17652
|
-
const nameLower =
|
|
17648
|
+
const packageAsset = release.assets.find((a) => {
|
|
17649
|
+
const nameLower = a.name.toLowerCase();
|
|
17653
17650
|
return nameLower.includes("claudekit") && nameLower.includes("package") && nameLower.endsWith(".zip");
|
|
17654
17651
|
});
|
|
17655
17652
|
if (packageAsset) {
|
|
@@ -17662,7 +17659,7 @@ Need help? Run with: ck new --verbose`, 404);
|
|
|
17662
17659
|
};
|
|
17663
17660
|
}
|
|
17664
17661
|
logger.debug("⚠ No ClaudeKit package asset found, checking for other custom assets...");
|
|
17665
|
-
const customAsset = release.assets.find((
|
|
17662
|
+
const customAsset = release.assets.find((a) => (a.name.endsWith(".tar.gz") || a.name.endsWith(".tgz") || a.name.endsWith(".zip")) && !a.name.toLowerCase().startsWith("source") && !a.name.toLowerCase().includes("source code"));
|
|
17666
17663
|
if (customAsset) {
|
|
17667
17664
|
logger.debug(`✓ Selected custom asset: ${customAsset.name}`);
|
|
17668
17665
|
return {
|
|
@@ -18222,7 +18219,7 @@ class AutoHealer {
|
|
|
18222
18219
|
this.timeout = options.timeout ?? 30000;
|
|
18223
18220
|
}
|
|
18224
18221
|
async healAll(checks) {
|
|
18225
|
-
const fixable = checks.filter((
|
|
18222
|
+
const fixable = checks.filter((c) => c.autoFixable && c.fix && c.status !== "pass");
|
|
18226
18223
|
const fixes = [];
|
|
18227
18224
|
for (const check of fixable) {
|
|
18228
18225
|
const attempt = await this.executeFix(check);
|
|
@@ -18235,8 +18232,8 @@ class AutoHealer {
|
|
|
18235
18232
|
return {
|
|
18236
18233
|
totalFixable: fixable.length,
|
|
18237
18234
|
attempted: fixes.length,
|
|
18238
|
-
succeeded: fixes.filter((
|
|
18239
|
-
failed: fixes.filter((
|
|
18235
|
+
succeeded: fixes.filter((f) => f.success).length,
|
|
18236
|
+
failed: fixes.filter((f) => !f.success).length,
|
|
18240
18237
|
fixes
|
|
18241
18238
|
};
|
|
18242
18239
|
}
|
|
@@ -18259,8 +18256,8 @@ class AutoHealer {
|
|
|
18259
18256
|
const attempt = this.buildAttempt(check, fix.id, result);
|
|
18260
18257
|
attempt.duration = Date.now() - start;
|
|
18261
18258
|
return attempt;
|
|
18262
|
-
} catch (
|
|
18263
|
-
const err =
|
|
18259
|
+
} catch (e) {
|
|
18260
|
+
const err = e instanceof Error ? e.message : "Unknown error";
|
|
18264
18261
|
return {
|
|
18265
18262
|
checkId: check.id,
|
|
18266
18263
|
checkName: check.name,
|
|
@@ -18284,7 +18281,7 @@ class AutoHealer {
|
|
|
18284
18281
|
};
|
|
18285
18282
|
}
|
|
18286
18283
|
createTimeout() {
|
|
18287
|
-
return new Promise((
|
|
18284
|
+
return new Promise((_, reject) => {
|
|
18288
18285
|
setTimeout(() => reject(new Error(`Fix timed out after ${this.timeout}ms`)), this.timeout);
|
|
18289
18286
|
});
|
|
18290
18287
|
}
|
|
@@ -18644,6 +18641,59 @@ class DoctorUIRenderer {
|
|
|
18644
18641
|
// src/commands/doctor.ts
|
|
18645
18642
|
init_environment();
|
|
18646
18643
|
init_logger();
|
|
18644
|
+
|
|
18645
|
+
// src/utils/safe-prompts.ts
|
|
18646
|
+
init_dist2();
|
|
18647
|
+
init_dist2();
|
|
18648
|
+
var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
18649
|
+
function intro(message) {
|
|
18650
|
+
console.log();
|
|
18651
|
+
console.log(import_picocolors6.default.cyan(`> ${message}`));
|
|
18652
|
+
console.log();
|
|
18653
|
+
}
|
|
18654
|
+
function outro(message) {
|
|
18655
|
+
console.log();
|
|
18656
|
+
console.log(import_picocolors6.default.green(`[OK] ${message}`));
|
|
18657
|
+
console.log();
|
|
18658
|
+
}
|
|
18659
|
+
function note(message, title) {
|
|
18660
|
+
console.log();
|
|
18661
|
+
if (title) {
|
|
18662
|
+
console.log(import_picocolors6.default.cyan(` ${title}:`));
|
|
18663
|
+
console.log();
|
|
18664
|
+
}
|
|
18665
|
+
const lines = message.split(`
|
|
18666
|
+
`);
|
|
18667
|
+
for (const line of lines) {
|
|
18668
|
+
console.log(` ${line}`);
|
|
18669
|
+
}
|
|
18670
|
+
console.log();
|
|
18671
|
+
}
|
|
18672
|
+
var log = {
|
|
18673
|
+
info: (message) => {
|
|
18674
|
+
console.log(import_picocolors6.default.blue(`[i] ${message}`));
|
|
18675
|
+
},
|
|
18676
|
+
success: (message) => {
|
|
18677
|
+
console.log(import_picocolors6.default.green(`[+] ${message}`));
|
|
18678
|
+
},
|
|
18679
|
+
warn: (message) => {
|
|
18680
|
+
console.log(import_picocolors6.default.yellow(`[!] ${message}`));
|
|
18681
|
+
},
|
|
18682
|
+
warning: (message) => {
|
|
18683
|
+
console.log(import_picocolors6.default.yellow(`[!] ${message}`));
|
|
18684
|
+
},
|
|
18685
|
+
error: (message) => {
|
|
18686
|
+
console.log(import_picocolors6.default.red(`[x] ${message}`));
|
|
18687
|
+
},
|
|
18688
|
+
step: (message) => {
|
|
18689
|
+
console.log(import_picocolors6.default.cyan(`[>] ${message}`));
|
|
18690
|
+
},
|
|
18691
|
+
message: (message) => {
|
|
18692
|
+
console.log(` ${message}`);
|
|
18693
|
+
}
|
|
18694
|
+
};
|
|
18695
|
+
|
|
18696
|
+
// src/commands/doctor.ts
|
|
18647
18697
|
async function doctorCommand(options = {}) {
|
|
18648
18698
|
const { report, fix, checkOnly, json, full } = options;
|
|
18649
18699
|
const runnerOptions = {
|
|
@@ -18654,7 +18704,7 @@ async function doctorCommand(options = {}) {
|
|
|
18654
18704
|
full: full ?? false
|
|
18655
18705
|
};
|
|
18656
18706
|
if (!json && !report) {
|
|
18657
|
-
|
|
18707
|
+
intro("ClaudeKit Health Check");
|
|
18658
18708
|
}
|
|
18659
18709
|
const runner = new CheckRunner(runnerOptions);
|
|
18660
18710
|
runner.registerChecker(new SystemChecker);
|
|
@@ -18686,7 +18736,7 @@ async function doctorCommand(options = {}) {
|
|
|
18686
18736
|
const healSummary = await healer.healAll(summary.checks);
|
|
18687
18737
|
renderer.renderHealingSummary(healSummary);
|
|
18688
18738
|
if (healSummary.failed === 0 && healSummary.succeeded > 0) {
|
|
18689
|
-
|
|
18739
|
+
outro("All fixable issues resolved!");
|
|
18690
18740
|
return;
|
|
18691
18741
|
}
|
|
18692
18742
|
}
|
|
@@ -18708,9 +18758,9 @@ async function doctorCommand(options = {}) {
|
|
|
18708
18758
|
}
|
|
18709
18759
|
}
|
|
18710
18760
|
if (summary.failed === 0) {
|
|
18711
|
-
|
|
18761
|
+
outro("All checks passed!");
|
|
18712
18762
|
} else {
|
|
18713
|
-
|
|
18763
|
+
outro(`${summary.failed} issue(s) found`);
|
|
18714
18764
|
}
|
|
18715
18765
|
}
|
|
18716
18766
|
|
|
@@ -27517,11 +27567,15 @@ function ora(options) {
|
|
|
27517
27567
|
}
|
|
27518
27568
|
|
|
27519
27569
|
// src/utils/safe-spinner.ts
|
|
27570
|
+
var ASCII_SPINNER = {
|
|
27571
|
+
interval: 100,
|
|
27572
|
+
frames: ["-", "\\", "|", "/"]
|
|
27573
|
+
};
|
|
27520
27574
|
function createSpinner(options) {
|
|
27521
27575
|
const spinnerOptions = typeof options === "string" ? { text: options } : options;
|
|
27522
27576
|
const spinner = ora({
|
|
27523
27577
|
...spinnerOptions,
|
|
27524
|
-
spinner:
|
|
27578
|
+
spinner: ASCII_SPINNER,
|
|
27525
27579
|
prefixText: ""
|
|
27526
27580
|
});
|
|
27527
27581
|
spinner.succeed = (text) => {
|
|
@@ -30268,38 +30322,10 @@ User-created files (sample):`);
|
|
|
30268
30322
|
}
|
|
30269
30323
|
|
|
30270
30324
|
// src/lib/prompts.ts
|
|
30271
|
-
init_dist2();
|
|
30272
30325
|
init_types2();
|
|
30273
30326
|
init_logger();
|
|
30274
30327
|
init_package_installer();
|
|
30275
30328
|
|
|
30276
|
-
// src/utils/safe-prompts.ts
|
|
30277
|
-
init_dist2();
|
|
30278
|
-
var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
30279
|
-
function intro(message) {
|
|
30280
|
-
console.log();
|
|
30281
|
-
console.log(import_picocolors6.default.cyan(`> ${message}`));
|
|
30282
|
-
console.log();
|
|
30283
|
-
}
|
|
30284
|
-
function outro(message) {
|
|
30285
|
-
console.log();
|
|
30286
|
-
console.log(import_picocolors6.default.green(`[OK] ${message}`));
|
|
30287
|
-
console.log();
|
|
30288
|
-
}
|
|
30289
|
-
function note(message, title) {
|
|
30290
|
-
console.log();
|
|
30291
|
-
if (title) {
|
|
30292
|
-
console.log(import_picocolors6.default.cyan(` ${title}:`));
|
|
30293
|
-
console.log();
|
|
30294
|
-
}
|
|
30295
|
-
const lines = message.split(`
|
|
30296
|
-
`);
|
|
30297
|
-
for (const line of lines) {
|
|
30298
|
-
console.log(` ${line}`);
|
|
30299
|
-
}
|
|
30300
|
-
console.log();
|
|
30301
|
-
}
|
|
30302
|
-
|
|
30303
30329
|
// src/lib/version-selector.ts
|
|
30304
30330
|
init_dist2();
|
|
30305
30331
|
init_logger();
|
|
@@ -30713,7 +30739,7 @@ class PromptsManager {
|
|
|
30713
30739
|
note(message, title);
|
|
30714
30740
|
}
|
|
30715
30741
|
async promptPackageInstallations() {
|
|
30716
|
-
|
|
30742
|
+
log.step("Optional Package Installations");
|
|
30717
30743
|
const [openCodeInstalled, geminiInstalled] = await Promise.all([
|
|
30718
30744
|
isOpenCodeInstalled(),
|
|
30719
30745
|
isGeminiInstalled()
|
|
@@ -30783,7 +30809,7 @@ class PromptsManager {
|
|
|
30783
30809
|
}
|
|
30784
30810
|
}
|
|
30785
30811
|
async promptFreshConfirmation(targetPath) {
|
|
30786
|
-
logger.warning("
|
|
30812
|
+
logger.warning("[!] WARNING: Fresh installation will completely remove the .claude directory!");
|
|
30787
30813
|
logger.info(`Path: ${targetPath}`);
|
|
30788
30814
|
logger.info("All custom files, configurations, and modifications will be permanently deleted.");
|
|
30789
30815
|
const confirmation = await te({
|
|
@@ -30833,7 +30859,7 @@ class PromptsManager {
|
|
|
30833
30859
|
return result;
|
|
30834
30860
|
}
|
|
30835
30861
|
async promptDirectorySelection(global3 = false) {
|
|
30836
|
-
|
|
30862
|
+
log.step("Select directories to update");
|
|
30837
30863
|
const prefix = PathResolver.getPathPrefix(global3);
|
|
30838
30864
|
const categories = [
|
|
30839
30865
|
{ key: "agents", label: "Agents", pattern: prefix ? `${prefix}/agents` : "agents" },
|
|
@@ -33059,7 +33085,6 @@ async function newCommand(options) {
|
|
|
33059
33085
|
}
|
|
33060
33086
|
|
|
33061
33087
|
// src/commands/uninstall.ts
|
|
33062
|
-
init_dist2();
|
|
33063
33088
|
var import_fs_extra19 = __toESM(require_lib(), 1);
|
|
33064
33089
|
var import_picocolors10 = __toESM(require_picocolors(), 1);
|
|
33065
33090
|
import { readdirSync, rmSync } from "node:fs";
|
|
@@ -33086,11 +33111,11 @@ async function detectInstallations() {
|
|
|
33086
33111
|
return installations.filter((i) => i.exists);
|
|
33087
33112
|
}
|
|
33088
33113
|
function displayInstallations(installations, scope) {
|
|
33089
|
-
|
|
33114
|
+
intro("ClaudeKit Uninstaller");
|
|
33090
33115
|
const scopeLabel = scope === "all" ? "all" : scope === "local" ? "local only" : "global only";
|
|
33091
|
-
|
|
33116
|
+
note(installations.map((i) => ` ${i.type === "local" ? "Local " : "Global"}: ${i.path}`).join(`
|
|
33092
33117
|
`), `Detected ClaudeKit installations (${scopeLabel})`);
|
|
33093
|
-
|
|
33118
|
+
log.warn("[!] This will permanently delete ClaudeKit files from the above paths.");
|
|
33094
33119
|
}
|
|
33095
33120
|
async function promptScope(installations) {
|
|
33096
33121
|
const hasLocal = installations.some((i) => i.type === "local");
|
|
@@ -33175,7 +33200,7 @@ async function analyzeInstallation(installation, forceOverwrite) {
|
|
|
33175
33200
|
}
|
|
33176
33201
|
function displayDryRunPreview(analysis, installationType) {
|
|
33177
33202
|
console.log("");
|
|
33178
|
-
|
|
33203
|
+
log.info(import_picocolors10.default.bold(`DRY RUN - Preview for ${installationType} installation:`));
|
|
33179
33204
|
console.log("");
|
|
33180
33205
|
if (analysis.toDelete.length > 0) {
|
|
33181
33206
|
console.log(import_picocolors10.default.red(import_picocolors10.default.bold(`Files to DELETE (${analysis.toDelete.length}):`)));
|
|
@@ -33229,10 +33254,10 @@ async function removeInstallations(installations, options) {
|
|
|
33229
33254
|
} catch {}
|
|
33230
33255
|
spinner.succeed(`Removed ${removedCount} files${cleanedDirs > 0 ? `, cleaned ${cleanedDirs} empty directories` : ""}, preserved ${analysis.toPreserve.length} customizations`);
|
|
33231
33256
|
if (analysis.toPreserve.length > 0) {
|
|
33232
|
-
|
|
33233
|
-
analysis.toPreserve.slice(0, 5).forEach((f3) =>
|
|
33257
|
+
log.info("Preserved customizations:");
|
|
33258
|
+
analysis.toPreserve.slice(0, 5).forEach((f3) => log.message(` - ${f3.path} (${f3.reason})`));
|
|
33234
33259
|
if (analysis.toPreserve.length > 5) {
|
|
33235
|
-
|
|
33260
|
+
log.message(` ... and ${analysis.toPreserve.length - 5} more`);
|
|
33236
33261
|
}
|
|
33237
33262
|
}
|
|
33238
33263
|
} catch (error) {
|
|
@@ -33276,16 +33301,16 @@ async function uninstallCommand(options) {
|
|
|
33276
33301
|
}
|
|
33277
33302
|
displayInstallations(installations, scope);
|
|
33278
33303
|
if (validOptions.dryRun) {
|
|
33279
|
-
|
|
33304
|
+
log.info(import_picocolors10.default.yellow("DRY RUN MODE - No files will be deleted"));
|
|
33280
33305
|
await removeInstallations(installations, {
|
|
33281
33306
|
dryRun: true,
|
|
33282
33307
|
forceOverwrite: validOptions.forceOverwrite
|
|
33283
33308
|
});
|
|
33284
|
-
|
|
33309
|
+
outro("Dry-run complete. No changes were made.");
|
|
33285
33310
|
return;
|
|
33286
33311
|
}
|
|
33287
33312
|
if (validOptions.forceOverwrite) {
|
|
33288
|
-
|
|
33313
|
+
log.warn(`${import_picocolors10.default.yellow(import_picocolors10.default.bold("FORCE MODE ENABLED"))}
|
|
33289
33314
|
${import_picocolors10.default.yellow("User modifications will be permanently deleted!")}`);
|
|
33290
33315
|
}
|
|
33291
33316
|
if (!validOptions.yes) {
|
|
@@ -33299,7 +33324,7 @@ ${import_picocolors10.default.yellow("User modifications will be permanently del
|
|
|
33299
33324
|
dryRun: false,
|
|
33300
33325
|
forceOverwrite: validOptions.forceOverwrite
|
|
33301
33326
|
});
|
|
33302
|
-
|
|
33327
|
+
outro("ClaudeKit uninstalled successfully!");
|
|
33303
33328
|
} catch (error) {
|
|
33304
33329
|
logger.error(error instanceof Error ? error.message : "Unknown error");
|
|
33305
33330
|
process.exit(1);
|
|
@@ -33307,14 +33332,13 @@ ${import_picocolors10.default.yellow("User modifications will be permanently del
|
|
|
33307
33332
|
}
|
|
33308
33333
|
|
|
33309
33334
|
// src/commands/update-cli.ts
|
|
33310
|
-
init_dist2();
|
|
33311
33335
|
var import_compare_versions2 = __toESM(require_umd(), 1);
|
|
33312
33336
|
import { exec as exec6 } from "node:child_process";
|
|
33313
33337
|
import { promisify as promisify6 } from "node:util";
|
|
33314
33338
|
// package.json
|
|
33315
33339
|
var package_default2 = {
|
|
33316
33340
|
name: "claudekit-cli",
|
|
33317
|
-
version: "3.7.
|
|
33341
|
+
version: "3.7.1",
|
|
33318
33342
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
33319
33343
|
type: "module",
|
|
33320
33344
|
repository: {
|
|
@@ -33549,7 +33573,7 @@ class CliUpdateError extends ClaudeKitError {
|
|
|
33549
33573
|
var PACKAGE_NAME = "claudekit-cli";
|
|
33550
33574
|
async function updateCliCommand(options) {
|
|
33551
33575
|
const s = de();
|
|
33552
|
-
|
|
33576
|
+
intro("[>] ClaudeKit CLI - Update");
|
|
33553
33577
|
try {
|
|
33554
33578
|
const opts = UpdateCliOptionsSchema.parse(options);
|
|
33555
33579
|
const currentVersion = package_default2.version;
|
|
@@ -33587,21 +33611,21 @@ async function updateCliCommand(options) {
|
|
|
33587
33611
|
}
|
|
33588
33612
|
const comparison = import_compare_versions2.compareVersions(currentVersion, targetVersion);
|
|
33589
33613
|
if (comparison === 0) {
|
|
33590
|
-
|
|
33614
|
+
outro(`[+] Already on the latest version (${currentVersion})`);
|
|
33591
33615
|
return;
|
|
33592
33616
|
}
|
|
33593
33617
|
if (comparison > 0 && !opts.release) {
|
|
33594
|
-
|
|
33618
|
+
outro(`[+] Current version (${currentVersion}) is newer than latest (${targetVersion})`);
|
|
33595
33619
|
return;
|
|
33596
33620
|
}
|
|
33597
33621
|
const isUpgrade = comparison < 0;
|
|
33598
33622
|
const changeType = isUpgrade ? "upgrade" : "downgrade";
|
|
33599
|
-
logger.info(`${isUpgrade ? "
|
|
33623
|
+
logger.info(`${isUpgrade ? "[^]" : "[v]"} ${changeType}: ${currentVersion} -> ${targetVersion}`);
|
|
33600
33624
|
if (opts.check) {
|
|
33601
|
-
|
|
33625
|
+
note(`Update available: ${currentVersion} -> ${targetVersion}
|
|
33602
33626
|
|
|
33603
33627
|
Run 'ck update' to install`, "Update Check");
|
|
33604
|
-
|
|
33628
|
+
outro("Check complete");
|
|
33605
33629
|
return;
|
|
33606
33630
|
}
|
|
33607
33631
|
if (!opts.yes) {
|
|
@@ -33609,7 +33633,7 @@ Run 'ck update' to install`, "Update Check");
|
|
|
33609
33633
|
message: `${isUpgrade ? "Update" : "Downgrade"} CLI from ${currentVersion} to ${targetVersion}?`
|
|
33610
33634
|
});
|
|
33611
33635
|
if (lD(shouldUpdate) || !shouldUpdate) {
|
|
33612
|
-
|
|
33636
|
+
outro("Update cancelled");
|
|
33613
33637
|
return;
|
|
33614
33638
|
}
|
|
33615
33639
|
}
|
|
@@ -33639,10 +33663,10 @@ Manual update: ${updateCmd}`);
|
|
|
33639
33663
|
const newVersionMatch = stdout.match(/CLI Version:\s*(\S+)/);
|
|
33640
33664
|
const newVersion = newVersionMatch ? newVersionMatch[1] : targetVersion;
|
|
33641
33665
|
s.stop(`Installed version: ${newVersion}`);
|
|
33642
|
-
|
|
33666
|
+
outro(`[+] Successfully updated ClaudeKit CLI to ${newVersion}`);
|
|
33643
33667
|
} catch {
|
|
33644
33668
|
s.stop("Verification completed");
|
|
33645
|
-
|
|
33669
|
+
outro(`[+] Update completed. Please restart your terminal to use CLI ${targetVersion}`);
|
|
33646
33670
|
}
|
|
33647
33671
|
} catch (error) {
|
|
33648
33672
|
if (error instanceof CliUpdateError) {
|