@wirecat/mail-cli 0.32.0 → 0.34.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 +31 -0
- package/contracts/wirecat.json +2 -2
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-OTCWJSJS.js → all-profiles-2KUKROHY.js} +10 -10
- package/dist/bundle/{anthropic-GUXHDK32.js → anthropic-E5KRCEVC.js} +8 -8
- package/dist/bundle/{app-server-GX7DOE4O.js → app-server-HIQ3QO5K.js} +60 -52
- package/dist/bundle/{bun-V5QLYBZU.js → bun-KARJPE5D.js} +2 -2
- package/dist/bundle/{bun-sqlite-AXD5CCO3.js → bun-sqlite-NHGX6ZUN.js} +6 -6
- package/dist/bundle/{chunk-4YNUQGDP.js → chunk-26DYRMXE.js} +1 -1
- package/dist/bundle/{chunk-3URYKAJP.js → chunk-2GDLJKPT.js} +1 -1
- package/dist/bundle/{chunk-JUS4Y4BW.js → chunk-2SCQ7Z4I.js} +4 -4
- package/dist/bundle/{chunk-LVJWN2PR.js → chunk-2VBEBPGX.js} +21 -11
- package/dist/bundle/{chunk-OUM4ZO53.js → chunk-4SKE5GYA.js} +1 -1
- package/dist/bundle/{chunk-WNGMI6AZ.js → chunk-4URI6EAV.js} +3 -3
- package/dist/bundle/chunk-4VHK5UBM.js +170 -0
- package/dist/bundle/{chunk-O7OP5NQO.js → chunk-4VM3UCSO.js} +2 -2
- package/dist/bundle/chunk-5GANGHQI.js +721 -0
- package/dist/bundle/{chunk-SWXKS7JK.js → chunk-6G4VQFVX.js} +19 -19
- package/dist/bundle/{chunk-TDTCCHAI.js → chunk-6GGMFL7J.js} +3 -3
- package/dist/bundle/{chunk-6XNTELM5.js → chunk-6LFRZDPV.js} +1 -1
- package/dist/bundle/{chunk-CD3TAITM.js → chunk-A2Y2RFNW.js} +75 -11
- package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-AGZ7SNFF.js} +1 -1
- package/dist/bundle/chunk-CKVWAUBW.js +787 -0
- package/dist/bundle/{chunk-SZZJOSIS.js → chunk-DYQGEZA2.js} +3 -3
- package/dist/bundle/{chunk-JRGPPS6H.js → chunk-DZRP4UCK.js} +13 -13
- package/dist/bundle/{chunk-7GW4D3OW.js → chunk-EGQJDEFY.js} +85 -39
- package/dist/bundle/{chunk-7MEVD5PI.js → chunk-EZAX77SM.js} +20 -20
- package/dist/bundle/{chunk-2IYAZRTC.js → chunk-FNYWC6A3.js} +2 -2
- package/dist/bundle/chunk-FORAOCZ3.js +334 -0
- package/dist/bundle/{chunk-IX3GUNGV.js → chunk-H77ALM2Y.js} +4 -4
- package/dist/bundle/{chunk-MENP3FF5.js → chunk-HH647UBC.js} +23 -23
- package/dist/bundle/{chunk-HUWQ7LXZ.js → chunk-HRDCH2VB.js} +947 -953
- package/dist/bundle/{chunk-ZDP6A2VL.js → chunk-I3MS74OF.js} +4 -4
- package/dist/bundle/{chunk-TWHIZJAZ.js → chunk-IMQ4CVZJ.js} +2 -2
- package/dist/bundle/{chunk-NMN5JUYL.js → chunk-JVGVLRBA.js} +5 -5
- package/dist/bundle/{chunk-U57QRUP7.js → chunk-KF6O4RZO.js} +3 -3
- package/dist/bundle/{chunk-LVFI3TCG.js → chunk-KGYK3OI3.js} +6 -6
- package/dist/bundle/{chunk-PALY5PGE.js → chunk-KLI5FKZ2.js} +7 -7
- package/dist/bundle/chunk-KNVTBDTE.js +72 -0
- package/dist/bundle/{chunk-PCWAZVAD.js → chunk-LKTDW5LH.js} +7 -7
- package/dist/bundle/{chunk-ECZSYLSL.js → chunk-LOSYDRJU.js} +45 -8
- package/dist/bundle/{chunk-HFA6AZWA.js → chunk-MDISZMK4.js} +4 -4
- package/dist/bundle/{chunk-GPOTPA3S.js → chunk-MGXYIVVJ.js} +14 -13
- package/dist/bundle/{chunk-KLGZX6QT.js → chunk-NAENYLIO.js} +2 -2
- package/dist/bundle/{chunk-SDAYOJLL.js → chunk-NHD5BOJU.js} +6 -6
- package/dist/bundle/{chunk-FA3B2DHZ.js → chunk-NI4GCP2T.js} +2 -2
- package/dist/bundle/{chunk-ZAD7K4TI.js → chunk-NJVJH5MH.js} +8053 -8240
- package/dist/bundle/{chunk-IVD3JTN5.js → chunk-NWD7AFOR.js} +2 -2
- package/dist/bundle/{chunk-U346WBJ5.js → chunk-NXERDBEK.js} +4 -4
- package/dist/bundle/{chunk-AJY2IT25.js → chunk-OG5QO5RR.js} +8 -8
- package/dist/bundle/{chunk-RNBG75HW.js → chunk-OJ3BI2U4.js} +29 -30
- package/dist/bundle/chunk-OOYRMTX5.js +374 -0
- package/dist/bundle/{chunk-GSXCMQWV.js → chunk-OX5MCGXL.js} +40 -40
- package/dist/bundle/{chunk-T577U52I.js → chunk-PA4GEJXQ.js} +9 -9
- package/dist/bundle/{chunk-2UMEZY6D.js → chunk-PC3N3LH3.js} +3 -3
- package/dist/bundle/{chunk-WQOGHND4.js → chunk-PRDKEVUL.js} +1 -1
- package/dist/bundle/{chunk-Z6OKVD3R.js → chunk-PVZMN3UZ.js} +8 -8
- package/dist/bundle/{chunk-SEJBS7SI.js → chunk-QFJC6POK.js} +1 -1
- package/dist/bundle/{chunk-MVMNZ3Q3.js → chunk-QOQF2TX3.js} +893 -1491
- package/dist/bundle/{chunk-7KCBPAQS.js → chunk-QQGPV3QN.js} +2 -2
- package/dist/bundle/{chunk-6SJ7HHAE.js → chunk-QXLYLVEC.js} +1 -1
- package/dist/bundle/chunk-QXYNDMA6.js +259 -0
- package/dist/bundle/{chunk-QHXOXYAT.js → chunk-R2GS3GBJ.js} +61 -59
- package/dist/bundle/{chunk-6TRKNME5.js → chunk-RPNQXWRS.js} +4 -4
- package/dist/bundle/{chunk-7C6FGWDH.js → chunk-SK3N4CK5.js} +4 -4
- package/dist/bundle/{chunk-GDDCKTBR.js → chunk-T2EE5M7O.js} +5 -5
- package/dist/bundle/{chunk-U7RLFLTM.js → chunk-TZJC4AOK.js} +30 -29
- package/dist/bundle/{chunk-PCMQYGEM.js → chunk-V43KEZYA.js} +9 -9
- package/dist/bundle/{chunk-MSK7RNOM.js → chunk-VBVR6JRC.js} +283 -515
- package/dist/bundle/{chunk-KLFF54AF.js → chunk-VRGEDK4T.js} +8 -8
- package/dist/bundle/{chunk-ANYADN3S.js → chunk-WYGDALB3.js} +31 -85
- package/dist/bundle/{chunk-IBCGCYRU.js → chunk-X6IGETU6.js} +2 -2
- package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-XIF75Z7D.js} +1 -1
- package/dist/bundle/chunk-XWU3A7H6.js +29 -0
- package/dist/bundle/{chunk-XXXVVNGI.js → chunk-YWX5X5RI.js} +19 -117
- package/dist/bundle/{chunk-FIVFP53N.js → chunk-Z6A6QPPW.js} +1 -1
- package/dist/bundle/{chunk-MHXZ62CU.js → chunk-ZGZADWD7.js} +1 -1
- package/dist/bundle/{chunk-MT2WDBG2.js → chunk-ZZEWQR43.js} +18 -14
- package/dist/bundle/command-contract-PZ7VOOXP.js +39 -0
- package/dist/bundle/{command-server-entry-BVXOPKXH.js → command-server-entry-NF45UPEV.js} +28 -25
- package/dist/bundle/decode-DUZA3EHC.js +296 -0
- package/dist/bundle/{dispatch-DSVN7MNG.js → dispatch-CDJZAMVP.js} +8 -8
- package/dist/bundle/{dist-B2JWWTNN.js → dist-RH7EMC4J.js} +29 -24
- package/dist/bundle/{echarts-QIXLXS3G.js → echarts-GZHZBNRA.js} +2 -2
- package/dist/bundle/{embed-4NC4ELYP.js → embed-VE3CSJN4.js} +6 -6
- package/dist/bundle/{embedder-HBRDIFQC.js → embedder-DSJ77DX5.js} +9 -9
- package/dist/bundle/{failure-COTPFUP4.js → failure-YH6HAGFT.js} +2 -2
- package/dist/bundle/{first-run-6QF67AAZ.js → first-run-3L7HLYTI.js} +12 -12
- package/dist/bundle/first-screen-MY5KID77.js +37 -0
- package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-OZK3BLIO.js} +1 -1
- package/dist/bundle/mail.js +12 -12
- package/dist/bundle/{mcp-TDKGDB4V.js → mcp-YUG4YR4R.js} +2 -2
- package/dist/bundle/meeting-combined-RYMUPY54.js +24 -0
- package/dist/bundle/meeting-model-U7LW5WEN.js +24 -0
- package/dist/bundle/meeting-semantic-64IOIQRR.js +21 -0
- package/dist/bundle/{node-IEVT2FSJ.js → node-OS3VWBUZ.js} +2 -2
- package/dist/bundle/{node-sqlite-EOTTDMOG.js → node-sqlite-RQ623VFA.js} +7 -7
- package/dist/bundle/{oauth-A5BEFGCI.js → oauth-CBPAG734.js} +7 -7
- package/dist/bundle/{open-HWN2EZYG.js → open-H4DGOMBC.js} +5 -5
- package/dist/bundle/{openai-PJKJ4CIU.js → openai-EMWRGR54.js} +28 -26
- package/dist/bundle/{process-6Q23D3TO.js → process-3TOIYASI.js} +1 -1
- package/dist/bundle/{program-WR43NPAV.js → program-WA6RGAJL.js} +3151 -2105
- package/dist/bundle/{prompt-E7Q2662O.js → prompt-22KNCMBI.js} +5 -5
- package/dist/bundle/{recognize-4F4PIL4B.js → recognize-UWD4RSCZ.js} +4 -4
- package/dist/bundle/{remote-RGJXO7XK.js → remote-LJY7MF2E.js} +9 -9
- package/dist/bundle/{rerank-EDY7PHMG.js → rerank-JJ6KNJFB.js} +7 -7
- package/dist/bundle/{serve-Q4XF6ID2.js → serve-3EPLJYVZ.js} +9 -9
- package/dist/bundle/{server-5I72DSDF.js → server-5JOFO4V4.js} +52 -44
- package/dist/bundle/server-EOQNS7B7.js +75 -0
- package/dist/bundle/{sqlite-runtime-PU3Z2H7C.js → sqlite-runtime-MGJA5E27.js} +6 -6
- package/dist/bundle/{state-CWSXJBU2.js → state-UCRDOWOP.js} +6 -6
- package/dist/bundle/{store-KQPKS3PX.js → store-265VRRQV.js} +25 -20
- package/dist/bundle/{store-ZAMKKM2A.js → store-HS272YSA.js} +21 -17
- package/dist/bundle/store-maintenance-command-IKZM5NRP.js +66 -0
- package/dist/commands/messages.js +1 -1
- package/dist/commands/messages.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +2 -2
- package/dist/identity.js.map +1 -1
- package/dist/mail/cleanup.d.ts.map +1 -1
- package/dist/mail/cleanup.js +4 -3
- package/dist/mail/cleanup.js.map +1 -1
- package/dist/mail/rules/apply.js +1 -1
- package/dist/mail/rules/apply.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-DZ6XRIOI.js +0 -36
- package/dist/bundle/decode-STN3EHT7.js +0 -162
- package/dist/bundle/first-screen-LXSZMK2P.js +0 -34
- package/dist/bundle/server-2Y5NSP2U.js +0 -67
- package/dist/bundle/store-maintenance-command-PMTTDR6J.js +0 -58
- /package/dist/bundle/{chunk-XWBPP2HX.js → chunk-FEBUZHU3.js} +0 -0
|
@@ -2,34 +2,34 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
validateFormattedText
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2VBEBPGX.js";
|
|
6
6
|
import {
|
|
7
7
|
inputPolicy
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NWD7AFOR.js";
|
|
9
9
|
import {
|
|
10
10
|
RECORDS_SCHEMA_VERSION,
|
|
11
11
|
RECORD_TYPES,
|
|
12
12
|
pointerOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WYGDALB3.js";
|
|
14
14
|
import {
|
|
15
15
|
parseReference
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CKVWAUBW.js";
|
|
17
17
|
import {
|
|
18
18
|
indent
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EZAX77SM.js";
|
|
20
20
|
import {
|
|
21
21
|
CliError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QQGPV3QN.js";
|
|
23
23
|
import {
|
|
24
24
|
__name
|
|
25
25
|
} from "./chunk-ZVVMGPBJ.js";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/checks.js
|
|
28
28
|
var spelled = /* @__PURE__ */ __name((check, args) => `${check.replaceAll(".", " ")}${args === void 0 ? "" : ` ${args}`}`, "spelled");
|
|
29
29
|
var bareCheck = /* @__PURE__ */ __name((check, args) => `\`${spelled(check, args)}\``, "bareCheck");
|
|
30
30
|
var checkWords = /* @__PURE__ */ __name((command, profile) => (check, args) => `\`${command} ${profile === void 0 ? "" : `${profile} `}${spelled(check, args)}\``, "checkWords");
|
|
31
31
|
|
|
32
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/links.js
|
|
33
33
|
var LINK_VERSION = "v1";
|
|
34
34
|
var DEFAULT_LINK_CONFIG = { base: "https://wirecat.dev/o", enabled: true };
|
|
35
35
|
var APP_PREFIX = "wirecat://open";
|
|
@@ -57,6 +57,8 @@ var partsOf = /* @__PURE__ */ __name((target) => {
|
|
|
57
57
|
return ["digest", target.date];
|
|
58
58
|
case "sync":
|
|
59
59
|
return target.account === void 0 ? ["sync", target.tool] : ["sync", target.tool, target.account];
|
|
60
|
+
case "meeting":
|
|
61
|
+
return ["meeting", target.provider, target.account, target.meeting];
|
|
60
62
|
}
|
|
61
63
|
}, "partsOf");
|
|
62
64
|
var pathOf = /* @__PURE__ */ __name((target) => partsOf(target).map(encodeURIComponent).join("/"), "pathOf");
|
|
@@ -82,6 +84,8 @@ var targetOfParts = /* @__PURE__ */ __name((parts) => {
|
|
|
82
84
|
return rest.length === 1 && isMoment(a, DATE) ? { type: "digest", date: a } : null;
|
|
83
85
|
case "sync":
|
|
84
86
|
return rest.length === 1 || rest.length === 2 ? { type: "sync", tool: a, ...rest.length === 2 ? { account: b } : {} } : null;
|
|
87
|
+
case "meeting":
|
|
88
|
+
return rest.length === 3 ? { type: "meeting", provider: a, account: b, meeting: c } : null;
|
|
85
89
|
default:
|
|
86
90
|
return null;
|
|
87
91
|
}
|
|
@@ -146,7 +150,7 @@ var linkFor = /* @__PURE__ */ __name((ref, { form, config = DEFAULT_LINK_CONFIG,
|
|
|
146
150
|
return form === "app" ? `${APP_PREFIX}${path}` : `${config.base}#${path}`;
|
|
147
151
|
}, "linkFor");
|
|
148
152
|
|
|
149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/markdown.js
|
|
150
154
|
var MARKERS = [
|
|
151
155
|
["**", "bold"],
|
|
152
156
|
["~~", "strike"],
|
|
@@ -192,7 +196,7 @@ var closing = /* @__PURE__ */ __name((input, open, marker) => {
|
|
|
192
196
|
return end;
|
|
193
197
|
}, "closing");
|
|
194
198
|
|
|
195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/markdown-spans.js
|
|
196
200
|
var STYLES = [
|
|
197
201
|
["**", "bold"],
|
|
198
202
|
["__", "underline"],
|
|
@@ -352,7 +356,7 @@ var parseMarkdownSpans = /* @__PURE__ */ __name((input) => {
|
|
|
352
356
|
return validateFormattedText(result);
|
|
353
357
|
}, "parseMarkdownSpans");
|
|
354
358
|
|
|
355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/polls.js
|
|
356
360
|
var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
|
|
357
361
|
const cast = votes.filter((vote) => vote.answers.length > 0);
|
|
358
362
|
const mine = self === null ? void 0 : votes.find((vote) => vote.person.id === self);
|
|
@@ -367,7 +371,7 @@ var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
|
|
|
367
371
|
};
|
|
368
372
|
}, "countedPoll");
|
|
369
373
|
|
|
370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/records-table.js
|
|
371
375
|
var TABLE_RECORD_TYPES = Object.keys(RECORD_TYPES).filter((type) => RECORD_TYPES[type].sheet !== false);
|
|
372
376
|
var TableError = class extends Error {
|
|
373
377
|
static {
|
|
@@ -2357,7 +2361,7 @@ var createDataURL = /* @__PURE__ */ __name(function(width, height, getPixel) {
|
|
|
2357
2361
|
var qrcode_default = qrcode;
|
|
2358
2362
|
var stringToBytes = qrcode.stringToBytes;
|
|
2359
2363
|
|
|
2360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/terminal/qr.js
|
|
2361
2365
|
var QUIET_ZONE = 4;
|
|
2362
2366
|
var BLACK_ON_WHITE = "\x1B[30;107m";
|
|
2363
2367
|
var RESET = "\x1B[0m";
|
|
@@ -2404,7 +2408,7 @@ var plainQr = /* @__PURE__ */ __name((link) => {
|
|
|
2404
2408
|
return lines.join("\n");
|
|
2405
2409
|
}, "plainQr");
|
|
2406
2410
|
|
|
2407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/terminal/login-qr.js
|
|
2408
2412
|
var MARGIN = 2;
|
|
2409
2413
|
var atTerminal = /* @__PURE__ */ __name((input) => input.isTTY === true && !inputPolicy(input).noInput, "atTerminal");
|
|
2410
2414
|
var PASTE_QR = "agents: paste the QR code above into the chat as a code block, exactly as printed; when a new one is printed, paste it and say the old one expired";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
SCHEMA_DIALECT,
|
|
5
|
+
commandContract,
|
|
6
|
+
commandPathOf,
|
|
7
|
+
findCommand,
|
|
8
|
+
outputOf
|
|
9
|
+
} from "./chunk-JVGVLRBA.js";
|
|
10
|
+
import "./chunk-VBVR6JRC.js";
|
|
11
|
+
import "./chunk-LKTDW5LH.js";
|
|
12
|
+
import "./chunk-PVZMN3UZ.js";
|
|
13
|
+
import "./chunk-KF6O4RZO.js";
|
|
14
|
+
import "./chunk-FORAOCZ3.js";
|
|
15
|
+
import "./chunk-PRDKEVUL.js";
|
|
16
|
+
import "./chunk-4URI6EAV.js";
|
|
17
|
+
import "./chunk-TZJC4AOK.js";
|
|
18
|
+
import "./chunk-CKVWAUBW.js";
|
|
19
|
+
import "./chunk-4VM3UCSO.js";
|
|
20
|
+
import "./chunk-QXLYLVEC.js";
|
|
21
|
+
import "./chunk-XWU3A7H6.js";
|
|
22
|
+
import "./chunk-QOQF2TX3.js";
|
|
23
|
+
import "./chunk-T2EE5M7O.js";
|
|
24
|
+
import "./chunk-KLI5FKZ2.js";
|
|
25
|
+
import "./chunk-2SCQ7Z4I.js";
|
|
26
|
+
import "./chunk-FEBUZHU3.js";
|
|
27
|
+
import "./chunk-NI4GCP2T.js";
|
|
28
|
+
import "./chunk-EZAX77SM.js";
|
|
29
|
+
import "./chunk-LOSYDRJU.js";
|
|
30
|
+
import "./chunk-Y5E2WNWB.js";
|
|
31
|
+
import "./chunk-QQGPV3QN.js";
|
|
32
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
33
|
+
export {
|
|
34
|
+
SCHEMA_DIALECT,
|
|
35
|
+
commandContract,
|
|
36
|
+
commandPathOf,
|
|
37
|
+
findCommand,
|
|
38
|
+
outputOf
|
|
39
|
+
};
|
|
@@ -4,48 +4,51 @@ import {
|
|
|
4
4
|
COMMAND_SERVER_CONCURRENT,
|
|
5
5
|
enterCommandServer,
|
|
6
6
|
serveCommands
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OG5QO5RR.js";
|
|
8
|
+
import "./chunk-ZGZADWD7.js";
|
|
8
9
|
import {
|
|
9
10
|
ensureSqlite
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-NMN5JUYL.js";
|
|
11
|
+
} from "./chunk-IMQ4CVZJ.js";
|
|
12
|
+
import "./chunk-JVGVLRBA.js";
|
|
13
13
|
import {
|
|
14
14
|
commandServerRequest,
|
|
15
15
|
exitCodeSet,
|
|
16
16
|
inCommandServerRequest
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-VBVR6JRC.js";
|
|
18
|
+
import "./chunk-LKTDW5LH.js";
|
|
19
|
+
import "./chunk-PVZMN3UZ.js";
|
|
20
|
+
import "./chunk-KF6O4RZO.js";
|
|
21
|
+
import "./chunk-FORAOCZ3.js";
|
|
22
|
+
import "./chunk-PRDKEVUL.js";
|
|
23
|
+
import "./chunk-4URI6EAV.js";
|
|
23
24
|
import {
|
|
24
25
|
asOwnProcess
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-TZJC4AOK.js";
|
|
27
|
+
import "./chunk-CKVWAUBW.js";
|
|
28
|
+
import "./chunk-4VM3UCSO.js";
|
|
29
|
+
import "./chunk-QXLYLVEC.js";
|
|
30
|
+
import "./chunk-XWU3A7H6.js";
|
|
31
|
+
import "./chunk-QOQF2TX3.js";
|
|
32
|
+
import "./chunk-T2EE5M7O.js";
|
|
33
|
+
import "./chunk-KLI5FKZ2.js";
|
|
34
|
+
import "./chunk-2SCQ7Z4I.js";
|
|
35
|
+
import "./chunk-FEBUZHU3.js";
|
|
36
|
+
import "./chunk-NI4GCP2T.js";
|
|
37
|
+
import "./chunk-NHD5BOJU.js";
|
|
38
|
+
import "./chunk-4SKE5GYA.js";
|
|
39
|
+
import "./chunk-EZAX77SM.js";
|
|
37
40
|
import {
|
|
38
41
|
catchCrashes
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-LOSYDRJU.js";
|
|
40
43
|
import "./chunk-Y5E2WNWB.js";
|
|
41
44
|
import {
|
|
42
45
|
CliError
|
|
43
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-QQGPV3QN.js";
|
|
44
47
|
import {
|
|
45
48
|
__name
|
|
46
49
|
} from "./chunk-ZVVMGPBJ.js";
|
|
47
50
|
|
|
48
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/cli/command-server-entry.js
|
|
49
52
|
import { PassThrough } from "node:stream";
|
|
50
53
|
var route = /* @__PURE__ */ __name((stream, sink) => {
|
|
51
54
|
const original = stream.write;
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
SAMPLE_RATE,
|
|
5
|
+
decodeOgg
|
|
6
|
+
} from "./chunk-MDISZMK4.js";
|
|
7
|
+
import "./chunk-EZAX77SM.js";
|
|
8
|
+
import "./chunk-LOSYDRJU.js";
|
|
9
|
+
import {
|
|
10
|
+
importFrom
|
|
11
|
+
} from "./chunk-Y5E2WNWB.js";
|
|
12
|
+
import {
|
|
13
|
+
CliError
|
|
14
|
+
} from "./chunk-QQGPV3QN.js";
|
|
15
|
+
import {
|
|
16
|
+
__name
|
|
17
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
18
|
+
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/speech/decode.js
|
|
20
|
+
import { spawn } from "node:child_process";
|
|
21
|
+
import { mkdtemp, open, readFile, rm, writeFile } from "node:fs/promises";
|
|
22
|
+
import { createRequire } from "node:module";
|
|
23
|
+
import { tmpdir } from "node:os";
|
|
24
|
+
import { join } from "node:path";
|
|
25
|
+
import { pathToFileURL } from "node:url";
|
|
26
|
+
var LONGEST_AUDIO_SECONDS = 3600;
|
|
27
|
+
var FFMPEG_TIMEOUT_MS = 12e4;
|
|
28
|
+
var FFMPEG_FORMATS = "mov,mp4,m4a,3gp,3g2,mj2,aac,mp3,wav,amr,caf,aiff,flac,ogg,matroska,webm,asf";
|
|
29
|
+
var text = /* @__PURE__ */ __name((bytes, from, length) => String.fromCharCode(...bytes.subarray(from, from + length)), "text");
|
|
30
|
+
var contains = /* @__PURE__ */ __name((bytes, needle, within) => Buffer.from(bytes.buffer, bytes.byteOffset, Math.min(bytes.length, within)).includes(needle, 0, "latin1"), "contains");
|
|
31
|
+
var formatOf = /* @__PURE__ */ __name((bytes) => {
|
|
32
|
+
if (text(bytes, 0, 4) === "OggS") {
|
|
33
|
+
if (contains(bytes, "OpusHead", 128))
|
|
34
|
+
return "opus";
|
|
35
|
+
if (contains(bytes, "vorbis", 128))
|
|
36
|
+
return "vorbis";
|
|
37
|
+
return "other";
|
|
38
|
+
}
|
|
39
|
+
if (text(bytes, 0, 4) === "fLaC")
|
|
40
|
+
return "flac";
|
|
41
|
+
const frame = bytes[0] === 255 && ((bytes[1] ?? 0) & 224) === 224 && ((bytes[1] ?? 0) >> 1 & 3) !== 0;
|
|
42
|
+
if (text(bytes, 0, 3) === "ID3" || frame)
|
|
43
|
+
return "mp3";
|
|
44
|
+
return "other";
|
|
45
|
+
}, "formatOf");
|
|
46
|
+
var everyChannel = /* @__PURE__ */ __name((decoded) => {
|
|
47
|
+
if (!decoded.channelData[0] || decoded.samplesDecoded === 0)
|
|
48
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
49
|
+
return decoded.channelData.map((samples) => ({ samples, rate: decoded.sampleRate }));
|
|
50
|
+
}, "everyChannel");
|
|
51
|
+
var load = /* @__PURE__ */ __name((name) => importFrom(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href, pathToFileURL(createRequire(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href).resolve(name)).href), "load");
|
|
52
|
+
var decodeVorbis = /* @__PURE__ */ __name(async (bytes) => {
|
|
53
|
+
const { OggVorbisDecoder } = await load("@wasm-audio-decoders/ogg-vorbis");
|
|
54
|
+
const decoder = new OggVorbisDecoder();
|
|
55
|
+
await decoder.ready;
|
|
56
|
+
try {
|
|
57
|
+
return everyChannel(await decoder.decodeFile(bytes));
|
|
58
|
+
} finally {
|
|
59
|
+
decoder.free();
|
|
60
|
+
}
|
|
61
|
+
}, "decodeVorbis");
|
|
62
|
+
var decodeFlac = /* @__PURE__ */ __name(async (bytes) => {
|
|
63
|
+
const { FLACDecoder } = await load("@wasm-audio-decoders/flac");
|
|
64
|
+
const decoder = new FLACDecoder();
|
|
65
|
+
await decoder.ready;
|
|
66
|
+
try {
|
|
67
|
+
return everyChannel(await decoder.decodeFile(bytes));
|
|
68
|
+
} finally {
|
|
69
|
+
decoder.free();
|
|
70
|
+
}
|
|
71
|
+
}, "decodeFlac");
|
|
72
|
+
var decodeMp3 = /* @__PURE__ */ __name(async (bytes) => {
|
|
73
|
+
const { MPEGDecoder } = await load("mpg123-decoder");
|
|
74
|
+
const decoder = new MPEGDecoder();
|
|
75
|
+
await decoder.ready;
|
|
76
|
+
try {
|
|
77
|
+
return everyChannel(decoder.decode(bytes));
|
|
78
|
+
} finally {
|
|
79
|
+
decoder.free();
|
|
80
|
+
}
|
|
81
|
+
}, "decodeMp3");
|
|
82
|
+
var tooLongError = /* @__PURE__ */ __name(() => new CliError("validation_error", `the audio is longer than ${LONGEST_AUDIO_SECONDS / 60} minutes`), "tooLongError");
|
|
83
|
+
var FLOAT = 3;
|
|
84
|
+
var LONGEST_HEADER = 64 * 1024;
|
|
85
|
+
var EXTENSIBLE = 65534;
|
|
86
|
+
var wavStream = /* @__PURE__ */ __name((most) => {
|
|
87
|
+
let head = Buffer.alloc(0);
|
|
88
|
+
let channels = 0;
|
|
89
|
+
let rate = 0;
|
|
90
|
+
let rest = Buffer.alloc(0);
|
|
91
|
+
let length = 0;
|
|
92
|
+
let parts = [];
|
|
93
|
+
const header = /* @__PURE__ */ __name(() => {
|
|
94
|
+
if (head.length < 12)
|
|
95
|
+
return false;
|
|
96
|
+
if (head.toString("latin1", 0, 4) !== "RIFF" || head.toString("latin1", 8, 12) !== "WAVE")
|
|
97
|
+
throw new CliError("validation_error", "ffmpeg did not answer with WAV audio");
|
|
98
|
+
for (let at = 12; at + 8 <= head.length; ) {
|
|
99
|
+
const id = head.toString("latin1", at, at + 4);
|
|
100
|
+
const size = head.readUInt32LE(at + 4);
|
|
101
|
+
if (id === "data") {
|
|
102
|
+
rest = head.subarray(at + 8);
|
|
103
|
+
head = Buffer.alloc(0);
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
if (at + 8 + size > head.length)
|
|
107
|
+
return false;
|
|
108
|
+
if (id === "fmt ") {
|
|
109
|
+
const tag = head.readUInt16LE(at + 8);
|
|
110
|
+
channels = head.readUInt16LE(at + 10);
|
|
111
|
+
rate = head.readUInt32LE(at + 12);
|
|
112
|
+
if (tag !== FLOAT && tag !== EXTENSIBLE || head.readUInt16LE(at + 22) !== 32 || channels < 1)
|
|
113
|
+
throw new CliError("validation_error", "ffmpeg did not answer with 32-bit float samples");
|
|
114
|
+
parts = Array.from({ length: channels }, () => []);
|
|
115
|
+
}
|
|
116
|
+
at += 8 + size + size % 2;
|
|
117
|
+
}
|
|
118
|
+
return false;
|
|
119
|
+
}, "header");
|
|
120
|
+
return {
|
|
121
|
+
push: /* @__PURE__ */ __name((chunk) => {
|
|
122
|
+
if (channels === 0 || head.length > 0) {
|
|
123
|
+
head = Buffer.concat([head, chunk]);
|
|
124
|
+
if (head.length > LONGEST_HEADER)
|
|
125
|
+
throw new CliError("validation_error", "ffmpeg's WAV header never ended");
|
|
126
|
+
if (!header())
|
|
127
|
+
return true;
|
|
128
|
+
chunk = Buffer.alloc(0);
|
|
129
|
+
}
|
|
130
|
+
const bytes = rest.length ? Buffer.concat([rest, chunk]) : chunk;
|
|
131
|
+
const frame = channels * 4;
|
|
132
|
+
const frames = Math.floor(bytes.length / frame);
|
|
133
|
+
rest = Buffer.from(bytes.subarray(frames * frame));
|
|
134
|
+
if (frames === 0)
|
|
135
|
+
return length <= most;
|
|
136
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, frames * frame);
|
|
137
|
+
for (let channel = 0; channel < channels; channel++) {
|
|
138
|
+
const samples = new Float32Array(frames);
|
|
139
|
+
for (let index = 0; index < frames; index++)
|
|
140
|
+
samples[index] = view.getFloat32(index * frame + channel * 4, true);
|
|
141
|
+
parts[channel]?.push(samples);
|
|
142
|
+
}
|
|
143
|
+
length += frames;
|
|
144
|
+
return length <= most;
|
|
145
|
+
}, "push"),
|
|
146
|
+
end: /* @__PURE__ */ __name(() => {
|
|
147
|
+
if (channels === 0)
|
|
148
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
149
|
+
return parts.map((pieces, channel) => {
|
|
150
|
+
const samples = new Float32Array(length);
|
|
151
|
+
let at = 0;
|
|
152
|
+
for (const piece of pieces) {
|
|
153
|
+
samples.set(piece, at);
|
|
154
|
+
at += piece.length;
|
|
155
|
+
}
|
|
156
|
+
parts[channel] = [];
|
|
157
|
+
return { samples, rate };
|
|
158
|
+
});
|
|
159
|
+
}, "end")
|
|
160
|
+
};
|
|
161
|
+
}, "wavStream");
|
|
162
|
+
var runFfmpegFile = /* @__PURE__ */ __name((path) => new Promise((resolve, reject) => {
|
|
163
|
+
const child = spawn("ffmpeg", [
|
|
164
|
+
"-nostdin",
|
|
165
|
+
"-hide_banner",
|
|
166
|
+
"-loglevel",
|
|
167
|
+
"error",
|
|
168
|
+
"-protocol_whitelist",
|
|
169
|
+
"file",
|
|
170
|
+
"-format_whitelist",
|
|
171
|
+
FFMPEG_FORMATS,
|
|
172
|
+
"-i",
|
|
173
|
+
path,
|
|
174
|
+
"-vn",
|
|
175
|
+
"-af",
|
|
176
|
+
"aformat=channel_layouts=mono|stereo",
|
|
177
|
+
"-ar",
|
|
178
|
+
String(SAMPLE_RATE),
|
|
179
|
+
"-c:a",
|
|
180
|
+
"pcm_f32le",
|
|
181
|
+
"-bitexact",
|
|
182
|
+
"-f",
|
|
183
|
+
"wav",
|
|
184
|
+
"pipe:1"
|
|
185
|
+
], { stdio: ["ignore", "pipe", "pipe"], timeout: FFMPEG_TIMEOUT_MS });
|
|
186
|
+
const wav = wavStream(LONGEST_AUDIO_SECONDS * SAMPLE_RATE);
|
|
187
|
+
let long = false;
|
|
188
|
+
let broken;
|
|
189
|
+
let errors = "";
|
|
190
|
+
child.stdout.on("data", (chunk) => {
|
|
191
|
+
if (long || broken)
|
|
192
|
+
return;
|
|
193
|
+
try {
|
|
194
|
+
long = !wav.push(chunk);
|
|
195
|
+
} catch (error) {
|
|
196
|
+
broken = error;
|
|
197
|
+
}
|
|
198
|
+
if (long || broken)
|
|
199
|
+
child.kill();
|
|
200
|
+
});
|
|
201
|
+
child.stderr.on("data", (chunk) => {
|
|
202
|
+
errors = (errors + chunk.toString()).slice(-500);
|
|
203
|
+
});
|
|
204
|
+
child.on("error", (error) => reject(error.code === "ENOENT" ? new CliError("validation_error", "only ffmpeg reads this audio format, and ffmpeg is not installed") : error));
|
|
205
|
+
child.on("close", (code) => {
|
|
206
|
+
if (long)
|
|
207
|
+
return reject(tooLongError());
|
|
208
|
+
if (broken)
|
|
209
|
+
return reject(broken);
|
|
210
|
+
if (code !== 0)
|
|
211
|
+
return reject(new CliError("validation_error", `ffmpeg could not read the audio: ${errors.trim() || code}`));
|
|
212
|
+
try {
|
|
213
|
+
resolve(wav.end());
|
|
214
|
+
} catch (error) {
|
|
215
|
+
reject(error);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}), "runFfmpegFile");
|
|
219
|
+
var runFfmpeg = /* @__PURE__ */ __name(async (bytes) => {
|
|
220
|
+
const directory = await mkdtemp(join(tmpdir(), "wirecat-audio-"));
|
|
221
|
+
try {
|
|
222
|
+
const input = join(directory, "audio");
|
|
223
|
+
await writeFile(input, bytes, { mode: 384 });
|
|
224
|
+
return await runFfmpegFile(input);
|
|
225
|
+
} finally {
|
|
226
|
+
await rm(directory, { recursive: true, force: true });
|
|
227
|
+
}
|
|
228
|
+
}, "runFfmpeg");
|
|
229
|
+
var BUNDLED = {
|
|
230
|
+
opus: decodeOgg,
|
|
231
|
+
vorbis: decodeVorbis,
|
|
232
|
+
flac: decodeFlac,
|
|
233
|
+
mp3: decodeMp3
|
|
234
|
+
};
|
|
235
|
+
var tooLong = /* @__PURE__ */ __name((pcm) => pcm.samples.length / pcm.rate > LONGEST_AUDIO_SECONDS, "tooLong");
|
|
236
|
+
var fromFfmpeg = /* @__PURE__ */ __name((answer) => Array.isArray(answer) ? { channels: answer, mixed: false } : { channels: [answer], mixed: true }, "fromFfmpeg");
|
|
237
|
+
var decodeChannels = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => {
|
|
238
|
+
const format = formatOf(bytes);
|
|
239
|
+
const decoded = format === "other" ? fromFfmpeg(await ffmpeg(bytes)) : await BUNDLED[format](bytes).then((channels) => ({ channels, mixed: false }), (error) => ffmpeg(bytes).then(fromFfmpeg, () => {
|
|
240
|
+
throw error;
|
|
241
|
+
}));
|
|
242
|
+
if (decoded.channels.length === 0)
|
|
243
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
244
|
+
if (decoded.channels.some(tooLong))
|
|
245
|
+
throw tooLongError();
|
|
246
|
+
return decoded;
|
|
247
|
+
}, "decodeChannels");
|
|
248
|
+
var decodeChannelsFile = /* @__PURE__ */ __name(async (path, { maxBytes = 64 * 1024 * 1024, ffmpegFile = runFfmpegFile } = {}) => {
|
|
249
|
+
const file = await open(path, "r");
|
|
250
|
+
let start;
|
|
251
|
+
let size;
|
|
252
|
+
try {
|
|
253
|
+
size = (await file.stat()).size;
|
|
254
|
+
const head = Buffer.alloc(Math.min(size, 128));
|
|
255
|
+
await file.read(head, 0, head.length, 0);
|
|
256
|
+
start = head;
|
|
257
|
+
} finally {
|
|
258
|
+
await file.close();
|
|
259
|
+
}
|
|
260
|
+
if (formatOf(start) === "other") {
|
|
261
|
+
const channels = await ffmpegFile(path);
|
|
262
|
+
if (channels.some(tooLong))
|
|
263
|
+
throw tooLongError();
|
|
264
|
+
return { channels, mixed: false };
|
|
265
|
+
}
|
|
266
|
+
if (size > maxBytes)
|
|
267
|
+
throw new CliError("validation_error", `the audio file is larger than ${Math.round(maxBytes / 1024 / 1024)} MB`, {
|
|
268
|
+
reason: "file.too-large"
|
|
269
|
+
});
|
|
270
|
+
return decodeChannels(new Uint8Array(await readFile(path)), () => ffmpegFile(path));
|
|
271
|
+
}, "decodeChannelsFile");
|
|
272
|
+
var mixDown = /* @__PURE__ */ __name((channels) => {
|
|
273
|
+
const [first] = channels;
|
|
274
|
+
if (!first)
|
|
275
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
276
|
+
if (channels.length === 1)
|
|
277
|
+
return first;
|
|
278
|
+
const length = channels.reduce((longest, { samples: samples2 }) => Math.max(longest, samples2.length), 0);
|
|
279
|
+
const samples = new Float32Array(length);
|
|
280
|
+
for (const channel of channels)
|
|
281
|
+
for (let index = 0; index < channel.samples.length; index++)
|
|
282
|
+
samples[index] = (samples[index] ?? 0) + (channel.samples[index] ?? 0) / channels.length;
|
|
283
|
+
return { samples, rate: first.rate };
|
|
284
|
+
}, "mixDown");
|
|
285
|
+
var decodeAudio = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => mixDown((await decodeChannels(bytes, ffmpeg)).channels), "decodeAudio");
|
|
286
|
+
export {
|
|
287
|
+
LONGEST_AUDIO_SECONDS,
|
|
288
|
+
decodeAudio,
|
|
289
|
+
decodeChannels,
|
|
290
|
+
decodeChannelsFile,
|
|
291
|
+
formatOf,
|
|
292
|
+
mixDown,
|
|
293
|
+
runFfmpeg,
|
|
294
|
+
runFfmpegFile,
|
|
295
|
+
wavStream
|
|
296
|
+
};
|
|
@@ -14,22 +14,22 @@ import {
|
|
|
14
14
|
parseDescribe,
|
|
15
15
|
shimFiles,
|
|
16
16
|
writeShim
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-H77ALM2Y.js";
|
|
18
18
|
import "./chunk-Y5E2WNWB.js";
|
|
19
19
|
import {
|
|
20
20
|
CliError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QQGPV3QN.js";
|
|
22
22
|
import {
|
|
23
23
|
__name,
|
|
24
24
|
__toESM
|
|
25
25
|
} from "./chunk-ZVVMGPBJ.js";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
28
28
|
var import_cross_spawn2 = __toESM(require_cross_spawn(), 1);
|
|
29
29
|
import { randomUUID } from "node:crypto";
|
|
30
30
|
import { constants } from "node:os";
|
|
31
31
|
|
|
32
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/path.js
|
|
33
33
|
import { readdirSync, statSync } from "node:fs";
|
|
34
34
|
import { join } from "node:path";
|
|
35
35
|
var variable = /* @__PURE__ */ __name((env, name, platform) => platform === "win32" ? Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1] : env[name], "variable");
|
|
@@ -101,7 +101,7 @@ var findTools = /* @__PURE__ */ __name((search) => {
|
|
|
101
101
|
}, "findTools");
|
|
102
102
|
var isBuiltIn = /* @__PURE__ */ __name((name) => name === "wcat" || BUILT_IN_COMMANDS.includes(name), "isBuiltIn");
|
|
103
103
|
|
|
104
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
104
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/probe.js
|
|
105
105
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
106
106
|
import { readFileSync } from "node:fs";
|
|
107
107
|
var probeDescribe = /* @__PURE__ */ __name((path, { env, timeoutMs }) => new Promise((resolve) => {
|
|
@@ -149,7 +149,7 @@ var baseVersion = /* @__PURE__ */ __name(() => {
|
|
|
149
149
|
}
|
|
150
150
|
}, "baseVersion");
|
|
151
151
|
|
|
152
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
152
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shortcuts.js
|
|
153
153
|
import { closeSync, openSync, readSync, realpathSync, rmSync } from "node:fs";
|
|
154
154
|
import { basename, dirname } from "node:path";
|
|
155
155
|
var WIRECAT_PACKAGE = /node_modules[\\/]+@wirecat[\\/]/;
|
|
@@ -241,7 +241,7 @@ var removeShortcuts = /* @__PURE__ */ __name((search, names) => listShortcuts(se
|
|
|
241
241
|
return { ...statusOf(shortcut.name, shortcut.program, search), changed: true };
|
|
242
242
|
}), "removeShortcuts");
|
|
243
243
|
|
|
244
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
244
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
245
245
|
var DEFAULT_DESCRIBE_TIMEOUT_MS = 2e3;
|
|
246
246
|
var listTools = /* @__PURE__ */ __name(async (context) => {
|
|
247
247
|
const installed = installedPrograms(context);
|
|
@@ -338,7 +338,7 @@ var runTool = /* @__PURE__ */ __name((path, args, context) => new Promise((resol
|
|
|
338
338
|
});
|
|
339
339
|
}), "runTool");
|
|
340
340
|
var fail = /* @__PURE__ */ __name(async (error, json, context) => {
|
|
341
|
-
const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-
|
|
341
|
+
const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-YH6HAGFT.js");
|
|
342
342
|
const object = errorObjectOf(error);
|
|
343
343
|
context.stderr.write(`${renderError(object, { cli: "wcat", interactive: !json })}
|
|
344
344
|
`);
|