@wirecat/drive-cli 0.68.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contracts/wirecat.json +14 -13
- package/dist/age.d.ts +0 -36
- package/dist/age.d.ts.map +1 -1
- package/dist/age.js +0 -22
- package/dist/age.js.map +1 -1
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-BU6XUFUP.js → all-profiles-FW3GK3QO.js} +24 -34
- package/dist/bundle/{anthropic-ZP5B7S2Z.js → anthropic-QVKJT3II.js} +8 -8
- package/dist/bundle/{app-server-EB4DH6T7.js → app-server-QU73RD5R.js} +68 -76
- package/dist/bundle/{bun-PWMM6L45.js → bun-5XCD5CBB.js} +2 -2
- package/dist/bundle/{bun-sqlite-6VPR2SVC.js → bun-sqlite-TIGSVNSV.js} +9 -9
- package/dist/bundle/{chunk-7BXVI7XF.js → chunk-2SBC4DVV.js} +4 -4
- package/dist/bundle/{chunk-UFPRP7MG.js → chunk-3AHBZP33.js} +10 -15
- package/dist/bundle/{chunk-QRSPFCRY.js → chunk-3CHW7JGR.js} +17 -17
- package/dist/bundle/chunk-3TCMANIM.js +387 -0
- package/dist/bundle/{chunk-EOC7RHJ2.js → chunk-3UWRAIWA.js} +5 -7
- package/dist/bundle/{chunk-5G2BY4B6.js → chunk-3UZ4OH22.js} +32 -31
- package/dist/bundle/{chunk-UIKVP23D.js → chunk-4WK26MPY.js} +1 -1
- package/dist/bundle/{chunk-WUFZGPXX.js → chunk-54BQWRJL.js} +7 -7
- package/dist/bundle/{chunk-EA2OB75T.js → chunk-54NDYVZA.js} +1 -1
- package/dist/bundle/{chunk-QKY24RWV.js → chunk-5JTB4URG.js} +12 -12
- package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-66PL7P4C.js} +1 -1
- package/dist/bundle/{chunk-JMZQBRRZ.js → chunk-6BMTW5A6.js} +9 -9
- package/dist/bundle/{chunk-CVAJMRRD.js → chunk-6DPOWBKA.js} +6 -6
- package/dist/bundle/{chunk-YUGTJBV3.js → chunk-7C5KENNU.js} +3 -3
- package/dist/bundle/chunk-7DJNURKV.js +823 -0
- package/dist/bundle/{chunk-5TK2YQCO.js → chunk-7IBENBCK.js} +2 -2
- package/dist/bundle/chunk-7QSRODXM.js +259 -0
- package/dist/bundle/{chunk-HCZYJMBP.js → chunk-ABZ2NYDT.js} +1 -1
- package/dist/bundle/chunk-AV5UKJZM.js +729 -0
- package/dist/bundle/{chunk-IVOG6T6P.js → chunk-BBFXQPKD.js} +3 -3
- package/dist/bundle/{chunk-BXHFJTU5.js → chunk-BBRMDMIR.js} +3 -3
- package/dist/bundle/{chunk-DYLYH7VE.js → chunk-BD2K2ONK.js} +4 -4
- package/dist/bundle/{chunk-AIEMFRBU.js → chunk-BFKFKDPC.js} +1 -1
- package/dist/bundle/{chunk-JZ3MT7IE.js → chunk-BXPC5TFG.js} +2 -2
- package/dist/bundle/chunk-DHX27E5M.js +31 -0
- package/dist/bundle/{chunk-6QR7NKMG.js → chunk-DR57KDAY.js} +109 -5
- package/dist/bundle/{chunk-2VYEGKQ3.js → chunk-DVI72ZQG.js} +1 -1
- package/dist/bundle/{chunk-WGX4DZPW.js → chunk-DVVUJ254.js} +2 -2
- package/dist/bundle/{chunk-PJ3FKBXG.js → chunk-EDO5LZVF.js} +1 -1
- package/dist/bundle/{chunk-QTRYJZL7.js → chunk-EG62WVR2.js} +6 -6
- package/dist/bundle/{chunk-WCNTDETD.js → chunk-F5KJWRF5.js} +98 -6
- package/dist/bundle/{chunk-D4MVEOU2.js → chunk-FADAOLGB.js} +4 -4
- package/dist/bundle/{chunk-FAMXUI2X.js → chunk-FCSHWUMW.js} +5 -5
- package/dist/bundle/{chunk-O7T3WGCV.js → chunk-FN3RXBO7.js} +6 -6
- package/dist/bundle/{chunk-5W65QTYS.js → chunk-FONIFRYI.js} +4 -4
- package/dist/bundle/{chunk-UUQJVKPB.js → chunk-FVTKFIQH.js} +2340 -1436
- package/dist/bundle/{chunk-7A77GYCE.js → chunk-FYPW7NMH.js} +4 -4
- package/dist/bundle/{chunk-FIVFP53N.js → chunk-GA3URWIF.js} +1 -1
- package/dist/bundle/{chunk-GTLXBAJV.js → chunk-GAHIHE4K.js} +3035 -2482
- package/dist/bundle/{chunk-CMWFYZ45.js → chunk-GJZSVSV3.js} +2 -2
- package/dist/bundle/{chunk-QWGEOQHA.js → chunk-GK3BJMGK.js} +1 -1
- package/dist/bundle/{chunk-TI2OANJZ.js → chunk-GPDPEHYX.js} +1 -1
- package/dist/bundle/{chunk-KPKIHJIT.js → chunk-GV5DGHSA.js} +4 -4
- package/dist/bundle/{chunk-JRFKCYMW.js → chunk-HHAZ6DCY.js} +23 -6
- package/dist/bundle/{chunk-ZVQDOKDY.js → chunk-HK225DAG.js} +1 -1
- package/dist/bundle/{chunk-MW46BLWH.js → chunk-HRATXUFH.js} +22 -20
- package/dist/bundle/{chunk-Z5BMYI2V.js → chunk-HWUPU6WX.js} +8 -8
- package/dist/bundle/{chunk-6WAC2LOS.js → chunk-HYXXMSVD.js} +8614 -8597
- package/dist/bundle/{chunk-YYIWPH53.js → chunk-I7YSHUPW.js} +13 -13
- package/dist/bundle/{chunk-MWCPKUU4.js → chunk-IFTX7AQU.js} +5 -5
- package/dist/bundle/{chunk-SOS4U2RF.js → chunk-IGNIUDI3.js} +71 -49
- package/dist/bundle/{chunk-7JKECODO.js → chunk-ILAQIBEO.js} +1 -11
- package/dist/bundle/{chunk-CK2SQ2CE.js → chunk-KSJAFMU5.js} +78 -31
- package/dist/bundle/{chunk-ZSVMZH5O.js → chunk-LINBDWJK.js} +2 -2
- package/dist/bundle/{chunk-43NEDPXB.js → chunk-LMJBQFW6.js} +6 -6
- package/dist/bundle/{chunk-IJCUAKR5.js → chunk-ML3R2UHV.js} +4 -4
- package/dist/bundle/{chunk-PGPHEC2X.js → chunk-MXNQZAJQ.js} +2 -2
- package/dist/bundle/{chunk-RT5NT62B.js → chunk-NP7LJATI.js} +16 -70
- package/dist/bundle/chunk-OY7TNUEC.js +16 -0
- package/dist/bundle/{chunk-74NCZKRW.js → chunk-P77FL6RY.js} +18 -18
- package/dist/bundle/chunk-P7PLKNPX.js +3611 -0
- package/dist/bundle/{chunk-QVJMFZFW.js → chunk-PAPY6Q6H.js} +1 -1
- package/dist/bundle/{chunk-Q6BD6RUH.js → chunk-PN4JYURZ.js} +102 -57
- package/dist/bundle/{chunk-MOKEB656.js → chunk-PR7XD2DI.js} +2 -2
- package/dist/bundle/{chunk-UPCEHSIZ.js → chunk-Q5C6YKAY.js} +21 -16
- package/dist/bundle/{chunk-EXWZCI5G.js → chunk-QBAOIMVB.js} +1 -1
- package/dist/bundle/{chunk-ULNN3LCY.js → chunk-RCTOWLCD.js} +44 -37
- package/dist/bundle/{chunk-7TNQZKRD.js → chunk-REM5WHHQ.js} +77 -76
- package/dist/bundle/{chunk-Y2QVNVHK.js → chunk-RHSBXOQM.js} +1 -1
- package/dist/bundle/{chunk-UYBLNGZ2.js → chunk-RLNZ7NX5.js} +2 -2
- package/dist/bundle/chunk-RQNRYF6D.js +170 -0
- package/dist/bundle/{chunk-PV3AWPHR.js → chunk-SONPLYV7.js} +5 -5
- package/dist/bundle/{chunk-CRIEW4FP.js → chunk-T5D4OGDC.js} +2 -2
- package/dist/bundle/{chunk-MLSXHTUB.js → chunk-TGS5VPJD.js} +1228 -455
- package/dist/bundle/chunk-TNKQDS5A.js +335 -0
- package/dist/bundle/{chunk-DU23ET2O.js → chunk-VVN6GHAZ.js} +60 -81
- package/dist/bundle/{chunk-PWIEOATY.js → chunk-WJK6KTCS.js} +325 -14
- package/dist/bundle/{chunk-U52QE4QV.js → chunk-WWE5GO6G.js} +3 -3
- package/dist/bundle/{chunk-6HFZZ2PW.js → chunk-XOL346TJ.js} +2 -2
- package/dist/bundle/{chunk-ZAIE3G5I.js → chunk-XZBA6FVH.js} +3 -3
- package/dist/bundle/chunk-YCL3SK4T.js +1978 -0
- package/dist/bundle/{chunk-DIZBJLPM.js → chunk-YRUR3E3E.js} +68 -78
- package/dist/bundle/{chunk-EEE4H2PA.js → chunk-YZPE72GE.js} +12 -12
- package/dist/bundle/{chunk-F7KAMSXA.js → chunk-ZCXWV4XO.js} +4 -4
- package/dist/bundle/{chunk-NV75QPML.js → chunk-ZHZYGY5R.js} +4 -4
- package/dist/bundle/{cli-L7P36YUH.js → cli-K4D4DIGQ.js} +137 -88
- package/dist/bundle/command-contract-V3F452QI.js +43 -0
- package/dist/bundle/{command-server-entry-H3VGPOLJ.js → command-server-entry-WREK3QBB.js} +33 -31
- package/dist/bundle/decode-SEETPKBH.js +299 -0
- package/dist/bundle/{dispatch-WBEOHZDV.js → dispatch-SQCEURVK.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-SDZA2SWG.js → echarts-WZ5RKFCX.js} +2 -2
- package/dist/bundle/{embed-WUKOASQG.js → embed-B2UCRZZR.js} +9 -9
- package/dist/bundle/{embedder-UBRAXRDZ.js → embedder-4R6Z7G7L.js} +12 -12
- package/dist/bundle/entry-ORZYRJ5N.js +25 -0
- package/dist/bundle/{failure-X6PSLVSO.js → failure-CYNXH3RQ.js} +4 -4
- package/dist/bundle/first-run-KAKA6KBY.js +31 -0
- package/dist/bundle/first-screen-R645UHRH.js +41 -0
- package/dist/bundle/google-BSO3YB7N.js +45 -0
- package/dist/bundle/{google-api-SQQ4BSNR.js → google-api-SAND2F7L.js} +70 -63
- package/dist/bundle/grants-PLNFYARD.js +118 -0
- package/dist/bundle/{identity-SRL6RSU2.js → identity-JVVGS4U6.js} +6 -6
- package/dist/bundle/{instructions-7T6JJIFS.js → instructions-JSMTSB22.js} +1 -1
- package/dist/bundle/{login-N243GGEE.js → login-6WG3YBDU.js} +78 -71
- package/dist/bundle/{mcp-TDKGDB4V.js → mcp-VFIOZDVY.js} +2 -2
- package/dist/bundle/meeting-combined-SUKMFK3F.js +27 -0
- package/dist/bundle/meeting-model-S4YGKIFI.js +29 -0
- package/dist/bundle/meeting-semantic-5U7JQCFF.js +25 -0
- package/dist/bundle/{node-BZDMUFTW.js → node-VJMVHOWD.js} +2 -2
- package/dist/bundle/{node-sqlite-SZQCCMV2.js → node-sqlite-DCNT3HVE.js} +10 -10
- package/dist/bundle/oauth-KCMNQ3ZP.js +22 -0
- package/dist/bundle/{open-RVTPKDA3.js → open-NFOEHVW7.js} +8 -8
- package/dist/bundle/{openai-6NN63BMH.js → openai-D47WY7EC.js} +32 -30
- package/dist/bundle/{process-756VBE7E.js → process-Q2FRU5VA.js} +1 -1
- package/dist/bundle/{program-B4QBJYB5.js → program-T2AJJQEM.js} +1327 -1329
- package/dist/bundle/{prompt-HGP2DSRW.js → prompt-YJSDABXN.js} +8 -8
- package/dist/bundle/{reasons-KSYP5VDJ.js → reasons-WEHPCSJX.js} +5 -5
- package/dist/bundle/{recognize-26SHB7HI.js → recognize-6OBEIEB3.js} +7 -7
- package/dist/bundle/{remote-Z4PWHZ5N.js → remote-3SL2QJ7T.js} +13 -13
- package/dist/bundle/{rerank-QHJZJK3Q.js → rerank-L6F5SLIB.js} +10 -10
- package/dist/bundle/{serve-MYJW5IEM.js → serve-GYSWIWH4.js} +12 -12
- package/dist/bundle/server-BI46BSRE.js +80 -0
- package/dist/bundle/{server-XFW3V7CR.js → server-GWWP3RIT.js} +62 -53
- package/dist/bundle/{services-IQG2RVTO.js → services-BDQBRXT5.js} +91 -51
- package/dist/bundle/{sqlite-runtime-X4GB5PBV.js → sqlite-runtime-ZSZGAUYB.js} +9 -9
- package/dist/bundle/{start-C6EXYXAL.js → start-BJ275RUK.js} +7 -7
- package/dist/bundle/{state-ATQK2X3W.js → state-HLNGFI2T.js} +9 -9
- package/dist/bundle/{store-QUBUPK6F.js → store-I43KZNJW.js} +35 -26
- package/dist/bundle/{store-MEHEUOJH.js → store-OSRTGYGI.js} +23 -19
- package/dist/bundle/store-maintenance-command-FO7LEVSL.js +72 -0
- package/dist/bundle/tokens-DB7O7QNB.js +118 -0
- package/dist/catalog.d.ts +0 -28
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +0 -82
- package/dist/catalog.js.map +1 -1
- package/dist/commands/catalog.d.ts +3 -8
- package/dist/commands/catalog.d.ts.map +1 -1
- package/dist/commands/catalog.js +36 -109
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +20 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +30 -72
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/folders.d.ts +1 -1
- package/dist/commands/folders.d.ts.map +1 -1
- package/dist/commands/folders.js +45 -48
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/knowledge.d.ts +4 -21
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +3 -241
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/mirrors.d.ts +2 -2
- package/dist/commands/mirrors.d.ts.map +1 -1
- package/dist/commands/mirrors.js +46 -202
- package/dist/commands/mirrors.js.map +1 -1
- package/dist/commands/search.d.ts +1 -3
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +20 -42
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +36 -53
- package/dist/commands/sync.js.map +1 -1
- package/dist/contract-overrides.d.ts +0 -2
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -317
- package/dist/contract-overrides.js.map +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.d.ts.map +1 -1
- package/dist/knowledge.js +4 -3
- package/dist/knowledge.js.map +1 -1
- package/dist/list-queries.d.ts +0 -31
- package/dist/list-queries.d.ts.map +1 -1
- package/dist/list-queries.js +0 -36
- package/dist/list-queries.js.map +1 -1
- package/dist/policy.d.ts +1 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +3 -3
- package/dist/policy.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +2 -3
- package/dist/program.js.map +1 -1
- package/dist/provider-json.d.ts.map +1 -1
- package/dist/provider-json.js +5 -5
- package/dist/provider-json.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +0 -10
- package/dist/reasons.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-2UHQVRH2.js +0 -1235
- package/dist/bundle/chunk-AXYG2DDY.js +0 -4721
- package/dist/bundle/chunk-J5LXL435.js +0 -1316
- package/dist/bundle/chunk-R5FTCNLJ.js +0 -76
- package/dist/bundle/command-contract-EYFGMKIG.js +0 -41
- package/dist/bundle/decode-JEU6JWCV.js +0 -165
- package/dist/bundle/entry-C4NUQFTF.js +0 -25
- package/dist/bundle/first-run-PKHBS7B4.js +0 -30
- package/dist/bundle/first-screen-QOVOM4BF.js +0 -39
- package/dist/bundle/google-XXHSMTVK.js +0 -45
- package/dist/bundle/grants-2U4JVT6O.js +0 -111
- package/dist/bundle/oauth-CMAFXX6A.js +0 -22
- package/dist/bundle/server-HBZPIHDX.js +0 -74
- package/dist/bundle/store-maintenance-command-33ULVDWY.js +0 -65
- package/dist/bundle/tokens-A2GP4F34.js +0 -111
- package/dist/knowledge-query.d.ts +0 -77
- package/dist/knowledge-query.d.ts.map +0 -1
- package/dist/knowledge-query.js +0 -104
- package/dist/knowledge-query.js.map +0 -1
- package/dist/bundle/{chunk-XWBPP2HX.js → chunk-ZI3YTXSF.js} +0 -0
- package/dist/bundle/{mdast-util-from-markdown-CE73EWJ2.js → mdast-util-from-markdown-FXEPSNER.js} +3 -3
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
authorizedClient,
|
|
5
|
+
checkAuthorization,
|
|
6
|
+
covers,
|
|
7
|
+
credentials,
|
|
8
|
+
googleFetch,
|
|
9
|
+
grantedScopes,
|
|
10
|
+
notSaved,
|
|
11
|
+
observeRequests,
|
|
12
|
+
operationOf,
|
|
13
|
+
saveSession,
|
|
14
|
+
sessionKeeper,
|
|
15
|
+
transporterOptions
|
|
16
|
+
} from "./chunk-P77FL6RY.js";
|
|
17
|
+
import "./chunk-NP7LJATI.js";
|
|
18
|
+
import "./chunk-VVN6GHAZ.js";
|
|
19
|
+
import {
|
|
20
|
+
ACTIVITY_SCOPE,
|
|
21
|
+
APPS_SCOPE,
|
|
22
|
+
READ_SCOPE,
|
|
23
|
+
WRITE_SCOPE
|
|
24
|
+
} from "./chunk-NYECVHFH.js";
|
|
25
|
+
import "./chunk-FVTKFIQH.js";
|
|
26
|
+
import "./chunk-RHSBXOQM.js";
|
|
27
|
+
import "./chunk-QBAOIMVB.js";
|
|
28
|
+
import "./chunk-YZPE72GE.js";
|
|
29
|
+
import "./chunk-GPDPEHYX.js";
|
|
30
|
+
import "./chunk-RCTOWLCD.js";
|
|
31
|
+
import "./chunk-KSJAFMU5.js";
|
|
32
|
+
import "./chunk-ZHZYGY5R.js";
|
|
33
|
+
import "./chunk-REM5WHHQ.js";
|
|
34
|
+
import "./chunk-HWUPU6WX.js";
|
|
35
|
+
import "./chunk-3UZ4OH22.js";
|
|
36
|
+
import "./chunk-AV5UKJZM.js";
|
|
37
|
+
import "./chunk-WWE5GO6G.js";
|
|
38
|
+
import "./chunk-GAHIHE4K.js";
|
|
39
|
+
import "./chunk-PN4JYURZ.js";
|
|
40
|
+
import "./chunk-I7YSHUPW.js";
|
|
41
|
+
import "./chunk-7QSRODXM.js";
|
|
42
|
+
import "./chunk-3TCMANIM.js";
|
|
43
|
+
import "./chunk-RQNRYF6D.js";
|
|
44
|
+
import "./chunk-EG62WVR2.js";
|
|
45
|
+
import "./chunk-HTQTIKWP.js";
|
|
46
|
+
import "./chunk-5JTB4URG.js";
|
|
47
|
+
import "./chunk-FADAOLGB.js";
|
|
48
|
+
import "./chunk-GA3URWIF.js";
|
|
49
|
+
import "./chunk-ZCXWV4XO.js";
|
|
50
|
+
import "./chunk-FCSHWUMW.js";
|
|
51
|
+
import "./chunk-FN3RXBO7.js";
|
|
52
|
+
import "./chunk-3CHW7JGR.js";
|
|
53
|
+
import "./chunk-IFTX7AQU.js";
|
|
54
|
+
import "./chunk-5DPV7X27.js";
|
|
55
|
+
import "./chunk-6BMTW5A6.js";
|
|
56
|
+
import "./chunk-DVI72ZQG.js";
|
|
57
|
+
import "./chunk-EDO5LZVF.js";
|
|
58
|
+
import "./chunk-LINBDWJK.js";
|
|
59
|
+
import "./chunk-3UWRAIWA.js";
|
|
60
|
+
import "./chunk-TGS5VPJD.js";
|
|
61
|
+
import "./chunk-FYPW7NMH.js";
|
|
62
|
+
import "./chunk-54BQWRJL.js";
|
|
63
|
+
import "./chunk-PR7XD2DI.js";
|
|
64
|
+
import "./chunk-4WK26MPY.js";
|
|
65
|
+
import "./chunk-TNKQDS5A.js";
|
|
66
|
+
import "./chunk-GV5DGHSA.js";
|
|
67
|
+
import "./chunk-DR57KDAY.js";
|
|
68
|
+
import "./chunk-BBFXQPKD.js";
|
|
69
|
+
import "./chunk-FONIFRYI.js";
|
|
70
|
+
import "./chunk-XZBA6FVH.js";
|
|
71
|
+
import "./chunk-MXNQZAJQ.js";
|
|
72
|
+
import "./chunk-HYXXMSVD.js";
|
|
73
|
+
import "./chunk-BBRMDMIR.js";
|
|
74
|
+
import "./chunk-7DJNURKV.js";
|
|
75
|
+
import "./chunk-3AHBZP33.js";
|
|
76
|
+
import "./chunk-OY7TNUEC.js";
|
|
77
|
+
import "./chunk-6DPOWBKA.js";
|
|
78
|
+
import "./chunk-YCL3SK4T.js";
|
|
79
|
+
import "./chunk-GK3BJMGK.js";
|
|
80
|
+
import "./chunk-RLNZ7NX5.js";
|
|
81
|
+
import "./chunk-DHX27E5M.js";
|
|
82
|
+
import "./chunk-P7PLKNPX.js";
|
|
83
|
+
import "./chunk-Q5C6YKAY.js";
|
|
84
|
+
import "./chunk-WJK6KTCS.js";
|
|
85
|
+
import "./chunk-PAPY6Q6H.js";
|
|
86
|
+
import "./chunk-D72URWJE.js";
|
|
87
|
+
import "./chunk-66PL7P4C.js";
|
|
88
|
+
import "./chunk-XOL346TJ.js";
|
|
89
|
+
import "./chunk-ILAQIBEO.js";
|
|
90
|
+
import "./chunk-ZI3YTXSF.js";
|
|
91
|
+
import "./chunk-HK225DAG.js";
|
|
92
|
+
import "./chunk-T5D4OGDC.js";
|
|
93
|
+
import "./chunk-HRATXUFH.js";
|
|
94
|
+
import "./chunk-SONPLYV7.js";
|
|
95
|
+
import "./chunk-Y5E2WNWB.js";
|
|
96
|
+
import "./chunk-ABZ2NYDT.js";
|
|
97
|
+
import "./chunk-7IBENBCK.js";
|
|
98
|
+
import "./chunk-HHAZ6DCY.js";
|
|
99
|
+
import "./chunk-54NDYVZA.js";
|
|
100
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
101
|
+
export {
|
|
102
|
+
ACTIVITY_SCOPE,
|
|
103
|
+
APPS_SCOPE,
|
|
104
|
+
READ_SCOPE,
|
|
105
|
+
WRITE_SCOPE,
|
|
106
|
+
authorizedClient,
|
|
107
|
+
checkAuthorization,
|
|
108
|
+
covers,
|
|
109
|
+
credentials,
|
|
110
|
+
googleFetch,
|
|
111
|
+
grantedScopes,
|
|
112
|
+
notSaved,
|
|
113
|
+
observeRequests,
|
|
114
|
+
operationOf,
|
|
115
|
+
saveSession,
|
|
116
|
+
sessionKeeper,
|
|
117
|
+
transporterOptions
|
|
118
|
+
};
|
package/dist/catalog.d.ts
CHANGED
|
@@ -13,32 +13,4 @@ export interface SourceCatalog {
|
|
|
13
13
|
}>;
|
|
14
14
|
}
|
|
15
15
|
export { catalogFiles } from "@wirecat/cli-core/documents";
|
|
16
|
-
export interface CatalogTree {
|
|
17
|
-
item: Pick<CatalogEntry, "ref" | "name" | "kind" | "url" | "content"> & {
|
|
18
|
-
id: string;
|
|
19
|
-
};
|
|
20
|
-
children: CatalogTree[];
|
|
21
|
-
truncated: boolean;
|
|
22
|
-
}
|
|
23
|
-
export declare const catalogTree: (entries: CatalogEntry[], roots: string[], depth: number) => CatalogTree[];
|
|
24
|
-
export declare const catalogId: (entry: CatalogEntry) => string;
|
|
25
|
-
export declare const catalogOutput: (entry: CatalogEntry) => {
|
|
26
|
-
id: string;
|
|
27
|
-
ref: string;
|
|
28
|
-
kind: "file" | "folder";
|
|
29
|
-
name: string;
|
|
30
|
-
parents: string[];
|
|
31
|
-
url: string | undefined;
|
|
32
|
-
mime: string | undefined;
|
|
33
|
-
size: number | undefined;
|
|
34
|
-
created_at: string | undefined;
|
|
35
|
-
modified_at: string | undefined;
|
|
36
|
-
observed_at: string;
|
|
37
|
-
description: string | undefined;
|
|
38
|
-
actors: import("@wirecat/cli-core/store").CatalogActor[] | undefined;
|
|
39
|
-
provider_metadata: unknown;
|
|
40
|
-
active: boolean;
|
|
41
|
-
content: "indexed" | "metadata" | "unreadable";
|
|
42
|
-
};
|
|
43
|
-
export declare const CATALOG_FIELDS: string[];
|
|
44
16
|
//# sourceMappingURL=catalog.d.ts.map
|
package/dist/catalog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACvF,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,YAAY,CAAA;AAEtD,eAAO,MAAM,YAAY,SAAU,YAAY,KAAG,YAwBhD,CAAA;AACF,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC/F,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAA;IACrE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CACpG;AACD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA"}
|
package/dist/catalog.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-base";
|
|
2
1
|
import { FOLDER } from "./model.js";
|
|
3
2
|
export const catalogInput = (file) => ({
|
|
4
3
|
externalId: `${file.id}.md`,
|
|
@@ -26,85 +25,4 @@ export const catalogInput = (file) => ({
|
|
|
26
25
|
},
|
|
27
26
|
});
|
|
28
27
|
export { catalogFiles } from "@wirecat/cli-core/documents";
|
|
29
|
-
export const catalogTree = (entries, roots, depth) => {
|
|
30
|
-
if (!Number.isSafeInteger(depth) || depth < 0 || depth > 50)
|
|
31
|
-
throw new CliError("validation_error", "tree depth must be between 0 and 50", { reason: "catalog.depth-invalid" });
|
|
32
|
-
const byId = new Map(entries.map((entry) => [entry.externalId, entry]));
|
|
33
|
-
const children = new Map();
|
|
34
|
-
for (const entry of entries)
|
|
35
|
-
for (const parent of entry.parents) {
|
|
36
|
-
const list = children.get(parent) ?? [];
|
|
37
|
-
list.push(entry);
|
|
38
|
-
children.set(parent, list);
|
|
39
|
-
}
|
|
40
|
-
let count = 0;
|
|
41
|
-
const node = (item, level, ancestors) => {
|
|
42
|
-
if (ancestors.has(item.externalId))
|
|
43
|
-
throw new CliError("invalid_response", "local folder ancestry contains a cycle", { reason: "catalog.cycle" });
|
|
44
|
-
if (++count > 10000)
|
|
45
|
-
throw new CliError("validation_error", "tree output exceeds 10000 nodes; choose a smaller folder", {
|
|
46
|
-
reason: "catalog.tree-limit",
|
|
47
|
-
});
|
|
48
|
-
const found = children.get(item.externalId) ?? [];
|
|
49
|
-
const next = new Set([...ancestors, item.externalId]);
|
|
50
|
-
return {
|
|
51
|
-
item: {
|
|
52
|
-
id: catalogId(item),
|
|
53
|
-
ref: item.ref,
|
|
54
|
-
name: item.name,
|
|
55
|
-
kind: item.kind,
|
|
56
|
-
url: item.url,
|
|
57
|
-
content: item.content,
|
|
58
|
-
},
|
|
59
|
-
children: level >= depth ? [] : found.map((child) => node(child, level + 1, next)),
|
|
60
|
-
truncated: level >= depth && found.length > 0,
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
return roots.map((id) => {
|
|
64
|
-
const entry = byId.get(id);
|
|
65
|
-
if (entry?.kind !== "folder")
|
|
66
|
-
throw new CliError("not_found", "folder is not in the active local catalog; run catalog import or sync", {
|
|
67
|
-
reason: "catalog.not-found",
|
|
68
|
-
});
|
|
69
|
-
return node(entry, 0, new Set());
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
export const catalogId = (entry) => entry.externalId.replace(/\.md$/, "");
|
|
73
|
-
export const catalogOutput = (entry) => ({
|
|
74
|
-
id: catalogId(entry),
|
|
75
|
-
ref: entry.ref,
|
|
76
|
-
kind: entry.kind,
|
|
77
|
-
name: entry.name,
|
|
78
|
-
parents: entry.parents.map((id) => id.replace(/\.md$/, "")),
|
|
79
|
-
url: entry.url,
|
|
80
|
-
mime: entry.mime,
|
|
81
|
-
size: entry.size,
|
|
82
|
-
created_at: entry.createdAt,
|
|
83
|
-
modified_at: entry.modifiedAt,
|
|
84
|
-
observed_at: entry.observedAt,
|
|
85
|
-
description: entry.description,
|
|
86
|
-
actors: entry.actors,
|
|
87
|
-
provider_metadata: entry.metadata,
|
|
88
|
-
active: entry.active,
|
|
89
|
-
content: entry.content,
|
|
90
|
-
});
|
|
91
|
-
// Keep field selection tied to the provider view, including future additions to that view.
|
|
92
|
-
export const CATALOG_FIELDS = Object.keys({
|
|
93
|
-
id: true,
|
|
94
|
-
ref: true,
|
|
95
|
-
kind: true,
|
|
96
|
-
name: true,
|
|
97
|
-
parents: true,
|
|
98
|
-
url: true,
|
|
99
|
-
mime: true,
|
|
100
|
-
size: true,
|
|
101
|
-
created_at: true,
|
|
102
|
-
modified_at: true,
|
|
103
|
-
observed_at: true,
|
|
104
|
-
description: true,
|
|
105
|
-
actors: true,
|
|
106
|
-
provider_metadata: true,
|
|
107
|
-
active: true,
|
|
108
|
-
content: true,
|
|
109
|
-
});
|
|
110
28
|
//# sourceMappingURL=catalog.js.map
|
package/dist/catalog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,MAAM,EAAE,MAAM,YAAY,CAAA;AAEtD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAkB,EAAgB,EAAE,CAAC,CAAC;IACjE,UAAU,EAAE,GAAG,IAAI,CAAC,EAAE,KAAK;IAC3B,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM;IAC9C,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;IAC7C,GAAG,EAAE,IAAI,CAAC,GAAG;IACb,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,SAAS,EAAE,IAAI,CAAC,SAAS;IACzB,UAAU,EAAE,IAAI,CAAC,UAAU;IAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;IAC7B,MAAM,EAAE;QACN,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QACpE,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC7E;IACD,QAAQ,EAAE,IAAI,CAAC,gBAAgB,IAAI,IAAI;IACvC,WAAW,EAAE;QACX,MAAM,EAAE,cAAc;QACtB,SAAS,EAAE,IAAI,CAAC,GAAG;QACnB,MAAM,EAAE,IAAI,CAAC,EAAE;QACf,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,EAAE;QACzB,cAAc,EAAE,IAAI,CAAC,cAAc,IAAI,IAAI;KAC5C;CACF,CAAC,CAAA;AAMF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { type Body } from "@wirecat/cli-core/cli";
|
|
2
1
|
import type { Command } from "commander";
|
|
3
2
|
import type { DocumentIndex } from "../model.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
selected(): string;
|
|
7
|
-
output(body: Body): void;
|
|
8
|
-
positive(input: string): number;
|
|
9
|
-
offset(input: string): number;
|
|
3
|
+
import { type CommandContext } from "./context.js";
|
|
4
|
+
type Helpers = Pick<CommandContext, "env" | "selected" | "output"> & {
|
|
10
5
|
withIndex<T>(fn: (index: DocumentIndex) => Promise<T>): Promise<T>;
|
|
11
|
-
}
|
|
6
|
+
};
|
|
12
7
|
export declare const installCatalogCommands: (program: Command, helpers: Helpers) => void;
|
|
13
8
|
export {};
|
|
14
9
|
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/commands/catalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/commands/catalog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGhD,OAAO,EAAE,KAAK,cAAc,EAAe,MAAM,cAAc,CAAA;AAE/D,KAAK,OAAO,GAAG,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,UAAU,GAAG,QAAQ,CAAC,GAAG;IACnE,SAAS,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;CACnE,CAAA;AAED,eAAO,MAAM,sBAAsB,YAAa,OAAO,WAAW,OAAO,SAyCxE,CAAA"}
|
package/dist/commands/catalog.js
CHANGED
|
@@ -1,116 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { parseLucene, validateQuery } from "@wirecat/cli-base/query";
|
|
4
|
-
import { itemOf, LOCAL_READ, LOCAL_WRITE, listOf } from "@wirecat/cli-core/cli";
|
|
5
|
-
import { CATALOG_QUERY } from "@wirecat/cli-core/store";
|
|
6
|
-
import { catalogFiles, catalogOutput, catalogTree } from "../catalog.js";
|
|
1
|
+
import { addDocumentCatalogCommands } from "@wirecat/cli-core/documents/cli";
|
|
2
|
+
import { catalogFiles } from "../catalog.js";
|
|
7
3
|
import { activeProfile, fileId } from "../config.js";
|
|
8
|
-
import { bindQuery, TAGS_QUERY, tagRow, termsOf } from "../list-queries.js";
|
|
9
|
-
import { allOf } from "../output.js";
|
|
10
4
|
import { lockProfile } from "../profile-lock.js";
|
|
11
|
-
import { examples } from "../registry.js";
|
|
12
5
|
import { readState } from "../state.js";
|
|
13
|
-
|
|
6
|
+
import { DRIVE_WORDS } from "./context.js";
|
|
14
7
|
export const installCatalogCommands = (program, helpers) => {
|
|
15
|
-
const { env, selected, output,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
8
|
+
const { env, selected, output, withIndex } = helpers;
|
|
9
|
+
addDocumentCatalogCommands(program, {
|
|
10
|
+
words: DRIVE_WORDS,
|
|
11
|
+
output,
|
|
12
|
+
run: async (fn, write) => {
|
|
13
|
+
const profile = activeProfile(env, selected());
|
|
14
|
+
return withIndex(async (index) => {
|
|
15
|
+
const lock = write ? await lockProfile(env, selected()) : undefined;
|
|
16
|
+
try {
|
|
17
|
+
lock?.assertHeld();
|
|
18
|
+
const { catalog } = index;
|
|
19
|
+
const value = await fn({
|
|
20
|
+
...(catalog
|
|
21
|
+
? {
|
|
22
|
+
catalog: {
|
|
23
|
+
import: (principal) => catalog.import(principal, catalogFiles(readState(env, selected(), principal), activeProfile(env, selected()).roots)),
|
|
24
|
+
get: (principal, id) => catalog.get(principal, id),
|
|
25
|
+
list: (principal, query) => catalog.list(principal, query),
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
: {}),
|
|
29
|
+
...(index.knowledge ? { knowledge: index.knowledge } : {}),
|
|
30
|
+
}, profile.principal);
|
|
31
|
+
lock?.assertHeld();
|
|
32
|
+
return value;
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
await lock?.release();
|
|
36
|
+
}
|
|
41
37
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return index.catalog.import(principal, catalogFiles(state, activeProfile(env, selected()).roots));
|
|
47
|
-
}, true))));
|
|
48
|
-
examples(annotate(local(catalog.command("show").description("show stored metadata and the stable file or folder reference")), {
|
|
49
|
-
output: { entity: "document", view: "drive_catalog" },
|
|
50
|
-
}), ["drive personal catalog show FILE_ID --offline"])
|
|
51
|
-
.argument("<file>", "Google file or folder id, or its Drive URL")
|
|
52
|
-
.action(async (id) => output(itemOf(await run(async (index, principal) => catalogOutput(await entry(index, principal, id))))));
|
|
53
|
-
const list = async (words, args, search) => {
|
|
54
|
-
const ast = words.length
|
|
55
|
-
? validateQuery(parseLucene(words.join(" "), { defaultField: search ? "text" : "none" }), CATALOG_QUERY)
|
|
56
|
-
: undefined;
|
|
57
|
-
const result = await run((index, principal) => index.catalog.list(principal, { ast, limit: args.limit, offset: (args.page - 1) * args.limit }));
|
|
58
|
-
output(listOf(`catalog ${search ? "search" : "list"}`, {
|
|
59
|
-
items: result.items.map(catalogOutput),
|
|
60
|
-
limit: args.limit,
|
|
61
|
-
has_more: result.hasMore,
|
|
62
|
-
page: args.page,
|
|
63
|
-
args: { query: words.length ? words.join(" ") : undefined },
|
|
64
|
-
}));
|
|
65
|
-
};
|
|
66
|
-
for (const action of ["list", "search"]) {
|
|
67
|
-
const command = examples(local(catalog
|
|
68
|
-
.command(action)
|
|
69
|
-
.description(action === "list"
|
|
70
|
-
? "list cached files and folders using metadata queries"
|
|
71
|
-
: "search cached names, descriptions, types and observed people")), [
|
|
72
|
-
action === "list"
|
|
73
|
-
? 'drive personal catalog list "parent:FOLDER_ID AND kind:file" --offline'
|
|
74
|
-
: 'drive personal catalog search "budget AND person:Rin*" --offline',
|
|
75
|
-
])
|
|
76
|
-
.argument(action === "list" ? "[query...]" : "<query...>", "metadata query: kind, mime, name, parent, person, tag; AND, OR, NOT")
|
|
77
|
-
.option("--limit <n>", "how many entries to return (at most 1000)", positive, 50)
|
|
78
|
-
.option("--page <n>", "which page to return", positive, 1)
|
|
79
|
-
.action(async (words, args) => list(words, args, action === "search"));
|
|
80
|
-
annotate(command, { query: CATALOG_QUERY, output: { entity: "document", view: "drive_catalog" } });
|
|
81
|
-
}
|
|
82
|
-
examples(local(catalog.command("tree").description("show the cached hierarchy below a folder or all selected roots")), ["drive personal catalog tree --offline", "drive personal catalog tree FOLDER_ID --depth 3 --offline"])
|
|
83
|
-
.argument("[folder]", "Google folder id or URL; defaults to the explicitly selected profile's roots")
|
|
84
|
-
.option("--depth <n>", "maximum descendant depth, from 0 to 50", offset, 5)
|
|
85
|
-
.action(async (id, args) => output(await run(async (index, principal) => {
|
|
86
|
-
const items = [];
|
|
87
|
-
for (let skip = 0; skip < 10000; skip += 1000) {
|
|
88
|
-
const page = await index.catalog.list(principal, { limit: 1000, offset: skip });
|
|
89
|
-
for (const item of page.items)
|
|
90
|
-
items.push(item);
|
|
91
|
-
if (!page.hasMore)
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
const roots = id ? [fileId(id)] : activeProfile(env, selected()).roots;
|
|
95
|
-
return allOf(catalogTree(items, roots.map((root) => `${root}.md`), args.depth));
|
|
96
|
-
})));
|
|
97
|
-
const tags = local(catalog.command("tags")).description("add owner tags to cached files or folders");
|
|
98
|
-
for (const action of ["list", "add", "remove"]) {
|
|
99
|
-
const command = examples(local(tags.command(action).description(`${action} local tags on a cached file or folder`), action !== "list"), [`drive personal catalog tags ${action} FOLDER_ID${action === "list" ? "" : " project"} --offline`]).argument("<file>", "Google file or folder id, or its Drive URL");
|
|
100
|
-
if (action === "list")
|
|
101
|
-
bindQuery(command, TAGS_QUERY, tagRow);
|
|
102
|
-
else
|
|
103
|
-
command.argument("<tags...>", "local tag names");
|
|
104
|
-
command.action(async (id, values = []) => {
|
|
105
|
-
const filter = action === "list" ? termsOf(values, TAGS_QUERY, "catalog tags list") : undefined;
|
|
106
|
-
return output(allOf(await run(async (index, principal) => {
|
|
107
|
-
const found = await entry(index, principal, id);
|
|
108
|
-
if (!index.knowledge)
|
|
109
|
-
throw new CliError("configuration_error", "index has no shared knowledge adapter");
|
|
110
|
-
const tags = await index.knowledge.tags(principal, found.ref, action, action === "list" ? undefined : values, filter);
|
|
111
|
-
return action === "list" ? tags.map((tag) => ({ tag })) : tags;
|
|
112
|
-
}, action !== "list")));
|
|
113
|
-
});
|
|
114
|
-
}
|
|
38
|
+
},
|
|
39
|
+
id: fileId,
|
|
40
|
+
roots: () => activeProfile(env, selected()).roots,
|
|
41
|
+
});
|
|
115
42
|
};
|
|
116
43
|
//# sourceMappingURL=catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/commands/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/commands/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAE5E,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAuB,WAAW,EAAE,MAAM,cAAc,CAAA;AAM/D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAgB,EAAE,OAAgB,EAAE,EAAE;IAC3E,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAA;IACpD,0BAA0B,CAAC,OAAO,EAAE;QAClC,KAAK,EAAE,WAAW;QAClB,MAAM;QACN,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;YACvB,MAAM,OA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CAAA;gBACvB,CAAC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;QACD,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK;KAClD,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { KeyringStore, Renderer, RenderFormat, Streams } from "@wirecat/cli-base";
|
|
2
2
|
import type { BaseEnvironment, Body } from "@wirecat/cli-core/cli";
|
|
3
|
+
import type { DocumentWords } from "@wirecat/cli-core/documents/cli";
|
|
3
4
|
import type { UpdateEnvironment } from "@wirecat/cli-core/update";
|
|
4
5
|
import type { Command } from "commander";
|
|
5
6
|
import type { Download } from "../download.js";
|
|
@@ -52,4 +53,6 @@ export interface CommandContext {
|
|
|
52
53
|
}
|
|
53
54
|
export declare const positive: (input: string) => number;
|
|
54
55
|
export declare const offset: (input: string) => number;
|
|
56
|
+
/** How drive names itself and Google in cli-core's shared documents commands. */
|
|
57
|
+
export declare const DRIVE_WORDS: DocumentWords;
|
|
55
58
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/commands/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,K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eAAO,MAAM,QAAQ,UAAW,MAAM,WAIrC,CAAA;AACD,eAAO,MAAM,MAAM,UAAW,MAAM,WAInC,CAAA;AAED,iFAAiF;AACjF,eAAO,MAAM,WAAW,EAAE,aAkBzB,CAAA"}
|
package/dist/commands/context.js
CHANGED
|
@@ -11,4 +11,24 @@ export const offset = (input) => {
|
|
|
11
11
|
throw new InvalidArgumentError("use a nonnegative integer");
|
|
12
12
|
return n;
|
|
13
13
|
};
|
|
14
|
+
/** How drive names itself and Google in cli-core's shared documents commands. */
|
|
15
|
+
export const DRIVE_WORDS = {
|
|
16
|
+
app: "drive",
|
|
17
|
+
remote: "google",
|
|
18
|
+
provider: "Google",
|
|
19
|
+
place: "Google Drive",
|
|
20
|
+
source: "google-drive",
|
|
21
|
+
text: {
|
|
22
|
+
documents: "read imported documents and Google Docs",
|
|
23
|
+
documentArgument: "document id, Google Docs URL, or a search hit's document: ref",
|
|
24
|
+
knowledgeArgument: "Google file or folder id or URL in the local catalog, or a document:<n> ref",
|
|
25
|
+
catalog: "browse stored Drive files and folders offline",
|
|
26
|
+
catalogArgument: "Google file or folder id, or its Drive URL",
|
|
27
|
+
treeArgument: "Google folder id or URL; defaults to the explicitly selected profile's roots",
|
|
28
|
+
identitiesList: "list the owners and last editor Google shows for a document",
|
|
29
|
+
mirrors: "keep local folders mirrored into Google Docs and Sheets",
|
|
30
|
+
mirrorsAdd: "mirror a local folder: Markdown to Google Docs, CSV/TSV/XLSX to Sheets",
|
|
31
|
+
mirrorsSync: "sync both ways with Docs and Sheets; a part changed on both sides is reported",
|
|
32
|
+
},
|
|
33
|
+
};
|
|
14
34
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/commands/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/commands/context.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAmDhD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE;IACxC,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IACvB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,oBAAoB,CAAC,wBAAwB,CAAC,CAAA;IAC/F,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE;IACtC,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IACvB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,oBAAoB,CAAC,2BAA2B,CAAC,CAAA;IAClG,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,iFAAiF;AACjF,MAAM,CAAC,MAAM,WAAW,GAAkB;IACxC,GAAG,EAAE,OAAO;IACZ,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,cAAc;IACtB,IAAI,EAAE;QACJ,SAAS,EAAE,yCAAyC;QACpD,gBAAgB,EAAE,+DAA+D;QACjF,iBAAiB,EAAE,6EAA6E;QAChG,OAAO,EAAE,+CAA+C;QACxD,eAAe,EAAE,4CAA4C;QAC7D,YAAY,EAAE,8EAA8E;QAC5F,cAAc,EAAE,6DAA6D;QAC7E,OAAO,EAAE,yDAAyD;QAClE,UAAU,EAAE,wEAAwE;QACpF,WAAW,EAAE,+EAA+E;KAC7F;CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../src/commands/documents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../src/commands/documents.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAMxC,OAAO,EAAE,KAAK,cAAc,EAAe,MAAM,cAAc,CAAA;AAK/D,eAAO,MAAM,aAAa,UAAW,MAAM,YAA6B,CAAA;AAaxE,eAAO,MAAM,cAAc,sBACL,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,UAAU,CAAC,aACpD,MAAM;;;CAab,CAAA;AAEH,eAAO,MAAM,gBAAgB,YAAa,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,UAAU,CAAC,aAEjE,MAAM;;;;;CAItB,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,aAAa,QAAS,MAAM,CAAC,UAAU,WAAW,OAAO,QAAQ,MAAM,GAAG,SAAS,aAM5F,CAAA;AAEJ,eAAO,MAAM,uBAAuB,YAAa,OAAO,WAAW,cAAc,SAoEhF,CAAA"}
|