@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,299 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
SAMPLE_RATE,
|
|
5
|
+
decodeOgg
|
|
6
|
+
} from "./chunk-BD2K2ONK.js";
|
|
7
|
+
import "./chunk-HRATXUFH.js";
|
|
8
|
+
import "./chunk-SONPLYV7.js";
|
|
9
|
+
import {
|
|
10
|
+
importFrom
|
|
11
|
+
} from "./chunk-Y5E2WNWB.js";
|
|
12
|
+
import "./chunk-ABZ2NYDT.js";
|
|
13
|
+
import "./chunk-7IBENBCK.js";
|
|
14
|
+
import "./chunk-HHAZ6DCY.js";
|
|
15
|
+
import {
|
|
16
|
+
CliError
|
|
17
|
+
} from "./chunk-54NDYVZA.js";
|
|
18
|
+
import {
|
|
19
|
+
__name
|
|
20
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
21
|
+
|
|
22
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/speech/decode.js
|
|
23
|
+
import { spawn } from "node:child_process";
|
|
24
|
+
import { mkdtemp, open, readFile, rm, writeFile } from "node:fs/promises";
|
|
25
|
+
import { createRequire } from "node:module";
|
|
26
|
+
import { tmpdir } from "node:os";
|
|
27
|
+
import { join } from "node:path";
|
|
28
|
+
import { pathToFileURL } from "node:url";
|
|
29
|
+
var LONGEST_AUDIO_SECONDS = 3600;
|
|
30
|
+
var FFMPEG_TIMEOUT_MS = 12e4;
|
|
31
|
+
var FFMPEG_FORMATS = "mov,mp4,m4a,3gp,3g2,mj2,aac,mp3,wav,amr,caf,aiff,flac,ogg,matroska,webm,asf";
|
|
32
|
+
var text = /* @__PURE__ */ __name((bytes, from, length) => String.fromCharCode(...bytes.subarray(from, from + length)), "text");
|
|
33
|
+
var contains = /* @__PURE__ */ __name((bytes, needle, within) => Buffer.from(bytes.buffer, bytes.byteOffset, Math.min(bytes.length, within)).includes(needle, 0, "latin1"), "contains");
|
|
34
|
+
var formatOf = /* @__PURE__ */ __name((bytes) => {
|
|
35
|
+
if (text(bytes, 0, 4) === "OggS") {
|
|
36
|
+
if (contains(bytes, "OpusHead", 128))
|
|
37
|
+
return "opus";
|
|
38
|
+
if (contains(bytes, "vorbis", 128))
|
|
39
|
+
return "vorbis";
|
|
40
|
+
return "other";
|
|
41
|
+
}
|
|
42
|
+
if (text(bytes, 0, 4) === "fLaC")
|
|
43
|
+
return "flac";
|
|
44
|
+
const frame = bytes[0] === 255 && ((bytes[1] ?? 0) & 224) === 224 && ((bytes[1] ?? 0) >> 1 & 3) !== 0;
|
|
45
|
+
if (text(bytes, 0, 3) === "ID3" || frame)
|
|
46
|
+
return "mp3";
|
|
47
|
+
return "other";
|
|
48
|
+
}, "formatOf");
|
|
49
|
+
var everyChannel = /* @__PURE__ */ __name((decoded) => {
|
|
50
|
+
if (!decoded.channelData[0] || decoded.samplesDecoded === 0)
|
|
51
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
52
|
+
return decoded.channelData.map((samples) => ({ samples, rate: decoded.sampleRate }));
|
|
53
|
+
}, "everyChannel");
|
|
54
|
+
var load = /* @__PURE__ */ __name((name) => importFrom(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href, pathToFileURL(createRequire(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href).resolve(name)).href), "load");
|
|
55
|
+
var decodeVorbis = /* @__PURE__ */ __name(async (bytes) => {
|
|
56
|
+
const { OggVorbisDecoder } = await load("@wasm-audio-decoders/ogg-vorbis");
|
|
57
|
+
const decoder = new OggVorbisDecoder();
|
|
58
|
+
await decoder.ready;
|
|
59
|
+
try {
|
|
60
|
+
return everyChannel(await decoder.decodeFile(bytes));
|
|
61
|
+
} finally {
|
|
62
|
+
decoder.free();
|
|
63
|
+
}
|
|
64
|
+
}, "decodeVorbis");
|
|
65
|
+
var decodeFlac = /* @__PURE__ */ __name(async (bytes) => {
|
|
66
|
+
const { FLACDecoder } = await load("@wasm-audio-decoders/flac");
|
|
67
|
+
const decoder = new FLACDecoder();
|
|
68
|
+
await decoder.ready;
|
|
69
|
+
try {
|
|
70
|
+
return everyChannel(await decoder.decodeFile(bytes));
|
|
71
|
+
} finally {
|
|
72
|
+
decoder.free();
|
|
73
|
+
}
|
|
74
|
+
}, "decodeFlac");
|
|
75
|
+
var decodeMp3 = /* @__PURE__ */ __name(async (bytes) => {
|
|
76
|
+
const { MPEGDecoder } = await load("mpg123-decoder");
|
|
77
|
+
const decoder = new MPEGDecoder();
|
|
78
|
+
await decoder.ready;
|
|
79
|
+
try {
|
|
80
|
+
return everyChannel(decoder.decode(bytes));
|
|
81
|
+
} finally {
|
|
82
|
+
decoder.free();
|
|
83
|
+
}
|
|
84
|
+
}, "decodeMp3");
|
|
85
|
+
var tooLongError = /* @__PURE__ */ __name(() => new CliError("validation_error", `the audio is longer than ${LONGEST_AUDIO_SECONDS / 60} minutes`), "tooLongError");
|
|
86
|
+
var FLOAT = 3;
|
|
87
|
+
var LONGEST_HEADER = 64 * 1024;
|
|
88
|
+
var EXTENSIBLE = 65534;
|
|
89
|
+
var wavStream = /* @__PURE__ */ __name((most) => {
|
|
90
|
+
let head = Buffer.alloc(0);
|
|
91
|
+
let channels = 0;
|
|
92
|
+
let rate = 0;
|
|
93
|
+
let rest = Buffer.alloc(0);
|
|
94
|
+
let length = 0;
|
|
95
|
+
let parts = [];
|
|
96
|
+
const header = /* @__PURE__ */ __name(() => {
|
|
97
|
+
if (head.length < 12)
|
|
98
|
+
return false;
|
|
99
|
+
if (head.toString("latin1", 0, 4) !== "RIFF" || head.toString("latin1", 8, 12) !== "WAVE")
|
|
100
|
+
throw new CliError("validation_error", "ffmpeg did not answer with WAV audio");
|
|
101
|
+
for (let at = 12; at + 8 <= head.length; ) {
|
|
102
|
+
const id = head.toString("latin1", at, at + 4);
|
|
103
|
+
const size = head.readUInt32LE(at + 4);
|
|
104
|
+
if (id === "data") {
|
|
105
|
+
rest = head.subarray(at + 8);
|
|
106
|
+
head = Buffer.alloc(0);
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
if (at + 8 + size > head.length)
|
|
110
|
+
return false;
|
|
111
|
+
if (id === "fmt ") {
|
|
112
|
+
const tag = head.readUInt16LE(at + 8);
|
|
113
|
+
channels = head.readUInt16LE(at + 10);
|
|
114
|
+
rate = head.readUInt32LE(at + 12);
|
|
115
|
+
if (tag !== FLOAT && tag !== EXTENSIBLE || head.readUInt16LE(at + 22) !== 32 || channels < 1)
|
|
116
|
+
throw new CliError("validation_error", "ffmpeg did not answer with 32-bit float samples");
|
|
117
|
+
parts = Array.from({ length: channels }, () => []);
|
|
118
|
+
}
|
|
119
|
+
at += 8 + size + size % 2;
|
|
120
|
+
}
|
|
121
|
+
return false;
|
|
122
|
+
}, "header");
|
|
123
|
+
return {
|
|
124
|
+
push: /* @__PURE__ */ __name((chunk) => {
|
|
125
|
+
if (channels === 0 || head.length > 0) {
|
|
126
|
+
head = Buffer.concat([head, chunk]);
|
|
127
|
+
if (head.length > LONGEST_HEADER)
|
|
128
|
+
throw new CliError("validation_error", "ffmpeg's WAV header never ended");
|
|
129
|
+
if (!header())
|
|
130
|
+
return true;
|
|
131
|
+
chunk = Buffer.alloc(0);
|
|
132
|
+
}
|
|
133
|
+
const bytes = rest.length ? Buffer.concat([rest, chunk]) : chunk;
|
|
134
|
+
const frame = channels * 4;
|
|
135
|
+
const frames = Math.floor(bytes.length / frame);
|
|
136
|
+
rest = Buffer.from(bytes.subarray(frames * frame));
|
|
137
|
+
if (frames === 0)
|
|
138
|
+
return length <= most;
|
|
139
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, frames * frame);
|
|
140
|
+
for (let channel = 0; channel < channels; channel++) {
|
|
141
|
+
const samples = new Float32Array(frames);
|
|
142
|
+
for (let index = 0; index < frames; index++)
|
|
143
|
+
samples[index] = view.getFloat32(index * frame + channel * 4, true);
|
|
144
|
+
parts[channel]?.push(samples);
|
|
145
|
+
}
|
|
146
|
+
length += frames;
|
|
147
|
+
return length <= most;
|
|
148
|
+
}, "push"),
|
|
149
|
+
end: /* @__PURE__ */ __name(() => {
|
|
150
|
+
if (channels === 0)
|
|
151
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
152
|
+
return parts.map((pieces, channel) => {
|
|
153
|
+
const samples = new Float32Array(length);
|
|
154
|
+
let at = 0;
|
|
155
|
+
for (const piece of pieces) {
|
|
156
|
+
samples.set(piece, at);
|
|
157
|
+
at += piece.length;
|
|
158
|
+
}
|
|
159
|
+
parts[channel] = [];
|
|
160
|
+
return { samples, rate };
|
|
161
|
+
});
|
|
162
|
+
}, "end")
|
|
163
|
+
};
|
|
164
|
+
}, "wavStream");
|
|
165
|
+
var runFfmpegFile = /* @__PURE__ */ __name((path) => new Promise((resolve, reject) => {
|
|
166
|
+
const child = spawn("ffmpeg", [
|
|
167
|
+
"-nostdin",
|
|
168
|
+
"-hide_banner",
|
|
169
|
+
"-loglevel",
|
|
170
|
+
"error",
|
|
171
|
+
"-protocol_whitelist",
|
|
172
|
+
"file",
|
|
173
|
+
"-format_whitelist",
|
|
174
|
+
FFMPEG_FORMATS,
|
|
175
|
+
"-i",
|
|
176
|
+
path,
|
|
177
|
+
"-vn",
|
|
178
|
+
"-af",
|
|
179
|
+
"aformat=channel_layouts=mono|stereo",
|
|
180
|
+
"-ar",
|
|
181
|
+
String(SAMPLE_RATE),
|
|
182
|
+
"-c:a",
|
|
183
|
+
"pcm_f32le",
|
|
184
|
+
"-bitexact",
|
|
185
|
+
"-f",
|
|
186
|
+
"wav",
|
|
187
|
+
"pipe:1"
|
|
188
|
+
], { stdio: ["ignore", "pipe", "pipe"], timeout: FFMPEG_TIMEOUT_MS });
|
|
189
|
+
const wav = wavStream(LONGEST_AUDIO_SECONDS * SAMPLE_RATE);
|
|
190
|
+
let long = false;
|
|
191
|
+
let broken;
|
|
192
|
+
let errors = "";
|
|
193
|
+
child.stdout.on("data", (chunk) => {
|
|
194
|
+
if (long || broken)
|
|
195
|
+
return;
|
|
196
|
+
try {
|
|
197
|
+
long = !wav.push(chunk);
|
|
198
|
+
} catch (error) {
|
|
199
|
+
broken = error;
|
|
200
|
+
}
|
|
201
|
+
if (long || broken)
|
|
202
|
+
child.kill();
|
|
203
|
+
});
|
|
204
|
+
child.stderr.on("data", (chunk) => {
|
|
205
|
+
errors = (errors + chunk.toString()).slice(-500);
|
|
206
|
+
});
|
|
207
|
+
child.on("error", (error) => reject(error.code === "ENOENT" ? new CliError("validation_error", "only ffmpeg reads this audio format, and ffmpeg is not installed") : error));
|
|
208
|
+
child.on("close", (code) => {
|
|
209
|
+
if (long)
|
|
210
|
+
return reject(tooLongError());
|
|
211
|
+
if (broken)
|
|
212
|
+
return reject(broken);
|
|
213
|
+
if (code !== 0)
|
|
214
|
+
return reject(new CliError("validation_error", `ffmpeg could not read the audio: ${errors.trim() || code}`));
|
|
215
|
+
try {
|
|
216
|
+
resolve(wav.end());
|
|
217
|
+
} catch (error) {
|
|
218
|
+
reject(error);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}), "runFfmpegFile");
|
|
222
|
+
var runFfmpeg = /* @__PURE__ */ __name(async (bytes) => {
|
|
223
|
+
const directory = await mkdtemp(join(tmpdir(), "wirecat-audio-"));
|
|
224
|
+
try {
|
|
225
|
+
const input = join(directory, "audio");
|
|
226
|
+
await writeFile(input, bytes, { mode: 384 });
|
|
227
|
+
return await runFfmpegFile(input);
|
|
228
|
+
} finally {
|
|
229
|
+
await rm(directory, { recursive: true, force: true });
|
|
230
|
+
}
|
|
231
|
+
}, "runFfmpeg");
|
|
232
|
+
var BUNDLED = {
|
|
233
|
+
opus: decodeOgg,
|
|
234
|
+
vorbis: decodeVorbis,
|
|
235
|
+
flac: decodeFlac,
|
|
236
|
+
mp3: decodeMp3
|
|
237
|
+
};
|
|
238
|
+
var tooLong = /* @__PURE__ */ __name((pcm) => pcm.samples.length / pcm.rate > LONGEST_AUDIO_SECONDS, "tooLong");
|
|
239
|
+
var fromFfmpeg = /* @__PURE__ */ __name((answer) => Array.isArray(answer) ? { channels: answer, mixed: false } : { channels: [answer], mixed: true }, "fromFfmpeg");
|
|
240
|
+
var decodeChannels = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => {
|
|
241
|
+
const format = formatOf(bytes);
|
|
242
|
+
const decoded = format === "other" ? fromFfmpeg(await ffmpeg(bytes)) : await BUNDLED[format](bytes).then((channels) => ({ channels, mixed: false }), (error) => ffmpeg(bytes).then(fromFfmpeg, () => {
|
|
243
|
+
throw error;
|
|
244
|
+
}));
|
|
245
|
+
if (decoded.channels.length === 0)
|
|
246
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
247
|
+
if (decoded.channels.some(tooLong))
|
|
248
|
+
throw tooLongError();
|
|
249
|
+
return decoded;
|
|
250
|
+
}, "decodeChannels");
|
|
251
|
+
var decodeChannelsFile = /* @__PURE__ */ __name(async (path, { maxBytes = 64 * 1024 * 1024, ffmpegFile = runFfmpegFile } = {}) => {
|
|
252
|
+
const file = await open(path, "r");
|
|
253
|
+
let start;
|
|
254
|
+
let size;
|
|
255
|
+
try {
|
|
256
|
+
size = (await file.stat()).size;
|
|
257
|
+
const head = Buffer.alloc(Math.min(size, 128));
|
|
258
|
+
await file.read(head, 0, head.length, 0);
|
|
259
|
+
start = head;
|
|
260
|
+
} finally {
|
|
261
|
+
await file.close();
|
|
262
|
+
}
|
|
263
|
+
if (formatOf(start) === "other") {
|
|
264
|
+
const channels = await ffmpegFile(path);
|
|
265
|
+
if (channels.some(tooLong))
|
|
266
|
+
throw tooLongError();
|
|
267
|
+
return { channels, mixed: false };
|
|
268
|
+
}
|
|
269
|
+
if (size > maxBytes)
|
|
270
|
+
throw new CliError("validation_error", `the audio file is larger than ${Math.round(maxBytes / 1024 / 1024)} MB`, {
|
|
271
|
+
reason: "file.too-large"
|
|
272
|
+
});
|
|
273
|
+
return decodeChannels(new Uint8Array(await readFile(path)), () => ffmpegFile(path));
|
|
274
|
+
}, "decodeChannelsFile");
|
|
275
|
+
var mixDown = /* @__PURE__ */ __name((channels) => {
|
|
276
|
+
const [first] = channels;
|
|
277
|
+
if (!first)
|
|
278
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
279
|
+
if (channels.length === 1)
|
|
280
|
+
return first;
|
|
281
|
+
const length = channels.reduce((longest, { samples: samples2 }) => Math.max(longest, samples2.length), 0);
|
|
282
|
+
const samples = new Float32Array(length);
|
|
283
|
+
for (const channel of channels)
|
|
284
|
+
for (let index = 0; index < channel.samples.length; index++)
|
|
285
|
+
samples[index] = (samples[index] ?? 0) + (channel.samples[index] ?? 0) / channels.length;
|
|
286
|
+
return { samples, rate: first.rate };
|
|
287
|
+
}, "mixDown");
|
|
288
|
+
var decodeAudio = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => mixDown((await decodeChannels(bytes, ffmpeg)).channels), "decodeAudio");
|
|
289
|
+
export {
|
|
290
|
+
LONGEST_AUDIO_SECONDS,
|
|
291
|
+
decodeAudio,
|
|
292
|
+
decodeChannels,
|
|
293
|
+
decodeChannelsFile,
|
|
294
|
+
formatOf,
|
|
295
|
+
mixDown,
|
|
296
|
+
runFfmpeg,
|
|
297
|
+
runFfmpegFile,
|
|
298
|
+
wavStream
|
|
299
|
+
};
|
|
@@ -14,23 +14,23 @@ import {
|
|
|
14
14
|
parseDescribe,
|
|
15
15
|
shimFiles,
|
|
16
16
|
writeShim
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ML3R2UHV.js";
|
|
18
18
|
import "./chunk-Y5E2WNWB.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-ABZ2NYDT.js";
|
|
20
20
|
import {
|
|
21
21
|
CliError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-54NDYVZA.js";
|
|
23
23
|
import {
|
|
24
24
|
__name,
|
|
25
25
|
__toESM
|
|
26
26
|
} from "./chunk-ZVVMGPBJ.js";
|
|
27
27
|
|
|
28
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
28
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
29
29
|
var import_cross_spawn2 = __toESM(require_cross_spawn(), 1);
|
|
30
30
|
import { randomUUID } from "node:crypto";
|
|
31
31
|
import { constants } from "node:os";
|
|
32
32
|
|
|
33
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
33
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/path.js
|
|
34
34
|
import { readdirSync, statSync } from "node:fs";
|
|
35
35
|
import { join } from "node:path";
|
|
36
36
|
var variable = /* @__PURE__ */ __name((env, name, platform) => platform === "win32" ? Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1] : env[name], "variable");
|
|
@@ -102,7 +102,7 @@ var findTools = /* @__PURE__ */ __name((search) => {
|
|
|
102
102
|
}, "findTools");
|
|
103
103
|
var isBuiltIn = /* @__PURE__ */ __name((name) => name === "wcat" || BUILT_IN_COMMANDS.includes(name), "isBuiltIn");
|
|
104
104
|
|
|
105
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
105
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/probe.js
|
|
106
106
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
107
107
|
import { readFileSync } from "node:fs";
|
|
108
108
|
var probeDescribe = /* @__PURE__ */ __name((path, { env, timeoutMs }) => new Promise((resolve) => {
|
|
@@ -150,7 +150,7 @@ var baseVersion = /* @__PURE__ */ __name(() => {
|
|
|
150
150
|
}
|
|
151
151
|
}, "baseVersion");
|
|
152
152
|
|
|
153
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
153
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shortcuts.js
|
|
154
154
|
import { closeSync, openSync, readSync, realpathSync, rmSync } from "node:fs";
|
|
155
155
|
import { basename, dirname } from "node:path";
|
|
156
156
|
var WIRECAT_PACKAGE = /node_modules[\\/]+@wirecat[\\/]/;
|
|
@@ -242,7 +242,7 @@ var removeShortcuts = /* @__PURE__ */ __name((search, names) => listShortcuts(se
|
|
|
242
242
|
return { ...statusOf(shortcut.name, shortcut.program, search), changed: true };
|
|
243
243
|
}), "removeShortcuts");
|
|
244
244
|
|
|
245
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
245
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
246
246
|
var DEFAULT_DESCRIBE_TIMEOUT_MS = 2e3;
|
|
247
247
|
var listTools = /* @__PURE__ */ __name(async (context) => {
|
|
248
248
|
const installed = installedPrograms(context);
|
|
@@ -339,7 +339,7 @@ var runTool = /* @__PURE__ */ __name((path, args, context) => new Promise((resol
|
|
|
339
339
|
});
|
|
340
340
|
}), "runTool");
|
|
341
341
|
var fail = /* @__PURE__ */ __name(async (error, json, context) => {
|
|
342
|
-
const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-
|
|
342
|
+
const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-CYNXH3RQ.js");
|
|
343
343
|
const object = errorObjectOf(error);
|
|
344
344
|
context.stderr.write(`${renderError(object, { cli: "wcat", interactive: !json })}
|
|
345
345
|
`);
|
package/dist/bundle/drive.js
CHANGED
|
@@ -3,17 +3,17 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
3
3
|
const require = __bundleRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
processStreams
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HRATXUFH.js";
|
|
7
7
|
import {
|
|
8
8
|
errorObjectOf,
|
|
9
9
|
exitCodeOfError,
|
|
10
10
|
renderError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SONPLYV7.js";
|
|
12
12
|
import "./chunk-Y5E2WNWB.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ABZ2NYDT.js";
|
|
14
|
+
import "./chunk-7IBENBCK.js";
|
|
15
|
+
import "./chunk-HHAZ6DCY.js";
|
|
16
|
+
import "./chunk-54NDYVZA.js";
|
|
17
17
|
import {
|
|
18
18
|
__name
|
|
19
19
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
import { enableCompileCache } from "node:module";
|
|
23
23
|
enableCompileCache();
|
|
24
24
|
var [{ wcatStart }, { DESKTOP, DRIVE_APP }] = await Promise.all([
|
|
25
|
-
import("./start-
|
|
26
|
-
import("./identity-
|
|
25
|
+
import("./start-BJ275RUK.js"),
|
|
26
|
+
import("./identity-JVVGS4U6.js")
|
|
27
27
|
]);
|
|
28
28
|
var wcat = await wcatStart({
|
|
29
29
|
command: DRIVE_APP.command,
|
|
@@ -35,15 +35,15 @@ if (wcat.code !== void 0) {
|
|
|
35
35
|
process.exitCode = wcat.code;
|
|
36
36
|
} else {
|
|
37
37
|
const [{ startCli }, { REASONS }, { interactiveOf }] = await Promise.all([
|
|
38
|
-
import("./entry-
|
|
39
|
-
import("./reasons-
|
|
38
|
+
import("./entry-ORZYRJ5N.js"),
|
|
39
|
+
import("./reasons-WEHPCSJX.js"),
|
|
40
40
|
import("./terminal-DHJ4D3BC.js")
|
|
41
41
|
]);
|
|
42
42
|
await startCli({
|
|
43
43
|
app: DRIVE_APP,
|
|
44
44
|
interactive: interactiveOf,
|
|
45
45
|
reasons: REASONS,
|
|
46
|
-
run: /* @__PURE__ */ __name(async (entry) => (await import("./program-
|
|
46
|
+
run: /* @__PURE__ */ __name(async (entry) => (await import("./program-T2AJJQEM.js")).run(entry.args, {
|
|
47
47
|
signal: entry.signal,
|
|
48
48
|
ask: /* @__PURE__ */ __name((key) => entry.ask(`Allow ${key}?`), "ask"),
|
|
49
49
|
openBrowser: /* @__PURE__ */ __name((url, command) => entry.openBrowser(url, void 0, command), "openBrowser")
|
|
@@ -42399,7 +42399,7 @@ function install11(registers) {
|
|
|
42399
42399
|
}
|
|
42400
42400
|
__name(install11, "install");
|
|
42401
42401
|
|
|
42402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/charts/echarts-option.js
|
|
42403
42403
|
var echartsOption = /* @__PURE__ */ __name((chart) => ({
|
|
42404
42404
|
animation: false,
|
|
42405
42405
|
backgroundColor: "#111827",
|
|
@@ -42447,7 +42447,7 @@ var echartsOption = /* @__PURE__ */ __name((chart) => ({
|
|
|
42447
42447
|
} : {}
|
|
42448
42448
|
}), "echartsOption");
|
|
42449
42449
|
|
|
42450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/charts/echarts.js
|
|
42451
42451
|
use([install2, install, install6, install5, install10, install7, install11]);
|
|
42452
42452
|
var echartsRenderer = {
|
|
42453
42453
|
render: /* @__PURE__ */ __name(async (chart, size) => {
|
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
truncated,
|
|
14
14
|
unit,
|
|
15
15
|
warmEmbedders
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IFTX7AQU.js";
|
|
17
17
|
import "./chunk-5DPV7X27.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-FONIFRYI.js";
|
|
19
|
+
import "./chunk-T5D4OGDC.js";
|
|
20
|
+
import "./chunk-HRATXUFH.js";
|
|
21
|
+
import "./chunk-SONPLYV7.js";
|
|
22
22
|
import "./chunk-Y5E2WNWB.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-ABZ2NYDT.js";
|
|
24
|
+
import "./chunk-7IBENBCK.js";
|
|
25
|
+
import "./chunk-HHAZ6DCY.js";
|
|
26
|
+
import "./chunk-54NDYVZA.js";
|
|
27
27
|
import "./chunk-ZVVMGPBJ.js";
|
|
28
28
|
export {
|
|
29
29
|
WARM_IDLE_MS,
|
|
@@ -4,30 +4,30 @@ import {
|
|
|
4
4
|
openSession,
|
|
5
5
|
truncated,
|
|
6
6
|
unit
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IFTX7AQU.js";
|
|
8
8
|
import "./chunk-5DPV7X27.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-FONIFRYI.js";
|
|
10
|
+
import "./chunk-T5D4OGDC.js";
|
|
11
|
+
import "./chunk-HRATXUFH.js";
|
|
12
|
+
import "./chunk-SONPLYV7.js";
|
|
13
13
|
import {
|
|
14
14
|
importFrom
|
|
15
15
|
} from "./chunk-Y5E2WNWB.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-ABZ2NYDT.js";
|
|
17
|
+
import "./chunk-7IBENBCK.js";
|
|
18
|
+
import "./chunk-HHAZ6DCY.js";
|
|
19
19
|
import {
|
|
20
20
|
CliError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-54NDYVZA.js";
|
|
22
22
|
import {
|
|
23
23
|
__name
|
|
24
24
|
} from "./chunk-ZVVMGPBJ.js";
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
|
|
27
27
|
import { readFileSync } from "node:fs";
|
|
28
28
|
import { join } from "node:path";
|
|
29
29
|
|
|
30
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/images/picture/preprocess.js
|
|
31
31
|
var SIZE = 224;
|
|
32
32
|
var MEAN = [0.48145466, 0.4578275, 0.40821073];
|
|
33
33
|
var STD = [0.26862954, 0.26130258, 0.27577711];
|
|
@@ -66,7 +66,7 @@ var preprocess = /* @__PURE__ */ __name(async (bytes, load = importCanvas) => {
|
|
|
66
66
|
return pixels;
|
|
67
67
|
}, "preprocess");
|
|
68
68
|
|
|
69
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
69
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
|
|
70
70
|
var openPictureEmbedder = /* @__PURE__ */ __name(async (model, directory, { threads = 4, canvas } = {}) => {
|
|
71
71
|
const { Tokenizer } = await importFrom(new URL("images/picture/embedder.js", import.meta.resolve("@wirecat/cli-core")).href, "@huggingface/tokenizers");
|
|
72
72
|
const path = /* @__PURE__ */ __name((name) => join(directory, model.id, name), "path");
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
firstRunAt,
|
|
5
|
+
openBrowser,
|
|
6
|
+
startCli
|
|
7
|
+
} from "./chunk-YZPE72GE.js";
|
|
8
|
+
import "./chunk-DVI72ZQG.js";
|
|
9
|
+
import "./chunk-LINBDWJK.js";
|
|
10
|
+
import "./chunk-PR7XD2DI.js";
|
|
11
|
+
import "./chunk-6DPOWBKA.js";
|
|
12
|
+
import "./chunk-HK225DAG.js";
|
|
13
|
+
import "./chunk-HRATXUFH.js";
|
|
14
|
+
import "./chunk-SONPLYV7.js";
|
|
15
|
+
import "./chunk-Y5E2WNWB.js";
|
|
16
|
+
import "./chunk-ABZ2NYDT.js";
|
|
17
|
+
import "./chunk-7IBENBCK.js";
|
|
18
|
+
import "./chunk-HHAZ6DCY.js";
|
|
19
|
+
import "./chunk-54NDYVZA.js";
|
|
20
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
21
|
+
export {
|
|
22
|
+
firstRunAt,
|
|
23
|
+
openBrowser,
|
|
24
|
+
startCli
|
|
25
|
+
};
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
mcpErrorResult,
|
|
10
10
|
renderError,
|
|
11
11
|
retryOf
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-SONPLYV7.js";
|
|
13
|
+
import "./chunk-ABZ2NYDT.js";
|
|
14
|
+
import "./chunk-HHAZ6DCY.js";
|
|
15
|
+
import "./chunk-54NDYVZA.js";
|
|
16
16
|
import "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
export {
|
|
18
18
|
catchCrashes,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
askSetupQuestions,
|
|
5
|
+
asksAtStart,
|
|
6
|
+
setupAtStart,
|
|
7
|
+
systemLanguage
|
|
8
|
+
} from "./chunk-5JTB4URG.js";
|
|
9
|
+
import "./chunk-FADAOLGB.js";
|
|
10
|
+
import "./chunk-GA3URWIF.js";
|
|
11
|
+
import "./chunk-GV5DGHSA.js";
|
|
12
|
+
import "./chunk-3AHBZP33.js";
|
|
13
|
+
import "./chunk-OY7TNUEC.js";
|
|
14
|
+
import "./chunk-WJK6KTCS.js";
|
|
15
|
+
import "./chunk-D72URWJE.js";
|
|
16
|
+
import "./chunk-66PL7P4C.js";
|
|
17
|
+
import "./chunk-T5D4OGDC.js";
|
|
18
|
+
import "./chunk-HRATXUFH.js";
|
|
19
|
+
import "./chunk-SONPLYV7.js";
|
|
20
|
+
import "./chunk-Y5E2WNWB.js";
|
|
21
|
+
import "./chunk-ABZ2NYDT.js";
|
|
22
|
+
import "./chunk-7IBENBCK.js";
|
|
23
|
+
import "./chunk-HHAZ6DCY.js";
|
|
24
|
+
import "./chunk-54NDYVZA.js";
|
|
25
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
26
|
+
export {
|
|
27
|
+
askSetupQuestions,
|
|
28
|
+
asksAtStart,
|
|
29
|
+
setupAtStart,
|
|
30
|
+
systemLanguage
|
|
31
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
WIRECAT_TOOLS,
|
|
5
|
+
firstScreen,
|
|
6
|
+
installHelp
|
|
7
|
+
} from "./chunk-EG62WVR2.js";
|
|
8
|
+
import "./chunk-HTQTIKWP.js";
|
|
9
|
+
import "./chunk-3UWRAIWA.js";
|
|
10
|
+
import "./chunk-TGS5VPJD.js";
|
|
11
|
+
import "./chunk-FYPW7NMH.js";
|
|
12
|
+
import "./chunk-54BQWRJL.js";
|
|
13
|
+
import "./chunk-PR7XD2DI.js";
|
|
14
|
+
import "./chunk-4WK26MPY.js";
|
|
15
|
+
import "./chunk-TNKQDS5A.js";
|
|
16
|
+
import "./chunk-GV5DGHSA.js";
|
|
17
|
+
import "./chunk-DR57KDAY.js";
|
|
18
|
+
import "./chunk-BBFXQPKD.js";
|
|
19
|
+
import "./chunk-FONIFRYI.js";
|
|
20
|
+
import "./chunk-YCL3SK4T.js";
|
|
21
|
+
import "./chunk-GK3BJMGK.js";
|
|
22
|
+
import "./chunk-RLNZ7NX5.js";
|
|
23
|
+
import "./chunk-DHX27E5M.js";
|
|
24
|
+
import "./chunk-P7PLKNPX.js";
|
|
25
|
+
import "./chunk-Q5C6YKAY.js";
|
|
26
|
+
import "./chunk-WJK6KTCS.js";
|
|
27
|
+
import "./chunk-ZI3YTXSF.js";
|
|
28
|
+
import "./chunk-T5D4OGDC.js";
|
|
29
|
+
import "./chunk-HRATXUFH.js";
|
|
30
|
+
import "./chunk-SONPLYV7.js";
|
|
31
|
+
import "./chunk-Y5E2WNWB.js";
|
|
32
|
+
import "./chunk-ABZ2NYDT.js";
|
|
33
|
+
import "./chunk-7IBENBCK.js";
|
|
34
|
+
import "./chunk-HHAZ6DCY.js";
|
|
35
|
+
import "./chunk-54NDYVZA.js";
|
|
36
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
37
|
+
export {
|
|
38
|
+
WIRECAT_TOOLS,
|
|
39
|
+
firstScreen,
|
|
40
|
+
installHelp
|
|
41
|
+
};
|