@wirecat/drive-cli 0.49.0 → 0.51.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/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-WK2XXGPU.js → all-profiles-H3APJWSO.js} +8 -8
- package/dist/bundle/{anthropic-R354D7GT.js → anthropic-P7DXFYFE.js} +5 -5
- package/dist/bundle/{app-server-3YHJ757G.js → app-server-IQUR7ZC2.js} +52 -52
- package/dist/bundle/{bun-JVDJVDHL.js → bun-LZUEW2ML.js} +2 -2
- package/dist/bundle/{bun-sqlite-KZCZWSRZ.js → bun-sqlite-6LUE7UA6.js} +4 -4
- package/dist/bundle/{chunk-NFU3OBCC.js → chunk-2TPENYCK.js} +4 -4
- package/dist/bundle/{chunk-SSD2V4HR.js → chunk-35IHF562.js} +280 -259
- package/dist/bundle/{chunk-U77RLMOK.js → chunk-3KTDFSSK.js} +2 -2
- package/dist/bundle/{chunk-463NMG57.js → chunk-4GFAOETW.js} +3 -3
- package/dist/bundle/{chunk-EOZPMJJP.js → chunk-4YG2FZ53.js} +7 -7
- package/dist/bundle/{chunk-JMRHDZMV.js → chunk-5C7RKU7O.js} +33 -32
- package/dist/bundle/{chunk-75VCGSNB.js → chunk-6FXFYXTR.js} +15 -15
- package/dist/bundle/{chunk-QEM3MOSB.js → chunk-7LYVWMKD.js} +8 -8
- package/dist/bundle/{chunk-467AQO7E.js → chunk-7ZNM6KXP.js} +7 -7
- package/dist/bundle/{chunk-P7INAZIT.js → chunk-AKW5MNQP.js} +5 -5
- package/dist/bundle/{chunk-HD3TFIT4.js → chunk-AUW45JPI.js} +6 -6
- package/dist/bundle/{chunk-JZ3SUK2M.js → chunk-BMI5VCR4.js} +5 -5
- package/dist/bundle/{chunk-22LTNYO2.js → chunk-BVDAP3FQ.js} +9 -9
- package/dist/bundle/{chunk-CCLDCM7J.js → chunk-CT6Z6Z64.js} +410 -244
- package/dist/bundle/{chunk-ABVFH76X.js → chunk-CX7HQ6KK.js} +5 -5
- package/dist/bundle/{chunk-MC77UZVA.js → chunk-D222O57O.js} +6 -6
- package/dist/bundle/{chunk-HF2T7E67.js → chunk-D3UFQC7K.js} +49 -49
- package/dist/bundle/{chunk-KK3BA4IS.js → chunk-DDD3FS6G.js} +2 -2
- package/dist/bundle/{chunk-254VYUWN.js → chunk-DEVPGI27.js} +17 -17
- package/dist/bundle/{chunk-BJ3JRO34.js → chunk-EY4CUQW2.js} +7 -7
- package/dist/bundle/{chunk-RAAI3JLI.js → chunk-F3PPSIKI.js} +3 -3
- package/dist/bundle/{chunk-6Z3W7LTD.js → chunk-FCZ762RV.js} +8 -8
- package/dist/bundle/{chunk-Y2AUB4TJ.js → chunk-FV5WG4WU.js} +80 -33
- package/dist/bundle/{chunk-R2QRP7EJ.js → chunk-G75FZQAZ.js} +13 -9
- package/dist/bundle/{chunk-2BADVV4A.js → chunk-GK2VUKQY.js} +2 -2
- package/dist/bundle/{chunk-3UHJC6HH.js → chunk-HBRTKJ3J.js} +7 -7
- package/dist/bundle/{chunk-VHT2WI4I.js → chunk-HGWMX7BM.js} +101 -73
- package/dist/bundle/{chunk-XVXXWNAA.js → chunk-HYT3FJVB.js} +4 -4
- package/dist/bundle/{chunk-HIAO4MPA.js → chunk-I7EP3VPJ.js} +1 -1
- package/dist/bundle/{chunk-P4OU3OVF.js → chunk-J2S7QDOP.js} +14 -14
- package/dist/bundle/{chunk-FB7I5JWC.js → chunk-JI5KFKTL.js} +6 -6
- package/dist/bundle/{chunk-IRDGH7DV.js → chunk-K3EK4MTU.js} +3 -3
- package/dist/bundle/{chunk-5KR7BKDV.js → chunk-K6JSVXDN.js} +5 -5
- package/dist/bundle/{chunk-5ISHP4TK.js → chunk-LLMHJE5Q.js} +2 -2
- package/dist/bundle/{chunk-7BA3HL7N.js → chunk-LZKPT7GY.js} +35 -35
- package/dist/bundle/{chunk-CB5NGX6E.js → chunk-MPTD5P53.js} +2 -2
- package/dist/bundle/{chunk-MP2UCK3Z.js → chunk-N33EOINW.js} +4 -4
- package/dist/bundle/{chunk-KYJYOZYG.js → chunk-NO34DAIB.js} +6 -6
- package/dist/bundle/{chunk-PPXNEHYX.js → chunk-NRWDEBJB.js} +8 -8
- package/dist/bundle/{chunk-FZQSGLHU.js → chunk-NVHPYKYC.js} +11 -11
- package/dist/bundle/{chunk-2ZFR67KY.js → chunk-OASIFIXM.js} +2 -2
- package/dist/bundle/{chunk-MFS52LTZ.js → chunk-OKSS7YUN.js} +1 -1
- package/dist/bundle/{chunk-HVM5LS5Z.js → chunk-OQVJQSEH.js} +3 -3
- package/dist/bundle/{chunk-MAXN7COO.js → chunk-P3T2SZW2.js} +1 -1
- package/dist/bundle/{chunk-A3FU4RR6.js → chunk-PNUS224S.js} +4 -4
- package/dist/bundle/{chunk-FUJZ5S2Q.js → chunk-POFLDSTX.js} +10 -10
- package/dist/bundle/{chunk-R235IRSJ.js → chunk-PQGIV36R.js} +2 -2
- package/dist/bundle/{chunk-ZK7Y5K63.js → chunk-PRBPVOW4.js} +1 -1
- package/dist/bundle/{chunk-ITZI7T2X.js → chunk-PT6XDCOY.js} +2 -2
- package/dist/bundle/{chunk-2CKGGIWF.js → chunk-Q5CLTK5R.js} +3 -3
- package/dist/bundle/{chunk-NVHB2MHX.js → chunk-SRIPLP7N.js} +4 -4
- package/dist/bundle/{chunk-46X7Z4FD.js → chunk-SRONUWOM.js} +343 -282
- package/dist/bundle/{chunk-E2Y6GJZX.js → chunk-SZWQFR5X.js} +4 -4
- package/dist/bundle/{chunk-IRNX4CO5.js → chunk-TEH76MZK.js} +27 -27
- package/dist/bundle/{chunk-45TPBTR3.js → chunk-TSZJXI4N.js} +21 -21
- package/dist/bundle/{chunk-7WEISHFA.js → chunk-TVJU245P.js} +2 -2
- package/dist/bundle/{chunk-JMOX454R.js → chunk-U3OS6V6S.js} +1 -1
- package/dist/bundle/{chunk-AN7HENGZ.js → chunk-U7DPS46V.js} +108 -96
- package/dist/bundle/{chunk-XLJV3ZOH.js → chunk-UM4E2OFL.js} +1 -1
- package/dist/bundle/{chunk-DKJGYYCP.js → chunk-UMY4IQE2.js} +46 -46
- package/dist/bundle/{chunk-L5RZI2M5.js → chunk-UW7VXKKZ.js} +19 -19
- package/dist/bundle/{chunk-4ORK4UAY.js → chunk-VCPS7Q2W.js} +3 -3
- package/dist/bundle/{chunk-KKZYZ32J.js → chunk-VH4GVA2N.js} +2 -2
- package/dist/bundle/{chunk-IEAZAPC3.js → chunk-WACVI3CS.js} +42 -17
- package/dist/bundle/{chunk-LF7ACSTK.js → chunk-WX2NQO2D.js} +1 -1
- package/dist/bundle/{chunk-HBYE4EP2.js → chunk-WYWXOIGT.js} +1 -1
- package/dist/bundle/{chunk-P4NOTS3U.js → chunk-XBENRRBS.js} +2 -2
- package/dist/bundle/{chunk-W5IDHD6C.js → chunk-XCXUP76D.js} +27 -27
- package/dist/bundle/{chunk-NXFEZQDL.js → chunk-XE2GEE3E.js} +26 -26
- package/dist/bundle/{chunk-BQV3WYXW.js → chunk-XXLTVVMT.js} +31 -21
- package/dist/bundle/{chunk-YYMHFXHK.js → chunk-Y4YBW5S4.js} +2 -2
- package/dist/bundle/{chunk-VAGF723Z.js → chunk-Y73IZWRI.js} +1 -1
- package/dist/bundle/{chunk-624B6G64.js → chunk-YLC4JVQZ.js} +5 -5
- package/dist/bundle/{chunk-2DLAJGRN.js → chunk-YOABRW2M.js} +1 -1
- package/dist/bundle/{chunk-YOF5BC4G.js → chunk-YVQJPLPU.js} +2 -2
- package/dist/bundle/{chunk-EF2RCQ3L.js → chunk-YXHMEFL7.js} +1 -1
- package/dist/bundle/{chunk-W5EUHV3J.js → chunk-Z3GWVRW3.js} +1 -1
- package/dist/bundle/{chunk-65AW2AEQ.js → chunk-Z6KTSXE3.js} +2 -2
- package/dist/bundle/{chunk-HQ2PGEOK.js → chunk-ZKAAFY4C.js} +11 -11
- package/dist/bundle/command-contract-R6CGYG7L.js +38 -0
- package/dist/bundle/{decode-BE3VDYTJ.js → decode-4EENADOV.js} +4 -4
- package/dist/bundle/drive.js +7 -7
- package/dist/bundle/{echarts-4OQHS575.js → echarts-ZFC37XW7.js} +2 -2
- package/dist/bundle/{embed-QR76SJDI.js → embed-UZMNP26C.js} +5 -5
- package/dist/bundle/{embedder-EMIDKBYV.js → embedder-7VDWDBKF.js} +8 -8
- package/dist/bundle/{entry-FE4REJDO.js → entry-JJKCHVIK.js} +6 -6
- package/dist/bundle/failure-VBQBKCD5.js +37 -0
- package/dist/bundle/{first-run-ALPI62PX.js → first-run-FJTEUJBF.js} +9 -9
- package/dist/bundle/first-screen-NSPQWNMQ.js +36 -0
- package/dist/bundle/{google-NV75VSCD.js → google-JBJASYKY.js} +9 -9
- package/dist/bundle/google-api-2FKF4UUN.js +82 -0
- package/dist/bundle/{identity-NZ7SP6OL.js → identity-XE73ALJH.js} +2 -2
- package/dist/bundle/{instructions-3QZBKKPF.js → instructions-Q4ASITKO.js} +1 -1
- package/dist/bundle/{login-KNBM6XUX.js → login-BD2WQT5F.js} +62 -62
- package/dist/bundle/{mcp-XY2FGGUM.js → mcp-G6U2Q63E.js} +76 -76
- package/dist/bundle/mcp-H3XD47NW.js +95 -0
- package/dist/bundle/{mcp-OQBZXELQ.js → mcp-ZYZ4DFW2.js} +2 -2
- package/dist/bundle/{node-R2BLYUSB.js → node-CYM7VXFR.js} +2 -2
- package/dist/bundle/{node-sqlite-PMRVP442.js → node-sqlite-RK4MHW57.js} +4 -4
- package/dist/bundle/{oauth-NM2AKRRT.js → oauth-CQXQRHJR.js} +6 -6
- package/dist/bundle/{open-XZH5ZNDA.js → open-WSE4NBD2.js} +3 -3
- package/dist/bundle/{process-IX5YWGDP.js → process-7HHZZZLA.js} +1 -1
- package/dist/bundle/{program-MDWQHGBY.js → program-ZMQYZNV5.js} +95 -88
- package/dist/bundle/{prompt-5K6XGWSK.js → prompt-YSBBQJGF.js} +4 -4
- package/dist/bundle/{reasons-GF2TYGX6.js → reasons-366PI7OV.js} +3 -3
- package/dist/bundle/{recognize-U7GDD6T2.js → recognize-AZKGPCAS.js} +3 -3
- package/dist/bundle/{remote-ZWXOGNQX.js → remote-EYSK3XKD.js} +6 -6
- package/dist/bundle/{rerank-YRQBCS63.js → rerank-LOW6VIDF.js} +6 -6
- package/dist/bundle/{serve-6PQ7K5RK.js → serve-UJ52HGA7.js} +8 -8
- package/dist/bundle/server-CA2VLY25.js +56 -0
- package/dist/bundle/server-TW75RDEP.js +69 -0
- package/dist/bundle/{services-QBIQX236.js → services-B4QUSCFN.js} +28 -28
- package/dist/bundle/{sqlite-runtime-7Q5UD2VR.js → sqlite-runtime-GEURBVK5.js} +4 -4
- package/dist/bundle/{state-U72TC26L.js → state-OJNSKOXO.js} +5 -5
- package/dist/bundle/{store-B4RAJ63G.js → store-62SBP45X.js} +14 -14
- package/dist/bundle/{store-FYABCSIH.js → store-FTS2HVVB.js} +16 -16
- package/dist/bundle/store-maintenance-command-FQMB3R4E.js +57 -0
- package/dist/bundle/tokens-JALZUGEM.js +103 -0
- package/dist/commands/search.js +1 -1
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +10 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/contract-overrides.js +1 -1
- package/dist/contract-overrides.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +2 -2
- package/dist/tokens.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/command-contract-AEA45IX7.js +0 -38
- package/dist/bundle/failure-GYOTW6NN.js +0 -37
- package/dist/bundle/first-screen-JLS57PIT.js +0 -36
- package/dist/bundle/google-api-6623OUF2.js +0 -82
- package/dist/bundle/mcp-4NPK6BM3.js +0 -95
- package/dist/bundle/server-O7SS6NAY.js +0 -56
- package/dist/bundle/server-WT57TF6S.js +0 -69
- package/dist/bundle/store-maintenance-command-DAF5NI3T.js +0 -57
- package/dist/bundle/tokens-DISQJKDM.js +0 -103
- /package/dist/bundle/{chunk-O5EHUB2V.js → chunk-2WNDZFGG.js} +0 -0
- /package/dist/bundle/{chunk-YLBNPI7H.js → chunk-UO5O3665.js} +0 -0
|
@@ -3,24 +3,24 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
activeProfile,
|
|
5
5
|
paths
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YLC4JVQZ.js";
|
|
7
7
|
import {
|
|
8
8
|
READ_SCOPE,
|
|
9
9
|
WRITE_SCOPE,
|
|
10
10
|
providerRequest
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-35IHF562.js";
|
|
12
12
|
import {
|
|
13
13
|
googleError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YOABRW2M.js";
|
|
15
15
|
import {
|
|
16
16
|
acquireLock
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CT6Z6Z64.js";
|
|
18
18
|
import {
|
|
19
19
|
Credentials,
|
|
20
|
+
isMovedRun,
|
|
20
21
|
keyringService,
|
|
21
|
-
pathsAreOverridden,
|
|
22
22
|
systemKeyring
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HGWMX7BM.js";
|
|
24
24
|
import {
|
|
25
25
|
CliError,
|
|
26
26
|
isCliError,
|
|
@@ -32,12 +32,12 @@ import {
|
|
|
32
32
|
pipe,
|
|
33
33
|
safeParse,
|
|
34
34
|
string
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-EY4CUQW2.js";
|
|
36
36
|
import {
|
|
37
37
|
__name
|
|
38
38
|
} from "./chunk-ZVVMGPBJ.js";
|
|
39
39
|
|
|
40
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
|
|
41
41
|
import { createHash, randomBytes } from "node:crypto";
|
|
42
42
|
import { createServer } from "node:http";
|
|
43
43
|
var DEFAULT_TIMEOUT_MS = 3e5;
|
|
@@ -159,12 +159,12 @@ var authorize = /* @__PURE__ */ __name(async (options) => {
|
|
|
159
159
|
}
|
|
160
160
|
}, "authorize");
|
|
161
161
|
|
|
162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
|
|
163
163
|
import { createHash as createHash2 } from "node:crypto";
|
|
164
164
|
import { join } from "node:path";
|
|
165
165
|
import { setTimeout as delay } from "node:timers/promises";
|
|
166
166
|
|
|
167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
167
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/oauth/requests.js
|
|
168
168
|
var REQUEST_LIMIT_MS = 3e4;
|
|
169
169
|
var TOKEN_LOG_EVENT = "oauth.token";
|
|
170
170
|
var object2 = /* @__PURE__ */ __name((value) => {
|
|
@@ -281,8 +281,9 @@ var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
|
|
|
281
281
|
});
|
|
282
282
|
}, "revokeToken");
|
|
283
283
|
|
|
284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
|
|
285
285
|
var inFlight = /* @__PURE__ */ new Map();
|
|
286
|
+
var refreshedInMemory = /* @__PURE__ */ new Map();
|
|
286
287
|
var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
287
288
|
const { provider, storage, signal, log } = options;
|
|
288
289
|
const now = options.now ?? Date.now;
|
|
@@ -355,21 +356,35 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
|
355
356
|
inFlight.set(lockPath, started);
|
|
356
357
|
return started;
|
|
357
358
|
}, "shared");
|
|
359
|
+
const remembered = /* @__PURE__ */ __name((saved) => {
|
|
360
|
+
const kept = refreshedInMemory.get(lockPath);
|
|
361
|
+
return kept && fresh(kept) && kept.refreshToken === saved.refreshToken ? kept : void 0;
|
|
362
|
+
}, "remembered");
|
|
363
|
+
const forget = /* @__PURE__ */ __name(() => refreshedInMemory.delete(lockPath), "forget");
|
|
358
364
|
const tokens = /* @__PURE__ */ __name(async () => {
|
|
359
365
|
const seen = storage.read();
|
|
360
366
|
if (!seen)
|
|
361
367
|
throw notSignedIn();
|
|
362
368
|
if (fresh(seen.tokens))
|
|
363
369
|
return seen.tokens;
|
|
370
|
+
const kept = remembered(seen.tokens);
|
|
371
|
+
if (kept)
|
|
372
|
+
return kept;
|
|
364
373
|
return shared(async () => {
|
|
365
374
|
const current = storage.read();
|
|
366
375
|
if (!current)
|
|
367
376
|
throw notSignedIn();
|
|
368
377
|
if (fresh(current.tokens) || current.tokens.refreshToken !== seen.tokens.refreshToken)
|
|
369
378
|
return current.tokens;
|
|
379
|
+
const keptMeanwhile = remembered(current.tokens);
|
|
380
|
+
if (keptMeanwhile)
|
|
381
|
+
return keptMeanwhile;
|
|
370
382
|
const client = clientOf(current);
|
|
371
383
|
const refreshed = await exchange({ grant_type: "refresh_token", refresh_token: current.tokens.refreshToken }, context(client, current.tokens));
|
|
372
|
-
storage.
|
|
384
|
+
if (storage.moved && refreshed.refreshToken === current.tokens.refreshToken)
|
|
385
|
+
refreshedInMemory.set(lockPath, refreshed);
|
|
386
|
+
else
|
|
387
|
+
storage.write({ tokens: refreshed, client });
|
|
373
388
|
return refreshed;
|
|
374
389
|
});
|
|
375
390
|
}, "tokens");
|
|
@@ -392,11 +407,18 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
|
392
407
|
code_verifier: authorization.codeVerifier
|
|
393
408
|
}, context(client));
|
|
394
409
|
const extra = await accept?.(received) ?? void 0;
|
|
395
|
-
await locked(async () =>
|
|
410
|
+
await locked(async () => {
|
|
411
|
+
forget();
|
|
412
|
+
storage.write({ tokens: received, client, ...extra ? { extra } : {} });
|
|
413
|
+
});
|
|
396
414
|
return { scopes: received.scopes };
|
|
397
415
|
}, "signIn"),
|
|
398
|
-
save: /* @__PURE__ */ __name((saved, extra) => locked(async () =>
|
|
416
|
+
save: /* @__PURE__ */ __name((saved, extra) => locked(async () => {
|
|
417
|
+
forget();
|
|
418
|
+
storage.write({ tokens: saved, client: clientOf(storage.read()), ...extra ? { extra } : {} });
|
|
419
|
+
}), "save"),
|
|
399
420
|
signOut: /* @__PURE__ */ __name(({ revoke = false } = {}) => locked(async () => {
|
|
421
|
+
forget();
|
|
400
422
|
const current = storage.read();
|
|
401
423
|
let revoked = false;
|
|
402
424
|
if (revoke && current) {
|
|
@@ -408,7 +430,7 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
|
|
|
408
430
|
};
|
|
409
431
|
}, "tokenKeeper");
|
|
410
432
|
|
|
411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/oauth/storage.js
|
|
412
434
|
var invalid = /* @__PURE__ */ __name(() => new CliError("authentication_error", "the saved sign-in cannot be read; sign in again", { reason: "oauth.invalid" }), "invalid");
|
|
413
435
|
var parse = /* @__PURE__ */ __name((raw) => {
|
|
414
436
|
let value;
|
|
@@ -488,6 +510,7 @@ var credentialStorage = /* @__PURE__ */ __name((options) => {
|
|
|
488
510
|
throw new CliError("configuration_error", "a sign-in store needs its keyring passed in, never a default");
|
|
489
511
|
const credentials2 = new Credentials(options.credentials);
|
|
490
512
|
const { account, codec } = options;
|
|
513
|
+
const moved = options.credentials.isolated === true || options.credentials.keyring === systemKeyring && isMovedRun({ appName: options.credentials.service, env: options.credentials.env ?? process.env });
|
|
491
514
|
const service = keyringService(options.credentials.service, options.credentials.configDir, options.credentials.isolated);
|
|
492
515
|
const raw = /* @__PURE__ */ __name((name) => {
|
|
493
516
|
try {
|
|
@@ -512,13 +535,15 @@ var credentialStorage = /* @__PURE__ */ __name((options) => {
|
|
|
512
535
|
if (found === void 0)
|
|
513
536
|
continue;
|
|
514
537
|
codec.decode(found);
|
|
515
|
-
|
|
538
|
+
if (!moved)
|
|
539
|
+
save(found);
|
|
516
540
|
return found;
|
|
517
541
|
}
|
|
518
542
|
return void 0;
|
|
519
543
|
}, "current");
|
|
520
544
|
return {
|
|
521
545
|
key: `${service}\0${account}`,
|
|
546
|
+
moved,
|
|
522
547
|
probe: /* @__PURE__ */ __name(() => {
|
|
523
548
|
raw(account);
|
|
524
549
|
}, "probe"),
|
|
@@ -556,7 +581,7 @@ var credentialOptions = /* @__PURE__ */ __name((env, storage, keyring) => ({
|
|
|
556
581
|
service: "drive-cli",
|
|
557
582
|
storage,
|
|
558
583
|
env,
|
|
559
|
-
isolated:
|
|
584
|
+
isolated: isMovedRun({ appName: "drive-cli", prefix: "DRIVE", env }),
|
|
560
585
|
...keyring ? { keyring } : {}
|
|
561
586
|
}), "credentialOptions");
|
|
562
587
|
var credentials = /* @__PURE__ */ __name((env, storage, keyring) => new Credentials(credentialOptions(env, storage, keyring)), "credentials");
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
|
|
8
8
|
var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
|
|
9
9
|
`The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
|
|
10
10
|
"Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
agentOf,
|
|
30
30
|
clientHash
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NRWDEBJB.js";
|
|
32
32
|
import {
|
|
33
33
|
__name
|
|
34
34
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -540,7 +540,7 @@ function toError(value) {
|
|
|
540
540
|
}
|
|
541
541
|
__name(toError, "toError");
|
|
542
542
|
|
|
543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
543
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
544
544
|
var CALLER_META_KEY = "wirecat.dev/caller";
|
|
545
545
|
var PROXY_CLIENT_NAME = "all-profiles";
|
|
546
546
|
var NAME = /^[\w .@()/+-]{1,64}$/;
|
|
@@ -2,22 +2,22 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
refuseLacking
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UW7VXKKZ.js";
|
|
6
6
|
import {
|
|
7
7
|
servingProfiles
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4GFAOETW.js";
|
|
9
9
|
import {
|
|
10
10
|
OFFLINE,
|
|
11
11
|
capability,
|
|
12
12
|
chatIdIn,
|
|
13
13
|
servicesFor,
|
|
14
14
|
throughWrapper
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CT6Z6Z64.js";
|
|
16
16
|
import {
|
|
17
17
|
foldName,
|
|
18
18
|
isId,
|
|
19
19
|
pickPerson
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4YG2FZ53.js";
|
|
21
21
|
import {
|
|
22
22
|
asFirstWord,
|
|
23
23
|
baseContext,
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
recalledAccount,
|
|
29
29
|
rememberAccount,
|
|
30
30
|
rootOf2 as rootOf
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-5C7RKU7O.js";
|
|
32
32
|
import {
|
|
33
33
|
providerErrorKey
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-NRWDEBJB.js";
|
|
35
35
|
import {
|
|
36
36
|
LOG_ATTRIBUTES,
|
|
37
37
|
codeOf,
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
currentRun,
|
|
40
40
|
fromLogAttributes,
|
|
41
41
|
logAttributes
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-XXLTVVMT.js";
|
|
43
43
|
import {
|
|
44
44
|
isCliFailure
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-LLMHJE5Q.js";
|
|
46
46
|
import {
|
|
47
47
|
CEILING_KEY,
|
|
48
48
|
WRITE_KEYS,
|
|
@@ -51,28 +51,28 @@ import {
|
|
|
51
51
|
levelFor,
|
|
52
52
|
readKeysForCommand,
|
|
53
53
|
skipFlagFor
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-Y4YBW5S4.js";
|
|
55
55
|
import {
|
|
56
56
|
MESSENGER_CHANGE_REFUSAL,
|
|
57
57
|
readOnlyRefusal
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-DDD3FS6G.js";
|
|
59
59
|
import {
|
|
60
60
|
openStore
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-SRONUWOM.js";
|
|
62
62
|
import {
|
|
63
63
|
logRecordOf,
|
|
64
64
|
realSleep,
|
|
65
65
|
resolvePaths,
|
|
66
66
|
writeSecurely
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-HGWMX7BM.js";
|
|
68
68
|
import {
|
|
69
69
|
CliError
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-EY4CUQW2.js";
|
|
71
71
|
import {
|
|
72
72
|
__name
|
|
73
73
|
} from "./chunk-ZVVMGPBJ.js";
|
|
74
74
|
|
|
75
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
75
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
76
76
|
import { openSync } from "node:fs";
|
|
77
77
|
import { createInterface } from "node:readline";
|
|
78
78
|
import { ReadStream } from "node:tty";
|
|
@@ -127,10 +127,10 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
127
127
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
128
128
|
}, "terminalAsker");
|
|
129
129
|
|
|
130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
131
131
|
import { randomUUID } from "node:crypto";
|
|
132
132
|
|
|
133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
134
134
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
135
135
|
import { dirname, join } from "node:path";
|
|
136
136
|
var MOST_DEADLINES = 50;
|
|
@@ -214,11 +214,11 @@ var FloodMemory = class {
|
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
218
218
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
219
219
|
import { dirname as dirname3, join as join2 } from "node:path";
|
|
220
220
|
|
|
221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
222
222
|
import { closeSync, mkdirSync as mkdirSync2, openSync as openSync2, statSync, unlinkSync } from "node:fs";
|
|
223
223
|
import { dirname as dirname2 } from "node:path";
|
|
224
224
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -285,7 +285,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
285
285
|
}
|
|
286
286
|
}, "lockTime");
|
|
287
287
|
|
|
288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
288
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
289
289
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
290
290
|
var SendJournal = class {
|
|
291
291
|
static {
|
|
@@ -362,7 +362,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
362
362
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
363
363
|
}, "withSendId");
|
|
364
364
|
|
|
365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
366
366
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
367
367
|
import { join as join3 } from "node:path";
|
|
368
368
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -474,7 +474,7 @@ var RecipientList = class {
|
|
|
474
474
|
}
|
|
475
475
|
};
|
|
476
476
|
|
|
477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
478
478
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
479
479
|
var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
|
|
480
480
|
"attachments.extract",
|
|
@@ -667,7 +667,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
667
667
|
}), "guardFor");
|
|
668
668
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
669
669
|
|
|
670
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
671
671
|
import { readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
672
672
|
import { join as join4 } from "node:path";
|
|
673
673
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -726,7 +726,7 @@ var Pacer = class {
|
|
|
726
726
|
}
|
|
727
727
|
};
|
|
728
728
|
|
|
729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
730
730
|
var pathOf = /* @__PURE__ */ __name((command) => {
|
|
731
731
|
const words = [];
|
|
732
732
|
for (let at = command; at?.parent; at = at.parent)
|
|
@@ -786,7 +786,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
786
786
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
787
787
|
}, "refuseUnknownPermissionKeys");
|
|
788
788
|
|
|
789
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
789
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
790
790
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
791
791
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
792
792
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -905,7 +905,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
905
905
|
});
|
|
906
906
|
}, "flooded");
|
|
907
907
|
|
|
908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
909
909
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
910
910
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
911
911
|
const write = currentOperation();
|
|
@@ -1004,7 +1004,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
1004
1004
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
1005
1005
|
}, "byPart");
|
|
1006
1006
|
|
|
1007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
1008
1008
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
1009
1009
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false }) => {
|
|
1010
1010
|
let warned = false;
|
|
@@ -1496,7 +1496,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1496
1496
|
}
|
|
1497
1497
|
}, "keep");
|
|
1498
1498
|
|
|
1499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1500
1500
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1501
1501
|
let opened;
|
|
1502
1502
|
return {
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
MAX_FILE_BYTES,
|
|
9
9
|
MAX_TEXT_CHARS,
|
|
10
10
|
attachmentMaxBytes
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3KTDFSSK.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError,
|
|
14
14
|
isCliError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EY4CUQW2.js";
|
|
16
16
|
import {
|
|
17
17
|
importFrom,
|
|
18
18
|
resolveFrom
|
|
@@ -16632,20 +16632,20 @@ var require_lib3 = __commonJS({
|
|
|
16632
16632
|
}
|
|
16633
16633
|
});
|
|
16634
16634
|
|
|
16635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
16636
16636
|
import { extname as extname2 } from "node:path";
|
|
16637
16637
|
|
|
16638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
16639
16639
|
import { readFileSync } from "node:fs";
|
|
16640
16640
|
import { dirname, extname, join } from "node:path";
|
|
16641
16641
|
import { fileURLToPath } from "node:url";
|
|
16642
16642
|
|
|
16643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
16644
16644
|
import { setImmediate as tick } from "node:timers/promises";
|
|
16645
16645
|
import { crc32 } from "node:zlib";
|
|
16646
16646
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
16647
16647
|
|
|
16648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
16649
16649
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
16650
16650
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
16651
16651
|
var SAMPLE = 65536;
|
|
@@ -16747,7 +16747,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes) => {
|
|
|
16747
16747
|
return result.text;
|
|
16748
16748
|
}, "decodeXml");
|
|
16749
16749
|
|
|
16750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
16751
16751
|
var MAX_PART = 10 * 1024 * 1024;
|
|
16752
16752
|
var MAX_ENTRIES = 1e3;
|
|
16753
16753
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -16962,7 +16962,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
16962
16962
|
return found;
|
|
16963
16963
|
}, "elements");
|
|
16964
16964
|
|
|
16965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
16966
16966
|
var BUILT_IN = ["unpdf", "mammoth", "word-extractor", "linkedom", "defuddle/node"];
|
|
16967
16967
|
var ENGINES = [...BUILT_IN, "@napi-rs/canvas"];
|
|
16968
16968
|
var isMissing = /* @__PURE__ */ __name((error, name) => error?.code === "ERR_MODULE_NOT_FOUND" && String(error.message).includes(name), "isMissing");
|
|
@@ -17020,7 +17020,7 @@ var derived = /* @__PURE__ */ __name((bytes, extractor, read) => {
|
|
|
17020
17020
|
}
|
|
17021
17021
|
}, "derived");
|
|
17022
17022
|
|
|
17023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
17024
17024
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
17025
17025
|
var image = {
|
|
17026
17026
|
id: "image",
|
|
@@ -17029,7 +17029,7 @@ var image = {
|
|
|
17029
17029
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
17030
17030
|
};
|
|
17031
17031
|
|
|
17032
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
17033
17033
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
17034
17034
|
var doc = {
|
|
17035
17035
|
id: "doc",
|
|
@@ -17041,7 +17041,7 @@ var doc = {
|
|
|
17041
17041
|
}), "read")
|
|
17042
17042
|
};
|
|
17043
17043
|
|
|
17044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
17045
17045
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
17046
17046
|
var docx = {
|
|
17047
17047
|
id: "docx",
|
|
@@ -17054,7 +17054,7 @@ var docx = {
|
|
|
17054
17054
|
}), "read")
|
|
17055
17055
|
};
|
|
17056
17056
|
|
|
17057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
17058
17058
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
17059
17059
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
17060
17060
|
"fonttbl",
|
|
@@ -17230,7 +17230,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
17230
17230
|
}, "htmlText");
|
|
17231
17231
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
17232
17232
|
|
|
17233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
17234
17234
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
17235
17235
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
17236
17236
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -17286,7 +17286,7 @@ var markdownSections = /* @__PURE__ */ __name((text) => {
|
|
|
17286
17286
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text.length }));
|
|
17287
17287
|
}, "markdownSections");
|
|
17288
17288
|
|
|
17289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
17290
17290
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
17291
17291
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
17292
17292
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -17357,10 +17357,10 @@ var html = {
|
|
|
17357
17357
|
}, "read")
|
|
17358
17358
|
};
|
|
17359
17359
|
|
|
17360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
17361
17361
|
import { posix } from "node:path";
|
|
17362
17362
|
|
|
17363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
17364
17364
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
17365
17365
|
let name = "";
|
|
17366
17366
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -17415,7 +17415,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
17415
17415
|
return { text: parts.join("").trim(), truncated: false };
|
|
17416
17416
|
}, "sheetText");
|
|
17417
17417
|
|
|
17418
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
17419
17419
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
17420
17420
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
17421
17421
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -17830,7 +17830,7 @@ var readDocument = /* @__PURE__ */ __name(async (bytes, kind, signal) => {
|
|
|
17830
17830
|
}
|
|
17831
17831
|
}, "readDocument");
|
|
17832
17832
|
|
|
17833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
17834
17834
|
var office = {
|
|
17835
17835
|
id: "office",
|
|
17836
17836
|
version: documentExtractor("odt"),
|
|
@@ -17841,7 +17841,7 @@ var office = {
|
|
|
17841
17841
|
}, "read")
|
|
17842
17842
|
};
|
|
17843
17843
|
|
|
17844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
17845
17845
|
var pdf = {
|
|
17846
17846
|
id: "pdf",
|
|
17847
17847
|
version: "unpdf",
|
|
@@ -17908,7 +17908,7 @@ var pdf = {
|
|
|
17908
17908
|
}), "read")
|
|
17909
17909
|
};
|
|
17910
17910
|
|
|
17911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
17912
17912
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
17913
17913
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
17914
17914
|
var readPlain = /* @__PURE__ */ __name((bytes) => {
|
|
@@ -17928,7 +17928,7 @@ var plain = {
|
|
|
17928
17928
|
read: /* @__PURE__ */ __name(async (bytes) => readPlain(bytes), "read")
|
|
17929
17929
|
};
|
|
17930
17930
|
|
|
17931
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
17932
17932
|
var rtf = {
|
|
17933
17933
|
id: "rtf",
|
|
17934
17934
|
version: "v1",
|
|
@@ -17936,10 +17936,10 @@ var rtf = {
|
|
|
17936
17936
|
read: /* @__PURE__ */ __name(async (bytes) => derived(bytes, "rtf:v1", rtfText), "read")
|
|
17937
17937
|
};
|
|
17938
17938
|
|
|
17939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
17940
17940
|
import { basename } from "node:path";
|
|
17941
17941
|
|
|
17942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
17943
17943
|
var delimitedSpans = /* @__PURE__ */ __name((text, delimiter, maxCells = 1e4) => {
|
|
17944
17944
|
const cells = [];
|
|
17945
17945
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -17977,7 +17977,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text, delimiter, maxCells = 1e4) =>
|
|
|
17977
17977
|
return { cells, truncated };
|
|
17978
17978
|
}, "delimitedSpans");
|
|
17979
17979
|
|
|
17980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
17981
17981
|
var DELIMITED = {
|
|
17982
17982
|
".csv": ",",
|
|
17983
17983
|
".tsv": " ",
|
|
@@ -18016,7 +18016,7 @@ var sheets = {
|
|
|
18016
18016
|
}, "read")
|
|
18017
18017
|
};
|
|
18018
18018
|
|
|
18019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
18020
18020
|
var BUILT_INS = [office, pdf, docx, doc, rtf, html, sheets, plain, image];
|
|
18021
18021
|
var HEAD_BYTES = 1024;
|
|
18022
18022
|
var readers = [...BUILT_INS];
|
|
@@ -18026,7 +18026,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes, hint, context) => {
|
|
|
18026
18026
|
return reader ? reader.read(bytes, hint, context) : { status: "unsupported" };
|
|
18027
18027
|
}, "readWithRegistry");
|
|
18028
18028
|
|
|
18029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
18030
18030
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
18031
18031
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname2(name ?? path).toLowerCase(), "extensionOf");
|
|
18032
18032
|
var extractText = /* @__PURE__ */ __name(async (bytes, hint, load, signal, env = process.env) => {
|