claude-threads 1.5.1 → 1.6.2
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/CHANGELOG.md +44 -0
- package/bin/claude-threads-daemon +3 -0
- package/dist/index.js +192 -1118
- package/dist/mcp/permission-server.js +41 -13
- package/dist/statusline/writer.js +3 -2
- package/package.json +13 -7
package/dist/index.js
CHANGED
|
@@ -11835,6 +11835,22 @@ var init_emoji = __esm(() => {
|
|
|
11835
11835
|
};
|
|
11836
11836
|
});
|
|
11837
11837
|
|
|
11838
|
+
// src/utils/spawn.ts
|
|
11839
|
+
import { spawn as nodeSpawn, spawnSync as nodeSpawnSync } from "child_process";
|
|
11840
|
+
function addWindowsShell(options2) {
|
|
11841
|
+
if (isWindows && options2.shell === undefined) {
|
|
11842
|
+
return { ...options2, shell: true };
|
|
11843
|
+
}
|
|
11844
|
+
return options2;
|
|
11845
|
+
}
|
|
11846
|
+
function crossSpawn(command, args, options2) {
|
|
11847
|
+
return nodeSpawn(command, args, addWindowsShell(options2 ?? {}));
|
|
11848
|
+
}
|
|
11849
|
+
var isWindows;
|
|
11850
|
+
var init_spawn = __esm(() => {
|
|
11851
|
+
isWindows = process.platform === "win32";
|
|
11852
|
+
});
|
|
11853
|
+
|
|
11838
11854
|
// src/git/worktree.ts
|
|
11839
11855
|
var exports_worktree = {};
|
|
11840
11856
|
__export(exports_worktree, {
|
|
@@ -11858,7 +11874,6 @@ __export(exports_worktree, {
|
|
|
11858
11874
|
detectWorktreeInfo: () => detectWorktreeInfo,
|
|
11859
11875
|
createWorktree: () => createWorktree
|
|
11860
11876
|
});
|
|
11861
|
-
import { spawn as spawn2 } from "child_process";
|
|
11862
11877
|
import { randomUUID } from "crypto";
|
|
11863
11878
|
import * as path from "path";
|
|
11864
11879
|
import * as fs from "fs/promises";
|
|
@@ -11867,7 +11882,7 @@ async function execGit(args, cwd) {
|
|
|
11867
11882
|
const cmd = `git ${args.join(" ")}`;
|
|
11868
11883
|
log7.debug(`Executing: ${cmd}`);
|
|
11869
11884
|
return new Promise((resolve3, reject) => {
|
|
11870
|
-
const proc =
|
|
11885
|
+
const proc = crossSpawn("git", args, { cwd });
|
|
11871
11886
|
let stdout = "";
|
|
11872
11887
|
let stderr = "";
|
|
11873
11888
|
proc.stdout.on("data", (data) => {
|
|
@@ -12157,6 +12172,7 @@ async function removeWorktreeMetadata(worktreePath) {
|
|
|
12157
12172
|
}
|
|
12158
12173
|
var log7, WORKTREES_DIR, METADATA_STORE_PATH;
|
|
12159
12174
|
var init_worktree = __esm(() => {
|
|
12175
|
+
init_spawn();
|
|
12160
12176
|
init_logger();
|
|
12161
12177
|
log7 = createLogger("git-wt");
|
|
12162
12178
|
WORKTREES_DIR = path.join(homedir4(), ".claude-threads", "worktrees");
|
|
@@ -14551,7 +14567,7 @@ var require_ini = __commonJS((exports) => {
|
|
|
14551
14567
|
}
|
|
14552
14568
|
});
|
|
14553
14569
|
|
|
14554
|
-
// node_modules/
|
|
14570
|
+
// node_modules/strip-json-comments/index.js
|
|
14555
14571
|
var require_strip_json_comments = __commonJS((exports, module) => {
|
|
14556
14572
|
var singleComment = 1;
|
|
14557
14573
|
var multiComment = 2;
|
|
@@ -15015,7 +15031,7 @@ var require_minimist = __commonJS((exports, module) => {
|
|
|
15015
15031
|
// node_modules/rc/index.js
|
|
15016
15032
|
var require_rc = __commonJS((exports, module) => {
|
|
15017
15033
|
var cc = require_utils();
|
|
15018
|
-
var
|
|
15034
|
+
var join9 = __require("path").join;
|
|
15019
15035
|
var deepExtend = require_deep_extend();
|
|
15020
15036
|
var etc = "/etc";
|
|
15021
15037
|
var win = process.platform === "win32";
|
|
@@ -15041,15 +15057,15 @@ var require_rc = __commonJS((exports, module) => {
|
|
|
15041
15057
|
}
|
|
15042
15058
|
if (!win)
|
|
15043
15059
|
[
|
|
15044
|
-
|
|
15045
|
-
|
|
15060
|
+
join9(etc, name, "config"),
|
|
15061
|
+
join9(etc, name + "rc")
|
|
15046
15062
|
].forEach(addConfigFile);
|
|
15047
15063
|
if (home)
|
|
15048
15064
|
[
|
|
15049
|
-
|
|
15050
|
-
|
|
15051
|
-
|
|
15052
|
-
|
|
15065
|
+
join9(home, ".config", name, "config"),
|
|
15066
|
+
join9(home, ".config", name),
|
|
15067
|
+
join9(home, "." + name, "config"),
|
|
15068
|
+
join9(home, "." + name + "rc")
|
|
15053
15069
|
].forEach(addConfigFile);
|
|
15054
15070
|
addConfigFile(cc.find("." + name + "rc"));
|
|
15055
15071
|
if (env3.config)
|
|
@@ -16859,10 +16875,10 @@ var require_defaults = __commonJS((exports) => {
|
|
|
16859
16875
|
var temp = os4.tmpdir();
|
|
16860
16876
|
var uidOrPid = process.getuid ? process.getuid() : process.pid;
|
|
16861
16877
|
var hasUnicode = () => true;
|
|
16862
|
-
var
|
|
16878
|
+
var isWindows2 = process.platform === "win32";
|
|
16863
16879
|
var osenv = {
|
|
16864
|
-
editor: () => process.env.EDITOR || process.env.VISUAL || (
|
|
16865
|
-
shell: () =>
|
|
16880
|
+
editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows2 ? "notepad.exe" : "vi"),
|
|
16881
|
+
shell: () => isWindows2 ? process.env.COMSPEC || "cmd.exe" : process.env.SHELL || "/bin/bash"
|
|
16866
16882
|
};
|
|
16867
16883
|
var umask = {
|
|
16868
16884
|
fromString: () => process.umask()
|
|
@@ -49850,7 +49866,7 @@ function configExists() {
|
|
|
49850
49866
|
// src/onboarding.ts
|
|
49851
49867
|
var import_prompts = __toESM(require_prompts3(), 1);
|
|
49852
49868
|
import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
|
|
49853
|
-
import { join, dirname as dirname2 } from "path";
|
|
49869
|
+
import { join as join2, dirname as dirname2 } from "path";
|
|
49854
49870
|
import { spawn } from "child_process";
|
|
49855
49871
|
import { fileURLToPath } from "url";
|
|
49856
49872
|
|
|
@@ -49875,7 +49891,13 @@ var red = (s) => `${colors.red}${s}${colors.reset}`;
|
|
|
49875
49891
|
var import_semver = __toESM(require_semver2(), 1);
|
|
49876
49892
|
import { execSync } from "child_process";
|
|
49877
49893
|
import { existsSync as existsSync2 } from "fs";
|
|
49878
|
-
|
|
49894
|
+
import { join } from "path";
|
|
49895
|
+
var COMMON_CLAUDE_PATHS = process.platform === "win32" ? [
|
|
49896
|
+
...process.env.APPDATA ? [join(process.env.APPDATA, "npm", "claude.cmd")] : [],
|
|
49897
|
+
...process.env.LOCALAPPDATA ? [join(process.env.LOCALAPPDATA, "npm", "claude.cmd")] : [],
|
|
49898
|
+
...process.env.NVM_SYMLINK ? [join(process.env.NVM_SYMLINK, "claude.cmd")] : [],
|
|
49899
|
+
...process.env.USERPROFILE ? [join(process.env.USERPROFILE, ".bun", "bin", "claude.cmd")] : []
|
|
49900
|
+
] : [
|
|
49879
49901
|
"/usr/local/bin/claude",
|
|
49880
49902
|
"/opt/homebrew/bin/claude",
|
|
49881
49903
|
`${process.env.HOME}/.local/bin/claude`,
|
|
@@ -49910,12 +49932,14 @@ function tryClaudeVersion(claudePath) {
|
|
|
49910
49932
|
}
|
|
49911
49933
|
function findClaudeInPath() {
|
|
49912
49934
|
try {
|
|
49913
|
-
const
|
|
49935
|
+
const findCommand = process.platform === "win32" ? "where claude" : "which claude";
|
|
49936
|
+
const result = execSync(findCommand, {
|
|
49914
49937
|
encoding: "utf8",
|
|
49915
49938
|
timeout: 5000,
|
|
49916
49939
|
stdio: ["pipe", "pipe", "pipe"]
|
|
49917
49940
|
}).trim();
|
|
49918
|
-
|
|
49941
|
+
const firstLine = result.split(/\r?\n/)[0];
|
|
49942
|
+
return firstLine || null;
|
|
49919
49943
|
} catch {
|
|
49920
49944
|
return null;
|
|
49921
49945
|
}
|
|
@@ -50029,7 +50053,7 @@ function validateClaudeCli() {
|
|
|
50029
50053
|
|
|
50030
50054
|
// src/onboarding.ts
|
|
50031
50055
|
var __dirname2 = dirname2(fileURLToPath(import.meta.url));
|
|
50032
|
-
var SLACK_MANIFEST_PATH =
|
|
50056
|
+
var SLACK_MANIFEST_PATH = join2(__dirname2, "..", "docs", "slack-app-manifest.yaml");
|
|
50033
50057
|
var onCancel = () => {
|
|
50034
50058
|
console.log("");
|
|
50035
50059
|
console.log(dim(" Setup cancelled."));
|
|
@@ -50314,7 +50338,6 @@ async function runOnboarding(reconfigure = false) {
|
|
|
50314
50338
|
initial: 0
|
|
50315
50339
|
}, { onCancel });
|
|
50316
50340
|
if (platformType === "done") {
|
|
50317
|
-
addMore = false;
|
|
50318
50341
|
break;
|
|
50319
50342
|
}
|
|
50320
50343
|
await showPlatformInstructions(platformType);
|
|
@@ -50396,8 +50419,7 @@ async function runOnboarding(reconfigure = false) {
|
|
|
50396
50419
|
}
|
|
50397
50420
|
async function runReconfigureFlow(existingConfig) {
|
|
50398
50421
|
let config = { ...existingConfig, platforms: [...existingConfig.platforms] };
|
|
50399
|
-
|
|
50400
|
-
while (keepReconfiguring) {
|
|
50422
|
+
while (true) {
|
|
50401
50423
|
console.log("");
|
|
50402
50424
|
console.log(bold(" What would you like to reconfigure?"));
|
|
50403
50425
|
console.log("");
|
|
@@ -50424,7 +50446,6 @@ async function runReconfigureFlow(existingConfig) {
|
|
|
50424
50446
|
choices
|
|
50425
50447
|
}, { onCancel });
|
|
50426
50448
|
if (action === "done") {
|
|
50427
|
-
keepReconfiguring = false;
|
|
50428
50449
|
break;
|
|
50429
50450
|
}
|
|
50430
50451
|
if (action === "global") {
|
|
@@ -53298,11 +53319,11 @@ import { EventEmitter as EventEmitter4 } from "events";
|
|
|
53298
53319
|
init_logger();
|
|
53299
53320
|
import { existsSync as existsSync5, mkdirSync as mkdirSync2, readFileSync as readFileSync4, writeFileSync as writeFileSync2, renameSync, chmodSync as chmodSync2 } from "fs";
|
|
53300
53321
|
import { homedir as homedir2 } from "os";
|
|
53301
|
-
import { join as
|
|
53322
|
+
import { join as join3 } from "path";
|
|
53302
53323
|
var log5 = createLogger("persist");
|
|
53303
53324
|
var STORE_VERSION = 2;
|
|
53304
|
-
var DEFAULT_CONFIG_DIR =
|
|
53305
|
-
var DEFAULT_SESSIONS_FILE =
|
|
53325
|
+
var DEFAULT_CONFIG_DIR = join3(homedir2(), ".config", "claude-threads");
|
|
53326
|
+
var DEFAULT_SESSIONS_FILE = join3(DEFAULT_CONFIG_DIR, "sessions.json");
|
|
53306
53327
|
|
|
53307
53328
|
class SessionStore {
|
|
53308
53329
|
sessionsFile;
|
|
@@ -53312,7 +53333,7 @@ class SessionStore {
|
|
|
53312
53333
|
const effectivePath = sessionsPath ?? envPath;
|
|
53313
53334
|
if (effectivePath) {
|
|
53314
53335
|
this.sessionsFile = effectivePath;
|
|
53315
|
-
this.configDir =
|
|
53336
|
+
this.configDir = join3(effectivePath, "..");
|
|
53316
53337
|
} else {
|
|
53317
53338
|
this.sessionsFile = DEFAULT_SESSIONS_FILE;
|
|
53318
53339
|
this.configDir = DEFAULT_CONFIG_DIR;
|
|
@@ -53532,15 +53553,15 @@ init_emoji();
|
|
|
53532
53553
|
init_logger();
|
|
53533
53554
|
import { existsSync as existsSync7 } from "fs";
|
|
53534
53555
|
import { readdir, rm } from "fs/promises";
|
|
53535
|
-
import { join as
|
|
53556
|
+
import { join as join6 } from "path";
|
|
53536
53557
|
|
|
53537
53558
|
// src/persistence/thread-logger.ts
|
|
53538
53559
|
init_logger();
|
|
53539
53560
|
import { existsSync as existsSync6, mkdirSync as mkdirSync3, appendFileSync, readdirSync, statSync, unlinkSync, rmdirSync, readFileSync as readFileSync5, chmodSync as chmodSync3 } from "fs";
|
|
53540
53561
|
import { homedir as homedir3 } from "os";
|
|
53541
|
-
import { join as
|
|
53562
|
+
import { join as join4, dirname as dirname4 } from "path";
|
|
53542
53563
|
var log6 = createLogger("thread-log");
|
|
53543
|
-
var LOGS_BASE_DIR =
|
|
53564
|
+
var LOGS_BASE_DIR = join4(homedir3(), ".claude-threads", "logs");
|
|
53544
53565
|
|
|
53545
53566
|
class ThreadLoggerImpl {
|
|
53546
53567
|
platformId;
|
|
@@ -53560,7 +53581,7 @@ class ThreadLoggerImpl {
|
|
|
53560
53581
|
this.enabled = options2?.enabled ?? true;
|
|
53561
53582
|
this.bufferSize = options2?.bufferSize ?? 10;
|
|
53562
53583
|
this.flushIntervalMs = options2?.flushIntervalMs ?? 1000;
|
|
53563
|
-
this.logPath =
|
|
53584
|
+
this.logPath = join4(LOGS_BASE_DIR, platformId, `${claudeSessionId}.jsonl`);
|
|
53564
53585
|
if (this.enabled) {
|
|
53565
53586
|
const dir = dirname4(this.logPath);
|
|
53566
53587
|
if (!existsSync6(dir)) {
|
|
@@ -53742,7 +53763,7 @@ function cleanupOldLogs(retentionDays = 30) {
|
|
|
53742
53763
|
try {
|
|
53743
53764
|
const platformDirs = readdirSync(LOGS_BASE_DIR);
|
|
53744
53765
|
for (const platformId of platformDirs) {
|
|
53745
|
-
const platformDir =
|
|
53766
|
+
const platformDir = join4(LOGS_BASE_DIR, platformId);
|
|
53746
53767
|
const stat = statSync(platformDir);
|
|
53747
53768
|
if (!stat.isDirectory())
|
|
53748
53769
|
continue;
|
|
@@ -53750,7 +53771,7 @@ function cleanupOldLogs(retentionDays = 30) {
|
|
|
53750
53771
|
for (const file of logFiles) {
|
|
53751
53772
|
if (!file.endsWith(".jsonl"))
|
|
53752
53773
|
continue;
|
|
53753
|
-
const filePath =
|
|
53774
|
+
const filePath = join4(platformDir, file);
|
|
53754
53775
|
try {
|
|
53755
53776
|
const fileStat = statSync(filePath);
|
|
53756
53777
|
if (fileStat.mtimeMs < cutoffMs) {
|
|
@@ -53779,7 +53800,7 @@ function cleanupOldLogs(retentionDays = 30) {
|
|
|
53779
53800
|
return deletedCount;
|
|
53780
53801
|
}
|
|
53781
53802
|
function getLogFilePath(platformId, sessionId) {
|
|
53782
|
-
return
|
|
53803
|
+
return join4(LOGS_BASE_DIR, platformId, `${sessionId}.jsonl`);
|
|
53783
53804
|
}
|
|
53784
53805
|
function readRecentLogEntries(platformId, sessionId, maxLines = 50) {
|
|
53785
53806
|
const logPath = getLogFilePath(platformId, sessionId);
|
|
@@ -53925,7 +53946,7 @@ class CleanupScheduler {
|
|
|
53925
53946
|
for (const entry of entries) {
|
|
53926
53947
|
if (!entry.isDirectory())
|
|
53927
53948
|
continue;
|
|
53928
|
-
const worktreePath =
|
|
53949
|
+
const worktreePath = join6(worktreesDir, entry.name);
|
|
53929
53950
|
if (activeWorktrees.has(worktreePath)) {
|
|
53930
53951
|
log8.debug(`Worktree in use by persisted session, skipping: ${entry.name}`);
|
|
53931
53952
|
continue;
|
|
@@ -54049,14 +54070,14 @@ function getSessionStatus(session) {
|
|
|
54049
54070
|
}
|
|
54050
54071
|
|
|
54051
54072
|
// src/claude/cli.ts
|
|
54073
|
+
init_spawn();
|
|
54052
54074
|
init_logger();
|
|
54053
|
-
import { spawn as spawn3 } from "child_process";
|
|
54054
54075
|
import { EventEmitter as EventEmitter2 } from "events";
|
|
54055
54076
|
import { resolve as resolve3, dirname as dirname6 } from "path";
|
|
54056
54077
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
54057
54078
|
import { existsSync as existsSync8, readFileSync as readFileSync6, watchFile, unwatchFile, unlinkSync as unlinkSync2, statSync as statSync2, readdirSync as readdirSync2 } from "fs";
|
|
54058
54079
|
import { tmpdir } from "os";
|
|
54059
|
-
import { join as
|
|
54080
|
+
import { join as join7 } from "path";
|
|
54060
54081
|
var log9 = createLogger("claude");
|
|
54061
54082
|
function cleanupBrowserBridgeSockets() {
|
|
54062
54083
|
try {
|
|
@@ -54064,7 +54085,7 @@ function cleanupBrowserBridgeSockets() {
|
|
|
54064
54085
|
const files = readdirSync2(tempDir);
|
|
54065
54086
|
for (const file of files) {
|
|
54066
54087
|
if (file.startsWith("claude-mcp-browser-bridge-")) {
|
|
54067
|
-
const filePath =
|
|
54088
|
+
const filePath = join7(tempDir, file);
|
|
54068
54089
|
try {
|
|
54069
54090
|
const stats = statSync2(filePath);
|
|
54070
54091
|
if (stats.isSocket()) {
|
|
@@ -54195,7 +54216,7 @@ class ClaudeCli extends EventEmitter2 {
|
|
|
54195
54216
|
args.push("--append-system-prompt", this.options.appendSystemPrompt);
|
|
54196
54217
|
}
|
|
54197
54218
|
if (this.options.sessionId) {
|
|
54198
|
-
this.statusFilePath =
|
|
54219
|
+
this.statusFilePath = join7(tmpdir(), `claude-threads-status-${this.options.sessionId}.json`);
|
|
54199
54220
|
const statusLineWriterPath = this.getStatusLineWriterPath();
|
|
54200
54221
|
const statusLineSettings = {
|
|
54201
54222
|
statusLine: {
|
|
@@ -54207,7 +54228,7 @@ class ClaudeCli extends EventEmitter2 {
|
|
|
54207
54228
|
args.push("--settings", JSON.stringify(statusLineSettings));
|
|
54208
54229
|
}
|
|
54209
54230
|
this.log.debug(`Starting: ${claudePath} ${args.slice(0, 5).join(" ")}...`);
|
|
54210
|
-
this.process =
|
|
54231
|
+
this.process = crossSpawn(claudePath, args, {
|
|
54211
54232
|
cwd: this.options.workingDir,
|
|
54212
54233
|
env: process.env,
|
|
54213
54234
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -54351,11 +54372,19 @@ class ClaudeCli extends EventEmitter2 {
|
|
|
54351
54372
|
getMcpServerPath() {
|
|
54352
54373
|
const __filename2 = fileURLToPath3(import.meta.url);
|
|
54353
54374
|
const __dirname4 = dirname6(__filename2);
|
|
54375
|
+
const bundledPath = resolve3(__dirname4, "mcp", "permission-server.js");
|
|
54376
|
+
if (existsSync8(bundledPath)) {
|
|
54377
|
+
return bundledPath;
|
|
54378
|
+
}
|
|
54354
54379
|
return resolve3(__dirname4, "..", "mcp", "permission-server.js");
|
|
54355
54380
|
}
|
|
54356
54381
|
getStatusLineWriterPath() {
|
|
54357
54382
|
const __filename2 = fileURLToPath3(import.meta.url);
|
|
54358
54383
|
const __dirname4 = dirname6(__filename2);
|
|
54384
|
+
const bundledPath = resolve3(__dirname4, "statusline", "writer.js");
|
|
54385
|
+
if (existsSync8(bundledPath)) {
|
|
54386
|
+
return bundledPath;
|
|
54387
|
+
}
|
|
54359
54388
|
return resolve3(__dirname4, "..", "statusline", "writer.js");
|
|
54360
54389
|
}
|
|
54361
54390
|
}
|
|
@@ -55175,7 +55204,7 @@ import { existsSync as existsSync11 } from "fs";
|
|
|
55175
55204
|
|
|
55176
55205
|
// src/utils/keep-alive.ts
|
|
55177
55206
|
init_logger();
|
|
55178
|
-
import { spawn as
|
|
55207
|
+
import { spawn as spawn2 } from "child_process";
|
|
55179
55208
|
var log10 = createLogger("keepalive");
|
|
55180
55209
|
|
|
55181
55210
|
class KeepAliveManager {
|
|
@@ -55254,7 +55283,7 @@ class KeepAliveManager {
|
|
|
55254
55283
|
}
|
|
55255
55284
|
startMacOSKeepAlive() {
|
|
55256
55285
|
try {
|
|
55257
|
-
this.keepAliveProcess =
|
|
55286
|
+
this.keepAliveProcess = spawn2("caffeinate", ["-s", "-i"], {
|
|
55258
55287
|
stdio: "ignore",
|
|
55259
55288
|
detached: false
|
|
55260
55289
|
});
|
|
@@ -55275,7 +55304,7 @@ class KeepAliveManager {
|
|
|
55275
55304
|
}
|
|
55276
55305
|
startLinuxKeepAlive() {
|
|
55277
55306
|
try {
|
|
55278
|
-
this.keepAliveProcess =
|
|
55307
|
+
this.keepAliveProcess = spawn2("systemd-inhibit", [
|
|
55279
55308
|
"--what=sleep:idle:handle-lid-switch",
|
|
55280
55309
|
"--why=Claude Code session active",
|
|
55281
55310
|
"--mode=block",
|
|
@@ -55304,7 +55333,7 @@ class KeepAliveManager {
|
|
|
55304
55333
|
}
|
|
55305
55334
|
startLinuxKeepAliveFallback() {
|
|
55306
55335
|
try {
|
|
55307
|
-
this.keepAliveProcess =
|
|
55336
|
+
this.keepAliveProcess = spawn2("bash", [
|
|
55308
55337
|
"-c",
|
|
55309
55338
|
`while true; do xdg-screensaver reset 2>/dev/null || true; sleep 60; done`
|
|
55310
55339
|
], {
|
|
@@ -55339,7 +55368,7 @@ class KeepAliveManager {
|
|
|
55339
55368
|
# Keep running until killed
|
|
55340
55369
|
while ($true) { Start-Sleep -Seconds 60 }
|
|
55341
55370
|
`;
|
|
55342
|
-
this.keepAliveProcess =
|
|
55371
|
+
this.keepAliveProcess = spawn2("powershell", ["-NoProfile", "-Command", script], {
|
|
55343
55372
|
stdio: "ignore",
|
|
55344
55373
|
detached: false,
|
|
55345
55374
|
windowsHide: true
|
|
@@ -55532,8 +55561,8 @@ function updateLastMessage(session, post2) {
|
|
|
55532
55561
|
}
|
|
55533
55562
|
|
|
55534
55563
|
// src/claude/quick-query.ts
|
|
55564
|
+
init_spawn();
|
|
55535
55565
|
init_logger();
|
|
55536
|
-
import { spawn as spawn5 } from "child_process";
|
|
55537
55566
|
var log13 = createLogger("query");
|
|
55538
55567
|
async function quickQuery(options2) {
|
|
55539
55568
|
const {
|
|
@@ -55555,7 +55584,7 @@ async function quickQuery(options2) {
|
|
|
55555
55584
|
let stdout = "";
|
|
55556
55585
|
let stderr = "";
|
|
55557
55586
|
let resolved = false;
|
|
55558
|
-
const proc =
|
|
55587
|
+
const proc = crossSpawn(claudePath, args, {
|
|
55559
55588
|
cwd: workingDir || process.cwd(),
|
|
55560
55589
|
env: process.env,
|
|
55561
55590
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -56964,9 +56993,9 @@ var chromeToolsFormatter = {
|
|
|
56964
56993
|
const coord = input.coordinate;
|
|
56965
56994
|
const url = input.url || "";
|
|
56966
56995
|
const text = input.text || "";
|
|
56967
|
-
let detail = "";
|
|
56968
56996
|
switch (tool) {
|
|
56969
56997
|
case "computer": {
|
|
56998
|
+
let detail;
|
|
56970
56999
|
switch (action) {
|
|
56971
57000
|
case "screenshot":
|
|
56972
57001
|
detail = "screenshot";
|
|
@@ -57215,7 +57244,7 @@ var playwrightToolsFormatter = {
|
|
|
57215
57244
|
switch (tool) {
|
|
57216
57245
|
case "browser_navigate": {
|
|
57217
57246
|
const url = input.url || "";
|
|
57218
|
-
let domain
|
|
57247
|
+
let domain;
|
|
57219
57248
|
try {
|
|
57220
57249
|
domain = new URL(url).hostname;
|
|
57221
57250
|
} catch {
|
|
@@ -57238,7 +57267,7 @@ var playwrightToolsFormatter = {
|
|
|
57238
57267
|
case "browser_wait_for": {
|
|
57239
57268
|
const time = input.time;
|
|
57240
57269
|
const selector = input.selector;
|
|
57241
|
-
let waitFor
|
|
57270
|
+
let waitFor;
|
|
57242
57271
|
if (time)
|
|
57243
57272
|
waitFor = `${time}ms`;
|
|
57244
57273
|
else if (selector)
|
|
@@ -61251,7 +61280,7 @@ async function cleanupOldStickyMessages(platform, botUserId, forceRun = false, e
|
|
|
61251
61280
|
import { execSync as execSync2 } from "child_process";
|
|
61252
61281
|
import { writeFileSync as writeFileSync3, unlinkSync as unlinkSync3 } from "fs";
|
|
61253
61282
|
import { tmpdir as tmpdir2 } from "os";
|
|
61254
|
-
import { join as
|
|
61283
|
+
import { join as join8 } from "path";
|
|
61255
61284
|
|
|
61256
61285
|
// node_modules/@redactpii/node/lib/index.mjs
|
|
61257
61286
|
class Redactor {
|
|
@@ -61831,7 +61860,7 @@ async function createGitHubIssue(title, body, workingDir) {
|
|
|
61831
61860
|
if (!ghStatus.installed || !ghStatus.authenticated) {
|
|
61832
61861
|
throw new Error(ghStatus.error);
|
|
61833
61862
|
}
|
|
61834
|
-
const bodyFile =
|
|
61863
|
+
const bodyFile = join8(tmpdir2(), `bug-body-${Date.now()}.md`);
|
|
61835
61864
|
try {
|
|
61836
61865
|
writeFileSync3(bodyFile, body, "utf-8");
|
|
61837
61866
|
const cmd = `gh issue create --repo "${GITHUB_REPO}" --title "${escapeShell(title)}" --body-file "${bodyFile}"`;
|
|
@@ -61897,7 +61926,7 @@ import { existsSync as existsSync10, statSync as statSync3 } from "fs";
|
|
|
61897
61926
|
|
|
61898
61927
|
// node_modules/update-notifier/update-notifier.js
|
|
61899
61928
|
import process10 from "node:process";
|
|
61900
|
-
import { spawn as
|
|
61929
|
+
import { spawn as spawn3 } from "node:child_process";
|
|
61901
61930
|
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
61902
61931
|
import path9 from "node:path";
|
|
61903
61932
|
import { format } from "node:util";
|
|
@@ -62618,7 +62647,7 @@ class Configstore {
|
|
|
62618
62647
|
}
|
|
62619
62648
|
}
|
|
62620
62649
|
|
|
62621
|
-
// node_modules/
|
|
62650
|
+
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
62622
62651
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
62623
62652
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
62624
62653
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -62795,7 +62824,7 @@ function assembleStyles() {
|
|
|
62795
62824
|
var ansiStyles = assembleStyles();
|
|
62796
62825
|
var ansi_styles_default = ansiStyles;
|
|
62797
62826
|
|
|
62798
|
-
// node_modules/
|
|
62827
|
+
// node_modules/chalk/source/vendor/supports-color/index.js
|
|
62799
62828
|
import process6 from "node:process";
|
|
62800
62829
|
import os3 from "node:os";
|
|
62801
62830
|
import tty from "node:tty";
|
|
@@ -62927,7 +62956,7 @@ var supportsColor = {
|
|
|
62927
62956
|
};
|
|
62928
62957
|
var supports_color_default = supportsColor;
|
|
62929
62958
|
|
|
62930
|
-
// node_modules/
|
|
62959
|
+
// node_modules/chalk/source/utilities.js
|
|
62931
62960
|
function stringReplaceAll(string, substring, replacer) {
|
|
62932
62961
|
let index = string.indexOf(substring);
|
|
62933
62962
|
if (index === -1) {
|
|
@@ -62960,7 +62989,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
62960
62989
|
return returnValue;
|
|
62961
62990
|
}
|
|
62962
62991
|
|
|
62963
|
-
// node_modules/
|
|
62992
|
+
// node_modules/chalk/source/index.js
|
|
62964
62993
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
62965
62994
|
var GENERATOR = Symbol("GENERATOR");
|
|
62966
62995
|
var STYLER = Symbol("STYLER");
|
|
@@ -64045,7 +64074,7 @@ import process8 from "node:process";
|
|
|
64045
64074
|
import path6 from "node:path";
|
|
64046
64075
|
import os4 from "node:os";
|
|
64047
64076
|
import fs4 from "node:fs";
|
|
64048
|
-
var
|
|
64077
|
+
var isWindows2 = process8.platform === "win32";
|
|
64049
64078
|
var readRc = (filePath) => {
|
|
64050
64079
|
try {
|
|
64051
64080
|
return import_ini.default.parse(fs4.readFileSync(filePath, "utf8")).prefix;
|
|
@@ -64053,7 +64082,7 @@ var readRc = (filePath) => {
|
|
|
64053
64082
|
};
|
|
64054
64083
|
var getEnvNpmPrefix = () => Object.keys(process8.env).reduce((prefix, name) => /^npm_config_prefix$/i.test(name) ? process8.env[name] : prefix, undefined);
|
|
64055
64084
|
var getGlobalNpmrc = () => {
|
|
64056
|
-
if (
|
|
64085
|
+
if (isWindows2 && process8.env.APPDATA) {
|
|
64057
64086
|
return path6.join(process8.env.APPDATA, "/npm/etc/npmrc");
|
|
64058
64087
|
}
|
|
64059
64088
|
if (process8.execPath.includes("/Cellar/node")) {
|
|
@@ -64066,7 +64095,7 @@ var getGlobalNpmrc = () => {
|
|
|
64066
64095
|
}
|
|
64067
64096
|
};
|
|
64068
64097
|
var getDefaultNpmPrefix = () => {
|
|
64069
|
-
if (
|
|
64098
|
+
if (isWindows2) {
|
|
64070
64099
|
const { APPDATA } = process8.env;
|
|
64071
64100
|
return APPDATA ? path6.join(APPDATA, "npm") : path6.dirname(process8.execPath);
|
|
64072
64101
|
}
|
|
@@ -64092,7 +64121,7 @@ var getNpmPrefix = () => {
|
|
|
64092
64121
|
};
|
|
64093
64122
|
var npmPrefix = path6.resolve(getNpmPrefix());
|
|
64094
64123
|
var getYarnWindowsDirectory = () => {
|
|
64095
|
-
if (
|
|
64124
|
+
if (isWindows2 && process8.env.LOCALAPPDATA) {
|
|
64096
64125
|
const dir = path6.join(process8.env.LOCALAPPDATA, "Yarn");
|
|
64097
64126
|
if (fs4.existsSync(dir)) {
|
|
64098
64127
|
return dir;
|
|
@@ -64121,8 +64150,8 @@ var getYarnPrefix = () => {
|
|
|
64121
64150
|
var globalDirectory = {};
|
|
64122
64151
|
globalDirectory.npm = {};
|
|
64123
64152
|
globalDirectory.npm.prefix = npmPrefix;
|
|
64124
|
-
globalDirectory.npm.packages = path6.join(npmPrefix,
|
|
64125
|
-
globalDirectory.npm.binaries =
|
|
64153
|
+
globalDirectory.npm.packages = path6.join(npmPrefix, isWindows2 ? "node_modules" : "lib/node_modules");
|
|
64154
|
+
globalDirectory.npm.binaries = isWindows2 ? npmPrefix : path6.join(npmPrefix, "bin");
|
|
64126
64155
|
var yarnPrefix = path6.resolve(getYarnPrefix());
|
|
64127
64156
|
globalDirectory.yarn = {};
|
|
64128
64157
|
globalDirectory.yarn.prefix = yarnPrefix;
|
|
@@ -65215,7 +65244,7 @@ class UpdateNotifier {
|
|
|
65215
65244
|
if (Date.now() - this.config.get("lastUpdateCheck") < this.#updateCheckInterval) {
|
|
65216
65245
|
return;
|
|
65217
65246
|
}
|
|
65218
|
-
|
|
65247
|
+
spawn3(process10.execPath, [path9.join(__dirname6, "check.js"), JSON.stringify(this.#options)], {
|
|
65219
65248
|
detached: true,
|
|
65220
65249
|
stdio: "ignore"
|
|
65221
65250
|
}).unref();
|
|
@@ -67877,14 +67906,14 @@ class SessionMonitor {
|
|
|
67877
67906
|
}
|
|
67878
67907
|
}
|
|
67879
67908
|
// src/operations/plugin/handler.ts
|
|
67880
|
-
|
|
67909
|
+
init_spawn();
|
|
67881
67910
|
init_logger();
|
|
67882
67911
|
var log27 = createLogger("plugin");
|
|
67883
67912
|
var sessionLog7 = createSessionLog(log27);
|
|
67884
67913
|
async function runPluginCommand(args, cwd, timeout2 = 60000) {
|
|
67885
67914
|
return new Promise((resolve6) => {
|
|
67886
67915
|
const claudePath = process.env.CLAUDE_PATH || "claude";
|
|
67887
|
-
const proc =
|
|
67916
|
+
const proc = crossSpawn(claudePath, ["plugin", ...args], {
|
|
67888
67917
|
cwd,
|
|
67889
67918
|
timeout: timeout2
|
|
67890
67919
|
});
|
|
@@ -69104,11 +69133,11 @@ var import_react62 = __toESM(require_react(), 1);
|
|
|
69104
69133
|
|
|
69105
69134
|
// node_modules/ink/build/render.js
|
|
69106
69135
|
import { Stream } from "node:stream";
|
|
69107
|
-
import
|
|
69136
|
+
import process20 from "node:process";
|
|
69108
69137
|
|
|
69109
69138
|
// node_modules/ink/build/ink.js
|
|
69110
69139
|
var import_react13 = __toESM(require_react(), 1);
|
|
69111
|
-
import
|
|
69140
|
+
import process19 from "node:process";
|
|
69112
69141
|
// node_modules/es-toolkit/dist/function/debounce.mjs
|
|
69113
69142
|
function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
69114
69143
|
let pendingThis = undefined;
|
|
@@ -69278,7 +69307,7 @@ var isSharedWorker = typeof SharedWorkerGlobalScope !== "undefined" && globalThi
|
|
|
69278
69307
|
var isServiceWorker = typeof ServiceWorkerGlobalScope !== "undefined" && globalThis instanceof ServiceWorkerGlobalScope;
|
|
69279
69308
|
var platform = globalThis.navigator?.userAgentData?.platform;
|
|
69280
69309
|
var isMacOs = platform === "macOS" || globalThis.navigator?.platform === "MacIntel" || globalThis.navigator?.userAgent?.includes(" Mac ") === true || globalThis.process?.platform === "darwin";
|
|
69281
|
-
var
|
|
69310
|
+
var isWindows3 = platform === "Windows" || globalThis.navigator?.platform === "Win32" || globalThis.process?.platform === "win32";
|
|
69282
69311
|
var isLinux = platform === "Linux" || globalThis.navigator?.platform?.startsWith("Linux") === true || globalThis.navigator?.userAgent?.includes(" Linux ") === true || globalThis.process?.platform === "linux";
|
|
69283
69312
|
var isIos = platform === "iOS" || globalThis.navigator?.platform === "MacIntel" && globalThis.navigator?.maxTouchPoints > 1 || /iPad|iPhone|iPod/.test(globalThis.navigator?.platform);
|
|
69284
69313
|
var isAndroid = platform === "Android" || globalThis.navigator?.platform === "Android" || globalThis.navigator?.userAgent?.includes(" Android ") === true || globalThis.process?.platform === "android";
|
|
@@ -69289,7 +69318,7 @@ var OSC = "\x1B]";
|
|
|
69289
69318
|
var BEL = "\x07";
|
|
69290
69319
|
var SEP = ";";
|
|
69291
69320
|
var isTerminalApp = !isBrowser && process11.env.TERM_PROGRAM === "Apple_Terminal";
|
|
69292
|
-
var
|
|
69321
|
+
var isWindows4 = !isBrowser && process11.platform === "win32";
|
|
69293
69322
|
var isTmux = !isBrowser && (process11.env.TERM?.startsWith("screen") || process11.env.TERM?.startsWith("tmux") || process11.env.TMUX !== undefined);
|
|
69294
69323
|
var cwdFunction = isBrowser ? () => {
|
|
69295
69324
|
throw new Error("`process.cwd()` only works in Node.js, not the browser.");
|
|
@@ -69359,7 +69388,7 @@ var scrollDown = ESC + "T";
|
|
|
69359
69388
|
var clearScreen = "\x1Bc";
|
|
69360
69389
|
var clearViewport = `${eraseScreen}${ESC}H`;
|
|
69361
69390
|
var isOldWindows = () => {
|
|
69362
|
-
if (isBrowser || !
|
|
69391
|
+
if (isBrowser || !isWindows4) {
|
|
69363
69392
|
return false;
|
|
69364
69393
|
}
|
|
69365
69394
|
const parts = os5.release().split(".");
|
|
@@ -72130,500 +72159,11 @@ var get_max_width_default = getMaxWidth;
|
|
|
72130
72159
|
// node_modules/ink/build/render-border.js
|
|
72131
72160
|
var import_cli_boxes3 = __toESM(require_cli_boxes(), 1);
|
|
72132
72161
|
|
|
72133
|
-
// node_modules/ink/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
72134
|
-
var ANSI_BACKGROUND_OFFSET3 = 10;
|
|
72135
|
-
var wrapAnsi163 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
72136
|
-
var wrapAnsi2563 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
72137
|
-
var wrapAnsi16m3 = (offset = 0) => (red2, green2, blue) => `\x1B[${38 + offset};2;${red2};${green2};${blue}m`;
|
|
72138
|
-
var styles5 = {
|
|
72139
|
-
modifier: {
|
|
72140
|
-
reset: [0, 0],
|
|
72141
|
-
bold: [1, 22],
|
|
72142
|
-
dim: [2, 22],
|
|
72143
|
-
italic: [3, 23],
|
|
72144
|
-
underline: [4, 24],
|
|
72145
|
-
overline: [53, 55],
|
|
72146
|
-
inverse: [7, 27],
|
|
72147
|
-
hidden: [8, 28],
|
|
72148
|
-
strikethrough: [9, 29]
|
|
72149
|
-
},
|
|
72150
|
-
color: {
|
|
72151
|
-
black: [30, 39],
|
|
72152
|
-
red: [31, 39],
|
|
72153
|
-
green: [32, 39],
|
|
72154
|
-
yellow: [33, 39],
|
|
72155
|
-
blue: [34, 39],
|
|
72156
|
-
magenta: [35, 39],
|
|
72157
|
-
cyan: [36, 39],
|
|
72158
|
-
white: [37, 39],
|
|
72159
|
-
blackBright: [90, 39],
|
|
72160
|
-
gray: [90, 39],
|
|
72161
|
-
grey: [90, 39],
|
|
72162
|
-
redBright: [91, 39],
|
|
72163
|
-
greenBright: [92, 39],
|
|
72164
|
-
yellowBright: [93, 39],
|
|
72165
|
-
blueBright: [94, 39],
|
|
72166
|
-
magentaBright: [95, 39],
|
|
72167
|
-
cyanBright: [96, 39],
|
|
72168
|
-
whiteBright: [97, 39]
|
|
72169
|
-
},
|
|
72170
|
-
bgColor: {
|
|
72171
|
-
bgBlack: [40, 49],
|
|
72172
|
-
bgRed: [41, 49],
|
|
72173
|
-
bgGreen: [42, 49],
|
|
72174
|
-
bgYellow: [43, 49],
|
|
72175
|
-
bgBlue: [44, 49],
|
|
72176
|
-
bgMagenta: [45, 49],
|
|
72177
|
-
bgCyan: [46, 49],
|
|
72178
|
-
bgWhite: [47, 49],
|
|
72179
|
-
bgBlackBright: [100, 49],
|
|
72180
|
-
bgGray: [100, 49],
|
|
72181
|
-
bgGrey: [100, 49],
|
|
72182
|
-
bgRedBright: [101, 49],
|
|
72183
|
-
bgGreenBright: [102, 49],
|
|
72184
|
-
bgYellowBright: [103, 49],
|
|
72185
|
-
bgBlueBright: [104, 49],
|
|
72186
|
-
bgMagentaBright: [105, 49],
|
|
72187
|
-
bgCyanBright: [106, 49],
|
|
72188
|
-
bgWhiteBright: [107, 49]
|
|
72189
|
-
}
|
|
72190
|
-
};
|
|
72191
|
-
var modifierNames3 = Object.keys(styles5.modifier);
|
|
72192
|
-
var foregroundColorNames3 = Object.keys(styles5.color);
|
|
72193
|
-
var backgroundColorNames3 = Object.keys(styles5.bgColor);
|
|
72194
|
-
var colorNames3 = [...foregroundColorNames3, ...backgroundColorNames3];
|
|
72195
|
-
function assembleStyles3() {
|
|
72196
|
-
const codes = new Map;
|
|
72197
|
-
for (const [groupName, group] of Object.entries(styles5)) {
|
|
72198
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
72199
|
-
styles5[styleName] = {
|
|
72200
|
-
open: `\x1B[${style[0]}m`,
|
|
72201
|
-
close: `\x1B[${style[1]}m`
|
|
72202
|
-
};
|
|
72203
|
-
group[styleName] = styles5[styleName];
|
|
72204
|
-
codes.set(style[0], style[1]);
|
|
72205
|
-
}
|
|
72206
|
-
Object.defineProperty(styles5, groupName, {
|
|
72207
|
-
value: group,
|
|
72208
|
-
enumerable: false
|
|
72209
|
-
});
|
|
72210
|
-
}
|
|
72211
|
-
Object.defineProperty(styles5, "codes", {
|
|
72212
|
-
value: codes,
|
|
72213
|
-
enumerable: false
|
|
72214
|
-
});
|
|
72215
|
-
styles5.color.close = "\x1B[39m";
|
|
72216
|
-
styles5.bgColor.close = "\x1B[49m";
|
|
72217
|
-
styles5.color.ansi = wrapAnsi163();
|
|
72218
|
-
styles5.color.ansi256 = wrapAnsi2563();
|
|
72219
|
-
styles5.color.ansi16m = wrapAnsi16m3();
|
|
72220
|
-
styles5.bgColor.ansi = wrapAnsi163(ANSI_BACKGROUND_OFFSET3);
|
|
72221
|
-
styles5.bgColor.ansi256 = wrapAnsi2563(ANSI_BACKGROUND_OFFSET3);
|
|
72222
|
-
styles5.bgColor.ansi16m = wrapAnsi16m3(ANSI_BACKGROUND_OFFSET3);
|
|
72223
|
-
Object.defineProperties(styles5, {
|
|
72224
|
-
rgbToAnsi256: {
|
|
72225
|
-
value(red2, green2, blue) {
|
|
72226
|
-
if (red2 === green2 && green2 === blue) {
|
|
72227
|
-
if (red2 < 8) {
|
|
72228
|
-
return 16;
|
|
72229
|
-
}
|
|
72230
|
-
if (red2 > 248) {
|
|
72231
|
-
return 231;
|
|
72232
|
-
}
|
|
72233
|
-
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
72234
|
-
}
|
|
72235
|
-
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue / 255 * 5);
|
|
72236
|
-
},
|
|
72237
|
-
enumerable: false
|
|
72238
|
-
},
|
|
72239
|
-
hexToRgb: {
|
|
72240
|
-
value(hex) {
|
|
72241
|
-
const matches2 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
72242
|
-
if (!matches2) {
|
|
72243
|
-
return [0, 0, 0];
|
|
72244
|
-
}
|
|
72245
|
-
let [colorString] = matches2;
|
|
72246
|
-
if (colorString.length === 3) {
|
|
72247
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
72248
|
-
}
|
|
72249
|
-
const integer = Number.parseInt(colorString, 16);
|
|
72250
|
-
return [
|
|
72251
|
-
integer >> 16 & 255,
|
|
72252
|
-
integer >> 8 & 255,
|
|
72253
|
-
integer & 255
|
|
72254
|
-
];
|
|
72255
|
-
},
|
|
72256
|
-
enumerable: false
|
|
72257
|
-
},
|
|
72258
|
-
hexToAnsi256: {
|
|
72259
|
-
value: (hex) => styles5.rgbToAnsi256(...styles5.hexToRgb(hex)),
|
|
72260
|
-
enumerable: false
|
|
72261
|
-
},
|
|
72262
|
-
ansi256ToAnsi: {
|
|
72263
|
-
value(code) {
|
|
72264
|
-
if (code < 8) {
|
|
72265
|
-
return 30 + code;
|
|
72266
|
-
}
|
|
72267
|
-
if (code < 16) {
|
|
72268
|
-
return 90 + (code - 8);
|
|
72269
|
-
}
|
|
72270
|
-
let red2;
|
|
72271
|
-
let green2;
|
|
72272
|
-
let blue;
|
|
72273
|
-
if (code >= 232) {
|
|
72274
|
-
red2 = ((code - 232) * 10 + 8) / 255;
|
|
72275
|
-
green2 = red2;
|
|
72276
|
-
blue = red2;
|
|
72277
|
-
} else {
|
|
72278
|
-
code -= 16;
|
|
72279
|
-
const remainder = code % 36;
|
|
72280
|
-
red2 = Math.floor(code / 36) / 5;
|
|
72281
|
-
green2 = Math.floor(remainder / 6) / 5;
|
|
72282
|
-
blue = remainder % 6 / 5;
|
|
72283
|
-
}
|
|
72284
|
-
const value = Math.max(red2, green2, blue) * 2;
|
|
72285
|
-
if (value === 0) {
|
|
72286
|
-
return 30;
|
|
72287
|
-
}
|
|
72288
|
-
let result2 = 30 + (Math.round(blue) << 2 | Math.round(green2) << 1 | Math.round(red2));
|
|
72289
|
-
if (value === 2) {
|
|
72290
|
-
result2 += 60;
|
|
72291
|
-
}
|
|
72292
|
-
return result2;
|
|
72293
|
-
},
|
|
72294
|
-
enumerable: false
|
|
72295
|
-
},
|
|
72296
|
-
rgbToAnsi: {
|
|
72297
|
-
value: (red2, green2, blue) => styles5.ansi256ToAnsi(styles5.rgbToAnsi256(red2, green2, blue)),
|
|
72298
|
-
enumerable: false
|
|
72299
|
-
},
|
|
72300
|
-
hexToAnsi: {
|
|
72301
|
-
value: (hex) => styles5.ansi256ToAnsi(styles5.hexToAnsi256(hex)),
|
|
72302
|
-
enumerable: false
|
|
72303
|
-
}
|
|
72304
|
-
});
|
|
72305
|
-
return styles5;
|
|
72306
|
-
}
|
|
72307
|
-
var ansiStyles3 = assembleStyles3();
|
|
72308
|
-
var ansi_styles_default3 = ansiStyles3;
|
|
72309
|
-
|
|
72310
|
-
// node_modules/ink/node_modules/chalk/source/vendor/supports-color/index.js
|
|
72311
|
-
import process13 from "node:process";
|
|
72312
|
-
import os6 from "node:os";
|
|
72313
|
-
import tty2 from "node:tty";
|
|
72314
|
-
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process13.argv) {
|
|
72315
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
72316
|
-
const position = argv.indexOf(prefix + flag);
|
|
72317
|
-
const terminatorPosition = argv.indexOf("--");
|
|
72318
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
72319
|
-
}
|
|
72320
|
-
var { env: env5 } = process13;
|
|
72321
|
-
var flagForceColor2;
|
|
72322
|
-
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
|
|
72323
|
-
flagForceColor2 = 0;
|
|
72324
|
-
} else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
|
|
72325
|
-
flagForceColor2 = 1;
|
|
72326
|
-
}
|
|
72327
|
-
function envForceColor2() {
|
|
72328
|
-
if ("FORCE_COLOR" in env5) {
|
|
72329
|
-
if (env5.FORCE_COLOR === "true") {
|
|
72330
|
-
return 1;
|
|
72331
|
-
}
|
|
72332
|
-
if (env5.FORCE_COLOR === "false") {
|
|
72333
|
-
return 0;
|
|
72334
|
-
}
|
|
72335
|
-
return env5.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env5.FORCE_COLOR, 10), 3);
|
|
72336
|
-
}
|
|
72337
|
-
}
|
|
72338
|
-
function translateLevel2(level) {
|
|
72339
|
-
if (level === 0) {
|
|
72340
|
-
return false;
|
|
72341
|
-
}
|
|
72342
|
-
return {
|
|
72343
|
-
level,
|
|
72344
|
-
hasBasic: true,
|
|
72345
|
-
has256: level >= 2,
|
|
72346
|
-
has16m: level >= 3
|
|
72347
|
-
};
|
|
72348
|
-
}
|
|
72349
|
-
function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
72350
|
-
const noFlagForceColor = envForceColor2();
|
|
72351
|
-
if (noFlagForceColor !== undefined) {
|
|
72352
|
-
flagForceColor2 = noFlagForceColor;
|
|
72353
|
-
}
|
|
72354
|
-
const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
|
|
72355
|
-
if (forceColor === 0) {
|
|
72356
|
-
return 0;
|
|
72357
|
-
}
|
|
72358
|
-
if (sniffFlags) {
|
|
72359
|
-
if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
|
|
72360
|
-
return 3;
|
|
72361
|
-
}
|
|
72362
|
-
if (hasFlag2("color=256")) {
|
|
72363
|
-
return 2;
|
|
72364
|
-
}
|
|
72365
|
-
}
|
|
72366
|
-
if ("TF_BUILD" in env5 && "AGENT_NAME" in env5) {
|
|
72367
|
-
return 1;
|
|
72368
|
-
}
|
|
72369
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
72370
|
-
return 0;
|
|
72371
|
-
}
|
|
72372
|
-
const min2 = forceColor || 0;
|
|
72373
|
-
if (env5.TERM === "dumb") {
|
|
72374
|
-
return min2;
|
|
72375
|
-
}
|
|
72376
|
-
if (process13.platform === "win32") {
|
|
72377
|
-
const osRelease = os6.release().split(".");
|
|
72378
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
72379
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
72380
|
-
}
|
|
72381
|
-
return 1;
|
|
72382
|
-
}
|
|
72383
|
-
if ("CI" in env5) {
|
|
72384
|
-
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env5))) {
|
|
72385
|
-
return 3;
|
|
72386
|
-
}
|
|
72387
|
-
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env5)) || env5.CI_NAME === "codeship") {
|
|
72388
|
-
return 1;
|
|
72389
|
-
}
|
|
72390
|
-
return min2;
|
|
72391
|
-
}
|
|
72392
|
-
if ("TEAMCITY_VERSION" in env5) {
|
|
72393
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env5.TEAMCITY_VERSION) ? 1 : 0;
|
|
72394
|
-
}
|
|
72395
|
-
if (env5.COLORTERM === "truecolor") {
|
|
72396
|
-
return 3;
|
|
72397
|
-
}
|
|
72398
|
-
if (env5.TERM === "xterm-kitty") {
|
|
72399
|
-
return 3;
|
|
72400
|
-
}
|
|
72401
|
-
if (env5.TERM === "xterm-ghostty") {
|
|
72402
|
-
return 3;
|
|
72403
|
-
}
|
|
72404
|
-
if (env5.TERM === "wezterm") {
|
|
72405
|
-
return 3;
|
|
72406
|
-
}
|
|
72407
|
-
if ("TERM_PROGRAM" in env5) {
|
|
72408
|
-
const version = Number.parseInt((env5.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
72409
|
-
switch (env5.TERM_PROGRAM) {
|
|
72410
|
-
case "iTerm.app": {
|
|
72411
|
-
return version >= 3 ? 3 : 2;
|
|
72412
|
-
}
|
|
72413
|
-
case "Apple_Terminal": {
|
|
72414
|
-
return 2;
|
|
72415
|
-
}
|
|
72416
|
-
}
|
|
72417
|
-
}
|
|
72418
|
-
if (/-256(color)?$/i.test(env5.TERM)) {
|
|
72419
|
-
return 2;
|
|
72420
|
-
}
|
|
72421
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env5.TERM)) {
|
|
72422
|
-
return 1;
|
|
72423
|
-
}
|
|
72424
|
-
if ("COLORTERM" in env5) {
|
|
72425
|
-
return 1;
|
|
72426
|
-
}
|
|
72427
|
-
return min2;
|
|
72428
|
-
}
|
|
72429
|
-
function createSupportsColor2(stream, options2 = {}) {
|
|
72430
|
-
const level = _supportsColor2(stream, {
|
|
72431
|
-
streamIsTTY: stream && stream.isTTY,
|
|
72432
|
-
...options2
|
|
72433
|
-
});
|
|
72434
|
-
return translateLevel2(level);
|
|
72435
|
-
}
|
|
72436
|
-
var supportsColor2 = {
|
|
72437
|
-
stdout: createSupportsColor2({ isTTY: tty2.isatty(1) }),
|
|
72438
|
-
stderr: createSupportsColor2({ isTTY: tty2.isatty(2) })
|
|
72439
|
-
};
|
|
72440
|
-
var supports_color_default2 = supportsColor2;
|
|
72441
|
-
|
|
72442
|
-
// node_modules/ink/node_modules/chalk/source/utilities.js
|
|
72443
|
-
function stringReplaceAll2(string, substring, replacer) {
|
|
72444
|
-
let index = string.indexOf(substring);
|
|
72445
|
-
if (index === -1) {
|
|
72446
|
-
return string;
|
|
72447
|
-
}
|
|
72448
|
-
const substringLength = substring.length;
|
|
72449
|
-
let endIndex = 0;
|
|
72450
|
-
let returnValue = "";
|
|
72451
|
-
do {
|
|
72452
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
72453
|
-
endIndex = index + substringLength;
|
|
72454
|
-
index = string.indexOf(substring, endIndex);
|
|
72455
|
-
} while (index !== -1);
|
|
72456
|
-
returnValue += string.slice(endIndex);
|
|
72457
|
-
return returnValue;
|
|
72458
|
-
}
|
|
72459
|
-
function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
|
|
72460
|
-
let endIndex = 0;
|
|
72461
|
-
let returnValue = "";
|
|
72462
|
-
do {
|
|
72463
|
-
const gotCR = string[index - 1] === "\r";
|
|
72464
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
72465
|
-
` : `
|
|
72466
|
-
`) + postfix;
|
|
72467
|
-
endIndex = index + 1;
|
|
72468
|
-
index = string.indexOf(`
|
|
72469
|
-
`, endIndex);
|
|
72470
|
-
} while (index !== -1);
|
|
72471
|
-
returnValue += string.slice(endIndex);
|
|
72472
|
-
return returnValue;
|
|
72473
|
-
}
|
|
72474
|
-
|
|
72475
|
-
// node_modules/ink/node_modules/chalk/source/index.js
|
|
72476
|
-
var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
|
|
72477
|
-
var GENERATOR2 = Symbol("GENERATOR");
|
|
72478
|
-
var STYLER2 = Symbol("STYLER");
|
|
72479
|
-
var IS_EMPTY2 = Symbol("IS_EMPTY");
|
|
72480
|
-
var levelMapping2 = [
|
|
72481
|
-
"ansi",
|
|
72482
|
-
"ansi",
|
|
72483
|
-
"ansi256",
|
|
72484
|
-
"ansi16m"
|
|
72485
|
-
];
|
|
72486
|
-
var styles6 = Object.create(null);
|
|
72487
|
-
var applyOptions2 = (object, options2 = {}) => {
|
|
72488
|
-
if (options2.level && !(Number.isInteger(options2.level) && options2.level >= 0 && options2.level <= 3)) {
|
|
72489
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
72490
|
-
}
|
|
72491
|
-
const colorLevel = stdoutColor2 ? stdoutColor2.level : 0;
|
|
72492
|
-
object.level = options2.level === undefined ? colorLevel : options2.level;
|
|
72493
|
-
};
|
|
72494
|
-
var chalkFactory2 = (options2) => {
|
|
72495
|
-
const chalk2 = (...strings) => strings.join(" ");
|
|
72496
|
-
applyOptions2(chalk2, options2);
|
|
72497
|
-
Object.setPrototypeOf(chalk2, createChalk2.prototype);
|
|
72498
|
-
return chalk2;
|
|
72499
|
-
};
|
|
72500
|
-
function createChalk2(options2) {
|
|
72501
|
-
return chalkFactory2(options2);
|
|
72502
|
-
}
|
|
72503
|
-
Object.setPrototypeOf(createChalk2.prototype, Function.prototype);
|
|
72504
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default3)) {
|
|
72505
|
-
styles6[styleName] = {
|
|
72506
|
-
get() {
|
|
72507
|
-
const builder = createBuilder2(this, createStyler2(style.open, style.close, this[STYLER2]), this[IS_EMPTY2]);
|
|
72508
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
72509
|
-
return builder;
|
|
72510
|
-
}
|
|
72511
|
-
};
|
|
72512
|
-
}
|
|
72513
|
-
styles6.visible = {
|
|
72514
|
-
get() {
|
|
72515
|
-
const builder = createBuilder2(this, this[STYLER2], true);
|
|
72516
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
72517
|
-
return builder;
|
|
72518
|
-
}
|
|
72519
|
-
};
|
|
72520
|
-
var getModelAnsi2 = (model, level, type2, ...arguments_) => {
|
|
72521
|
-
if (model === "rgb") {
|
|
72522
|
-
if (level === "ansi16m") {
|
|
72523
|
-
return ansi_styles_default3[type2].ansi16m(...arguments_);
|
|
72524
|
-
}
|
|
72525
|
-
if (level === "ansi256") {
|
|
72526
|
-
return ansi_styles_default3[type2].ansi256(ansi_styles_default3.rgbToAnsi256(...arguments_));
|
|
72527
|
-
}
|
|
72528
|
-
return ansi_styles_default3[type2].ansi(ansi_styles_default3.rgbToAnsi(...arguments_));
|
|
72529
|
-
}
|
|
72530
|
-
if (model === "hex") {
|
|
72531
|
-
return getModelAnsi2("rgb", level, type2, ...ansi_styles_default3.hexToRgb(...arguments_));
|
|
72532
|
-
}
|
|
72533
|
-
return ansi_styles_default3[type2][model](...arguments_);
|
|
72534
|
-
};
|
|
72535
|
-
var usedModels2 = ["rgb", "hex", "ansi256"];
|
|
72536
|
-
for (const model of usedModels2) {
|
|
72537
|
-
styles6[model] = {
|
|
72538
|
-
get() {
|
|
72539
|
-
const { level } = this;
|
|
72540
|
-
return function(...arguments_) {
|
|
72541
|
-
const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "color", ...arguments_), ansi_styles_default3.color.close, this[STYLER2]);
|
|
72542
|
-
return createBuilder2(this, styler, this[IS_EMPTY2]);
|
|
72543
|
-
};
|
|
72544
|
-
}
|
|
72545
|
-
};
|
|
72546
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
72547
|
-
styles6[bgModel] = {
|
|
72548
|
-
get() {
|
|
72549
|
-
const { level } = this;
|
|
72550
|
-
return function(...arguments_) {
|
|
72551
|
-
const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "bgColor", ...arguments_), ansi_styles_default3.bgColor.close, this[STYLER2]);
|
|
72552
|
-
return createBuilder2(this, styler, this[IS_EMPTY2]);
|
|
72553
|
-
};
|
|
72554
|
-
}
|
|
72555
|
-
};
|
|
72556
|
-
}
|
|
72557
|
-
var proto2 = Object.defineProperties(() => {}, {
|
|
72558
|
-
...styles6,
|
|
72559
|
-
level: {
|
|
72560
|
-
enumerable: true,
|
|
72561
|
-
get() {
|
|
72562
|
-
return this[GENERATOR2].level;
|
|
72563
|
-
},
|
|
72564
|
-
set(level) {
|
|
72565
|
-
this[GENERATOR2].level = level;
|
|
72566
|
-
}
|
|
72567
|
-
}
|
|
72568
|
-
});
|
|
72569
|
-
var createStyler2 = (open, close, parent) => {
|
|
72570
|
-
let openAll;
|
|
72571
|
-
let closeAll;
|
|
72572
|
-
if (parent === undefined) {
|
|
72573
|
-
openAll = open;
|
|
72574
|
-
closeAll = close;
|
|
72575
|
-
} else {
|
|
72576
|
-
openAll = parent.openAll + open;
|
|
72577
|
-
closeAll = close + parent.closeAll;
|
|
72578
|
-
}
|
|
72579
|
-
return {
|
|
72580
|
-
open,
|
|
72581
|
-
close,
|
|
72582
|
-
openAll,
|
|
72583
|
-
closeAll,
|
|
72584
|
-
parent
|
|
72585
|
-
};
|
|
72586
|
-
};
|
|
72587
|
-
var createBuilder2 = (self2, _styler, _isEmpty) => {
|
|
72588
|
-
const builder = (...arguments_) => applyStyle2(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
72589
|
-
Object.setPrototypeOf(builder, proto2);
|
|
72590
|
-
builder[GENERATOR2] = self2;
|
|
72591
|
-
builder[STYLER2] = _styler;
|
|
72592
|
-
builder[IS_EMPTY2] = _isEmpty;
|
|
72593
|
-
return builder;
|
|
72594
|
-
};
|
|
72595
|
-
var applyStyle2 = (self2, string) => {
|
|
72596
|
-
if (self2.level <= 0 || !string) {
|
|
72597
|
-
return self2[IS_EMPTY2] ? "" : string;
|
|
72598
|
-
}
|
|
72599
|
-
let styler = self2[STYLER2];
|
|
72600
|
-
if (styler === undefined) {
|
|
72601
|
-
return string;
|
|
72602
|
-
}
|
|
72603
|
-
const { openAll, closeAll } = styler;
|
|
72604
|
-
if (string.includes("\x1B")) {
|
|
72605
|
-
while (styler !== undefined) {
|
|
72606
|
-
string = stringReplaceAll2(string, styler.close, styler.open);
|
|
72607
|
-
styler = styler.parent;
|
|
72608
|
-
}
|
|
72609
|
-
}
|
|
72610
|
-
const lfIndex = string.indexOf(`
|
|
72611
|
-
`);
|
|
72612
|
-
if (lfIndex !== -1) {
|
|
72613
|
-
string = stringEncaseCRLFWithFirstIndex2(string, closeAll, openAll, lfIndex);
|
|
72614
|
-
}
|
|
72615
|
-
return openAll + string + closeAll;
|
|
72616
|
-
};
|
|
72617
|
-
Object.defineProperties(createChalk2.prototype, styles6);
|
|
72618
|
-
var chalk2 = createChalk2();
|
|
72619
|
-
var chalkStderr2 = createChalk2({ level: stderrColor2 ? stderrColor2.level : 0 });
|
|
72620
|
-
var source_default2 = chalk2;
|
|
72621
|
-
|
|
72622
72162
|
// node_modules/ink/build/colorize.js
|
|
72623
72163
|
var rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/;
|
|
72624
72164
|
var ansiRegex2 = /^ansi256\(\s?(\d+)\s?\)$/;
|
|
72625
72165
|
var isNamedColor = (color) => {
|
|
72626
|
-
return color in
|
|
72166
|
+
return color in source_default;
|
|
72627
72167
|
};
|
|
72628
72168
|
var colorize = (str2, color, type2) => {
|
|
72629
72169
|
if (!color) {
|
|
@@ -72631,13 +72171,13 @@ var colorize = (str2, color, type2) => {
|
|
|
72631
72171
|
}
|
|
72632
72172
|
if (isNamedColor(color)) {
|
|
72633
72173
|
if (type2 === "foreground") {
|
|
72634
|
-
return
|
|
72174
|
+
return source_default[color](str2);
|
|
72635
72175
|
}
|
|
72636
72176
|
const methodName = `bg${color[0].toUpperCase() + color.slice(1)}`;
|
|
72637
|
-
return
|
|
72177
|
+
return source_default[methodName](str2);
|
|
72638
72178
|
}
|
|
72639
72179
|
if (color.startsWith("#")) {
|
|
72640
|
-
return type2 === "foreground" ?
|
|
72180
|
+
return type2 === "foreground" ? source_default.hex(color)(str2) : source_default.bgHex(color)(str2);
|
|
72641
72181
|
}
|
|
72642
72182
|
if (color.startsWith("ansi256")) {
|
|
72643
72183
|
const matches2 = ansiRegex2.exec(color);
|
|
@@ -72645,7 +72185,7 @@ var colorize = (str2, color, type2) => {
|
|
|
72645
72185
|
return str2;
|
|
72646
72186
|
}
|
|
72647
72187
|
const value = Number(matches2[1]);
|
|
72648
|
-
return type2 === "foreground" ?
|
|
72188
|
+
return type2 === "foreground" ? source_default.ansi256(value)(str2) : source_default.bgAnsi256(value)(str2);
|
|
72649
72189
|
}
|
|
72650
72190
|
if (color.startsWith("rgb")) {
|
|
72651
72191
|
const matches2 = rgbRegex.exec(color);
|
|
@@ -72655,7 +72195,7 @@ var colorize = (str2, color, type2) => {
|
|
|
72655
72195
|
const firstValue = Number(matches2[1]);
|
|
72656
72196
|
const secondValue = Number(matches2[2]);
|
|
72657
72197
|
const thirdValue = Number(matches2[3]);
|
|
72658
|
-
return type2 === "foreground" ?
|
|
72198
|
+
return type2 === "foreground" ? source_default.rgb(firstValue, secondValue, thirdValue)(str2) : source_default.bgRgb(firstValue, secondValue, thirdValue)(str2);
|
|
72659
72199
|
}
|
|
72660
72200
|
return str2;
|
|
72661
72201
|
};
|
|
@@ -72682,7 +72222,7 @@ var renderBorder = (x, y, node, output) => {
|
|
|
72682
72222
|
const contentWidth = width - (showLeftBorder ? 1 : 0) - (showRightBorder ? 1 : 0);
|
|
72683
72223
|
let topBorder = showTopBorder ? colorize_default((showLeftBorder ? box.topLeft : "") + box.top.repeat(contentWidth) + (showRightBorder ? box.topRight : ""), topBorderColor, "foreground") : undefined;
|
|
72684
72224
|
if (showTopBorder && dimTopBorderColor) {
|
|
72685
|
-
topBorder =
|
|
72225
|
+
topBorder = source_default.dim(topBorder);
|
|
72686
72226
|
}
|
|
72687
72227
|
let verticalBorderHeight = height;
|
|
72688
72228
|
if (showTopBorder) {
|
|
@@ -72694,16 +72234,16 @@ var renderBorder = (x, y, node, output) => {
|
|
|
72694
72234
|
let leftBorder = (colorize_default(box.left, leftBorderColor, "foreground") + `
|
|
72695
72235
|
`).repeat(verticalBorderHeight);
|
|
72696
72236
|
if (dimLeftBorderColor) {
|
|
72697
|
-
leftBorder =
|
|
72237
|
+
leftBorder = source_default.dim(leftBorder);
|
|
72698
72238
|
}
|
|
72699
72239
|
let rightBorder = (colorize_default(box.right, rightBorderColor, "foreground") + `
|
|
72700
72240
|
`).repeat(verticalBorderHeight);
|
|
72701
72241
|
if (dimRightBorderColor) {
|
|
72702
|
-
rightBorder =
|
|
72242
|
+
rightBorder = source_default.dim(rightBorder);
|
|
72703
72243
|
}
|
|
72704
72244
|
let bottomBorder = showBottomBorder ? colorize_default((showLeftBorder ? box.bottomLeft : "") + box.bottom.repeat(contentWidth) + (showRightBorder ? box.bottomRight : ""), bottomBorderColor, "foreground") : undefined;
|
|
72705
72245
|
if (showBottomBorder && dimBottomBorderColor) {
|
|
72706
|
-
bottomBorder =
|
|
72246
|
+
bottomBorder = source_default.dim(bottomBorder);
|
|
72707
72247
|
}
|
|
72708
72248
|
const offsetY = showTopBorder ? 1 : 0;
|
|
72709
72249
|
if (topBorder) {
|
|
@@ -73286,15 +72826,15 @@ var renderer = (node, isScreenReaderEnabled) => {
|
|
|
73286
72826
|
var renderer_default = renderer;
|
|
73287
72827
|
|
|
73288
72828
|
// node_modules/cli-cursor/index.js
|
|
73289
|
-
import
|
|
72829
|
+
import process14 from "node:process";
|
|
73290
72830
|
|
|
73291
72831
|
// node_modules/restore-cursor/index.js
|
|
73292
72832
|
var import_onetime = __toESM(require_onetime(), 1);
|
|
73293
72833
|
var import_signal_exit = __toESM(require_signal_exit(), 1);
|
|
73294
|
-
import
|
|
72834
|
+
import process13 from "node:process";
|
|
73295
72835
|
var restoreCursor = import_onetime.default(() => {
|
|
73296
72836
|
import_signal_exit.default(() => {
|
|
73297
|
-
|
|
72837
|
+
process13.stderr.write("\x1B[?25h");
|
|
73298
72838
|
}, { alwaysLast: true });
|
|
73299
72839
|
});
|
|
73300
72840
|
var restore_cursor_default = restoreCursor;
|
|
@@ -73302,14 +72842,14 @@ var restore_cursor_default = restoreCursor;
|
|
|
73302
72842
|
// node_modules/cli-cursor/index.js
|
|
73303
72843
|
var isHidden = false;
|
|
73304
72844
|
var cliCursor = {};
|
|
73305
|
-
cliCursor.show = (writableStream =
|
|
72845
|
+
cliCursor.show = (writableStream = process14.stderr) => {
|
|
73306
72846
|
if (!writableStream.isTTY) {
|
|
73307
72847
|
return;
|
|
73308
72848
|
}
|
|
73309
72849
|
isHidden = false;
|
|
73310
72850
|
writableStream.write("\x1B[?25h");
|
|
73311
72851
|
};
|
|
73312
|
-
cliCursor.hide = (writableStream =
|
|
72852
|
+
cliCursor.hide = (writableStream = process14.stderr) => {
|
|
73313
72853
|
if (!writableStream.isTTY) {
|
|
73314
72854
|
return;
|
|
73315
72855
|
}
|
|
@@ -73453,7 +72993,7 @@ var instances_default = instances;
|
|
|
73453
72993
|
// node_modules/ink/build/components/App.js
|
|
73454
72994
|
var import_react12 = __toESM(require_react(), 1);
|
|
73455
72995
|
import { EventEmitter as EventEmitter6 } from "node:events";
|
|
73456
|
-
import
|
|
72996
|
+
import process18 from "node:process";
|
|
73457
72997
|
|
|
73458
72998
|
// node_modules/ink/build/components/AppContext.js
|
|
73459
72999
|
var import_react2 = __toESM(require_react(), 1);
|
|
@@ -73466,9 +73006,9 @@ var AppContext_default = AppContext;
|
|
|
73466
73006
|
// node_modules/ink/build/components/StdinContext.js
|
|
73467
73007
|
var import_react3 = __toESM(require_react(), 1);
|
|
73468
73008
|
import { EventEmitter as EventEmitter5 } from "node:events";
|
|
73469
|
-
import
|
|
73009
|
+
import process15 from "node:process";
|
|
73470
73010
|
var StdinContext = import_react3.createContext({
|
|
73471
|
-
stdin:
|
|
73011
|
+
stdin: process15.stdin,
|
|
73472
73012
|
internal_eventEmitter: new EventEmitter5,
|
|
73473
73013
|
setRawMode() {},
|
|
73474
73014
|
isRawModeSupported: false,
|
|
@@ -73479,9 +73019,9 @@ var StdinContext_default = StdinContext;
|
|
|
73479
73019
|
|
|
73480
73020
|
// node_modules/ink/build/components/StdoutContext.js
|
|
73481
73021
|
var import_react4 = __toESM(require_react(), 1);
|
|
73482
|
-
import
|
|
73022
|
+
import process16 from "node:process";
|
|
73483
73023
|
var StdoutContext = import_react4.createContext({
|
|
73484
|
-
stdout:
|
|
73024
|
+
stdout: process16.stdout,
|
|
73485
73025
|
write() {}
|
|
73486
73026
|
});
|
|
73487
73027
|
StdoutContext.displayName = "InternalStdoutContext";
|
|
@@ -73489,9 +73029,9 @@ var StdoutContext_default = StdoutContext;
|
|
|
73489
73029
|
|
|
73490
73030
|
// node_modules/ink/build/components/StderrContext.js
|
|
73491
73031
|
var import_react5 = __toESM(require_react(), 1);
|
|
73492
|
-
import
|
|
73032
|
+
import process17 from "node:process";
|
|
73493
73033
|
var StderrContext = import_react5.createContext({
|
|
73494
|
-
stderr:
|
|
73034
|
+
stderr: process17.stderr,
|
|
73495
73035
|
write() {}
|
|
73496
73036
|
});
|
|
73497
73037
|
StderrContext.displayName = "InternalStderrContext";
|
|
@@ -73604,7 +73144,7 @@ function Text({ color, backgroundColor, dimColor = false, bold: bold2 = false, i
|
|
|
73604
73144
|
}
|
|
73605
73145
|
const transform2 = (children2) => {
|
|
73606
73146
|
if (dimColor) {
|
|
73607
|
-
children2 =
|
|
73147
|
+
children2 = source_default.dim(children2);
|
|
73608
73148
|
}
|
|
73609
73149
|
if (color) {
|
|
73610
73150
|
children2 = colorize_default(children2, color, "foreground");
|
|
@@ -73614,19 +73154,19 @@ function Text({ color, backgroundColor, dimColor = false, bold: bold2 = false, i
|
|
|
73614
73154
|
children2 = colorize_default(children2, effectiveBackgroundColor, "background");
|
|
73615
73155
|
}
|
|
73616
73156
|
if (bold2) {
|
|
73617
|
-
children2 =
|
|
73157
|
+
children2 = source_default.bold(children2);
|
|
73618
73158
|
}
|
|
73619
73159
|
if (italic) {
|
|
73620
|
-
children2 =
|
|
73160
|
+
children2 = source_default.italic(children2);
|
|
73621
73161
|
}
|
|
73622
73162
|
if (underline) {
|
|
73623
|
-
children2 =
|
|
73163
|
+
children2 = source_default.underline(children2);
|
|
73624
73164
|
}
|
|
73625
73165
|
if (strikethrough) {
|
|
73626
|
-
children2 =
|
|
73166
|
+
children2 = source_default.strikethrough(children2);
|
|
73627
73167
|
}
|
|
73628
73168
|
if (inverse) {
|
|
73629
|
-
children2 =
|
|
73169
|
+
children2 = source_default.inverse(children2);
|
|
73630
73170
|
}
|
|
73631
73171
|
return children2;
|
|
73632
73172
|
};
|
|
@@ -73744,7 +73284,7 @@ class App extends import_react12.PureComponent {
|
|
|
73744
73284
|
handleSetRawMode = (isEnabled) => {
|
|
73745
73285
|
const { stdin } = this.props;
|
|
73746
73286
|
if (!this.isRawModeSupported()) {
|
|
73747
|
-
if (stdin ===
|
|
73287
|
+
if (stdin === process18.stdin) {
|
|
73748
73288
|
throw new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
|
|
73749
73289
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);
|
|
73750
73290
|
} else {
|
|
@@ -73938,7 +73478,7 @@ class Ink {
|
|
|
73938
73478
|
this.options = options2;
|
|
73939
73479
|
this.rootNode = createNode("ink-root");
|
|
73940
73480
|
this.rootNode.onComputeLayout = this.calculateLayout;
|
|
73941
|
-
this.isScreenReaderEnabled = options2.isScreenReaderEnabled ??
|
|
73481
|
+
this.isScreenReaderEnabled = options2.isScreenReaderEnabled ?? process19.env["INK_SCREEN_READER"] === "true";
|
|
73942
73482
|
const unthrottled = options2.debug || this.isScreenReaderEnabled;
|
|
73943
73483
|
const maxFps = options2.maxFps ?? 30;
|
|
73944
73484
|
const renderThrottleMs = maxFps > 0 ? Math.max(1, Math.ceil(1000 / maxFps)) : 0;
|
|
@@ -73961,7 +73501,7 @@ class Ink {
|
|
|
73961
73501
|
this.fullStaticOutput = "";
|
|
73962
73502
|
this.container = reconciler_default.createContainer(this.rootNode, import_constants15.LegacyRoot, null, false, null, "id", () => {}, () => {}, () => {}, () => {}, null);
|
|
73963
73503
|
this.unsubscribeExit = import_signal_exit2.default(this.unmount, { alwaysLast: false });
|
|
73964
|
-
if (
|
|
73504
|
+
if (process19.env["DEV"] === "true") {
|
|
73965
73505
|
reconciler_default.injectIntoDevTools({
|
|
73966
73506
|
bundleType: 0,
|
|
73967
73507
|
version: "16.13.1",
|
|
@@ -74169,9 +73709,9 @@ class Ink {
|
|
|
74169
73709
|
// node_modules/ink/build/render.js
|
|
74170
73710
|
var render = (node, options2) => {
|
|
74171
73711
|
const inkOptions = {
|
|
74172
|
-
stdout:
|
|
74173
|
-
stdin:
|
|
74174
|
-
stderr:
|
|
73712
|
+
stdout: process20.stdout,
|
|
73713
|
+
stdin: process20.stdin,
|
|
73714
|
+
stderr: process20.stderr,
|
|
74175
73715
|
debug: false,
|
|
74176
73716
|
exitOnCtrlC: true,
|
|
74177
73717
|
patchConsole: true,
|
|
@@ -74196,7 +73736,7 @@ var getOptions = (stdout = {}) => {
|
|
|
74196
73736
|
if (stdout instanceof Stream) {
|
|
74197
73737
|
return {
|
|
74198
73738
|
stdout,
|
|
74199
|
-
stdin:
|
|
73739
|
+
stdin: process20.stdin
|
|
74200
73740
|
};
|
|
74201
73741
|
}
|
|
74202
73742
|
return stdout;
|
|
@@ -74612,14 +74152,14 @@ var import_react26 = __toESM(require_react(), 1);
|
|
|
74612
74152
|
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
74613
74153
|
|
|
74614
74154
|
// node_modules/is-unicode-supported/index.js
|
|
74615
|
-
import
|
|
74155
|
+
import process21 from "node:process";
|
|
74616
74156
|
function isUnicodeSupported() {
|
|
74617
|
-
const { env:
|
|
74618
|
-
const { TERM, TERM_PROGRAM } =
|
|
74619
|
-
if (
|
|
74157
|
+
const { env: env5 } = process21;
|
|
74158
|
+
const { TERM, TERM_PROGRAM } = env5;
|
|
74159
|
+
if (process21.platform !== "win32") {
|
|
74620
74160
|
return TERM !== "linux";
|
|
74621
74161
|
}
|
|
74622
|
-
return Boolean(
|
|
74162
|
+
return Boolean(env5.WT_SESSION) || Boolean(env5.TERMINUS_SUBLIME) || env5.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env5.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
74623
74163
|
}
|
|
74624
74164
|
|
|
74625
74165
|
// node_modules/figures/index.js
|
|
@@ -75217,8 +74757,8 @@ var UnorderedListItemContext = import_react29.createContext({
|
|
|
75217
74757
|
// node_modules/@inkjs/ui/build/components/unordered-list/unordered-list-item.js
|
|
75218
74758
|
function UnorderedListItem({ children }) {
|
|
75219
74759
|
const { marker } = import_react30.useContext(UnorderedListItemContext);
|
|
75220
|
-
const { styles:
|
|
75221
|
-
return import_react30.default.createElement(Box_default, { ...
|
|
74760
|
+
const { styles: styles5 } = useComponentTheme("UnorderedList");
|
|
74761
|
+
return import_react30.default.createElement(Box_default, { ...styles5.listItem() }, import_react30.default.createElement(Text, { ...styles5.marker() }, marker), import_react30.default.createElement(Box_default, { ...styles5.content() }, children));
|
|
75222
74762
|
}
|
|
75223
74763
|
|
|
75224
74764
|
// node_modules/@inkjs/ui/build/components/unordered-list/unordered-list-context.js
|
|
@@ -75230,7 +74770,7 @@ var UnorderedListContext = import_react31.createContext({
|
|
|
75230
74770
|
// node_modules/@inkjs/ui/build/components/unordered-list/unordered-list.js
|
|
75231
74771
|
function UnorderedList({ children }) {
|
|
75232
74772
|
const { depth } = import_react32.useContext(UnorderedListContext);
|
|
75233
|
-
const { styles:
|
|
74773
|
+
const { styles: styles5, config } = useComponentTheme("UnorderedList");
|
|
75234
74774
|
const listContext = import_react32.useMemo(() => ({
|
|
75235
74775
|
depth: depth + 1
|
|
75236
74776
|
}), [depth]);
|
|
@@ -75248,7 +74788,7 @@ function UnorderedList({ children }) {
|
|
|
75248
74788
|
marker: defaultMarker
|
|
75249
74789
|
};
|
|
75250
74790
|
}, [config, depth]);
|
|
75251
|
-
return import_react32.default.createElement(UnorderedListContext.Provider, { value: listContext }, import_react32.default.createElement(UnorderedListItemContext.Provider, { value: listItemContext }, import_react32.default.createElement(Box_default, { ...
|
|
74791
|
+
return import_react32.default.createElement(UnorderedListContext.Provider, { value: listContext }, import_react32.default.createElement(UnorderedListItemContext.Provider, { value: listItemContext }, import_react32.default.createElement(Box_default, { ...styles5.list() }, children)));
|
|
75252
74792
|
}
|
|
75253
74793
|
UnorderedList.Item = UnorderedListItem;
|
|
75254
74794
|
// node_modules/@inkjs/ui/build/components/multi-select/multi-select.js
|
|
@@ -76968,8 +76508,8 @@ function useSpinner({ type: type2 = "dots" }) {
|
|
|
76968
76508
|
// node_modules/@inkjs/ui/build/components/spinner/spinner.js
|
|
76969
76509
|
function Spinner({ label, type: type2 }) {
|
|
76970
76510
|
const { frame } = useSpinner({ type: type2 });
|
|
76971
|
-
const { styles:
|
|
76972
|
-
return import_react41.default.createElement(Box_default, { ...
|
|
76511
|
+
const { styles: styles5 } = useComponentTheme("Spinner");
|
|
76512
|
+
return import_react41.default.createElement(Box_default, { ...styles5.container() }, import_react41.default.createElement(Text, { ...styles5.frame() }, frame), label && import_react41.default.createElement(Text, { ...styles5.label() }, label));
|
|
76973
76513
|
}
|
|
76974
76514
|
// node_modules/@inkjs/ui/build/components/text-input/text-input.js
|
|
76975
76515
|
var import_react44 = __toESM(require_react(), 1);
|
|
@@ -76979,498 +76519,7 @@ var import_react42 = __toESM(require_react(), 1);
|
|
|
76979
76519
|
|
|
76980
76520
|
// node_modules/@inkjs/ui/build/components/text-input/use-text-input.js
|
|
76981
76521
|
var import_react43 = __toESM(require_react(), 1);
|
|
76982
|
-
|
|
76983
|
-
// node_modules/@inkjs/ui/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
76984
|
-
var ANSI_BACKGROUND_OFFSET4 = 10;
|
|
76985
|
-
var wrapAnsi164 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
76986
|
-
var wrapAnsi2564 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
76987
|
-
var wrapAnsi16m4 = (offset = 0) => (red2, green2, blue) => `\x1B[${38 + offset};2;${red2};${green2};${blue}m`;
|
|
76988
|
-
var styles7 = {
|
|
76989
|
-
modifier: {
|
|
76990
|
-
reset: [0, 0],
|
|
76991
|
-
bold: [1, 22],
|
|
76992
|
-
dim: [2, 22],
|
|
76993
|
-
italic: [3, 23],
|
|
76994
|
-
underline: [4, 24],
|
|
76995
|
-
overline: [53, 55],
|
|
76996
|
-
inverse: [7, 27],
|
|
76997
|
-
hidden: [8, 28],
|
|
76998
|
-
strikethrough: [9, 29]
|
|
76999
|
-
},
|
|
77000
|
-
color: {
|
|
77001
|
-
black: [30, 39],
|
|
77002
|
-
red: [31, 39],
|
|
77003
|
-
green: [32, 39],
|
|
77004
|
-
yellow: [33, 39],
|
|
77005
|
-
blue: [34, 39],
|
|
77006
|
-
magenta: [35, 39],
|
|
77007
|
-
cyan: [36, 39],
|
|
77008
|
-
white: [37, 39],
|
|
77009
|
-
blackBright: [90, 39],
|
|
77010
|
-
gray: [90, 39],
|
|
77011
|
-
grey: [90, 39],
|
|
77012
|
-
redBright: [91, 39],
|
|
77013
|
-
greenBright: [92, 39],
|
|
77014
|
-
yellowBright: [93, 39],
|
|
77015
|
-
blueBright: [94, 39],
|
|
77016
|
-
magentaBright: [95, 39],
|
|
77017
|
-
cyanBright: [96, 39],
|
|
77018
|
-
whiteBright: [97, 39]
|
|
77019
|
-
},
|
|
77020
|
-
bgColor: {
|
|
77021
|
-
bgBlack: [40, 49],
|
|
77022
|
-
bgRed: [41, 49],
|
|
77023
|
-
bgGreen: [42, 49],
|
|
77024
|
-
bgYellow: [43, 49],
|
|
77025
|
-
bgBlue: [44, 49],
|
|
77026
|
-
bgMagenta: [45, 49],
|
|
77027
|
-
bgCyan: [46, 49],
|
|
77028
|
-
bgWhite: [47, 49],
|
|
77029
|
-
bgBlackBright: [100, 49],
|
|
77030
|
-
bgGray: [100, 49],
|
|
77031
|
-
bgGrey: [100, 49],
|
|
77032
|
-
bgRedBright: [101, 49],
|
|
77033
|
-
bgGreenBright: [102, 49],
|
|
77034
|
-
bgYellowBright: [103, 49],
|
|
77035
|
-
bgBlueBright: [104, 49],
|
|
77036
|
-
bgMagentaBright: [105, 49],
|
|
77037
|
-
bgCyanBright: [106, 49],
|
|
77038
|
-
bgWhiteBright: [107, 49]
|
|
77039
|
-
}
|
|
77040
|
-
};
|
|
77041
|
-
var modifierNames4 = Object.keys(styles7.modifier);
|
|
77042
|
-
var foregroundColorNames4 = Object.keys(styles7.color);
|
|
77043
|
-
var backgroundColorNames4 = Object.keys(styles7.bgColor);
|
|
77044
|
-
var colorNames4 = [...foregroundColorNames4, ...backgroundColorNames4];
|
|
77045
|
-
function assembleStyles4() {
|
|
77046
|
-
const codes = new Map;
|
|
77047
|
-
for (const [groupName, group] of Object.entries(styles7)) {
|
|
77048
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
77049
|
-
styles7[styleName] = {
|
|
77050
|
-
open: `\x1B[${style[0]}m`,
|
|
77051
|
-
close: `\x1B[${style[1]}m`
|
|
77052
|
-
};
|
|
77053
|
-
group[styleName] = styles7[styleName];
|
|
77054
|
-
codes.set(style[0], style[1]);
|
|
77055
|
-
}
|
|
77056
|
-
Object.defineProperty(styles7, groupName, {
|
|
77057
|
-
value: group,
|
|
77058
|
-
enumerable: false
|
|
77059
|
-
});
|
|
77060
|
-
}
|
|
77061
|
-
Object.defineProperty(styles7, "codes", {
|
|
77062
|
-
value: codes,
|
|
77063
|
-
enumerable: false
|
|
77064
|
-
});
|
|
77065
|
-
styles7.color.close = "\x1B[39m";
|
|
77066
|
-
styles7.bgColor.close = "\x1B[49m";
|
|
77067
|
-
styles7.color.ansi = wrapAnsi164();
|
|
77068
|
-
styles7.color.ansi256 = wrapAnsi2564();
|
|
77069
|
-
styles7.color.ansi16m = wrapAnsi16m4();
|
|
77070
|
-
styles7.bgColor.ansi = wrapAnsi164(ANSI_BACKGROUND_OFFSET4);
|
|
77071
|
-
styles7.bgColor.ansi256 = wrapAnsi2564(ANSI_BACKGROUND_OFFSET4);
|
|
77072
|
-
styles7.bgColor.ansi16m = wrapAnsi16m4(ANSI_BACKGROUND_OFFSET4);
|
|
77073
|
-
Object.defineProperties(styles7, {
|
|
77074
|
-
rgbToAnsi256: {
|
|
77075
|
-
value(red2, green2, blue) {
|
|
77076
|
-
if (red2 === green2 && green2 === blue) {
|
|
77077
|
-
if (red2 < 8) {
|
|
77078
|
-
return 16;
|
|
77079
|
-
}
|
|
77080
|
-
if (red2 > 248) {
|
|
77081
|
-
return 231;
|
|
77082
|
-
}
|
|
77083
|
-
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
77084
|
-
}
|
|
77085
|
-
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue / 255 * 5);
|
|
77086
|
-
},
|
|
77087
|
-
enumerable: false
|
|
77088
|
-
},
|
|
77089
|
-
hexToRgb: {
|
|
77090
|
-
value(hex) {
|
|
77091
|
-
const matches2 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
77092
|
-
if (!matches2) {
|
|
77093
|
-
return [0, 0, 0];
|
|
77094
|
-
}
|
|
77095
|
-
let [colorString] = matches2;
|
|
77096
|
-
if (colorString.length === 3) {
|
|
77097
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
77098
|
-
}
|
|
77099
|
-
const integer = Number.parseInt(colorString, 16);
|
|
77100
|
-
return [
|
|
77101
|
-
integer >> 16 & 255,
|
|
77102
|
-
integer >> 8 & 255,
|
|
77103
|
-
integer & 255
|
|
77104
|
-
];
|
|
77105
|
-
},
|
|
77106
|
-
enumerable: false
|
|
77107
|
-
},
|
|
77108
|
-
hexToAnsi256: {
|
|
77109
|
-
value: (hex) => styles7.rgbToAnsi256(...styles7.hexToRgb(hex)),
|
|
77110
|
-
enumerable: false
|
|
77111
|
-
},
|
|
77112
|
-
ansi256ToAnsi: {
|
|
77113
|
-
value(code) {
|
|
77114
|
-
if (code < 8) {
|
|
77115
|
-
return 30 + code;
|
|
77116
|
-
}
|
|
77117
|
-
if (code < 16) {
|
|
77118
|
-
return 90 + (code - 8);
|
|
77119
|
-
}
|
|
77120
|
-
let red2;
|
|
77121
|
-
let green2;
|
|
77122
|
-
let blue;
|
|
77123
|
-
if (code >= 232) {
|
|
77124
|
-
red2 = ((code - 232) * 10 + 8) / 255;
|
|
77125
|
-
green2 = red2;
|
|
77126
|
-
blue = red2;
|
|
77127
|
-
} else {
|
|
77128
|
-
code -= 16;
|
|
77129
|
-
const remainder = code % 36;
|
|
77130
|
-
red2 = Math.floor(code / 36) / 5;
|
|
77131
|
-
green2 = Math.floor(remainder / 6) / 5;
|
|
77132
|
-
blue = remainder % 6 / 5;
|
|
77133
|
-
}
|
|
77134
|
-
const value = Math.max(red2, green2, blue) * 2;
|
|
77135
|
-
if (value === 0) {
|
|
77136
|
-
return 30;
|
|
77137
|
-
}
|
|
77138
|
-
let result2 = 30 + (Math.round(blue) << 2 | Math.round(green2) << 1 | Math.round(red2));
|
|
77139
|
-
if (value === 2) {
|
|
77140
|
-
result2 += 60;
|
|
77141
|
-
}
|
|
77142
|
-
return result2;
|
|
77143
|
-
},
|
|
77144
|
-
enumerable: false
|
|
77145
|
-
},
|
|
77146
|
-
rgbToAnsi: {
|
|
77147
|
-
value: (red2, green2, blue) => styles7.ansi256ToAnsi(styles7.rgbToAnsi256(red2, green2, blue)),
|
|
77148
|
-
enumerable: false
|
|
77149
|
-
},
|
|
77150
|
-
hexToAnsi: {
|
|
77151
|
-
value: (hex) => styles7.ansi256ToAnsi(styles7.hexToAnsi256(hex)),
|
|
77152
|
-
enumerable: false
|
|
77153
|
-
}
|
|
77154
|
-
});
|
|
77155
|
-
return styles7;
|
|
77156
|
-
}
|
|
77157
|
-
var ansiStyles4 = assembleStyles4();
|
|
77158
|
-
var ansi_styles_default4 = ansiStyles4;
|
|
77159
|
-
|
|
77160
|
-
// node_modules/@inkjs/ui/node_modules/chalk/source/vendor/supports-color/index.js
|
|
77161
|
-
import process23 from "node:process";
|
|
77162
|
-
import os7 from "node:os";
|
|
77163
|
-
import tty3 from "node:tty";
|
|
77164
|
-
function hasFlag3(flag, argv = globalThis.Deno ? globalThis.Deno.args : process23.argv) {
|
|
77165
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
77166
|
-
const position = argv.indexOf(prefix + flag);
|
|
77167
|
-
const terminatorPosition = argv.indexOf("--");
|
|
77168
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
77169
|
-
}
|
|
77170
|
-
var { env: env6 } = process23;
|
|
77171
|
-
var flagForceColor3;
|
|
77172
|
-
if (hasFlag3("no-color") || hasFlag3("no-colors") || hasFlag3("color=false") || hasFlag3("color=never")) {
|
|
77173
|
-
flagForceColor3 = 0;
|
|
77174
|
-
} else if (hasFlag3("color") || hasFlag3("colors") || hasFlag3("color=true") || hasFlag3("color=always")) {
|
|
77175
|
-
flagForceColor3 = 1;
|
|
77176
|
-
}
|
|
77177
|
-
function envForceColor3() {
|
|
77178
|
-
if ("FORCE_COLOR" in env6) {
|
|
77179
|
-
if (env6.FORCE_COLOR === "true") {
|
|
77180
|
-
return 1;
|
|
77181
|
-
}
|
|
77182
|
-
if (env6.FORCE_COLOR === "false") {
|
|
77183
|
-
return 0;
|
|
77184
|
-
}
|
|
77185
|
-
return env6.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env6.FORCE_COLOR, 10), 3);
|
|
77186
|
-
}
|
|
77187
|
-
}
|
|
77188
|
-
function translateLevel3(level) {
|
|
77189
|
-
if (level === 0) {
|
|
77190
|
-
return false;
|
|
77191
|
-
}
|
|
77192
|
-
return {
|
|
77193
|
-
level,
|
|
77194
|
-
hasBasic: true,
|
|
77195
|
-
has256: level >= 2,
|
|
77196
|
-
has16m: level >= 3
|
|
77197
|
-
};
|
|
77198
|
-
}
|
|
77199
|
-
function _supportsColor3(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
77200
|
-
const noFlagForceColor = envForceColor3();
|
|
77201
|
-
if (noFlagForceColor !== undefined) {
|
|
77202
|
-
flagForceColor3 = noFlagForceColor;
|
|
77203
|
-
}
|
|
77204
|
-
const forceColor = sniffFlags ? flagForceColor3 : noFlagForceColor;
|
|
77205
|
-
if (forceColor === 0) {
|
|
77206
|
-
return 0;
|
|
77207
|
-
}
|
|
77208
|
-
if (sniffFlags) {
|
|
77209
|
-
if (hasFlag3("color=16m") || hasFlag3("color=full") || hasFlag3("color=truecolor")) {
|
|
77210
|
-
return 3;
|
|
77211
|
-
}
|
|
77212
|
-
if (hasFlag3("color=256")) {
|
|
77213
|
-
return 2;
|
|
77214
|
-
}
|
|
77215
|
-
}
|
|
77216
|
-
if ("TF_BUILD" in env6 && "AGENT_NAME" in env6) {
|
|
77217
|
-
return 1;
|
|
77218
|
-
}
|
|
77219
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
77220
|
-
return 0;
|
|
77221
|
-
}
|
|
77222
|
-
const min2 = forceColor || 0;
|
|
77223
|
-
if (env6.TERM === "dumb") {
|
|
77224
|
-
return min2;
|
|
77225
|
-
}
|
|
77226
|
-
if (process23.platform === "win32") {
|
|
77227
|
-
const osRelease = os7.release().split(".");
|
|
77228
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
77229
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
77230
|
-
}
|
|
77231
|
-
return 1;
|
|
77232
|
-
}
|
|
77233
|
-
if ("CI" in env6) {
|
|
77234
|
-
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env6))) {
|
|
77235
|
-
return 3;
|
|
77236
|
-
}
|
|
77237
|
-
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env6)) || env6.CI_NAME === "codeship") {
|
|
77238
|
-
return 1;
|
|
77239
|
-
}
|
|
77240
|
-
return min2;
|
|
77241
|
-
}
|
|
77242
|
-
if ("TEAMCITY_VERSION" in env6) {
|
|
77243
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env6.TEAMCITY_VERSION) ? 1 : 0;
|
|
77244
|
-
}
|
|
77245
|
-
if (env6.COLORTERM === "truecolor") {
|
|
77246
|
-
return 3;
|
|
77247
|
-
}
|
|
77248
|
-
if (env6.TERM === "xterm-kitty") {
|
|
77249
|
-
return 3;
|
|
77250
|
-
}
|
|
77251
|
-
if (env6.TERM === "xterm-ghostty") {
|
|
77252
|
-
return 3;
|
|
77253
|
-
}
|
|
77254
|
-
if (env6.TERM === "wezterm") {
|
|
77255
|
-
return 3;
|
|
77256
|
-
}
|
|
77257
|
-
if ("TERM_PROGRAM" in env6) {
|
|
77258
|
-
const version = Number.parseInt((env6.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
77259
|
-
switch (env6.TERM_PROGRAM) {
|
|
77260
|
-
case "iTerm.app": {
|
|
77261
|
-
return version >= 3 ? 3 : 2;
|
|
77262
|
-
}
|
|
77263
|
-
case "Apple_Terminal": {
|
|
77264
|
-
return 2;
|
|
77265
|
-
}
|
|
77266
|
-
}
|
|
77267
|
-
}
|
|
77268
|
-
if (/-256(color)?$/i.test(env6.TERM)) {
|
|
77269
|
-
return 2;
|
|
77270
|
-
}
|
|
77271
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env6.TERM)) {
|
|
77272
|
-
return 1;
|
|
77273
|
-
}
|
|
77274
|
-
if ("COLORTERM" in env6) {
|
|
77275
|
-
return 1;
|
|
77276
|
-
}
|
|
77277
|
-
return min2;
|
|
77278
|
-
}
|
|
77279
|
-
function createSupportsColor3(stream, options2 = {}) {
|
|
77280
|
-
const level = _supportsColor3(stream, {
|
|
77281
|
-
streamIsTTY: stream && stream.isTTY,
|
|
77282
|
-
...options2
|
|
77283
|
-
});
|
|
77284
|
-
return translateLevel3(level);
|
|
77285
|
-
}
|
|
77286
|
-
var supportsColor3 = {
|
|
77287
|
-
stdout: createSupportsColor3({ isTTY: tty3.isatty(1) }),
|
|
77288
|
-
stderr: createSupportsColor3({ isTTY: tty3.isatty(2) })
|
|
77289
|
-
};
|
|
77290
|
-
var supports_color_default3 = supportsColor3;
|
|
77291
|
-
|
|
77292
|
-
// node_modules/@inkjs/ui/node_modules/chalk/source/utilities.js
|
|
77293
|
-
function stringReplaceAll3(string, substring, replacer) {
|
|
77294
|
-
let index = string.indexOf(substring);
|
|
77295
|
-
if (index === -1) {
|
|
77296
|
-
return string;
|
|
77297
|
-
}
|
|
77298
|
-
const substringLength = substring.length;
|
|
77299
|
-
let endIndex = 0;
|
|
77300
|
-
let returnValue = "";
|
|
77301
|
-
do {
|
|
77302
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
77303
|
-
endIndex = index + substringLength;
|
|
77304
|
-
index = string.indexOf(substring, endIndex);
|
|
77305
|
-
} while (index !== -1);
|
|
77306
|
-
returnValue += string.slice(endIndex);
|
|
77307
|
-
return returnValue;
|
|
77308
|
-
}
|
|
77309
|
-
function stringEncaseCRLFWithFirstIndex3(string, prefix, postfix, index) {
|
|
77310
|
-
let endIndex = 0;
|
|
77311
|
-
let returnValue = "";
|
|
77312
|
-
do {
|
|
77313
|
-
const gotCR = string[index - 1] === "\r";
|
|
77314
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
77315
|
-
` : `
|
|
77316
|
-
`) + postfix;
|
|
77317
|
-
endIndex = index + 1;
|
|
77318
|
-
index = string.indexOf(`
|
|
77319
|
-
`, endIndex);
|
|
77320
|
-
} while (index !== -1);
|
|
77321
|
-
returnValue += string.slice(endIndex);
|
|
77322
|
-
return returnValue;
|
|
77323
|
-
}
|
|
77324
|
-
|
|
77325
|
-
// node_modules/@inkjs/ui/node_modules/chalk/source/index.js
|
|
77326
|
-
var { stdout: stdoutColor3, stderr: stderrColor3 } = supports_color_default3;
|
|
77327
|
-
var GENERATOR3 = Symbol("GENERATOR");
|
|
77328
|
-
var STYLER3 = Symbol("STYLER");
|
|
77329
|
-
var IS_EMPTY3 = Symbol("IS_EMPTY");
|
|
77330
|
-
var levelMapping3 = [
|
|
77331
|
-
"ansi",
|
|
77332
|
-
"ansi",
|
|
77333
|
-
"ansi256",
|
|
77334
|
-
"ansi16m"
|
|
77335
|
-
];
|
|
77336
|
-
var styles8 = Object.create(null);
|
|
77337
|
-
var applyOptions3 = (object, options2 = {}) => {
|
|
77338
|
-
if (options2.level && !(Number.isInteger(options2.level) && options2.level >= 0 && options2.level <= 3)) {
|
|
77339
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
77340
|
-
}
|
|
77341
|
-
const colorLevel = stdoutColor3 ? stdoutColor3.level : 0;
|
|
77342
|
-
object.level = options2.level === undefined ? colorLevel : options2.level;
|
|
77343
|
-
};
|
|
77344
|
-
var chalkFactory3 = (options2) => {
|
|
77345
|
-
const chalk3 = (...strings) => strings.join(" ");
|
|
77346
|
-
applyOptions3(chalk3, options2);
|
|
77347
|
-
Object.setPrototypeOf(chalk3, createChalk3.prototype);
|
|
77348
|
-
return chalk3;
|
|
77349
|
-
};
|
|
77350
|
-
function createChalk3(options2) {
|
|
77351
|
-
return chalkFactory3(options2);
|
|
77352
|
-
}
|
|
77353
|
-
Object.setPrototypeOf(createChalk3.prototype, Function.prototype);
|
|
77354
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default4)) {
|
|
77355
|
-
styles8[styleName] = {
|
|
77356
|
-
get() {
|
|
77357
|
-
const builder = createBuilder3(this, createStyler3(style.open, style.close, this[STYLER3]), this[IS_EMPTY3]);
|
|
77358
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
77359
|
-
return builder;
|
|
77360
|
-
}
|
|
77361
|
-
};
|
|
77362
|
-
}
|
|
77363
|
-
styles8.visible = {
|
|
77364
|
-
get() {
|
|
77365
|
-
const builder = createBuilder3(this, this[STYLER3], true);
|
|
77366
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
77367
|
-
return builder;
|
|
77368
|
-
}
|
|
77369
|
-
};
|
|
77370
|
-
var getModelAnsi3 = (model, level, type2, ...arguments_) => {
|
|
77371
|
-
if (model === "rgb") {
|
|
77372
|
-
if (level === "ansi16m") {
|
|
77373
|
-
return ansi_styles_default4[type2].ansi16m(...arguments_);
|
|
77374
|
-
}
|
|
77375
|
-
if (level === "ansi256") {
|
|
77376
|
-
return ansi_styles_default4[type2].ansi256(ansi_styles_default4.rgbToAnsi256(...arguments_));
|
|
77377
|
-
}
|
|
77378
|
-
return ansi_styles_default4[type2].ansi(ansi_styles_default4.rgbToAnsi(...arguments_));
|
|
77379
|
-
}
|
|
77380
|
-
if (model === "hex") {
|
|
77381
|
-
return getModelAnsi3("rgb", level, type2, ...ansi_styles_default4.hexToRgb(...arguments_));
|
|
77382
|
-
}
|
|
77383
|
-
return ansi_styles_default4[type2][model](...arguments_);
|
|
77384
|
-
};
|
|
77385
|
-
var usedModels3 = ["rgb", "hex", "ansi256"];
|
|
77386
|
-
for (const model of usedModels3) {
|
|
77387
|
-
styles8[model] = {
|
|
77388
|
-
get() {
|
|
77389
|
-
const { level } = this;
|
|
77390
|
-
return function(...arguments_) {
|
|
77391
|
-
const styler = createStyler3(getModelAnsi3(model, levelMapping3[level], "color", ...arguments_), ansi_styles_default4.color.close, this[STYLER3]);
|
|
77392
|
-
return createBuilder3(this, styler, this[IS_EMPTY3]);
|
|
77393
|
-
};
|
|
77394
|
-
}
|
|
77395
|
-
};
|
|
77396
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
77397
|
-
styles8[bgModel] = {
|
|
77398
|
-
get() {
|
|
77399
|
-
const { level } = this;
|
|
77400
|
-
return function(...arguments_) {
|
|
77401
|
-
const styler = createStyler3(getModelAnsi3(model, levelMapping3[level], "bgColor", ...arguments_), ansi_styles_default4.bgColor.close, this[STYLER3]);
|
|
77402
|
-
return createBuilder3(this, styler, this[IS_EMPTY3]);
|
|
77403
|
-
};
|
|
77404
|
-
}
|
|
77405
|
-
};
|
|
77406
|
-
}
|
|
77407
|
-
var proto3 = Object.defineProperties(() => {}, {
|
|
77408
|
-
...styles8,
|
|
77409
|
-
level: {
|
|
77410
|
-
enumerable: true,
|
|
77411
|
-
get() {
|
|
77412
|
-
return this[GENERATOR3].level;
|
|
77413
|
-
},
|
|
77414
|
-
set(level) {
|
|
77415
|
-
this[GENERATOR3].level = level;
|
|
77416
|
-
}
|
|
77417
|
-
}
|
|
77418
|
-
});
|
|
77419
|
-
var createStyler3 = (open, close, parent) => {
|
|
77420
|
-
let openAll;
|
|
77421
|
-
let closeAll;
|
|
77422
|
-
if (parent === undefined) {
|
|
77423
|
-
openAll = open;
|
|
77424
|
-
closeAll = close;
|
|
77425
|
-
} else {
|
|
77426
|
-
openAll = parent.openAll + open;
|
|
77427
|
-
closeAll = close + parent.closeAll;
|
|
77428
|
-
}
|
|
77429
|
-
return {
|
|
77430
|
-
open,
|
|
77431
|
-
close,
|
|
77432
|
-
openAll,
|
|
77433
|
-
closeAll,
|
|
77434
|
-
parent
|
|
77435
|
-
};
|
|
77436
|
-
};
|
|
77437
|
-
var createBuilder3 = (self2, _styler, _isEmpty) => {
|
|
77438
|
-
const builder = (...arguments_) => applyStyle3(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
77439
|
-
Object.setPrototypeOf(builder, proto3);
|
|
77440
|
-
builder[GENERATOR3] = self2;
|
|
77441
|
-
builder[STYLER3] = _styler;
|
|
77442
|
-
builder[IS_EMPTY3] = _isEmpty;
|
|
77443
|
-
return builder;
|
|
77444
|
-
};
|
|
77445
|
-
var applyStyle3 = (self2, string) => {
|
|
77446
|
-
if (self2.level <= 0 || !string) {
|
|
77447
|
-
return self2[IS_EMPTY3] ? "" : string;
|
|
77448
|
-
}
|
|
77449
|
-
let styler = self2[STYLER3];
|
|
77450
|
-
if (styler === undefined) {
|
|
77451
|
-
return string;
|
|
77452
|
-
}
|
|
77453
|
-
const { openAll, closeAll } = styler;
|
|
77454
|
-
if (string.includes("\x1B")) {
|
|
77455
|
-
while (styler !== undefined) {
|
|
77456
|
-
string = stringReplaceAll3(string, styler.close, styler.open);
|
|
77457
|
-
styler = styler.parent;
|
|
77458
|
-
}
|
|
77459
|
-
}
|
|
77460
|
-
const lfIndex = string.indexOf(`
|
|
77461
|
-
`);
|
|
77462
|
-
if (lfIndex !== -1) {
|
|
77463
|
-
string = stringEncaseCRLFWithFirstIndex3(string, closeAll, openAll, lfIndex);
|
|
77464
|
-
}
|
|
77465
|
-
return openAll + string + closeAll;
|
|
77466
|
-
};
|
|
77467
|
-
Object.defineProperties(createChalk3.prototype, styles8);
|
|
77468
|
-
var chalk3 = createChalk3();
|
|
77469
|
-
var chalkStderr3 = createChalk3({ level: stderrColor3 ? stderrColor3.level : 0 });
|
|
77470
|
-
var source_default3 = chalk3;
|
|
77471
|
-
|
|
77472
|
-
// node_modules/@inkjs/ui/build/components/text-input/use-text-input.js
|
|
77473
|
-
var cursor = source_default3.inverse(" ");
|
|
76522
|
+
var cursor = source_default.inverse(" ");
|
|
77474
76523
|
// node_modules/@inkjs/ui/build/components/ordered-list/ordered-list.js
|
|
77475
76524
|
var import_react48 = __toESM(require_react(), 1);
|
|
77476
76525
|
|
|
@@ -77486,8 +76535,8 @@ var OrderedListItemContext = import_react45.createContext({
|
|
|
77486
76535
|
// node_modules/@inkjs/ui/build/components/ordered-list/ordered-list-item.js
|
|
77487
76536
|
function OrderedListItem({ children }) {
|
|
77488
76537
|
const { marker } = import_react46.useContext(OrderedListItemContext);
|
|
77489
|
-
const { styles:
|
|
77490
|
-
return import_react46.default.createElement(Box_default, { ...
|
|
76538
|
+
const { styles: styles5 } = useComponentTheme("OrderedList");
|
|
76539
|
+
return import_react46.default.createElement(Box_default, { ...styles5.listItem() }, import_react46.default.createElement(Text, { ...styles5.marker() }, marker), import_react46.default.createElement(Box_default, { ...styles5.content() }, children));
|
|
77491
76540
|
}
|
|
77492
76541
|
|
|
77493
76542
|
// node_modules/@inkjs/ui/build/components/ordered-list/ordered-list-context.js
|
|
@@ -77499,7 +76548,7 @@ var OrderedListContext = import_react47.createContext({
|
|
|
77499
76548
|
// node_modules/@inkjs/ui/build/components/ordered-list/ordered-list.js
|
|
77500
76549
|
function OrderedList({ children }) {
|
|
77501
76550
|
const { marker: parentMarker } = import_react48.useContext(OrderedListContext);
|
|
77502
|
-
const { styles:
|
|
76551
|
+
const { styles: styles5 } = useComponentTheme("OrderedList");
|
|
77503
76552
|
let numberOfItems = 0;
|
|
77504
76553
|
for (const child of import_react48.default.Children.toArray(children)) {
|
|
77505
76554
|
if (!import_react48.isValidElement(child) || child.type !== OrderedListItem) {
|
|
@@ -77508,7 +76557,7 @@ function OrderedList({ children }) {
|
|
|
77508
76557
|
numberOfItems++;
|
|
77509
76558
|
}
|
|
77510
76559
|
const maxMarkerWidth = String(numberOfItems).length;
|
|
77511
|
-
return import_react48.default.createElement(Box_default, { ...
|
|
76560
|
+
return import_react48.default.createElement(Box_default, { ...styles5.list() }, import_react48.default.Children.map(children, (child, index) => {
|
|
77512
76561
|
if (!import_react48.isValidElement(child) || child.type !== OrderedListItem) {
|
|
77513
76562
|
return child;
|
|
77514
76563
|
}
|
|
@@ -77526,7 +76575,7 @@ var import_react49 = __toESM(require_react(), 1);
|
|
|
77526
76575
|
|
|
77527
76576
|
// node_modules/@inkjs/ui/build/components/password-input/use-password-input.js
|
|
77528
76577
|
var import_react50 = __toESM(require_react(), 1);
|
|
77529
|
-
var cursor2 =
|
|
76578
|
+
var cursor2 = source_default.inverse(" ");
|
|
77530
76579
|
// node_modules/@inkjs/ui/build/components/status-message/status-message.js
|
|
77531
76580
|
var import_react52 = __toESM(require_react(), 1);
|
|
77532
76581
|
// node_modules/@inkjs/ui/build/components/alert/alert.js
|
|
@@ -77539,7 +76588,7 @@ var import_react54 = __toESM(require_react(), 1);
|
|
|
77539
76588
|
|
|
77540
76589
|
// node_modules/@inkjs/ui/build/components/email-input/use-email-input.js
|
|
77541
76590
|
var import_react55 = __toESM(require_react(), 1);
|
|
77542
|
-
var cursor3 =
|
|
76591
|
+
var cursor3 = source_default.inverse(" ");
|
|
77543
76592
|
// src/ui/components/Spinner.tsx
|
|
77544
76593
|
var jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
77545
76594
|
function Spinner2({ label, type: type2 = "simpleDots" }) {
|
|
@@ -79308,7 +78357,8 @@ class InkProvider {
|
|
|
79308
78357
|
}
|
|
79309
78358
|
async waitUntilExit() {
|
|
79310
78359
|
if (this.waitUntilExitFn) {
|
|
79311
|
-
|
|
78360
|
+
await this.waitUntilExitFn();
|
|
78361
|
+
return;
|
|
79312
78362
|
}
|
|
79313
78363
|
return this.exitPromise;
|
|
79314
78364
|
}
|
|
@@ -80140,7 +79190,7 @@ class UpdateScheduler extends EventEmitter8 {
|
|
|
80140
79190
|
|
|
80141
79191
|
// src/auto-update/installer.ts
|
|
80142
79192
|
init_logger();
|
|
80143
|
-
import { spawn as
|
|
79193
|
+
import { spawn as spawn4, spawnSync } from "child_process";
|
|
80144
79194
|
import { existsSync as existsSync13, readFileSync as readFileSync9, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4 } from "fs";
|
|
80145
79195
|
import { dirname as dirname8, resolve as resolve6 } from "path";
|
|
80146
79196
|
import { homedir as homedir5 } from "os";
|
|
@@ -80283,7 +79333,7 @@ async function installVersion(version) {
|
|
|
80283
79333
|
const { cmd, isBun: isBun3 } = pm;
|
|
80284
79334
|
const args = ["install", "-g", `${PACKAGE_NAME2}@${version}`];
|
|
80285
79335
|
log31.debug(`Using ${isBun3 ? "bun" : "npm"} for installation`);
|
|
80286
|
-
const child =
|
|
79336
|
+
const child = spawn4(cmd, args, {
|
|
80287
79337
|
stdio: ["ignore", "pipe", "pipe"],
|
|
80288
79338
|
env: {
|
|
80289
79339
|
...process.env,
|
|
@@ -80538,11 +79588,12 @@ function wirePlatformEvents(platformId, client, session, ui) {
|
|
|
80538
79588
|
}
|
|
80539
79589
|
program.name("claude-threads").version(VERSION).description("Share Claude Code sessions in Mattermost").option("--url <url>", "Mattermost server URL").option("--token <token>", "Mattermost bot token").option("--channel <id>", "Mattermost channel ID").option("--bot-name <name>", "Bot mention name (default: claude-code)").option("--allowed-users <users>", "Comma-separated allowed usernames").option("--skip-permissions", "Skip interactive permission prompts").option("--no-skip-permissions", "Enable interactive permission prompts (override env)").option("--chrome", "Enable Claude in Chrome integration").option("--no-chrome", "Disable Claude in Chrome integration").option("--worktree-mode <mode>", "Git worktree mode: off, prompt, require (default: prompt)").option("--keep-alive", "Enable system sleep prevention (default: enabled)").option("--no-keep-alive", "Disable system sleep prevention").option("--setup", "Run interactive setup wizard (reconfigure existing settings)").option("--debug", "Enable debug logging").option("--skip-version-check", "Skip Claude CLI version compatibility check").option("--auto-restart", "Enable auto-restart on updates (default when autoUpdate enabled)").option("--no-auto-restart", "Disable auto-restart on updates").option("--headless", "Run without interactive UI (logs to stdout)").parse();
|
|
80540
79590
|
var opts = program.opts();
|
|
79591
|
+
var forcedInteractive = !!process.env.CLAUDE_THREADS_INTERACTIVE;
|
|
79592
|
+
var isHeadless = opts.headless || !forcedInteractive && (!process.stdout.isTTY || !process.stdin.isTTY);
|
|
80541
79593
|
function hasRequiredCliArgs(args) {
|
|
80542
79594
|
return !!(args.url && args.token && args.channel);
|
|
80543
79595
|
}
|
|
80544
79596
|
async function main() {
|
|
80545
|
-
const isHeadless = opts.headless || !process.stdout.isTTY || !process.stdin.isTTY;
|
|
80546
79597
|
if (!isHeadless) {
|
|
80547
79598
|
process.stdout.write("\x1B[2J\x1B[H");
|
|
80548
79599
|
}
|
|
@@ -80553,10 +79604,10 @@ async function main() {
|
|
|
80553
79604
|
return true;
|
|
80554
79605
|
if (await configExists()) {
|
|
80555
79606
|
try {
|
|
80556
|
-
const
|
|
80557
|
-
if (!
|
|
79607
|
+
const config = loadConfigWithMigration();
|
|
79608
|
+
if (!config)
|
|
80558
79609
|
return false;
|
|
80559
|
-
return
|
|
79610
|
+
return config.autoUpdate?.enabled !== false;
|
|
80560
79611
|
} catch {
|
|
80561
79612
|
return false;
|
|
80562
79613
|
}
|
|
@@ -80564,7 +79615,7 @@ async function main() {
|
|
|
80564
79615
|
return false;
|
|
80565
79616
|
};
|
|
80566
79617
|
if (await shouldUseAutoRestart()) {
|
|
80567
|
-
const { spawn:
|
|
79618
|
+
const { spawn: spawn5 } = await import("child_process");
|
|
80568
79619
|
const { dirname: dirname9, resolve: resolve7 } = await import("path");
|
|
80569
79620
|
const { fileURLToPath: fileURLToPath7 } = await import("url");
|
|
80570
79621
|
const __filename2 = fileURLToPath7(import.meta.url);
|
|
@@ -80574,14 +79625,34 @@ async function main() {
|
|
|
80574
79625
|
console.log("\uD83D\uDD04 Starting with auto-restart enabled...");
|
|
80575
79626
|
console.log("");
|
|
80576
79627
|
const binPath = __filename2;
|
|
80577
|
-
|
|
80578
|
-
|
|
80579
|
-
|
|
80580
|
-
|
|
80581
|
-
|
|
80582
|
-
|
|
80583
|
-
|
|
79628
|
+
let child;
|
|
79629
|
+
if (process.platform === "win32") {
|
|
79630
|
+
child = spawn5("bash", [daemonPath, "--restart-on-error", ...args], {
|
|
79631
|
+
stdio: "inherit",
|
|
79632
|
+
env: {
|
|
79633
|
+
...process.env,
|
|
79634
|
+
CLAUDE_THREADS_BIN: binPath,
|
|
79635
|
+
CLAUDE_THREADS_INTERACTIVE: ""
|
|
79636
|
+
}
|
|
79637
|
+
});
|
|
79638
|
+
} else {
|
|
79639
|
+
child = spawn5(daemonPath, ["--restart-on-error", ...args], {
|
|
79640
|
+
stdio: "inherit",
|
|
79641
|
+
env: {
|
|
79642
|
+
...process.env,
|
|
79643
|
+
CLAUDE_THREADS_BIN: binPath,
|
|
79644
|
+
CLAUDE_THREADS_INTERACTIVE: ""
|
|
79645
|
+
}
|
|
79646
|
+
});
|
|
79647
|
+
}
|
|
80584
79648
|
child.on("error", (err) => {
|
|
79649
|
+
if (process.platform === "win32") {
|
|
79650
|
+
console.error(`Failed to start daemon: ${err.message}`);
|
|
79651
|
+
console.error("Auto-restart requires bash (Git for Windows or WSL). Starting without auto-restart...");
|
|
79652
|
+
console.error("");
|
|
79653
|
+
startWithoutDaemon();
|
|
79654
|
+
return;
|
|
79655
|
+
}
|
|
80585
79656
|
console.error(`Failed to start daemon: ${err.message}`);
|
|
80586
79657
|
process.exit(1);
|
|
80587
79658
|
});
|
|
@@ -80590,6 +79661,9 @@ async function main() {
|
|
|
80590
79661
|
});
|
|
80591
79662
|
return;
|
|
80592
79663
|
}
|
|
79664
|
+
await startWithoutDaemon();
|
|
79665
|
+
}
|
|
79666
|
+
async function startWithoutDaemon() {
|
|
80593
79667
|
checkForUpdates();
|
|
80594
79668
|
if (opts.debug) {
|
|
80595
79669
|
process.env.DEBUG = "1";
|