@struktoai/mirage-node 0.0.3 → 0.0.4

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 (430) hide show
  1. package/dist/aliyun-PGI57A43.js +10 -0
  2. package/dist/backblaze-TSPL6Y56.js +10 -0
  3. package/dist/box-7XTZYDSO.js +8 -0
  4. package/dist/cas.lua +15 -0
  5. package/dist/ceph-C265UI5T.js +10 -0
  6. package/dist/{chunk-I5THIMPP.js → chunk-25W4XQJZ.js} +5 -5
  7. package/dist/{chunk-QGRDPSAH.js → chunk-2ERLWAGG.js} +4 -2
  8. package/dist/chunk-2ERLWAGG.js.map +1 -0
  9. package/dist/{chunk-NJMGCT63.js → chunk-2QNPKPZZ.js} +7 -2
  10. package/dist/chunk-2QNPKPZZ.js.map +1 -0
  11. package/dist/{chunk-ZNWVJ6UW.js → chunk-3ASOQTZB.js} +7 -2
  12. package/dist/chunk-3ASOQTZB.js.map +1 -0
  13. package/dist/{chunk-WAR4Q2NM.js → chunk-3JZN3GYO.js} +13 -12
  14. package/dist/chunk-3JZN3GYO.js.map +1 -0
  15. package/dist/{chunk-S5OVP467.js → chunk-4GYB7DGC.js} +294 -705
  16. package/dist/chunk-4GYB7DGC.js.map +1 -0
  17. package/dist/{chunk-HJJMP6IX.js → chunk-4M73WHIE.js} +3 -3
  18. package/dist/{chunk-7CW3BMPH.js → chunk-4X6CLF4F.js} +3 -3
  19. package/dist/{chunk-QQBJC2FQ.js → chunk-5I7Q7RHW.js} +3 -3
  20. package/dist/{chunk-LV2G7VHL.js → chunk-5YRWF5RP.js} +17 -15
  21. package/dist/chunk-5YRWF5RP.js.map +1 -0
  22. package/dist/chunk-5ZHNPNDD.js +944 -0
  23. package/dist/chunk-5ZHNPNDD.js.map +1 -0
  24. package/dist/{chunk-VGLHY6BK.js → chunk-AULFV3KY.js} +1 -2
  25. package/dist/chunk-AULFV3KY.js.map +1 -0
  26. package/dist/{chunk-VWKUT4CW.js → chunk-BWLUBJQG.js} +19 -15
  27. package/dist/chunk-BWLUBJQG.js.map +1 -0
  28. package/dist/{chunk-X5HF2OFP.js → chunk-BWWU5T2D.js} +3 -3
  29. package/dist/chunk-C7TNKIK5.js +39 -0
  30. package/dist/chunk-C7TNKIK5.js.map +1 -0
  31. package/dist/{chunk-MPCCRRE6.js → chunk-CB76WPUS.js} +12 -13
  32. package/dist/chunk-CB76WPUS.js.map +1 -0
  33. package/dist/chunk-CGGO5NKD.js +1194 -0
  34. package/dist/chunk-CGGO5NKD.js.map +1 -0
  35. package/dist/{chunk-B2ZOKNN4.js → chunk-CQCTCW4S.js} +1 -2
  36. package/dist/chunk-CQCTCW4S.js.map +1 -0
  37. package/dist/{chunk-KPULTUOK.js → chunk-CXQGMFI7.js} +3 -3
  38. package/dist/{chunk-LW25LMIH.js → chunk-D3U7VQCG.js} +1 -2
  39. package/dist/{chunk-LW25LMIH.js.map → chunk-D3U7VQCG.js.map} +1 -1
  40. package/dist/{chunk-N5FSLVKO.js → chunk-DXU7NZPH.js} +3 -3
  41. package/dist/{chunk-XGJ2QERC.js → chunk-E3KXVEYI.js} +8 -4
  42. package/dist/chunk-E3KXVEYI.js.map +1 -0
  43. package/dist/{chunk-YAHRT6MB.js → chunk-EGZNOUMH.js} +3 -3
  44. package/dist/{chunk-DNBAMB5J.js → chunk-EVK6HH6Z.js} +1 -2
  45. package/dist/{chunk-DNBAMB5J.js.map → chunk-EVK6HH6Z.js.map} +1 -1
  46. package/dist/{chunk-HGCRXJGP.js → chunk-F5NWRF32.js} +3 -3
  47. package/dist/{chunk-GCFYZSVR.js → chunk-FRGTDZQT.js} +15 -10
  48. package/dist/chunk-FRGTDZQT.js.map +1 -0
  49. package/dist/{chunk-DYXEITK3.js → chunk-GF75O2EN.js} +4 -2
  50. package/dist/chunk-GF75O2EN.js.map +1 -0
  51. package/dist/{chunk-W7FLHT65.js → chunk-GTAS3QVC.js} +1 -2
  52. package/dist/{chunk-W7FLHT65.js.map → chunk-GTAS3QVC.js.map} +1 -1
  53. package/dist/{chunk-RQK5UPMP.js → chunk-H62XQZUM.js} +4 -3
  54. package/dist/chunk-H62XQZUM.js.map +1 -0
  55. package/dist/{chunk-UT2OPSN4.js → chunk-HCU3B6FW.js} +1 -2
  56. package/dist/chunk-HCU3B6FW.js.map +1 -0
  57. package/dist/chunk-HEDE2377.js +754 -0
  58. package/dist/chunk-HEDE2377.js.map +1 -0
  59. package/dist/{chunk-RNQN2FOU.js → chunk-HGIPWY5Y.js} +21 -10
  60. package/dist/chunk-HGIPWY5Y.js.map +1 -0
  61. package/dist/{chunk-Q2IAILVC.js → chunk-HSD24IP2.js} +8 -4
  62. package/dist/chunk-HSD24IP2.js.map +1 -0
  63. package/dist/{chunk-SWCDFEUK.js → chunk-HWQPEBID.js} +18 -14
  64. package/dist/chunk-HWQPEBID.js.map +1 -0
  65. package/dist/{chunk-SFUCUARB.js → chunk-IEHPTILN.js} +4 -4
  66. package/dist/chunk-IEHPTILN.js.map +1 -0
  67. package/dist/{chunk-M5FVUIYP.js → chunk-IEVLWEBO.js} +14 -13
  68. package/dist/chunk-IEVLWEBO.js.map +1 -0
  69. package/dist/{chunk-YUK3X3B4.js → chunk-IKJQOYI4.js} +1 -2
  70. package/dist/{chunk-YUK3X3B4.js.map → chunk-IKJQOYI4.js.map} +1 -1
  71. package/dist/{chunk-TA3WMOMU.js → chunk-IUXXZHY3.js} +16 -22
  72. package/dist/chunk-IUXXZHY3.js.map +1 -0
  73. package/dist/{chunk-EZQ5HBAC.js → chunk-JBDFYIN2.js} +12 -13
  74. package/dist/chunk-JBDFYIN2.js.map +1 -0
  75. package/dist/{chunk-JCC4CU2I.js → chunk-JEBH5APX.js} +14 -14
  76. package/dist/chunk-JEBH5APX.js.map +1 -0
  77. package/dist/{chunk-H3BST2LI.js → chunk-JHI2PHHD.js} +1 -2
  78. package/dist/{chunk-H3BST2LI.js.map → chunk-JHI2PHHD.js.map} +1 -1
  79. package/dist/{chunk-EGB7V74Z.js → chunk-KAWDDS27.js} +1 -3
  80. package/dist/chunk-KAWDDS27.js.map +1 -0
  81. package/dist/{chunk-DP2PP5V2.js → chunk-KGC2OGXI.js} +5 -4
  82. package/dist/chunk-KGC2OGXI.js.map +1 -0
  83. package/dist/{chunk-3WIO7NBR.js → chunk-L4GMDSMB.js} +3 -3
  84. package/dist/{chunk-47AVIIOT.js → chunk-L7FEZ7LU.js} +3 -3
  85. package/dist/{chunk-54NTYJEO.js → chunk-LPDLPRPS.js} +1 -3
  86. package/dist/{chunk-54NTYJEO.js.map → chunk-LPDLPRPS.js.map} +1 -1
  87. package/dist/{chunk-UGK4TAVK.js → chunk-LPLZLSMK.js} +1 -2
  88. package/dist/chunk-LPLZLSMK.js.map +1 -0
  89. package/dist/{chunk-EM4J5EQS.js → chunk-M6E7VK4D.js} +13 -13
  90. package/dist/chunk-M6E7VK4D.js.map +1 -0
  91. package/dist/{chunk-2CC5VW7K.js → chunk-MIQ3ECZM.js} +4 -2
  92. package/dist/chunk-MIQ3ECZM.js.map +1 -0
  93. package/dist/chunk-MRXTUFBZ.js +30 -0
  94. package/dist/chunk-MRXTUFBZ.js.map +1 -0
  95. package/dist/{chunk-RO5IQEDQ.js → chunk-NJ42VNXG.js} +1 -2
  96. package/dist/chunk-NJ42VNXG.js.map +1 -0
  97. package/dist/{chunk-AUHSTJJ3.js → chunk-NLXJMXVE.js} +3 -3
  98. package/dist/{chunk-E2ISWXLB.js → chunk-OQKNDS66.js} +1 -1
  99. package/dist/{chunk-E2ISWXLB.js.map → chunk-OQKNDS66.js.map} +1 -1
  100. package/dist/{chunk-IDYHQQOH.js → chunk-OSVZKYXS.js} +229 -378
  101. package/dist/chunk-OSVZKYXS.js.map +1 -0
  102. package/dist/{chunk-JAGJTM3Q.js → chunk-RHUEV4I7.js} +11 -12
  103. package/dist/chunk-RHUEV4I7.js.map +1 -0
  104. package/dist/{chunk-JALIYI6M.js → chunk-S4KVLPBR.js} +7 -2
  105. package/dist/chunk-S4KVLPBR.js.map +1 -0
  106. package/dist/{chunk-ZEGAMJO2.js → chunk-SAOQW6ZJ.js} +14 -14
  107. package/dist/chunk-SAOQW6ZJ.js.map +1 -0
  108. package/dist/{chunk-NOHWIBRX.js → chunk-SI4GMRXD.js} +13 -14
  109. package/dist/chunk-SI4GMRXD.js.map +1 -0
  110. package/dist/{chunk-X3G37FXT.js → chunk-SYMNWNC3.js} +3 -3
  111. package/dist/{chunk-DM4GSE26.js → chunk-TUNR4VUM.js} +3 -3
  112. package/dist/{chunk-XHCBHYN4.js → chunk-UAJYJP5C.js} +7 -2
  113. package/dist/chunk-UAJYJP5C.js.map +1 -0
  114. package/dist/{chunk-OPYQ5KIO.js → chunk-UYA3XL3J.js} +4 -2
  115. package/dist/chunk-UYA3XL3J.js.map +1 -0
  116. package/dist/{chunk-UINQOUZR.js → chunk-V7JVMG63.js} +3 -3
  117. package/dist/{chunk-LAJJPLEV.js → chunk-VBYIDRNU.js} +7 -3
  118. package/dist/chunk-VBYIDRNU.js.map +1 -0
  119. package/dist/{chunk-GS5AUKUO.js → chunk-VHED2STW.js} +10 -7
  120. package/dist/chunk-VHED2STW.js.map +1 -0
  121. package/dist/{chunk-JZT4QGIP.js → chunk-VIICUPWQ.js} +1 -2
  122. package/dist/{chunk-JZT4QGIP.js.map → chunk-VIICUPWQ.js.map} +1 -1
  123. package/dist/{chunk-QCZ2XUKH.js → chunk-VLRSOWHP.js} +16 -14
  124. package/dist/chunk-VLRSOWHP.js.map +1 -0
  125. package/dist/{chunk-XWVDS66D.js → chunk-W5ZLIQFR.js} +182 -381
  126. package/dist/chunk-W5ZLIQFR.js.map +1 -0
  127. package/dist/{chunk-YGZMVNN5.js → chunk-WTSSEUOZ.js} +7 -2
  128. package/dist/chunk-WTSSEUOZ.js.map +1 -0
  129. package/dist/{chunk-OHROA3FQ.js → chunk-WWP2STF5.js} +7 -2
  130. package/dist/chunk-WWP2STF5.js.map +1 -0
  131. package/dist/{chunk-IK2L4EN3.js → chunk-XADEMW6B.js} +3 -3
  132. package/dist/{chunk-FQ33BYFR.js → chunk-XEMLYWHK.js} +3 -3
  133. package/dist/{chunk-OZAEWZZ3.js → chunk-XFSEADPC.js} +6 -2
  134. package/dist/chunk-XFSEADPC.js.map +1 -0
  135. package/dist/{chunk-TWGVQLG2.js → chunk-XUUSWR4U.js} +1 -2
  136. package/dist/{chunk-TWGVQLG2.js.map → chunk-XUUSWR4U.js.map} +1 -1
  137. package/dist/{chunk-XLQI4IT2.js → chunk-YBVMZ7SR.js} +7 -2
  138. package/dist/chunk-YBVMZ7SR.js.map +1 -0
  139. package/dist/{chunk-A7IVFIOP.js → chunk-YRJICL2Q.js} +14 -14
  140. package/dist/chunk-YRJICL2Q.js.map +1 -0
  141. package/dist/{chunk-ZGSER5TG.js → chunk-ZM44MGC5.js} +3 -3
  142. package/dist/{chunk-G2WCEUQL.js → chunk-ZMREYTHA.js} +15 -14
  143. package/dist/chunk-ZMREYTHA.js.map +1 -0
  144. package/dist/{chunk-H3I2KZIY.js → chunk-ZPB3SLPK.js} +1 -2
  145. package/dist/{chunk-H3I2KZIY.js.map → chunk-ZPB3SLPK.js.map} +1 -1
  146. package/dist/chunk-ZPZQXHW2.js +1230 -0
  147. package/dist/chunk-ZPZQXHW2.js.map +1 -0
  148. package/dist/{config-34LHOGLM.js → config-2LASFFRD.js} +2 -4
  149. package/dist/config-3WDIJPTG.js +9 -0
  150. package/dist/config-4QV4QYI5.js +9 -0
  151. package/dist/{config-ZFJYQZCH.js → config-54USUVSE.js} +2 -4
  152. package/dist/config-5ZXN2T2H.js +9 -0
  153. package/dist/config-A2GQYJDB.js +9 -0
  154. package/dist/config-BBOLI7VE.js +9 -0
  155. package/dist/{config-VM526IKB.js → config-BIBFLUIR.js} +2 -4
  156. package/dist/{config-EO23EY62.js → config-CPYFOUQO.js} +2 -4
  157. package/dist/{config-3IVQJBNW.js → config-DWSJL3NH.js} +2 -4
  158. package/dist/config-E22XAGYN.js +9 -0
  159. package/dist/config-EHE52ZTK.js +9 -0
  160. package/dist/{config-GE4W4ZJC.js → config-EX3ZJTZI.js} +2 -4
  161. package/dist/{config-QNMKWJ4M.js → config-FRK7ZL37.js} +2 -4
  162. package/dist/{config-LHFFXVYI.js → config-HQXNFQZS.js} +2 -4
  163. package/dist/config-HTXOOAOD.js +9 -0
  164. package/dist/{config-HKRMKD76.js → config-IPNWAJHH.js} +2 -4
  165. package/dist/config-J2C53GOT.js +9 -0
  166. package/dist/config-K63RX6EU.js +9 -0
  167. package/dist/config-L7SBSH5L.js +9 -0
  168. package/dist/config-LEALEMKA.js +9 -0
  169. package/dist/{config-IVY5EQQ2.js → config-M3Z47VYU.js} +2 -4
  170. package/dist/{config-EIHSP5DZ.js → config-MZM3IPFM.js} +2 -4
  171. package/dist/{config-GHRUKEQ6.js → config-OJ2BPESH.js} +2 -4
  172. package/dist/{config-WDAZFXYD.js → config-QO2XUME4.js} +2 -4
  173. package/dist/config-QWQGOXQ5.js +9 -0
  174. package/dist/config-RI7IEZUF.js +9 -0
  175. package/dist/{config-CVZ2AGCO.js → config-SPW6NESU.js} +2 -6
  176. package/dist/{config-QAA646XB.js → config-T2IUIU5C.js} +2 -4
  177. package/dist/{config-NV5WXP64.js → config-UU27ALAA.js} +2 -4
  178. package/dist/config-VKKZGC7V.js +9 -0
  179. package/dist/config-W7EVPJNK.js +11 -0
  180. package/dist/config-WKQ3FGTZ.js +9 -0
  181. package/dist/config-WVILHDFV.js +11 -0
  182. package/dist/{config-Q45Y46YT.js → config-XU6D5C7E.js} +2 -4
  183. package/dist/databricks_volume-ETRDJVVQ.js +7 -0
  184. package/dist/digitalocean-QP72DR4J.js +10 -0
  185. package/dist/discord-BSN5RB3E.js +8 -0
  186. package/dist/disk-24NWTN2I.js +7 -0
  187. package/dist/dropbox-OSTZXSIE.js +8 -0
  188. package/dist/email-4ZFPSWIN.js +8 -0
  189. package/dist/gcs-PFWR6MIW.js +10 -0
  190. package/dist/gdocs-GPAZRQG5.js +8 -0
  191. package/dist/gdrive-XSX6A7B3.js +8 -0
  192. package/dist/github-EQ4NXUTA.js +8 -0
  193. package/dist/github_ci-QL5B2Q2N.js +8 -0
  194. package/dist/gmail-2TBT4CVH.js +8 -0
  195. package/dist/gridfs-KZRZ6SIB.js +9 -0
  196. package/dist/gsheets-N53WEXN2.js +8 -0
  197. package/dist/gslides-TATSARTH.js +8 -0
  198. package/dist/hf_buckets-BK7NGJWS.js +10 -0
  199. package/dist/hf_datasets-UQ5QGM4L.js +10 -0
  200. package/dist/hf_models-75LFCQCS.js +10 -0
  201. package/dist/hf_spaces-6T2KB3UC.js +10 -0
  202. package/dist/index.d.ts +494 -40
  203. package/dist/index.js +1193 -388
  204. package/dist/index.js.map +1 -1
  205. package/dist/langfuse-AMQCQWNE.js +8 -0
  206. package/dist/linear-V3TXO6CV.js +8 -0
  207. package/dist/minio-IZRZY4C5.js +10 -0
  208. package/dist/mongodb-VMKPQCPX.js +7 -0
  209. package/dist/nextcloud-5RHQCGDO.js +9 -0
  210. package/dist/notion-6PPNTQFM.js +8 -0
  211. package/dist/oci-CKYBSFZJ.js +10 -0
  212. package/dist/postgres-WIQBVL5M.js +7 -0
  213. package/dist/qingstor-AP4IIPLY.js +10 -0
  214. package/dist/r2-C4XGEWQY.js +10 -0
  215. package/dist/redis-6D55Q2WB.js +8 -0
  216. package/dist/s3-XQBI2CXN.js +8 -0
  217. package/dist/scaleway-SEZJVURB.js +10 -0
  218. package/dist/seaweedfs-3XYIAFU2.js +10 -0
  219. package/dist/slack-ZHXDJQY4.js +8 -0
  220. package/dist/ssh-X2MO7JOV.js +8 -0
  221. package/dist/supabase-BBM44UTM.js +10 -0
  222. package/dist/supabase-BBM44UTM.js.map +1 -0
  223. package/dist/tencent-X72USLJ7.js +10 -0
  224. package/dist/tencent-X72USLJ7.js.map +1 -0
  225. package/dist/trello-EER5NG7L.js +8 -0
  226. package/dist/trello-EER5NG7L.js.map +1 -0
  227. package/dist/wasabi-O4MVIUFG.js +10 -0
  228. package/dist/wasabi-O4MVIUFG.js.map +1 -0
  229. package/package.json +4 -2
  230. package/dist/aliyun-JMJ3PFYY.js +0 -10
  231. package/dist/backblaze-TDFD23QO.js +0 -10
  232. package/dist/box-GQ2U2R6R.js +0 -8
  233. package/dist/ceph-S2VOYO6G.js +0 -10
  234. package/dist/chunk-2CC5VW7K.js.map +0 -1
  235. package/dist/chunk-A7IVFIOP.js.map +0 -1
  236. package/dist/chunk-B2ZOKNN4.js.map +0 -1
  237. package/dist/chunk-DP2PP5V2.js.map +0 -1
  238. package/dist/chunk-DYXEITK3.js.map +0 -1
  239. package/dist/chunk-EGB7V74Z.js.map +0 -1
  240. package/dist/chunk-EM4J5EQS.js.map +0 -1
  241. package/dist/chunk-EZQ5HBAC.js.map +0 -1
  242. package/dist/chunk-G2WCEUQL.js.map +0 -1
  243. package/dist/chunk-GCFYZSVR.js.map +0 -1
  244. package/dist/chunk-GS5AUKUO.js.map +0 -1
  245. package/dist/chunk-IDYHQQOH.js.map +0 -1
  246. package/dist/chunk-JAGJTM3Q.js.map +0 -1
  247. package/dist/chunk-JALIYI6M.js.map +0 -1
  248. package/dist/chunk-JCC4CU2I.js.map +0 -1
  249. package/dist/chunk-LAJJPLEV.js.map +0 -1
  250. package/dist/chunk-LV2G7VHL.js.map +0 -1
  251. package/dist/chunk-M5FVUIYP.js.map +0 -1
  252. package/dist/chunk-MPCCRRE6.js.map +0 -1
  253. package/dist/chunk-NJMGCT63.js.map +0 -1
  254. package/dist/chunk-NOHWIBRX.js.map +0 -1
  255. package/dist/chunk-OHROA3FQ.js.map +0 -1
  256. package/dist/chunk-OPYQ5KIO.js.map +0 -1
  257. package/dist/chunk-OZAEWZZ3.js.map +0 -1
  258. package/dist/chunk-Q2IAILVC.js.map +0 -1
  259. package/dist/chunk-QCZ2XUKH.js.map +0 -1
  260. package/dist/chunk-QGRDPSAH.js.map +0 -1
  261. package/dist/chunk-RNQN2FOU.js.map +0 -1
  262. package/dist/chunk-RO5IQEDQ.js.map +0 -1
  263. package/dist/chunk-RQK5UPMP.js.map +0 -1
  264. package/dist/chunk-S5OVP467.js.map +0 -1
  265. package/dist/chunk-SFUCUARB.js.map +0 -1
  266. package/dist/chunk-SWCDFEUK.js.map +0 -1
  267. package/dist/chunk-TA3WMOMU.js.map +0 -1
  268. package/dist/chunk-TURD42QO.js +0 -1782
  269. package/dist/chunk-TURD42QO.js.map +0 -1
  270. package/dist/chunk-U6QSXTUS.js +0 -7
  271. package/dist/chunk-U6QSXTUS.js.map +0 -1
  272. package/dist/chunk-UGK4TAVK.js.map +0 -1
  273. package/dist/chunk-UT2OPSN4.js.map +0 -1
  274. package/dist/chunk-VGLHY6BK.js.map +0 -1
  275. package/dist/chunk-VWKUT4CW.js.map +0 -1
  276. package/dist/chunk-WAR4Q2NM.js.map +0 -1
  277. package/dist/chunk-WHFUWWI6.js +0 -2097
  278. package/dist/chunk-WHFUWWI6.js.map +0 -1
  279. package/dist/chunk-XGJ2QERC.js.map +0 -1
  280. package/dist/chunk-XHCBHYN4.js.map +0 -1
  281. package/dist/chunk-XLQI4IT2.js.map +0 -1
  282. package/dist/chunk-XWVDS66D.js.map +0 -1
  283. package/dist/chunk-YGZMVNN5.js.map +0 -1
  284. package/dist/chunk-ZEGAMJO2.js.map +0 -1
  285. package/dist/chunk-ZNWVJ6UW.js.map +0 -1
  286. package/dist/config-3BBWD5AB.js +0 -11
  287. package/dist/config-4UDVSUQJ.js +0 -11
  288. package/dist/config-CMDBAPDH.js +0 -11
  289. package/dist/config-D3RLSPNF.js +0 -11
  290. package/dist/config-DG65OEG3.js +0 -11
  291. package/dist/config-GCQK6NJY.js +0 -11
  292. package/dist/config-GVH27UPE.js +0 -11
  293. package/dist/config-HXVYIXP5.js +0 -11
  294. package/dist/config-IDZMEW73.js +0 -11
  295. package/dist/config-IJJXGLBQ.js +0 -11
  296. package/dist/config-KJOLGVB2.js +0 -11
  297. package/dist/config-KMVCVBYN.js +0 -15
  298. package/dist/config-KYTRXAB2.js +0 -15
  299. package/dist/config-OT2TQQCN.js +0 -11
  300. package/dist/config-QWCY3LBQ.js +0 -11
  301. package/dist/config-ZV6G2ZEC.js +0 -11
  302. package/dist/databricks_volume-7XOUYSTY.js +0 -7
  303. package/dist/digitalocean-3CQ4CPPZ.js +0 -10
  304. package/dist/discord-BG7OSRJG.js +0 -8
  305. package/dist/disk-XVLBCVKE.js +0 -8
  306. package/dist/dropbox-74GYLV3R.js +0 -8
  307. package/dist/email-5IZ7OBQ4.js +0 -8
  308. package/dist/gcs-EMEYU2XT.js +0 -10
  309. package/dist/gdocs-R67TDPON.js +0 -8
  310. package/dist/gdrive-PRN2ALRK.js +0 -8
  311. package/dist/github-DV7E6OFV.js +0 -8
  312. package/dist/github_ci-Q554V5PA.js +0 -8
  313. package/dist/gmail-OLN2LT4O.js +0 -8
  314. package/dist/gsheets-H4RYMQJ5.js +0 -8
  315. package/dist/gslides-YLCHKJOM.js +0 -8
  316. package/dist/hf_buckets-DTKXKKFF.js +0 -10
  317. package/dist/hf_datasets-55C4APKR.js +0 -10
  318. package/dist/hf_models-RO5JR36V.js +0 -10
  319. package/dist/hf_spaces-ZVZ3EDRX.js +0 -10
  320. package/dist/langfuse-ACASJZ7O.js +0 -8
  321. package/dist/linear-IC37LZV7.js +0 -8
  322. package/dist/minio-HZ576XFQ.js +0 -10
  323. package/dist/mongodb-JVR62OIO.js +0 -7
  324. package/dist/notion-HKRPQMJS.js +0 -8
  325. package/dist/oci-ZLVECXTW.js +0 -10
  326. package/dist/postgres-P36Z2YN4.js +0 -7
  327. package/dist/qingstor-YLP6K3L4.js +0 -10
  328. package/dist/r2-RPK25ANI.js +0 -10
  329. package/dist/redis-V5ULXULL.js +0 -8
  330. package/dist/s3-4OIOCAAT.js +0 -8
  331. package/dist/scaleway-CCWCLUHB.js +0 -10
  332. package/dist/seaweedfs-QSWKF2FN.js +0 -10
  333. package/dist/slack-YPS7PII3.js +0 -8
  334. package/dist/ssh-YFP3SMTJ.js +0 -9
  335. package/dist/supabase-6CFTOKGZ.js +0 -10
  336. package/dist/tencent-IWZZOSQ4.js +0 -10
  337. package/dist/trello-XYKWZD6P.js +0 -8
  338. package/dist/wasabi-6Z4DC5S5.js +0 -10
  339. /package/dist/{aliyun-JMJ3PFYY.js.map → aliyun-PGI57A43.js.map} +0 -0
  340. /package/dist/{backblaze-TDFD23QO.js.map → backblaze-TSPL6Y56.js.map} +0 -0
  341. /package/dist/{box-GQ2U2R6R.js.map → box-7XTZYDSO.js.map} +0 -0
  342. /package/dist/{ceph-S2VOYO6G.js.map → ceph-C265UI5T.js.map} +0 -0
  343. /package/dist/{chunk-I5THIMPP.js.map → chunk-25W4XQJZ.js.map} +0 -0
  344. /package/dist/{chunk-HJJMP6IX.js.map → chunk-4M73WHIE.js.map} +0 -0
  345. /package/dist/{chunk-7CW3BMPH.js.map → chunk-4X6CLF4F.js.map} +0 -0
  346. /package/dist/{chunk-QQBJC2FQ.js.map → chunk-5I7Q7RHW.js.map} +0 -0
  347. /package/dist/{chunk-X5HF2OFP.js.map → chunk-BWWU5T2D.js.map} +0 -0
  348. /package/dist/{chunk-KPULTUOK.js.map → chunk-CXQGMFI7.js.map} +0 -0
  349. /package/dist/{chunk-N5FSLVKO.js.map → chunk-DXU7NZPH.js.map} +0 -0
  350. /package/dist/{chunk-YAHRT6MB.js.map → chunk-EGZNOUMH.js.map} +0 -0
  351. /package/dist/{chunk-HGCRXJGP.js.map → chunk-F5NWRF32.js.map} +0 -0
  352. /package/dist/{chunk-3WIO7NBR.js.map → chunk-L4GMDSMB.js.map} +0 -0
  353. /package/dist/{chunk-47AVIIOT.js.map → chunk-L7FEZ7LU.js.map} +0 -0
  354. /package/dist/{chunk-AUHSTJJ3.js.map → chunk-NLXJMXVE.js.map} +0 -0
  355. /package/dist/{chunk-X3G37FXT.js.map → chunk-SYMNWNC3.js.map} +0 -0
  356. /package/dist/{chunk-DM4GSE26.js.map → chunk-TUNR4VUM.js.map} +0 -0
  357. /package/dist/{chunk-UINQOUZR.js.map → chunk-V7JVMG63.js.map} +0 -0
  358. /package/dist/{chunk-IK2L4EN3.js.map → chunk-XADEMW6B.js.map} +0 -0
  359. /package/dist/{chunk-FQ33BYFR.js.map → chunk-XEMLYWHK.js.map} +0 -0
  360. /package/dist/{chunk-ZGSER5TG.js.map → chunk-ZM44MGC5.js.map} +0 -0
  361. /package/dist/{config-34LHOGLM.js.map → config-2LASFFRD.js.map} +0 -0
  362. /package/dist/{config-3BBWD5AB.js.map → config-3WDIJPTG.js.map} +0 -0
  363. /package/dist/{config-3IVQJBNW.js.map → config-4QV4QYI5.js.map} +0 -0
  364. /package/dist/{config-4UDVSUQJ.js.map → config-54USUVSE.js.map} +0 -0
  365. /package/dist/{config-CMDBAPDH.js.map → config-5ZXN2T2H.js.map} +0 -0
  366. /package/dist/{config-CVZ2AGCO.js.map → config-A2GQYJDB.js.map} +0 -0
  367. /package/dist/{config-D3RLSPNF.js.map → config-BBOLI7VE.js.map} +0 -0
  368. /package/dist/{config-DG65OEG3.js.map → config-BIBFLUIR.js.map} +0 -0
  369. /package/dist/{config-EIHSP5DZ.js.map → config-CPYFOUQO.js.map} +0 -0
  370. /package/dist/{config-EO23EY62.js.map → config-DWSJL3NH.js.map} +0 -0
  371. /package/dist/{config-GCQK6NJY.js.map → config-E22XAGYN.js.map} +0 -0
  372. /package/dist/{config-GE4W4ZJC.js.map → config-EHE52ZTK.js.map} +0 -0
  373. /package/dist/{config-GHRUKEQ6.js.map → config-EX3ZJTZI.js.map} +0 -0
  374. /package/dist/{config-GVH27UPE.js.map → config-FRK7ZL37.js.map} +0 -0
  375. /package/dist/{config-HKRMKD76.js.map → config-HQXNFQZS.js.map} +0 -0
  376. /package/dist/{config-HXVYIXP5.js.map → config-HTXOOAOD.js.map} +0 -0
  377. /package/dist/{config-IDZMEW73.js.map → config-IPNWAJHH.js.map} +0 -0
  378. /package/dist/{config-IJJXGLBQ.js.map → config-J2C53GOT.js.map} +0 -0
  379. /package/dist/{config-IVY5EQQ2.js.map → config-K63RX6EU.js.map} +0 -0
  380. /package/dist/{config-KJOLGVB2.js.map → config-L7SBSH5L.js.map} +0 -0
  381. /package/dist/{config-KMVCVBYN.js.map → config-LEALEMKA.js.map} +0 -0
  382. /package/dist/{config-KYTRXAB2.js.map → config-M3Z47VYU.js.map} +0 -0
  383. /package/dist/{config-LHFFXVYI.js.map → config-MZM3IPFM.js.map} +0 -0
  384. /package/dist/{config-NV5WXP64.js.map → config-OJ2BPESH.js.map} +0 -0
  385. /package/dist/{config-OT2TQQCN.js.map → config-QO2XUME4.js.map} +0 -0
  386. /package/dist/{config-Q45Y46YT.js.map → config-QWQGOXQ5.js.map} +0 -0
  387. /package/dist/{config-QAA646XB.js.map → config-RI7IEZUF.js.map} +0 -0
  388. /package/dist/{config-QNMKWJ4M.js.map → config-SPW6NESU.js.map} +0 -0
  389. /package/dist/{config-QWCY3LBQ.js.map → config-T2IUIU5C.js.map} +0 -0
  390. /package/dist/{config-VM526IKB.js.map → config-UU27ALAA.js.map} +0 -0
  391. /package/dist/{config-WDAZFXYD.js.map → config-VKKZGC7V.js.map} +0 -0
  392. /package/dist/{config-ZFJYQZCH.js.map → config-W7EVPJNK.js.map} +0 -0
  393. /package/dist/{config-ZV6G2ZEC.js.map → config-WKQ3FGTZ.js.map} +0 -0
  394. /package/dist/{databricks_volume-7XOUYSTY.js.map → config-WVILHDFV.js.map} +0 -0
  395. /package/dist/{digitalocean-3CQ4CPPZ.js.map → config-XU6D5C7E.js.map} +0 -0
  396. /package/dist/{discord-BG7OSRJG.js.map → databricks_volume-ETRDJVVQ.js.map} +0 -0
  397. /package/dist/{disk-XVLBCVKE.js.map → digitalocean-QP72DR4J.js.map} +0 -0
  398. /package/dist/{dropbox-74GYLV3R.js.map → discord-BSN5RB3E.js.map} +0 -0
  399. /package/dist/{email-5IZ7OBQ4.js.map → disk-24NWTN2I.js.map} +0 -0
  400. /package/dist/{gcs-EMEYU2XT.js.map → dropbox-OSTZXSIE.js.map} +0 -0
  401. /package/dist/{gdocs-R67TDPON.js.map → email-4ZFPSWIN.js.map} +0 -0
  402. /package/dist/{gdrive-PRN2ALRK.js.map → gcs-PFWR6MIW.js.map} +0 -0
  403. /package/dist/{github-DV7E6OFV.js.map → gdocs-GPAZRQG5.js.map} +0 -0
  404. /package/dist/{github_ci-Q554V5PA.js.map → gdrive-XSX6A7B3.js.map} +0 -0
  405. /package/dist/{gmail-OLN2LT4O.js.map → github-EQ4NXUTA.js.map} +0 -0
  406. /package/dist/{gsheets-H4RYMQJ5.js.map → github_ci-QL5B2Q2N.js.map} +0 -0
  407. /package/dist/{gslides-YLCHKJOM.js.map → gmail-2TBT4CVH.js.map} +0 -0
  408. /package/dist/{hf_buckets-DTKXKKFF.js.map → gridfs-KZRZ6SIB.js.map} +0 -0
  409. /package/dist/{hf_datasets-55C4APKR.js.map → gsheets-N53WEXN2.js.map} +0 -0
  410. /package/dist/{hf_models-RO5JR36V.js.map → gslides-TATSARTH.js.map} +0 -0
  411. /package/dist/{hf_spaces-ZVZ3EDRX.js.map → hf_buckets-BK7NGJWS.js.map} +0 -0
  412. /package/dist/{langfuse-ACASJZ7O.js.map → hf_datasets-UQ5QGM4L.js.map} +0 -0
  413. /package/dist/{linear-IC37LZV7.js.map → hf_models-75LFCQCS.js.map} +0 -0
  414. /package/dist/{minio-HZ576XFQ.js.map → hf_spaces-6T2KB3UC.js.map} +0 -0
  415. /package/dist/{mongodb-JVR62OIO.js.map → langfuse-AMQCQWNE.js.map} +0 -0
  416. /package/dist/{notion-HKRPQMJS.js.map → linear-V3TXO6CV.js.map} +0 -0
  417. /package/dist/{oci-ZLVECXTW.js.map → minio-IZRZY4C5.js.map} +0 -0
  418. /package/dist/{postgres-P36Z2YN4.js.map → mongodb-VMKPQCPX.js.map} +0 -0
  419. /package/dist/{qingstor-YLP6K3L4.js.map → nextcloud-5RHQCGDO.js.map} +0 -0
  420. /package/dist/{r2-RPK25ANI.js.map → notion-6PPNTQFM.js.map} +0 -0
  421. /package/dist/{redis-V5ULXULL.js.map → oci-CKYBSFZJ.js.map} +0 -0
  422. /package/dist/{s3-4OIOCAAT.js.map → postgres-WIQBVL5M.js.map} +0 -0
  423. /package/dist/{scaleway-CCWCLUHB.js.map → qingstor-AP4IIPLY.js.map} +0 -0
  424. /package/dist/{seaweedfs-QSWKF2FN.js.map → r2-C4XGEWQY.js.map} +0 -0
  425. /package/dist/{slack-YPS7PII3.js.map → redis-6D55Q2WB.js.map} +0 -0
  426. /package/dist/{ssh-YFP3SMTJ.js.map → s3-XQBI2CXN.js.map} +0 -0
  427. /package/dist/{supabase-6CFTOKGZ.js.map → scaleway-SEZJVURB.js.map} +0 -0
  428. /package/dist/{tencent-IWZZOSQ4.js.map → seaweedfs-3XYIAFU2.js.map} +0 -0
  429. /package/dist/{trello-XYKWZD6P.js.map → slack-ZHXDJQY4.js.map} +0 -0
  430. /package/dist/{wasabi-6Z4DC5S5.js.map → ssh-X2MO7JOV.js.map} +0 -0
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  loadOptionalPeer
3
- } from "./chunk-E2ISWXLB.js";
3
+ } from "./chunk-OQKNDS66.js";
4
4
 
