@struktoai/mirage-node 0.0.4 → 0.0.5-alpha.1
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-FRGTDZQT.js → chunk-H64SB6VO.js} +19 -5
- package/dist/chunk-H64SB6VO.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-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-L5CMN2EE.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-L5CMN2EE.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
redactNextcloudConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RYQJJB4C.js";
|
|
4
4
|
import {
|
|
5
5
|
loadOptionalPeer
|
|
6
6
|
} from "./chunk-OQKNDS66.js";
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
BaseResource,
|
|
11
11
|
makeResolveGlob,
|
|
12
12
|
mountKey,
|
|
13
|
-
mountPrefixOf as
|
|
13
|
+
mountPrefixOf as mountPrefixOf5,
|
|
14
14
|
PathSpec,
|
|
15
|
-
ResourceName as
|
|
15
|
+
ResourceName as ResourceName8
|
|
16
16
|
} from "@struktoai/mirage-core";
|
|
17
17
|
|
|
18
18
|
// src/accessor/nextcloud.ts
|
|
@@ -42,18 +42,17 @@ var NextcloudAccessor = class extends Accessor {
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
// src/commands/builtin/nextcloud/index.ts
|
|
45
|
-
import {
|
|
46
|
-
makeFiletypeCommands,
|
|
47
|
-
makeGenericCommands,
|
|
48
|
-
ResourceName as ResourceName5
|
|
49
|
-
} from "@struktoai/mirage-core";
|
|
45
|
+
import { makeGenericCommands, ResourceName as ResourceName6 } from "@struktoai/mirage-core";
|
|
50
46
|
|
|
51
|
-
// src/
|
|
52
|
-
import {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
// src/commands/builtin/nextcloud/io.ts
|
|
48
|
+
import { rangeOf } from "@struktoai/mirage-core";
|
|
49
|
+
|
|
50
|
+
// src/core/nextcloud/constants.ts
|
|
51
|
+
var SCOPE_ERROR = 5e3;
|
|
52
|
+
var DEFAULT_CHUNK_SIZE = 8192;
|
|
53
|
+
|
|
54
|
+
// src/core/nextcloud/copy.ts
|
|
55
|
+
import { enoent, invalidateAfterWrite } from "@struktoai/mirage-core";
|
|
57
56
|
|
|
58
57
|
// src/core/nextcloud/util.ts
|
|
59
58
|
import { lstripSlash, mountPrefixOf } from "@struktoai/mirage-core";
|
|
@@ -68,32 +67,52 @@ function isNotFound(error) {
|
|
|
68
67
|
return error instanceof Error && error.message.startsWith("NotFound");
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
// src/core/nextcloud/
|
|
72
|
-
async function
|
|
70
|
+
// src/core/nextcloud/copy.ts
|
|
71
|
+
async function copy(accessor, source, destination) {
|
|
73
72
|
const op = await accessor.operator();
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
readOptions.offset ??= 0n;
|
|
80
|
-
readOptions.size = BigInt(options.size);
|
|
73
|
+
try {
|
|
74
|
+
await op.copy(nextcloudKey(source), nextcloudKey(destination));
|
|
75
|
+
} catch (error) {
|
|
76
|
+
if (isNotFound(error)) throw enoent(source);
|
|
77
|
+
throw error;
|
|
81
78
|
}
|
|
79
|
+
await invalidateAfterWrite(destination);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// src/core/nextcloud/write.ts
|
|
83
|
+
import {
|
|
84
|
+
enoent as enoent2,
|
|
85
|
+
invalidateAfterWrite as invalidateAfterWrite2,
|
|
86
|
+
record,
|
|
87
|
+
ResourceName as ResourceName2
|
|
88
|
+
} from "@struktoai/mirage-core";
|
|
89
|
+
async function write(accessor, path, data, _index) {
|
|
82
90
|
const startMs = performance.now();
|
|
83
91
|
try {
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
record("read", path.virtual, ResourceName2.NEXTCLOUD, bytes.byteLength, startMs);
|
|
87
|
-
return bytes;
|
|
92
|
+
const op = await accessor.operator();
|
|
93
|
+
await op.write(nextcloudKey(path), Buffer.from(data));
|
|
88
94
|
} catch (error) {
|
|
89
|
-
if (isNotFound(error)) throw
|
|
95
|
+
if (isNotFound(error)) throw enoent2(path);
|
|
90
96
|
throw error;
|
|
91
97
|
}
|
|
98
|
+
record("write", path.virtual, ResourceName2.NEXTCLOUD, data.byteLength, startMs);
|
|
99
|
+
await invalidateAfterWrite2(path);
|
|
92
100
|
}
|
|
93
101
|
|
|
102
|
+
// src/core/nextcloud/create.ts
|
|
103
|
+
function create(accessor, path, index) {
|
|
104
|
+
return write(accessor, path, new Uint8Array(), index);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/core/nextcloud/du/entries.ts
|
|
108
|
+
import { FileType as FileType2, lstripSlash as lstripSlash2, stripSlash as stripSlash2 } from "@struktoai/mirage-core";
|
|
109
|
+
|
|
110
|
+
// src/core/nextcloud/du/walk.ts
|
|
111
|
+
import "@struktoai/mirage-core";
|
|
112
|
+
|
|
94
113
|
// src/core/nextcloud/stat.ts
|
|
95
114
|
import {
|
|
96
|
-
enoent as
|
|
115
|
+
enoent as enoent3,
|
|
97
116
|
FileStat,
|
|
98
117
|
FileType,
|
|
99
118
|
guessType,
|
|
@@ -127,7 +146,7 @@ async function stat(accessor, path, index) {
|
|
|
127
146
|
}
|
|
128
147
|
const parent = virtualKey.slice(0, virtualKey.lastIndexOf("/")) || "/";
|
|
129
148
|
const listing = await index.listDir(parent);
|
|
130
|
-
if (listing.entries !== void 0 && listing.entries !== null) throw
|
|
149
|
+
if (listing.entries !== void 0 && listing.entries !== null) throw enoent3(path);
|
|
131
150
|
}
|
|
132
151
|
const op = await accessor.operator();
|
|
133
152
|
let metadata = null;
|
|
@@ -149,7 +168,7 @@ async function stat(accessor, path, index) {
|
|
|
149
168
|
} catch (error) {
|
|
150
169
|
if (!isNotFound(error)) throw error;
|
|
151
170
|
}
|
|
152
|
-
throw
|
|
171
|
+
throw enoent3(path);
|
|
153
172
|
}
|
|
154
173
|
function fileStat(key, raw, metadata) {
|
|
155
174
|
const etag = metadata.etag;
|
|
@@ -163,54 +182,7 @@ function fileStat(key, raw, metadata) {
|
|
|
163
182
|
});
|
|
164
183
|
}
|
|
165
184
|
|
|
166
|
-
// src/core/nextcloud/
|
|
167
|
-
var SCOPE_ERROR = 5e3;
|
|
168
|
-
var DEFAULT_CHUNK_SIZE = 8192;
|
|
169
|
-
|
|
170
|
-
// src/core/nextcloud/copy.ts
|
|
171
|
-
import { enoent as enoent3, invalidateAfterWrite } from "@struktoai/mirage-core";
|
|
172
|
-
async function copy(accessor, source, destination) {
|
|
173
|
-
const op = await accessor.operator();
|
|
174
|
-
try {
|
|
175
|
-
await op.copy(nextcloudKey(source), nextcloudKey(destination));
|
|
176
|
-
} catch (error) {
|
|
177
|
-
if (isNotFound(error)) throw enoent3(source);
|
|
178
|
-
throw error;
|
|
179
|
-
}
|
|
180
|
-
await invalidateAfterWrite(destination);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// src/core/nextcloud/write.ts
|
|
184
|
-
import {
|
|
185
|
-
enoent as enoent4,
|
|
186
|
-
invalidateAfterWrite as invalidateAfterWrite2,
|
|
187
|
-
record as record2,
|
|
188
|
-
ResourceName as ResourceName3
|
|
189
|
-
} from "@struktoai/mirage-core";
|
|
190
|
-
async function write(accessor, path, data, _index) {
|
|
191
|
-
const startMs = performance.now();
|
|
192
|
-
try {
|
|
193
|
-
const op = await accessor.operator();
|
|
194
|
-
await op.write(nextcloudKey(path), Buffer.from(data));
|
|
195
|
-
} catch (error) {
|
|
196
|
-
if (isNotFound(error)) throw enoent4(path);
|
|
197
|
-
throw error;
|
|
198
|
-
}
|
|
199
|
-
record2("write", path.virtual, ResourceName3.NEXTCLOUD, data.byteLength, startMs);
|
|
200
|
-
await invalidateAfterWrite2(path);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// src/core/nextcloud/create.ts
|
|
204
|
-
function create(accessor, path, index) {
|
|
205
|
-
return write(accessor, path, new Uint8Array(), index);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// src/core/nextcloud/du.ts
|
|
209
|
-
import {
|
|
210
|
-
FileType as FileType2,
|
|
211
|
-
lstripSlash as lstripSlash2,
|
|
212
|
-
stripSlash as stripSlash2
|
|
213
|
-
} from "@struktoai/mirage-core";
|
|
185
|
+
// src/core/nextcloud/du/walk.ts
|
|
214
186
|
async function statOrNull(accessor, path) {
|
|
215
187
|
try {
|
|
216
188
|
return await stat(accessor, path);
|
|
@@ -219,48 +191,53 @@ async function statOrNull(accessor, path) {
|
|
|
219
191
|
throw error;
|
|
220
192
|
}
|
|
221
193
|
}
|
|
222
|
-
|
|
194
|
+
|
|
195
|
+
// src/core/nextcloud/du/entries.ts
|
|
196
|
+
import { compareCodePoints } from "@struktoai/mirage-core";
|
|
197
|
+
async function entries(accessor, path) {
|
|
223
198
|
const info = await statOrNull(accessor, path);
|
|
224
|
-
if (info !== null && info.type !== FileType2.DIRECTORY) return info.size ?? 0;
|
|
199
|
+
if (info !== null && info.type !== FileType2.DIRECTORY) return [[], info.size ?? 0];
|
|
225
200
|
const prefix = stripSlash2(rawPathOf(path));
|
|
226
201
|
const scanPath = prefix !== "" ? `${prefix}/` : "/";
|
|
227
202
|
const op = await accessor.operator();
|
|
203
|
+
const found = [];
|
|
228
204
|
let total = 0;
|
|
229
205
|
try {
|
|
230
206
|
for (const entry of await op.list(scanPath, { recursive: true })) {
|
|
207
|
+
const key = entry.path();
|
|
231
208
|
const metadata = entry.metadata();
|
|
232
|
-
if (
|
|
233
|
-
|
|
209
|
+
if (key === "" || key.endsWith("/") || metadata.isDirectory()) continue;
|
|
210
|
+
const size2 = metadata.contentLength !== null ? Number(metadata.contentLength) : 0;
|
|
211
|
+
found.push([`/${lstripSlash2(key)}`, size2]);
|
|
212
|
+
total += size2;
|
|
234
213
|
}
|
|
235
214
|
} catch (error) {
|
|
236
|
-
if (isNotFound(error))
|
|
237
|
-
throw error;
|
|
215
|
+
if (!isNotFound(error)) throw error;
|
|
238
216
|
}
|
|
239
|
-
|
|
217
|
+
found.sort(([left], [right]) => compareCodePoints(left, right));
|
|
218
|
+
return [found, total];
|
|
240
219
|
}
|
|
241
|
-
|
|
220
|
+
|
|
221
|
+
// src/core/nextcloud/du/size.ts
|
|
222
|
+
import { FileType as FileType3, stripSlash as stripSlash3 } from "@struktoai/mirage-core";
|
|
223
|
+
async function size(accessor, path) {
|
|
242
224
|
const info = await statOrNull(accessor, path);
|
|
243
|
-
if (info !== null && info.type !==
|
|
244
|
-
const
|
|
245
|
-
const prefix = stripSlash2(raw);
|
|
225
|
+
if (info !== null && info.type !== FileType3.DIRECTORY) return info.size ?? 0;
|
|
226
|
+
const prefix = stripSlash3(rawPathOf(path));
|
|
246
227
|
const scanPath = prefix !== "" ? `${prefix}/` : "/";
|
|
247
228
|
const op = await accessor.operator();
|
|
248
|
-
const entries = [];
|
|
249
229
|
let total = 0;
|
|
250
230
|
try {
|
|
251
231
|
for (const entry of await op.list(scanPath, { recursive: true })) {
|
|
252
|
-
const key = entry.path();
|
|
253
232
|
const metadata = entry.metadata();
|
|
254
|
-
if (
|
|
255
|
-
|
|
256
|
-
entries.push([`/${lstripSlash2(key)}`, size]);
|
|
257
|
-
total += size;
|
|
233
|
+
if (entry.path().endsWith("/") || metadata.isDirectory()) continue;
|
|
234
|
+
total += metadata.contentLength !== null ? Number(metadata.contentLength) : 0;
|
|
258
235
|
}
|
|
259
236
|
} catch (error) {
|
|
260
|
-
if (
|
|
237
|
+
if (isNotFound(error)) return 0;
|
|
238
|
+
throw error;
|
|
261
239
|
}
|
|
262
|
-
|
|
263
|
-
return [entries, total];
|
|
240
|
+
return total;
|
|
264
241
|
}
|
|
265
242
|
|
|
266
243
|
// src/core/nextcloud/exists.ts
|
|
@@ -280,8 +257,9 @@ import {
|
|
|
280
257
|
optionsTree,
|
|
281
258
|
rstripSlash as rstripSlash3,
|
|
282
259
|
startBasename,
|
|
283
|
-
stripSlash as
|
|
284
|
-
treeHasEmpty
|
|
260
|
+
stripSlash as stripSlash5,
|
|
261
|
+
treeHasEmpty,
|
|
262
|
+
compareCodePoints as compareCodePoints2
|
|
285
263
|
} from "@struktoai/mirage-core";
|
|
286
264
|
|
|
287
265
|
// src/core/nextcloud/search/types.ts
|
|
@@ -340,7 +318,7 @@ var SEARCH_HEADERS = {
|
|
|
340
318
|
var UNAVAILABLE_STATUS_CODES = /* @__PURE__ */ new Set([404, 405, 501]);
|
|
341
319
|
|
|
342
320
|
// src/core/nextcloud/search/target.ts
|
|
343
|
-
import { rstripSlash, stripSlash as
|
|
321
|
+
import { rstripSlash, stripSlash as stripSlash4 } from "@struktoai/mirage-core";
|
|
344
322
|
function decodePath(path) {
|
|
345
323
|
try {
|
|
346
324
|
return decodeURIComponent(path);
|
|
@@ -353,7 +331,7 @@ function searchTarget(url) {
|
|
|
353
331
|
const marker = parsed.pathname.indexOf(SEARCH_ENDPOINT_PATH);
|
|
354
332
|
if (marker < 0) return null;
|
|
355
333
|
const davEnd = marker + SEARCH_ENDPOINT_PATH.length;
|
|
356
|
-
const relative =
|
|
334
|
+
const relative = stripSlash4(parsed.pathname.slice(davEnd));
|
|
357
335
|
const parts = relative === "" ? [] : relative.split("/");
|
|
358
336
|
if (parts.length < 2 || parts[0] !== "files") return null;
|
|
359
337
|
const endpoint = new URL(parsed.toString());
|
|
@@ -366,7 +344,7 @@ function searchTarget(url) {
|
|
|
366
344
|
};
|
|
367
345
|
}
|
|
368
346
|
function scopePath(target, path) {
|
|
369
|
-
const relative =
|
|
347
|
+
const relative = stripSlash4(rawPathOf(path));
|
|
370
348
|
return relative === "" ? target.resourceScope : `${rstripSlash(target.resourceScope)}/${relative}`;
|
|
371
349
|
}
|
|
372
350
|
function stripScope(path, scope) {
|
|
@@ -422,29 +400,40 @@ function globToLike(pattern) {
|
|
|
422
400
|
}
|
|
423
401
|
return translated;
|
|
424
402
|
}
|
|
425
|
-
function
|
|
403
|
+
function nameOperation(node) {
|
|
426
404
|
const wildcard = node.pattern.includes("*") || node.pattern.includes("?");
|
|
427
|
-
|
|
405
|
+
return wildcard || node.icase ? Comparison.LIKE : Comparison.EQUAL;
|
|
406
|
+
}
|
|
407
|
+
function nameCondition(node) {
|
|
408
|
+
const operation = nameOperation(node);
|
|
428
409
|
const value = operation === Comparison.LIKE ? globToLike(node.pattern) : node.pattern;
|
|
429
410
|
return comparison(operation, DISPLAY_NAME, value);
|
|
430
411
|
}
|
|
431
412
|
function compilePredicate(node) {
|
|
432
413
|
switch (node.op) {
|
|
433
414
|
case "true":
|
|
434
|
-
return { condition: null };
|
|
435
|
-
case "name":
|
|
436
|
-
|
|
415
|
+
return { condition: null, negatable: false };
|
|
416
|
+
case "name": {
|
|
417
|
+
if (node.pattern.includes("[") || node.pattern.includes("\\")) return null;
|
|
418
|
+
return {
|
|
419
|
+
condition: nameCondition(node),
|
|
420
|
+
negatable: nameOperation(node) === Comparison.EQUAL
|
|
421
|
+
};
|
|
422
|
+
}
|
|
437
423
|
case "type":
|
|
438
|
-
if (node.kind === "d") return { condition: isCollection() };
|
|
439
|
-
if (node.kind === "f") return { condition: negate(isCollection()) };
|
|
424
|
+
if (node.kind === "d") return { condition: isCollection(), negatable: true };
|
|
425
|
+
if (node.kind === "f") return { condition: negate(isCollection()), negatable: false };
|
|
440
426
|
return null;
|
|
441
427
|
case "not": {
|
|
442
428
|
const compiled = compilePredicate(node.kid);
|
|
443
|
-
|
|
429
|
+
if (compiled?.condition == null) return null;
|
|
430
|
+
if (!compiled.negatable) return null;
|
|
431
|
+
return { condition: negate(compiled.condition), negatable: false };
|
|
444
432
|
}
|
|
445
433
|
case "and":
|
|
446
434
|
case "or": {
|
|
447
435
|
const conditions = [];
|
|
436
|
+
let negatable = false;
|
|
448
437
|
for (const kid of node.kids) {
|
|
449
438
|
const compiled = compilePredicate(kid);
|
|
450
439
|
if (compiled === null) return null;
|
|
@@ -453,10 +442,15 @@ function compilePredicate(node) {
|
|
|
453
442
|
continue;
|
|
454
443
|
}
|
|
455
444
|
conditions.push(compiled.condition);
|
|
445
|
+
negatable = compiled.negatable;
|
|
456
446
|
}
|
|
457
|
-
if (conditions.length === 0)
|
|
447
|
+
if (conditions.length === 0)
|
|
448
|
+
return node.op === "and" ? { condition: null, negatable: false } : null;
|
|
458
449
|
const operation = node.op === "and" ? BooleanOperation.AND : BooleanOperation.OR;
|
|
459
|
-
return {
|
|
450
|
+
return {
|
|
451
|
+
condition: combine(operation, conditions),
|
|
452
|
+
negatable: conditions.length === 1 && negatable
|
|
453
|
+
};
|
|
460
454
|
}
|
|
461
455
|
case "path":
|
|
462
456
|
case "empty":
|
|
@@ -464,22 +458,22 @@ function compilePredicate(node) {
|
|
|
464
458
|
}
|
|
465
459
|
}
|
|
466
460
|
function sizeCondition(query) {
|
|
467
|
-
const
|
|
468
|
-
if (
|
|
461
|
+
const size2 = query.size;
|
|
462
|
+
if (size2 === void 0) return null;
|
|
469
463
|
const conditions = [];
|
|
470
|
-
if (
|
|
471
|
-
conditions.push(comparison(Comparison.EQUAL, SIZE,
|
|
464
|
+
if (size2.lower !== null && size2.lower === size2.upper) {
|
|
465
|
+
conditions.push(comparison(Comparison.EQUAL, SIZE, size2.lower));
|
|
472
466
|
} else {
|
|
473
|
-
if (
|
|
474
|
-
conditions.push(comparison(Comparison.GREATER_THAN_OR_EQUAL, SIZE,
|
|
467
|
+
if (size2.lower !== null) {
|
|
468
|
+
conditions.push(comparison(Comparison.GREATER_THAN_OR_EQUAL, SIZE, size2.lower));
|
|
475
469
|
}
|
|
476
|
-
if (
|
|
477
|
-
conditions.push(comparison(Comparison.LESS_THAN_OR_EQUAL, SIZE,
|
|
470
|
+
if (size2.upper !== null) {
|
|
471
|
+
conditions.push(comparison(Comparison.LESS_THAN_OR_EQUAL, SIZE, size2.upper));
|
|
478
472
|
}
|
|
479
473
|
}
|
|
480
474
|
if (conditions.length === 0) return null;
|
|
481
475
|
const fileBounds = combine(BooleanOperation.AND, [negate(isCollection()), ...conditions]);
|
|
482
|
-
const includesZero = (
|
|
476
|
+
const includesZero = (size2.lower === null || size2.lower <= 0) && (size2.upper === null || size2.upper >= 0);
|
|
483
477
|
return includesZero ? combine(BooleanOperation.OR, [isCollection(), fileBounds]) : fileBounds;
|
|
484
478
|
}
|
|
485
479
|
function whereCondition(query) {
|
|
@@ -487,8 +481,8 @@ function whereCondition(query) {
|
|
|
487
481
|
if (compiled === null) return null;
|
|
488
482
|
const conditions = [];
|
|
489
483
|
if (compiled.condition !== null) conditions.push(compiled.condition);
|
|
490
|
-
const
|
|
491
|
-
if (
|
|
484
|
+
const size2 = sizeCondition(query);
|
|
485
|
+
if (size2 !== null) conditions.push(size2);
|
|
492
486
|
if (query.modified?.lower != null) {
|
|
493
487
|
conditions.push(
|
|
494
488
|
comparison(Comparison.GREATER_THAN_OR_EQUAL, LAST_MODIFIED, Math.floor(query.modified.lower))
|
|
@@ -572,9 +566,9 @@ function modifiedTimestamp(value) {
|
|
|
572
566
|
function entrySize(properties) {
|
|
573
567
|
const value = findText(properties, SIZE) ?? findText(properties, CONTENT_LENGTH);
|
|
574
568
|
if (value === null) return null;
|
|
575
|
-
const
|
|
576
|
-
if (!Number.isInteger(
|
|
577
|
-
return
|
|
569
|
+
const size2 = Number(value);
|
|
570
|
+
if (!Number.isInteger(size2)) throw new Error(`invalid Nextcloud Files Search size: ${value}`);
|
|
571
|
+
return size2;
|
|
578
572
|
}
|
|
579
573
|
function parseResponse(response, target) {
|
|
580
574
|
const href = stringValue(response.href);
|
|
@@ -623,7 +617,7 @@ async function searchFiles(accessor, path, query) {
|
|
|
623
617
|
const headers = { ...SEARCH_HEADERS };
|
|
624
618
|
const auth = authorization(accessor);
|
|
625
619
|
if (auth !== null) headers.Authorization = auth;
|
|
626
|
-
const
|
|
620
|
+
const entries2 = /* @__PURE__ */ new Map();
|
|
627
621
|
let offset = 0;
|
|
628
622
|
for (; ; ) {
|
|
629
623
|
const response = await fetch(target.endpoint, {
|
|
@@ -642,18 +636,18 @@ async function searchFiles(accessor, path, query) {
|
|
|
642
636
|
);
|
|
643
637
|
}
|
|
644
638
|
const page = parsePage(await response.text(), target);
|
|
645
|
-
const previousSize =
|
|
646
|
-
for (const entry of page) if (!
|
|
647
|
-
if (page.length > 0 &&
|
|
639
|
+
const previousSize = entries2.size;
|
|
640
|
+
for (const entry of page) if (!entries2.has(entry.key)) entries2.set(entry.key, entry);
|
|
641
|
+
if (page.length > 0 && entries2.size === previousSize) return null;
|
|
648
642
|
if (page.length < SEARCH_PAGE_SIZE) break;
|
|
649
643
|
offset += page.length;
|
|
650
644
|
}
|
|
651
|
-
return [...
|
|
645
|
+
return [...entries2.values()];
|
|
652
646
|
}
|
|
653
647
|
|
|
654
648
|
// src/core/nextcloud/find.ts
|
|
655
649
|
function findScope(path) {
|
|
656
|
-
const relative =
|
|
650
|
+
const relative = stripSlash5(rawPathOf(path));
|
|
657
651
|
return {
|
|
658
652
|
baseKey: relative !== "" ? `/${relative}` : "/",
|
|
659
653
|
scanKey: relative !== "" ? `${relative}/` : "/",
|
|
@@ -714,7 +708,7 @@ async function statCandidate(accessor, key, name) {
|
|
|
714
708
|
return { key, name, kind: "d", size: 0, modified: null, isEmpty: null };
|
|
715
709
|
}
|
|
716
710
|
const op = await accessor.operator();
|
|
717
|
-
const relative =
|
|
711
|
+
const relative = stripSlash5(key);
|
|
718
712
|
let metadata;
|
|
719
713
|
try {
|
|
720
714
|
metadata = await op.stat(relative);
|
|
@@ -744,8 +738,8 @@ function matches(candidate, scope, criteria) {
|
|
|
744
738
|
};
|
|
745
739
|
if (!keep(entry, criteria.predicate, criteria.minDepth)) return false;
|
|
746
740
|
if (constrained(criteria.size)) {
|
|
747
|
-
const
|
|
748
|
-
if (!contains(criteria.size,
|
|
741
|
+
const size2 = candidate.kind === "d" ? 0 : candidate.size ?? 0;
|
|
742
|
+
if (!contains(criteria.size, size2)) return false;
|
|
749
743
|
}
|
|
750
744
|
if (constrained(criteria.modified)) {
|
|
751
745
|
if (candidate.modified === null || !contains(criteria.modified, candidate.modified))
|
|
@@ -754,7 +748,7 @@ function matches(candidate, scope, criteria) {
|
|
|
754
748
|
return true;
|
|
755
749
|
}
|
|
756
750
|
function matchingKeys(candidates, scope, criteria) {
|
|
757
|
-
return [...candidates.values()].filter((candidate) => matches(candidate, scope, criteria)).map((candidate) => candidate.key).sort();
|
|
751
|
+
return [...candidates.values()].filter((candidate) => matches(candidate, scope, criteria)).map((candidate) => candidate.key).sort(compareCodePoints2);
|
|
758
752
|
}
|
|
759
753
|
function searchQuery(criteria) {
|
|
760
754
|
return {
|
|
@@ -785,7 +779,7 @@ async function findWithSearch(accessor, path, scope, criteria) {
|
|
|
785
779
|
return matchingKeys(candidates, scope, criteria);
|
|
786
780
|
}
|
|
787
781
|
function scanKey(rawKey) {
|
|
788
|
-
return `/${
|
|
782
|
+
return `/${stripSlash5(rawKey)}`;
|
|
789
783
|
}
|
|
790
784
|
function directoryCandidate(key) {
|
|
791
785
|
return { key, name: basename(key), kind: "d", size: 0, modified: null, isEmpty: null };
|
|
@@ -794,14 +788,14 @@ async function collectScanCandidates(accessor, scope) {
|
|
|
794
788
|
const candidates = /* @__PURE__ */ new Map();
|
|
795
789
|
const nonemptyDirectories = /* @__PURE__ */ new Set();
|
|
796
790
|
const op = await accessor.operator();
|
|
797
|
-
let
|
|
791
|
+
let entries2;
|
|
798
792
|
try {
|
|
799
|
-
|
|
793
|
+
entries2 = await op.list(scope.scanKey, { recursive: true });
|
|
800
794
|
} catch (error) {
|
|
801
795
|
if (isNotFound(error)) return { candidates, nonemptyDirectories };
|
|
802
796
|
throw error;
|
|
803
797
|
}
|
|
804
|
-
for (const entry of
|
|
798
|
+
for (const entry of entries2) {
|
|
805
799
|
const rawKey = entry.path();
|
|
806
800
|
if (rawKey === "") continue;
|
|
807
801
|
const key = scanKey(rawKey);
|
|
@@ -862,6 +856,34 @@ async function mkdir(accessor, path, parents = false) {
|
|
|
862
856
|
if (parents) await invalidateAncestors(path);
|
|
863
857
|
}
|
|
864
858
|
|
|
859
|
+
// src/core/nextcloud/read.ts
|
|
860
|
+
import {
|
|
861
|
+
enoent as enoent4,
|
|
862
|
+
record as record2,
|
|
863
|
+
ResourceName as ResourceName3
|
|
864
|
+
} from "@struktoai/mirage-core";
|
|
865
|
+
async function read(accessor, path, _index, options = {}) {
|
|
866
|
+
const op = await accessor.operator();
|
|
867
|
+
const readOptions = {};
|
|
868
|
+
if (options.offset !== void 0 && options.offset > 0) {
|
|
869
|
+
readOptions.offset = BigInt(options.offset);
|
|
870
|
+
}
|
|
871
|
+
if (options.size !== void 0) {
|
|
872
|
+
readOptions.offset ??= 0n;
|
|
873
|
+
readOptions.size = BigInt(options.size);
|
|
874
|
+
}
|
|
875
|
+
const startMs = performance.now();
|
|
876
|
+
try {
|
|
877
|
+
const data = readOptions.offset !== void 0 || readOptions.size !== void 0 ? await op.read(nextcloudKey(path), readOptions) : await op.read(nextcloudKey(path));
|
|
878
|
+
const bytes = new Uint8Array(data);
|
|
879
|
+
record2("read", path.virtual, ResourceName3.NEXTCLOUD, bytes.byteLength, startMs);
|
|
880
|
+
return bytes;
|
|
881
|
+
} catch (error) {
|
|
882
|
+
if (isNotFound(error)) throw enoent4(path);
|
|
883
|
+
throw error;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
|
|
865
887
|
// src/core/nextcloud/readdir.ts
|
|
866
888
|
import {
|
|
867
889
|
enotdir,
|
|
@@ -870,7 +892,8 @@ import {
|
|
|
870
892
|
mountPrefixOf as mountPrefixOf3,
|
|
871
893
|
ResourceType as ResourceType2,
|
|
872
894
|
rstripSlash as rstripSlash5,
|
|
873
|
-
stripSlash as
|
|
895
|
+
stripSlash as stripSlash6,
|
|
896
|
+
compareCodePoints as compareCodePoints3
|
|
874
897
|
} from "@struktoai/mirage-core";
|
|
875
898
|
async function readdir(accessor, path, index) {
|
|
876
899
|
const prefix = mountPrefixOf3(path.virtual, path.resourcePath);
|
|
@@ -884,12 +907,12 @@ async function readdir(accessor, path, index) {
|
|
|
884
907
|
const listing = await index.listDir(virtualKey);
|
|
885
908
|
if (listing.entries !== void 0 && listing.entries !== null) return listing.entries;
|
|
886
909
|
}
|
|
887
|
-
const stripped =
|
|
910
|
+
const stripped = stripSlash6(target);
|
|
888
911
|
const listPath = stripped !== "" ? `${stripped}/` : "/";
|
|
889
912
|
const op = await accessor.operator();
|
|
890
|
-
let
|
|
913
|
+
let entries2;
|
|
891
914
|
try {
|
|
892
|
-
|
|
915
|
+
entries2 = await op.list(listPath);
|
|
893
916
|
} catch (error) {
|
|
894
917
|
if (isNotFound(error)) throw enoent5(path);
|
|
895
918
|
throw error;
|
|
@@ -897,7 +920,7 @@ async function readdir(accessor, path, index) {
|
|
|
897
920
|
const names = [];
|
|
898
921
|
const directories = /* @__PURE__ */ new Set();
|
|
899
922
|
const metadata = /* @__PURE__ */ new Map();
|
|
900
|
-
for (const entry of
|
|
923
|
+
for (const entry of entries2) {
|
|
901
924
|
const relative = entry.path();
|
|
902
925
|
if (relative === "" || relative === listPath) continue;
|
|
903
926
|
const info = entry.metadata();
|
|
@@ -910,11 +933,17 @@ async function readdir(accessor, path, index) {
|
|
|
910
933
|
modified: info.lastModified ?? ""
|
|
911
934
|
});
|
|
912
935
|
}
|
|
913
|
-
const
|
|
936
|
+
for (const [key, info] of metadata) {
|
|
937
|
+
if (directories.has(key) || info.size !== null) continue;
|
|
938
|
+
const md = await op.stat(stripSlash6(key));
|
|
939
|
+
info.size = md.contentLength !== null ? Number(md.contentLength) : null;
|
|
940
|
+
if (info.modified === "" && md.lastModified !== null) info.modified = md.lastModified;
|
|
941
|
+
}
|
|
942
|
+
const targetKey = `/${stripSlash6(target)}`;
|
|
914
943
|
if (names.length === 1 && names[0] === targetKey && !directories.has(targetKey)) {
|
|
915
944
|
throw enotdir(path);
|
|
916
945
|
}
|
|
917
|
-
names.sort();
|
|
946
|
+
names.sort(compareCodePoints3);
|
|
918
947
|
if (names.length > SCOPE_ERROR) {
|
|
919
948
|
console.warn(
|
|
920
949
|
`nextcloud readdir: ${virtualKey} returned ${String(names.length)} entries (limit ${String(SCOPE_ERROR)})`
|
|
@@ -939,7 +968,7 @@ async function readdir(accessor, path, index) {
|
|
|
939
968
|
})
|
|
940
969
|
);
|
|
941
970
|
}
|
|
942
|
-
return names.map((key) => prefix !== "" ? `${prefix}${key}` : key).sort();
|
|
971
|
+
return names.map((key) => prefix !== "" ? `${prefix}${key}` : key).sort(compareCodePoints3);
|
|
943
972
|
}
|
|
944
973
|
|
|
945
974
|
// src/core/nextcloud/rename.ts
|
|
@@ -1005,17 +1034,18 @@ async function* stream(accessor, path, _index, chunkSize = DEFAULT_CHUNK_SIZE) {
|
|
|
1005
1034
|
}
|
|
1006
1035
|
const buffer = Buffer.alloc(chunkSize);
|
|
1007
1036
|
for (; ; ) {
|
|
1008
|
-
const
|
|
1009
|
-
if (
|
|
1010
|
-
const chunk = new Uint8Array(buffer.subarray(0,
|
|
1037
|
+
const size2 = Number(await reader.read(buffer));
|
|
1038
|
+
if (size2 <= 0) break;
|
|
1039
|
+
const chunk = new Uint8Array(buffer.subarray(0, size2));
|
|
1011
1040
|
if (rec !== null) rec.bytes += chunk.byteLength;
|
|
1012
1041
|
yield chunk;
|
|
1013
1042
|
}
|
|
1014
1043
|
}
|
|
1015
1044
|
|
|
1016
1045
|
// src/core/nextcloud/truncate.ts
|
|
1017
|
-
import { invalidateAfterWrite as invalidateAfterWrite5 } from "@struktoai/mirage-core";
|
|
1046
|
+
import { ResourceName as ResourceName4, invalidateAfterWrite as invalidateAfterWrite5, record as record3 } from "@struktoai/mirage-core";
|
|
1018
1047
|
async function truncate(accessor, path, length) {
|
|
1048
|
+
const start = performance.now();
|
|
1019
1049
|
const op = await accessor.operator();
|
|
1020
1050
|
const key = nextcloudKey(path);
|
|
1021
1051
|
let current;
|
|
@@ -1028,6 +1058,7 @@ async function truncate(accessor, path, length) {
|
|
|
1028
1058
|
const next = Buffer.alloc(length);
|
|
1029
1059
|
current.copy(next, 0, 0, Math.min(current.byteLength, length));
|
|
1030
1060
|
await op.write(key, next);
|
|
1061
|
+
record3("truncate", path.virtual, ResourceName4.NEXTCLOUD, 0, start);
|
|
1031
1062
|
await invalidateAfterWrite5(path);
|
|
1032
1063
|
}
|
|
1033
1064
|
|
|
@@ -1035,8 +1066,8 @@ async function truncate(accessor, path, length) {
|
|
|
1035
1066
|
import {
|
|
1036
1067
|
enoent as enoent10,
|
|
1037
1068
|
invalidateAfterUnlink as invalidateAfterUnlink4,
|
|
1038
|
-
record as
|
|
1039
|
-
ResourceName as
|
|
1069
|
+
record as record4,
|
|
1070
|
+
ResourceName as ResourceName5
|
|
1040
1071
|
} from "@struktoai/mirage-core";
|
|
1041
1072
|
async function unlink(accessor, path) {
|
|
1042
1073
|
const op = await accessor.operator();
|
|
@@ -1047,7 +1078,7 @@ async function unlink(accessor, path) {
|
|
|
1047
1078
|
if (isNotFound(error)) throw enoent10(path);
|
|
1048
1079
|
throw error;
|
|
1049
1080
|
}
|
|
1050
|
-
|
|
1081
|
+
record4("unlink", path.virtual, ResourceName5.NEXTCLOUD, 0, startMs);
|
|
1051
1082
|
await invalidateAfterUnlink4(path);
|
|
1052
1083
|
}
|
|
1053
1084
|
|
|
@@ -1056,6 +1087,7 @@ var NEXTCLOUD_IO = {
|
|
|
1056
1087
|
maxGlobMatches: SCOPE_ERROR,
|
|
1057
1088
|
readdir,
|
|
1058
1089
|
readBytes: read,
|
|
1090
|
+
readRange: rangeOf(read),
|
|
1059
1091
|
readStream: stream,
|
|
1060
1092
|
stat,
|
|
1061
1093
|
isMounted: () => true,
|
|
@@ -1071,26 +1103,71 @@ var NEXTCLOUD_IO = {
|
|
|
1071
1103
|
create,
|
|
1072
1104
|
truncate,
|
|
1073
1105
|
find,
|
|
1074
|
-
|
|
1075
|
-
duAll
|
|
1106
|
+
du: { size, entries }
|
|
1076
1107
|
};
|
|
1077
1108
|
|
|
1078
1109
|
// src/commands/builtin/nextcloud/index.ts
|
|
1079
1110
|
var NEXTCLOUD_COMMANDS = [
|
|
1080
|
-
...
|
|
1081
|
-
resource: ResourceName5.NEXTCLOUD,
|
|
1082
|
-
readBytes: read,
|
|
1083
|
-
statEntry: stat
|
|
1084
|
-
}),
|
|
1085
|
-
...makeGenericCommands(ResourceName5.NEXTCLOUD, NEXTCLOUD_IO)
|
|
1111
|
+
...makeGenericCommands(ResourceName6.NEXTCLOUD, NEXTCLOUD_IO)
|
|
1086
1112
|
];
|
|
1087
1113
|
|
|
1114
|
+
// src/core/nextcloud/watch.ts
|
|
1115
|
+
import {
|
|
1116
|
+
ListingDeltaHook,
|
|
1117
|
+
mountPrefixOf as mountPrefixOf4,
|
|
1118
|
+
statFingerprint,
|
|
1119
|
+
stripSlash as stripSlash7
|
|
1120
|
+
} from "@struktoai/mirage-core";
|
|
1121
|
+
var NextcloudWalk = class {
|
|
1122
|
+
accessor;
|
|
1123
|
+
constructor(accessor) {
|
|
1124
|
+
this.accessor = accessor;
|
|
1125
|
+
}
|
|
1126
|
+
async *walk(root) {
|
|
1127
|
+
const prefix = mountPrefixOf4(root.virtual, root.resourcePath);
|
|
1128
|
+
const base = stripSlash7(root.resourcePath);
|
|
1129
|
+
const listPath = base !== "" ? `${base}/` : "/";
|
|
1130
|
+
const operator = await this.accessor.operator();
|
|
1131
|
+
let entries2;
|
|
1132
|
+
try {
|
|
1133
|
+
entries2 = await operator.list(listPath, { recursive: true });
|
|
1134
|
+
} catch (error) {
|
|
1135
|
+
if (isNotFound(error)) return;
|
|
1136
|
+
throw error;
|
|
1137
|
+
}
|
|
1138
|
+
for (const entry of entries2) {
|
|
1139
|
+
const relative = entry.path();
|
|
1140
|
+
if (relative === "" || relative === listPath) continue;
|
|
1141
|
+
const metadata = entry.metadata();
|
|
1142
|
+
const isDir = relative.endsWith("/") || metadata.isDirectory();
|
|
1143
|
+
const resourcePath = stripSlash7(relative);
|
|
1144
|
+
const virtual = prefix !== "" ? `${prefix}/${resourcePath}` : `/${resourcePath}`;
|
|
1145
|
+
if (isDir) {
|
|
1146
|
+
yield { virtual, isDir: true, fingerprint: null };
|
|
1147
|
+
continue;
|
|
1148
|
+
}
|
|
1149
|
+
const modified = metadata.lastModified;
|
|
1150
|
+
const size2 = metadata.contentLength === null ? null : Number(metadata.contentLength);
|
|
1151
|
+
yield {
|
|
1152
|
+
virtual,
|
|
1153
|
+
isDir: false,
|
|
1154
|
+
fingerprint: statFingerprint(metadata.etag, modified, size2),
|
|
1155
|
+
size: size2,
|
|
1156
|
+
modified
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
};
|
|
1161
|
+
function buildDeltaHook(accessor) {
|
|
1162
|
+
const walk = new NextcloudWalk(accessor);
|
|
1163
|
+
return new ListingDeltaHook(walk.walk.bind(walk));
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1088
1166
|
// src/ops/nextcloud/index.ts
|
|
1089
|
-
import { makeGenericOps, ResourceName as
|
|
1167
|
+
import { makeGenericOps, ResourceName as ResourceName7 } from "@struktoai/mirage-core";
|
|
1090
1168
|
var NEXTCLOUD_OPS = makeGenericOps(
|
|
1091
|
-
|
|
1092
|
-
NEXTCLOUD_IO
|
|
1093
|
-
{ filetypeRead: [".feather", ".hdf5", ".parquet"] }
|
|
1169
|
+
ResourceName7.NEXTCLOUD,
|
|
1170
|
+
NEXTCLOUD_IO
|
|
1094
1171
|
);
|
|
1095
1172
|
|
|
1096
1173
|
// src/resource/nextcloud/prompt.ts
|
|
@@ -1105,8 +1182,11 @@ var NextcloudResource = class extends BaseResource {
|
|
|
1105
1182
|
this.accessor = new NextcloudAccessor(config);
|
|
1106
1183
|
}
|
|
1107
1184
|
config;
|
|
1108
|
-
kind =
|
|
1185
|
+
kind = ResourceName8.NEXTCLOUD;
|
|
1109
1186
|
cachesReads = true;
|
|
1187
|
+
// WebDAV PROPFIND carries getcontentlength for every file; readdir
|
|
1188
|
+
// backfills any lister-omitted size with one stat per affected file.
|
|
1189
|
+
sizesAlwaysKnown = true;
|
|
1110
1190
|
supportsSnapshot = true;
|
|
1111
1191
|
prompt = NEXTCLOUD_PROMPT;
|
|
1112
1192
|
accessor;
|
|
@@ -1123,8 +1203,8 @@ var NextcloudResource = class extends BaseResource {
|
|
|
1123
1203
|
read_stream: stream,
|
|
1124
1204
|
range_read: rangeRead,
|
|
1125
1205
|
rm_recursive: rmR,
|
|
1126
|
-
|
|
1127
|
-
|
|
1206
|
+
du_size: size,
|
|
1207
|
+
du_entries: entries,
|
|
1128
1208
|
create,
|
|
1129
1209
|
truncate,
|
|
1130
1210
|
exists,
|
|
@@ -1133,9 +1213,6 @@ var NextcloudResource = class extends BaseResource {
|
|
|
1133
1213
|
open() {
|
|
1134
1214
|
return Promise.resolve();
|
|
1135
1215
|
}
|
|
1136
|
-
close() {
|
|
1137
|
-
return Promise.resolve();
|
|
1138
|
-
}
|
|
1139
1216
|
commands() {
|
|
1140
1217
|
return NEXTCLOUD_COMMANDS;
|
|
1141
1218
|
}
|
|
@@ -1195,14 +1272,14 @@ var NextcloudResource = class extends BaseResource {
|
|
|
1195
1272
|
return rmR(this.accessor, path);
|
|
1196
1273
|
}
|
|
1197
1274
|
du(path) {
|
|
1198
|
-
return
|
|
1275
|
+
return size(this.accessor, path);
|
|
1199
1276
|
}
|
|
1200
1277
|
find(path, options = {}) {
|
|
1201
1278
|
return find(this.accessor, path, options);
|
|
1202
1279
|
}
|
|
1203
1280
|
glob(paths, prefix = "") {
|
|
1204
1281
|
const effective = prefix ? paths.map(
|
|
1205
|
-
(path) =>
|
|
1282
|
+
(path) => mountPrefixOf5(path.virtual, path.resourcePath) ? path : new PathSpec({
|
|
1206
1283
|
virtual: path.virtual,
|
|
1207
1284
|
directory: path.directory,
|
|
1208
1285
|
...path.pattern !== null ? { pattern: path.pattern } : {},
|
|
@@ -1212,6 +1289,9 @@ var NextcloudResource = class extends BaseResource {
|
|
|
1212
1289
|
) : paths;
|
|
1213
1290
|
return resolveGlobCore(this.accessor, effective, this.index);
|
|
1214
1291
|
}
|
|
1292
|
+
deltaHook() {
|
|
1293
|
+
return buildDeltaHook(this.accessor);
|
|
1294
|
+
}
|
|
1215
1295
|
getState() {
|
|
1216
1296
|
return Promise.resolve({ type: this.kind, config: redactNextcloudConfig(this.config) });
|
|
1217
1297
|
}
|
|
@@ -1223,8 +1303,10 @@ var NextcloudResource = class extends BaseResource {
|
|
|
1223
1303
|
export {
|
|
1224
1304
|
NextcloudAccessor,
|
|
1225
1305
|
NEXTCLOUD_COMMANDS,
|
|
1306
|
+
NextcloudWalk,
|
|
1307
|
+
buildDeltaHook,
|
|
1226
1308
|
NEXTCLOUD_OPS,
|
|
1227
1309
|
NEXTCLOUD_PROMPT,
|
|
1228
1310
|
NextcloudResource
|
|
1229
1311
|
};
|
|
1230
|
-
//# sourceMappingURL=chunk-
|
|
1312
|
+
//# sourceMappingURL=chunk-NZ3EKGW4.js.map
|