@wirecat/drive-cli 0.72.0 → 0.73.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 +4 -0
- package/contracts/wirecat.json +82 -18
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/agent-ZOHMLVWI.js +46 -0
- package/dist/bundle/{all-profiles-GXGDVNQJ.js → all-profiles-HGQGKCKQ.js} +14 -14
- package/dist/bundle/{anthropic-H5C4GQHC.js → anthropic-2L5DN3HF.js} +8 -8
- package/dist/bundle/{app-server-EQ3UK4C7.js → app-server-TRSOKYYF.js} +79 -79
- package/dist/bundle/{bun-DTJVSRY3.js → bun-AFA5HULK.js} +2 -2
- package/dist/bundle/{bun-sqlite-JIFY7MAE.js → bun-sqlite-5MW2BWV4.js} +9 -9
- package/dist/bundle/{chunk-FRCJHGZM.js → chunk-2G24DYSZ.js} +2 -2
- package/dist/bundle/{chunk-FUDUXIVG.js → chunk-2MCMUZCE.js} +1 -1
- package/dist/bundle/{chunk-COJTCEZP.js → chunk-2NAMKBBV.js} +31 -23
- package/dist/bundle/{chunk-CIFE4KPX.js → chunk-2WAGRBQT.js} +50 -47
- package/dist/bundle/{chunk-ZKWT6HXT.js → chunk-33RQ3YVC.js} +1 -1
- package/dist/bundle/{chunk-E3VWZC3K.js → chunk-36256UTA.js} +12 -12
- package/dist/bundle/{chunk-KP2XMCNT.js → chunk-4FTGSEBR.js} +6 -6
- package/dist/bundle/{chunk-MUFF2YTH.js → chunk-4KOMZRN6.js} +2 -2
- package/dist/bundle/{chunk-J4NUHSM7.js → chunk-4LLO4USI.js} +1 -1
- package/dist/bundle/{chunk-CWPYDT73.js → chunk-4VTAPSZE.js} +4 -4
- package/dist/bundle/{chunk-OLDQLEPA.js → chunk-4ZP3IK5I.js} +6 -6
- package/dist/bundle/{chunk-M2ZWYVWO.js → chunk-5CYWWYIG.js} +6 -1
- package/dist/bundle/{chunk-AA4LKC6W.js → chunk-5EZCDENA.js} +78 -35
- package/dist/bundle/{chunk-GWCDOYSC.js → chunk-5R2VPXVT.js} +1 -1
- package/dist/bundle/{chunk-KF3ZBQJV.js → chunk-5SQHQRNO.js} +4 -4
- package/dist/bundle/{chunk-77OBW43F.js → chunk-6AVHD6WB.js} +6 -6
- package/dist/bundle/{chunk-K652FYCO.js → chunk-6EC3LAVC.js} +2 -2
- package/dist/bundle/{chunk-ST35FIUG.js → chunk-6HZKX65K.js} +3 -3
- package/dist/bundle/{chunk-VAR3MJU6.js → chunk-6TGZCOYR.js} +3 -3
- package/dist/bundle/{chunk-D4JNCXS7.js → chunk-6V5556NF.js} +7 -7
- package/dist/bundle/{chunk-BM6V7456.js → chunk-6WZLP4CI.js} +5 -5
- package/dist/bundle/{chunk-ML2QIWX2.js → chunk-77SAHCDZ.js} +4 -4
- package/dist/bundle/{chunk-NNGA4QDR.js → chunk-AGATODLO.js} +12 -12
- package/dist/bundle/{chunk-OLCU7Q2B.js → chunk-B6YBN6VK.js} +1 -1
- package/dist/bundle/{chunk-TTPWKTVR.js → chunk-BAG4KIN5.js} +1 -1
- package/dist/bundle/{chunk-U7VEJ3CW.js → chunk-BAHWXDWN.js} +29 -190
- package/dist/bundle/{chunk-4HPXWYTE.js → chunk-BFESDJPU.js} +1 -1
- package/dist/bundle/{chunk-QSLOACDT.js → chunk-BOHC2GPY.js} +36 -36
- package/dist/bundle/{chunk-BO6EDBYJ.js → chunk-BY5D2LXE.js} +3 -3
- package/dist/bundle/{chunk-FBEZSA76.js → chunk-CMB6URN7.js} +5 -5
- package/dist/bundle/{chunk-4JS32SRX.js → chunk-CY2MNN3I.js} +5 -5
- package/dist/bundle/{chunk-PRYMT3OG.js → chunk-DAYHLKTM.js} +2 -2
- package/dist/bundle/{chunk-YWOLQEDV.js → chunk-DOUFW7RK.js} +3 -3
- package/dist/bundle/{chunk-CKB4XZZJ.js → chunk-DZG5SAO6.js} +14 -14
- package/dist/bundle/{chunk-FTG5QBSD.js → chunk-E3UFICXC.js} +35 -31
- package/dist/bundle/{chunk-QDUIVMEW.js → chunk-EBGI3Z6U.js} +1 -1
- package/dist/bundle/{chunk-ZJKXSMXK.js → chunk-EQGVNLUN.js} +42 -42
- package/dist/bundle/{chunk-WMG3H2VK.js → chunk-F5XMZDR5.js} +2 -2
- package/dist/bundle/{chunk-6ZW2ZJYC.js → chunk-FITKBN46.js} +2 -2
- package/dist/bundle/{chunk-ZFDSJ5YJ.js → chunk-FRQBKAPV.js} +6 -6
- package/dist/bundle/{chunk-DHMNCOQI.js → chunk-GW7L2G4I.js} +57 -57
- package/dist/bundle/{chunk-FIZOPJYY.js → chunk-HGXFOXSA.js} +1 -1
- package/dist/bundle/{chunk-N24YSLED.js → chunk-HYJEBBFK.js} +1892 -588
- package/dist/bundle/{chunk-SQHDSIFL.js → chunk-I2KGZ6XQ.js} +6 -6
- package/dist/bundle/{chunk-XZ7MO6EU.js → chunk-I3DZHZHM.js} +7 -7
- package/dist/bundle/{chunk-ZFUZEFU6.js → chunk-I3MLLVPE.js} +3 -3
- package/dist/bundle/{chunk-5BNMWSU2.js → chunk-IDJKYHVG.js} +2246 -2047
- package/dist/bundle/{chunk-SPNPJ3FZ.js → chunk-IEGU6GG7.js} +1 -1
- package/dist/bundle/{chunk-ZPUY3COZ.js → chunk-IKW3PRNG.js} +13 -13
- package/dist/bundle/{chunk-R57QUYBG.js → chunk-J3I4WOBI.js} +3 -3
- package/dist/bundle/{chunk-DCPWZIOV.js → chunk-JA37PJL4.js} +11 -11
- package/dist/bundle/{chunk-OAONP6KI.js → chunk-JJGKHGBX.js} +8 -8
- package/dist/bundle/{chunk-UIQ35CA5.js → chunk-JWNM6FCC.js} +1 -1
- package/dist/bundle/{chunk-R32DHS6J.js → chunk-JZYNXTMH.js} +51 -15
- package/dist/bundle/{chunk-QKBPCX7Y.js → chunk-K34B37AP.js} +1 -1
- package/dist/bundle/{chunk-HAGXTGJC.js → chunk-KERX3BQL.js} +4 -4
- package/dist/bundle/{chunk-QUZFDU4K.js → chunk-KV232TIK.js} +4 -4
- package/dist/bundle/{chunk-RSPBVKOC.js → chunk-KXETGAU4.js} +8 -8
- package/dist/bundle/{chunk-VPQSI5IU.js → chunk-L5ZZ6RLL.js} +2 -2
- package/dist/bundle/{chunk-OPIPG6AP.js → chunk-LGRZNEMA.js} +8 -8
- package/dist/bundle/{chunk-X5BGAZC5.js → chunk-M3VJTLFM.js} +6 -6
- package/dist/bundle/{chunk-5H747A76.js → chunk-MTH76YSQ.js} +500 -1428
- package/dist/bundle/{chunk-75DAHQOV.js → chunk-NA4HEM4Z.js} +3 -3
- package/dist/bundle/{chunk-5KWCO56H.js → chunk-OCZWU2H4.js} +2 -2
- package/dist/bundle/{chunk-GUMKKRE6.js → chunk-OHKAL25R.js} +63 -63
- package/dist/bundle/{chunk-O7CZZ36M.js → chunk-P2FOF6RR.js} +3 -3
- package/dist/bundle/{chunk-OHR6IZNH.js → chunk-PMYTDTT4.js} +8 -1
- package/dist/bundle/{chunk-XQZEMRCU.js → chunk-PQSCABAC.js} +10 -10
- package/dist/bundle/{chunk-GU6ICH53.js → chunk-PSFACXOC.js} +2 -2
- package/dist/bundle/{chunk-NBMGDRP4.js → chunk-PSWVHX53.js} +1 -1
- package/dist/bundle/{chunk-KFZCHJRT.js → chunk-Q2L3W7PS.js} +2 -2
- package/dist/bundle/{chunk-VQPT3Y7W.js → chunk-QMDVQ4AN.js} +12 -12
- package/dist/bundle/{chunk-GXGSC622.js → chunk-QZXFWDTX.js} +6 -6
- package/dist/bundle/{chunk-R64OSDOD.js → chunk-R2GLRHNK.js} +5 -5
- package/dist/bundle/{chunk-FNAYSZWK.js → chunk-R6K36FZ7.js} +23 -23
- package/dist/bundle/{chunk-7EFM6AW3.js → chunk-RHS3OBO5.js} +4 -4
- package/dist/bundle/{chunk-UJY26HW4.js → chunk-RNLLWYPV.js} +1 -1
- package/dist/bundle/{chunk-6CCO3JCM.js → chunk-RX6D64YA.js} +20 -20
- package/dist/bundle/{chunk-FBQJN74J.js → chunk-S7EQIYNF.js} +1 -1
- package/dist/bundle/{chunk-DWRUOLBF.js → chunk-SIC2CGYE.js} +4 -4
- package/dist/bundle/{chunk-55FH6IEL.js → chunk-SNY4WYPH.js} +5 -5
- package/dist/bundle/{chunk-A3S7QM5L.js → chunk-SQODI3DH.js} +2 -2
- package/dist/bundle/{chunk-EVG3AA5M.js → chunk-SRRNRQSQ.js} +2 -2
- package/dist/bundle/{chunk-IVGVVSPW.js → chunk-SYQKLEP3.js} +4 -4
- package/dist/bundle/{chunk-5U3NCE5R.js → chunk-TAQUEQ5B.js} +8 -8
- package/dist/bundle/{chunk-GIEZYBRC.js → chunk-TPIGO4JJ.js} +1 -1
- package/dist/bundle/{chunk-DOQMH4DC.js → chunk-U5SB2WDG.js} +12 -10
- package/dist/bundle/{chunk-KWDZ3KVH.js → chunk-UDP7EQNY.js} +4 -4
- package/dist/bundle/{chunk-4IUNYYYL.js → chunk-UZAOKKGK.js} +753 -494
- package/dist/bundle/{chunk-K6ZWNTXY.js → chunk-V5GIK53Z.js} +17 -17
- package/dist/bundle/{chunk-2Q325BBD.js → chunk-VENGEFU4.js} +8 -8
- package/dist/bundle/{chunk-N4GTCPML.js → chunk-VHPNTMJJ.js} +1 -1
- package/dist/bundle/{chunk-UWG3PRY7.js → chunk-VM3IERRK.js} +7 -7
- package/dist/bundle/{chunk-KLPFDFLI.js → chunk-VQ7K2EAW.js} +9 -9
- package/dist/bundle/{chunk-3FRQ6V4T.js → chunk-VQC4GYIQ.js} +3 -3
- package/dist/bundle/{chunk-XC6TRWLZ.js → chunk-VZTDELYM.js} +3 -3
- package/dist/bundle/{chunk-ASTKHB6B.js → chunk-W3OKRT6L.js} +179 -135
- package/dist/bundle/{chunk-KX4C32WD.js → chunk-WB46DJSK.js} +2 -2
- package/dist/bundle/{chunk-BPA3R4KN.js → chunk-WITO2RZO.js} +1 -1
- package/dist/bundle/{chunk-OESP4PHB.js → chunk-WJ7E6TPR.js} +17 -17
- package/dist/bundle/{chunk-YAIOEPKU.js → chunk-WUVNBZWC.js} +191 -160
- package/dist/bundle/{chunk-47L262VI.js → chunk-ZDYWRT3X.js} +7 -7
- package/dist/bundle/{chunk-IMAWQC5K.js → chunk-ZQMURHTL.js} +6 -6
- package/dist/bundle/{cli-2P5FW2RL.js → cli-A7MMBLGR.js} +107 -107
- package/dist/bundle/command-contract-WCGIIXYM.js +45 -0
- package/dist/bundle/{command-server-entry-KP2UDGLA.js → command-server-entry-557ZCX63.js} +35 -35
- package/dist/bundle/{decode-K2JZ5D6V.js → decode-3IPZIY2P.js} +8 -8
- package/dist/bundle/{dispatch-KOQZA74A.js → dispatch-UWS7A35Q.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-URO3QGCG.js → echarts-JLCV6NKC.js} +2 -2
- package/dist/bundle/{embed-JLIPWTNN.js → embed-Q6H3QSMC.js} +9 -9
- package/dist/bundle/{embedder-LUTDO3HS.js → embedder-536EI65E.js} +12 -12
- package/dist/bundle/entry-3PKJTP5E.js +25 -0
- package/dist/bundle/{failure-GJMQLM7O.js → failure-W3VT5D3H.js} +4 -4
- package/dist/bundle/first-run-XTLP6VXF.js +31 -0
- package/dist/bundle/first-screen-3GQGULPE.js +45 -0
- package/dist/bundle/google-MEPVU4EP.js +46 -0
- package/dist/bundle/{google-api-RFXKRLL4.js → google-api-SY25TRXJ.js} +85 -85
- package/dist/bundle/grants-77W5MSWQ.js +133 -0
- package/dist/bundle/{identity-FXPB5EMT.js → identity-ZBMVHXUY.js} +6 -6
- package/dist/bundle/{instructions-IROIUVZI.js → instructions-XQOWVU6J.js} +1 -1
- package/dist/bundle/{login-WIY5VQU7.js → login-LXXYFMD3.js} +91 -91
- package/dist/bundle/{mcp-NJIOKW3E.js → mcp-VNOYBWW2.js} +2 -2
- package/dist/bundle/meeting-combined-NWWZCYN4.js +28 -0
- package/dist/bundle/meeting-model-K7UQ7TO5.js +29 -0
- package/dist/bundle/{meeting-semantic-62QNQMOM.js → meeting-semantic-Z7FAOSLQ.js} +10 -10
- package/dist/bundle/{node-IACCI2CW.js → node-MPZ3SVB4.js} +2 -2
- package/dist/bundle/{node-sqlite-WYIRC7C7.js → node-sqlite-VL5BMY34.js} +10 -10
- package/dist/bundle/notes-search-MF7QKFQD.js +74 -0
- package/dist/bundle/oauth-EYJXUTXZ.js +22 -0
- package/dist/bundle/{open-H32B6BCT.js → open-SERV3YXC.js} +8 -8
- package/dist/bundle/{openai-VHMPJJUG.js → openai-HUXETQVC.js} +20 -20
- package/dist/bundle/{process-RNHPF5OK.js → process-RFIII6TW.js} +1 -1
- package/dist/bundle/{program-GYMJ3DDH.js → program-VQ6IKDBJ.js} +353 -131
- package/dist/bundle/{prompt-TOG2CRCE.js → prompt-LCD5ZR7Q.js} +8 -8
- package/dist/bundle/{reasons-TLFQ45YX.js → reasons-GDQIXGWT.js} +5 -5
- package/dist/bundle/{recognize-GYGY45EY.js → recognize-GWKRFWHF.js} +7 -7
- package/dist/bundle/{remote-6XN2QLI5.js → remote-XM2CRZJY.js} +13 -13
- package/dist/bundle/{rerank-HJO3O4TW.js → rerank-HR5J35V6.js} +10 -10
- package/dist/bundle/{serve-XPCNLHCR.js → serve-PP3XR3GA.js} +12 -12
- package/dist/bundle/{server-WPT3NC5B.js → server-DD3DE536.js} +71 -71
- package/dist/bundle/server-NB4RGNYM.js +97 -0
- package/dist/bundle/{services-253KKKVU.js → services-4Y7R425J.js} +62 -58
- package/dist/bundle/{sqlite-runtime-EZASGJXW.js → sqlite-runtime-CVYBPVKO.js} +9 -9
- package/dist/bundle/{start-UHI35JFL.js → start-2KFZDMWM.js} +7 -7
- package/dist/bundle/{state-KJTSPFGK.js → state-AUXW4REW.js} +9 -9
- package/dist/bundle/{store-62J2H2A3.js → store-B7X6UN75.js} +28 -28
- package/dist/bundle/{store-G5B7T7M7.js → store-RADARFIH.js} +26 -26
- package/dist/bundle/store-maintenance-command-UTZWPNUF.js +85 -0
- package/dist/bundle/surface-4MUNDC3D.js +83 -0
- package/dist/bundle/tokens-AIKNGAOI.js +133 -0
- package/dist/commands/file-edit.d.ts +18 -0
- package/dist/commands/file-edit.d.ts.map +1 -0
- package/dist/commands/file-edit.js +39 -0
- package/dist/commands/file-edit.js.map +1 -0
- package/dist/commands/remote.d.ts +4 -0
- package/dist/commands/remote.d.ts.map +1 -1
- package/dist/commands/remote.js +59 -17
- package/dist/commands/remote.js.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +17 -1
- package/dist/config.js.map +1 -1
- package/dist/drive-files.d.ts +26 -0
- package/dist/drive-files.d.ts.map +1 -0
- package/dist/drive-files.js +127 -0
- package/dist/drive-files.js.map +1 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +52 -1
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +5 -0
- package/dist/reasons.js.map +1 -1
- package/dist/upload.d.ts +3 -1
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +5 -4
- package/dist/upload.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/drive-cli/SKILL.md +4 -0
- package/dist/bundle/agent-23OB2NZP.js +0 -46
- package/dist/bundle/command-contract-BMQT2G5X.js +0 -45
- package/dist/bundle/entry-AVF6LMG7.js +0 -25
- package/dist/bundle/first-run-VYTIEUDA.js +0 -31
- package/dist/bundle/first-screen-QVZPF7KL.js +0 -45
- package/dist/bundle/google-VX7IPACN.js +0 -46
- package/dist/bundle/grants-4XWJFVD6.js +0 -133
- package/dist/bundle/meeting-combined-JUNV35GM.js +0 -28
- package/dist/bundle/meeting-model-XY4UNWWK.js +0 -29
- package/dist/bundle/notes-search-DEDUJKSN.js +0 -70
- package/dist/bundle/oauth-HXBXF4VI.js +0 -22
- package/dist/bundle/server-UBJZ66XE.js +0 -97
- package/dist/bundle/store-maintenance-command-C6T4YLVF.js +0 -85
- package/dist/bundle/surface-3OT64BHS.js +0 -83
- package/dist/bundle/tokens-EHYO6D2X.js +0 -133
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
remoteChanged,
|
|
14
14
|
syncMirrors,
|
|
15
15
|
watchMirrors
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IDJKYHVG.js";
|
|
17
17
|
import {
|
|
18
18
|
honoursDryRun,
|
|
19
19
|
privateFiles
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MTH76YSQ.js";
|
|
21
21
|
import {
|
|
22
22
|
commandPathKey,
|
|
23
23
|
commandPermissions
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HYJEBBFK.js";
|
|
25
25
|
import {
|
|
26
26
|
ReaderLimit,
|
|
27
27
|
columnName,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
readSpreadsheet,
|
|
31
31
|
relationships,
|
|
32
32
|
xmlPart
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-BOHC2GPY.js";
|
|
34
34
|
import {
|
|
35
35
|
LIST_QUERY_GUIDE,
|
|
36
36
|
listQuery,
|
|
@@ -41,12 +41,14 @@ import {
|
|
|
41
41
|
termField,
|
|
42
42
|
typedQuery,
|
|
43
43
|
withQuery
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-DZG5SAO6.js";
|
|
45
45
|
import {
|
|
46
46
|
deflateSync
|
|
47
47
|
} from "./chunk-NTZWY5R3.js";
|
|
48
48
|
import {
|
|
49
49
|
AI_ENTRIES,
|
|
50
|
+
DOCUMENT_CONTEXT_UNTRUSTED,
|
|
51
|
+
DOCUMENT_UNTRUSTED,
|
|
50
52
|
FETCH,
|
|
51
53
|
InvalidArgumentError,
|
|
52
54
|
LEVELS,
|
|
@@ -65,38 +67,39 @@ import {
|
|
|
65
67
|
itemOf,
|
|
66
68
|
jsonlRecords,
|
|
67
69
|
listOf,
|
|
70
|
+
marksUntrusted,
|
|
68
71
|
parseDuration,
|
|
69
72
|
runBudgetOf,
|
|
70
73
|
settingsFor,
|
|
71
74
|
sharedCommand,
|
|
72
75
|
usableProfileName,
|
|
73
76
|
withSettingDefaults
|
|
74
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-WUVNBZWC.js";
|
|
75
78
|
import {
|
|
76
79
|
note
|
|
77
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-I3MLLVPE.js";
|
|
78
81
|
import {
|
|
79
82
|
MAX_BUFFERED_INPUT,
|
|
80
83
|
bufferedInput
|
|
81
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-WB46DJSK.js";
|
|
82
85
|
import {
|
|
83
86
|
CATALOG_QUERY,
|
|
84
87
|
DOCUMENT_EVENTS,
|
|
85
88
|
IMPORTED_DOCUMENT_QUERY
|
|
86
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-UZAOKKGK.js";
|
|
87
90
|
import {
|
|
88
91
|
MAX_TEXT_CHARS
|
|
89
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-6TGZCOYR.js";
|
|
90
93
|
import {
|
|
91
94
|
FACT_STATUSES,
|
|
92
95
|
MEMORY_KINDS,
|
|
93
96
|
MEMORY_SCOPES,
|
|
94
97
|
MEMORY_STATUSES
|
|
95
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-R6K36FZ7.js";
|
|
96
99
|
import {
|
|
97
100
|
FACT_TYPES,
|
|
98
101
|
TRANSCRIPT_WORDS
|
|
99
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-GW7L2G4I.js";
|
|
100
103
|
import {
|
|
101
104
|
dateRange,
|
|
102
105
|
defineQuery,
|
|
@@ -105,17 +108,17 @@ import {
|
|
|
105
108
|
queryFieldsOf,
|
|
106
109
|
timezoneOf,
|
|
107
110
|
validateQuery
|
|
108
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-PQSCABAC.js";
|
|
109
112
|
import {
|
|
110
113
|
DRIVE_APP
|
|
111
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-4KOMZRN6.js";
|
|
112
115
|
import {
|
|
113
116
|
BASE_CONSTANTS,
|
|
114
117
|
baseConstantsSchema,
|
|
115
118
|
loadConstants,
|
|
116
119
|
resolvePaths,
|
|
117
120
|
saveConfigFile
|
|
118
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-RX6D64YA.js";
|
|
119
122
|
import {
|
|
120
123
|
array,
|
|
121
124
|
boolean,
|
|
@@ -147,16 +150,16 @@ import {
|
|
|
147
150
|
trim,
|
|
148
151
|
union,
|
|
149
152
|
unknown
|
|
150
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-QZXFWDTX.js";
|
|
151
154
|
import {
|
|
152
155
|
CliError,
|
|
153
156
|
isCliError
|
|
154
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-B6YBN6VK.js";
|
|
155
158
|
import {
|
|
156
159
|
__name
|
|
157
160
|
} from "./chunk-ZVVMGPBJ.js";
|
|
158
161
|
|
|
159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/oauth/client-file.js
|
|
160
163
|
import { readFileSync } from "node:fs";
|
|
161
164
|
var readClientFile = /* @__PURE__ */ __name((location, options = {}) => {
|
|
162
165
|
if (!options.shipped && typeof location === "string") {
|
|
@@ -177,7 +180,7 @@ var readClientFile = /* @__PURE__ */ __name((location, options = {}) => {
|
|
|
177
180
|
}
|
|
178
181
|
}, "readClientFile");
|
|
179
182
|
|
|
180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/constants/obscure.js
|
|
181
184
|
import { createDecipheriv } from "node:crypto";
|
|
182
185
|
var KEY = Buffer.from("d43012779aa2dded3e98092a3dbcf5d8980c564172f5ce0a5fd0574e5f740339", "hex");
|
|
183
186
|
var reveal = /* @__PURE__ */ __name((obscured) => {
|
|
@@ -186,7 +189,7 @@ var reveal = /* @__PURE__ */ __name((obscured) => {
|
|
|
186
189
|
return Buffer.concat([decipher.update(bytes.subarray(16)), decipher.final()]).toString("utf8");
|
|
187
190
|
}, "reveal");
|
|
188
191
|
|
|
189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/constants/index.js
|
|
190
193
|
var CORE_CONSTANTS = new URL("../../constants.json", new URL("constants/index.js", import.meta.resolve("@wirecat/cli-core")).href);
|
|
191
194
|
var constantsSchema = object({
|
|
192
195
|
...baseConstantsSchema.entries,
|
|
@@ -309,7 +312,7 @@ var methodPolicyKeys = /* @__PURE__ */ __name((method, body) => {
|
|
|
309
312
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
310
313
|
import { join as join3 } from "node:path";
|
|
311
314
|
|
|
312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/queries.js
|
|
313
316
|
var registry = /* @__PURE__ */ __name((entity, schema2, native, examples2) => ({
|
|
314
317
|
entity,
|
|
315
318
|
backend: "native",
|
|
@@ -459,7 +462,7 @@ var memorySearch = /* @__PURE__ */ __name((words) => {
|
|
|
459
462
|
return { text: text.join(" "), ...scope === void 0 ? {} : { scope } };
|
|
460
463
|
}, "memorySearch");
|
|
461
464
|
|
|
462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/words.js
|
|
463
466
|
var wordsOf = /* @__PURE__ */ __name((words) => {
|
|
464
467
|
const profile = words.profile ?? "personal";
|
|
465
468
|
const place = words.place ?? words.provider;
|
|
@@ -529,7 +532,7 @@ var staleCopy = /* @__PURE__ */ __name((provider, lastSync, now = Date.now()) =>
|
|
|
529
532
|
};
|
|
530
533
|
}, "staleCopy");
|
|
531
534
|
|
|
532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/catalog.js
|
|
533
536
|
var CATALOG_TREE_LIMIT = 1e4;
|
|
534
537
|
var CATALOG_PAGE = 1e3;
|
|
535
538
|
var PARENT_BATCH = 200;
|
|
@@ -661,6 +664,7 @@ var CATALOG_FIELDS = Object.keys({
|
|
|
661
664
|
content: true
|
|
662
665
|
});
|
|
663
666
|
var local = /* @__PURE__ */ __name((command, mutates = false) => annotate(command, { effects: mutates ? LOCAL_WRITE : LOCAL_READ }), "local");
|
|
667
|
+
var read = /* @__PURE__ */ __name((command) => marksUntrusted(local(command), DOCUMENT_UNTRUSTED), "read");
|
|
664
668
|
var addDocumentCatalogCommandsDefinition = /* @__PURE__ */ __name((program, helpers) => {
|
|
665
669
|
const { output } = helpers;
|
|
666
670
|
const wording = wordsOf(helpers.words);
|
|
@@ -684,7 +688,7 @@ var addDocumentCatalogCommandsDefinition = /* @__PURE__ */ __name((program, help
|
|
|
684
688
|
return found;
|
|
685
689
|
}, "entry");
|
|
686
690
|
examples(local(catalog.command("import").description("put cached file and folder metadata into the shared database"), true), [`${prefix} catalog import --offline`]).action(async () => output(itemOf(await run((index, principal) => index.catalog.import(principal), true))));
|
|
687
|
-
examples(annotate(
|
|
691
|
+
examples(annotate(read(catalog.command("show").description("show stored metadata and the stable file or folder reference")), {
|
|
688
692
|
output: { entity: "document", view }
|
|
689
693
|
}), [`${prefix} catalog show FILE_ID --offline`]).argument("<file>", text.catalogArgument).action(async (id) => output(itemOf(await run(async (index, principal) => catalogOutput(await entry(index, principal, id))))));
|
|
690
694
|
const list = /* @__PURE__ */ __name(async (terms, args, search) => {
|
|
@@ -699,12 +703,12 @@ var addDocumentCatalogCommandsDefinition = /* @__PURE__ */ __name((program, help
|
|
|
699
703
|
}));
|
|
700
704
|
}, "list");
|
|
701
705
|
for (const action of ["list", "search"]) {
|
|
702
|
-
const command = examples(
|
|
706
|
+
const command = examples(read(catalog.command(action).description(action === "list" ? "list cached files and folders using metadata queries" : "search cached names, descriptions, types and observed people")), [
|
|
703
707
|
action === "list" ? `${prefix} catalog list "parent:FOLDER_ID AND kind:file" --offline` : `${prefix} catalog search "budget AND person:Rin*" --offline`
|
|
704
708
|
]).argument(action === "list" ? "[query...]" : "<query...>", "metadata query: kind, mime, name, parent, person, tag; AND, OR, NOT").option("--limit <n>", "how many entries to return (at most 1000)", positive, 50).option("--page <n>", "which page to return", positive, 1).action(async (terms, args) => list(terms, args, action === "search"));
|
|
705
709
|
annotate(command, { query: CATALOG_QUERY, output: { entity: "document", view } });
|
|
706
710
|
}
|
|
707
|
-
examples(
|
|
711
|
+
examples(read(catalog.command("tree").description("show the cached hierarchy below a folder or all selected roots")), [`${prefix} catalog tree --offline`, `${prefix} catalog tree FOLDER_ID --depth 3 --offline`]).argument("[folder]", text.treeArgument).option("--depth <n>", "maximum descendant depth, from 0 to 50", nonnegative, 5).action(async (id, args) => output(await run(async (index, principal) => {
|
|
708
712
|
const roots = id ? [helpers.id(id)] : helpers.roots();
|
|
709
713
|
const tree = await catalogTree(catalogSource(index.catalog, principal), roots.map((root) => `${root}.md`), args.depth);
|
|
710
714
|
return allOf(tree);
|
|
@@ -730,14 +734,14 @@ var addDocumentCatalogCommandsDefinition = /* @__PURE__ */ __name((program, help
|
|
|
730
734
|
}, "addDocumentCatalogCommandsDefinition");
|
|
731
735
|
var addDocumentCatalogCommands = honoursDryRun(sharedCommand(addDocumentCatalogCommandsDefinition));
|
|
732
736
|
|
|
733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/documents.js
|
|
734
738
|
import { writeFileSync } from "node:fs";
|
|
735
739
|
var addLocalDocumentCommandsDefinition = /* @__PURE__ */ __name((program, helpers) => {
|
|
736
740
|
const { output, lastSync } = helpers;
|
|
737
741
|
const wording = wordsOf(helpers.words);
|
|
738
742
|
const { prefix, provider, text } = wording;
|
|
739
743
|
const documents = documentsGroup(program, wording);
|
|
740
|
-
annotate(withQuery(examples(annotate(documents.command("list"), { effects: LOCAL_READ }).description(text.documentsList), [
|
|
744
|
+
annotate(withQuery(examples(marksUntrusted(annotate(documents.command("list"), { effects: LOCAL_READ }).description(text.documentsList), DOCUMENT_UNTRUSTED), [
|
|
741
745
|
`${prefix} documents list`,
|
|
742
746
|
`${prefix} documents list tag:budget`,
|
|
743
747
|
`${prefix} documents list person:PERSON_UID --limit 10`
|
|
@@ -756,7 +760,7 @@ var addLocalDocumentCommandsDefinition = /* @__PURE__ */ __name((program, helper
|
|
|
756
760
|
args: { query: query || void 0 }
|
|
757
761
|
}));
|
|
758
762
|
});
|
|
759
|
-
examples(annotate(documents.command("show"), { effects: LOCAL_READ, partial: true }).argument("<document>", text.documentArgument).description("show an imported document's text, tabs and metadata"), [`${prefix} documents show DOC_ID`, `${prefix} documents show document:42 --offline`]).action((input) => {
|
|
763
|
+
examples(marksUntrusted(annotate(documents.command("show"), { effects: LOCAL_READ, partial: true }), DOCUMENT_UNTRUSTED).argument("<document>", text.documentArgument).description("show an imported document's text, tabs and metadata"), [`${prefix} documents show DOC_ID`, `${prefix} documents show document:42 --offline`]).action((input) => {
|
|
760
764
|
const { metadata, snapshot } = helpers.document(input);
|
|
761
765
|
const synced = lastSync();
|
|
762
766
|
output(itemOf({
|
|
@@ -786,7 +790,7 @@ var addLocalDocumentCommandsDefinition = /* @__PURE__ */ __name((program, helper
|
|
|
786
790
|
}, "addLocalDocumentCommandsDefinition");
|
|
787
791
|
var addLocalDocumentCommands = honoursDryRun(sharedCommand(addLocalDocumentCommandsDefinition));
|
|
788
792
|
|
|
789
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/folders.js
|
|
790
794
|
var addDocumentFolderCommandsDefinition = /* @__PURE__ */ __name((program, helpers) => {
|
|
791
795
|
const { output } = helpers;
|
|
792
796
|
const wording = wordsOf(helpers.words);
|
|
@@ -797,7 +801,7 @@ var addDocumentFolderCommandsDefinition = /* @__PURE__ */ __name((program, helpe
|
|
|
797
801
|
const { id, name } = await helpers.add(input);
|
|
798
802
|
output(itemOf({ id, name, added: true }));
|
|
799
803
|
});
|
|
800
|
-
bindQuery(examples(annotate(folders.command("list"), { effects: LOCAL_READ }).description("list the folder ids sync imports"), [`${prefix} folders list`]), queries.folders, folderRow).action((words) => {
|
|
804
|
+
bindQuery(examples(marksUntrusted(annotate(folders.command("list"), { effects: LOCAL_READ }), DOCUMENT_UNTRUSTED).description("list the folder ids sync imports"), [`${prefix} folders list`]), queries.folders, folderRow).action((words) => {
|
|
801
805
|
const filter = termsOf(words, queries.folders, "folders list");
|
|
802
806
|
output(allOf(helpers.list(filter)));
|
|
803
807
|
});
|
|
@@ -821,7 +825,7 @@ var addDocumentFolderCommands = /* @__PURE__ */ __name((program, helpers) => {
|
|
|
821
825
|
return folders;
|
|
822
826
|
}, "addDocumentFolderCommands");
|
|
823
827
|
|
|
824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/history.js
|
|
825
829
|
var DOCUMENT_HISTORY_SETTINGS = {
|
|
826
830
|
profile: { keep_versions_for_days: optional(count) },
|
|
827
831
|
settings: [
|
|
@@ -852,7 +856,7 @@ var addDocumentHistoryCommandsDefinition = /* @__PURE__ */ __name((program, help
|
|
|
852
856
|
});
|
|
853
857
|
return found;
|
|
854
858
|
}, "reference");
|
|
855
|
-
examples(annotate(documents.command("history"), { effects: LOCAL_READ }).argument("<document>", text.documentArgument).description("list the versions of a document kept in the local copy, or show one with --revision"), [`${prefix} documents history DOC_ID`, `${prefix} documents history DOC_ID --revision 3`]).option("--revision <n>", "show the text of this version", positive).action((input, args) => helpers.run(async (history, principal) => {
|
|
859
|
+
examples(marksUntrusted(annotate(documents.command("history"), { effects: LOCAL_READ }), DOCUMENT_UNTRUSTED).argument("<document>", text.documentArgument).description("list the versions of a document kept in the local copy, or show one with --revision"), [`${prefix} documents history DOC_ID`, `${prefix} documents history DOC_ID --revision 3`]).option("--revision <n>", "show the text of this version", positive).action((input, args) => helpers.run(async (history, principal) => {
|
|
856
860
|
const ref = await reference(history, principal, input);
|
|
857
861
|
if (args.revision !== void 0) {
|
|
858
862
|
helpers.output(itemOf({ document: ref, ...await history.version(ref, args.revision) }));
|
|
@@ -860,7 +864,7 @@ var addDocumentHistoryCommandsDefinition = /* @__PURE__ */ __name((program, help
|
|
|
860
864
|
}
|
|
861
865
|
helpers.output(itemOf(await history.versions(ref)));
|
|
862
866
|
}));
|
|
863
|
-
return examples(annotate(program.command("changes"), { effects: LOCAL_READ }).description("list the documents the sync added, changed, removed or brought back, newest first"), [`${prefix} changes`, `${prefix} changes --since 7d --event deleted,unavailable`]).option("--since <
|
|
867
|
+
return examples(marksUntrusted(annotate(program.command("changes"), { effects: LOCAL_READ }), DOCUMENT_UNTRUSTED).description("list the documents the sync added, changed, removed or brought back, newest first"), [`${prefix} changes`, `${prefix} changes --since 7d --event deleted,unavailable`]).option("--since <time>", "from this time: an ISO 8601 time, today, yesterday, or 30m, 2h, 1d ago", "1d").option("--until <time>", "up to this time, in the same forms").option(`--event <events>`, `only these, comma separated: ${DOCUMENT_EVENTS.join(", ")}`, eventList).option("--limit <n>", "how many changes to return", positive, 50).option("--page <n>", "which page to return", positive, 1).action((args) => helpers.run(async (history, principal) => {
|
|
864
868
|
const now = Date.now();
|
|
865
869
|
const since = new Date(momentOf(args.since, "--since", now)).toISOString();
|
|
866
870
|
const until = args.until === void 0 ? void 0 : new Date(momentOf(args.until, "--until", now, { end: true })).toISOString();
|
|
@@ -882,7 +886,7 @@ var addDocumentHistoryCommandsDefinition = /* @__PURE__ */ __name((program, help
|
|
|
882
886
|
}, "addDocumentHistoryCommandsDefinition");
|
|
883
887
|
var addDocumentHistoryCommands = honoursDryRun(sharedCommand(addDocumentHistoryCommandsDefinition));
|
|
884
888
|
|
|
885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/knowledge.js
|
|
886
890
|
var addDocumentKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helpers) => {
|
|
887
891
|
const { run, output, author, decider } = helpers;
|
|
888
892
|
const wording = wordsOf(helpers.words);
|
|
@@ -891,7 +895,7 @@ var addDocumentKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, he
|
|
|
891
895
|
const documentArgument = text.knowledgeArgument;
|
|
892
896
|
const scopes = ["personal", "work"];
|
|
893
897
|
const documents = documentsGroup(program, wording);
|
|
894
|
-
examples(annotate(documents.command("context"), { effects: LOCAL_READ }).argument("<document>", documentArgument).description("show a document with its tags, relationships, notes, memories and editors"), [`${prefix} documents context DOC_ID`]).action(async (doc) => output(itemOf(await run(doc, (k, p, ref) => k.context(p, ref)))));
|
|
898
|
+
examples(marksUntrusted(annotate(documents.command("context"), { effects: LOCAL_READ }), DOCUMENT_CONTEXT_UNTRUSTED).argument("<document>", documentArgument).description("show a document with its tags, relationships, notes, memories and editors"), [`${prefix} documents context DOC_ID`]).action(async (doc) => output(itemOf(await run(doc, (k, p, ref) => k.context(p, ref)))));
|
|
895
899
|
const tags = annotate(program.command("tags"), { effects: LOCAL_READ }).description("label imported documents; labels survive a sync");
|
|
896
900
|
for (const action of ["list", "add", "remove"]) {
|
|
897
901
|
const command = examples(annotate(tags.command(action), { effects: action === "list" ? LOCAL_READ : LOCAL_WRITE }).description(action === "list" ? "list a document's tags" : action === "add" ? "tag a document" : "untag a document").argument("<document>", documentArgument), [`${prefix} tags ${action} DOC_ID${action === "list" ? "" : " budget q3"}`]);
|
|
@@ -904,7 +908,10 @@ var addDocumentKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, he
|
|
|
904
908
|
command.argument("<tags...>", "one or more tags").action(async (doc, values) => output(itemOf({ tags: await run(doc, (k, p, ref) => k.tags(p, ref, action, values)) })));
|
|
905
909
|
}
|
|
906
910
|
const relationships2 = annotate(program.command("relationships"), { effects: LOCAL_READ }).description("connect a document to people, projects, notes and other references");
|
|
907
|
-
bindQuery(examples(annotate(relationships2.command("list"), { effects: LOCAL_READ })
|
|
911
|
+
bindQuery(examples(marksUntrusted(annotate(relationships2.command("list"), { effects: LOCAL_READ }), [
|
|
912
|
+
"targetText",
|
|
913
|
+
"target_text"
|
|
914
|
+
]).description("list a document's relationships"), [`${prefix} relationships list DOC_ID`]).argument("<document>", documentArgument), queries.links, linkRow).action(async (doc, words) => {
|
|
908
915
|
const { confirmed, ...filter } = termsOf(words, queries.links, "relationships list");
|
|
909
916
|
output(allOf(await run(doc, (k, p, ref) => k.links(p, ref, { ...filter, ...confirmed === void 0 ? {} : { confirmed: confirmed === "true" } }))));
|
|
910
917
|
});
|
|
@@ -1030,7 +1037,7 @@ var addDocumentKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, he
|
|
|
1030
1037
|
}, "addDocumentKnowledgeCommandsDefinition");
|
|
1031
1038
|
var addDocumentKnowledgeCommands = honoursDryRun(sharedCommand(addDocumentKnowledgeCommandsDefinition));
|
|
1032
1039
|
|
|
1033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1040
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/mirrors.js
|
|
1034
1041
|
import { statSync } from "node:fs";
|
|
1035
1042
|
import { resolve } from "node:path";
|
|
1036
1043
|
var addDocumentMirrorCommandsDefinition = /* @__PURE__ */ __name((program, helpers) => {
|
|
@@ -1195,7 +1202,7 @@ var describeCycle = /* @__PURE__ */ __name((cycle) => {
|
|
|
1195
1202
|
}, "describeCycle");
|
|
1196
1203
|
var addDocumentMirrorCommands = honoursDryRun(sharedCommand(addDocumentMirrorCommandsDefinition));
|
|
1197
1204
|
|
|
1198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/search.js
|
|
1199
1206
|
var notImported = /* @__PURE__ */ __name((app2, folder, { profile, chosen, documents }) => {
|
|
1200
1207
|
if (documents > 0)
|
|
1201
1208
|
return void 0;
|
|
@@ -1204,7 +1211,11 @@ var notImported = /* @__PURE__ */ __name((app2, folder, { profile, chosen, docum
|
|
|
1204
1211
|
var addDocumentSearchCommandDefinition = /* @__PURE__ */ __name((program, helpers) => {
|
|
1205
1212
|
const wording = wordsOf(helpers.words);
|
|
1206
1213
|
const { prefix } = wording;
|
|
1207
|
-
return examples(
|
|
1214
|
+
return examples(
|
|
1215
|
+
// Every hit is a document the profile copied from the provider, never a note of the owner's.
|
|
1216
|
+
marksUntrusted(annotate(program.command("search"), { effects: LOCAL_READ }), DOCUMENT_UNTRUSTED).argument("<query>", "words to look for, and fields such as tag: and date: that every hit must match").description("search imported documents by words, and by meaning when indexed"),
|
|
1217
|
+
[`${prefix} search budget`, `${prefix} search "quarterly plan" --exact --limit 5`]
|
|
1218
|
+
).option("--limit <n>", "how many results to return", positive, 20).option("--page <n>", "which page to return", positive, 1).option("--exact", "match the words exactly: no word forms, no meaning").action(async (query, { page, ...args }) => {
|
|
1208
1219
|
const result = await helpers.search(query, {
|
|
1209
1220
|
...args,
|
|
1210
1221
|
offset: (page - 1) * args.limit,
|
|
@@ -1216,11 +1227,44 @@ var addDocumentSearchCommandDefinition = /* @__PURE__ */ __name((program, helper
|
|
|
1216
1227
|
}, "addDocumentSearchCommandDefinition");
|
|
1217
1228
|
var addDocumentSearchCommand = honoursDryRun(sharedCommand(addDocumentSearchCommandDefinition));
|
|
1218
1229
|
|
|
1219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/sync.js
|
|
1231
|
+
var DOCUMENT_SYNC_LIMIT = 200;
|
|
1220
1232
|
var enrichmentOutOfTime = /* @__PURE__ */ __name((embeddings) => {
|
|
1221
1233
|
const enrichment = typeof embeddings === "object" && embeddings !== null && "enrichment" in embeddings ? embeddings.enrichment : void 0;
|
|
1222
1234
|
return enrichment?.reason_id === "enrichment.deadline" && enrichment.enriched === 0;
|
|
1223
1235
|
}, "enrichmentOutOfTime");
|
|
1236
|
+
var documentSyncPart = /* @__PURE__ */ __name((result, words) => {
|
|
1237
|
+
const unfinished = result.complete === false || result.pending > 0;
|
|
1238
|
+
const moved = (result.walk?.listed ?? 0) > 0 || [result.saved, result.names_only, result.removed, result.unchanged].some((count2) => (count2 ?? 0) > 0);
|
|
1239
|
+
const resume = unfinished && !result.errors.length && moved ? [
|
|
1240
|
+
{
|
|
1241
|
+
kind: "command",
|
|
1242
|
+
step: "sync.run",
|
|
1243
|
+
command: "sync",
|
|
1244
|
+
args: words.resume,
|
|
1245
|
+
why: "the sync stopped before the end of its pass; running it again goes on from there",
|
|
1246
|
+
safe_to_auto_execute: true
|
|
1247
|
+
}
|
|
1248
|
+
] : [];
|
|
1249
|
+
const longer = enrichmentOutOfTime(result.embeddings) ? [
|
|
1250
|
+
{
|
|
1251
|
+
kind: "command",
|
|
1252
|
+
step: "sync.longer",
|
|
1253
|
+
command: "sync",
|
|
1254
|
+
args: { ...words.longer, embed: true, timeout: "15m" },
|
|
1255
|
+
why: "enrichment needs more time than this run had left, so it sent nothing; run this in a terminal, where a sync may take 15 minutes",
|
|
1256
|
+
safe_to_auto_execute: false
|
|
1257
|
+
}
|
|
1258
|
+
] : [];
|
|
1259
|
+
const diagnostics = result.walk ? [`${result.walk.folders_left} folders remain to list; run ${words.again} again
|
|
1260
|
+
`] : result.errors.length || result.pending ? [`${result.pending} source operations remain; run ${words.again} again
|
|
1261
|
+
`] : [];
|
|
1262
|
+
return {
|
|
1263
|
+
meta: result.errors.length ? { complete: false, issues: [{ code: "provider_error", reason: "sync.partial", source: words.source }] } : unfinished ? { complete: false } : {},
|
|
1264
|
+
next: [...resume, ...longer],
|
|
1265
|
+
diagnostics
|
|
1266
|
+
};
|
|
1267
|
+
}, "documentSyncPart");
|
|
1224
1268
|
var addDocumentSyncCommandsDefinition = /* @__PURE__ */ __name((program, helpers) => {
|
|
1225
1269
|
const { output } = helpers;
|
|
1226
1270
|
const wording = wordsOf(helpers.words);
|
|
@@ -1230,51 +1274,23 @@ var addDocumentSyncCommandsDefinition = /* @__PURE__ */ __name((program, helpers
|
|
|
1230
1274
|
// deadline (15 min in a terminal, 45 s over MCP) instead of a one-shot's 30 s.
|
|
1231
1275
|
annotate(program.command("sync"), { effects: FETCH, cooperative: true, partial: true }).summary("import what changed in the chosen folders, and finish an unfinished sync").description(`import what changed in the chosen folders, and finish an unfinished sync; one sync walks about ${helpers.maxEntries} entries under the chosen folders, saves where it stopped, and the next sync goes on from there`),
|
|
1232
1276
|
[`${prefix} sync`, `${prefix} sync --rescan --limit 500`]
|
|
1233
|
-
).option("--limit <n>", text.syncLimit, positive,
|
|
1277
|
+
).option("--limit <n>", text.syncLimit, positive, DOCUMENT_SYNC_LIMIT).option("--rescan", "read every chosen folder again instead of only what changed; each --rescan starts the walk over, so run it once and continue with a plain sync").option("--embed", "also index pending text for meaning search, with a model already downloaded").action(async (args, command) => {
|
|
1234
1278
|
const deadline = environmentOf(command).deadline?.();
|
|
1235
1279
|
const result = await helpers.sync({ ...args, budget: runBudgetOf(command), ...deadline ? { deadline } : {} });
|
|
1236
|
-
const unfinished = result.complete === false || result.pending > 0;
|
|
1237
|
-
const moved = (result.walk?.listed ?? 0) > 0 || [result.saved, result.names_only, result.removed, result.unchanged].some((count2) => (count2 ?? 0) > 0);
|
|
1238
|
-
const again = `${wording.app} ${helpers.profile()} sync`;
|
|
1239
1280
|
const timeout = command.optsWithGlobals().timeout;
|
|
1240
|
-
const
|
|
1241
|
-
{
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
] : [];
|
|
1254
|
-
const longer = enrichmentOutOfTime(result.embeddings) ? [
|
|
1255
|
-
{
|
|
1256
|
-
kind: "command",
|
|
1257
|
-
step: "sync.longer",
|
|
1258
|
-
command: "sync",
|
|
1259
|
-
args: { limit: args.limit, embed: true, timeout: "15m" },
|
|
1260
|
-
why: "enrichment needs more time than this run had left, so it sent nothing; run this in a terminal, where a sync may take 15 minutes",
|
|
1261
|
-
safe_to_auto_execute: false
|
|
1262
|
-
}
|
|
1263
|
-
] : [];
|
|
1264
|
-
const next = [...resume, ...longer];
|
|
1265
|
-
output(itemOf(result, {
|
|
1266
|
-
meta: result.errors.length ? {
|
|
1267
|
-
complete: false,
|
|
1268
|
-
issues: [{ code: "provider_error", reason: "sync.partial", source: wording.source }]
|
|
1269
|
-
} : unfinished ? { complete: false } : {},
|
|
1270
|
-
next
|
|
1271
|
-
}));
|
|
1272
|
-
if (result.walk)
|
|
1273
|
-
helpers.diagnostic(`${result.walk.folders_left} folders remain to list; run ${again} again
|
|
1274
|
-
`);
|
|
1275
|
-
else if (result.errors.length || result.pending)
|
|
1276
|
-
helpers.diagnostic(`${result.pending} source operations remain; run ${again} again
|
|
1277
|
-
`);
|
|
1281
|
+
const part = documentSyncPart(result, {
|
|
1282
|
+
again: `${wording.app} ${helpers.profile()} sync`,
|
|
1283
|
+
source: wording.source,
|
|
1284
|
+
resume: {
|
|
1285
|
+
limit: args.limit,
|
|
1286
|
+
...timeout === void 0 ? {} : { timeout },
|
|
1287
|
+
...args.embed ? { embed: true } : {}
|
|
1288
|
+
},
|
|
1289
|
+
longer: { limit: args.limit }
|
|
1290
|
+
});
|
|
1291
|
+
output(itemOf(result, { meta: part.meta, next: part.next }));
|
|
1292
|
+
for (const line of part.diagnostics)
|
|
1293
|
+
helpers.diagnostic(line);
|
|
1278
1294
|
if (result.errors.length)
|
|
1279
1295
|
throw new CliError("provider_error", "sync completed partially; failed operations remain pending", {
|
|
1280
1296
|
reason: "sync.partial"
|
|
@@ -1287,13 +1303,13 @@ var addDocumentSyncCommandsDefinition = /* @__PURE__ */ __name((program, helpers
|
|
|
1287
1303
|
}, "addDocumentSyncCommandsDefinition");
|
|
1288
1304
|
var addDocumentSyncCommands = honoursDryRun(sharedCommand(addDocumentSyncCommandsDefinition));
|
|
1289
1305
|
|
|
1290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/file-edit.js
|
|
1291
1307
|
import { createHash } from "node:crypto";
|
|
1292
1308
|
import { mkdtemp as mkdtemp2, readFile, rm as rm2, stat, writeFile as writeFile2 } from "node:fs/promises";
|
|
1293
1309
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
1294
1310
|
import { join as join2 } from "node:path";
|
|
1295
1311
|
|
|
1296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/office/xml.js
|
|
1297
1313
|
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', apos: "'" };
|
|
1298
1314
|
var ATTRIBUTE = /([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
|
|
1299
1315
|
var invalid = /* @__PURE__ */ __name((reason) => new CliError("validation_error", `the file's XML cannot be edited: ${reason}`), "invalid");
|
|
@@ -1456,7 +1472,7 @@ var partText = /* @__PURE__ */ __name((bytes, path) => {
|
|
|
1456
1472
|
}, "partText");
|
|
1457
1473
|
var partBytes = /* @__PURE__ */ __name((text) => encoder.encode(text), "partBytes");
|
|
1458
1474
|
|
|
1459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/office/zip.js
|
|
1460
1476
|
import { crc32 } from "node:zlib";
|
|
1461
1477
|
var decoder2 = new TextDecoder();
|
|
1462
1478
|
var openPackage = /* @__PURE__ */ __name(async (bytes) => {
|
|
@@ -1552,7 +1568,7 @@ var rewriteZip = /* @__PURE__ */ __name((bytes, replaced) => {
|
|
|
1552
1568
|
return concat([...locals, ...centrals, tail]);
|
|
1553
1569
|
}, "rewriteZip");
|
|
1554
1570
|
|
|
1555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/office/package.js
|
|
1556
1572
|
var REL = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
1557
1573
|
var STRICT_REL = "http://purl.oclc.org/ooxml/officeDocument/relationships";
|
|
1558
1574
|
var unreadable = /* @__PURE__ */ __name((what, error) => error instanceof CliError ? error : new CliError("validation_error", `the file is not a ${what} this editor reads (${error.message})`), "unreadable");
|
|
@@ -1642,7 +1658,7 @@ var openTag = /* @__PURE__ */ __name((text, element) => {
|
|
|
1642
1658
|
}, "openTag");
|
|
1643
1659
|
var qualified = /* @__PURE__ */ __name((element, local2) => element.prefix ? `${element.prefix}:${local2}` : local2, "qualified");
|
|
1644
1660
|
|
|
1645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/office/docx.js
|
|
1646
1662
|
var MAIN = "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml";
|
|
1647
1663
|
var WORD_NAMESPACES = [
|
|
1648
1664
|
"http://schemas.openxmlformats.org/wordprocessingml/2006/main",
|
|
@@ -1709,10 +1725,10 @@ var Document = class _Document {
|
|
|
1709
1725
|
const root = this.part.root;
|
|
1710
1726
|
this.ns = root.ns;
|
|
1711
1727
|
if (root.local !== "document" || !WORD_NAMESPACES.includes(this.ns))
|
|
1712
|
-
throw refuse("the file is not a Word document", "office.
|
|
1728
|
+
throw refuse("the file is not a Word document", "office.wrong-format");
|
|
1713
1729
|
const body = childrenOf(root, this.ns, "body")[0];
|
|
1714
1730
|
if (!body)
|
|
1715
|
-
throw refuse("the document has no body", "office.
|
|
1731
|
+
throw refuse("the document has no body", "office.wrong-format");
|
|
1716
1732
|
this.walk(body, "body", false);
|
|
1717
1733
|
const styles = pack.related(this.part.path, "styles");
|
|
1718
1734
|
if (styles && pack.has(styles[1].path)) {
|
|
@@ -1840,7 +1856,7 @@ var Document = class _Document {
|
|
|
1840
1856
|
if (!properties)
|
|
1841
1857
|
return "";
|
|
1842
1858
|
if (hasTracked(properties))
|
|
1843
|
-
throw refuse("the paragraph to copy the style from holds a tracked change", "office.
|
|
1859
|
+
throw refuse("the paragraph to copy the style from holds a tracked change", "office.tracked-change");
|
|
1844
1860
|
let raw = this.raw(properties);
|
|
1845
1861
|
for (const section of childrenOf(properties, this.ns, "sectPr").reverse())
|
|
1846
1862
|
raw = raw.slice(0, section.start - properties.start) + raw.slice(section.end - properties.start);
|
|
@@ -1870,18 +1886,18 @@ var editDocxParagraphs = /* @__PURE__ */ __name(async (bytes, edits) => {
|
|
|
1870
1886
|
const infos = document.paragraphs();
|
|
1871
1887
|
const check = /* @__PURE__ */ __name((index, what) => {
|
|
1872
1888
|
if (!Number.isInteger(index) || index < 0 || index >= found.length)
|
|
1873
|
-
throw refuse(`${what} ${index} does not exist; the document has ${found.length} paragraphs`, "office.
|
|
1889
|
+
throw refuse(`${what} ${index} does not exist; the document has ${found.length} paragraphs`, "office.no-paragraph");
|
|
1874
1890
|
return found[index];
|
|
1875
1891
|
}, "check");
|
|
1876
1892
|
const editable = /* @__PURE__ */ __name((index, action) => {
|
|
1877
1893
|
const info = infos[index];
|
|
1878
1894
|
if (!info.editable)
|
|
1879
|
-
throw refuse(`paragraph ${index} cannot be ${action}: ${info.reason}`, "office.
|
|
1895
|
+
throw refuse(`paragraph ${index} cannot be ${action}: ${info.reason}`, "office.unsafe-paragraph");
|
|
1880
1896
|
}, "editable");
|
|
1881
1897
|
const touched = /* @__PURE__ */ new Set();
|
|
1882
1898
|
const once = /* @__PURE__ */ __name((index) => {
|
|
1883
1899
|
if (touched.has(index))
|
|
1884
|
-
throw refuse(`paragraph ${index} is changed twice in one call`, "office.
|
|
1900
|
+
throw refuse(`paragraph ${index} is changed twice in one call`, "office.duplicate-edit");
|
|
1885
1901
|
touched.add(index);
|
|
1886
1902
|
}, "once");
|
|
1887
1903
|
const splices = [];
|
|
@@ -1898,7 +1914,7 @@ var editDocxParagraphs = /* @__PURE__ */ __name(async (bytes, edits) => {
|
|
|
1898
1914
|
editable(edit.delete, "deleted");
|
|
1899
1915
|
const properties = childrenOf(target.element, document.ns, "pPr")[0];
|
|
1900
1916
|
if (properties && childrenOf(properties, document.ns, "sectPr").length)
|
|
1901
|
-
throw refuse(`paragraph ${edit.delete} ends a section; deleting it would merge two sections`, "office.
|
|
1917
|
+
throw refuse(`paragraph ${edit.delete} ends a section; deleting it would merge two sections`, "office.section-break");
|
|
1902
1918
|
if (target.element.children.some((child) => MARKERS.has(child.local)))
|
|
1903
1919
|
throw refuse(`paragraph ${edit.delete} holds a bookmark that a cross-reference may point at`, "office.bookmark");
|
|
1904
1920
|
splices.push({ start: target.element.start, end: target.element.end, text: "" });
|
|
@@ -1922,10 +1938,10 @@ var editDocxParagraphs = /* @__PURE__ */ __name(async (bytes, edits) => {
|
|
|
1922
1938
|
if (edit.insertAfter !== -1)
|
|
1923
1939
|
check(edit.insertAfter, "paragraph");
|
|
1924
1940
|
if (!found.length)
|
|
1925
|
-
throw refuse("the document has no paragraph to insert next to", "office.
|
|
1941
|
+
throw refuse("the document has no paragraph to insert next to", "office.no-paragraph");
|
|
1926
1942
|
const neighbour = found[Math.max(0, edit.insertAfter)];
|
|
1927
1943
|
if (neighbour.lockedControl)
|
|
1928
|
-
throw refuse(`paragraph ${edit.insertAfter} sits in a locked content control`, "office.
|
|
1944
|
+
throw refuse(`paragraph ${edit.insertAfter} sits in a locked content control`, "office.unsafe-paragraph");
|
|
1929
1945
|
const source = check(edit.styleFrom ?? Math.max(0, edit.insertAfter), "styleFrom paragraph").element;
|
|
1930
1946
|
const element = neighbour.element;
|
|
1931
1947
|
const text = normalized(edit.text);
|
|
@@ -1945,7 +1961,7 @@ var editDocxParagraphs = /* @__PURE__ */ __name(async (bytes, edits) => {
|
|
|
1945
1961
|
const remaining = blocks.filter((block) => !deleted.includes(found.findIndex((entry) => entry.element === block)));
|
|
1946
1962
|
const addsAtEnd = found.some((entry, index) => insertedAfter.has(index) && entry.element === blocks.at(-1));
|
|
1947
1963
|
if (!addsAtEnd && remaining.at(-1)?.local !== "p")
|
|
1948
|
-
throw refuse(`${container.local === "tc" ? "a table cell" : "the document"} must end with a paragraph; this delete would leave it without one`, "office.
|
|
1964
|
+
throw refuse(`${container.local === "tc" ? "a table cell" : "the document"} must end with a paragraph; this delete would leave it without one`, "office.last-paragraph");
|
|
1949
1965
|
}
|
|
1950
1966
|
if (!edits.length)
|
|
1951
1967
|
return { bytes: bytes.slice(), replaced, inserted, deleted, collapsed };
|
|
@@ -1961,7 +1977,7 @@ var editDocxParagraphs = /* @__PURE__ */ __name(async (bytes, edits) => {
|
|
|
1961
1977
|
return { bytes: output, replaced, inserted, deleted, collapsed };
|
|
1962
1978
|
}, "editDocxParagraphs");
|
|
1963
1979
|
|
|
1964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/office/xlsx.js
|
|
1965
1981
|
var MAIN2 = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml";
|
|
1966
1982
|
var SHEET_NAMESPACES = [
|
|
1967
1983
|
"http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
@@ -1988,7 +2004,7 @@ var parseAddress = /* @__PURE__ */ __name((address) => {
|
|
|
1988
2004
|
const column = match ? [...match[1]].reduce((sum, letter) => sum * 26 + letter.charCodeAt(0) - 64, 0) : 0;
|
|
1989
2005
|
const row = Number(match?.[2]);
|
|
1990
2006
|
if (!match || column > MAX_COLUMN || row > MAX_ROW)
|
|
1991
|
-
throw refuse2(`${address} is not a cell address like B7`, "office.
|
|
2007
|
+
throw refuse2(`${address} is not a cell address like B7`, "office.invalid-cell");
|
|
1992
2008
|
return { row, column };
|
|
1993
2009
|
}, "parseAddress");
|
|
1994
2010
|
var parseRange = /* @__PURE__ */ __name((range) => {
|
|
@@ -2022,14 +2038,14 @@ var Workbook = class _Workbook {
|
|
|
2022
2038
|
this.workbook = pack.part(path);
|
|
2023
2039
|
this.ns = this.workbook.root.ns;
|
|
2024
2040
|
if (this.workbook.root.local !== "workbook" || !SHEET_NAMESPACES.includes(this.ns))
|
|
2025
|
-
throw refuse2("the file is not an Excel workbook", "office.
|
|
2041
|
+
throw refuse2("the file is not an Excel workbook", "office.wrong-format");
|
|
2026
2042
|
const rels = pack.relationships(path);
|
|
2027
2043
|
const sheetsElement = childrenOf(this.workbook.root, this.ns, "sheets")[0];
|
|
2028
2044
|
this.sheets = (sheetsElement ? childrenOf(sheetsElement, this.ns, "sheet") : []).map((sheet) => {
|
|
2029
2045
|
const id = attributeOf(sheet, REL, "id") ?? attributeOf(sheet, STRICT_REL, "id") ?? "";
|
|
2030
2046
|
const target = rels.get(id);
|
|
2031
2047
|
if (!target?.type.endsWith("/worksheet"))
|
|
2032
|
-
throw refuse2("a sheet of the workbook is not a worksheet (a chart sheet or a missing part)", "office.
|
|
2048
|
+
throw refuse2("a sheet of the workbook is not a worksheet (a chart sheet or a missing part)", "office.wrong-format");
|
|
2033
2049
|
return { name: attributeOf(sheet, "", "name") ?? "", path: target.path };
|
|
2034
2050
|
});
|
|
2035
2051
|
const shared = pack.related(path, "sharedStrings");
|
|
@@ -2049,7 +2065,7 @@ var Workbook = class _Workbook {
|
|
|
2049
2065
|
sheet(name) {
|
|
2050
2066
|
const found = this.sheets.find((sheet) => sheet.name === name);
|
|
2051
2067
|
if (!found)
|
|
2052
|
-
throw refuse2(`the workbook has no sheet "${name}"; it has ${this.sheets.map((sheet) => `"${sheet.name}"`).join(", ")}`, "office.
|
|
2068
|
+
throw refuse2(`the workbook has no sheet "${name}"; it has ${this.sheets.map((sheet) => `"${sheet.name}"`).join(", ")}`, "office.no-sheet");
|
|
2053
2069
|
return found;
|
|
2054
2070
|
}
|
|
2055
2071
|
};
|
|
@@ -2080,7 +2096,7 @@ var rowsOf = /* @__PURE__ */ __name((sheetData, ns) => {
|
|
|
2080
2096
|
if (reference) {
|
|
2081
2097
|
const address = parseAddress(reference);
|
|
2082
2098
|
if (address.row !== number2)
|
|
2083
|
-
throw refuse2(`cell ${reference} sits in row ${number2}`, "office.
|
|
2099
|
+
throw refuse2(`cell ${reference} sits in row ${number2}`, "office.wrong-format");
|
|
2084
2100
|
column = address.column;
|
|
2085
2101
|
} else
|
|
2086
2102
|
column++;
|
|
@@ -2110,7 +2126,7 @@ var cellOf = /* @__PURE__ */ __name((workbook, text, node) => {
|
|
|
2110
2126
|
if (type === "s") {
|
|
2111
2127
|
const string2 = workbook.strings[Number(saved)];
|
|
2112
2128
|
if (!/^\d+$/.test(saved) || string2 === void 0)
|
|
2113
|
-
throw refuse2(`cell ${columnName(node.column)}${node.row} points at a missing shared string`, "office.
|
|
2129
|
+
throw refuse2(`cell ${columnName(node.column)}${node.row} points at a missing shared string`, "office.wrong-format");
|
|
2114
2130
|
value = string2;
|
|
2115
2131
|
kind = "string";
|
|
2116
2132
|
} else if (type === "str") {
|
|
@@ -2142,10 +2158,10 @@ var cellOf = /* @__PURE__ */ __name((workbook, text, node) => {
|
|
|
2142
2158
|
}, "cellOf");
|
|
2143
2159
|
var sheetDataOf = /* @__PURE__ */ __name((part, ns) => {
|
|
2144
2160
|
if (part.root.local !== "worksheet" || part.root.ns !== ns)
|
|
2145
|
-
throw refuse2(`${part.path} is not a worksheet`, "office.
|
|
2161
|
+
throw refuse2(`${part.path} is not a worksheet`, "office.wrong-format");
|
|
2146
2162
|
const sheetData = childrenOf(part.root, ns, "sheetData")[0];
|
|
2147
2163
|
if (!sheetData)
|
|
2148
|
-
throw refuse2(`${part.path} has no cell data`, "office.
|
|
2164
|
+
throw refuse2(`${part.path} has no cell data`, "office.wrong-format");
|
|
2149
2165
|
return sheetData;
|
|
2150
2166
|
}, "sheetDataOf");
|
|
2151
2167
|
var readXlsxCells = /* @__PURE__ */ __name(async (bytes, options = {}) => {
|
|
@@ -2218,7 +2234,7 @@ var valueXml = /* @__PURE__ */ __name((cell, value, strings) => {
|
|
|
2218
2234
|
return { type: "b", content: `<${v}>${value ? 1 : 0}</${v}>` };
|
|
2219
2235
|
if (typeof value === "number") {
|
|
2220
2236
|
if (!Number.isFinite(value))
|
|
2221
|
-
throw refuse2("a cell number must be finite", "office.
|
|
2237
|
+
throw refuse2("a cell number must be finite", "office.invalid-value");
|
|
2222
2238
|
return { type: void 0, content: `<${v}>${String(value)}</${v}>` };
|
|
2223
2239
|
}
|
|
2224
2240
|
if (strings)
|
|
@@ -2267,7 +2283,7 @@ var editSheet = /* @__PURE__ */ __name((workbook, sheet, planned, options, strin
|
|
|
2267
2283
|
for (const label of tableLabels(workbook, sheet))
|
|
2268
2284
|
for (const item of planned)
|
|
2269
2285
|
if (item.row >= label.top && item.row <= label.bottom && item.column >= label.left && item.column <= label.right)
|
|
2270
|
-
throw refuse2(`${sheet.name}!${item.address} is a ${label.kind} of the table "${label.table}", whose part repeats the text; change it in Excel`, "office.
|
|
2286
|
+
throw refuse2(`${sheet.name}!${item.address} is a ${label.kind} of the table "${label.table}", whose part repeats the text; change it in Excel`, "office.table-header");
|
|
2271
2287
|
const splices = [];
|
|
2272
2288
|
const changed = [];
|
|
2273
2289
|
let formulaRemoved = false;
|
|
@@ -2285,7 +2301,7 @@ var editSheet = /* @__PURE__ */ __name((workbook, sheet, planned, options, strin
|
|
|
2285
2301
|
const row = rows.find((candidate) => candidate.row === rowNumber);
|
|
2286
2302
|
if (!row) {
|
|
2287
2303
|
if (rows.some((candidate) => !candidate.explicit))
|
|
2288
|
-
throw refuse2(`${sheet.name} has rows without numbers, so row ${rowNumber} cannot be added`, "office.
|
|
2304
|
+
throw refuse2(`${sheet.name} has rows without numbers, so row ${rowNumber} cannot be added`, "office.implicit-rows");
|
|
2289
2305
|
const next = rows.find((candidate) => candidate.row > rowNumber);
|
|
2290
2306
|
const r = qualified(sheetData, "row");
|
|
2291
2307
|
const xml = `<${r} r="${rowNumber}">${items.map((item) => newCell(item)).join("")}</${r}>`;
|
|
@@ -2309,7 +2325,7 @@ var editSheet = /* @__PURE__ */ __name((workbook, sheet, planned, options, strin
|
|
|
2309
2325
|
const existing = row.cells.find((cell) => cell.column === item.column);
|
|
2310
2326
|
if (!existing) {
|
|
2311
2327
|
if (row.cells.some((cell) => attributeOf(cell.element, "", "r") === void 0))
|
|
2312
|
-
throw refuse2(`row ${rowNumber} of ${sheet.name} has cells without addresses, so ${item.address} cannot be added`, "office.
|
|
2328
|
+
throw refuse2(`row ${rowNumber} of ${sheet.name} has cells without addresses, so ${item.address} cannot be added`, "office.implicit-cells");
|
|
2313
2329
|
const next = row.cells.find((cell) => cell.column > item.column);
|
|
2314
2330
|
inserts.push({ at: next ? next.element.start : -1, xml: newCell(item, rowStyle) });
|
|
2315
2331
|
changed.push({ sheet: sheet.name, cell: item.address, before: null, after: item.edit.value, created: true });
|
|
@@ -2318,16 +2334,16 @@ var editSheet = /* @__PURE__ */ __name((workbook, sheet, planned, options, strin
|
|
|
2318
2334
|
const before = cellOf(workbook, text, existing);
|
|
2319
2335
|
const element = existing.element;
|
|
2320
2336
|
if (attributeOf(element, "", "vm") !== void 0)
|
|
2321
|
-
throw refuse2(`${sheet.name}!${item.address} holds a picture or a linked data type, which this editor does not replace`, "office.
|
|
2337
|
+
throw refuse2(`${sheet.name}!${item.address} holds a picture or a linked data type, which this editor does not replace`, "office.rich-value");
|
|
2322
2338
|
const formula = childrenOf(element, ns, "f")[0];
|
|
2323
2339
|
const array2 = arrays.find((entry) => item.row >= entry.range.top && item.row <= entry.range.bottom && item.column >= entry.range.left && item.column <= entry.range.right && (entry.range.top !== entry.range.bottom || entry.range.left !== entry.range.right));
|
|
2324
2340
|
if (array2)
|
|
2325
|
-
throw refuse2(`${sheet.name}!${item.address} is part of an array formula; change it in Excel`, "office.
|
|
2341
|
+
throw refuse2(`${sheet.name}!${item.address} is part of an array formula; change it in Excel`, "office.array-formula");
|
|
2326
2342
|
if (formula) {
|
|
2327
2343
|
if (!options.overwriteFormulas)
|
|
2328
|
-
throw refuse2(`${sheet.name}!${item.address} holds the formula =${before.formula}; pass overwriteFormulas to replace it with a value`, "office.
|
|
2344
|
+
throw refuse2(`${sheet.name}!${item.address} holds the formula =${before.formula}; pass overwriteFormulas to replace it with a value`, "office.formula-cell");
|
|
2329
2345
|
if (attributeOf(formula, "", "t") === "shared" && attributeOf(formula, "", "ref") !== void 0)
|
|
2330
|
-
throw refuse2(`${sheet.name}!${item.address} holds a formula that other cells share; replacing it would break theirs`, "office.
|
|
2346
|
+
throw refuse2(`${sheet.name}!${item.address} holds a formula that other cells share; replacing it would break theirs`, "office.shared-formula");
|
|
2331
2347
|
formulaRemoved = true;
|
|
2332
2348
|
}
|
|
2333
2349
|
if (attributeOf(element, "", "t") === "s" && strings)
|
|
@@ -2430,7 +2446,7 @@ var editXlsxCells = /* @__PURE__ */ __name(async (bytes, edits, options = {}) =>
|
|
|
2430
2446
|
const address = `${columnName(column)}${row}`;
|
|
2431
2447
|
const key = `${sheet.name}!${address}`;
|
|
2432
2448
|
if (seen.has(key))
|
|
2433
|
-
throw refuse2(`${key} is edited twice in one call`, "office.
|
|
2449
|
+
throw refuse2(`${key} is edited twice in one call`, "office.duplicate-edit");
|
|
2434
2450
|
seen.add(key);
|
|
2435
2451
|
bySheet.set(sheet, [...bySheet.get(sheet) ?? [], { edit, row, column, address }]);
|
|
2436
2452
|
}
|
|
@@ -2461,7 +2477,7 @@ var verify = /* @__PURE__ */ __name(async (output, changed) => {
|
|
|
2461
2477
|
await readSpreadsheet(output, "xlsx");
|
|
2462
2478
|
}, "verify");
|
|
2463
2479
|
|
|
2464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/file-update.js
|
|
2465
2481
|
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
2466
2482
|
import { tmpdir } from "node:os";
|
|
2467
2483
|
import { join } from "node:path";
|
|
@@ -2482,12 +2498,12 @@ var newText = /* @__PURE__ */ __name(async (input, text) => {
|
|
|
2482
2498
|
return text;
|
|
2483
2499
|
if (!input || input.isTTY)
|
|
2484
2500
|
throw new CliError("validation_error", "give the new text with --text or on stdin", { param: "--text" });
|
|
2485
|
-
const
|
|
2486
|
-
if (
|
|
2501
|
+
const read2 = await bufferedInput(input, { maxBytes: MAX_BUFFERED_INPUT });
|
|
2502
|
+
if (read2.length === 0)
|
|
2487
2503
|
throw new CliError("validation_error", "stdin gave no text; give the new text with --text or on stdin", {
|
|
2488
2504
|
param: "--text"
|
|
2489
2505
|
});
|
|
2490
|
-
return
|
|
2506
|
+
return read2.toString("utf8");
|
|
2491
2507
|
}, "newText");
|
|
2492
2508
|
var addFileUpdateCommandDefinition = /* @__PURE__ */ __name((files, helpers) => {
|
|
2493
2509
|
const { prefix, place } = wordsOf(helpers.words);
|
|
@@ -2530,7 +2546,7 @@ var addFileUpdateCommandDefinition = /* @__PURE__ */ __name((files, helpers) =>
|
|
|
2530
2546
|
}, "addFileUpdateCommandDefinition");
|
|
2531
2547
|
var addFileUpdateCommand = honoursDryRun(sharedCommand(addFileUpdateCommandDefinition));
|
|
2532
2548
|
|
|
2533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/file-edit.js
|
|
2534
2550
|
var MAX_OFFICE_BYTES = 64 * 1024 * 1024;
|
|
2535
2551
|
var sha256 = /* @__PURE__ */ __name((bytes) => createHash("sha256").update(bytes).digest("hex"), "sha256");
|
|
2536
2552
|
var inTemp = /* @__PURE__ */ __name(async (act) => {
|
|
@@ -2575,7 +2591,7 @@ var columnName2 = /* @__PURE__ */ __name((column) => {
|
|
|
2575
2591
|
var cornerOf = /* @__PURE__ */ __name((address) => {
|
|
2576
2592
|
const match = ADDRESS.exec(address.toUpperCase());
|
|
2577
2593
|
if (!match)
|
|
2578
|
-
throw new CliError("validation_error", `${address} is not a cell like B7`, { reason: "office.
|
|
2594
|
+
throw new CliError("validation_error", `${address} is not a cell like B7`, { reason: "office.invalid-cell" });
|
|
2579
2595
|
const letters = match[1];
|
|
2580
2596
|
return {
|
|
2581
2597
|
column: [...letters].reduce((sum, letter) => sum * 26 + letter.charCodeAt(0) - 64, 0),
|
|
@@ -2640,10 +2656,10 @@ var addFileEditCommandsDefinition = /* @__PURE__ */ __name((files, helpers) => {
|
|
|
2640
2656
|
});
|
|
2641
2657
|
const path = helpers.path(input);
|
|
2642
2658
|
const answer = await helpers.write([deleteKey], async (port) => {
|
|
2643
|
-
const
|
|
2644
|
-
if (
|
|
2659
|
+
const read2 = await downloaded(port, path);
|
|
2660
|
+
if (read2.sha256 !== expected)
|
|
2645
2661
|
throw remoteChanged(path, "changed since it was read", reread);
|
|
2646
|
-
const edited = await edit(
|
|
2662
|
+
const edited = await edit(read2.bytes);
|
|
2647
2663
|
return inTemp(async (folder) => {
|
|
2648
2664
|
const from = join2(folder, "edited");
|
|
2649
2665
|
await writeFile2(from, edited.bytes, { mode: 384 });
|
|
@@ -2665,13 +2681,17 @@ var addFileEditCommandsDefinition = /* @__PURE__ */ __name((files, helpers) => {
|
|
|
2665
2681
|
const readOffice = /* @__PURE__ */ __name(async (command, input, answer) => {
|
|
2666
2682
|
const path = helpers.path(input);
|
|
2667
2683
|
const item = await helpers.read(async (port) => {
|
|
2668
|
-
const
|
|
2669
|
-
return { path, sha256:
|
|
2684
|
+
const read2 = await downloaded(port, path);
|
|
2685
|
+
return { path, sha256: read2.sha256, ...await answer(read2.bytes) };
|
|
2670
2686
|
}, command);
|
|
2671
2687
|
helpers.output(itemOf(item), command);
|
|
2672
2688
|
}, "readOffice");
|
|
2673
2689
|
const sheets = annotate(files.command("sheets"), { effects: REMOTE_READ }).description(`the cells of an Excel workbook (.xlsx) on ${place}, read and changed in place`);
|
|
2674
|
-
examples(annotate(sheets.command("show"), { effects: REMOTE_READ, offline: false })
|
|
2690
|
+
examples(marksUntrusted(annotate(sheets.command("show"), { effects: REMOTE_READ, offline: false }), [
|
|
2691
|
+
"sheets.name",
|
|
2692
|
+
"sheets.cells.value",
|
|
2693
|
+
"sheets.cells.formula"
|
|
2694
|
+
]).summary("show a workbook's cells and the sha256 to edit them at").description("show a workbook's stored cells, each with its value, type, formula and format, and the file's sha256 to pass as --expected-fingerprint to sheets update. Formulas show the value Excel saved last").argument("<path>", `the .xlsx file on ${place}`).argument("[range]", "the cells to show: Sheet1!A1:C10, a sheet's name, or A1:C10 on every sheet; all without it"), [`${prefix} ${group} sheets show /budget.xlsx "Sheet1!A1:C10"`, `${prefix} ${group} sheets show /budget.xlsx`]).action(async function(input, range) {
|
|
2675
2695
|
const wanted = sheetRangeOf(range);
|
|
2676
2696
|
await readOffice(this, input, async (bytes) => ({
|
|
2677
2697
|
sheets: (await readXlsxCells(bytes, wanted)).map((sheet) => ({
|
|
@@ -2699,7 +2719,7 @@ var addFileEditCommandsDefinition = /* @__PURE__ */ __name((files, helpers) => {
|
|
|
2699
2719
|
const wanted = sheetRangeOf(range);
|
|
2700
2720
|
if (wanted.range === void 0)
|
|
2701
2721
|
throw new CliError("validation_error", `${range} names no cell; give one like Sheet1!B2`, {
|
|
2702
|
-
reason: "office.
|
|
2722
|
+
reason: "office.invalid-cell"
|
|
2703
2723
|
});
|
|
2704
2724
|
cellEditsOf("", wanted.range, values);
|
|
2705
2725
|
await editInPlace(this, "sheets", input, args.expectedFingerprint, async (bytes) => {
|
|
@@ -2707,7 +2727,7 @@ var addFileEditCommandsDefinition = /* @__PURE__ */ __name((files, helpers) => {
|
|
|
2707
2727
|
if (sheet === void 0) {
|
|
2708
2728
|
const names = (await readXlsxCells(bytes, { range: "A1" })).map((one) => one.name);
|
|
2709
2729
|
if (names.length !== 1)
|
|
2710
|
-
throw new CliError("validation_error", `the workbook has ${names.length} sheets (${names.map((name) => `"${name}"`).join(", ")}); name one, like ${names[0] ?? "Sheet1"}!${wanted.range}`, { reason: "office.
|
|
2730
|
+
throw new CliError("validation_error", `the workbook has ${names.length} sheets (${names.map((name) => `"${name}"`).join(", ")}); name one, like ${names[0] ?? "Sheet1"}!${wanted.range}`, { reason: "office.no-sheet" });
|
|
2711
2731
|
sheet = names[0];
|
|
2712
2732
|
}
|
|
2713
2733
|
try {
|
|
@@ -2723,14 +2743,14 @@ var addFileEditCommandsDefinition = /* @__PURE__ */ __name((files, helpers) => {
|
|
|
2723
2743
|
}
|
|
2724
2744
|
};
|
|
2725
2745
|
} catch (error) {
|
|
2726
|
-
if (isCliError(error) && error.details?.reason === "office.
|
|
2746
|
+
if (isCliError(error) && error.details?.reason === "office.formula-cell")
|
|
2727
2747
|
throw new CliError("validation_error", error.message.replace("pass overwriteFormulas", "pass --replace"), error.details);
|
|
2728
2748
|
throw error;
|
|
2729
2749
|
}
|
|
2730
2750
|
});
|
|
2731
2751
|
});
|
|
2732
2752
|
const documents = annotate(files.command("documents"), { effects: REMOTE_READ }).description(`the paragraphs of a Word document (.docx) on ${place}, read and changed in place`);
|
|
2733
|
-
examples(annotate(documents.command("show"), { effects: REMOTE_READ, offline: false }).summary("show a document's paragraphs and the sha256 to edit them at").description("show a Word document's paragraphs by index, with their style, whether each can be edited and why not, and the file's sha256 to pass as --expected-fingerprint to documents update").argument("<path>", `the .docx file on ${place}`), [`${prefix} ${group} documents show /report.docx`]).action(async function(input) {
|
|
2753
|
+
examples(marksUntrusted(annotate(documents.command("show"), { effects: REMOTE_READ, offline: false }), ["paragraphs.text"]).summary("show a document's paragraphs and the sha256 to edit them at").description("show a Word document's paragraphs by index, with their style, whether each can be edited and why not, and the file's sha256 to pass as --expected-fingerprint to documents update").argument("<path>", `the .docx file on ${place}`), [`${prefix} ${group} documents show /report.docx`]).action(async function(input) {
|
|
2734
2754
|
await readOffice(this, input, async (bytes) => ({
|
|
2735
2755
|
paragraphs: (await readDocxParagraphs(bytes)).map((paragraph) => ({
|
|
2736
2756
|
index: paragraph.index,
|
|
@@ -2815,7 +2835,16 @@ var addFileEditCommandsDefinition = /* @__PURE__ */ __name((files, helpers) => {
|
|
|
2815
2835
|
}, "addFileEditCommandsDefinition");
|
|
2816
2836
|
var addFileEditCommands = honoursDryRun(sharedCommand(addFileEditCommandsDefinition));
|
|
2817
2837
|
|
|
2818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/file-mirrors.js
|
|
2839
|
+
var SavedMirror = strictObject({
|
|
2840
|
+
id: string(),
|
|
2841
|
+
path: string(),
|
|
2842
|
+
folder: string(),
|
|
2843
|
+
account: string(),
|
|
2844
|
+
exclude: optional(array(string()))
|
|
2845
|
+
});
|
|
2846
|
+
|
|
2847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/manifest/manifest.js
|
|
2819
2848
|
var dotPath = pipe(string(), regex(/^[^.\s]+(\.[^.\s]+)*$/, "a dot path into the answer, such as data.id"));
|
|
2820
2849
|
var scalar = union([string(), number(), boolean()]);
|
|
2821
2850
|
var callEntries = {
|
|
@@ -2859,7 +2888,7 @@ var schema = strictObject({
|
|
|
2859
2888
|
reads: optional(record(pipe(string(), regex(/^[a-z][A-Za-z0-9]*$/, "a camelCase name")), strictObject(callEntries)))
|
|
2860
2889
|
});
|
|
2861
2890
|
|
|
2862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.735.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_7fb22530c6bf05ba7be1bbee4c3f13e5/node_modules/@wirecat/cli-core/dist/cli/documents/manifest/source.js
|
|
2863
2892
|
var OVERLAP_MS = 10 * 6e4;
|
|
2864
2893
|
|
|
2865
2894
|
// dist/list-queries.js
|
|
@@ -3027,7 +3056,20 @@ var keyOf = /* @__PURE__ */ __name((path) => {
|
|
|
3027
3056
|
const operation = operations.find((one) => one.command === path[1]);
|
|
3028
3057
|
return operation ? `api.${operation.id}` : commandPathKey(path);
|
|
3029
3058
|
}, "keyOf");
|
|
3030
|
-
var
|
|
3059
|
+
var DELETE_KEY = "files.delete";
|
|
3060
|
+
var OVERWRITES = { key: DELETE_KEY, when: "with --expected-fingerprint" };
|
|
3061
|
+
var FILES_CHECKS = {
|
|
3062
|
+
"files update": [OVERWRITES],
|
|
3063
|
+
"files restore": [OVERWRITES],
|
|
3064
|
+
"files sheets update": [DELETE_KEY],
|
|
3065
|
+
"files documents update": [DELETE_KEY]
|
|
3066
|
+
};
|
|
3067
|
+
var permissions = commandPermissions({
|
|
3068
|
+
keyOf,
|
|
3069
|
+
extra: [...permissionKeys([])],
|
|
3070
|
+
defaults: DEFAULT_LEVELS,
|
|
3071
|
+
alsoChecks: /* @__PURE__ */ __name((path) => FILES_CHECKS[path.join(" ")] ?? [], "alsoChecks")
|
|
3072
|
+
});
|
|
3031
3073
|
var configuration = settingsFor(DRIVE_APP, {
|
|
3032
3074
|
configRepair: false,
|
|
3033
3075
|
// drive's own schema decides what the file may hold, so `doctor` names a profile that lacks its principal.
|
|
@@ -3186,6 +3228,7 @@ export {
|
|
|
3186
3228
|
addDocumentMirrorCommands,
|
|
3187
3229
|
addDocumentSearchCommand,
|
|
3188
3230
|
addDocumentSyncCommands,
|
|
3231
|
+
addFileEditCommands,
|
|
3189
3232
|
permissionKeys,
|
|
3190
3233
|
permissionNames,
|
|
3191
3234
|
DEFAULT_LEVELS,
|
|
@@ -3204,6 +3247,7 @@ export {
|
|
|
3204
3247
|
DEFAULTS_ONLY,
|
|
3205
3248
|
PROFILE_ONLY,
|
|
3206
3249
|
SETTING_NAMES,
|
|
3250
|
+
DELETE_KEY,
|
|
3207
3251
|
configuration,
|
|
3208
3252
|
paths,
|
|
3209
3253
|
configPath,
|