5
5
  // src/resource/redis/redis.ts
6
6
  import {
7
7
  BaseResource,
8
- PathSpec as PathSpec2,
8
+ PathSpec,
9
9
  REDACTED_SECRET,
10
- ResourceName as ResourceName21
10
+ ResourceName as ResourceName7,
11
+ makeResolveGlob,
12
+ mountKey,
13
+ mountPrefixOf as mountPrefixOf2
11
14
  } from "@struktoai/mirage-core";
12
15
 
13
16
  // src/commands/builtin/redis/index.ts
@@ -30,7 +33,7 @@ function nowIso() {
30
33
  // src/core/redis/read.ts
31
34
  async function read(accessor, path, _index) {
32
35
  const start = performance.now();
33
- const p = norm(path.stripPrefix);
36
+ const p = norm(path.mountPath);
34
37
  const data = await accessor.store.getFile(p);
35
38
  if (data === null) {
36
39
  throw enoent(path);
@@ -46,36 +49,76 @@ import {
46
49
  guessType
47
50
  } from "@struktoai/mirage-core";
48
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;
58
+ }
59
+ if (raw.atime !== void 0) out.atime = raw.atime;
60
+ return out;
61
+ }
49
62
  async function stat(accessor, path, _index) {
50
- const p = norm(path.stripPrefix);
63
+ const p = norm(path.mountPath);
51
64
  const store = accessor.store;
52
65
  if (await store.hasDir(p)) {
66
+ const attrs = decodeAttrs(await store.getAttrs(p));
53
67
  return new FileStat({
54
68
  name: gnuBasename(p),
55
69
  modified: await store.getModified(p),
56
- type: FileType.DIRECTORY
70
+ type: FileType.DIRECTORY,
71
+ mode: attrs.mode ?? null,
72
+ uid: attrs.uid ?? null,
73
+ gid: attrs.gid ?? null,
74
+ atime: attrs.atime ?? null
57
75
  });
58
76
  }
59
77
  if (await store.hasFile(p)) {
60
78
  const size = await store.fileLen(p);
79
+ const attrs = decodeAttrs(await store.getAttrs(p));
61
80
  return new FileStat({
62
81
  name: gnuBasename(p),
63
82
  size,
64
83
  modified: await store.getModified(p),
65
- type: guessType(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
66
89
  });
67
90
  }
68
91
  throw enoent2(path);
69
92
  }
70
93
 
94
+ // src/core/redis/append.ts
95
+ import { ResourceName as ResourceName2, invalidateAfterWrite, record as record2 } from "@struktoai/mirage-core";
96
+ async function appendBytes(accessor, path, data) {
97
+ const start = performance.now();
98
+ const p = norm(path.mountPath);
99
+ const store = accessor.store;
100
+ const existing = await store.getFile(p);
101
+ if (existing !== null) {
102
+ const merged = new Uint8Array(existing.byteLength + data.byteLength);
103
+ merged.set(existing, 0);
104
+ merged.set(data, existing.byteLength);
105
+ await store.setFile(p, merged);
106
+ } else {
107
+ await store.setFile(p, data);
108
+ }
109
+ await store.setModified(p, nowIso());
110
+ record2("append", p, ResourceName2.REDIS, data.byteLength, start);
111
+ await invalidateAfterWrite(p);
112
+ }
113
+
71
114
  // src/core/redis/constants.ts
72
115
  var SCOPE_ERROR = 5e4;
73
116
 
74
117
  // src/core/redis/copy.ts
75
- import { invalidateAfterWrite } from "@struktoai/mirage-core";
118
+ import { invalidateAfterWrite as invalidateAfterWrite2 } from "@struktoai/mirage-core";
76
119
  async function copy(accessor, src, dst) {
77
- const s = norm(src.stripPrefix);
78
- const d = norm(dst.stripPrefix);
120
+ const s = norm(src.mountPath);
121
+ const d = norm(dst.mountPath);
79
122
  const store = accessor.store;
80
123
  const data = await store.getFile(s);
81
124
  if (data === null) {
@@ -83,13 +126,23 @@ async function copy(accessor, src, dst) {
83
126
  }
84
127
  await store.setFile(d, data);
85
128
  await store.setModified(d, nowIso());
86
- await invalidateAfterWrite(dst);
129
+ await invalidateAfterWrite2(dst);
130
+ }
131
+
132
+ // src/core/redis/create.ts
133
+ import { invalidateAfterWrite as invalidateAfterWrite3 } from "@struktoai/mirage-core";
134
+ async function create(accessor, path) {
135
+ const p = norm(path.mountPath);
136
+ const store = accessor.store;
137
+ await store.setFile(p, new Uint8Array(0));
138
+ await store.setModified(p, nowIso());
139
+ await invalidateAfterWrite3(path);
87
140
  }
88
141
 
89
142
  // src/core/redis/du.ts
90
143
  import { rstripSlash } from "@struktoai/mirage-core";
91
144
  async function du(accessor, path) {
92
- const p = norm(path.stripPrefix);
145
+ const p = norm(path.mountPath);
93
146
  const store = accessor.store;
94
147
  const prefix = rstripSlash(p) + "/";
95
148
  let total = 0;
@@ -101,7 +154,7 @@ async function du(accessor, path) {
101
154
  return total;
102
155
  }
103
156
  async function duAll(accessor, path) {
104
- const p = norm(path.stripPrefix);
157
+ const p = norm(path.mountPath);
105
158
  const store = accessor.store;
106
159
  const prefix = rstripSlash(p) + "/";
107
160
  const entries = [];
@@ -118,7 +171,7 @@ async function duAll(accessor, path) {
118
171
 
119
172
  // src/core/redis/exists.ts
120
173
  async function exists(accessor, path) {
121
- const p = norm(path.stripPrefix);
174
+ const p = norm(path.mountPath);
122
175
  const store = accessor.store;
123
176
  return await store.hasFile(p) || await store.hasDir(p);
124
177
  }
@@ -133,8 +186,8 @@ import {
133
186
  startBasename
134
187
  } from "@struktoai/mirage-core";
135
188
  async function find(accessor, path, options = {}) {
136
- const p = norm(path.stripPrefix);
137
- const startName = startBasename(path.original);
189
+ const p = norm(path.mountPath);
190
+ const startName = startBasename(path.virtual);
138
191
  const store = accessor.store;
139
192
  const prefix = rstripSlash2(p) + "/";
140
193
  const baseDepth = p === "/" ? 0 : (p.match(/\//g) ?? []).length;
@@ -183,12 +236,10 @@ async function find(accessor, path, options = {}) {
183
236
  isEmpty = kind === "f" ? await store.fileLen(key) === 0 : !nonempty.has(key);
184
237
  }
185
238
  if (!keep({ key, name: basename, kind, depth, isEmpty }, tree, options.minDepth)) continue;
186
- if (kind === "f" && (options.minSize !== null && options.minSize !== void 0 || options.maxSize !== null && options.maxSize !== void 0)) {
187
- const size = await store.fileLen(key);
188
- if (options.minSize !== null && options.minSize !== void 0 && size < options.minSize)
189
- continue;
190
- if (options.maxSize !== null && options.maxSize !== void 0 && size > options.maxSize)
191
- continue;
239
+ 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;
192
243
  }
193
244
  results.push(key);
194
245
  }
@@ -210,10 +261,10 @@ async function find(accessor, path, options = {}) {
210
261
  }
211
262
 
212
263
  // src/core/redis/mkdir.ts
213
- import { invalidateAfterWrite as invalidateAfterWrite2 } from "@struktoai/mirage-core";
264
+ import { invalidateAfterWrite as invalidateAfterWrite4, invalidateAncestors } from "@struktoai/mirage-core";
214
265
  import { stripSlash } from "@struktoai/mirage-core";
215
266
  async function mkdir(accessor, path, parents = false) {
216
- const p = norm(path.stripPrefix);
267
+ const p = norm(path.mountPath);
217
268
  const store = accessor.store;
218
269
  if (parents) {
219
270
  const parts = stripSlash(p).split("/");
@@ -227,6 +278,8 @@ async function mkdir(accessor, path, parents = false) {
227
278
  await store.setModified(current, now);
228
279
  }
229
280
  }
281
+ await invalidateAfterWrite4(p);
282
+ await invalidateAncestors(path);
230
283
  return;
231
284
  }
232
285
  const par = parent(p);
@@ -235,11 +288,14 @@ async function mkdir(accessor, path, parents = false) {
235
288
  }
236
289
  await store.addDir(p);
237
290
  await store.setModified(p, nowIso());
238
- await invalidateAfterWrite2(p);
291
+ await invalidateAfterWrite4(p);
239
292
  }
240
293
 
241
294
  // src/core/redis/readdir.ts
242
- import "@struktoai/mirage-core";
295
+ import {
296
+ mountPrefixOf,
297
+ rstripSlash as rstripSlash3
298
+ } from "@struktoai/mirage-core";
243
299
  import { enotdir } from "@struktoai/mirage-core";
244
300
 
245
301
  // src/core/redis/entry.ts
@@ -249,7 +305,10 @@ var RedisResourceType = Object.freeze({
249
305
  FOLDER: "folder"
250
306
  });
251
307
  var RedisIndexEntry = class _RedisIndexEntry extends IndexEntry {
252
- static file(path, size = 0) {
308
+ // size defaults to null, not 0: a readdir knows a key exists but not
309
+ // its length, and a lying 0 would be trusted by index-first size
310
+ // lookups (provision estimates) over a real stat.
311
+ static file(path, size = null) {
253
312
  const name = path.slice(path.lastIndexOf("/") + 1);
254
313
  return new _RedisIndexEntry({
255
314
  id: path,
@@ -272,9 +331,9 @@ var RedisIndexEntry = class _RedisIndexEntry extends IndexEntry {
272
331
 
273
332
  // src/core/redis/readdir.ts
274
333
  async function readdir(accessor, path, index) {
275
- const virtual = path.pattern !== null ? path.directory : path.stripPrefix;
276
- const mountPrefix = path.prefix;
277
- const virtualKey = mountPrefix + virtual;
334
+ const virtual = path.pattern !== null ? path.directory : path.mountPath;
335
+ const mountPrefix = mountPrefixOf(path.virtual, path.resourcePath);
336
+ const virtualKey = rstripSlash3(mountPrefix + virtual) || "/";
278
337
  if (index !== void 0) {
279
338
  const cached = await index.listDir(virtualKey);
280
339
  if (cached.entries !== void 0 && cached.entries !== null) {
@@ -311,61 +370,71 @@ async function readdir(accessor, path, index) {
311
370
  }
312
371
 
313
372
  // src/core/redis/rename.ts
314
- import { invalidateAfterUnlink, invalidateAfterWrite as invalidateAfterWrite3 } from "@struktoai/mirage-core";
315
- import { rstripSlash as rstripSlash3 } from "@struktoai/mirage-core";
373
+ import { invalidateAfterUnlink, invalidateAfterWrite as invalidateAfterWrite5 } from "@struktoai/mirage-core";
374
+ import { rstripSlash as rstripSlash4 } from "@struktoai/mirage-core";
316
375
  async function rename(accessor, src, dst) {
317
- const s = norm(src.stripPrefix);
318
- const d = norm(dst.stripPrefix);
376
+ const s = norm(src.mountPath);
377
+ const d = norm(dst.mountPath);
319
378
  const now = nowIso();
320
379
  const store = accessor.store;
321
380
  if (await store.hasFile(s)) {
322
381
  const data = await store.getFile(s);
323
382
  const mod = await store.getModified(s);
383
+ const attrs = await store.getAttrs(s);
324
384
  if (data === null) throw new Error(`file not found: ${s}`);
325
385
  await store.delFile(s);
326
386
  await store.delModified(s);
387
+ await store.delAttrs(s);
327
388
  await store.setFile(d, data);
328
389
  await store.setModified(d, mod ?? now);
390
+ if (Object.keys(attrs).length > 0) await store.setAttrs(d, attrs);
329
391
  await invalidateAfterUnlink(s);
330
- await invalidateAfterWrite3(d);
392
+ await invalidateAfterWrite5(d);
331
393
  return;
332
394
  }
333
395
  if (await store.hasDir(s)) {
334
396
  const mod = await store.getModified(s);
397
+ const attrs = await store.getAttrs(s);
335
398
  await store.removeDir(s);
336
399
  await store.delModified(s);
400
+ await store.delAttrs(s);
337
401
  await store.addDir(d);
338
402
  await store.setModified(d, mod ?? now);
339
- const prefix = rstripSlash3(s) + "/";
340
- const dPrefix = rstripSlash3(d) + "/";
403
+ if (Object.keys(attrs).length > 0) await store.setAttrs(d, attrs);
404
+ const prefix = rstripSlash4(s) + "/";
405
+ const dPrefix = rstripSlash4(d) + "/";
341
406
  const files = await store.listFiles();
342
407
  for (const key of files) {
343
408
  if (key.startsWith(prefix)) {
344
409
  const newKey = dPrefix + key.slice(prefix.length);
345
410
  const data = await store.getFile(key);
346
411
  if (data === null) continue;
412
+ const subAttrs = await store.getAttrs(key);
347
413
  await store.delFile(key);
414
+ await store.delAttrs(key);
348
415
  await store.setFile(newKey, data);
416
+ if (Object.keys(subAttrs).length > 0) await store.setAttrs(newKey, subAttrs);
349
417
  }
350
418
  }
351
419
  await invalidateAfterUnlink(s);
352
- await invalidateAfterWrite3(d);
420
+ await invalidateAfterWrite5(d);
353
421
  return;
354
422
  }
355
423
  throw new Error(`file not found: ${s}`);
356
424
  }
357
425
 
358
426
  // src/core/redis/rm.ts
359
- import { invalidateAfterUnlink as invalidateAfterUnlink2, rstripSlash as rstripSlash4 } from "@struktoai/mirage-core";
427
+ import { invalidateAfterUnlink as invalidateAfterUnlink2, rstripSlash as rstripSlash5 } from "@struktoai/mirage-core";
360
428
  async function rmR(accessor, path) {
361
- const p = norm(path.stripPrefix);
429
+ const p = norm(path.mountPath);
362
430
  const store = accessor.store;
363
- const prefix = rstripSlash4(p) + "/";
431
+ const prefix = rstripSlash5(p) + "/";
364
432
  const files = await store.listFiles();
365
433
  for (const key of files) {
366
434
  if (key === p || key.startsWith(prefix)) {
367
435
  await store.delFile(key);
368
436
  await store.delModified(key);
437
+ await store.delAttrs(key);
369
438
  }
370
439
  }
371
440
  const dirs = await store.listDirs();
@@ -373,20 +442,21 @@ async function rmR(accessor, path) {
373
442
  if (key === p || key.startsWith(prefix)) {
374
443
  await store.removeDir(key);
375
444
  await store.delModified(key);
445
+ await store.delAttrs(key);
376
446
  }
377
447
  }
378
448
  await invalidateAfterUnlink2(path);
379
449
  }
380
450
 
381
451
  // src/core/redis/rmdir.ts
382
- import { invalidateAfterUnlink as invalidateAfterUnlink3, rstripSlash as rstripSlash5 } from "@struktoai/mirage-core";
452
+ import { invalidateAfterUnlink as invalidateAfterUnlink3, rstripSlash as rstripSlash6 } from "@struktoai/mirage-core";
383
453
  async function rmdir(accessor, path) {
384
- const p = norm(path.stripPrefix);
454
+ const p = norm(path.mountPath);
385
455
  const store = accessor.store;
386
456
  if (!await store.hasDir(p)) {
387
457
  throw new Error(`not a directory: ${p}`);
388
458
  }
389
- const prefix = rstripSlash5(p) + "/";
459
+ const prefix = rstripSlash6(p) + "/";
390
460
  const files = await store.listFiles();
391
461
  const dirs = await store.listDirs();
392
462
  const candidates = [...files, ...dirs];
@@ -399,39 +469,77 @@ async function rmdir(accessor, path) {
399
469
  await invalidateAfterUnlink3(path);
400
470
  }
401
471
 
472
+ // src/core/redis/set_attrs.ts
473
+ import { enoent as enoent3 } from "@struktoai/mirage-core";
474
+ async function setAttrs(accessor, path, fields) {
475
+ const store = accessor.store;
476
+ const p = norm(path.mountPath);
477
+ if (!await store.hasFile(p) && !await store.hasDir(p)) {
478
+ throw enoent3(path);
479
+ }
480
+ const encoded = {};
481
+ if (fields.mode !== void 0) encoded.mode = String(fields.mode);
482
+ if (fields.uid !== void 0) encoded.uid = String(fields.uid);
483
+ if (fields.gid !== void 0) encoded.gid = String(fields.gid);
484
+ if (fields.atime !== void 0) encoded.atime = fields.atime;
485
+ if (Object.keys(encoded).length > 0) {
486
+ await store.setAttrs(p, encoded);
487
+ }
488
+ if (fields.mtime !== void 0) {
489
+ await store.setModified(p, fields.mtime);
490
+ }
491
+ return {};
492
+ }
493
+
402
494
  // src/core/redis/stream.ts
403
495
  import {
404
496
  recordStream,
405
- ResourceName as ResourceName2
497
+ ResourceName as ResourceName3
406
498
  } from "@struktoai/mirage-core";
407
- import { enoent as enoent3 } from "@struktoai/mirage-core";
499
+ import { enoent as enoent4 } from "@struktoai/mirage-core";
408
500
  async function* stream(accessor, path, _index) {
409
- const p = norm(path.stripPrefix);
501
+ const p = norm(path.mountPath);
410
502
  const data = await accessor.store.getFile(p);
411
- if (data === null) throw enoent3(path);
412
- const rec = recordStream("read", p, ResourceName2.REDIS);
503
+ if (data === null) throw enoent4(path);
504
+ const rec = recordStream("read", p, ResourceName3.REDIS);
413
505
  if (rec !== null) rec.bytes = data.byteLength;
414
506
  yield data;
415
507
  }
416
508
 
509
+ // src/core/redis/truncate.ts
510
+ import { invalidateAfterWrite as invalidateAfterWrite6 } from "@struktoai/mirage-core";
511
+ async function truncate(accessor, path, length) {
512
+ const p = norm(path.mountPath);
513
+ const store = accessor.store;
514
+ const existing = await store.getFile(p);
515
+ const data = existing ?? new Uint8Array(0);
516
+ const out = new Uint8Array(length);
517
+ const copyLen = Math.min(data.byteLength, length);
518
+ out.set(data.subarray(0, copyLen), 0);
519
+ await store.setFile(p, out);
520
+ await store.setModified(p, nowIso());
521
+ await invalidateAfterWrite6(p);
522
+ }
523
+
417
524
  // src/core/redis/unlink.ts
418
525
  import { invalidateAfterUnlink as invalidateAfterUnlink4 } from "@struktoai/mirage-core";
419
526
  async function unlink(accessor, path) {
420
- const p = norm(path.stripPrefix);
527
+ const p = norm(path.mountPath);
421
528
  const store = accessor.store;
422
529
  if (!await store.hasFile(p)) {
423
530
  throw new Error(`file not found: ${p}`);
424
531
  }
425
532
  await store.delFile(p);
426
533
  await store.delModified(p);
534
+ await store.delAttrs(p);
427
535
  await invalidateAfterUnlink4(p);
428
536
  }
429
537
 
430
538
  // src/core/redis/write.ts
431
- import { ResourceName as ResourceName3, invalidateAfterWrite as invalidateAfterWrite4, record as record2 } from "@struktoai/mirage-core";
539
+ import { ResourceName as ResourceName4, invalidateAfterWrite as invalidateAfterWrite7, record as record3 } from "@struktoai/mirage-core";
432
540
  async function writeBytes(accessor, path, data) {
433
541
  const start = performance.now();
434
- const p = norm(path.stripPrefix);
542
+ const p = norm(path.mountPath);
435
543
  const par = parent(p);
436
544
  const store = accessor.store;
437
545
  if (par !== "/" && !await store.hasDir(par)) {
@@ -439,12 +547,12 @@ async function writeBytes(accessor, path, data) {
439
547
  }
440
548
  await store.setFile(p, data);
441
549
  await store.setModified(p, nowIso());
442
- record2("write", p, ResourceName3.REDIS, data.byteLength, start);
443
- await invalidateAfterWrite4(p);
550
+ record3("write", p, ResourceName4.REDIS, data.byteLength, start);
551
+ await invalidateAfterWrite7(p);
444
552
  }
445
553
 
446
- // src/commands/builtin/redis/ops.ts
447
- var REDIS_CMD_OPS = {
554
+ // src/commands/builtin/redis/io.ts
555
+ var REDIS_IO = {
448
556
  readdir,
449
557
  readBytes: read,
450
558
  readStream: stream,
@@ -460,6 +568,10 @@ var REDIS_CMD_OPS = {
460
568
  rmR,
461
569
  rename,
462
570
  copy,
571
+ create,
572
+ truncate,
573
+ append: appendBytes,
574
+ setAttrs,
463
575
  find,
464
576
  duTotal: du,
465
577
  duAll: async (accessor, path) => {
@@ -468,14 +580,6 @@ var REDIS_CMD_OPS = {
468
580
  }
469
581
  };
470
582
 
471
- // src/commands/builtin/redis/sed.ts
472
- import { ResourceName as ResourceName4, makeSed } from "@struktoai/mirage-core";
473
- var REDIS_SED = makeSed({
474
- resource: ResourceName4.REDIS,
475
- stream: (a, p) => stream(a, p),
476
- write: (a, p, d) => writeBytes(a, p, d)
477
- });
478
-
479
583
  // src/commands/builtin/redis/index.ts
480
584
  var REDIS_COMMANDS = [
481
585
  ...makeFiletypeCommands({
@@ -483,8 +587,7 @@ var REDIS_COMMANDS = [
483
587
  readBytes: read,
484
588
  statEntry: stat
485
589
  }),
486
- ...makeGenericCommands(ResourceName5.REDIS, REDIS_CMD_OPS),
487
- ...REDIS_SED
590
+ ...makeGenericCommands(ResourceName5.REDIS, REDIS_IO)
488
591
  ];
489
592
 
490
593
  // src/accessor/redis.ts
@@ -497,302 +600,12 @@ var RedisAccessor = class extends Accessor {
497
600
  }
498
601
  };
499
602
 
500
- // src/core/redis/append.ts
501
- import { ResourceName as ResourceName6, invalidateAfterWrite as invalidateAfterWrite5, record as record3 } from "@struktoai/mirage-core";
502
- async function appendBytes(accessor, path, data) {
503
- const start = performance.now();
504
- const p = norm(path.stripPrefix);
505
- const store = accessor.store;
506
- const existing = await store.getFile(p);
507
- if (existing !== null) {
508
- const merged = new Uint8Array(existing.byteLength + data.byteLength);
509
- merged.set(existing, 0);
510
- merged.set(data, existing.byteLength);
511
- await store.setFile(p, merged);
512
- } else {
513
- await store.setFile(p, data);
514
- }
515
- await store.setModified(p, nowIso());
516
- record3("append", p, ResourceName6.REDIS, data.byteLength, start);
517
- await invalidateAfterWrite5(p);
518
- }
519
-
520
- // src/core/redis/create.ts
521
- import { invalidateAfterWrite as invalidateAfterWrite6 } from "@struktoai/mirage-core";
522
- async function create(accessor, path) {
523
- const p = norm(path.stripPrefix);
524
- const store = accessor.store;
525
- await store.setFile(p, new Uint8Array(0));
526
- await store.setModified(p, nowIso());
527
- await invalidateAfterWrite6(path);
528
- }
529
-
530
- // src/core/redis/glob.ts
531
- import { PathSpec } from "@struktoai/mirage-core";
532
- import { fnmatch } from "@struktoai/mirage-core";
533
- import { gnuBasename as gnuBasename2 } from "@struktoai/mirage-core";
534
- async function resolveGlob(accessor, paths, index) {
535
- const result = [];
536
- for (const p of paths) {
537
- if (p.resolved) {
538
- result.push(p);
539
- } else if (p.pattern !== null) {
540
- const dirSpec = new PathSpec({
541
- original: p.directory,
542
- directory: p.directory,
543
- resolved: true,
544
- prefix: p.prefix
545
- });
546
- const entries = await readdir(accessor, dirSpec, index);
547
- const matched = [];
548
- for (const e of entries) {
549
- if (fnmatch(gnuBasename2(e), p.pattern)) {
550
- matched.push(
551
- new PathSpec({
552
- original: e,
553
- directory: p.directory,
554
- resolved: true,
555
- prefix: p.prefix
556
- })
557
- );
558
- }
559
- }
560
- if (matched.length > SCOPE_ERROR) matched.length = SCOPE_ERROR;
561
- result.push(...matched);
562
- } else {
563
- result.push(p);
564
- }
565
- }
566
- return result;
567
- }
568
-
569
- // src/core/redis/truncate.ts
570
- import { invalidateAfterWrite as invalidateAfterWrite7 } from "@struktoai/mirage-core";
571
- async function truncate(accessor, path, length) {
572
- const p = norm(path.stripPrefix);
573
- const store = accessor.store;
574
- const existing = await store.getFile(p);
575
- const data = existing ?? new Uint8Array(0);
576
- const out = new Uint8Array(length);
577
- const copyLen = Math.min(data.byteLength, length);
578
- out.set(data.subarray(0, copyLen), 0);
579
- await store.setFile(p, out);
580
- await store.setModified(p, nowIso());
581
- await invalidateAfterWrite7(p);
582
- }
583
-
584
- // src/ops/redis/append.ts
585
- import { ResourceName as ResourceName7 } from "@struktoai/mirage-core";
586
- var appendOp = {
587
- name: "append",
588
- resource: ResourceName7.REDIS,
589
- filetype: null,
590
- write: true,
591
- fn: (accessor, path, args) => {
592
- const data = args[0];
593
- if (!(data instanceof Uint8Array)) {
594
- throw new TypeError("append op requires a Uint8Array as the first arg");
595
- }
596
- return appendBytes(accessor, path, data);
597
- }
598
- };
599
-
600
- // src/ops/redis/create.ts
601
- import { ResourceName as ResourceName8 } from "@struktoai/mirage-core";
602
- var createOp = {
603
- name: "create",
604
- resource: ResourceName8.REDIS,
605
- filetype: null,
606
- write: true,
607
- fn: (accessor, path) => {
608
- return create(accessor, path);
609
- }
610
- };
611
-
612
- // src/ops/redis/mkdir.ts
613
- import { ResourceName as ResourceName9 } from "@struktoai/mirage-core";
614
- var mkdirOp = {
615
- name: "mkdir",
616
- resource: ResourceName9.REDIS,
617
- filetype: null,
618
- write: true,
619
- fn: (accessor, path, args) => {
620
- const parents = args[0];
621
- return mkdir(accessor, path, parents === true);
622
- }
623
- };
624
-
625
- // src/ops/redis/read.ts
626
- import { ResourceName as ResourceName10 } from "@struktoai/mirage-core";
627
- var readOp = {
628
- name: "read",
629
- resource: ResourceName10.REDIS,
630
- filetype: null,
631
- write: false,
632
- fn: (accessor, path) => {
633
- return read(accessor, path);
634
- }
635
- };
636
-
637
- // src/ops/redis/read_feather.ts
638
- import {
639
- featherCat,
640
- ResourceName as ResourceName11
641
- } from "@struktoai/mirage-core";
642
- var readFeatherOp = {
643
- name: "read",
644
- resource: ResourceName11.REDIS,
645
- filetype: ".feather",
646
- write: false,
647
- fn: async (accessor, path, _args, kwargs) => {
648
- const raw = await read(accessor, path, kwargs.index);
649
- return featherCat(raw);
650
- }
651
- };
652
-
653
- // src/ops/redis/read_hdf5.ts
654
- import {
655
- hdf5Cat,
656
- ResourceName as ResourceName12
657
- } from "@struktoai/mirage-core";
658
- var readHdf5Op = {
659
- name: "read",
660
- resource: ResourceName12.REDIS,
661
- filetype: ".hdf5",
662
- write: false,
663
- fn: async (accessor, path, _args, kwargs) => {
664
- const raw = await read(accessor, path, kwargs.index);
665
- return hdf5Cat(raw);
666
- }
667
- };
668
-
669
- // src/ops/redis/read_parquet.ts
670
- import {
671
- parquetCat,
672
- ResourceName as ResourceName13
673
- } from "@struktoai/mirage-core";
674
- var readParquetOp = {
675
- name: "read",
676
- resource: ResourceName13.REDIS,
677
- filetype: ".parquet",
678
- write: false,
679
- fn: async (accessor, path, _args, kwargs) => {
680
- const raw = await read(accessor, path, kwargs.index);
681
- return parquetCat(raw);
682
- }
683
- };
684
-
685
- // src/ops/redis/readdir.ts
686
- import { ResourceName as ResourceName14 } from "@struktoai/mirage-core";
687
- var readdirOp = {
688
- name: "readdir",
689
- resource: ResourceName14.REDIS,
690
- filetype: null,
691
- write: false,
692
- fn: (accessor, path) => {
693
- return readdir(accessor, path);
694
- }
695
- };
696
-
697
- // src/ops/redis/rename.ts
698
- import { ResourceName as ResourceName15 } from "@struktoai/mirage-core";
699
- var renameOp = {
700
- name: "rename",
701
- resource: ResourceName15.REDIS,
702
- filetype: null,
703
- write: true,
704
- fn: (accessor, path, args) => {
705
- const dst = args[0];
706
- if (dst === void 0 || dst === null || typeof dst !== "object" || !("original" in dst)) {
707
- throw new TypeError("rename op requires a PathSpec destination as the first arg");
708
- }
709
- return rename(accessor, path, dst);
710
- }
711
- };
712
-
713
- // src/ops/redis/rmdir.ts
714
- import { ResourceName as ResourceName16 } from "@struktoai/mirage-core";
715
- var rmdirOp = {
716
- name: "rmdir",
717
- resource: ResourceName16.REDIS,
718
- filetype: null,
719
- write: true,
720
- fn: (accessor, path) => {
721
- return rmdir(accessor, path);
722
- }
723
- };
724
-
725
- // src/ops/redis/stat.ts
726
- import { ResourceName as ResourceName17 } from "@struktoai/mirage-core";
727
- var statOp = {
728
- name: "stat",
729
- resource: ResourceName17.REDIS,
730
- filetype: null,
731
- write: false,
732
- fn: (accessor, path) => {
733
- return stat(accessor, path);
734
- }
735
- };
736
-
737
- // src/ops/redis/truncate.ts
738
- import { ResourceName as ResourceName18 } from "@struktoai/mirage-core";
739
- var truncateOp = {
740
- name: "truncate",
741
- resource: ResourceName18.REDIS,
742
- filetype: null,
743
- write: true,
744
- fn: (accessor, path, args) => {
745
- const length = args[0];
746
- if (typeof length !== "number") {
747
- throw new TypeError("truncate op requires a number length as the first arg");
748
- }
749
- return truncate(accessor, path, length);
750
- }
751
- };
752
-
753
- // src/ops/redis/unlink.ts
754
- import { ResourceName as ResourceName19 } from "@struktoai/mirage-core";
755
- var unlinkOp = {
756
- name: "unlink",
757
- resource: ResourceName19.REDIS,
758
- filetype: null,
759
- write: true,
760
- fn: (accessor, path) => {
761
- return unlink(accessor, path);
762
- }
763
- };
764
-
765
- // src/ops/redis/write.ts
766
- import { extractWriteData } from "@struktoai/mirage-core";
767
- import { ResourceName as ResourceName20 } from "@struktoai/mirage-core";
768
- var writeOp = {
769
- name: "write",
770
- resource: ResourceName20.REDIS,
771
- filetype: null,
772
- write: true,
773
- fn: (accessor, path, args) => {
774
- const data = extractWriteData(args);
775
- return writeBytes(accessor, path, data);
776
- }
777
- };
778
-
779
603
  // src/ops/redis/index.ts
780
- var REDIS_OPS = [
781
- appendOp,
782
- createOp,
783
- mkdirOp,
784
- readOp,
785
- readFeatherOp,
786
- readHdf5Op,
787
- readParquetOp,
788
- readdirOp,
789
- renameOp,
790
- rmdirOp,
791
- statOp,
792
- truncateOp,
793
- unlinkOp,
794
- writeOp
795
- ];
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
+ });
796
609
 
797
610
  // src/resource/redis/prompt.ts
798
611
  var REDIS_PROMPT = `Redis-backed persistent filesystem. Behaves like a standard filesystem.
@@ -818,6 +631,9 @@ var RedisStore = class {
818
631
  mk(path) {
819
632
  return `${this.keyPrefix}modified:${path}`;
820
633
  }
634
+ ak(path) {
635
+ return `${this.keyPrefix}attrs:${path}`;
636
+ }
821
637
  async client() {
822
638
  if (this.providedClient !== null) return this.providedClient;
823
639
  this.clientPromise ??= (async () => {
@@ -872,15 +688,6 @@ var RedisStore = class {
872
688
  const c = await this.client();
873
689
  return c.strLen(this.fk(path));
874
690
  }
875
- async getRange(path, start, end) {
876
- const c = await this.client();
877
- const typed = c;
878
- const mod = await import("redis");
879
- const blob = mod.RESP_TYPES.BLOB_STRING;
880
- const mapping = { [blob]: Buffer };
881
- const raw = await typed.withTypeMapping(mapping).getRange(this.fk(path), start, end);
882
- return new Uint8Array(raw.buffer, raw.byteOffset, raw.byteLength);
883
- }
884
691
  async hasDir(path) {
885
692
  const c = await this.client();
886
693
  return await c.sIsMember(this.dk(), path) === 1;
@@ -910,9 +717,26 @@ var RedisStore = class {
910
717
  const c = await this.client();
911
718
  await c.del(this.mk(path));
912
719
  }
720
+ async getAttrs(path) {
721
+ const c = await this.client();
722
+ const raw = await c.hGetAll(this.ak(path));
723
+ return { ...raw };
724
+ }
725
+ async setAttrs(path, fields) {
726
+ const c = await this.client();
727
+ await c.hSet(this.ak(path), fields);
728
+ }
729
+ async delAttrs(path) {
730
+ const c = await this.client();
731
+ await c.del(this.ak(path));
732
+ }
913
733
  async clear() {
914
734
  const c = await this.client();
915
- for (const pattern of [`${this.keyPrefix}file:*`, `${this.keyPrefix}modified:*`]) {
735
+ for (const pattern of [
736
+ `${this.keyPrefix}file:*`,
737
+ `${this.keyPrefix}modified:*`,
738
+ `${this.keyPrefix}attrs:*`
739
+ ]) {
916
740
  const keys = [];
917
741
  for await (const k of c.scanIterator({ MATCH: pattern })) {
918
742
  if (Array.isArray(k)) keys.push(...k);
@@ -934,8 +758,9 @@ var RedisStore = class {
934
758
  };
935
759
 
936
760
  // src/resource/redis/redis.ts
761
+ var globCore = makeResolveGlob(readdir, SCOPE_ERROR);
937
762
  var RedisResource = class extends BaseResource {
938
- kind = ResourceName21.REDIS;
763
+ kind = ResourceName7.REDIS;
939
764
  cachesReads = false;
940
765
  indexTtl = 0;
941
766
  prompt = REDIS_PROMPT;
@@ -1038,15 +863,15 @@ var RedisResource = class extends BaseResource {
1038
863
  }
1039
864
  glob(paths, prefix = "") {
1040
865
  const effective = prefix ? paths.map(
1041
- (p) => p.prefix ? p : new PathSpec2({
1042
- original: p.original,
866
+ (p) => mountPrefixOf2(p.virtual, p.resourcePath) ? p : new PathSpec({
867
+ virtual: p.virtual,
1043
868
  directory: p.directory,
1044
869
  ...p.pattern !== null ? { pattern: p.pattern } : {},
1045
870
  resolved: p.resolved,
1046
- prefix
871
+ resourcePath: mountKey(p.virtual, prefix)
1047
872
  })
1048
873
  ) : paths;
1049
- return resolveGlob(this.accessor, effective, this.index);
874
+ return globCore(this.accessor, effective, this.index);
1050
875
  }
1051
876
  async getState() {
1052
877
  const files = {};
@@ -1055,6 +880,22 @@ var RedisResource = class extends BaseResource {
1055
880
  if (data !== null) files[key] = data;
1056
881
  }
1057
882
  const dirs = [...await this.store.listDirs()].sort();
883
+ const c = await this.store.client();
884
+ const attrs = {};
885
+ const attrsStrip = `${this.keyPrefix}attrs:`.length;
886
+ for await (const key of c.scanIterator({ MATCH: `${this.keyPrefix}attrs:*` })) {
887
+ for (const k of Array.isArray(key) ? key : [key]) {
888
+ attrs[k.slice(attrsStrip)] = { ...await c.hGetAll(k) };
889
+ }
890
+ }
891
+ const modified = {};
892
+ const modStrip = `${this.keyPrefix}modified:`.length;
893
+ for await (const key of c.scanIterator({ MATCH: `${this.keyPrefix}modified:*` })) {
894
+ for (const k of Array.isArray(key) ? key : [key]) {
895
+ const val = await c.get(k);
896
+ if (val !== null) modified[k.slice(modStrip)] = val;
897
+ }
898
+ }
1058
899
  return {
1059
900
  type: this.kind,
1060
901
  config: {
@@ -1063,7 +904,9 @@ var RedisResource = class extends BaseResource {
1063
904
  },
1064
905
  keyPrefix: this.keyPrefix,
1065
906
  files,
1066
- dirs
907
+ dirs,
908
+ attrs,
909
+ modified
1067
910
  };
1068
911
  }
1069
912
  async loadState(state) {
@@ -1079,6 +922,14 @@ var RedisResource = class extends BaseResource {
1079
922
  for (const dir of state.dirs) {
1080
923
  pipe.sAdd(dirKey, dir);
1081
924
  }
925
+ for (const [path, fields] of Object.entries(state.attrs ?? {})) {
926
+ if (Object.keys(fields).length > 0) {
927
+ pipe.hSet(`${this.keyPrefix}attrs:${path}`, fields);
928
+ }
929
+ }
930
+ for (const [path, ts] of Object.entries(state.modified ?? {})) {
931
+ pipe.set(`${this.keyPrefix}modified:${path}`, ts);
932
+ }
1082
933
  await pipe.exec();
1083
934
  }
1084
935
  };
@@ -1092,4 +943,4 @@ export {
1092
943
  RedisStore,
1093
944
  RedisResource
1094
945
  };
1095
- //# sourceMappingURL=chunk-IDYHQQOH.js.map
946
+ //# sourceMappingURL=chunk-OSVZKYXS.js.map