@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.
Files changed (447) hide show
  1. package/README.md +2 -1
  2. package/dist/aliyun-S62BR3TB.js +11 -0
  3. package/dist/append.lua +17 -0
  4. package/dist/backblaze-4EKSW63F.js +11 -0
  5. package/dist/box-ZPLZAGMK.js +8 -0
  6. package/dist/ceph-ALKLD3MO.js +11 -0
  7. package/dist/{chunk-VLRSOWHP.js → chunk-2A4YGVBM.js} +5 -14
  8. package/dist/chunk-2A4YGVBM.js.map +1 -0
  9. package/dist/chunk-2HCYLVGY.js +28 -0
  10. package/dist/chunk-2HCYLVGY.js.map +1 -0
  11. package/dist/chunk-2VPZAH5Q.js +20 -0
  12. package/dist/chunk-2VPZAH5Q.js.map +1 -0
  13. package/dist/{chunk-HCU3B6FW.js → chunk-3JZQ6VSZ.js} +5 -4
  14. package/dist/chunk-3JZQ6VSZ.js.map +1 -0
  15. package/dist/chunk-4IF4TGAI.js +11 -0
  16. package/dist/chunk-4IF4TGAI.js.map +1 -0
  17. package/dist/{chunk-L7FEZ7LU.js → chunk-5H6KNEPP.js} +4 -5
  18. package/dist/{chunk-L7FEZ7LU.js.map → chunk-5H6KNEPP.js.map} +1 -1
  19. package/dist/{chunk-25W4XQJZ.js → chunk-5K2MWDCE.js} +4 -5
  20. package/dist/{chunk-25W4XQJZ.js.map → chunk-5K2MWDCE.js.map} +1 -1
  21. package/dist/{chunk-L4GMDSMB.js → chunk-6SVXWRKX.js} +4 -5
  22. package/dist/{chunk-L4GMDSMB.js.map → chunk-6SVXWRKX.js.map} +1 -1
  23. package/dist/{chunk-H62XQZUM.js → chunk-6VOIUGAD.js} +22 -10
  24. package/dist/chunk-6VOIUGAD.js.map +1 -0
  25. package/dist/{chunk-SI4GMRXD.js → chunk-7JYHFXXC.js} +4 -8
  26. package/dist/chunk-7JYHFXXC.js.map +1 -0
  27. package/dist/chunk-7VQQFWV6.js +20 -0
  28. package/dist/chunk-7VQQFWV6.js.map +1 -0
  29. package/dist/chunk-7ZP6TPHX.js +87 -0
  30. package/dist/chunk-7ZP6TPHX.js.map +1 -0
  31. package/dist/{chunk-HWQPEBID.js → chunk-ADEXNSYU.js} +6 -12
  32. package/dist/chunk-ADEXNSYU.js.map +1 -0
  33. package/dist/chunk-AQSYAXL4.js +16 -0
  34. package/dist/chunk-AQSYAXL4.js.map +1 -0
  35. package/dist/{chunk-NJ42VNXG.js → chunk-ATLXMNKD.js} +8 -3
  36. package/dist/chunk-ATLXMNKD.js.map +1 -0
  37. package/dist/{chunk-CB76WPUS.js → chunk-BYCUGFRF.js} +5 -4
  38. package/dist/chunk-BYCUGFRF.js.map +1 -0
  39. package/dist/{chunk-4M73WHIE.js → chunk-BZTVYOES.js} +3 -3
  40. package/dist/{chunk-CQCTCW4S.js → chunk-CRC4YWXB.js} +28 -9
  41. package/dist/chunk-CRC4YWXB.js.map +1 -0
  42. package/dist/{chunk-C7TNKIK5.js → chunk-CTGXJHO5.js} +1 -1
  43. package/dist/chunk-CTGXJHO5.js.map +1 -0
  44. package/dist/{chunk-HSD24IP2.js → chunk-DCDBIXVZ.js} +7 -2
  45. package/dist/chunk-DCDBIXVZ.js.map +1 -0
  46. package/dist/{chunk-HEDE2377.js → chunk-DDAFNROK.js} +318 -322
  47. package/dist/chunk-DDAFNROK.js.map +1 -0
  48. package/dist/chunk-DQIEWEAW.js +85 -0
  49. package/dist/chunk-DQIEWEAW.js.map +1 -0
  50. package/dist/{chunk-2ERLWAGG.js → chunk-EBI4IHDC.js} +20 -11
  51. package/dist/chunk-EBI4IHDC.js.map +1 -0
  52. package/dist/{chunk-RHUEV4I7.js → chunk-EIUTZ6N7.js} +10 -24
  53. package/dist/chunk-EIUTZ6N7.js.map +1 -0
  54. package/dist/{chunk-IUXXZHY3.js → chunk-EJZG5VUF.js} +24 -12
  55. package/dist/chunk-EJZG5VUF.js.map +1 -0
  56. package/dist/{chunk-BWWU5T2D.js → chunk-ENW5BVYN.js} +3 -3
  57. package/dist/{chunk-F5NWRF32.js → chunk-ETIAW4YD.js} +3 -3
  58. package/dist/chunk-EUPXAYPB.js +20 -0
  59. package/dist/chunk-EUPXAYPB.js.map +1 -0
  60. package/dist/{chunk-EGZNOUMH.js → chunk-FA6YNU75.js} +4 -5
  61. package/dist/{chunk-EGZNOUMH.js.map → chunk-FA6YNU75.js.map} +1 -1
  62. package/dist/{chunk-XUUSWR4U.js → chunk-FFH6R5VQ.js} +7 -2
  63. package/dist/{chunk-XUUSWR4U.js.map → chunk-FFH6R5VQ.js.map} +1 -1
  64. package/dist/{chunk-JEBH5APX.js → chunk-GE6H2COM.js} +5 -13
  65. package/dist/chunk-GE6H2COM.js.map +1 -0
  66. package/dist/{chunk-TUNR4VUM.js → chunk-GMMQ3ZK4.js} +3 -3
  67. package/dist/{chunk-SAOQW6ZJ.js → chunk-GSGE3M5P.js} +5 -13
  68. package/dist/chunk-GSGE3M5P.js.map +1 -0
  69. package/dist/{chunk-FRGTDZQT.js → chunk-H64SB6VO.js} +19 -5
  70. package/dist/chunk-H64SB6VO.js.map +1 -0
  71. package/dist/{chunk-DXU7NZPH.js → chunk-HCRYAFBI.js} +3 -3
  72. package/dist/{chunk-OSVZKYXS.js → chunk-HOPUP6LA.js} +192 -156
  73. package/dist/chunk-HOPUP6LA.js.map +1 -0
  74. package/dist/chunk-HS24BL6W.js +160 -0
  75. package/dist/chunk-HS24BL6W.js.map +1 -0
  76. package/dist/chunk-HVYVG5KQ.js +16 -0
  77. package/dist/chunk-HVYVG5KQ.js.map +1 -0
  78. package/dist/{chunk-XEMLYWHK.js → chunk-I7CPLZNW.js} +4 -5
  79. package/dist/{chunk-XEMLYWHK.js.map → chunk-I7CPLZNW.js.map} +1 -1
  80. package/dist/{chunk-AULFV3KY.js → chunk-IFUCGI4I.js} +7 -2
  81. package/dist/chunk-IFUCGI4I.js.map +1 -0
  82. package/dist/{chunk-HGIPWY5Y.js → chunk-IFYXSSKR.js} +6 -6
  83. package/dist/chunk-IFYXSSKR.js.map +1 -0
  84. package/dist/chunk-IXA4DQE4.js +20 -0
  85. package/dist/chunk-IXA4DQE4.js.map +1 -0
  86. package/dist/chunk-IZMKMD3O.js +11 -0
  87. package/dist/chunk-IZMKMD3O.js.map +1 -0
  88. package/dist/{chunk-4X6CLF4F.js → chunk-JJERW2BI.js} +4 -5
  89. package/dist/{chunk-4X6CLF4F.js.map → chunk-JJERW2BI.js.map} +1 -1
  90. package/dist/{chunk-M6E7VK4D.js → chunk-JQR4HVUX.js} +2 -5
  91. package/dist/chunk-JQR4HVUX.js.map +1 -0
  92. package/dist/{chunk-BWLUBJQG.js → chunk-JXOMDLFS.js} +6 -15
  93. package/dist/chunk-JXOMDLFS.js.map +1 -0
  94. package/dist/{chunk-5ZHNPNDD.js → chunk-KIX6N7NT.js} +198 -141
  95. package/dist/chunk-KIX6N7NT.js.map +1 -0
  96. package/dist/{chunk-XFSEADPC.js → chunk-L42UTDFK.js} +7 -2
  97. package/dist/chunk-L42UTDFK.js.map +1 -0
  98. package/dist/chunk-M2UF2JHJ.js +11 -0
  99. package/dist/chunk-M2UF2JHJ.js.map +1 -0
  100. package/dist/{chunk-LPLZLSMK.js → chunk-MONC734W.js} +7 -2
  101. package/dist/chunk-MONC734W.js.map +1 -0
  102. package/dist/{chunk-XADEMW6B.js → chunk-N72RLCMU.js} +4 -5
  103. package/dist/{chunk-XADEMW6B.js.map → chunk-N72RLCMU.js.map} +1 -1
  104. package/dist/{chunk-ZPB3SLPK.js → chunk-ND4IWJ4V.js} +7 -2
  105. package/dist/chunk-ND4IWJ4V.js.map +1 -0
  106. package/dist/{chunk-ZPZQXHW2.js → chunk-NZ3EKGW4.js} +260 -178
  107. package/dist/chunk-NZ3EKGW4.js.map +1 -0
  108. package/dist/{chunk-E3KXVEYI.js → chunk-OAE57MNL.js} +22 -10
  109. package/dist/chunk-OAE57MNL.js.map +1 -0
  110. package/dist/{chunk-JBDFYIN2.js → chunk-OHKGIQB4.js} +2 -5
  111. package/dist/chunk-OHKGIQB4.js.map +1 -0
  112. package/dist/{chunk-V7JVMG63.js → chunk-OXEQSPND.js} +3 -3
  113. package/dist/{chunk-YRJICL2Q.js → chunk-PKNE5J2B.js} +5 -13
  114. package/dist/chunk-PKNE5J2B.js.map +1 -0
  115. package/dist/chunk-PSXXEGYQ.js +16 -0
  116. package/dist/chunk-PSXXEGYQ.js.map +1 -0
  117. package/dist/{chunk-KAWDDS27.js → chunk-QAOVABCR.js} +7 -2
  118. package/dist/chunk-QAOVABCR.js.map +1 -0
  119. package/dist/{chunk-SYMNWNC3.js → chunk-QQ7FP4GD.js} +4 -5
  120. package/dist/{chunk-SYMNWNC3.js.map → chunk-QQ7FP4GD.js.map} +1 -1
  121. package/dist/{chunk-3JZN3GYO.js → chunk-QYLVMC6B.js} +2 -5
  122. package/dist/chunk-QYLVMC6B.js.map +1 -0
  123. package/dist/{chunk-CXQGMFI7.js → chunk-RX3XR65X.js} +4 -5
  124. package/dist/{chunk-CXQGMFI7.js.map → chunk-RX3XR65X.js.map} +1 -1
  125. package/dist/{chunk-MRXTUFBZ.js → chunk-RYQJJB4C.js} +1 -1
  126. package/dist/chunk-RYQJJB4C.js.map +1 -0
  127. package/dist/{chunk-5I7Q7RHW.js → chunk-TUF7TCN7.js} +4 -5
  128. package/dist/{chunk-5I7Q7RHW.js.map → chunk-TUF7TCN7.js.map} +1 -1
  129. package/dist/{chunk-NLXJMXVE.js → chunk-TUX36JY5.js} +4 -5
  130. package/dist/{chunk-NLXJMXVE.js.map → chunk-TUX36JY5.js.map} +1 -1
  131. package/dist/{chunk-4GYB7DGC.js → chunk-TWRQCQWU.js} +327 -558
  132. package/dist/chunk-TWRQCQWU.js.map +1 -0
  133. package/dist/chunk-U6DFQRG3.js +20 -0
  134. package/dist/chunk-U6DFQRG3.js.map +1 -0
  135. package/dist/chunk-VI5YTKNY.js +20 -0
  136. package/dist/chunk-VI5YTKNY.js.map +1 -0
  137. package/dist/{chunk-W5ZLIQFR.js → chunk-WG5YS6TC.js} +308 -200
  138. package/dist/chunk-WG5YS6TC.js.map +1 -0
  139. package/dist/{chunk-ZM44MGC5.js → chunk-WMJJ4WGF.js} +4 -5
  140. package/dist/{chunk-ZM44MGC5.js.map → chunk-WMJJ4WGF.js.map} +1 -1
  141. package/dist/{chunk-5YRWF5RP.js → chunk-WY4FNH42.js} +6 -5
  142. package/dist/chunk-WY4FNH42.js.map +1 -0
  143. package/dist/{chunk-VBYIDRNU.js → chunk-XIG5BWWH.js} +19 -10
  144. package/dist/chunk-XIG5BWWH.js.map +1 -0
  145. package/dist/chunk-XJBC3OYX.js +11 -0
  146. package/dist/chunk-XJBC3OYX.js.map +1 -0
  147. package/dist/{chunk-ZMREYTHA.js → chunk-XPRDXWK7.js} +8 -8
  148. package/dist/chunk-XPRDXWK7.js.map +1 -0
  149. package/dist/chunk-YKRQSZS7.js +96 -0
  150. package/dist/chunk-YKRQSZS7.js.map +1 -0
  151. package/dist/{chunk-IEVLWEBO.js → chunk-YMBL3VJB.js} +9 -8
  152. package/dist/chunk-YMBL3VJB.js.map +1 -0
  153. package/dist/{chunk-CGGO5NKD.js → chunk-YUJBXFYK.js} +357 -346
  154. package/dist/chunk-YUJBXFYK.js.map +1 -0
  155. package/dist/{chunk-S4KVLPBR.js → chunk-YZ4ZJNOL.js} +22 -10
  156. package/dist/chunk-YZ4ZJNOL.js.map +1 -0
  157. package/dist/chunk-ZTHVEXIV.js +11 -0
  158. package/dist/chunk-ZTHVEXIV.js.map +1 -0
  159. package/dist/{chunk-VHED2STW.js → chunk-ZVSYUCYS.js} +2 -1
  160. package/dist/chunk-ZVSYUCYS.js.map +1 -0
  161. package/dist/{config-T2IUIU5C.js → config-2YBCHU2W.js} +2 -2
  162. package/dist/{config-M3Z47VYU.js → config-3YRGRW72.js} +3 -2
  163. package/dist/config-4GSOMUMF.js +9 -0
  164. package/dist/config-5YBUWFUP.js +9 -0
  165. package/dist/{config-2LASFFRD.js → config-5ZRKJTKG.js} +3 -2
  166. package/dist/{config-W7EVPJNK.js → config-A25LTL5W.js} +2 -2
  167. package/dist/{config-WKQ3FGTZ.js → config-CLU7JABG.js} +2 -2
  168. package/dist/{config-E22XAGYN.js → config-D2RF7L3N.js} +2 -2
  169. package/dist/{config-HQXNFQZS.js → config-E55TKM6K.js} +2 -2
  170. package/dist/config-ELDOFRJW.js +9 -0
  171. package/dist/{config-EX3ZJTZI.js → config-FPC3RBFD.js} +2 -2
  172. package/dist/config-FPM3LAW7.js +9 -0
  173. package/dist/{config-IPNWAJHH.js → config-G3F54CS4.js} +3 -2
  174. package/dist/{config-BBOLI7VE.js → config-G43HRUI3.js} +2 -2
  175. package/dist/{config-QO2XUME4.js → config-GG3WO5PB.js} +3 -2
  176. package/dist/{config-QWQGOXQ5.js → config-JUYBWAZE.js} +2 -2
  177. package/dist/{config-SPW6NESU.js → config-LJ5T6TVA.js} +2 -2
  178. package/dist/{config-WVILHDFV.js → config-MDSAE4O3.js} +2 -2
  179. package/dist/{config-MZM3IPFM.js → config-NRIOKK5T.js} +2 -2
  180. package/dist/{config-L7SBSH5L.js → config-OYK2BSJK.js} +2 -2
  181. package/dist/config-PB3KA2CE.js +9 -0
  182. package/dist/{config-54USUVSE.js → config-QY4IL3PH.js} +3 -2
  183. package/dist/{config-VKKZGC7V.js → config-R4LAOEDS.js} +2 -2
  184. package/dist/{config-FRK7ZL37.js → config-RIAAD6RW.js} +3 -2
  185. package/dist/{config-J2C53GOT.js → config-SYNEQAUB.js} +2 -2
  186. package/dist/{config-XU6D5C7E.js → config-TJKGYA2B.js} +3 -2
  187. package/dist/{config-DWSJL3NH.js → config-UURRGA7U.js} +4 -2
  188. package/dist/{config-BIBFLUIR.js → config-VPLHQXVE.js} +2 -2
  189. package/dist/config-WRACCRPN.js +9 -0
  190. package/dist/{config-OJ2BPESH.js → config-WVHKXEVE.js} +3 -2
  191. package/dist/{config-CPYFOUQO.js → config-XU7R36IE.js} +3 -2
  192. package/dist/{config-A2GQYJDB.js → config-Y2KOUYSS.js} +2 -2
  193. package/dist/databricks_volume-CNCPTZHS.js +7 -0
  194. package/dist/digitalocean-DJZOUB6Q.js +11 -0
  195. package/dist/discord-ETB2CADR.js +7 -0
  196. package/dist/disk-WEHSTK3F.js +7 -0
  197. package/dist/dropbox-XN6PGLNE.js +8 -0
  198. package/dist/email-OV7XCP3T.js +8 -0
  199. package/dist/gcal-P56MRCGU.js +8 -0
  200. package/dist/gcs-HFBIAE2C.js +10 -0
  201. package/dist/gdocs-LQ3UXP3J.js +8 -0
  202. package/dist/gdrive-N6UBYLON.js +8 -0
  203. package/dist/github-BPZREGPI.js +8 -0
  204. package/dist/github_ci-7A4LUIZ7.js +8 -0
  205. package/dist/{gmail-2TBT4CVH.js → gmail-YED2MF6H.js} +2 -2
  206. package/dist/gridfs-CPLQ4G62.js +9 -0
  207. package/dist/gsheets-4BNIJPQ6.js +8 -0
  208. package/dist/gslides-GDBYLO5A.js +8 -0
  209. package/dist/hf_buckets-FTJITQ3P.js +10 -0
  210. package/dist/hf_datasets-6GXVKQD7.js +10 -0
  211. package/dist/hf_models-PJPGZAC5.js +10 -0
  212. package/dist/hf_spaces-LFNFOLBF.js +10 -0
  213. package/dist/index.d.ts +897 -609
  214. package/dist/index.js +2371 -781
  215. package/dist/index.js.map +1 -1
  216. package/dist/jaeger-GCA6MJ6E.js +8 -0
  217. package/dist/lancedb-TJ5YSJY5.js +7 -0
  218. package/dist/langfuse-RUMTUMXS.js +8 -0
  219. package/dist/linear-BCE4KEAC.js +7 -0
  220. package/dist/minio-5SO6KBTK.js +11 -0
  221. package/dist/mongodb-L5CMN2EE.js +7 -0
  222. package/dist/nextcloud-4O2LZVW2.js +9 -0
  223. package/dist/notion-RVKEAQ2M.js +7 -0
  224. package/dist/oci-OQXOIC62.js +10 -0
  225. package/dist/postgres-AV45GNRS.js +7 -0
  226. package/dist/qingstor-W277YA4K.js +11 -0
  227. package/dist/r2-FUA4IORE.js +10 -0
  228. package/dist/{redis-6D55Q2WB.js → redis-LPS357NF.js} +2 -2
  229. package/dist/s3-FPNWWIVM.js +8 -0
  230. package/dist/scaleway-BP3732U7.js +11 -0
  231. package/dist/seaweedfs-MC6HIEP4.js +11 -0
  232. package/dist/slack-JFGW7VLN.js +7 -0
  233. package/dist/ssh-UYPG42LM.js +8 -0
  234. package/dist/supabase-A3KUFMDC.js +10 -0
  235. package/dist/tencent-5464UQ2X.js +11 -0
  236. package/dist/trello-O2KB3FUO.js +8 -0
  237. package/dist/wasabi-2IKBIWNO.js +10 -0
  238. package/dist/wasabi-2IKBIWNO.js.map +1 -0
  239. package/package.json +15 -3
  240. package/dist/aliyun-PGI57A43.js +0 -10
  241. package/dist/backblaze-TSPL6Y56.js +0 -10
  242. package/dist/box-7XTZYDSO.js +0 -8
  243. package/dist/ceph-C265UI5T.js +0 -10
  244. package/dist/chunk-2ERLWAGG.js.map +0 -1
  245. package/dist/chunk-2QNPKPZZ.js +0 -59
  246. package/dist/chunk-2QNPKPZZ.js.map +0 -1
  247. package/dist/chunk-3ASOQTZB.js +0 -59
  248. package/dist/chunk-3ASOQTZB.js.map +0 -1
  249. package/dist/chunk-3JZN3GYO.js.map +0 -1
  250. package/dist/chunk-4GYB7DGC.js.map +0 -1
  251. package/dist/chunk-5YRWF5RP.js.map +0 -1
  252. package/dist/chunk-5ZHNPNDD.js.map +0 -1
  253. package/dist/chunk-AULFV3KY.js.map +0 -1
  254. package/dist/chunk-BWLUBJQG.js.map +0 -1
  255. package/dist/chunk-C7TNKIK5.js.map +0 -1
  256. package/dist/chunk-CB76WPUS.js.map +0 -1
  257. package/dist/chunk-CGGO5NKD.js.map +0 -1
  258. package/dist/chunk-CQCTCW4S.js.map +0 -1
  259. package/dist/chunk-D3U7VQCG.js +0 -25
  260. package/dist/chunk-D3U7VQCG.js.map +0 -1
  261. package/dist/chunk-E3KXVEYI.js.map +0 -1
  262. package/dist/chunk-EVK6HH6Z.js +0 -17
  263. package/dist/chunk-EVK6HH6Z.js.map +0 -1
  264. package/dist/chunk-FRGTDZQT.js.map +0 -1
  265. package/dist/chunk-GF75O2EN.js +0 -54
  266. package/dist/chunk-GF75O2EN.js.map +0 -1
  267. package/dist/chunk-GTAS3QVC.js +0 -25
  268. package/dist/chunk-GTAS3QVC.js.map +0 -1
  269. package/dist/chunk-H62XQZUM.js.map +0 -1
  270. package/dist/chunk-HCU3B6FW.js.map +0 -1
  271. package/dist/chunk-HEDE2377.js.map +0 -1
  272. package/dist/chunk-HGIPWY5Y.js.map +0 -1
  273. package/dist/chunk-HSD24IP2.js.map +0 -1
  274. package/dist/chunk-HWQPEBID.js.map +0 -1
  275. package/dist/chunk-IEHPTILN.js +0 -21
  276. package/dist/chunk-IEHPTILN.js.map +0 -1
  277. package/dist/chunk-IEVLWEBO.js.map +0 -1
  278. package/dist/chunk-IKJQOYI4.js +0 -26
  279. package/dist/chunk-IKJQOYI4.js.map +0 -1
  280. package/dist/chunk-IUXXZHY3.js.map +0 -1
  281. package/dist/chunk-JBDFYIN2.js.map +0 -1
  282. package/dist/chunk-JEBH5APX.js.map +0 -1
  283. package/dist/chunk-JHI2PHHD.js +0 -25
  284. package/dist/chunk-JHI2PHHD.js.map +0 -1
  285. package/dist/chunk-KAWDDS27.js.map +0 -1
  286. package/dist/chunk-KGC2OGXI.js +0 -27
  287. package/dist/chunk-KGC2OGXI.js.map +0 -1
  288. package/dist/chunk-LPLZLSMK.js.map +0 -1
  289. package/dist/chunk-M6E7VK4D.js.map +0 -1
  290. package/dist/chunk-MIQ3ECZM.js +0 -54
  291. package/dist/chunk-MIQ3ECZM.js.map +0 -1
  292. package/dist/chunk-MRXTUFBZ.js.map +0 -1
  293. package/dist/chunk-NJ42VNXG.js.map +0 -1
  294. package/dist/chunk-OSVZKYXS.js.map +0 -1
  295. package/dist/chunk-RHUEV4I7.js.map +0 -1
  296. package/dist/chunk-S4KVLPBR.js.map +0 -1
  297. package/dist/chunk-SAOQW6ZJ.js.map +0 -1
  298. package/dist/chunk-SI4GMRXD.js.map +0 -1
  299. package/dist/chunk-UAJYJP5C.js +0 -59
  300. package/dist/chunk-UAJYJP5C.js.map +0 -1
  301. package/dist/chunk-UYA3XL3J.js +0 -54
  302. package/dist/chunk-UYA3XL3J.js.map +0 -1
  303. package/dist/chunk-VBYIDRNU.js.map +0 -1
  304. package/dist/chunk-VHED2STW.js.map +0 -1
  305. package/dist/chunk-VIICUPWQ.js +0 -23
  306. package/dist/chunk-VIICUPWQ.js.map +0 -1
  307. package/dist/chunk-VLRSOWHP.js.map +0 -1
  308. package/dist/chunk-W5ZLIQFR.js.map +0 -1
  309. package/dist/chunk-WTSSEUOZ.js +0 -59
  310. package/dist/chunk-WTSSEUOZ.js.map +0 -1
  311. package/dist/chunk-WWP2STF5.js +0 -59
  312. package/dist/chunk-WWP2STF5.js.map +0 -1
  313. package/dist/chunk-XFSEADPC.js.map +0 -1
  314. package/dist/chunk-YBVMZ7SR.js +0 -59
  315. package/dist/chunk-YBVMZ7SR.js.map +0 -1
  316. package/dist/chunk-YRJICL2Q.js.map +0 -1
  317. package/dist/chunk-ZMREYTHA.js.map +0 -1
  318. package/dist/chunk-ZPB3SLPK.js.map +0 -1
  319. package/dist/chunk-ZPZQXHW2.js.map +0 -1
  320. package/dist/config-3WDIJPTG.js +0 -9
  321. package/dist/config-4QV4QYI5.js +0 -9
  322. package/dist/config-5ZXN2T2H.js +0 -9
  323. package/dist/config-EHE52ZTK.js +0 -9
  324. package/dist/config-HTXOOAOD.js +0 -9
  325. package/dist/config-K63RX6EU.js +0 -9
  326. package/dist/config-LEALEMKA.js +0 -9
  327. package/dist/config-RI7IEZUF.js +0 -9
  328. package/dist/databricks_volume-ETRDJVVQ.js +0 -7
  329. package/dist/digitalocean-QP72DR4J.js +0 -10
  330. package/dist/discord-BSN5RB3E.js +0 -8
  331. package/dist/disk-24NWTN2I.js +0 -7
  332. package/dist/dropbox-OSTZXSIE.js +0 -8
  333. package/dist/email-4ZFPSWIN.js +0 -8
  334. package/dist/gcs-PFWR6MIW.js +0 -10
  335. package/dist/gdocs-GPAZRQG5.js +0 -8
  336. package/dist/gdrive-XSX6A7B3.js +0 -8
  337. package/dist/github-EQ4NXUTA.js +0 -8
  338. package/dist/github_ci-QL5B2Q2N.js +0 -8
  339. package/dist/gridfs-KZRZ6SIB.js +0 -9
  340. package/dist/gsheets-N53WEXN2.js +0 -8
  341. package/dist/gslides-TATSARTH.js +0 -8
  342. package/dist/hf_buckets-BK7NGJWS.js +0 -10
  343. package/dist/hf_datasets-UQ5QGM4L.js +0 -10
  344. package/dist/hf_models-75LFCQCS.js +0 -10
  345. package/dist/hf_spaces-6T2KB3UC.js +0 -10
  346. package/dist/langfuse-AMQCQWNE.js +0 -8
  347. package/dist/linear-V3TXO6CV.js +0 -8
  348. package/dist/minio-IZRZY4C5.js +0 -10
  349. package/dist/mongodb-VMKPQCPX.js +0 -7
  350. package/dist/nextcloud-5RHQCGDO.js +0 -9
  351. package/dist/notion-6PPNTQFM.js +0 -8
  352. package/dist/oci-CKYBSFZJ.js +0 -10
  353. package/dist/postgres-WIQBVL5M.js +0 -7
  354. package/dist/qingstor-AP4IIPLY.js +0 -10
  355. package/dist/r2-C4XGEWQY.js +0 -10
  356. package/dist/s3-XQBI2CXN.js +0 -8
  357. package/dist/scaleway-SEZJVURB.js +0 -10
  358. package/dist/seaweedfs-3XYIAFU2.js +0 -10
  359. package/dist/slack-ZHXDJQY4.js +0 -8
  360. package/dist/ssh-X2MO7JOV.js +0 -8
  361. package/dist/supabase-BBM44UTM.js +0 -10
  362. package/dist/tencent-X72USLJ7.js +0 -10
  363. package/dist/trello-EER5NG7L.js +0 -8
  364. package/dist/wasabi-O4MVIUFG.js +0 -10
  365. /package/dist/{aliyun-PGI57A43.js.map → aliyun-S62BR3TB.js.map} +0 -0
  366. /package/dist/{backblaze-TSPL6Y56.js.map → backblaze-4EKSW63F.js.map} +0 -0
  367. /package/dist/{box-7XTZYDSO.js.map → box-ZPLZAGMK.js.map} +0 -0
  368. /package/dist/{ceph-C265UI5T.js.map → ceph-ALKLD3MO.js.map} +0 -0
  369. /package/dist/{chunk-4M73WHIE.js.map → chunk-BZTVYOES.js.map} +0 -0
  370. /package/dist/{chunk-BWWU5T2D.js.map → chunk-ENW5BVYN.js.map} +0 -0
  371. /package/dist/{chunk-F5NWRF32.js.map → chunk-ETIAW4YD.js.map} +0 -0
  372. /package/dist/{chunk-TUNR4VUM.js.map → chunk-GMMQ3ZK4.js.map} +0 -0
  373. /package/dist/{chunk-DXU7NZPH.js.map → chunk-HCRYAFBI.js.map} +0 -0
  374. /package/dist/{chunk-V7JVMG63.js.map → chunk-OXEQSPND.js.map} +0 -0
  375. /package/dist/{config-2LASFFRD.js.map → config-2YBCHU2W.js.map} +0 -0
  376. /package/dist/{config-3WDIJPTG.js.map → config-3YRGRW72.js.map} +0 -0
  377. /package/dist/{config-4QV4QYI5.js.map → config-4GSOMUMF.js.map} +0 -0
  378. /package/dist/{config-54USUVSE.js.map → config-5YBUWFUP.js.map} +0 -0
  379. /package/dist/{config-5ZXN2T2H.js.map → config-5ZRKJTKG.js.map} +0 -0
  380. /package/dist/{config-A2GQYJDB.js.map → config-A25LTL5W.js.map} +0 -0
  381. /package/dist/{config-BBOLI7VE.js.map → config-CLU7JABG.js.map} +0 -0
  382. /package/dist/{config-BIBFLUIR.js.map → config-D2RF7L3N.js.map} +0 -0
  383. /package/dist/{config-CPYFOUQO.js.map → config-E55TKM6K.js.map} +0 -0
  384. /package/dist/{config-DWSJL3NH.js.map → config-ELDOFRJW.js.map} +0 -0
  385. /package/dist/{config-E22XAGYN.js.map → config-FPC3RBFD.js.map} +0 -0
  386. /package/dist/{config-EHE52ZTK.js.map → config-FPM3LAW7.js.map} +0 -0
  387. /package/dist/{config-EX3ZJTZI.js.map → config-G3F54CS4.js.map} +0 -0
  388. /package/dist/{config-FRK7ZL37.js.map → config-G43HRUI3.js.map} +0 -0
  389. /package/dist/{config-HQXNFQZS.js.map → config-GG3WO5PB.js.map} +0 -0
  390. /package/dist/{config-HTXOOAOD.js.map → config-JUYBWAZE.js.map} +0 -0
  391. /package/dist/{config-IPNWAJHH.js.map → config-LJ5T6TVA.js.map} +0 -0
  392. /package/dist/{config-J2C53GOT.js.map → config-MDSAE4O3.js.map} +0 -0
  393. /package/dist/{config-K63RX6EU.js.map → config-NRIOKK5T.js.map} +0 -0
  394. /package/dist/{config-L7SBSH5L.js.map → config-OYK2BSJK.js.map} +0 -0
  395. /package/dist/{config-LEALEMKA.js.map → config-PB3KA2CE.js.map} +0 -0
  396. /package/dist/{config-M3Z47VYU.js.map → config-QY4IL3PH.js.map} +0 -0
  397. /package/dist/{config-MZM3IPFM.js.map → config-R4LAOEDS.js.map} +0 -0
  398. /package/dist/{config-OJ2BPESH.js.map → config-RIAAD6RW.js.map} +0 -0
  399. /package/dist/{config-QO2XUME4.js.map → config-SYNEQAUB.js.map} +0 -0
  400. /package/dist/{config-QWQGOXQ5.js.map → config-TJKGYA2B.js.map} +0 -0
  401. /package/dist/{config-RI7IEZUF.js.map → config-UURRGA7U.js.map} +0 -0
  402. /package/dist/{config-SPW6NESU.js.map → config-VPLHQXVE.js.map} +0 -0
  403. /package/dist/{config-T2IUIU5C.js.map → config-WRACCRPN.js.map} +0 -0
  404. /package/dist/{config-VKKZGC7V.js.map → config-WVHKXEVE.js.map} +0 -0
  405. /package/dist/{config-W7EVPJNK.js.map → config-XU7R36IE.js.map} +0 -0
  406. /package/dist/{config-WKQ3FGTZ.js.map → config-Y2KOUYSS.js.map} +0 -0
  407. /package/dist/{config-WVILHDFV.js.map → databricks_volume-CNCPTZHS.js.map} +0 -0
  408. /package/dist/{config-XU6D5C7E.js.map → digitalocean-DJZOUB6Q.js.map} +0 -0
  409. /package/dist/{databricks_volume-ETRDJVVQ.js.map → discord-ETB2CADR.js.map} +0 -0
  410. /package/dist/{digitalocean-QP72DR4J.js.map → disk-WEHSTK3F.js.map} +0 -0
  411. /package/dist/{discord-BSN5RB3E.js.map → dropbox-XN6PGLNE.js.map} +0 -0
  412. /package/dist/{disk-24NWTN2I.js.map → email-OV7XCP3T.js.map} +0 -0
  413. /package/dist/{dropbox-OSTZXSIE.js.map → gcal-P56MRCGU.js.map} +0 -0
  414. /package/dist/{email-4ZFPSWIN.js.map → gcs-HFBIAE2C.js.map} +0 -0
  415. /package/dist/{gcs-PFWR6MIW.js.map → gdocs-LQ3UXP3J.js.map} +0 -0
  416. /package/dist/{gdocs-GPAZRQG5.js.map → gdrive-N6UBYLON.js.map} +0 -0
  417. /package/dist/{gdrive-XSX6A7B3.js.map → github-BPZREGPI.js.map} +0 -0
  418. /package/dist/{github-EQ4NXUTA.js.map → github_ci-7A4LUIZ7.js.map} +0 -0
  419. /package/dist/{github_ci-QL5B2Q2N.js.map → gmail-YED2MF6H.js.map} +0 -0
  420. /package/dist/{gmail-2TBT4CVH.js.map → gridfs-CPLQ4G62.js.map} +0 -0
  421. /package/dist/{gridfs-KZRZ6SIB.js.map → gsheets-4BNIJPQ6.js.map} +0 -0
  422. /package/dist/{gsheets-N53WEXN2.js.map → gslides-GDBYLO5A.js.map} +0 -0
  423. /package/dist/{gslides-TATSARTH.js.map → hf_buckets-FTJITQ3P.js.map} +0 -0
  424. /package/dist/{hf_buckets-BK7NGJWS.js.map → hf_datasets-6GXVKQD7.js.map} +0 -0
  425. /package/dist/{hf_datasets-UQ5QGM4L.js.map → hf_models-PJPGZAC5.js.map} +0 -0
  426. /package/dist/{hf_models-75LFCQCS.js.map → hf_spaces-LFNFOLBF.js.map} +0 -0
  427. /package/dist/{hf_spaces-6T2KB3UC.js.map → jaeger-GCA6MJ6E.js.map} +0 -0
  428. /package/dist/{langfuse-AMQCQWNE.js.map → lancedb-TJ5YSJY5.js.map} +0 -0
  429. /package/dist/{linear-V3TXO6CV.js.map → langfuse-RUMTUMXS.js.map} +0 -0
  430. /package/dist/{minio-IZRZY4C5.js.map → linear-BCE4KEAC.js.map} +0 -0
  431. /package/dist/{mongodb-VMKPQCPX.js.map → minio-5SO6KBTK.js.map} +0 -0
  432. /package/dist/{nextcloud-5RHQCGDO.js.map → mongodb-L5CMN2EE.js.map} +0 -0
  433. /package/dist/{notion-6PPNTQFM.js.map → nextcloud-4O2LZVW2.js.map} +0 -0
  434. /package/dist/{oci-CKYBSFZJ.js.map → notion-RVKEAQ2M.js.map} +0 -0
  435. /package/dist/{postgres-WIQBVL5M.js.map → oci-OQXOIC62.js.map} +0 -0
  436. /package/dist/{qingstor-AP4IIPLY.js.map → postgres-AV45GNRS.js.map} +0 -0
  437. /package/dist/{r2-C4XGEWQY.js.map → qingstor-W277YA4K.js.map} +0 -0
  438. /package/dist/{redis-6D55Q2WB.js.map → r2-FUA4IORE.js.map} +0 -0
  439. /package/dist/{s3-XQBI2CXN.js.map → redis-LPS357NF.js.map} +0 -0
  440. /package/dist/{scaleway-SEZJVURB.js.map → s3-FPNWWIVM.js.map} +0 -0
  441. /package/dist/{seaweedfs-3XYIAFU2.js.map → scaleway-BP3732U7.js.map} +0 -0
  442. /package/dist/{slack-ZHXDJQY4.js.map → seaweedfs-MC6HIEP4.js.map} +0 -0
  443. /package/dist/{ssh-X2MO7JOV.js.map → slack-JFGW7VLN.js.map} +0 -0
  444. /package/dist/{supabase-BBM44UTM.js.map → ssh-UYPG42LM.js.map} +0 -0
  445. /package/dist/{tencent-X72USLJ7.js.map → supabase-A3KUFMDC.js.map} +0 -0
  446. /package/dist/{trello-EER5NG7L.js.map → tencent-5464UQ2X.js.map} +0 -0
  447. /package/dist/{wasabi-O4MVIUFG.js.map → trello-O2KB3FUO.js.map} +0 -0
