@wirecat/drive-cli 0.69.0 → 0.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- 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-B4A737YW.js → all-profiles-3QJG2NAN.js} +13 -13
- package/dist/bundle/{anthropic-RZGPDESM.js → anthropic-PSWTEU6G.js} +8 -8
- package/dist/bundle/{app-server-OWEW7DY5.js → app-server-PVTA6ABR.js} +66 -58
- package/dist/bundle/{bun-V5QLYBZU.js → bun-LU5LP3JI.js} +2 -2
- package/dist/bundle/{bun-sqlite-KHLHXXGH.js → bun-sqlite-PYMKLBRU.js} +9 -9
- package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-22QQUKWA.js} +1 -1
- package/dist/bundle/{chunk-3YKAFLXY.js → chunk-26DHFMGZ.js} +2 -2
- package/dist/bundle/{chunk-Y2QVNVHK.js → chunk-2BVVU7GG.js} +1 -1
- package/dist/bundle/{chunk-7JKECODO.js → chunk-2LHAVY4U.js} +1 -11
- package/dist/bundle/{chunk-HEBZCKMU.js → chunk-2PUNKUYJ.js} +4389 -4709
- package/dist/bundle/chunk-2UUWXPOB.js +31 -0
- package/dist/bundle/{chunk-KUQDBWPU.js → chunk-35SCQ4VI.js} +31 -32
- package/dist/bundle/{chunk-O6PD7RZY.js → chunk-3EBBLKIT.js} +4 -4
- package/dist/bundle/{chunk-PV3AWPHR.js → chunk-3N2OFXB5.js} +5 -5
- package/dist/bundle/{chunk-SY2HLH5R.js → chunk-3UGYFXH6.js} +82 -25
- package/dist/bundle/{chunk-OUM4ZO53.js → chunk-4HWJOU7N.js} +1 -1
- package/dist/bundle/{chunk-6D44YQ5X.js → chunk-4PA4DHYV.js} +6 -6
- package/dist/bundle/{chunk-EA2OB75T.js → chunk-4QNW4NK6.js} +1 -1
- package/dist/bundle/{chunk-GK6KXBL6.js → chunk-6SJOTNHF.js} +4 -4
- package/dist/bundle/{chunk-NVDR72GP.js → chunk-6TNNT2MQ.js} +250 -174
- package/dist/bundle/{chunk-4YECZ6CN.js → chunk-6W763DZN.js} +12 -12
- package/dist/bundle/{chunk-IQ2QU2X6.js → chunk-6XFIITOG.js} +1024 -598
- package/dist/bundle/{chunk-AD7VI3XU.js → chunk-72C4YOCH.js} +7 -7
- package/dist/bundle/{chunk-6EL5AVXX.js → chunk-7PDHGZN4.js} +4 -4
- package/dist/bundle/{chunk-22SH77TG.js → chunk-ACUAV6VX.js} +64 -64
- package/dist/bundle/{chunk-BBJVV4E2.js → chunk-ASMMG72J.js} +68 -38
- package/dist/bundle/{chunk-XUHQ7DVT.js → chunk-B5KSXHJ7.js} +1 -1
- package/dist/bundle/{chunk-BVVXYZSU.js → chunk-BKSQBBYG.js} +9 -9
- package/dist/bundle/{chunk-5SJZDEIO.js → chunk-CJLVYIOP.js} +21 -21
- package/dist/bundle/chunk-COJSWDNU.js +170 -0
- package/dist/bundle/{chunk-GTDCP5OG.js → chunk-COOOO5B3.js} +4 -4
- package/dist/bundle/{chunk-LUZRVBQR.js → chunk-D5TGYUVU.js} +6 -6
- package/dist/bundle/{chunk-CZ4UEXCE.js → chunk-EOEU3AZN.js} +6 -6
- package/dist/bundle/{chunk-CU6RATZH.js → chunk-FCS26CYQ.js} +4 -4
- package/dist/bundle/{chunk-LRCSDAYK.js → chunk-FJH7DJWK.js} +4 -4
- package/dist/bundle/{chunk-U3RXH6RY.js → chunk-FP54WSIR.js} +4 -4
- package/dist/bundle/{chunk-3URYKAJP.js → chunk-FT3LN3HP.js} +1 -1
- package/dist/bundle/{chunk-CDSB7WVG.js → chunk-GBKNJWOZ.js} +8 -8
- package/dist/bundle/{chunk-4J5GJJ2I.js → chunk-GOWXXYEF.js} +2 -2
- package/dist/bundle/{chunk-PB6NWKH3.js → chunk-GPQ44Y2R.js} +2 -2
- package/dist/bundle/{chunk-E7URRFBB.js → chunk-GZ2D4KXG.js} +10 -15
- package/dist/bundle/{chunk-376ZGVUZ.js → chunk-HKY7X6NY.js} +4 -4
- package/dist/bundle/{chunk-6XNTELM5.js → chunk-HL52XXZX.js} +1 -1
- package/dist/bundle/{chunk-533XOW74.js → chunk-HMS6EEQL.js} +3 -3
- package/dist/bundle/{chunk-F5UUJU6R.js → chunk-I4RWW3UD.js} +49 -4
- package/dist/bundle/{chunk-TZ75K6R7.js → chunk-ICDCAQ6K.js} +8 -8
- package/dist/bundle/{chunk-WOUIHZRI.js → chunk-J5Q5FS2N.js} +18 -75
- package/dist/bundle/{chunk-EL2E3ABX.js → chunk-JDV7HNNQ.js} +13 -13
- package/dist/bundle/{chunk-ZUG67442.js → chunk-JZHBZOJR.js} +3 -3
- package/dist/bundle/{chunk-SEJBS7SI.js → chunk-KGERXYTV.js} +1 -1
- package/dist/bundle/{chunk-5TK2YQCO.js → chunk-KGYVHPGE.js} +2 -2
- package/dist/bundle/{chunk-HCZYJMBP.js → chunk-KYKW2W6X.js} +1 -1
- package/dist/bundle/{chunk-RLGQMMYE.js → chunk-L46C6HQ7.js} +35 -13
- package/dist/bundle/chunk-LXKYKRHD.js +387 -0
- package/dist/bundle/{chunk-N4ACIIQB.js → chunk-MIA7P6FZ.js} +2 -2
- package/dist/bundle/{chunk-ZBYKCVSV.js → chunk-MNLL5YLM.js} +2 -2
- package/dist/bundle/{chunk-UPCEHSIZ.js → chunk-OF422U5D.js} +21 -16
- package/dist/bundle/{chunk-JRFKCYMW.js → chunk-OJSBWP3F.js} +23 -6
- package/dist/bundle/{chunk-MHXZ62CU.js → chunk-P7CUM5IB.js} +1 -1
- package/dist/bundle/{chunk-I55XYREN.js → chunk-PRW6SYA3.js} +1094 -2526
- package/dist/bundle/chunk-Q7DOMFJ4.js +259 -0
- package/dist/bundle/{chunk-3RLRJHAI.js → chunk-QETR5HIZ.js} +12081 -12607
- package/dist/bundle/{chunk-QJGFQRTL.js → chunk-QFR2PNJN.js} +12 -12
- package/dist/bundle/{chunk-2Q4CB4EI.js → chunk-QNRRK3CN.js} +2 -2
- package/dist/bundle/{chunk-5B5NOAIA.js → chunk-QXC6IEH6.js} +45 -45
- package/dist/bundle/{chunk-T6X6EZ5N.js → chunk-RESDD3Q4.js} +3 -3
- package/dist/bundle/chunk-RJOQH5YY.js +1979 -0
- package/dist/bundle/{chunk-AMQGKMLZ.js → chunk-RWDKMU74.js} +3 -3
- package/dist/bundle/{chunk-VUPWDCYV.js → chunk-SAKO3P4H.js} +1 -1
- package/dist/bundle/{chunk-GHFBT2ZM.js → chunk-SDKQNOL5.js} +6 -6
- package/dist/bundle/{chunk-25FT44S3.js → chunk-SERXSCN3.js} +287 -569
- package/dist/bundle/{chunk-2DS2TDGW.js → chunk-TAFHYHKA.js} +20 -118
- package/dist/bundle/{chunk-XVH3WZSZ.js → chunk-TAUBRNC5.js} +53 -53
- package/dist/bundle/{chunk-2VFAXC6O.js → chunk-UDMNY63V.js} +22 -19
- package/dist/bundle/{chunk-EWUQIUTB.js → chunk-UTO2GO4P.js} +5 -5
- package/dist/bundle/{chunk-V4FMN5A6.js → chunk-WVDCCYS3.js} +17 -17
- package/dist/bundle/chunk-X4TIMMKJ.js +16 -0
- package/dist/bundle/chunk-XF4EXO2C.js +335 -0
- package/dist/bundle/{chunk-OOIAJRKQ.js → chunk-XMMFBPGC.js} +2 -2
- package/dist/bundle/{chunk-4ZFO2CVH.js → chunk-Y2NWGNUB.js} +5 -5
- package/dist/bundle/{chunk-IJCUAKR5.js → chunk-YJIGGUPI.js} +4 -4
- package/dist/bundle/{chunk-L342KHIZ.js → chunk-YMJ6IDGT.js} +6 -6
- package/dist/bundle/{chunk-WNMPIRRF.js → chunk-YPFWNVHV.js} +3 -3
- package/dist/bundle/{chunk-T4FMXDDV.js → chunk-YPNWIB6H.js} +3 -3
- package/dist/bundle/{chunk-FIVFP53N.js → chunk-YVI5SQPY.js} +1 -1
- package/dist/bundle/{chunk-RWQ7T4Y5.js → chunk-Z3KUSRCF.js} +2 -2
- package/dist/bundle/{chunk-WQOGHND4.js → chunk-Z56QFOBR.js} +1 -1
- package/dist/bundle/chunk-ZCR3IRZ2.js +823 -0
- package/dist/bundle/{chunk-SYUXKV2E.js → chunk-ZM63SUHG.js} +2 -2
- package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-ZZ32DXTH.js} +1 -1
- package/dist/bundle/{cli-BS4L3HAP.js → cli-556DERZL.js} +88 -69
- package/dist/bundle/command-contract-VRTOAV6W.js +43 -0
- package/dist/bundle/{command-server-entry-CJ2CV7ZV.js → command-server-entry-AYLGNZWD.js} +33 -30
- package/dist/bundle/decode-QU24MWMN.js +299 -0
- package/dist/bundle/{dispatch-WBEOHZDV.js → dispatch-4KODNOXV.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-QIXLXS3G.js → echarts-BXX4OQWC.js} +2 -2
- package/dist/bundle/{embed-YNZW5X6M.js → embed-KG27KG3D.js} +9 -9
- package/dist/bundle/{embedder-LRC2PKTS.js → embedder-IPAVUQUV.js} +12 -12
- package/dist/bundle/entry-MVXQETWS.js +25 -0
- package/dist/bundle/{failure-X6PSLVSO.js → failure-ESL7ETL4.js} +4 -4
- package/dist/bundle/first-run-4UVLW2WR.js +31 -0
- package/dist/bundle/first-screen-JAKAIINI.js +41 -0
- package/dist/bundle/google-22NXXJX5.js +45 -0
- package/dist/bundle/{google-api-7JDZDCWE.js → google-api-VCDBSNOW.js} +70 -62
- package/dist/bundle/grants-MQMTVCRQ.js +118 -0
- package/dist/bundle/{identity-E43WKN5F.js → identity-LOWMVGZY.js} +6 -6
- package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-2VECIDXF.js} +1 -1
- package/dist/bundle/{login-RBDJPQAG.js → login-7GBONT7V.js} +78 -70
- package/dist/bundle/{mcp-TDKGDB4V.js → mcp-O6ACR2DX.js} +2 -2
- package/dist/bundle/meeting-combined-LVP4AZKA.js +27 -0
- package/dist/bundle/meeting-model-RAY5XDXZ.js +29 -0
- package/dist/bundle/meeting-semantic-G7PFOKU7.js +25 -0
- package/dist/bundle/{node-IEVT2FSJ.js → node-MPEQSFI3.js} +2 -2
- package/dist/bundle/{node-sqlite-IENH4TRX.js → node-sqlite-OLQMAYB4.js} +10 -10
- package/dist/bundle/oauth-SGH2I2BY.js +22 -0
- package/dist/bundle/{open-TZ5H7NYM.js → open-OXTE672W.js} +8 -8
- package/dist/bundle/{openai-XF2KB7W2.js → openai-EB3TPIZY.js} +32 -30
- package/dist/bundle/{process-6Q23D3TO.js → process-F6TKXWWA.js} +1 -1
- package/dist/bundle/{program-D5XWOHV5.js → program-4IFDZ7FM.js} +1356 -1338
- package/dist/bundle/{prompt-KUC5D4GX.js → prompt-F5RRHPN2.js} +8 -8
- package/dist/bundle/{reasons-KSYP5VDJ.js → reasons-UORHJDHK.js} +5 -5
- package/dist/bundle/{recognize-DPFW7HO3.js → recognize-DAVNZND3.js} +7 -7
- package/dist/bundle/{remote-MODTSUNH.js → remote-D5EYYIAU.js} +13 -13
- package/dist/bundle/{rerank-JK7SERLE.js → rerank-CND2GVLZ.js} +10 -10
- package/dist/bundle/{serve-BV2WHZLW.js → serve-ZHSPUIGX.js} +12 -12
- package/dist/bundle/server-DUVJWP3Q.js +80 -0
- package/dist/bundle/{server-N3WPEU7Z.js → server-YMAK4LHC.js} +54 -46
- package/dist/bundle/{services-SV6CFUCS.js → services-ZILSFJ6E.js} +79 -54
- package/dist/bundle/{sqlite-runtime-RZ5PLZVQ.js → sqlite-runtime-S5VPMZQH.js} +9 -9
- package/dist/bundle/{start-C6EXYXAL.js → start-CR6X25RT.js} +7 -7
- package/dist/bundle/{state-RAZIREVG.js → state-YFPHVIIJ.js} +9 -9
- package/dist/bundle/{store-DQKJKX2G.js → store-CL4ZJZRI.js} +23 -19
- package/dist/bundle/{store-2DLGLYS6.js → store-UODRT6X4.js} +31 -26
- package/dist/bundle/store-maintenance-command-DY5XIBWR.js +72 -0
- package/dist/bundle/tokens-AF7QOFOF.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/config.d.ts.map +1 -1
- package/dist/config.js +2 -1
- package/dist/config.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/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/sync.d.ts.map +1 -1
- package/dist/sync.js +1 -2
- package/dist/sync.js.map +1 -1
- package/dist/transcripts.d.ts +0 -6
- package/dist/transcripts.d.ts.map +1 -1
- package/dist/transcripts.js +0 -13
- package/dist/transcripts.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-HYURWSD6.js +0 -40
- package/dist/bundle/decode-E2NM5SSM.js +0 -165
- package/dist/bundle/entry-2IMSWRJU.js +0 -25
- package/dist/bundle/first-run-7CPHQDM5.js +0 -30
- package/dist/bundle/first-screen-OKZ7GMFR.js +0 -38
- package/dist/bundle/google-WDKDBDD4.js +0 -45
- package/dist/bundle/grants-AU25GWKF.js +0 -110
- package/dist/bundle/oauth-3JGSN47Z.js +0 -22
- package/dist/bundle/server-6YDI4Y36.js +0 -72
- package/dist/bundle/store-maintenance-command-UJ5F5L4H.js +0 -64
- package/dist/bundle/tokens-LY3WML55.js +0 -110
- 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-VKE77B3F.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-FJH7DJWK.js";
|
|
7
|
+
import "./chunk-CJLVYIOP.js";
|
|
8
|
+
import "./chunk-3N2OFXB5.js";
|
|
9
|
+
import {
|
|
10
|
+
importFrom
|
|
11
|
+
} from "./chunk-Y5E2WNWB.js";
|
|
12
|
+
import "./chunk-KYKW2W6X.js";
|
|
13
|
+
import "./chunk-KGYVHPGE.js";
|
|
14
|
+
import "./chunk-OJSBWP3F.js";
|
|
15
|
+
import {
|
|
16
|
+
CliError
|
|
17
|
+
} from "./chunk-4QNW4NK6.js";
|
|
18
|
+
import {
|
|
19
|
+
__name
|
|
20
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
21
|
+
|
|
22
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/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-YJIGGUPI.js";
|
|
18
18
|
import "./chunk-Y5E2WNWB.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-KYKW2W6X.js";
|
|
20
20
|
import {
|
|
21
21
|
CliError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-4QNW4NK6.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.102.1_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.102.1_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.102.1_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.102.1_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.102.1_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-ESL7ETL4.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-CJLVYIOP.js";
|
|
7
7
|
import {
|
|
8
8
|
errorObjectOf,
|
|
9
9
|
exitCodeOfError,
|
|
10
10
|
renderError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3N2OFXB5.js";
|
|
12
12
|
import "./chunk-Y5E2WNWB.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-KYKW2W6X.js";
|
|
14
|
+
import "./chunk-KGYVHPGE.js";
|
|
15
|
+
import "./chunk-OJSBWP3F.js";
|
|
16
|
+
import "./chunk-4QNW4NK6.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-CR6X25RT.js"),
|
|
26
|
+
import("./identity-LOWMVGZY.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-MVXQETWS.js"),
|
|
39
|
+
import("./reasons-UORHJDHK.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-4IFDZ7FM.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.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/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.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/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-UTO2GO4P.js";
|
|
17
17
|
import "./chunk-5DPV7X27.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-COOOO5B3.js";
|
|
19
|
+
import "./chunk-Z3KUSRCF.js";
|
|
20
|
+
import "./chunk-CJLVYIOP.js";
|
|
21
|
+
import "./chunk-3N2OFXB5.js";
|
|
22
22
|
import "./chunk-Y5E2WNWB.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-KYKW2W6X.js";
|
|
24
|
+
import "./chunk-KGYVHPGE.js";
|
|
25
|
+
import "./chunk-OJSBWP3F.js";
|
|
26
|
+
import "./chunk-4QNW4NK6.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-UTO2GO4P.js";
|
|
8
8
|
import "./chunk-5DPV7X27.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-COOOO5B3.js";
|
|
10
|
+
import "./chunk-Z3KUSRCF.js";
|
|
11
|
+
import "./chunk-CJLVYIOP.js";
|
|
12
|
+
import "./chunk-3N2OFXB5.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-KYKW2W6X.js";
|
|
17
|
+
import "./chunk-KGYVHPGE.js";
|
|
18
|
+
import "./chunk-OJSBWP3F.js";
|
|
19
19
|
import {
|
|
20
20
|
CliError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4QNW4NK6.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.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/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.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/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.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/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-QFR2PNJN.js";
|
|
8
|
+
import "./chunk-B5KSXHJ7.js";
|
|
9
|
+
import "./chunk-GPQ44Y2R.js";
|
|
10
|
+
import "./chunk-MNLL5YLM.js";
|
|
11
|
+
import "./chunk-4PA4DHYV.js";
|
|
12
|
+
import "./chunk-4HWJOU7N.js";
|
|
13
|
+
import "./chunk-CJLVYIOP.js";
|
|
14
|
+
import "./chunk-3N2OFXB5.js";
|
|
15
|
+
import "./chunk-Y5E2WNWB.js";
|
|
16
|
+
import "./chunk-KYKW2W6X.js";
|
|
17
|
+
import "./chunk-KGYVHPGE.js";
|
|
18
|
+
import "./chunk-OJSBWP3F.js";
|
|
19
|
+
import "./chunk-4QNW4NK6.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-3N2OFXB5.js";
|
|
13
|
+
import "./chunk-KYKW2W6X.js";
|
|
14
|
+
import "./chunk-OJSBWP3F.js";
|
|
15
|
+
import "./chunk-4QNW4NK6.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-6W763DZN.js";
|
|
9
|
+
import "./chunk-FP54WSIR.js";
|
|
10
|
+
import "./chunk-YVI5SQPY.js";
|
|
11
|
+
import "./chunk-FCS26CYQ.js";
|
|
12
|
+
import "./chunk-GZ2D4KXG.js";
|
|
13
|
+
import "./chunk-X4TIMMKJ.js";
|
|
14
|
+
import "./chunk-GBKNJWOZ.js";
|
|
15
|
+
import "./chunk-D72URWJE.js";
|
|
16
|
+
import "./chunk-ZZ32DXTH.js";
|
|
17
|
+
import "./chunk-Z3KUSRCF.js";
|
|
18
|
+
import "./chunk-CJLVYIOP.js";
|
|
19
|
+
import "./chunk-3N2OFXB5.js";
|
|
20
|
+
import "./chunk-Y5E2WNWB.js";
|
|
21
|
+
import "./chunk-KYKW2W6X.js";
|
|
22
|
+
import "./chunk-KGYVHPGE.js";
|
|
23
|
+
import "./chunk-OJSBWP3F.js";
|
|
24
|
+
import "./chunk-4QNW4NK6.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-D5TGYUVU.js";
|
|
8
|
+
import "./chunk-HTQTIKWP.js";
|
|
9
|
+
import "./chunk-7PDHGZN4.js";
|
|
10
|
+
import "./chunk-SERXSCN3.js";
|
|
11
|
+
import "./chunk-I4RWW3UD.js";
|
|
12
|
+
import "./chunk-72C4YOCH.js";
|
|
13
|
+
import "./chunk-MNLL5YLM.js";
|
|
14
|
+
import "./chunk-Z56QFOBR.js";
|
|
15
|
+
import "./chunk-XF4EXO2C.js";
|
|
16
|
+
import "./chunk-FCS26CYQ.js";
|
|
17
|
+
import "./chunk-YMJ6IDGT.js";
|
|
18
|
+
import "./chunk-HMS6EEQL.js";
|
|
19
|
+
import "./chunk-COOOO5B3.js";
|
|
20
|
+
import "./chunk-RJOQH5YY.js";
|
|
21
|
+
import "./chunk-SAKO3P4H.js";
|
|
22
|
+
import "./chunk-26DHFMGZ.js";
|
|
23
|
+
import "./chunk-2UUWXPOB.js";
|
|
24
|
+
import "./chunk-PRW6SYA3.js";
|
|
25
|
+
import "./chunk-OF422U5D.js";
|
|
26
|
+
import "./chunk-GBKNJWOZ.js";
|
|
27
|
+
import "./chunk-VKE77B3F.js";
|
|
28
|
+
import "./chunk-Z3KUSRCF.js";
|
|
29
|
+
import "./chunk-CJLVYIOP.js";
|
|
30
|
+
import "./chunk-3N2OFXB5.js";
|
|
31
|
+
import "./chunk-Y5E2WNWB.js";
|
|
32
|
+
import "./chunk-KYKW2W6X.js";
|
|
33
|
+
import "./chunk-KGYVHPGE.js";
|
|
34
|
+
import "./chunk-OJSBWP3F.js";
|
|
35
|
+
import "./chunk-4QNW4NK6.js";
|
|
36
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
37
|
+
export {
|
|
38
|
+
WIRECAT_TOOLS,
|
|
39
|
+
firstScreen,
|
|
40
|
+
installHelp
|
|
41
|
+
};
|