@wirecat/zoom-cli 0.73.0 → 0.75.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/contracts/wirecat.json +5 -4
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-V47CUJFK.js → all-profiles-WFLKFKJC.js} +19 -29
- package/dist/bundle/answer-policy-XCKC2LLN.js +110 -0
- package/dist/bundle/{anthropic-SID7Z3QN.js → anthropic-H45W4P22.js} +2 -2
- package/dist/bundle/{app-server-KCMUSY4A.js → app-server-I4FPLBIX.js} +49 -66
- package/dist/bundle/{bun-PWMM6L45.js → bun-V5QLYBZU.js} +2 -2
- package/dist/bundle/{bun-sqlite-3TLKUN5A.js → bun-sqlite-X2YZPHDS.js} +3 -3
- package/dist/bundle/{chunk-PGPHEC2X.js → chunk-2Q4CB4EI.js} +1 -1
- package/dist/bundle/{chunk-PACLT6IW.js → chunk-3U3W6YY5.js} +69 -68
- package/dist/bundle/{chunk-QVJMFZFW.js → chunk-3URYKAJP.js} +1 -1
- package/dist/bundle/{chunk-UYBLNGZ2.js → chunk-3YKAFLXY.js} +1 -1
- package/dist/bundle/{chunk-IKNOTHG2.js → chunk-3YRPDNWK.js} +544 -142
- package/dist/bundle/{chunk-CMWFYZ45.js → chunk-4J5GJJ2I.js} +1 -1
- package/dist/bundle/{chunk-Y3IH7EZC.js → chunk-4XDWV6VJ.js} +16 -16
- package/dist/bundle/{chunk-KHBZ4OEP.js → chunk-4YNUQGDP.js} +1 -1
- package/dist/bundle/{chunk-35CYSRGJ.js → chunk-532H3KT3.js} +2 -2
- package/dist/bundle/{chunk-TI2OANJZ.js → chunk-6XNTELM5.js} +1 -1
- package/dist/bundle/chunk-7ZVWV33Z.js +707 -0
- package/dist/bundle/{chunk-ERQRY6WZ.js → chunk-A3Q3PG54.js} +1 -1
- package/dist/bundle/{chunk-JQF4LM3V.js → chunk-AVCYD4WQ.js} +20 -19
- package/dist/bundle/{chunk-P4FU6R3Z.js → chunk-B6Q53CVA.js} +7 -7
- package/dist/bundle/{chunk-KSNJK4QM.js → chunk-BY2YPKZZ.js} +12 -12
- package/dist/bundle/{chunk-L6YSKCC3.js → chunk-C5WQ57AB.js} +1 -1
- package/dist/bundle/{chunk-AIEMFRBU.js → chunk-CAQ5GW3A.js} +1 -1
- package/dist/bundle/{chunk-G2TSDMTA.js → chunk-DQBLDZ7M.js} +3 -3
- package/dist/bundle/{chunk-ILDGZBZD.js → chunk-DUPFAY35.js} +6 -6
- package/dist/bundle/{chunk-GCZMYDKU.js → chunk-ELD5AC7Q.js} +2 -2
- package/dist/bundle/{chunk-CIUJEQH4.js → chunk-EOZAJGB4.js} +11 -12
- package/dist/bundle/{chunk-VJVYGTPM.js → chunk-F6RB5FHZ.js} +1 -1
- package/dist/bundle/{chunk-LVDTSCIN.js → chunk-F7K2V6OA.js} +10 -10
- package/dist/bundle/{chunk-4LFFDUUW.js → chunk-FBYGBR4Q.js} +3 -3
- package/dist/bundle/{chunk-6AO2RSYH.js → chunk-GPVSGZ4R.js} +1608 -1096
- package/dist/bundle/{chunk-2NQPB6MT.js → chunk-GU4FVTJV.js} +17 -1
- package/dist/bundle/{chunk-6NI4FE5G.js → chunk-HKPNQL52.js} +3 -3
- package/dist/bundle/{chunk-KUL7S5Y3.js → chunk-IDGWBKMH.js} +10 -10
- package/dist/bundle/{chunk-QS6DWXDB.js → chunk-IMDTC4MD.js} +34 -20
- package/dist/bundle/{chunk-LSVQCI6V.js → chunk-IO3BQ6JU.js} +22 -22
- package/dist/bundle/{chunk-V5Q2QKYM.js → chunk-IW245Q5B.js} +23 -25
- package/dist/bundle/{chunk-DPSTOVKC.js → chunk-JDTZCZ5K.js} +2 -2
- package/dist/bundle/{chunk-JIS34MLC.js → chunk-JTYWSXJG.js} +7 -7
- package/dist/bundle/{chunk-K5JFX5TK.js → chunk-K5E5MB4C.js} +18 -18
- package/dist/bundle/{chunk-VPPNYUQM.js → chunk-L5UILROP.js} +322 -11
- package/dist/bundle/{chunk-DYLYH7VE.js → chunk-LRCSDAYK.js} +3 -3
- package/dist/bundle/{chunk-PJ3FKBXG.js → chunk-MHXZ62CU.js} +1 -1
- package/dist/bundle/{chunk-OKOJEBHK.js → chunk-MNVT7EJS.js} +2 -2
- package/dist/bundle/{chunk-HAMDPWEZ.js → chunk-NE4GYKQA.js} +5 -5
- package/dist/bundle/{chunk-PKON63JH.js → chunk-NL6AZ6S2.js} +1 -1
- package/dist/bundle/{chunk-N3SOTKXC.js → chunk-NQLL4KRN.js} +5 -5
- package/dist/bundle/{chunk-XLY7V2LB.js → chunk-NQQVNLO6.js} +10 -10
- package/dist/bundle/{chunk-44YVZIA4.js → chunk-NU4FSSMN.js} +2 -2
- package/dist/bundle/{chunk-ZVQDOKDY.js → chunk-OUM4ZO53.js} +1 -1
- package/dist/bundle/{chunk-OU5OXA6Q.js → chunk-P4ZQQLZF.js} +1772 -718
- package/dist/bundle/{chunk-OMLVWOEF.js → chunk-P6MQ6FS4.js} +184 -16
- package/dist/bundle/{chunk-NBA2V6LB.js → chunk-PCJRHC5Y.js} +7 -7
- package/dist/bundle/{chunk-G3SIY4MQ.js → chunk-PPM7UTCT.js} +22 -21
- package/dist/bundle/{chunk-3ADFJ3UP.js → chunk-PX4IMYVB.js} +2 -2
- package/dist/bundle/{chunk-FJMRDRPN.js → chunk-QBKKTTA3.js} +1155 -484
- package/dist/bundle/{chunk-ZX4QWTMQ.js → chunk-QEO3XTIE.js} +37 -29
- package/dist/bundle/{chunk-FZLJ2G7A.js → chunk-QXQUANWE.js} +4 -4
- package/dist/bundle/{chunk-MG2CCAVG.js → chunk-RABCFGT3.js} +2 -2
- package/dist/bundle/{chunk-SYIOT45G.js → chunk-RBYVQE3S.js} +4 -4
- package/dist/bundle/{chunk-6WUTUCKH.js → chunk-RKI4BGWG.js} +2 -2
- package/dist/bundle/{chunk-EXWZCI5G.js → chunk-SEJBS7SI.js} +1 -1
- package/dist/bundle/{chunk-LQYMN36C.js → chunk-SR5X7YKB.js} +1 -1
- package/dist/bundle/{chunk-KK2IVZUQ.js → chunk-T25PR26L.js} +5 -5
- package/dist/bundle/{chunk-ZAIE3G5I.js → chunk-T4FMXDDV.js} +2 -2
- package/dist/bundle/{chunk-SO52EJ2W.js → chunk-TSHUBGN4.js} +2 -2
- package/dist/bundle/{chunk-OFA22L4G.js → chunk-V3UK6E5B.js} +4 -4
- package/dist/bundle/{chunk-Q43KX56Z.js → chunk-VLK3X53X.js} +2 -2
- package/dist/bundle/{chunk-Z5XCU4S7.js → chunk-VPSQZ2YR.js} +44 -52
- package/dist/bundle/{chunk-QWGEOQHA.js → chunk-VUPWDCYV.js} +1 -1
- package/dist/bundle/{chunk-K7EMVFJ7.js → chunk-W2AC2RAG.js} +13 -13
- package/dist/bundle/{chunk-UIKVP23D.js → chunk-WQOGHND4.js} +1 -1
- package/dist/bundle/{chunk-ETQNHS3A.js → chunk-WUWF4EXZ.js} +6 -6
- package/dist/bundle/{chunk-HO3GBTIT.js → chunk-XCJGDPMN.js} +1547 -917
- package/dist/bundle/{chunk-2VYEGKQ3.js → chunk-XUHQ7DVT.js} +1 -1
- package/dist/bundle/{chunk-IE7YBRUO.js → chunk-Y5J5CAG2.js} +1 -1
- package/dist/bundle/{chunk-MOKEB656.js → chunk-ZBYKCVSV.js} +1 -1
- package/dist/bundle/{chunk-CQBLPBZU.js → chunk-ZVVRRMLW.js} +98 -6
- package/dist/bundle/{cli-4ZYJ6OZE.js → cli-NPRYCWFH.js} +112 -83
- package/dist/bundle/command-contract-OJYRKQHR.js +41 -0
- package/dist/bundle/{command-server-entry-CASONRIJ.js → command-server-entry-BV4SUPUI.js} +24 -26
- package/dist/bundle/config-UMEV24OE.js +97 -0
- package/dist/bundle/{decode-KEFCVGEB.js → decode-PRMKCHHC.js} +2 -2
- package/dist/bundle/{dist-GCQ7KCKN.js → dist-HGLDGKUW.js} +18 -15
- package/dist/bundle/{echarts-SDZA2SWG.js → echarts-QIXLXS3G.js} +2 -2
- package/dist/bundle/{embed-43VJEPM6.js → embed-OZN2BIJY.js} +3 -3
- package/dist/bundle/{embedder-Q4ZHAGRP.js → embedder-RBDHO6Z6.js} +6 -6
- package/dist/bundle/{first-run-CPOLQVNA.js → first-run-HNCD7U3B.js} +6 -6
- package/dist/bundle/first-screen-374BBMO6.js +39 -0
- package/dist/bundle/{instructions-7T6JJIFS.js → instructions-MD2RZT5Z.js} +1 -1
- package/dist/bundle/{main-NA3QVPXS.js → main-FPMCCRIQ.js} +15 -15
- package/dist/bundle/{meetings-7CVIQJTA.js → meetings-WYCVHAIP.js} +17 -1
- package/dist/bundle/{node-BZDMUFTW.js → node-IEVT2FSJ.js} +2 -2
- package/dist/bundle/{node-sqlite-QHGB23B4.js → node-sqlite-O4C6IWSM.js} +4 -4
- package/dist/bundle/{oauth-BMEMCM2I.js → oauth-6VXOUXSE.js} +4 -4
- package/dist/bundle/{open-JGU2NRJP.js → open-AMUIWV3Y.js} +2 -2
- package/dist/bundle/{openai-VTXXFNCS.js → openai-MEDN6FSK.js} +10 -10
- package/dist/bundle/{process-756VBE7E.js → process-6Q23D3TO.js} +1 -1
- package/dist/bundle/{program-XM6CDIJ2.js → program-CF2NKA2A.js} +84 -87
- package/dist/bundle/{prompt-2IPFXJ4B.js → prompt-N3UZE4ZR.js} +2 -2
- package/dist/bundle/{recognize-672E2RIB.js → recognize-I5F3K3CZ.js} +1 -1
- package/dist/bundle/{remote-YLHRVPDS.js → remote-CJF5KMMY.js} +6 -6
- package/dist/bundle/{rerank-NBXQG3OS.js → rerank-6WLY6MKY.js} +4 -4
- package/dist/bundle/{run-log-3WITBT2F.js → run-log-FKF4ZX4M.js} +55 -57
- package/dist/bundle/{serve-FNLOUMYP.js → serve-FOQJ3WMX.js} +6 -6
- package/dist/bundle/server-BAGY5HEZ.js +74 -0
- package/dist/bundle/{server-7ZB5AK5H.js → server-OEEGRSQD.js} +47 -47
- package/dist/bundle/{services-Z4UWN64R.js → services-Q6SFESMS.js} +43 -28
- package/dist/bundle/{speech-XSYVCKR3.js → speech-PBVEIG4N.js} +12 -12
- package/dist/bundle/{sqlite-runtime-GAPXJNWU.js → sqlite-runtime-IWR65V6I.js} +3 -3
- package/dist/bundle/{state-QSA53EF5.js → state-G54C2N6U.js} +3 -3
- package/dist/bundle/{store-NOF5EYUC.js → store-7EWMPTTW.js} +20 -16
- package/dist/bundle/{store-EKI4OAJH.js → store-D5OLXIFW.js} +14 -14
- package/dist/bundle/store-connection-34747SCC.js +90 -0
- package/dist/bundle/store-maintenance-command-QBO67F7Z.js +65 -0
- package/dist/bundle/{tokens-WJQYQ3FK.js → tokens-J7TFHLEG.js} +4 -4
- package/dist/bundle/zm.js +2 -2
- package/dist/bundle/{zoom-app-Y7RMWLVU.js → zoom-app-SULPMVN4.js} +2 -2
- package/dist/recording-schedule-commands.d.ts.map +1 -1
- package/dist/recording-schedule-commands.js +2 -2
- package/dist/recording-schedule-commands.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/answer-policy-W6H72X2R.js +0 -112
- package/dist/bundle/chunk-2BAZRRJP.js +0 -1239
- package/dist/bundle/chunk-KQD4ZVNC.js +0 -153
- package/dist/bundle/chunk-R5FTCNLJ.js +0 -76
- package/dist/bundle/chunk-USIMMGWS.js +0 -997
- package/dist/bundle/command-contract-FJDDCHYP.js +0 -43
- package/dist/bundle/config-4DZHX2WX.js +0 -99
- package/dist/bundle/first-screen-XYESRGWW.js +0 -41
- package/dist/bundle/server-GGRGD4SH.js +0 -77
- package/dist/bundle/store-connection-2OZQGEIO.js +0 -92
- package/dist/bundle/store-maintenance-command-GNX3SOZ6.js +0 -67
|
@@ -2,9 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
storePath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-A3Q3PG54.js";
|
|
6
6
|
import {
|
|
7
|
-
resolvePaths
|
|
7
|
+
resolvePaths,
|
|
8
|
+
writeSecurely
|
|
8
9
|
} from "./chunk-HNWDEDMU.js";
|
|
9
10
|
import {
|
|
10
11
|
CliError
|
|
@@ -16,11 +17,295 @@ import {
|
|
|
16
17
|
__name
|
|
17
18
|
} from "./chunk-ZVVMGPBJ.js";
|
|
18
19
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20
|
-
import { mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
20
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
21
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
21
22
|
import { dirname, join, resolve } from "node:path";
|
|
22
23
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/config-repair.js
|
|
25
|
+
var REPAIR_WORDS = {
|
|
26
|
+
byte_order_mark: "an invisible byte-order mark at the start",
|
|
27
|
+
comment: "a comment, which JSON does not allow",
|
|
28
|
+
trailing_comma: "a comma before a closing bracket",
|
|
29
|
+
missing_comma: "a missing comma",
|
|
30
|
+
unquoted_key: "a key without double quotes",
|
|
31
|
+
single_quotes: "text in single quotes",
|
|
32
|
+
missing_closer: "the file stops before its closing brackets \u2014 whatever followed this line was already lost"
|
|
33
|
+
};
|
|
34
|
+
var GiveUp = class {
|
|
35
|
+
static {
|
|
36
|
+
__name(this, "GiveUp");
|
|
37
|
+
}
|
|
38
|
+
at;
|
|
39
|
+
why;
|
|
40
|
+
constructor(at, why) {
|
|
41
|
+
this.at = at;
|
|
42
|
+
this.why = why;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var NUMBER = /^-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/;
|
|
46
|
+
var LITERAL = /^(true|false|null)/;
|
|
47
|
+
var KEY = /^[A-Za-z_$][\w$.-]*/;
|
|
48
|
+
var ENDS_VALUE = /^[\s,\]}/]?$/;
|
|
49
|
+
var repairConfigText = /* @__PURE__ */ __name((text) => {
|
|
50
|
+
try {
|
|
51
|
+
JSON.parse(text);
|
|
52
|
+
return { state: "valid" };
|
|
53
|
+
} catch {
|
|
54
|
+
}
|
|
55
|
+
const fixes = [];
|
|
56
|
+
const lineAt = /* @__PURE__ */ __name((offset) => text.slice(0, offset).split("\n").length, "lineAt");
|
|
57
|
+
const fix = /* @__PURE__ */ __name((kind, offset) => fixes.push({ kind, line: lineAt(offset) }), "fix");
|
|
58
|
+
const giveUp = /* @__PURE__ */ __name((why, offset = at) => {
|
|
59
|
+
throw new GiveUp(offset, why);
|
|
60
|
+
}, "giveUp");
|
|
61
|
+
let at = 0;
|
|
62
|
+
let truncated = false;
|
|
63
|
+
let last = "open";
|
|
64
|
+
let lastEnd = 0;
|
|
65
|
+
const previous = /* @__PURE__ */ __name(() => last, "previous");
|
|
66
|
+
const skip = /* @__PURE__ */ __name(() => {
|
|
67
|
+
for (; ; ) {
|
|
68
|
+
while (/\s/.test(text[at] ?? ""))
|
|
69
|
+
at++;
|
|
70
|
+
if (text.startsWith("//", at)) {
|
|
71
|
+
fix("comment", at);
|
|
72
|
+
while (at < text.length && text[at] !== "\n")
|
|
73
|
+
at++;
|
|
74
|
+
} else if (text.startsWith("/*", at)) {
|
|
75
|
+
const end = text.indexOf("*/", at + 2);
|
|
76
|
+
if (end < 0)
|
|
77
|
+
giveUp("a /* comment is never closed");
|
|
78
|
+
fix("comment", at);
|
|
79
|
+
at = end + 2;
|
|
80
|
+
} else
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
}, "skip");
|
|
84
|
+
const string = /* @__PURE__ */ __name(() => {
|
|
85
|
+
const quote = text[at];
|
|
86
|
+
const start = at;
|
|
87
|
+
if (quote === "'")
|
|
88
|
+
fix("single_quotes", at);
|
|
89
|
+
at++;
|
|
90
|
+
let body = "";
|
|
91
|
+
for (; ; ) {
|
|
92
|
+
if (at >= text.length)
|
|
93
|
+
giveUp("the file stops inside a quoted text", start);
|
|
94
|
+
const char = text[at];
|
|
95
|
+
if (char === quote)
|
|
96
|
+
break;
|
|
97
|
+
if (text.charCodeAt(at) < 32)
|
|
98
|
+
giveUp("a line break inside a quoted text");
|
|
99
|
+
if (char === "\\") {
|
|
100
|
+
const next = text[at + 1] ?? "";
|
|
101
|
+
if (quote === "'" && next === "'")
|
|
102
|
+
body += "'";
|
|
103
|
+
else if (/^["\\/bfnrt]$/.test(next))
|
|
104
|
+
body += `\\${next}`;
|
|
105
|
+
else if (next === "u" && /^[0-9a-fA-F]{4}$/.test(text.slice(at + 2, at + 6))) {
|
|
106
|
+
body += text.slice(at, at + 6);
|
|
107
|
+
at += 4;
|
|
108
|
+
} else
|
|
109
|
+
giveUp("an escape JSON has no meaning for");
|
|
110
|
+
at += 2;
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
body += char === '"' ? '\\"' : char;
|
|
114
|
+
at++;
|
|
115
|
+
}
|
|
116
|
+
at++;
|
|
117
|
+
return JSON.parse(`"${body}"`);
|
|
118
|
+
}, "string");
|
|
119
|
+
const key = /* @__PURE__ */ __name(() => {
|
|
120
|
+
const char = text[at] ?? "";
|
|
121
|
+
if (char === '"' || char === "'")
|
|
122
|
+
return string();
|
|
123
|
+
const word = KEY.exec(text.slice(at))?.[0];
|
|
124
|
+
if (!word)
|
|
125
|
+
return giveUp("something other than a key where a key should be");
|
|
126
|
+
fix("unquoted_key", at);
|
|
127
|
+
at += word.length;
|
|
128
|
+
return word;
|
|
129
|
+
}, "key");
|
|
130
|
+
const scalar = /* @__PURE__ */ __name(() => {
|
|
131
|
+
const char = text[at] ?? "";
|
|
132
|
+
if (char === '"' || char === "'")
|
|
133
|
+
return { json: JSON.stringify(string()) };
|
|
134
|
+
const word = (NUMBER.exec(text.slice(at)) ?? LITERAL.exec(text.slice(at)))?.[0];
|
|
135
|
+
if (!word || !ENDS_VALUE.test(text[at + word.length] ?? ""))
|
|
136
|
+
return giveUp("a value that is not JSON \u2014 text needs quotes, and only true, false and null go without");
|
|
137
|
+
if (at + word.length === text.length && NUMBER.test(word))
|
|
138
|
+
giveUp("the file stops inside a number");
|
|
139
|
+
at += word.length;
|
|
140
|
+
return { json: word };
|
|
141
|
+
}, "scalar");
|
|
142
|
+
const members = /* @__PURE__ */ __name((close, one) => {
|
|
143
|
+
const out = [];
|
|
144
|
+
at++;
|
|
145
|
+
last = "open";
|
|
146
|
+
let comma = -1;
|
|
147
|
+
for (; ; ) {
|
|
148
|
+
skip();
|
|
149
|
+
if (truncated)
|
|
150
|
+
return out;
|
|
151
|
+
if (at >= text.length) {
|
|
152
|
+
if (previous() === "close")
|
|
153
|
+
giveUp("the file stops after a closing bracket, so which brackets are missing has two readings");
|
|
154
|
+
if (previous() === "comma")
|
|
155
|
+
fix("trailing_comma", comma);
|
|
156
|
+
fix("missing_closer", text.length);
|
|
157
|
+
truncated = true;
|
|
158
|
+
return out;
|
|
159
|
+
}
|
|
160
|
+
const char = text[at];
|
|
161
|
+
if (char === close) {
|
|
162
|
+
if (previous() === "comma")
|
|
163
|
+
fix("trailing_comma", comma);
|
|
164
|
+
at++;
|
|
165
|
+
last = "close";
|
|
166
|
+
return out;
|
|
167
|
+
}
|
|
168
|
+
if (char === "}" || char === "]")
|
|
169
|
+
giveUp(`a ${char} where ${close} should close`);
|
|
170
|
+
if (char === ",") {
|
|
171
|
+
if (previous() !== "value" && previous() !== "close")
|
|
172
|
+
giveUp("a comma with nothing before it");
|
|
173
|
+
comma = at;
|
|
174
|
+
at++;
|
|
175
|
+
last = "comma";
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if (previous() === "value" || previous() === "close") {
|
|
179
|
+
if (lineAt(at) === lineAt(lastEnd))
|
|
180
|
+
giveUp("two entries on one line with no comma between them");
|
|
181
|
+
fix("missing_comma", lastEnd);
|
|
182
|
+
}
|
|
183
|
+
out.push(one());
|
|
184
|
+
}
|
|
185
|
+
}, "members");
|
|
186
|
+
const value = /* @__PURE__ */ __name(() => {
|
|
187
|
+
const char = text[at] ?? "";
|
|
188
|
+
let node;
|
|
189
|
+
if (char === "{") {
|
|
190
|
+
const seen = /* @__PURE__ */ new Set();
|
|
191
|
+
node = {
|
|
192
|
+
object: members("}", () => {
|
|
193
|
+
const start = at;
|
|
194
|
+
const name = key();
|
|
195
|
+
if (seen.has(name))
|
|
196
|
+
giveUp("a key appears twice in one object", start);
|
|
197
|
+
seen.add(name);
|
|
198
|
+
skip();
|
|
199
|
+
if (at >= text.length)
|
|
200
|
+
giveUp("the file stops after a key, before its value");
|
|
201
|
+
if (text[at] !== ":")
|
|
202
|
+
giveUp("a key with no colon after it");
|
|
203
|
+
at++;
|
|
204
|
+
skip();
|
|
205
|
+
if (at >= text.length)
|
|
206
|
+
giveUp("the file stops after a key, before its value");
|
|
207
|
+
return [name, value()];
|
|
208
|
+
})
|
|
209
|
+
};
|
|
210
|
+
} else if (char === "[") {
|
|
211
|
+
node = {
|
|
212
|
+
array: members("]", () => {
|
|
213
|
+
return value();
|
|
214
|
+
})
|
|
215
|
+
};
|
|
216
|
+
} else
|
|
217
|
+
node = scalar();
|
|
218
|
+
if (!truncated) {
|
|
219
|
+
last = "json" in node ? "value" : "close";
|
|
220
|
+
lastEnd = at;
|
|
221
|
+
}
|
|
222
|
+
return node;
|
|
223
|
+
}, "value");
|
|
224
|
+
try {
|
|
225
|
+
if (text.includes("\0") || text.includes(String.fromCharCode(65533)))
|
|
226
|
+
giveUp("the file is not text", 0);
|
|
227
|
+
if (text.charCodeAt(0) === 65279) {
|
|
228
|
+
fix("byte_order_mark", 0);
|
|
229
|
+
at = 1;
|
|
230
|
+
}
|
|
231
|
+
skip();
|
|
232
|
+
if (text[at] !== "{")
|
|
233
|
+
giveUp(at >= text.length ? "the file is empty" : "the file does not start with {");
|
|
234
|
+
const root = value();
|
|
235
|
+
skip();
|
|
236
|
+
if (at < text.length)
|
|
237
|
+
giveUp("more text after the closing }");
|
|
238
|
+
const repaired = `${serialise(root, "")}
|
|
239
|
+
`;
|
|
240
|
+
JSON.parse(repaired);
|
|
241
|
+
return { state: "repaired", text: repaired, fixes };
|
|
242
|
+
} catch (error) {
|
|
243
|
+
if (!(error instanceof GiveUp))
|
|
244
|
+
throw error;
|
|
245
|
+
const before = text.slice(0, error.at).split("\n");
|
|
246
|
+
return {
|
|
247
|
+
state: "refused",
|
|
248
|
+
line: before.length,
|
|
249
|
+
column: (before.at(-1)?.length ?? 0) + 1,
|
|
250
|
+
why: error.why
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
}, "repairConfigText");
|
|
254
|
+
var serialise = /* @__PURE__ */ __name((node, indent) => {
|
|
255
|
+
if ("json" in node)
|
|
256
|
+
return node.json;
|
|
257
|
+
const inner = `${indent} `;
|
|
258
|
+
const parts = "object" in node ? node.object.map(([name, item]) => `${inner}${JSON.stringify(name)}: ${serialise(item, inner)}`) : node.array.map((item) => `${inner}${serialise(item, inner)}`);
|
|
259
|
+
const [open, close] = "object" in node ? ["{", "}"] : ["[", "]"];
|
|
260
|
+
return parts.length === 0 ? `${open}${close}` : `${open}
|
|
261
|
+
${parts.join(",\n")}
|
|
262
|
+
${indent}${close}`;
|
|
263
|
+
}, "serialise");
|
|
264
|
+
var SAFE_REPAIRS = /* @__PURE__ */ new Set([
|
|
265
|
+
"byte_order_mark",
|
|
266
|
+
"comment",
|
|
267
|
+
"trailing_comma",
|
|
268
|
+
"missing_comma"
|
|
269
|
+
]);
|
|
270
|
+
var FIX_FOR = {
|
|
271
|
+
unquoted_key: /* @__PURE__ */ __name((line) => `put the key on line ${line} in double quotes`, "unquoted_key"),
|
|
272
|
+
single_quotes: /* @__PURE__ */ __name((line) => `use double quotes for the text on line ${line}`, "single_quotes"),
|
|
273
|
+
missing_closer: /* @__PURE__ */ __name((line) => `add the closing } or ] the file lacks after line ${line}, and check that nothing after it was lost`, "missing_closer")
|
|
274
|
+
};
|
|
275
|
+
var FIX_FOR_REFUSAL = [
|
|
276
|
+
[/no comma between/, (line, before) => `add a comma after ${before} on line ${line}`],
|
|
277
|
+
[/no colon after/, (line) => `add a colon after the key on line ${line}`],
|
|
278
|
+
[/comma with nothing before/, (line) => `remove the extra comma on line ${line}`],
|
|
279
|
+
[/inside a quoted text/, (line) => `close the quotes on line ${line}`],
|
|
280
|
+
[/value that is not JSON/, (line) => `put the value on line ${line} in double quotes`],
|
|
281
|
+
[/key appears twice/, (line) => `keep one of the two keys named on line ${line}; the file holds both`]
|
|
282
|
+
];
|
|
283
|
+
var shown = /* @__PURE__ */ __name((line) => line.trim().replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^\s"',:{}[\]]+)(\s*:)?/g, (token, _value, key) => key || /^(true|false|null)$/.test(token) ? token : '"\u2026"'), "shown");
|
|
284
|
+
var explainBrokenJson = /* @__PURE__ */ __name((text, result) => {
|
|
285
|
+
const lines = text.replace(/^\uFEFF/u, "").split(/\r?\n/);
|
|
286
|
+
const around = /* @__PURE__ */ __name((line2) => {
|
|
287
|
+
const near = lines[line2 - 1]?.trim() ? lines[line2 - 1] : lines[line2 - 2];
|
|
288
|
+
return near ? ` \u2014 near \`${shown(near)}\`` : "";
|
|
289
|
+
}, "around");
|
|
290
|
+
if (result.state === "repaired") {
|
|
291
|
+
const asked = result.fixes.find((one) => !SAFE_REPAIRS.has(one.kind)) ?? result.fixes[0];
|
|
292
|
+
if (!asked)
|
|
293
|
+
return "it is not valid JSON";
|
|
294
|
+
const fix2 = FIX_FOR[asked.kind]?.(asked.line);
|
|
295
|
+
return `line ${asked.line} has ${REPAIR_WORDS[asked.kind]}${around(asked.line)}${fix2 ? `; likely fix: ${fix2}` : ""}`;
|
|
296
|
+
}
|
|
297
|
+
if (result.state === "valid")
|
|
298
|
+
return "it is valid JSON";
|
|
299
|
+
const { line, why } = result;
|
|
300
|
+
const column = line === 1 && text.charCodeAt(0) === 65279 ? result.column - 1 : result.column;
|
|
301
|
+
const head = (lines[line - 1] ?? "").slice(0, column - 1);
|
|
302
|
+
const entry = head.slice(Math.max(head.lastIndexOf(","), head.lastIndexOf("{"), head.lastIndexOf("[")) + 1);
|
|
303
|
+
const before = shown(entry) || shown(lines[line - 2] ?? "");
|
|
304
|
+
const fix = FIX_FOR_REFUSAL.find(([pattern]) => pattern.test(why))?.[1](line, `\`${before}\``);
|
|
305
|
+
return `line ${line}, column ${column}: ${why}${around(line)}; likely fix: ${fix ?? "correct that part by hand"}`;
|
|
306
|
+
}, "explainBrokenJson");
|
|
307
|
+
|
|
308
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
|
|
24
309
|
var DEFAULT_TASK_CATEGORIES = [
|
|
25
310
|
{
|
|
26
311
|
name: "taxes",
|
|
@@ -775,7 +1060,7 @@ var storedTaskCategories = /* @__PURE__ */ __name((json) => {
|
|
|
775
1060
|
}
|
|
776
1061
|
}, "storedTaskCategories");
|
|
777
1062
|
|
|
778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
779
1064
|
var SECTION = "task_categories";
|
|
780
1065
|
var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
|
|
781
1066
|
const paths = resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env });
|
|
@@ -783,10 +1068,33 @@ var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
|
|
|
783
1068
|
return join(paths.config, "config.json");
|
|
784
1069
|
return resolve(store) === resolve(storePath({ ...env, MESSAGING_STORE: void 0 })) ? join(paths.config, "config.json") : join(dirname(store), "config.json");
|
|
785
1070
|
}, "sharedConfigPath");
|
|
1071
|
+
var backupPathFor = /* @__PURE__ */ __name((file) => {
|
|
1072
|
+
const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
1073
|
+
let path = `${file}.bak-${stamp}`;
|
|
1074
|
+
for (let n = 2; existsSync(path); n++)
|
|
1075
|
+
path = `${file}.bak-${stamp}-${n}`;
|
|
1076
|
+
return path;
|
|
1077
|
+
}, "backupPathFor");
|
|
1078
|
+
var mended = /* @__PURE__ */ __name((path, bytes) => {
|
|
1079
|
+
const text = bytes.toString("utf8");
|
|
1080
|
+
const result = repairConfigText(text);
|
|
1081
|
+
if (result.state === "repaired" && result.fixes.every((one) => SAFE_REPAIRS.has(one.kind))) {
|
|
1082
|
+
try {
|
|
1083
|
+
writeSecurely(backupPathFor(path), bytes, statSync(path).mode & 511);
|
|
1084
|
+
writeSecurely(path, result.text, 384);
|
|
1085
|
+
} catch {
|
|
1086
|
+
}
|
|
1087
|
+
return JSON.parse(result.text);
|
|
1088
|
+
}
|
|
1089
|
+
throw new CliError("configuration_error", `${path} is not valid JSON, ${explainBrokenJson(text, result)}`, {
|
|
1090
|
+
reason: "config.invalid_json",
|
|
1091
|
+
file: path
|
|
1092
|
+
});
|
|
1093
|
+
}, "mended");
|
|
786
1094
|
var readJson = /* @__PURE__ */ __name((path) => {
|
|
787
|
-
let
|
|
1095
|
+
let bytes;
|
|
788
1096
|
try {
|
|
789
|
-
|
|
1097
|
+
bytes = readFileSync(path);
|
|
790
1098
|
} catch (error) {
|
|
791
1099
|
if (error.code === "ENOENT")
|
|
792
1100
|
return void 0;
|
|
@@ -794,9 +1102,9 @@ var readJson = /* @__PURE__ */ __name((path) => {
|
|
|
794
1102
|
}
|
|
795
1103
|
let parsed;
|
|
796
1104
|
try {
|
|
797
|
-
parsed = JSON.parse(
|
|
798
|
-
} catch
|
|
799
|
-
|
|
1105
|
+
parsed = JSON.parse(bytes.toString("utf8"));
|
|
1106
|
+
} catch {
|
|
1107
|
+
parsed = mended(path, bytes);
|
|
800
1108
|
}
|
|
801
1109
|
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
|
|
802
1110
|
throw new CliError("configuration_error", `${path} must hold a JSON object`);
|
|
@@ -871,6 +1179,8 @@ var taskCategoriesReader = /* @__PURE__ */ __name((path) => {
|
|
|
871
1179
|
}, "taskCategoriesReader");
|
|
872
1180
|
|
|
873
1181
|
export {
|
|
1182
|
+
REPAIR_WORDS,
|
|
1183
|
+
repairConfigText,
|
|
874
1184
|
DEFAULT_TASK_CATEGORIES,
|
|
875
1185
|
FALLBACK_CATEGORY,
|
|
876
1186
|
unlistedNote,
|
|
@@ -878,6 +1188,7 @@ export {
|
|
|
878
1188
|
taskCategoryValue,
|
|
879
1189
|
storedTaskCategories,
|
|
880
1190
|
sharedConfigPath,
|
|
1191
|
+
backupPathFor,
|
|
881
1192
|
readTaskCategoryEdits,
|
|
882
1193
|
applyTaskCategoryEdits,
|
|
883
1194
|
editsFrom,
|
|
@@ -10,10 +10,10 @@ 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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/speech/recognize.js
|
|
14
14
|
import { createRequire } from "node:module";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
|
|
17
17
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "local transcription needs a complete mono or stereo Ogg Opus recording"), "invalid");
|
|
18
18
|
var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
|
|
19
19
|
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
@@ -70,7 +70,7 @@ var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
|
|
|
70
70
|
throw invalid();
|
|
71
71
|
}, "checkOggDuration");
|
|
72
72
|
|
|
73
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
73
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/speech/recognize.js
|
|
74
74
|
var SAMPLE_RATE = 16e3;
|
|
75
75
|
var LEAD = SAMPLE_RATE / 2;
|
|
76
76
|
var toModelRate = /* @__PURE__ */ __name((samples, rate) => {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
|
|
8
8
|
var fields = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
var readsStdin = /* @__PURE__ */ __name((command, field) => {
|
|
10
10
|
fields.set(command, field);
|
|
@@ -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-NQLL4KRN.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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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,7 +5,7 @@ import {
|
|
|
5
5
|
installFiles,
|
|
6
6
|
megabytes,
|
|
7
7
|
sharedModelsDirectory
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FBYGBR4Q.js";
|
|
9
9
|
import {
|
|
10
10
|
importFrom
|
|
11
11
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
__name
|
|
17
17
|
} from "./chunk-ZVVMGPBJ.js";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
|
|
20
20
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
21
21
|
import { availableParallelism } from "node:os";
|
|
22
22
|
import { basename, join as join2 } from "node:path";
|
|
23
23
|
|
|
24
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
|
|
25
25
|
import { createHash } from "node:crypto";
|
|
26
26
|
import { copyFileSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
27
27
|
import { join } from "node:path";
|
|
@@ -678,7 +678,7 @@ var Unzip = /* @__PURE__ */ (function() {
|
|
|
678
678
|
return Unzip2;
|
|
679
679
|
})();
|
|
680
680
|
|
|
681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
681
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
|
|
682
682
|
var ONNX_RUNTIME_VERSION = "1.30.0";
|
|
683
683
|
var release = /* @__PURE__ */ __name((name, sha256, bytes) => ({
|
|
684
684
|
name,
|
|
@@ -858,7 +858,7 @@ var openSession = /* @__PURE__ */ __name(async (bytes, threads, options = {}) =>
|
|
|
858
858
|
return { ort, session: await ort.InferenceSession.create(bytes, options) };
|
|
859
859
|
}, "openSession");
|
|
860
860
|
|
|
861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
|
|
862
862
|
var textModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("text", env), "textModelsDirectory");
|
|
863
863
|
var placedText = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedText");
|
|
864
864
|
var isTextModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedText(model, directory)), "isTextModelInstalled");
|
|
@@ -12,7 +12,7 @@ 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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/render/messages.js
|
|
16
16
|
import { styleText } from "node:util";
|
|
17
17
|
var TIME_WIDTH = 8;
|
|
18
18
|
var INDENT = " ".repeat(TIME_WIDTH + 2);
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
PRAGMAS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OUM4ZO53.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
8
|
} from "./chunk-EA2OB75T.js";
|
|
@@ -10,7 +10,7 @@ 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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
|
|
14
14
|
var SQLITE_WARNING = "SQLite is an experimental feature";
|
|
15
15
|
var quieted = /* @__PURE__ */ new WeakSet();
|
|
16
16
|
var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
|
|
@@ -31,7 +31,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
|
|
|
31
31
|
return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
|
|
32
32
|
}, "isSqliteWarning");
|
|
33
33
|
|
|
34
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/open.js
|
|
35
35
|
var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
36
36
|
const database = await openFile(path);
|
|
37
37
|
try {
|
|
@@ -44,12 +44,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
|
44
44
|
}, "openCache");
|
|
45
45
|
var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
|
|
46
46
|
var openUnderBun = /* @__PURE__ */ __name(async (path) => {
|
|
47
|
-
const { openWithBunSqlite } = await import("./bun-sqlite-
|
|
47
|
+
const { openWithBunSqlite } = await import("./bun-sqlite-X2YZPHDS.js");
|
|
48
48
|
return await openWithBunSqlite(path);
|
|
49
49
|
}, "openUnderBun");
|
|
50
50
|
var openUnderNode = /* @__PURE__ */ __name(async (path) => {
|
|
51
51
|
quietSqliteWarning();
|
|
52
|
-
const { openWithNodeSqlite } = await import("./node-sqlite-
|
|
52
|
+
const { openWithNodeSqlite } = await import("./node-sqlite-O4C6IWSM.js");
|
|
53
53
|
return openWithNodeSqlite(path);
|
|
54
54
|
}, "openUnderNode");
|
|
55
55
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -8,25 +8,25 @@ import {
|
|
|
8
8
|
readSetupAnswers,
|
|
9
9
|
unanswered,
|
|
10
10
|
writeSetupAnswers
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HKPNQL52.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_STEMMERS,
|
|
14
14
|
LANGUAGES
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PCJRHC5Y.js";
|
|
16
16
|
import {
|
|
17
17
|
sharedConfigPath
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-L5UILROP.js";
|
|
19
19
|
import {
|
|
20
20
|
installerOf
|
|
21
21
|
} from "./chunk-M4OP5ASJ.js";
|
|
22
22
|
import {
|
|
23
23
|
storePath
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-A3Q3PG54.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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/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-D5OLXIFW.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-AMUIWV3Y.js"),
|
|
117
|
+
import("./store-maintenance-command-QBO67F7Z.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-374BBMO6.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-N3UZE4ZR.js")).readSecret(prompt, { input, echo: true }), "ask"),
|
|
203
203
|
say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
|
|
204
204
|
`), "say")
|
|
205
205
|
}
|
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
SAMPLE_RATE,
|
|
5
5
|
decodeOgg
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LRCSDAYK.js";
|
|
7
7
|
import {
|
|
8
8
|
importFrom
|
|
9
9
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/speech/decode.js
|
|
18
18
|
import { spawn } from "node:child_process";
|
|
19
19
|
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
20
20
|
import { createRequire } from "node:module";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/driver.js
|
|
8
8
|
var TIME_LIMIT_FUNCTION = "wc_time_limit";
|
|
9
9
|
var TimeLimitReached = class extends Error {
|
|
10
10
|
static {
|