@@ -7,96 +7,59 @@ import {
7
7
  BaseResource,
8
8
  PathSpec,
9
9
  REDACTED_SECRET,
10
- ResourceName as ResourceName7,
10
+ ResourceName as ResourceName9,
11
11
  makeResolveGlob,
12
12
  mountKey,
13
- mountPrefixOf as mountPrefixOf2
13
+ mountPrefixOf as mountPrefixOf2,
14
+ stripSlash as stripSlash2,
15
+ compareCodePoints as compareCodePoints5
14
16
  } from "@struktoai/mirage-core";
15
17
 
16
18
  // src/commands/builtin/redis/index.ts
17
- import {
18
- ResourceName as ResourceName5,
19
- makeFiletypeCommands,
20
- makeGenericCommands
21
- } from "@struktoai/mirage-core";
22
-
23
- // src/core/redis/read.ts
24
- import { record, ResourceName } from "@struktoai/mirage-core";
25
- import { enoent } from "@struktoai/mirage-core";
26
-
27
- // src/core/redis/utils.ts
28
- import { norm, parent, gnuBasename } from "@struktoai/mirage-core";
29
- function nowIso() {
30
- return (/* @__PURE__ */ new Date()).toISOString();
31
- }
19
+ import { ResourceName as ResourceName7, makeGenericCommands } from "@struktoai/mirage-core";
32
20
 
