@wirecat/mail-cli 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/LICENSE +204 -0
- package/README.md +166 -2
- package/dist/bin/mail.d.ts +3 -0
- package/dist/bin/mail.d.ts.map +1 -0
- package/dist/bin/mail.js +36 -0
- package/dist/bin/mail.js.map +1 -0
- package/dist/bundle/all-profiles-TKMBELRZ.js +286 -0
- package/dist/bundle/anthropic-7LMUAEIZ.js +72 -0
- package/dist/bundle/app-server-JGMIJDD4.js +229 -0
- package/dist/bundle/bun-XRO6XJHQ.js +169 -0
- package/dist/bundle/bun-sqlite-Z54LEHVM.js +71 -0
- package/dist/bundle/chunk-2LLNPNMB.js +24 -0
- package/dist/bundle/chunk-3E3WA2L6.js +1932 -0
- package/dist/bundle/chunk-3KEVLSNN.js +138 -0
- package/dist/bundle/chunk-3KOA73LS.js +3416 -0
- package/dist/bundle/chunk-4E7BN3TC.js +122 -0
- package/dist/bundle/chunk-4FEMINO2.js +409 -0
- package/dist/bundle/chunk-52F5DWS5.js +27 -0
- package/dist/bundle/chunk-5BVIWP3S.js +71 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-5NYMNSSO.js +264 -0
- package/dist/bundle/chunk-6MAZWSC3.js +132 -0
- package/dist/bundle/chunk-75CWWETH.js +379 -0
- package/dist/bundle/chunk-7SXGLT6T.js +444 -0
- package/dist/bundle/chunk-BTQX2ZSZ.js +288 -0
- package/dist/bundle/chunk-CEW6KIFA.js +1193 -0
- package/dist/bundle/chunk-CH6RXYAX.js +82 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-EOEDICIE.js +6848 -0
- package/dist/bundle/chunk-F6D6PJ34.js +100 -0
- package/dist/bundle/chunk-FDCGTODC.js +78 -0
- package/dist/bundle/chunk-FZ5FXIG6.js +18 -0
- package/dist/bundle/chunk-GAH7N7HO.js +8181 -0
- package/dist/bundle/chunk-GK4M2SUP.js +195 -0
- package/dist/bundle/chunk-GN62YOT5.js +161 -0
- package/dist/bundle/chunk-GQQJOH7A.js +7050 -0
- package/dist/bundle/chunk-GWDCKUBI.js +781 -0
- package/dist/bundle/chunk-HTQTIKWP.js +928 -0
- package/dist/bundle/chunk-IK5TH3O7.js +217 -0
- package/dist/bundle/chunk-J3QXTBD2.js +2742 -0
- package/dist/bundle/chunk-J6MSJLIW.js +45 -0
- package/dist/bundle/chunk-JBBZCTTF.js +76 -0
- package/dist/bundle/chunk-JVMVLITS.js +260 -0
- package/dist/bundle/chunk-K4FVKPDQ.js +525 -0
- package/dist/bundle/chunk-KHTO2Q6E.js +886 -0
- package/dist/bundle/chunk-KM7Q67Z3.js +63 -0
- package/dist/bundle/chunk-LQ37ALDJ.js +2416 -0
- package/dist/bundle/chunk-MNOIRJEO.js +2315 -0
- package/dist/bundle/chunk-MS53RALV.js +168 -0
- package/dist/bundle/chunk-NK7EB63L.js +36225 -0
- package/dist/bundle/chunk-NPGVOZVK.js +2 -0
- package/dist/bundle/chunk-OTUOZ33L.js +82 -0
- package/dist/bundle/chunk-P7P5MNAU.js +46 -0
- package/dist/bundle/chunk-QLEUNU6G.js +537 -0
- package/dist/bundle/chunk-QQB7WT7R.js +216 -0
- package/dist/bundle/chunk-QX7RCLRS.js +23 -0
- package/dist/bundle/chunk-T6464KYA.js +35130 -0
- package/dist/bundle/chunk-TE5U5OAM.js +73 -0
- package/dist/bundle/chunk-TI6VBZKJ.js +166 -0
- package/dist/bundle/chunk-TQFCPUIM.js +53 -0
- package/dist/bundle/chunk-TVREDYX4.js +3574 -0
- package/dist/bundle/chunk-TWPDVUBR.js +106 -0
- package/dist/bundle/chunk-TWTATDM7.js +461 -0
- package/dist/bundle/chunk-UH4DDRHA.js +2989 -0
- package/dist/bundle/chunk-VEIZZRQ5.js +630 -0
- package/dist/bundle/chunk-WLFLBWNH.js +54 -0
- package/dist/bundle/chunk-WXAXYJJ7.js +486 -0
- package/dist/bundle/chunk-XQUUANA2.js +24600 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YO4CUH5E.js +33 -0
- package/dist/bundle/chunk-YPQQ5J4X.js +849 -0
- package/dist/bundle/chunk-Z34ICZA3.js +1028 -0
- package/dist/bundle/chunk-ZANYM66S.js +58 -0
- package/dist/bundle/chunk-ZD3WUGR2.js +142 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-WU434ZUL.js +34 -0
- package/dist/bundle/decode-YB3ZDTES.js +162 -0
- package/dist/bundle/dispatch-EUKKT3PD.js +411 -0
- package/dist/bundle/dist-A6GKSKFC.js +2072 -0
- package/dist/bundle/dist-HFUVURJG.js +7577 -0
- package/dist/bundle/echarts-YNGCOYHW.js +42501 -0
- package/dist/bundle/embed-LWNHIRBQ.js +37 -0
- package/dist/bundle/embedder-2LYD3U37.js +110 -0
- package/dist/bundle/failure-OAIC5VAP.js +24 -0
- package/dist/bundle/first-run-N3HJKGU7.js +27 -0
- package/dist/bundle/first-screen-4U2DMV3G.js +32 -0
- package/dist/bundle/instructions-GJHHFV64.js +11 -0
- package/dist/bundle/mail.js +166 -0
- package/dist/bundle/mcp-L7SRVDRN.js +167 -0
- package/dist/bundle/node-GFOH6FKP.js +176 -0
- package/dist/bundle/node-KM3CUABH.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-NBXQXBIU.js +63 -0
- package/dist/bundle/oauth-56EFO5AQ.js +19 -0
- package/dist/bundle/open-2V7QZQJP.js +21 -0
- package/dist/bundle/openai-V3SVACVL.js +251 -0
- package/dist/bundle/process-XVDX4SPD.js +91 -0
- package/dist/bundle/program-JTJB26P3.js +35542 -0
- package/dist/bundle/prompt-YKWAI222.js +14 -0
- package/dist/bundle/recognize-PAR66KVM.js +25 -0
- package/dist/bundle/remote-CE43TKXC.js +28 -0
- package/dist/bundle/rerank-M7S7P2TW.js +51 -0
- package/dist/bundle/serve-ENPMIV6J.js +197 -0
- package/dist/bundle/server-JRTHUCVY.js +63 -0
- package/dist/bundle/server-MBEZLVKZ.js +189 -0
- package/dist/bundle/sqlite-runtime-HVGDHBJJ.js +18 -0
- package/dist/bundle/state-QZSOSKBD.js +35 -0
- package/dist/bundle/store-2BUX6LVX.js +124 -0
- package/dist/bundle/store-UJ7SNKXI.js +141 -0
- package/dist/bundle/store-maintenance-command-I7V5C44K.js +52 -0
- package/dist/commands/account.d.ts +3 -0
- package/dist/commands/account.d.ts.map +1 -0
- package/dist/commands/account.js +47 -0
- package/dist/commands/account.js.map +1 -0
- package/dist/commands/context.d.ts +41 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +52 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/folders.d.ts +3 -0
- package/dist/commands/folders.d.ts.map +1 -0
- package/dist/commands/folders.js +36 -0
- package/dist/commands/folders.js.map +1 -0
- package/dist/commands/login.d.ts +5 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +21 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/mailbox.d.ts +16 -0
- package/dist/commands/mailbox.d.ts.map +1 -0
- package/dist/commands/mailbox.js +54 -0
- package/dist/commands/mailbox.js.map +1 -0
- package/dist/commands/session.d.ts +3 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +211 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +89 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts +3 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +190 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/config.d.ts +190 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +46 -0
- package/dist/config.js.map +1 -0
- package/dist/discovery.d.ts +42 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +179 -0
- package/dist/discovery.js.map +1 -0
- package/dist/identity.d.ts +5 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +16 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/mail/imap-errors.d.ts +4 -0
- package/dist/mail/imap-errors.d.ts.map +1 -0
- package/dist/mail/imap-errors.js +41 -0
- package/dist/mail/imap-errors.js.map +1 -0
- package/dist/mail/imap-messages.d.ts +18 -0
- package/dist/mail/imap-messages.d.ts.map +1 -0
- package/dist/mail/imap-messages.js +66 -0
- package/dist/mail/imap-messages.js.map +1 -0
- package/dist/mail/imap.d.ts +67 -0
- package/dist/mail/imap.d.ts.map +1 -0
- package/dist/mail/imap.js +348 -0
- package/dist/mail/imap.js.map +1 -0
- package/dist/profile.d.ts +16 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +31 -0
- package/dist/profile.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +52 -0
- package/dist/program.js.map +1 -0
- package/dist/providers.d.ts +53 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +106 -0
- package/dist/providers.js.map +1 -0
- package/dist/secret.d.ts +30 -0
- package/dist/secret.d.ts.map +1 -0
- package/dist/secret.js +68 -0
- package/dist/secret.js.map +1 -0
- package/dist/store.d.ts +12 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +25 -0
- package/dist/store.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +83 -4
- package/skills/mail-cli/SKILL.md +27 -0
|
@@ -0,0 +1,2742 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
array,
|
|
5
|
+
dottedId,
|
|
6
|
+
duplicates,
|
|
7
|
+
errorObjectOf,
|
|
8
|
+
getDotPath,
|
|
9
|
+
isoTime,
|
|
10
|
+
optional,
|
|
11
|
+
parseRegistry,
|
|
12
|
+
picklist,
|
|
13
|
+
pipe,
|
|
14
|
+
record,
|
|
15
|
+
regex,
|
|
16
|
+
safeParse,
|
|
17
|
+
strictObject,
|
|
18
|
+
string,
|
|
19
|
+
text,
|
|
20
|
+
unknown
|
|
21
|
+
} from "./chunk-LQ37ALDJ.js";
|
|
22
|
+
import {
|
|
23
|
+
CliError,
|
|
24
|
+
visibleControls
|
|
25
|
+
} from "./chunk-5BVIWP3S.js";
|
|
26
|
+
import {
|
|
27
|
+
__commonJS,
|
|
28
|
+
__name,
|
|
29
|
+
__require,
|
|
30
|
+
__toESM
|
|
31
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
32
|
+
|
|
33
|
+
// node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/debug.js
|
|
34
|
+
var require_debug = __commonJS({
|
|
35
|
+
"node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/debug.js"(exports, module) {
|
|
36
|
+
var messages = [];
|
|
37
|
+
var level = 0;
|
|
38
|
+
var debug = /* @__PURE__ */ __name((msg, min) => {
|
|
39
|
+
if (level >= min) {
|
|
40
|
+
messages.push(msg);
|
|
41
|
+
}
|
|
42
|
+
}, "debug");
|
|
43
|
+
debug.WARN = 1;
|
|
44
|
+
debug.INFO = 2;
|
|
45
|
+
debug.DEBUG = 3;
|
|
46
|
+
debug.reset = () => {
|
|
47
|
+
messages = [];
|
|
48
|
+
};
|
|
49
|
+
debug.setDebugLevel = (v) => {
|
|
50
|
+
level = v;
|
|
51
|
+
};
|
|
52
|
+
debug.warn = (msg) => debug(msg, debug.WARN);
|
|
53
|
+
debug.info = (msg) => debug(msg, debug.INFO);
|
|
54
|
+
debug.debug = (msg) => debug(msg, debug.DEBUG);
|
|
55
|
+
debug.debugMessages = () => messages;
|
|
56
|
+
module.exports = debug;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
|
|
61
|
+
var require_ansi_regex = __commonJS({
|
|
62
|
+
"node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module) {
|
|
63
|
+
"use strict";
|
|
64
|
+
module.exports = ({ onlyFirst = false } = {}) => {
|
|
65
|
+
const pattern = [
|
|
66
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
67
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
68
|
+
].join("|");
|
|
69
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
|
|
75
|
+
var require_strip_ansi = __commonJS({
|
|
76
|
+
"node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module) {
|
|
77
|
+
"use strict";
|
|
78
|
+
var ansiRegex = require_ansi_regex();
|
|
79
|
+
module.exports = (string2) => typeof string2 === "string" ? string2.replace(ansiRegex(), "") : string2;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
|
|
84
|
+
var require_is_fullwidth_code_point = __commonJS({
|
|
85
|
+
"node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
|
|
86
|
+
"use strict";
|
|
87
|
+
var isFullwidthCodePoint = /* @__PURE__ */ __name((codePoint) => {
|
|
88
|
+
if (Number.isNaN(codePoint)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
|
|
92
|
+
codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
|
|
93
|
+
codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
|
94
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
95
|
+
11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
96
|
+
12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
|
|
97
|
+
19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
|
|
98
|
+
43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
|
|
99
|
+
44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
|
|
100
|
+
63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
|
|
101
|
+
65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
|
|
102
|
+
65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
|
|
103
|
+
65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
|
|
104
|
+
110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
|
|
105
|
+
127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
106
|
+
131072 <= codePoint && codePoint <= 262141)) {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
return false;
|
|
110
|
+
}, "isFullwidthCodePoint");
|
|
111
|
+
module.exports = isFullwidthCodePoint;
|
|
112
|
+
module.exports.default = isFullwidthCodePoint;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
|
|
117
|
+
var require_emoji_regex = __commonJS({
|
|
118
|
+
"node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module) {
|
|
119
|
+
"use strict";
|
|
120
|
+
module.exports = function() {
|
|
121
|
+
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
|
|
127
|
+
var require_string_width = __commonJS({
|
|
128
|
+
"node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module) {
|
|
129
|
+
"use strict";
|
|
130
|
+
var stripAnsi = require_strip_ansi();
|
|
131
|
+
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
132
|
+
var emojiRegex = require_emoji_regex();
|
|
133
|
+
var stringWidth = /* @__PURE__ */ __name((string2) => {
|
|
134
|
+
if (typeof string2 !== "string" || string2.length === 0) {
|
|
135
|
+
return 0;
|
|
136
|
+
}
|
|
137
|
+
string2 = stripAnsi(string2);
|
|
138
|
+
if (string2.length === 0) {
|
|
139
|
+
return 0;
|
|
140
|
+
}
|
|
141
|
+
string2 = string2.replace(emojiRegex(), " ");
|
|
142
|
+
let width = 0;
|
|
143
|
+
for (let i = 0; i < string2.length; i++) {
|
|
144
|
+
const code = string2.codePointAt(i);
|
|
145
|
+
if (code <= 31 || code >= 127 && code <= 159) {
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
if (code >= 768 && code <= 879) {
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (code > 65535) {
|
|
152
|
+
i++;
|
|
153
|
+
}
|
|
154
|
+
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
155
|
+
}
|
|
156
|
+
return width;
|
|
157
|
+
}, "stringWidth");
|
|
158
|
+
module.exports = stringWidth;
|
|
159
|
+
module.exports.default = stringWidth;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/utils.js
|
|
164
|
+
var require_utils = __commonJS({
|
|
165
|
+
"node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/utils.js"(exports, module) {
|
|
166
|
+
var stringWidth = require_string_width();
|
|
167
|
+
function codeRegex(capture) {
|
|
168
|
+
return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
|
|
169
|
+
}
|
|
170
|
+
__name(codeRegex, "codeRegex");
|
|
171
|
+
function strlen(str) {
|
|
172
|
+
let code = codeRegex();
|
|
173
|
+
let stripped = ("" + str).replace(code, "");
|
|
174
|
+
let split = stripped.split("\n");
|
|
175
|
+
return split.reduce(function(memo, s) {
|
|
176
|
+
return stringWidth(s) > memo ? stringWidth(s) : memo;
|
|
177
|
+
}, 0);
|
|
178
|
+
}
|
|
179
|
+
__name(strlen, "strlen");
|
|
180
|
+
function repeat(str, times) {
|
|
181
|
+
return Array(times + 1).join(str);
|
|
182
|
+
}
|
|
183
|
+
__name(repeat, "repeat");
|
|
184
|
+
function pad(str, len, pad2, dir) {
|
|
185
|
+
let length = strlen(str);
|
|
186
|
+
if (len + 1 >= length) {
|
|
187
|
+
let padlen = len - length;
|
|
188
|
+
switch (dir) {
|
|
189
|
+
case "right": {
|
|
190
|
+
str = repeat(pad2, padlen) + str;
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
case "center": {
|
|
194
|
+
let right = Math.ceil(padlen / 2);
|
|
195
|
+
let left = padlen - right;
|
|
196
|
+
str = repeat(pad2, left) + str + repeat(pad2, right);
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
default: {
|
|
200
|
+
str = str + repeat(pad2, padlen);
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return str;
|
|
206
|
+
}
|
|
207
|
+
__name(pad, "pad");
|
|
208
|
+
var codeCache = {};
|
|
209
|
+
function addToCodeCache(name, on, off) {
|
|
210
|
+
on = "\x1B[" + on + "m";
|
|
211
|
+
off = "\x1B[" + off + "m";
|
|
212
|
+
codeCache[on] = { set: name, to: true };
|
|
213
|
+
codeCache[off] = { set: name, to: false };
|
|
214
|
+
codeCache[name] = { on, off };
|
|
215
|
+
}
|
|
216
|
+
__name(addToCodeCache, "addToCodeCache");
|
|
217
|
+
addToCodeCache("bold", 1, 22);
|
|
218
|
+
addToCodeCache("italics", 3, 23);
|
|
219
|
+
addToCodeCache("underline", 4, 24);
|
|
220
|
+
addToCodeCache("inverse", 7, 27);
|
|
221
|
+
addToCodeCache("strikethrough", 9, 29);
|
|
222
|
+
function updateState(state, controlChars) {
|
|
223
|
+
let controlCode = controlChars[1] ? parseInt(controlChars[1].split(";")[0]) : 0;
|
|
224
|
+
if (controlCode >= 30 && controlCode <= 39 || controlCode >= 90 && controlCode <= 97) {
|
|
225
|
+
state.lastForegroundAdded = controlChars[0];
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (controlCode >= 40 && controlCode <= 49 || controlCode >= 100 && controlCode <= 107) {
|
|
229
|
+
state.lastBackgroundAdded = controlChars[0];
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (controlCode === 0) {
|
|
233
|
+
for (let i in state) {
|
|
234
|
+
if (Object.prototype.hasOwnProperty.call(state, i)) {
|
|
235
|
+
delete state[i];
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
let info = codeCache[controlChars[0]];
|
|
241
|
+
if (info) {
|
|
242
|
+
state[info.set] = info.to;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
__name(updateState, "updateState");
|
|
246
|
+
function readState(line) {
|
|
247
|
+
let code = codeRegex(true);
|
|
248
|
+
let controlChars = code.exec(line);
|
|
249
|
+
let state = {};
|
|
250
|
+
while (controlChars !== null) {
|
|
251
|
+
updateState(state, controlChars);
|
|
252
|
+
controlChars = code.exec(line);
|
|
253
|
+
}
|
|
254
|
+
return state;
|
|
255
|
+
}
|
|
256
|
+
__name(readState, "readState");
|
|
257
|
+
function unwindState(state, ret) {
|
|
258
|
+
let lastBackgroundAdded = state.lastBackgroundAdded;
|
|
259
|
+
let lastForegroundAdded = state.lastForegroundAdded;
|
|
260
|
+
delete state.lastBackgroundAdded;
|
|
261
|
+
delete state.lastForegroundAdded;
|
|
262
|
+
Object.keys(state).forEach(function(key) {
|
|
263
|
+
if (state[key]) {
|
|
264
|
+
ret += codeCache[key].off;
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
|
|
268
|
+
ret += "\x1B[49m";
|
|
269
|
+
}
|
|
270
|
+
if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
|
|
271
|
+
ret += "\x1B[39m";
|
|
272
|
+
}
|
|
273
|
+
return ret;
|
|
274
|
+
}
|
|
275
|
+
__name(unwindState, "unwindState");
|
|
276
|
+
function rewindState(state, ret) {
|
|
277
|
+
let lastBackgroundAdded = state.lastBackgroundAdded;
|
|
278
|
+
let lastForegroundAdded = state.lastForegroundAdded;
|
|
279
|
+
delete state.lastBackgroundAdded;
|
|
280
|
+
delete state.lastForegroundAdded;
|
|
281
|
+
Object.keys(state).forEach(function(key) {
|
|
282
|
+
if (state[key]) {
|
|
283
|
+
ret = codeCache[key].on + ret;
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
|
|
287
|
+
ret = lastBackgroundAdded + ret;
|
|
288
|
+
}
|
|
289
|
+
if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
|
|
290
|
+
ret = lastForegroundAdded + ret;
|
|
291
|
+
}
|
|
292
|
+
return ret;
|
|
293
|
+
}
|
|
294
|
+
__name(rewindState, "rewindState");
|
|
295
|
+
function truncateWidth(str, desiredLength) {
|
|
296
|
+
if (str.length === strlen(str)) {
|
|
297
|
+
return str.substr(0, desiredLength);
|
|
298
|
+
}
|
|
299
|
+
while (strlen(str) > desiredLength) {
|
|
300
|
+
str = str.slice(0, -1);
|
|
301
|
+
}
|
|
302
|
+
return str;
|
|
303
|
+
}
|
|
304
|
+
__name(truncateWidth, "truncateWidth");
|
|
305
|
+
function truncateWidthWithAnsi(str, desiredLength) {
|
|
306
|
+
let code = codeRegex(true);
|
|
307
|
+
let split = str.split(codeRegex());
|
|
308
|
+
let splitIndex = 0;
|
|
309
|
+
let retLen = 0;
|
|
310
|
+
let ret = "";
|
|
311
|
+
let myArray;
|
|
312
|
+
let state = {};
|
|
313
|
+
while (retLen < desiredLength) {
|
|
314
|
+
myArray = code.exec(str);
|
|
315
|
+
let toAdd = split[splitIndex];
|
|
316
|
+
splitIndex++;
|
|
317
|
+
if (retLen + strlen(toAdd) > desiredLength) {
|
|
318
|
+
toAdd = truncateWidth(toAdd, desiredLength - retLen);
|
|
319
|
+
}
|
|
320
|
+
ret += toAdd;
|
|
321
|
+
retLen += strlen(toAdd);
|
|
322
|
+
if (retLen < desiredLength) {
|
|
323
|
+
if (!myArray) {
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
ret += myArray[0];
|
|
327
|
+
updateState(state, myArray);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
return unwindState(state, ret);
|
|
331
|
+
}
|
|
332
|
+
__name(truncateWidthWithAnsi, "truncateWidthWithAnsi");
|
|
333
|
+
function truncate(str, desiredLength, truncateChar) {
|
|
334
|
+
truncateChar = truncateChar || "\u2026";
|
|
335
|
+
let lengthOfStr = strlen(str);
|
|
336
|
+
if (lengthOfStr <= desiredLength) {
|
|
337
|
+
return str;
|
|
338
|
+
}
|
|
339
|
+
desiredLength -= strlen(truncateChar);
|
|
340
|
+
let ret = truncateWidthWithAnsi(str, desiredLength);
|
|
341
|
+
ret += truncateChar;
|
|
342
|
+
const hrefTag = "\x1B]8;;\x07";
|
|
343
|
+
if (str.includes(hrefTag) && !ret.includes(hrefTag)) {
|
|
344
|
+
ret += hrefTag;
|
|
345
|
+
}
|
|
346
|
+
return ret;
|
|
347
|
+
}
|
|
348
|
+
__name(truncate, "truncate");
|
|
349
|
+
function defaultOptions() {
|
|
350
|
+
return {
|
|
351
|
+
chars: {
|
|
352
|
+
top: "\u2500",
|
|
353
|
+
"top-mid": "\u252C",
|
|
354
|
+
"top-left": "\u250C",
|
|
355
|
+
"top-right": "\u2510",
|
|
356
|
+
bottom: "\u2500",
|
|
357
|
+
"bottom-mid": "\u2534",
|
|
358
|
+
"bottom-left": "\u2514",
|
|
359
|
+
"bottom-right": "\u2518",
|
|
360
|
+
left: "\u2502",
|
|
361
|
+
"left-mid": "\u251C",
|
|
362
|
+
mid: "\u2500",
|
|
363
|
+
"mid-mid": "\u253C",
|
|
364
|
+
right: "\u2502",
|
|
365
|
+
"right-mid": "\u2524",
|
|
366
|
+
middle: "\u2502"
|
|
367
|
+
},
|
|
368
|
+
truncate: "\u2026",
|
|
369
|
+
colWidths: [],
|
|
370
|
+
rowHeights: [],
|
|
371
|
+
colAligns: [],
|
|
372
|
+
rowAligns: [],
|
|
373
|
+
style: {
|
|
374
|
+
"padding-left": 1,
|
|
375
|
+
"padding-right": 1,
|
|
376
|
+
head: ["red"],
|
|
377
|
+
border: ["grey"],
|
|
378
|
+
compact: false
|
|
379
|
+
},
|
|
380
|
+
head: []
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
__name(defaultOptions, "defaultOptions");
|
|
384
|
+
function mergeOptions(options, defaults) {
|
|
385
|
+
options = options || {};
|
|
386
|
+
defaults = defaults || defaultOptions();
|
|
387
|
+
let ret = Object.assign({}, defaults, options);
|
|
388
|
+
ret.chars = Object.assign({}, defaults.chars, options.chars);
|
|
389
|
+
ret.style = Object.assign({}, defaults.style, options.style);
|
|
390
|
+
return ret;
|
|
391
|
+
}
|
|
392
|
+
__name(mergeOptions, "mergeOptions");
|
|
393
|
+
function wordWrap(maxLength, input) {
|
|
394
|
+
let lines = [];
|
|
395
|
+
let split = input.split(/(\s+)/g);
|
|
396
|
+
let line = [];
|
|
397
|
+
let lineLength = 0;
|
|
398
|
+
let whitespace;
|
|
399
|
+
for (let i = 0; i < split.length; i += 2) {
|
|
400
|
+
let word = split[i];
|
|
401
|
+
let newLength = lineLength + strlen(word);
|
|
402
|
+
if (lineLength > 0 && whitespace) {
|
|
403
|
+
newLength += whitespace.length;
|
|
404
|
+
}
|
|
405
|
+
if (newLength > maxLength) {
|
|
406
|
+
if (lineLength !== 0) {
|
|
407
|
+
lines.push(line.join(""));
|
|
408
|
+
}
|
|
409
|
+
line = [word];
|
|
410
|
+
lineLength = strlen(word);
|
|
411
|
+
} else {
|
|
412
|
+
line.push(whitespace || "", word);
|
|
413
|
+
lineLength = newLength;
|
|
414
|
+
}
|
|
415
|
+
whitespace = split[i + 1];
|
|
416
|
+
}
|
|
417
|
+
if (lineLength) {
|
|
418
|
+
lines.push(line.join(""));
|
|
419
|
+
}
|
|
420
|
+
return lines;
|
|
421
|
+
}
|
|
422
|
+
__name(wordWrap, "wordWrap");
|
|
423
|
+
function textWrap(maxLength, input) {
|
|
424
|
+
let lines = [];
|
|
425
|
+
let line = "";
|
|
426
|
+
function pushLine(str, ws) {
|
|
427
|
+
if (line.length && ws) line += ws;
|
|
428
|
+
line += str;
|
|
429
|
+
while (line.length > maxLength) {
|
|
430
|
+
lines.push(line.slice(0, maxLength));
|
|
431
|
+
line = line.slice(maxLength);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
__name(pushLine, "pushLine");
|
|
435
|
+
let split = input.split(/(\s+)/g);
|
|
436
|
+
for (let i = 0; i < split.length; i += 2) {
|
|
437
|
+
pushLine(split[i], i && split[i - 1]);
|
|
438
|
+
}
|
|
439
|
+
if (line.length) lines.push(line);
|
|
440
|
+
return lines;
|
|
441
|
+
}
|
|
442
|
+
__name(textWrap, "textWrap");
|
|
443
|
+
function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {
|
|
444
|
+
let output = [];
|
|
445
|
+
input = input.split("\n");
|
|
446
|
+
const handler = wrapOnWordBoundary ? wordWrap : textWrap;
|
|
447
|
+
for (let i = 0; i < input.length; i++) {
|
|
448
|
+
output.push.apply(output, handler(maxLength, input[i]));
|
|
449
|
+
}
|
|
450
|
+
return output;
|
|
451
|
+
}
|
|
452
|
+
__name(multiLineWordWrap, "multiLineWordWrap");
|
|
453
|
+
function colorizeLines(input) {
|
|
454
|
+
let state = {};
|
|
455
|
+
let output = [];
|
|
456
|
+
for (let i = 0; i < input.length; i++) {
|
|
457
|
+
let line = rewindState(state, input[i]);
|
|
458
|
+
state = readState(line);
|
|
459
|
+
let temp = Object.assign({}, state);
|
|
460
|
+
output.push(unwindState(temp, line));
|
|
461
|
+
}
|
|
462
|
+
return output;
|
|
463
|
+
}
|
|
464
|
+
__name(colorizeLines, "colorizeLines");
|
|
465
|
+
function hyperlink(url, text2) {
|
|
466
|
+
const OSC = "\x1B]";
|
|
467
|
+
const BEL = "\x07";
|
|
468
|
+
const SEP = ";";
|
|
469
|
+
return [OSC, "8", SEP, SEP, url || text2, BEL, text2, OSC, "8", SEP, SEP, BEL].join("");
|
|
470
|
+
}
|
|
471
|
+
__name(hyperlink, "hyperlink");
|
|
472
|
+
module.exports = {
|
|
473
|
+
strlen,
|
|
474
|
+
repeat,
|
|
475
|
+
pad,
|
|
476
|
+
truncate,
|
|
477
|
+
mergeOptions,
|
|
478
|
+
wordWrap: multiLineWordWrap,
|
|
479
|
+
colorizeLines,
|
|
480
|
+
hyperlink
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js
|
|
486
|
+
var require_styles = __commonJS({
|
|
487
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js"(exports, module) {
|
|
488
|
+
var styles = {};
|
|
489
|
+
module["exports"] = styles;
|
|
490
|
+
var codes = {
|
|
491
|
+
reset: [0, 0],
|
|
492
|
+
bold: [1, 22],
|
|
493
|
+
dim: [2, 22],
|
|
494
|
+
italic: [3, 23],
|
|
495
|
+
underline: [4, 24],
|
|
496
|
+
inverse: [7, 27],
|
|
497
|
+
hidden: [8, 28],
|
|
498
|
+
strikethrough: [9, 29],
|
|
499
|
+
black: [30, 39],
|
|
500
|
+
red: [31, 39],
|
|
501
|
+
green: [32, 39],
|
|
502
|
+
yellow: [33, 39],
|
|
503
|
+
blue: [34, 39],
|
|
504
|
+
magenta: [35, 39],
|
|
505
|
+
cyan: [36, 39],
|
|
506
|
+
white: [37, 39],
|
|
507
|
+
gray: [90, 39],
|
|
508
|
+
grey: [90, 39],
|
|
509
|
+
brightRed: [91, 39],
|
|
510
|
+
brightGreen: [92, 39],
|
|
511
|
+
brightYellow: [93, 39],
|
|
512
|
+
brightBlue: [94, 39],
|
|
513
|
+
brightMagenta: [95, 39],
|
|
514
|
+
brightCyan: [96, 39],
|
|
515
|
+
brightWhite: [97, 39],
|
|
516
|
+
bgBlack: [40, 49],
|
|
517
|
+
bgRed: [41, 49],
|
|
518
|
+
bgGreen: [42, 49],
|
|
519
|
+
bgYellow: [43, 49],
|
|
520
|
+
bgBlue: [44, 49],
|
|
521
|
+
bgMagenta: [45, 49],
|
|
522
|
+
bgCyan: [46, 49],
|
|
523
|
+
bgWhite: [47, 49],
|
|
524
|
+
bgGray: [100, 49],
|
|
525
|
+
bgGrey: [100, 49],
|
|
526
|
+
bgBrightRed: [101, 49],
|
|
527
|
+
bgBrightGreen: [102, 49],
|
|
528
|
+
bgBrightYellow: [103, 49],
|
|
529
|
+
bgBrightBlue: [104, 49],
|
|
530
|
+
bgBrightMagenta: [105, 49],
|
|
531
|
+
bgBrightCyan: [106, 49],
|
|
532
|
+
bgBrightWhite: [107, 49],
|
|
533
|
+
// legacy styles for colors pre v1.0.0
|
|
534
|
+
blackBG: [40, 49],
|
|
535
|
+
redBG: [41, 49],
|
|
536
|
+
greenBG: [42, 49],
|
|
537
|
+
yellowBG: [43, 49],
|
|
538
|
+
blueBG: [44, 49],
|
|
539
|
+
magentaBG: [45, 49],
|
|
540
|
+
cyanBG: [46, 49],
|
|
541
|
+
whiteBG: [47, 49]
|
|
542
|
+
};
|
|
543
|
+
Object.keys(codes).forEach(function(key) {
|
|
544
|
+
var val = codes[key];
|
|
545
|
+
var style = styles[key] = [];
|
|
546
|
+
style.open = "\x1B[" + val[0] + "m";
|
|
547
|
+
style.close = "\x1B[" + val[1] + "m";
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js
|
|
553
|
+
var require_has_flag = __commonJS({
|
|
554
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js"(exports, module) {
|
|
555
|
+
"use strict";
|
|
556
|
+
module.exports = function(flag, argv) {
|
|
557
|
+
argv = argv || process.argv;
|
|
558
|
+
var terminatorPos = argv.indexOf("--");
|
|
559
|
+
var prefix = /^-{1,2}/.test(flag) ? "" : "--";
|
|
560
|
+
var pos = argv.indexOf(prefix + flag);
|
|
561
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
|
|
566
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js
|
|
567
|
+
var require_supports_colors = __commonJS({
|
|
568
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
|
|
569
|
+
"use strict";
|
|
570
|
+
var os = __require("os");
|
|
571
|
+
var hasFlag = require_has_flag();
|
|
572
|
+
var env = process.env;
|
|
573
|
+
var forceColor = void 0;
|
|
574
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
575
|
+
forceColor = false;
|
|
576
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
577
|
+
forceColor = true;
|
|
578
|
+
}
|
|
579
|
+
if ("FORCE_COLOR" in env) {
|
|
580
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
581
|
+
}
|
|
582
|
+
function translateLevel(level) {
|
|
583
|
+
if (level === 0) {
|
|
584
|
+
return false;
|
|
585
|
+
}
|
|
586
|
+
return {
|
|
587
|
+
level,
|
|
588
|
+
hasBasic: true,
|
|
589
|
+
has256: level >= 2,
|
|
590
|
+
has16m: level >= 3
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
__name(translateLevel, "translateLevel");
|
|
594
|
+
function supportsColor(stream) {
|
|
595
|
+
if (forceColor === false) {
|
|
596
|
+
return 0;
|
|
597
|
+
}
|
|
598
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
599
|
+
return 3;
|
|
600
|
+
}
|
|
601
|
+
if (hasFlag("color=256")) {
|
|
602
|
+
return 2;
|
|
603
|
+
}
|
|
604
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
605
|
+
return 0;
|
|
606
|
+
}
|
|
607
|
+
var min = forceColor ? 1 : 0;
|
|
608
|
+
if (process.platform === "win32") {
|
|
609
|
+
var osRelease = os.release().split(".");
|
|
610
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
611
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
612
|
+
}
|
|
613
|
+
return 1;
|
|
614
|
+
}
|
|
615
|
+
if ("CI" in env) {
|
|
616
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some(function(sign) {
|
|
617
|
+
return sign in env;
|
|
618
|
+
}) || env.CI_NAME === "codeship") {
|
|
619
|
+
return 1;
|
|
620
|
+
}
|
|
621
|
+
return min;
|
|
622
|
+
}
|
|
623
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
624
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
625
|
+
}
|
|
626
|
+
if ("TERM_PROGRAM" in env) {
|
|
627
|
+
var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
628
|
+
switch (env.TERM_PROGRAM) {
|
|
629
|
+
case "iTerm.app":
|
|
630
|
+
return version >= 3 ? 3 : 2;
|
|
631
|
+
case "Hyper":
|
|
632
|
+
return 3;
|
|
633
|
+
case "Apple_Terminal":
|
|
634
|
+
return 2;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
638
|
+
return 2;
|
|
639
|
+
}
|
|
640
|
+
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
641
|
+
return 1;
|
|
642
|
+
}
|
|
643
|
+
if ("COLORTERM" in env) {
|
|
644
|
+
return 1;
|
|
645
|
+
}
|
|
646
|
+
if (env.TERM === "dumb") {
|
|
647
|
+
return min;
|
|
648
|
+
}
|
|
649
|
+
return min;
|
|
650
|
+
}
|
|
651
|
+
__name(supportsColor, "supportsColor");
|
|
652
|
+
function getSupportLevel(stream) {
|
|
653
|
+
var level = supportsColor(stream);
|
|
654
|
+
return translateLevel(level);
|
|
655
|
+
}
|
|
656
|
+
__name(getSupportLevel, "getSupportLevel");
|
|
657
|
+
module.exports = {
|
|
658
|
+
supportsColor: getSupportLevel,
|
|
659
|
+
stdout: getSupportLevel(process.stdout),
|
|
660
|
+
stderr: getSupportLevel(process.stderr)
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js
|
|
666
|
+
var require_trap = __commonJS({
|
|
667
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js"(exports, module) {
|
|
668
|
+
module["exports"] = /* @__PURE__ */ __name(function runTheTrap(text2, options) {
|
|
669
|
+
var result = "";
|
|
670
|
+
text2 = text2 || "Run the trap, drop the bass";
|
|
671
|
+
text2 = text2.split("");
|
|
672
|
+
var trap = {
|
|
673
|
+
a: ["@", "\u0104", "\u023A", "\u0245", "\u0394", "\u039B", "\u0414"],
|
|
674
|
+
b: ["\xDF", "\u0181", "\u0243", "\u026E", "\u03B2", "\u0E3F"],
|
|
675
|
+
c: ["\xA9", "\u023B", "\u03FE"],
|
|
676
|
+
d: ["\xD0", "\u018A", "\u0500", "\u0501", "\u0502", "\u0503"],
|
|
677
|
+
e: [
|
|
678
|
+
"\xCB",
|
|
679
|
+
"\u0115",
|
|
680
|
+
"\u018E",
|
|
681
|
+
"\u0258",
|
|
682
|
+
"\u03A3",
|
|
683
|
+
"\u03BE",
|
|
684
|
+
"\u04BC",
|
|
685
|
+
"\u0A6C"
|
|
686
|
+
],
|
|
687
|
+
f: ["\u04FA"],
|
|
688
|
+
g: ["\u0262"],
|
|
689
|
+
h: ["\u0126", "\u0195", "\u04A2", "\u04BA", "\u04C7", "\u050A"],
|
|
690
|
+
i: ["\u0F0F"],
|
|
691
|
+
j: ["\u0134"],
|
|
692
|
+
k: ["\u0138", "\u04A0", "\u04C3", "\u051E"],
|
|
693
|
+
l: ["\u0139"],
|
|
694
|
+
m: ["\u028D", "\u04CD", "\u04CE", "\u0520", "\u0521", "\u0D69"],
|
|
695
|
+
n: ["\xD1", "\u014B", "\u019D", "\u0376", "\u03A0", "\u048A"],
|
|
696
|
+
o: [
|
|
697
|
+
"\xD8",
|
|
698
|
+
"\xF5",
|
|
699
|
+
"\xF8",
|
|
700
|
+
"\u01FE",
|
|
701
|
+
"\u0298",
|
|
702
|
+
"\u047A",
|
|
703
|
+
"\u05DD",
|
|
704
|
+
"\u06DD",
|
|
705
|
+
"\u0E4F"
|
|
706
|
+
],
|
|
707
|
+
p: ["\u01F7", "\u048E"],
|
|
708
|
+
q: ["\u09CD"],
|
|
709
|
+
r: ["\xAE", "\u01A6", "\u0210", "\u024C", "\u0280", "\u042F"],
|
|
710
|
+
s: ["\xA7", "\u03DE", "\u03DF", "\u03E8"],
|
|
711
|
+
t: ["\u0141", "\u0166", "\u0373"],
|
|
712
|
+
u: ["\u01B1", "\u054D"],
|
|
713
|
+
v: ["\u05D8"],
|
|
714
|
+
w: ["\u0428", "\u0460", "\u047C", "\u0D70"],
|
|
715
|
+
x: ["\u04B2", "\u04FE", "\u04FC", "\u04FD"],
|
|
716
|
+
y: ["\xA5", "\u04B0", "\u04CB"],
|
|
717
|
+
z: ["\u01B5", "\u0240"]
|
|
718
|
+
};
|
|
719
|
+
text2.forEach(function(c) {
|
|
720
|
+
c = c.toLowerCase();
|
|
721
|
+
var chars = trap[c] || [" "];
|
|
722
|
+
var rand = Math.floor(Math.random() * chars.length);
|
|
723
|
+
if (typeof trap[c] !== "undefined") {
|
|
724
|
+
result += trap[c][rand];
|
|
725
|
+
} else {
|
|
726
|
+
result += c;
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
return result;
|
|
730
|
+
}, "runTheTrap");
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js
|
|
735
|
+
var require_zalgo = __commonJS({
|
|
736
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js"(exports, module) {
|
|
737
|
+
module["exports"] = /* @__PURE__ */ __name(function zalgo(text2, options) {
|
|
738
|
+
text2 = text2 || " he is here ";
|
|
739
|
+
var soul = {
|
|
740
|
+
"up": [
|
|
741
|
+
"\u030D",
|
|
742
|
+
"\u030E",
|
|
743
|
+
"\u0304",
|
|
744
|
+
"\u0305",
|
|
745
|
+
"\u033F",
|
|
746
|
+
"\u0311",
|
|
747
|
+
"\u0306",
|
|
748
|
+
"\u0310",
|
|
749
|
+
"\u0352",
|
|
750
|
+
"\u0357",
|
|
751
|
+
"\u0351",
|
|
752
|
+
"\u0307",
|
|
753
|
+
"\u0308",
|
|
754
|
+
"\u030A",
|
|
755
|
+
"\u0342",
|
|
756
|
+
"\u0313",
|
|
757
|
+
"\u0308",
|
|
758
|
+
"\u034A",
|
|
759
|
+
"\u034B",
|
|
760
|
+
"\u034C",
|
|
761
|
+
"\u0303",
|
|
762
|
+
"\u0302",
|
|
763
|
+
"\u030C",
|
|
764
|
+
"\u0350",
|
|
765
|
+
"\u0300",
|
|
766
|
+
"\u0301",
|
|
767
|
+
"\u030B",
|
|
768
|
+
"\u030F",
|
|
769
|
+
"\u0312",
|
|
770
|
+
"\u0313",
|
|
771
|
+
"\u0314",
|
|
772
|
+
"\u033D",
|
|
773
|
+
"\u0309",
|
|
774
|
+
"\u0363",
|
|
775
|
+
"\u0364",
|
|
776
|
+
"\u0365",
|
|
777
|
+
"\u0366",
|
|
778
|
+
"\u0367",
|
|
779
|
+
"\u0368",
|
|
780
|
+
"\u0369",
|
|
781
|
+
"\u036A",
|
|
782
|
+
"\u036B",
|
|
783
|
+
"\u036C",
|
|
784
|
+
"\u036D",
|
|
785
|
+
"\u036E",
|
|
786
|
+
"\u036F",
|
|
787
|
+
"\u033E",
|
|
788
|
+
"\u035B",
|
|
789
|
+
"\u0346",
|
|
790
|
+
"\u031A"
|
|
791
|
+
],
|
|
792
|
+
"down": [
|
|
793
|
+
"\u0316",
|
|
794
|
+
"\u0317",
|
|
795
|
+
"\u0318",
|
|
796
|
+
"\u0319",
|
|
797
|
+
"\u031C",
|
|
798
|
+
"\u031D",
|
|
799
|
+
"\u031E",
|
|
800
|
+
"\u031F",
|
|
801
|
+
"\u0320",
|
|
802
|
+
"\u0324",
|
|
803
|
+
"\u0325",
|
|
804
|
+
"\u0326",
|
|
805
|
+
"\u0329",
|
|
806
|
+
"\u032A",
|
|
807
|
+
"\u032B",
|
|
808
|
+
"\u032C",
|
|
809
|
+
"\u032D",
|
|
810
|
+
"\u032E",
|
|
811
|
+
"\u032F",
|
|
812
|
+
"\u0330",
|
|
813
|
+
"\u0331",
|
|
814
|
+
"\u0332",
|
|
815
|
+
"\u0333",
|
|
816
|
+
"\u0339",
|
|
817
|
+
"\u033A",
|
|
818
|
+
"\u033B",
|
|
819
|
+
"\u033C",
|
|
820
|
+
"\u0345",
|
|
821
|
+
"\u0347",
|
|
822
|
+
"\u0348",
|
|
823
|
+
"\u0349",
|
|
824
|
+
"\u034D",
|
|
825
|
+
"\u034E",
|
|
826
|
+
"\u0353",
|
|
827
|
+
"\u0354",
|
|
828
|
+
"\u0355",
|
|
829
|
+
"\u0356",
|
|
830
|
+
"\u0359",
|
|
831
|
+
"\u035A",
|
|
832
|
+
"\u0323"
|
|
833
|
+
],
|
|
834
|
+
"mid": [
|
|
835
|
+
"\u0315",
|
|
836
|
+
"\u031B",
|
|
837
|
+
"\u0300",
|
|
838
|
+
"\u0301",
|
|
839
|
+
"\u0358",
|
|
840
|
+
"\u0321",
|
|
841
|
+
"\u0322",
|
|
842
|
+
"\u0327",
|
|
843
|
+
"\u0328",
|
|
844
|
+
"\u0334",
|
|
845
|
+
"\u0335",
|
|
846
|
+
"\u0336",
|
|
847
|
+
"\u035C",
|
|
848
|
+
"\u035D",
|
|
849
|
+
"\u035E",
|
|
850
|
+
"\u035F",
|
|
851
|
+
"\u0360",
|
|
852
|
+
"\u0362",
|
|
853
|
+
"\u0338",
|
|
854
|
+
"\u0337",
|
|
855
|
+
"\u0361",
|
|
856
|
+
" \u0489"
|
|
857
|
+
]
|
|
858
|
+
};
|
|
859
|
+
var all = [].concat(soul.up, soul.down, soul.mid);
|
|
860
|
+
function randomNumber(range) {
|
|
861
|
+
var r = Math.floor(Math.random() * range);
|
|
862
|
+
return r;
|
|
863
|
+
}
|
|
864
|
+
__name(randomNumber, "randomNumber");
|
|
865
|
+
function isChar(character) {
|
|
866
|
+
var bool = false;
|
|
867
|
+
all.filter(function(i) {
|
|
868
|
+
bool = i === character;
|
|
869
|
+
});
|
|
870
|
+
return bool;
|
|
871
|
+
}
|
|
872
|
+
__name(isChar, "isChar");
|
|
873
|
+
function heComes(text3, options2) {
|
|
874
|
+
var result = "";
|
|
875
|
+
var counts;
|
|
876
|
+
var l;
|
|
877
|
+
options2 = options2 || {};
|
|
878
|
+
options2["up"] = typeof options2["up"] !== "undefined" ? options2["up"] : true;
|
|
879
|
+
options2["mid"] = typeof options2["mid"] !== "undefined" ? options2["mid"] : true;
|
|
880
|
+
options2["down"] = typeof options2["down"] !== "undefined" ? options2["down"] : true;
|
|
881
|
+
options2["size"] = typeof options2["size"] !== "undefined" ? options2["size"] : "maxi";
|
|
882
|
+
text3 = text3.split("");
|
|
883
|
+
for (l in text3) {
|
|
884
|
+
if (isChar(l)) {
|
|
885
|
+
continue;
|
|
886
|
+
}
|
|
887
|
+
result = result + text3[l];
|
|
888
|
+
counts = { "up": 0, "down": 0, "mid": 0 };
|
|
889
|
+
switch (options2.size) {
|
|
890
|
+
case "mini":
|
|
891
|
+
counts.up = randomNumber(8);
|
|
892
|
+
counts.mid = randomNumber(2);
|
|
893
|
+
counts.down = randomNumber(8);
|
|
894
|
+
break;
|
|
895
|
+
case "maxi":
|
|
896
|
+
counts.up = randomNumber(16) + 3;
|
|
897
|
+
counts.mid = randomNumber(4) + 1;
|
|
898
|
+
counts.down = randomNumber(64) + 3;
|
|
899
|
+
break;
|
|
900
|
+
default:
|
|
901
|
+
counts.up = randomNumber(8) + 1;
|
|
902
|
+
counts.mid = randomNumber(6) / 2;
|
|
903
|
+
counts.down = randomNumber(8) + 1;
|
|
904
|
+
break;
|
|
905
|
+
}
|
|
906
|
+
var arr = ["up", "mid", "down"];
|
|
907
|
+
for (var d in arr) {
|
|
908
|
+
var index = arr[d];
|
|
909
|
+
for (var i = 0; i <= counts[index]; i++) {
|
|
910
|
+
if (options2[index]) {
|
|
911
|
+
result = result + soul[index][randomNumber(soul[index].length)];
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
return result;
|
|
917
|
+
}
|
|
918
|
+
__name(heComes, "heComes");
|
|
919
|
+
return heComes(text2, options);
|
|
920
|
+
}, "zalgo");
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
|
|
924
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js
|
|
925
|
+
var require_america = __commonJS({
|
|
926
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js"(exports, module) {
|
|
927
|
+
module["exports"] = function(colors) {
|
|
928
|
+
return function(letter, i, exploded) {
|
|
929
|
+
if (letter === " ") return letter;
|
|
930
|
+
switch (i % 3) {
|
|
931
|
+
case 0:
|
|
932
|
+
return colors.red(letter);
|
|
933
|
+
case 1:
|
|
934
|
+
return colors.white(letter);
|
|
935
|
+
case 2:
|
|
936
|
+
return colors.blue(letter);
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
|
|
943
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js
|
|
944
|
+
var require_zebra = __commonJS({
|
|
945
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js"(exports, module) {
|
|
946
|
+
module["exports"] = function(colors) {
|
|
947
|
+
return function(letter, i, exploded) {
|
|
948
|
+
return i % 2 === 0 ? letter : colors.inverse(letter);
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
|
|
954
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js
|
|
955
|
+
var require_rainbow = __commonJS({
|
|
956
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js"(exports, module) {
|
|
957
|
+
module["exports"] = function(colors) {
|
|
958
|
+
var rainbowColors = ["red", "yellow", "green", "blue", "magenta"];
|
|
959
|
+
return function(letter, i, exploded) {
|
|
960
|
+
if (letter === " ") {
|
|
961
|
+
return letter;
|
|
962
|
+
} else {
|
|
963
|
+
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
|
|
970
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js
|
|
971
|
+
var require_random = __commonJS({
|
|
972
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js"(exports, module) {
|
|
973
|
+
module["exports"] = function(colors) {
|
|
974
|
+
var available = [
|
|
975
|
+
"underline",
|
|
976
|
+
"inverse",
|
|
977
|
+
"grey",
|
|
978
|
+
"yellow",
|
|
979
|
+
"red",
|
|
980
|
+
"green",
|
|
981
|
+
"blue",
|
|
982
|
+
"white",
|
|
983
|
+
"cyan",
|
|
984
|
+
"magenta",
|
|
985
|
+
"brightYellow",
|
|
986
|
+
"brightRed",
|
|
987
|
+
"brightGreen",
|
|
988
|
+
"brightBlue",
|
|
989
|
+
"brightWhite",
|
|
990
|
+
"brightCyan",
|
|
991
|
+
"brightMagenta"
|
|
992
|
+
];
|
|
993
|
+
return function(letter, i, exploded) {
|
|
994
|
+
return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 2))]](letter);
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
});
|
|
999
|
+
|
|
1000
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js
|
|
1001
|
+
var require_colors = __commonJS({
|
|
1002
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js"(exports, module) {
|
|
1003
|
+
var colors = {};
|
|
1004
|
+
module["exports"] = colors;
|
|
1005
|
+
colors.themes = {};
|
|
1006
|
+
var util = __require("util");
|
|
1007
|
+
var ansiStyles = colors.styles = require_styles();
|
|
1008
|
+
var defineProps = Object.defineProperties;
|
|
1009
|
+
var newLineRegex = new RegExp(/[\r\n]+/g);
|
|
1010
|
+
colors.supportsColor = require_supports_colors().supportsColor;
|
|
1011
|
+
if (typeof colors.enabled === "undefined") {
|
|
1012
|
+
colors.enabled = colors.supportsColor() !== false;
|
|
1013
|
+
}
|
|
1014
|
+
colors.enable = function() {
|
|
1015
|
+
colors.enabled = true;
|
|
1016
|
+
};
|
|
1017
|
+
colors.disable = function() {
|
|
1018
|
+
colors.enabled = false;
|
|
1019
|
+
};
|
|
1020
|
+
colors.stripColors = colors.strip = function(str) {
|
|
1021
|
+
return ("" + str).replace(/\x1B\[\d+m/g, "");
|
|
1022
|
+
};
|
|
1023
|
+
var stylize = colors.stylize = /* @__PURE__ */ __name(function stylize2(str, style) {
|
|
1024
|
+
if (!colors.enabled) {
|
|
1025
|
+
return str + "";
|
|
1026
|
+
}
|
|
1027
|
+
var styleMap = ansiStyles[style];
|
|
1028
|
+
if (!styleMap && style in colors) {
|
|
1029
|
+
return colors[style](str);
|
|
1030
|
+
}
|
|
1031
|
+
return styleMap.open + str + styleMap.close;
|
|
1032
|
+
}, "stylize");
|
|
1033
|
+
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
1034
|
+
var escapeStringRegexp = /* @__PURE__ */ __name(function(str) {
|
|
1035
|
+
if (typeof str !== "string") {
|
|
1036
|
+
throw new TypeError("Expected a string");
|
|
1037
|
+
}
|
|
1038
|
+
return str.replace(matchOperatorsRe, "\\$&");
|
|
1039
|
+
}, "escapeStringRegexp");
|
|
1040
|
+
function build(_styles) {
|
|
1041
|
+
var builder = /* @__PURE__ */ __name(function builder2() {
|
|
1042
|
+
return applyStyle.apply(builder2, arguments);
|
|
1043
|
+
}, "builder");
|
|
1044
|
+
builder._styles = _styles;
|
|
1045
|
+
builder.__proto__ = proto;
|
|
1046
|
+
return builder;
|
|
1047
|
+
}
|
|
1048
|
+
__name(build, "build");
|
|
1049
|
+
var styles = (function() {
|
|
1050
|
+
var ret = {};
|
|
1051
|
+
ansiStyles.grey = ansiStyles.gray;
|
|
1052
|
+
Object.keys(ansiStyles).forEach(function(key) {
|
|
1053
|
+
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
|
|
1054
|
+
ret[key] = {
|
|
1055
|
+
get: /* @__PURE__ */ __name(function() {
|
|
1056
|
+
return build(this._styles.concat(key));
|
|
1057
|
+
}, "get")
|
|
1058
|
+
};
|
|
1059
|
+
});
|
|
1060
|
+
return ret;
|
|
1061
|
+
})();
|
|
1062
|
+
var proto = defineProps(/* @__PURE__ */ __name(function colors2() {
|
|
1063
|
+
}, "colors"), styles);
|
|
1064
|
+
function applyStyle() {
|
|
1065
|
+
var args = Array.prototype.slice.call(arguments);
|
|
1066
|
+
var str = args.map(function(arg) {
|
|
1067
|
+
if (arg != null && arg.constructor === String) {
|
|
1068
|
+
return arg;
|
|
1069
|
+
} else {
|
|
1070
|
+
return util.inspect(arg);
|
|
1071
|
+
}
|
|
1072
|
+
}).join(" ");
|
|
1073
|
+
if (!colors.enabled || !str) {
|
|
1074
|
+
return str;
|
|
1075
|
+
}
|
|
1076
|
+
var newLinesPresent = str.indexOf("\n") != -1;
|
|
1077
|
+
var nestedStyles = this._styles;
|
|
1078
|
+
var i = nestedStyles.length;
|
|
1079
|
+
while (i--) {
|
|
1080
|
+
var code = ansiStyles[nestedStyles[i]];
|
|
1081
|
+
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
1082
|
+
if (newLinesPresent) {
|
|
1083
|
+
str = str.replace(newLineRegex, function(match) {
|
|
1084
|
+
return code.close + match + code.open;
|
|
1085
|
+
});
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
return str;
|
|
1089
|
+
}
|
|
1090
|
+
__name(applyStyle, "applyStyle");
|
|
1091
|
+
colors.setTheme = function(theme) {
|
|
1092
|
+
if (typeof theme === "string") {
|
|
1093
|
+
console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
for (var style in theme) {
|
|
1097
|
+
(function(style2) {
|
|
1098
|
+
colors[style2] = function(str) {
|
|
1099
|
+
if (typeof theme[style2] === "object") {
|
|
1100
|
+
var out = str;
|
|
1101
|
+
for (var i in theme[style2]) {
|
|
1102
|
+
out = colors[theme[style2][i]](out);
|
|
1103
|
+
}
|
|
1104
|
+
return out;
|
|
1105
|
+
}
|
|
1106
|
+
return colors[theme[style2]](str);
|
|
1107
|
+
};
|
|
1108
|
+
})(style);
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1111
|
+
function init() {
|
|
1112
|
+
var ret = {};
|
|
1113
|
+
Object.keys(styles).forEach(function(name) {
|
|
1114
|
+
ret[name] = {
|
|
1115
|
+
get: /* @__PURE__ */ __name(function() {
|
|
1116
|
+
return build([name]);
|
|
1117
|
+
}, "get")
|
|
1118
|
+
};
|
|
1119
|
+
});
|
|
1120
|
+
return ret;
|
|
1121
|
+
}
|
|
1122
|
+
__name(init, "init");
|
|
1123
|
+
var sequencer = /* @__PURE__ */ __name(function sequencer2(map2, str) {
|
|
1124
|
+
var exploded = str.split("");
|
|
1125
|
+
exploded = exploded.map(map2);
|
|
1126
|
+
return exploded.join("");
|
|
1127
|
+
}, "sequencer");
|
|
1128
|
+
colors.trap = require_trap();
|
|
1129
|
+
colors.zalgo = require_zalgo();
|
|
1130
|
+
colors.maps = {};
|
|
1131
|
+
colors.maps.america = require_america()(colors);
|
|
1132
|
+
colors.maps.zebra = require_zebra()(colors);
|
|
1133
|
+
colors.maps.rainbow = require_rainbow()(colors);
|
|
1134
|
+
colors.maps.random = require_random()(colors);
|
|
1135
|
+
for (map in colors.maps) {
|
|
1136
|
+
(function(map2) {
|
|
1137
|
+
colors[map2] = function(str) {
|
|
1138
|
+
return sequencer(colors.maps[map2], str);
|
|
1139
|
+
};
|
|
1140
|
+
})(map);
|
|
1141
|
+
}
|
|
1142
|
+
var map;
|
|
1143
|
+
defineProps(colors, init());
|
|
1144
|
+
}
|
|
1145
|
+
});
|
|
1146
|
+
|
|
1147
|
+
// node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js
|
|
1148
|
+
var require_safe = __commonJS({
|
|
1149
|
+
"node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js"(exports, module) {
|
|
1150
|
+
var colors = require_colors();
|
|
1151
|
+
module["exports"] = colors;
|
|
1152
|
+
}
|
|
1153
|
+
});
|
|
1154
|
+
|
|
1155
|
+
// node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/cell.js
|
|
1156
|
+
var require_cell = __commonJS({
|
|
1157
|
+
"node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/cell.js"(exports, module) {
|
|
1158
|
+
var { info, debug } = require_debug();
|
|
1159
|
+
var utils = require_utils();
|
|
1160
|
+
var Cell = class _Cell {
|
|
1161
|
+
static {
|
|
1162
|
+
__name(this, "Cell");
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* A representation of a cell within the table.
|
|
1166
|
+
* Implementations must have `init` and `draw` methods,
|
|
1167
|
+
* as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
|
|
1168
|
+
* @param options
|
|
1169
|
+
* @constructor
|
|
1170
|
+
*/
|
|
1171
|
+
constructor(options) {
|
|
1172
|
+
this.setOptions(options);
|
|
1173
|
+
this.x = null;
|
|
1174
|
+
this.y = null;
|
|
1175
|
+
}
|
|
1176
|
+
setOptions(options) {
|
|
1177
|
+
if (["boolean", "number", "bigint", "string"].indexOf(typeof options) !== -1) {
|
|
1178
|
+
options = { content: "" + options };
|
|
1179
|
+
}
|
|
1180
|
+
options = options || {};
|
|
1181
|
+
this.options = options;
|
|
1182
|
+
let content = options.content;
|
|
1183
|
+
if (["boolean", "number", "bigint", "string"].indexOf(typeof content) !== -1) {
|
|
1184
|
+
this.content = String(content);
|
|
1185
|
+
} else if (!content) {
|
|
1186
|
+
this.content = this.options.href || "";
|
|
1187
|
+
} else {
|
|
1188
|
+
throw new Error("Content needs to be a primitive, got: " + typeof content);
|
|
1189
|
+
}
|
|
1190
|
+
this.colSpan = options.colSpan || 1;
|
|
1191
|
+
this.rowSpan = options.rowSpan || 1;
|
|
1192
|
+
if (this.options.href) {
|
|
1193
|
+
Object.defineProperty(this, "href", {
|
|
1194
|
+
get() {
|
|
1195
|
+
return this.options.href;
|
|
1196
|
+
}
|
|
1197
|
+
});
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
mergeTableOptions(tableOptions, cells) {
|
|
1201
|
+
this.cells = cells;
|
|
1202
|
+
let optionsChars = this.options.chars || {};
|
|
1203
|
+
let tableChars = tableOptions.chars;
|
|
1204
|
+
let chars = this.chars = {};
|
|
1205
|
+
CHAR_NAMES.forEach(function(name) {
|
|
1206
|
+
setOption(optionsChars, tableChars, name, chars);
|
|
1207
|
+
});
|
|
1208
|
+
this.truncate = this.options.truncate || tableOptions.truncate;
|
|
1209
|
+
let style = this.options.style = this.options.style || {};
|
|
1210
|
+
let tableStyle = tableOptions.style;
|
|
1211
|
+
setOption(style, tableStyle, "padding-left", this);
|
|
1212
|
+
setOption(style, tableStyle, "padding-right", this);
|
|
1213
|
+
this.head = style.head || tableStyle.head;
|
|
1214
|
+
this.border = style.border || tableStyle.border;
|
|
1215
|
+
this.fixedWidth = tableOptions.colWidths[this.x];
|
|
1216
|
+
this.lines = this.computeLines(tableOptions);
|
|
1217
|
+
this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;
|
|
1218
|
+
this.desiredHeight = this.lines.length;
|
|
1219
|
+
}
|
|
1220
|
+
computeLines(tableOptions) {
|
|
1221
|
+
const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
|
|
1222
|
+
const { wordWrap = tableWordWrap } = this.options;
|
|
1223
|
+
if (this.fixedWidth && wordWrap) {
|
|
1224
|
+
this.fixedWidth -= this.paddingLeft + this.paddingRight;
|
|
1225
|
+
if (this.colSpan) {
|
|
1226
|
+
let i = 1;
|
|
1227
|
+
while (i < this.colSpan) {
|
|
1228
|
+
this.fixedWidth += tableOptions.colWidths[this.x + i];
|
|
1229
|
+
i++;
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
|
|
1233
|
+
const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
|
|
1234
|
+
return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
|
|
1235
|
+
}
|
|
1236
|
+
return this.wrapLines(this.content.split("\n"));
|
|
1237
|
+
}
|
|
1238
|
+
wrapLines(computedLines) {
|
|
1239
|
+
const lines = utils.colorizeLines(computedLines);
|
|
1240
|
+
if (this.href) {
|
|
1241
|
+
return lines.map((line) => utils.hyperlink(this.href, line));
|
|
1242
|
+
}
|
|
1243
|
+
return lines;
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Initializes the Cells data structure.
|
|
1247
|
+
*
|
|
1248
|
+
* @param tableOptions - A fully populated set of tableOptions.
|
|
1249
|
+
* In addition to the standard default values, tableOptions must have fully populated the
|
|
1250
|
+
* `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
|
|
1251
|
+
* of columns or rows (respectively) in this table, and each array item must be a Number.
|
|
1252
|
+
*
|
|
1253
|
+
*/
|
|
1254
|
+
init(tableOptions) {
|
|
1255
|
+
let x = this.x;
|
|
1256
|
+
let y = this.y;
|
|
1257
|
+
this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);
|
|
1258
|
+
this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);
|
|
1259
|
+
this.width = this.widths.reduce(sumPlusOne, -1);
|
|
1260
|
+
this.height = this.heights.reduce(sumPlusOne, -1);
|
|
1261
|
+
this.hAlign = this.options.hAlign || tableOptions.colAligns[x];
|
|
1262
|
+
this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];
|
|
1263
|
+
this.drawRight = x + this.colSpan == tableOptions.colWidths.length;
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Draws the given line of the cell.
|
|
1267
|
+
* This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
|
|
1268
|
+
* @param lineNum - can be `top`, `bottom` or a numerical line number.
|
|
1269
|
+
* @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
|
|
1270
|
+
* many rows below it's being called from. Otherwise it's undefined.
|
|
1271
|
+
* @returns {String} The representation of this line.
|
|
1272
|
+
*/
|
|
1273
|
+
draw(lineNum, spanningCell) {
|
|
1274
|
+
if (lineNum == "top") return this.drawTop(this.drawRight);
|
|
1275
|
+
if (lineNum == "bottom") return this.drawBottom(this.drawRight);
|
|
1276
|
+
let content = utils.truncate(this.content, 10, this.truncate);
|
|
1277
|
+
if (!lineNum) {
|
|
1278
|
+
info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
|
|
1279
|
+
} else {
|
|
1280
|
+
}
|
|
1281
|
+
let padLen = Math.max(this.height - this.lines.length, 0);
|
|
1282
|
+
let padTop;
|
|
1283
|
+
switch (this.vAlign) {
|
|
1284
|
+
case "center":
|
|
1285
|
+
padTop = Math.ceil(padLen / 2);
|
|
1286
|
+
break;
|
|
1287
|
+
case "bottom":
|
|
1288
|
+
padTop = padLen;
|
|
1289
|
+
break;
|
|
1290
|
+
default:
|
|
1291
|
+
padTop = 0;
|
|
1292
|
+
}
|
|
1293
|
+
if (lineNum < padTop || lineNum >= padTop + this.lines.length) {
|
|
1294
|
+
return this.drawEmpty(this.drawRight, spanningCell);
|
|
1295
|
+
}
|
|
1296
|
+
let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
|
|
1297
|
+
return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
|
|
1298
|
+
}
|
|
1299
|
+
/**
|
|
1300
|
+
* Renders the top line of the cell.
|
|
1301
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1302
|
+
* @returns {String}
|
|
1303
|
+
*/
|
|
1304
|
+
drawTop(drawRight) {
|
|
1305
|
+
let content = [];
|
|
1306
|
+
if (this.cells) {
|
|
1307
|
+
this.widths.forEach(function(width, index) {
|
|
1308
|
+
content.push(this._topLeftChar(index));
|
|
1309
|
+
content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], width));
|
|
1310
|
+
}, this);
|
|
1311
|
+
} else {
|
|
1312
|
+
content.push(this._topLeftChar(0));
|
|
1313
|
+
content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width));
|
|
1314
|
+
}
|
|
1315
|
+
if (drawRight) {
|
|
1316
|
+
content.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]);
|
|
1317
|
+
}
|
|
1318
|
+
return this.wrapWithStyleColors("border", content.join(""));
|
|
1319
|
+
}
|
|
1320
|
+
_topLeftChar(offset) {
|
|
1321
|
+
let x = this.x + offset;
|
|
1322
|
+
let leftChar;
|
|
1323
|
+
if (this.y == 0) {
|
|
1324
|
+
leftChar = x == 0 ? "topLeft" : offset == 0 ? "topMid" : "top";
|
|
1325
|
+
} else {
|
|
1326
|
+
if (x == 0) {
|
|
1327
|
+
leftChar = "leftMid";
|
|
1328
|
+
} else {
|
|
1329
|
+
leftChar = offset == 0 ? "midMid" : "bottomMid";
|
|
1330
|
+
if (this.cells) {
|
|
1331
|
+
let spanAbove = this.cells[this.y - 1][x] instanceof _Cell.ColSpanCell;
|
|
1332
|
+
if (spanAbove) {
|
|
1333
|
+
leftChar = offset == 0 ? "topMid" : "mid";
|
|
1334
|
+
}
|
|
1335
|
+
if (offset == 0) {
|
|
1336
|
+
let i = 1;
|
|
1337
|
+
while (this.cells[this.y][x - i] instanceof _Cell.ColSpanCell) {
|
|
1338
|
+
i++;
|
|
1339
|
+
}
|
|
1340
|
+
if (this.cells[this.y][x - i] instanceof _Cell.RowSpanCell) {
|
|
1341
|
+
leftChar = "leftMid";
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
return this.chars[leftChar];
|
|
1348
|
+
}
|
|
1349
|
+
wrapWithStyleColors(styleProperty, content) {
|
|
1350
|
+
if (this[styleProperty] && this[styleProperty].length) {
|
|
1351
|
+
try {
|
|
1352
|
+
let colors = require_safe();
|
|
1353
|
+
for (let i = this[styleProperty].length - 1; i >= 0; i--) {
|
|
1354
|
+
colors = colors[this[styleProperty][i]];
|
|
1355
|
+
}
|
|
1356
|
+
return colors(content);
|
|
1357
|
+
} catch (e) {
|
|
1358
|
+
return content;
|
|
1359
|
+
}
|
|
1360
|
+
} else {
|
|
1361
|
+
return content;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
* Renders a line of text.
|
|
1366
|
+
* @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
|
|
1367
|
+
* There may be top-padding above the first line of text.
|
|
1368
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1369
|
+
* @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
|
|
1370
|
+
* if the text fits. This is used when the cell is vertically truncated. If `false` the text should
|
|
1371
|
+
* only include the truncation symbol if the text will not fit horizontally within the cell width.
|
|
1372
|
+
* @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
|
|
1373
|
+
* @returns {String}
|
|
1374
|
+
*/
|
|
1375
|
+
drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
|
|
1376
|
+
let left = this.chars[this.x == 0 ? "left" : "middle"];
|
|
1377
|
+
if (this.x && spanningCell && this.cells) {
|
|
1378
|
+
let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
|
|
1379
|
+
while (cellLeft instanceof ColSpanCell) {
|
|
1380
|
+
cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
|
|
1381
|
+
}
|
|
1382
|
+
if (!(cellLeft instanceof RowSpanCell)) {
|
|
1383
|
+
left = this.chars["rightMid"];
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
let leftPadding = utils.repeat(" ", this.paddingLeft);
|
|
1387
|
+
let right = drawRight ? this.chars["right"] : "";
|
|
1388
|
+
let rightPadding = utils.repeat(" ", this.paddingRight);
|
|
1389
|
+
let line = this.lines[lineNum];
|
|
1390
|
+
let len = this.width - (this.paddingLeft + this.paddingRight);
|
|
1391
|
+
if (forceTruncationSymbol) line += this.truncate || "\u2026";
|
|
1392
|
+
let content = utils.truncate(line, len, this.truncate);
|
|
1393
|
+
content = utils.pad(content, len, " ", this.hAlign);
|
|
1394
|
+
content = leftPadding + content + rightPadding;
|
|
1395
|
+
return this.stylizeLine(left, content, right);
|
|
1396
|
+
}
|
|
1397
|
+
stylizeLine(left, content, right) {
|
|
1398
|
+
left = this.wrapWithStyleColors("border", left);
|
|
1399
|
+
right = this.wrapWithStyleColors("border", right);
|
|
1400
|
+
if (this.y === 0) {
|
|
1401
|
+
content = this.wrapWithStyleColors("head", content);
|
|
1402
|
+
}
|
|
1403
|
+
return left + content + right;
|
|
1404
|
+
}
|
|
1405
|
+
/**
|
|
1406
|
+
* Renders the bottom line of the cell.
|
|
1407
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1408
|
+
* @returns {String}
|
|
1409
|
+
*/
|
|
1410
|
+
drawBottom(drawRight) {
|
|
1411
|
+
let left = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"];
|
|
1412
|
+
let content = utils.repeat(this.chars.bottom, this.width);
|
|
1413
|
+
let right = drawRight ? this.chars["bottomRight"] : "";
|
|
1414
|
+
return this.wrapWithStyleColors("border", left + content + right);
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Renders a blank line of text within the cell. Used for top and/or bottom padding.
|
|
1418
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1419
|
+
* @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
|
|
1420
|
+
* @returns {String}
|
|
1421
|
+
*/
|
|
1422
|
+
drawEmpty(drawRight, spanningCell) {
|
|
1423
|
+
let left = this.chars[this.x == 0 ? "left" : "middle"];
|
|
1424
|
+
if (this.x && spanningCell && this.cells) {
|
|
1425
|
+
let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
|
|
1426
|
+
while (cellLeft instanceof ColSpanCell) {
|
|
1427
|
+
cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
|
|
1428
|
+
}
|
|
1429
|
+
if (!(cellLeft instanceof RowSpanCell)) {
|
|
1430
|
+
left = this.chars["rightMid"];
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
let right = drawRight ? this.chars["right"] : "";
|
|
1434
|
+
let content = utils.repeat(" ", this.width);
|
|
1435
|
+
return this.stylizeLine(left, content, right);
|
|
1436
|
+
}
|
|
1437
|
+
};
|
|
1438
|
+
var ColSpanCell = class {
|
|
1439
|
+
static {
|
|
1440
|
+
__name(this, "ColSpanCell");
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* A Cell that doesn't do anything. It just draws empty lines.
|
|
1444
|
+
* Used as a placeholder in column spanning.
|
|
1445
|
+
* @constructor
|
|
1446
|
+
*/
|
|
1447
|
+
constructor() {
|
|
1448
|
+
}
|
|
1449
|
+
draw(lineNum) {
|
|
1450
|
+
if (typeof lineNum === "number") {
|
|
1451
|
+
debug(`${this.y}-${this.x}: 1x1 ColSpanCell`);
|
|
1452
|
+
}
|
|
1453
|
+
return "";
|
|
1454
|
+
}
|
|
1455
|
+
init() {
|
|
1456
|
+
}
|
|
1457
|
+
mergeTableOptions() {
|
|
1458
|
+
}
|
|
1459
|
+
};
|
|
1460
|
+
var RowSpanCell = class {
|
|
1461
|
+
static {
|
|
1462
|
+
__name(this, "RowSpanCell");
|
|
1463
|
+
}
|
|
1464
|
+
/**
|
|
1465
|
+
* A placeholder Cell for a Cell that spans multiple rows.
|
|
1466
|
+
* It delegates rendering to the original cell, but adds the appropriate offset.
|
|
1467
|
+
* @param originalCell
|
|
1468
|
+
* @constructor
|
|
1469
|
+
*/
|
|
1470
|
+
constructor(originalCell) {
|
|
1471
|
+
this.originalCell = originalCell;
|
|
1472
|
+
}
|
|
1473
|
+
init(tableOptions) {
|
|
1474
|
+
let y = this.y;
|
|
1475
|
+
let originalY = this.originalCell.y;
|
|
1476
|
+
this.cellOffset = y - originalY;
|
|
1477
|
+
this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
|
|
1478
|
+
}
|
|
1479
|
+
draw(lineNum) {
|
|
1480
|
+
if (lineNum == "top") {
|
|
1481
|
+
return this.originalCell.draw(this.offset, this.cellOffset);
|
|
1482
|
+
}
|
|
1483
|
+
if (lineNum == "bottom") {
|
|
1484
|
+
return this.originalCell.draw("bottom");
|
|
1485
|
+
}
|
|
1486
|
+
debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);
|
|
1487
|
+
return this.originalCell.draw(this.offset + 1 + lineNum);
|
|
1488
|
+
}
|
|
1489
|
+
mergeTableOptions() {
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
function firstDefined(...args) {
|
|
1493
|
+
return args.filter((v) => v !== void 0 && v !== null).shift();
|
|
1494
|
+
}
|
|
1495
|
+
__name(firstDefined, "firstDefined");
|
|
1496
|
+
function setOption(objA, objB, nameB, targetObj) {
|
|
1497
|
+
let nameA = nameB.split("-");
|
|
1498
|
+
if (nameA.length > 1) {
|
|
1499
|
+
nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
|
|
1500
|
+
nameA = nameA.join("");
|
|
1501
|
+
targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);
|
|
1502
|
+
} else {
|
|
1503
|
+
targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
__name(setOption, "setOption");
|
|
1507
|
+
function findDimension(dimensionTable, startingIndex, span) {
|
|
1508
|
+
let ret = dimensionTable[startingIndex];
|
|
1509
|
+
for (let i = 1; i < span; i++) {
|
|
1510
|
+
ret += 1 + dimensionTable[startingIndex + i];
|
|
1511
|
+
}
|
|
1512
|
+
return ret;
|
|
1513
|
+
}
|
|
1514
|
+
__name(findDimension, "findDimension");
|
|
1515
|
+
function sumPlusOne(a, b) {
|
|
1516
|
+
return a + b + 1;
|
|
1517
|
+
}
|
|
1518
|
+
__name(sumPlusOne, "sumPlusOne");
|
|
1519
|
+
var CHAR_NAMES = [
|
|
1520
|
+
"top",
|
|
1521
|
+
"top-mid",
|
|
1522
|
+
"top-left",
|
|
1523
|
+
"top-right",
|
|
1524
|
+
"bottom",
|
|
1525
|
+
"bottom-mid",
|
|
1526
|
+
"bottom-left",
|
|
1527
|
+
"bottom-right",
|
|
1528
|
+
"left",
|
|
1529
|
+
"left-mid",
|
|
1530
|
+
"mid",
|
|
1531
|
+
"mid-mid",
|
|
1532
|
+
"right",
|
|
1533
|
+
"right-mid",
|
|
1534
|
+
"middle"
|
|
1535
|
+
];
|
|
1536
|
+
module.exports = Cell;
|
|
1537
|
+
module.exports.ColSpanCell = ColSpanCell;
|
|
1538
|
+
module.exports.RowSpanCell = RowSpanCell;
|
|
1539
|
+
}
|
|
1540
|
+
});
|
|
1541
|
+
|
|
1542
|
+
// node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/layout-manager.js
|
|
1543
|
+
var require_layout_manager = __commonJS({
|
|
1544
|
+
"node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/layout-manager.js"(exports, module) {
|
|
1545
|
+
var { warn, debug } = require_debug();
|
|
1546
|
+
var Cell = require_cell();
|
|
1547
|
+
var { ColSpanCell, RowSpanCell } = Cell;
|
|
1548
|
+
(function() {
|
|
1549
|
+
function next(alloc, col) {
|
|
1550
|
+
if (alloc[col] > 0) {
|
|
1551
|
+
return next(alloc, col + 1);
|
|
1552
|
+
}
|
|
1553
|
+
return col;
|
|
1554
|
+
}
|
|
1555
|
+
__name(next, "next");
|
|
1556
|
+
function layoutTable(table) {
|
|
1557
|
+
let alloc = {};
|
|
1558
|
+
table.forEach(function(row, rowIndex) {
|
|
1559
|
+
let col = 0;
|
|
1560
|
+
row.forEach(function(cell2) {
|
|
1561
|
+
cell2.y = rowIndex;
|
|
1562
|
+
cell2.x = rowIndex ? next(alloc, col) : col;
|
|
1563
|
+
const rowSpan = cell2.rowSpan || 1;
|
|
1564
|
+
const colSpan = cell2.colSpan || 1;
|
|
1565
|
+
if (rowSpan > 1) {
|
|
1566
|
+
for (let cs = 0; cs < colSpan; cs++) {
|
|
1567
|
+
alloc[cell2.x + cs] = rowSpan;
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
col = cell2.x + colSpan;
|
|
1571
|
+
});
|
|
1572
|
+
Object.keys(alloc).forEach((idx) => {
|
|
1573
|
+
alloc[idx]--;
|
|
1574
|
+
if (alloc[idx] < 1) delete alloc[idx];
|
|
1575
|
+
});
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
__name(layoutTable, "layoutTable");
|
|
1579
|
+
function maxWidth(table) {
|
|
1580
|
+
let mw = 0;
|
|
1581
|
+
table.forEach(function(row) {
|
|
1582
|
+
row.forEach(function(cell2) {
|
|
1583
|
+
mw = Math.max(mw, cell2.x + (cell2.colSpan || 1));
|
|
1584
|
+
});
|
|
1585
|
+
});
|
|
1586
|
+
return mw;
|
|
1587
|
+
}
|
|
1588
|
+
__name(maxWidth, "maxWidth");
|
|
1589
|
+
function maxHeight(table) {
|
|
1590
|
+
return table.length;
|
|
1591
|
+
}
|
|
1592
|
+
__name(maxHeight, "maxHeight");
|
|
1593
|
+
function cellsConflict(cell1, cell2) {
|
|
1594
|
+
let yMin1 = cell1.y;
|
|
1595
|
+
let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
|
|
1596
|
+
let yMin2 = cell2.y;
|
|
1597
|
+
let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);
|
|
1598
|
+
let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);
|
|
1599
|
+
let xMin1 = cell1.x;
|
|
1600
|
+
let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
|
|
1601
|
+
let xMin2 = cell2.x;
|
|
1602
|
+
let xMax2 = cell2.x - 1 + (cell2.colSpan || 1);
|
|
1603
|
+
let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);
|
|
1604
|
+
return yConflict && xConflict;
|
|
1605
|
+
}
|
|
1606
|
+
__name(cellsConflict, "cellsConflict");
|
|
1607
|
+
function conflictExists(rows, x, y) {
|
|
1608
|
+
let i_max = Math.min(rows.length - 1, y);
|
|
1609
|
+
let cell2 = { x, y };
|
|
1610
|
+
for (let i = 0; i <= i_max; i++) {
|
|
1611
|
+
let row = rows[i];
|
|
1612
|
+
for (let j = 0; j < row.length; j++) {
|
|
1613
|
+
if (cellsConflict(cell2, row[j])) {
|
|
1614
|
+
return true;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
return false;
|
|
1619
|
+
}
|
|
1620
|
+
__name(conflictExists, "conflictExists");
|
|
1621
|
+
function allBlank(rows, y, xMin, xMax) {
|
|
1622
|
+
for (let x = xMin; x < xMax; x++) {
|
|
1623
|
+
if (conflictExists(rows, x, y)) {
|
|
1624
|
+
return false;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
return true;
|
|
1628
|
+
}
|
|
1629
|
+
__name(allBlank, "allBlank");
|
|
1630
|
+
function addRowSpanCells(table) {
|
|
1631
|
+
table.forEach(function(row, rowIndex) {
|
|
1632
|
+
row.forEach(function(cell2) {
|
|
1633
|
+
for (let i = 1; i < cell2.rowSpan; i++) {
|
|
1634
|
+
let rowSpanCell = new RowSpanCell(cell2);
|
|
1635
|
+
rowSpanCell.x = cell2.x;
|
|
1636
|
+
rowSpanCell.y = cell2.y + i;
|
|
1637
|
+
rowSpanCell.colSpan = cell2.colSpan;
|
|
1638
|
+
insertCell(rowSpanCell, table[rowIndex + i]);
|
|
1639
|
+
}
|
|
1640
|
+
});
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
__name(addRowSpanCells, "addRowSpanCells");
|
|
1644
|
+
function addColSpanCells(cellRows) {
|
|
1645
|
+
for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {
|
|
1646
|
+
let cellColumns = cellRows[rowIndex];
|
|
1647
|
+
for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
|
|
1648
|
+
let cell2 = cellColumns[columnIndex];
|
|
1649
|
+
for (let k = 1; k < cell2.colSpan; k++) {
|
|
1650
|
+
let colSpanCell = new ColSpanCell();
|
|
1651
|
+
colSpanCell.x = cell2.x + k;
|
|
1652
|
+
colSpanCell.y = cell2.y;
|
|
1653
|
+
cellColumns.splice(columnIndex + 1, 0, colSpanCell);
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
__name(addColSpanCells, "addColSpanCells");
|
|
1659
|
+
function insertCell(cell2, row) {
|
|
1660
|
+
let x = 0;
|
|
1661
|
+
while (x < row.length && row[x].x < cell2.x) {
|
|
1662
|
+
x++;
|
|
1663
|
+
}
|
|
1664
|
+
row.splice(x, 0, cell2);
|
|
1665
|
+
}
|
|
1666
|
+
__name(insertCell, "insertCell");
|
|
1667
|
+
function fillInTable(table) {
|
|
1668
|
+
let h_max = maxHeight(table);
|
|
1669
|
+
let w_max = maxWidth(table);
|
|
1670
|
+
debug(`Max rows: ${h_max}; Max cols: ${w_max}`);
|
|
1671
|
+
for (let y = 0; y < h_max; y++) {
|
|
1672
|
+
for (let x = 0; x < w_max; x++) {
|
|
1673
|
+
if (!conflictExists(table, x, y)) {
|
|
1674
|
+
let opts = { x, y, colSpan: 1, rowSpan: 1 };
|
|
1675
|
+
x++;
|
|
1676
|
+
while (x < w_max && !conflictExists(table, x, y)) {
|
|
1677
|
+
opts.colSpan++;
|
|
1678
|
+
x++;
|
|
1679
|
+
}
|
|
1680
|
+
let y2 = y + 1;
|
|
1681
|
+
while (y2 < h_max && allBlank(table, y2, opts.x, opts.x + opts.colSpan)) {
|
|
1682
|
+
opts.rowSpan++;
|
|
1683
|
+
y2++;
|
|
1684
|
+
}
|
|
1685
|
+
let cell2 = new Cell(opts);
|
|
1686
|
+
cell2.x = opts.x;
|
|
1687
|
+
cell2.y = opts.y;
|
|
1688
|
+
warn(`Missing cell at ${cell2.y}-${cell2.x}.`);
|
|
1689
|
+
insertCell(cell2, table[y]);
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
__name(fillInTable, "fillInTable");
|
|
1695
|
+
function generateCells(rows) {
|
|
1696
|
+
return rows.map(function(row) {
|
|
1697
|
+
if (!Array.isArray(row)) {
|
|
1698
|
+
let key = Object.keys(row)[0];
|
|
1699
|
+
row = row[key];
|
|
1700
|
+
if (Array.isArray(row)) {
|
|
1701
|
+
row = row.slice();
|
|
1702
|
+
row.unshift(key);
|
|
1703
|
+
} else {
|
|
1704
|
+
row = [key, row];
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
return row.map(function(cell2) {
|
|
1708
|
+
return new Cell(cell2);
|
|
1709
|
+
});
|
|
1710
|
+
});
|
|
1711
|
+
}
|
|
1712
|
+
__name(generateCells, "generateCells");
|
|
1713
|
+
function makeTableLayout(rows) {
|
|
1714
|
+
let cellRows = generateCells(rows);
|
|
1715
|
+
layoutTable(cellRows);
|
|
1716
|
+
fillInTable(cellRows);
|
|
1717
|
+
addRowSpanCells(cellRows);
|
|
1718
|
+
addColSpanCells(cellRows);
|
|
1719
|
+
return cellRows;
|
|
1720
|
+
}
|
|
1721
|
+
__name(makeTableLayout, "makeTableLayout");
|
|
1722
|
+
module.exports = {
|
|
1723
|
+
makeTableLayout,
|
|
1724
|
+
layoutTable,
|
|
1725
|
+
addRowSpanCells,
|
|
1726
|
+
maxWidth,
|
|
1727
|
+
fillInTable,
|
|
1728
|
+
computeWidths: makeComputeWidths("colSpan", "desiredWidth", "x", 1),
|
|
1729
|
+
computeHeights: makeComputeWidths("rowSpan", "desiredHeight", "y", 1)
|
|
1730
|
+
};
|
|
1731
|
+
})();
|
|
1732
|
+
function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) {
|
|
1733
|
+
return function(vals, table) {
|
|
1734
|
+
let result = [];
|
|
1735
|
+
let spanners = [];
|
|
1736
|
+
let auto = {};
|
|
1737
|
+
table.forEach(function(row) {
|
|
1738
|
+
row.forEach(function(cell2) {
|
|
1739
|
+
if ((cell2[colSpan] || 1) > 1) {
|
|
1740
|
+
spanners.push(cell2);
|
|
1741
|
+
} else {
|
|
1742
|
+
result[cell2[x]] = Math.max(result[cell2[x]] || 0, cell2[desiredWidth] || 0, forcedMin);
|
|
1743
|
+
}
|
|
1744
|
+
});
|
|
1745
|
+
});
|
|
1746
|
+
vals.forEach(function(val, index) {
|
|
1747
|
+
if (typeof val === "number") {
|
|
1748
|
+
result[index] = val;
|
|
1749
|
+
}
|
|
1750
|
+
});
|
|
1751
|
+
for (let k = spanners.length - 1; k >= 0; k--) {
|
|
1752
|
+
let cell2 = spanners[k];
|
|
1753
|
+
let span = cell2[colSpan];
|
|
1754
|
+
let col = cell2[x];
|
|
1755
|
+
let existingWidth = result[col];
|
|
1756
|
+
let editableCols = typeof vals[col] === "number" ? 0 : 1;
|
|
1757
|
+
if (typeof existingWidth === "number") {
|
|
1758
|
+
for (let i = 1; i < span; i++) {
|
|
1759
|
+
existingWidth += 1 + result[col + i];
|
|
1760
|
+
if (typeof vals[col + i] !== "number") {
|
|
1761
|
+
editableCols++;
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
} else {
|
|
1765
|
+
existingWidth = desiredWidth === "desiredWidth" ? cell2.desiredWidth - 1 : 1;
|
|
1766
|
+
if (!auto[col] || auto[col] < existingWidth) {
|
|
1767
|
+
auto[col] = existingWidth;
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
if (cell2[desiredWidth] > existingWidth) {
|
|
1771
|
+
let i = 0;
|
|
1772
|
+
while (editableCols > 0 && cell2[desiredWidth] > existingWidth) {
|
|
1773
|
+
if (typeof vals[col + i] !== "number") {
|
|
1774
|
+
let dif = Math.round((cell2[desiredWidth] - existingWidth) / editableCols);
|
|
1775
|
+
existingWidth += dif;
|
|
1776
|
+
result[col + i] += dif;
|
|
1777
|
+
editableCols--;
|
|
1778
|
+
}
|
|
1779
|
+
i++;
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
Object.assign(vals, result, auto);
|
|
1784
|
+
for (let j = 0; j < vals.length; j++) {
|
|
1785
|
+
vals[j] = Math.max(forcedMin, vals[j] || 0);
|
|
1786
|
+
}
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
__name(makeComputeWidths, "makeComputeWidths");
|
|
1790
|
+
}
|
|
1791
|
+
});
|
|
1792
|
+
|
|
1793
|
+
// node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/table.js
|
|
1794
|
+
var require_table = __commonJS({
|
|
1795
|
+
"node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/table.js"(exports, module) {
|
|
1796
|
+
var debug = require_debug();
|
|
1797
|
+
var utils = require_utils();
|
|
1798
|
+
var tableLayout = require_layout_manager();
|
|
1799
|
+
var Table2 = class extends Array {
|
|
1800
|
+
static {
|
|
1801
|
+
__name(this, "Table");
|
|
1802
|
+
}
|
|
1803
|
+
constructor(opts) {
|
|
1804
|
+
super();
|
|
1805
|
+
const options = utils.mergeOptions(opts);
|
|
1806
|
+
Object.defineProperty(this, "options", {
|
|
1807
|
+
value: options,
|
|
1808
|
+
enumerable: options.debug
|
|
1809
|
+
});
|
|
1810
|
+
if (options.debug) {
|
|
1811
|
+
switch (typeof options.debug) {
|
|
1812
|
+
case "boolean":
|
|
1813
|
+
debug.setDebugLevel(debug.WARN);
|
|
1814
|
+
break;
|
|
1815
|
+
case "number":
|
|
1816
|
+
debug.setDebugLevel(options.debug);
|
|
1817
|
+
break;
|
|
1818
|
+
case "string":
|
|
1819
|
+
debug.setDebugLevel(parseInt(options.debug, 10));
|
|
1820
|
+
break;
|
|
1821
|
+
default:
|
|
1822
|
+
debug.setDebugLevel(debug.WARN);
|
|
1823
|
+
debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);
|
|
1824
|
+
}
|
|
1825
|
+
Object.defineProperty(this, "messages", {
|
|
1826
|
+
get() {
|
|
1827
|
+
return debug.debugMessages();
|
|
1828
|
+
}
|
|
1829
|
+
});
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
toString() {
|
|
1833
|
+
let array2 = this;
|
|
1834
|
+
let headersPresent = this.options.head && this.options.head.length;
|
|
1835
|
+
if (headersPresent) {
|
|
1836
|
+
array2 = [this.options.head];
|
|
1837
|
+
if (this.length) {
|
|
1838
|
+
array2.push.apply(array2, this);
|
|
1839
|
+
}
|
|
1840
|
+
} else {
|
|
1841
|
+
this.options.style.head = [];
|
|
1842
|
+
}
|
|
1843
|
+
let cells = tableLayout.makeTableLayout(array2);
|
|
1844
|
+
cells.forEach(function(row) {
|
|
1845
|
+
row.forEach(function(cell2) {
|
|
1846
|
+
cell2.mergeTableOptions(this.options, cells);
|
|
1847
|
+
}, this);
|
|
1848
|
+
}, this);
|
|
1849
|
+
tableLayout.computeWidths(this.options.colWidths, cells);
|
|
1850
|
+
tableLayout.computeHeights(this.options.rowHeights, cells);
|
|
1851
|
+
cells.forEach(function(row) {
|
|
1852
|
+
row.forEach(function(cell2) {
|
|
1853
|
+
cell2.init(this.options);
|
|
1854
|
+
}, this);
|
|
1855
|
+
}, this);
|
|
1856
|
+
let result = [];
|
|
1857
|
+
for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
|
|
1858
|
+
let row = cells[rowIndex];
|
|
1859
|
+
let heightOfRow = this.options.rowHeights[rowIndex];
|
|
1860
|
+
if (rowIndex === 0 || !this.options.style.compact || rowIndex == 1 && headersPresent) {
|
|
1861
|
+
doDraw(row, "top", result);
|
|
1862
|
+
}
|
|
1863
|
+
for (let lineNum = 0; lineNum < heightOfRow; lineNum++) {
|
|
1864
|
+
doDraw(row, lineNum, result);
|
|
1865
|
+
}
|
|
1866
|
+
if (rowIndex + 1 == cells.length) {
|
|
1867
|
+
doDraw(row, "bottom", result);
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
return result.join("\n");
|
|
1871
|
+
}
|
|
1872
|
+
get width() {
|
|
1873
|
+
let str = this.toString().split("\n");
|
|
1874
|
+
return str[0].length;
|
|
1875
|
+
}
|
|
1876
|
+
};
|
|
1877
|
+
Table2.reset = () => debug.reset();
|
|
1878
|
+
function doDraw(row, lineNum, result) {
|
|
1879
|
+
let line = [];
|
|
1880
|
+
row.forEach(function(cell2) {
|
|
1881
|
+
line.push(cell2.draw(lineNum));
|
|
1882
|
+
});
|
|
1883
|
+
let str = line.join("");
|
|
1884
|
+
if (str.length) result.push(str);
|
|
1885
|
+
}
|
|
1886
|
+
__name(doDraw, "doDraw");
|
|
1887
|
+
module.exports = Table2;
|
|
1888
|
+
}
|
|
1889
|
+
});
|
|
1890
|
+
|
|
1891
|
+
// node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/index.js
|
|
1892
|
+
var require_cli_table3 = __commonJS({
|
|
1893
|
+
"node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/index.js"(exports, module) {
|
|
1894
|
+
module.exports = require_table();
|
|
1895
|
+
}
|
|
1896
|
+
});
|
|
1897
|
+
|
|
1898
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
|
|
1899
|
+
import { homedir, userInfo } from "node:os";
|
|
1900
|
+
import { join, posix, win32 } from "node:path";
|
|
1901
|
+
var PATH_KINDS = ["config", "state", "cache"];
|
|
1902
|
+
var OVERRIDES = { config: "CONFIG_DIR", state: "STATE_DIR", cache: "CACHE_DIR" };
|
|
1903
|
+
var overrideName = /* @__PURE__ */ __name((appName, prefix, kind) => `${prefix ?? appName.toUpperCase().replace(/[^A-Z0-9]/g, "_")}_${OVERRIDES[kind]}`, "overrideName");
|
|
1904
|
+
var defaultPaths = /* @__PURE__ */ __name(({ appName, env = process.env, platform = process.platform }) => {
|
|
1905
|
+
if (platform === "win32") {
|
|
1906
|
+
const home2 = env.USERPROFILE || homedir();
|
|
1907
|
+
const roaming = env.APPDATA || win32.join(home2, "AppData", "Roaming");
|
|
1908
|
+
const local = env.LOCALAPPDATA || win32.join(home2, "AppData", "Local");
|
|
1909
|
+
return {
|
|
1910
|
+
config: win32.join(roaming, appName, "Config"),
|
|
1911
|
+
state: win32.join(local, appName, "Data"),
|
|
1912
|
+
cache: win32.join(local, appName, "Cache")
|
|
1913
|
+
};
|
|
1914
|
+
}
|
|
1915
|
+
const home = env.HOME || homedir();
|
|
1916
|
+
return {
|
|
1917
|
+
config: posix.join(env.XDG_CONFIG_HOME || posix.join(home, ".config"), appName),
|
|
1918
|
+
state: posix.join(env.XDG_DATA_HOME || posix.join(home, ".local", "share"), appName),
|
|
1919
|
+
cache: posix.join(env.XDG_CACHE_HOME || posix.join(home, ".cache"), appName)
|
|
1920
|
+
};
|
|
1921
|
+
}, "defaultPaths");
|
|
1922
|
+
var resolvePaths = /* @__PURE__ */ __name((options) => {
|
|
1923
|
+
const { appName, prefix, env = process.env } = options;
|
|
1924
|
+
const base = defaultPaths(options);
|
|
1925
|
+
return {
|
|
1926
|
+
config: env[overrideName(appName, prefix, "config")] ?? base.config,
|
|
1927
|
+
state: env[overrideName(appName, prefix, "state")] ?? base.state,
|
|
1928
|
+
cache: env[overrideName(appName, prefix, "cache")] ?? base.cache
|
|
1929
|
+
};
|
|
1930
|
+
}, "resolvePaths");
|
|
1931
|
+
var pathsAreOverridden = /* @__PURE__ */ __name(({ appName, prefix, env = process.env }) => PATH_KINDS.some((kind) => env[overrideName(appName, prefix, kind)] !== void 0), "pathsAreOverridden");
|
|
1932
|
+
var accountHome = /* @__PURE__ */ __name(() => {
|
|
1933
|
+
try {
|
|
1934
|
+
return userInfo().homedir;
|
|
1935
|
+
} catch {
|
|
1936
|
+
return void 0;
|
|
1937
|
+
}
|
|
1938
|
+
}, "accountHome");
|
|
1939
|
+
var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = process.platform, home = accountHome() } = {}) => {
|
|
1940
|
+
if (home === void 0)
|
|
1941
|
+
return true;
|
|
1942
|
+
const appName = "app";
|
|
1943
|
+
const actual = defaultPaths({ appName, env, platform });
|
|
1944
|
+
const owners = defaultPaths({ appName, env: { HOME: home, USERPROFILE: home }, platform });
|
|
1945
|
+
return PATH_KINDS.some((kind) => actual[kind] !== owners[kind]);
|
|
1946
|
+
}, "homeIsMoved");
|
|
1947
|
+
var isMovedRun = /* @__PURE__ */ __name((options) => pathsAreOverridden(options) || homeIsMoved(options), "isMovedRun");
|
|
1948
|
+
var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join(configDir, fileName), "configFilePath");
|
|
1949
|
+
|
|
1950
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
|
|
1951
|
+
var DEFAULT_RETRY = {
|
|
1952
|
+
retries: 1,
|
|
1953
|
+
baseDelayMs: 250,
|
|
1954
|
+
maxDelayMs: 1e4,
|
|
1955
|
+
maxRetryAfterMs: 3e4
|
|
1956
|
+
};
|
|
1957
|
+
var backoffMs = /* @__PURE__ */ __name((attempt, config, random) => {
|
|
1958
|
+
const ceiling = Math.min(config.maxDelayMs, config.baseDelayMs * 2 ** (attempt - 1));
|
|
1959
|
+
return Math.round(random() * ceiling);
|
|
1960
|
+
}, "backoffMs");
|
|
1961
|
+
|
|
1962
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
|
|
1963
|
+
var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
1964
|
+
var validate = /* @__PURE__ */ __name((paths) => {
|
|
1965
|
+
if (paths.length === 0 || paths.length > 128 || paths.some((path) => path.length > 256 || !/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/.test(path) || path.split(".").some((part) => forbidden.has(part))))
|
|
1966
|
+
throw new CliError("validation_error", "field selection takes comma-separated field paths, for example id,source.title");
|
|
1967
|
+
}, "validate");
|
|
1968
|
+
var fieldsOf = /* @__PURE__ */ __name((value) => {
|
|
1969
|
+
const paths = value.split(",").map((one) => one.trim());
|
|
1970
|
+
validate(paths);
|
|
1971
|
+
return [...new Set(paths)];
|
|
1972
|
+
}, "fieldsOf");
|
|
1973
|
+
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "object");
|
|
1974
|
+
var retained = /* @__PURE__ */ new Set(["operation_id", "page", "next", "missing", "meta", "coverage"]);
|
|
1975
|
+
var itemPaths = /* @__PURE__ */ __name((paths) => paths.map((path) => path.startsWith("items.") ? path.slice(6) : path), "itemPaths");
|
|
1976
|
+
var onePaths = /* @__PURE__ */ __name((paths) => paths.map((path) => path.startsWith("item.") ? path.slice(5) : path), "onePaths");
|
|
1977
|
+
var select = /* @__PURE__ */ __name((value, paths) => {
|
|
1978
|
+
if (Array.isArray(value))
|
|
1979
|
+
return value.map((item) => select(item, paths));
|
|
1980
|
+
if (!object(value))
|
|
1981
|
+
return value;
|
|
1982
|
+
const result = {};
|
|
1983
|
+
const groups = /* @__PURE__ */ new Map();
|
|
1984
|
+
for (const path of paths) {
|
|
1985
|
+
const [key, ...rest] = path.split(".");
|
|
1986
|
+
if (!key)
|
|
1987
|
+
continue;
|
|
1988
|
+
const children = groups.get(key) ?? [];
|
|
1989
|
+
children.push(rest.join("."));
|
|
1990
|
+
groups.set(key, children);
|
|
1991
|
+
}
|
|
1992
|
+
for (const [key, children] of groups) {
|
|
1993
|
+
if (!Object.hasOwn(value, key) || value[key] === void 0)
|
|
1994
|
+
continue;
|
|
1995
|
+
const found = value[key];
|
|
1996
|
+
if (children.includes(""))
|
|
1997
|
+
result[key] = found;
|
|
1998
|
+
else if (object(found) || Array.isArray(found)) {
|
|
1999
|
+
const selected = select(found, children);
|
|
2000
|
+
if (Array.isArray(selected) || object(selected) && Object.keys(selected).length > 0)
|
|
2001
|
+
result[key] = selected;
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
for (const key of retained)
|
|
2005
|
+
if (Object.hasOwn(value, key))
|
|
2006
|
+
result[key] = value[key];
|
|
2007
|
+
return result;
|
|
2008
|
+
}, "select");
|
|
2009
|
+
var project = /* @__PURE__ */ __name((value, fields) => {
|
|
2010
|
+
if (Array.isArray(value))
|
|
2011
|
+
return value.map((item) => select(item, itemPaths(fields)));
|
|
2012
|
+
if (object(value) && Object.hasOwn(value, "type") && value.type === "item" && Object.hasOwn(value, "data") && Object.keys(value).every((key) => ["type", "data"].includes(key)))
|
|
2013
|
+
return { ...value, data: project(value.data, fields) };
|
|
2014
|
+
if (object(value) && Object.hasOwn(value, "type") && value.type === "end" && Object.hasOwn(value, "complete") && typeof value.complete === "boolean")
|
|
2015
|
+
return value;
|
|
2016
|
+
if (object(value) && Object.hasOwn(value, "item") && (Object.hasOwn(value, "meta") || Object.keys(value).every((key) => ["item", "next", "missing"].includes(key))))
|
|
2017
|
+
return { ...value, item: project(value.item, onePaths(fields)) };
|
|
2018
|
+
if (object(value) && Array.isArray(value.items))
|
|
2019
|
+
return { ...value, items: value.items.map((item) => select(item, itemPaths(fields))) };
|
|
2020
|
+
return select(value, object(value) && !Object.hasOwn(value, "items") ? itemPaths(fields) : fields);
|
|
2021
|
+
}, "project");
|
|
2022
|
+
var projectFields = /* @__PURE__ */ __name((value, fields) => {
|
|
2023
|
+
validate(fields);
|
|
2024
|
+
return project(value, fields);
|
|
2025
|
+
}, "projectFields");
|
|
2026
|
+
|
|
2027
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
|
|
2028
|
+
var BATCH_LIMITS = Object.freeze({
|
|
2029
|
+
requests: 32,
|
|
2030
|
+
input_bytes: 262144,
|
|
2031
|
+
read_bytes: 67108864,
|
|
2032
|
+
output_bytes: 4194304
|
|
2033
|
+
});
|
|
2034
|
+
var record2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "record");
|
|
2035
|
+
function invalid(message) {
|
|
2036
|
+
throw new CliError("validation_error", message);
|
|
2037
|
+
}
|
|
2038
|
+
__name(invalid, "invalid");
|
|
2039
|
+
var limit = /* @__PURE__ */ __name((value, maximum, name) => {
|
|
2040
|
+
if (!Number.isSafeInteger(value) || value < 1 || value > maximum)
|
|
2041
|
+
invalid(`invalid batch ${name} limit`);
|
|
2042
|
+
return value;
|
|
2043
|
+
}, "limit");
|
|
2044
|
+
var budgetError = /* @__PURE__ */ __name((kind) => new CliError("validation_error", `batch ${kind} budget exhausted; this input was not completed`, {
|
|
2045
|
+
reason: `batch.${kind}-budget`
|
|
2046
|
+
}), "budgetError");
|
|
2047
|
+
var prepareBatch = /* @__PURE__ */ __name((input, handlers) => {
|
|
2048
|
+
if (typeof input !== "string" || Buffer.byteLength(input, "utf8") > BATCH_LIMITS.input_bytes)
|
|
2049
|
+
invalid("batch input exceeds 262144 UTF-8 bytes");
|
|
2050
|
+
let value;
|
|
2051
|
+
try {
|
|
2052
|
+
value = JSON.parse(input);
|
|
2053
|
+
} catch {
|
|
2054
|
+
invalid("batch input must be a JSON object with requests");
|
|
2055
|
+
}
|
|
2056
|
+
if (!record2(value) || Object.keys(value).some((key) => key !== "requests") || !Array.isArray(value.requests))
|
|
2057
|
+
invalid("batch input must contain only a requests array");
|
|
2058
|
+
const requests = value.requests;
|
|
2059
|
+
if (requests.length < 1 || requests.length > BATCH_LIMITS.requests)
|
|
2060
|
+
invalid("batch takes 1\u201332 requests");
|
|
2061
|
+
const ids = /* @__PURE__ */ new Set();
|
|
2062
|
+
return requests.map((request) => {
|
|
2063
|
+
if (!record2(request) || Object.keys(request).some((key) => !["id", "command", "args"].includes(key)) || typeof request.id !== "string" || !/^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$/.test(request.id) || ids.has(request.id) || !Array.isArray(request.command) || request.command.length < 1 || request.command.length > 8 || request.command.some((word) => typeof word !== "string" || !/^[a-z][a-z0-9-]{0,63}$/.test(word)) || !Array.isArray(request.args) || request.args.length > 128 || request.args.some((arg) => typeof arg !== "string" || arg.includes("\0")))
|
|
2064
|
+
invalid("each batch request needs a unique id, registered command path and string args array");
|
|
2065
|
+
const id = request.id;
|
|
2066
|
+
const command = [...request.command];
|
|
2067
|
+
const args = request.args;
|
|
2068
|
+
ids.add(id);
|
|
2069
|
+
const handler = handlers.find((entry2) => entry2.command.length === command.length && entry2.command.every((word, i) => word === command[i]));
|
|
2070
|
+
if (!handler)
|
|
2071
|
+
invalid(`unsupported batch command: ${command.join(" ")}`);
|
|
2072
|
+
return { id, command, operation: handler.prepare(args) };
|
|
2073
|
+
});
|
|
2074
|
+
}, "prepareBatch");
|
|
2075
|
+
var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
|
|
2076
|
+
if (!requests.length || requests.length > BATCH_LIMITS.requests)
|
|
2077
|
+
invalid("batch takes 1\u201332 requests");
|
|
2078
|
+
if (options.fields)
|
|
2079
|
+
projectFields({}, options.fields);
|
|
2080
|
+
const maxReadBytes = limit(options.maxReadBytes ?? BATCH_LIMITS.read_bytes, BATCH_LIMITS.read_bytes, "read");
|
|
2081
|
+
const maxOutputBytes = limit(options.maxOutputBytes ?? BATCH_LIMITS.output_bytes, BATCH_LIMITS.output_bytes, "output");
|
|
2082
|
+
if (maxOutputBytes < 8192 + requests.length * 2048)
|
|
2083
|
+
invalid("batch output budget cannot hold its result framing");
|
|
2084
|
+
const errorOf = /* @__PURE__ */ __name((error) => {
|
|
2085
|
+
const object2 = errorObjectOf(error, options.failureContext).error;
|
|
2086
|
+
try {
|
|
2087
|
+
if (Buffer.byteLength(JSON.stringify(object2), "utf8") <= 512)
|
|
2088
|
+
return object2;
|
|
2089
|
+
} catch {
|
|
2090
|
+
}
|
|
2091
|
+
const fallback = errorObjectOf(error).error;
|
|
2092
|
+
return {
|
|
2093
|
+
code: fallback.code,
|
|
2094
|
+
reason: fallback.reason,
|
|
2095
|
+
message: "batch input failed; error details exceed its output allowance",
|
|
2096
|
+
retry: fallback.retry
|
|
2097
|
+
};
|
|
2098
|
+
}, "errorOf");
|
|
2099
|
+
const items = [];
|
|
2100
|
+
let reserved = 0, outputBytes = 8192, outputLimited = false;
|
|
2101
|
+
const context = {
|
|
2102
|
+
signal: options.signal,
|
|
2103
|
+
reserveReadBytes(bytes) {
|
|
2104
|
+
limit(bytes, BATCH_LIMITS.read_bytes, "operation read");
|
|
2105
|
+
if (bytes > maxReadBytes - reserved)
|
|
2106
|
+
throw budgetError("read");
|
|
2107
|
+
reserved += bytes;
|
|
2108
|
+
}
|
|
2109
|
+
};
|
|
2110
|
+
for (const [index, request] of requests.entries()) {
|
|
2111
|
+
options.signal?.throwIfAborted();
|
|
2112
|
+
const framing = { id: request.id, command: request.command };
|
|
2113
|
+
let result;
|
|
2114
|
+
if (outputLimited)
|
|
2115
|
+
result = { ...framing, status: "not_run", error: errorOf(budgetError("output")), complete: false };
|
|
2116
|
+
else {
|
|
2117
|
+
try {
|
|
2118
|
+
const answer = await request.operation.run(context);
|
|
2119
|
+
options.signal?.throwIfAborted();
|
|
2120
|
+
result = {
|
|
2121
|
+
...framing,
|
|
2122
|
+
status: "ok",
|
|
2123
|
+
...answer,
|
|
2124
|
+
...options.fields ? { answer: projectFields(answer.answer, options.fields) } : {}
|
|
2125
|
+
};
|
|
2126
|
+
const bytes = Buffer.byteLength(JSON.stringify(result), "utf8");
|
|
2127
|
+
if (bytes > maxOutputBytes - outputBytes - (requests.length - index - 1) * 2048) {
|
|
2128
|
+
outputLimited = true;
|
|
2129
|
+
result = { ...framing, status: "error", error: errorOf(budgetError("output")), complete: false };
|
|
2130
|
+
}
|
|
2131
|
+
} catch (error) {
|
|
2132
|
+
options.signal?.throwIfAborted();
|
|
2133
|
+
const object2 = errorOf(error);
|
|
2134
|
+
result = {
|
|
2135
|
+
...framing,
|
|
2136
|
+
status: object2.reason === "batch.read-budget" ? "not_run" : "error",
|
|
2137
|
+
error: object2,
|
|
2138
|
+
complete: false
|
|
2139
|
+
};
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
outputBytes += Buffer.byteLength(JSON.stringify(result), "utf8");
|
|
2143
|
+
items.push(result);
|
|
2144
|
+
}
|
|
2145
|
+
return {
|
|
2146
|
+
items,
|
|
2147
|
+
complete: items.every((item) => item.complete),
|
|
2148
|
+
read_bytes_reserved: reserved,
|
|
2149
|
+
read_bytes_limit: maxReadBytes,
|
|
2150
|
+
output_limited: outputLimited
|
|
2151
|
+
};
|
|
2152
|
+
}, "runBatch");
|
|
2153
|
+
|
|
2154
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
|
|
2155
|
+
import { randomBytes } from "node:crypto";
|
|
2156
|
+
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
2157
|
+
import { dirname, join as join2 } from "node:path";
|
|
2158
|
+
var writeSecurely = /* @__PURE__ */ __name((path, contents, mode) => {
|
|
2159
|
+
const dir = dirname(path);
|
|
2160
|
+
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
2161
|
+
const temp = join2(dir, `.${randomBytes(8).toString("hex")}.tmp`);
|
|
2162
|
+
try {
|
|
2163
|
+
writeFileSync(temp, contents, { mode, flag: "wx" });
|
|
2164
|
+
renameSync(temp, path);
|
|
2165
|
+
} catch (error) {
|
|
2166
|
+
rmSync(temp, { force: true });
|
|
2167
|
+
throw error;
|
|
2168
|
+
}
|
|
2169
|
+
}, "writeSecurely");
|
|
2170
|
+
var loadConfigFile = /* @__PURE__ */ __name((path, schema, fallback) => {
|
|
2171
|
+
let text2;
|
|
2172
|
+
try {
|
|
2173
|
+
text2 = readFileSync(path, "utf8");
|
|
2174
|
+
} catch (error) {
|
|
2175
|
+
if (error.code !== "ENOENT")
|
|
2176
|
+
throw error;
|
|
2177
|
+
return fallback();
|
|
2178
|
+
}
|
|
2179
|
+
let parsed;
|
|
2180
|
+
try {
|
|
2181
|
+
parsed = JSON.parse(text2);
|
|
2182
|
+
} catch {
|
|
2183
|
+
throw new Error(`${path} is not valid JSON`);
|
|
2184
|
+
}
|
|
2185
|
+
const result = safeParse(schema, parsed);
|
|
2186
|
+
if (!result.success) {
|
|
2187
|
+
const problems = result.issues.map((issue) => `${getDotPath(issue) ?? "(root)"}: ${issue.message}`);
|
|
2188
|
+
throw new Error(`${path} is not a valid config:
|
|
2189
|
+
${problems.join("\n ")}`);
|
|
2190
|
+
}
|
|
2191
|
+
return result.output;
|
|
2192
|
+
}, "loadConfigFile");
|
|
2193
|
+
var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
|
|
2194
|
+
writeSecurely(path, `${JSON.stringify(config, null, 2)}
|
|
2195
|
+
`, 384);
|
|
2196
|
+
}, "saveConfigFile");
|
|
2197
|
+
|
|
2198
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
|
|
2199
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
2200
|
+
import { join as join3, resolve } from "node:path";
|
|
2201
|
+
|
|
2202
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
|
|
2203
|
+
import { createRequire } from "node:module";
|
|
2204
|
+
var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
|
|
2205
|
+
var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
|
|
2206
|
+
var cached;
|
|
2207
|
+
var entryClass = /* @__PURE__ */ __name(() => {
|
|
2208
|
+
cached ??= require2("@napi-rs/keyring").Entry;
|
|
2209
|
+
return cached;
|
|
2210
|
+
}, "entryClass");
|
|
2211
|
+
var entry = /* @__PURE__ */ __name((service, account) => new (entryClass())(service, account, ENTRY_OPTIONS), "entry");
|
|
2212
|
+
var systemKeyring = {
|
|
2213
|
+
// Returns null for an absent entry rather than throwing — measured against @napi-rs/keyring
|
|
2214
|
+
// on 2026-09-13, and the difference matters: a throw here means the keychain is unusable.
|
|
2215
|
+
get: /* @__PURE__ */ __name((service, account) => entry(service, account).getPassword(), "get"),
|
|
2216
|
+
set: /* @__PURE__ */ __name((service, account, secret) => {
|
|
2217
|
+
entry(service, account).setPassword(secret);
|
|
2218
|
+
}, "set"),
|
|
2219
|
+
delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
|
|
2220
|
+
};
|
|
2221
|
+
|
|
2222
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
|
|
2223
|
+
var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
|
|
2224
|
+
var warnedRuns = /* @__PURE__ */ new WeakSet();
|
|
2225
|
+
var Credentials = class {
|
|
2226
|
+
static {
|
|
2227
|
+
__name(this, "Credentials");
|
|
2228
|
+
}
|
|
2229
|
+
#configDir;
|
|
2230
|
+
#storage;
|
|
2231
|
+
#keyring;
|
|
2232
|
+
#env;
|
|
2233
|
+
#service;
|
|
2234
|
+
#envVar;
|
|
2235
|
+
#fileName;
|
|
2236
|
+
#warn;
|
|
2237
|
+
/** Set only for a moved run with the system keyring. */
|
|
2238
|
+
#temporaryService;
|
|
2239
|
+
constructor(options) {
|
|
2240
|
+
this.#configDir = options.configDir;
|
|
2241
|
+
this.#storage = options.storage ?? "auto";
|
|
2242
|
+
this.#keyring = options.keyring ?? systemKeyring;
|
|
2243
|
+
this.#env = options.env ?? process.env;
|
|
2244
|
+
this.#envVar = options.envVar;
|
|
2245
|
+
this.#fileName = options.fileName ?? "credentials.json";
|
|
2246
|
+
this.#warn = options.warn ?? ((message) => process.stderr.write(`${message}
|
|
2247
|
+
`));
|
|
2248
|
+
this.#service = options.service;
|
|
2249
|
+
const moved = this.#keyring === systemKeyring && (options.isolated === true || homeIsMoved({ env: this.#env }));
|
|
2250
|
+
this.#temporaryService = moved ? movedRunService(options.service, options.configDir) : void 0;
|
|
2251
|
+
}
|
|
2252
|
+
read(account) {
|
|
2253
|
+
const fromEnv = this.#envVar ? this.#env[this.#envVar]?.trim() : void 0;
|
|
2254
|
+
if (fromEnv)
|
|
2255
|
+
return { secret: fromEnv, source: "environment" };
|
|
2256
|
+
const fromFile = this.#storage === "keyring" ? void 0 : this.#readFile()?.[account]?.secret;
|
|
2257
|
+
if (fromFile)
|
|
2258
|
+
return { secret: fromFile, source: "file" };
|
|
2259
|
+
if (this.#storage !== "file") {
|
|
2260
|
+
const temporary = this.#temporaryService;
|
|
2261
|
+
const fromKeyring = this.#tryKeyring(() => temporary && this.#keyring.get(temporary, account) || this.#keyring.get(this.#service, account));
|
|
2262
|
+
if (fromKeyring)
|
|
2263
|
+
return { secret: fromKeyring, source: "keyring" };
|
|
2264
|
+
}
|
|
2265
|
+
return void 0;
|
|
2266
|
+
}
|
|
2267
|
+
write(account, secret, options = {}) {
|
|
2268
|
+
const inFile = this.#storage === "auto" && this.#readFile()?.[account] !== void 0;
|
|
2269
|
+
if (this.#storage === "keyring" || this.#storage === "auto" && (options.signIn || !inFile)) {
|
|
2270
|
+
const stored = this.#tryKeyring(() => {
|
|
2271
|
+
this.#keyring.set(this.#temporaryService ?? this.#service, account, secret);
|
|
2272
|
+
return true;
|
|
2273
|
+
});
|
|
2274
|
+
if (stored) {
|
|
2275
|
+
if (inFile)
|
|
2276
|
+
this.#removeFromFile(account);
|
|
2277
|
+
return "keyring";
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
const store = this.#readFile();
|
|
2281
|
+
if (!store) {
|
|
2282
|
+
throw new CliError("configuration_error", `${this.#path()} cannot be read as a credentials file; storing now would replace every secret in it. Fix the file or move it aside, then try again.`);
|
|
2283
|
+
}
|
|
2284
|
+
store[account] = { secret };
|
|
2285
|
+
this.#writeFile(store);
|
|
2286
|
+
return "file";
|
|
2287
|
+
}
|
|
2288
|
+
remove(account) {
|
|
2289
|
+
const removed = [];
|
|
2290
|
+
if (this.#storage !== "file") {
|
|
2291
|
+
if (this.#tryKeyring(() => this.#keyring.delete(this.#temporaryService ?? this.#service, account))) {
|
|
2292
|
+
removed.push("keyring");
|
|
2293
|
+
}
|
|
2294
|
+
if (this.#temporaryService && this.#ownersEntryExists(account)) {
|
|
2295
|
+
this.#warn(removed.includes("keyring") ? `removed this run's own sign-in of ${account} from the OS keyring and kept the owner's: a run with moved folders never removes it` : `kept ${account} in the OS keyring: it is the owner's sign-in, shared with every run, and a run with moved folders never removes it`);
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
if (this.#storage !== "keyring" && this.#removeFromFile(account))
|
|
2299
|
+
removed.push("file");
|
|
2300
|
+
return removed;
|
|
2301
|
+
}
|
|
2302
|
+
#removeFromFile(account) {
|
|
2303
|
+
const store = this.#readFile();
|
|
2304
|
+
if (store?.[account] === void 0)
|
|
2305
|
+
return false;
|
|
2306
|
+
delete store[account];
|
|
2307
|
+
this.#writeFile(store);
|
|
2308
|
+
return true;
|
|
2309
|
+
}
|
|
2310
|
+
/** Only for the warning: a keyring that fails here must not fail a removal that already happened. */
|
|
2311
|
+
#ownersEntryExists(account) {
|
|
2312
|
+
try {
|
|
2313
|
+
return this.#keyring.get(this.#service, account) !== null;
|
|
2314
|
+
} catch {
|
|
2315
|
+
return false;
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
#path() {
|
|
2319
|
+
return join3(this.#configDir, this.#fileName);
|
|
2320
|
+
}
|
|
2321
|
+
/** `undefined` when the file exists but is not a store: writing would replace what it holds. */
|
|
2322
|
+
#readFile() {
|
|
2323
|
+
let text2;
|
|
2324
|
+
try {
|
|
2325
|
+
text2 = readFileSync2(this.#path(), "utf8");
|
|
2326
|
+
} catch (error) {
|
|
2327
|
+
if (error.code === "ENOENT")
|
|
2328
|
+
return {};
|
|
2329
|
+
return void 0;
|
|
2330
|
+
}
|
|
2331
|
+
try {
|
|
2332
|
+
const parsed = JSON.parse(text2);
|
|
2333
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : void 0;
|
|
2334
|
+
} catch {
|
|
2335
|
+
return void 0;
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
#writeFile(store) {
|
|
2339
|
+
writeSecurely(this.#path(), `${JSON.stringify(store, null, 2)}
|
|
2340
|
+
`, 384);
|
|
2341
|
+
}
|
|
2342
|
+
#tryKeyring(operation) {
|
|
2343
|
+
if (this.#storage === "keyring")
|
|
2344
|
+
return operation();
|
|
2345
|
+
try {
|
|
2346
|
+
return operation();
|
|
2347
|
+
} catch (error) {
|
|
2348
|
+
if (!warnedRuns.has(this.#env)) {
|
|
2349
|
+
warnedRuns.add(this.#env);
|
|
2350
|
+
this.#warn(`could not reach the OS keyring \u2014 it may be locked, or no keyring service is running (${error instanceof Error ? error.message : String(error)}); using ${this.#path()} instead, readable only by you`);
|
|
2351
|
+
}
|
|
2352
|
+
return void 0;
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
};
|
|
2356
|
+
|
|
2357
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
|
|
2358
|
+
var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
|
|
2359
|
+
var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
|
|
2360
|
+
if (signal?.aborted) {
|
|
2361
|
+
reject(abortError());
|
|
2362
|
+
return;
|
|
2363
|
+
}
|
|
2364
|
+
const timer = setTimeout(resolve2, ms);
|
|
2365
|
+
signal?.addEventListener("abort", () => {
|
|
2366
|
+
clearTimeout(timer);
|
|
2367
|
+
reject(abortError());
|
|
2368
|
+
}, { once: true });
|
|
2369
|
+
}), "realSleep");
|
|
2370
|
+
|
|
2371
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
|
|
2372
|
+
import { appendFileSync } from "node:fs";
|
|
2373
|
+
|
|
2374
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
|
|
2375
|
+
var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
|
|
2376
|
+
var logRecordSchema = strictObject({
|
|
2377
|
+
time: isoTime,
|
|
2378
|
+
severity: picklist(LOG_SEVERITIES),
|
|
2379
|
+
/** The registered event id, `provider.request.failed`: never a sentence, so never content. */
|
|
2380
|
+
body: string(),
|
|
2381
|
+
run_id: text,
|
|
2382
|
+
/** From an MCP caller's `_meta.traceparent`, when it sent one. */
|
|
2383
|
+
trace_id: optional(pipe(string(), regex(/^[0-9a-f]{32}$/, "32 lower-case hex digits"))),
|
|
2384
|
+
command: string(),
|
|
2385
|
+
attributes: record(string(), unknown()),
|
|
2386
|
+
resource: strictObject({ service: text, version: text })
|
|
2387
|
+
});
|
|
2388
|
+
var logEventSchema = strictObject({
|
|
2389
|
+
id: dottedId,
|
|
2390
|
+
meaning: text,
|
|
2391
|
+
/** Attribute keys every record of this event carries. */
|
|
2392
|
+
keys: array(string())
|
|
2393
|
+
});
|
|
2394
|
+
var defineLogEvents = /* @__PURE__ */ __name((input) => parseRegistry("log events", array(logEventSchema), input, (events) => [
|
|
2395
|
+
...duplicates(events.map((event) => event.id)).map((id) => `"${id}" is listed twice`),
|
|
2396
|
+
...events.flatMap((event) => duplicates(event.keys).map((key) => `${event.id}: key "${key}" is listed twice`))
|
|
2397
|
+
]), "defineLogEvents");
|
|
2398
|
+
var LOG_EVENTS = defineLogEvents([
|
|
2399
|
+
{ id: "command.failed", meaning: "a command ended with an error", keys: ["code", "reason"] }
|
|
2400
|
+
]);
|
|
2401
|
+
var LOG_ATTRIBUTE_KEYS = [
|
|
2402
|
+
"code",
|
|
2403
|
+
"count",
|
|
2404
|
+
"durationMs",
|
|
2405
|
+
"errorClass",
|
|
2406
|
+
"errorCode",
|
|
2407
|
+
"event",
|
|
2408
|
+
"frames",
|
|
2409
|
+
"operation",
|
|
2410
|
+
"outcome",
|
|
2411
|
+
"reason",
|
|
2412
|
+
"status"
|
|
2413
|
+
];
|
|
2414
|
+
var CONTENT_WORDS = /* @__PURE__ */ new Set([
|
|
2415
|
+
"authorization",
|
|
2416
|
+
"body",
|
|
2417
|
+
"caption",
|
|
2418
|
+
"content",
|
|
2419
|
+
"cookie",
|
|
2420
|
+
"credential",
|
|
2421
|
+
"credentials",
|
|
2422
|
+
"email",
|
|
2423
|
+
"password",
|
|
2424
|
+
"phone",
|
|
2425
|
+
"query",
|
|
2426
|
+
"secret",
|
|
2427
|
+
"text",
|
|
2428
|
+
"title",
|
|
2429
|
+
"token"
|
|
2430
|
+
]);
|
|
2431
|
+
var CONTENT_LAST_WORDS = /* @__PURE__ */ new Set(["message", "name"]);
|
|
2432
|
+
var wordsOf = /* @__PURE__ */ __name((key) => key.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[\s_.-]+/).filter(Boolean).map((word) => word.toLowerCase()), "wordsOf");
|
|
2433
|
+
var isContentKey = /* @__PURE__ */ __name((key) => {
|
|
2434
|
+
const words = wordsOf(key);
|
|
2435
|
+
return words.some((word) => CONTENT_WORDS.has(word)) || CONTENT_LAST_WORDS.has(words.at(-1) ?? "");
|
|
2436
|
+
}, "isContentKey");
|
|
2437
|
+
var TRACEPARENT = /^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;
|
|
2438
|
+
var traceIdOf = /* @__PURE__ */ __name((traceparent) => {
|
|
2439
|
+
if (typeof traceparent !== "string")
|
|
2440
|
+
return void 0;
|
|
2441
|
+
const match = TRACEPARENT.exec(traceparent.trim());
|
|
2442
|
+
if (!match)
|
|
2443
|
+
return void 0;
|
|
2444
|
+
const [, version, traceId = "", parentId = "", , rest] = match;
|
|
2445
|
+
if (version === "ff" || version === "00" && rest !== void 0)
|
|
2446
|
+
return void 0;
|
|
2447
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentId))
|
|
2448
|
+
return void 0;
|
|
2449
|
+
return traceId;
|
|
2450
|
+
}, "traceIdOf");
|
|
2451
|
+
|
|
2452
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
|
|
2453
|
+
var REDACTED_FIELDS = [
|
|
2454
|
+
"authorization",
|
|
2455
|
+
"Authorization",
|
|
2456
|
+
"apiKey",
|
|
2457
|
+
"api_key",
|
|
2458
|
+
"token",
|
|
2459
|
+
"accessToken",
|
|
2460
|
+
"access_token",
|
|
2461
|
+
"refreshToken",
|
|
2462
|
+
"refresh_token",
|
|
2463
|
+
"password",
|
|
2464
|
+
"secret",
|
|
2465
|
+
"verifyCode",
|
|
2466
|
+
"verify_code",
|
|
2467
|
+
"phone"
|
|
2468
|
+
];
|
|
2469
|
+
var NOT_ALLOWED = "[not allowed]";
|
|
2470
|
+
var logRecordOf = /* @__PURE__ */ __name(({ severity, event, time, runId, traceId, command, resource, allow = [], redact = [] }) => {
|
|
2471
|
+
const allowed = /* @__PURE__ */ new Set([...LOG_ATTRIBUTE_KEYS, ...allow]);
|
|
2472
|
+
const hidden = /* @__PURE__ */ new Set([...REDACTED_FIELDS, ...redact]);
|
|
2473
|
+
const attributes = Object.fromEntries(Object.entries(redacted(event, hidden)).map(([key, value]) => [
|
|
2474
|
+
key,
|
|
2475
|
+
allowed.has(key) ? value : NOT_ALLOWED
|
|
2476
|
+
]));
|
|
2477
|
+
const name = typeof attributes.event === "string" ? attributes.event : "";
|
|
2478
|
+
return {
|
|
2479
|
+
time,
|
|
2480
|
+
severity,
|
|
2481
|
+
body: name,
|
|
2482
|
+
run_id: runId,
|
|
2483
|
+
...traceId === void 0 ? {} : { trace_id: traceId },
|
|
2484
|
+
command,
|
|
2485
|
+
attributes,
|
|
2486
|
+
resource
|
|
2487
|
+
};
|
|
2488
|
+
}, "logRecordOf");
|
|
2489
|
+
var createRecordLog = /* @__PURE__ */ __name(({ to, runId, command, resource, traceId, redact = [], allow = [], onError = /* @__PURE__ */ __name(() => {
|
|
2490
|
+
}, "onError"), now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now") }) => {
|
|
2491
|
+
if (to === void 0)
|
|
2492
|
+
return silent;
|
|
2493
|
+
let broken = false;
|
|
2494
|
+
const write = typeof to === "string" ? (line) => {
|
|
2495
|
+
if (broken)
|
|
2496
|
+
return;
|
|
2497
|
+
try {
|
|
2498
|
+
appendFileSync(to, line, { mode: 384 });
|
|
2499
|
+
} catch (error) {
|
|
2500
|
+
broken = true;
|
|
2501
|
+
onError(error instanceof Error ? error : new Error(String(error)));
|
|
2502
|
+
}
|
|
2503
|
+
} : (line) => to(line.trimEnd());
|
|
2504
|
+
const at = /* @__PURE__ */ __name((severity) => (
|
|
2505
|
+
// A message is a sentence, and a sentence can quote content; the record names its event instead.
|
|
2506
|
+
(event, _message) => {
|
|
2507
|
+
const record3 = logRecordOf({
|
|
2508
|
+
severity,
|
|
2509
|
+
event,
|
|
2510
|
+
time: now().toISOString(),
|
|
2511
|
+
runId,
|
|
2512
|
+
...traceId === void 0 ? {} : { traceId },
|
|
2513
|
+
command,
|
|
2514
|
+
resource,
|
|
2515
|
+
allow,
|
|
2516
|
+
redact
|
|
2517
|
+
});
|
|
2518
|
+
write(`${JSON.stringify(record3)}
|
|
2519
|
+
`);
|
|
2520
|
+
}
|
|
2521
|
+
), "at");
|
|
2522
|
+
return { debug: at("debug"), info: at("info"), warn: at("warn"), error: at("error") };
|
|
2523
|
+
}, "createRecordLog");
|
|
2524
|
+
var redacted = /* @__PURE__ */ __name((value, hidden) => {
|
|
2525
|
+
const plain = value !== null && typeof value === "object" && "toJSON" in value && typeof value.toJSON === "function" ? value.toJSON() : value;
|
|
2526
|
+
if (Array.isArray(plain))
|
|
2527
|
+
return plain.map((item) => redacted(item, hidden));
|
|
2528
|
+
if (plain === null || typeof plain !== "object")
|
|
2529
|
+
return plain;
|
|
2530
|
+
return Object.fromEntries(Object.entries(plain).map(([key, item]) => [
|
|
2531
|
+
key,
|
|
2532
|
+
hidden.has(key) || isContentKey(key) ? "[redacted]" : redacted(item, hidden)
|
|
2533
|
+
]));
|
|
2534
|
+
}, "redacted");
|
|
2535
|
+
var silent = {
|
|
2536
|
+
debug: /* @__PURE__ */ __name(() => {
|
|
2537
|
+
}, "debug"),
|
|
2538
|
+
info: /* @__PURE__ */ __name(() => {
|
|
2539
|
+
}, "info"),
|
|
2540
|
+
warn: /* @__PURE__ */ __name(() => {
|
|
2541
|
+
}, "warn"),
|
|
2542
|
+
error: /* @__PURE__ */ __name(() => {
|
|
2543
|
+
}, "error")
|
|
2544
|
+
};
|
|
2545
|
+
|
|
2546
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
|
|
2547
|
+
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
2548
|
+
import { styleText } from "node:util";
|
|
2549
|
+
var renderPretty = /* @__PURE__ */ __name((value, options) => {
|
|
2550
|
+
const paint2 = palette(options.color);
|
|
2551
|
+
if (Array.isArray(value)) {
|
|
2552
|
+
if (value.length === 0)
|
|
2553
|
+
return paint2.dim("(nothing)");
|
|
2554
|
+
return isRowLike(value) ? renderTable(value, paint2) : renderJson(value);
|
|
2555
|
+
}
|
|
2556
|
+
if (isPlainObject(value)) {
|
|
2557
|
+
const listKey = Object.keys(value).find((key) => Array.isArray(value[key]) && isRowLike(value[key]));
|
|
2558
|
+
if (listKey) {
|
|
2559
|
+
const rest = Object.fromEntries(Object.entries(value).filter(([key]) => key !== listKey));
|
|
2560
|
+
const table = renderTable(value[listKey], paint2);
|
|
2561
|
+
return Object.keys(rest).length > 0 ? `${table}
|
|
2562
|
+
|
|
2563
|
+
${renderFields(rest, paint2)}` : table;
|
|
2564
|
+
}
|
|
2565
|
+
return renderFields(value, paint2);
|
|
2566
|
+
}
|
|
2567
|
+
return renderJson(value);
|
|
2568
|
+
}, "renderPretty");
|
|
2569
|
+
var indent = /* @__PURE__ */ __name((text2, spaces) => text2.split("\n").map((line) => line === "" ? line : `${" ".repeat(spaces)}${line}`).join("\n"), "indent");
|
|
2570
|
+
var paint = /* @__PURE__ */ __name((format, color) => (text2) => color ? styleText(format, text2, { validateStream: false }) : text2, "paint");
|
|
2571
|
+
var palette = /* @__PURE__ */ __name((color) => ({
|
|
2572
|
+
dim: paint("dim", color),
|
|
2573
|
+
bold: paint("bold", color),
|
|
2574
|
+
label: paint("cyan", color)
|
|
2575
|
+
}), "palette");
|
|
2576
|
+
var isPlainObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isPlainObject");
|
|
2577
|
+
var isRowLike = /* @__PURE__ */ __name((value) => value.length > 0 && value.every((item) => isPlainObject(item)) && value.length <= 500, "isRowLike");
|
|
2578
|
+
var renderTable = /* @__PURE__ */ __name((rows, paint2) => {
|
|
2579
|
+
const columns = [...new Set(rows.flatMap((row) => Object.keys(row)))];
|
|
2580
|
+
const table = new import_cli_table3.default({
|
|
2581
|
+
head: columns.map((column) => paint2.bold(visibleControls(column))),
|
|
2582
|
+
// `chars: {}` is not enough — cli-table3 falls back to its own defaults for anything unset.
|
|
2583
|
+
style: { head: [], border: [], "padding-left": 0, "padding-right": 2 },
|
|
2584
|
+
chars: BORDERLESS
|
|
2585
|
+
});
|
|
2586
|
+
for (const row of rows)
|
|
2587
|
+
table.push(columns.map((column) => cell(row[column])));
|
|
2588
|
+
return table.toString();
|
|
2589
|
+
}, "renderTable");
|
|
2590
|
+
var renderFields = /* @__PURE__ */ __name((fields, paint2) => {
|
|
2591
|
+
const rows = Object.entries(fields).map(([key, value]) => ({ label: visibleControls(key), value }));
|
|
2592
|
+
const width = Math.max(...rows.map((row) => row.label.length));
|
|
2593
|
+
return rows.map((row) => `${paint2.label(row.label.padEnd(width))} ${cell(row.value)}`).join("\n");
|
|
2594
|
+
}, "renderFields");
|
|
2595
|
+
var cell = /* @__PURE__ */ __name((value) => {
|
|
2596
|
+
if (value === null || value === void 0)
|
|
2597
|
+
return "";
|
|
2598
|
+
if (typeof value === "object")
|
|
2599
|
+
return visibleControls(JSON.stringify(value));
|
|
2600
|
+
return visibleControls(String(value));
|
|
2601
|
+
}, "cell");
|
|
2602
|
+
var renderJson = /* @__PURE__ */ __name((value) => JSON.stringify(value, null, 2), "renderJson");
|
|
2603
|
+
var BORDERLESS = {
|
|
2604
|
+
top: "",
|
|
2605
|
+
"top-mid": "",
|
|
2606
|
+
"top-left": "",
|
|
2607
|
+
"top-right": "",
|
|
2608
|
+
bottom: "",
|
|
2609
|
+
"bottom-mid": "",
|
|
2610
|
+
"bottom-left": "",
|
|
2611
|
+
"bottom-right": "",
|
|
2612
|
+
left: "",
|
|
2613
|
+
"left-mid": "",
|
|
2614
|
+
mid: "",
|
|
2615
|
+
"mid-mid": "",
|
|
2616
|
+
right: "",
|
|
2617
|
+
"right-mid": "",
|
|
2618
|
+
middle: ""
|
|
2619
|
+
};
|
|
2620
|
+
|
|
2621
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
|
|
2622
|
+
var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
|
|
2623
|
+
if (signal?.aborted)
|
|
2624
|
+
return Promise.reject(signal.reason);
|
|
2625
|
+
if (stream.destroyed)
|
|
2626
|
+
return Promise.reject(new Error("output stream closed"));
|
|
2627
|
+
if (!stream.writableNeedDrain)
|
|
2628
|
+
return Promise.resolve();
|
|
2629
|
+
return new Promise((resolve2, reject) => {
|
|
2630
|
+
const cleanup = /* @__PURE__ */ __name(() => {
|
|
2631
|
+
stream.off("drain", drained).off("error", failed).off("close", closed);
|
|
2632
|
+
signal?.removeEventListener("abort", aborted);
|
|
2633
|
+
}, "cleanup");
|
|
2634
|
+
const drained = /* @__PURE__ */ __name(() => {
|
|
2635
|
+
cleanup();
|
|
2636
|
+
resolve2();
|
|
2637
|
+
}, "drained");
|
|
2638
|
+
const failed = /* @__PURE__ */ __name((error) => {
|
|
2639
|
+
cleanup();
|
|
2640
|
+
reject(error);
|
|
2641
|
+
}, "failed");
|
|
2642
|
+
const closed = /* @__PURE__ */ __name(() => failed(new Error("output stream closed before drain")), "closed");
|
|
2643
|
+
const aborted = /* @__PURE__ */ __name(() => failed(signal?.reason), "aborted");
|
|
2644
|
+
stream.once("drain", drained).once("error", failed).once("close", closed);
|
|
2645
|
+
signal?.addEventListener("abort", aborted, { once: true });
|
|
2646
|
+
});
|
|
2647
|
+
}, "waitForDrain");
|
|
2648
|
+
|
|
2649
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
|
|
2650
|
+
var processStreams = {
|
|
2651
|
+
drain: /* @__PURE__ */ __name(async (signal) => {
|
|
2652
|
+
await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
|
|
2653
|
+
}, "drain"),
|
|
2654
|
+
data: /* @__PURE__ */ __name((text2) => {
|
|
2655
|
+
process.stdout.write(`${text2}
|
|
2656
|
+
`);
|
|
2657
|
+
}, "data"),
|
|
2658
|
+
diagnostic: /* @__PURE__ */ __name((text2) => {
|
|
2659
|
+
process.stderr.write(`${text2}
|
|
2660
|
+
`);
|
|
2661
|
+
}, "diagnostic"),
|
|
2662
|
+
progress: /* @__PURE__ */ __name((text2) => {
|
|
2663
|
+
process.stderr.write(`\r${text2.padEnd(72)}${text2 === "" ? "\r" : ""}`);
|
|
2664
|
+
}, "progress")
|
|
2665
|
+
};
|
|
2666
|
+
var captureStreams = /* @__PURE__ */ __name(() => {
|
|
2667
|
+
const stdout = [];
|
|
2668
|
+
const stderr = [];
|
|
2669
|
+
return {
|
|
2670
|
+
stdout,
|
|
2671
|
+
stderr,
|
|
2672
|
+
data: /* @__PURE__ */ __name((text2) => stdout.push(text2), "data"),
|
|
2673
|
+
diagnostic: /* @__PURE__ */ __name((text2) => stderr.push(text2), "diagnostic"),
|
|
2674
|
+
progress: /* @__PURE__ */ __name((text2) => stderr.push(text2), "progress")
|
|
2675
|
+
};
|
|
2676
|
+
}, "captureStreams");
|
|
2677
|
+
|
|
2678
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
|
|
2679
|
+
var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
|
|
2680
|
+
const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
|
|
2681
|
+
const say = /* @__PURE__ */ __name((symbol) => (message) => {
|
|
2682
|
+
if (!quiet)
|
|
2683
|
+
streams.diagnostic(mark(symbol, message));
|
|
2684
|
+
}, "say");
|
|
2685
|
+
const diagnostics = {
|
|
2686
|
+
note: say("\xB7"),
|
|
2687
|
+
success: say("\u2713"),
|
|
2688
|
+
warn: say("!"),
|
|
2689
|
+
failure: /* @__PURE__ */ __name((message) => streams.diagnostic(mark("\u2717", message)), "failure")
|
|
2690
|
+
};
|
|
2691
|
+
if (format === "jsonl") {
|
|
2692
|
+
return {
|
|
2693
|
+
...diagnostics,
|
|
2694
|
+
result: /* @__PURE__ */ __name((value) => streams.data(JSON.stringify(value)), "result"),
|
|
2695
|
+
stream: /* @__PURE__ */ __name((items) => {
|
|
2696
|
+
for (const item of items)
|
|
2697
|
+
streams.data(JSON.stringify(item));
|
|
2698
|
+
}, "stream")
|
|
2699
|
+
};
|
|
2700
|
+
}
|
|
2701
|
+
if (format === "pretty") {
|
|
2702
|
+
return {
|
|
2703
|
+
...diagnostics,
|
|
2704
|
+
result: /* @__PURE__ */ __name((value) => streams.data(renderPretty(value, { color })), "result"),
|
|
2705
|
+
stream: /* @__PURE__ */ __name((items) => streams.data(renderPretty([...items], { color })), "stream")
|
|
2706
|
+
};
|
|
2707
|
+
}
|
|
2708
|
+
return {
|
|
2709
|
+
...diagnostics,
|
|
2710
|
+
result: /* @__PURE__ */ __name((value) => streams.data(JSON.stringify(value)), "result"),
|
|
2711
|
+
stream: /* @__PURE__ */ __name((items) => streams.data(JSON.stringify([...items])), "stream")
|
|
2712
|
+
};
|
|
2713
|
+
}, "createRenderer");
|
|
2714
|
+
|
|
2715
|
+
export {
|
|
2716
|
+
fieldsOf,
|
|
2717
|
+
projectFields,
|
|
2718
|
+
BATCH_LIMITS,
|
|
2719
|
+
prepareBatch,
|
|
2720
|
+
runBatch,
|
|
2721
|
+
writeSecurely,
|
|
2722
|
+
loadConfigFile,
|
|
2723
|
+
saveConfigFile,
|
|
2724
|
+
systemKeyring,
|
|
2725
|
+
resolvePaths,
|
|
2726
|
+
pathsAreOverridden,
|
|
2727
|
+
isMovedRun,
|
|
2728
|
+
configFilePath,
|
|
2729
|
+
Credentials,
|
|
2730
|
+
realSleep,
|
|
2731
|
+
defineLogEvents,
|
|
2732
|
+
isContentKey,
|
|
2733
|
+
traceIdOf,
|
|
2734
|
+
logRecordOf,
|
|
2735
|
+
createRecordLog,
|
|
2736
|
+
indent,
|
|
2737
|
+
processStreams,
|
|
2738
|
+
captureStreams,
|
|
2739
|
+
createRenderer,
|
|
2740
|
+
DEFAULT_RETRY,
|
|
2741
|
+
backoffMs
|
|
2742
|
+
};
|