claudekit-cli 3.8.1 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1048 -1165
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4066,6 +4066,242 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
4066
4066
|
module.exports.createColors = createColors;
|
|
4067
4067
|
});
|
|
4068
4068
|
|
|
4069
|
+
// src/shared/terminal-utils.ts
|
|
4070
|
+
function supportsUnicode() {
|
|
4071
|
+
if (process.env.WT_SESSION)
|
|
4072
|
+
return true;
|
|
4073
|
+
if (process.env.TERM_PROGRAM === "iTerm.app")
|
|
4074
|
+
return true;
|
|
4075
|
+
if (process.env.TERM_PROGRAM === "Apple_Terminal")
|
|
4076
|
+
return true;
|
|
4077
|
+
if (process.env.TERM_PROGRAM === "vscode")
|
|
4078
|
+
return true;
|
|
4079
|
+
if (process.env.KONSOLE_VERSION)
|
|
4080
|
+
return true;
|
|
4081
|
+
if (process.env.CI)
|
|
4082
|
+
return true;
|
|
4083
|
+
if (process.env.TERM === "dumb")
|
|
4084
|
+
return false;
|
|
4085
|
+
if (!process.stdout.isTTY)
|
|
4086
|
+
return false;
|
|
4087
|
+
const locale = process.env.LANG || process.env.LC_ALL || "";
|
|
4088
|
+
if (locale.toLowerCase().includes("utf"))
|
|
4089
|
+
return true;
|
|
4090
|
+
if (process.platform === "win32")
|
|
4091
|
+
return false;
|
|
4092
|
+
return true;
|
|
4093
|
+
}
|
|
4094
|
+
function isTTY() {
|
|
4095
|
+
return process.stdout.isTTY === true;
|
|
4096
|
+
}
|
|
4097
|
+
function getStatusSymbols() {
|
|
4098
|
+
return supportsUnicode() ? UNICODE_SYMBOLS : ASCII_SYMBOLS;
|
|
4099
|
+
}
|
|
4100
|
+
var import_picocolors, UNICODE_SYMBOLS, ASCII_SYMBOLS, COLOR_PALETTE;
|
|
4101
|
+
var init_terminal_utils = __esm(() => {
|
|
4102
|
+
import_picocolors = __toESM(require_picocolors(), 1);
|
|
4103
|
+
UNICODE_SYMBOLS = {
|
|
4104
|
+
pass: "✓",
|
|
4105
|
+
warn: "⚠",
|
|
4106
|
+
fail: "✗",
|
|
4107
|
+
info: "ℹ"
|
|
4108
|
+
};
|
|
4109
|
+
ASCII_SYMBOLS = {
|
|
4110
|
+
pass: "[PASS]",
|
|
4111
|
+
warn: "[WARN]",
|
|
4112
|
+
fail: "[FAIL]",
|
|
4113
|
+
info: "[INFO]"
|
|
4114
|
+
};
|
|
4115
|
+
COLOR_PALETTE = {
|
|
4116
|
+
pass: import_picocolors.default.green,
|
|
4117
|
+
warn: import_picocolors.default.yellow,
|
|
4118
|
+
fail: import_picocolors.default.red,
|
|
4119
|
+
info: import_picocolors.default.blue,
|
|
4120
|
+
muted: import_picocolors.default.dim,
|
|
4121
|
+
heading: import_picocolors.default.bold
|
|
4122
|
+
};
|
|
4123
|
+
});
|
|
4124
|
+
|
|
4125
|
+
// src/shared/output-manager.ts
|
|
4126
|
+
class OutputManager {
|
|
4127
|
+
config = {
|
|
4128
|
+
verbose: false,
|
|
4129
|
+
json: false,
|
|
4130
|
+
quiet: false
|
|
4131
|
+
};
|
|
4132
|
+
jsonBuffer = [];
|
|
4133
|
+
unicodeSupported;
|
|
4134
|
+
flushPromise = null;
|
|
4135
|
+
constructor() {
|
|
4136
|
+
this.unicodeSupported = supportsUnicode();
|
|
4137
|
+
}
|
|
4138
|
+
configure(config) {
|
|
4139
|
+
this.config = { ...this.config, ...config };
|
|
4140
|
+
}
|
|
4141
|
+
getConfig() {
|
|
4142
|
+
return { ...this.config };
|
|
4143
|
+
}
|
|
4144
|
+
isVerbose() {
|
|
4145
|
+
return this.config.verbose;
|
|
4146
|
+
}
|
|
4147
|
+
isJson() {
|
|
4148
|
+
return this.config.json;
|
|
4149
|
+
}
|
|
4150
|
+
isQuiet() {
|
|
4151
|
+
return this.config.quiet;
|
|
4152
|
+
}
|
|
4153
|
+
getSymbols() {
|
|
4154
|
+
return this.unicodeSupported ? SYMBOLS.unicode : SYMBOLS.ascii;
|
|
4155
|
+
}
|
|
4156
|
+
shouldShowProgress() {
|
|
4157
|
+
if (this.config.json)
|
|
4158
|
+
return false;
|
|
4159
|
+
if (!isTTY())
|
|
4160
|
+
return false;
|
|
4161
|
+
return true;
|
|
4162
|
+
}
|
|
4163
|
+
success(message, data) {
|
|
4164
|
+
if (this.config.json) {
|
|
4165
|
+
this.addJsonEntry({ type: "success", message, data });
|
|
4166
|
+
return;
|
|
4167
|
+
}
|
|
4168
|
+
if (this.config.quiet)
|
|
4169
|
+
return;
|
|
4170
|
+
const symbol = this.getSymbols().success;
|
|
4171
|
+
console.log(import_picocolors2.default.green(`${symbol} ${message}`));
|
|
4172
|
+
}
|
|
4173
|
+
error(message, data) {
|
|
4174
|
+
if (this.config.json) {
|
|
4175
|
+
this.addJsonEntry({ type: "error", message, data });
|
|
4176
|
+
return;
|
|
4177
|
+
}
|
|
4178
|
+
const symbol = this.getSymbols().error;
|
|
4179
|
+
console.error(import_picocolors2.default.red(`${symbol} ${message}`));
|
|
4180
|
+
}
|
|
4181
|
+
warning(message, data) {
|
|
4182
|
+
if (this.config.json) {
|
|
4183
|
+
this.addJsonEntry({ type: "warning", message, data });
|
|
4184
|
+
return;
|
|
4185
|
+
}
|
|
4186
|
+
if (this.config.quiet)
|
|
4187
|
+
return;
|
|
4188
|
+
const symbol = this.getSymbols().warning;
|
|
4189
|
+
console.log(import_picocolors2.default.yellow(`${symbol} ${message}`));
|
|
4190
|
+
}
|
|
4191
|
+
info(message, data) {
|
|
4192
|
+
if (this.config.json) {
|
|
4193
|
+
this.addJsonEntry({ type: "info", message, data });
|
|
4194
|
+
return;
|
|
4195
|
+
}
|
|
4196
|
+
if (this.config.quiet)
|
|
4197
|
+
return;
|
|
4198
|
+
const symbol = this.getSymbols().info;
|
|
4199
|
+
console.log(import_picocolors2.default.blue(`${symbol} ${message}`));
|
|
4200
|
+
}
|
|
4201
|
+
verbose(message, data) {
|
|
4202
|
+
if (!this.config.verbose)
|
|
4203
|
+
return;
|
|
4204
|
+
if (this.config.json) {
|
|
4205
|
+
this.addJsonEntry({ type: "info", message, data });
|
|
4206
|
+
return;
|
|
4207
|
+
}
|
|
4208
|
+
console.log(import_picocolors2.default.dim(` ${message}`));
|
|
4209
|
+
}
|
|
4210
|
+
indent(message) {
|
|
4211
|
+
if (this.config.json)
|
|
4212
|
+
return;
|
|
4213
|
+
if (this.config.quiet)
|
|
4214
|
+
return;
|
|
4215
|
+
console.log(` ${message}`);
|
|
4216
|
+
}
|
|
4217
|
+
newline() {
|
|
4218
|
+
if (this.config.json)
|
|
4219
|
+
return;
|
|
4220
|
+
if (this.config.quiet)
|
|
4221
|
+
return;
|
|
4222
|
+
console.log();
|
|
4223
|
+
}
|
|
4224
|
+
section(title) {
|
|
4225
|
+
if (this.config.json) {
|
|
4226
|
+
this.addJsonEntry({ type: "info", message: `[Section] ${title}` });
|
|
4227
|
+
return;
|
|
4228
|
+
}
|
|
4229
|
+
if (this.config.quiet)
|
|
4230
|
+
return;
|
|
4231
|
+
const symbols = this.getSymbols();
|
|
4232
|
+
console.log();
|
|
4233
|
+
console.log(import_picocolors2.default.bold(import_picocolors2.default.cyan(`${symbols.line} ${title}`)));
|
|
4234
|
+
}
|
|
4235
|
+
addJsonEntry(entry) {
|
|
4236
|
+
this.jsonBuffer.push({
|
|
4237
|
+
...entry,
|
|
4238
|
+
timestamp: new Date().toISOString()
|
|
4239
|
+
});
|
|
4240
|
+
if (this.jsonBuffer.length >= 1000 && !this.flushPromise) {
|
|
4241
|
+
queueMicrotask(() => this.flushJson());
|
|
4242
|
+
}
|
|
4243
|
+
}
|
|
4244
|
+
addJsonResult(data) {
|
|
4245
|
+
this.addJsonEntry({ type: "result", data });
|
|
4246
|
+
}
|
|
4247
|
+
async flushJson() {
|
|
4248
|
+
if (this.jsonBuffer.length === 0)
|
|
4249
|
+
return;
|
|
4250
|
+
if (this.flushPromise)
|
|
4251
|
+
return this.flushPromise;
|
|
4252
|
+
this.flushPromise = (async () => {
|
|
4253
|
+
const bufferCopy = [...this.jsonBuffer];
|
|
4254
|
+
this.jsonBuffer = [];
|
|
4255
|
+
console.log(JSON.stringify(bufferCopy, null, 2));
|
|
4256
|
+
})().finally(() => {
|
|
4257
|
+
this.flushPromise = null;
|
|
4258
|
+
});
|
|
4259
|
+
return this.flushPromise;
|
|
4260
|
+
}
|
|
4261
|
+
getJsonBuffer() {
|
|
4262
|
+
return [...this.jsonBuffer];
|
|
4263
|
+
}
|
|
4264
|
+
clearJsonBuffer() {
|
|
4265
|
+
this.jsonBuffer = [];
|
|
4266
|
+
}
|
|
4267
|
+
reset() {
|
|
4268
|
+
this.config = { verbose: false, json: false, quiet: false };
|
|
4269
|
+
this.jsonBuffer = [];
|
|
4270
|
+
this.flushPromise = null;
|
|
4271
|
+
this.unicodeSupported = supportsUnicode();
|
|
4272
|
+
}
|
|
4273
|
+
}
|
|
4274
|
+
var import_picocolors2, SYMBOLS, output;
|
|
4275
|
+
var init_output_manager = __esm(() => {
|
|
4276
|
+
init_terminal_utils();
|
|
4277
|
+
import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
4278
|
+
SYMBOLS = {
|
|
4279
|
+
unicode: {
|
|
4280
|
+
prompt: "◇",
|
|
4281
|
+
success: "✓",
|
|
4282
|
+
error: "✗",
|
|
4283
|
+
warning: "⚠",
|
|
4284
|
+
info: "ℹ",
|
|
4285
|
+
line: "│",
|
|
4286
|
+
selected: "●",
|
|
4287
|
+
unselected: "○",
|
|
4288
|
+
pointer: ">"
|
|
4289
|
+
},
|
|
4290
|
+
ascii: {
|
|
4291
|
+
prompt: "?",
|
|
4292
|
+
success: "+",
|
|
4293
|
+
error: "x",
|
|
4294
|
+
warning: "!",
|
|
4295
|
+
info: "i",
|
|
4296
|
+
line: "|",
|
|
4297
|
+
selected: ">",
|
|
4298
|
+
unselected: " ",
|
|
4299
|
+
pointer: ">"
|
|
4300
|
+
}
|
|
4301
|
+
};
|
|
4302
|
+
output = new OutputManager;
|
|
4303
|
+
});
|
|
4304
|
+
|
|
4069
4305
|
// src/shared/logger.ts
|
|
4070
4306
|
import { createWriteStream } from "node:fs";
|
|
4071
4307
|
|
|
@@ -4073,20 +4309,24 @@ class Logger {
|
|
|
4073
4309
|
verboseEnabled = false;
|
|
4074
4310
|
logFileStream;
|
|
4075
4311
|
info(message) {
|
|
4076
|
-
|
|
4312
|
+
const symbols = output.getSymbols();
|
|
4313
|
+
console.log(import_picocolors3.default.blue(symbols.info), message);
|
|
4077
4314
|
}
|
|
4078
4315
|
success(message) {
|
|
4079
|
-
|
|
4316
|
+
const symbols = output.getSymbols();
|
|
4317
|
+
console.log(import_picocolors3.default.green(symbols.success), message);
|
|
4080
4318
|
}
|
|
4081
4319
|
warning(message) {
|
|
4082
|
-
|
|
4320
|
+
const symbols = output.getSymbols();
|
|
4321
|
+
console.log(import_picocolors3.default.yellow(symbols.warning), message);
|
|
4083
4322
|
}
|
|
4084
4323
|
error(message) {
|
|
4085
|
-
|
|
4324
|
+
const symbols = output.getSymbols();
|
|
4325
|
+
console.error(import_picocolors3.default.red(symbols.error), message);
|
|
4086
4326
|
}
|
|
4087
4327
|
debug(message) {
|
|
4088
4328
|
if (process.env.DEBUG) {
|
|
4089
|
-
console.log(
|
|
4329
|
+
console.log(import_picocolors3.default.gray("[DEBUG]"), message);
|
|
4090
4330
|
}
|
|
4091
4331
|
}
|
|
4092
4332
|
verbose(message, context) {
|
|
@@ -4095,7 +4335,7 @@ class Logger {
|
|
|
4095
4335
|
const timestamp = this.getTimestamp();
|
|
4096
4336
|
const sanitizedMessage = this.sanitize(message);
|
|
4097
4337
|
const formattedContext = context ? this.formatContext(context) : "";
|
|
4098
|
-
const logLine = `${timestamp} ${
|
|
4338
|
+
const logLine = `${timestamp} ${import_picocolors3.default.gray("[VERBOSE]")} ${sanitizedMessage}${formattedContext}`;
|
|
4099
4339
|
console.error(logLine);
|
|
4100
4340
|
if (this.logFileStream) {
|
|
4101
4341
|
const plainLogLine = `${timestamp} [VERBOSE] ${sanitizedMessage}${formattedContext}`;
|
|
@@ -4154,15 +4394,10 @@ class Logger {
|
|
|
4154
4394
|
`)}`;
|
|
4155
4395
|
}
|
|
4156
4396
|
}
|
|
4157
|
-
var
|
|
4397
|
+
var import_picocolors3, logger;
|
|
4158
4398
|
var init_logger = __esm(() => {
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
info: "[i]",
|
|
4162
|
-
success: "[+]",
|
|
4163
|
-
warning: "[!]",
|
|
4164
|
-
error: "[x]"
|
|
4165
|
-
};
|
|
4399
|
+
init_output_manager();
|
|
4400
|
+
import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
4166
4401
|
logger = new Logger;
|
|
4167
4402
|
});
|
|
4168
4403
|
|
|
@@ -6300,10 +6535,14 @@ var init_kit = __esm(() => {
|
|
|
6300
6535
|
});
|
|
6301
6536
|
|
|
6302
6537
|
// src/types/commands.ts
|
|
6303
|
-
var ExcludePatternSchema, FoldersConfigSchema, DEFAULT_FOLDERS, NewCommandOptionsSchema, UpdateCommandOptionsSchema, VersionCommandOptionsSchema, UninstallCommandOptionsSchema, UpdateCliOptionsSchema;
|
|
6538
|
+
var GlobalOutputOptionsSchema, ExcludePatternSchema, FoldersConfigSchema, DEFAULT_FOLDERS, NewCommandOptionsSchema, UpdateCommandOptionsSchema, VersionCommandOptionsSchema, UninstallCommandOptionsSchema, UpdateCliOptionsSchema, DoctorCommandOptionsSchema;
|
|
6304
6539
|
var init_commands = __esm(() => {
|
|
6305
6540
|
init_zod();
|
|
6306
6541
|
init_kit();
|
|
6542
|
+
GlobalOutputOptionsSchema = exports_external.object({
|
|
6543
|
+
verbose: exports_external.boolean().default(false),
|
|
6544
|
+
json: exports_external.boolean().default(false)
|
|
6545
|
+
});
|
|
6307
6546
|
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");
|
|
6308
6547
|
FoldersConfigSchema = exports_external.object({
|
|
6309
6548
|
docs: exports_external.string().optional(),
|
|
@@ -6327,8 +6566,9 @@ var init_commands = __esm(() => {
|
|
|
6327
6566
|
dryRun: exports_external.boolean().default(false),
|
|
6328
6567
|
refresh: exports_external.boolean().default(false),
|
|
6329
6568
|
docsDir: exports_external.string().optional(),
|
|
6330
|
-
plansDir: exports_external.string().optional()
|
|
6331
|
-
|
|
6569
|
+
plansDir: exports_external.string().optional(),
|
|
6570
|
+
yes: exports_external.boolean().default(false)
|
|
6571
|
+
}).merge(GlobalOutputOptionsSchema);
|
|
6332
6572
|
UpdateCommandOptionsSchema = exports_external.object({
|
|
6333
6573
|
dir: exports_external.string().default("."),
|
|
6334
6574
|
kit: KitType.optional(),
|
|
@@ -6348,12 +6588,12 @@ var init_commands = __esm(() => {
|
|
|
6348
6588
|
docsDir: exports_external.string().optional(),
|
|
6349
6589
|
plansDir: exports_external.string().optional(),
|
|
6350
6590
|
yes: exports_external.boolean().default(false)
|
|
6351
|
-
});
|
|
6591
|
+
}).merge(GlobalOutputOptionsSchema);
|
|
6352
6592
|
VersionCommandOptionsSchema = exports_external.object({
|
|
6353
6593
|
kit: KitType.optional(),
|
|
6354
6594
|
limit: exports_external.number().optional(),
|
|
6355
6595
|
all: exports_external.boolean().optional()
|
|
6356
|
-
});
|
|
6596
|
+
}).merge(GlobalOutputOptionsSchema);
|
|
6357
6597
|
UninstallCommandOptionsSchema = exports_external.object({
|
|
6358
6598
|
yes: exports_external.boolean().default(false),
|
|
6359
6599
|
local: exports_external.boolean().default(false),
|
|
@@ -6361,14 +6601,20 @@ var init_commands = __esm(() => {
|
|
|
6361
6601
|
all: exports_external.boolean().default(false),
|
|
6362
6602
|
dryRun: exports_external.boolean().default(false),
|
|
6363
6603
|
forceOverwrite: exports_external.boolean().default(false)
|
|
6364
|
-
});
|
|
6604
|
+
}).merge(GlobalOutputOptionsSchema);
|
|
6365
6605
|
UpdateCliOptionsSchema = exports_external.object({
|
|
6366
6606
|
release: exports_external.string().optional(),
|
|
6367
6607
|
check: exports_external.boolean().default(false),
|
|
6368
6608
|
yes: exports_external.boolean().default(false),
|
|
6369
6609
|
beta: exports_external.boolean().default(false),
|
|
6370
6610
|
registry: exports_external.string().url().optional()
|
|
6371
|
-
});
|
|
6611
|
+
}).merge(GlobalOutputOptionsSchema);
|
|
6612
|
+
DoctorCommandOptionsSchema = exports_external.object({
|
|
6613
|
+
report: exports_external.boolean().default(false),
|
|
6614
|
+
fix: exports_external.boolean().default(false),
|
|
6615
|
+
checkOnly: exports_external.boolean().default(false),
|
|
6616
|
+
full: exports_external.boolean().default(false)
|
|
6617
|
+
}).merge(GlobalOutputOptionsSchema);
|
|
6372
6618
|
});
|
|
6373
6619
|
|
|
6374
6620
|
// src/types/github.ts
|
|
@@ -6937,7 +7183,7 @@ function OD({ input: e = $, output: u = k, overwrite: F = true, hideCursor: t =
|
|
|
6937
7183
|
e.off("keypress", C), t && u.write(import_sisteransi.cursor.show), e.isTTY && !WD && e.setRawMode(false), s.terminal = false, s.close();
|
|
6938
7184
|
};
|
|
6939
7185
|
}
|
|
6940
|
-
var import_sisteransi,
|
|
7186
|
+
var import_sisteransi, import_picocolors4, J, j, Q, X, DD = function() {
|
|
6941
7187
|
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;
|
|
6942
7188
|
}, 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) => {
|
|
6943
7189
|
const t = [...u];
|
|
@@ -7005,7 +7251,7 @@ var import_sisteransi, import_picocolors2, J, j, Q, X, DD = function() {
|
|
|
7005
7251
|
}, 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;
|
|
7006
7252
|
var init_dist = __esm(() => {
|
|
7007
7253
|
import_sisteransi = __toESM(require_src(), 1);
|
|
7008
|
-
|
|
7254
|
+
import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
7009
7255
|
J = q();
|
|
7010
7256
|
j = { exports: {} };
|
|
7011
7257
|
(function(e) {
|
|
@@ -7148,10 +7394,10 @@ var init_dist = __esm(() => {
|
|
|
7148
7394
|
this.valueWithCursor = this.masked;
|
|
7149
7395
|
}), this.on("value", () => {
|
|
7150
7396
|
if (this.cursor >= this.value.length)
|
|
7151
|
-
this.valueWithCursor = `${this.masked}${
|
|
7397
|
+
this.valueWithCursor = `${this.masked}${import_picocolors4.default.inverse(import_picocolors4.default.hidden("_"))}`;
|
|
7152
7398
|
else {
|
|
7153
7399
|
const t = this.masked.slice(0, this.cursor), s = this.masked.slice(this.cursor);
|
|
7154
|
-
this.valueWithCursor = `${t}${
|
|
7400
|
+
this.valueWithCursor = `${t}${import_picocolors4.default.inverse(s[0])}${s.slice(1)}`;
|
|
7155
7401
|
}
|
|
7156
7402
|
});
|
|
7157
7403
|
}
|
|
@@ -7206,10 +7452,10 @@ var init_dist = __esm(() => {
|
|
|
7206
7452
|
this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
|
|
7207
7453
|
}), this.on("value", () => {
|
|
7208
7454
|
if (this.cursor >= this.value.length)
|
|
7209
|
-
this.valueWithCursor = `${this.value}${
|
|
7455
|
+
this.valueWithCursor = `${this.value}${import_picocolors4.default.inverse(import_picocolors4.default.hidden("_"))}`;
|
|
7210
7456
|
else {
|
|
7211
7457
|
const F = this.value.slice(0, this.cursor), t = this.value.slice(this.cursor);
|
|
7212
|
-
this.valueWithCursor = `${F}${
|
|
7458
|
+
this.valueWithCursor = `${F}${import_picocolors4.default.inverse(t[0])}${t.slice(1)}`;
|
|
7213
7459
|
}
|
|
7214
7460
|
});
|
|
7215
7461
|
}
|
|
@@ -7247,99 +7493,99 @@ function me() {
|
|
|
7247
7493
|
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("|");
|
|
7248
7494
|
return new RegExp(r2, "g");
|
|
7249
7495
|
}
|
|
7250
|
-
var
|
|
7496
|
+
var import_picocolors5, 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) => {
|
|
7251
7497
|
switch (r2) {
|
|
7252
7498
|
case "initial":
|
|
7253
7499
|
case "active":
|
|
7254
|
-
return
|
|
7500
|
+
return import_picocolors5.default.cyan(H2);
|
|
7255
7501
|
case "cancel":
|
|
7256
|
-
return
|
|
7502
|
+
return import_picocolors5.default.red(I2);
|
|
7257
7503
|
case "error":
|
|
7258
|
-
return
|
|
7504
|
+
return import_picocolors5.default.yellow(x2);
|
|
7259
7505
|
case "submit":
|
|
7260
|
-
return
|
|
7506
|
+
return import_picocolors5.default.green(S2);
|
|
7261
7507
|
}
|
|
7262
7508
|
}, te = (r2) => new PD({ validate: r2.validate, placeholder: r2.placeholder, defaultValue: r2.defaultValue, initialValue: r2.initialValue, render() {
|
|
7263
|
-
const n = `${
|
|
7509
|
+
const n = `${import_picocolors5.default.gray(a2)}
|
|
7264
7510
|
${y2(this.state)} ${r2.message}
|
|
7265
|
-
`, i = r2.placeholder ?
|
|
7511
|
+
`, i = r2.placeholder ? import_picocolors5.default.inverse(r2.placeholder[0]) + import_picocolors5.default.dim(r2.placeholder.slice(1)) : import_picocolors5.default.inverse(import_picocolors5.default.hidden("_")), t = this.value ? this.valueWithCursor : i;
|
|
7266
7512
|
switch (this.state) {
|
|
7267
7513
|
case "error":
|
|
7268
7514
|
return `${n.trim()}
|
|
7269
|
-
${
|
|
7270
|
-
${
|
|
7515
|
+
${import_picocolors5.default.yellow(a2)} ${t}
|
|
7516
|
+
${import_picocolors5.default.yellow(d2)} ${import_picocolors5.default.yellow(this.error)}
|
|
7271
7517
|
`;
|
|
7272
7518
|
case "submit":
|
|
7273
|
-
return `${n}${
|
|
7519
|
+
return `${n}${import_picocolors5.default.gray(a2)} ${import_picocolors5.default.dim(this.value || r2.placeholder)}`;
|
|
7274
7520
|
case "cancel":
|
|
7275
|
-
return `${n}${
|
|
7276
|
-
` +
|
|
7521
|
+
return `${n}${import_picocolors5.default.gray(a2)} ${import_picocolors5.default.strikethrough(import_picocolors5.default.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
7522
|
+
` + import_picocolors5.default.gray(a2) : ""}`;
|
|
7277
7523
|
default:
|
|
7278
|
-
return `${n}${
|
|
7279
|
-
${
|
|
7524
|
+
return `${n}${import_picocolors5.default.cyan(a2)} ${t}
|
|
7525
|
+
${import_picocolors5.default.cyan(d2)}
|
|
7280
7526
|
`;
|
|
7281
7527
|
}
|
|
7282
7528
|
} }).prompt(), re = (r2) => new bD({ validate: r2.validate, mask: r2.mask ?? U2, render() {
|
|
7283
|
-
const n = `${
|
|
7529
|
+
const n = `${import_picocolors5.default.gray(a2)}
|
|
7284
7530
|
${y2(this.state)} ${r2.message}
|
|
7285
7531
|
`, i = this.valueWithCursor, t = this.masked;
|
|
7286
7532
|
switch (this.state) {
|
|
7287
7533
|
case "error":
|
|
7288
7534
|
return `${n.trim()}
|
|
7289
|
-
${
|
|
7290
|
-
${
|
|
7535
|
+
${import_picocolors5.default.yellow(a2)} ${t}
|
|
7536
|
+
${import_picocolors5.default.yellow(d2)} ${import_picocolors5.default.yellow(this.error)}
|
|
7291
7537
|
`;
|
|
7292
7538
|
case "submit":
|
|
7293
|
-
return `${n}${
|
|
7539
|
+
return `${n}${import_picocolors5.default.gray(a2)} ${import_picocolors5.default.dim(t)}`;
|
|
7294
7540
|
case "cancel":
|
|
7295
|
-
return `${n}${
|
|
7296
|
-
` +
|
|
7541
|
+
return `${n}${import_picocolors5.default.gray(a2)} ${import_picocolors5.default.strikethrough(import_picocolors5.default.dim(t ?? ""))}${t ? `
|
|
7542
|
+
` + import_picocolors5.default.gray(a2) : ""}`;
|
|
7297
7543
|
default:
|
|
7298
|
-
return `${n}${
|
|
7299
|
-
${
|
|
7544
|
+
return `${n}${import_picocolors5.default.cyan(a2)} ${i}
|
|
7545
|
+
${import_picocolors5.default.cyan(d2)}
|
|
7300
7546
|
`;
|
|
7301
7547
|
}
|
|
7302
7548
|
} }).prompt(), se = (r2) => {
|
|
7303
7549
|
const n = r2.active ?? "Yes", i = r2.inactive ?? "No";
|
|
7304
7550
|
return new BD({ active: n, inactive: i, initialValue: r2.initialValue ?? true, render() {
|
|
7305
|
-
const t = `${
|
|
7551
|
+
const t = `${import_picocolors5.default.gray(a2)}
|
|
7306
7552
|
${y2(this.state)} ${r2.message}
|
|
7307
7553
|
`, s = this.value ? n : i;
|
|
7308
7554
|
switch (this.state) {
|
|
7309
7555
|
case "submit":
|
|
7310
|
-
return `${t}${
|
|
7556
|
+
return `${t}${import_picocolors5.default.gray(a2)} ${import_picocolors5.default.dim(s)}`;
|
|
7311
7557
|
case "cancel":
|
|
7312
|
-
return `${t}${
|
|
7313
|
-
${
|
|
7558
|
+
return `${t}${import_picocolors5.default.gray(a2)} ${import_picocolors5.default.strikethrough(import_picocolors5.default.dim(s))}
|
|
7559
|
+
${import_picocolors5.default.gray(a2)}`;
|
|
7314
7560
|
default:
|
|
7315
|
-
return `${t}${
|
|
7316
|
-
${
|
|
7561
|
+
return `${t}${import_picocolors5.default.cyan(a2)} ${this.value ? `${import_picocolors5.default.green(b2)} ${n}` : `${import_picocolors5.default.dim(E)} ${import_picocolors5.default.dim(n)}`} ${import_picocolors5.default.dim("/")} ${this.value ? `${import_picocolors5.default.dim(E)} ${import_picocolors5.default.dim(i)}` : `${import_picocolors5.default.green(b2)} ${i}`}
|
|
7562
|
+
${import_picocolors5.default.cyan(d2)}
|
|
7317
7563
|
`;
|
|
7318
7564
|
}
|
|
7319
7565
|
} }).prompt();
|
|
7320
7566
|
}, ie = (r2) => {
|
|
7321
7567
|
const n = (t, s) => {
|
|
7322
7568
|
const c2 = t.label ?? String(t.value);
|
|
7323
|
-
return s === "active" ? `${
|
|
7569
|
+
return s === "active" ? `${import_picocolors5.default.green(b2)} ${c2} ${t.hint ? import_picocolors5.default.dim(`(${t.hint})`) : ""}` : s === "selected" ? `${import_picocolors5.default.dim(c2)}` : s === "cancelled" ? `${import_picocolors5.default.strikethrough(import_picocolors5.default.dim(c2))}` : `${import_picocolors5.default.dim(E)} ${import_picocolors5.default.dim(c2)}`;
|
|
7324
7570
|
};
|
|
7325
7571
|
let i = 0;
|
|
7326
7572
|
return new $D({ options: r2.options, initialValue: r2.initialValue, render() {
|
|
7327
|
-
const t = `${
|
|
7573
|
+
const t = `${import_picocolors5.default.gray(a2)}
|
|
7328
7574
|
${y2(this.state)} ${r2.message}
|
|
7329
7575
|
`;
|
|
7330
7576
|
switch (this.state) {
|
|
7331
7577
|
case "submit":
|
|
7332
|
-
return `${t}${
|
|
7578
|
+
return `${t}${import_picocolors5.default.gray(a2)} ${n(this.options[this.cursor], "selected")}`;
|
|
7333
7579
|
case "cancel":
|
|
7334
|
-
return `${t}${
|
|
7335
|
-
${
|
|
7580
|
+
return `${t}${import_picocolors5.default.gray(a2)} ${n(this.options[this.cursor], "cancelled")}
|
|
7581
|
+
${import_picocolors5.default.gray(a2)}`;
|
|
7336
7582
|
default: {
|
|
7337
7583
|
const s = r2.maxItems === undefined ? 1 / 0 : Math.max(r2.maxItems, 5);
|
|
7338
7584
|
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));
|
|
7339
7585
|
const c2 = s < this.options.length && i > 0, l2 = s < this.options.length && i + s < this.options.length;
|
|
7340
|
-
return `${t}${
|
|
7341
|
-
${
|
|
7342
|
-
${
|
|
7586
|
+
return `${t}${import_picocolors5.default.cyan(a2)} ${this.options.slice(i, i + s).map((u, m2, $2) => m2 === 0 && c2 ? import_picocolors5.default.dim("...") : m2 === $2.length - 1 && l2 ? import_picocolors5.default.dim("...") : n(u, m2 + i === this.cursor ? "active" : "inactive")).join(`
|
|
7587
|
+
${import_picocolors5.default.cyan(a2)} `)}
|
|
7588
|
+
${import_picocolors5.default.cyan(d2)}
|
|
7343
7589
|
`;
|
|
7344
7590
|
}
|
|
7345
7591
|
}
|
|
@@ -7347,108 +7593,108 @@ ${import_picocolors3.default.cyan(d2)}
|
|
|
7347
7593
|
}, ne = (r2) => {
|
|
7348
7594
|
const n = (i, t = "inactive") => {
|
|
7349
7595
|
const s = i.label ?? String(i.value);
|
|
7350
|
-
return t === "selected" ? `${
|
|
7596
|
+
return t === "selected" ? `${import_picocolors5.default.dim(s)}` : t === "cancelled" ? `${import_picocolors5.default.strikethrough(import_picocolors5.default.dim(s))}` : t === "active" ? `${import_picocolors5.default.bgCyan(import_picocolors5.default.gray(` ${i.value} `))} ${s} ${i.hint ? import_picocolors5.default.dim(`(${i.hint})`) : ""}` : `${import_picocolors5.default.gray(import_picocolors5.default.bgWhite(import_picocolors5.default.inverse(` ${i.value} `)))} ${s} ${i.hint ? import_picocolors5.default.dim(`(${i.hint})`) : ""}`;
|
|
7351
7597
|
};
|
|
7352
7598
|
return new SD({ options: r2.options, initialValue: r2.initialValue, render() {
|
|
7353
|
-
const i = `${
|
|
7599
|
+
const i = `${import_picocolors5.default.gray(a2)}
|
|
7354
7600
|
${y2(this.state)} ${r2.message}
|
|
7355
7601
|
`;
|
|
7356
7602
|
switch (this.state) {
|
|
7357
7603
|
case "submit":
|
|
7358
|
-
return `${i}${
|
|
7604
|
+
return `${i}${import_picocolors5.default.gray(a2)} ${n(this.options.find((t) => t.value === this.value), "selected")}`;
|
|
7359
7605
|
case "cancel":
|
|
7360
|
-
return `${i}${
|
|
7361
|
-
${
|
|
7606
|
+
return `${i}${import_picocolors5.default.gray(a2)} ${n(this.options[0], "cancelled")}
|
|
7607
|
+
${import_picocolors5.default.gray(a2)}`;
|
|
7362
7608
|
default:
|
|
7363
|
-
return `${i}${
|
|
7364
|
-
${
|
|
7365
|
-
${
|
|
7609
|
+
return `${i}${import_picocolors5.default.cyan(a2)} ${this.options.map((t, s) => n(t, s === this.cursor ? "active" : "inactive")).join(`
|
|
7610
|
+
${import_picocolors5.default.cyan(a2)} `)}
|
|
7611
|
+
${import_picocolors5.default.cyan(d2)}
|
|
7366
7612
|
`;
|
|
7367
7613
|
}
|
|
7368
7614
|
} }).prompt();
|
|
7369
7615
|
}, ae = (r2) => {
|
|
7370
7616
|
const n = (i, t) => {
|
|
7371
7617
|
const s = i.label ?? String(i.value);
|
|
7372
|
-
return t === "active" ? `${
|
|
7618
|
+
return t === "active" ? `${import_picocolors5.default.cyan(C)} ${s} ${i.hint ? import_picocolors5.default.dim(`(${i.hint})`) : ""}` : t === "selected" ? `${import_picocolors5.default.green(w2)} ${import_picocolors5.default.dim(s)}` : t === "cancelled" ? `${import_picocolors5.default.strikethrough(import_picocolors5.default.dim(s))}` : t === "active-selected" ? `${import_picocolors5.default.green(w2)} ${s} ${i.hint ? import_picocolors5.default.dim(`(${i.hint})`) : ""}` : t === "submitted" ? `${import_picocolors5.default.dim(s)}` : `${import_picocolors5.default.dim(M2)} ${import_picocolors5.default.dim(s)}`;
|
|
7373
7619
|
};
|
|
7374
7620
|
return new vD({ options: r2.options, initialValues: r2.initialValues, required: r2.required ?? true, cursorAt: r2.cursorAt, validate(i) {
|
|
7375
7621
|
if (this.required && i.length === 0)
|
|
7376
7622
|
return `Please select at least one option.
|
|
7377
|
-
${
|
|
7623
|
+
${import_picocolors5.default.reset(import_picocolors5.default.dim(`Press ${import_picocolors5.default.gray(import_picocolors5.default.bgWhite(import_picocolors5.default.inverse(" space ")))} to select, ${import_picocolors5.default.gray(import_picocolors5.default.bgWhite(import_picocolors5.default.inverse(" enter ")))} to submit`))}`;
|
|
7378
7624
|
}, render() {
|
|
7379
|
-
let i = `${
|
|
7625
|
+
let i = `${import_picocolors5.default.gray(a2)}
|
|
7380
7626
|
${y2(this.state)} ${r2.message}
|
|
7381
7627
|
`;
|
|
7382
7628
|
switch (this.state) {
|
|
7383
7629
|
case "submit":
|
|
7384
|
-
return `${i}${
|
|
7630
|
+
return `${i}${import_picocolors5.default.gray(a2)} ${this.options.filter(({ value: t }) => this.value.includes(t)).map((t) => n(t, "submitted")).join(import_picocolors5.default.dim(", ")) || import_picocolors5.default.dim("none")}`;
|
|
7385
7631
|
case "cancel": {
|
|
7386
|
-
const t = this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => n(s, "cancelled")).join(
|
|
7387
|
-
return `${i}${
|
|
7388
|
-
${
|
|
7632
|
+
const t = this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => n(s, "cancelled")).join(import_picocolors5.default.dim(", "));
|
|
7633
|
+
return `${i}${import_picocolors5.default.gray(a2)} ${t.trim() ? `${t}
|
|
7634
|
+
${import_picocolors5.default.gray(a2)}` : ""}`;
|
|
7389
7635
|
}
|
|
7390
7636
|
case "error": {
|
|
7391
7637
|
const t = this.error.split(`
|
|
7392
|
-
`).map((s, c2) => c2 === 0 ? `${
|
|
7638
|
+
`).map((s, c2) => c2 === 0 ? `${import_picocolors5.default.yellow(d2)} ${import_picocolors5.default.yellow(s)}` : ` ${s}`).join(`
|
|
7393
7639
|
`);
|
|
7394
|
-
return i +
|
|
7640
|
+
return i + import_picocolors5.default.yellow(a2) + " " + this.options.map((s, c2) => {
|
|
7395
7641
|
const l2 = this.value.includes(s.value), u = c2 === this.cursor;
|
|
7396
7642
|
return u && l2 ? n(s, "active-selected") : l2 ? n(s, "selected") : n(s, u ? "active" : "inactive");
|
|
7397
7643
|
}).join(`
|
|
7398
|
-
${
|
|
7644
|
+
${import_picocolors5.default.yellow(a2)} `) + `
|
|
7399
7645
|
` + t + `
|
|
7400
7646
|
`;
|
|
7401
7647
|
}
|
|
7402
7648
|
default:
|
|
7403
|
-
return `${i}${
|
|
7649
|
+
return `${i}${import_picocolors5.default.cyan(a2)} ${this.options.map((t, s) => {
|
|
7404
7650
|
const c2 = this.value.includes(t.value), l2 = s === this.cursor;
|
|
7405
7651
|
return l2 && c2 ? n(t, "active-selected") : c2 ? n(t, "selected") : n(t, l2 ? "active" : "inactive");
|
|
7406
7652
|
}).join(`
|
|
7407
|
-
${
|
|
7408
|
-
${
|
|
7653
|
+
${import_picocolors5.default.cyan(a2)} `)}
|
|
7654
|
+
${import_picocolors5.default.cyan(d2)}
|
|
7409
7655
|
`;
|
|
7410
7656
|
}
|
|
7411
7657
|
} }).prompt();
|
|
7412
7658
|
}, ce = (r2) => {
|
|
7413
7659
|
const n = (i, t, s = []) => {
|
|
7414
7660
|
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} ` : "";
|
|
7415
|
-
return t === "active" ? `${
|
|
7661
|
+
return t === "active" ? `${import_picocolors5.default.dim($2)}${import_picocolors5.default.cyan(C)} ${c2} ${i.hint ? import_picocolors5.default.dim(`(${i.hint})`) : ""}` : t === "group-active" ? `${$2}${import_picocolors5.default.cyan(C)} ${import_picocolors5.default.dim(c2)}` : t === "group-active-selected" ? `${$2}${import_picocolors5.default.green(w2)} ${import_picocolors5.default.dim(c2)}` : t === "selected" ? `${import_picocolors5.default.dim($2)}${import_picocolors5.default.green(w2)} ${import_picocolors5.default.dim(c2)}` : t === "cancelled" ? `${import_picocolors5.default.strikethrough(import_picocolors5.default.dim(c2))}` : t === "active-selected" ? `${import_picocolors5.default.dim($2)}${import_picocolors5.default.green(w2)} ${c2} ${i.hint ? import_picocolors5.default.dim(`(${i.hint})`) : ""}` : t === "submitted" ? `${import_picocolors5.default.dim(c2)}` : `${import_picocolors5.default.dim($2)}${import_picocolors5.default.dim(M2)} ${import_picocolors5.default.dim(c2)}`;
|
|
7416
7662
|
};
|
|
7417
7663
|
return new pD({ options: r2.options, initialValues: r2.initialValues, required: r2.required ?? true, cursorAt: r2.cursorAt, validate(i) {
|
|
7418
7664
|
if (this.required && i.length === 0)
|
|
7419
7665
|
return `Please select at least one option.
|
|
7420
|
-
${
|
|
7666
|
+
${import_picocolors5.default.reset(import_picocolors5.default.dim(`Press ${import_picocolors5.default.gray(import_picocolors5.default.bgWhite(import_picocolors5.default.inverse(" space ")))} to select, ${import_picocolors5.default.gray(import_picocolors5.default.bgWhite(import_picocolors5.default.inverse(" enter ")))} to submit`))}`;
|
|
7421
7667
|
}, render() {
|
|
7422
|
-
let i = `${
|
|
7668
|
+
let i = `${import_picocolors5.default.gray(a2)}
|
|
7423
7669
|
${y2(this.state)} ${r2.message}
|
|
7424
7670
|
`;
|
|
7425
7671
|
switch (this.state) {
|
|
7426
7672
|
case "submit":
|
|
7427
|
-
return `${i}${
|
|
7673
|
+
return `${i}${import_picocolors5.default.gray(a2)} ${this.options.filter(({ value: t }) => this.value.includes(t)).map((t) => n(t, "submitted")).join(import_picocolors5.default.dim(", "))}`;
|
|
7428
7674
|
case "cancel": {
|
|
7429
|
-
const t = this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => n(s, "cancelled")).join(
|
|
7430
|
-
return `${i}${
|
|
7431
|
-
${
|
|
7675
|
+
const t = this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => n(s, "cancelled")).join(import_picocolors5.default.dim(", "));
|
|
7676
|
+
return `${i}${import_picocolors5.default.gray(a2)} ${t.trim() ? `${t}
|
|
7677
|
+
${import_picocolors5.default.gray(a2)}` : ""}`;
|
|
7432
7678
|
}
|
|
7433
7679
|
case "error": {
|
|
7434
7680
|
const t = this.error.split(`
|
|
7435
|
-
`).map((s, c2) => c2 === 0 ? `${
|
|
7681
|
+
`).map((s, c2) => c2 === 0 ? `${import_picocolors5.default.yellow(d2)} ${import_picocolors5.default.yellow(s)}` : ` ${s}`).join(`
|
|
7436
7682
|
`);
|
|
7437
|
-
return `${i}${
|
|
7683
|
+
return `${i}${import_picocolors5.default.yellow(a2)} ${this.options.map((s, c2, l2) => {
|
|
7438
7684
|
const u = this.value.includes(s.value) || s.group === true && this.isGroupSelected(`${s.value}`), m2 = c2 === this.cursor;
|
|
7439
7685
|
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);
|
|
7440
7686
|
}).join(`
|
|
7441
|
-
${
|
|
7687
|
+
${import_picocolors5.default.yellow(a2)} `)}
|
|
7442
7688
|
${t}
|
|
7443
7689
|
`;
|
|
7444
7690
|
}
|
|
7445
7691
|
default:
|
|
7446
|
-
return `${i}${
|
|
7692
|
+
return `${i}${import_picocolors5.default.cyan(a2)} ${this.options.map((t, s, c2) => {
|
|
7447
7693
|
const l2 = this.value.includes(t.value) || t.group === true && this.isGroupSelected(`${t.value}`), u = s === this.cursor;
|
|
7448
7694
|
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);
|
|
7449
7695
|
}).join(`
|
|
7450
|
-
${
|
|
7451
|
-
${
|
|
7696
|
+
${import_picocolors5.default.cyan(a2)} `)}
|
|
7697
|
+
${import_picocolors5.default.cyan(d2)}
|
|
7452
7698
|
`;
|
|
7453
7699
|
}
|
|
7454
7700
|
} }).prompt();
|
|
@@ -7456,39 +7702,39 @@ ${import_picocolors3.default.cyan(d2)}
|
|
|
7456
7702
|
const i = `
|
|
7457
7703
|
${r2}
|
|
7458
7704
|
`.split(`
|
|
7459
|
-
`), 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) => `${
|
|
7705
|
+
`), 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_picocolors5.default.gray(a2)} ${import_picocolors5.default.dim(l2)}${" ".repeat(s - R2(l2).length)}${import_picocolors5.default.gray(a2)}`).join(`
|
|
7460
7706
|
`);
|
|
7461
|
-
process.stdout.write(`${
|
|
7462
|
-
${
|
|
7707
|
+
process.stdout.write(`${import_picocolors5.default.gray(a2)}
|
|
7708
|
+
${import_picocolors5.default.green(S2)} ${import_picocolors5.default.reset(n)} ${import_picocolors5.default.gray(B.repeat(Math.max(s - t - 1, 1)) + Z2)}
|
|
7463
7709
|
${c2}
|
|
7464
|
-
${
|
|
7710
|
+
${import_picocolors5.default.gray(z2 + B.repeat(s + 2) + X2)}
|
|
7465
7711
|
`);
|
|
7466
7712
|
}, ue = (r2 = "") => {
|
|
7467
|
-
process.stdout.write(`${
|
|
7713
|
+
process.stdout.write(`${import_picocolors5.default.gray(d2)} ${import_picocolors5.default.red(r2)}
|
|
7468
7714
|
|
|
7469
7715
|
`);
|
|
7470
7716
|
}, oe = (r2 = "") => {
|
|
7471
|
-
process.stdout.write(`${
|
|
7717
|
+
process.stdout.write(`${import_picocolors5.default.gray(K2)} ${r2}
|
|
7472
7718
|
`);
|
|
7473
7719
|
}, $e = (r2 = "") => {
|
|
7474
|
-
process.stdout.write(`${
|
|
7475
|
-
${
|
|
7720
|
+
process.stdout.write(`${import_picocolors5.default.gray(a2)}
|
|
7721
|
+
${import_picocolors5.default.gray(d2)} ${r2}
|
|
7476
7722
|
|
|
7477
7723
|
`);
|
|
7478
7724
|
}, f2, de = () => {
|
|
7479
7725
|
const r2 = _2 ? ["◒", "◐", "◓", "◑"] : ["•", "o", "O", "0"], n = _2 ? 80 : 120;
|
|
7480
7726
|
let i, t, s = false, c2 = "";
|
|
7481
7727
|
const l2 = (v2 = "") => {
|
|
7482
|
-
s = true, i = OD(), c2 = v2.replace(/\.+$/, ""), process.stdout.write(`${
|
|
7728
|
+
s = true, i = OD(), c2 = v2.replace(/\.+$/, ""), process.stdout.write(`${import_picocolors5.default.gray(a2)}
|
|
7483
7729
|
`);
|
|
7484
7730
|
let g2 = 0, p = 0;
|
|
7485
7731
|
t = setInterval(() => {
|
|
7486
|
-
const O2 =
|
|
7732
|
+
const O2 = import_picocolors5.default.magenta(r2[g2]), P2 = ".".repeat(Math.floor(p)).slice(0, 3);
|
|
7487
7733
|
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;
|
|
7488
7734
|
}, n);
|
|
7489
7735
|
}, u = (v2 = "", g2 = 0) => {
|
|
7490
7736
|
c2 = v2 ?? c2, s = false, clearInterval(t);
|
|
7491
|
-
const p = g2 === 0 ?
|
|
7737
|
+
const p = g2 === 0 ? import_picocolors5.default.green(S2) : g2 === 1 ? import_picocolors5.default.red(I2) : import_picocolors5.default.red(x2);
|
|
7492
7738
|
process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${p} ${c2}
|
|
7493
7739
|
`), i();
|
|
7494
7740
|
}, m2 = (v2 = "") => {
|
|
@@ -7515,7 +7761,7 @@ ${import_picocolors3.default.gray(d2)} ${r2}
|
|
|
7515
7761
|
var init_dist2 = __esm(() => {
|
|
7516
7762
|
init_dist();
|
|
7517
7763
|
init_dist();
|
|
7518
|
-
|
|
7764
|
+
import_picocolors5 = __toESM(require_picocolors(), 1);
|
|
7519
7765
|
import_sisteransi2 = __toESM(require_src(), 1);
|
|
7520
7766
|
_2 = q2();
|
|
7521
7767
|
H2 = o("◆", "*");
|
|
@@ -7539,28 +7785,28 @@ var init_dist2 = __esm(() => {
|
|
|
7539
7785
|
Y2 = o("◆", "*");
|
|
7540
7786
|
Q2 = o("▲", "!");
|
|
7541
7787
|
ee = o("■", "x");
|
|
7542
|
-
f2 = { message: (r2 = "", { symbol: n =
|
|
7543
|
-
const i = [`${
|
|
7788
|
+
f2 = { message: (r2 = "", { symbol: n = import_picocolors5.default.gray(a2) } = {}) => {
|
|
7789
|
+
const i = [`${import_picocolors5.default.gray(a2)}`];
|
|
7544
7790
|
if (r2) {
|
|
7545
7791
|
const [t, ...s] = r2.split(`
|
|
7546
7792
|
`);
|
|
7547
|
-
i.push(`${n} ${t}`, ...s.map((c2) => `${
|
|
7793
|
+
i.push(`${n} ${t}`, ...s.map((c2) => `${import_picocolors5.default.gray(a2)} ${c2}`));
|
|
7548
7794
|
}
|
|
7549
7795
|
process.stdout.write(`${i.join(`
|
|
7550
7796
|
`)}
|
|
7551
7797
|
`);
|
|
7552
7798
|
}, info: (r2) => {
|
|
7553
|
-
f2.message(r2, { symbol:
|
|
7799
|
+
f2.message(r2, { symbol: import_picocolors5.default.blue(J2) });
|
|
7554
7800
|
}, success: (r2) => {
|
|
7555
|
-
f2.message(r2, { symbol:
|
|
7801
|
+
f2.message(r2, { symbol: import_picocolors5.default.green(Y2) });
|
|
7556
7802
|
}, step: (r2) => {
|
|
7557
|
-
f2.message(r2, { symbol:
|
|
7803
|
+
f2.message(r2, { symbol: import_picocolors5.default.green(S2) });
|
|
7558
7804
|
}, warn: (r2) => {
|
|
7559
|
-
f2.message(r2, { symbol:
|
|
7805
|
+
f2.message(r2, { symbol: import_picocolors5.default.yellow(Q2) });
|
|
7560
7806
|
}, warning: (r2) => {
|
|
7561
7807
|
f2.warn(r2);
|
|
7562
7808
|
}, error: (r2) => {
|
|
7563
|
-
f2.message(r2, { symbol:
|
|
7809
|
+
f2.message(r2, { symbol: import_picocolors5.default.red(ee) });
|
|
7564
7810
|
} };
|
|
7565
7811
|
});
|
|
7566
7812
|
|
|
@@ -9211,767 +9457,6 @@ var require_emoji_regex = __commonJS((exports, module) => {
|
|
|
9211
9457
|
};
|
|
9212
9458
|
});
|
|
9213
9459
|
|
|
9214
|
-
// node_modules/cli-progress/lib/eta.js
|
|
9215
|
-
var require_eta = __commonJS((exports, module) => {
|
|
9216
|
-
class ETA {
|
|
9217
|
-
constructor(length, initTime, initValue) {
|
|
9218
|
-
this.etaBufferLength = length || 100;
|
|
9219
|
-
this.valueBuffer = [initValue];
|
|
9220
|
-
this.timeBuffer = [initTime];
|
|
9221
|
-
this.eta = "0";
|
|
9222
|
-
}
|
|
9223
|
-
update(time, value, total) {
|
|
9224
|
-
this.valueBuffer.push(value);
|
|
9225
|
-
this.timeBuffer.push(time);
|
|
9226
|
-
this.calculate(total - value);
|
|
9227
|
-
}
|
|
9228
|
-
getTime() {
|
|
9229
|
-
return this.eta;
|
|
9230
|
-
}
|
|
9231
|
-
calculate(remaining) {
|
|
9232
|
-
const currentBufferSize = this.valueBuffer.length;
|
|
9233
|
-
const buffer = Math.min(this.etaBufferLength, currentBufferSize);
|
|
9234
|
-
const v_diff = this.valueBuffer[currentBufferSize - 1] - this.valueBuffer[currentBufferSize - buffer];
|
|
9235
|
-
const t_diff = this.timeBuffer[currentBufferSize - 1] - this.timeBuffer[currentBufferSize - buffer];
|
|
9236
|
-
const vt_rate = v_diff / t_diff;
|
|
9237
|
-
this.valueBuffer = this.valueBuffer.slice(-this.etaBufferLength);
|
|
9238
|
-
this.timeBuffer = this.timeBuffer.slice(-this.etaBufferLength);
|
|
9239
|
-
const eta = Math.ceil(remaining / vt_rate / 1000);
|
|
9240
|
-
if (isNaN(eta)) {
|
|
9241
|
-
this.eta = "NULL";
|
|
9242
|
-
} else if (!isFinite(eta)) {
|
|
9243
|
-
this.eta = "INF";
|
|
9244
|
-
} else if (eta > 1e7) {
|
|
9245
|
-
this.eta = "INF";
|
|
9246
|
-
} else if (eta < 0) {
|
|
9247
|
-
this.eta = 0;
|
|
9248
|
-
} else {
|
|
9249
|
-
this.eta = eta;
|
|
9250
|
-
}
|
|
9251
|
-
}
|
|
9252
|
-
}
|
|
9253
|
-
module.exports = ETA;
|
|
9254
|
-
});
|
|
9255
|
-
|
|
9256
|
-
// node_modules/cli-progress/lib/terminal.js
|
|
9257
|
-
var require_terminal = __commonJS((exports, module) => {
|
|
9258
|
-
var _readline = __require("readline");
|
|
9259
|
-
|
|
9260
|
-
class Terminal {
|
|
9261
|
-
constructor(outputStream) {
|
|
9262
|
-
this.stream = outputStream;
|
|
9263
|
-
this.linewrap = true;
|
|
9264
|
-
this.dy = 0;
|
|
9265
|
-
}
|
|
9266
|
-
cursorSave() {
|
|
9267
|
-
if (!this.stream.isTTY) {
|
|
9268
|
-
return;
|
|
9269
|
-
}
|
|
9270
|
-
this.stream.write("\x1B7");
|
|
9271
|
-
}
|
|
9272
|
-
cursorRestore() {
|
|
9273
|
-
if (!this.stream.isTTY) {
|
|
9274
|
-
return;
|
|
9275
|
-
}
|
|
9276
|
-
this.stream.write("\x1B8");
|
|
9277
|
-
}
|
|
9278
|
-
cursor(enabled) {
|
|
9279
|
-
if (!this.stream.isTTY) {
|
|
9280
|
-
return;
|
|
9281
|
-
}
|
|
9282
|
-
if (enabled) {
|
|
9283
|
-
this.stream.write("\x1B[?25h");
|
|
9284
|
-
} else {
|
|
9285
|
-
this.stream.write("\x1B[?25l");
|
|
9286
|
-
}
|
|
9287
|
-
}
|
|
9288
|
-
cursorTo(x3 = null, y3 = null) {
|
|
9289
|
-
if (!this.stream.isTTY) {
|
|
9290
|
-
return;
|
|
9291
|
-
}
|
|
9292
|
-
_readline.cursorTo(this.stream, x3, y3);
|
|
9293
|
-
}
|
|
9294
|
-
cursorRelative(dx = null, dy = null) {
|
|
9295
|
-
if (!this.stream.isTTY) {
|
|
9296
|
-
return;
|
|
9297
|
-
}
|
|
9298
|
-
this.dy = this.dy + dy;
|
|
9299
|
-
_readline.moveCursor(this.stream, dx, dy);
|
|
9300
|
-
}
|
|
9301
|
-
cursorRelativeReset() {
|
|
9302
|
-
if (!this.stream.isTTY) {
|
|
9303
|
-
return;
|
|
9304
|
-
}
|
|
9305
|
-
_readline.moveCursor(this.stream, 0, -this.dy);
|
|
9306
|
-
_readline.cursorTo(this.stream, 0, null);
|
|
9307
|
-
this.dy = 0;
|
|
9308
|
-
}
|
|
9309
|
-
clearRight() {
|
|
9310
|
-
if (!this.stream.isTTY) {
|
|
9311
|
-
return;
|
|
9312
|
-
}
|
|
9313
|
-
_readline.clearLine(this.stream, 1);
|
|
9314
|
-
}
|
|
9315
|
-
clearLine() {
|
|
9316
|
-
if (!this.stream.isTTY) {
|
|
9317
|
-
return;
|
|
9318
|
-
}
|
|
9319
|
-
_readline.clearLine(this.stream, 0);
|
|
9320
|
-
}
|
|
9321
|
-
clearBottom() {
|
|
9322
|
-
if (!this.stream.isTTY) {
|
|
9323
|
-
return;
|
|
9324
|
-
}
|
|
9325
|
-
_readline.clearScreenDown(this.stream);
|
|
9326
|
-
}
|
|
9327
|
-
newline() {
|
|
9328
|
-
this.stream.write(`
|
|
9329
|
-
`);
|
|
9330
|
-
this.dy++;
|
|
9331
|
-
}
|
|
9332
|
-
write(s, rawWrite = false) {
|
|
9333
|
-
if (this.linewrap === true && rawWrite === false) {
|
|
9334
|
-
this.stream.write(s.substr(0, this.getWidth()));
|
|
9335
|
-
} else {
|
|
9336
|
-
this.stream.write(s);
|
|
9337
|
-
}
|
|
9338
|
-
}
|
|
9339
|
-
lineWrapping(enabled) {
|
|
9340
|
-
if (!this.stream.isTTY) {
|
|
9341
|
-
return;
|
|
9342
|
-
}
|
|
9343
|
-
this.linewrap = enabled;
|
|
9344
|
-
if (enabled) {
|
|
9345
|
-
this.stream.write("\x1B[?7h");
|
|
9346
|
-
} else {
|
|
9347
|
-
this.stream.write("\x1B[?7l");
|
|
9348
|
-
}
|
|
9349
|
-
}
|
|
9350
|
-
isTTY() {
|
|
9351
|
-
return this.stream.isTTY === true;
|
|
9352
|
-
}
|
|
9353
|
-
getWidth() {
|
|
9354
|
-
return this.stream.columns || (this.stream.isTTY ? 80 : 200);
|
|
9355
|
-
}
|
|
9356
|
-
}
|
|
9357
|
-
module.exports = Terminal;
|
|
9358
|
-
});
|
|
9359
|
-
|
|
9360
|
-
// node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
9361
|
-
var require_ansi_regex = __commonJS((exports, module) => {
|
|
9362
|
-
module.exports = ({ onlyFirst = false } = {}) => {
|
|
9363
|
-
const pattern = [
|
|
9364
|
-
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
9365
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
9366
|
-
].join("|");
|
|
9367
|
-
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
9368
|
-
};
|
|
9369
|
-
});
|
|
9370
|
-
|
|
9371
|
-
// node_modules/string-width/node_modules/strip-ansi/index.js
|
|
9372
|
-
var require_strip_ansi = __commonJS((exports, module) => {
|
|
9373
|
-
var ansiRegex2 = require_ansi_regex();
|
|
9374
|
-
module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex2(), "") : string;
|
|
9375
|
-
});
|
|
9376
|
-
|
|
9377
|
-
// node_modules/is-fullwidth-code-point/index.js
|
|
9378
|
-
var require_is_fullwidth_code_point = __commonJS((exports, module) => {
|
|
9379
|
-
var isFullwidthCodePoint = (codePoint) => {
|
|
9380
|
-
if (Number.isNaN(codePoint)) {
|
|
9381
|
-
return false;
|
|
9382
|
-
}
|
|
9383
|
-
if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) {
|
|
9384
|
-
return true;
|
|
9385
|
-
}
|
|
9386
|
-
return false;
|
|
9387
|
-
};
|
|
9388
|
-
module.exports = isFullwidthCodePoint;
|
|
9389
|
-
module.exports.default = isFullwidthCodePoint;
|
|
9390
|
-
});
|
|
9391
|
-
|
|
9392
|
-
// node_modules/emoji-regex/index.js
|
|
9393
|
-
var require_emoji_regex2 = __commonJS((exports, module) => {
|
|
9394
|
-
module.exports = function() {
|
|
9395
|
-
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
9396
|
-
};
|
|
9397
|
-
});
|
|
9398
|
-
|
|
9399
|
-
// node_modules/string-width/index.js
|
|
9400
|
-
var require_string_width = __commonJS((exports, module) => {
|
|
9401
|
-
var stripAnsi2 = require_strip_ansi();
|
|
9402
|
-
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
9403
|
-
var emojiRegex3 = require_emoji_regex2();
|
|
9404
|
-
var stringWidth2 = (string) => {
|
|
9405
|
-
if (typeof string !== "string" || string.length === 0) {
|
|
9406
|
-
return 0;
|
|
9407
|
-
}
|
|
9408
|
-
string = stripAnsi2(string);
|
|
9409
|
-
if (string.length === 0) {
|
|
9410
|
-
return 0;
|
|
9411
|
-
}
|
|
9412
|
-
string = string.replace(emojiRegex3(), " ");
|
|
9413
|
-
let width = 0;
|
|
9414
|
-
for (let i = 0;i < string.length; i++) {
|
|
9415
|
-
const code = string.codePointAt(i);
|
|
9416
|
-
if (code <= 31 || code >= 127 && code <= 159) {
|
|
9417
|
-
continue;
|
|
9418
|
-
}
|
|
9419
|
-
if (code >= 768 && code <= 879) {
|
|
9420
|
-
continue;
|
|
9421
|
-
}
|
|
9422
|
-
if (code > 65535) {
|
|
9423
|
-
i++;
|
|
9424
|
-
}
|
|
9425
|
-
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
9426
|
-
}
|
|
9427
|
-
return width;
|
|
9428
|
-
};
|
|
9429
|
-
module.exports = stringWidth2;
|
|
9430
|
-
module.exports.default = stringWidth2;
|
|
9431
|
-
});
|
|
9432
|
-
|
|
9433
|
-
// node_modules/cli-progress/lib/format-value.js
|
|
9434
|
-
var require_format_value = __commonJS((exports, module) => {
|
|
9435
|
-
module.exports = function formatValue(v2, options, type) {
|
|
9436
|
-
if (options.autopadding !== true) {
|
|
9437
|
-
return v2;
|
|
9438
|
-
}
|
|
9439
|
-
function autopadding(value, length) {
|
|
9440
|
-
return (options.autopaddingChar + value).slice(-length);
|
|
9441
|
-
}
|
|
9442
|
-
switch (type) {
|
|
9443
|
-
case "percentage":
|
|
9444
|
-
return autopadding(v2, 3);
|
|
9445
|
-
default:
|
|
9446
|
-
return v2;
|
|
9447
|
-
}
|
|
9448
|
-
};
|
|
9449
|
-
});
|
|
9450
|
-
|
|
9451
|
-
// node_modules/cli-progress/lib/format-bar.js
|
|
9452
|
-
var require_format_bar = __commonJS((exports, module) => {
|
|
9453
|
-
module.exports = function formatBar(progress, options) {
|
|
9454
|
-
const completeSize = Math.round(progress * options.barsize);
|
|
9455
|
-
const incompleteSize = options.barsize - completeSize;
|
|
9456
|
-
return options.barCompleteString.substr(0, completeSize) + options.barGlue + options.barIncompleteString.substr(0, incompleteSize);
|
|
9457
|
-
};
|
|
9458
|
-
});
|
|
9459
|
-
|
|
9460
|
-
// node_modules/cli-progress/lib/format-time.js
|
|
9461
|
-
var require_format_time = __commonJS((exports, module) => {
|
|
9462
|
-
module.exports = function formatTime(t, options, roundToMultipleOf) {
|
|
9463
|
-
function round(input) {
|
|
9464
|
-
if (roundToMultipleOf) {
|
|
9465
|
-
return roundToMultipleOf * Math.round(input / roundToMultipleOf);
|
|
9466
|
-
} else {
|
|
9467
|
-
return input;
|
|
9468
|
-
}
|
|
9469
|
-
}
|
|
9470
|
-
function autopadding(v2) {
|
|
9471
|
-
return (options.autopaddingChar + v2).slice(-2);
|
|
9472
|
-
}
|
|
9473
|
-
if (t > 3600) {
|
|
9474
|
-
return autopadding(Math.floor(t / 3600)) + "h" + autopadding(round(t % 3600 / 60)) + "m";
|
|
9475
|
-
} else if (t > 60) {
|
|
9476
|
-
return autopadding(Math.floor(t / 60)) + "m" + autopadding(round(t % 60)) + "s";
|
|
9477
|
-
} else if (t > 10) {
|
|
9478
|
-
return autopadding(round(t)) + "s";
|
|
9479
|
-
} else {
|
|
9480
|
-
return autopadding(t) + "s";
|
|
9481
|
-
}
|
|
9482
|
-
};
|
|
9483
|
-
});
|
|
9484
|
-
|
|
9485
|
-
// node_modules/cli-progress/lib/formatter.js
|
|
9486
|
-
var require_formatter = __commonJS((exports, module) => {
|
|
9487
|
-
var _stringWidth = require_string_width();
|
|
9488
|
-
var _defaultFormatValue = require_format_value();
|
|
9489
|
-
var _defaultFormatBar = require_format_bar();
|
|
9490
|
-
var _defaultFormatTime = require_format_time();
|
|
9491
|
-
module.exports = function defaultFormatter(options, params, payload) {
|
|
9492
|
-
let s = options.format;
|
|
9493
|
-
const formatTime = options.formatTime || _defaultFormatTime;
|
|
9494
|
-
const formatValue = options.formatValue || _defaultFormatValue;
|
|
9495
|
-
const formatBar = options.formatBar || _defaultFormatBar;
|
|
9496
|
-
const percentage = Math.floor(params.progress * 100) + "";
|
|
9497
|
-
const stopTime = params.stopTime || Date.now();
|
|
9498
|
-
const elapsedTime = Math.round((stopTime - params.startTime) / 1000);
|
|
9499
|
-
const context = Object.assign({}, payload, {
|
|
9500
|
-
bar: formatBar(params.progress, options),
|
|
9501
|
-
percentage: formatValue(percentage, options, "percentage"),
|
|
9502
|
-
total: formatValue(params.total, options, "total"),
|
|
9503
|
-
value: formatValue(params.value, options, "value"),
|
|
9504
|
-
eta: formatValue(params.eta, options, "eta"),
|
|
9505
|
-
eta_formatted: formatTime(params.eta, options, 5),
|
|
9506
|
-
duration: formatValue(elapsedTime, options, "duration"),
|
|
9507
|
-
duration_formatted: formatTime(elapsedTime, options, 1)
|
|
9508
|
-
});
|
|
9509
|
-
s = s.replace(/\{(\w+)\}/g, function(match, key) {
|
|
9510
|
-
if (typeof context[key] !== "undefined") {
|
|
9511
|
-
return context[key];
|
|
9512
|
-
}
|
|
9513
|
-
return match;
|
|
9514
|
-
});
|
|
9515
|
-
const fullMargin = Math.max(0, params.maxWidth - _stringWidth(s) - 2);
|
|
9516
|
-
const halfMargin = Math.floor(fullMargin / 2);
|
|
9517
|
-
switch (options.align) {
|
|
9518
|
-
case "right":
|
|
9519
|
-
s = fullMargin > 0 ? " ".repeat(fullMargin) + s : s;
|
|
9520
|
-
break;
|
|
9521
|
-
case "center":
|
|
9522
|
-
s = halfMargin > 0 ? " ".repeat(halfMargin) + s : s;
|
|
9523
|
-
break;
|
|
9524
|
-
case "left":
|
|
9525
|
-
default:
|
|
9526
|
-
break;
|
|
9527
|
-
}
|
|
9528
|
-
return s;
|
|
9529
|
-
};
|
|
9530
|
-
});
|
|
9531
|
-
|
|
9532
|
-
// node_modules/cli-progress/lib/options.js
|
|
9533
|
-
var require_options = __commonJS((exports, module) => {
|
|
9534
|
-
function mergeOption(v2, defaultValue) {
|
|
9535
|
-
if (typeof v2 === "undefined" || v2 === null) {
|
|
9536
|
-
return defaultValue;
|
|
9537
|
-
} else {
|
|
9538
|
-
return v2;
|
|
9539
|
-
}
|
|
9540
|
-
}
|
|
9541
|
-
module.exports = {
|
|
9542
|
-
parse: function parse(rawOptions, preset) {
|
|
9543
|
-
const options = {};
|
|
9544
|
-
const opt = Object.assign({}, preset, rawOptions);
|
|
9545
|
-
options.throttleTime = 1000 / mergeOption(opt.fps, 10);
|
|
9546
|
-
options.stream = mergeOption(opt.stream, process.stderr);
|
|
9547
|
-
options.terminal = mergeOption(opt.terminal, null);
|
|
9548
|
-
options.clearOnComplete = mergeOption(opt.clearOnComplete, false);
|
|
9549
|
-
options.stopOnComplete = mergeOption(opt.stopOnComplete, false);
|
|
9550
|
-
options.barsize = mergeOption(opt.barsize, 40);
|
|
9551
|
-
options.align = mergeOption(opt.align, "left");
|
|
9552
|
-
options.hideCursor = mergeOption(opt.hideCursor, false);
|
|
9553
|
-
options.linewrap = mergeOption(opt.linewrap, false);
|
|
9554
|
-
options.barGlue = mergeOption(opt.barGlue, "");
|
|
9555
|
-
options.barCompleteChar = mergeOption(opt.barCompleteChar, "=");
|
|
9556
|
-
options.barIncompleteChar = mergeOption(opt.barIncompleteChar, "-");
|
|
9557
|
-
options.format = mergeOption(opt.format, "progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}");
|
|
9558
|
-
options.formatTime = mergeOption(opt.formatTime, null);
|
|
9559
|
-
options.formatValue = mergeOption(opt.formatValue, null);
|
|
9560
|
-
options.formatBar = mergeOption(opt.formatBar, null);
|
|
9561
|
-
options.etaBufferLength = mergeOption(opt.etaBuffer, 10);
|
|
9562
|
-
options.etaAsynchronousUpdate = mergeOption(opt.etaAsynchronousUpdate, false);
|
|
9563
|
-
options.progressCalculationRelative = mergeOption(opt.progressCalculationRelative, false);
|
|
9564
|
-
options.synchronousUpdate = mergeOption(opt.synchronousUpdate, true);
|
|
9565
|
-
options.noTTYOutput = mergeOption(opt.noTTYOutput, false);
|
|
9566
|
-
options.notTTYSchedule = mergeOption(opt.notTTYSchedule, 2000);
|
|
9567
|
-
options.emptyOnZero = mergeOption(opt.emptyOnZero, false);
|
|
9568
|
-
options.forceRedraw = mergeOption(opt.forceRedraw, false);
|
|
9569
|
-
options.autopadding = mergeOption(opt.autopadding, false);
|
|
9570
|
-
options.gracefulExit = mergeOption(opt.gracefulExit, false);
|
|
9571
|
-
return options;
|
|
9572
|
-
},
|
|
9573
|
-
assignDerivedOptions: function assignDerivedOptions(options) {
|
|
9574
|
-
options.barCompleteString = options.barCompleteChar.repeat(options.barsize + 1);
|
|
9575
|
-
options.barIncompleteString = options.barIncompleteChar.repeat(options.barsize + 1);
|
|
9576
|
-
options.autopaddingChar = options.autopadding ? mergeOption(options.autopaddingChar, " ") : "";
|
|
9577
|
-
return options;
|
|
9578
|
-
}
|
|
9579
|
-
};
|
|
9580
|
-
});
|
|
9581
|
-
|
|
9582
|
-
// node_modules/cli-progress/lib/generic-bar.js
|
|
9583
|
-
var require_generic_bar = __commonJS((exports, module) => {
|
|
9584
|
-
var _ETA = require_eta();
|
|
9585
|
-
var _Terminal = require_terminal();
|
|
9586
|
-
var _formatter = require_formatter();
|
|
9587
|
-
var _options = require_options();
|
|
9588
|
-
var _EventEmitter = __require("events");
|
|
9589
|
-
module.exports = class GenericBar extends _EventEmitter {
|
|
9590
|
-
constructor(options) {
|
|
9591
|
-
super();
|
|
9592
|
-
this.options = _options.assignDerivedOptions(options);
|
|
9593
|
-
this.terminal = this.options.terminal ? this.options.terminal : new _Terminal(this.options.stream);
|
|
9594
|
-
this.value = 0;
|
|
9595
|
-
this.startValue = 0;
|
|
9596
|
-
this.total = 100;
|
|
9597
|
-
this.lastDrawnString = null;
|
|
9598
|
-
this.startTime = null;
|
|
9599
|
-
this.stopTime = null;
|
|
9600
|
-
this.lastRedraw = Date.now();
|
|
9601
|
-
this.eta = new _ETA(this.options.etaBufferLength, 0, 0);
|
|
9602
|
-
this.payload = {};
|
|
9603
|
-
this.isActive = false;
|
|
9604
|
-
this.formatter = typeof this.options.format === "function" ? this.options.format : _formatter;
|
|
9605
|
-
}
|
|
9606
|
-
render(forceRendering = false) {
|
|
9607
|
-
const params = {
|
|
9608
|
-
progress: this.getProgress(),
|
|
9609
|
-
eta: this.eta.getTime(),
|
|
9610
|
-
startTime: this.startTime,
|
|
9611
|
-
stopTime: this.stopTime,
|
|
9612
|
-
total: this.total,
|
|
9613
|
-
value: this.value,
|
|
9614
|
-
maxWidth: this.terminal.getWidth()
|
|
9615
|
-
};
|
|
9616
|
-
if (this.options.etaAsynchronousUpdate) {
|
|
9617
|
-
this.updateETA();
|
|
9618
|
-
}
|
|
9619
|
-
const s = this.formatter(this.options, params, this.payload);
|
|
9620
|
-
const forceRedraw = forceRendering || this.options.forceRedraw || this.options.noTTYOutput && !this.terminal.isTTY();
|
|
9621
|
-
if (forceRedraw || this.lastDrawnString != s) {
|
|
9622
|
-
this.emit("redraw-pre");
|
|
9623
|
-
this.terminal.cursorTo(0, null);
|
|
9624
|
-
this.terminal.write(s);
|
|
9625
|
-
this.terminal.clearRight();
|
|
9626
|
-
this.lastDrawnString = s;
|
|
9627
|
-
this.lastRedraw = Date.now();
|
|
9628
|
-
this.emit("redraw-post");
|
|
9629
|
-
}
|
|
9630
|
-
}
|
|
9631
|
-
start(total, startValue, payload) {
|
|
9632
|
-
this.value = startValue || 0;
|
|
9633
|
-
this.total = typeof total !== "undefined" && total >= 0 ? total : 100;
|
|
9634
|
-
this.startValue = startValue || 0;
|
|
9635
|
-
this.payload = payload || {};
|
|
9636
|
-
this.startTime = Date.now();
|
|
9637
|
-
this.stopTime = null;
|
|
9638
|
-
this.lastDrawnString = "";
|
|
9639
|
-
this.eta = new _ETA(this.options.etaBufferLength, this.startTime, this.value);
|
|
9640
|
-
this.isActive = true;
|
|
9641
|
-
this.emit("start", total, startValue);
|
|
9642
|
-
}
|
|
9643
|
-
stop() {
|
|
9644
|
-
this.isActive = false;
|
|
9645
|
-
this.stopTime = Date.now();
|
|
9646
|
-
this.emit("stop", this.total, this.value);
|
|
9647
|
-
}
|
|
9648
|
-
update(arg0, arg1 = {}) {
|
|
9649
|
-
if (typeof arg0 === "number") {
|
|
9650
|
-
this.value = arg0;
|
|
9651
|
-
this.eta.update(Date.now(), arg0, this.total);
|
|
9652
|
-
}
|
|
9653
|
-
const payloadData = (typeof arg0 === "object" ? arg0 : arg1) || {};
|
|
9654
|
-
this.emit("update", this.total, this.value);
|
|
9655
|
-
for (const key in payloadData) {
|
|
9656
|
-
this.payload[key] = payloadData[key];
|
|
9657
|
-
}
|
|
9658
|
-
if (this.value >= this.getTotal() && this.options.stopOnComplete) {
|
|
9659
|
-
this.stop();
|
|
9660
|
-
}
|
|
9661
|
-
}
|
|
9662
|
-
getProgress() {
|
|
9663
|
-
let progress = this.value / this.total;
|
|
9664
|
-
if (this.options.progressCalculationRelative) {
|
|
9665
|
-
progress = (this.value - this.startValue) / (this.total - this.startValue);
|
|
9666
|
-
}
|
|
9667
|
-
if (isNaN(progress)) {
|
|
9668
|
-
progress = this.options && this.options.emptyOnZero ? 0 : 1;
|
|
9669
|
-
}
|
|
9670
|
-
progress = Math.min(Math.max(progress, 0), 1);
|
|
9671
|
-
return progress;
|
|
9672
|
-
}
|
|
9673
|
-
increment(arg0 = 1, arg1 = {}) {
|
|
9674
|
-
if (typeof arg0 === "object") {
|
|
9675
|
-
this.update(this.value + 1, arg0);
|
|
9676
|
-
} else {
|
|
9677
|
-
this.update(this.value + arg0, arg1);
|
|
9678
|
-
}
|
|
9679
|
-
}
|
|
9680
|
-
getTotal() {
|
|
9681
|
-
return this.total;
|
|
9682
|
-
}
|
|
9683
|
-
setTotal(total) {
|
|
9684
|
-
if (typeof total !== "undefined" && total >= 0) {
|
|
9685
|
-
this.total = total;
|
|
9686
|
-
}
|
|
9687
|
-
}
|
|
9688
|
-
updateETA() {
|
|
9689
|
-
this.eta.update(Date.now(), this.value, this.total);
|
|
9690
|
-
}
|
|
9691
|
-
};
|
|
9692
|
-
});
|
|
9693
|
-
|
|
9694
|
-
// node_modules/cli-progress/lib/single-bar.js
|
|
9695
|
-
var require_single_bar = __commonJS((exports, module) => {
|
|
9696
|
-
var _GenericBar = require_generic_bar();
|
|
9697
|
-
var _options = require_options();
|
|
9698
|
-
module.exports = class SingleBar extends _GenericBar {
|
|
9699
|
-
constructor(options, preset) {
|
|
9700
|
-
super(_options.parse(options, preset));
|
|
9701
|
-
this.timer = null;
|
|
9702
|
-
if (this.options.noTTYOutput && this.terminal.isTTY() === false) {
|
|
9703
|
-
this.options.synchronousUpdate = false;
|
|
9704
|
-
}
|
|
9705
|
-
this.schedulingRate = this.terminal.isTTY() ? this.options.throttleTime : this.options.notTTYSchedule;
|
|
9706
|
-
this.sigintCallback = null;
|
|
9707
|
-
}
|
|
9708
|
-
render() {
|
|
9709
|
-
if (this.timer) {
|
|
9710
|
-
clearTimeout(this.timer);
|
|
9711
|
-
this.timer = null;
|
|
9712
|
-
}
|
|
9713
|
-
super.render();
|
|
9714
|
-
if (this.options.noTTYOutput && this.terminal.isTTY() === false) {
|
|
9715
|
-
this.terminal.newline();
|
|
9716
|
-
}
|
|
9717
|
-
this.timer = setTimeout(this.render.bind(this), this.schedulingRate);
|
|
9718
|
-
}
|
|
9719
|
-
update(current, payload) {
|
|
9720
|
-
if (!this.timer) {
|
|
9721
|
-
return;
|
|
9722
|
-
}
|
|
9723
|
-
super.update(current, payload);
|
|
9724
|
-
if (this.options.synchronousUpdate && this.lastRedraw + this.options.throttleTime * 2 < Date.now()) {
|
|
9725
|
-
this.render();
|
|
9726
|
-
}
|
|
9727
|
-
}
|
|
9728
|
-
start(total, startValue, payload) {
|
|
9729
|
-
if (this.options.noTTYOutput === false && this.terminal.isTTY() === false) {
|
|
9730
|
-
return;
|
|
9731
|
-
}
|
|
9732
|
-
if (this.sigintCallback === null && this.options.gracefulExit) {
|
|
9733
|
-
this.sigintCallback = this.stop.bind(this);
|
|
9734
|
-
process.once("SIGINT", this.sigintCallback);
|
|
9735
|
-
process.once("SIGTERM", this.sigintCallback);
|
|
9736
|
-
}
|
|
9737
|
-
this.terminal.cursorSave();
|
|
9738
|
-
if (this.options.hideCursor === true) {
|
|
9739
|
-
this.terminal.cursor(false);
|
|
9740
|
-
}
|
|
9741
|
-
if (this.options.linewrap === false) {
|
|
9742
|
-
this.terminal.lineWrapping(false);
|
|
9743
|
-
}
|
|
9744
|
-
super.start(total, startValue, payload);
|
|
9745
|
-
this.render();
|
|
9746
|
-
}
|
|
9747
|
-
stop() {
|
|
9748
|
-
if (!this.timer) {
|
|
9749
|
-
return;
|
|
9750
|
-
}
|
|
9751
|
-
if (this.sigintCallback) {
|
|
9752
|
-
process.removeListener("SIGINT", this.sigintCallback);
|
|
9753
|
-
process.removeListener("SIGTERM", this.sigintCallback);
|
|
9754
|
-
this.sigintCallback = null;
|
|
9755
|
-
}
|
|
9756
|
-
this.render();
|
|
9757
|
-
super.stop();
|
|
9758
|
-
clearTimeout(this.timer);
|
|
9759
|
-
this.timer = null;
|
|
9760
|
-
if (this.options.hideCursor === true) {
|
|
9761
|
-
this.terminal.cursor(true);
|
|
9762
|
-
}
|
|
9763
|
-
if (this.options.linewrap === false) {
|
|
9764
|
-
this.terminal.lineWrapping(true);
|
|
9765
|
-
}
|
|
9766
|
-
this.terminal.cursorRestore();
|
|
9767
|
-
if (this.options.clearOnComplete) {
|
|
9768
|
-
this.terminal.cursorTo(0, null);
|
|
9769
|
-
this.terminal.clearLine();
|
|
9770
|
-
} else {
|
|
9771
|
-
this.terminal.newline();
|
|
9772
|
-
}
|
|
9773
|
-
}
|
|
9774
|
-
};
|
|
9775
|
-
});
|
|
9776
|
-
|
|
9777
|
-
// node_modules/cli-progress/lib/multi-bar.js
|
|
9778
|
-
var require_multi_bar = __commonJS((exports, module) => {
|
|
9779
|
-
var _Terminal = require_terminal();
|
|
9780
|
-
var _BarElement = require_generic_bar();
|
|
9781
|
-
var _options = require_options();
|
|
9782
|
-
var _EventEmitter = __require("events");
|
|
9783
|
-
module.exports = class MultiBar extends _EventEmitter {
|
|
9784
|
-
constructor(options, preset) {
|
|
9785
|
-
super();
|
|
9786
|
-
this.bars = [];
|
|
9787
|
-
this.options = _options.parse(options, preset);
|
|
9788
|
-
this.options.synchronousUpdate = false;
|
|
9789
|
-
this.terminal = this.options.terminal ? this.options.terminal : new _Terminal(this.options.stream);
|
|
9790
|
-
this.timer = null;
|
|
9791
|
-
this.isActive = false;
|
|
9792
|
-
this.schedulingRate = this.terminal.isTTY() ? this.options.throttleTime : this.options.notTTYSchedule;
|
|
9793
|
-
this.loggingBuffer = [];
|
|
9794
|
-
this.sigintCallback = null;
|
|
9795
|
-
}
|
|
9796
|
-
create(total, startValue, payload, barOptions = {}) {
|
|
9797
|
-
const bar = new _BarElement(Object.assign({}, this.options, {
|
|
9798
|
-
terminal: this.terminal
|
|
9799
|
-
}, barOptions));
|
|
9800
|
-
this.bars.push(bar);
|
|
9801
|
-
if (this.options.noTTYOutput === false && this.terminal.isTTY() === false) {
|
|
9802
|
-
return bar;
|
|
9803
|
-
}
|
|
9804
|
-
if (this.sigintCallback === null && this.options.gracefulExit) {
|
|
9805
|
-
this.sigintCallback = this.stop.bind(this);
|
|
9806
|
-
process.once("SIGINT", this.sigintCallback);
|
|
9807
|
-
process.once("SIGTERM", this.sigintCallback);
|
|
9808
|
-
}
|
|
9809
|
-
if (!this.isActive) {
|
|
9810
|
-
if (this.options.hideCursor === true) {
|
|
9811
|
-
this.terminal.cursor(false);
|
|
9812
|
-
}
|
|
9813
|
-
if (this.options.linewrap === false) {
|
|
9814
|
-
this.terminal.lineWrapping(false);
|
|
9815
|
-
}
|
|
9816
|
-
this.timer = setTimeout(this.update.bind(this), this.schedulingRate);
|
|
9817
|
-
}
|
|
9818
|
-
this.isActive = true;
|
|
9819
|
-
bar.start(total, startValue, payload);
|
|
9820
|
-
this.emit("start");
|
|
9821
|
-
return bar;
|
|
9822
|
-
}
|
|
9823
|
-
remove(bar) {
|
|
9824
|
-
const index = this.bars.indexOf(bar);
|
|
9825
|
-
if (index < 0) {
|
|
9826
|
-
return false;
|
|
9827
|
-
}
|
|
9828
|
-
this.bars.splice(index, 1);
|
|
9829
|
-
this.update();
|
|
9830
|
-
this.terminal.newline();
|
|
9831
|
-
this.terminal.clearBottom();
|
|
9832
|
-
return true;
|
|
9833
|
-
}
|
|
9834
|
-
update() {
|
|
9835
|
-
if (this.timer) {
|
|
9836
|
-
clearTimeout(this.timer);
|
|
9837
|
-
this.timer = null;
|
|
9838
|
-
}
|
|
9839
|
-
this.emit("update-pre");
|
|
9840
|
-
this.terminal.cursorRelativeReset();
|
|
9841
|
-
this.emit("redraw-pre");
|
|
9842
|
-
if (this.loggingBuffer.length > 0) {
|
|
9843
|
-
this.terminal.clearLine();
|
|
9844
|
-
while (this.loggingBuffer.length > 0) {
|
|
9845
|
-
this.terminal.write(this.loggingBuffer.shift(), true);
|
|
9846
|
-
}
|
|
9847
|
-
}
|
|
9848
|
-
for (let i = 0;i < this.bars.length; i++) {
|
|
9849
|
-
if (i > 0) {
|
|
9850
|
-
this.terminal.newline();
|
|
9851
|
-
}
|
|
9852
|
-
this.bars[i].render();
|
|
9853
|
-
}
|
|
9854
|
-
this.emit("redraw-post");
|
|
9855
|
-
if (this.options.noTTYOutput && this.terminal.isTTY() === false) {
|
|
9856
|
-
this.terminal.newline();
|
|
9857
|
-
this.terminal.newline();
|
|
9858
|
-
}
|
|
9859
|
-
this.timer = setTimeout(this.update.bind(this), this.schedulingRate);
|
|
9860
|
-
this.emit("update-post");
|
|
9861
|
-
if (this.options.stopOnComplete && !this.bars.find((bar) => bar.isActive)) {
|
|
9862
|
-
this.stop();
|
|
9863
|
-
}
|
|
9864
|
-
}
|
|
9865
|
-
stop() {
|
|
9866
|
-
clearTimeout(this.timer);
|
|
9867
|
-
this.timer = null;
|
|
9868
|
-
if (this.sigintCallback) {
|
|
9869
|
-
process.removeListener("SIGINT", this.sigintCallback);
|
|
9870
|
-
process.removeListener("SIGTERM", this.sigintCallback);
|
|
9871
|
-
this.sigintCallback = null;
|
|
9872
|
-
}
|
|
9873
|
-
this.isActive = false;
|
|
9874
|
-
if (this.options.hideCursor === true) {
|
|
9875
|
-
this.terminal.cursor(true);
|
|
9876
|
-
}
|
|
9877
|
-
if (this.options.linewrap === false) {
|
|
9878
|
-
this.terminal.lineWrapping(true);
|
|
9879
|
-
}
|
|
9880
|
-
this.terminal.cursorRelativeReset();
|
|
9881
|
-
this.emit("stop-pre-clear");
|
|
9882
|
-
if (this.options.clearOnComplete) {
|
|
9883
|
-
this.terminal.clearBottom();
|
|
9884
|
-
} else {
|
|
9885
|
-
for (let i = 0;i < this.bars.length; i++) {
|
|
9886
|
-
if (i > 0) {
|
|
9887
|
-
this.terminal.newline();
|
|
9888
|
-
}
|
|
9889
|
-
this.bars[i].render();
|
|
9890
|
-
this.bars[i].stop();
|
|
9891
|
-
}
|
|
9892
|
-
this.terminal.newline();
|
|
9893
|
-
}
|
|
9894
|
-
this.emit("stop");
|
|
9895
|
-
}
|
|
9896
|
-
log(s) {
|
|
9897
|
-
this.loggingBuffer.push(s);
|
|
9898
|
-
}
|
|
9899
|
-
};
|
|
9900
|
-
});
|
|
9901
|
-
|
|
9902
|
-
// node_modules/cli-progress/presets/legacy.js
|
|
9903
|
-
var require_legacy = __commonJS((exports, module) => {
|
|
9904
|
-
module.exports = {
|
|
9905
|
-
format: "progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",
|
|
9906
|
-
barCompleteChar: "=",
|
|
9907
|
-
barIncompleteChar: "-"
|
|
9908
|
-
};
|
|
9909
|
-
});
|
|
9910
|
-
|
|
9911
|
-
// node_modules/cli-progress/presets/shades-classic.js
|
|
9912
|
-
var require_shades_classic = __commonJS((exports, module) => {
|
|
9913
|
-
module.exports = {
|
|
9914
|
-
format: " {bar} {percentage}% | ETA: {eta}s | {value}/{total}",
|
|
9915
|
-
barCompleteChar: "█",
|
|
9916
|
-
barIncompleteChar: "░"
|
|
9917
|
-
};
|
|
9918
|
-
});
|
|
9919
|
-
|
|
9920
|
-
// node_modules/cli-progress/presets/shades-grey.js
|
|
9921
|
-
var require_shades_grey = __commonJS((exports, module) => {
|
|
9922
|
-
module.exports = {
|
|
9923
|
-
format: " \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",
|
|
9924
|
-
barCompleteChar: "█",
|
|
9925
|
-
barIncompleteChar: "░"
|
|
9926
|
-
};
|
|
9927
|
-
});
|
|
9928
|
-
|
|
9929
|
-
// node_modules/cli-progress/presets/rect.js
|
|
9930
|
-
var require_rect = __commonJS((exports, module) => {
|
|
9931
|
-
module.exports = {
|
|
9932
|
-
format: " {bar}■ {percentage}% | ETA: {eta}s | {value}/{total}",
|
|
9933
|
-
barCompleteChar: "■",
|
|
9934
|
-
barIncompleteChar: " "
|
|
9935
|
-
};
|
|
9936
|
-
});
|
|
9937
|
-
|
|
9938
|
-
// node_modules/cli-progress/presets/index.js
|
|
9939
|
-
var require_presets = __commonJS((exports, module) => {
|
|
9940
|
-
var _legacy = require_legacy();
|
|
9941
|
-
var _shades_classic = require_shades_classic();
|
|
9942
|
-
var _shades_grey = require_shades_grey();
|
|
9943
|
-
var _rect = require_rect();
|
|
9944
|
-
module.exports = {
|
|
9945
|
-
legacy: _legacy,
|
|
9946
|
-
shades_classic: _shades_classic,
|
|
9947
|
-
shades_grey: _shades_grey,
|
|
9948
|
-
rect: _rect
|
|
9949
|
-
};
|
|
9950
|
-
});
|
|
9951
|
-
|
|
9952
|
-
// node_modules/cli-progress/cli-progress.js
|
|
9953
|
-
var require_cli_progress = __commonJS((exports, module) => {
|
|
9954
|
-
var _SingleBar = require_single_bar();
|
|
9955
|
-
var _MultiBar = require_multi_bar();
|
|
9956
|
-
var _Presets = require_presets();
|
|
9957
|
-
var _Formatter = require_formatter();
|
|
9958
|
-
var _defaultFormatValue = require_format_value();
|
|
9959
|
-
var _defaultFormatBar = require_format_bar();
|
|
9960
|
-
var _defaultFormatTime = require_format_time();
|
|
9961
|
-
module.exports = {
|
|
9962
|
-
Bar: _SingleBar,
|
|
9963
|
-
SingleBar: _SingleBar,
|
|
9964
|
-
MultiBar: _MultiBar,
|
|
9965
|
-
Presets: _Presets,
|
|
9966
|
-
Format: {
|
|
9967
|
-
Formatter: _Formatter,
|
|
9968
|
-
BarFormat: _defaultFormatBar,
|
|
9969
|
-
ValueFormat: _defaultFormatValue,
|
|
9970
|
-
TimeFormat: _defaultFormatTime
|
|
9971
|
-
}
|
|
9972
|
-
};
|
|
9973
|
-
});
|
|
9974
|
-
|
|
9975
9460
|
// node_modules/ms/index.js
|
|
9976
9461
|
var require_ms = __commonJS((exports, module) => {
|
|
9977
9462
|
var s = 1000;
|
|
@@ -12898,11 +12383,22 @@ import { join as join25, resolve as resolve3 } from "node:path";
|
|
|
12898
12383
|
import { promisify as promisify5 } from "node:util";
|
|
12899
12384
|
function executeInteractiveScript(command, args, options) {
|
|
12900
12385
|
return new Promise((resolve4, reject) => {
|
|
12386
|
+
const useInherit = logger.isVerbose();
|
|
12901
12387
|
const child = spawn(command, args, {
|
|
12902
|
-
stdio: ["ignore", "inherit", "inherit"],
|
|
12388
|
+
stdio: useInherit ? ["ignore", "inherit", "inherit"] : ["ignore", "pipe", "pipe"],
|
|
12903
12389
|
cwd: options?.cwd,
|
|
12904
12390
|
env: options?.env || process.env
|
|
12905
12391
|
});
|
|
12392
|
+
let stdout = "";
|
|
12393
|
+
let stderr = "";
|
|
12394
|
+
if (!useInherit) {
|
|
12395
|
+
child.stdout?.on("data", (data) => {
|
|
12396
|
+
stdout += data.toString();
|
|
12397
|
+
});
|
|
12398
|
+
child.stderr?.on("data", (data) => {
|
|
12399
|
+
stderr += data.toString();
|
|
12400
|
+
});
|
|
12401
|
+
}
|
|
12906
12402
|
let timeoutId;
|
|
12907
12403
|
if (options?.timeout) {
|
|
12908
12404
|
timeoutId = setTimeout(() => {
|
|
@@ -12913,6 +12409,9 @@ function executeInteractiveScript(command, args, options) {
|
|
|
12913
12409
|
child.on("exit", (code2, signal) => {
|
|
12914
12410
|
if (timeoutId)
|
|
12915
12411
|
clearTimeout(timeoutId);
|
|
12412
|
+
if (!useInherit && stderr && code2 !== 0) {
|
|
12413
|
+
console.error(stderr);
|
|
12414
|
+
}
|
|
12916
12415
|
if (signal) {
|
|
12917
12416
|
reject(new Error(`Command terminated by signal ${signal}`));
|
|
12918
12417
|
} else if (code2 !== 0) {
|
|
@@ -13200,7 +12699,6 @@ async function installSkillsDependencies(skillsDir) {
|
|
|
13200
12699
|
}
|
|
13201
12700
|
try {
|
|
13202
12701
|
const { existsSync: existsSync7 } = await import("node:fs");
|
|
13203
|
-
const { readFile: readFile14 } = await import("node:fs/promises");
|
|
13204
12702
|
const clack = await Promise.resolve().then(() => (init_dist2(), exports_dist));
|
|
13205
12703
|
const platform9 = process.platform;
|
|
13206
12704
|
const scriptName = platform9 === "win32" ? "install.ps1" : "install.sh";
|
|
@@ -13231,27 +12729,26 @@ async function installSkillsDependencies(skillsDir) {
|
|
|
13231
12729
|
error: "Installation script not found"
|
|
13232
12730
|
};
|
|
13233
12731
|
}
|
|
13234
|
-
logger.warning("
|
|
12732
|
+
logger.warning("Installation script will execute with user privileges");
|
|
13235
12733
|
logger.info(` Script: ${scriptPath}`);
|
|
13236
12734
|
logger.info(` Platform: ${platform9 === "win32" ? "Windows (PowerShell)" : "Unix (bash)"}`);
|
|
13237
|
-
logger.
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
12735
|
+
if (logger.isVerbose()) {
|
|
12736
|
+
try {
|
|
12737
|
+
const { readFile: readFile14 } = await import("node:fs/promises");
|
|
12738
|
+
const scriptContent = await readFile14(scriptPath, "utf-8");
|
|
12739
|
+
const previewLines = scriptContent.split(`
|
|
13241
12740
|
`).slice(0, 20);
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
if (scriptContent.split(`
|
|
12741
|
+
logger.verbose("Script preview (first 20 lines):");
|
|
12742
|
+
for (const line of previewLines) {
|
|
12743
|
+
logger.verbose(` ${line}`);
|
|
12744
|
+
}
|
|
12745
|
+
if (scriptContent.split(`
|
|
13248
12746
|
`).length > 20) {
|
|
13249
|
-
|
|
13250
|
-
|
|
12747
|
+
logger.verbose(" ... (script continues)");
|
|
12748
|
+
}
|
|
12749
|
+
} catch {
|
|
12750
|
+
logger.verbose("Could not preview script contents");
|
|
13251
12751
|
}
|
|
13252
|
-
} catch (error) {
|
|
13253
|
-
logger.warning("Could not preview script contents");
|
|
13254
|
-
logger.info("");
|
|
13255
12752
|
}
|
|
13256
12753
|
const shouldProceed = await clack.confirm({
|
|
13257
12754
|
message: "Execute this installation script?",
|
|
@@ -13424,25 +12921,25 @@ class OwnershipDisplay {
|
|
|
13424
12921
|
static formatOwnership(ownership) {
|
|
13425
12922
|
switch (ownership) {
|
|
13426
12923
|
case "ck":
|
|
13427
|
-
return
|
|
12924
|
+
return import_picocolors12.default.blue("CK-owned");
|
|
13428
12925
|
case "user":
|
|
13429
|
-
return
|
|
12926
|
+
return import_picocolors12.default.green("User-created");
|
|
13430
12927
|
case "ck-modified":
|
|
13431
|
-
return
|
|
12928
|
+
return import_picocolors12.default.yellow("CK-modified");
|
|
13432
12929
|
default:
|
|
13433
|
-
return
|
|
12930
|
+
return import_picocolors12.default.gray("Unknown");
|
|
13434
12931
|
}
|
|
13435
12932
|
}
|
|
13436
12933
|
static formatAction(action) {
|
|
13437
12934
|
switch (action) {
|
|
13438
12935
|
case "delete":
|
|
13439
|
-
return
|
|
12936
|
+
return import_picocolors12.default.red("✖ DELETE");
|
|
13440
12937
|
case "preserve":
|
|
13441
|
-
return
|
|
12938
|
+
return import_picocolors12.default.green("✓ PRESERVE");
|
|
13442
12939
|
case "skip":
|
|
13443
|
-
return
|
|
12940
|
+
return import_picocolors12.default.gray("○ SKIP");
|
|
13444
12941
|
default:
|
|
13445
|
-
return
|
|
12942
|
+
return import_picocolors12.default.gray("? UNKNOWN");
|
|
13446
12943
|
}
|
|
13447
12944
|
}
|
|
13448
12945
|
static calculateSummary(results) {
|
|
@@ -13476,78 +12973,78 @@ class OwnershipDisplay {
|
|
|
13476
12973
|
}
|
|
13477
12974
|
static displaySummary(summary, title = "Ownership Summary") {
|
|
13478
12975
|
const lines = [
|
|
13479
|
-
`Total files: ${
|
|
12976
|
+
`Total files: ${import_picocolors12.default.bold(String(summary.totalFiles))}`,
|
|
13480
12977
|
"",
|
|
13481
12978
|
"By ownership:",
|
|
13482
|
-
` ${
|
|
13483
|
-
` ${
|
|
13484
|
-
` ${
|
|
12979
|
+
` ${import_picocolors12.default.blue("●")} CK-owned: ${summary.ckOwned}`,
|
|
12980
|
+
` ${import_picocolors12.default.green("●")} User-created: ${summary.userCreated}`,
|
|
12981
|
+
` ${import_picocolors12.default.yellow("●")} CK-modified: ${summary.ckModified}`,
|
|
13485
12982
|
"",
|
|
13486
12983
|
"Actions:",
|
|
13487
|
-
` ${
|
|
13488
|
-
` ${
|
|
12984
|
+
` ${import_picocolors12.default.red("✖")} To delete: ${summary.toDelete}`,
|
|
12985
|
+
` ${import_picocolors12.default.green("✓")} To preserve: ${summary.toPreserve}`
|
|
13489
12986
|
];
|
|
13490
12987
|
le(lines.join(`
|
|
13491
12988
|
`), title);
|
|
13492
12989
|
}
|
|
13493
12990
|
static displayOperationPreview(results, maxItems = 10) {
|
|
13494
12991
|
const summary = OwnershipDisplay.calculateSummary(results);
|
|
13495
|
-
f2.info(
|
|
12992
|
+
f2.info(import_picocolors12.default.bold("DRY RUN - Preview of changes:"));
|
|
13496
12993
|
console.log("");
|
|
13497
12994
|
const toDelete = results.filter((r2) => r2.action === "delete");
|
|
13498
12995
|
const toPreserve = results.filter((r2) => r2.action === "preserve");
|
|
13499
12996
|
if (toDelete.length > 0) {
|
|
13500
|
-
console.log(
|
|
12997
|
+
console.log(import_picocolors12.default.red(import_picocolors12.default.bold(`Files to DELETE (${toDelete.length}):`)));
|
|
13501
12998
|
const showDelete = toDelete.slice(0, maxItems);
|
|
13502
12999
|
for (const result of showDelete) {
|
|
13503
|
-
console.log(` ${
|
|
13000
|
+
console.log(` ${import_picocolors12.default.red("✖")} ${result.path}`);
|
|
13504
13001
|
}
|
|
13505
13002
|
if (toDelete.length > maxItems) {
|
|
13506
|
-
console.log(
|
|
13003
|
+
console.log(import_picocolors12.default.gray(` ... and ${toDelete.length - maxItems} more`));
|
|
13507
13004
|
}
|
|
13508
13005
|
console.log("");
|
|
13509
13006
|
}
|
|
13510
13007
|
if (toPreserve.length > 0) {
|
|
13511
|
-
console.log(
|
|
13008
|
+
console.log(import_picocolors12.default.green(import_picocolors12.default.bold(`Files to PRESERVE (${toPreserve.length}):`)));
|
|
13512
13009
|
const showPreserve = toPreserve.slice(0, maxItems);
|
|
13513
13010
|
for (const result of showPreserve) {
|
|
13514
|
-
const reason = result.reason ?
|
|
13515
|
-
console.log(` ${
|
|
13011
|
+
const reason = result.reason ? import_picocolors12.default.gray(` (${result.reason})`) : "";
|
|
13012
|
+
console.log(` ${import_picocolors12.default.green("✓")} ${result.path}${reason}`);
|
|
13516
13013
|
}
|
|
13517
13014
|
if (toPreserve.length > maxItems) {
|
|
13518
|
-
console.log(
|
|
13015
|
+
console.log(import_picocolors12.default.gray(` ... and ${toPreserve.length - maxItems} more`));
|
|
13519
13016
|
}
|
|
13520
13017
|
console.log("");
|
|
13521
13018
|
}
|
|
13522
13019
|
OwnershipDisplay.displaySummary(summary, "Preview Summary");
|
|
13523
|
-
f2.warn(
|
|
13020
|
+
f2.warn(import_picocolors12.default.yellow("No changes were made. Run without --dry-run to apply changes."));
|
|
13524
13021
|
}
|
|
13525
13022
|
static displayFile(path9, ownership, action, reason) {
|
|
13526
13023
|
const ownershipStr = OwnershipDisplay.formatOwnership(ownership);
|
|
13527
13024
|
const actionStr = OwnershipDisplay.formatAction(action);
|
|
13528
|
-
const reasonStr = reason ?
|
|
13025
|
+
const reasonStr = reason ? import_picocolors12.default.gray(` - ${reason}`) : "";
|
|
13529
13026
|
console.log(` ${actionStr} ${path9} [${ownershipStr}]${reasonStr}`);
|
|
13530
13027
|
}
|
|
13531
13028
|
static displayForceWarning() {
|
|
13532
|
-
f2.warn(`${
|
|
13533
|
-
${
|
|
13534
|
-
${
|
|
13029
|
+
f2.warn(`${import_picocolors12.default.yellow(import_picocolors12.default.bold("FORCE MODE ENABLED"))}
|
|
13030
|
+
${import_picocolors12.default.yellow("User modifications will be overwritten!")}
|
|
13031
|
+
${import_picocolors12.default.gray("Use --dry-run first to preview changes.")}`);
|
|
13535
13032
|
}
|
|
13536
13033
|
static displayLegacyWarning() {
|
|
13537
|
-
f2.warn(`${
|
|
13538
|
-
${
|
|
13539
|
-
${
|
|
13034
|
+
f2.warn(`${import_picocolors12.default.yellow(import_picocolors12.default.bold("Legacy Installation Detected"))}
|
|
13035
|
+
${import_picocolors12.default.yellow("No ownership metadata found.")}
|
|
13036
|
+
${import_picocolors12.default.gray("Running migration to enable ownership tracking...")}`);
|
|
13540
13037
|
}
|
|
13541
13038
|
static displayCompletionSummary(deleted, preserved) {
|
|
13542
|
-
const message = `${
|
|
13543
|
-
${
|
|
13039
|
+
const message = `${import_picocolors12.default.green(`✓ Deleted ${deleted} CK-owned file(s)`)}
|
|
13040
|
+
${import_picocolors12.default.blue(`✓ Preserved ${preserved} user/modified file(s)`)}`;
|
|
13544
13041
|
f2.success(message);
|
|
13545
13042
|
}
|
|
13546
13043
|
}
|
|
13547
|
-
var
|
|
13044
|
+
var import_picocolors12;
|
|
13548
13045
|
var init_ownership_display = __esm(() => {
|
|
13549
13046
|
init_dist2();
|
|
13550
|
-
|
|
13047
|
+
import_picocolors12 = __toESM(require_picocolors(), 1);
|
|
13551
13048
|
});
|
|
13552
13049
|
|
|
13553
13050
|
// src/domains/help/help-commands.ts
|
|
@@ -13982,22 +13479,22 @@ function padEnd(text, width) {
|
|
|
13982
13479
|
const padding = Math.max(0, width - visibleLength);
|
|
13983
13480
|
return text + " ".repeat(padding);
|
|
13984
13481
|
}
|
|
13985
|
-
var
|
|
13482
|
+
var import_picocolors18, NO_COLOR, isColorSupported, identity = (text) => text, colors, defaultTheme;
|
|
13986
13483
|
var init_help_colors = __esm(() => {
|
|
13987
|
-
|
|
13484
|
+
import_picocolors18 = __toESM(require_picocolors(), 1);
|
|
13988
13485
|
NO_COLOR = process.env.NO_COLOR !== undefined;
|
|
13989
13486
|
isColorSupported = !NO_COLOR && Boolean(process.stdout.isTTY);
|
|
13990
13487
|
colors = {
|
|
13991
|
-
banner: isColorSupported ?
|
|
13992
|
-
command: isColorSupported ?
|
|
13993
|
-
heading: isColorSupported ?
|
|
13994
|
-
flag: isColorSupported ?
|
|
13995
|
-
description: isColorSupported ?
|
|
13996
|
-
example: isColorSupported ?
|
|
13997
|
-
warning: isColorSupported ?
|
|
13998
|
-
error: isColorSupported ?
|
|
13999
|
-
muted: isColorSupported ?
|
|
14000
|
-
success: isColorSupported ?
|
|
13488
|
+
banner: isColorSupported ? import_picocolors18.default.cyan : identity,
|
|
13489
|
+
command: isColorSupported ? import_picocolors18.default.bold : identity,
|
|
13490
|
+
heading: isColorSupported ? import_picocolors18.default.yellow : identity,
|
|
13491
|
+
flag: isColorSupported ? import_picocolors18.default.green : identity,
|
|
13492
|
+
description: isColorSupported ? import_picocolors18.default.gray : identity,
|
|
13493
|
+
example: isColorSupported ? import_picocolors18.default.blue : identity,
|
|
13494
|
+
warning: isColorSupported ? import_picocolors18.default.yellow : identity,
|
|
13495
|
+
error: isColorSupported ? import_picocolors18.default.red : identity,
|
|
13496
|
+
muted: isColorSupported ? import_picocolors18.default.dim : identity,
|
|
13497
|
+
success: isColorSupported ? import_picocolors18.default.green : identity
|
|
14001
13498
|
};
|
|
14002
13499
|
defaultTheme = {
|
|
14003
13500
|
banner: colors.banner,
|
|
@@ -14304,15 +13801,15 @@ __export(exports_help_interceptor, {
|
|
|
14304
13801
|
handleHelp: () => handleHelp
|
|
14305
13802
|
});
|
|
14306
13803
|
function getHelpOptions() {
|
|
14307
|
-
const
|
|
13804
|
+
const isTTY2 = process.stdout.isTTY ?? false;
|
|
14308
13805
|
const width = process.stdout.columns || 80;
|
|
14309
|
-
const noColor = process.env.NO_COLOR !== undefined || !
|
|
13806
|
+
const noColor = process.env.NO_COLOR !== undefined || !isTTY2;
|
|
14310
13807
|
return {
|
|
14311
13808
|
...DEFAULT_HELP_OPTIONS,
|
|
14312
|
-
showBanner:
|
|
13809
|
+
showBanner: isTTY2,
|
|
14313
13810
|
showExamples: true,
|
|
14314
13811
|
maxExamples: 2,
|
|
14315
|
-
interactive:
|
|
13812
|
+
interactive: isTTY2,
|
|
14316
13813
|
width,
|
|
14317
13814
|
noColor
|
|
14318
13815
|
};
|
|
@@ -14334,18 +13831,18 @@ async function handleHelp(_args) {
|
|
|
14334
13831
|
try {
|
|
14335
13832
|
const options = getHelpOptions();
|
|
14336
13833
|
const command = getCommandFromArgv();
|
|
14337
|
-
let
|
|
13834
|
+
let output3;
|
|
14338
13835
|
if (command === null) {
|
|
14339
|
-
|
|
13836
|
+
output3 = renderGlobalHelp(HELP_REGISTRY, options);
|
|
14340
13837
|
} else {
|
|
14341
13838
|
const help = HELP_REGISTRY[command];
|
|
14342
|
-
|
|
13839
|
+
output3 = renderHelp(help, {
|
|
14343
13840
|
command,
|
|
14344
13841
|
globalHelp: false,
|
|
14345
13842
|
options
|
|
14346
13843
|
});
|
|
14347
13844
|
}
|
|
14348
|
-
await displayHelp(
|
|
13845
|
+
await displayHelp(output3, options);
|
|
14349
13846
|
} catch (error) {
|
|
14350
13847
|
console.error("Error rendering help:", error);
|
|
14351
13848
|
return;
|
|
@@ -14968,7 +14465,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
14968
14465
|
// package.json
|
|
14969
14466
|
var package_default = {
|
|
14970
14467
|
name: "claudekit-cli",
|
|
14971
|
-
version: "3.
|
|
14468
|
+
version: "3.9.0",
|
|
14972
14469
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
14973
14470
|
type: "module",
|
|
14974
14471
|
repository: {
|
|
@@ -15335,8 +14832,8 @@ async function getCommandVersion(command, versionFlag, versionRegex) {
|
|
|
15335
14832
|
try {
|
|
15336
14833
|
logger.verbose(`Getting version for: ${command} ${versionFlag}`);
|
|
15337
14834
|
const { stdout, stderr } = await execAsync(`${command} ${versionFlag}`);
|
|
15338
|
-
const
|
|
15339
|
-
const match =
|
|
14835
|
+
const output2 = stdout || stderr;
|
|
14836
|
+
const match = output2.match(versionRegex);
|
|
15340
14837
|
const version = match?.[1] || null;
|
|
15341
14838
|
logger.verbose(`Version detected: ${command} -> ${version}`);
|
|
15342
14839
|
return version;
|
|
@@ -18545,45 +18042,9 @@ class ReportGenerator {
|
|
|
18545
18042
|
}
|
|
18546
18043
|
}
|
|
18547
18044
|
}
|
|
18548
|
-
// src/shared/terminal-utils.ts
|
|
18549
|
-
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
18550
|
-
var UNICODE_SYMBOLS = {
|
|
18551
|
-
pass: "✓",
|
|
18552
|
-
warn: "⚠",
|
|
18553
|
-
fail: "✗",
|
|
18554
|
-
info: "ℹ"
|
|
18555
|
-
};
|
|
18556
|
-
var ASCII_SYMBOLS = {
|
|
18557
|
-
pass: "[PASS]",
|
|
18558
|
-
warn: "[WARN]",
|
|
18559
|
-
fail: "[FAIL]",
|
|
18560
|
-
info: "[INFO]"
|
|
18561
|
-
};
|
|
18562
|
-
function supportsUnicode() {
|
|
18563
|
-
if (process.env.WT_SESSION)
|
|
18564
|
-
return true;
|
|
18565
|
-
if (process.env.CI)
|
|
18566
|
-
return false;
|
|
18567
|
-
if (process.env.TERM === "dumb")
|
|
18568
|
-
return false;
|
|
18569
|
-
if (!process.stdout.isTTY)
|
|
18570
|
-
return false;
|
|
18571
|
-
return process.platform !== "win32" || !!process.env.WT_SESSION;
|
|
18572
|
-
}
|
|
18573
|
-
function getStatusSymbols() {
|
|
18574
|
-
return supportsUnicode() ? UNICODE_SYMBOLS : ASCII_SYMBOLS;
|
|
18575
|
-
}
|
|
18576
|
-
var COLOR_PALETTE = {
|
|
18577
|
-
pass: import_picocolors4.default.green,
|
|
18578
|
-
warn: import_picocolors4.default.yellow,
|
|
18579
|
-
fail: import_picocolors4.default.red,
|
|
18580
|
-
info: import_picocolors4.default.blue,
|
|
18581
|
-
muted: import_picocolors4.default.dim,
|
|
18582
|
-
heading: import_picocolors4.default.bold
|
|
18583
|
-
};
|
|
18584
|
-
|
|
18585
18045
|
// src/domains/health-checks/doctor-ui-renderer.ts
|
|
18586
|
-
|
|
18046
|
+
init_terminal_utils();
|
|
18047
|
+
var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
18587
18048
|
|
|
18588
18049
|
class DoctorUIRenderer {
|
|
18589
18050
|
symbols = getStatusSymbols();
|
|
@@ -18591,8 +18052,8 @@ class DoctorUIRenderer {
|
|
|
18591
18052
|
const groups = this.groupChecks(summary.checks);
|
|
18592
18053
|
for (const [groupName, checks] of groups) {
|
|
18593
18054
|
console.log("│");
|
|
18594
|
-
console.log(`│ ${
|
|
18595
|
-
console.log(`│ ${
|
|
18055
|
+
console.log(`│ ${import_picocolors6.default.bold(import_picocolors6.default.cyan(groupName.toUpperCase()))}`);
|
|
18056
|
+
console.log(`│ ${import_picocolors6.default.dim("─".repeat(50))}`);
|
|
18596
18057
|
const maxNameLen = Math.max(...checks.map((c2) => c2.name.length));
|
|
18597
18058
|
const maxMsgLen = Math.max(...checks.map((c2) => c2.message.length));
|
|
18598
18059
|
for (const check of checks) {
|
|
@@ -18604,44 +18065,44 @@ class DoctorUIRenderer {
|
|
|
18604
18065
|
}
|
|
18605
18066
|
renderCheck(check, maxNameLen, maxMsgLen) {
|
|
18606
18067
|
const symbol = this.getColoredSymbol(check.status);
|
|
18607
|
-
const name =
|
|
18068
|
+
const name = import_picocolors6.default.bold(check.name.padEnd(maxNameLen));
|
|
18608
18069
|
const paddedMsg = check.message.padEnd(maxMsgLen);
|
|
18609
18070
|
const value = this.colorizeValue(check.status, paddedMsg);
|
|
18610
18071
|
let line = `│ ${symbol} ${name} ${value}`;
|
|
18611
18072
|
if (check.details) {
|
|
18612
|
-
line += ` ${
|
|
18073
|
+
line += ` ${import_picocolors6.default.dim(this.shortenPath(check.details))}`;
|
|
18613
18074
|
}
|
|
18614
18075
|
console.log(line);
|
|
18615
18076
|
if (check.status !== "pass" && check.suggestion) {
|
|
18616
18077
|
const indent = " ".repeat(maxNameLen + 5);
|
|
18617
|
-
console.log(`│ ${indent}${
|
|
18078
|
+
console.log(`│ ${indent}${import_picocolors6.default.dim(`→ ${check.suggestion}`)}`);
|
|
18618
18079
|
}
|
|
18619
18080
|
}
|
|
18620
18081
|
getColoredSymbol(status) {
|
|
18621
18082
|
switch (status) {
|
|
18622
18083
|
case "pass":
|
|
18623
|
-
return
|
|
18084
|
+
return import_picocolors6.default.green(this.symbols.pass);
|
|
18624
18085
|
case "warn":
|
|
18625
|
-
return
|
|
18086
|
+
return import_picocolors6.default.yellow(this.symbols.warn);
|
|
18626
18087
|
case "fail":
|
|
18627
|
-
return
|
|
18088
|
+
return import_picocolors6.default.red(this.symbols.fail);
|
|
18628
18089
|
default:
|
|
18629
|
-
return
|
|
18090
|
+
return import_picocolors6.default.blue(this.symbols.info);
|
|
18630
18091
|
}
|
|
18631
18092
|
}
|
|
18632
18093
|
renderHealingSummary(healSummary) {
|
|
18633
18094
|
console.log("│");
|
|
18634
|
-
console.log(`│ ${
|
|
18635
|
-
console.log(`│ ${
|
|
18095
|
+
console.log(`│ ${import_picocolors6.default.bold(import_picocolors6.default.cyan("AUTO-HEAL RESULTS"))}`);
|
|
18096
|
+
console.log(`│ ${import_picocolors6.default.dim("─".repeat(50))}`);
|
|
18636
18097
|
for (const fix of healSummary.fixes) {
|
|
18637
|
-
const symbol = fix.success ?
|
|
18638
|
-
console.log(`│ ${symbol} ${
|
|
18098
|
+
const symbol = fix.success ? import_picocolors6.default.green(this.symbols.pass) : import_picocolors6.default.red(this.symbols.fail);
|
|
18099
|
+
console.log(`│ ${symbol} ${import_picocolors6.default.bold(fix.checkName)} ${import_picocolors6.default.dim(fix.message)}`);
|
|
18639
18100
|
if (!fix.success && fix.error) {
|
|
18640
|
-
console.log(`│ ${
|
|
18101
|
+
console.log(`│ ${import_picocolors6.default.red(`Error: ${fix.error}`)}`);
|
|
18641
18102
|
}
|
|
18642
18103
|
}
|
|
18643
18104
|
console.log("│");
|
|
18644
|
-
console.log(`│ Fixed: ${
|
|
18105
|
+
console.log(`│ Fixed: ${import_picocolors6.default.green(String(healSummary.succeeded))}, Failed: ${import_picocolors6.default.red(String(healSummary.failed))}`);
|
|
18645
18106
|
}
|
|
18646
18107
|
groupChecks(checks) {
|
|
18647
18108
|
const groups = new Map;
|
|
@@ -18655,11 +18116,11 @@ class DoctorUIRenderer {
|
|
|
18655
18116
|
colorizeValue(status, message) {
|
|
18656
18117
|
switch (status) {
|
|
18657
18118
|
case "pass":
|
|
18658
|
-
return
|
|
18119
|
+
return import_picocolors6.default.green(message);
|
|
18659
18120
|
case "warn":
|
|
18660
|
-
return
|
|
18121
|
+
return import_picocolors6.default.yellow(message);
|
|
18661
18122
|
case "fail":
|
|
18662
|
-
return
|
|
18123
|
+
return import_picocolors6.default.red(message);
|
|
18663
18124
|
default:
|
|
18664
18125
|
return message;
|
|
18665
18126
|
}
|
|
@@ -18678,23 +18139,23 @@ class DoctorUIRenderer {
|
|
|
18678
18139
|
renderSummaryLine(summary) {
|
|
18679
18140
|
const parts = [];
|
|
18680
18141
|
if (summary.passed > 0) {
|
|
18681
|
-
parts.push(
|
|
18142
|
+
parts.push(import_picocolors6.default.green(`${summary.passed} ${this.symbols.pass}`));
|
|
18682
18143
|
}
|
|
18683
18144
|
if (summary.warnings > 0) {
|
|
18684
|
-
parts.push(
|
|
18145
|
+
parts.push(import_picocolors6.default.yellow(`${summary.warnings} ${this.symbols.warn}`));
|
|
18685
18146
|
}
|
|
18686
18147
|
if (summary.failed > 0) {
|
|
18687
|
-
parts.push(
|
|
18148
|
+
parts.push(import_picocolors6.default.red(`${summary.failed} ${this.symbols.fail}`));
|
|
18688
18149
|
}
|
|
18689
|
-
console.log(`│ ${
|
|
18150
|
+
console.log(`│ ${import_picocolors6.default.dim("─".repeat(50))}`);
|
|
18690
18151
|
console.log(`│ Summary: ${parts.join(" ")}`);
|
|
18691
18152
|
console.log("│");
|
|
18692
|
-
console.log(`│ ${
|
|
18693
|
-
console.log(`│ ${
|
|
18694
|
-
console.log(`│ ${
|
|
18695
|
-
console.log(`│ ${
|
|
18696
|
-
console.log(`│ ${
|
|
18697
|
-
console.log(`│ ${
|
|
18153
|
+
console.log(`│ ${import_picocolors6.default.dim("Quick Commands:")}`);
|
|
18154
|
+
console.log(`│ ${import_picocolors6.default.dim(" ck init Install/update ClaudeKit in project")}`);
|
|
18155
|
+
console.log(`│ ${import_picocolors6.default.dim(" ck init -g Install/update ClaudeKit globally")}`);
|
|
18156
|
+
console.log(`│ ${import_picocolors6.default.dim(" ck update Update the CLI tool")}`);
|
|
18157
|
+
console.log(`│ ${import_picocolors6.default.dim(" ck uninstall Remove ClaudeKit from project/global")}`);
|
|
18158
|
+
console.log(`│ ${import_picocolors6.default.dim(" ck --help Show all commands")}`);
|
|
18698
18159
|
}
|
|
18699
18160
|
}
|
|
18700
18161
|
// src/commands/doctor.ts
|
|
@@ -18703,22 +18164,32 @@ init_logger();
|
|
|
18703
18164
|
|
|
18704
18165
|
// src/shared/safe-prompts.ts
|
|
18705
18166
|
init_dist2();
|
|
18167
|
+
init_output_manager();
|
|
18706
18168
|
init_dist2();
|
|
18707
|
-
var
|
|
18169
|
+
var import_picocolors7 = __toESM(require_picocolors(), 1);
|
|
18170
|
+
function getSymbols() {
|
|
18171
|
+
return output.getSymbols();
|
|
18172
|
+
}
|
|
18708
18173
|
function intro(message) {
|
|
18174
|
+
if (output.isJson())
|
|
18175
|
+
return;
|
|
18709
18176
|
console.log();
|
|
18710
|
-
console.log(
|
|
18177
|
+
console.log(import_picocolors7.default.cyan(`${getSymbols().pointer} ${message}`));
|
|
18711
18178
|
console.log();
|
|
18712
18179
|
}
|
|
18713
18180
|
function outro(message) {
|
|
18181
|
+
if (output.isJson())
|
|
18182
|
+
return;
|
|
18714
18183
|
console.log();
|
|
18715
|
-
console.log(
|
|
18184
|
+
console.log(import_picocolors7.default.green(`${getSymbols().success} ${message}`));
|
|
18716
18185
|
console.log();
|
|
18717
18186
|
}
|
|
18718
18187
|
function note(message, title) {
|
|
18188
|
+
if (output.isJson())
|
|
18189
|
+
return;
|
|
18719
18190
|
console.log();
|
|
18720
18191
|
if (title) {
|
|
18721
|
-
console.log(
|
|
18192
|
+
console.log(import_picocolors7.default.cyan(` ${title}:`));
|
|
18722
18193
|
console.log();
|
|
18723
18194
|
}
|
|
18724
18195
|
const lines = message.split(`
|
|
@@ -18730,24 +18201,38 @@ function note(message, title) {
|
|
|
18730
18201
|
}
|
|
18731
18202
|
var log = {
|
|
18732
18203
|
info: (message) => {
|
|
18733
|
-
|
|
18204
|
+
if (output.isJson())
|
|
18205
|
+
return;
|
|
18206
|
+
console.log(import_picocolors7.default.blue(`${getSymbols().info} ${message}`));
|
|
18734
18207
|
},
|
|
18735
18208
|
success: (message) => {
|
|
18736
|
-
|
|
18209
|
+
if (output.isJson())
|
|
18210
|
+
return;
|
|
18211
|
+
console.log(import_picocolors7.default.green(`${getSymbols().success} ${message}`));
|
|
18737
18212
|
},
|
|
18738
18213
|
warn: (message) => {
|
|
18739
|
-
|
|
18214
|
+
if (output.isJson())
|
|
18215
|
+
return;
|
|
18216
|
+
console.log(import_picocolors7.default.yellow(`${getSymbols().warning} ${message}`));
|
|
18740
18217
|
},
|
|
18741
18218
|
warning: (message) => {
|
|
18742
|
-
|
|
18219
|
+
if (output.isJson())
|
|
18220
|
+
return;
|
|
18221
|
+
console.log(import_picocolors7.default.yellow(`${getSymbols().warning} ${message}`));
|
|
18743
18222
|
},
|
|
18744
18223
|
error: (message) => {
|
|
18745
|
-
|
|
18224
|
+
if (output.isJson())
|
|
18225
|
+
return;
|
|
18226
|
+
console.log(import_picocolors7.default.red(`${getSymbols().error} ${message}`));
|
|
18746
18227
|
},
|
|
18747
18228
|
step: (message) => {
|
|
18748
|
-
|
|
18229
|
+
if (output.isJson())
|
|
18230
|
+
return;
|
|
18231
|
+
console.log(import_picocolors7.default.cyan(`${getSymbols().pointer} ${message}`));
|
|
18749
18232
|
},
|
|
18750
18233
|
message: (message) => {
|
|
18234
|
+
if (output.isJson())
|
|
18235
|
+
return;
|
|
18751
18236
|
console.log(` ${message}`);
|
|
18752
18237
|
}
|
|
18753
18238
|
};
|
|
@@ -18989,6 +18474,7 @@ class ConfigManager {
|
|
|
18989
18474
|
// src/domains/installation/download-manager.ts
|
|
18990
18475
|
init_environment();
|
|
18991
18476
|
init_logger();
|
|
18477
|
+
init_output_manager();
|
|
18992
18478
|
import { Buffer as Buffer3 } from "node:buffer";
|
|
18993
18479
|
import { execFile } from "node:child_process";
|
|
18994
18480
|
import { createWriteStream as createWriteStream2 } from "node:fs";
|
|
@@ -18997,6 +18483,163 @@ import { tmpdir as tmpdir2 } from "node:os";
|
|
|
18997
18483
|
import { join as join10, relative, resolve as resolve2 } from "node:path";
|
|
18998
18484
|
import { TextDecoder } from "node:util";
|
|
18999
18485
|
|
|
18486
|
+
// src/shared/progress-bar.ts
|
|
18487
|
+
init_output_manager();
|
|
18488
|
+
init_terminal_utils();
|
|
18489
|
+
var import_picocolors8 = __toESM(require_picocolors(), 1);
|
|
18490
|
+
var BAR_CHARS = {
|
|
18491
|
+
unicode: { filled: "█", empty: "░" },
|
|
18492
|
+
ascii: { filled: "=", empty: "-" }
|
|
18493
|
+
};
|
|
18494
|
+
var RENDER_RATE_LIMIT_MS = 100;
|
|
18495
|
+
var JSON_MILESTONE_INTERVAL = 25;
|
|
18496
|
+
var MIN_ELAPSED_SECONDS = 0.1;
|
|
18497
|
+
var MAX_LABEL_WIDTH = 14;
|
|
18498
|
+
|
|
18499
|
+
class ProgressBar {
|
|
18500
|
+
current = 0;
|
|
18501
|
+
total;
|
|
18502
|
+
label;
|
|
18503
|
+
width;
|
|
18504
|
+
format;
|
|
18505
|
+
showEta;
|
|
18506
|
+
startTime;
|
|
18507
|
+
lastRenderTime = 0;
|
|
18508
|
+
lastRenderContent = "";
|
|
18509
|
+
isCompleted = false;
|
|
18510
|
+
constructor(options) {
|
|
18511
|
+
this.total = options.total;
|
|
18512
|
+
this.label = options.label || "";
|
|
18513
|
+
this.width = options.width || 20;
|
|
18514
|
+
this.format = options.format || "percentage";
|
|
18515
|
+
this.showEta = options.showEta ?? false;
|
|
18516
|
+
this.startTime = Date.now();
|
|
18517
|
+
}
|
|
18518
|
+
update(current) {
|
|
18519
|
+
if (this.isCompleted)
|
|
18520
|
+
return;
|
|
18521
|
+
this.current = Math.min(current, this.total);
|
|
18522
|
+
this.render();
|
|
18523
|
+
}
|
|
18524
|
+
increment(delta = 1) {
|
|
18525
|
+
this.update(this.current + delta);
|
|
18526
|
+
}
|
|
18527
|
+
complete(message) {
|
|
18528
|
+
if (this.isCompleted)
|
|
18529
|
+
return;
|
|
18530
|
+
this.isCompleted = true;
|
|
18531
|
+
this.current = this.total;
|
|
18532
|
+
if (output.isJson()) {
|
|
18533
|
+
output.addJsonEntry({
|
|
18534
|
+
type: "progress",
|
|
18535
|
+
message: message || `${this.label} complete`,
|
|
18536
|
+
data: { current: this.current, total: this.total, percent: 100 }
|
|
18537
|
+
});
|
|
18538
|
+
return;
|
|
18539
|
+
}
|
|
18540
|
+
if (!this.shouldRender()) {
|
|
18541
|
+
console.log(message || `${this.label} complete`);
|
|
18542
|
+
return;
|
|
18543
|
+
}
|
|
18544
|
+
this.clearLine();
|
|
18545
|
+
if (message) {
|
|
18546
|
+
const symbols = output.getSymbols();
|
|
18547
|
+
console.log(`${import_picocolors8.default.green(symbols.success)} ${message}`);
|
|
18548
|
+
}
|
|
18549
|
+
}
|
|
18550
|
+
clearLine() {
|
|
18551
|
+
if (isTTY()) {
|
|
18552
|
+
process.stdout.write("\r\x1B[K");
|
|
18553
|
+
}
|
|
18554
|
+
}
|
|
18555
|
+
shouldRender() {
|
|
18556
|
+
if (output.isJson())
|
|
18557
|
+
return false;
|
|
18558
|
+
if (!isTTY())
|
|
18559
|
+
return false;
|
|
18560
|
+
return true;
|
|
18561
|
+
}
|
|
18562
|
+
render() {
|
|
18563
|
+
const now = Date.now();
|
|
18564
|
+
if (now - this.lastRenderTime < RENDER_RATE_LIMIT_MS && this.current < this.total) {
|
|
18565
|
+
return;
|
|
18566
|
+
}
|
|
18567
|
+
this.lastRenderTime = now;
|
|
18568
|
+
if (output.isJson()) {
|
|
18569
|
+
const percent = Math.floor(this.current / this.total * 100);
|
|
18570
|
+
if (percent % JSON_MILESTONE_INTERVAL === 0 || this.current === this.total) {
|
|
18571
|
+
output.addJsonEntry({
|
|
18572
|
+
type: "progress",
|
|
18573
|
+
data: { current: this.current, total: this.total, percent }
|
|
18574
|
+
});
|
|
18575
|
+
}
|
|
18576
|
+
return;
|
|
18577
|
+
}
|
|
18578
|
+
if (!this.shouldRender()) {
|
|
18579
|
+
const percent = Math.floor(this.current / this.total * 100);
|
|
18580
|
+
if (percent % JSON_MILESTONE_INTERVAL === 0 && this.lastRenderContent !== `${percent}%`) {
|
|
18581
|
+
this.lastRenderContent = `${percent}%`;
|
|
18582
|
+
console.log(` ${this.label} ${this.formatProgress()}`);
|
|
18583
|
+
}
|
|
18584
|
+
return;
|
|
18585
|
+
}
|
|
18586
|
+
const content = this.formatBar();
|
|
18587
|
+
process.stdout.write(`\r${content}`);
|
|
18588
|
+
}
|
|
18589
|
+
formatBar() {
|
|
18590
|
+
const chars = this.getBarCharacters();
|
|
18591
|
+
const percent = this.total > 0 ? this.current / this.total : 0;
|
|
18592
|
+
const filledCount = Math.round(percent * this.width);
|
|
18593
|
+
const emptyCount = this.width - filledCount;
|
|
18594
|
+
const bar = chars.filled.repeat(filledCount) + chars.empty.repeat(emptyCount);
|
|
18595
|
+
const progress = this.formatProgress();
|
|
18596
|
+
const displayLabel = this.label.length > MAX_LABEL_WIDTH ? `${this.label.slice(0, MAX_LABEL_WIDTH - 3)}...` : this.label;
|
|
18597
|
+
let line = ` ${displayLabel}`.padEnd(16);
|
|
18598
|
+
line += `[${bar}] ${progress}`;
|
|
18599
|
+
if (this.showEta && this.current > 0 && this.current < this.total) {
|
|
18600
|
+
const elapsed = Math.max((Date.now() - this.startTime) / 1000, MIN_ELAPSED_SECONDS);
|
|
18601
|
+
const rate = this.current / elapsed;
|
|
18602
|
+
const remaining = (this.total - this.current) / rate;
|
|
18603
|
+
line += ` ETA: ${this.formatTime(remaining)}`;
|
|
18604
|
+
}
|
|
18605
|
+
return line;
|
|
18606
|
+
}
|
|
18607
|
+
formatProgress() {
|
|
18608
|
+
switch (this.format) {
|
|
18609
|
+
case "download":
|
|
18610
|
+
return `${this.formatSize(this.current)} / ${this.formatSize(this.total)}`;
|
|
18611
|
+
case "count":
|
|
18612
|
+
return `${this.current}/${this.total}`;
|
|
18613
|
+
default: {
|
|
18614
|
+
const percent = this.total > 0 ? Math.round(this.current / this.total * 100) : 0;
|
|
18615
|
+
return `${percent}%`;
|
|
18616
|
+
}
|
|
18617
|
+
}
|
|
18618
|
+
}
|
|
18619
|
+
formatSize(bytes) {
|
|
18620
|
+
if (bytes < 1024)
|
|
18621
|
+
return `${bytes} B`;
|
|
18622
|
+
if (bytes < 1024 * 1024)
|
|
18623
|
+
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
18624
|
+
if (bytes < 1024 * 1024 * 1024)
|
|
18625
|
+
return `${(bytes / (1024 * 1024)).toFixed(2)} MB`;
|
|
18626
|
+
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
18627
|
+
}
|
|
18628
|
+
formatTime(seconds) {
|
|
18629
|
+
if (seconds < 60)
|
|
18630
|
+
return `${Math.round(seconds)}s`;
|
|
18631
|
+
const mins = Math.floor(seconds / 60);
|
|
18632
|
+
const secs = Math.round(seconds % 60);
|
|
18633
|
+
return `${mins}m${secs}s`;
|
|
18634
|
+
}
|
|
18635
|
+
getBarCharacters() {
|
|
18636
|
+
return supportsUnicode() ? BAR_CHARS.unicode : BAR_CHARS.ascii;
|
|
18637
|
+
}
|
|
18638
|
+
}
|
|
18639
|
+
function createProgressBar(options) {
|
|
18640
|
+
return new ProgressBar(options);
|
|
18641
|
+
}
|
|
18642
|
+
|
|
19000
18643
|
// node_modules/ora/index.js
|
|
19001
18644
|
import process9 from "node:process";
|
|
19002
18645
|
|
|
@@ -20297,27 +19940,47 @@ function ora(options) {
|
|
|
20297
19940
|
}
|
|
20298
19941
|
|
|
20299
19942
|
// src/shared/safe-spinner.ts
|
|
19943
|
+
init_output_manager();
|
|
19944
|
+
var import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
20300
19945
|
var ASCII_SPINNER = {
|
|
20301
19946
|
interval: 100,
|
|
20302
19947
|
frames: ["-", "\\", "|", "/"]
|
|
20303
19948
|
};
|
|
19949
|
+
var UNICODE_SPINNER = {
|
|
19950
|
+
interval: 80,
|
|
19951
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
|
|
19952
|
+
};
|
|
20304
19953
|
function createSpinner(options) {
|
|
20305
19954
|
const spinnerOptions = typeof options === "string" ? { text: options } : options;
|
|
19955
|
+
const symbols = output.getSymbols();
|
|
19956
|
+
const shouldShow = output.shouldShowProgress();
|
|
19957
|
+
const spinnerType = symbols === output.getSymbols() && symbols.success === "✓" ? UNICODE_SPINNER : ASCII_SPINNER;
|
|
20306
19958
|
const spinner = ora({
|
|
20307
19959
|
...spinnerOptions,
|
|
20308
|
-
spinner:
|
|
20309
|
-
prefixText: ""
|
|
19960
|
+
spinner: spinnerType,
|
|
19961
|
+
prefixText: "",
|
|
19962
|
+
isSilent: !shouldShow
|
|
20310
19963
|
});
|
|
20311
19964
|
spinner.succeed = (text) => {
|
|
19965
|
+
if (output.isJson()) {
|
|
19966
|
+
spinner.stop();
|
|
19967
|
+
output.addJsonEntry({ type: "success", message: text || spinner.text });
|
|
19968
|
+
return spinner;
|
|
19969
|
+
}
|
|
20312
19970
|
spinner.stopAndPersist({
|
|
20313
|
-
symbol:
|
|
19971
|
+
symbol: import_picocolors9.default.green(symbols.success),
|
|
20314
19972
|
text: text || spinner.text
|
|
20315
19973
|
});
|
|
20316
19974
|
return spinner;
|
|
20317
19975
|
};
|
|
20318
19976
|
spinner.fail = (text) => {
|
|
19977
|
+
if (output.isJson()) {
|
|
19978
|
+
spinner.stop();
|
|
19979
|
+
output.addJsonEntry({ type: "error", message: text || spinner.text });
|
|
19980
|
+
return spinner;
|
|
19981
|
+
}
|
|
20319
19982
|
spinner.stopAndPersist({
|
|
20320
|
-
symbol:
|
|
19983
|
+
symbol: import_picocolors9.default.red(symbols.error),
|
|
20321
19984
|
text: text || spinner.text
|
|
20322
19985
|
});
|
|
20323
19986
|
return spinner;
|
|
@@ -20327,7 +19990,6 @@ function createSpinner(options) {
|
|
|
20327
19990
|
|
|
20328
19991
|
// src/domains/installation/download-manager.ts
|
|
20329
19992
|
init_types2();
|
|
20330
|
-
var import_cli_progress = __toESM(require_cli_progress(), 1);
|
|
20331
19993
|
var import_extract_zip = __toESM(require_extract_zip(), 1);
|
|
20332
19994
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
20333
19995
|
|
|
@@ -27224,24 +26886,32 @@ class DownloadManager {
|
|
|
27224
26886
|
try {
|
|
27225
26887
|
const destPath = join10(destDir, asset.name);
|
|
27226
26888
|
await mkdir6(destDir, { recursive: true });
|
|
27227
|
-
|
|
27228
|
-
|
|
27229
|
-
|
|
27230
|
-
|
|
27231
|
-
|
|
27232
|
-
hideCursor: true
|
|
26889
|
+
output.info(`Downloading ${asset.name} (${this.formatBytes(asset.size)})...`);
|
|
26890
|
+
logger.verbose("Download details", {
|
|
26891
|
+
url: asset.browser_download_url,
|
|
26892
|
+
size: asset.size,
|
|
26893
|
+
name: asset.name
|
|
27233
26894
|
});
|
|
27234
26895
|
const response = await fetch(asset.browser_download_url, {
|
|
27235
26896
|
headers: {
|
|
27236
26897
|
Accept: "application/octet-stream"
|
|
27237
26898
|
}
|
|
27238
26899
|
});
|
|
26900
|
+
logger.verbose("HTTP response", {
|
|
26901
|
+
status: response.status,
|
|
26902
|
+
statusText: response.statusText,
|
|
26903
|
+
headers: Object.fromEntries(response.headers.entries())
|
|
26904
|
+
});
|
|
27239
26905
|
if (!response.ok) {
|
|
27240
26906
|
throw new DownloadError(`Failed to download: ${response.statusText}`);
|
|
27241
26907
|
}
|
|
27242
26908
|
const totalSize = asset.size;
|
|
27243
26909
|
let downloadedSize = 0;
|
|
27244
|
-
progressBar
|
|
26910
|
+
const progressBar = createProgressBar({
|
|
26911
|
+
total: totalSize,
|
|
26912
|
+
format: "download",
|
|
26913
|
+
label: "Downloading"
|
|
26914
|
+
});
|
|
27245
26915
|
const fileStream = createWriteStream2(destPath);
|
|
27246
26916
|
const reader = response.body?.getReader();
|
|
27247
26917
|
if (!reader) {
|
|
@@ -27255,15 +26925,13 @@ class DownloadManager {
|
|
|
27255
26925
|
}
|
|
27256
26926
|
fileStream.write(value);
|
|
27257
26927
|
downloadedSize += value.length;
|
|
27258
|
-
progressBar.update(
|
|
26928
|
+
progressBar.update(downloadedSize);
|
|
27259
26929
|
}
|
|
27260
26930
|
fileStream.end();
|
|
27261
|
-
progressBar.
|
|
27262
|
-
logger.success(`Downloaded ${asset.name}`);
|
|
26931
|
+
progressBar.complete(`Downloaded ${asset.name}`);
|
|
27263
26932
|
return destPath;
|
|
27264
26933
|
} catch (error) {
|
|
27265
26934
|
fileStream.close();
|
|
27266
|
-
progressBar.stop();
|
|
27267
26935
|
throw error;
|
|
27268
26936
|
}
|
|
27269
26937
|
} catch (error) {
|
|
@@ -27274,7 +26942,7 @@ class DownloadManager {
|
|
|
27274
26942
|
const { url, name: name2, size, destDir, token } = params;
|
|
27275
26943
|
const destPath = join10(destDir, name2);
|
|
27276
26944
|
await mkdir6(destDir, { recursive: true });
|
|
27277
|
-
|
|
26945
|
+
output.info(`Downloading ${name2}${size ? ` (${this.formatBytes(size)})` : ""}...`);
|
|
27278
26946
|
const headers = {};
|
|
27279
26947
|
if (token && url.includes("api.github.com")) {
|
|
27280
26948
|
headers.Authorization = `Bearer ${token}`;
|
|
@@ -27289,15 +26957,11 @@ class DownloadManager {
|
|
|
27289
26957
|
}
|
|
27290
26958
|
const totalSize = size || Number(response.headers.get("content-length")) || 0;
|
|
27291
26959
|
let downloadedSize = 0;
|
|
27292
|
-
const progressBar = totalSize > 0 ?
|
|
27293
|
-
|
|
27294
|
-
|
|
27295
|
-
|
|
27296
|
-
hideCursor: true
|
|
26960
|
+
const progressBar = totalSize > 0 ? createProgressBar({
|
|
26961
|
+
total: totalSize,
|
|
26962
|
+
format: "download",
|
|
26963
|
+
label: "Downloading"
|
|
27297
26964
|
}) : null;
|
|
27298
|
-
if (progressBar) {
|
|
27299
|
-
progressBar.start(Math.round(totalSize / 1024 / 1024), 0);
|
|
27300
|
-
}
|
|
27301
26965
|
const fileStream = createWriteStream2(destPath);
|
|
27302
26966
|
const reader = response.body?.getReader();
|
|
27303
26967
|
if (!reader) {
|
|
@@ -27311,18 +26975,18 @@ class DownloadManager {
|
|
|
27311
26975
|
fileStream.write(value);
|
|
27312
26976
|
downloadedSize += value.length;
|
|
27313
26977
|
if (progressBar) {
|
|
27314
|
-
progressBar.update(
|
|
26978
|
+
progressBar.update(downloadedSize);
|
|
27315
26979
|
}
|
|
27316
26980
|
}
|
|
27317
26981
|
fileStream.end();
|
|
27318
|
-
if (progressBar)
|
|
27319
|
-
progressBar.
|
|
27320
|
-
|
|
26982
|
+
if (progressBar) {
|
|
26983
|
+
progressBar.complete(`Downloaded ${name2}`);
|
|
26984
|
+
} else {
|
|
26985
|
+
output.success(`Downloaded ${name2}`);
|
|
26986
|
+
}
|
|
27321
26987
|
return destPath;
|
|
27322
26988
|
} catch (error) {
|
|
27323
26989
|
fileStream.close();
|
|
27324
|
-
if (progressBar)
|
|
27325
|
-
progressBar.stop();
|
|
27326
26990
|
throw error;
|
|
27327
26991
|
}
|
|
27328
26992
|
}
|
|
@@ -27447,15 +27111,18 @@ class DownloadManager {
|
|
|
27447
27111
|
const nativeSuccess = await this.tryNativeUnzip(archivePath, tempExtractDir);
|
|
27448
27112
|
if (!nativeSuccess) {
|
|
27449
27113
|
logger.debug("Using extract-zip library");
|
|
27114
|
+
let extractedCount = 0;
|
|
27450
27115
|
const zipOptions = {
|
|
27451
27116
|
dir: tempExtractDir,
|
|
27452
27117
|
onEntry: (entry) => {
|
|
27453
27118
|
const normalized = this.normalizeZipEntryName(entry.fileName);
|
|
27454
27119
|
entry.fileName = normalized;
|
|
27120
|
+
extractedCount++;
|
|
27455
27121
|
},
|
|
27456
27122
|
yauzl: { decodeStrings: false }
|
|
27457
27123
|
};
|
|
27458
27124
|
await import_extract_zip.default(archivePath, zipOptions);
|
|
27125
|
+
logger.verbose(`Extracted ${extractedCount} files`);
|
|
27459
27126
|
}
|
|
27460
27127
|
logger.debug(`Extracted ZIP to temp: ${tempExtractDir}`);
|
|
27461
27128
|
const entries = await readdir3(tempExtractDir, { encoding: "utf8" });
|
|
@@ -29312,11 +28979,11 @@ class FileMerger {
|
|
|
29312
28979
|
if (this.userConfigChecker.ignores(normalizedRelativePath)) {
|
|
29313
28980
|
const fileExists = await import_fs_extra3.pathExists(destPath);
|
|
29314
28981
|
if (fileExists) {
|
|
29315
|
-
logger.debug(`
|
|
28982
|
+
logger.debug(`Preserving user config: ${normalizedRelativePath}`);
|
|
29316
28983
|
skippedCount++;
|
|
29317
28984
|
continue;
|
|
29318
28985
|
}
|
|
29319
|
-
logger.debug(`Copying user config
|
|
28986
|
+
logger.debug(`Copying user config (first-time): ${normalizedRelativePath}`);
|
|
29320
28987
|
}
|
|
29321
28988
|
if (normalizedRelativePath === "settings.json" || normalizedRelativePath === ".claude/settings.json") {
|
|
29322
28989
|
await this.processSettingsJson(file, destPath);
|
|
@@ -29379,17 +29046,14 @@ class FileMerger {
|
|
|
29379
29046
|
return;
|
|
29380
29047
|
}
|
|
29381
29048
|
const mergeResult = SettingsMerger.merge(sourceSettings, destSettings);
|
|
29382
|
-
|
|
29383
|
-
|
|
29384
|
-
|
|
29385
|
-
|
|
29386
|
-
|
|
29387
|
-
}
|
|
29388
|
-
if (mergeResult.mcpServersPreserved > 0) {
|
|
29389
|
-
logger.debug(`Preserved ${mergeResult.mcpServersPreserved} MCP server(s)`);
|
|
29390
|
-
}
|
|
29049
|
+
logger.verbose("Settings merge details", {
|
|
29050
|
+
hooksAdded: mergeResult.hooksAdded,
|
|
29051
|
+
hooksPreserved: mergeResult.hooksPreserved,
|
|
29052
|
+
mcpServersPreserved: mergeResult.mcpServersPreserved,
|
|
29053
|
+
duplicatesSkipped: mergeResult.conflictsDetected.length
|
|
29054
|
+
});
|
|
29391
29055
|
if (mergeResult.conflictsDetected.length > 0) {
|
|
29392
|
-
logger.warning(`Duplicate hooks
|
|
29056
|
+
logger.warning(`Duplicate hooks skipped: ${mergeResult.conflictsDetected.length}`);
|
|
29393
29057
|
}
|
|
29394
29058
|
await SettingsMerger.writeSettingsFile(destFile, mergeResult.merged);
|
|
29395
29059
|
logger.success("Merged settings.json (user customizations preserved)");
|
|
@@ -31359,36 +31023,36 @@ class SkillsMigrator {
|
|
|
31359
31023
|
// src/domains/versioning/version-selector.ts
|
|
31360
31024
|
init_logger();
|
|
31361
31025
|
init_dist2();
|
|
31362
|
-
var
|
|
31026
|
+
var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
31363
31027
|
|
|
31364
31028
|
// src/domains/versioning/version-display.ts
|
|
31365
|
-
var
|
|
31029
|
+
var import_picocolors10 = __toESM(require_picocolors(), 1);
|
|
31366
31030
|
|
|
31367
31031
|
class VersionDisplayFormatter {
|
|
31368
31032
|
static createBadges(release) {
|
|
31369
31033
|
const badges = [];
|
|
31370
31034
|
if (release.isLatestStable) {
|
|
31371
|
-
badges.push(
|
|
31035
|
+
badges.push(import_picocolors10.default.bold(import_picocolors10.default.yellow("[latest]")));
|
|
31372
31036
|
}
|
|
31373
31037
|
if (release.prerelease || release.isLatestBeta) {
|
|
31374
31038
|
if (release.isLatestBeta) {
|
|
31375
|
-
badges.push(
|
|
31039
|
+
badges.push(import_picocolors10.default.bold(import_picocolors10.default.magenta("[beta]")));
|
|
31376
31040
|
} else {
|
|
31377
|
-
badges.push(
|
|
31041
|
+
badges.push(import_picocolors10.default.magenta("[prerelease]"));
|
|
31378
31042
|
}
|
|
31379
31043
|
} else if (!release.draft) {
|
|
31380
|
-
badges.push(
|
|
31044
|
+
badges.push(import_picocolors10.default.blue("[stable]"));
|
|
31381
31045
|
}
|
|
31382
31046
|
if (release.draft) {
|
|
31383
|
-
badges.push(
|
|
31047
|
+
badges.push(import_picocolors10.default.gray("[draft]"));
|
|
31384
31048
|
}
|
|
31385
31049
|
return badges.length > 0 ? ` ${badges.join(" ")}` : "";
|
|
31386
31050
|
}
|
|
31387
31051
|
static formatChoiceLabel(release) {
|
|
31388
|
-
const version =
|
|
31052
|
+
const version = import_picocolors10.default.green(release.displayVersion);
|
|
31389
31053
|
const badges = VersionDisplayFormatter.createBadges(release);
|
|
31390
31054
|
const name2 = release.name || "Release";
|
|
31391
|
-
return `${version}${badges} ${
|
|
31055
|
+
return `${version}${badges} ${import_picocolors10.default.dim(name2)}`;
|
|
31392
31056
|
}
|
|
31393
31057
|
static formatChoiceHint(release) {
|
|
31394
31058
|
const parts = [];
|
|
@@ -31410,7 +31074,7 @@ class VersionDisplayFormatter {
|
|
|
31410
31074
|
if (latestStable) {
|
|
31411
31075
|
options.push({
|
|
31412
31076
|
value: latestStable.tag_name,
|
|
31413
|
-
label: `${
|
|
31077
|
+
label: `${import_picocolors10.default.bold(import_picocolors10.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
|
|
31414
31078
|
hint: "recommended version",
|
|
31415
31079
|
isLatest: true,
|
|
31416
31080
|
isPrerelease: false
|
|
@@ -31420,7 +31084,7 @@ class VersionDisplayFormatter {
|
|
|
31420
31084
|
if (latestBeta) {
|
|
31421
31085
|
options.push({
|
|
31422
31086
|
value: latestBeta.tag_name,
|
|
31423
|
-
label: `${
|
|
31087
|
+
label: `${import_picocolors10.default.bold(import_picocolors10.default.magenta("Latest Beta"))} (${latestBeta.displayVersion})`,
|
|
31424
31088
|
hint: "latest features, may be unstable",
|
|
31425
31089
|
isLatest: false,
|
|
31426
31090
|
isPrerelease: true
|
|
@@ -31431,7 +31095,7 @@ class VersionDisplayFormatter {
|
|
|
31431
31095
|
static createSeparator() {
|
|
31432
31096
|
return {
|
|
31433
31097
|
value: "separator",
|
|
31434
|
-
label:
|
|
31098
|
+
label: import_picocolors10.default.dim("─".repeat(50)),
|
|
31435
31099
|
hint: undefined,
|
|
31436
31100
|
isLatest: false,
|
|
31437
31101
|
isPrerelease: false
|
|
@@ -31440,7 +31104,7 @@ class VersionDisplayFormatter {
|
|
|
31440
31104
|
static createCancelOption() {
|
|
31441
31105
|
return {
|
|
31442
31106
|
value: "cancel",
|
|
31443
|
-
label:
|
|
31107
|
+
label: import_picocolors10.default.red("Cancel"),
|
|
31444
31108
|
hint: "exit version selection",
|
|
31445
31109
|
isLatest: false,
|
|
31446
31110
|
isPrerelease: false
|
|
@@ -31492,15 +31156,15 @@ class VersionDisplayFormatter {
|
|
|
31492
31156
|
return value !== "separator" && value !== "cancel" && value.trim().length > 0;
|
|
31493
31157
|
}
|
|
31494
31158
|
static formatError(message, suggestion) {
|
|
31495
|
-
let
|
|
31159
|
+
let output2 = import_picocolors10.default.red(`Error: ${message}`);
|
|
31496
31160
|
if (suggestion) {
|
|
31497
|
-
|
|
31498
|
-
${
|
|
31161
|
+
output2 += `
|
|
31162
|
+
${import_picocolors10.default.dim(suggestion)}`;
|
|
31499
31163
|
}
|
|
31500
|
-
return
|
|
31164
|
+
return output2;
|
|
31501
31165
|
}
|
|
31502
31166
|
static formatSuccess(version, kitName) {
|
|
31503
|
-
return `${
|
|
31167
|
+
return `${import_picocolors10.default.green("✓")} Selected ${import_picocolors10.default.bold(version)} for ${import_picocolors10.default.bold(kitName)}`;
|
|
31504
31168
|
}
|
|
31505
31169
|
}
|
|
31506
31170
|
|
|
@@ -31523,7 +31187,7 @@ class VersionSelector {
|
|
|
31523
31187
|
} = options;
|
|
31524
31188
|
try {
|
|
31525
31189
|
const loadingSpinner = de();
|
|
31526
|
-
loadingSpinner.start(`Fetching versions for ${
|
|
31190
|
+
loadingSpinner.start(`Fetching versions for ${import_picocolors11.default.bold(kit.name)}...`);
|
|
31527
31191
|
const releases = await this.githubClient.listReleasesWithCache(kit, {
|
|
31528
31192
|
limit: limit * 2,
|
|
31529
31193
|
includePrereleases,
|
|
@@ -31546,7 +31210,7 @@ class VersionSelector {
|
|
|
31546
31210
|
This could be due to:
|
|
31547
31211
|
• No releases published yet
|
|
31548
31212
|
• Network connectivity issues
|
|
31549
|
-
• Repository access permissions`,
|
|
31213
|
+
• Repository access permissions`, import_picocolors11.default.yellow("No Releases Available"));
|
|
31550
31214
|
if (!allowManualEntry) {
|
|
31551
31215
|
throw new Error(`No releases available for ${kit.name}`);
|
|
31552
31216
|
}
|
|
@@ -31584,20 +31248,20 @@ This could be due to:
|
|
|
31584
31248
|
if (latestStable) {
|
|
31585
31249
|
clackChoices.push({
|
|
31586
31250
|
value: latestStable.tag_name,
|
|
31587
|
-
label: `${
|
|
31251
|
+
label: `${import_picocolors11.default.bold(import_picocolors11.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
|
|
31588
31252
|
hint: "recommended"
|
|
31589
31253
|
});
|
|
31590
31254
|
}
|
|
31591
31255
|
if (allowManualEntry) {
|
|
31592
31256
|
clackChoices.push({
|
|
31593
31257
|
value: "manual-entry",
|
|
31594
|
-
label:
|
|
31258
|
+
label: import_picocolors11.default.cyan("↳ Enter Version Manually"),
|
|
31595
31259
|
hint: "for older versions"
|
|
31596
31260
|
});
|
|
31597
31261
|
}
|
|
31598
31262
|
clackChoices.push({
|
|
31599
31263
|
value: "cancel",
|
|
31600
|
-
label:
|
|
31264
|
+
label: import_picocolors11.default.red("✕ Cancel")
|
|
31601
31265
|
});
|
|
31602
31266
|
const versionChoices = choices.filter((choice) => choice.value !== "separator" && choice.value !== "cancel");
|
|
31603
31267
|
for (const choice of versionChoices) {
|
|
@@ -31608,7 +31272,7 @@ This could be due to:
|
|
|
31608
31272
|
});
|
|
31609
31273
|
}
|
|
31610
31274
|
const selected = await ie({
|
|
31611
|
-
message: `Select version for ${
|
|
31275
|
+
message: `Select version for ${import_picocolors11.default.bold(kit.name)}:`,
|
|
31612
31276
|
options: clackChoices,
|
|
31613
31277
|
initialValue: latestStable?.tag_name
|
|
31614
31278
|
});
|
|
@@ -31642,15 +31306,15 @@ This could be due to:
|
|
|
31642
31306
|
async handleError(error, kit, allowManualEntry) {
|
|
31643
31307
|
logger.error(`Version selection error: ${error.message}`);
|
|
31644
31308
|
if (error.message.includes("401") || error.message.includes("403")) {
|
|
31645
|
-
le(VersionDisplayFormatter.formatError("Authentication failed", "Please check your GitHub token with: ck auth"),
|
|
31309
|
+
le(VersionDisplayFormatter.formatError("Authentication failed", "Please check your GitHub token with: ck auth"), import_picocolors11.default.red("Authentication Error"));
|
|
31646
31310
|
} else if (error.message.includes("404")) {
|
|
31647
|
-
le(VersionDisplayFormatter.formatError("Repository access denied", "Make sure you have access to the repository"),
|
|
31311
|
+
le(VersionDisplayFormatter.formatError("Repository access denied", "Make sure you have access to the repository"), import_picocolors11.default.red("Access Error"));
|
|
31648
31312
|
} else if (error.message.includes("rate limit") || error.message.includes("403")) {
|
|
31649
|
-
le(VersionDisplayFormatter.formatError("GitHub API rate limit exceeded", "Please wait a moment and try again"),
|
|
31313
|
+
le(VersionDisplayFormatter.formatError("GitHub API rate limit exceeded", "Please wait a moment and try again"), import_picocolors11.default.yellow("Rate Limited"));
|
|
31650
31314
|
} else if (error.message.includes("network") || error.message.includes("ENOTFOUND")) {
|
|
31651
|
-
le(VersionDisplayFormatter.formatError("Network connection failed", "Please check your internet connection"),
|
|
31315
|
+
le(VersionDisplayFormatter.formatError("Network connection failed", "Please check your internet connection"), import_picocolors11.default.yellow("Network Error"));
|
|
31652
31316
|
} else {
|
|
31653
|
-
le(VersionDisplayFormatter.formatError(error.message || "Unknown error occurred", "Please try again or contact support"),
|
|
31317
|
+
le(VersionDisplayFormatter.formatError(error.message || "Unknown error occurred", "Please try again or contact support"), import_picocolors11.default.red("Error"));
|
|
31654
31318
|
}
|
|
31655
31319
|
if (allowManualEntry) {
|
|
31656
31320
|
const retry2 = await se({
|
|
@@ -32711,6 +32375,7 @@ async function transformPathsForGlobalInstall(directory, options = {}) {
|
|
|
32711
32375
|
// src/commands/init.ts
|
|
32712
32376
|
init_environment();
|
|
32713
32377
|
init_logger();
|
|
32378
|
+
init_output_manager();
|
|
32714
32379
|
init_types2();
|
|
32715
32380
|
var import_fs_extra18 = __toESM(require_lib(), 1);
|
|
32716
32381
|
async function initCommand(options) {
|
|
@@ -32810,6 +32475,7 @@ async function initCommand(options) {
|
|
|
32810
32475
|
}
|
|
32811
32476
|
const github = new GitHubClient;
|
|
32812
32477
|
const spinner = createSpinner("Checking repository access...").start();
|
|
32478
|
+
logger.verbose("GitHub API check", { repo: kitConfig.repo, owner: kitConfig.owner });
|
|
32813
32479
|
try {
|
|
32814
32480
|
await github.checkAccess(kitConfig);
|
|
32815
32481
|
spinner.succeed("Repository access verified");
|
|
@@ -32849,7 +32515,6 @@ async function initCommand(options) {
|
|
|
32849
32515
|
}
|
|
32850
32516
|
let release;
|
|
32851
32517
|
if (selectedVersion) {
|
|
32852
|
-
logger.info(`Fetching release version: ${selectedVersion}`);
|
|
32853
32518
|
release = await github.getReleaseByTag(kitConfig, selectedVersion);
|
|
32854
32519
|
} else {
|
|
32855
32520
|
if (validOptions.beta) {
|
|
@@ -32858,15 +32523,20 @@ async function initCommand(options) {
|
|
|
32858
32523
|
logger.info("Fetching latest release...");
|
|
32859
32524
|
}
|
|
32860
32525
|
release = await github.getLatestRelease(kitConfig, validOptions.beta);
|
|
32861
|
-
|
|
32862
|
-
|
|
32863
|
-
|
|
32864
|
-
|
|
32865
|
-
|
|
32526
|
+
if (release.prerelease) {
|
|
32527
|
+
logger.success(`Found beta: ${release.tag_name}`);
|
|
32528
|
+
} else {
|
|
32529
|
+
logger.success(`Found: ${release.tag_name}`);
|
|
32530
|
+
}
|
|
32866
32531
|
}
|
|
32867
32532
|
const downloadInfo = GitHubClient.getDownloadableAsset(release);
|
|
32868
|
-
logger.
|
|
32869
|
-
|
|
32533
|
+
logger.verbose("Release info", {
|
|
32534
|
+
tag: release.tag_name,
|
|
32535
|
+
prerelease: release.prerelease,
|
|
32536
|
+
downloadType: downloadInfo.type,
|
|
32537
|
+
assetSize: downloadInfo.size
|
|
32538
|
+
});
|
|
32539
|
+
output.section("Downloading");
|
|
32870
32540
|
const downloadManager = new DownloadManager;
|
|
32871
32541
|
if (validOptions.exclude && validOptions.exclude.length > 0) {
|
|
32872
32542
|
downloadManager.setExcludePatterns(validOptions.exclude);
|
|
@@ -32903,6 +32573,7 @@ async function initCommand(options) {
|
|
|
32903
32573
|
}
|
|
32904
32574
|
}
|
|
32905
32575
|
const extractDir = `${tempDir}/extracted`;
|
|
32576
|
+
logger.verbose("Extraction", { archivePath, extractDir });
|
|
32906
32577
|
await downloadManager.extractArchive(archivePath, extractDir);
|
|
32907
32578
|
await downloadManager.validateExtraction(extractDir);
|
|
32908
32579
|
if (CommandsPrefix.shouldApplyPrefix(validOptions)) {
|
|
@@ -32981,6 +32652,11 @@ async function initCommand(options) {
|
|
|
32981
32652
|
logger.info(`Selected directories: ${includePatterns.join(", ")}`);
|
|
32982
32653
|
}
|
|
32983
32654
|
}
|
|
32655
|
+
output.section("Installing");
|
|
32656
|
+
logger.verbose("Installation target", {
|
|
32657
|
+
directory: resolvedDir,
|
|
32658
|
+
mode: validOptions.global ? "global" : "local"
|
|
32659
|
+
});
|
|
32984
32660
|
const merger = new FileMerger;
|
|
32985
32661
|
if (includePatterns.length > 0) {
|
|
32986
32662
|
merger.setIncludePatterns(includePatterns);
|
|
@@ -33102,6 +32778,7 @@ import { join as join31, resolve as resolve6 } from "node:path";
|
|
|
33102
32778
|
init_package_installer();
|
|
33103
32779
|
init_environment();
|
|
33104
32780
|
init_logger();
|
|
32781
|
+
init_output_manager();
|
|
33105
32782
|
init_types2();
|
|
33106
32783
|
var import_fs_extra19 = __toESM(require_lib(), 1);
|
|
33107
32784
|
async function newCommand(options) {
|
|
@@ -33150,6 +32827,7 @@ async function newCommand(options) {
|
|
|
33150
32827
|
}
|
|
33151
32828
|
const github = new GitHubClient;
|
|
33152
32829
|
const spinner = createSpinner("Checking repository access...").start();
|
|
32830
|
+
logger.verbose("GitHub API check", { repo: kitConfig.repo, owner: kitConfig.owner });
|
|
33153
32831
|
try {
|
|
33154
32832
|
await github.checkAccess(kitConfig);
|
|
33155
32833
|
spinner.succeed("Repository access verified");
|
|
@@ -33186,7 +32864,6 @@ async function newCommand(options) {
|
|
|
33186
32864
|
}
|
|
33187
32865
|
let release;
|
|
33188
32866
|
if (selectedVersion) {
|
|
33189
|
-
logger.info(`Fetching release version: ${selectedVersion}`);
|
|
33190
32867
|
release = await github.getReleaseByTag(kitConfig, selectedVersion);
|
|
33191
32868
|
} else {
|
|
33192
32869
|
if (validOptions.beta) {
|
|
@@ -33195,15 +32872,20 @@ async function newCommand(options) {
|
|
|
33195
32872
|
logger.info("Fetching latest release...");
|
|
33196
32873
|
}
|
|
33197
32874
|
release = await github.getLatestRelease(kitConfig, validOptions.beta);
|
|
33198
|
-
|
|
33199
|
-
|
|
33200
|
-
|
|
33201
|
-
|
|
33202
|
-
|
|
32875
|
+
if (release.prerelease) {
|
|
32876
|
+
logger.success(`Found beta: ${release.tag_name}`);
|
|
32877
|
+
} else {
|
|
32878
|
+
logger.success(`Found: ${release.tag_name}`);
|
|
32879
|
+
}
|
|
33203
32880
|
}
|
|
33204
32881
|
const downloadInfo = GitHubClient.getDownloadableAsset(release);
|
|
33205
|
-
logger.
|
|
33206
|
-
|
|
32882
|
+
logger.verbose("Release info", {
|
|
32883
|
+
tag: release.tag_name,
|
|
32884
|
+
prerelease: release.prerelease,
|
|
32885
|
+
downloadType: downloadInfo.type,
|
|
32886
|
+
assetSize: downloadInfo.size
|
|
32887
|
+
});
|
|
32888
|
+
output.section("Downloading");
|
|
33207
32889
|
const downloadManager = new DownloadManager;
|
|
33208
32890
|
if (validOptions.exclude && validOptions.exclude.length > 0) {
|
|
33209
32891
|
downloadManager.setExcludePatterns(validOptions.exclude);
|
|
@@ -33240,6 +32922,7 @@ async function newCommand(options) {
|
|
|
33240
32922
|
}
|
|
33241
32923
|
}
|
|
33242
32924
|
const extractDir = `${tempDir}/extracted`;
|
|
32925
|
+
logger.verbose("Extraction", { archivePath, extractDir });
|
|
33243
32926
|
await downloadManager.extractArchive(archivePath, extractDir);
|
|
33244
32927
|
await downloadManager.validateExtraction(extractDir);
|
|
33245
32928
|
if (CommandsPrefix.shouldApplyPrefix(validOptions)) {
|
|
@@ -33262,6 +32945,8 @@ async function newCommand(options) {
|
|
|
33262
32945
|
});
|
|
33263
32946
|
logger.debug("Saved folder configuration to .claude/.ck.json");
|
|
33264
32947
|
}
|
|
32948
|
+
output.section("Installing");
|
|
32949
|
+
logger.verbose("Installation target", { directory: resolvedDir });
|
|
33265
32950
|
const merger = new FileMerger;
|
|
33266
32951
|
if (validOptions.exclude && validOptions.exclude.length > 0) {
|
|
33267
32952
|
merger.addIgnorePatterns(validOptions.exclude);
|
|
@@ -33336,7 +33021,7 @@ import { dirname as dirname6, join as join32 } from "node:path";
|
|
|
33336
33021
|
init_logger();
|
|
33337
33022
|
init_types2();
|
|
33338
33023
|
var import_fs_extra20 = __toESM(require_lib(), 1);
|
|
33339
|
-
var
|
|
33024
|
+
var import_picocolors13 = __toESM(require_picocolors(), 1);
|
|
33340
33025
|
async function detectInstallations() {
|
|
33341
33026
|
const installations = [];
|
|
33342
33027
|
const setup = await getClaudeKitSetup(process.cwd());
|
|
@@ -33446,27 +33131,27 @@ async function analyzeInstallation(installation, forceOverwrite) {
|
|
|
33446
33131
|
}
|
|
33447
33132
|
function displayDryRunPreview(analysis, installationType) {
|
|
33448
33133
|
console.log("");
|
|
33449
|
-
log.info(
|
|
33134
|
+
log.info(import_picocolors13.default.bold(`DRY RUN - Preview for ${installationType} installation:`));
|
|
33450
33135
|
console.log("");
|
|
33451
33136
|
if (analysis.toDelete.length > 0) {
|
|
33452
|
-
console.log(
|
|
33137
|
+
console.log(import_picocolors13.default.red(import_picocolors13.default.bold(`Files to DELETE (${analysis.toDelete.length}):`)));
|
|
33453
33138
|
const showDelete = analysis.toDelete.slice(0, 10);
|
|
33454
33139
|
for (const item of showDelete) {
|
|
33455
|
-
console.log(` ${
|
|
33140
|
+
console.log(` ${import_picocolors13.default.red("✖")} ${item.path}`);
|
|
33456
33141
|
}
|
|
33457
33142
|
if (analysis.toDelete.length > 10) {
|
|
33458
|
-
console.log(
|
|
33143
|
+
console.log(import_picocolors13.default.gray(` ... and ${analysis.toDelete.length - 10} more`));
|
|
33459
33144
|
}
|
|
33460
33145
|
console.log("");
|
|
33461
33146
|
}
|
|
33462
33147
|
if (analysis.toPreserve.length > 0) {
|
|
33463
|
-
console.log(
|
|
33148
|
+
console.log(import_picocolors13.default.green(import_picocolors13.default.bold(`Files to PRESERVE (${analysis.toPreserve.length}):`)));
|
|
33464
33149
|
const showPreserve = analysis.toPreserve.slice(0, 10);
|
|
33465
33150
|
for (const item of showPreserve) {
|
|
33466
|
-
console.log(` ${
|
|
33151
|
+
console.log(` ${import_picocolors13.default.green("✓")} ${item.path} ${import_picocolors13.default.gray(`(${item.reason})`)}`);
|
|
33467
33152
|
}
|
|
33468
33153
|
if (analysis.toPreserve.length > 10) {
|
|
33469
|
-
console.log(
|
|
33154
|
+
console.log(import_picocolors13.default.gray(` ... and ${analysis.toPreserve.length - 10} more`));
|
|
33470
33155
|
}
|
|
33471
33156
|
console.log("");
|
|
33472
33157
|
}
|
|
@@ -33547,7 +33232,7 @@ async function uninstallCommand(options) {
|
|
|
33547
33232
|
}
|
|
33548
33233
|
displayInstallations(installations, scope);
|
|
33549
33234
|
if (validOptions.dryRun) {
|
|
33550
|
-
log.info(
|
|
33235
|
+
log.info(import_picocolors13.default.yellow("DRY RUN MODE - No files will be deleted"));
|
|
33551
33236
|
await removeInstallations(installations, {
|
|
33552
33237
|
dryRun: true,
|
|
33553
33238
|
forceOverwrite: validOptions.forceOverwrite
|
|
@@ -33556,8 +33241,8 @@ async function uninstallCommand(options) {
|
|
|
33556
33241
|
return;
|
|
33557
33242
|
}
|
|
33558
33243
|
if (validOptions.forceOverwrite) {
|
|
33559
|
-
log.warn(`${
|
|
33560
|
-
${
|
|
33244
|
+
log.warn(`${import_picocolors13.default.yellow(import_picocolors13.default.bold("FORCE MODE ENABLED"))}
|
|
33245
|
+
${import_picocolors13.default.yellow("User modifications will be permanently deleted!")}`);
|
|
33561
33246
|
}
|
|
33562
33247
|
if (!validOptions.yes) {
|
|
33563
33248
|
const confirmed = await confirmUninstall(scope);
|
|
@@ -33724,7 +33409,7 @@ var import_compare_versions2 = __toESM(require_umd(), 1);
|
|
|
33724
33409
|
// package.json
|
|
33725
33410
|
var package_default2 = {
|
|
33726
33411
|
name: "claudekit-cli",
|
|
33727
|
-
version: "3.
|
|
33412
|
+
version: "3.9.0",
|
|
33728
33413
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
33729
33414
|
type: "module",
|
|
33730
33415
|
repository: {
|
|
@@ -33930,7 +33615,7 @@ Manual update: ${updateCmd}`);
|
|
|
33930
33615
|
// src/commands/version.ts
|
|
33931
33616
|
init_logger();
|
|
33932
33617
|
init_types2();
|
|
33933
|
-
var
|
|
33618
|
+
var import_picocolors14 = __toESM(require_picocolors(), 1);
|
|
33934
33619
|
function formatRelativeTime(dateString) {
|
|
33935
33620
|
if (!dateString)
|
|
33936
33621
|
return "Unknown";
|
|
@@ -33952,30 +33637,30 @@ function formatRelativeTime(dateString) {
|
|
|
33952
33637
|
}
|
|
33953
33638
|
function displayKitReleases(kitName, releases) {
|
|
33954
33639
|
console.log(`
|
|
33955
|
-
${
|
|
33640
|
+
${import_picocolors14.default.bold(import_picocolors14.default.cyan(kitName))} - Available Versions:
|
|
33956
33641
|
`);
|
|
33957
33642
|
if (releases.length === 0) {
|
|
33958
|
-
console.log(
|
|
33643
|
+
console.log(import_picocolors14.default.dim(" No releases found"));
|
|
33959
33644
|
return;
|
|
33960
33645
|
}
|
|
33961
33646
|
for (const release of releases) {
|
|
33962
|
-
const version =
|
|
33647
|
+
const version = import_picocolors14.default.green(release.tag_name);
|
|
33963
33648
|
const name2 = release.name || "No title";
|
|
33964
33649
|
const publishedAt = formatRelativeTime(release.published_at);
|
|
33965
33650
|
const assetCount = release.assets.length;
|
|
33966
33651
|
const badges = [];
|
|
33967
33652
|
if (release.prerelease)
|
|
33968
|
-
badges.push(
|
|
33653
|
+
badges.push(import_picocolors14.default.yellow("[prerelease]"));
|
|
33969
33654
|
if (release.draft)
|
|
33970
|
-
badges.push(
|
|
33655
|
+
badges.push(import_picocolors14.default.gray("[draft]"));
|
|
33971
33656
|
const badgeStr = badges.length > 0 ? ` ${badges.join(" ")}` : "";
|
|
33972
33657
|
const versionPart = version.padEnd(20);
|
|
33973
33658
|
const namePart = name2.length > 40 ? `${name2.slice(0, 37)}...` : name2.padEnd(40);
|
|
33974
|
-
const timePart =
|
|
33975
|
-
const assetPart =
|
|
33659
|
+
const timePart = import_picocolors14.default.dim(publishedAt.padEnd(20));
|
|
33660
|
+
const assetPart = import_picocolors14.default.dim(`(${assetCount} ${assetCount === 1 ? "asset" : "assets"})`);
|
|
33976
33661
|
console.log(` ${versionPart} ${namePart} ${timePart} ${assetPart}${badgeStr}`);
|
|
33977
33662
|
}
|
|
33978
|
-
console.log(
|
|
33663
|
+
console.log(import_picocolors14.default.dim(`
|
|
33979
33664
|
Showing ${releases.length} ${releases.length === 1 ? "release" : "releases"}`));
|
|
33980
33665
|
}
|
|
33981
33666
|
async function versionCommand(options) {
|
|
@@ -34010,8 +33695,8 @@ async function versionCommand(options) {
|
|
|
34010
33695
|
for (const result of results) {
|
|
34011
33696
|
if (result.error) {
|
|
34012
33697
|
console.log(`
|
|
34013
|
-
${
|
|
34014
|
-
console.log(
|
|
33698
|
+
${import_picocolors14.default.bold(import_picocolors14.default.cyan(result.kitConfig.name))} - ${import_picocolors14.default.red("Error")}`);
|
|
33699
|
+
console.log(import_picocolors14.default.dim(` ${result.error}`));
|
|
34015
33700
|
} else {
|
|
34016
33701
|
displayKitReleases(result.kitConfig.name, result.releases);
|
|
34017
33702
|
}
|
|
@@ -34027,7 +33712,7 @@ ${import_picocolors11.default.bold(import_picocolors11.default.cyan(result.kitCo
|
|
|
34027
33712
|
init_logger();
|
|
34028
33713
|
init_types2();
|
|
34029
33714
|
var import_compare_versions3 = __toESM(require_umd(), 1);
|
|
34030
|
-
var
|
|
33715
|
+
var import_picocolors15 = __toESM(require_picocolors(), 1);
|
|
34031
33716
|
|
|
34032
33717
|
// src/domains/versioning/version-cache.ts
|
|
34033
33718
|
init_logger();
|
|
@@ -34176,7 +33861,7 @@ class VersionChecker {
|
|
|
34176
33861
|
const displayLatest = normalizeVersion(latestVersion);
|
|
34177
33862
|
const boxWidth = 52;
|
|
34178
33863
|
const contentWidth = boxWidth - 2;
|
|
34179
|
-
const border =
|
|
33864
|
+
const border = import_picocolors15.default.cyan;
|
|
34180
33865
|
const topBorder = border(`╭${"─".repeat(contentWidth)}╮`);
|
|
34181
33866
|
const bottomBorder = border(`╰${"─".repeat(contentWidth)}╯`);
|
|
34182
33867
|
const emptyLine = border("│") + " ".repeat(contentWidth) + border("│");
|
|
@@ -34189,12 +33874,12 @@ class VersionChecker {
|
|
|
34189
33874
|
const rightPadding = Math.max(0, totalPadding - leftPadding);
|
|
34190
33875
|
return border("│") + " ".repeat(leftPadding) + displayText + " ".repeat(rightPadding) + border("│");
|
|
34191
33876
|
};
|
|
34192
|
-
const headerText =
|
|
33877
|
+
const headerText = import_picocolors15.default.bold(import_picocolors15.default.yellow("⬆ Kit Update Available"));
|
|
34193
33878
|
const headerLen = "⬆ Kit Update Available".length;
|
|
34194
|
-
const versionText = `${
|
|
33879
|
+
const versionText = `${import_picocolors15.default.dim(displayCurrent)} ${import_picocolors15.default.white("→")} ${import_picocolors15.default.green(import_picocolors15.default.bold(displayLatest))}`;
|
|
34195
33880
|
const versionLen = displayCurrent.length + 3 + displayLatest.length;
|
|
34196
33881
|
const updateCmd = isGlobal ? "ck init -g" : "ck init";
|
|
34197
|
-
const commandText = `Run: ${
|
|
33882
|
+
const commandText = `Run: ${import_picocolors15.default.cyan(import_picocolors15.default.bold(updateCmd))}`;
|
|
34198
33883
|
const commandLen = `Run: ${updateCmd}`.length;
|
|
34199
33884
|
console.log("");
|
|
34200
33885
|
console.log(topBorder);
|
|
@@ -34243,7 +33928,7 @@ class CliVersionChecker {
|
|
|
34243
33928
|
const { currentVersion, latestVersion } = result;
|
|
34244
33929
|
const boxWidth = 52;
|
|
34245
33930
|
const contentWidth = boxWidth - 2;
|
|
34246
|
-
const border =
|
|
33931
|
+
const border = import_picocolors15.default.magenta;
|
|
34247
33932
|
const topBorder = border(`╭${"─".repeat(contentWidth)}╮`);
|
|
34248
33933
|
const bottomBorder = border(`╰${"─".repeat(contentWidth)}╯`);
|
|
34249
33934
|
const emptyLine = border("│") + " ".repeat(contentWidth) + border("│");
|
|
@@ -34256,11 +33941,11 @@ class CliVersionChecker {
|
|
|
34256
33941
|
const rightPadding = Math.max(0, totalPadding - leftPadding);
|
|
34257
33942
|
return border("│") + " ".repeat(leftPadding) + displayText + " ".repeat(rightPadding) + border("│");
|
|
34258
33943
|
};
|
|
34259
|
-
const headerText =
|
|
33944
|
+
const headerText = import_picocolors15.default.bold(import_picocolors15.default.yellow("⬆ CLI Update Available"));
|
|
34260
33945
|
const headerLen = "⬆ CLI Update Available".length;
|
|
34261
|
-
const versionText = `${
|
|
33946
|
+
const versionText = `${import_picocolors15.default.dim(currentVersion)} ${import_picocolors15.default.white("→")} ${import_picocolors15.default.green(import_picocolors15.default.bold(latestVersion))}`;
|
|
34262
33947
|
const versionLen = currentVersion.length + 3 + latestVersion.length;
|
|
34263
|
-
const commandText = `Run: ${
|
|
33948
|
+
const commandText = `Run: ${import_picocolors15.default.magenta(import_picocolors15.default.bold("ck update"))}`;
|
|
34264
33949
|
const commandLen = "Run: ck update".length;
|
|
34265
33950
|
console.log("");
|
|
34266
33951
|
console.log(topBorder);
|
|
@@ -34276,33 +33961,32 @@ class CliVersionChecker {
|
|
|
34276
33961
|
}
|
|
34277
33962
|
|
|
34278
33963
|
// src/shared/logger.ts
|
|
34279
|
-
|
|
33964
|
+
init_output_manager();
|
|
33965
|
+
var import_picocolors16 = __toESM(require_picocolors(), 1);
|
|
34280
33966
|
import { createWriteStream as createWriteStream3 } from "node:fs";
|
|
34281
|
-
var symbols2 = {
|
|
34282
|
-
info: "[i]",
|
|
34283
|
-
success: "[+]",
|
|
34284
|
-
warning: "[!]",
|
|
34285
|
-
error: "[x]"
|
|
34286
|
-
};
|
|
34287
33967
|
|
|
34288
33968
|
class Logger2 {
|
|
34289
33969
|
verboseEnabled = false;
|
|
34290
33970
|
logFileStream;
|
|
34291
33971
|
info(message) {
|
|
34292
|
-
|
|
33972
|
+
const symbols = output.getSymbols();
|
|
33973
|
+
console.log(import_picocolors16.default.blue(symbols.info), message);
|
|
34293
33974
|
}
|
|
34294
33975
|
success(message) {
|
|
34295
|
-
|
|
33976
|
+
const symbols = output.getSymbols();
|
|
33977
|
+
console.log(import_picocolors16.default.green(symbols.success), message);
|
|
34296
33978
|
}
|
|
34297
33979
|
warning(message) {
|
|
34298
|
-
|
|
33980
|
+
const symbols = output.getSymbols();
|
|
33981
|
+
console.log(import_picocolors16.default.yellow(symbols.warning), message);
|
|
34299
33982
|
}
|
|
34300
33983
|
error(message) {
|
|
34301
|
-
|
|
33984
|
+
const symbols = output.getSymbols();
|
|
33985
|
+
console.error(import_picocolors16.default.red(symbols.error), message);
|
|
34302
33986
|
}
|
|
34303
33987
|
debug(message) {
|
|
34304
33988
|
if (process.env.DEBUG) {
|
|
34305
|
-
console.log(
|
|
33989
|
+
console.log(import_picocolors16.default.gray("[DEBUG]"), message);
|
|
34306
33990
|
}
|
|
34307
33991
|
}
|
|
34308
33992
|
verbose(message, context) {
|
|
@@ -34311,7 +33995,7 @@ class Logger2 {
|
|
|
34311
33995
|
const timestamp = this.getTimestamp();
|
|
34312
33996
|
const sanitizedMessage = this.sanitize(message);
|
|
34313
33997
|
const formattedContext = context ? this.formatContext(context) : "";
|
|
34314
|
-
const logLine = `${timestamp} ${
|
|
33998
|
+
const logLine = `${timestamp} ${import_picocolors16.default.gray("[VERBOSE]")} ${sanitizedMessage}${formattedContext}`;
|
|
34315
33999
|
console.error(logLine);
|
|
34316
34000
|
if (this.logFileStream) {
|
|
34317
34001
|
const plainLogLine = `${timestamp} [VERBOSE] ${sanitizedMessage}${formattedContext}`;
|
|
@@ -34372,6 +34056,184 @@ class Logger2 {
|
|
|
34372
34056
|
}
|
|
34373
34057
|
var logger2 = new Logger2;
|
|
34374
34058
|
|
|
34059
|
+
// src/shared/output-manager.ts
|
|
34060
|
+
init_terminal_utils();
|
|
34061
|
+
var import_picocolors17 = __toESM(require_picocolors(), 1);
|
|
34062
|
+
var SYMBOLS2 = {
|
|
34063
|
+
unicode: {
|
|
34064
|
+
prompt: "◇",
|
|
34065
|
+
success: "✓",
|
|
34066
|
+
error: "✗",
|
|
34067
|
+
warning: "⚠",
|
|
34068
|
+
info: "ℹ",
|
|
34069
|
+
line: "│",
|
|
34070
|
+
selected: "●",
|
|
34071
|
+
unselected: "○",
|
|
34072
|
+
pointer: ">"
|
|
34073
|
+
},
|
|
34074
|
+
ascii: {
|
|
34075
|
+
prompt: "?",
|
|
34076
|
+
success: "+",
|
|
34077
|
+
error: "x",
|
|
34078
|
+
warning: "!",
|
|
34079
|
+
info: "i",
|
|
34080
|
+
line: "|",
|
|
34081
|
+
selected: ">",
|
|
34082
|
+
unselected: " ",
|
|
34083
|
+
pointer: ">"
|
|
34084
|
+
}
|
|
34085
|
+
};
|
|
34086
|
+
|
|
34087
|
+
class OutputManager2 {
|
|
34088
|
+
config = {
|
|
34089
|
+
verbose: false,
|
|
34090
|
+
json: false,
|
|
34091
|
+
quiet: false
|
|
34092
|
+
};
|
|
34093
|
+
jsonBuffer = [];
|
|
34094
|
+
unicodeSupported;
|
|
34095
|
+
flushPromise = null;
|
|
34096
|
+
constructor() {
|
|
34097
|
+
this.unicodeSupported = supportsUnicode();
|
|
34098
|
+
}
|
|
34099
|
+
configure(config) {
|
|
34100
|
+
this.config = { ...this.config, ...config };
|
|
34101
|
+
}
|
|
34102
|
+
getConfig() {
|
|
34103
|
+
return { ...this.config };
|
|
34104
|
+
}
|
|
34105
|
+
isVerbose() {
|
|
34106
|
+
return this.config.verbose;
|
|
34107
|
+
}
|
|
34108
|
+
isJson() {
|
|
34109
|
+
return this.config.json;
|
|
34110
|
+
}
|
|
34111
|
+
isQuiet() {
|
|
34112
|
+
return this.config.quiet;
|
|
34113
|
+
}
|
|
34114
|
+
getSymbols() {
|
|
34115
|
+
return this.unicodeSupported ? SYMBOLS2.unicode : SYMBOLS2.ascii;
|
|
34116
|
+
}
|
|
34117
|
+
shouldShowProgress() {
|
|
34118
|
+
if (this.config.json)
|
|
34119
|
+
return false;
|
|
34120
|
+
if (!isTTY())
|
|
34121
|
+
return false;
|
|
34122
|
+
return true;
|
|
34123
|
+
}
|
|
34124
|
+
success(message, data) {
|
|
34125
|
+
if (this.config.json) {
|
|
34126
|
+
this.addJsonEntry({ type: "success", message, data });
|
|
34127
|
+
return;
|
|
34128
|
+
}
|
|
34129
|
+
if (this.config.quiet)
|
|
34130
|
+
return;
|
|
34131
|
+
const symbol = this.getSymbols().success;
|
|
34132
|
+
console.log(import_picocolors17.default.green(`${symbol} ${message}`));
|
|
34133
|
+
}
|
|
34134
|
+
error(message, data) {
|
|
34135
|
+
if (this.config.json) {
|
|
34136
|
+
this.addJsonEntry({ type: "error", message, data });
|
|
34137
|
+
return;
|
|
34138
|
+
}
|
|
34139
|
+
const symbol = this.getSymbols().error;
|
|
34140
|
+
console.error(import_picocolors17.default.red(`${symbol} ${message}`));
|
|
34141
|
+
}
|
|
34142
|
+
warning(message, data) {
|
|
34143
|
+
if (this.config.json) {
|
|
34144
|
+
this.addJsonEntry({ type: "warning", message, data });
|
|
34145
|
+
return;
|
|
34146
|
+
}
|
|
34147
|
+
if (this.config.quiet)
|
|
34148
|
+
return;
|
|
34149
|
+
const symbol = this.getSymbols().warning;
|
|
34150
|
+
console.log(import_picocolors17.default.yellow(`${symbol} ${message}`));
|
|
34151
|
+
}
|
|
34152
|
+
info(message, data) {
|
|
34153
|
+
if (this.config.json) {
|
|
34154
|
+
this.addJsonEntry({ type: "info", message, data });
|
|
34155
|
+
return;
|
|
34156
|
+
}
|
|
34157
|
+
if (this.config.quiet)
|
|
34158
|
+
return;
|
|
34159
|
+
const symbol = this.getSymbols().info;
|
|
34160
|
+
console.log(import_picocolors17.default.blue(`${symbol} ${message}`));
|
|
34161
|
+
}
|
|
34162
|
+
verbose(message, data) {
|
|
34163
|
+
if (!this.config.verbose)
|
|
34164
|
+
return;
|
|
34165
|
+
if (this.config.json) {
|
|
34166
|
+
this.addJsonEntry({ type: "info", message, data });
|
|
34167
|
+
return;
|
|
34168
|
+
}
|
|
34169
|
+
console.log(import_picocolors17.default.dim(` ${message}`));
|
|
34170
|
+
}
|
|
34171
|
+
indent(message) {
|
|
34172
|
+
if (this.config.json)
|
|
34173
|
+
return;
|
|
34174
|
+
if (this.config.quiet)
|
|
34175
|
+
return;
|
|
34176
|
+
console.log(` ${message}`);
|
|
34177
|
+
}
|
|
34178
|
+
newline() {
|
|
34179
|
+
if (this.config.json)
|
|
34180
|
+
return;
|
|
34181
|
+
if (this.config.quiet)
|
|
34182
|
+
return;
|
|
34183
|
+
console.log();
|
|
34184
|
+
}
|
|
34185
|
+
section(title) {
|
|
34186
|
+
if (this.config.json) {
|
|
34187
|
+
this.addJsonEntry({ type: "info", message: `[Section] ${title}` });
|
|
34188
|
+
return;
|
|
34189
|
+
}
|
|
34190
|
+
if (this.config.quiet)
|
|
34191
|
+
return;
|
|
34192
|
+
const symbols = this.getSymbols();
|
|
34193
|
+
console.log();
|
|
34194
|
+
console.log(import_picocolors17.default.bold(import_picocolors17.default.cyan(`${symbols.line} ${title}`)));
|
|
34195
|
+
}
|
|
34196
|
+
addJsonEntry(entry) {
|
|
34197
|
+
this.jsonBuffer.push({
|
|
34198
|
+
...entry,
|
|
34199
|
+
timestamp: new Date().toISOString()
|
|
34200
|
+
});
|
|
34201
|
+
if (this.jsonBuffer.length >= 1000 && !this.flushPromise) {
|
|
34202
|
+
queueMicrotask(() => this.flushJson());
|
|
34203
|
+
}
|
|
34204
|
+
}
|
|
34205
|
+
addJsonResult(data) {
|
|
34206
|
+
this.addJsonEntry({ type: "result", data });
|
|
34207
|
+
}
|
|
34208
|
+
async flushJson() {
|
|
34209
|
+
if (this.jsonBuffer.length === 0)
|
|
34210
|
+
return;
|
|
34211
|
+
if (this.flushPromise)
|
|
34212
|
+
return this.flushPromise;
|
|
34213
|
+
this.flushPromise = (async () => {
|
|
34214
|
+
const bufferCopy = [...this.jsonBuffer];
|
|
34215
|
+
this.jsonBuffer = [];
|
|
34216
|
+
console.log(JSON.stringify(bufferCopy, null, 2));
|
|
34217
|
+
})().finally(() => {
|
|
34218
|
+
this.flushPromise = null;
|
|
34219
|
+
});
|
|
34220
|
+
return this.flushPromise;
|
|
34221
|
+
}
|
|
34222
|
+
getJsonBuffer() {
|
|
34223
|
+
return [...this.jsonBuffer];
|
|
34224
|
+
}
|
|
34225
|
+
clearJsonBuffer() {
|
|
34226
|
+
this.jsonBuffer = [];
|
|
34227
|
+
}
|
|
34228
|
+
reset() {
|
|
34229
|
+
this.config = { verbose: false, json: false, quiet: false };
|
|
34230
|
+
this.jsonBuffer = [];
|
|
34231
|
+
this.flushPromise = null;
|
|
34232
|
+
this.unicodeSupported = supportsUnicode();
|
|
34233
|
+
}
|
|
34234
|
+
}
|
|
34235
|
+
var output2 = new OutputManager2;
|
|
34236
|
+
|
|
34375
34237
|
// src/shared/path-resolver.ts
|
|
34376
34238
|
import { homedir as homedir4, platform as platform10 } from "node:os";
|
|
34377
34239
|
import { join as join34, normalize as normalize6 } from "node:path";
|
|
@@ -34483,6 +34345,12 @@ init_skills();
|
|
|
34483
34345
|
init_errors2();
|
|
34484
34346
|
|
|
34485
34347
|
// src/index.ts
|
|
34348
|
+
process.on("warning", (warning) => {
|
|
34349
|
+
if (warning.name === "DeprecationWarning" && warning.code === "DEP0005") {
|
|
34350
|
+
return;
|
|
34351
|
+
}
|
|
34352
|
+
console.error(warning.toString());
|
|
34353
|
+
});
|
|
34486
34354
|
if (process.stdout.setEncoding) {
|
|
34487
34355
|
process.stdout.setEncoding("utf8");
|
|
34488
34356
|
}
|
|
@@ -34555,8 +34423,9 @@ async function displayVersion() {
|
|
|
34555
34423
|
}
|
|
34556
34424
|
var cli = cac("ck");
|
|
34557
34425
|
cli.option("--verbose", "Enable verbose logging for debugging");
|
|
34426
|
+
cli.option("--json", "Output machine-readable JSON format");
|
|
34558
34427
|
cli.option("--log-file <path>", "Write logs to file");
|
|
34559
|
-
cli.command("new", "Bootstrap a new ClaudeKit project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit to use (engineer, marketing)").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--force", "Overwrite existing files without confirmation").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--opencode", "Install OpenCode CLI package (non-interactive mode)").option("--gemini", "Install Google Gemini CLI package (non-interactive mode)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--prefix", "Add /ck: prefix to all slash commands by moving them to commands/ck/ subdirectory").option("--beta", "Show beta versions in selection prompt").option("--refresh", "Bypass release cache to fetch latest versions from GitHub").option("--docs-dir <name>", "Custom docs folder name (default: docs)").option("--plans-dir <name>", "Custom plans folder name (default: plans)").action(async (options) => {
|
|
34428
|
+
cli.command("new", "Bootstrap a new ClaudeKit project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit to use (engineer, marketing)").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--force", "Overwrite existing files without confirmation").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--opencode", "Install OpenCode CLI package (non-interactive mode)").option("--gemini", "Install Google Gemini CLI package (non-interactive mode)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--prefix", "Add /ck: prefix to all slash commands by moving them to commands/ck/ subdirectory").option("--beta", "Show beta versions in selection prompt").option("--refresh", "Bypass release cache to fetch latest versions from GitHub").option("--docs-dir <name>", "Custom docs folder name (default: docs)").option("--plans-dir <name>", "Custom plans folder name (default: plans)").option("-y, --yes", "Non-interactive mode with sensible defaults (skip all prompts)").action(async (options) => {
|
|
34560
34429
|
if (options.exclude && !Array.isArray(options.exclude)) {
|
|
34561
34430
|
options.exclude = [options.exclude];
|
|
34562
34431
|
}
|
|
@@ -34621,6 +34490,11 @@ var parsed = cli.parse(process.argv, { run: false });
|
|
|
34621
34490
|
}
|
|
34622
34491
|
const envVerbose = process.env.CLAUDEKIT_VERBOSE === "1" || process.env.CLAUDEKIT_VERBOSE === "true";
|
|
34623
34492
|
const isVerbose = parsed.options.verbose || envVerbose;
|
|
34493
|
+
const isJson = parsed.options.json || false;
|
|
34494
|
+
output2.configure({
|
|
34495
|
+
verbose: isVerbose,
|
|
34496
|
+
json: isJson
|
|
34497
|
+
});
|
|
34624
34498
|
if (isVerbose) {
|
|
34625
34499
|
logger2.setVerbose(true);
|
|
34626
34500
|
}
|
|
@@ -34634,12 +34508,21 @@ var parsed = cli.parse(process.argv, { run: false });
|
|
|
34634
34508
|
cwd: process.cwd(),
|
|
34635
34509
|
node: process.version
|
|
34636
34510
|
});
|
|
34637
|
-
cli.
|
|
34511
|
+
await cli.runMatchedCommand();
|
|
34512
|
+
if (output2.isJson()) {
|
|
34513
|
+
await output2.flushJson();
|
|
34514
|
+
}
|
|
34638
34515
|
} catch (error) {
|
|
34639
34516
|
console.error("CLI error:", error instanceof Error ? error.message : error);
|
|
34640
34517
|
process.exitCode = 1;
|
|
34518
|
+
if (output2.isJson()) {
|
|
34519
|
+
await output2.flushJson();
|
|
34520
|
+
}
|
|
34641
34521
|
}
|
|
34642
|
-
})().catch((error) => {
|
|
34522
|
+
})().catch(async (error) => {
|
|
34643
34523
|
console.error("Unhandled error:", error instanceof Error ? error.message : error);
|
|
34644
34524
|
process.exitCode = 1;
|
|
34525
|
+
if (output2.isJson()) {
|
|
34526
|
+
await output2.flushJson();
|
|
34527
|
+
}
|
|
34645
34528
|
});
|