33
- // src/core/redis/read.ts
34
- async function read(accessor, path, _index) {
35
- const start = performance.now();
36
- const p = norm(path.mountPath);
37
- const data = await accessor.store.getFile(p);
38
- if (data === null) {
39
- throw enoent(path);
40
- }
41
- record("read", p, ResourceName.REDIS, data.byteLength, start);
42
- return data;
43
- }
21
+ // src/core/redis/append.ts
22
+ import { ResourceName, invalidateAfterWrite, record } from "@struktoai/mirage-core";
44
23
 
45
- // src/core/redis/stat.ts
24
+ // src/core/redis/dest.ts
46
25
  import {
47
- FileStat,
48
- FileType,
49
- guessType
26
+ ancestors,
27
+ eexist,
28
+ enoent,
29
+ enotdir,
30
+ mountedPath
50
31
  } from "@struktoai/mirage-core";
51
- import { enoent as enoent2 } from "@struktoai/mirage-core";
52
- function decodeAttrs(raw) {
53
- const out = {};
54
- if (raw.mode !== void 0) out.mode = parseInt(raw.mode, 10);
55
- for (const key of ["uid", "gid"]) {
56
- const val = raw[key];
57
- if (val !== void 0) out[key] = /^\d+$/.test(val) ? parseInt(val, 10) : val;
32
+ async function checkDestParents(store, dst, d) {
33
+ for (const ancestor of ancestors(d)) {
34
+ if (await store.hasDir(ancestor)) continue;
35
+ if (await store.hasFile(ancestor)) throw enotdir(dst);
36
+ throw enoent(dst);
58
37
  }
59
- if (raw.atime !== void 0) out.atime = raw.atime;
60
- return out;
61
38
  }
62
- async function stat(accessor, path, _index) {
63
- const p = norm(path.mountPath);
64
- const store = accessor.store;
65
- if (await store.hasDir(p)) {
66
- const attrs = decodeAttrs(await store.getAttrs(p));
67
- return new FileStat({
68
- name: gnuBasename(p),
69
- modified: await store.getModified(p),
70
- type: FileType.DIRECTORY,
71
- mode: attrs.mode ?? null,
72
- uid: attrs.uid ?? null,
73
- gid: attrs.gid ?? null,
74
- atime: attrs.atime ?? null
75
- });
39
+ async function checkMkdirTarget(store, spec, key, parents) {
40
+ if (!parents) {
41
+ if (await store.hasDir(key) || await store.hasFile(key)) throw eexist(spec);
42
+ return;
76
43
  }
77
- if (await store.hasFile(p)) {
78
- const size = await store.fileLen(p);
79
- const attrs = decodeAttrs(await store.getAttrs(p));
80
- return new FileStat({
81
- name: gnuBasename(p),
82
- size,
83
- modified: await store.getModified(p),
84
- type: guessType(p),
85
- mode: attrs.mode ?? null,
86
- uid: attrs.uid ?? null,
87
- gid: attrs.gid ?? null,
88
- atime: attrs.atime ?? null
89
- });
44
+ for (const component of [...ancestors(key), key]) {
45
+ if (!await store.hasFile(component)) continue;
46
+ const named = mountedPath(spec, component);
47
+ throw component === key ? eexist(named) : enotdir(named);
90
48
  }
91
- throw enoent2(path);
49
+ }
50
+
51
+ // src/core/redis/utils.ts
52
+ import { norm, gnuBasename } from "@struktoai/mirage-core";
53
+ function nowIso() {
54
+ return (/* @__PURE__ */ new Date()).toISOString();
92
55
  }
93
56
 
94
57
  // src/core/redis/append.ts
95
- import { ResourceName as ResourceName2, invalidateAfterWrite, record as record2 } from "@struktoai/mirage-core";
96
58
  async function appendBytes(accessor, path, data) {
97
59
  const start = performance.now();
98
60
  const p = norm(path.mountPath);
99
61
  const store = accessor.store;
62
+ await checkDestParents(store, path, p);
100
63
  const existing = await store.getFile(p);
101
64
  if (existing !== null) {
102
65
  const merged = new Uint8Array(existing.byteLength + data.byteLength);
@@ -107,7 +70,7 @@ async function appendBytes(accessor, path, data) {
107
70
  await store.setFile(p, data);
108
71
  }
109
72
  await store.setModified(p, nowIso());
110
- record2("append", p, ResourceName2.REDIS, data.byteLength, start);
73
+ record("append", p, ResourceName.REDIS, data.byteLength, start);
111
74
  await invalidateAfterWrite(p);
112
75
  }
113
76
 
@@ -115,58 +78,63 @@ async function appendBytes(accessor, path, data) {
115
78
  var SCOPE_ERROR = 5e4;
116
79
 
117
80
  // src/core/redis/copy.ts
118
- import { invalidateAfterWrite as invalidateAfterWrite2 } from "@struktoai/mirage-core";
81
+ import { enoent as enoent2, invalidateAfterWrite as invalidateAfterWrite2 } from "@struktoai/mirage-core";
119
82
  async function copy(accessor, src, dst) {
120
83
  const s = norm(src.mountPath);
121
84
  const d = norm(dst.mountPath);
122
85
  const store = accessor.store;
86
+ await checkDestParents(store, dst, d);
123
87
  const data = await store.getFile(s);
124
- if (data === null) {
125
- throw new Error(`file not found: ${s}`);
126
- }
88
+ if (data === null) throw enoent2(src);
127
89
  await store.setFile(d, data);
128
90
  await store.setModified(d, nowIso());
129
91
  await invalidateAfterWrite2(dst);
130
92
  }
131
93
 
132
94
  // src/core/redis/create.ts
133
- import { invalidateAfterWrite as invalidateAfterWrite3 } from "@struktoai/mirage-core";
95
+ import { ResourceName as ResourceName2, invalidateAfterWrite as invalidateAfterWrite3, record as record2 } from "@struktoai/mirage-core";
134
96
  async function create(accessor, path) {
97
+ const start = performance.now();
135
98
  const p = norm(path.mountPath);
136
99
  const store = accessor.store;
100
+ await checkDestParents(store, path, p);
137
101
  await store.setFile(p, new Uint8Array(0));
138
102
  await store.setModified(p, nowIso());
103
+ record2("create", p, ResourceName2.REDIS, 0, start);
139
104
  await invalidateAfterWrite3(path);
140
105
  }
141
106
 
142
- // src/core/redis/du.ts
143
- import { rstripSlash } from "@struktoai/mirage-core";
144
- async function du(accessor, path) {
107
+ // src/core/redis/du/entries.ts
108
+ import { compareCodePoints, rstripSlash } from "@struktoai/mirage-core";
109
+ async function entries(accessor, path) {
145
110
  const p = norm(path.mountPath);
146
111
  const store = accessor.store;
147
112
  const prefix = rstripSlash(p) + "/";
113
+ const found = [];
148
114
  let total = 0;
149
- for (const key of await store.listFiles()) {
115
+ for (const key of [...await store.listFiles()].sort(compareCodePoints)) {
150
116
  if (key === p || key.startsWith(prefix)) {
151
- total += await store.fileLen(key);
117
+ const size2 = await store.fileLen(key);
118
+ found.push([key, size2]);
119
+ total += size2;
152
120
  }
153
121
  }
154
- return total;
122
+ return [found, total];
155
123
  }
156
- async function duAll(accessor, path) {
124
+
125
+ // src/core/redis/du/size.ts
126
+ import { rstripSlash as rstripSlash2 } from "@struktoai/mirage-core";
127
+ async function size(accessor, path) {
157
128
  const p = norm(path.mountPath);
158
129
  const store = accessor.store;
159
- const prefix = rstripSlash(p) + "/";
160
- const entries = [];
130
+ const prefix = rstripSlash2(p) + "/";
161
131
  let total = 0;
162
132
  for (const key of await store.listFiles()) {
163
133
  if (key === p || key.startsWith(prefix)) {
164
- const size = await store.fileLen(key);
165
- entries.push([key, size]);
166
- total += size;
134
+ total += await store.fileLen(key);
167
135
  }
168
136
  }
169
- return { entries, total };
137
+ return total;
170
138
  }
171
139
 
172
140
  // src/core/redis/exists.ts
@@ -182,14 +150,15 @@ import {
182
150
  computeNonemptyDirs,
183
151
  emitStartPath,
184
152
  keep,
185
- rstripSlash as rstripSlash2,
186
- startBasename
153
+ rstripSlash as rstripSlash3,
154
+ startBasename,
155
+ compareCodePoints as compareCodePoints2
187
156
  } from "@struktoai/mirage-core";
188
157
  async function find(accessor, path, options = {}) {
189
158
  const p = norm(path.mountPath);
190
159
  const startName = startBasename(path.virtual);
191
160
  const store = accessor.store;
192
- const prefix = rstripSlash2(p) + "/";
161
+ const prefix = rstripSlash3(p) + "/";
193
162
  const baseDepth = p === "/" ? 0 : (p.match(/\//g) ?? []).length;
194
163
  const results = [];
195
164
  const tree = options.tree ?? buildTree({
@@ -237,9 +206,9 @@ async function find(accessor, path, options = {}) {
237
206
  }
238
207
  if (!keep({ key, name: basename, kind, depth, isEmpty }, tree, options.minDepth)) continue;
239
208
  if (options.minSize != null || options.maxSize != null) {
240
- const size = kind === "f" ? await store.fileLen(key) : 0;
241
- if (options.minSize != null && size < options.minSize) continue;
242
- if (options.maxSize != null && size > options.maxSize) continue;
209
+ const size2 = kind === "f" ? await store.fileLen(key) : 0;
210
+ if (options.minSize != null && size2 < options.minSize) continue;
211
+ if (options.maxSize != null && size2 > options.maxSize) continue;
243
212
  }
244
213
  results.push(key);
245
214
  }
@@ -256,7 +225,7 @@ async function find(accessor, path, options = {}) {
256
225
  maxSize: options.maxSize
257
226
  });
258
227
  }
259
- results.sort();
228
+ results.sort(compareCodePoints2);
260
229
  return results;
261
230
  }
262
231
 
@@ -266,6 +235,7 @@ import { stripSlash } from "@struktoai/mirage-core";
266
235
  async function mkdir(accessor, path, parents = false) {
267
236
  const p = norm(path.mountPath);
268
237
  const store = accessor.store;
238
+ await checkMkdirTarget(store, path, p, parents);
269
239
  if (parents) {
270
240
  const parts = stripSlash(p).split("/");
271
241
  let current = "";
@@ -282,21 +252,33 @@ async function mkdir(accessor, path, parents = false) {
282
252
  await invalidateAncestors(path);
283
253
  return;
284
254
  }
285
- const par = parent(p);
286
- if (par !== "/" && !await store.hasDir(par)) {
287
- throw new Error(`parent directory does not exist: ${par}`);
288
- }
255
+ await checkDestParents(store, path, p);
289
256
  await store.addDir(p);
290
257
  await store.setModified(p, nowIso());
291
258
  await invalidateAfterWrite4(p);
292
259
  }
293
260
 
261
+ // src/core/redis/read.ts
262
+ import { record as record3, ResourceName as ResourceName3 } from "@struktoai/mirage-core";
263
+ import { enoent as enoent3 } from "@struktoai/mirage-core";
264
+ async function read(accessor, path, _index) {
265
+ const start = performance.now();
266
+ const p = norm(path.mountPath);
267
+ const data = await accessor.store.getFile(p);
268
+ if (data === null) {
269
+ throw enoent3(path);
270
+ }
271
+ record3("read", p, ResourceName3.REDIS, data.byteLength, start);
272
+ return data;
273
+ }
274
+
294
275
  // src/core/redis/readdir.ts
295
276
  import {
296
277
  mountPrefixOf,
297
- rstripSlash as rstripSlash3
278
+ rstripSlash as rstripSlash4,
279
+ compareCodePoints as compareCodePoints3
298
280
  } from "@struktoai/mirage-core";
299
- import { enotdir } from "@struktoai/mirage-core";
281
+ import { readdirError } from "@struktoai/mirage-core";
300
282
 
301
283
  // src/core/redis/entry.ts
302
284
  import { IndexEntry } from "@struktoai/mirage-core";
@@ -308,14 +290,14 @@ var RedisIndexEntry = class _RedisIndexEntry extends IndexEntry {
308
290
  // size defaults to null, not 0: a readdir knows a key exists but not
309
291
  // its length, and a lying 0 would be trusted by index-first size
310
292
  // lookups (provision estimates) over a real stat.
311
- static file(path, size = null) {
293
+ static file(path, size2 = null) {
312
294
  const name = path.slice(path.lastIndexOf("/") + 1);
313
295
  return new _RedisIndexEntry({
314
296
  id: path,
315
297
  name,
316
298
  resourceType: RedisResourceType.FILE,
317
299
  vfsName: name,
318
- size
300
+ size: size2
319
301
  });
320
302
  }
321
303
  static folder(path) {
@@ -333,7 +315,7 @@ var RedisIndexEntry = class _RedisIndexEntry extends IndexEntry {
333
315
  async function readdir(accessor, path, index) {
334
316
  const virtual = path.pattern !== null ? path.directory : path.mountPath;
335
317
  const mountPrefix = mountPrefixOf(path.virtual, path.resourcePath);
336
- const virtualKey = rstripSlash3(mountPrefix + virtual) || "/";
318
+ const virtualKey = rstripSlash4(mountPrefix + virtual) || "/";
337
319
  if (index !== void 0) {
338
320
  const cached = await index.listDir(virtualKey);
339
321
  if (cached.entries !== void 0 && cached.entries !== null) {
@@ -343,7 +325,12 @@ async function readdir(accessor, path, index) {
343
325
  const store = accessor.store;
344
326
  const p = norm(virtual);
345
327
  if (!await store.hasDir(p)) {
346
- throw enotdir(path);
328
+ throw await readdirError(
329
+ path,
330
+ p,
331
+ (k) => store.hasFile(k),
332
+ (k) => store.hasDir(k)
333
+ );
347
334
  }
348
335
  const dirPrefix = p === "/" ? "/" : `${p}/`;
349
336
  const seen = /* @__PURE__ */ new Set();
@@ -356,32 +343,33 @@ async function readdir(accessor, path, index) {
356
343
  const first = remainder.split("/")[0];
357
344
  if (first !== void 0 && first.length > 0) seen.add(dirPrefix + first);
358
345
  }
359
- const sorted = [...seen].sort();
346
+ const sorted = [...seen].sort(compareCodePoints3);
360
347
  const virtualEntries = sorted.map((entry) => `${mountPrefix}${entry}`);
361
348
  if (index !== void 0) {
362
349
  const fileSet = new Set(files);
363
- const entries = sorted.map((e) => {
350
+ const entries2 = sorted.map((e) => {
364
351
  const name = e.slice(e.lastIndexOf("/") + 1);
365
352
  return [name, fileSet.has(e) ? RedisIndexEntry.file(e) : RedisIndexEntry.folder(e)];
366
353
  });
367
- await index.setDir(virtualKey, entries);
354
+ await index.setDir(virtualKey, entries2);
368
355
  }
369
356
  return virtualEntries;
370
357
  }
371
358
 
372
359
  // src/core/redis/rename.ts
373
360
  import { invalidateAfterUnlink, invalidateAfterWrite as invalidateAfterWrite5 } from "@struktoai/mirage-core";
374
- import { rstripSlash as rstripSlash4 } from "@struktoai/mirage-core";
361
+ import { enoent as enoent4, rstripSlash as rstripSlash5 } from "@struktoai/mirage-core";
375
362
  async function rename(accessor, src, dst) {
376
363
  const s = norm(src.mountPath);
377
364
  const d = norm(dst.mountPath);
378
365
  const now = nowIso();
379
366
  const store = accessor.store;
367
+ await checkDestParents(store, dst, d);
380
368
  if (await store.hasFile(s)) {
381
369
  const data = await store.getFile(s);
382
370
  const mod = await store.getModified(s);
383
371
  const attrs = await store.getAttrs(s);
384
- if (data === null) throw new Error(`file not found: ${s}`);
372
+ if (data === null) throw enoent4(src);
385
373
  await store.delFile(s);
386
374
  await store.delModified(s);
387
375
  await store.delAttrs(s);
@@ -401,8 +389,8 @@ async function rename(accessor, src, dst) {
401
389
  await store.addDir(d);
402
390
  await store.setModified(d, mod ?? now);
403
391
  if (Object.keys(attrs).length > 0) await store.setAttrs(d, attrs);
404
- const prefix = rstripSlash4(s) + "/";
405
- const dPrefix = rstripSlash4(d) + "/";
392
+ const prefix = rstripSlash5(s) + "/";
393
+ const dPrefix = rstripSlash5(d) + "/";
406
394
  const files = await store.listFiles();
407
395
  for (const key of files) {
408
396
  if (key.startsWith(prefix)) {
@@ -420,15 +408,15 @@ async function rename(accessor, src, dst) {
420
408
  await invalidateAfterWrite5(d);
421
409
  return;
422
410
  }
423
- throw new Error(`file not found: ${s}`);
411
+ throw enoent4(src);
424
412
  }
425
413
 
426
414
  // src/core/redis/rm.ts
427
- import { invalidateAfterUnlink as invalidateAfterUnlink2, rstripSlash as rstripSlash5 } from "@struktoai/mirage-core";
415
+ import { invalidateAfterUnlink as invalidateAfterUnlink2, rstripSlash as rstripSlash6 } from "@struktoai/mirage-core";
428
416
  async function rmR(accessor, path) {
429
417
  const p = norm(path.mountPath);
430
418
  const store = accessor.store;
431
- const prefix = rstripSlash5(p) + "/";
419
+ const prefix = rstripSlash6(p) + "/";
432
420
  const files = await store.listFiles();
433
421
  for (const key of files) {
434
422
  if (key === p || key.startsWith(prefix)) {
@@ -449,14 +437,14 @@ async function rmR(accessor, path) {
449
437
  }
450
438
 
451
439
  // src/core/redis/rmdir.ts
452
- import { invalidateAfterUnlink as invalidateAfterUnlink3, rstripSlash as rstripSlash6 } from "@struktoai/mirage-core";
440
+ import { invalidateAfterUnlink as invalidateAfterUnlink3, rstripSlash as rstripSlash7 } from "@struktoai/mirage-core";
453
441
  async function rmdir(accessor, path) {
454
442
  const p = norm(path.mountPath);
455
443
  const store = accessor.store;
456
444
  if (!await store.hasDir(p)) {
457
445
  throw new Error(`not a directory: ${p}`);
458
446
  }
459
- const prefix = rstripSlash6(p) + "/";
447
+ const prefix = rstripSlash7(p) + "/";
460
448
  const files = await store.listFiles();
461
449
  const dirs = await store.listDirs();
462
450
  const candidates = [...files, ...dirs];
@@ -470,12 +458,12 @@ async function rmdir(accessor, path) {
470
458
  }
471
459
 
472
460
  // src/core/redis/set_attrs.ts
473
- import { enoent as enoent3 } from "@struktoai/mirage-core";
461
+ import { enoent as enoent5 } from "@struktoai/mirage-core";
474
462
  async function setAttrs(accessor, path, fields) {
475
463
  const store = accessor.store;
476
464
  const p = norm(path.mountPath);
477
465
  if (!await store.hasFile(p) && !await store.hasDir(p)) {
478
- throw enoent3(path);
466
+ throw enoent5(path);
479
467
  }
480
468
  const encoded = {};
481
469
  if (fields.mode !== void 0) encoded.mode = String(fields.mode);
@@ -491,24 +479,74 @@ async function setAttrs(accessor, path, fields) {
491
479
  return {};
492
480
  }
493
481
 
482
+ // src/core/redis/stat.ts
483
+ import {
484
+ FileStat,
485
+ FileType,
486
+ guessType
487
+ } from "@struktoai/mirage-core";
488
+ import { enoent as enoent6 } from "@struktoai/mirage-core";
489
+ function decodeAttrs(raw) {
490
+ const out = {};
491
+ if (raw.mode !== void 0) out.mode = parseInt(raw.mode, 10);
492
+ for (const key of ["uid", "gid"]) {
493
+ const val = raw[key];
494
+ if (val !== void 0) out[key] = /^\d+$/.test(val) ? parseInt(val, 10) : val;
495
+ }
496
+ if (raw.atime !== void 0) out.atime = raw.atime;
497
+ return out;
498
+ }
499
+ async function stat(accessor, path, _index) {
500
+ const p = norm(path.mountPath);
501
+ const store = accessor.store;
502
+ if (await store.hasDir(p)) {
503
+ const attrs = decodeAttrs(await store.getAttrs(p));
504
+ return new FileStat({
505
+ name: gnuBasename(p),
506
+ modified: await store.getModified(p),
507
+ type: FileType.DIRECTORY,
508
+ mode: attrs.mode ?? null,
509
+ uid: attrs.uid ?? null,
510
+ gid: attrs.gid ?? null,
511
+ atime: attrs.atime ?? null
512
+ });
513
+ }
514
+ if (await store.hasFile(p)) {
515
+ const size2 = await store.fileLen(p);
516
+ const attrs = decodeAttrs(await store.getAttrs(p));
517
+ return new FileStat({
518
+ name: gnuBasename(p),
519
+ size: size2,
520
+ modified: await store.getModified(p),
521
+ type: guessType(p),
522
+ mode: attrs.mode ?? null,
523
+ uid: attrs.uid ?? null,
524
+ gid: attrs.gid ?? null,
525
+ atime: attrs.atime ?? null
526
+ });
527
+ }
528
+ throw enoent6(path);
529
+ }
530
+
494
531
  // src/core/redis/stream.ts
495
532
  import {
496
533
  recordStream,
497
- ResourceName as ResourceName3
534
+ ResourceName as ResourceName4
498
535
  } from "@struktoai/mirage-core";
499
- import { enoent as enoent4 } from "@struktoai/mirage-core";
536
+ import { enoent as enoent7 } from "@struktoai/mirage-core";
500
537
  async function* stream(accessor, path, _index) {
501
538
  const p = norm(path.mountPath);
502
539
  const data = await accessor.store.getFile(p);
503
- if (data === null) throw enoent4(path);
504
- const rec = recordStream("read", p, ResourceName3.REDIS);
540
+ if (data === null) throw enoent7(path);
541
+ const rec = recordStream("read", p, ResourceName4.REDIS);
505
542
  if (rec !== null) rec.bytes = data.byteLength;
506
543
  yield data;
507
544
  }
508
545
 
509
546
  // src/core/redis/truncate.ts
510
- import { invalidateAfterWrite as invalidateAfterWrite6 } from "@struktoai/mirage-core";
547
+ import { ResourceName as ResourceName5, invalidateAfterWrite as invalidateAfterWrite6, record as record4 } from "@struktoai/mirage-core";
511
548
  async function truncate(accessor, path, length) {
549
+ const start = performance.now();
512
550
  const p = norm(path.mountPath);
513
551
  const store = accessor.store;
514
552
  const existing = await store.getFile(p);
@@ -518,6 +556,7 @@ async function truncate(accessor, path, length) {
518
556
  out.set(data.subarray(0, copyLen), 0);
519
557
  await store.setFile(p, out);
520
558
  await store.setModified(p, nowIso());
559
+ record4("truncate", p, ResourceName5.REDIS, 0, start);
521
560
  await invalidateAfterWrite6(p);
522
561
  }
523
562
 
@@ -536,18 +575,15 @@ async function unlink(accessor, path) {
536
575
  }
537
576
 
538
577
  // src/core/redis/write.ts
539
- import { ResourceName as ResourceName4, invalidateAfterWrite as invalidateAfterWrite7, record as record3 } from "@struktoai/mirage-core";
578
+ import { ResourceName as ResourceName6, invalidateAfterWrite as invalidateAfterWrite7, record as record5 } from "@struktoai/mirage-core";
540
579
  async function writeBytes(accessor, path, data) {
541
580
  const start = performance.now();
542
581
  const p = norm(path.mountPath);
543
- const par = parent(p);
544
582
  const store = accessor.store;
545
- if (par !== "/" && !await store.hasDir(par)) {
546
- throw new Error(`parent directory does not exist: ${par}`);
547
- }
583
+ await checkDestParents(store, path, p);
548
584
  await store.setFile(p, data);
549
585
  await store.setModified(p, nowIso());
550
- record3("write", p, ResourceName4.REDIS, data.byteLength, start);
586
+ record5("write", p, ResourceName6.REDIS, data.byteLength, start);
551
587
  await invalidateAfterWrite7(p);
552
588
  }
553
589
 
@@ -573,21 +609,12 @@ var REDIS_IO = {
573
609
  append: appendBytes,
574
610
  setAttrs,
575
611
  find,
576
- duTotal: du,
577
- duAll: async (accessor, path) => {
578
- const { entries, total } = await duAll(accessor, path);
579
- return [entries, total];
580
- }
612
+ du: { size, entries }
581
613
  };
582
614
 
583
615
  // src/commands/builtin/redis/index.ts
584
616
  var REDIS_COMMANDS = [
585
- ...makeFiletypeCommands({
586
- resource: ResourceName5.REDIS,
587
- readBytes: read,
588
- statEntry: stat
589
- }),
590
- ...makeGenericCommands(ResourceName5.REDIS, REDIS_IO)
617
+ ...makeGenericCommands(ResourceName7.REDIS, REDIS_IO)
591
618
  ];
592
619
 
593
620
  // src/accessor/redis.ts
@@ -601,17 +628,15 @@ var RedisAccessor = class extends Accessor {
601
628
  };
602
629
 
603
630
  // src/ops/redis/index.ts
604
- import { ResourceName as ResourceName6, makeGenericOps } from "@struktoai/mirage-core";
605
- var REDIS_OPS = makeGenericOps(ResourceName6.REDIS, REDIS_IO, {
606
- filetypeRead: [".feather", ".hdf5", ".parquet"],
607
- forwardIndex: false
608
- });
631
+ import { ResourceName as ResourceName8, makeGenericOps } from "@struktoai/mirage-core";
632
+ var REDIS_OPS = makeGenericOps(ResourceName8.REDIS, REDIS_IO);
609
633
 
610
634
  // src/resource/redis/prompt.ts
611
635
  var REDIS_PROMPT = `Redis-backed persistent filesystem. Behaves like a standard filesystem.
612
636
  Standard commands: ls, cat, head, tail, grep, wc, find, tree, mkdir, touch, cp, mv, rm, tee.`;
613
637
 
614
638
  // src/resource/redis/store.ts
639
+ import { compareCodePoints as compareCodePoints4 } from "@struktoai/mirage-core";
615
640
  var RedisStore = class {
616
641
  url;
617
642
  keyPrefix;
@@ -682,7 +707,7 @@ var RedisStore = class {
682
707
  const keys = Array.isArray(k) ? k : [k];
683
708
  for (const key of keys) result.push(key.slice(strip));
684
709
  }
685
- return result.sort();
710
+ return result.sort(compareCodePoints4);
686
711
  }
687
712
  async fileLen(path) {
688
713
  const c = await this.client();
@@ -760,8 +785,10 @@ var RedisStore = class {
760
785
  // src/resource/redis/redis.ts
761
786
  var globCore = makeResolveGlob(readdir, SCOPE_ERROR);
762
787
  var RedisResource = class extends BaseResource {
763
- kind = ResourceName7.REDIS;
788
+ kind = ResourceName9.REDIS;
764
789
  cachesReads = false;
790
+ // byte store: stat() sizes every file from metadata
791
+ sizesAlwaysKnown = true;
765
792
  indexTtl = 0;
766
793
  prompt = REDIS_PROMPT;
767
794
  url;
@@ -780,8 +807,8 @@ var RedisResource = class extends BaseResource {
780
807
  mkdir,
781
808
  read_stream: stream,
782
809
  rm_recursive: rmR,
783
- du_total: du,
784
- du_all: duAll,
810
+ du_size: size,
811
+ du_entries: entries,
785
812
  create,
786
813
  truncate,
787
814
  exists,
@@ -795,11 +822,20 @@ var RedisResource = class extends BaseResource {
795
822
  this.store = new RedisStore({ url: this.url, keyPrefix: this.keyPrefix });
796
823
  this.accessor = new RedisAccessor(this.store);
797
824
  }
825
+ // The server URL (host, port and db) plus the key prefix pin the keyspace
826
+ // two mounts would share. The prefix is joined path-like so nested
827
+ // prefixes collapse onto one key.
828
+ storageId() {
829
+ const prefix = stripSlash2(this.keyPrefix);
830
+ const base = `${this.kind}:${this.url}`;
831
+ return prefix === "" ? base : `${base}/${prefix}`;
832
+ }
798
833
  async open() {
799
834
  await this.store.client();
800
835
  }
801
- close() {
802
- return this.store.close();
836
+ async close() {
837
+ await this.store.close();
838
+ await super.close();
803
839
  }
804
840
  client() {
805
841
  return this.store.client();
@@ -856,7 +892,7 @@ var RedisResource = class extends BaseResource {
856
892
  return rmR(this.accessor, p);
857
893
  }
858
894
  du(p) {
859
- return du(this.accessor, p);
895
+ return size(this.accessor, p);
860
896
  }
861
897
  find(p, options = {}) {
862
898
  return find(this.accessor, p, options);
@@ -879,7 +915,7 @@ var RedisResource = class extends BaseResource {
879
915
  const data = await this.store.getFile(key);
880
916
  if (data !== null) files[key] = data;
881
917
  }
882
- const dirs = [...await this.store.listDirs()].sort();
918
+ const dirs = [...await this.store.listDirs()].sort(compareCodePoints5);
883
919
  const c = await this.store.client();
884
920
  const attrs = {};
885
921
  const attrsStrip = `${this.keyPrefix}attrs:`.length;
@@ -943,4 +979,4 @@ export {
943
979
  RedisStore,
944
980
  RedisResource
945
981
  };
946
- //# sourceMappingURL=chunk-OSVZKYXS.js.map
982
+ //# sourceMappingURL=chunk-HOPUP6LA.js.map