@wirecat/mail-cli 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -0
- package/README.md +9 -4
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-EEOMFTKE.js → all-profiles-PKXL5TKP.js} +10 -9
- package/dist/bundle/{anthropic-FPSVNB3F.js → anthropic-DFDNZU7C.js} +6 -6
- package/dist/bundle/{app-server-3T6UVR7B.js → app-server-WOZAOCKX.js} +47 -46
- package/dist/bundle/{bun-MSNAKMDK.js → bun-DKZAL6ML.js} +2 -2
- package/dist/bundle/{bun-sqlite-GIBBI5DV.js → bun-sqlite-2A7FS5GD.js} +5 -5
- package/dist/bundle/{chunk-7D7AKYQ2.js → chunk-2A4Z3WOC.js} +3132 -1229
- package/dist/bundle/{chunk-AXWTELO4.js → chunk-2BHY4GFP.js} +2 -2
- package/dist/bundle/{chunk-XLCFCOT4.js → chunk-3MKCLPQV.js} +14 -14
- package/dist/bundle/{chunk-3BC2XSNX.js → chunk-4DGOI6JB.js} +68 -34
- package/dist/bundle/chunk-4HVY3QPF.js +91 -0
- package/dist/bundle/{chunk-NHVOJHHD.js → chunk-4TPNRJER.js} +7 -7
- package/dist/bundle/{chunk-6O6CM2ML.js → chunk-4XRIALMN.js} +2 -2
- package/dist/bundle/{chunk-VSHQITKC.js → chunk-4YECCESG.js} +2 -2
- package/dist/bundle/{chunk-YMNF4QLY.js → chunk-5C3L2QER.js} +26 -25
- package/dist/bundle/{chunk-XPBRNJ2V.js → chunk-5W7D5H2R.js} +1 -1
- package/dist/bundle/{chunk-HANGU5HI.js → chunk-6AYJDBHT.js} +6 -6
- package/dist/bundle/{chunk-CSJYZEFR.js → chunk-6Z7VBDFR.js} +2 -3
- package/dist/bundle/{chunk-BZBNBPCR.js → chunk-73SQQXSU.js} +10 -10
- package/dist/bundle/{chunk-H5XCD6OG.js → chunk-A6O3WHBD.js} +3 -3
- package/dist/bundle/{chunk-6KDFUPBT.js → chunk-BIKMEGC7.js} +8 -8
- package/dist/bundle/{chunk-OHDDGTCH.js → chunk-BKF7XIJ5.js} +10 -10
- package/dist/bundle/{chunk-GQGJV53E.js → chunk-BY5S3JEZ.js} +47 -47
- package/dist/bundle/{chunk-CCHHEMPM.js → chunk-EB2IULWB.js} +3 -2
- package/dist/bundle/{chunk-7FCPLSSM.js → chunk-EDJQDR5X.js} +4 -4
- package/dist/bundle/{chunk-2Y3RKROM.js → chunk-ENZTLYTS.js} +53 -8
- package/dist/bundle/{chunk-VMLGER4M.js → chunk-FEWWBU2I.js} +295 -177
- package/dist/bundle/{chunk-M7JREJFC.js → chunk-G6RG2AZV.js} +27 -8
- package/dist/bundle/{chunk-V25TCQ3Z.js → chunk-HGOYQUT7.js} +1 -1
- package/dist/bundle/{chunk-ZSS22YHM.js → chunk-IA6U76ZY.js} +2 -2
- package/dist/bundle/{chunk-UFWCJUGA.js → chunk-JQTIB4WJ.js} +7 -7
- package/dist/bundle/{chunk-SOCALLW5.js → chunk-K4N5UG64.js} +6 -6
- package/dist/bundle/{chunk-URC4ATBD.js → chunk-KJYCA6IC.js} +4 -4
- package/dist/bundle/{chunk-ILHTNOIV.js → chunk-KV4267S4.js} +1 -1
- package/dist/bundle/{chunk-3QEYHTCQ.js → chunk-LARQTWIL.js} +1 -1
- package/dist/bundle/{chunk-YHSXNUFQ.js → chunk-LRBAQSU3.js} +3 -3
- package/dist/bundle/{chunk-JYZCISN7.js → chunk-M5DF6QNT.js} +13 -13
- package/dist/bundle/{chunk-7L26RKOS.js → chunk-M5VHTDJZ.js} +17 -17
- package/dist/bundle/{chunk-7CSK47S2.js → chunk-NDZK466U.js} +4 -4
- package/dist/bundle/{chunk-FVZST7ZH.js → chunk-NNLYS4IR.js} +12 -89
- package/dist/bundle/{chunk-GIZILLRJ.js → chunk-OJEIUOMW.js} +12 -12
- package/dist/bundle/chunk-OZVGHHFZ.js +35 -0
- package/dist/bundle/{chunk-MBWVZINS.js → chunk-P4SV3VKP.js} +2 -2
- package/dist/bundle/{chunk-OHFSAYZG.js → chunk-PI5P457W.js} +4 -4
- package/dist/bundle/{chunk-TBG3FRS6.js → chunk-PXLVTHMH.js} +3 -3
- package/dist/bundle/{chunk-Y2O3DACO.js → chunk-QCNK3YUZ.js} +95 -36
- package/dist/bundle/{chunk-3CBK26T2.js → chunk-QJQV6KG2.js} +2 -2
- package/dist/bundle/{chunk-UGXTDYUY.js → chunk-QSGT4ZH4.js} +1 -1
- package/dist/bundle/{chunk-VNBQHV5H.js → chunk-QTD3BVS5.js} +6 -6
- package/dist/bundle/{chunk-UUBAWUUI.js → chunk-R6UG66IM.js} +807 -464
- package/dist/bundle/{chunk-XV66LQXV.js → chunk-RBNL3DBQ.js} +3 -3
- package/dist/bundle/{chunk-EFA7FRFJ.js → chunk-RFDP45QO.js} +3 -3
- package/dist/bundle/{chunk-5XTJUQZ5.js → chunk-SPQY3PJX.js} +542 -235
- package/dist/bundle/{chunk-CJPEL2N5.js → chunk-SRHKHE4C.js} +47 -28
- package/dist/bundle/{chunk-WBI7J5B7.js → chunk-U3VX3UUC.js} +5 -5
- package/dist/bundle/{chunk-ZXLJ5EKZ.js → chunk-VQQFOA4O.js} +8 -8
- package/dist/bundle/{chunk-LO66SLGD.js → chunk-WIU733D2.js} +1 -1
- package/dist/bundle/{chunk-JBLZ5XQG.js → chunk-WOV3ABQR.js} +4 -4
- package/dist/bundle/{chunk-H3XWM2VA.js → chunk-WTDYN3TQ.js} +28 -28
- package/dist/bundle/{chunk-EW3XTUPB.js → chunk-XBIPSSKI.js} +4 -4
- package/dist/bundle/{chunk-VD5UJUNR.js → chunk-XGNC5OJG.js} +1 -1
- package/dist/bundle/{chunk-VNXCWZDW.js → chunk-XKUAEYJV.js} +249 -8
- package/dist/bundle/{chunk-PQLBPYJR.js → chunk-YPF6OS37.js} +1 -1
- package/dist/bundle/{chunk-H6Y2A4JA.js → chunk-YRHXVXLQ.js} +2 -2
- package/dist/bundle/{chunk-IGSHWMWC.js → chunk-YWIU4HOT.js} +1 -1
- package/dist/bundle/command-contract-4E4NYRR7.js +34 -0
- package/dist/bundle/{decode-YRTMNHC6.js → decode-LX4FPSI7.js} +5 -5
- package/dist/bundle/{dispatch-BCS2RDF4.js → dispatch-3ILCYZ4Q.js} +8 -8
- package/dist/bundle/{dist-NOBSXRL2.js → dist-HQIZDYNQ.js} +42 -13
- package/dist/bundle/{echarts-5UKZVIF6.js → echarts-BGBPRGR5.js} +2 -2
- package/dist/bundle/{embed-G62XY6BJ.js → embed-ASAE3H5I.js} +6 -6
- package/dist/bundle/{embedder-SCHGLA74.js → embedder-QYDZRKBX.js} +9 -9
- package/dist/bundle/{failure-N5S6ZS62.js → failure-UDL5QZRZ.js} +2 -2
- package/dist/bundle/{first-run-DPF2BBQN.js → first-run-EFNNGFCB.js} +11 -11
- package/dist/bundle/first-screen-XHM3TT6G.js +32 -0
- package/dist/bundle/{instructions-7RP5OKLE.js → instructions-6LPDSKAD.js} +1 -1
- package/dist/bundle/mail.js +12 -12
- package/dist/bundle/{mcp-MNI62HHE.js → mcp-PPVOM4SE.js} +2 -2
- package/dist/bundle/{node-ENCKD6SS.js → node-IB246NCQ.js} +2 -2
- package/dist/bundle/{node-sqlite-4ICXMPYY.js → node-sqlite-UROXM4VR.js} +6 -6
- package/dist/bundle/{oauth-CX2WYMGN.js → oauth-VSCKHS4T.js} +7 -7
- package/dist/bundle/{open-HQZYHMVE.js → open-R4LVB63T.js} +5 -5
- package/dist/bundle/{openai-3ONJIA3F.js → openai-MKCEOFKL.js} +14 -14
- package/dist/bundle/{process-OK3HRPMD.js → process-SWPJGPQC.js} +1 -1
- package/dist/bundle/{program-FLKUE6LL.js → program-CJ2YDRUY.js} +11741 -10648
- package/dist/bundle/{prompt-ZWKUQ42Y.js → prompt-TWWJ5VAM.js} +5 -5
- package/dist/bundle/{recognize-PHDYO6DC.js → recognize-XMO5ETQU.js} +4 -4
- package/dist/bundle/{remote-4CX7GFMU.js → remote-N6VAWJWE.js} +7 -7
- package/dist/bundle/{rerank-ZCZTGXDQ.js → rerank-XNAMC6FH.js} +7 -7
- package/dist/bundle/{serve-3LBS7CPR.js → serve-IJ32WEBH.js} +9 -9
- package/dist/bundle/server-CRVR4L2E.js +64 -0
- package/dist/bundle/{server-2BKI2OQP.js → server-KEYSE5OL.js} +39 -38
- package/dist/bundle/{sqlite-runtime-J5T7SR5W.js → sqlite-runtime-NFBRN7OF.js} +6 -6
- package/dist/bundle/{state-TIRNYVEL.js → state-7WPJEW2Z.js} +6 -6
- package/dist/bundle/{store-F7ZXMIAP.js → store-KHVHOGQR.js} +27 -18
- package/dist/bundle/{store-NGE2E7KZ.js → store-PKQCNACC.js} +15 -14
- package/dist/bundle/store-maintenance-command-5MODJN6R.js +54 -0
- package/dist/commands/account.d.ts.map +1 -1
- package/dist/commands/account.js +149 -3
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/context.d.ts +2 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +2 -2
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/import.d.ts +3 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +92 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +29 -3
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +9 -7
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +49 -2
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/sync.d.ts +2 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +38 -4
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +11 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +17 -0
- package/dist/config.js.map +1 -1
- package/dist/mail/doctor.d.ts +3 -2
- package/dist/mail/doctor.d.ts.map +1 -1
- package/dist/mail/doctor.js +14 -16
- package/dist/mail/doctor.js.map +1 -1
- package/dist/mail/domain-age.d.ts +29 -0
- package/dist/mail/domain-age.d.ts.map +1 -0
- package/dist/mail/domain-age.js +157 -0
- package/dist/mail/domain-age.js.map +1 -0
- package/dist/mail/mbox.d.ts +9 -0
- package/dist/mail/mbox.d.ts.map +1 -0
- package/dist/mail/mbox.js +230 -0
- package/dist/mail/mbox.js.map +1 -0
- package/dist/oauth.d.ts +13 -9
- package/dist/oauth.d.ts.map +1 -1
- package/dist/oauth.js +12 -25
- package/dist/oauth.js.map +1 -1
- package/dist/profile.d.ts +4 -1
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +6 -1
- package/dist/profile.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +10 -1
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +0 -1
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/skills/mail-cli/SKILL.md +2 -0
- package/dist/bundle/chunk-72CGQMAZ.js +0 -18
- package/dist/bundle/command-contract-6QSZ5QHQ.js +0 -33
- package/dist/bundle/first-screen-4MRKF6RQ.js +0 -31
- package/dist/bundle/server-X5F7VD2E.js +0 -63
- package/dist/bundle/store-maintenance-command-QZV76KAH.js +0 -53
- /package/dist/bundle/{chunk-NUN6OGOV.js → chunk-LU3WKZBA.js} +0 -0
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
secretNamed,
|
|
5
|
+
withoutSecrets
|
|
6
|
+
} from "./chunk-4HVY3QPF.js";
|
|
3
7
|
import {
|
|
4
8
|
isContentKey
|
|
5
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QCNK3YUZ.js";
|
|
6
10
|
import {
|
|
7
11
|
errorCodes
|
|
8
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EB2IULWB.js";
|
|
9
13
|
import {
|
|
10
14
|
__name
|
|
11
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
16
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
14
18
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
15
19
|
import { createHash } from "node:crypto";
|
|
16
20
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
18
22
|
import { homedir } from "node:os";
|
|
19
23
|
|
|
20
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/errors/failures.js
|
|
21
25
|
var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
|
|
22
26
|
var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
23
27
|
const { code, exitCode } = value ?? {};
|
|
@@ -25,7 +29,7 @@ var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
|
25
29
|
}, "isCommanderFailure");
|
|
26
30
|
var failureKey = /* @__PURE__ */ __name((error) => isCliFailure(error) ? error.code : error instanceof Error ? error.name : "error", "failureKey");
|
|
27
31
|
|
|
28
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/runs/events.js
|
|
29
33
|
var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
|
|
30
34
|
var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
31
35
|
if (event.event === "warning") {
|
|
@@ -73,88 +77,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
|
|
|
73
77
|
var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
|
|
74
78
|
var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
|
|
75
79
|
|
|
76
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
77
|
-
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
78
|
-
"authorization",
|
|
79
|
-
"cookie",
|
|
80
|
-
"credential",
|
|
81
|
-
"credentials",
|
|
82
|
-
"passphrase",
|
|
83
|
-
"password",
|
|
84
|
-
"passwd",
|
|
85
|
-
"pwd",
|
|
86
|
-
"pass",
|
|
87
|
-
"passcode",
|
|
88
|
-
"pin",
|
|
89
|
-
"otp",
|
|
90
|
-
"2fa",
|
|
91
|
-
"secret",
|
|
92
|
-
"token",
|
|
93
|
-
"contrase\xF1a",
|
|
94
|
-
"contrasena",
|
|
95
|
-
"clave",
|
|
96
|
-
"\u043F\u0430\u0440\u043E\u043B\u044C",
|
|
97
|
-
"\u043F\u0438\u043D",
|
|
98
|
-
"\u043A\u043E\u0434",
|
|
99
|
-
...["api", "auth", "service", "account", "db", "database", "priv", "private", "client"].map((word) => `${word}key`),
|
|
100
|
-
...["db", "database", "key"].map((word) => `${word}pass`)
|
|
101
|
-
]);
|
|
102
|
-
var secretNamed = /* @__PURE__ */ __name((name) => {
|
|
103
|
-
const words = name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[\s_.-]+/).map((word) => word.toLowerCase());
|
|
104
|
-
return words.some((word, at) => SECRET_WORDS.has(word) || SECRET_WORDS.has(word + (words[at + 1] ?? "")));
|
|
105
|
-
}, "secretNamed");
|
|
106
|
-
var START = "(?<![A-Za-z0-9_-])";
|
|
107
|
-
var END = "(?![A-Za-z0-9_-])";
|
|
108
|
-
var KNOWN_TOKENS = new RegExp(`${[
|
|
109
|
-
"gh[pousr]_[A-Za-z0-9]{36,}",
|
|
110
|
-
"github_pat_[A-Za-z0-9_]{22,}",
|
|
111
|
-
"sk-[A-Za-z0-9_-]{20,}",
|
|
112
|
-
"xox[abprs]-[A-Za-z0-9-]{10,}",
|
|
113
|
-
"(?:AKIA|ASIA)[A-Z0-9]{16}",
|
|
114
|
-
"AIza[A-Za-z0-9_-]{35}",
|
|
115
|
-
"(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{10,}",
|
|
116
|
-
"npm_[A-Za-z0-9]{36}",
|
|
117
|
-
"eyJ[A-Za-z0-9_-]{5,}\\.eyJ[A-Za-z0-9_-]{5,}\\.[A-Za-z0-9_-]*"
|
|
118
|
-
].map((pattern) => `${START}${pattern}${END}`).join("|")}|(?<!\\d)\\d{8,10}:[A-Za-z0-9_-]{35}${END}`, "g");
|
|
119
|
-
var PRIVATE_KEY = /-----BEGIN[A-Z ]* PRIVATE KEY-----[\s\S]*?(?:-----END[A-Z ]* PRIVATE KEY-----|$)/g;
|
|
120
|
-
var SCHEME = /(?<![A-Za-z])(Bearer|Basic)(\s+)(?![A-Z]?[a-z]+(?![A-Za-z0-9]))[A-Za-z0-9._~+/=-]{8,}/g;
|
|
121
|
-
var NAMED_PAIR = /(?<![\p{L}\p{N}])([\p{L}\p{N}_.-]*(?:token|pass|pwd|pin|otp|2fa|secret|credential|cookie|authorization|key|contrase|clave|пароль|пин|код)[\p{L}\p{N}_.-]*)(["']?\s*(?:=>|[:=])\s*["']?|\s+(?![\p{L}]+(?![\p{L}\p{N}])))((?:Bearer\s+|Basic\s+)?)([^\s"'&,;]+)/giu;
|
|
122
|
-
var looksRandom = /* @__PURE__ */ __name((run) => {
|
|
123
|
-
if (run.length < 20)
|
|
124
|
-
return false;
|
|
125
|
-
const classes = [/[a-z]/, /[A-Z]/, /\d/, /[^A-Za-z0-9]/].filter((kind) => kind.test(run)).length;
|
|
126
|
-
if (classes < 3)
|
|
127
|
-
return false;
|
|
128
|
-
let switches = 0;
|
|
129
|
-
for (let at = 1; at < run.length; at++) {
|
|
130
|
-
const [before, after] = [run[at - 1], run[at]];
|
|
131
|
-
if (/[a-z]/.test(before) && /[A-Z]/.test(after) || /[A-Z]/.test(before) && /[a-z]/.test(after))
|
|
132
|
-
switches += 1;
|
|
133
|
-
}
|
|
134
|
-
if (switches / run.length < 0.15)
|
|
135
|
-
return false;
|
|
136
|
-
const pieces = run.match(/[A-Z]?[a-z]+|[A-Z]+(?![a-z])|\d+/g) ?? [];
|
|
137
|
-
if (pieces.join("").length / Math.max(pieces.length, 1) >= 2.75)
|
|
138
|
-
return false;
|
|
139
|
-
return entropy(run) >= 3.5;
|
|
140
|
-
}, "looksRandom");
|
|
141
|
-
var entropy = /* @__PURE__ */ __name((text) => {
|
|
142
|
-
const counts = /* @__PURE__ */ new Map();
|
|
143
|
-
for (const char of text)
|
|
144
|
-
counts.set(char, (counts.get(char) ?? 0) + 1);
|
|
145
|
-
let bits = 0;
|
|
146
|
-
for (const count of counts.values())
|
|
147
|
-
bits -= count / text.length * Math.log2(count / text.length);
|
|
148
|
-
return bits;
|
|
149
|
-
}, "entropy");
|
|
150
|
-
var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.replace(PRIVATE_KEY, mark).replace(KNOWN_TOKENS, mark).replace(SCHEME, `$1$2${mark}`).replace(NAMED_PAIR, (whole, name, separator, scheme) => secretNamed(name) ? `${name}${separator}${scheme}${mark}` : whole).replace(/[!-~]{20,}/g, (token) => (
|
|
151
|
-
// A URL or a path is somebody's address, not a key; a credential in one is caught by the rules above.
|
|
152
|
-
token.includes("://") || /^(?:\/|~\/|\.\.?\/)/.test(token) ? token : token.replace(RUN, (run) => looksRandom(run) ? mark : run.replace(HEX, (hex) => entropy(hex) >= 3 ? mark : hex))
|
|
153
|
-
)), "withoutSecrets");
|
|
154
|
-
var RUN = /(?<![A-Za-z0-9_+/-])[A-Za-z0-9_+/-]{20,}/g;
|
|
155
|
-
var HEX = /(?<![A-Za-z0-9])(?=[0-9]*[a-f])[0-9a-f]{20,}(?![A-Za-z0-9])/g;
|
|
156
|
-
|
|
157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
80
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
158
81
|
var MESSAGE_AT_MOST = 500;
|
|
159
82
|
var CAUSES_AT_MOST = 5;
|
|
160
83
|
var FRAMES_AT_MOST = 15;
|
|
@@ -263,7 +186,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
|
|
|
263
186
|
return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
|
|
264
187
|
}, "redactText");
|
|
265
188
|
|
|
266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
267
190
|
var REDACTED = "[redacted]";
|
|
268
191
|
var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
|
|
269
192
|
if (!record)
|
|
@@ -2,31 +2,31 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
updateCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EDJQDR5X.js";
|
|
6
6
|
import {
|
|
7
7
|
QUESTIONS,
|
|
8
8
|
readSetupAnswers,
|
|
9
9
|
unanswered,
|
|
10
10
|
writeSetupAnswers
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-A6O3WHBD.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_STEMMERS,
|
|
14
14
|
LANGUAGES
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BIKMEGC7.js";
|
|
16
16
|
import {
|
|
17
17
|
sharedConfigPath
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-K4N5UG64.js";
|
|
19
19
|
import {
|
|
20
20
|
storePath
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OZVGHHFZ.js";
|
|
22
22
|
import {
|
|
23
23
|
installerOf
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KV4267S4.js";
|
|
25
25
|
import {
|
|
26
26
|
__name
|
|
27
27
|
} from "./chunk-ZVVMGPBJ.js";
|
|
28
28
|
|
|
29
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/cli/first-run.js
|
|
30
30
|
import { spawnSync } from "node:child_process";
|
|
31
31
|
import { accessSync, constants, realpathSync } from "node:fs";
|
|
32
32
|
import { delimiter, join } from "node:path";
|
|
@@ -84,7 +84,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
|
|
|
84
84
|
return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
|
|
85
85
|
}, "suggested");
|
|
86
86
|
var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
|
|
87
|
-
const { openStore } = await import("./store-
|
|
87
|
+
const { openStore } = await import("./store-PKQCNACC.js");
|
|
88
88
|
const store = await openStore({ env });
|
|
89
89
|
let rebuild = false;
|
|
90
90
|
try {
|
|
@@ -113,8 +113,8 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
113
113
|
if (!rebuild)
|
|
114
114
|
return;
|
|
115
115
|
const [{ openCache }, { buildStems }] = await Promise.all([
|
|
116
|
-
import("./open-
|
|
117
|
-
import("./store-maintenance-command-
|
|
116
|
+
import("./open-R4LVB63T.js"),
|
|
117
|
+
import("./store-maintenance-command-5MODJN6R.js")
|
|
118
118
|
]);
|
|
119
119
|
const database = await openCache(storePath(env));
|
|
120
120
|
try {
|
|
@@ -126,7 +126,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
126
126
|
var askTools = /* @__PURE__ */ __name(async (run) => {
|
|
127
127
|
const { command, env, io } = run;
|
|
128
128
|
const installed = run.installed ?? ((name) => onPath(name, env));
|
|
129
|
-
const { WIRECAT_TOOLS } = await import("./first-screen-
|
|
129
|
+
const { WIRECAT_TOOLS } = await import("./first-screen-XHM3TT6G.js");
|
|
130
130
|
const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
|
|
131
131
|
const missing = others.filter((tool) => !installed(tool.command));
|
|
132
132
|
io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
|
|
@@ -199,7 +199,7 @@ var setupAtStart = /* @__PURE__ */ __name(async (start) => {
|
|
|
199
199
|
contentLanguages: start.contentLanguages,
|
|
200
200
|
all: start.path[0] === "setup",
|
|
201
201
|
io: {
|
|
202
|
-
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-
|
|
202
|
+
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-TWWJ5VAM.js")).readSecret(prompt, { input, echo: true }), "ask"),
|
|
203
203
|
say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
|
|
204
204
|
`), "say")
|
|
205
205
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
resolvePaths
|
|
5
|
+
} from "./chunk-QCNK3YUZ.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
+
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/store/path.js
|
|
11
|
+
import { userInfo } from "node:os";
|
|
12
|
+
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
13
|
+
var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
|
|
14
|
+
var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
|
|
15
|
+
var accountHome = /* @__PURE__ */ __name(() => {
|
|
16
|
+
try {
|
|
17
|
+
return userInfo().homedir;
|
|
18
|
+
} catch {
|
|
19
|
+
return void 0;
|
|
20
|
+
}
|
|
21
|
+
}, "accountHome");
|
|
22
|
+
var refuseOwnerStoreInTests = /* @__PURE__ */ __name((file, env = process.env, home = accountHome()) => {
|
|
23
|
+
if (!env.VITEST || !home || file === ":memory:")
|
|
24
|
+
return;
|
|
25
|
+
const inside = relative(wirecatDirectory({ HOME: home, USERPROFILE: home }), resolve(file));
|
|
26
|
+
if (inside.startsWith("..") || isAbsolute(inside))
|
|
27
|
+
return;
|
|
28
|
+
throw new Error(`a test tried to open ${file}, in the owner's real WireCat folder; give it a MESSAGING_STORE or HOME of its own`);
|
|
29
|
+
}, "refuseOwnerStoreInTests");
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
wirecatDirectory,
|
|
33
|
+
storePath,
|
|
34
|
+
refuseOwnerStoreInTests
|
|
35
|
+
};
|
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
CAPABILITY_STATEMENTS,
|
|
5
5
|
storeCapable
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6AYJDBHT.js";
|
|
7
7
|
import {
|
|
8
8
|
importFrom
|
|
9
9
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
__name
|
|
12
12
|
} from "./chunk-ZVVMGPBJ.js";
|
|
13
13
|
|
|
14
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
|
|
15
15
|
import { spawn, spawnSync } from "node:child_process";
|
|
16
16
|
import { readFileSync } from "node:fs";
|
|
17
17
|
import { dirname } from "node:path";
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
readLock,
|
|
6
6
|
releaseLock,
|
|
7
7
|
takeLock
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LRBAQSU3.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
14
14
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
|
|
17
17
|
import { randomBytes } from "node:crypto";
|
|
18
18
|
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname } from "node:path";
|
|
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
|
|
|
86
86
|
};
|
|
87
87
|
}, "activityRecorder");
|
|
88
88
|
|
|
89
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
89
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
90
90
|
var ACCESS_SECONDS = 60 * 60;
|
|
91
91
|
var REFRESH_SECONDS = 30 * 24 * 60 * 60;
|
|
92
92
|
var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
MAX_SECRET_INPUT,
|
|
5
5
|
bufferedInput,
|
|
6
6
|
inputPolicy
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YRHXVXLQ.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EB2IULWB.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
|
|
16
16
|
import { createInterface } from "node:readline";
|
|
17
17
|
import { Writable } from "node:stream";
|
|
18
18
|
var readSecret = /* @__PURE__ */ __name(async (prompt, { input = process.stdin, output = process.stderr, echo = false, signal: givenSignal } = {}) => {
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
errorObjectOf,
|
|
8
8
|
getDotPath,
|
|
9
9
|
isoTime,
|
|
10
|
+
object,
|
|
10
11
|
optional,
|
|
11
12
|
parseRegistry,
|
|
12
13
|
picklist,
|
|
@@ -18,11 +19,11 @@ import {
|
|
|
18
19
|
string,
|
|
19
20
|
text,
|
|
20
21
|
unknown
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-G6RG2AZV.js";
|
|
22
23
|
import {
|
|
23
24
|
CliError,
|
|
24
25
|
visibleControls
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EB2IULWB.js";
|
|
26
27
|
import {
|
|
27
28
|
__commonJS,
|
|
28
29
|
__name,
|
|
@@ -1895,7 +1896,7 @@ var require_cli_table3 = __commonJS({
|
|
|
1895
1896
|
}
|
|
1896
1897
|
});
|
|
1897
1898
|
|
|
1898
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1899
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
1900
|
import { homedir, userInfo } from "node:os";
|
|
1900
1901
|
import { join, posix, win32 } from "node:path";
|
|
1901
1902
|
var PATH_KINDS = ["config", "state", "cache"];
|
|
@@ -1947,7 +1948,7 @@ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = proces
|
|
|
1947
1948
|
var isMovedRun = /* @__PURE__ */ __name((options) => pathsAreOverridden(options) || homeIsMoved(options), "isMovedRun");
|
|
1948
1949
|
var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join(configDir, fileName), "configFilePath");
|
|
1949
1950
|
|
|
1950
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1951
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
1952
|
var DEFAULT_RETRY = {
|
|
1952
1953
|
retries: 1,
|
|
1953
1954
|
baseDelayMs: 250,
|
|
@@ -1959,7 +1960,7 @@ var backoffMs = /* @__PURE__ */ __name((attempt, config, random) => {
|
|
|
1959
1960
|
return Math.round(random() * ceiling);
|
|
1960
1961
|
}, "backoffMs");
|
|
1961
1962
|
|
|
1962
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1963
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
1964
|
var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
1964
1965
|
var validate = /* @__PURE__ */ __name((paths) => {
|
|
1965
1966
|
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))))
|
|
@@ -1970,14 +1971,14 @@ var fieldsOf = /* @__PURE__ */ __name((value) => {
|
|
|
1970
1971
|
validate(paths);
|
|
1971
1972
|
return [...new Set(paths)];
|
|
1972
1973
|
}, "fieldsOf");
|
|
1973
|
-
var
|
|
1974
|
+
var object2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "object");
|
|
1974
1975
|
var retained = /* @__PURE__ */ new Set(["operation_id", "page", "next", "missing", "meta", "coverage"]);
|
|
1975
1976
|
var itemPaths = /* @__PURE__ */ __name((paths) => paths.map((path) => path.startsWith("items.") ? path.slice(6) : path), "itemPaths");
|
|
1976
1977
|
var onePaths = /* @__PURE__ */ __name((paths) => paths.map((path) => path.startsWith("item.") ? path.slice(5) : path), "onePaths");
|
|
1977
1978
|
var select = /* @__PURE__ */ __name((value, paths) => {
|
|
1978
1979
|
if (Array.isArray(value))
|
|
1979
1980
|
return value.map((item) => select(item, paths));
|
|
1980
|
-
if (!
|
|
1981
|
+
if (!object2(value))
|
|
1981
1982
|
return value;
|
|
1982
1983
|
const result = {};
|
|
1983
1984
|
const groups = /* @__PURE__ */ new Map();
|
|
@@ -1995,9 +1996,9 @@ var select = /* @__PURE__ */ __name((value, paths) => {
|
|
|
1995
1996
|
const found = value[key];
|
|
1996
1997
|
if (children.includes(""))
|
|
1997
1998
|
result[key] = found;
|
|
1998
|
-
else if (
|
|
1999
|
+
else if (object2(found) || Array.isArray(found)) {
|
|
1999
2000
|
const selected = select(found, children);
|
|
2000
|
-
if (Array.isArray(selected) ||
|
|
2001
|
+
if (Array.isArray(selected) || object2(selected) && Object.keys(selected).length > 0)
|
|
2001
2002
|
result[key] = selected;
|
|
2002
2003
|
}
|
|
2003
2004
|
}
|
|
@@ -2009,22 +2010,22 @@ var select = /* @__PURE__ */ __name((value, paths) => {
|
|
|
2009
2010
|
var project = /* @__PURE__ */ __name((value, fields) => {
|
|
2010
2011
|
if (Array.isArray(value))
|
|
2011
2012
|
return value.map((item) => select(item, itemPaths(fields)));
|
|
2012
|
-
if (
|
|
2013
|
+
if (object2(value) && Object.hasOwn(value, "type") && value.type === "item" && Object.hasOwn(value, "data") && Object.keys(value).every((key) => ["type", "data"].includes(key)))
|
|
2013
2014
|
return { ...value, data: project(value.data, fields) };
|
|
2014
|
-
if (
|
|
2015
|
+
if (object2(value) && Object.hasOwn(value, "type") && value.type === "end" && Object.hasOwn(value, "complete") && typeof value.complete === "boolean")
|
|
2015
2016
|
return value;
|
|
2016
|
-
if (
|
|
2017
|
+
if (object2(value) && Object.hasOwn(value, "item") && (Object.hasOwn(value, "meta") || Object.keys(value).every((key) => ["item", "next", "missing"].includes(key))))
|
|
2017
2018
|
return { ...value, item: project(value.item, onePaths(fields)) };
|
|
2018
|
-
if (
|
|
2019
|
+
if (object2(value) && Array.isArray(value.items))
|
|
2019
2020
|
return { ...value, items: value.items.map((item) => select(item, itemPaths(fields))) };
|
|
2020
|
-
return select(value,
|
|
2021
|
+
return select(value, object2(value) && !Object.hasOwn(value, "items") ? itemPaths(fields) : fields);
|
|
2021
2022
|
}, "project");
|
|
2022
2023
|
var projectFields = /* @__PURE__ */ __name((value, fields) => {
|
|
2023
2024
|
validate(fields);
|
|
2024
2025
|
return project(value, fields);
|
|
2025
2026
|
}, "projectFields");
|
|
2026
2027
|
|
|
2027
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2028
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
2029
|
var BATCH_LIMITS = Object.freeze({
|
|
2029
2030
|
requests: 32,
|
|
2030
2031
|
input_bytes: 262144,
|
|
@@ -2082,10 +2083,10 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
|
|
|
2082
2083
|
if (maxOutputBytes < 8192 + requests.length * 2048)
|
|
2083
2084
|
invalid("batch output budget cannot hold its result framing");
|
|
2084
2085
|
const errorOf = /* @__PURE__ */ __name((error) => {
|
|
2085
|
-
const
|
|
2086
|
+
const object3 = errorObjectOf(error, options.failureContext).error;
|
|
2086
2087
|
try {
|
|
2087
|
-
if (Buffer.byteLength(JSON.stringify(
|
|
2088
|
-
return
|
|
2088
|
+
if (Buffer.byteLength(JSON.stringify(object3), "utf8") <= 512)
|
|
2089
|
+
return object3;
|
|
2089
2090
|
} catch {
|
|
2090
2091
|
}
|
|
2091
2092
|
const fallback = errorObjectOf(error).error;
|
|
@@ -2130,11 +2131,11 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
|
|
|
2130
2131
|
}
|
|
2131
2132
|
} catch (error) {
|
|
2132
2133
|
options.signal?.throwIfAborted();
|
|
2133
|
-
const
|
|
2134
|
+
const object3 = errorOf(error);
|
|
2134
2135
|
result = {
|
|
2135
2136
|
...framing,
|
|
2136
|
-
status:
|
|
2137
|
-
error:
|
|
2137
|
+
status: object3.reason === "batch.read-budget" ? "not_run" : "error",
|
|
2138
|
+
error: object3,
|
|
2138
2139
|
complete: false
|
|
2139
2140
|
};
|
|
2140
2141
|
}
|
|
@@ -2151,7 +2152,7 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
|
|
|
2151
2152
|
};
|
|
2152
2153
|
}, "runBatch");
|
|
2153
2154
|
|
|
2154
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2155
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
2156
|
import { randomBytes } from "node:crypto";
|
|
2156
2157
|
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
2157
2158
|
import { dirname, join as join2 } from "node:path";
|
|
@@ -2195,11 +2196,66 @@ var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
|
|
|
2195
2196
|
`, 384);
|
|
2196
2197
|
}, "saveConfigFile");
|
|
2197
2198
|
|
|
2198
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2199
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/constants.js
|
|
2200
|
+
import { fileURLToPath } from "node:url";
|
|
2201
|
+
var BASE_CONSTANTS = new URL("../constants.json", new URL("constants.js", import.meta.resolve("@wirecat/cli-base")).href);
|
|
2202
|
+
var baseConstantsSchema = object({});
|
|
2203
|
+
var LayerSchema = record(string(), unknown());
|
|
2204
|
+
var isPlainObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isPlainObject");
|
|
2205
|
+
var merge = /* @__PURE__ */ __name((into, from, file, setBy, prefix = "") => {
|
|
2206
|
+
const out = { ...into };
|
|
2207
|
+
for (const [key, value] of Object.entries(from)) {
|
|
2208
|
+
const path = prefix ? `${prefix}.${key}` : key;
|
|
2209
|
+
const current = out[key];
|
|
2210
|
+
if (isPlainObject(current) && isPlainObject(value)) {
|
|
2211
|
+
out[key] = merge(current, value, file, setBy, path);
|
|
2212
|
+
} else {
|
|
2213
|
+
out[key] = value;
|
|
2214
|
+
setBy.set(path, file);
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
return out;
|
|
2218
|
+
}, "merge");
|
|
2219
|
+
var deepFreeze = /* @__PURE__ */ __name((value) => {
|
|
2220
|
+
if (typeof value === "object" && value !== null && !Object.isFrozen(value)) {
|
|
2221
|
+
for (const child of Object.values(value))
|
|
2222
|
+
deepFreeze(child);
|
|
2223
|
+
Object.freeze(value);
|
|
2224
|
+
}
|
|
2225
|
+
return value;
|
|
2226
|
+
}, "deepFreeze");
|
|
2227
|
+
var fileOf = /* @__PURE__ */ __name((path, setBy, files) => {
|
|
2228
|
+
for (let at = path.split("."); at.length > 0; at = at.slice(0, -1)) {
|
|
2229
|
+
const file = setBy.get(at.join("."));
|
|
2230
|
+
if (file)
|
|
2231
|
+
return `set in ${file}`;
|
|
2232
|
+
}
|
|
2233
|
+
return `not set in ${files.join(", ")}`;
|
|
2234
|
+
}, "fileOf");
|
|
2235
|
+
var loadConstants = /* @__PURE__ */ __name((layers, schema) => {
|
|
2236
|
+
const files = layers.map((layer) => fileURLToPath(layer));
|
|
2237
|
+
const setBy = /* @__PURE__ */ new Map();
|
|
2238
|
+
let merged = {};
|
|
2239
|
+
for (const file of files) {
|
|
2240
|
+
merged = merge(merged, loadConfigFile(file, LayerSchema, () => ({})), file, setBy);
|
|
2241
|
+
}
|
|
2242
|
+
const result = safeParse(schema, merged);
|
|
2243
|
+
if (!result.success) {
|
|
2244
|
+
const problems = result.issues.map((issue) => {
|
|
2245
|
+
const path = getDotPath(issue) ?? "(root)";
|
|
2246
|
+
return `${path}: ${issue.message} (${fileOf(path, setBy, files)})`;
|
|
2247
|
+
});
|
|
2248
|
+
throw new Error(`the packaged constants are not valid:
|
|
2249
|
+
${problems.join("\n ")}`);
|
|
2250
|
+
}
|
|
2251
|
+
return deepFreeze(result.output);
|
|
2252
|
+
}, "loadConstants");
|
|
2253
|
+
|
|
2254
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
2255
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
2200
2256
|
import { join as join3, resolve } from "node:path";
|
|
2201
2257
|
|
|
2202
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2258
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
2259
|
import { createRequire } from "node:module";
|
|
2204
2260
|
var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
|
|
2205
2261
|
var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
|
|
@@ -2219,7 +2275,7 @@ var systemKeyring = {
|
|
|
2219
2275
|
delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
|
|
2220
2276
|
};
|
|
2221
2277
|
|
|
2222
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2278
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
2279
|
var keyringService = /* @__PURE__ */ __name((service, _configDir, _isolated) => service, "keyringService");
|
|
2224
2280
|
var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
|
|
2225
2281
|
var warnedRuns = /* @__PURE__ */ new WeakSet();
|
|
@@ -2355,7 +2411,7 @@ var Credentials = class {
|
|
|
2355
2411
|
}
|
|
2356
2412
|
};
|
|
2357
2413
|
|
|
2358
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2414
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
|
|
2359
2415
|
var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
|
|
2360
2416
|
var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
|
|
2361
2417
|
if (signal?.aborted) {
|
|
@@ -2369,10 +2425,10 @@ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, re
|
|
|
2369
2425
|
}, { once: true });
|
|
2370
2426
|
}), "realSleep");
|
|
2371
2427
|
|
|
2372
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2428
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
|
|
2373
2429
|
import { appendFileSync } from "node:fs";
|
|
2374
2430
|
|
|
2375
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2431
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
|
|
2376
2432
|
var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
|
|
2377
2433
|
var logRecordSchema = strictObject({
|
|
2378
2434
|
time: isoTime,
|
|
@@ -2450,7 +2506,7 @@ var traceIdOf = /* @__PURE__ */ __name((traceparent) => {
|
|
|
2450
2506
|
return traceId;
|
|
2451
2507
|
}, "traceIdOf");
|
|
2452
2508
|
|
|
2453
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2509
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
|
|
2454
2510
|
var REDACTED_FIELDS = [
|
|
2455
2511
|
"authorization",
|
|
2456
2512
|
"Authorization",
|
|
@@ -2544,7 +2600,7 @@ var silent = {
|
|
|
2544
2600
|
}, "error")
|
|
2545
2601
|
};
|
|
2546
2602
|
|
|
2547
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2603
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
|
|
2548
2604
|
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
2549
2605
|
import { styleText } from "node:util";
|
|
2550
2606
|
var renderPretty = /* @__PURE__ */ __name((value, options) => {
|
|
@@ -2554,7 +2610,7 @@ var renderPretty = /* @__PURE__ */ __name((value, options) => {
|
|
|
2554
2610
|
return paint2.dim("(nothing)");
|
|
2555
2611
|
return isRowLike(value) ? renderTable(value, paint2) : renderJson(value);
|
|
2556
2612
|
}
|
|
2557
|
-
if (
|
|
2613
|
+
if (isPlainObject2(value)) {
|
|
2558
2614
|
const listKey = Object.keys(value).find((key) => Array.isArray(value[key]) && isRowLike(value[key]));
|
|
2559
2615
|
if (listKey) {
|
|
2560
2616
|
const rest = Object.fromEntries(Object.entries(value).filter(([key]) => key !== listKey));
|
|
@@ -2574,8 +2630,8 @@ var palette = /* @__PURE__ */ __name((color) => ({
|
|
|
2574
2630
|
bold: paint("bold", color),
|
|
2575
2631
|
label: paint("cyan", color)
|
|
2576
2632
|
}), "palette");
|
|
2577
|
-
var
|
|
2578
|
-
var isRowLike = /* @__PURE__ */ __name((value) => value.length > 0 && value.every((item) =>
|
|
2633
|
+
var isPlainObject2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isPlainObject");
|
|
2634
|
+
var isRowLike = /* @__PURE__ */ __name((value) => value.length > 0 && value.every((item) => isPlainObject2(item)) && value.length <= 500, "isRowLike");
|
|
2579
2635
|
var renderTable = /* @__PURE__ */ __name((rows, paint2) => {
|
|
2580
2636
|
const columns = [...new Set(rows.flatMap((row) => Object.keys(row)))];
|
|
2581
2637
|
const table = new import_cli_table3.default({
|
|
@@ -2619,7 +2675,7 @@ var BORDERLESS = {
|
|
|
2619
2675
|
middle: ""
|
|
2620
2676
|
};
|
|
2621
2677
|
|
|
2622
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2678
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
|
|
2623
2679
|
var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
|
|
2624
2680
|
if (signal?.aborted)
|
|
2625
2681
|
return Promise.reject(signal.reason);
|
|
@@ -2647,7 +2703,7 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
|
|
|
2647
2703
|
});
|
|
2648
2704
|
}, "waitForDrain");
|
|
2649
2705
|
|
|
2650
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2706
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
|
|
2651
2707
|
var processStreams = {
|
|
2652
2708
|
drain: /* @__PURE__ */ __name(async (signal) => {
|
|
2653
2709
|
await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
|
|
@@ -2676,7 +2732,7 @@ var captureStreams = /* @__PURE__ */ __name(() => {
|
|
|
2676
2732
|
};
|
|
2677
2733
|
}, "captureStreams");
|
|
2678
2734
|
|
|
2679
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2735
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.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
|
|
2680
2736
|
var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
|
|
2681
2737
|
const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
|
|
2682
2738
|
const say = /* @__PURE__ */ __name((symbol) => (message) => {
|
|
@@ -2722,6 +2778,9 @@ export {
|
|
|
2722
2778
|
writeSecurely,
|
|
2723
2779
|
loadConfigFile,
|
|
2724
2780
|
saveConfigFile,
|
|
2781
|
+
BASE_CONSTANTS,
|
|
2782
|
+
baseConstantsSchema,
|
|
2783
|
+
loadConstants,
|
|
2725
2784
|
systemKeyring,
|
|
2726
2785
|
resolvePaths,
|
|
2727
2786
|
pathsAreOverridden,
|