@wirecat/mail-cli 0.17.0 → 0.18.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 +14 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-55AU2Q2N.js → all-profiles-4CVOXA5Y.js} +10 -10
- package/dist/bundle/{anthropic-I7RI7YPK.js → anthropic-5VIKYINO.js} +6 -6
- package/dist/bundle/{app-server-NY72GTQA.js → app-server-LTSQBDPF.js} +53 -50
- package/dist/bundle/{bun-C2R7UPM2.js → bun-C7DBRUW2.js} +2 -2
- package/dist/bundle/{bun-sqlite-RNPHH3KC.js → bun-sqlite-Y5JKT62B.js} +5 -5
- package/dist/bundle/{chunk-YO7BLBVE.js → chunk-23HWKHPZ.js} +301 -259
- package/dist/bundle/{chunk-OHS5CYZI.js → chunk-2NWOYXPJ.js} +56 -56
- package/dist/bundle/{chunk-JSB6BTPT.js → chunk-3DQYO7FB.js} +1 -1
- package/dist/bundle/{chunk-B73I6KLW.js → chunk-3W5H4TM7.js} +184 -16
- package/dist/bundle/{chunk-2EVM7GV5.js → chunk-3YRE6DNM.js} +8 -8
- package/dist/bundle/{chunk-YIJRPPF5.js → chunk-43I5XD7S.js} +1 -1
- package/dist/bundle/{chunk-HZL42476.js → chunk-5S6Q3SWU.js} +4 -2
- package/dist/bundle/{chunk-DG43I7MC.js → chunk-6RO5RDNR.js} +27 -9
- package/dist/bundle/{chunk-J7XH6CJC.js → chunk-7P4ICYJT.js} +1 -1
- package/dist/bundle/{chunk-BWCYUXF7.js → chunk-7SWWVDEZ.js} +4 -4
- package/dist/bundle/{chunk-24H2KUGW.js → chunk-A5OMARL4.js} +28 -28
- package/dist/bundle/{chunk-QDX2O5BN.js → chunk-ACLILULA.js} +3 -3
- package/dist/bundle/{chunk-QRNL5DIS.js → chunk-AOMSP4EI.js} +6 -6
- package/dist/bundle/{chunk-XJQJ3ZIY.js → chunk-BHNBWFT5.js} +8 -8
- package/dist/bundle/{chunk-LNC7XMEQ.js → chunk-BMFPCW6Q.js} +4 -4
- package/dist/bundle/{chunk-MG4NWXWI.js → chunk-BMGVKULS.js} +4 -4
- package/dist/bundle/{chunk-4HTTN4NO.js → chunk-BMV56JCL.js} +19 -19
- package/dist/bundle/{chunk-22WVQJW3.js → chunk-C4RUKMDT.js} +16 -10
- package/dist/bundle/{chunk-QU5TWVG5.js → chunk-C5T5K7HW.js} +127 -27
- package/dist/bundle/{chunk-KJKRLI2S.js → chunk-CPEN6BZZ.js} +2 -2
- package/dist/bundle/{chunk-YHUCNI2W.js → chunk-DALBYUPC.js} +2 -2
- package/dist/bundle/{chunk-6NN5ZX5T.js → chunk-DPSH46NO.js} +5 -5
- package/dist/bundle/{chunk-CHVHIDNK.js → chunk-EFP5NN7I.js} +3 -3
- package/dist/bundle/{chunk-22IKW3TY.js → chunk-ERBEBORA.js} +14 -14
- package/dist/bundle/{chunk-YCOBSDZY.js → chunk-FLOOPXOT.js} +12 -12
- package/dist/bundle/{chunk-F4P3VDJZ.js → chunk-GLLLYACZ.js} +6 -6
- package/dist/bundle/{chunk-S4NIDBLI.js → chunk-GRP67IQ4.js} +56 -47
- package/dist/bundle/{chunk-T4RRZILQ.js → chunk-HFUS33UT.js} +2 -2
- package/dist/bundle/{chunk-RFFE5ACS.js → chunk-HTFBXGJF.js} +2 -2
- package/dist/bundle/{chunk-MTFTMPB6.js → chunk-IANOK5SE.js} +2 -2
- package/dist/bundle/{chunk-WHI3LTAW.js → chunk-ITUC5WAV.js} +1 -1
- package/dist/bundle/{chunk-VMXMHC6E.js → chunk-JO3BIMYK.js} +3 -3
- package/dist/bundle/{chunk-45JQ72CH.js → chunk-KVSC657S.js} +19 -12
- package/dist/bundle/{chunk-OFZDCUUJ.js → chunk-L3YX7A5M.js} +7 -7
- package/dist/bundle/{chunk-2CY44MKY.js → chunk-M7C4IGJ6.js} +8 -8
- package/dist/bundle/{chunk-GBM7FFFI.js → chunk-MCR43SWG.js} +4 -4
- package/dist/bundle/{chunk-YB47AQWE.js → chunk-N5VEJ3E7.js} +10 -10
- package/dist/bundle/{chunk-IPFFPD3M.js → chunk-NDJZQCF3.js} +297 -174
- package/dist/bundle/{chunk-R3G33QIV.js → chunk-OLJDZTHB.js} +13 -13
- package/dist/bundle/{chunk-CHC2LWKY.js → chunk-OMKPALMX.js} +2 -2
- package/dist/bundle/{chunk-MRTSDBTN.js → chunk-OUGGAAXI.js} +1508 -559
- package/dist/bundle/{chunk-SHEVFBZT.js → chunk-P6WCG6X2.js} +36 -30
- package/dist/bundle/{chunk-GYCJQGFO.js → chunk-QPF4LTK5.js} +6 -6
- package/dist/bundle/{chunk-WOFGEJ6W.js → chunk-RIO3TD3I.js} +1 -1
- package/dist/bundle/{chunk-RIAHISWA.js → chunk-RQSF7X22.js} +1 -1
- package/dist/bundle/{chunk-2ON2PDHC.js → chunk-SIYT2BBI.js} +10 -10
- package/dist/bundle/{chunk-M6GLFDWV.js → chunk-SMS5YNPB.js} +3 -3
- package/dist/bundle/{chunk-H32SKDF2.js → chunk-SW2KERUB.js} +640 -123
- package/dist/bundle/{chunk-BPDUVWL2.js → chunk-TVZ77ZOV.js} +2 -2
- package/dist/bundle/{chunk-SQAAOEGI.js → chunk-U43HUE35.js} +9 -9
- package/dist/bundle/{chunk-RQGTRB73.js → chunk-UEGABYXI.js} +3 -3
- package/dist/bundle/{chunk-TCYLDGRA.js → chunk-UHC5I3JV.js} +1 -1
- package/dist/bundle/{chunk-XOJ5E777.js → chunk-UWL2IOII.js} +4 -4
- package/dist/bundle/{chunk-ITMGJX7I.js → chunk-UXD5JMS5.js} +1 -1
- package/dist/bundle/{chunk-JI225TBX.js → chunk-WA3DQSAZ.js} +2 -2
- package/dist/bundle/{chunk-VXBUDZV3.js → chunk-XGTW3GRX.js} +2 -2
- package/dist/bundle/{chunk-QEO7MI3E.js → chunk-YA2JPMYX.js} +2 -2
- package/dist/bundle/{chunk-A3PKKY24.js → chunk-ZLH465EU.js} +1 -1
- package/dist/bundle/{chunk-BD7OK4P5.js → chunk-ZT2Y267T.js} +3 -3
- package/dist/bundle/command-contract-Y3GIKCPB.js +34 -0
- package/dist/bundle/{decode-5AYG6LLW.js → decode-WVIDLK4E.js} +5 -5
- package/dist/bundle/{dispatch-EVLWT6N3.js → dispatch-R5OF2FVZ.js} +8 -8
- package/dist/bundle/{dist-JRTLLLLG.js → dist-KGQWS3XL.js} +24 -14
- package/dist/bundle/{echarts-EFAEE4D2.js → echarts-VMKACZBF.js} +2 -2
- package/dist/bundle/{embed-6SSOYGZQ.js → embed-EQINOOST.js} +6 -6
- package/dist/bundle/{embedder-VFSLGHBO.js → embedder-LM52TDRN.js} +9 -9
- package/dist/bundle/{failure-RBBZ7F3L.js → failure-WYKVF6RH.js} +2 -2
- package/dist/bundle/{first-run-PVEHOQOD.js → first-run-H4VXZAAF.js} +11 -11
- package/dist/bundle/first-screen-ZP74TJLK.js +32 -0
- package/dist/bundle/{instructions-EOLC3GYB.js → instructions-NLSME663.js} +1 -1
- package/dist/bundle/mail.js +12 -12
- package/dist/bundle/{mcp-JYLZR5LQ.js → mcp-CFVG2OUS.js} +2 -2
- package/dist/bundle/{node-2ZRMQAYF.js → node-FGMSXLTA.js} +2 -2
- package/dist/bundle/{node-sqlite-UKWOBONA.js → node-sqlite-K3T3ZRBY.js} +6 -6
- package/dist/bundle/{oauth-HFD46WAY.js → oauth-OJKJ6JLH.js} +7 -7
- package/dist/bundle/{open-2DLCQUC4.js → open-DCYIXHXS.js} +5 -5
- package/dist/bundle/{openai-A7YLLQEE.js → openai-C4H4W57J.js} +14 -14
- package/dist/bundle/{process-I3INVLFQ.js → process-MN4NSYGA.js} +1 -1
- package/dist/bundle/{program-4ZCATQND.js → program-ZZZOKWCX.js} +1028 -642
- package/dist/bundle/{prompt-R636OFYK.js → prompt-ELEJUDAU.js} +5 -5
- package/dist/bundle/{recognize-G4WUSU5I.js → recognize-G2FVMI5M.js} +4 -4
- package/dist/bundle/{remote-BMXVVYTN.js → remote-F4YVSEYM.js} +7 -7
- package/dist/bundle/{rerank-7W3QEZ3Q.js → rerank-7VM5R5N6.js} +7 -7
- package/dist/bundle/{serve-JQCPQYOJ.js → serve-A7NRFPRN.js} +9 -9
- package/dist/bundle/{server-IMOCOYXH.js → server-7R2BEIRY.js} +39 -39
- package/dist/bundle/server-DFJA2HBO.js +64 -0
- package/dist/bundle/{sqlite-runtime-H2IEHDRZ.js → sqlite-runtime-4SKUB4EN.js} +6 -6
- package/dist/bundle/{state-J5N3Y4LX.js → state-S2FKK2XB.js} +6 -6
- package/dist/bundle/{store-C4TIYTGI.js → store-4HAARQVR.js} +26 -18
- package/dist/bundle/{store-U5WIT3P4.js → store-FLHO3UMA.js} +17 -15
- package/dist/bundle/store-maintenance-command-BINJIQ6F.js +54 -0
- package/dist/commands/restore.js +1 -1
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +2 -8
- package/dist/commands/status.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-AUPKK5Y4.js +0 -34
- package/dist/bundle/first-screen-7ONKJ7QW.js +0 -32
- package/dist/bundle/server-GYVOIGF5.js +0 -64
- package/dist/bundle/store-maintenance-command-WRRZ7Q7B.js +0 -54
- /package/dist/bundle/{chunk-CNMSF5QU.js → chunk-QZLK2ISN.js} +0 -0
|
@@ -23,28 +23,71 @@ import {
|
|
|
23
23
|
tagMemberIds,
|
|
24
24
|
thingOf,
|
|
25
25
|
write
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OUGGAAXI.js";
|
|
27
27
|
import {
|
|
28
28
|
filesAccountSql,
|
|
29
29
|
folderProviderOf,
|
|
30
30
|
folderProviderSql,
|
|
31
31
|
isDocumentAccountProvider
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-KVSC657S.js";
|
|
33
33
|
import {
|
|
34
34
|
fold
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-3YRE6DNM.js";
|
|
36
36
|
import {
|
|
37
37
|
CliError
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-DALBYUPC.js";
|
|
39
39
|
import {
|
|
40
40
|
__name
|
|
41
41
|
} from "./chunk-ZVVMGPBJ.js";
|
|
42
42
|
|
|
43
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
44
|
+
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
45
|
+
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
46
|
+
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
47
|
+
var WIRECAT_UNITS = ["memo-*", "mail-*", "tg-*", "max-*", "wirecat-*"];
|
|
48
|
+
var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
49
|
+
if (health.ok)
|
|
50
|
+
return null;
|
|
51
|
+
const indexNames = (health.searchIndexes ?? []).map((index) => index.name);
|
|
52
|
+
const badIndexes = (health.searchIndexes ?? []).filter((index) => !index.ok).map((index) => index.name);
|
|
53
|
+
const tables = (health.damagedTables ?? []).map((one) => one.table).filter((table) => table !== null);
|
|
54
|
+
const sources = tables.filter((table) => !isDerivedTable(table, indexNames));
|
|
55
|
+
const derived = [.../* @__PURE__ */ new Set([...tables.filter((table) => isDerivedTable(table, indexNames)), ...badIndexes])];
|
|
56
|
+
const unopened = health.error !== void 0;
|
|
57
|
+
const what = unopened ? `the store file cannot be opened: ${health.error}` : health.checked === "quick" ? "the store file's header or schema is damaged" : `the store file is damaged: ${health.problems ?? 0} problems` + (sources.length ? ` in the data of ${named(sources)}` : "") + (derived.length ? `${sources.length ? ", and" : " in"} the search data of ${named(derived)}` : "");
|
|
58
|
+
const impact = [
|
|
59
|
+
...sources.length ? [`some rows of ${named(sources)} cannot be read; a recovery keeps every row it can read and names the rest`] : [],
|
|
60
|
+
...derived.length ? [`searches may miss results or fail; ${named(derived)} hold nothing that is not elsewhere, and are rebuilt`] : [],
|
|
61
|
+
"reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
|
|
62
|
+
];
|
|
63
|
+
return {
|
|
64
|
+
what,
|
|
65
|
+
causes: [
|
|
66
|
+
"the computer lost power or crashed, or the disk filled up, while a tool was writing",
|
|
67
|
+
"the file was copied, restored or synced while a tool had it open, or it sits in a synced or network folder",
|
|
68
|
+
"a fault of the disk itself"
|
|
69
|
+
],
|
|
70
|
+
investigate: [
|
|
71
|
+
`journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`,
|
|
72
|
+
"journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata",
|
|
73
|
+
`df -h ${health.path.replace(/\/[^/]*$/, "")}`,
|
|
74
|
+
...health.checked === "quick" ? [`${command} store recover`] : []
|
|
75
|
+
],
|
|
76
|
+
impact,
|
|
77
|
+
externalUnaffected: "only this computer's copy is damaged: Telegram, MAX, the mail servers and Google Drive keep their own data, so whatever is lost here can be fetched again by a sync",
|
|
78
|
+
steps: [
|
|
79
|
+
"stop every timer and server of the WireCat tools; `store recover run` lists the ones still running",
|
|
80
|
+
`${command} store recover run`,
|
|
81
|
+
"run the fetch commands it prints, then start the timers again"
|
|
82
|
+
]
|
|
83
|
+
};
|
|
84
|
+
}, "explainDamage");
|
|
85
|
+
|
|
86
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
|
|
44
87
|
import { realpathSync, statSync } from "node:fs";
|
|
45
88
|
import { resolve } from "node:path";
|
|
46
89
|
|
|
47
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
90
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
|
|
48
91
|
var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
|
|
49
92
|
const creatable = /* @__PURE__ */ new Set();
|
|
50
93
|
let people = 0, identities = 0;
|
|
@@ -107,11 +150,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
|
|
|
107
150
|
}
|
|
108
151
|
}, "copyPeople");
|
|
109
152
|
|
|
110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
|
|
111
154
|
import { createHash } from "node:crypto";
|
|
112
155
|
var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
|
|
113
156
|
|
|
114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
|
|
115
158
|
var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
|
|
116
159
|
const colon = collection.indexOf(":");
|
|
117
160
|
const provider = collection.slice(0, colon);
|
|
@@ -155,7 +198,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
|
|
|
155
198
|
};
|
|
156
199
|
}, "currentCollection");
|
|
157
200
|
|
|
158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
|
|
159
202
|
var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
|
|
160
203
|
const mappings = /* @__PURE__ */ new Map();
|
|
161
204
|
const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
|
|
@@ -264,9 +307,9 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
|
|
|
264
307
|
}
|
|
265
308
|
for (const alias of snapshot.aliases) {
|
|
266
309
|
const sourceTag = snapshot.taggings.find((tagging) => tagging.tag_id === alias.aliasable_id);
|
|
267
|
-
const
|
|
310
|
+
const named2 = canonicalTagNamed(database, String(alias.name));
|
|
268
311
|
const targetTag = sourceTag && canonicalTagNamed(database, String(sourceTag.tag_name));
|
|
269
|
-
if (
|
|
312
|
+
if (named2 && named2.id !== targetTag?.id)
|
|
270
313
|
conflicts.add(`destination alias conflicts with source tag ${String(alias.aliasable_id)}`);
|
|
271
314
|
if (targetTag && alias.display === 1) {
|
|
272
315
|
const displayed = database.prepare("SELECT name_folded FROM aliases WHERE aliasable_type='tag' AND aliasable_id=? AND account_id IS NULL AND display=1").get(targetTag.id);
|
|
@@ -322,7 +365,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
|
|
|
322
365
|
};
|
|
323
366
|
}, "planTransfer");
|
|
324
367
|
|
|
325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
326
369
|
var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
|
|
327
370
|
var MAX_ENTITIES = 1e3;
|
|
328
371
|
var MAX_AUXILIARY = 1e4;
|
|
@@ -484,7 +527,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
|
|
|
484
527
|
};
|
|
485
528
|
}), "transferSnapshot");
|
|
486
529
|
|
|
487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
|
|
488
531
|
var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
|
|
489
532
|
if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
|
|
490
533
|
return provider ?? null;
|
|
@@ -656,7 +699,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
|
|
|
656
699
|
database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
|
|
657
700
|
}, "remapEntity");
|
|
658
701
|
|
|
659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
|
|
660
703
|
var locations = /* @__PURE__ */ __name((options) => {
|
|
661
704
|
for (const value of [options.source, options.destination, options.collection])
|
|
662
705
|
if (typeof value !== "string" || !value.trim())
|
|
@@ -752,7 +795,128 @@ var applyDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
|
|
|
752
795
|
}
|
|
753
796
|
}, "applyDocumentTransfer");
|
|
754
797
|
|
|
755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
799
|
+
import { existsSync, statSync as statSync2 } from "node:fs";
|
|
800
|
+
var QUICK_CHECK_LIMIT = 1e4;
|
|
801
|
+
var QUICK_HEALTH_CHECKS = "the file header, its size against its page count, and the schema's own pages";
|
|
802
|
+
var FTS5 = /^\s*CREATE\s+VIRTUAL\s+TABLE\s+\S+\s+USING\s+fts5\s*\(/i;
|
|
803
|
+
var fts5Tables = /* @__PURE__ */ __name((database) => database.prepare("SELECT name, sql FROM sqlite_master WHERE type = 'table' AND sql LIKE 'CREATE VIRTUAL TABLE%' ORDER BY name").all().filter((row) => FTS5.test(String(row.sql))).map((row) => {
|
|
804
|
+
const sql = String(row.sql);
|
|
805
|
+
return { name: String(row.name), sql, external: /content\s*=\s*'[^']+'/i.test(sql) };
|
|
806
|
+
}), "fts5Tables");
|
|
807
|
+
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
808
|
+
var bytesOf = /* @__PURE__ */ __name((path) => statSync2(path, { throwIfNoEntry: false })?.size ?? 0, "bytesOf");
|
|
809
|
+
var damagedTables = /* @__PURE__ */ __name((database, lines) => {
|
|
810
|
+
const roots = new Map(database.prepare("SELECT rootpage, tbl_name FROM sqlite_master WHERE rootpage > 0").all().map((row) => [Number(row.rootpage), String(row.tbl_name)]));
|
|
811
|
+
const owners = new Map(database.prepare("SELECT name, tbl_name FROM sqlite_master WHERE type = 'index'").all().map((row) => [String(row.name), String(row.tbl_name)]));
|
|
812
|
+
const virtual = database.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND sql LIKE 'CREATE VIRTUAL TABLE%'").all().map((row) => String(row.name));
|
|
813
|
+
const ownerOf = /* @__PURE__ */ __name((table) => table === null ? null : virtual.find((name) => table.startsWith(`${name}_`)) ?? table, "ownerOf");
|
|
814
|
+
const tables = /* @__PURE__ */ new Map();
|
|
815
|
+
for (const raw of lines) {
|
|
816
|
+
const line = raw.replace(/^\*\*\* in database \w+ \*\*\*\s*/, "");
|
|
817
|
+
const tree = /^Tree (\d+) /.exec(line);
|
|
818
|
+
const column = /value in (\w+)\.\w+/.exec(line) ?? /^table (\w+): /.exec(line);
|
|
819
|
+
const index = /index (\w+)/.exec(line)?.[1];
|
|
820
|
+
const table = ownerOf(tree ? roots.get(Number(tree[1])) ?? null : column ? column[1] ?? null : index ? owners.get(index) ?? null : null);
|
|
821
|
+
const known = tables.get(table);
|
|
822
|
+
if (known)
|
|
823
|
+
known.problems += 1;
|
|
824
|
+
else
|
|
825
|
+
tables.set(table, { table, problems: 1, sample: line.slice(0, 200) });
|
|
826
|
+
}
|
|
827
|
+
return [...tables.values()].sort((a, b) => b.problems - a.problems);
|
|
828
|
+
}, "damagedTables");
|
|
829
|
+
var searchIndexHealth = /* @__PURE__ */ __name((database) => fts5Tables(database).map(({ name }) => {
|
|
830
|
+
try {
|
|
831
|
+
database.exec("BEGIN");
|
|
832
|
+
try {
|
|
833
|
+
database.exec(`INSERT INTO "${name}" ("${name}", rank) VALUES ('integrity-check', 0)`);
|
|
834
|
+
} finally {
|
|
835
|
+
database.exec("ROLLBACK");
|
|
836
|
+
}
|
|
837
|
+
return { name, ok: true };
|
|
838
|
+
} catch (error) {
|
|
839
|
+
return { name, ok: false, error: messageOf(error) };
|
|
840
|
+
}
|
|
841
|
+
}), "searchIndexHealth");
|
|
842
|
+
var pragmaLines = /* @__PURE__ */ __name((database, sql) => database.prepare(sql).all().flatMap((row) => String(Object.values(row)[0]).split("\n")), "pragmaLines");
|
|
843
|
+
var checkLines = /* @__PURE__ */ __name((database) => {
|
|
844
|
+
try {
|
|
845
|
+
return pragmaLines(database, `PRAGMA quick_check(${QUICK_CHECK_LIMIT})`);
|
|
846
|
+
} catch {
|
|
847
|
+
const tables = database.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND rootpage > 0 ORDER BY name").all().map((row) => String(row.name));
|
|
848
|
+
return tables.flatMap((table) => {
|
|
849
|
+
try {
|
|
850
|
+
return pragmaLines(database, `PRAGMA quick_check("${table}")`).filter((line) => line !== "ok");
|
|
851
|
+
} catch (error) {
|
|
852
|
+
return [`table ${table}: ${messageOf(error)}`];
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
}, "checkLines");
|
|
857
|
+
var quickHealth = /* @__PURE__ */ __name((database, path) => {
|
|
858
|
+
const pragma = /* @__PURE__ */ __name((name) => Number(Object.values(database.prepare(`PRAGMA ${name}`).get() ?? {})[0] ?? 0), "pragma");
|
|
859
|
+
const file = {
|
|
860
|
+
bytes: bytesOf(path),
|
|
861
|
+
pages: pragma("page_count"),
|
|
862
|
+
pageSize: pragma("page_size"),
|
|
863
|
+
freePages: pragma("freelist_count")
|
|
864
|
+
};
|
|
865
|
+
const schema = database.prepare("PRAGMA quick_check('sqlite_schema')").all().map((row) => String(Object.values(row)[0]));
|
|
866
|
+
const walFrames = existsSync(`${path}-wal`) && bytesOf(`${path}-wal`) > 0;
|
|
867
|
+
const sized = walFrames || file.bytes === file.pages * file.pageSize;
|
|
868
|
+
const problems = [
|
|
869
|
+
...schema.length === 1 && schema[0] === "ok" ? [] : schema,
|
|
870
|
+
...sized ? [] : [`the file holds ${file.bytes} bytes, its header says ${file.pages * file.pageSize}`]
|
|
871
|
+
];
|
|
872
|
+
return { file, problems };
|
|
873
|
+
}, "quickHealth");
|
|
874
|
+
var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) => {
|
|
875
|
+
const started = Date.now();
|
|
876
|
+
const checked = deep ? "deep" : "quick";
|
|
877
|
+
const done = /* @__PURE__ */ __name((health) => ({
|
|
878
|
+
path,
|
|
879
|
+
checked,
|
|
880
|
+
...health,
|
|
881
|
+
ms: Date.now() - started
|
|
882
|
+
}), "done");
|
|
883
|
+
let database;
|
|
884
|
+
try {
|
|
885
|
+
database = (await openSqlite(path, { readOnly: !deep })).database;
|
|
886
|
+
} catch (error) {
|
|
887
|
+
return done({ ok: false, error: messageOf(error) });
|
|
888
|
+
}
|
|
889
|
+
try {
|
|
890
|
+
const { file, problems } = quickHealth(database, path);
|
|
891
|
+
if (!deep) {
|
|
892
|
+
return done({
|
|
893
|
+
ok: problems.length === 0,
|
|
894
|
+
file,
|
|
895
|
+
...problems.length ? {
|
|
896
|
+
problems: problems.length,
|
|
897
|
+
damagedTables: [{ table: null, problems: problems.length, sample: problems[0] }]
|
|
898
|
+
} : {}
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
database.exec("PRAGMA busy_timeout = 30000");
|
|
902
|
+
const lines = checkLines(database);
|
|
903
|
+
const pagesOk = lines.length === 1 && lines[0] === "ok";
|
|
904
|
+
const indexes = searchIndexHealth(database);
|
|
905
|
+
return done({
|
|
906
|
+
ok: pagesOk && problems.length === 0 && indexes.every((index) => index.ok),
|
|
907
|
+
file,
|
|
908
|
+
problems: pagesOk ? 0 : lines.length,
|
|
909
|
+
damagedTables: pagesOk ? [] : damagedTables(database, lines),
|
|
910
|
+
searchIndexes: indexes
|
|
911
|
+
});
|
|
912
|
+
} catch (error) {
|
|
913
|
+
return done({ ok: false, error: messageOf(error) });
|
|
914
|
+
} finally {
|
|
915
|
+
database.close();
|
|
916
|
+
}
|
|
917
|
+
}, "storeHealth");
|
|
918
|
+
|
|
919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
756
920
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
757
921
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
758
922
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -774,7 +938,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
774
938
|
}
|
|
775
939
|
}, "previewProjectAnnotationSnapshot");
|
|
776
940
|
|
|
777
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
778
942
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
779
943
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
780
944
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -796,8 +960,12 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
|
796
960
|
}, "snapshotProjectAnnotations");
|
|
797
961
|
|
|
798
962
|
export {
|
|
963
|
+
explainDamage,
|
|
799
964
|
previewDocumentTransfer,
|
|
800
965
|
applyDocumentTransfer,
|
|
966
|
+
QUICK_HEALTH_CHECKS,
|
|
967
|
+
fts5Tables,
|
|
968
|
+
storeHealth,
|
|
801
969
|
previewProjectAnnotationSnapshot,
|
|
802
970
|
snapshotProjectAnnotations
|
|
803
971
|
};
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DALBYUPC.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/search/languages.js
|
|
11
11
|
var LANGUAGES = [
|
|
12
12
|
{ name: "russian", code: "ru", label: "Russian", script: "cyrillic", dictionary: "dictionary-ru" },
|
|
13
13
|
{ name: "english", code: "en", label: "English", script: "latin", dictionary: "dictionary-en" },
|
|
@@ -15,12 +15,12 @@ var LANGUAGES = [
|
|
|
15
15
|
];
|
|
16
16
|
var languagesOf = /* @__PURE__ */ __name((script) => LANGUAGES.filter((one) => one.script === script).map(({ name }) => name), "languagesOf");
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/normalize.js
|
|
19
19
|
var NORMALIZER_VERSION = 1;
|
|
20
20
|
var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
|
|
21
21
|
var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
|
|
24
24
|
var BaseStemmer = class {
|
|
25
25
|
static {
|
|
26
26
|
__name(this, "BaseStemmer");
|
|
@@ -395,7 +395,7 @@ var BaseStemmer = class {
|
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
397
|
|
|
398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
|
|
399
399
|
var a_0 = [
|
|
400
400
|
["arsen", -1],
|
|
401
401
|
["commun", -1],
|
|
@@ -1096,7 +1096,7 @@ var english_stemmer_default = class extends BaseStemmer {
|
|
|
1096
1096
|
stemWord = this.stem;
|
|
1097
1097
|
};
|
|
1098
1098
|
|
|
1099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
|
|
1100
1100
|
var a_02 = [
|
|
1101
1101
|
["\u0432", 1],
|
|
1102
1102
|
["\u0438\u0432", 2, 1],
|
|
@@ -1519,7 +1519,7 @@ var russian_stemmer_default = class extends BaseStemmer {
|
|
|
1519
1519
|
stemWord = this.stem;
|
|
1520
1520
|
};
|
|
1521
1521
|
|
|
1522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
|
|
1523
1523
|
var a_03 = [
|
|
1524
1524
|
["", 6],
|
|
1525
1525
|
["\xE1", 1, 1],
|
|
@@ -2195,7 +2195,7 @@ var spanish_stemmer_default = class extends BaseStemmer {
|
|
|
2195
2195
|
stemWord = this.stem;
|
|
2196
2196
|
};
|
|
2197
2197
|
|
|
2198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/search/stem.js
|
|
2199
2199
|
var SNOWBALL_VERSION = "3.1.1";
|
|
2200
2200
|
var CYRILLIC_STEMMERS = [...languagesOf("cyrillic"), "none"];
|
|
2201
2201
|
var LATIN_STEMMERS = [...languagesOf("latin"), "none"];
|
|
@@ -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.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
|
|
8
8
|
var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
|
|
9
9
|
var kindsByConstructor = /* @__PURE__ */ new WeakMap();
|
|
10
10
|
function collectKinds(ctor) {
|
|
@@ -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.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/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 {
|
|
@@ -25,10 +25,12 @@ var PRAGMAS = `
|
|
|
25
25
|
PRAGMA journal_mode = WAL;
|
|
26
26
|
PRAGMA foreign_keys = ON;
|
|
27
27
|
`;
|
|
28
|
+
var isQueryOnly = /* @__PURE__ */ __name((database) => Number(Object.values(database.prepare("PRAGMA query_only").get() ?? {})[0]) === 1, "isQueryOnly");
|
|
28
29
|
|
|
29
30
|
export {
|
|
30
31
|
TIME_LIMIT_FUNCTION,
|
|
31
32
|
TimeLimitReached,
|
|
32
33
|
beforeTimeLimit,
|
|
33
|
-
PRAGMAS
|
|
34
|
+
PRAGMAS,
|
|
35
|
+
isQueryOnly
|
|
34
36
|
};
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
QUERY_REASONS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2NWOYXPJ.js";
|
|
6
6
|
import {
|
|
7
7
|
defineReasons
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BHNBWFT5.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.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/errors/reasons.js
|
|
14
14
|
var validation = /* @__PURE__ */ __name((reason, message) => [reason, "validation_error", message], "validation");
|
|
15
15
|
var QUERY = [
|
|
16
16
|
["query.aborted", "the search was stopped before it finished"],
|
|
@@ -165,6 +165,14 @@ var OTHERS = [
|
|
|
165
165
|
],
|
|
166
166
|
validation("store.refused", "the local store refused the document text"),
|
|
167
167
|
["store.not-writable", "permission_error", "the message store cannot be written from this process"],
|
|
168
|
+
validation("store.in-use", "a process or a scheduled timer has the store open; stop it, then recover the store"),
|
|
169
|
+
[
|
|
170
|
+
"store.sqlite3-missing",
|
|
171
|
+
"configuration_error",
|
|
172
|
+
"recovering the store needs the sqlite3 program, 3.43 or newer, with its .recover command"
|
|
173
|
+
],
|
|
174
|
+
validation("store.recovery-failed", "the recovered store did not pass its check, so the store was left as it was"),
|
|
175
|
+
validation("store.changed-during-recovery", "the store was written to during the recovery, so it was left as it was"),
|
|
168
176
|
[
|
|
169
177
|
"store.vector-extension-missing",
|
|
170
178
|
"configuration_error",
|
|
@@ -212,14 +220,24 @@ var OTHERS = [
|
|
|
212
220
|
validation("money.amount", "the amount is not a decimal string in the currency's scale"),
|
|
213
221
|
validation("money.currency", "the currency is not one the store keeps money in"),
|
|
214
222
|
validation("money.quantity", "the quantity is not a decimal above 0"),
|
|
215
|
-
validation("deal.closed", "a
|
|
216
|
-
validation("deal.
|
|
217
|
-
|
|
218
|
-
validation("deal.ref", "the reference names no deal"),
|
|
223
|
+
validation("deal.closed", "a deleted deal or lead does not move or close"),
|
|
224
|
+
validation("deal.copy", "a CRM's copy changes in the CRM; its next sync brings the change here"),
|
|
225
|
+
validation("deal.field", "a field of the deal or lead is not valid"),
|
|
226
|
+
validation("deal.ref", "the reference names no deal or lead"),
|
|
219
227
|
validation("deal.stage", "no stage of that name, or a stage name more than one pipeline has"),
|
|
220
|
-
validation("pipeline.
|
|
228
|
+
validation("pipeline.ambiguous", "more than one pipeline has that name; name it by its pipeline: reference"),
|
|
229
|
+
validation("pipeline.duplicate", "a pipeline of that name and kind is already stored"),
|
|
221
230
|
validation("pipeline.field", "a pipeline needs a name and at least one stage, each named once"),
|
|
222
|
-
["pipeline.not-found", "not_found", "no stored pipeline has that name"],
|
|
231
|
+
["pipeline.not-found", "not_found", "no stored pipeline has that name or reference"],
|
|
232
|
+
validation("crm.stage-unknown", "a CRM item stands in a stage the store does not hold; it was not kept"),
|
|
233
|
+
validation("crm.item-invalid", "a CRM item has a field the store refuses, such as a currency it does not keep"),
|
|
234
|
+
validation("crm.pipeline-required", "the CRM has more than one pipeline of the kind; the write names one"),
|
|
235
|
+
validation("field.unknown", "no custom field of the kind has that code or label; `fields list` lists them"),
|
|
236
|
+
validation("field.ambiguous", "more than one custom field has that label; name one by its code"),
|
|
237
|
+
validation("field.unknown-option", "the list field has no option with that id or label"),
|
|
238
|
+
validation("field.unknown-kind", "fields are listed for deals, leads, people and organizations only"),
|
|
239
|
+
validation("crm.write-unsupported", "the CRM does not take this write, or does not recognise a repeated one"),
|
|
240
|
+
validation("crm.unlisted-held", "a list of every id would mark most of a kind deleted; nothing was, until --rescan"),
|
|
223
241
|
validation("order.duplicate", "the shop's order with this number is already stored; change its status instead"),
|
|
224
242
|
validation("order.proposed", "the shop's order with this number already waits for the owner in a findings batch"),
|
|
225
243
|
validation("order.field", "a field of the order is not valid"),
|
|
@@ -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.600.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_b9e89c8ee4e42a523b0faff8db1d3e1d/node_modules/@wirecat/cli-core/dist/http/listen.js
|
|
8
8
|
import { createServer } from "node:http";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
var MAX_BODY = 4 * 1024 * 1024;
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
singleLine
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DALBYUPC.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.80.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
|
|
11
11
|
var FIRST_PARTY_TOOLS = [
|
|
12
12
|
{ name: "tg", package: "@wirecat/tg-cli" },
|
|
13
13
|
{ name: "max", package: "@wirecat/max-cli" },
|
|
@@ -30,7 +30,7 @@ var PROGRAM_PREFIX = "wcat-";
|
|
|
30
30
|
var DESCRIBE_FLAG = "--wcat-describe";
|
|
31
31
|
var DISPATCH_FLAG = "--wcat-dispatch";
|
|
32
32
|
|
|
33
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.80.
|
|
33
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
|
|
34
34
|
var DESCRIBE_FORMAT = 1;
|
|
35
35
|
var describeAnswer = /* @__PURE__ */ __name((tool) => ({
|
|
36
36
|
wcat_describe: DESCRIBE_FORMAT,
|
|
@@ -59,7 +59,7 @@ var parseDescribe = /* @__PURE__ */ __name((text) => {
|
|
|
59
59
|
};
|
|
60
60
|
}, "parseDescribe");
|
|
61
61
|
|
|
62
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.80.
|
|
62
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
|
|
63
63
|
import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
64
64
|
import { join } from "node:path";
|
|
65
65
|
var SHIM_FORMAT = 1;
|