@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,14 +1,13 @@
1
- import {
2
- SCOPE_ERROR
3
- } from "./chunk-U6QSXTUS.js";
4
-
5
1
  // src/resource/disk/disk.ts
6
- import { mkdir as mkdir5, readdir as readdir4, readFile as readFile3, writeFile as writeFile3 } from "fs/promises";
2
+ import { chmod as chmod2, mkdir as mkdir5, readdir as readdir4, readFile as readFile3, stat as fsStat3, writeFile as writeFile3 } from "fs/promises";
7
3
  import path8 from "path";
8
4
  import {
9
5
  BaseResource,
10
- PathSpec as PathSpec2,
11
- ResourceName as ResourceName21
6
+ PathSpec,
7
+ ResourceName as ResourceName7,
8
+ makeResolveGlob,
9
+ mountKey,
10
+ mountPrefixOf as mountPrefixOf2
12
11
  } from "@struktoai/mirage-core";
13
12
 
14
13
  // src/commands/builtin/disk/index.ts
@@ -39,7 +38,7 @@ function resolveSafe(root, virtual) {
39
38
  // src/core/disk/read.ts
40
39
  async function read(accessor, path9) {
41
40
  const start = performance.now();
42
- const virtual = path9.stripPrefix;
41
+ const virtual = path9.mountPath;
43
42
  const full = resolveSafe(accessor.root, virtual);
44
43
  let data;
45
44
  try {
@@ -59,7 +58,7 @@ import { stat as fsStat } from "fs/promises";
59
58
  import path2 from "path";
60
59
  import { enoent as enoent2, FileStat, FileType, guessType } from "@struktoai/mirage-core";
61
60
  async function stat(accessor, p) {
62
- const virtual = p.stripPrefix;
61
+ const virtual = p.mountPath;
63
62
  const full = resolveSafe(accessor.root, virtual);
64
63
  let st;
65
64
  try {
@@ -77,7 +76,9 @@ async function stat(accessor, p) {
77
76
  name,
78
77
  size: null,
79
78
  modified,
80
- type: FileType.DIRECTORY
79
+ type: FileType.DIRECTORY,
80
+ mode: st.mode & 4095,
81
+ atime: st.atime.toISOString()
81
82
  });
82
83
  }
83
84
  return new FileStat({
@@ -85,18 +86,37 @@ async function stat(accessor, p) {
85
86
  size: st.size,
86
87
  modified,
87
88
  fingerprint: modified,
88
- type: guessType(name)
89
+ type: guessType(name),
90
+ mode: st.mode & 4095,
91
+ atime: st.atime.toISOString()
89
92
  });
90
93
  }
91
94
 
92
- // src/core/disk/copy.ts
93
- import { copyFile, mkdir } from "fs/promises";
95
+ // src/core/disk/append.ts
96
+ import { appendFile, mkdir } from "fs/promises";
94
97
  import path3 from "path";
95
- import { enoent as enoent3, invalidateAfterWrite } from "@struktoai/mirage-core";
98
+ import { ResourceName as ResourceName2, invalidateAfterWrite, record as record2 } from "@struktoai/mirage-core";
99
+ async function appendBytes(accessor, p, data) {
100
+ const start = performance.now();
101
+ const virtual = p.mountPath;
102
+ const full = resolveSafe(accessor.root, virtual);
103
+ await mkdir(path3.dirname(full), { recursive: true });
104
+ await appendFile(full, data);
105
+ record2("append", virtual, ResourceName2.DISK, data.byteLength, start);
106
+ await invalidateAfterWrite(p);
107
+ }
108
+
109
+ // src/core/disk/constants.ts
110
+ var SCOPE_ERROR = 5e4;
111
+
112
+ // src/core/disk/copy.ts
113
+ import { copyFile, mkdir as mkdir2 } from "fs/promises";
114
+ import path4 from "path";
115
+ import { enoent as enoent3, invalidateAfterWrite as invalidateAfterWrite2 } from "@struktoai/mirage-core";
96
116
  async function copy(accessor, src, dst) {
97
- const s = resolveSafe(accessor.root, src.stripPrefix);
98
- const d = resolveSafe(accessor.root, dst.stripPrefix);
99
- await mkdir(path3.dirname(d), { recursive: true });
117
+ const s = resolveSafe(accessor.root, src.mountPath);
118
+ const d = resolveSafe(accessor.root, dst.mountPath);
119
+ await mkdir2(path4.dirname(d), { recursive: true });
100
120
  try {
101
121
  await copyFile(s, d);
102
122
  } catch (err) {
@@ -105,12 +125,31 @@ async function copy(accessor, src, dst) {
105
125
  }
106
126
  throw err;
107
127
  }
108
- await invalidateAfterWrite(dst);
128
+ await invalidateAfterWrite2(dst);
129
+ }
130
+
131
+ // src/core/disk/write.ts
132
+ import { mkdir as mkdir3, writeFile } from "fs/promises";
133
+ import path5 from "path";
134
+ import { ResourceName as ResourceName3, invalidateAfterWrite as invalidateAfterWrite3, record as record3 } from "@struktoai/mirage-core";
135
+ async function writeBytes(accessor, p, data) {
136
+ const start = performance.now();
137
+ const virtual = p.mountPath;
138
+ const full = resolveSafe(accessor.root, virtual);
139
+ await mkdir3(path5.dirname(full), { recursive: true });
140
+ await writeFile(full, data);
141
+ record3("write", virtual, ResourceName3.DISK, data.byteLength, start);
142
+ await invalidateAfterWrite3(p);
143
+ }
144
+
145
+ // src/core/disk/create.ts
146
+ function create(accessor, path9) {
147
+ return writeBytes(accessor, path9, new Uint8Array());
109
148
  }
110
149
 
111
150
  // src/core/disk/du.ts
112
151
  import { readdir, stat as stat2 } from "fs/promises";
113
- import path4 from "path";
152
+ import path6 from "path";
114
153
  async function walkSizes(full) {
115
154
  let total = 0;
116
155
  let st;
@@ -123,7 +162,7 @@ async function walkSizes(full) {
123
162
  if (!st.isDirectory()) return 0;
124
163
  const entries = await readdir(full, { withFileTypes: true });
125
164
  for (const e of entries) {
126
- const child = path4.join(full, e.name);
165
+ const child = path6.join(full, e.name);
127
166
  if (e.isDirectory()) total += await walkSizes(child);
128
167
  else if (e.isFile()) {
129
168
  try {
@@ -144,20 +183,20 @@ async function walkAll(accessor, full, entries) {
144
183
  return 0;
145
184
  }
146
185
  if (st.isFile()) {
147
- const rel = "/" + path4.relative(accessor.root, full).split(path4.sep).join("/");
186
+ const rel = "/" + path6.relative(accessor.root, full).split(path6.sep).join("/");
148
187
  entries.push([rel, st.size]);
149
188
  return st.size;
150
189
  }
151
190
  if (!st.isDirectory()) return 0;
152
191
  const children = await readdir(full, { withFileTypes: true });
153
192
  for (const e of children) {
154
- const child = path4.join(full, e.name);
193
+ const child = path6.join(full, e.name);
155
194
  if (e.isDirectory()) {
156
195
  total += await walkAll(accessor, child, entries);
157
196
  } else if (e.isFile()) {
158
197
  try {
159
198
  const cst = await stat2(child);
160
- const rel = "/" + path4.relative(accessor.root, child).split(path4.sep).join("/");
199
+ const rel = "/" + path6.relative(accessor.root, child).split(path6.sep).join("/");
161
200
  entries.push([rel, cst.size]);
162
201
  total += cst.size;
163
202
  } catch {
@@ -167,12 +206,12 @@ async function walkAll(accessor, full, entries) {
167
206
  return total;
168
207
  }
169
208
  async function du(accessor, p) {
170
- const virtual = p.stripPrefix;
209
+ const virtual = p.mountPath;
171
210
  const full = resolveSafe(accessor.root, virtual);
172
211
  return walkSizes(full);
173
212
  }
174
213
  async function duAll(accessor, p) {
175
- const virtual = norm(p.stripPrefix);
214
+ const virtual = norm(p.mountPath);
176
215
  const full = resolveSafe(accessor.root, virtual);
177
216
  const entries = [];
178
217
  const total = await walkAll(accessor, full, entries);
@@ -183,7 +222,7 @@ async function duAll(accessor, p) {
183
222
  // src/core/disk/exists.ts
184
223
  import { access } from "fs/promises";
185
224
  async function exists(accessor, path9) {
186
- const full = resolveSafe(accessor.root, path9.stripPrefix);
225
+ const full = resolveSafe(accessor.root, path9.mountPath);
187
226
  try {
188
227
  await access(full);
189
228
  return true;
@@ -194,7 +233,7 @@ async function exists(accessor, path9) {
194
233
 
195
234
  // src/core/disk/find.ts
196
235
  import { readdir as readdir2, stat as stat3 } from "fs/promises";
197
- import path5 from "path";
236
+ import path7 from "path";
198
237
  import {
199
238
  buildTree,
200
239
  emitStartPath,
@@ -223,7 +262,7 @@ async function walk(ctx, full, current, depth) {
223
262
  let isEmpty = null;
224
263
  if (accept && opts.empty === true) {
225
264
  try {
226
- isEmpty = kind === "f" ? (await stat3(path5.join(full, e.name))).size === 0 : (await readdir2(path5.join(full, e.name))).length === 0;
265
+ isEmpty = kind === "f" ? (await stat3(path7.join(full, e.name))).size === 0 : (await readdir2(path7.join(full, e.name))).length === 0;
227
266
  } catch {
228
267
  isEmpty = null;
229
268
  }
@@ -235,9 +274,13 @@ async function walk(ctx, full, current, depth) {
235
274
  )) {
236
275
  accept = false;
237
276
  }
277
+ if (accept && kind !== "f" && (opts.minSize != null || opts.maxSize != null)) {
278
+ if (opts.minSize != null && opts.minSize > 0) accept = false;
279
+ if (opts.maxSize != null && opts.maxSize < 0) accept = false;
280
+ }
238
281
  if (accept && kind === "f" && (opts.minSize !== null || opts.maxSize !== null || opts.mtimeMin !== null || opts.mtimeMax !== null)) {
239
282
  try {
240
- const st = await stat3(path5.join(full, e.name));
283
+ const st = await stat3(path7.join(full, e.name));
241
284
  if (opts.minSize !== null && opts.minSize !== void 0 && st.size < opts.minSize)
242
285
  accept = false;
243
286
  if (opts.maxSize !== null && opts.maxSize !== void 0 && st.size > opts.maxSize)
@@ -255,13 +298,13 @@ async function walk(ctx, full, current, depth) {
255
298
  }
256
299
  if (accept) ctx.results.push(entryPath);
257
300
  if (kind === "d") {
258
- await walk(ctx, path5.join(full, e.name), entryPath, depth + 1);
301
+ await walk(ctx, path7.join(full, e.name), entryPath, depth + 1);
259
302
  }
260
303
  }
261
304
  }
262
305
  async function find(accessor, p, options = {}) {
263
- const virtual = norm(p.stripPrefix);
264
- const startName = startBasename(p.original);
306
+ const virtual = norm(p.mountPath);
307
+ const startName = startBasename(p.virtual);
265
308
  const full = resolveSafe(accessor.root, virtual);
266
309
  const baseDepth = virtual === "/" ? 0 : (virtual.match(/\//g) ?? []).length;
267
310
  const results = [];
@@ -295,7 +338,9 @@ async function find(accessor, p, options = {}) {
295
338
  exists: isDir,
296
339
  tree,
297
340
  maxDepth: options.maxDepth,
298
- minDepth: options.minDepth
341
+ minDepth: options.minDepth,
342
+ minSize: options.minSize,
343
+ maxSize: options.maxSize
299
344
  });
300
345
  }
301
346
  await walk({ accessor, base: virtual, baseDepth, options, tree, results }, full, virtual, 0);
@@ -305,38 +350,40 @@ async function find(accessor, p, options = {}) {
305
350
 
306
351
  // src/core/disk/mkdir.ts
307
352
  import { mkdir as fsMkdir } from "fs/promises";
308
- import { invalidateAfterWrite as invalidateAfterWrite2 } from "@struktoai/mirage-core";
309
- async function mkdir2(accessor, path9, parents = false) {
310
- const full = resolveSafe(accessor.root, path9.stripPrefix);
353
+ import { invalidateAfterWrite as invalidateAfterWrite4, invalidateAncestors } from "@struktoai/mirage-core";
354
+ async function mkdir4(accessor, path9, parents = false) {
355
+ const full = resolveSafe(accessor.root, path9.mountPath);
311
356
  if (parents) {
312
357
  await fsMkdir(full, { recursive: true });
313
- await invalidateAfterWrite2(path9);
358
+ await invalidateAfterWrite4(path9);
359
+ await invalidateAncestors(path9);
314
360
  return;
315
361
  }
316
- await invalidateAfterWrite2(path9);
317
362
  try {
318
363
  await fsMkdir(full);
319
364
  } catch (err) {
320
365
  const code = err.code;
321
- if (code === "EEXIST") return;
322
366
  if (code === "ENOENT") {
323
- throw new Error(`parent directory does not exist: ${path9.stripPrefix}`);
367
+ throw new Error(`parent directory does not exist: ${path9.mountPath}`);
324
368
  }
325
- throw err;
369
+ if (code !== "EEXIST") throw err;
326
370
  }
371
+ await invalidateAfterWrite4(path9);
327
372
  }
328
373
 
329
374
  // src/core/disk/readdir.ts
330
375
  import { readdir as fsReaddir } from "fs/promises";
331
376
  import {
332
- enotdir,
333
377
  IndexEntry,
334
- ResourceType
378
+ ResourceType,
379
+ enotdir,
380
+ mountPrefixOf,
381
+ rstripSlash
335
382
  } from "@struktoai/mirage-core";
336
383
  async function readdir3(accessor, path9, index) {
337
- const virtual = path9.pattern !== null ? path9.directory : path9.stripPrefix;
338
- const mountPrefix = path9.prefix;
339
- const virtualKey = mountPrefix + virtual;
384
+ const virtual = path9.pattern !== null ? path9.directory : path9.mountPath;
385
+ const mountPrefix = mountPrefixOf(path9.virtual, path9.resourcePath);
386
+ const virtualKey = rstripSlash(mountPrefix + virtual) || "/";
340
387
  if (index !== void 0) {
341
388
  const cached = await index.listDir(virtualKey);
342
389
  if (cached.entries !== void 0 && cached.entries !== null) {
@@ -376,11 +423,11 @@ import { rename as fsRename } from "fs/promises";
376
423
  import {
377
424
  enoent as enoent4,
378
425
  invalidateAfterUnlink,
379
- invalidateAfterWrite as invalidateAfterWrite3
426
+ invalidateAfterWrite as invalidateAfterWrite5
380
427
  } from "@struktoai/mirage-core";
381
428
  async function rename(accessor, src, dst) {
382
- const s = resolveSafe(accessor.root, src.stripPrefix);
383
- const d = resolveSafe(accessor.root, dst.stripPrefix);
429
+ const s = resolveSafe(accessor.root, src.mountPath);
430
+ const d = resolveSafe(accessor.root, dst.mountPath);
384
431
  try {
385
432
  await fsRename(s, d);
386
433
  } catch (err) {
@@ -390,14 +437,14 @@ async function rename(accessor, src, dst) {
390
437
  throw err;
391
438
  }
392
439
  await invalidateAfterUnlink(src);
393
- await invalidateAfterWrite3(dst);
440
+ await invalidateAfterWrite5(dst);
394
441
  }
395
442
 
396
443
  // src/core/disk/rm.ts
397
444
  import { rm } from "fs/promises";
398
445
  import { invalidateAfterUnlink as invalidateAfterUnlink2 } from "@struktoai/mirage-core";
399
446
  async function rmR(accessor, path9) {
400
- const full = resolveSafe(accessor.root, path9.stripPrefix);
447
+ const full = resolveSafe(accessor.root, path9.mountPath);
401
448
  await rm(full, { recursive: true, force: true });
402
449
  await invalidateAfterUnlink2(path9);
403
450
  }
@@ -406,7 +453,7 @@ async function rmR(accessor, path9) {
406
453
  import { rmdir as fsRmdir } from "fs/promises";
407
454
  import { invalidateAfterUnlink as invalidateAfterUnlink3 } from "@struktoai/mirage-core";
408
455
  async function rmdir(accessor, path9) {
409
- const full = resolveSafe(accessor.root, path9.stripPrefix);
456
+ const full = resolveSafe(accessor.root, path9.mountPath);
410
457
  try {
411
458
  await fsRmdir(full);
412
459
  } catch (err) {
@@ -416,13 +463,41 @@ async function rmdir(accessor, path9) {
416
463
  await invalidateAfterUnlink3(path9);
417
464
  }
418
465
 
466
+ // src/core/disk/set_attrs.ts
467
+ import { chmod, stat as fsStat2, utimes } from "fs/promises";
468
+ import { enoent as enoent5 } from "@struktoai/mirage-core";
469
+ async function setAttrs(accessor, path9, fields) {
470
+ const full = resolveSafe(accessor.root, path9.mountPath);
471
+ let st;
472
+ try {
473
+ st = await fsStat2(full);
474
+ } catch (err) {
475
+ if (err.code === "ENOENT") throw enoent5(path9);
476
+ throw err;
477
+ }
478
+ const residual = {};
479
+ if (fields.mode !== void 0) {
480
+ const keep2 = st.isDirectory() ? 448 : 384;
481
+ await chmod(full, fields.mode | keep2);
482
+ if ((fields.mode | keep2) !== fields.mode) residual.mode = fields.mode;
483
+ }
484
+ if (fields.uid !== void 0) residual.uid = fields.uid;
485
+ if (fields.gid !== void 0) residual.gid = fields.gid;
486
+ if (fields.atime !== void 0 || fields.mtime !== void 0) {
487
+ const newAtime = fields.atime !== void 0 ? new Date(fields.atime) : st.atime;
488
+ const newMtime = fields.mtime !== void 0 ? new Date(fields.mtime) : st.mtime;
489
+ await utimes(full, newAtime, newMtime);
490
+ }
491
+ return residual;
492
+ }
493
+
419
494
  // src/core/disk/stream.ts
420
495
  import { createReadStream } from "fs";
421
- import { enoent as enoent5, recordStream, ResourceName as ResourceName2 } from "@struktoai/mirage-core";
496
+ import { enoent as enoent6, recordStream, ResourceName as ResourceName4 } from "@struktoai/mirage-core";
422
497
  async function* stream(accessor, path9) {
423
- const virtual = path9.stripPrefix;
498
+ const virtual = path9.mountPath;
424
499
  const full = resolveSafe(accessor.root, virtual);
425
- const rec = recordStream("read", virtual, ResourceName2.DISK);
500
+ const rec = recordStream("read", virtual, ResourceName4.DISK);
426
501
  const rs = createReadStream(full, { highWaterMark: 65536 });
427
502
  try {
428
503
  for await (const chunk of rs) {
@@ -433,17 +508,38 @@ async function* stream(accessor, path9) {
433
508
  }
434
509
  } catch (err) {
435
510
  if (err.code === "ENOENT") {
436
- throw enoent5(path9);
511
+ throw enoent6(path9);
437
512
  }
438
513
  throw err;
439
514
  }
440
515
  }
441
516
 
517
+ // src/core/disk/truncate.ts
518
+ import { readFile as readFile2, writeFile as writeFile2 } from "fs/promises";
519
+ import { invalidateAfterWrite as invalidateAfterWrite6 } from "@struktoai/mirage-core";
520
+ async function truncate(accessor, path9, length) {
521
+ const full = resolveSafe(accessor.root, path9.mountPath);
522
+ let data;
523
+ try {
524
+ data = await readFile2(full);
525
+ } catch (err) {
526
+ if (err.code === "ENOENT") {
527
+ data = Buffer.alloc(0);
528
+ } else {
529
+ throw err;
530
+ }
531
+ }
532
+ const out = new Uint8Array(length);
533
+ out.set(data.subarray(0, Math.min(data.byteLength, length)));
534
+ await writeFile2(full, out);
535
+ await invalidateAfterWrite6(path9);
536
+ }
537
+
442
538
  // src/core/disk/unlink.ts
443
539
  import { unlink as fsUnlink } from "fs/promises";
444
540
  import { invalidateAfterUnlink as invalidateAfterUnlink4 } from "@struktoai/mirage-core";
445
541
  async function unlink(accessor, path9) {
446
- const full = resolveSafe(accessor.root, path9.stripPrefix);
542
+ const full = resolveSafe(accessor.root, path9.mountPath);
447
543
  try {
448
544
  await fsUnlink(full);
449
545
  } catch (err) {
@@ -453,22 +549,8 @@ async function unlink(accessor, path9) {
453
549
  await invalidateAfterUnlink4(path9);
454
550
  }
455
551
 
456
- // src/core/disk/write.ts
457
- import { mkdir as mkdir3, writeFile } from "fs/promises";
458
- import path6 from "path";
459
- import { ResourceName as ResourceName3, invalidateAfterWrite as invalidateAfterWrite4, record as record2 } from "@struktoai/mirage-core";
460
- async function writeBytes(accessor, p, data) {
461
- const start = performance.now();
462
- const virtual = p.stripPrefix;
463
- const full = resolveSafe(accessor.root, virtual);
464
- await mkdir3(path6.dirname(full), { recursive: true });
465
- await writeFile(full, data);
466
- record2("write", virtual, ResourceName3.DISK, data.byteLength, start);
467
- await invalidateAfterWrite4(p);
468
- }
469
-
470
- // src/commands/builtin/disk/ops.ts
471
- var DISK_CMD_OPS = {
552
+ // src/commands/builtin/disk/io.ts
553
+ var DISK_IO = {
472
554
  readdir: readdir3,
473
555
  readBytes: read,
474
556
  readStream: stream,
@@ -478,25 +560,21 @@ var DISK_CMD_OPS = {
478
560
  maxGlobMatches: SCOPE_ERROR,
479
561
  write: writeBytes,
480
562
  exists,
481
- mkdir: mkdir2,
563
+ mkdir: mkdir4,
482
564
  unlink,
483
565
  rmdir,
484
566
  rmR,
485
567
  rename,
486
568
  copy,
569
+ create,
570
+ truncate,
571
+ append: appendBytes,
572
+ setAttrs,
487
573
  find,
488
574
  duTotal: du,
489
575
  duAll
490
576
  };
491
577
 
492
- // src/commands/builtin/disk/sed.ts
493
- import { ResourceName as ResourceName4, makeSed } from "@struktoai/mirage-core";
494
- var DISK_SED = makeSed({
495
- resource: ResourceName4.DISK,
496
- stream: (a, p) => stream(a, p),
497
- write: (a, p, d) => writeBytes(a, p, d)
498
- });
499
-
500
578
  // src/commands/builtin/disk/index.ts
501
579
  var DISK_COMMANDS = [
502
580
  ...makeFiletypeCommands({
@@ -504,89 +582,9 @@ var DISK_COMMANDS = [
504
582
  readBytes: read,
505
583
  statEntry: stat
506
584
  }),
507
- ...makeGenericCommands(ResourceName5.DISK, DISK_CMD_OPS),
508
- ...DISK_SED
585
+ ...makeGenericCommands(ResourceName5.DISK, DISK_IO)
509
586
  ];
510
587
 
511
- // src/core/disk/append.ts
512
- import { appendFile, mkdir as mkdir4 } from "fs/promises";
513
- import path7 from "path";
514
- import { ResourceName as ResourceName6, invalidateAfterWrite as invalidateAfterWrite5, record as record3 } from "@struktoai/mirage-core";
515
- async function appendBytes(accessor, p, data) {
516
- const start = performance.now();
517
- const virtual = p.stripPrefix;
518
- const full = resolveSafe(accessor.root, virtual);
519
- await mkdir4(path7.dirname(full), { recursive: true });
520
- await appendFile(full, data);
521
- record3("append", virtual, ResourceName6.DISK, data.byteLength, start);
522
- await invalidateAfterWrite5(p);
523
- }
524
-
525
- // src/core/disk/create.ts
526
- function create(accessor, path9) {
527
- return writeBytes(accessor, path9, new Uint8Array());
528
- }
529
-
530
- // src/core/disk/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 readdir3(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/disk/truncate.ts
570
- import { readFile as readFile2, writeFile as writeFile2 } from "fs/promises";
571
- import { invalidateAfterWrite as invalidateAfterWrite6 } from "@struktoai/mirage-core";
572
- async function truncate(accessor, path9, length) {
573
- const full = resolveSafe(accessor.root, path9.stripPrefix);
574
- let data;
575
- try {
576
- data = await readFile2(full);
577
- } catch (err) {
578
- if (err.code === "ENOENT") {
579
- data = Buffer.alloc(0);
580
- } else {
581
- throw err;
582
- }
583
- }
584
- const out = new Uint8Array(length);
585
- out.set(data.subarray(0, Math.min(data.byteLength, length)));
586
- await writeFile2(full, out);
587
- await invalidateAfterWrite6(path9);
588
- }
589
-
590
588
  // src/accessor/disk.ts
591
589
  import { Accessor } from "@struktoai/mirage-core";
592
590
  var DiskAccessor = class extends Accessor {
@@ -597,208 +595,13 @@ var DiskAccessor = class extends Accessor {
597
595
  }
598
596
  };
599
597
 
600
- // src/ops/disk/append.ts
601
- import { ResourceName as ResourceName7 } from "@struktoai/mirage-core";
602
- var appendOp = {
603
- name: "append",
604
- resource: ResourceName7.DISK,
605
- filetype: null,
606
- write: true,
607
- fn: (accessor, path9, args) => {
608
- const data = args[0];
609
- if (!(data instanceof Uint8Array)) {
610
- throw new TypeError("append op requires a Uint8Array as the first arg");
611
- }
612
- return appendBytes(accessor, path9, data);
613
- }
614
- };
615
-
616
- // src/ops/disk/create.ts
617
- import { ResourceName as ResourceName8 } from "@struktoai/mirage-core";
618
- var createOp = {
619
- name: "create",
620
- resource: ResourceName8.DISK,
621
- filetype: null,
622
- write: true,
623
- fn: (accessor, path9) => {
624
- return create(accessor, path9);
625
- }
626
- };
627
-
628
- // src/ops/disk/mkdir.ts
629
- import { ResourceName as ResourceName9 } from "@struktoai/mirage-core";
630
- var mkdirOp = {
631
- name: "mkdir",
632
- resource: ResourceName9.DISK,
633
- filetype: null,
634
- write: true,
635
- fn: (accessor, path9) => {
636
- return mkdir2(accessor, path9, true);
637
- }
638
- };
639
-
640
- // src/ops/disk/read.ts
641
- import { ResourceName as ResourceName10 } from "@struktoai/mirage-core";
642
- var readOp = {
643
- name: "read",
644
- resource: ResourceName10.DISK,
645
- filetype: null,
646
- write: false,
647
- fn: (accessor, path9) => {
648
- return read(accessor, path9);
649
- }
650
- };
651
-
652
- // src/ops/disk/read_feather.ts
653
- import { featherCat, ResourceName as ResourceName11 } from "@struktoai/mirage-core";
654
- var readFeatherOp = {
655
- name: "read",
656
- resource: ResourceName11.DISK,
657
- filetype: ".feather",
658
- write: false,
659
- fn: async (accessor, path9) => {
660
- const raw = await read(accessor, path9);
661
- return featherCat(raw);
662
- }
663
- };
664
-
665
- // src/ops/disk/read_hdf5.ts
666
- import { hdf5Cat, ResourceName as ResourceName12 } from "@struktoai/mirage-core";
667
- var readHdf5Op = {
668
- name: "read",
669
- resource: ResourceName12.DISK,
670
- filetype: ".hdf5",
671
- write: false,
672
- fn: async (accessor, path9) => {
673
- const raw = await read(accessor, path9);
674
- return hdf5Cat(raw);
675
- }
676
- };
677
-
678
- // src/ops/disk/read_parquet.ts
679
- import { parquetCat, ResourceName as ResourceName13 } from "@struktoai/mirage-core";
680
- var readParquetOp = {
681
- name: "read",
682
- resource: ResourceName13.DISK,
683
- filetype: ".parquet",
684
- write: false,
685
- fn: async (accessor, path9) => {
686
- const raw = await read(accessor, path9);
687
- return parquetCat(raw);
688
- }
689
- };
690
-
691
- // src/ops/disk/readdir.ts
692
- import { ResourceName as ResourceName14 } from "@struktoai/mirage-core";
693
- var readdirOp = {
694
- name: "readdir",
695
- resource: ResourceName14.DISK,
696
- filetype: null,
697
- write: false,
698
- fn: (accessor, path9) => {
699
- return readdir3(accessor, path9);
700
- }
701
- };
702
-
703
- // src/ops/disk/rename.ts
704
- import { ResourceName as ResourceName15 } from "@struktoai/mirage-core";
705
- var renameOp = {
706
- name: "rename",
707
- resource: ResourceName15.DISK,
708
- filetype: null,
709
- write: true,
710
- fn: (accessor, path9, args) => {
711
- const dst = args[0];
712
- if (dst === void 0 || dst === null || typeof dst !== "object" || !("original" in dst)) {
713
- throw new TypeError("rename op requires a PathSpec destination as the first arg");
714
- }
715
- return rename(accessor, path9, dst);
716
- }
717
- };
718
-
719
- // src/ops/disk/rmdir.ts
720
- import { ResourceName as ResourceName16 } from "@struktoai/mirage-core";
721
- var rmdirOp = {
722
- name: "rmdir",
723
- resource: ResourceName16.DISK,
724
- filetype: null,
725
- write: true,
726
- fn: (accessor, path9) => {
727
- return rmdir(accessor, path9);
728
- }
729
- };
730
-
731
- // src/ops/disk/stat.ts
732
- import { ResourceName as ResourceName17 } from "@struktoai/mirage-core";
733
- var statOp = {
734
- name: "stat",
735
- resource: ResourceName17.DISK,
736
- filetype: null,
737
- write: false,
738
- fn: (accessor, path9) => {
739
- return stat(accessor, path9);
740
- }
741
- };
742
-
743
- // src/ops/disk/truncate.ts
744
- import { ResourceName as ResourceName18 } from "@struktoai/mirage-core";
745
- var truncateOp = {
746
- name: "truncate",
747
- resource: ResourceName18.DISK,
748
- filetype: null,
749
- write: true,
750
- fn: (accessor, path9, args) => {
751
- const length = args[0];
752
- if (typeof length !== "number") {
753
- throw new TypeError("truncate op requires a number length as the first arg");
754
- }
755
- return truncate(accessor, path9, length);
756
- }
757
- };
758
-
759
- // src/ops/disk/unlink.ts
760
- import { ResourceName as ResourceName19 } from "@struktoai/mirage-core";
761
- var unlinkOp = {
762
- name: "unlink",
763
- resource: ResourceName19.DISK,
764
- filetype: null,
765
- write: true,
766
- fn: (accessor, path9) => {
767
- return unlink(accessor, path9);
768
- }
769
- };
770
-
771
- // src/ops/disk/write.ts
772
- import { extractWriteData } from "@struktoai/mirage-core";
773
- import { ResourceName as ResourceName20 } from "@struktoai/mirage-core";
774
- var writeOp = {
775
- name: "write",
776
- resource: ResourceName20.DISK,
777
- filetype: null,
778
- write: true,
779
- fn: (accessor, path9, args) => {
780
- const data = extractWriteData(args);
781
- return writeBytes(accessor, path9, data);
782
- }
783
- };
784
-
785
598
  // src/ops/disk/index.ts
786
- var DISK_OPS = [
787
- appendOp,
788
- createOp,
789
- mkdirOp,
790
- readOp,
791
- readFeatherOp,
792
- readHdf5Op,
793
- readParquetOp,
794
- readdirOp,
795
- renameOp,
796
- rmdirOp,
797
- statOp,
798
- truncateOp,
799
- unlinkOp,
800
- writeOp
801
- ];
599
+ import { ResourceName as ResourceName6, makeGenericOps } from "@struktoai/mirage-core";
600
+ var DISK_OPS = makeGenericOps(ResourceName6.DISK, DISK_IO, {
601
+ filetypeRead: [".feather", ".hdf5", ".parquet"],
602
+ mkdirParents: true,
603
+ forwardIndex: false
604
+ });
802
605
 
803
606
  // src/resource/disk/prompt.ts
804
607
  var DISK_PROMPT = `{prefix}
@@ -806,6 +609,7 @@ var DISK_PROMPT = `{prefix}
806
609
  Standard commands: ls, cat, head, tail, grep, wc, find, tree, mkdir, touch, cp, mv, rm, tee.`;
807
610
 
808
611
  // src/resource/disk/disk.ts
612
+ var globCore = makeResolveGlob(readdir3, SCOPE_ERROR);
809
613
  async function walkFiles(root, current, out) {
810
614
  const entries = await readdir4(current, { withFileTypes: true });
811
615
  for (const e of entries) {
@@ -818,7 +622,7 @@ async function walkFiles(root, current, out) {
818
622
  }
819
623
  }
820
624
  var DiskResource = class extends BaseResource {
821
- kind = ResourceName21.DISK;
625
+ kind = ResourceName7.DISK;
822
626
  cachesReads = false;
823
627
  indexTtl = 60;
824
628
  prompt = DISK_PROMPT;
@@ -833,7 +637,7 @@ var DiskResource = class extends BaseResource {
833
637
  rmdir,
834
638
  copy,
835
639
  rename,
836
- mkdir: mkdir2,
640
+ mkdir: mkdir4,
837
641
  read_stream: stream,
838
642
  rm_recursive: rmR,
839
643
  du_total: du,
@@ -883,7 +687,7 @@ var DiskResource = class extends BaseResource {
883
687
  return exists(this.accessor, p);
884
688
  }
885
689
  mkdir(p, options) {
886
- return mkdir2(this.accessor, p, options?.recursive === true);
690
+ return mkdir4(this.accessor, p, options?.recursive === true);
887
691
  }
888
692
  rmdir(p) {
889
693
  return rmdir(this.accessor, p);
@@ -909,39 +713,34 @@ var DiskResource = class extends BaseResource {
909
713
  find(p, options = {}) {
910
714
  return find(this.accessor, p, options);
911
715
  }
912
- async fingerprint(p) {
913
- try {
914
- const remote = await stat(this.accessor, p);
915
- return remote.modified ?? null;
916
- } catch {
917
- return null;
918
- }
919
- }
920
716
  glob(paths, prefix = "") {
921
717
  const effective = prefix ? paths.map(
922
- (p) => p.prefix ? p : new PathSpec2({
923
- original: p.original,
718
+ (p) => mountPrefixOf2(p.virtual, p.resourcePath) ? p : new PathSpec({
719
+ virtual: p.virtual,
924
720
  directory: p.directory,
925
721
  ...p.pattern !== null ? { pattern: p.pattern } : {},
926
722
  resolved: p.resolved,
927
- prefix
723
+ resourcePath: mountKey(p.virtual, prefix)
928
724
  })
929
725
  ) : paths;
930
- return resolveGlob(this.accessor, effective, this.index);
726
+ return globCore(this.accessor, effective, this.index);
931
727
  }
932
728
  async getState() {
933
729
  await mkdir5(this.root, { recursive: true });
934
730
  const files = {};
731
+ const modes = {};
935
732
  const fileList = [];
936
733
  await walkFiles(this.root, this.root, fileList);
937
734
  for (const full of fileList) {
938
735
  const rel = path8.relative(this.root, full).split(path8.sep).join("/");
939
736
  const data = await readFile3(full);
940
737
  files[rel] = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
738
+ modes[rel] = (await fsStat3(full)).mode & 4095;
941
739
  }
942
740
  return {
943
741
  type: this.kind,
944
- files
742
+ files,
743
+ modes
945
744
  };
946
745
  }
947
746
  async loadState(state) {
@@ -950,6 +749,8 @@ var DiskResource = class extends BaseResource {
950
749
  const full = path8.join(this.root, rel);
951
750
  await mkdir5(path8.dirname(full), { recursive: true });
952
751
  await writeFile3(full, data);
752
+ const mode = state.modes?.[rel];
753
+ if (mode !== void 0) await chmod2(full, mode);
953
754
  }
954
755
  }
955
756
  };
@@ -960,4 +761,4 @@ export {
960
761
  DISK_PROMPT,
961
762
  DiskResource
962
763
  };
963
- //# sourceMappingURL=chunk-XWVDS66D.js.map
764
+ //# sourceMappingURL=chunk-W5ZLIQFR.js.map