@wirecat/drive-cli 0.63.0 → 0.64.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 +2 -1
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-GZJS3UKC.js → all-profiles-BPPT2AK5.js} +13 -13
- package/dist/bundle/{anthropic-RGV3WXX5.js → anthropic-JW6GOJUD.js} +13 -11
- package/dist/bundle/{app-server-AA2PJ7PV.js → app-server-KAQIOJMZ.js} +53 -53
- package/dist/bundle/{bun-OXZYIA3R.js → bun-UT7GNTPV.js} +2 -2
- package/dist/bundle/{bun-sqlite-D45NSDM3.js → bun-sqlite-2OIVV3LS.js} +8 -8
- package/dist/bundle/{chunk-EOOGWUTP.js → chunk-2FEZ24DK.js} +10 -10
- package/dist/bundle/{chunk-TWUH22Z5.js → chunk-2W464HAE.js} +4 -4
- package/dist/bundle/{chunk-YIP7ELON.js → chunk-34BIDKF4.js} +275 -419
- package/dist/bundle/{chunk-2NIC72HH.js → chunk-36GPBPWM.js} +1 -1
- package/dist/bundle/{chunk-44SBK6KB.js → chunk-3J5KAFNA.js} +1601 -877
- package/dist/bundle/{chunk-ZM5J6ZMB.js → chunk-3NULZGQU.js} +2 -2
- package/dist/bundle/{chunk-DJHLVUL6.js → chunk-46CD64J2.js} +152 -36
- package/dist/bundle/{chunk-2TFXK3R4.js → chunk-4CNTID2X.js} +4 -4
- package/dist/bundle/{chunk-WYGWWHZP.js → chunk-4YRENUB5.js} +2 -2
- package/dist/bundle/{chunk-L37LMMRJ.js → chunk-5HSRQ53R.js} +2 -2
- package/dist/bundle/{chunk-XR6ESRU6.js → chunk-5OFA5EXE.js} +2 -2
- package/dist/bundle/{chunk-3QINVLZI.js → chunk-5ZBR55US.js} +1 -1
- package/dist/bundle/{chunk-LMAVCYLQ.js → chunk-66AF4FBW.js} +4 -4
- package/dist/bundle/{chunk-Y6GNA7HE.js → chunk-6B37XO6B.js} +23 -5
- package/dist/bundle/{chunk-ZMOUUOT2.js → chunk-6G53ZFUT.js} +1 -1
- package/dist/bundle/{chunk-2TDUGC5D.js → chunk-AHB4OJCI.js} +1885 -565
- package/dist/bundle/{chunk-E4SDKMBJ.js → chunk-B67BLRAI.js} +3 -3
- package/dist/bundle/{chunk-YGU6ULU5.js → chunk-B7XBIOMR.js} +12 -12
- package/dist/bundle/{chunk-FEZF3TII.js → chunk-BDYWZ7JE.js} +50 -6
- package/dist/bundle/{chunk-BKYMKVHT.js → chunk-BEUAICUD.js} +2 -2
- package/dist/bundle/{chunk-ABYGSJZ4.js → chunk-BEZJA44H.js} +7 -7
- package/dist/bundle/{chunk-TF23BZW5.js → chunk-BZ2ZKILM.js} +3 -3
- package/dist/bundle/{chunk-FUITWY7O.js → chunk-C7WBNOYW.js} +1 -1
- package/dist/bundle/{chunk-V3NVXIQR.js → chunk-CPMRM3GQ.js} +231 -191
- package/dist/bundle/{chunk-AEX37ETW.js → chunk-DD7EFG6B.js} +2 -2
- package/dist/bundle/{chunk-PDCCYHCH.js → chunk-E2LBCCTG.js} +5 -5
- package/dist/bundle/{chunk-O2XOX4HB.js → chunk-EC2XGDKJ.js} +50 -34
- package/dist/bundle/{chunk-4OSSOWDM.js → chunk-EJ4PNHPP.js} +1 -1
- package/dist/bundle/{chunk-4S4JMW6I.js → chunk-EQEGJVO2.js} +1 -1
- package/dist/bundle/{chunk-XNVFKMVR.js → chunk-EWGVDFPT.js} +957 -533
- package/dist/bundle/{chunk-CE2TJBLP.js → chunk-EZ6O3ST3.js} +3 -3
- package/dist/bundle/{chunk-FRIJUILO.js → chunk-F2VDAG32.js} +3 -3
- package/dist/bundle/{chunk-HZZCEQTH.js → chunk-G3NULXOM.js} +4 -4
- package/dist/bundle/{chunk-OD4U7GUY.js → chunk-G4KEKKDE.js} +20 -20
- package/dist/bundle/{chunk-OTROVC4E.js → chunk-GSMYXGFR.js} +1 -1
- package/dist/bundle/{chunk-4CIZWCXV.js → chunk-GW3U6OLD.js} +1 -1
- package/dist/bundle/{chunk-6EY46GAN.js → chunk-HW4UPST2.js} +2 -2
- package/dist/bundle/{chunk-2HF2MRXI.js → chunk-IDAK4DDK.js} +1 -1
- package/dist/bundle/{chunk-27YUUGXQ.js → chunk-IK6KH3RE.js} +1 -1
- package/dist/bundle/{chunk-DJ3SDJZY.js → chunk-IX7NQJLY.js} +8 -8
- package/dist/bundle/{chunk-534OBX5Y.js → chunk-J62DI53V.js} +1 -1
- package/dist/bundle/{chunk-PO5RQQIG.js → chunk-JRXFW7HE.js} +5 -5
- package/dist/bundle/{chunk-XIUDS3OK.js → chunk-K6BSB53R.js} +1 -1
- package/dist/bundle/{chunk-ND6LLYGF.js → chunk-KE4XPPRQ.js} +27 -27
- package/dist/bundle/{chunk-UQLWMGSD.js → chunk-KG2XKEHL.js} +5 -5
- package/dist/bundle/{chunk-MOTRI3SY.js → chunk-KIN6PDFE.js} +24 -2
- package/dist/bundle/{chunk-VAUMOZU5.js → chunk-KVW4XNKB.js} +16 -16
- package/dist/bundle/{chunk-33MGFUED.js → chunk-LOMW6F2E.js} +194 -229
- package/dist/bundle/{chunk-5PPL7JDM.js → chunk-M73NNJ3X.js} +2 -2
- package/dist/bundle/{chunk-QCKZ3GAA.js → chunk-N622LRPM.js} +4 -4
- package/dist/bundle/{chunk-3BZRKLJ6.js → chunk-O2QO5UZC.js} +13 -13
- package/dist/bundle/{chunk-SXM6MHRR.js → chunk-OEVHZOHC.js} +12 -12
- package/dist/bundle/{chunk-6MQSQ4LX.js → chunk-OH3K2E7X.js} +402 -184
- package/dist/bundle/{chunk-J24ZFCWM.js → chunk-P7DEGRZA.js} +21 -21
- package/dist/bundle/{chunk-YUWPNG7B.js → chunk-PBMSBCVB.js} +1 -1
- package/dist/bundle/{chunk-S4RXABDR.js → chunk-QEAD2LF4.js} +3 -3
- package/dist/bundle/{chunk-OXY6SSZG.js → chunk-QXCKJUZY.js} +33 -18
- package/dist/bundle/{chunk-LZEOQW7S.js → chunk-SIOIMO62.js} +36 -36
- package/dist/bundle/{chunk-RKELRWH7.js → chunk-TNV2FXVK.js} +5 -5
- package/dist/bundle/{chunk-UPOSDTPT.js → chunk-UD55VB2N.js} +3 -3
- package/dist/bundle/{chunk-6KQJSFYF.js → chunk-UIEA6FIV.js} +22 -22
- package/dist/bundle/{chunk-XDC3TWTL.js → chunk-UJR272CP.js} +28 -28
- package/dist/bundle/{chunk-3HK5WMI5.js → chunk-USLZE36C.js} +6 -6
- package/dist/bundle/{chunk-ZOJU7ZFI.js → chunk-VIJ6ACYB.js} +8 -8
- package/dist/bundle/{chunk-VKPCONDQ.js → chunk-VPLFD5RJ.js} +4 -4
- package/dist/bundle/{chunk-VJEOGKAN.js → chunk-VT2UFYPJ.js} +7 -7
- package/dist/bundle/{chunk-Q5DJTRKV.js → chunk-WWCYTMAV.js} +2 -2
- package/dist/bundle/{chunk-7EMQ26BA.js → chunk-XPXKD63J.js} +13 -13
- package/dist/bundle/{chunk-J4DIHPZ6.js → chunk-ZF6GUZCE.js} +1 -1
- package/dist/bundle/{chunk-Z42YYLTS.js → chunk-ZRZ4HTCK.js} +52 -34
- package/dist/bundle/{chunk-NEFSGCVA.js → chunk-ZSZJLJIA.js} +10 -10
- package/dist/bundle/command-contract-H5OYJOPF.js +38 -0
- package/dist/bundle/{decode-G5YEIPNC.js → decode-HTOQ6S3V.js} +8 -8
- package/dist/bundle/{dispatch-GEFIXA6X.js → dispatch-SH5SP6LA.js} +11 -11
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-W2CWHNXR.js → echarts-KFHB6SLX.js} +2 -2
- package/dist/bundle/{embed-OBFFPVF4.js → embed-YATFB2PN.js} +9 -9
- package/dist/bundle/{embedder-NGCBQHIG.js → embedder-MQPDFGTJ.js} +12 -12
- package/dist/bundle/entry-YZBB647C.js +22 -0
- package/dist/bundle/{failure-GV77W3CD.js → failure-4FQL4XJI.js} +4 -4
- package/dist/bundle/first-run-5JT3UQZB.js +30 -0
- package/dist/bundle/first-screen-BEMDEWO7.js +36 -0
- package/dist/bundle/{google-CIWUVJ5C.js → google-DVADVICN.js} +13 -13
- package/dist/bundle/{google-api-Z3NSTBBR.js → google-api-QMFGCXBM.js} +55 -56
- package/dist/bundle/grants-WKB2E4TA.js +103 -0
- package/dist/bundle/{identity-OM6GFZ7T.js → identity-FYVDK4M2.js} +6 -6
- package/dist/bundle/{instructions-YQBQSYSS.js → instructions-D3GF3B7M.js} +1 -1
- package/dist/bundle/{login-7RYSDVN3.js → login-COFZ2IWP.js} +61 -62
- package/dist/bundle/{mcp-GWDA3HOA.js → mcp-RKJG22KM.js} +2 -2
- package/dist/bundle/{node-IVU33RL7.js → node-OFICOKX3.js} +2 -2
- package/dist/bundle/{node-sqlite-SIH5BEW2.js → node-sqlite-DNBTDOXD.js} +9 -9
- package/dist/bundle/oauth-PDQHWFBF.js +22 -0
- package/dist/bundle/{open-IAO2SNII.js → open-PTPR2YWX.js} +8 -8
- package/dist/bundle/{openai-SGOUBHXP.js → openai-2KV5LUW4.js} +17 -17
- package/dist/bundle/{process-BPBMV3AT.js → process-EAW6NST2.js} +1 -1
- package/dist/bundle/{program-MYKKJ4F6.js → program-6UV5Q5YN.js} +306 -276
- package/dist/bundle/prompt-634TPMJK.js +19 -0
- package/dist/bundle/{reasons-57J2D77K.js → reasons-DDWCEYSQ.js} +5 -5
- package/dist/bundle/{recognize-A5C5RPB3.js → recognize-SJO6QUDW.js} +7 -7
- package/dist/bundle/{remote-VWYFLRGO.js → remote-6JXZITKF.js} +10 -10
- package/dist/bundle/{rerank-4NGQWREA.js → rerank-MD5VOPQ6.js} +10 -10
- package/dist/bundle/{serve-Y6LQTFH5.js → serve-LZTROA2M.js} +12 -12
- package/dist/bundle/server-GT7X666D.js +69 -0
- package/dist/bundle/{server-6AUHIIUA.js → server-NSA3UAFY.js} +43 -43
- package/dist/bundle/{services-2W4J7EMW.js → services-F5A6XQCV.js} +63 -33
- package/dist/bundle/{sqlite-runtime-P6BBDX2H.js → sqlite-runtime-7YF6REKS.js} +9 -9
- package/dist/bundle/{start-AFFA3LKM.js → start-MUFLE6FA.js} +30 -8
- package/dist/bundle/{state-PXKKXR3R.js → state-UC54F3YZ.js} +9 -9
- package/dist/bundle/{store-IVV2BAGZ.js → store-F5FJGWMR.js} +28 -20
- package/dist/bundle/{store-CN6JEUC4.js → store-J53YNAH6.js} +35 -18
- package/dist/bundle/store-maintenance-command-GJVXLBAB.js +58 -0
- package/dist/bundle/tokens-H2EJKGA5.js +101 -0
- package/dist/commands/account.d.ts +4 -0
- package/dist/commands/account.d.ts.map +1 -0
- package/dist/commands/account.js +33 -0
- package/dist/commands/account.js.map +1 -0
- package/dist/profile-lock.d.ts +1 -0
- package/dist/profile-lock.d.ts.map +1 -1
- package/dist/profile-lock.js +1 -0
- package/dist/profile-lock.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +2 -0
- package/dist/program.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-Z5KC7XBR.js +0 -33
- package/dist/bundle/command-contract-BRW3AP44.js +0 -38
- package/dist/bundle/entry-ET6HGM7A.js +0 -22
- package/dist/bundle/first-run-JG52UZVO.js +0 -30
- package/dist/bundle/first-screen-CIL3GFAA.js +0 -36
- package/dist/bundle/grants-3S4RL3WB.js +0 -104
- package/dist/bundle/oauth-PT4JEHLL.js +0 -22
- package/dist/bundle/prompt-3ZM64DCB.js +0 -17
- package/dist/bundle/server-PFHI35HA.js +0 -69
- package/dist/bundle/store-maintenance-command-MSY2QNEH.js +0 -59
- package/dist/bundle/tokens-P4LPNUFW.js +0 -102
- /package/dist/bundle/{chunk-ZQ3GWKDQ.js → chunk-SW6C6WH5.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
metadataJson,
|
|
9
9
|
supported,
|
|
10
10
|
tooManyEntries
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PBMSBCVB.js";
|
|
12
12
|
import {
|
|
13
13
|
ACCOUNT_FREE_COMMANDS,
|
|
14
14
|
ANY_PROFILE_COMMANDS,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
describeDriveProgram,
|
|
20
20
|
examples,
|
|
21
21
|
markProfileFree
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QEAD2LF4.js";
|
|
23
23
|
import {
|
|
24
24
|
DEFAULTS_ONLY,
|
|
25
25
|
DEFAULT_LEVELS,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
unknownProfile,
|
|
50
50
|
withDefaults,
|
|
51
51
|
writeConfig
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-OEVHZOHC.js";
|
|
53
53
|
import {
|
|
54
54
|
blockKey,
|
|
55
55
|
blocksMarkdown,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
syncDocuments,
|
|
69
69
|
syncMirrors,
|
|
70
70
|
watchMirrors
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-UIEA6FIV.js";
|
|
72
72
|
import {
|
|
73
73
|
apiMethod,
|
|
74
74
|
apiMethods,
|
|
@@ -77,10 +77,11 @@ import {
|
|
|
77
77
|
schemas,
|
|
78
78
|
validateApiParams,
|
|
79
79
|
validateRequest
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-2W464HAE.js";
|
|
81
81
|
import {
|
|
82
82
|
DISCOVERY_DESCRIPTIONS,
|
|
83
83
|
MEMO_SCENARIOS,
|
|
84
|
+
accountRemoveCommand,
|
|
84
85
|
addContractInfo,
|
|
85
86
|
answerFields,
|
|
86
87
|
apiPlainJson,
|
|
@@ -107,24 +108,23 @@ import {
|
|
|
107
108
|
skillCommand,
|
|
108
109
|
suggest,
|
|
109
110
|
upgradeCommand
|
|
110
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-AHB4OJCI.js";
|
|
111
112
|
import {
|
|
112
113
|
googleError
|
|
113
|
-
} from "./chunk-
|
|
114
|
-
import "./chunk-
|
|
114
|
+
} from "./chunk-GSMYXGFR.js";
|
|
115
|
+
import "./chunk-K6BSB53R.js";
|
|
115
116
|
import "./chunk-SBZB7HMU.js";
|
|
116
|
-
import "./chunk-
|
|
117
|
-
import "./chunk-
|
|
118
|
-
import "./chunk-
|
|
117
|
+
import "./chunk-GW3U6OLD.js";
|
|
118
|
+
import "./chunk-ZRZ4HTCK.js";
|
|
119
|
+
import "./chunk-QXCKJUZY.js";
|
|
119
120
|
import {
|
|
120
|
-
modelGateway,
|
|
121
121
|
storeInfo
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-34BIDKF4.js";
|
|
123
123
|
import {
|
|
124
124
|
RecipientList,
|
|
125
125
|
SendJournal,
|
|
126
126
|
sendGuard
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-UJR272CP.js";
|
|
128
128
|
import {
|
|
129
129
|
LIST_QUERY_GUIDE,
|
|
130
130
|
listQuery,
|
|
@@ -135,13 +135,13 @@ import {
|
|
|
135
135
|
typedQuery,
|
|
136
136
|
unfilteredQuery,
|
|
137
137
|
withQuery
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-P7DEGRZA.js";
|
|
139
139
|
import {
|
|
140
140
|
commandsText,
|
|
141
141
|
inSection
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-IX7NQJLY.js";
|
|
143
143
|
import "./chunk-HTQTIKWP.js";
|
|
144
|
-
import "./chunk-
|
|
144
|
+
import "./chunk-TNV2FXVK.js";
|
|
145
145
|
import {
|
|
146
146
|
FETCH,
|
|
147
147
|
InvalidArgumentError,
|
|
@@ -164,7 +164,6 @@ import {
|
|
|
164
164
|
jsonlRecords,
|
|
165
165
|
listOf,
|
|
166
166
|
metaOf,
|
|
167
|
-
modelTarget,
|
|
168
167
|
outputFor,
|
|
169
168
|
overrideSharedContract,
|
|
170
169
|
refuseCommandName,
|
|
@@ -173,29 +172,25 @@ import {
|
|
|
173
172
|
rootOf,
|
|
174
173
|
settingRows,
|
|
175
174
|
snakeKeys
|
|
176
|
-
} from "./chunk-
|
|
177
|
-
import "./chunk-
|
|
178
|
-
import "./chunk-
|
|
175
|
+
} from "./chunk-LOMW6F2E.js";
|
|
176
|
+
import "./chunk-VT2UFYPJ.js";
|
|
177
|
+
import "./chunk-B7XBIOMR.js";
|
|
179
178
|
import {
|
|
180
179
|
setupPermissionCeiling
|
|
181
|
-
} from "./chunk-
|
|
182
|
-
import "./chunk-
|
|
183
|
-
import
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
} from "./chunk-ZM5J6ZMB.js";
|
|
187
|
-
import "./chunk-2TFXK3R4.js";
|
|
188
|
-
import "./chunk-FRIJUILO.js";
|
|
189
|
-
import "./chunk-534OBX5Y.js";
|
|
190
|
-
import "./chunk-Z5KC7XBR.js";
|
|
180
|
+
} from "./chunk-VPLFD5RJ.js";
|
|
181
|
+
import "./chunk-ZSZJLJIA.js";
|
|
182
|
+
import "./chunk-4CNTID2X.js";
|
|
183
|
+
import "./chunk-F2VDAG32.js";
|
|
184
|
+
import "./chunk-J62DI53V.js";
|
|
191
185
|
import {
|
|
186
|
+
modelGateway,
|
|
192
187
|
newOperationId
|
|
193
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-3J5KAFNA.js";
|
|
194
189
|
import {
|
|
195
190
|
columnName,
|
|
196
191
|
readSpreadsheet
|
|
197
|
-
} from "./chunk-
|
|
198
|
-
import "./chunk-
|
|
192
|
+
} from "./chunk-KE4XPPRQ.js";
|
|
193
|
+
import "./chunk-O2QO5UZC.js";
|
|
199
194
|
import {
|
|
200
195
|
CEILING_KEY,
|
|
201
196
|
LEVELS,
|
|
@@ -203,40 +198,45 @@ import {
|
|
|
203
198
|
inRun,
|
|
204
199
|
layerPermissions,
|
|
205
200
|
levelFor,
|
|
201
|
+
modelTarget,
|
|
206
202
|
parseDuration
|
|
207
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-OH3K2E7X.js";
|
|
208
204
|
import {
|
|
209
205
|
latestVersion,
|
|
210
206
|
runUpdate,
|
|
211
207
|
updateNotice
|
|
212
|
-
} from "./chunk-
|
|
213
|
-
import "./chunk-
|
|
214
|
-
import
|
|
215
|
-
|
|
208
|
+
} from "./chunk-N622LRPM.js";
|
|
209
|
+
import "./chunk-6G53ZFUT.js";
|
|
210
|
+
import {
|
|
211
|
+
readOnlyLockOf,
|
|
212
|
+
readOnlyRefusal
|
|
213
|
+
} from "./chunk-3NULZGQU.js";
|
|
214
|
+
import "./chunk-KIN6PDFE.js";
|
|
215
|
+
import "./chunk-EZ6O3ST3.js";
|
|
216
216
|
import {
|
|
217
217
|
applyDocumentTransfer,
|
|
218
218
|
previewDocumentTransfer
|
|
219
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-KVW4XNKB.js";
|
|
220
220
|
import {
|
|
221
221
|
note
|
|
222
|
-
} from "./chunk-
|
|
223
|
-
import "./chunk-
|
|
222
|
+
} from "./chunk-BZ2ZKILM.js";
|
|
223
|
+
import "./chunk-JRXFW7HE.js";
|
|
224
224
|
import "./chunk-5DPV7X27.js";
|
|
225
|
-
import "./chunk-
|
|
226
|
-
import "./chunk-
|
|
225
|
+
import "./chunk-66AF4FBW.js";
|
|
226
|
+
import "./chunk-BEUAICUD.js";
|
|
227
227
|
import {
|
|
228
228
|
CATALOG_QUERY,
|
|
229
229
|
IMPORTED_DOCUMENT_QUERY,
|
|
230
230
|
openStore
|
|
231
|
-
} from "./chunk-
|
|
232
|
-
import "./chunk-
|
|
231
|
+
} from "./chunk-EWGVDFPT.js";
|
|
232
|
+
import "./chunk-UD55VB2N.js";
|
|
233
233
|
import {
|
|
234
234
|
FACT_STATUSES,
|
|
235
235
|
FACT_TYPES,
|
|
236
236
|
MEMORY_KINDS,
|
|
237
237
|
MEMORY_SCOPES,
|
|
238
238
|
MEMORY_STATUSES
|
|
239
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-CPMRM3GQ.js";
|
|
240
240
|
import {
|
|
241
241
|
dateRange,
|
|
242
242
|
defineQuery,
|
|
@@ -246,40 +246,40 @@ import {
|
|
|
246
246
|
timezoneOf,
|
|
247
247
|
validateQuery,
|
|
248
248
|
zonedMoment
|
|
249
|
-
} from "./chunk-
|
|
250
|
-
import "./chunk-
|
|
251
|
-
import "./chunk-
|
|
252
|
-
import "./chunk-
|
|
249
|
+
} from "./chunk-2FEZ24DK.js";
|
|
250
|
+
import "./chunk-B67BLRAI.js";
|
|
251
|
+
import "./chunk-VIJ6ACYB.js";
|
|
252
|
+
import "./chunk-BEZJA44H.js";
|
|
253
253
|
import {
|
|
254
254
|
storePath
|
|
255
|
-
} from "./chunk-
|
|
256
|
-
import "./chunk-
|
|
257
|
-
import "./chunk-
|
|
258
|
-
import "./chunk-
|
|
259
|
-
import "./chunk-
|
|
255
|
+
} from "./chunk-DD7EFG6B.js";
|
|
256
|
+
import "./chunk-USLZE36C.js";
|
|
257
|
+
import "./chunk-EQEGJVO2.js";
|
|
258
|
+
import "./chunk-6B37XO6B.js";
|
|
259
|
+
import "./chunk-5OFA5EXE.js";
|
|
260
260
|
import "./chunk-D72URWJE.js";
|
|
261
261
|
import {
|
|
262
262
|
installerOf
|
|
263
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-IK6KH3RE.js";
|
|
264
264
|
import {
|
|
265
265
|
DRIVE_APP,
|
|
266
266
|
PACKAGE,
|
|
267
267
|
VERSION
|
|
268
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-M73NNJ3X.js";
|
|
269
269
|
import {
|
|
270
270
|
REASONS
|
|
271
|
-
} from "./chunk-
|
|
272
|
-
import "./chunk-
|
|
273
|
-
import "./chunk-
|
|
271
|
+
} from "./chunk-C7WBNOYW.js";
|
|
272
|
+
import "./chunk-SW6C6WH5.js";
|
|
273
|
+
import "./chunk-36GPBPWM.js";
|
|
274
274
|
import {
|
|
275
275
|
processStreams,
|
|
276
276
|
saveConfigFile,
|
|
277
277
|
writeSecurely
|
|
278
|
-
} from "./chunk-
|
|
279
|
-
import "./chunk-
|
|
278
|
+
} from "./chunk-G4KEKKDE.js";
|
|
279
|
+
import "./chunk-KG2XKEHL.js";
|
|
280
280
|
import "./chunk-Y5E2WNWB.js";
|
|
281
|
-
import "./chunk-
|
|
282
|
-
import "./chunk-
|
|
281
|
+
import "./chunk-IDAK4DDK.js";
|
|
282
|
+
import "./chunk-HW4UPST2.js";
|
|
283
283
|
import {
|
|
284
284
|
array,
|
|
285
285
|
boolean,
|
|
@@ -303,11 +303,11 @@ import {
|
|
|
303
303
|
string,
|
|
304
304
|
unknown,
|
|
305
305
|
writes
|
|
306
|
-
} from "./chunk-
|
|
306
|
+
} from "./chunk-BDYWZ7JE.js";
|
|
307
307
|
import {
|
|
308
308
|
CliError,
|
|
309
309
|
isCliError
|
|
310
|
-
} from "./chunk-
|
|
310
|
+
} from "./chunk-EJ4PNHPP.js";
|
|
311
311
|
import {
|
|
312
312
|
__commonJS,
|
|
313
313
|
__name,
|
|
@@ -1962,7 +1962,208 @@ var require_proper_lockfile = __commonJS({
|
|
|
1962
1962
|
// dist/program.js
|
|
1963
1963
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
1964
1964
|
import { mkdirSync as mkdirSync4, readFileSync as readFileSync6 } from "node:fs";
|
|
1965
|
-
import { join as
|
|
1965
|
+
import { join as join11 } from "node:path";
|
|
1966
|
+
|
|
1967
|
+
// dist/commands/account.js
|
|
1968
|
+
import { join as join2 } from "node:path";
|
|
1969
|
+
|
|
1970
|
+
// dist/profile-lock.js
|
|
1971
|
+
var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
|
|
1972
|
+
|
|
1973
|
+
// dist/state.js
|
|
1974
|
+
import { mkdirSync, readFileSync, unlinkSync } from "node:fs";
|
|
1975
|
+
import { join } from "node:path";
|
|
1976
|
+
var ID = pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/));
|
|
1977
|
+
var User = object({ id: optional(string()), email: optional(string()), name: optional(string()) });
|
|
1978
|
+
var File = object({
|
|
1979
|
+
id: ID,
|
|
1980
|
+
name: string(),
|
|
1981
|
+
mime: string(),
|
|
1982
|
+
parents: array(ID),
|
|
1983
|
+
version: optional(string()),
|
|
1984
|
+
modifiedAt: optional(string()),
|
|
1985
|
+
url: string(),
|
|
1986
|
+
trashed: boolean(),
|
|
1987
|
+
canDownload: boolean(),
|
|
1988
|
+
size: optional(number()),
|
|
1989
|
+
createdAt: optional(string()),
|
|
1990
|
+
description: optional(string()),
|
|
1991
|
+
driveId: optional(string()),
|
|
1992
|
+
owners: optional(array(User)),
|
|
1993
|
+
lastModifiedBy: optional(User),
|
|
1994
|
+
providerMetadata: optional(unknown())
|
|
1995
|
+
});
|
|
1996
|
+
var Skip = object({
|
|
1997
|
+
id: ID,
|
|
1998
|
+
reason: string(),
|
|
1999
|
+
file: optional(File),
|
|
2000
|
+
textLimit: optional(number()),
|
|
2001
|
+
storeRefusedIn: optional(string())
|
|
2002
|
+
});
|
|
2003
|
+
var State = object({
|
|
2004
|
+
version: literal(1),
|
|
2005
|
+
store: optional(string()),
|
|
2006
|
+
linkedThrough: optional(string()),
|
|
2007
|
+
linksPending: optional(boolean()),
|
|
2008
|
+
linksVersion: optional(pipe(number(), integer(), minValue(1))),
|
|
2009
|
+
principal: string(),
|
|
2010
|
+
scope: string(),
|
|
2011
|
+
cursor: optional(string()),
|
|
2012
|
+
folders: record(ID, File),
|
|
2013
|
+
documents: record(ID, object({
|
|
2014
|
+
metadata: File,
|
|
2015
|
+
hash: string(),
|
|
2016
|
+
reference: string(),
|
|
2017
|
+
tabs: number(),
|
|
2018
|
+
notRead: optional(string()),
|
|
2019
|
+
picture: optional(picklist(["saved", "too-large"]))
|
|
2020
|
+
})),
|
|
2021
|
+
skipped: array(Skip),
|
|
2022
|
+
lastSync: optional(string()),
|
|
2023
|
+
pending: optional(object({
|
|
2024
|
+
cursor: string(),
|
|
2025
|
+
scope: string(),
|
|
2026
|
+
folders: record(ID, File),
|
|
2027
|
+
jobs: array(object({ id: ID, kind: picklist(["save", "remove"]), file: optional(File) })),
|
|
2028
|
+
skipped: array(Skip)
|
|
2029
|
+
}))
|
|
2030
|
+
});
|
|
2031
|
+
var Walk = object({
|
|
2032
|
+
scope: string(),
|
|
2033
|
+
cursor: string(),
|
|
2034
|
+
stack: array(object({ id: ID, ancestry: array(ID), folder: optional(File) })),
|
|
2035
|
+
visited: array(ID),
|
|
2036
|
+
folders: record(ID, File),
|
|
2037
|
+
files: array(File),
|
|
2038
|
+
discovered: number()
|
|
2039
|
+
});
|
|
2040
|
+
var profileDir = /* @__PURE__ */ __name((env, name) => join(paths(env).state, "profiles", profileName(name)), "profileDir");
|
|
2041
|
+
var statePath = /* @__PURE__ */ __name((env, name) => join(profileDir(env, name), "state.json"), "statePath");
|
|
2042
|
+
var readState = /* @__PURE__ */ __name((env, name, principal) => {
|
|
2043
|
+
let value;
|
|
2044
|
+
try {
|
|
2045
|
+
value = JSON.parse(readFileSync(statePath(env, name), "utf8"));
|
|
2046
|
+
} catch (error) {
|
|
2047
|
+
if (error.code === "ENOENT")
|
|
2048
|
+
return { version: 1, principal, scope: "", folders: {}, documents: {}, skipped: [] };
|
|
2049
|
+
throw new CliError("configuration_error", "sync state is unreadable; refusing to reset its checkpoint", {
|
|
2050
|
+
reason: "state.invalid"
|
|
2051
|
+
});
|
|
2052
|
+
}
|
|
2053
|
+
const parsed = safeParse(State, value);
|
|
2054
|
+
if (!parsed.success || parsed.output.principal !== principal)
|
|
2055
|
+
throw new CliError("configuration_error", "sync state is invalid or belongs to another Google account", {
|
|
2056
|
+
reason: "state.invalid"
|
|
2057
|
+
});
|
|
2058
|
+
return parsed.output;
|
|
2059
|
+
}, "readState");
|
|
2060
|
+
var saveState = /* @__PURE__ */ __name((env, name, state) => {
|
|
2061
|
+
writeSecurely(statePath(env, name), `${JSON.stringify(state)}
|
|
2062
|
+
`, 384);
|
|
2063
|
+
}, "saveState");
|
|
2064
|
+
var walkPath = /* @__PURE__ */ __name((env, name) => join(profileDir(env, name), "walk.json"), "walkPath");
|
|
2065
|
+
var readWalk = /* @__PURE__ */ __name((env, name, scope) => {
|
|
2066
|
+
try {
|
|
2067
|
+
const parsed = safeParse(Walk, JSON.parse(readFileSync(walkPath(env, name), "utf8")));
|
|
2068
|
+
return parsed.success && parsed.output.scope === scope ? parsed.output : void 0;
|
|
2069
|
+
} catch {
|
|
2070
|
+
return void 0;
|
|
2071
|
+
}
|
|
2072
|
+
}, "readWalk");
|
|
2073
|
+
var saveWalk = /* @__PURE__ */ __name((env, name, walk) => {
|
|
2074
|
+
writeSecurely(walkPath(env, name), `${JSON.stringify(walk)}
|
|
2075
|
+
`, 384);
|
|
2076
|
+
}, "saveWalk");
|
|
2077
|
+
var removeWalk = /* @__PURE__ */ __name((env, name) => {
|
|
2078
|
+
try {
|
|
2079
|
+
unlinkSync(walkPath(env, name));
|
|
2080
|
+
} catch (error) {
|
|
2081
|
+
if (error.code !== "ENOENT")
|
|
2082
|
+
throw error;
|
|
2083
|
+
}
|
|
2084
|
+
}, "removeWalk");
|
|
2085
|
+
var ensureProfileDir = /* @__PURE__ */ __name((env, name) => {
|
|
2086
|
+
mkdirSync(profileDir(env, name), { recursive: true, mode: 448 });
|
|
2087
|
+
}, "ensureProfileDir");
|
|
2088
|
+
var snapshotPath = /* @__PURE__ */ __name((env, name, id) => join(profileDir(env, name), "documents", `${fileId(id)}.json`), "snapshotPath");
|
|
2089
|
+
var saveSnapshot = /* @__PURE__ */ __name((env, name, content) => {
|
|
2090
|
+
const path = snapshotPath(env, name, content.metadata.id);
|
|
2091
|
+
writeSecurely(path, `${JSON.stringify(content)}
|
|
2092
|
+
`, 384);
|
|
2093
|
+
writeSecurely(path.replace(/\.json$/, ".md"), content.markdown, 384);
|
|
2094
|
+
}, "saveSnapshot");
|
|
2095
|
+
var removeSnapshot = /* @__PURE__ */ __name((env, name, id) => {
|
|
2096
|
+
const path = snapshotPath(env, name, id);
|
|
2097
|
+
for (const file of [path, path.replace(/\.json$/, ".md")]) {
|
|
2098
|
+
try {
|
|
2099
|
+
unlinkSync(file);
|
|
2100
|
+
} catch (error) {
|
|
2101
|
+
if (error.code !== "ENOENT")
|
|
2102
|
+
throw error;
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
}, "removeSnapshot");
|
|
2106
|
+
var readSnapshot = /* @__PURE__ */ __name((env, name, id) => {
|
|
2107
|
+
try {
|
|
2108
|
+
return JSON.parse(readFileSync(snapshotPath(env, name, id), "utf8"));
|
|
2109
|
+
} catch {
|
|
2110
|
+
throw new CliError("not_found", "source snapshot is unavailable \u2014 run drive <profile> sync --rescan", {
|
|
2111
|
+
reason: "state.snapshot-missing"
|
|
2112
|
+
});
|
|
2113
|
+
}
|
|
2114
|
+
}, "readSnapshot");
|
|
2115
|
+
|
|
2116
|
+
// dist/profile-lock.js
|
|
2117
|
+
var lockProfile = /* @__PURE__ */ __name(async (env, name) => {
|
|
2118
|
+
ensureProfileDir(env, name);
|
|
2119
|
+
let compromised = false;
|
|
2120
|
+
try {
|
|
2121
|
+
const release = await import_proper_lockfile.default.lock(profileDir(env, name), {
|
|
2122
|
+
stale: 3e4,
|
|
2123
|
+
retries: 0,
|
|
2124
|
+
onCompromised: /* @__PURE__ */ __name(() => {
|
|
2125
|
+
compromised = true;
|
|
2126
|
+
}, "onCompromised")
|
|
2127
|
+
});
|
|
2128
|
+
return {
|
|
2129
|
+
release,
|
|
2130
|
+
assertHeld: /* @__PURE__ */ __name(() => {
|
|
2131
|
+
if (compromised)
|
|
2132
|
+
throw new CliError("provider_unavailable", "profile lock was lost; retry the operation", {
|
|
2133
|
+
reason: "profile.busy"
|
|
2134
|
+
});
|
|
2135
|
+
}, "assertHeld")
|
|
2136
|
+
};
|
|
2137
|
+
} catch {
|
|
2138
|
+
throw new CliError("provider_unavailable", "another sync or knowledge operation holds this profile's lock; retry later", { reason: "profile.busy" });
|
|
2139
|
+
}
|
|
2140
|
+
}, "lockProfile");
|
|
2141
|
+
var profileLocked = /* @__PURE__ */ __name((env, name) => import_proper_lockfile.default.checkSync(profileDir(env, name), { stale: 3e4, realpath: false }), "profileLocked");
|
|
2142
|
+
|
|
2143
|
+
// dist/commands/account.js
|
|
2144
|
+
var removal = {
|
|
2145
|
+
signOut: /* @__PURE__ */ __name(async (profile, { env, keyring, mayRevoke }) => {
|
|
2146
|
+
const storage = readConfig(env).profiles[profile]?.storage ?? "keyring";
|
|
2147
|
+
const { sessionKeeper } = await import("./tokens-H2EJKGA5.js");
|
|
2148
|
+
const { revoked } = await sessionKeeper({
|
|
2149
|
+
env,
|
|
2150
|
+
name: profile,
|
|
2151
|
+
storage,
|
|
2152
|
+
client: application(env, { profile }),
|
|
2153
|
+
...keyring ? { keyring } : {}
|
|
2154
|
+
}).signOut({ revoke: mayRevoke });
|
|
2155
|
+
return { revoked, removed: ["the Google sign-in"] };
|
|
2156
|
+
}, "signOut"),
|
|
2157
|
+
account: /* @__PURE__ */ __name((profile, { env }) => {
|
|
2158
|
+
const principal = readConfig(env).profiles[profile]?.principal;
|
|
2159
|
+
return principal ? { provider: "google-drive", account: principal } : void 0;
|
|
2160
|
+
}, "account"),
|
|
2161
|
+
dataFiles: /* @__PURE__ */ __name((profile, { env }) => [profileDir(env, profile), join2(paths(env).cache, "exports", profile)], "dataFiles"),
|
|
2162
|
+
busy: /* @__PURE__ */ __name((profile, { env }) => profileLocked(env, profile) ? "a sync or knowledge operation" : void 0, "busy")
|
|
2163
|
+
};
|
|
2164
|
+
var installAccountCommands = /* @__PURE__ */ __name((program, _context) => {
|
|
2165
|
+
annotate(program.command("account"), { effects: LOCAL_READ }).description("remove this profile from this computer").addCommand(accountRemoveCommand(DRIVE_APP, removal, { resolveSettings: configuration.resolveSettings }));
|
|
2166
|
+
}, "installAccountCommands");
|
|
1966
2167
|
|
|
1967
2168
|
// dist/catalog.js
|
|
1968
2169
|
var catalogInput = /* @__PURE__ */ __name((file) => ({
|
|
@@ -2207,178 +2408,6 @@ var snakeKeys2 = /* @__PURE__ */ __name((value, record2 = false) => {
|
|
|
2207
2408
|
}, "snakeKeys");
|
|
2208
2409
|
var allOf = /* @__PURE__ */ __name((items) => listOf("", { items, limit: Math.max(1, items.length), has_more: false }), "allOf");
|
|
2209
2410
|
|
|
2210
|
-
// dist/profile-lock.js
|
|
2211
|
-
var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
|
|
2212
|
-
|
|
2213
|
-
// dist/state.js
|
|
2214
|
-
import { mkdirSync, readFileSync, unlinkSync } from "node:fs";
|
|
2215
|
-
import { join } from "node:path";
|
|
2216
|
-
var ID = pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/));
|
|
2217
|
-
var User = object({ id: optional(string()), email: optional(string()), name: optional(string()) });
|
|
2218
|
-
var File = object({
|
|
2219
|
-
id: ID,
|
|
2220
|
-
name: string(),
|
|
2221
|
-
mime: string(),
|
|
2222
|
-
parents: array(ID),
|
|
2223
|
-
version: optional(string()),
|
|
2224
|
-
modifiedAt: optional(string()),
|
|
2225
|
-
url: string(),
|
|
2226
|
-
trashed: boolean(),
|
|
2227
|
-
canDownload: boolean(),
|
|
2228
|
-
size: optional(number()),
|
|
2229
|
-
createdAt: optional(string()),
|
|
2230
|
-
description: optional(string()),
|
|
2231
|
-
driveId: optional(string()),
|
|
2232
|
-
owners: optional(array(User)),
|
|
2233
|
-
lastModifiedBy: optional(User),
|
|
2234
|
-
providerMetadata: optional(unknown())
|
|
2235
|
-
});
|
|
2236
|
-
var Skip = object({
|
|
2237
|
-
id: ID,
|
|
2238
|
-
reason: string(),
|
|
2239
|
-
file: optional(File),
|
|
2240
|
-
textLimit: optional(number()),
|
|
2241
|
-
storeRefusedIn: optional(string())
|
|
2242
|
-
});
|
|
2243
|
-
var State = object({
|
|
2244
|
-
version: literal(1),
|
|
2245
|
-
store: optional(string()),
|
|
2246
|
-
linkedThrough: optional(string()),
|
|
2247
|
-
linksPending: optional(boolean()),
|
|
2248
|
-
linksVersion: optional(pipe(number(), integer(), minValue(1))),
|
|
2249
|
-
principal: string(),
|
|
2250
|
-
scope: string(),
|
|
2251
|
-
cursor: optional(string()),
|
|
2252
|
-
folders: record(ID, File),
|
|
2253
|
-
documents: record(ID, object({
|
|
2254
|
-
metadata: File,
|
|
2255
|
-
hash: string(),
|
|
2256
|
-
reference: string(),
|
|
2257
|
-
tabs: number(),
|
|
2258
|
-
notRead: optional(string()),
|
|
2259
|
-
picture: optional(picklist(["saved", "too-large"]))
|
|
2260
|
-
})),
|
|
2261
|
-
skipped: array(Skip),
|
|
2262
|
-
lastSync: optional(string()),
|
|
2263
|
-
pending: optional(object({
|
|
2264
|
-
cursor: string(),
|
|
2265
|
-
scope: string(),
|
|
2266
|
-
folders: record(ID, File),
|
|
2267
|
-
jobs: array(object({ id: ID, kind: picklist(["save", "remove"]), file: optional(File) })),
|
|
2268
|
-
skipped: array(Skip)
|
|
2269
|
-
}))
|
|
2270
|
-
});
|
|
2271
|
-
var Walk = object({
|
|
2272
|
-
scope: string(),
|
|
2273
|
-
cursor: string(),
|
|
2274
|
-
stack: array(object({ id: ID, ancestry: array(ID), folder: optional(File) })),
|
|
2275
|
-
visited: array(ID),
|
|
2276
|
-
folders: record(ID, File),
|
|
2277
|
-
files: array(File),
|
|
2278
|
-
discovered: number()
|
|
2279
|
-
});
|
|
2280
|
-
var profileDir = /* @__PURE__ */ __name((env, name) => join(paths(env).state, "profiles", profileName(name)), "profileDir");
|
|
2281
|
-
var statePath = /* @__PURE__ */ __name((env, name) => join(profileDir(env, name), "state.json"), "statePath");
|
|
2282
|
-
var readState = /* @__PURE__ */ __name((env, name, principal) => {
|
|
2283
|
-
let value;
|
|
2284
|
-
try {
|
|
2285
|
-
value = JSON.parse(readFileSync(statePath(env, name), "utf8"));
|
|
2286
|
-
} catch (error) {
|
|
2287
|
-
if (error.code === "ENOENT")
|
|
2288
|
-
return { version: 1, principal, scope: "", folders: {}, documents: {}, skipped: [] };
|
|
2289
|
-
throw new CliError("configuration_error", "sync state is unreadable; refusing to reset its checkpoint", {
|
|
2290
|
-
reason: "state.invalid"
|
|
2291
|
-
});
|
|
2292
|
-
}
|
|
2293
|
-
const parsed = safeParse(State, value);
|
|
2294
|
-
if (!parsed.success || parsed.output.principal !== principal)
|
|
2295
|
-
throw new CliError("configuration_error", "sync state is invalid or belongs to another Google account", {
|
|
2296
|
-
reason: "state.invalid"
|
|
2297
|
-
});
|
|
2298
|
-
return parsed.output;
|
|
2299
|
-
}, "readState");
|
|
2300
|
-
var saveState = /* @__PURE__ */ __name((env, name, state) => {
|
|
2301
|
-
writeSecurely(statePath(env, name), `${JSON.stringify(state)}
|
|
2302
|
-
`, 384);
|
|
2303
|
-
}, "saveState");
|
|
2304
|
-
var walkPath = /* @__PURE__ */ __name((env, name) => join(profileDir(env, name), "walk.json"), "walkPath");
|
|
2305
|
-
var readWalk = /* @__PURE__ */ __name((env, name, scope) => {
|
|
2306
|
-
try {
|
|
2307
|
-
const parsed = safeParse(Walk, JSON.parse(readFileSync(walkPath(env, name), "utf8")));
|
|
2308
|
-
return parsed.success && parsed.output.scope === scope ? parsed.output : void 0;
|
|
2309
|
-
} catch {
|
|
2310
|
-
return void 0;
|
|
2311
|
-
}
|
|
2312
|
-
}, "readWalk");
|
|
2313
|
-
var saveWalk = /* @__PURE__ */ __name((env, name, walk) => {
|
|
2314
|
-
writeSecurely(walkPath(env, name), `${JSON.stringify(walk)}
|
|
2315
|
-
`, 384);
|
|
2316
|
-
}, "saveWalk");
|
|
2317
|
-
var removeWalk = /* @__PURE__ */ __name((env, name) => {
|
|
2318
|
-
try {
|
|
2319
|
-
unlinkSync(walkPath(env, name));
|
|
2320
|
-
} catch (error) {
|
|
2321
|
-
if (error.code !== "ENOENT")
|
|
2322
|
-
throw error;
|
|
2323
|
-
}
|
|
2324
|
-
}, "removeWalk");
|
|
2325
|
-
var ensureProfileDir = /* @__PURE__ */ __name((env, name) => {
|
|
2326
|
-
mkdirSync(profileDir(env, name), { recursive: true, mode: 448 });
|
|
2327
|
-
}, "ensureProfileDir");
|
|
2328
|
-
var snapshotPath = /* @__PURE__ */ __name((env, name, id) => join(profileDir(env, name), "documents", `${fileId(id)}.json`), "snapshotPath");
|
|
2329
|
-
var saveSnapshot = /* @__PURE__ */ __name((env, name, content) => {
|
|
2330
|
-
const path = snapshotPath(env, name, content.metadata.id);
|
|
2331
|
-
writeSecurely(path, `${JSON.stringify(content)}
|
|
2332
|
-
`, 384);
|
|
2333
|
-
writeSecurely(path.replace(/\.json$/, ".md"), content.markdown, 384);
|
|
2334
|
-
}, "saveSnapshot");
|
|
2335
|
-
var removeSnapshot = /* @__PURE__ */ __name((env, name, id) => {
|
|
2336
|
-
const path = snapshotPath(env, name, id);
|
|
2337
|
-
for (const file of [path, path.replace(/\.json$/, ".md")]) {
|
|
2338
|
-
try {
|
|
2339
|
-
unlinkSync(file);
|
|
2340
|
-
} catch (error) {
|
|
2341
|
-
if (error.code !== "ENOENT")
|
|
2342
|
-
throw error;
|
|
2343
|
-
}
|
|
2344
|
-
}
|
|
2345
|
-
}, "removeSnapshot");
|
|
2346
|
-
var readSnapshot = /* @__PURE__ */ __name((env, name, id) => {
|
|
2347
|
-
try {
|
|
2348
|
-
return JSON.parse(readFileSync(snapshotPath(env, name, id), "utf8"));
|
|
2349
|
-
} catch {
|
|
2350
|
-
throw new CliError("not_found", "source snapshot is unavailable \u2014 run drive <profile> sync --rescan", {
|
|
2351
|
-
reason: "state.snapshot-missing"
|
|
2352
|
-
});
|
|
2353
|
-
}
|
|
2354
|
-
}, "readSnapshot");
|
|
2355
|
-
|
|
2356
|
-
// dist/profile-lock.js
|
|
2357
|
-
var lockProfile = /* @__PURE__ */ __name(async (env, name) => {
|
|
2358
|
-
ensureProfileDir(env, name);
|
|
2359
|
-
let compromised = false;
|
|
2360
|
-
try {
|
|
2361
|
-
const release = await import_proper_lockfile.default.lock(profileDir(env, name), {
|
|
2362
|
-
stale: 3e4,
|
|
2363
|
-
retries: 0,
|
|
2364
|
-
onCompromised: /* @__PURE__ */ __name(() => {
|
|
2365
|
-
compromised = true;
|
|
2366
|
-
}, "onCompromised")
|
|
2367
|
-
});
|
|
2368
|
-
return {
|
|
2369
|
-
release,
|
|
2370
|
-
assertHeld: /* @__PURE__ */ __name(() => {
|
|
2371
|
-
if (compromised)
|
|
2372
|
-
throw new CliError("provider_unavailable", "profile lock was lost; retry the operation", {
|
|
2373
|
-
reason: "profile.busy"
|
|
2374
|
-
});
|
|
2375
|
-
}, "assertHeld")
|
|
2376
|
-
};
|
|
2377
|
-
} catch {
|
|
2378
|
-
throw new CliError("provider_unavailable", "another sync or knowledge operation holds this profile's lock; retry later", { reason: "profile.busy" });
|
|
2379
|
-
}
|
|
2380
|
-
}, "lockProfile");
|
|
2381
|
-
|
|
2382
2411
|
// dist/commands/catalog.js
|
|
2383
2412
|
var local = /* @__PURE__ */ __name((command, mutates = false) => annotate(command, { effects: mutates ? LOCAL_WRITE : LOCAL_READ }), "local");
|
|
2384
2413
|
var installCatalogCommands = /* @__PURE__ */ __name((program, helpers) => {
|
|
@@ -2467,10 +2496,10 @@ var installCatalogCommands = /* @__PURE__ */ __name((program, helpers) => {
|
|
|
2467
2496
|
}, "installCatalogCommands");
|
|
2468
2497
|
|
|
2469
2498
|
// dist/commands/config.js
|
|
2470
|
-
import { join as
|
|
2499
|
+
import { join as join4 } from "node:path";
|
|
2471
2500
|
|
|
2472
2501
|
// dist/policy.js
|
|
2473
|
-
import { join as
|
|
2502
|
+
import { join as join3 } from "node:path";
|
|
2474
2503
|
var ORDER = { deny: 0, readonly: 1, ask: 2, allow: 3 };
|
|
2475
2504
|
var overridesOf = /* @__PURE__ */ __name((entries = []) => {
|
|
2476
2505
|
const levels = {};
|
|
@@ -2559,11 +2588,11 @@ var guardedGoogleWrite = /* @__PURE__ */ __name(async (env, profile, key, act, f
|
|
|
2559
2588
|
permissionDefaults: DEFAULT_LEVELS,
|
|
2560
2589
|
ask: /* @__PURE__ */ __name(async (permission) => checkPolicy(env, profile, permission, true, flags, ask), "ask"),
|
|
2561
2590
|
sendsPerHour: Number.MAX_SAFE_INTEGER,
|
|
2562
|
-
journal: new SendJournal(
|
|
2591
|
+
journal: new SendJournal(join3(paths(env).state, "sends", `${profile}.jsonl`), {
|
|
2563
2592
|
service: "drive",
|
|
2564
2593
|
version: VERSION
|
|
2565
2594
|
}),
|
|
2566
|
-
recipients: new RecipientList(
|
|
2595
|
+
recipients: new RecipientList(join3(paths(env).state, "recipients", `${profile}.json`), "drive"),
|
|
2567
2596
|
warn: /* @__PURE__ */ __name(() => {
|
|
2568
2597
|
}, "warn")
|
|
2569
2598
|
});
|
|
@@ -2731,7 +2760,7 @@ var installModelCommands = /* @__PURE__ */ __name((program, { env, output, strea
|
|
|
2731
2760
|
throw new CliError("permission_error", "downloading a model needs the network; --offline was requested", {
|
|
2732
2761
|
reason: "offline.refused"
|
|
2733
2762
|
});
|
|
2734
|
-
const { downloadImageModel, downloadTextModel } = await import("./services-
|
|
2763
|
+
const { downloadImageModel, downloadTextModel } = await import("./services-F5A6XQCV.js");
|
|
2735
2764
|
const progress = /* @__PURE__ */ __name((line) => {
|
|
2736
2765
|
if (!program.opts().quiet)
|
|
2737
2766
|
streams.diagnostic(line);
|
|
@@ -2745,7 +2774,7 @@ var installModelCommands = /* @__PURE__ */ __name((program, { env, output, strea
|
|
|
2745
2774
|
licence: model.licence,
|
|
2746
2775
|
size_bytes: model.files.reduce((sum, file) => sum + file.bytes, 0),
|
|
2747
2776
|
downloaded: true,
|
|
2748
|
-
path:
|
|
2777
|
+
path: join4(directory, model.id)
|
|
2749
2778
|
}));
|
|
2750
2779
|
}, "download");
|
|
2751
2780
|
const sharedModels = modelCatalogueCommand(DRIVE_APP, {
|
|
@@ -4091,7 +4120,7 @@ var installKnowledgeCommands = /* @__PURE__ */ __name((...args) => {
|
|
|
4091
4120
|
|
|
4092
4121
|
// dist/commands/mirrors.js
|
|
4093
4122
|
import { statSync } from "node:fs";
|
|
4094
|
-
import { join as
|
|
4123
|
+
import { join as join5, resolve } from "node:path";
|
|
4095
4124
|
|
|
4096
4125
|
// dist/mirror-docs.js
|
|
4097
4126
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
@@ -4861,7 +4890,7 @@ var installMirrorCommands = /* @__PURE__ */ __name((program, context, { call })
|
|
|
4861
4890
|
});
|
|
4862
4891
|
return mirror;
|
|
4863
4892
|
}, "find");
|
|
4864
|
-
const stateOf = /* @__PURE__ */ __name((name, principal) => (mirror) => fileMirrorState(
|
|
4893
|
+
const stateOf = /* @__PURE__ */ __name((name, principal) => (mirror) => fileMirrorState(join5(profileDir(env, name), "mirrors"), mirror, principal, ["doc", "sheet"]), "stateOf");
|
|
4865
4894
|
const syncing = /* @__PURE__ */ __name((name, principal, google) => ({
|
|
4866
4895
|
target: googleTarget(call, () => google.identity()),
|
|
4867
4896
|
stateOf: stateOf(name, principal),
|
|
@@ -5027,7 +5056,7 @@ var describeCycle = /* @__PURE__ */ __name((cycle) => {
|
|
|
5027
5056
|
// dist/download.js
|
|
5028
5057
|
import { randomUUID } from "node:crypto";
|
|
5029
5058
|
import { closeSync, createWriteStream, linkSync, lstatSync, mkdirSync as mkdirSync2, openSync, renameSync, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
5030
|
-
import { dirname, join as
|
|
5059
|
+
import { dirname, join as join6 } from "node:path";
|
|
5031
5060
|
import { pipeline } from "node:stream/promises";
|
|
5032
5061
|
var EXPORT_FORMATS = {
|
|
5033
5062
|
pdf: "application/pdf",
|
|
@@ -5052,7 +5081,7 @@ var saveDownload = /* @__PURE__ */ __name(async (path, overwrite, read, createDi
|
|
|
5052
5081
|
const source = await read();
|
|
5053
5082
|
if (createDirectory)
|
|
5054
5083
|
mkdirSync2(dirname(path), { recursive: true, mode: 448 });
|
|
5055
|
-
const temp =
|
|
5084
|
+
const temp = join6(dirname(path), `.${randomUUID()}.tmp`);
|
|
5056
5085
|
let created = false;
|
|
5057
5086
|
let size2 = 0;
|
|
5058
5087
|
try {
|
|
@@ -22723,7 +22752,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22723
22752
|
const app = application(env, { file: args.clientFile, clientId: args.clientId, profile: selected() });
|
|
22724
22753
|
if (!app.clientSecret)
|
|
22725
22754
|
streams.diagnostic("your Google app has no secret here, and Google refuses a Desktop app without one: set DRIVE_GOOGLE_CLIENT_SECRET\n");
|
|
22726
|
-
const { login } = await import("./login-
|
|
22755
|
+
const { login } = await import("./login-COFZ2IWP.js");
|
|
22727
22756
|
output(itemOf(await login({
|
|
22728
22757
|
env,
|
|
22729
22758
|
profile: selected(),
|
|
@@ -22754,7 +22783,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22754
22783
|
const name = selected();
|
|
22755
22784
|
const config = readConfig(env);
|
|
22756
22785
|
const profile = activeProfile(env, name);
|
|
22757
|
-
const { credentials } = await import("./tokens-
|
|
22786
|
+
const { credentials } = await import("./tokens-H2EJKGA5.js");
|
|
22758
22787
|
const store = credentials(env, profile.storage, options.keyring);
|
|
22759
22788
|
store.remove(name);
|
|
22760
22789
|
writeConfig(env, config);
|
|
@@ -22801,7 +22830,7 @@ var selection = /* @__PURE__ */ __name((env, name, source) => {
|
|
|
22801
22830
|
return { profile, state, options: { source, destination, collection: `google-drive:${profile.principal}`, env } };
|
|
22802
22831
|
}, "selection");
|
|
22803
22832
|
var checkStoreImport = /* @__PURE__ */ __name(async (env, name, source, bindings) => {
|
|
22804
|
-
const { ensureSqlite } = await import("./sqlite-runtime-
|
|
22833
|
+
const { ensureSqlite } = await import("./sqlite-runtime-7YF6REKS.js");
|
|
22805
22834
|
await ensureSqlite();
|
|
22806
22835
|
const { state, options } = selection(env, name, source);
|
|
22807
22836
|
const preview = await previewDocumentTransfer({ ...options, bindings });
|
|
@@ -22862,7 +22891,7 @@ var installStoreCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22862
22891
|
|
|
22863
22892
|
// dist/commands/sync.js
|
|
22864
22893
|
import { existsSync } from "node:fs";
|
|
22865
|
-
import { join as
|
|
22894
|
+
import { join as join7, resolve as resolve4 } from "node:path";
|
|
22866
22895
|
|
|
22867
22896
|
// dist/sync.js
|
|
22868
22897
|
import { resolve as resolve3 } from "node:path";
|
|
@@ -22954,7 +22983,7 @@ var installSyncCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22954
22983
|
const name = selected();
|
|
22955
22984
|
const profile = activeProfile(env, name);
|
|
22956
22985
|
const state = readState(env, name, profile.principal);
|
|
22957
|
-
const legacyStore =
|
|
22986
|
+
const legacyStore = join7(paths(env).state, "drive.db");
|
|
22958
22987
|
output(itemOf({
|
|
22959
22988
|
profile: name,
|
|
22960
22989
|
store: {
|
|
@@ -22973,9 +23002,9 @@ var installSyncCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22973
23002
|
}, "installSyncCommands");
|
|
22974
23003
|
|
|
22975
23004
|
// dist/commands/upgrade.js
|
|
22976
|
-
import { join as
|
|
23005
|
+
import { join as join8 } from "node:path";
|
|
22977
23006
|
|
|
22978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/update/index.js
|
|
22979
23008
|
import { realpathSync } from "node:fs";
|
|
22980
23009
|
import { fileURLToPath } from "node:url";
|
|
22981
23010
|
var QUIET_WORDS = [
|
|
@@ -23045,7 +23074,7 @@ var update = appUpdate({
|
|
|
23045
23074
|
command: "drive",
|
|
23046
23075
|
version: DRIVE_APP.version,
|
|
23047
23076
|
entry: new URL("../commands/upgrade.js", import.meta.url).href,
|
|
23048
|
-
statePath: /* @__PURE__ */ __name((env) =>
|
|
23077
|
+
statePath: /* @__PURE__ */ __name((env) => join8(paths(env).state, "update-check.json"), "statePath"),
|
|
23049
23078
|
enabled: /* @__PURE__ */ __name(() => false, "enabled"),
|
|
23050
23079
|
offVariables: ["DRIVE_NO_UPDATE_CHECK"]
|
|
23051
23080
|
});
|
|
@@ -23301,7 +23330,7 @@ var saveContributors = /* @__PURE__ */ __name(async (store, principal, metadata,
|
|
|
23301
23330
|
|
|
23302
23331
|
// dist/store-transition.js
|
|
23303
23332
|
import { existsSync as existsSync2 } from "node:fs";
|
|
23304
|
-
import { join as
|
|
23333
|
+
import { join as join9, resolve as resolve5 } from "node:path";
|
|
23305
23334
|
var prepareStore = /* @__PURE__ */ __name(async (index, env, name, rescan = false) => {
|
|
23306
23335
|
const profile = activeProfile(env, name);
|
|
23307
23336
|
const target = resolve5(storePath(env));
|
|
@@ -23313,7 +23342,7 @@ var prepareStore = /* @__PURE__ */ __name(async (index, env, name, rescan = fals
|
|
|
23313
23342
|
const lock = await lockProfile(env, name);
|
|
23314
23343
|
try {
|
|
23315
23344
|
const state = readState(env, name, profile.principal);
|
|
23316
|
-
const previous = resolve5(state.store ??
|
|
23345
|
+
const previous = resolve5(state.store ?? join9(paths(env).state, "drive.db"));
|
|
23317
23346
|
if (previous !== target && existsSync2(previous)) {
|
|
23318
23347
|
const old = await openStore({ path: previous, env, command: "drive", version: VERSION });
|
|
23319
23348
|
try {
|
|
@@ -23394,9 +23423,9 @@ var DRIVE_PROVIDER = {
|
|
|
23394
23423
|
var openIndex = /* @__PURE__ */ __name(async (env, name, rescan = false) => {
|
|
23395
23424
|
if (name)
|
|
23396
23425
|
activeProfile(env, name);
|
|
23397
|
-
const { ensureSqlite } = await import("./sqlite-runtime-
|
|
23426
|
+
const { ensureSqlite } = await import("./sqlite-runtime-7YF6REKS.js");
|
|
23398
23427
|
await ensureSqlite();
|
|
23399
|
-
const { openStore: openStore2, storePath: storePath2 } = await import("./store-
|
|
23428
|
+
const { openStore: openStore2, storePath: storePath2 } = await import("./store-F5FJGWMR.js");
|
|
23400
23429
|
if (env.DRIVE_STORE)
|
|
23401
23430
|
throw new CliError("configuration_error", "DRIVE_STORE has been retired; use MESSAGING_STORE to select the shared database", { reason: "store.override-retired" });
|
|
23402
23431
|
const store = await openStore2({ path: storePath2(env), env, command: "drive", version: VERSION });
|
|
@@ -23441,7 +23470,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
|
|
|
23441
23470
|
linkMessages: /* @__PURE__ */ __name((documents, since) => store.notes.linkMessages({ documents, ...since ? { since } : {} }), "linkMessages"),
|
|
23442
23471
|
knowledge: documentKnowledge2(store, async (principal) => (await folder(principal, false))?.id),
|
|
23443
23472
|
openPictures: /* @__PURE__ */ __name(async () => {
|
|
23444
|
-
const { openPictureEmbedderFor, savePicture } = await import("./services-
|
|
23473
|
+
const { openPictureEmbedderFor, savePicture } = await import("./services-F5A6XQCV.js");
|
|
23445
23474
|
const embedder = pictureEmbedder ?? await openPictureEmbedderFor({ env, command: "drive" });
|
|
23446
23475
|
return {
|
|
23447
23476
|
save: /* @__PURE__ */ __name((reference, bytes) => savePicture(store, { ref: reference }, bytes, { embedder }), "save"),
|
|
@@ -23460,7 +23489,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
|
|
|
23460
23489
|
has_more: false,
|
|
23461
23490
|
meaning_skipped: "this Google account has no imported sources"
|
|
23462
23491
|
};
|
|
23463
|
-
const { searchNotes } = await import("./services-
|
|
23492
|
+
const { searchNotes } = await import("./services-F5A6XQCV.js");
|
|
23464
23493
|
const result = await searchNotes(store, query, {
|
|
23465
23494
|
...options,
|
|
23466
23495
|
folderIds: selected ? [selected.id] : [],
|
|
@@ -23491,7 +23520,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
|
|
|
23491
23520
|
};
|
|
23492
23521
|
}, "search"),
|
|
23493
23522
|
embed: /* @__PURE__ */ __name(async (max) => {
|
|
23494
|
-
const { embedNotes } = await import("./services-
|
|
23523
|
+
const { embedNotes } = await import("./services-F5A6XQCV.js");
|
|
23495
23524
|
return embedNotes(store, { maxChunks: max, env, command: "drive" });
|
|
23496
23525
|
}, "embed"),
|
|
23497
23526
|
close: /* @__PURE__ */ __name(() => store.close(), "close")
|
|
@@ -23502,7 +23531,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
|
|
|
23502
23531
|
import { createHash as createHash2 } from "node:crypto";
|
|
23503
23532
|
import { createReadStream, mkdirSync as mkdirSync3, readFileSync as readFileSync5, rmSync as rmSync2, statSync as statSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
23504
23533
|
import { open } from "node:fs/promises";
|
|
23505
|
-
import { basename, join as
|
|
23534
|
+
import { basename, join as join10, resolve as resolve6 } from "node:path";
|
|
23506
23535
|
var START = "https://www.googleapis.com/upload/drive/v3/files";
|
|
23507
23536
|
var FIELDS = "id,name,size,md5Checksum,mimeType,parents";
|
|
23508
23537
|
var QUANTUM = 256 * 1024;
|
|
@@ -23533,7 +23562,7 @@ var uploadFile = /* @__PURE__ */ __name(async (input) => {
|
|
|
23533
23562
|
throw new CliError("validation_error", "a chunk must be a multiple of 256 KiB");
|
|
23534
23563
|
const sleep = input.sleep ?? ((ms) => new Promise((wake) => setTimeout(wake, ms)));
|
|
23535
23564
|
const key = createHash2("sha256").update(JSON.stringify([path, size2, stat.mtimeMs, name, input.parent ?? ""])).digest("hex").slice(0, 24);
|
|
23536
|
-
const checkpointPath =
|
|
23565
|
+
const checkpointPath = join10(input.stateDir, "uploads", `${key}.json`);
|
|
23537
23566
|
const readCheckpoint = /* @__PURE__ */ __name(() => {
|
|
23538
23567
|
try {
|
|
23539
23568
|
return JSON.parse(readFileSync5(checkpointPath, "utf8"));
|
|
@@ -23542,7 +23571,7 @@ var uploadFile = /* @__PURE__ */ __name(async (input) => {
|
|
|
23542
23571
|
}
|
|
23543
23572
|
}, "readCheckpoint");
|
|
23544
23573
|
const saveCheckpoint = /* @__PURE__ */ __name((sessionUri) => {
|
|
23545
|
-
mkdirSync3(
|
|
23574
|
+
mkdirSync3(join10(input.stateDir, "uploads"), { recursive: true, mode: 448 });
|
|
23546
23575
|
const checkpoint = {
|
|
23547
23576
|
session_uri: sessionUri,
|
|
23548
23577
|
path,
|
|
@@ -23778,7 +23807,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23778
23807
|
}, "output");
|
|
23779
23808
|
const signal = /* @__PURE__ */ __name(() => environment().signal, "signal");
|
|
23780
23809
|
const signedIn = /* @__PURE__ */ __name(async (name, scope2) => {
|
|
23781
|
-
const { authorizedClient, checkAuthorization } = await import("./tokens-
|
|
23810
|
+
const { authorizedClient, checkAuthorization } = await import("./tokens-H2EJKGA5.js");
|
|
23782
23811
|
const client = authorizedClient(env, name, environment().keyring, signal());
|
|
23783
23812
|
await checkAuthorization(client, scope2);
|
|
23784
23813
|
return client;
|
|
@@ -23788,7 +23817,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23788
23817
|
const fake = environment().source;
|
|
23789
23818
|
if (fake)
|
|
23790
23819
|
return fake(name);
|
|
23791
|
-
const [{ googleSource }, client] = await Promise.all([import("./google-
|
|
23820
|
+
const [{ googleSource }, client] = await Promise.all([import("./google-DVADVICN.js"), signedIn(name)]);
|
|
23792
23821
|
return googleSource(client);
|
|
23793
23822
|
}, "source");
|
|
23794
23823
|
const withIndex = /* @__PURE__ */ __name(async (fn) => {
|
|
@@ -23854,6 +23883,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23854
23883
|
runsOf.set(program, runs);
|
|
23855
23884
|
const imported = importedDocument(context);
|
|
23856
23885
|
installSessionCommands(program, context);
|
|
23886
|
+
installAccountCommands(program, context);
|
|
23857
23887
|
installFolderCommands(program, context, (method, params) => remote.call(method, params));
|
|
23858
23888
|
installSyncCommands(program, context);
|
|
23859
23889
|
installStoreCommands(program, context);
|
|
@@ -23930,7 +23960,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23930
23960
|
if (fake)
|
|
23931
23961
|
return await fake.call(method, params, body);
|
|
23932
23962
|
const [{ googleApi }, client] = await Promise.all([
|
|
23933
|
-
import("./google-api-
|
|
23963
|
+
import("./google-api-QMFGCXBM.js"),
|
|
23934
23964
|
signedIn(selected(), descriptor.scope)
|
|
23935
23965
|
]);
|
|
23936
23966
|
return await googleApi(client).call(method, params, body);
|
|
@@ -23956,7 +23986,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23956
23986
|
if (fake)
|
|
23957
23987
|
return fake(id, mime);
|
|
23958
23988
|
const [{ googleDownload }, client] = await Promise.all([
|
|
23959
|
-
import("./google-api-
|
|
23989
|
+
import("./google-api-QMFGCXBM.js"),
|
|
23960
23990
|
signedIn(selected(), apiMethod(method).scope)
|
|
23961
23991
|
]);
|
|
23962
23992
|
return googleDownload(client)(id, mime);
|
|
@@ -23974,7 +24004,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23974
24004
|
let request = environment().uploadRequest;
|
|
23975
24005
|
if (!request) {
|
|
23976
24006
|
const [{ googleUploadRequest }, client] = await Promise.all([
|
|
23977
|
-
import("./google-api-
|
|
24007
|
+
import("./google-api-QMFGCXBM.js"),
|
|
23978
24008
|
signedIn(selected(), apiMethod(method).scope)
|
|
23979
24009
|
]);
|
|
23980
24010
|
request = googleUploadRequest(client);
|
|
@@ -24079,9 +24109,9 @@ Availability: unavailable \u2014 ${availability.reason}
|
|
|
24079
24109
|
const name = action.opts().output;
|
|
24080
24110
|
if (typeof name !== "string" || !/^[A-Za-z0-9][A-Za-z0-9._-]{0,199}$/.test(name))
|
|
24081
24111
|
throw new CliError("validation_error", "MCP exports take a filename inside the profile export folder");
|
|
24082
|
-
const directory =
|
|
24112
|
+
const directory = join11(paths(env).cache, "exports", selected());
|
|
24083
24113
|
mkdirSync4(directory, { recursive: true, mode: 448 });
|
|
24084
|
-
action.setOptionValue("output",
|
|
24114
|
+
action.setOptionValue("output", join11(directory, name));
|
|
24085
24115
|
}
|
|
24086
24116
|
if (agent() && changesAuthority(action)) {
|
|
24087
24117
|
const authority = policySettings(env, selected(), policyFlags());
|
|
@@ -24178,7 +24208,7 @@ var mcpCommand = /* @__PURE__ */ __name(() => {
|
|
|
24178
24208
|
const environment = environmentOf(action);
|
|
24179
24209
|
if (environment.api)
|
|
24180
24210
|
return;
|
|
24181
|
-
const { grantAvailability } = await import("./grants-
|
|
24211
|
+
const { grantAvailability } = await import("./grants-WKB2E4TA.js");
|
|
24182
24212
|
availability = grantAvailability(rootOf(root), environment.env ?? process.env, environment.keyring);
|
|
24183
24213
|
});
|
|
24184
24214
|
}, "mcpCommand");
|