@wirecat/drive-cli 0.65.0 → 0.67.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 +2899 -0
- package/dist/bin/drive.js +2 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/browse.d.ts +1 -1
- package/dist/browse.d.ts.map +1 -1
- package/dist/browse.js +1 -1
- package/dist/bundle/{all-profiles-PD7GJHFA.js → all-profiles-DVZUVAPQ.js} +14 -14
- package/dist/bundle/{anthropic-PJKFON5H.js → anthropic-Y45C45O2.js} +20 -13
- package/dist/bundle/{app-server-6ELQA6FJ.js → app-server-GTXUOUGD.js} +67 -56
- package/dist/bundle/{bun-P54TGES2.js → bun-QVJV76QJ.js} +2 -2
- package/dist/bundle/{bun-sqlite-TND5ZRJH.js → bun-sqlite-CC7PIAMH.js} +9 -9
- package/dist/bundle/{chunk-Y5PKRITX.js → chunk-2MEVCMBW.js} +5 -5
- package/dist/bundle/{chunk-ZILALBYQ.js → chunk-2PIA45FC.js} +7 -5
- package/dist/bundle/{chunk-SIWXYB4E.js → chunk-2Y3YBDZX.js} +3123 -2851
- package/dist/bundle/{chunk-54V4H6PM.js → chunk-3RG6LL25.js} +12 -12
- package/dist/bundle/{chunk-UTNRBOEN.js → chunk-4G7WQNG7.js} +3 -2
- package/dist/bundle/{chunk-OWMZUWCM.js → chunk-4VH7M2OD.js} +6 -14
- package/dist/bundle/{chunk-EM7NL5ES.js → chunk-5DMPGTNR.js} +3 -3
- package/dist/bundle/{chunk-W2XY6C5S.js → chunk-5TK2YQCO.js} +2 -2
- package/dist/bundle/{chunk-NQ5XMSLA.js → chunk-5TSILGTO.js} +21668 -28647
- package/dist/bundle/{chunk-FBHSWQU7.js → chunk-6ERQE4FS.js} +319 -102
- package/dist/bundle/{chunk-4AOINPN2.js → chunk-7AZCAUST.js} +8 -2
- package/dist/bundle/{chunk-DA63E2UM.js → chunk-7J2IP3WL.js} +18 -15
- package/dist/bundle/{chunk-JPPPLKAO.js → chunk-7JKECODO.js} +1 -2
- package/dist/bundle/{chunk-SEQWBZYH.js → chunk-AAZPDWRD.js} +1 -1
- package/dist/bundle/{chunk-CWLL63JD.js → chunk-ABJQ6IDU.js} +17 -17
- package/dist/bundle/{chunk-PHOL2DZM.js → chunk-AJ3DFPRT.js} +63 -5
- package/dist/bundle/{chunk-4EDWLR22.js → chunk-AZKFZ7J7.js} +1 -1
- package/dist/bundle/{chunk-IMHW7VIV.js → chunk-BHSLMJF7.js} +5 -5
- package/dist/bundle/{chunk-EHU6EYGO.js → chunk-C72WYRXD.js} +12 -12
- package/dist/bundle/chunk-CWDC6QJM.js +72 -0
- package/dist/bundle/{chunk-TTP4NOP3.js → chunk-D4MVEOU2.js} +4 -4
- package/dist/bundle/{chunk-ZR2EJPMQ.js → chunk-DAFKV6DJ.js} +226 -18
- package/dist/bundle/{chunk-RNHGQ35R.js → chunk-E3XA56TS.js} +1 -1
- package/dist/bundle/{chunk-ELJUBPY4.js → chunk-EA2OB75T.js} +1 -1
- package/dist/bundle/{chunk-7TAP7Y2E.js → chunk-ETAFFY3J.js} +196 -112
- package/dist/bundle/{chunk-D6Z43SOG.js → chunk-EXWOOST5.js} +402 -362
- package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
- package/dist/bundle/{chunk-HP3NT6JJ.js → chunk-FOMQ4MG3.js} +3 -3
- package/dist/bundle/{chunk-VMAMRFFC.js → chunk-FS2PG2PE.js} +117 -44
- package/dist/bundle/{chunk-6DCLZLGX.js → chunk-HCZYJMBP.js} +1 -1
- package/dist/bundle/{chunk-OFJXHEFT.js → chunk-HJF2QGOX.js} +93 -31
- package/dist/bundle/{chunk-XPWZSW6Y.js → chunk-IJCUAKR5.js} +4 -4
- package/dist/bundle/{chunk-O6K2E7OA.js → chunk-IRULPE5M.js} +1522 -1107
- package/dist/bundle/{chunk-EU5MD24W.js → chunk-JCNEPYQZ.js} +13 -13
- package/dist/bundle/{chunk-VDZY3L7U.js → chunk-JEMBW6IO.js} +1 -1
- package/dist/bundle/{chunk-Z2ADO6UA.js → chunk-JJHDV32D.js} +2 -2
- package/dist/bundle/{chunk-FA6JNXCC.js → chunk-JLUQZZ26.js} +8 -8
- package/dist/bundle/{chunk-WRAUO5EJ.js → chunk-JO7BJYAP.js} +45 -22
- package/dist/bundle/{chunk-TOVWMURV.js → chunk-JRFKCYMW.js} +22 -7
- package/dist/bundle/{chunk-M7ELUGU6.js → chunk-JY2GZDJL.js} +4 -4
- package/dist/bundle/chunk-LSAIXPAX.js +47 -0
- package/dist/bundle/{chunk-WVJHZIDH.js → chunk-LXRBTXCZ.js} +3 -3
- package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
- package/dist/bundle/{chunk-F56DRBGY.js → chunk-MBLB4TQI.js} +75 -20
- package/dist/bundle/{chunk-4Y5YBFMS.js → chunk-MEQNAZ6R.js} +7 -7
- package/dist/bundle/{chunk-XYE7XZPB.js → chunk-MEY7URZZ.js} +39 -35
- package/dist/bundle/{chunk-IBO23OID.js → chunk-MF46W7PQ.js} +2 -2
- package/dist/bundle/{chunk-7AQGVX5O.js → chunk-MW46BLWH.js} +60 -29
- package/dist/bundle/{chunk-VHQYWFWV.js → chunk-NFIR346J.js} +1 -1
- package/dist/bundle/{chunk-NI5PD5KM.js → chunk-NWYVOHIX.js} +18611 -16472
- package/dist/bundle/chunk-NYECVHFH.js +10283 -0
- package/dist/bundle/{chunk-D7WB54P7.js → chunk-OOBSSU2G.js} +546 -457
- package/dist/bundle/{chunk-VLXWAH5E.js → chunk-P6A77LMP.js} +4 -4
- package/dist/bundle/{chunk-ZD4MB7NH.js → chunk-PDHN4GHU.js} +5 -40
- package/dist/bundle/{chunk-PLP5527C.js → chunk-PV3AWPHR.js} +5 -5
- package/dist/bundle/{chunk-TMHF4BCL.js → chunk-QOKPRFHM.js} +2 -2
- package/dist/bundle/{chunk-JMJIH6JH.js → chunk-RC72RU66.js} +6 -6
- package/dist/bundle/{chunk-NQRTKYJB.js → chunk-RLH6BOEG.js} +47 -80
- package/dist/bundle/{chunk-II4S2DBJ.js → chunk-SJE7UGOW.js} +12 -6
- package/dist/bundle/{chunk-LMKPP2JP.js → chunk-SXJDCRXE.js} +1 -1
- package/dist/bundle/{chunk-B2LPCHQN.js → chunk-T2VAEDJS.js} +4 -4
- package/dist/bundle/{chunk-I272E6UR.js → chunk-U2ERT45N.js} +54 -117
- package/dist/bundle/{chunk-A27UVLPK.js → chunk-UFNE57VY.js} +3 -3
- package/dist/bundle/{chunk-5XSBCMAF.js → chunk-ULH3TNUP.js} +4 -4
- package/dist/bundle/{chunk-3ONWN3IA.js → chunk-UOAHZV3K.js} +161 -48
- package/dist/bundle/{chunk-ECEP4SO3.js → chunk-UPCEHSIZ.js} +10 -10
- package/dist/bundle/{chunk-42G2XNPN.js → chunk-V7E25BUU.js} +2 -2
- package/dist/bundle/{chunk-EZ2OLYEK.js → chunk-VZ5KETIX.js} +14 -5
- package/dist/bundle/{chunk-X7YGGWXI.js → chunk-WBKYZZQT.js} +3 -2
- package/dist/bundle/{chunk-GW3LBY3T.js → chunk-WKIQKGOF.js} +146 -133
- package/dist/bundle/{chunk-O7ZDCOZE.js → chunk-WWW7YTFG.js} +1 -1
- package/dist/bundle/{chunk-2AFI4KGI.js → chunk-XZCF5XU7.js} +7 -7
- package/dist/bundle/chunk-Y2QVNVHK.js +70 -0
- package/dist/bundle/{chunk-WRMJN6UQ.js → chunk-Y5WSRG3F.js} +3 -3
- package/dist/bundle/{chunk-A4QNADEX.js → chunk-YI4DXASF.js} +49 -49
- package/dist/bundle/{chunk-SS4LKLD7.js → chunk-YVUAG7RF.js} +371 -362
- package/dist/bundle/chunk-ZEPDEFVT.js +71 -0
- package/dist/bundle/{chunk-SE352DBY.js → chunk-ZH4H5XTA.js} +1 -1
- package/dist/bundle/{chunk-3HXNDF6Q.js → chunk-ZK46UHDP.js} +2 -2
- package/dist/bundle/{chunk-SNLSEYJO.js → chunk-ZU5VQYNY.js} +1 -1
- package/dist/bundle/cli-U4LSBYDV.js +1101 -0
- package/dist/bundle/command-contract-UU5T24ZZ.js +41 -0
- package/dist/bundle/{command-server-entry-36JXYIJB.js → command-server-entry-PK6FBUPO.js} +31 -30
- package/dist/bundle/{decode-T5ZW57WZ.js → decode-3ZE6NBKV.js} +8 -8
- package/dist/bundle/{dispatch-RMA2XFYA.js → dispatch-WBEOHZDV.js} +9 -9
- package/dist/bundle/drive.js +13 -13
- package/dist/bundle/{echarts-KQ44LPSF.js → echarts-6FWNCNXK.js} +2 -2
- package/dist/bundle/{embed-Q7XST53J.js → embed-DGYBBZUW.js} +9 -9
- package/dist/bundle/{embedder-RWZSBVW2.js → embedder-O7A6VMWI.js} +12 -12
- package/dist/bundle/entry-CDJ2QSU2.js +25 -0
- package/dist/bundle/{failure-7NP4QPIN.js → failure-X6PSLVSO.js} +4 -4
- package/dist/bundle/first-run-UOQW7DN5.js +30 -0
- package/dist/bundle/first-screen-SNDV4YKF.js +39 -0
- package/dist/bundle/google-HPX52KMC.js +45 -0
- package/dist/bundle/{google-api-P5DRHD7L.js → google-api-HIMN4XL5.js} +68 -63
- package/dist/bundle/grants-RO42I6E4.js +111 -0
- package/dist/bundle/{identity-VDV6CHRW.js → identity-NFGHDPLL.js} +8 -6
- package/dist/bundle/{instructions-Q45FVY6H.js → instructions-6JAQYCM6.js} +1 -1
- package/dist/bundle/{login-XKN3NI6X.js → login-RZOQN63N.js} +73 -70
- package/dist/bundle/{mcp-7KQUJNFN.js → mcp-TDKGDB4V.js} +2 -2
- package/dist/bundle/{node-MSW565D3.js → node-KSIX3GIH.js} +2 -2
- package/dist/bundle/{node-sqlite-S74XVVHL.js → node-sqlite-4FJ6WJXN.js} +10 -10
- package/dist/bundle/oauth-BKZAMFKK.js +22 -0
- package/dist/bundle/{open-P7UQG7XJ.js → open-4AQJGH42.js} +8 -8
- package/dist/bundle/{openai-DDHJ57KZ.js → openai-24F2OX55.js} +28 -21
- package/dist/bundle/{process-NMUB5SHK.js → process-7NOA2T7H.js} +1 -1
- package/dist/bundle/{program-PJNWP6JW.js → program-7JHMLDEX.js} +306 -692
- package/dist/bundle/{prompt-VOSMK4C2.js → prompt-NM66MAZ4.js} +8 -8
- package/dist/bundle/{reasons-KDAXOC5S.js → reasons-KSYP5VDJ.js} +5 -5
- package/dist/bundle/{recognize-GZIY63HS.js → recognize-DBKV2JYZ.js} +7 -7
- package/dist/bundle/{remote-V3YGN7LN.js → remote-ABWUTBVB.js} +13 -10
- package/dist/bundle/{rerank-XRU6AVN7.js → rerank-FQAU4ENY.js} +10 -10
- package/dist/bundle/{serve-NDOAFA57.js → serve-QLJG4QZD.js} +12 -12
- package/dist/bundle/server-NUBLY5SV.js +74 -0
- package/dist/bundle/{server-BKGWJYMC.js → server-VGZNK5XD.js} +47 -45
- package/dist/bundle/{services-TYDMFQCA.js → services-5KARVUHK.js} +44 -34
- package/dist/bundle/{sqlite-runtime-UAFJKSJR.js → sqlite-runtime-ILF6EFQJ.js} +9 -9
- package/dist/bundle/{start-2ZLDP2OE.js → start-C6EXYXAL.js} +7 -7
- package/dist/bundle/{state-6SP27J2K.js → state-R2M56GPU.js} +9 -9
- package/dist/bundle/{store-4UUY545Q.js → store-2OBVMUQL.js} +21 -19
- package/dist/bundle/{store-EJN27MXI.js → store-DA4K7HWW.js} +23 -21
- package/dist/bundle/store-maintenance-command-KSIPI5B5.js +65 -0
- package/dist/bundle/tokens-VQDGSHRB.js +111 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +5 -3
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/discovery.d.ts +0 -1
- package/dist/commands/discovery.d.ts.map +1 -1
- package/dist/commands/discovery.js +6 -26
- package/dist/commands/discovery.js.map +1 -1
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +7 -6
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +15 -12
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +2 -1
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/transcripts.d.ts +4 -0
- package/dist/commands/transcripts.d.ts.map +1 -0
- package/dist/commands/transcripts.js +42 -0
- package/dist/commands/transcripts.js.map +1 -0
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +17 -3
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.d.ts +16 -4
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +86 -410
- package/dist/contract-overrides.js.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +4 -0
- package/dist/errors.js.map +1 -1
- package/dist/google-api.d.ts.map +1 -1
- package/dist/google-api.js +4 -1
- package/dist/google-api.js.map +1 -1
- package/dist/google.d.ts.map +1 -1
- package/dist/google.js +31 -28
- package/dist/google.js.map +1 -1
- package/dist/identity.d.ts +4 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +22 -0
- package/dist/identity.js.map +1 -1
- package/dist/knowledge.js +2 -2
- package/dist/knowledge.js.map +1 -1
- package/dist/list-queries.d.ts +10 -0
- package/dist/list-queries.d.ts.map +1 -1
- package/dist/list-queries.js +12 -1
- package/dist/list-queries.js.map +1 -1
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +2 -2
- package/dist/login.js.map +1 -1
- package/dist/model.d.ts +4 -1
- package/dist/model.d.ts.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +10 -6
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +0 -1
- package/dist/reasons.js.map +1 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +2 -0
- package/dist/state.js.map +1 -1
- package/dist/store-transition.js +2 -2
- package/dist/store-transition.js.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +7 -7
- package/dist/store.js.map +1 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +5 -1
- package/dist/sync.js.map +1 -1
- package/dist/tokens.d.ts +9 -2
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +18 -15
- package/dist/tokens.js.map +1 -1
- package/dist/transcripts.d.ts +21 -0
- package/dist/transcripts.d.ts.map +1 -0
- package/dist/transcripts.js +48 -0
- package/dist/transcripts.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +7 -7
- package/dist/bundle/chunk-CGQRZRTH.js +0 -26
- package/dist/bundle/chunk-IKHOIXJR.js +0 -27
- package/dist/bundle/chunk-SBZB7HMU.js +0 -1055
- package/dist/bundle/command-contract-25E4PYMD.js +0 -40
- package/dist/bundle/dist-PY3MVR3G.js +0 -21
- package/dist/bundle/entry-HPLW4QL2.js +0 -25
- package/dist/bundle/first-run-RL3RKYZW.js +0 -30
- package/dist/bundle/first-screen-NX3TM2VJ.js +0 -38
- package/dist/bundle/google-DPD5N6AQ.js +0 -42
- package/dist/bundle/grants-TX4MHLI4.js +0 -109
- package/dist/bundle/oauth-6R7AWAES.js +0 -22
- package/dist/bundle/server-QD2MUJJZ.js +0 -72
- package/dist/bundle/store-maintenance-command-LETURZDC.js +0 -60
- package/dist/bundle/tokens-MTFJPTYT.js +0 -107
- /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-XWBPP2HX.js} +0 -0
|
@@ -3,27 +3,35 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
activeProfile,
|
|
5
5
|
paths
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DAFKV6DJ.js";
|
|
7
7
|
import {
|
|
8
8
|
READ_SCOPE,
|
|
9
|
-
WRITE_SCOPE
|
|
10
|
-
|
|
11
|
-
} from "./chunk-NQ5XMSLA.js";
|
|
9
|
+
WRITE_SCOPE
|
|
10
|
+
} from "./chunk-NYECVHFH.js";
|
|
12
11
|
import {
|
|
13
12
|
googleError
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Y2QVNVHK.js";
|
|
14
|
+
import {
|
|
15
|
+
providerRequest
|
|
16
|
+
} from "./chunk-5TSILGTO.js";
|
|
15
17
|
import {
|
|
16
18
|
withTimeLimit
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6ERQE4FS.js";
|
|
18
20
|
import {
|
|
19
21
|
acquireLock
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JCNEPYQZ.js";
|
|
23
|
+
import {
|
|
24
|
+
hostFetch
|
|
25
|
+
} from "./chunk-AJ3DFPRT.js";
|
|
26
|
+
import {
|
|
27
|
+
DESKTOP
|
|
28
|
+
} from "./chunk-LSAIXPAX.js";
|
|
21
29
|
import {
|
|
22
30
|
Credentials,
|
|
23
31
|
isMovedRun,
|
|
24
32
|
keyringService,
|
|
25
33
|
systemKeyring
|
|
26
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-MW46BLWH.js";
|
|
27
35
|
import {
|
|
28
36
|
minLength,
|
|
29
37
|
nullable,
|
|
@@ -33,16 +41,16 @@ import {
|
|
|
33
41
|
pipe,
|
|
34
42
|
safeParse,
|
|
35
43
|
string
|
|
36
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-JRFKCYMW.js";
|
|
37
45
|
import {
|
|
38
46
|
CliError,
|
|
39
47
|
isCliError
|
|
40
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-EA2OB75T.js";
|
|
41
49
|
import {
|
|
42
50
|
__name
|
|
43
51
|
} from "./chunk-ZVVMGPBJ.js";
|
|
44
52
|
|
|
45
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
|
|
46
54
|
import { createHash, randomBytes } from "node:crypto";
|
|
47
55
|
import { createServer } from "node:http";
|
|
48
56
|
var DEFAULT_TIMEOUT_MS = 3e5;
|
|
@@ -178,12 +186,12 @@ var authorize = /* @__PURE__ */ __name(async (options) => {
|
|
|
178
186
|
}
|
|
179
187
|
}, "authorize");
|
|
180
188
|
|
|
181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
|
|
182
190
|
import { createHash as createHash2 } from "node:crypto";
|
|
183
191
|
import { join } from "node:path";
|
|
184
192
|
import { setTimeout as delay } from "node:timers/promises";
|
|
185
193
|
|
|
186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/requests.js
|
|
187
195
|
var REQUEST_LIMIT_MS = 3e4;
|
|
188
196
|
var TOKEN_LOG_EVENT = "oauth.token";
|
|
189
197
|
var object2 = /* @__PURE__ */ __name((value) => {
|
|
@@ -303,7 +311,7 @@ var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
|
|
|
303
311
|
});
|
|
304
312
|
}, "revokeToken");
|
|
305
313
|
|
|
306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
|
|
307
315
|
var inFlight = /* @__PURE__ */ new Map();
|
|
308
316
|
var refreshedInMemory = /* @__PURE__ */ new Map();
|
|
309
317
|
var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
@@ -328,7 +336,7 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
|
328
336
|
}), "context");
|
|
329
337
|
const exchange = /* @__PURE__ */ __name((params, ctx) => provider.exchange ? provider.exchange(params, ctx) : requestTokens(provider, params, ctx), "exchange");
|
|
330
338
|
const notSignedIn = /* @__PURE__ */ __name(() => new CliError("authentication_error", `not signed in to ${provider.name}; run ${options.signInCommand}`, {
|
|
331
|
-
reason: "
|
|
339
|
+
reason: "session.missing"
|
|
332
340
|
}), "notSignedIn");
|
|
333
341
|
const busy = /* @__PURE__ */ __name((error) => isCliError(error) && error.details.reason === "file.locked", "busy");
|
|
334
342
|
const acquire = /* @__PURE__ */ __name(async () => {
|
|
@@ -465,7 +473,24 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
|
465
473
|
};
|
|
466
474
|
}, "tokenKeeper");
|
|
467
475
|
|
|
468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
476
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/provider.js
|
|
477
|
+
var googleProvider = /* @__PURE__ */ __name((client, { loginHint } = {}) => ({
|
|
478
|
+
id: "google",
|
|
479
|
+
name: "Google",
|
|
480
|
+
authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
|
|
481
|
+
tokenUrl: "https://oauth2.googleapis.com/token",
|
|
482
|
+
revokeUrl: "https://oauth2.googleapis.com/revoke",
|
|
483
|
+
client,
|
|
484
|
+
redirect: { kind: "loopback" },
|
|
485
|
+
// Without offline access Google returns no refresh token; without consent it does not return one again.
|
|
486
|
+
authorizeParams: {
|
|
487
|
+
access_type: "offline",
|
|
488
|
+
prompt: "select_account consent",
|
|
489
|
+
...loginHint ? { login_hint: loginHint } : {}
|
|
490
|
+
}
|
|
491
|
+
}), "googleProvider");
|
|
492
|
+
|
|
493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/storage.js
|
|
469
494
|
var invalid = /* @__PURE__ */ __name(() => new CliError("authentication_error", "the saved sign-in cannot be read; sign in again", { reason: "oauth.invalid" }), "invalid");
|
|
470
495
|
var parse = /* @__PURE__ */ __name((raw) => {
|
|
471
496
|
let value;
|
|
@@ -490,6 +515,44 @@ var previousOf = /* @__PURE__ */ __name((raw) => {
|
|
|
490
515
|
}
|
|
491
516
|
}, "previousOf");
|
|
492
517
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, field]) => field !== void 0)), "defined");
|
|
518
|
+
var standardCodec = /* @__PURE__ */ __name((providerId) => ({
|
|
519
|
+
decode: /* @__PURE__ */ __name((raw) => {
|
|
520
|
+
const value = parse(raw);
|
|
521
|
+
const refreshToken = text(value.refreshToken);
|
|
522
|
+
const clientId = text(value.clientId);
|
|
523
|
+
if (value.version !== 1 || value.provider !== providerId || !refreshToken || !clientId)
|
|
524
|
+
throw invalid();
|
|
525
|
+
if (!Array.isArray(value.scopes) || !value.scopes.every((scope) => typeof scope === "string"))
|
|
526
|
+
throw invalid();
|
|
527
|
+
const source = text(value.clientSource);
|
|
528
|
+
return {
|
|
529
|
+
client: defined({ clientId, clientSecret: text(value.clientSecret), source }),
|
|
530
|
+
tokens: defined({
|
|
531
|
+
accessToken: text(value.accessToken),
|
|
532
|
+
refreshToken,
|
|
533
|
+
expiresAt: finite(value.expiresAt),
|
|
534
|
+
scopes: value.scopes,
|
|
535
|
+
tokenType: text(value.tokenType)
|
|
536
|
+
})
|
|
537
|
+
};
|
|
538
|
+
}, "decode"),
|
|
539
|
+
encode: /* @__PURE__ */ __name(({ tokens, client, previous, extra }) => JSON.stringify(defined({
|
|
540
|
+
...previousOf(previous),
|
|
541
|
+
...extra,
|
|
542
|
+
version: 1,
|
|
543
|
+
provider: providerId,
|
|
544
|
+
clientId: client.clientId,
|
|
545
|
+
// Only WireCat's secret, which is public: a later release may ship another default app, and a refresh needs
|
|
546
|
+
// the secret of the app that signed in. An owner's own secret stays where the owner keeps it.
|
|
547
|
+
clientSecret: client.source === "constants" ? client.clientSecret : void 0,
|
|
548
|
+
clientSource: client.source,
|
|
549
|
+
accessToken: tokens.accessToken,
|
|
550
|
+
refreshToken: tokens.refreshToken,
|
|
551
|
+
expiresAt: tokens.expiresAt,
|
|
552
|
+
scopes: tokens.scopes,
|
|
553
|
+
tokenType: tokens.tokenType
|
|
554
|
+
})), "encode")
|
|
555
|
+
}), "standardCodec");
|
|
493
556
|
var driveSessionCodec = {
|
|
494
557
|
decode: /* @__PURE__ */ __name((raw) => {
|
|
495
558
|
const value = parse(raw);
|
|
@@ -539,6 +602,7 @@ var driveSessionCodec = {
|
|
|
539
602
|
return JSON.stringify(session);
|
|
540
603
|
}, "encode")
|
|
541
604
|
};
|
|
605
|
+
var googleStandard = standardCodec("google");
|
|
542
606
|
var keyringFailure = /* @__PURE__ */ __name((thrown, secret) => {
|
|
543
607
|
const failure = new CliError("configuration_error", "could not reach the saved sign-in; use an available keyring or file storage", { reason: "oauth.not-saved" });
|
|
544
608
|
const words = thrown instanceof Error ? thrown.message : String(thrown);
|
|
@@ -616,6 +680,14 @@ var Session = object({
|
|
|
616
680
|
token_type: optional(nullable(string()))
|
|
617
681
|
})
|
|
618
682
|
});
|
|
683
|
+
var viaDeclaredHosts = /* @__PURE__ */ __name((timeoutMs) => (input, init) => hostFetch({ hosts: DESKTOP.hosts, ...timeoutMs ? { timeoutMs } : {} })(input, init), "viaDeclaredHosts");
|
|
684
|
+
var googleFetch = viaDeclaredHosts();
|
|
685
|
+
var sdkFetch = viaDeclaredHosts(24 * 60 * 6e4);
|
|
686
|
+
var transporterOptions = /* @__PURE__ */ __name((signal) => ({
|
|
687
|
+
timeout: 3e4,
|
|
688
|
+
fetchImplementation: sdkFetch,
|
|
689
|
+
...signal ? { signal } : {}
|
|
690
|
+
}), "transporterOptions");
|
|
619
691
|
var credentialOptions = /* @__PURE__ */ __name((env, storage, keyring) => ({
|
|
620
692
|
configDir: paths(env).config,
|
|
621
693
|
service: "drive-cli",
|
|
@@ -634,17 +706,6 @@ var saveSession = /* @__PURE__ */ __name((env, name, session, storage, keyring)
|
|
|
634
706
|
throw notSaved();
|
|
635
707
|
}
|
|
636
708
|
}, "saveSession");
|
|
637
|
-
var googleProvider = /* @__PURE__ */ __name((client) => ({
|
|
638
|
-
id: "google",
|
|
639
|
-
name: "Google",
|
|
640
|
-
authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
|
|
641
|
-
tokenUrl: "https://oauth2.googleapis.com/token",
|
|
642
|
-
revokeUrl: "https://oauth2.googleapis.com/revoke",
|
|
643
|
-
client,
|
|
644
|
-
redirect: { kind: "loopback" },
|
|
645
|
-
// Without offline access Google returns no refresh token; without consent it does not return one again.
|
|
646
|
-
authorizeParams: { access_type: "offline", prompt: "select_account consent" }
|
|
647
|
-
}), "googleProvider");
|
|
648
709
|
var sessionKeeper = /* @__PURE__ */ __name((options) => tokenKeeper({
|
|
649
710
|
provider: googleProvider(options.client),
|
|
650
711
|
storage: credentialStorage({
|
|
@@ -653,7 +714,7 @@ var sessionKeeper = /* @__PURE__ */ __name((options) => tokenKeeper({
|
|
|
653
714
|
codec: driveSessionCodec
|
|
654
715
|
}),
|
|
655
716
|
lockDir: paths(options.env).config,
|
|
656
|
-
fetch: options.fetch ??
|
|
717
|
+
fetch: options.fetch ?? googleFetch,
|
|
657
718
|
signInCommand: `drive ${options.name} session start`,
|
|
658
719
|
// Above the client's own 5-minute early refresh, so a token it asks to replace is replaced.
|
|
659
720
|
freshForMs: 6 * 6e4,
|
|
@@ -672,7 +733,7 @@ var authorizedClient = /* @__PURE__ */ __name((env, name, keyring, signal) => {
|
|
|
672
733
|
}
|
|
673
734
|
if (!secret)
|
|
674
735
|
throw new CliError("authentication_error", `this profile has no saved Google sign-in \u2014 run drive ${name} session start`, {
|
|
675
|
-
reason: "
|
|
736
|
+
reason: "session.missing"
|
|
676
737
|
});
|
|
677
738
|
let parsed;
|
|
678
739
|
try {
|
|
@@ -696,7 +757,7 @@ var authorizedClient = /* @__PURE__ */ __name((env, name, keyring, signal) => {
|
|
|
696
757
|
const client = new OAuth2Client({
|
|
697
758
|
clientId: session.clientId,
|
|
698
759
|
clientSecret: session.clientSecret,
|
|
699
|
-
transporterOptions:
|
|
760
|
+
transporterOptions: transporterOptions(signal)
|
|
700
761
|
});
|
|
701
762
|
client.refreshHandler = async () => {
|
|
702
763
|
try {
|
|
@@ -807,10 +868,11 @@ var observeRequests = /* @__PURE__ */ __name((client) => {
|
|
|
807
868
|
}, "observeRequests");
|
|
808
869
|
|
|
809
870
|
export {
|
|
871
|
+
googleFetch,
|
|
872
|
+
transporterOptions,
|
|
810
873
|
credentials,
|
|
811
874
|
notSaved,
|
|
812
875
|
saveSession,
|
|
813
|
-
googleProvider,
|
|
814
876
|
sessionKeeper,
|
|
815
877
|
authorizedClient,
|
|
816
878
|
covers,
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
singleLine
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HCZYJMBP.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
|
|
11
11
|
var FIRST_PARTY_TOOLS = [
|
|
12
12
|
{ name: "tg", package: "@wirecat/tg-cli" },
|
|
13
13
|
{ name: "max", package: "@wirecat/max-cli" },
|
|
@@ -31,7 +31,7 @@ var DESCRIBE_FLAG = "--wcat-describe";
|
|
|
31
31
|
var DESCRIBE_MAX_BYTES = 64 * 1024;
|
|
32
32
|
var DISPATCH_FLAG = "--wcat-dispatch";
|
|
33
33
|
|
|
34
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
34
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
|
|
35
35
|
var DESCRIBE_FORMAT = 1;
|
|
36
36
|
var DESCRIBE_MANIFEST_FORMAT = 2;
|
|
37
37
|
var describeAnswer = /* @__PURE__ */ __name((tool, manifest) => {
|
|
@@ -74,7 +74,7 @@ var parseDescribe = /* @__PURE__ */ __name((text) => {
|
|
|
74
74
|
};
|
|
75
75
|
}, "parseDescribe");
|
|
76
76
|
|
|
77
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
77
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
|
|
78
78
|
import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
79
79
|
import { join } from "node:path";
|
|
80
80
|
var SHIM_FORMAT = 2;
|