@struktoai/mirage-node 0.0.4 → 0.0.5
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 +2 -1
- package/dist/aliyun-S62BR3TB.js +11 -0
- package/dist/append.lua +17 -0
- package/dist/backblaze-4EKSW63F.js +11 -0
- package/dist/box-ZPLZAGMK.js +8 -0
- package/dist/ceph-ALKLD3MO.js +11 -0
- package/dist/{chunk-VLRSOWHP.js → chunk-2A4YGVBM.js} +5 -14
- package/dist/chunk-2A4YGVBM.js.map +1 -0
- package/dist/chunk-2HCYLVGY.js +28 -0
- package/dist/chunk-2HCYLVGY.js.map +1 -0
- package/dist/chunk-2VPZAH5Q.js +20 -0
- package/dist/chunk-2VPZAH5Q.js.map +1 -0
- package/dist/{chunk-HCU3B6FW.js → chunk-3JZQ6VSZ.js} +5 -4
- package/dist/chunk-3JZQ6VSZ.js.map +1 -0
- package/dist/chunk-4IF4TGAI.js +11 -0
- package/dist/chunk-4IF4TGAI.js.map +1 -0
- package/dist/{chunk-L7FEZ7LU.js → chunk-5H6KNEPP.js} +4 -5
- package/dist/{chunk-L7FEZ7LU.js.map → chunk-5H6KNEPP.js.map} +1 -1
- package/dist/{chunk-25W4XQJZ.js → chunk-5K2MWDCE.js} +4 -5
- package/dist/{chunk-25W4XQJZ.js.map → chunk-5K2MWDCE.js.map} +1 -1
- package/dist/{chunk-L4GMDSMB.js → chunk-6SVXWRKX.js} +4 -5
- package/dist/{chunk-L4GMDSMB.js.map → chunk-6SVXWRKX.js.map} +1 -1
- package/dist/{chunk-H62XQZUM.js → chunk-6VOIUGAD.js} +22 -10
- package/dist/chunk-6VOIUGAD.js.map +1 -0
- package/dist/{chunk-SI4GMRXD.js → chunk-7JYHFXXC.js} +4 -8
- package/dist/chunk-7JYHFXXC.js.map +1 -0
- package/dist/chunk-7VQQFWV6.js +20 -0
- package/dist/chunk-7VQQFWV6.js.map +1 -0
- package/dist/chunk-7ZP6TPHX.js +87 -0
- package/dist/chunk-7ZP6TPHX.js.map +1 -0
- package/dist/{chunk-HWQPEBID.js → chunk-ADEXNSYU.js} +6 -12
- package/dist/chunk-ADEXNSYU.js.map +1 -0
- package/dist/chunk-AQSYAXL4.js +16 -0
- package/dist/chunk-AQSYAXL4.js.map +1 -0
- package/dist/{chunk-NJ42VNXG.js → chunk-ATLXMNKD.js} +8 -3
- package/dist/chunk-ATLXMNKD.js.map +1 -0
- package/dist/{chunk-CB76WPUS.js → chunk-BYCUGFRF.js} +5 -4
- package/dist/chunk-BYCUGFRF.js.map +1 -0
- package/dist/{chunk-4M73WHIE.js → chunk-BZTVYOES.js} +3 -3
- package/dist/{chunk-CQCTCW4S.js → chunk-CRC4YWXB.js} +28 -9
- package/dist/chunk-CRC4YWXB.js.map +1 -0
- package/dist/{chunk-C7TNKIK5.js → chunk-CTGXJHO5.js} +1 -1
- package/dist/chunk-CTGXJHO5.js.map +1 -0
- package/dist/{chunk-HSD24IP2.js → chunk-DCDBIXVZ.js} +7 -2
- package/dist/chunk-DCDBIXVZ.js.map +1 -0
- package/dist/{chunk-HEDE2377.js → chunk-DDAFNROK.js} +318 -322
- package/dist/chunk-DDAFNROK.js.map +1 -0
- package/dist/chunk-DQIEWEAW.js +85 -0
- package/dist/chunk-DQIEWEAW.js.map +1 -0
- package/dist/{chunk-2ERLWAGG.js → chunk-EBI4IHDC.js} +20 -11
- package/dist/chunk-EBI4IHDC.js.map +1 -0
- package/dist/{chunk-RHUEV4I7.js → chunk-EIUTZ6N7.js} +10 -24
- package/dist/chunk-EIUTZ6N7.js.map +1 -0
- package/dist/{chunk-IUXXZHY3.js → chunk-EJZG5VUF.js} +24 -12
- package/dist/chunk-EJZG5VUF.js.map +1 -0
- package/dist/{chunk-BWWU5T2D.js → chunk-ENW5BVYN.js} +3 -3
- package/dist/{chunk-F5NWRF32.js → chunk-ETIAW4YD.js} +3 -3
- package/dist/chunk-EUPXAYPB.js +20 -0
- package/dist/chunk-EUPXAYPB.js.map +1 -0
- package/dist/{chunk-EGZNOUMH.js → chunk-FA6YNU75.js} +4 -5
- package/dist/{chunk-EGZNOUMH.js.map → chunk-FA6YNU75.js.map} +1 -1
- package/dist/{chunk-XUUSWR4U.js → chunk-FFH6R5VQ.js} +7 -2
- package/dist/{chunk-XUUSWR4U.js.map → chunk-FFH6R5VQ.js.map} +1 -1
- package/dist/{chunk-JEBH5APX.js → chunk-GE6H2COM.js} +5 -13
- package/dist/chunk-GE6H2COM.js.map +1 -0
- package/dist/{chunk-TUNR4VUM.js → chunk-GMMQ3ZK4.js} +3 -3
- package/dist/{chunk-SAOQW6ZJ.js → chunk-GSGE3M5P.js} +5 -13
- package/dist/chunk-GSGE3M5P.js.map +1 -0
- package/dist/{chunk-DXU7NZPH.js → chunk-HCRYAFBI.js} +3 -3
- package/dist/{chunk-OSVZKYXS.js → chunk-HOPUP6LA.js} +192 -156
- package/dist/chunk-HOPUP6LA.js.map +1 -0
- package/dist/chunk-HS24BL6W.js +160 -0
- package/dist/chunk-HS24BL6W.js.map +1 -0
- package/dist/chunk-HVYVG5KQ.js +16 -0
- package/dist/chunk-HVYVG5KQ.js.map +1 -0
- package/dist/{chunk-XEMLYWHK.js → chunk-I7CPLZNW.js} +4 -5
- package/dist/{chunk-XEMLYWHK.js.map → chunk-I7CPLZNW.js.map} +1 -1
- package/dist/{chunk-AULFV3KY.js → chunk-IFUCGI4I.js} +7 -2
- package/dist/chunk-IFUCGI4I.js.map +1 -0
- package/dist/{chunk-HGIPWY5Y.js → chunk-IFYXSSKR.js} +6 -6
- package/dist/chunk-IFYXSSKR.js.map +1 -0
- package/dist/chunk-IXA4DQE4.js +20 -0
- package/dist/chunk-IXA4DQE4.js.map +1 -0
- package/dist/chunk-IZMKMD3O.js +11 -0
- package/dist/chunk-IZMKMD3O.js.map +1 -0
- package/dist/{chunk-4X6CLF4F.js → chunk-JJERW2BI.js} +4 -5
- package/dist/{chunk-4X6CLF4F.js.map → chunk-JJERW2BI.js.map} +1 -1
- package/dist/{chunk-M6E7VK4D.js → chunk-JQR4HVUX.js} +2 -5
- package/dist/chunk-JQR4HVUX.js.map +1 -0
- package/dist/{chunk-BWLUBJQG.js → chunk-JXOMDLFS.js} +6 -15
- package/dist/chunk-JXOMDLFS.js.map +1 -0
- package/dist/{chunk-5ZHNPNDD.js → chunk-KIX6N7NT.js} +198 -141
- package/dist/chunk-KIX6N7NT.js.map +1 -0
- package/dist/{chunk-XFSEADPC.js → chunk-L42UTDFK.js} +7 -2
- package/dist/chunk-L42UTDFK.js.map +1 -0
- package/dist/chunk-M2UF2JHJ.js +11 -0
- package/dist/chunk-M2UF2JHJ.js.map +1 -0
- package/dist/{chunk-LPLZLSMK.js → chunk-MONC734W.js} +7 -2
- package/dist/chunk-MONC734W.js.map +1 -0
- package/dist/{chunk-XADEMW6B.js → chunk-N72RLCMU.js} +4 -5
- package/dist/{chunk-XADEMW6B.js.map → chunk-N72RLCMU.js.map} +1 -1
- package/dist/{chunk-ZPB3SLPK.js → chunk-ND4IWJ4V.js} +7 -2
- package/dist/chunk-ND4IWJ4V.js.map +1 -0
- package/dist/{chunk-ZPZQXHW2.js → chunk-NZ3EKGW4.js} +260 -178
- package/dist/chunk-NZ3EKGW4.js.map +1 -0
- package/dist/{chunk-E3KXVEYI.js → chunk-OAE57MNL.js} +22 -10
- package/dist/chunk-OAE57MNL.js.map +1 -0
- package/dist/{chunk-JBDFYIN2.js → chunk-OHKGIQB4.js} +2 -5
- package/dist/chunk-OHKGIQB4.js.map +1 -0
- package/dist/{chunk-V7JVMG63.js → chunk-OXEQSPND.js} +3 -3
- package/dist/{chunk-YRJICL2Q.js → chunk-PKNE5J2B.js} +5 -13
- package/dist/chunk-PKNE5J2B.js.map +1 -0
- package/dist/chunk-PSXXEGYQ.js +16 -0
- package/dist/chunk-PSXXEGYQ.js.map +1 -0
- package/dist/{chunk-KAWDDS27.js → chunk-QAOVABCR.js} +7 -2
- package/dist/chunk-QAOVABCR.js.map +1 -0
- package/dist/{chunk-SYMNWNC3.js → chunk-QQ7FP4GD.js} +4 -5
- package/dist/{chunk-SYMNWNC3.js.map → chunk-QQ7FP4GD.js.map} +1 -1
- package/dist/{chunk-3JZN3GYO.js → chunk-QYLVMC6B.js} +2 -5
- package/dist/chunk-QYLVMC6B.js.map +1 -0
- package/dist/{chunk-CXQGMFI7.js → chunk-RX3XR65X.js} +4 -5
- package/dist/{chunk-CXQGMFI7.js.map → chunk-RX3XR65X.js.map} +1 -1
- package/dist/{chunk-MRXTUFBZ.js → chunk-RYQJJB4C.js} +1 -1
- package/dist/chunk-RYQJJB4C.js.map +1 -0
- package/dist/{chunk-5I7Q7RHW.js → chunk-TUF7TCN7.js} +4 -5
- package/dist/{chunk-5I7Q7RHW.js.map → chunk-TUF7TCN7.js.map} +1 -1
- package/dist/{chunk-NLXJMXVE.js → chunk-TUX36JY5.js} +4 -5
- package/dist/{chunk-NLXJMXVE.js.map → chunk-TUX36JY5.js.map} +1 -1
- package/dist/{chunk-4GYB7DGC.js → chunk-TWRQCQWU.js} +327 -558
- package/dist/chunk-TWRQCQWU.js.map +1 -0
- package/dist/chunk-U6DFQRG3.js +20 -0
- package/dist/chunk-U6DFQRG3.js.map +1 -0
- package/dist/chunk-VI5YTKNY.js +20 -0
- package/dist/chunk-VI5YTKNY.js.map +1 -0
- package/dist/{chunk-FRGTDZQT.js → chunk-VQDF2UH5.js} +19 -5
- package/dist/chunk-VQDF2UH5.js.map +1 -0
- package/dist/{chunk-W5ZLIQFR.js → chunk-WG5YS6TC.js} +308 -200
- package/dist/chunk-WG5YS6TC.js.map +1 -0
- package/dist/{chunk-ZM44MGC5.js → chunk-WMJJ4WGF.js} +4 -5
- package/dist/{chunk-ZM44MGC5.js.map → chunk-WMJJ4WGF.js.map} +1 -1
- package/dist/{chunk-5YRWF5RP.js → chunk-WY4FNH42.js} +6 -5
- package/dist/chunk-WY4FNH42.js.map +1 -0
- package/dist/{chunk-VBYIDRNU.js → chunk-XIG5BWWH.js} +19 -10
- package/dist/chunk-XIG5BWWH.js.map +1 -0
- package/dist/chunk-XJBC3OYX.js +11 -0
- package/dist/chunk-XJBC3OYX.js.map +1 -0
- package/dist/{chunk-ZMREYTHA.js → chunk-XPRDXWK7.js} +8 -8
- package/dist/chunk-XPRDXWK7.js.map +1 -0
- package/dist/chunk-YKRQSZS7.js +96 -0
- package/dist/chunk-YKRQSZS7.js.map +1 -0
- package/dist/{chunk-IEVLWEBO.js → chunk-YMBL3VJB.js} +9 -8
- package/dist/chunk-YMBL3VJB.js.map +1 -0
- package/dist/{chunk-CGGO5NKD.js → chunk-YUJBXFYK.js} +357 -346
- package/dist/chunk-YUJBXFYK.js.map +1 -0
- package/dist/{chunk-S4KVLPBR.js → chunk-YZ4ZJNOL.js} +22 -10
- package/dist/chunk-YZ4ZJNOL.js.map +1 -0
- package/dist/chunk-ZTHVEXIV.js +11 -0
- package/dist/chunk-ZTHVEXIV.js.map +1 -0
- package/dist/{chunk-VHED2STW.js → chunk-ZVSYUCYS.js} +2 -1
- package/dist/chunk-ZVSYUCYS.js.map +1 -0
- package/dist/{config-T2IUIU5C.js → config-2YBCHU2W.js} +2 -2
- package/dist/{config-M3Z47VYU.js → config-3YRGRW72.js} +3 -2
- package/dist/config-4GSOMUMF.js +9 -0
- package/dist/config-5YBUWFUP.js +9 -0
- package/dist/{config-2LASFFRD.js → config-5ZRKJTKG.js} +3 -2
- package/dist/{config-W7EVPJNK.js → config-A25LTL5W.js} +2 -2
- package/dist/{config-WKQ3FGTZ.js → config-CLU7JABG.js} +2 -2
- package/dist/{config-E22XAGYN.js → config-D2RF7L3N.js} +2 -2
- package/dist/{config-HQXNFQZS.js → config-E55TKM6K.js} +2 -2
- package/dist/config-ELDOFRJW.js +9 -0
- package/dist/{config-EX3ZJTZI.js → config-FPC3RBFD.js} +2 -2
- package/dist/config-FPM3LAW7.js +9 -0
- package/dist/{config-IPNWAJHH.js → config-G3F54CS4.js} +3 -2
- package/dist/{config-BBOLI7VE.js → config-G43HRUI3.js} +2 -2
- package/dist/{config-QO2XUME4.js → config-GG3WO5PB.js} +3 -2
- package/dist/{config-QWQGOXQ5.js → config-JUYBWAZE.js} +2 -2
- package/dist/{config-SPW6NESU.js → config-LJ5T6TVA.js} +2 -2
- package/dist/{config-WVILHDFV.js → config-MDSAE4O3.js} +2 -2
- package/dist/{config-MZM3IPFM.js → config-NRIOKK5T.js} +2 -2
- package/dist/{config-L7SBSH5L.js → config-OYK2BSJK.js} +2 -2
- package/dist/config-PB3KA2CE.js +9 -0
- package/dist/{config-54USUVSE.js → config-QY4IL3PH.js} +3 -2
- package/dist/{config-VKKZGC7V.js → config-R4LAOEDS.js} +2 -2
- package/dist/{config-FRK7ZL37.js → config-RIAAD6RW.js} +3 -2
- package/dist/{config-J2C53GOT.js → config-SYNEQAUB.js} +2 -2
- package/dist/{config-XU6D5C7E.js → config-TJKGYA2B.js} +3 -2
- package/dist/{config-DWSJL3NH.js → config-UURRGA7U.js} +4 -2
- package/dist/{config-BIBFLUIR.js → config-VPLHQXVE.js} +2 -2
- package/dist/config-WRACCRPN.js +9 -0
- package/dist/{config-OJ2BPESH.js → config-WVHKXEVE.js} +3 -2
- package/dist/{config-CPYFOUQO.js → config-XU7R36IE.js} +3 -2
- package/dist/{config-A2GQYJDB.js → config-Y2KOUYSS.js} +2 -2
- package/dist/databricks_volume-CNCPTZHS.js +7 -0
- package/dist/digitalocean-DJZOUB6Q.js +11 -0
- package/dist/discord-ETB2CADR.js +7 -0
- package/dist/disk-WEHSTK3F.js +7 -0
- package/dist/dropbox-XN6PGLNE.js +8 -0
- package/dist/email-OV7XCP3T.js +8 -0
- package/dist/gcal-P56MRCGU.js +8 -0
- package/dist/gcs-HFBIAE2C.js +10 -0
- package/dist/gdocs-LQ3UXP3J.js +8 -0
- package/dist/gdrive-N6UBYLON.js +8 -0
- package/dist/github-BPZREGPI.js +8 -0
- package/dist/github_ci-7A4LUIZ7.js +8 -0
- package/dist/{gmail-2TBT4CVH.js → gmail-YED2MF6H.js} +2 -2
- package/dist/gridfs-CPLQ4G62.js +9 -0
- package/dist/gsheets-4BNIJPQ6.js +8 -0
- package/dist/gslides-GDBYLO5A.js +8 -0
- package/dist/hf_buckets-FTJITQ3P.js +10 -0
- package/dist/hf_datasets-6GXVKQD7.js +10 -0
- package/dist/hf_models-PJPGZAC5.js +10 -0
- package/dist/hf_spaces-LFNFOLBF.js +10 -0
- package/dist/index.d.ts +897 -609
- package/dist/index.js +2371 -781
- package/dist/index.js.map +1 -1
- package/dist/jaeger-GCA6MJ6E.js +8 -0
- package/dist/lancedb-TJ5YSJY5.js +7 -0
- package/dist/langfuse-RUMTUMXS.js +8 -0
- package/dist/linear-BCE4KEAC.js +7 -0
- package/dist/minio-5SO6KBTK.js +11 -0
- package/dist/mongodb-7C5MBESV.js +7 -0
- package/dist/nextcloud-4O2LZVW2.js +9 -0
- package/dist/notion-RVKEAQ2M.js +7 -0
- package/dist/oci-OQXOIC62.js +10 -0
- package/dist/postgres-AV45GNRS.js +7 -0
- package/dist/qingstor-W277YA4K.js +11 -0
- package/dist/r2-FUA4IORE.js +10 -0
- package/dist/{redis-6D55Q2WB.js → redis-LPS357NF.js} +2 -2
- package/dist/s3-FPNWWIVM.js +8 -0
- package/dist/scaleway-BP3732U7.js +11 -0
- package/dist/seaweedfs-MC6HIEP4.js +11 -0
- package/dist/slack-JFGW7VLN.js +7 -0
- package/dist/ssh-UYPG42LM.js +8 -0
- package/dist/supabase-A3KUFMDC.js +10 -0
- package/dist/tencent-5464UQ2X.js +11 -0
- package/dist/trello-O2KB3FUO.js +8 -0
- package/dist/wasabi-2IKBIWNO.js +10 -0
- package/dist/wasabi-2IKBIWNO.js.map +1 -0
- package/package.json +15 -3
- package/dist/aliyun-PGI57A43.js +0 -10
- package/dist/backblaze-TSPL6Y56.js +0 -10
- package/dist/box-7XTZYDSO.js +0 -8
- package/dist/ceph-C265UI5T.js +0 -10
- package/dist/chunk-2ERLWAGG.js.map +0 -1
- package/dist/chunk-2QNPKPZZ.js +0 -59
- package/dist/chunk-2QNPKPZZ.js.map +0 -1
- package/dist/chunk-3ASOQTZB.js +0 -59
- package/dist/chunk-3ASOQTZB.js.map +0 -1
- package/dist/chunk-3JZN3GYO.js.map +0 -1
- package/dist/chunk-4GYB7DGC.js.map +0 -1
- package/dist/chunk-5YRWF5RP.js.map +0 -1
- package/dist/chunk-5ZHNPNDD.js.map +0 -1
- package/dist/chunk-AULFV3KY.js.map +0 -1
- package/dist/chunk-BWLUBJQG.js.map +0 -1
- package/dist/chunk-C7TNKIK5.js.map +0 -1
- package/dist/chunk-CB76WPUS.js.map +0 -1
- package/dist/chunk-CGGO5NKD.js.map +0 -1
- package/dist/chunk-CQCTCW4S.js.map +0 -1
- package/dist/chunk-D3U7VQCG.js +0 -25
- package/dist/chunk-D3U7VQCG.js.map +0 -1
- package/dist/chunk-E3KXVEYI.js.map +0 -1
- package/dist/chunk-EVK6HH6Z.js +0 -17
- package/dist/chunk-EVK6HH6Z.js.map +0 -1
- package/dist/chunk-FRGTDZQT.js.map +0 -1
- package/dist/chunk-GF75O2EN.js +0 -54
- package/dist/chunk-GF75O2EN.js.map +0 -1
- package/dist/chunk-GTAS3QVC.js +0 -25
- package/dist/chunk-GTAS3QVC.js.map +0 -1
- package/dist/chunk-H62XQZUM.js.map +0 -1
- package/dist/chunk-HCU3B6FW.js.map +0 -1
- package/dist/chunk-HEDE2377.js.map +0 -1
- package/dist/chunk-HGIPWY5Y.js.map +0 -1
- package/dist/chunk-HSD24IP2.js.map +0 -1
- package/dist/chunk-HWQPEBID.js.map +0 -1
- package/dist/chunk-IEHPTILN.js +0 -21
- package/dist/chunk-IEHPTILN.js.map +0 -1
- package/dist/chunk-IEVLWEBO.js.map +0 -1
- package/dist/chunk-IKJQOYI4.js +0 -26
- package/dist/chunk-IKJQOYI4.js.map +0 -1
- package/dist/chunk-IUXXZHY3.js.map +0 -1
- package/dist/chunk-JBDFYIN2.js.map +0 -1
- package/dist/chunk-JEBH5APX.js.map +0 -1
- package/dist/chunk-JHI2PHHD.js +0 -25
- package/dist/chunk-JHI2PHHD.js.map +0 -1
- package/dist/chunk-KAWDDS27.js.map +0 -1
- package/dist/chunk-KGC2OGXI.js +0 -27
- package/dist/chunk-KGC2OGXI.js.map +0 -1
- package/dist/chunk-LPLZLSMK.js.map +0 -1
- package/dist/chunk-M6E7VK4D.js.map +0 -1
- package/dist/chunk-MIQ3ECZM.js +0 -54
- package/dist/chunk-MIQ3ECZM.js.map +0 -1
- package/dist/chunk-MRXTUFBZ.js.map +0 -1
- package/dist/chunk-NJ42VNXG.js.map +0 -1
- package/dist/chunk-OSVZKYXS.js.map +0 -1
- package/dist/chunk-RHUEV4I7.js.map +0 -1
- package/dist/chunk-S4KVLPBR.js.map +0 -1
- package/dist/chunk-SAOQW6ZJ.js.map +0 -1
- package/dist/chunk-SI4GMRXD.js.map +0 -1
- package/dist/chunk-UAJYJP5C.js +0 -59
- package/dist/chunk-UAJYJP5C.js.map +0 -1
- package/dist/chunk-UYA3XL3J.js +0 -54
- package/dist/chunk-UYA3XL3J.js.map +0 -1
- package/dist/chunk-VBYIDRNU.js.map +0 -1
- package/dist/chunk-VHED2STW.js.map +0 -1
- package/dist/chunk-VIICUPWQ.js +0 -23
- package/dist/chunk-VIICUPWQ.js.map +0 -1
- package/dist/chunk-VLRSOWHP.js.map +0 -1
- package/dist/chunk-W5ZLIQFR.js.map +0 -1
- package/dist/chunk-WTSSEUOZ.js +0 -59
- package/dist/chunk-WTSSEUOZ.js.map +0 -1
- package/dist/chunk-WWP2STF5.js +0 -59
- package/dist/chunk-WWP2STF5.js.map +0 -1
- package/dist/chunk-XFSEADPC.js.map +0 -1
- package/dist/chunk-YBVMZ7SR.js +0 -59
- package/dist/chunk-YBVMZ7SR.js.map +0 -1
- package/dist/chunk-YRJICL2Q.js.map +0 -1
- package/dist/chunk-ZMREYTHA.js.map +0 -1
- package/dist/chunk-ZPB3SLPK.js.map +0 -1
- package/dist/chunk-ZPZQXHW2.js.map +0 -1
- package/dist/config-3WDIJPTG.js +0 -9
- package/dist/config-4QV4QYI5.js +0 -9
- package/dist/config-5ZXN2T2H.js +0 -9
- package/dist/config-EHE52ZTK.js +0 -9
- package/dist/config-HTXOOAOD.js +0 -9
- package/dist/config-K63RX6EU.js +0 -9
- package/dist/config-LEALEMKA.js +0 -9
- package/dist/config-RI7IEZUF.js +0 -9
- package/dist/databricks_volume-ETRDJVVQ.js +0 -7
- package/dist/digitalocean-QP72DR4J.js +0 -10
- package/dist/discord-BSN5RB3E.js +0 -8
- package/dist/disk-24NWTN2I.js +0 -7
- package/dist/dropbox-OSTZXSIE.js +0 -8
- package/dist/email-4ZFPSWIN.js +0 -8
- package/dist/gcs-PFWR6MIW.js +0 -10
- package/dist/gdocs-GPAZRQG5.js +0 -8
- package/dist/gdrive-XSX6A7B3.js +0 -8
- package/dist/github-EQ4NXUTA.js +0 -8
- package/dist/github_ci-QL5B2Q2N.js +0 -8
- package/dist/gridfs-KZRZ6SIB.js +0 -9
- package/dist/gsheets-N53WEXN2.js +0 -8
- package/dist/gslides-TATSARTH.js +0 -8
- package/dist/hf_buckets-BK7NGJWS.js +0 -10
- package/dist/hf_datasets-UQ5QGM4L.js +0 -10
- package/dist/hf_models-75LFCQCS.js +0 -10
- package/dist/hf_spaces-6T2KB3UC.js +0 -10
- package/dist/langfuse-AMQCQWNE.js +0 -8
- package/dist/linear-V3TXO6CV.js +0 -8
- package/dist/minio-IZRZY4C5.js +0 -10
- package/dist/mongodb-VMKPQCPX.js +0 -7
- package/dist/nextcloud-5RHQCGDO.js +0 -9
- package/dist/notion-6PPNTQFM.js +0 -8
- package/dist/oci-CKYBSFZJ.js +0 -10
- package/dist/postgres-WIQBVL5M.js +0 -7
- package/dist/qingstor-AP4IIPLY.js +0 -10
- package/dist/r2-C4XGEWQY.js +0 -10
- package/dist/s3-XQBI2CXN.js +0 -8
- package/dist/scaleway-SEZJVURB.js +0 -10
- package/dist/seaweedfs-3XYIAFU2.js +0 -10
- package/dist/slack-ZHXDJQY4.js +0 -8
- package/dist/ssh-X2MO7JOV.js +0 -8
- package/dist/supabase-BBM44UTM.js +0 -10
- package/dist/tencent-X72USLJ7.js +0 -10
- package/dist/trello-EER5NG7L.js +0 -8
- package/dist/wasabi-O4MVIUFG.js +0 -10
- /package/dist/{aliyun-PGI57A43.js.map → aliyun-S62BR3TB.js.map} +0 -0
- /package/dist/{backblaze-TSPL6Y56.js.map → backblaze-4EKSW63F.js.map} +0 -0
- /package/dist/{box-7XTZYDSO.js.map → box-ZPLZAGMK.js.map} +0 -0
- /package/dist/{ceph-C265UI5T.js.map → ceph-ALKLD3MO.js.map} +0 -0
- /package/dist/{chunk-4M73WHIE.js.map → chunk-BZTVYOES.js.map} +0 -0
- /package/dist/{chunk-BWWU5T2D.js.map → chunk-ENW5BVYN.js.map} +0 -0
- /package/dist/{chunk-F5NWRF32.js.map → chunk-ETIAW4YD.js.map} +0 -0
- /package/dist/{chunk-TUNR4VUM.js.map → chunk-GMMQ3ZK4.js.map} +0 -0
- /package/dist/{chunk-DXU7NZPH.js.map → chunk-HCRYAFBI.js.map} +0 -0
- /package/dist/{chunk-V7JVMG63.js.map → chunk-OXEQSPND.js.map} +0 -0
- /package/dist/{config-2LASFFRD.js.map → config-2YBCHU2W.js.map} +0 -0
- /package/dist/{config-3WDIJPTG.js.map → config-3YRGRW72.js.map} +0 -0
- /package/dist/{config-4QV4QYI5.js.map → config-4GSOMUMF.js.map} +0 -0
- /package/dist/{config-54USUVSE.js.map → config-5YBUWFUP.js.map} +0 -0
- /package/dist/{config-5ZXN2T2H.js.map → config-5ZRKJTKG.js.map} +0 -0
- /package/dist/{config-A2GQYJDB.js.map → config-A25LTL5W.js.map} +0 -0
- /package/dist/{config-BBOLI7VE.js.map → config-CLU7JABG.js.map} +0 -0
- /package/dist/{config-BIBFLUIR.js.map → config-D2RF7L3N.js.map} +0 -0
- /package/dist/{config-CPYFOUQO.js.map → config-E55TKM6K.js.map} +0 -0
- /package/dist/{config-DWSJL3NH.js.map → config-ELDOFRJW.js.map} +0 -0
- /package/dist/{config-E22XAGYN.js.map → config-FPC3RBFD.js.map} +0 -0
- /package/dist/{config-EHE52ZTK.js.map → config-FPM3LAW7.js.map} +0 -0
- /package/dist/{config-EX3ZJTZI.js.map → config-G3F54CS4.js.map} +0 -0
- /package/dist/{config-FRK7ZL37.js.map → config-G43HRUI3.js.map} +0 -0
- /package/dist/{config-HQXNFQZS.js.map → config-GG3WO5PB.js.map} +0 -0
- /package/dist/{config-HTXOOAOD.js.map → config-JUYBWAZE.js.map} +0 -0
- /package/dist/{config-IPNWAJHH.js.map → config-LJ5T6TVA.js.map} +0 -0
- /package/dist/{config-J2C53GOT.js.map → config-MDSAE4O3.js.map} +0 -0
- /package/dist/{config-K63RX6EU.js.map → config-NRIOKK5T.js.map} +0 -0
- /package/dist/{config-L7SBSH5L.js.map → config-OYK2BSJK.js.map} +0 -0
- /package/dist/{config-LEALEMKA.js.map → config-PB3KA2CE.js.map} +0 -0
- /package/dist/{config-M3Z47VYU.js.map → config-QY4IL3PH.js.map} +0 -0
- /package/dist/{config-MZM3IPFM.js.map → config-R4LAOEDS.js.map} +0 -0
- /package/dist/{config-OJ2BPESH.js.map → config-RIAAD6RW.js.map} +0 -0
- /package/dist/{config-QO2XUME4.js.map → config-SYNEQAUB.js.map} +0 -0
- /package/dist/{config-QWQGOXQ5.js.map → config-TJKGYA2B.js.map} +0 -0
- /package/dist/{config-RI7IEZUF.js.map → config-UURRGA7U.js.map} +0 -0
- /package/dist/{config-SPW6NESU.js.map → config-VPLHQXVE.js.map} +0 -0
- /package/dist/{config-T2IUIU5C.js.map → config-WRACCRPN.js.map} +0 -0
- /package/dist/{config-VKKZGC7V.js.map → config-WVHKXEVE.js.map} +0 -0
- /package/dist/{config-W7EVPJNK.js.map → config-XU7R36IE.js.map} +0 -0
- /package/dist/{config-WKQ3FGTZ.js.map → config-Y2KOUYSS.js.map} +0 -0
- /package/dist/{config-WVILHDFV.js.map → databricks_volume-CNCPTZHS.js.map} +0 -0
- /package/dist/{config-XU6D5C7E.js.map → digitalocean-DJZOUB6Q.js.map} +0 -0
- /package/dist/{databricks_volume-ETRDJVVQ.js.map → discord-ETB2CADR.js.map} +0 -0
- /package/dist/{digitalocean-QP72DR4J.js.map → disk-WEHSTK3F.js.map} +0 -0
- /package/dist/{discord-BSN5RB3E.js.map → dropbox-XN6PGLNE.js.map} +0 -0
- /package/dist/{disk-24NWTN2I.js.map → email-OV7XCP3T.js.map} +0 -0
- /package/dist/{dropbox-OSTZXSIE.js.map → gcal-P56MRCGU.js.map} +0 -0
- /package/dist/{email-4ZFPSWIN.js.map → gcs-HFBIAE2C.js.map} +0 -0
- /package/dist/{gcs-PFWR6MIW.js.map → gdocs-LQ3UXP3J.js.map} +0 -0
- /package/dist/{gdocs-GPAZRQG5.js.map → gdrive-N6UBYLON.js.map} +0 -0
- /package/dist/{gdrive-XSX6A7B3.js.map → github-BPZREGPI.js.map} +0 -0
- /package/dist/{github-EQ4NXUTA.js.map → github_ci-7A4LUIZ7.js.map} +0 -0
- /package/dist/{github_ci-QL5B2Q2N.js.map → gmail-YED2MF6H.js.map} +0 -0
- /package/dist/{gmail-2TBT4CVH.js.map → gridfs-CPLQ4G62.js.map} +0 -0
- /package/dist/{gridfs-KZRZ6SIB.js.map → gsheets-4BNIJPQ6.js.map} +0 -0
- /package/dist/{gsheets-N53WEXN2.js.map → gslides-GDBYLO5A.js.map} +0 -0
- /package/dist/{gslides-TATSARTH.js.map → hf_buckets-FTJITQ3P.js.map} +0 -0
- /package/dist/{hf_buckets-BK7NGJWS.js.map → hf_datasets-6GXVKQD7.js.map} +0 -0
- /package/dist/{hf_datasets-UQ5QGM4L.js.map → hf_models-PJPGZAC5.js.map} +0 -0
- /package/dist/{hf_models-75LFCQCS.js.map → hf_spaces-LFNFOLBF.js.map} +0 -0
- /package/dist/{hf_spaces-6T2KB3UC.js.map → jaeger-GCA6MJ6E.js.map} +0 -0
- /package/dist/{langfuse-AMQCQWNE.js.map → lancedb-TJ5YSJY5.js.map} +0 -0
- /package/dist/{linear-V3TXO6CV.js.map → langfuse-RUMTUMXS.js.map} +0 -0
- /package/dist/{minio-IZRZY4C5.js.map → linear-BCE4KEAC.js.map} +0 -0
- /package/dist/{mongodb-VMKPQCPX.js.map → minio-5SO6KBTK.js.map} +0 -0
- /package/dist/{nextcloud-5RHQCGDO.js.map → mongodb-7C5MBESV.js.map} +0 -0
- /package/dist/{notion-6PPNTQFM.js.map → nextcloud-4O2LZVW2.js.map} +0 -0
- /package/dist/{oci-CKYBSFZJ.js.map → notion-RVKEAQ2M.js.map} +0 -0
- /package/dist/{postgres-WIQBVL5M.js.map → oci-OQXOIC62.js.map} +0 -0
- /package/dist/{qingstor-AP4IIPLY.js.map → postgres-AV45GNRS.js.map} +0 -0
- /package/dist/{r2-C4XGEWQY.js.map → qingstor-W277YA4K.js.map} +0 -0
- /package/dist/{redis-6D55Q2WB.js.map → r2-FUA4IORE.js.map} +0 -0
- /package/dist/{s3-XQBI2CXN.js.map → redis-LPS357NF.js.map} +0 -0
- /package/dist/{scaleway-SEZJVURB.js.map → s3-FPNWWIVM.js.map} +0 -0
- /package/dist/{seaweedfs-3XYIAFU2.js.map → scaleway-BP3732U7.js.map} +0 -0
- /package/dist/{slack-ZHXDJQY4.js.map → seaweedfs-MC6HIEP4.js.map} +0 -0
- /package/dist/{ssh-X2MO7JOV.js.map → slack-JFGW7VLN.js.map} +0 -0
- /package/dist/{supabase-BBM44UTM.js.map → ssh-UYPG42LM.js.map} +0 -0
- /package/dist/{tencent-X72USLJ7.js.map → supabase-A3KUFMDC.js.map} +0 -0
- /package/dist/{trello-EER5NG7L.js.map → tencent-5464UQ2X.js.map} +0 -0
- /package/dist/{wasabi-O4MVIUFG.js.map → trello-O2KB3FUO.js.map} +0 -0
|
@@ -91,14 +91,22 @@ var HfSpacesAccessor = class extends HfAccessor {
|
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
// src/commands/builtin/hf/index.ts
|
|
94
|
+
import { makeGenericCommands } from "@struktoai/mirage-core";
|
|
95
|
+
|
|
96
|
+
// src/commands/builtin/hf/find.ts
|
|
97
|
+
import { command, findGeneric, metadataProvision, specOf } from "@struktoai/mirage-core";
|
|
98
|
+
|
|
99
|
+
// src/core/hf/find.ts
|
|
94
100
|
import {
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
buildTree,
|
|
102
|
+
emitStartPath,
|
|
103
|
+
keep,
|
|
104
|
+
rstripSlash,
|
|
105
|
+
startBasename,
|
|
106
|
+
stripSlash,
|
|
107
|
+
compareCodePoints
|
|
97
108
|
} from "@struktoai/mirage-core";
|
|
98
109
|
|
|
99
|
-
// src/core/hf/read.ts
|
|
100
|
-
import { record } from "@struktoai/mirage-core";
|
|
101
|
-
|
|
102
110
|
// src/core/hf/util.ts
|
|
103
111
|
import { mountPrefixOf } from "@struktoai/mirage-core";
|
|
104
112
|
function rawPathOf(path) {
|
|
@@ -114,47 +122,261 @@ function isNotFound(err) {
|
|
|
114
122
|
return err instanceof Error && err.message.startsWith("NotFound");
|
|
115
123
|
}
|
|
116
124
|
|
|
117
|
-
// src/core/hf/
|
|
125
|
+
// src/core/hf/find.ts
|
|
126
|
+
function matchesFilters(entryPath, kind, size2, isEmpty, baseDepth, options, tree) {
|
|
127
|
+
const entryName = entryPath.split("/").pop() ?? "";
|
|
128
|
+
const depth = (entryPath.match(/\//g) ?? []).length - baseDepth;
|
|
129
|
+
if (options.maxDepth !== null && options.maxDepth !== void 0 && depth > options.maxDepth) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
if (!keep({ key: entryPath, name: entryName, kind, depth, isEmpty }, tree, options.minDepth)) {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
if (options.minSize != null || options.maxSize != null) {
|
|
136
|
+
const effective = kind === "f" ? size2 : 0;
|
|
137
|
+
if (options.minSize != null && effective < options.minSize) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
if (options.maxSize != null && effective > options.maxSize) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
async function find(accessor, path, options = {}) {
|
|
147
|
+
const target = rawPathOf(path);
|
|
148
|
+
const pfx = stripSlash(target);
|
|
149
|
+
const scanPath = pfx !== "" ? `${pfx}/` : "/";
|
|
150
|
+
const base = pfx !== "" ? `/${pfx}` : "/";
|
|
151
|
+
const baseDepth = base === "/" ? 0 : (base.match(/\//g) ?? []).length;
|
|
152
|
+
const startName = startBasename(path.virtual);
|
|
153
|
+
const empty = options.empty === true;
|
|
154
|
+
const op = await accessor.operator();
|
|
155
|
+
const results = [];
|
|
156
|
+
const seenDirs = /* @__PURE__ */ new Set();
|
|
157
|
+
let sawDescendant = false;
|
|
158
|
+
let dirExists = false;
|
|
159
|
+
const tree = options.tree ?? buildTree({
|
|
160
|
+
name: options.name,
|
|
161
|
+
iname: options.iname,
|
|
162
|
+
pathPattern: options.pathPattern,
|
|
163
|
+
type: options.type,
|
|
164
|
+
nameExclude: options.nameExclude,
|
|
165
|
+
orNames: options.orNames
|
|
166
|
+
});
|
|
167
|
+
let entries2;
|
|
168
|
+
try {
|
|
169
|
+
entries2 = await op.list(scanPath, { recursive: true });
|
|
170
|
+
} catch (err) {
|
|
171
|
+
if (isNotFound(err)) return [];
|
|
172
|
+
throw err;
|
|
173
|
+
}
|
|
174
|
+
for (const entry of entries2) {
|
|
175
|
+
const rel = entry.path();
|
|
176
|
+
if (rel === "") continue;
|
|
177
|
+
const meta = entry.metadata();
|
|
178
|
+
const isDir = rel.endsWith("/") || meta.isDirectory();
|
|
179
|
+
const entryPath = `/${stripSlash(rel)}`;
|
|
180
|
+
if (entryPath === base) {
|
|
181
|
+
dirExists = true;
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
sawDescendant = true;
|
|
185
|
+
const kind = isDir ? "d" : "f";
|
|
186
|
+
const length = meta.contentLength;
|
|
187
|
+
const size2 = length !== null ? Number(length) : 0;
|
|
188
|
+
const fileEntries = [[entryPath, kind]];
|
|
189
|
+
if (!isDir) {
|
|
190
|
+
let parent = rstripSlash(entryPath.slice(0, entryPath.lastIndexOf("/"))) || "/";
|
|
191
|
+
while (parent !== "" && parent !== base && parent !== "/") {
|
|
192
|
+
if (!seenDirs.has(parent)) {
|
|
193
|
+
seenDirs.add(parent);
|
|
194
|
+
fileEntries.push([parent, "d"]);
|
|
195
|
+
}
|
|
196
|
+
parent = parent.slice(0, parent.lastIndexOf("/")) || "/";
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
for (const [ep, k] of fileEntries) {
|
|
200
|
+
const isEmpty = !empty ? null : k === "d" ? false : size2 === 0;
|
|
201
|
+
if (matchesFilters(ep, k, size2, isEmpty, baseDepth, options, tree)) {
|
|
202
|
+
results.push(ep);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (sawDescendant || dirExists) {
|
|
207
|
+
emitStartPath(results, base, startName, {
|
|
208
|
+
kind: "d",
|
|
209
|
+
isEmpty: !sawDescendant,
|
|
210
|
+
exists: true,
|
|
211
|
+
tree,
|
|
212
|
+
maxDepth: options.maxDepth,
|
|
213
|
+
minDepth: options.minDepth,
|
|
214
|
+
minSize: options.minSize,
|
|
215
|
+
maxSize: options.maxSize
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
return [...new Set(results)].sort(compareCodePoints);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// src/core/hf/readdir.ts
|
|
222
|
+
import {
|
|
223
|
+
IndexEntry,
|
|
224
|
+
ResourceType,
|
|
225
|
+
mountPrefixOf as mountPrefixOf2,
|
|
226
|
+
rstripSlash as rstripSlash2,
|
|
227
|
+
stripSlash as stripSlash2,
|
|
228
|
+
compareCodePoints as compareCodePoints2
|
|
229
|
+
} from "@struktoai/mirage-core";
|
|
230
|
+
|
|
231
|
+
// src/core/hf/constants.ts
|
|
232
|
+
var SCOPE_ERROR = 1e4;
|
|
233
|
+
var DEFAULT_CHUNK_SIZE = 8192;
|
|
234
|
+
|
|
235
|
+
// src/core/hf/readdir.ts
|
|
118
236
|
import { enoent } from "@struktoai/mirage-core";
|
|
119
|
-
async function
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
237
|
+
async function readdir(accessor, path, index) {
|
|
238
|
+
const prefix = mountPrefixOf2(path.virtual, path.resourcePath);
|
|
239
|
+
let target = path.pattern !== null ? path.directory : path.virtual;
|
|
240
|
+
if (prefix !== "" && target.startsWith(prefix)) {
|
|
241
|
+
const rest = target.slice(prefix.length);
|
|
242
|
+
if (prefix.endsWith("/") || rest === "" || rest.startsWith("/")) {
|
|
243
|
+
target = rest || "/";
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
const virtualKey = rstripSlash2(prefix !== "" ? `${prefix}${target}` : target) || "/";
|
|
247
|
+
if (index !== void 0) {
|
|
248
|
+
const listing = await index.listDir(virtualKey);
|
|
249
|
+
if (listing.entries !== void 0 && listing.entries !== null) {
|
|
250
|
+
return listing.entries;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
const strippedTarget = stripSlash2(target);
|
|
254
|
+
const listPath = strippedTarget !== "" ? `${strippedTarget}/` : "/";
|
|
123
255
|
const op = await accessor.operator();
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
256
|
+
const names = [];
|
|
257
|
+
const dirKeys = /* @__PURE__ */ new Set();
|
|
258
|
+
const sizes = /* @__PURE__ */ new Map();
|
|
259
|
+
let entries2;
|
|
260
|
+
try {
|
|
261
|
+
entries2 = await op.list(listPath);
|
|
262
|
+
} catch (err) {
|
|
263
|
+
if (isNotFound(err)) throw enoent(path);
|
|
264
|
+
throw err;
|
|
127
265
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
266
|
+
for (const entry of entries2) {
|
|
267
|
+
const relative = entry.path();
|
|
268
|
+
if (relative === "" || relative === listPath) continue;
|
|
269
|
+
const isDir = relative.endsWith("/");
|
|
270
|
+
const base = `/${rstripSlash2(relative)}`;
|
|
271
|
+
names.push(base);
|
|
272
|
+
if (isDir) {
|
|
273
|
+
dirKeys.add(base);
|
|
274
|
+
} else {
|
|
275
|
+
const meta = entry.metadata();
|
|
276
|
+
const length = meta.contentLength;
|
|
277
|
+
sizes.set(base, length !== null ? Number(length) : null);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
for (const [base, size2] of sizes) {
|
|
281
|
+
if (size2 !== null) continue;
|
|
282
|
+
const md = await op.stat(stripSlash2(base));
|
|
283
|
+
sizes.set(base, md.contentLength !== null ? Number(md.contentLength) : null);
|
|
284
|
+
}
|
|
285
|
+
names.sort(compareCodePoints2);
|
|
286
|
+
if (names.length > SCOPE_ERROR) {
|
|
287
|
+
console.warn(
|
|
288
|
+
`hf readdir: ${virtualKey} returned ${String(names.length)} entries (limit ${String(SCOPE_ERROR)})`
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
const virtualEntries = names.map((e) => prefix !== "" ? `${prefix}${e}` : e).sort(compareCodePoints2);
|
|
292
|
+
if (index !== void 0) {
|
|
293
|
+
const indexEntries = names.map((e) => {
|
|
294
|
+
const name = e.split("/").pop() ?? e;
|
|
295
|
+
if (dirKeys.has(e)) {
|
|
296
|
+
return [name, new IndexEntry({ id: e, name, resourceType: ResourceType.FOLDER })];
|
|
297
|
+
}
|
|
298
|
+
return [
|
|
299
|
+
name,
|
|
300
|
+
new IndexEntry({
|
|
301
|
+
id: e,
|
|
302
|
+
name,
|
|
303
|
+
resourceType: ResourceType.FILE,
|
|
304
|
+
size: sizes.get(e) ?? null
|
|
305
|
+
})
|
|
306
|
+
];
|
|
307
|
+
});
|
|
308
|
+
await index.setDir(virtualKey, indexEntries);
|
|
131
309
|
}
|
|
310
|
+
return virtualEntries;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// src/commands/builtin/hf/find.ts
|
|
314
|
+
var HF_FIND = command({
|
|
315
|
+
name: "find",
|
|
316
|
+
resource: [...HF_RESOURCES],
|
|
317
|
+
spec: specOf("find"),
|
|
318
|
+
provision: metadataProvision,
|
|
319
|
+
// The emptiness probe is wired like the generic builder does it, because
|
|
320
|
+
// a bucket start point that holds nothing is exactly what an object store
|
|
321
|
+
// cannot tell from a missing one, and `-empty` has to match it.
|
|
322
|
+
fn: (accessor, paths, texts, opts) => findGeneric(
|
|
323
|
+
paths,
|
|
324
|
+
texts,
|
|
325
|
+
opts,
|
|
326
|
+
(root, options) => find(accessor, root, options),
|
|
327
|
+
void 0,
|
|
328
|
+
async (spec) => (await readdir(accessor, spec, opts.index ?? void 0)).length === 0
|
|
329
|
+
)
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
// src/commands/builtin/hf/io.ts
|
|
333
|
+
import { rangeOf } from "@struktoai/mirage-core";
|
|
334
|
+
|
|
335
|
+
// src/core/hf/write.ts
|
|
336
|
+
import { invalidateAfterWrite } from "@struktoai/mirage-core";
|
|
337
|
+
import { invalidateAncestors } from "@struktoai/mirage-core";
|
|
338
|
+
import { record } from "@struktoai/mirage-core";
|
|
339
|
+
import { enoent as enoent2 } from "@struktoai/mirage-core";
|
|
340
|
+
async function write(accessor, path, data, _index) {
|
|
341
|
+
const rawPath = rawPathOf(path);
|
|
342
|
+
const key = hfKey(rawPath);
|
|
343
|
+
const op = await accessor.operator();
|
|
132
344
|
const startMs = performance.now();
|
|
133
|
-
let data;
|
|
134
345
|
try {
|
|
135
|
-
|
|
346
|
+
await op.write(key, Buffer.from(data));
|
|
136
347
|
} catch (err) {
|
|
137
|
-
if (isNotFound(err)) throw
|
|
348
|
+
if (isNotFound(err)) throw enoent2(path);
|
|
138
349
|
throw err;
|
|
139
350
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
351
|
+
record("write", path.virtual, accessor.resourceName, data.byteLength, startMs);
|
|
352
|
+
await invalidateAfterWrite(path);
|
|
353
|
+
await invalidateAncestors(path);
|
|
143
354
|
}
|
|
144
355
|
|
|
356
|
+
// src/core/hf/create.ts
|
|
357
|
+
async function create(accessor, path, index) {
|
|
358
|
+
await write(accessor, path, new Uint8Array(), index);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// src/core/hf/du/entries.ts
|
|
362
|
+
import { compareCodePoints as compareCodePoints3, FileType as FileType2, stripSlash as stripSlash4 } from "@struktoai/mirage-core";
|
|
363
|
+
|
|
364
|
+
// src/core/hf/du/walk.ts
|
|
365
|
+
import "@struktoai/mirage-core";
|
|
366
|
+
|
|
145
367
|
// src/core/hf/stat.ts
|
|
146
368
|
import {
|
|
147
369
|
FileStat,
|
|
148
370
|
FileType,
|
|
149
371
|
guessType,
|
|
150
|
-
mountPrefixOf as
|
|
151
|
-
stripSlash
|
|
372
|
+
mountPrefixOf as mountPrefixOf3,
|
|
373
|
+
stripSlash as stripSlash3
|
|
152
374
|
} from "@struktoai/mirage-core";
|
|
153
|
-
import { enoent as
|
|
375
|
+
import { enoent as enoent3 } from "@struktoai/mirage-core";
|
|
154
376
|
async function stat(accessor, path, index) {
|
|
155
|
-
const prefix =
|
|
377
|
+
const prefix = mountPrefixOf3(path.virtual, path.resourcePath);
|
|
156
378
|
const rawPath = rawPathOf(path);
|
|
157
|
-
const stripped =
|
|
379
|
+
const stripped = stripSlash3(rawPath);
|
|
158
380
|
if (stripped === "") {
|
|
159
381
|
return new FileStat({ name: "/", type: FileType.DIRECTORY });
|
|
160
382
|
}
|
|
@@ -175,7 +397,7 @@ async function stat(accessor, path, index) {
|
|
|
175
397
|
const parent = virtualKey.slice(0, virtualKey.lastIndexOf("/")) || "/";
|
|
176
398
|
const parentListing = await index.listDir(parent);
|
|
177
399
|
if (parentListing.entries !== void 0 && parentListing.entries !== null) {
|
|
178
|
-
throw
|
|
400
|
+
throw enoent3(path);
|
|
179
401
|
}
|
|
180
402
|
}
|
|
181
403
|
const op = await accessor.operator();
|
|
@@ -207,19 +429,10 @@ async function stat(accessor, path, index) {
|
|
|
207
429
|
} catch (err) {
|
|
208
430
|
if (!isNotFound(err)) throw err;
|
|
209
431
|
}
|
|
210
|
-
throw
|
|
432
|
+
throw enoent3(path);
|
|
211
433
|
}
|
|
212
434
|
|
|
213
|
-
// src/
|
|
214
|
-
import {
|
|
215
|
-
command,
|
|
216
|
-
duGeneric,
|
|
217
|
-
resolveGlobOf,
|
|
218
|
-
specOf
|
|
219
|
-
} from "@struktoai/mirage-core";
|
|
220
|
-
|
|
221
|
-
// src/core/hf/du.ts
|
|
222
|
-
import { FileType as FileType2, stripSlash as stripSlash2 } from "@struktoai/mirage-core";
|
|
435
|
+
// src/core/hf/du/walk.ts
|
|
223
436
|
async function statOrNull(accessor, path) {
|
|
224
437
|
try {
|
|
225
438
|
return await stat(accessor, path);
|
|
@@ -228,31 +441,18 @@ async function statOrNull(accessor, path) {
|
|
|
228
441
|
throw err;
|
|
229
442
|
}
|
|
230
443
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
const pfx = stripSlash2(target);
|
|
236
|
-
const scanPath = pfx !== "" ? `${pfx}/` : "/";
|
|
237
|
-
const op = await accessor.operator();
|
|
238
|
-
let total = 0;
|
|
239
|
-
try {
|
|
240
|
-
for (const entry of await op.list(scanPath, { recursive: true })) {
|
|
241
|
-
if (entry.path().endsWith("/")) continue;
|
|
242
|
-
const length = entry.metadata().contentLength;
|
|
243
|
-
total += length !== null ? Number(length) : 0;
|
|
244
|
-
}
|
|
245
|
-
} catch (err) {
|
|
246
|
-
if (isNotFound(err)) return 0;
|
|
247
|
-
throw err;
|
|
248
|
-
}
|
|
249
|
-
return total;
|
|
444
|
+
function lstrip(value) {
|
|
445
|
+
let start = 0;
|
|
446
|
+
while (start < value.length && value[start] === "/") start += 1;
|
|
447
|
+
return value.slice(start);
|
|
250
448
|
}
|
|
251
|
-
|
|
449
|
+
|
|
450
|
+
// src/core/hf/du/entries.ts
|
|
451
|
+
async function entries(accessor, path) {
|
|
252
452
|
const info = await statOrNull(accessor, path);
|
|
253
453
|
if (info !== null && info.type !== FileType2.DIRECTORY) return [[], info.size ?? 0];
|
|
254
454
|
const target = rawPathOf(path);
|
|
255
|
-
const pfx =
|
|
455
|
+
const pfx = stripSlash4(target);
|
|
256
456
|
const scanPath = pfx !== "" ? `${pfx}/` : "/";
|
|
257
457
|
const op = await accessor.operator();
|
|
258
458
|
const results = [];
|
|
@@ -262,50 +462,38 @@ async function duAll(accessor, path) {
|
|
|
262
462
|
const rel = entry.path();
|
|
263
463
|
if (rel === "" || rel.endsWith("/")) continue;
|
|
264
464
|
const length = entry.metadata().contentLength;
|
|
265
|
-
const
|
|
266
|
-
results.push([`/${lstrip(rel)}`,
|
|
267
|
-
total +=
|
|
465
|
+
const size2 = length !== null ? Number(length) : 0;
|
|
466
|
+
results.push([`/${lstrip(rel)}`, size2]);
|
|
467
|
+
total += size2;
|
|
268
468
|
}
|
|
269
469
|
} catch (err) {
|
|
270
470
|
if (!isNotFound(err)) throw err;
|
|
271
471
|
}
|
|
272
|
-
results.sort((a, b) => a[0]
|
|
472
|
+
results.sort((a, b) => compareCodePoints3(a[0], b[0]));
|
|
273
473
|
return [results, total];
|
|
274
474
|
}
|
|
275
|
-
function lstrip(value) {
|
|
276
|
-
let start = 0;
|
|
277
|
-
while (start < value.length && value[start] === "/") start += 1;
|
|
278
|
-
return value.slice(start);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
// src/core/hf/constants.ts
|
|
282
|
-
var SCOPE_ERROR = 1e4;
|
|
283
|
-
var DEFAULT_CHUNK_SIZE = 8192;
|
|
284
475
|
|
|
285
|
-
// src/core/hf/
|
|
286
|
-
import {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
const
|
|
292
|
-
const
|
|
476
|
+
// src/core/hf/du/size.ts
|
|
477
|
+
import { FileType as FileType3, stripSlash as stripSlash5 } from "@struktoai/mirage-core";
|
|
478
|
+
async function size(accessor, path) {
|
|
479
|
+
const info = await statOrNull(accessor, path);
|
|
480
|
+
if (info !== null && info.type !== FileType3.DIRECTORY) return info.size ?? 0;
|
|
481
|
+
const target = rawPathOf(path);
|
|
482
|
+
const pfx = stripSlash5(target);
|
|
483
|
+
const scanPath = pfx !== "" ? `${pfx}/` : "/";
|
|
293
484
|
const op = await accessor.operator();
|
|
294
|
-
|
|
485
|
+
let total = 0;
|
|
295
486
|
try {
|
|
296
|
-
await op.
|
|
487
|
+
for (const entry of await op.list(scanPath, { recursive: true })) {
|
|
488
|
+
if (entry.path().endsWith("/")) continue;
|
|
489
|
+
const length = entry.metadata().contentLength;
|
|
490
|
+
total += length !== null ? Number(length) : 0;
|
|
491
|
+
}
|
|
297
492
|
} catch (err) {
|
|
298
|
-
if (isNotFound(err))
|
|
493
|
+
if (isNotFound(err)) return 0;
|
|
299
494
|
throw err;
|
|
300
495
|
}
|
|
301
|
-
|
|
302
|
-
await invalidateAfterWrite(path);
|
|
303
|
-
await invalidateAncestors(path);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
// src/core/hf/create.ts
|
|
307
|
-
async function create(accessor, path, index) {
|
|
308
|
-
await write(accessor, path, new Uint8Array(), index);
|
|
496
|
+
return total;
|
|
309
497
|
}
|
|
310
498
|
|
|
311
499
|
// src/core/hf/mkdir.ts
|
|
@@ -314,13 +502,13 @@ async function mkdir(_accessor, _path, _index) {
|
|
|
314
502
|
|
|
315
503
|
// src/core/hf/unlink.ts
|
|
316
504
|
import { invalidateAfterUnlink } from "@struktoai/mirage-core";
|
|
317
|
-
import { FileType as
|
|
505
|
+
import { FileType as FileType4, record as record2 } from "@struktoai/mirage-core";
|
|
318
506
|
import { invalidateAncestors as invalidateAncestors2 } from "@struktoai/mirage-core";
|
|
319
507
|
import { enoent as enoent4 } from "@struktoai/mirage-core";
|
|
320
508
|
async function unlink(accessor, path, index) {
|
|
321
509
|
const fileStat = await stat(accessor, path, index);
|
|
322
510
|
const rawPath = rawPathOf(path);
|
|
323
|
-
if (fileStat.type ===
|
|
511
|
+
if (fileStat.type === FileType4.DIRECTORY) {
|
|
324
512
|
const e = new Error(`EISDIR: ${rawPath}`);
|
|
325
513
|
e.code = "EISDIR";
|
|
326
514
|
throw e;
|
|
@@ -334,101 +522,50 @@ async function unlink(accessor, path, index) {
|
|
|
334
522
|
if (isNotFound(err)) throw enoent4(path);
|
|
335
523
|
throw err;
|
|
336
524
|
}
|
|
337
|
-
|
|
525
|
+
record2("unlink", path.virtual, accessor.resourceName, 0, startMs);
|
|
338
526
|
await invalidateAfterUnlink(path);
|
|
339
527
|
await invalidateAncestors2(path);
|
|
340
528
|
}
|
|
341
529
|
|
|
342
|
-
// src/core/hf/
|
|
343
|
-
import {
|
|
344
|
-
IndexEntry,
|
|
345
|
-
ResourceType,
|
|
346
|
-
mountPrefixOf as mountPrefixOf3,
|
|
347
|
-
rstripSlash,
|
|
348
|
-
stripSlash as stripSlash3
|
|
349
|
-
} from "@struktoai/mirage-core";
|
|
530
|
+
// src/core/hf/read.ts
|
|
531
|
+
import { record as record3 } from "@struktoai/mirage-core";
|
|
350
532
|
import { enoent as enoent5 } from "@struktoai/mirage-core";
|
|
351
|
-
async function
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
533
|
+
async function read(accessor, path, _index, options = {}) {
|
|
534
|
+
const virtual = path.virtual;
|
|
535
|
+
const rawPath = rawPathOf(path);
|
|
536
|
+
const key = hfKey(rawPath);
|
|
537
|
+
const op = await accessor.operator();
|
|
538
|
+
const readOptions = {};
|
|
539
|
+
if (options.offset !== void 0 && options.offset > 0) {
|
|
540
|
+
readOptions.offset = BigInt(options.offset);
|
|
359
541
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
if (listing.entries !== void 0 && listing.entries !== null) {
|
|
364
|
-
return listing.entries;
|
|
365
|
-
}
|
|
542
|
+
if (options.size !== void 0) {
|
|
543
|
+
readOptions.offset ??= 0n;
|
|
544
|
+
readOptions.size = BigInt(options.size);
|
|
366
545
|
}
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
-
const op = await accessor.operator();
|
|
370
|
-
const names = [];
|
|
371
|
-
const dirKeys = /* @__PURE__ */ new Set();
|
|
372
|
-
const sizes = /* @__PURE__ */ new Map();
|
|
373
|
-
let entries;
|
|
546
|
+
const startMs = performance.now();
|
|
547
|
+
let data;
|
|
374
548
|
try {
|
|
375
|
-
|
|
549
|
+
data = readOptions.offset !== void 0 || readOptions.size !== void 0 ? await op.read(key, readOptions) : await op.read(key);
|
|
376
550
|
} catch (err) {
|
|
377
551
|
if (isNotFound(err)) throw enoent5(path);
|
|
378
552
|
throw err;
|
|
379
553
|
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
const isDir = relative.endsWith("/");
|
|
384
|
-
const base = `/${rstripSlash(relative)}`;
|
|
385
|
-
names.push(base);
|
|
386
|
-
if (isDir) {
|
|
387
|
-
dirKeys.add(base);
|
|
388
|
-
} else {
|
|
389
|
-
const meta = entry.metadata();
|
|
390
|
-
const length = meta.contentLength;
|
|
391
|
-
sizes.set(base, length !== null ? Number(length) : null);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
names.sort();
|
|
395
|
-
if (names.length > SCOPE_ERROR) {
|
|
396
|
-
console.warn(
|
|
397
|
-
`hf readdir: ${virtualKey} returned ${String(names.length)} entries (limit ${String(SCOPE_ERROR)})`
|
|
398
|
-
);
|
|
399
|
-
}
|
|
400
|
-
const virtualEntries = names.map((e) => prefix !== "" ? `${prefix}${e}` : e).sort();
|
|
401
|
-
if (index !== void 0) {
|
|
402
|
-
const indexEntries = names.map((e) => {
|
|
403
|
-
const name = e.split("/").pop() ?? e;
|
|
404
|
-
if (dirKeys.has(e)) {
|
|
405
|
-
return [name, new IndexEntry({ id: e, name, resourceType: ResourceType.FOLDER })];
|
|
406
|
-
}
|
|
407
|
-
return [
|
|
408
|
-
name,
|
|
409
|
-
new IndexEntry({
|
|
410
|
-
id: e,
|
|
411
|
-
name,
|
|
412
|
-
resourceType: ResourceType.FILE,
|
|
413
|
-
size: sizes.get(e) ?? null
|
|
414
|
-
})
|
|
415
|
-
];
|
|
416
|
-
});
|
|
417
|
-
await index.setDir(virtualKey, indexEntries);
|
|
418
|
-
}
|
|
419
|
-
return virtualEntries;
|
|
554
|
+
const bytes = new Uint8Array(data);
|
|
555
|
+
record3("read", virtual, accessor.resourceName, bytes.byteLength, startMs);
|
|
556
|
+
return bytes;
|
|
420
557
|
}
|
|
421
558
|
|
|
422
559
|
// src/core/hf/rm.ts
|
|
423
|
-
import { invalidateAfterUnlink as invalidateAfterUnlink2, record as record4, stripSlash as
|
|
560
|
+
import { invalidateAfterUnlink as invalidateAfterUnlink2, record as record4, stripSlash as stripSlash6 } from "@struktoai/mirage-core";
|
|
424
561
|
import { invalidateAncestors as invalidateAncestors3 } from "@struktoai/mirage-core";
|
|
425
562
|
async function rmR(accessor, path) {
|
|
426
|
-
const stripped =
|
|
563
|
+
const stripped = stripSlash6(rawPathOf(path));
|
|
427
564
|
const scanPath = stripped !== "" ? `${stripped}/` : "/";
|
|
428
565
|
const op = await accessor.operator();
|
|
429
566
|
const startMs = performance.now();
|
|
430
|
-
const
|
|
431
|
-
for (const entry of
|
|
567
|
+
const entries2 = await op.list(scanPath, { recursive: true });
|
|
568
|
+
for (const entry of entries2) {
|
|
432
569
|
const key = entry.path();
|
|
433
570
|
if (key.endsWith("/")) continue;
|
|
434
571
|
await op.delete(key);
|
|
@@ -482,8 +619,10 @@ async function exists(accessor, path) {
|
|
|
482
619
|
var HF_IO = {
|
|
483
620
|
readdir,
|
|
484
621
|
readBytes: read,
|
|
622
|
+
readRange: rangeOf(read),
|
|
485
623
|
readStream: stream,
|
|
486
624
|
stat,
|
|
625
|
+
du: { size, entries },
|
|
487
626
|
isMounted: () => true,
|
|
488
627
|
local: false,
|
|
489
628
|
maxGlobMatches: SCOPE_ERROR,
|
|
@@ -495,164 +634,20 @@ var HF_IO = {
|
|
|
495
634
|
create
|
|
496
635
|
};
|
|
497
636
|
|
|
498
|
-
// src/commands/builtin/hf/du.ts
|
|
499
|
-
var resolveGlob = resolveGlobOf(HF_IO);
|
|
500
|
-
async function duCommand(accessor, paths, _texts, opts) {
|
|
501
|
-
const resolved = paths.length > 0 ? await resolveGlob(accessor, paths, opts.index ?? void 0) : [];
|
|
502
|
-
return duGeneric(
|
|
503
|
-
resolved,
|
|
504
|
-
opts,
|
|
505
|
-
(p) => du(accessor, p),
|
|
506
|
-
(p) => duAll(accessor, p)
|
|
507
|
-
);
|
|
508
|
-
}
|
|
509
|
-
var HF_DU = command({
|
|
510
|
-
name: "du",
|
|
511
|
-
resource: [...HF_RESOURCES],
|
|
512
|
-
spec: specOf("du"),
|
|
513
|
-
fn: duCommand
|
|
514
|
-
});
|
|
515
|
-
|
|
516
|
-
// src/commands/builtin/hf/find.ts
|
|
517
|
-
import { command as command2, findGeneric, metadataProvision, specOf as specOf2 } from "@struktoai/mirage-core";
|
|
518
|
-
|
|
519
|
-
// src/core/hf/find.ts
|
|
520
|
-
import {
|
|
521
|
-
buildTree,
|
|
522
|
-
emitStartPath,
|
|
523
|
-
keep,
|
|
524
|
-
rstripSlash as rstripSlash2,
|
|
525
|
-
startBasename,
|
|
526
|
-
stripSlash as stripSlash5
|
|
527
|
-
} from "@struktoai/mirage-core";
|
|
528
|
-
function matchesFilters(entryPath, kind, size, isEmpty, baseDepth, options, tree) {
|
|
529
|
-
const entryName = entryPath.split("/").pop() ?? "";
|
|
530
|
-
const depth = (entryPath.match(/\//g) ?? []).length - baseDepth;
|
|
531
|
-
if (options.maxDepth !== null && options.maxDepth !== void 0 && depth > options.maxDepth) {
|
|
532
|
-
return false;
|
|
533
|
-
}
|
|
534
|
-
if (!keep({ key: entryPath, name: entryName, kind, depth, isEmpty }, tree, options.minDepth)) {
|
|
535
|
-
return false;
|
|
536
|
-
}
|
|
537
|
-
if (options.minSize != null || options.maxSize != null) {
|
|
538
|
-
const effective = kind === "f" ? size : 0;
|
|
539
|
-
if (options.minSize != null && effective < options.minSize) {
|
|
540
|
-
return false;
|
|
541
|
-
}
|
|
542
|
-
if (options.maxSize != null && effective > options.maxSize) {
|
|
543
|
-
return false;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
return true;
|
|
547
|
-
}
|
|
548
|
-
async function find(accessor, path, options = {}) {
|
|
549
|
-
const target = rawPathOf(path);
|
|
550
|
-
const pfx = stripSlash5(target);
|
|
551
|
-
const scanPath = pfx !== "" ? `${pfx}/` : "/";
|
|
552
|
-
const base = pfx !== "" ? `/${pfx}` : "/";
|
|
553
|
-
const baseDepth = base === "/" ? 0 : (base.match(/\//g) ?? []).length;
|
|
554
|
-
const startName = startBasename(path.virtual);
|
|
555
|
-
const empty = options.empty === true;
|
|
556
|
-
const op = await accessor.operator();
|
|
557
|
-
const results = [];
|
|
558
|
-
const seenDirs = /* @__PURE__ */ new Set();
|
|
559
|
-
let sawDescendant = false;
|
|
560
|
-
let dirExists = false;
|
|
561
|
-
const tree = options.tree ?? buildTree({
|
|
562
|
-
name: options.name,
|
|
563
|
-
iname: options.iname,
|
|
564
|
-
pathPattern: options.pathPattern,
|
|
565
|
-
type: options.type,
|
|
566
|
-
nameExclude: options.nameExclude,
|
|
567
|
-
orNames: options.orNames
|
|
568
|
-
});
|
|
569
|
-
let entries;
|
|
570
|
-
try {
|
|
571
|
-
entries = await op.list(scanPath, { recursive: true });
|
|
572
|
-
} catch (err) {
|
|
573
|
-
if (isNotFound(err)) return [];
|
|
574
|
-
throw err;
|
|
575
|
-
}
|
|
576
|
-
for (const entry of entries) {
|
|
577
|
-
const rel = entry.path();
|
|
578
|
-
if (rel === "") continue;
|
|
579
|
-
const meta = entry.metadata();
|
|
580
|
-
const isDir = rel.endsWith("/") || meta.isDirectory();
|
|
581
|
-
const entryPath = `/${stripSlash5(rel)}`;
|
|
582
|
-
if (entryPath === base) {
|
|
583
|
-
dirExists = true;
|
|
584
|
-
continue;
|
|
585
|
-
}
|
|
586
|
-
sawDescendant = true;
|
|
587
|
-
const kind = isDir ? "d" : "f";
|
|
588
|
-
const length = meta.contentLength;
|
|
589
|
-
const size = length !== null ? Number(length) : 0;
|
|
590
|
-
const fileEntries = [[entryPath, kind]];
|
|
591
|
-
if (!isDir) {
|
|
592
|
-
let parent = rstripSlash2(entryPath.slice(0, entryPath.lastIndexOf("/"))) || "/";
|
|
593
|
-
while (parent !== "" && parent !== base && parent !== "/") {
|
|
594
|
-
if (!seenDirs.has(parent)) {
|
|
595
|
-
seenDirs.add(parent);
|
|
596
|
-
fileEntries.push([parent, "d"]);
|
|
597
|
-
}
|
|
598
|
-
parent = parent.slice(0, parent.lastIndexOf("/")) || "/";
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
for (const [ep, k] of fileEntries) {
|
|
602
|
-
const isEmpty = !empty ? null : k === "d" ? false : size === 0;
|
|
603
|
-
if (matchesFilters(ep, k, size, isEmpty, baseDepth, options, tree)) {
|
|
604
|
-
results.push(ep);
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
if (sawDescendant || dirExists) {
|
|
609
|
-
emitStartPath(results, base, startName, {
|
|
610
|
-
kind: "d",
|
|
611
|
-
isEmpty: !sawDescendant,
|
|
612
|
-
exists: true,
|
|
613
|
-
tree,
|
|
614
|
-
maxDepth: options.maxDepth,
|
|
615
|
-
minDepth: options.minDepth,
|
|
616
|
-
minSize: options.minSize,
|
|
617
|
-
maxSize: options.maxSize
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
return [...new Set(results)].sort();
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
// src/commands/builtin/hf/find.ts
|
|
624
|
-
var HF_FIND = command2({
|
|
625
|
-
name: "find",
|
|
626
|
-
resource: [...HF_RESOURCES],
|
|
627
|
-
spec: specOf2("find"),
|
|
628
|
-
provision: metadataProvision,
|
|
629
|
-
fn: (accessor, paths, texts, opts) => findGeneric(paths, texts, opts, (root, options) => find(accessor, root, options))
|
|
630
|
-
});
|
|
631
|
-
|
|
632
637
|
// src/commands/builtin/hf/index.ts
|
|
633
|
-
var HF_OVERRIDES = /* @__PURE__ */ new Set(["cp", "mv", "
|
|
638
|
+
var HF_OVERRIDES = /* @__PURE__ */ new Set(["cp", "mv", "find"]);
|
|
634
639
|
var HF_COMMANDS = [
|
|
635
|
-
...HF_RESOURCES.flatMap(
|
|
636
|
-
(resource) => makeFiletypeCommands({
|
|
637
|
-
resource,
|
|
638
|
-
readBytes: read,
|
|
639
|
-
statEntry: stat
|
|
640
|
-
})
|
|
641
|
-
),
|
|
642
640
|
...HF_RESOURCES.flatMap(
|
|
643
641
|
(resource) => makeGenericCommands(resource, HF_IO, {
|
|
644
642
|
overrides: HF_OVERRIDES
|
|
645
643
|
})
|
|
646
644
|
),
|
|
647
|
-
...HF_DU,
|
|
648
645
|
...HF_FIND
|
|
649
646
|
];
|
|
650
647
|
|
|
651
648
|
// src/ops/hf/index.ts
|
|
652
649
|
import { makeGenericOps } from "@struktoai/mirage-core";
|
|
653
|
-
var HF_OPS = makeGenericOps(HF_RESOURCES, HF_IO, {
|
|
654
|
-
filetypeRead: [".feather", ".hdf5", ".parquet"]
|
|
655
|
-
});
|
|
650
|
+
var HF_OPS = makeGenericOps(HF_RESOURCES, HF_IO, {});
|
|
656
651
|
|
|
657
652
|
// src/resource/hf_buckets/base.ts
|
|
658
653
|
import {
|
|
@@ -665,6 +660,10 @@ import {
|
|
|
665
660
|
var globCore = makeResolveGlob(readdir, SCOPE_ERROR);
|
|
666
661
|
var HfResource = class extends BaseResource {
|
|
667
662
|
cachesReads = true;
|
|
663
|
+
// The Hub tree API reports each file's exact byte size (the LFS
|
|
664
|
+
// object size for LFS files); readdir backfills any lister-omitted
|
|
665
|
+
// size with one stat.
|
|
666
|
+
sizesAlwaysKnown = true;
|
|
668
667
|
supportsSnapshot = true;
|
|
669
668
|
opsMap = {
|
|
670
669
|
read_bytes: read,
|
|
@@ -672,8 +671,8 @@ var HfResource = class extends BaseResource {
|
|
|
672
671
|
stat,
|
|
673
672
|
read_stream: stream,
|
|
674
673
|
range_read: rangeRead,
|
|
675
|
-
|
|
676
|
-
|
|
674
|
+
du_size: size,
|
|
675
|
+
du_entries: entries,
|
|
677
676
|
exists,
|
|
678
677
|
find_flat: find,
|
|
679
678
|
write,
|
|
@@ -684,9 +683,6 @@ var HfResource = class extends BaseResource {
|
|
|
684
683
|
open() {
|
|
685
684
|
return Promise.resolve();
|
|
686
685
|
}
|
|
687
|
-
close() {
|
|
688
|
-
return Promise.resolve();
|
|
689
|
-
}
|
|
690
686
|
commands() {
|
|
691
687
|
return HF_COMMANDS;
|
|
692
688
|
}
|
|
@@ -718,7 +714,7 @@ var HfResource = class extends BaseResource {
|
|
|
718
714
|
return unlink(this.accessor, p, this.index);
|
|
719
715
|
}
|
|
720
716
|
du(p) {
|
|
721
|
-
return
|
|
717
|
+
return size(this.accessor, p);
|
|
722
718
|
}
|
|
723
719
|
find(p, options = {}) {
|
|
724
720
|
return find(this.accessor, p, options);
|
|
@@ -751,4 +747,4 @@ export {
|
|
|
751
747
|
HF_OPS,
|
|
752
748
|
HfResource
|
|
753
749
|
};
|
|
754
|
-
//# sourceMappingURL=chunk-
|
|
750
|
+
//# sourceMappingURL=chunk-DDAFNROK.js.map
|