anyfile-cli 0.0.0-stage → 0.2.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/LICENSE +177 -0
- package/README.md +56 -2
- package/SKILL.md +101 -0
- package/chunks/browser-probe-5STDX455.mjs +17 -0
- package/chunks/browser-probe-F5RX44T3.mjs +24 -0
- package/chunks/chunk-2C34VMNV.mjs +108 -0
- package/chunks/chunk-3OZ56PUH.mjs +97 -0
- package/chunks/chunk-3YRWCQGV.mjs +38 -0
- package/chunks/chunk-53MJMIN4.mjs +23 -0
- package/chunks/chunk-5LOC7IST.mjs +372 -0
- package/chunks/chunk-5OI4NQH7.mjs +2232 -0
- package/chunks/chunk-5XTYLZF3.mjs +559 -0
- package/chunks/chunk-5ZHDYRGV.mjs +64 -0
- package/chunks/chunk-6CQL4K2K.mjs +21 -0
- package/chunks/chunk-6EVJJFOH.mjs +243 -0
- package/chunks/chunk-6NWSQGYE.mjs +68 -0
- package/chunks/chunk-7O5JLQE7.mjs +1 -0
- package/chunks/chunk-A6AQI6DF.mjs +321 -0
- package/chunks/chunk-AYF63UBE.mjs +79 -0
- package/chunks/chunk-B27PR6Q4.mjs +17 -0
- package/chunks/chunk-BP7LORL4.mjs +13 -0
- package/chunks/chunk-BVCRJLCD.mjs +109 -0
- package/chunks/chunk-CLSEE3VA.mjs +28 -0
- package/chunks/chunk-CO2ZAQIK.mjs +52 -0
- package/chunks/chunk-CQWM5GMU.mjs +167 -0
- package/chunks/chunk-CZFFYCMJ.mjs +136 -0
- package/chunks/chunk-D3CS6TIK.mjs +419 -0
- package/chunks/chunk-DJLFVMDJ.mjs +807 -0
- package/chunks/chunk-DJXVCKIO.mjs +30 -0
- package/chunks/chunk-EMXODK3K.mjs +94 -0
- package/chunks/chunk-EOJ7ZCDK.mjs +227 -0
- package/chunks/chunk-H4TBN22D.mjs +100 -0
- package/chunks/chunk-HUSX3ZU3.mjs +58 -0
- package/chunks/chunk-IC3G2XE2.mjs +436 -0
- package/chunks/chunk-IZGTVZHE.mjs +90 -0
- package/chunks/chunk-J4G7LUPA.mjs +117 -0
- package/chunks/chunk-JBAJW66L.mjs +4220 -0
- package/chunks/chunk-JKQUF2MM.mjs +438 -0
- package/chunks/chunk-KAMPC5TK.mjs +131 -0
- package/chunks/chunk-KSKEMJVC.mjs +145 -0
- package/chunks/chunk-LRHHRZLE.mjs +29 -0
- package/chunks/chunk-M37ZOAUG.mjs +93 -0
- package/chunks/chunk-MG7LUDXO.mjs +187 -0
- package/chunks/chunk-NGVHHTQD.mjs +125 -0
- package/chunks/chunk-NQ7J2NH6.mjs +50 -0
- package/chunks/chunk-NUMNHVSI.mjs +60 -0
- package/chunks/chunk-ORJ3DN65.mjs +58 -0
- package/chunks/chunk-QOUEBPPL.mjs +15 -0
- package/chunks/chunk-QR3Y3UKM.mjs +194 -0
- package/chunks/chunk-RFKYE7SE.mjs +50 -0
- package/chunks/chunk-SH57XOAV.mjs +33 -0
- package/chunks/chunk-TB5ISPA4.mjs +1 -0
- package/chunks/chunk-UGAU3V4V.mjs +206 -0
- package/chunks/chunk-UUN2DVDC.mjs +1893 -0
- package/chunks/chunk-WDN6NMVU.mjs +36 -0
- package/chunks/chunk-WWTLSPEG.mjs +3999 -0
- package/chunks/chunk-XDW56XVX.mjs +69 -0
- package/chunks/chunk-XRT7TAAY.mjs +27 -0
- package/chunks/chunk-XTW4HNIJ.mjs +418 -0
- package/chunks/chunk-YPLWNGCC.mjs +17 -0
- package/chunks/chunk-ZBR7RQQE.mjs +64 -0
- package/chunks/chunk-ZUHJIGHP.mjs +300 -0
- package/chunks/deflate-IINN6MRE.mjs +19 -0
- package/chunks/jpeg-N3DSYEAQ.mjs +964 -0
- package/chunks/jxl_oxide_wasm-3UN6G3YN.mjs +589 -0
- package/chunks/lerc-5LP7Q554.mjs +2086 -0
- package/chunks/lzw-Z2ZZBEWD.mjs +137 -0
- package/chunks/packbits-3S2JASDB.mjs +34 -0
- package/chunks/pdf.worker-PUGU2NS2.mjs +67416 -0
- package/chunks/probe-22WNVZ3I.mjs +17 -0
- package/chunks/probe-2P4CTFCY.mjs +14 -0
- package/chunks/probe-2QBNDPYK.mjs +18 -0
- package/chunks/probe-34TOVXUI.mjs +11 -0
- package/chunks/probe-3W2HOWBM.mjs +20 -0
- package/chunks/probe-42OBMD35.mjs +23 -0
- package/chunks/probe-43RVHUBG.mjs +17 -0
- package/chunks/probe-4O362IEX.mjs +18 -0
- package/chunks/probe-4WF34ZXS.mjs +11 -0
- package/chunks/probe-5ZITS3T5.mjs +40 -0
- package/chunks/probe-5ZS5DHFP.mjs +21 -0
- package/chunks/probe-62RFYKCP.mjs +14 -0
- package/chunks/probe-64JTFRH4.mjs +41 -0
- package/chunks/probe-6YJQJJ3R.mjs +518 -0
- package/chunks/probe-6YMOOV53.mjs +39 -0
- package/chunks/probe-BYBD2WAK.mjs +239 -0
- package/chunks/probe-CZZNJOHV.mjs +20 -0
- package/chunks/probe-DJMPK6HU.mjs +11 -0
- package/chunks/probe-FMWIF4LX.mjs +33 -0
- package/chunks/probe-FYPH6CYY.mjs +206 -0
- package/chunks/probe-G6PPXKBE.mjs +15 -0
- package/chunks/probe-GJ5OUOQ3.mjs +32 -0
- package/chunks/probe-H6J7TUY2.mjs +95 -0
- package/chunks/probe-IGZ47OE3.mjs +68 -0
- package/chunks/probe-IL5HO3OK.mjs +46 -0
- package/chunks/probe-INYCDZHO.mjs +27 -0
- package/chunks/probe-JFH545GO.mjs +11 -0
- package/chunks/probe-JZYDRITV.mjs +18 -0
- package/chunks/probe-K3WW5O5K.mjs +26 -0
- package/chunks/probe-KB4T466L.mjs +70 -0
- package/chunks/probe-KY7SIIXD.mjs +13 -0
- package/chunks/probe-L2P263WT.mjs +16 -0
- package/chunks/probe-LEP3RQPD.mjs +11 -0
- package/chunks/probe-M2QWULOI.mjs +119 -0
- package/chunks/probe-M7AYZBD3.mjs +35 -0
- package/chunks/probe-MEN3BMBB.mjs +22 -0
- package/chunks/probe-MNIGKDWT.mjs +163 -0
- package/chunks/probe-NFVFWB4M.mjs +56 -0
- package/chunks/probe-NJGSTL6R.mjs +161 -0
- package/chunks/probe-O73EHWT3.mjs +14 -0
- package/chunks/probe-OG2XYCG2.mjs +25 -0
- package/chunks/probe-OTKJKTNS.mjs +10 -0
- package/chunks/probe-OZKO3C2V.mjs +27 -0
- package/chunks/probe-PBL4KITG.mjs +12 -0
- package/chunks/probe-PEFZNH2T.mjs +21 -0
- package/chunks/probe-R4SSEXES.mjs +27 -0
- package/chunks/probe-RCAUVV27.mjs +29 -0
- package/chunks/probe-RPGBKGPI.mjs +20 -0
- package/chunks/probe-S2I46SEO.mjs +10 -0
- package/chunks/probe-SGDD4U4Q.mjs +165 -0
- package/chunks/probe-SPQO5LHI.mjs +9 -0
- package/chunks/probe-TBR6UGRZ.mjs +19 -0
- package/chunks/probe-TNKNILAW.mjs +21 -0
- package/chunks/probe-TVRJBPXH.mjs +48 -0
- package/chunks/probe-UESMTUQ5.mjs +33 -0
- package/chunks/probe-VDXFEZ5Q.mjs +16 -0
- package/chunks/probe-VX7JCDW6.mjs +39 -0
- package/chunks/probe-W7M55OPE.mjs +64 -0
- package/chunks/probe-XUBTIWGE.mjs +13 -0
- package/chunks/probe-ZF7KIRHO.mjs +36 -0
- package/chunks/raw-JJRPYAXO.mjs +16 -0
- package/chunks/tiff-metadata-7MWLNVW2.mjs +2990 -0
- package/chunks/webimage-D6XSCCTJ.mjs +56 -0
- package/chunks/zip-reader-YUGANW4Z.mjs +92 -0
- package/chunks/zstd-AH2S24PU.mjs +121 -0
- package/cli-main.mjs +278 -0
- package/cli.mjs +3 -0
- package/extractors/apple-plist.mjs +145 -0
- package/extractors/archive-metadata-viewer.mjs +1401 -0
- package/extractors/bittorrent-metadata.mjs +369 -0
- package/extractors/calendar-contacts.mjs +328 -0
- package/extractors/camera-raw.mjs +201 -0
- package/extractors/chm-reader.mjs +1842 -0
- package/extractors/comic-book-reader.mjs +307 -0
- package/extractors/design-source.mjs +1801 -0
- package/extractors/dev-array-viewer.mjs +825 -0
- package/extractors/dev-native-binary-viewer.mjs +1661 -0
- package/extractors/dev-source-map-viewer.mjs +416 -0
- package/extractors/dev-wasm-viewer.mjs +506 -0
- package/extractors/dicom.mjs +383 -0
- package/extractors/djvu-reader.mjs +337 -0
- package/extractors/duckdb-data.mjs +49174 -0
- package/extractors/epub-reader.mjs +222 -0
- package/extractors/excel-workbook.mjs +27057 -0
- package/extractors/fictionbook-reader.mjs +362 -0
- package/extractors/font-viewer.mjs +441 -0
- package/extractors/general-raster.mjs +444 -0
- package/extractors/hdr-image.mjs +1685 -0
- package/extractors/http-archive.mjs +306 -0
- package/extractors/ifc.mjs +341 -0
- package/extractors/iwork.mjs +640 -0
- package/extractors/microsoft-project.mjs +174 -0
- package/extractors/mind-map.mjs +607 -0
- package/extractors/ml-weights.mjs +649 -0
- package/extractors/modern-raster.mjs +620 -0
- package/extractors/ofd-reader.mjs +973 -0
- package/extractors/outlook-pst.mjs +997 -0
- package/extractors/pdfjs-pdf.mjs +32056 -0
- package/extractors/photoshop-document.mjs +17448 -0
- package/extractors/safe-svg.mjs +163 -0
- package/extractors/scientific-data.mjs +2041 -0
- package/extractors/sqlite-database.mjs +333 -0
- package/extractors/statistical-data.mjs +297 -0
- package/extractors/visio.mjs +141 -0
- package/extractors/x509-certificate.mjs +588 -0
- package/extractors/xps-reader.mjs +896 -0
- package/index.mjs +83 -0
- package/licenses/dicom-parser/1.8.21/LICENSE +21 -0
- package/licenses/libraw-wasm/1.6.0/COPYRIGHT.LibRaw +27 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.Emscripten +102 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.LibRaw-CDDL-1.0 +340 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.Little-CMS-MIT +22 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.libpng +134 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.libraw-wasm-ISC +15 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.zlib +22 -0
- package/licenses/libraw-wasm/1.6.0/NOTICE.IJG-libjpeg +49 -0
- package/licenses/libraw-wasm/1.6.0/SOURCE.md +25 -0
- package/licenses/libraw-wasm/1.6.0/THIRD_PARTY_NOTICES.md +14 -0
- package/licenses/mediabunny/1.55.3/MPL-2.0.txt +373 -0
- package/licenses/mediabunny/1.55.3/SOURCE.md +16 -0
- package/licenses/openskp/1.3.0/LICENSE +21 -0
- package/package.json +33 -3
- package/renderer-host/assets/ColladaComposer-TCm9fgZa.js +1 -0
- package/renderer-host/assets/ColladaParser-BHTzbhBz.js +3 -0
- package/renderer-host/assets/FBXLoader-D1vDnL3o.js +8 -0
- package/renderer-host/assets/agent-CKvDbj87.js +1 -0
- package/renderer-host/assets/amf-CLBaywBr.js +1 -0
- package/renderer-host/assets/animation-DnPo99To.js +1 -0
- package/renderer-host/assets/archive-client-CyhEmSF7.js +1 -0
- package/renderer-host/assets/archive.worker-CcLnJ9FC.js +1 -0
- package/renderer-host/assets/audio-visualizer-CiyGNhY2.js +1 -0
- package/renderer-host/assets/basedecoder-BuG7fe0q.js +1 -0
- package/renderer-host/assets/book-source-28BQcBKR.js +1 -0
- package/renderer-host/assets/book-worker-DrtzCzPo.js +1 -0
- package/renderer-host/assets/browser-C0pGRq_c.js +1 -0
- package/renderer-host/assets/client-Dp-p4unY.js +1 -0
- package/renderer-host/assets/container-inspection-DZoaDYQR.js +1 -0
- package/renderer-host/assets/data-table-OJQe3aN5.js +1 -0
- package/renderer-host/assets/decode-D5vB6JN8.js +1 -0
- package/renderer-host/assets/decode-tiff-BuYdKp6p.js +5 -0
- package/renderer-host/assets/decoder-worker-B0sdTVlF.js +1 -0
- package/renderer-host/assets/decoder-worker-CBiHE971.js +3 -0
- package/renderer-host/assets/decoder-worker-Cr5oP97p.js +5 -0
- package/renderer-host/assets/decoder-worker-DIdLFebY.js +11 -0
- package/renderer-host/assets/decoder-worker-DLeuEYxq.js +1 -0
- package/renderer-host/assets/decoder.worker-BXAaF0Qj.js +1 -0
- package/renderer-host/assets/decoder.worker-yaM6uups.js +1 -0
- package/renderer-host/assets/deflate-DPjr4M2G.js +1 -0
- package/renderer-host/assets/deflate-S3QmZI-f.js +1 -0
- package/renderer-host/assets/dual-track-playback-lNQyU1GR.js +1 -0
- package/renderer-host/assets/ext-searchbox-BIdon51Z.js +164 -0
- package/renderer-host/assets/ffmpeg-playback-QcT_NwlK.js +1 -0
- package/renderer-host/assets/gltf-Cqq-xStc.js +1 -0
- package/renderer-host/assets/hdf5.worker-BO3TrRup.js +1 -0
- package/renderer-host/assets/heif-worker-CC9DI3ZR.js +1 -0
- package/renderer-host/assets/id3-uzaDmDwy.js +1 -0
- package/renderer-host/assets/ifc.worker-KIbgAIsy.js +1 -0
- package/renderer-host/assets/image-load-B1fNI3iO.js +1 -0
- package/renderer-host/assets/index-BCxD9rBl.js +2 -0
- package/renderer-host/assets/jpeg-AGQ46WDa.js +1 -0
- package/renderer-host/assets/jpeg-Dm0yBuYB.js +1 -0
- package/renderer-host/assets/jszip.min-DCdQ6XWv.js +2 -0
- package/renderer-host/assets/jxl_oxide_wasm-BJKDqoXP.js +1 -0
- package/renderer-host/assets/jxl_oxide_wasm_bg-C5JqlrFv.wasm +0 -0
- package/renderer-host/assets/kernel.worker-B58X9XWu.js +1 -0
- package/renderer-host/assets/kernel.worker-BcQYKb39.js +8 -0
- package/renderer-host/assets/kernel.worker-BdWmPdqg.js +1 -0
- package/renderer-host/assets/kernel.worker-C7qxomuK.js +1 -0
- package/renderer-host/assets/kernel.worker-D88TbQnz.js +1 -0
- package/renderer-host/assets/laz-Lt10LsWd.js +1 -0
- package/renderer-host/assets/lerc-BxVqCKaH.js +3 -0
- package/renderer-host/assets/lerc-CRhfhhOS.js +1 -0
- package/renderer-host/assets/lzw-D2FslT4L.js +1 -0
- package/renderer-host/assets/lzw-DODNa9l5.js +1 -0
- package/renderer-host/assets/mediabunny-viewer-BnJM6Yo0.js +16 -0
- package/renderer-host/assets/model-D2YSoRt5.js +1 -0
- package/renderer-host/assets/obj-DbUZkDna.js +9 -0
- package/renderer-host/assets/off-CzR_R_Tf.js +1 -0
- package/renderer-host/assets/ogg-probe-C2TT74FL.js +1 -0
- package/renderer-host/assets/ogg-viewer-CT31JEhG.js +9 -0
- package/renderer-host/assets/packbits-DCimUQ1T.js +1 -0
- package/renderer-host/assets/paged-CX-N_Pzy.js +319 -0
- package/renderer-host/assets/pako.esm-0UYEm1Jg.js +2 -0
- package/renderer-host/assets/pako.esm-CtVA0R7W.js +1 -0
- package/renderer-host/assets/pdf.worker.min-CHFwMXne.mjs +29 -0
- package/renderer-host/assets/ply-C-xrhUaO.js +2 -0
- package/renderer-host/assets/points.worker-CA8v75dl.js +2 -0
- package/renderer-host/assets/probe-asf-CvcaYQaR.js +14 -0
- package/renderer-host/assets/range-reader-9PeAh1Hv.js +1 -0
- package/renderer-host/assets/raw-A-vJRPpa.js +1 -0
- package/renderer-host/assets/resource-cache-CHocY8K3.js +1 -0
- package/renderer-host/assets/resources-WcZvn3-C.js +1 -0
- package/renderer-host/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
- package/renderer-host/assets/safe-content-B61Ktgzp.js +1 -0
- package/renderer-host/assets/sanitize-D56ODnaM.js +1 -0
- package/renderer-host/assets/scene-adapter-CmaaVwsM.js +1 -0
- package/renderer-host/assets/scene.worker-CJViWLYo.js +24 -0
- package/renderer-host/assets/scene.worker-D7koFZY8.js +2 -0
- package/renderer-host/assets/skp-adapter-ByI1iX8S.js +1 -0
- package/renderer-host/assets/skp.worker-D9ujTXFV.js +1 -0
- package/renderer-host/assets/src-0DTp6SF8.js +1 -0
- package/renderer-host/assets/src-0QHjkpy0.js +44 -0
- package/renderer-host/assets/src-2X3Gt6Lk.js +2 -0
- package/renderer-host/assets/src-2tfD0huT.js +16 -0
- package/renderer-host/assets/src-5ZJshveh.js +29 -0
- package/renderer-host/assets/src-9k3CCYnZ.js +1 -0
- package/renderer-host/assets/src-B0zJlB0C.js +27 -0
- package/renderer-host/assets/src-B4jorJ2U.js +100 -0
- package/renderer-host/assets/src-BB6xj1UK.js +18 -0
- package/renderer-host/assets/src-BEn15PBT.js +52 -0
- package/renderer-host/assets/src-BLndk63N.js +7 -0
- package/renderer-host/assets/src-BMrLVJyB.js +169 -0
- package/renderer-host/assets/src-BPG8SYXq.js +10 -0
- package/renderer-host/assets/src-BZrNtUNO.js +2 -0
- package/renderer-host/assets/src-B_o7QilB.js +58 -0
- package/renderer-host/assets/src-BgM1jpe4.js +5 -0
- package/renderer-host/assets/src-BgUXah8O.js +1 -0
- package/renderer-host/assets/src-Bl5Lv4-d.js +1 -0
- package/renderer-host/assets/src-Blx9jp9x.js +90 -0
- package/renderer-host/assets/src-Bu1cTJNz.js +64 -0
- package/renderer-host/assets/src-BuN3y1yE.js +24 -0
- package/renderer-host/assets/src-Bw-O8ujJ.js +2 -0
- package/renderer-host/assets/src-BwZAUudm.js +2 -0
- package/renderer-host/assets/src-BydeR01n.js +1 -0
- package/renderer-host/assets/src-C2LKqLBA.js +182 -0
- package/renderer-host/assets/src-C4t_UvT8.js +8 -0
- package/renderer-host/assets/src-C5k8Ydia.js +1 -0
- package/renderer-host/assets/src-C6w9FGSB.js +1 -0
- package/renderer-host/assets/src-C9Uz3C-q.js +432 -0
- package/renderer-host/assets/src-CAdKRH5C.js +37 -0
- package/renderer-host/assets/src-CBE5sqjl.js +7 -0
- package/renderer-host/assets/src-CBo2yHRk.js +21 -0
- package/renderer-host/assets/src-CGx0nUS5.js +24 -0
- package/renderer-host/assets/src-CHNgoDf9.js +10 -0
- package/renderer-host/assets/src-CIDWSV97.js +1 -0
- package/renderer-host/assets/src-CPUYqpHZ.js +9 -0
- package/renderer-host/assets/src-CVc67mQv.js +1 -0
- package/renderer-host/assets/src-CXRrmfb0.js +7 -0
- package/renderer-host/assets/src-C_1M1IDo.js +8 -0
- package/renderer-host/assets/src-C_HAB_bn.js +5 -0
- package/renderer-host/assets/src-CeGmxOTi.js +1 -0
- package/renderer-host/assets/src-CifsQr3m.js +222 -0
- package/renderer-host/assets/src-Ck1ekdEN.js +1 -0
- package/renderer-host/assets/src-ClIHDiJ4.js +27 -0
- package/renderer-host/assets/src-Cvb3aCDG.js +10 -0
- package/renderer-host/assets/src-Cyw_3X-L.js +989 -0
- package/renderer-host/assets/src-D3OyeoQs.js +1 -0
- package/renderer-host/assets/src-D4cv_-u0.js +1 -0
- package/renderer-host/assets/src-DPm7_lsi.js +24 -0
- package/renderer-host/assets/src-DZE9IoBl.js +88 -0
- package/renderer-host/assets/src-DmzigsPg.js +7 -0
- package/renderer-host/assets/src-DpEmkhrn.js +6 -0
- package/renderer-host/assets/src-DrYYfoQO.js +7 -0
- package/renderer-host/assets/src-DsVDi0pr.js +4126 -0
- package/renderer-host/assets/src-ORHZWeVF.js +2 -0
- package/renderer-host/assets/src-Q-oKL3Dw.js +10 -0
- package/renderer-host/assets/src-QXdjrTaw.js +4 -0
- package/renderer-host/assets/src-R4bKlaNn.js +387 -0
- package/renderer-host/assets/src-TbSq3WSr.js +115 -0
- package/renderer-host/assets/src-TuTvYAR6.js +11 -0
- package/renderer-host/assets/src-eVKtGm4Q.js +17 -0
- package/renderer-host/assets/src-efHN2oAJ.js +17 -0
- package/renderer-host/assets/src-hCrza_Lf.js +1 -0
- package/renderer-host/assets/src-j_mEQ9Os.js +9 -0
- package/renderer-host/assets/src-lYIAi6Hw.js +1 -0
- package/renderer-host/assets/src-n2gsf381.js +20 -0
- package/renderer-host/assets/src-p14e1hma.js +23 -0
- package/renderer-host/assets/src-rJN_jaC5.js +1 -0
- package/renderer-host/assets/src-vPHMg1Fp.js +1 -0
- package/renderer-host/assets/src-wrrVkfrK.js +1 -0
- package/renderer-host/assets/stl-adapter-D1eozFH9.js +1 -0
- package/renderer-host/assets/stl.worker-C-anHijM.js +1 -0
- package/renderer-host/assets/three-mf-CbcWWdM8.js +2 -0
- package/renderer-host/assets/webimage-zQMH-_zR.js +1 -0
- package/renderer-host/assets/webm-_wYh_V7u.js +1 -0
- package/renderer-host/assets/worker-QK2gViTu.js +1 -0
- package/renderer-host/assets/x6-dng-worker-CNf3zUP-.js +1 -0
- package/renderer-host/assets/xml.browser-CC8-XAyN.js +1 -0
- package/renderer-host/assets/zip-core-base-CDv8KjIR.js +1 -0
- package/renderer-host/assets/zip-core-custom-D3VVVj-J.js +1 -0
- package/renderer-host/assets/zip-source-C5dFTDt7.js +1 -0
- package/renderer-host/assets/zstd-CmwSLjHB.js +1 -0
- package/renderer-host/assets/zstd-i4Jwubnx.js +1 -0
- package/renderer-host/index.html +65 -0
- package/vendor-manifest.json +1433 -0
- package/worker.mjs +261 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
package/README.md
CHANGED
|
@@ -1,3 +1,57 @@
|
|
|
1
|
-
#
|
|
1
|
+
# anyfile-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Let AI agents read local files that plain text tools cannot: PDF, Office, SQLite/DuckDB, Outlook PST, Apple plist, HDF5, SPSS, EPUB, archives, PSD/EXR/HEIC/RAW, DWG/DXF/IFC/STEP, 3D models, and many more. Everything runs locally and read-only; file contents are never uploaded.
|
|
4
|
+
|
|
5
|
+
`anyfile` is the agent edition of [Anyfile Viewer](https://www.anyfile.top) and uses the same format engine. Guide: [English](https://www.anyfile.top/en/agent) · [简体中文](https://www.anyfile.top/zh-CN/agent)
|
|
6
|
+
|
|
7
|
+
Requires **Node.js 24+**. Rendering documents, CAD, and 3D also needs a local Chrome, Edge, Brave, or Chromium.
|
|
8
|
+
|
|
9
|
+
## Choose how to connect
|
|
10
|
+
|
|
11
|
+
| Path | For | Install |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| **Skill + CLI** | Agents with a shell (Claude Code, Codex, Cursor, Gemini CLI, …) | `npx skills add tianzhipeng-git/anyfile-skills` (Claude Code: `/plugin marketplace add tianzhipeng-git/anyfile-skills`, then `/plugin install anyfile@anyfile-skills`) |
|
|
14
|
+
| **MCP** | Clients without a shell (Claude Desktop, chat apps) | Add the stdio server below to the client config |
|
|
15
|
+
|
|
16
|
+
### Skill + CLI
|
|
17
|
+
|
|
18
|
+
The skill tells the agent when to use `anyfile` and how to follow the inspect → read / query / render workflow. The agent runs the CLI through `npx -y anyfile-cli`, or you can install it globally with `npm i -g anyfile-cli`.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
anyfile inspect ./archive.pst # format, capabilities, metadata, target ids
|
|
22
|
+
anyfile read ./archive.pst --target <target-id> # structured Markdown / JSON, paginated
|
|
23
|
+
anyfile query ./data.duckdb --sql "SELECT * FROM items LIMIT 20"
|
|
24
|
+
anyfile render ./drawing.dwg --out preview.png # bounded PNG preview
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### MCP
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"mcpServers": {
|
|
32
|
+
"anyfile": {
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "anyfile-cli", "mcp", "--allow-dir", "/abs/path/to/files"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Tools: `inspect_file`, `read_file`, `query_file`, `render_file`. Only the startup directory and the `--allow-dir` roots are readable.
|
|
41
|
+
|
|
42
|
+
## Offline use
|
|
43
|
+
|
|
44
|
+
Some formats download a WASM decoder on first use into `~/.cache/anyfile/vendor/` (override with `ANYFILE_CACHE_DIR`), verified against a bundled SHA-256 manifest. To pre-fetch them, run `anyfile cache add all`. Use `ANYFILE_BROWSER_PATH` / `ANYFILE_BROWSER_ARGS` to choose the browser used for rendering.
|
|
45
|
+
|
|
46
|
+
## Develop and release
|
|
47
|
+
|
|
48
|
+
This directory is the private workspace package `@anyfile/agent`. Its build output `dist/` is the published npm package `anyfile-cli`, generated by `scripts/build.mjs`, which writes `dist/package.json` from this package's `version`.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pnpm prepare:assets # once: generates public/vendor/manifest.json
|
|
52
|
+
pnpm --filter @anyfile/agent build # -> viewer/agent/dist
|
|
53
|
+
pnpm test viewer/agent # includes the dist smoke test
|
|
54
|
+
npm publish viewer/agent/dist # after bumping "version" in viewer/agent/package.json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The skill source is [`skills/anyfile/SKILL.md`](https://github.com/tianzhipeng-git/anyfile-viewer/blob/main/skills/anyfile/SKILL.md). After changing it, run `pnpm sync:skills` (which defaults to `../anyfile-skills`), then commit and push in [anyfile-skills](https://github.com/tianzhipeng-git/anyfile-skills), the install source for `npx skills add` and the Claude Code marketplace.
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: anyfile
|
|
3
|
+
description: Read local files that plain text tools cannot — binary, proprietary, archive, and database formats such as PDF, Office/iWork/Visio/Project, SQLite/DuckDB, Outlook PST, Apple plist, HDF5/NetCDF, SPSS/Stata/SAS, EPUB/DjVu/CHM, ZIP/7z/RAR, PSD/EXR/HEIC/JXL/camera RAW/DICOM, CAD and BIM (DWG/DXF/IFC/STEP), 3D models, fonts, ML weights, WASM/ELF/PE binaries, and extensionless blobs. Use when the user asks what is inside such a file, or when Read/cat returns binary garbage. Runs the `anyfile` CLI locally and read-only to inspect the format, extract structured text, run read-only SQL, or render a bounded PNG preview.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
compatibility: Requires Node.js 24+ (the CLI runs via npx). Rendering documents, CAD, and 3D needs a local Chrome, Edge, Brave, or Chromium.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# anyfile
|
|
9
|
+
|
|
10
|
+
`anyfile` identifies and reads a wide range of file formats entirely on this machine. Nothing is uploaded, and it never modifies files.
|
|
11
|
+
|
|
12
|
+
Do not use it for plain text, source code, or images your own file-reading tool can already view (PNG, JPEG, GIF, WebP). Read those directly.
|
|
13
|
+
|
|
14
|
+
## Setup
|
|
15
|
+
|
|
16
|
+
Run `anyfile --version`. If the command is not found, use `npx -y anyfile-cli` instead of `anyfile` in every command below (Node.js 24+ required). The user can install it permanently with `npm i -g anyfile-cli`.
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### 1. Inspect first
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
anyfile inspect ./data.sqlite
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This prints JSON: the detected format, `capabilities`, format `metadata`, and readable `targets`.
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"pluginId": "sqlite-database",
|
|
31
|
+
"formatName": "SQLite viewer",
|
|
32
|
+
"matchedBy": "extension",
|
|
33
|
+
"capabilities": ["read", "query"],
|
|
34
|
+
"metadata": { "sizeBytes": 12288, "tableCount": 2, "tables": [{ "name": "users", "rows": 5, "columns": ["id:INTEGER", "name:TEXT"] }] },
|
|
35
|
+
"targets": [
|
|
36
|
+
{ "id": "schema", "title": "Database Schema", "kind": "entry" },
|
|
37
|
+
{ "id": "table:users", "title": "users", "kind": "table", "size": 5 }
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`metadata` often answers the question on its own (page count, table schemas, author, dimensions). Stop there if it does.
|
|
43
|
+
|
|
44
|
+
### 2. Choose the next command from `capabilities`
|
|
45
|
+
|
|
46
|
+
| Goal | Command | When |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| Text, tables, or JSON | `anyfile read <path> [--target <id>]` | `capabilities` contains `read` |
|
|
49
|
+
| Filter or aggregate data | `anyfile query <path> --sql "<SELECT ...>"` | `capabilities` contains `query` |
|
|
50
|
+
| See what it looks like | `anyfile render <path> [--target <id>] --out preview.png` | Images, pages, drawings, models, slides |
|
|
51
|
+
|
|
52
|
+
### 3. Read
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
anyfile read ./mail.pst --target folder:8042
|
|
56
|
+
anyfile read ./mail.pst --target folder:8042 --filter invoice
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- Copy target ids exactly from `targets`. They are opaque; never build them yourself.
|
|
60
|
+
- Without `--target`, the first or default target is read.
|
|
61
|
+
- Output is capped at 48 KiB by default (`--max-bytes`, up to 262144). When more remains, `nextCursor: <cursor>` is printed on stderr. Continue with `--cursor <cursor>`, using the same `--target`.
|
|
62
|
+
- For large output, add `--out chunk.md`. Content goes to the file, and stdout prints a JSON summary that includes `nextCursor`.
|
|
63
|
+
|
|
64
|
+
### 4. Query (databases)
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
anyfile query ./data.sqlite --sql "SELECT role, count(*) FROM users GROUP BY role"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Only read-only SQL is allowed (`SELECT`, `WITH`, `EXPLAIN`, read-only `PRAGMA`). Take table and column names from `metadata` or the `schema` target, and add `LIMIT` to wide scans.
|
|
71
|
+
|
|
72
|
+
### 5. Render
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
anyfile render ./drawing.dwg --out /tmp/drawing.png
|
|
76
|
+
anyfile render ./report.pdf --target page:3 --max-dim 1200 --out /tmp/page3.png
|
|
77
|
+
anyfile render ./part.step --target iso --out /tmp/part.png
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- Always pass `--out`; without it, raw PNG bytes go to stdout. Open the PNG with your image-viewing tool afterwards.
|
|
81
|
+
- The longest side defaults to 1600 px (`--max-dim`, up to 4096).
|
|
82
|
+
- Raster formats (PSD, EXR, HDR, HEIC, JXL, DICOM, camera RAW) render without a browser. Documents, CAD, Office, and 3D render through a local Chromium-based browser even when `capabilities` does not list `render`.
|
|
83
|
+
- 3D models accept `--target top|front|right|iso`.
|
|
84
|
+
|
|
85
|
+
## Errors
|
|
86
|
+
|
|
87
|
+
Failures print one JSON object on stderr, `{"code": "...", "message": "..."}`, and the command exits with status 1.
|
|
88
|
+
|
|
89
|
+
| `code` | What to do |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `invalid-argument` | Fix the command (missing path or `--sql`, bad flag value, SQL syntax). |
|
|
92
|
+
| `access-denied` | The path does not exist or cannot be read. Check it. |
|
|
93
|
+
| `target-not-found` | Re-run `inspect` and copy an `id` from `targets`. |
|
|
94
|
+
| `unsupported-capability` | The format cannot do that operation. Try another one from `capabilities`, or `render`. |
|
|
95
|
+
| `invalid-file` / `encrypted-file` | The file is corrupt, unrecognized, or password-protected. Tell the user. |
|
|
96
|
+
| `runtime-unavailable` | No local browser or WebGL, or a decoder download failed. Set `ANYFILE_BROWSER_PATH` to a Chromium-based browser (add `ANYFILE_BROWSER_ARGS=--no-sandbox` in containers), or check network access. |
|
|
97
|
+
| `timeout` / `resource-limit` | Narrow the scope: pick a smaller target, lower `--max-bytes` or `--max-dim`, or add `LIMIT`. |
|
|
98
|
+
|
|
99
|
+
## Offline use
|
|
100
|
+
|
|
101
|
+
Some formats download a WASM decoder on first use into `~/.cache/anyfile` (SHA-256 verified; file contents are never sent). For machines without network access, pre-fetch them with `anyfile cache add all`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
import {
|
|
3
|
+
probeNonNativeAudio
|
|
4
|
+
} from "./chunk-2C34VMNV.mjs";
|
|
5
|
+
import "./chunk-7O5JLQE7.mjs";
|
|
6
|
+
import "./chunk-EOJ7ZCDK.mjs";
|
|
7
|
+
import "./chunk-IC3G2XE2.mjs";
|
|
8
|
+
import "./chunk-ORJ3DN65.mjs";
|
|
9
|
+
|
|
10
|
+
// ../plugins/non-native-audio/src/browser-probe.ts
|
|
11
|
+
async function probeNonNativeAudioInBrowser(context) {
|
|
12
|
+
if (typeof AudioContext === "undefined" || typeof AudioDecoder === "undefined") return 0;
|
|
13
|
+
return probeNonNativeAudio(context);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
probeNonNativeAudioInBrowser
|
|
17
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
import {
|
|
3
|
+
inspectNonNativeVideo
|
|
4
|
+
} from "./chunk-ZUHJIGHP.mjs";
|
|
5
|
+
import "./chunk-EOJ7ZCDK.mjs";
|
|
6
|
+
import "./chunk-IC3G2XE2.mjs";
|
|
7
|
+
import "./chunk-ORJ3DN65.mjs";
|
|
8
|
+
|
|
9
|
+
// ../plugins/non-native-video/src/browser-probe.ts
|
|
10
|
+
async function probeNonNativeVideoInBrowser({ file, signal }) {
|
|
11
|
+
const inspection = await inspectNonNativeVideo(file, signal);
|
|
12
|
+
if (!inspection) return 0;
|
|
13
|
+
const { softwareDecoded, hasAudio } = inspection;
|
|
14
|
+
if (softwareDecoded ? typeof WebAssembly === "undefined" || typeof Worker === "undefined" : typeof VideoDecoder === "undefined") {
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
17
|
+
if (hasAudio && (typeof AudioContext === "undefined" || !softwareDecoded && typeof AudioDecoder === "undefined")) {
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
return 3;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
probeNonNativeVideoInBrowser
|
|
24
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
import {
|
|
3
|
+
inspectMatroskaTracks
|
|
4
|
+
} from "./chunk-EOJ7ZCDK.mjs";
|
|
5
|
+
import {
|
|
6
|
+
readBlob
|
|
7
|
+
} from "./chunk-IC3G2XE2.mjs";
|
|
8
|
+
|
|
9
|
+
// ../plugins/non-native-audio/src/limits.ts
|
|
10
|
+
var PROBE_HEAD_BYTES = 256 * 1024;
|
|
11
|
+
var PROBE_TAIL_BYTES = 64 * 1024;
|
|
12
|
+
var BLOB_CACHE_BYTES = 8 * 1024 * 1024;
|
|
13
|
+
var MAX_DURATION_SECONDS = 24 * 60 * 60;
|
|
14
|
+
var MAX_BUFFER_BYTES = 8 * 1024 * 1024;
|
|
15
|
+
var MATROSKA_CODECS = /* @__PURE__ */ new Set(["aac", "opus", "vorbis", "flac"]);
|
|
16
|
+
|
|
17
|
+
// ../plugins/non-native-audio/src/read-blob.ts
|
|
18
|
+
async function readProbeSlices(file, signal) {
|
|
19
|
+
const headEnd = Math.min(file.size, PROBE_HEAD_BYTES);
|
|
20
|
+
const head = await readBlob(file.slice(0, headEnd), signal);
|
|
21
|
+
if (file.size <= headEnd) return { head, tail: void 0 };
|
|
22
|
+
const tail = await readBlob(file.slice(Math.max(headEnd, file.size - PROBE_TAIL_BYTES)), signal);
|
|
23
|
+
if (head.byteLength + tail.byteLength > PROBE_HEAD_BYTES + PROBE_TAIL_BYTES) {
|
|
24
|
+
throw new Error("Non-native audio probe read budget exceeded");
|
|
25
|
+
}
|
|
26
|
+
return { head, tail };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ../plugins/non-native-audio/src/wave-probe.ts
|
|
30
|
+
var MAX_CHUNKS = 128;
|
|
31
|
+
var WAVE_ALAW = 6;
|
|
32
|
+
var WAVE_MULAW = 7;
|
|
33
|
+
function ascii(bytes, offset, length) {
|
|
34
|
+
return String.fromCharCode(...bytes.subarray(offset, offset + length));
|
|
35
|
+
}
|
|
36
|
+
function u16le(bytes, offset) {
|
|
37
|
+
return bytes[offset] | bytes[offset + 1] << 8;
|
|
38
|
+
}
|
|
39
|
+
function u32le(bytes, offset) {
|
|
40
|
+
return (bytes[offset] | bytes[offset + 1] << 8 | bytes[offset + 2] << 16 | bytes[offset + 3] << 24) >>> 0;
|
|
41
|
+
}
|
|
42
|
+
function inspectWaveLaw(bytes) {
|
|
43
|
+
if (ascii(bytes, 0, 4) !== "RIFF" || ascii(bytes, 8, 4) !== "WAVE") return void 0;
|
|
44
|
+
const declaredSize = u32le(bytes, 4) + 8;
|
|
45
|
+
if (declaredSize < 44) return void 0;
|
|
46
|
+
let format;
|
|
47
|
+
let channels;
|
|
48
|
+
let sampleRate;
|
|
49
|
+
let hasData = false;
|
|
50
|
+
let offset = 12;
|
|
51
|
+
for (let count = 0; count < MAX_CHUNKS && offset + 8 <= bytes.length; count += 1) {
|
|
52
|
+
const type = ascii(bytes, offset, 4);
|
|
53
|
+
const size = u32le(bytes, offset + 4);
|
|
54
|
+
const end = offset + 8 + size;
|
|
55
|
+
if (!Number.isSafeInteger(end) || end > declaredSize) return void 0;
|
|
56
|
+
if (type === "fmt " && size >= 16 && offset + 24 <= bytes.length) {
|
|
57
|
+
format = u16le(bytes, offset + 8);
|
|
58
|
+
channels = u16le(bytes, offset + 10);
|
|
59
|
+
sampleRate = u32le(bytes, offset + 12);
|
|
60
|
+
if (format === 65534 && size >= 40 && offset + 48 <= bytes.length) {
|
|
61
|
+
const guidTail = [0, 0, 16, 0, 128, 0, 0, 170, 0, 56, 155, 113];
|
|
62
|
+
if (!guidTail.every((value, index) => bytes[offset + 36 + index] === value)) return void 0;
|
|
63
|
+
format = u16le(bytes, offset + 32);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (type === "data") {
|
|
67
|
+
hasData = size > 0;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
if (end > bytes.length) return void 0;
|
|
71
|
+
offset = end + (size & 1);
|
|
72
|
+
}
|
|
73
|
+
if (!hasData || !channels || channels > 2 || !sampleRate || sampleRate < 8e3 || sampleRate > 192e3) {
|
|
74
|
+
return void 0;
|
|
75
|
+
}
|
|
76
|
+
if (format === WAVE_ALAW) return { codec: "alaw", channels, sampleRate };
|
|
77
|
+
if (format === WAVE_MULAW) return { codec: "ulaw", channels, sampleRate };
|
|
78
|
+
return void 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// ../plugins/non-native-audio/src/probe.ts
|
|
82
|
+
function extensionOf(name) {
|
|
83
|
+
const index = name.lastIndexOf(".");
|
|
84
|
+
return index < 0 ? "" : name.slice(index).toLowerCase();
|
|
85
|
+
}
|
|
86
|
+
async function probeMatroska(file, signal) {
|
|
87
|
+
const { head, tail } = await readProbeSlices(file, signal);
|
|
88
|
+
const inspection = inspectMatroskaTracks(head, tail, file.size);
|
|
89
|
+
if (!inspection?.hasSeekIndex || inspection.tracks.some(({ type }) => type === "video")) return 0;
|
|
90
|
+
const audio = inspection.tracks.filter(({ type }) => type === "audio");
|
|
91
|
+
if (audio.length !== 1 || !MATROSKA_CODECS.has(audio[0].codec)) return 0;
|
|
92
|
+
return 3;
|
|
93
|
+
}
|
|
94
|
+
async function probeWave(file, signal) {
|
|
95
|
+
const { head } = await readProbeSlices(file, signal);
|
|
96
|
+
return inspectWaveLaw(head) ? 3 : 0;
|
|
97
|
+
}
|
|
98
|
+
async function probeNonNativeAudio({ file, signal }) {
|
|
99
|
+
if (!file.size) return 0;
|
|
100
|
+
const extension = extensionOf(file.name);
|
|
101
|
+
if (extension === ".mka") return probeMatroska(file, signal);
|
|
102
|
+
if (extension === ".wav" || extension === ".wave") return probeWave(file, signal);
|
|
103
|
+
return 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export {
|
|
107
|
+
probeNonNativeAudio
|
|
108
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
import {
|
|
3
|
+
parseXmlDocument
|
|
4
|
+
} from "./chunk-53MJMIN4.mjs";
|
|
5
|
+
|
|
6
|
+
// ../plugins/svg/src/sanitize.ts
|
|
7
|
+
var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
8
|
+
var BLOCKED_ELEMENTS = /* @__PURE__ */ new Set([
|
|
9
|
+
"script",
|
|
10
|
+
"foreignobject",
|
|
11
|
+
"iframe",
|
|
12
|
+
"object",
|
|
13
|
+
"embed",
|
|
14
|
+
"audio",
|
|
15
|
+
"video",
|
|
16
|
+
"style",
|
|
17
|
+
"animate",
|
|
18
|
+
"animatemotion",
|
|
19
|
+
"animatetransform",
|
|
20
|
+
"set",
|
|
21
|
+
"discard"
|
|
22
|
+
]);
|
|
23
|
+
var SAFE_DATA_IMAGE = /^data:image\/(?:png|jpeg|gif|webp|avif);/i;
|
|
24
|
+
var URL_REFERENCE = /url\(\s*(['"]?)(.*?)\1\s*\)/gi;
|
|
25
|
+
function decodeXml(bytes) {
|
|
26
|
+
if (bytes[0] === 255 && bytes[1] === 254) {
|
|
27
|
+
return new TextDecoder("utf-16le", { fatal: true }).decode(bytes.subarray(2));
|
|
28
|
+
}
|
|
29
|
+
if (bytes[0] === 254 && bytes[1] === 255) {
|
|
30
|
+
const swapped = bytes.subarray(2).slice();
|
|
31
|
+
for (let index = 0; index + 1 < swapped.length; index += 2) {
|
|
32
|
+
[swapped[index], swapped[index + 1]] = [swapped[index + 1], swapped[index]];
|
|
33
|
+
}
|
|
34
|
+
return new TextDecoder("utf-16le", { fatal: true }).decode(swapped);
|
|
35
|
+
}
|
|
36
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
37
|
+
}
|
|
38
|
+
function safeReference(value) {
|
|
39
|
+
const trimmed = value.trim();
|
|
40
|
+
return trimmed.startsWith("#") || SAFE_DATA_IMAGE.test(trimmed);
|
|
41
|
+
}
|
|
42
|
+
function containsUnsafeUrl(value) {
|
|
43
|
+
URL_REFERENCE.lastIndex = 0;
|
|
44
|
+
let match;
|
|
45
|
+
while (match = URL_REFERENCE.exec(value)) {
|
|
46
|
+
if (!safeReference(match[2])) return true;
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
function looksLikeSvg(bytes) {
|
|
51
|
+
try {
|
|
52
|
+
const source = decodeXml(bytes).replace(/^\uFEFF?\s*/, "");
|
|
53
|
+
if (/<!doctype/i.test(source)) return false;
|
|
54
|
+
const withoutPreamble = source.replace(/^<\?xml[\s\S]*?\?>\s*/i, "").replace(/^(?:<!--[\s\S]*?-->\s*)+/, "");
|
|
55
|
+
return /^<(?:[A-Za-z_][\w.-]*:)?svg(?:\s|>)/.test(withoutPreamble);
|
|
56
|
+
} catch {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function sanitizeSvg(bytes) {
|
|
61
|
+
let source;
|
|
62
|
+
try {
|
|
63
|
+
source = decodeXml(bytes);
|
|
64
|
+
} catch {
|
|
65
|
+
return void 0;
|
|
66
|
+
}
|
|
67
|
+
if (/<!doctype/i.test(source)) return void 0;
|
|
68
|
+
const document = parseXmlDocument(source, "image/svg+xml");
|
|
69
|
+
const root = document.documentElement;
|
|
70
|
+
if (root.localName.toLowerCase() !== "svg" || root.namespaceURI !== SVG_NAMESPACE || document.getElementsByTagName("parsererror").length > 0) return void 0;
|
|
71
|
+
const elements = [root, ...Array.from(root.querySelectorAll("*"))];
|
|
72
|
+
if (elements.length > 1e5) return void 0;
|
|
73
|
+
let removedItems = 0;
|
|
74
|
+
for (const element of elements) {
|
|
75
|
+
if (element !== root && BLOCKED_ELEMENTS.has(element.localName.toLowerCase())) {
|
|
76
|
+
element.remove();
|
|
77
|
+
removedItems += 1;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
for (const attribute of Array.from(element.attributes)) {
|
|
81
|
+
const name = attribute.localName.toLowerCase();
|
|
82
|
+
const value = attribute.value;
|
|
83
|
+
const unsafe = name.startsWith("on") || name === "style" || name === "base" || (name === "href" || name === "src") && !safeReference(value) || containsUnsafeUrl(value);
|
|
84
|
+
if (unsafe) {
|
|
85
|
+
element.removeAttributeNode(attribute);
|
|
86
|
+
removedItems += 1;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return { source: new XMLSerializer().serializeToString(document), removedItems };
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
decodeXml,
|
|
95
|
+
looksLikeSvg,
|
|
96
|
+
sanitizeSvg
|
|
97
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
|
|
3
|
+
// ../plugins/iwork/src/layout.ts
|
|
4
|
+
var PREVIEWS = ["preview.jpg", "QuickLook/Thumbnail.jpg", "preview-web.jpg", "QuickLook/Thumbnail.png"];
|
|
5
|
+
function iworkAppFromName(name) {
|
|
6
|
+
const lower = name.toLowerCase();
|
|
7
|
+
if (lower.endsWith(".pages")) return "pages";
|
|
8
|
+
if (lower.endsWith(".key")) return "keynote";
|
|
9
|
+
return void 0;
|
|
10
|
+
}
|
|
11
|
+
function prefixOf(name, marker) {
|
|
12
|
+
if (!name.endsWith(marker)) return void 0;
|
|
13
|
+
const prefix = name.slice(0, name.length - marker.length);
|
|
14
|
+
return prefix === "" || /^[^/]+\/$/.test(prefix) ? prefix : void 0;
|
|
15
|
+
}
|
|
16
|
+
function detectIworkLayout(names, app) {
|
|
17
|
+
const legacyIndex = app === "pages" ? "index.xml" : "index.apxl";
|
|
18
|
+
let found;
|
|
19
|
+
for (const name of names) {
|
|
20
|
+
if (name.endsWith(".iwpv2")) return { kind: "encrypted" };
|
|
21
|
+
if (found) continue;
|
|
22
|
+
let prefix = prefixOf(name, "Index/Document.iwa");
|
|
23
|
+
if (prefix !== void 0) found = { kind: "iwa", prefix };
|
|
24
|
+
else if ((prefix = prefixOf(name, "Index.zip")) !== void 0) found = { kind: "iwa-zip", prefix };
|
|
25
|
+
else if ((prefix = prefixOf(name, legacyIndex)) !== void 0) found = { kind: "xml", prefix, index: name };
|
|
26
|
+
else if ((prefix = prefixOf(name, `${legacyIndex}.gz`)) !== void 0) found = { kind: "xml", prefix, index: name };
|
|
27
|
+
}
|
|
28
|
+
return found;
|
|
29
|
+
}
|
|
30
|
+
function previewPath(names, prefix) {
|
|
31
|
+
return PREVIEWS.map((name) => prefix + name).find((name) => names.has(name));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
iworkAppFromName,
|
|
36
|
+
detectIworkLayout,
|
|
37
|
+
previewPath
|
|
38
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
|
|
3
|
+
// ../runtime-assets/src/xml.node.ts
|
|
4
|
+
import { Window } from "happy-dom";
|
|
5
|
+
var parser;
|
|
6
|
+
function parseXmlDocument(source, mimeType = "application/xml") {
|
|
7
|
+
if (typeof globalThis.DOMParser === "function") {
|
|
8
|
+
return new globalThis.DOMParser().parseFromString(source, mimeType);
|
|
9
|
+
}
|
|
10
|
+
parser ??= new new Window({
|
|
11
|
+
settings: {
|
|
12
|
+
disableJavaScriptEvaluation: true,
|
|
13
|
+
disableJavaScriptFileLoading: true,
|
|
14
|
+
disableCSSFileLoading: true,
|
|
15
|
+
disableIframePageLoading: true
|
|
16
|
+
}
|
|
17
|
+
}).DOMParser();
|
|
18
|
+
return parser.parseFromString(source, mimeType);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
parseXmlDocument
|
|
23
|
+
};
|