@wirecat/zoom-cli 0.68.0 → 0.70.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/README.md +1 -1
- package/dist/account-removal.d.ts +6 -0
- package/dist/account-removal.d.ts.map +1 -0
- package/dist/account-removal.js +43 -0
- package/dist/account-removal.js.map +1 -0
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-R66UM3HM.js → all-profiles-GE2TFJJP.js} +9 -9
- package/dist/bundle/answer-policy-GOXSDYDD.js +104 -0
- package/dist/bundle/{anthropic-4ZI2BPLG.js → anthropic-FA6NHENI.js} +9 -7
- package/dist/bundle/{app-server-64O5IQI5.js → app-server-IRADMSNX.js} +50 -50
- package/dist/bundle/{bun-HUHQD76Z.js → bun-ZYZGGCX5.js} +2 -2
- package/dist/bundle/{bun-sqlite-VOVHPTIF.js → bun-sqlite-Y24TUIGS.js} +4 -4
- package/dist/bundle/{chunk-W42BJ65M.js → chunk-2JEM2YNV.js} +1 -1
- package/dist/bundle/{chunk-3BRV2YU2.js → chunk-2QFPVUM3.js} +2 -2
- package/dist/bundle/{chunk-KAPJQGHE.js → chunk-2U6SER67.js} +1 -1
- package/dist/bundle/{chunk-77I67HWF.js → chunk-3KC7C465.js} +7 -7
- package/dist/bundle/{chunk-YQRNFG2E.js → chunk-4DSIWYGO.js} +7661 -13544
- package/dist/bundle/{chunk-7DUYFITC.js → chunk-56OV5ASY.js} +11 -11
- package/dist/bundle/{chunk-AVEIQMHZ.js → chunk-5XWCBLUR.js} +1 -1
- package/dist/bundle/{chunk-HXOAPH47.js → chunk-6HJFIMT7.js} +1 -1
- package/dist/bundle/{chunk-SSPSNSC5.js → chunk-6IF5ZHDS.js} +1 -1
- package/dist/bundle/{chunk-BOAMDYLY.js → chunk-7QC4M4HS.js} +2 -2
- package/dist/bundle/{chunk-6T3P226D.js → chunk-AISJCF7A.js} +4 -4
- package/dist/bundle/chunk-AT2XKNFN.js +342 -0
- package/dist/bundle/{chunk-BSM43OMN.js → chunk-AUNW7N4I.js} +1 -1
- package/dist/bundle/{chunk-R7LFGEDE.js → chunk-BSS6HX4O.js} +2 -2
- package/dist/bundle/{chunk-FMQS7HCC.js → chunk-BVWF4B33.js} +251 -10
- package/dist/bundle/{chunk-DGNPJGD3.js → chunk-CEJJBZAE.js} +9 -15
- package/dist/bundle/{chunk-L4WVLRXM.js → chunk-CHGUNZ3L.js} +3 -3
- package/dist/bundle/{chunk-LBOSTBAY.js → chunk-CIZ25UPK.js} +3841 -2497
- package/dist/bundle/{chunk-TN3FH2GQ.js → chunk-CSEBB4OP.js} +8 -8
- package/dist/bundle/{chunk-JO4YADNV.js → chunk-D3PNCJD5.js} +5 -5
- package/dist/bundle/{chunk-US5C3WAY.js → chunk-DCUWJITQ.js} +30 -30
- package/dist/bundle/{chunk-QXTREL2M.js → chunk-DNR4B5YV.js} +2 -2
- package/dist/bundle/{chunk-PUTGTW6W.js → chunk-DXCTW3MV.js} +1 -1
- package/dist/bundle/{chunk-B6JMVB6R.js → chunk-EOSVN2ER.js} +1 -1
- package/dist/bundle/{chunk-ZRD3NDOX.js → chunk-GB5X3GBE.js} +23 -1
- package/dist/bundle/{chunk-32FPA7P2.js → chunk-GVT5363M.js} +2 -2
- package/dist/bundle/{chunk-EWIBLDQQ.js → chunk-IINZIP73.js} +7 -7
- package/dist/bundle/{chunk-5JAYUG3X.js → chunk-IS3ZTT2Z.js} +5 -5
- package/dist/bundle/{chunk-LYWUG43B.js → chunk-IWPXWGF7.js} +34 -34
- package/dist/bundle/{chunk-JRCYFCPL.js → chunk-J3SKXICS.js} +350 -136
- package/dist/bundle/{chunk-UDJTRFRV.js → chunk-JRO2FWO2.js} +1 -1
- package/dist/bundle/chunk-JULBAECW.js +126 -0
- package/dist/bundle/{chunk-FNQASORM.js → chunk-KM736RMJ.js} +1 -1
- package/dist/bundle/{chunk-4TLPOY22.js → chunk-KWRCP55G.js} +11 -11
- package/dist/bundle/{chunk-SRP6SFFD.js → chunk-L24UOUWG.js} +1 -1
- package/dist/bundle/{chunk-AJ7CMUGD.js → chunk-LAG5O2FV.js} +218 -231
- package/dist/bundle/{chunk-UU5PLDRA.js → chunk-LXXCLQCW.js} +2 -2
- package/dist/bundle/{chunk-65T3PU75.js → chunk-M6JIXMQZ.js} +5 -1
- package/dist/bundle/{chunk-LV7QRR5S.js → chunk-M7E44TMT.js} +5 -5
- package/dist/bundle/{chunk-6XO7RTJY.js → chunk-M7VUXXGS.js} +110 -8
- package/dist/bundle/{chunk-A63ZFOQJ.js → chunk-MVOMLJYQ.js} +3 -3
- package/dist/bundle/{chunk-DVA6MQWK.js → chunk-OA37BWE5.js} +1 -1
- package/dist/bundle/{chunk-77KFLU5F.js → chunk-OAQLVV6W.js} +2 -2
- package/dist/bundle/{chunk-KNE6VFHZ.js → chunk-OORMSM6O.js} +1 -1
- package/dist/bundle/{chunk-TZUKDM72.js → chunk-PV6OHXHN.js} +16 -16
- package/dist/bundle/{chunk-2OSBCYJT.js → chunk-QL7EMFIC.js} +18 -18
- package/dist/bundle/{chunk-4YFJYSSK.js → chunk-QO2KPU26.js} +45 -29
- package/dist/bundle/{chunk-GOXDBCDM.js → chunk-RB33VTUW.js} +297 -397
- package/dist/bundle/{chunk-TDGZMC6K.js → chunk-RIPAUCKJ.js} +59 -55
- package/dist/bundle/{chunk-6CJ7NHIP.js → chunk-RO3ZR4VP.js} +12 -12
- package/dist/bundle/{chunk-BL36NSV5.js → chunk-RQG5VOGH.js} +12 -2
- package/dist/bundle/{chunk-YTF2WPV4.js → chunk-RRRJCHUC.js} +2162 -1250
- package/dist/bundle/chunk-RWIILYKW.js +66 -0
- package/dist/bundle/{chunk-YJY3W2ZT.js → chunk-SNIY3JDN.js} +21 -18
- package/dist/bundle/{chunk-EH5QGQFR.js → chunk-SVF3NDAO.js} +3 -3
- package/dist/bundle/{chunk-VLD7Y4SY.js → chunk-UVPL7YAY.js} +5 -5
- package/dist/bundle/{chunk-2T6XHWDX.js → chunk-V2E7QFZ3.js} +1 -1
- package/dist/bundle/{chunk-K67V24AT.js → chunk-V5GRSOCZ.js} +4 -4
- package/dist/bundle/{chunk-DWSUSWAX.js → chunk-VE2VNECR.js} +131 -12
- package/dist/bundle/{chunk-RRYUD2EF.js → chunk-VJ5ZU4UF.js} +22 -4
- package/dist/bundle/{chunk-7QNJICKZ.js → chunk-VNU5L37V.js} +26 -26
- package/dist/bundle/{chunk-6TJ62LZQ.js → chunk-VSLDWT4E.js} +3 -3
- package/dist/bundle/{chunk-P2TISY3R.js → chunk-W7ZEEC4K.js} +1 -1
- package/dist/bundle/{chunk-NRRI37NJ.js → chunk-WOIHSQAL.js} +44 -0
- package/dist/bundle/{chunk-EJDV5IIF.js → chunk-X4ZF4XXI.js} +1 -1
- package/dist/bundle/{chunk-FBLUKCIR.js → chunk-XRFHQGOD.js} +1 -1
- package/dist/bundle/{chunk-KUB2U5NT.js → chunk-XWQNJKTP.js} +5 -5
- package/dist/bundle/chunk-Y6C3N7YG.js +12434 -0
- package/dist/bundle/{chunk-474WF55M.js → chunk-YJSPBUGB.js} +63 -32
- package/dist/bundle/{chunk-RP3U3J53.js → chunk-YTN2JN6N.js} +7 -7
- package/dist/bundle/{chunk-Y5LP5SHV.js → chunk-YUHM2OJM.js} +10 -10
- package/dist/bundle/{chunk-7AUP2WT3.js → chunk-ZBKWRYRS.js} +2 -2
- package/dist/bundle/{chunk-355PHJYX.js → chunk-ZS55EERO.js} +1 -1
- package/dist/bundle/{chunk-TUNQ6NE2.js → chunk-ZSKE7N2U.js} +3 -3
- package/dist/bundle/{chunk-PIHBD3YS.js → chunk-ZV3INEKM.js} +4 -4
- package/dist/bundle/{cli-VQJ7ZRYR.js → cli-VRSQ7HAE.js} +76 -60
- package/dist/bundle/command-contract-RPRKHVU6.js +41 -0
- package/dist/bundle/config-QU6A6VIO.js +90 -0
- package/dist/bundle/{decode-L3ENO2XH.js → decode-523PUQMR.js} +4 -4
- package/dist/bundle/{dispatch-5MGDLOK4.js → dispatch-IZCAK47P.js} +1 -1
- package/dist/bundle/{dist-WQLS7U23.js → dist-6WWKPEVW.js} +98 -22
- package/dist/bundle/{echarts-5LLJ6JXC.js → echarts-S5UMX2D3.js} +2 -2
- package/dist/bundle/{embed-37MYTCU7.js → embed-ODPDVHUK.js} +5 -5
- package/dist/bundle/{embedder-GNGHVJAO.js → embedder-PAXRBSZE.js} +8 -8
- package/dist/bundle/{failure-CR64C4XA.js → failure-R2OIHCE5.js} +1 -1
- package/dist/bundle/{first-run-NR5JKYP3.js → first-run-NVTDR5VO.js} +8 -8
- package/dist/bundle/first-screen-5RWZDWLK.js +39 -0
- package/dist/bundle/{folders-VU4IN35Y.js → folders-ZXTOFY4T.js} +3 -3
- package/dist/bundle/{instructions-P72XX4AK.js → instructions-DUB7E6C5.js} +1 -1
- package/dist/bundle/{main-QYFCYSTW.js → main-A7JSYQI6.js} +18 -18
- package/dist/bundle/{meetings-66UQINKI.js → meetings-BDZQV3HR.js} +4 -4
- package/dist/bundle/{node-ZB4RNICS.js → node-E25KP53H.js} +2 -2
- package/dist/bundle/{node-sqlite-XPRKBDF3.js → node-sqlite-PHWDFZCP.js} +5 -5
- package/dist/bundle/{oauth-WJRDUU5J.js → oauth-G2K46IYP.js} +6 -6
- package/dist/bundle/{open-S2YSIEOW.js → open-INWS5HIZ.js} +4 -4
- package/dist/bundle/{openai-CRNZFNZD.js → openai-T44ORVGQ.js} +10 -10
- package/dist/bundle/{output-file-6COFGPUL.js → output-file-YGQYZCBJ.js} +4 -4
- package/dist/bundle/{process-XNN4WG6N.js → process-UJ2JHMJN.js} +1 -1
- package/dist/bundle/{program-BRPJKRCX.js → program-LYTGFV6L.js} +115 -72
- package/dist/bundle/{prompt-7RQOL25I.js → prompt-VTUCRCE4.js} +6 -4
- package/dist/bundle/{recognize-N5WADGQB.js → recognize-3CEPOW2F.js} +3 -3
- package/dist/bundle/{remote-WHYV35IF.js → remote-DRQEXEZL.js} +6 -6
- package/dist/bundle/{rerank-FBMZVWSH.js → rerank-UL4KNNVN.js} +6 -6
- package/dist/bundle/{run-log-TOCHREH2.js → run-log-UZAB5CWF.js} +54 -54
- package/dist/bundle/{serve-4BABX4WS.js → serve-P5UWUOWQ.js} +8 -8
- package/dist/bundle/server-F3NPVMS2.js +72 -0
- package/dist/bundle/{server-CDVI6LOB.js → server-M6XK2Y3X.js} +42 -42
- package/dist/bundle/{services-PIY33I7R.js → services-4HRYNY62.js} +66 -30
- package/dist/bundle/{speech-LS5Q4FL2.js → speech-BBPBMFAO.js} +12 -12
- package/dist/bundle/{state-YUX5R2R7.js → state-GDSUNUSY.js} +5 -5
- package/dist/bundle/{store-BD7HAXAA.js → store-LBQ6FZP2.js} +41 -15
- package/dist/bundle/{store-ERMGBF2B.js → store-VWLABMLF.js} +57 -17
- package/dist/bundle/store-connection-XEBFP56U.js +83 -0
- package/dist/bundle/store-maintenance-command-G43JN57J.js +61 -0
- package/dist/bundle/{streaming-O53PIORL.js → streaming-EJ3NM2C2.js} +5 -5
- package/dist/bundle/{tokens-QKNEP2GJ.js → tokens-BE6CJMR5.js} +5 -5
- package/dist/bundle/zm.js +3 -3
- package/dist/bundle/{zoom-app-XJXZ4ZBX.js → zoom-app-YIEJLWCW.js} +6 -6
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +1 -0
- package/dist/first-screen.js.map +1 -1
- package/dist/permissions.js +1 -1
- package/dist/permissions.js.map +1 -1
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +11 -0
- package/dist/setup-commands.js.map +1 -1
- package/dist/tokens.d.ts +2 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +11 -0
- package/dist/tokens.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-UCGUO53A.js +0 -104
- package/dist/bundle/chunk-AYEVBAGO.js +0 -178
- package/dist/bundle/chunk-EZRPSZJS.js +0 -33
- package/dist/bundle/chunk-NUJMJQXV.js +0 -787
- package/dist/bundle/chunk-YOAEZSDG.js +0 -22
- package/dist/bundle/command-contract-JPUWWYIV.js +0 -41
- package/dist/bundle/config-YGLLR77A.js +0 -90
- package/dist/bundle/first-screen-RCR7ATO2.js +0 -39
- package/dist/bundle/server-XOFQKFVO.js +0 -72
- package/dist/bundle/store-connection-JBR6CMTJ.js +0 -83
- package/dist/bundle/store-maintenance-command-I5DUSO2C.js +0 -62
|
@@ -23,16 +23,20 @@ import {
|
|
|
23
23
|
tagMemberIds,
|
|
24
24
|
thingOf,
|
|
25
25
|
write
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4DSIWYGO.js";
|
|
27
27
|
import {
|
|
28
28
|
fold
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3KC7C465.js";
|
|
30
30
|
import {
|
|
31
|
+
ADDED_PROVIDER,
|
|
31
32
|
filesAccountSql,
|
|
32
33
|
folderProviderOf,
|
|
33
34
|
folderProviderSql,
|
|
34
35
|
isDocumentAccountProvider
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-Y6C3N7YG.js";
|
|
37
|
+
import {
|
|
38
|
+
damagedFile
|
|
39
|
+
} from "./chunk-RWIILYKW.js";
|
|
36
40
|
import {
|
|
37
41
|
CliError
|
|
38
42
|
} from "./chunk-FEM2JQN2.js";
|
|
@@ -40,13 +44,14 @@ import {
|
|
|
40
44
|
__name
|
|
41
45
|
} from "./chunk-ZVVMGPBJ.js";
|
|
42
46
|
|
|
43
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
44
48
|
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
45
49
|
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
46
50
|
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
47
51
|
var WIRECAT_UNITS = ["memo-*", "mail-*", "tg-*", "max-*", "wirecat-*"];
|
|
48
|
-
var
|
|
49
|
-
|
|
52
|
+
var seen = /* @__PURE__ */ __name((mark) => `\`${mark.command}\` found the store damaged at ${mark.at} (${mark.error})`, "seen");
|
|
53
|
+
var explainDamage = /* @__PURE__ */ __name((health, command, mark = null) => {
|
|
54
|
+
if (health.ok && !mark)
|
|
50
55
|
return null;
|
|
51
56
|
const indexNames = (health.searchIndexes ?? []).map((index) => index.name);
|
|
52
57
|
const badIndexes = (health.searchIndexes ?? []).filter((index) => !index.ok).map((index) => index.name);
|
|
@@ -55,12 +60,13 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
55
60
|
const derived = [.../* @__PURE__ */ new Set([...tables.filter((table) => isDerivedTable(table, indexNames)), ...badIndexes])];
|
|
56
61
|
const unopened = health.error !== void 0;
|
|
57
62
|
const json = (health.invalidJson ?? []).map(({ table, column }) => `${table}.${column}`);
|
|
58
|
-
const
|
|
63
|
+
const checked = health.ok ? `${seen(mark)}; the quick check reads too little to see it, and a deep check that passes clears it` : 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)}` : "") + (json.length ? `; values that are not valid JSON in ${named(json)}` : "");
|
|
64
|
+
const what = mark && !health.ok ? `${checked}; ${seen(mark)}` : checked;
|
|
59
65
|
const impact = [
|
|
60
66
|
...sources.length ? [`some rows of ${named(sources)} cannot be read; a recovery keeps every row it can read and names the rest`] : [],
|
|
61
67
|
...derived.length ? [`searches may miss results or fail; ${named(derived)} hold nothing that is not elsewhere, and are rebuilt`] : [],
|
|
62
68
|
...json.length ? [`a read of a row with a broken JSON value fails ("malformed JSON"); a recovery clears those values`] : [],
|
|
63
|
-
"reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
|
|
69
|
+
mark ? "reads that do not touch a damaged page work; every command that writes the store refuses until it is recovered" : "reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
|
|
64
70
|
];
|
|
65
71
|
return {
|
|
66
72
|
what,
|
|
@@ -73,7 +79,7 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
73
79
|
`journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`,
|
|
74
80
|
"journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata",
|
|
75
81
|
`df -h ${health.path.replace(/\/[^/]*$/, "")}`,
|
|
76
|
-
...health.checked === "quick" ? [`${command} store recover`] : []
|
|
82
|
+
...health.checked === "quick" || health.ok ? [`${command} store recover`] : []
|
|
77
83
|
],
|
|
78
84
|
impact,
|
|
79
85
|
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",
|
|
@@ -85,11 +91,11 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
85
91
|
};
|
|
86
92
|
}, "explainDamage");
|
|
87
93
|
|
|
88
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
94
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
|
|
89
95
|
import { realpathSync, statSync } from "node:fs";
|
|
90
96
|
import { resolve } from "node:path";
|
|
91
97
|
|
|
92
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
98
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
|
|
93
99
|
var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
|
|
94
100
|
const creatable = /* @__PURE__ */ new Set();
|
|
95
101
|
let people = 0, identities = 0;
|
|
@@ -152,11 +158,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
|
|
|
152
158
|
}
|
|
153
159
|
}, "copyPeople");
|
|
154
160
|
|
|
155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
|
|
156
162
|
import { createHash } from "node:crypto";
|
|
157
163
|
var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
|
|
158
164
|
|
|
159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
|
|
160
166
|
var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
|
|
161
167
|
const colon = collection.indexOf(":");
|
|
162
168
|
const provider = collection.slice(0, colon);
|
|
@@ -200,7 +206,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
|
|
|
200
206
|
};
|
|
201
207
|
}, "currentCollection");
|
|
202
208
|
|
|
203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
|
|
204
210
|
var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
|
|
205
211
|
const mappings = /* @__PURE__ */ new Map();
|
|
206
212
|
const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
|
|
@@ -367,7 +373,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
|
|
|
367
373
|
};
|
|
368
374
|
}, "planTransfer");
|
|
369
375
|
|
|
370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
371
377
|
var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
|
|
372
378
|
var MAX_ENTITIES = 1e3;
|
|
373
379
|
var MAX_AUXILIARY = 1e4;
|
|
@@ -509,7 +515,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
|
|
|
509
515
|
item.bot = { name: String(bot.name), kind: String(bot.kind) };
|
|
510
516
|
}
|
|
511
517
|
if (thing.type === "document") {
|
|
512
|
-
const doc = database.prepare(`SELECT a.provider,a.external_id AS account,a.name,d.external_id,d.body,d.content_hash,d.deleted_at FROM documents d JOIN accounts a ON a.id=d.account_id WHERE d.id=? AND ${filesAccountSql("a.provider")}`).get(thing.id);
|
|
518
|
+
const doc = database.prepare(`SELECT a.provider,a.external_id AS account,a.name,d.external_id,d.body,d.content_hash,d.deleted_at FROM documents d JOIN accounts a ON a.id=d.account_id WHERE d.id=? AND ${filesAccountSql("a.provider")} AND a.provider<>'${ADDED_PROVIDER}'`).get(thing.id);
|
|
513
519
|
if (doc) {
|
|
514
520
|
item.collection = collectionNameOf({ provider: doc.provider, external_id: doc.account, name: doc.name });
|
|
515
521
|
item.external_id = String(doc.external_id);
|
|
@@ -529,7 +535,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
|
|
|
529
535
|
};
|
|
530
536
|
}), "transferSnapshot");
|
|
531
537
|
|
|
532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
|
|
533
539
|
var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
|
|
534
540
|
if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
|
|
535
541
|
return provider ?? null;
|
|
@@ -701,7 +707,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
|
|
|
701
707
|
database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
|
|
702
708
|
}, "remapEntity");
|
|
703
709
|
|
|
704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
|
|
705
711
|
var locations = /* @__PURE__ */ __name((options) => {
|
|
706
712
|
for (const value of [options.source, options.destination, options.collection])
|
|
707
713
|
if (typeof value !== "string" || !value.trim())
|
|
@@ -754,6 +760,9 @@ var openPreviewTarget = /* @__PURE__ */ __name(async (path) => {
|
|
|
754
760
|
}, "openPreviewTarget");
|
|
755
761
|
var previewDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
|
|
756
762
|
const location = locations(options);
|
|
763
|
+
return damagedFile([location.source, location.destination], () => previewWith(location, options));
|
|
764
|
+
}, "previewDocumentTransfer");
|
|
765
|
+
var previewWith = /* @__PURE__ */ __name(async (location, options) => {
|
|
757
766
|
const source = await openSource(location.source);
|
|
758
767
|
try {
|
|
759
768
|
const target = await openPreviewTarget(location.destination);
|
|
@@ -765,11 +774,14 @@ var previewDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
|
|
|
765
774
|
} finally {
|
|
766
775
|
source.database.close();
|
|
767
776
|
}
|
|
768
|
-
}, "
|
|
777
|
+
}, "previewWith");
|
|
769
778
|
var applyDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
|
|
770
779
|
if (!/^[a-f0-9]{64}$/.test(options.expected_fingerprint))
|
|
771
780
|
throw new CliError("validation_error", "apply requires the fingerprint returned by a transfer preview");
|
|
772
781
|
const location = locations(options);
|
|
782
|
+
return damagedFile([location.source, location.destination], () => applyWith(location, options));
|
|
783
|
+
}, "applyDocumentTransfer");
|
|
784
|
+
var applyWith = /* @__PURE__ */ __name(async (location, options) => {
|
|
773
785
|
const source = await openSource(location.source);
|
|
774
786
|
try {
|
|
775
787
|
const snapshot = transferSnapshot(source.database, options.collection);
|
|
@@ -795,9 +807,9 @@ var applyDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
|
|
|
795
807
|
} finally {
|
|
796
808
|
source.database.close();
|
|
797
809
|
}
|
|
798
|
-
}, "
|
|
810
|
+
}, "applyWith");
|
|
799
811
|
|
|
800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
801
813
|
import { existsSync, statSync as statSync2 } from "node:fs";
|
|
802
814
|
var JSON_COLUMNS = {
|
|
803
815
|
accounts: ["settings"],
|
|
@@ -939,7 +951,7 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
939
951
|
}
|
|
940
952
|
}, "storeHealth");
|
|
941
953
|
|
|
942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
943
955
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
944
956
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
945
957
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -953,15 +965,19 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
953
965
|
if (typeof options.project !== "string" || !/^project:[1-9]\d*$/.test(options.project) || !Number.isSafeInteger(Number(options.project.slice(8))))
|
|
954
966
|
throw new CliError("validation_error", "project preview project is a project:<safe integer id> reference");
|
|
955
967
|
const budget = new SnapshotBudget(options.maxReadBytes ?? 4 * 1024 * 1024);
|
|
956
|
-
const
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
968
|
+
const target = options.target;
|
|
969
|
+
const project2 = options.project;
|
|
970
|
+
return damagedFile([target], async () => {
|
|
971
|
+
const context = await openStoreContext({ path: target, env: options.env, readOnly: true });
|
|
972
|
+
try {
|
|
973
|
+
return previewAnnotationSnapshot(context.database, Number(project2.slice(8)), snapshot, options.bindings, budget);
|
|
974
|
+
} finally {
|
|
975
|
+
context.database.close();
|
|
976
|
+
}
|
|
977
|
+
});
|
|
962
978
|
}, "previewProjectAnnotationSnapshot");
|
|
963
979
|
|
|
964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
965
981
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
966
982
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
967
983
|
throw new CliError("validation_error", "snapshot options are required");
|