@struktoai/mirage-node 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/README.md +2 -1
  2. package/dist/aliyun-S62BR3TB.js +11 -0
  3. package/dist/append.lua +17 -0
  4. package/dist/backblaze-4EKSW63F.js +11 -0
  5. package/dist/box-ZPLZAGMK.js +8 -0
  6. package/dist/ceph-ALKLD3MO.js +11 -0
  7. package/dist/{chunk-VLRSOWHP.js → chunk-2A4YGVBM.js} +5 -14
  8. package/dist/chunk-2A4YGVBM.js.map +1 -0
  9. package/dist/chunk-2HCYLVGY.js +28 -0
  10. package/dist/chunk-2HCYLVGY.js.map +1 -0
  11. package/dist/chunk-2VPZAH5Q.js +20 -0
  12. package/dist/chunk-2VPZAH5Q.js.map +1 -0
  13. package/dist/{chunk-HCU3B6FW.js → chunk-3JZQ6VSZ.js} +5 -4
  14. package/dist/chunk-3JZQ6VSZ.js.map +1 -0
  15. package/dist/chunk-4IF4TGAI.js +11 -0
  16. package/dist/chunk-4IF4TGAI.js.map +1 -0
  17. package/dist/{chunk-L7FEZ7LU.js → chunk-5H6KNEPP.js} +4 -5
  18. package/dist/{chunk-L7FEZ7LU.js.map → chunk-5H6KNEPP.js.map} +1 -1
  19. package/dist/{chunk-25W4XQJZ.js → chunk-5K2MWDCE.js} +4 -5
  20. package/dist/{chunk-25W4XQJZ.js.map → chunk-5K2MWDCE.js.map} +1 -1
  21. package/dist/{chunk-L4GMDSMB.js → chunk-6SVXWRKX.js} +4 -5
  22. package/dist/{chunk-L4GMDSMB.js.map → chunk-6SVXWRKX.js.map} +1 -1
  23. package/dist/{chunk-H62XQZUM.js → chunk-6VOIUGAD.js} +22 -10
  24. package/dist/chunk-6VOIUGAD.js.map +1 -0
  25. package/dist/{chunk-SI4GMRXD.js → chunk-7JYHFXXC.js} +4 -8
  26. package/dist/chunk-7JYHFXXC.js.map +1 -0
  27. package/dist/chunk-7VQQFWV6.js +20 -0
  28. package/dist/chunk-7VQQFWV6.js.map +1 -0
  29. package/dist/chunk-7ZP6TPHX.js +87 -0
  30. package/dist/chunk-7ZP6TPHX.js.map +1 -0
  31. package/dist/{chunk-HWQPEBID.js → chunk-ADEXNSYU.js} +6 -12
  32. package/dist/chunk-ADEXNSYU.js.map +1 -0
  33. package/dist/chunk-AQSYAXL4.js +16 -0
  34. package/dist/chunk-AQSYAXL4.js.map +1 -0
  35. package/dist/{chunk-NJ42VNXG.js → chunk-ATLXMNKD.js} +8 -3
  36. package/dist/chunk-ATLXMNKD.js.map +1 -0
  37. package/dist/{chunk-CB76WPUS.js → chunk-BYCUGFRF.js} +5 -4
  38. package/dist/chunk-BYCUGFRF.js.map +1 -0
  39. package/dist/{chunk-4M73WHIE.js → chunk-BZTVYOES.js} +3 -3
  40. package/dist/{chunk-CQCTCW4S.js → chunk-CRC4YWXB.js} +28 -9
  41. package/dist/chunk-CRC4YWXB.js.map +1 -0
  42. package/dist/{chunk-C7TNKIK5.js → chunk-CTGXJHO5.js} +1 -1
  43. package/dist/chunk-CTGXJHO5.js.map +1 -0
  44. package/dist/{chunk-HSD24IP2.js → chunk-DCDBIXVZ.js} +7 -2
  45. package/dist/chunk-DCDBIXVZ.js.map +1 -0
  46. package/dist/{chunk-HEDE2377.js → chunk-DDAFNROK.js} +318 -322
  47. package/dist/chunk-DDAFNROK.js.map +1 -0
  48. package/dist/chunk-DQIEWEAW.js +85 -0
  49. package/dist/chunk-DQIEWEAW.js.map +1 -0
  50. package/dist/{chunk-2ERLWAGG.js → chunk-EBI4IHDC.js} +20 -11
  51. package/dist/chunk-EBI4IHDC.js.map +1 -0
  52. package/dist/{chunk-RHUEV4I7.js → chunk-EIUTZ6N7.js} +10 -24
  53. package/dist/chunk-EIUTZ6N7.js.map +1 -0
  54. package/dist/{chunk-IUXXZHY3.js → chunk-EJZG5VUF.js} +24 -12
  55. package/dist/chunk-EJZG5VUF.js.map +1 -0
  56. package/dist/{chunk-BWWU5T2D.js → chunk-ENW5BVYN.js} +3 -3
  57. package/dist/{chunk-F5NWRF32.js → chunk-ETIAW4YD.js} +3 -3
  58. package/dist/chunk-EUPXAYPB.js +20 -0
  59. package/dist/chunk-EUPXAYPB.js.map +1 -0
  60. package/dist/{chunk-EGZNOUMH.js → chunk-FA6YNU75.js} +4 -5
  61. package/dist/{chunk-EGZNOUMH.js.map → chunk-FA6YNU75.js.map} +1 -1
  62. package/dist/{chunk-XUUSWR4U.js → chunk-FFH6R5VQ.js} +7 -2
  63. package/dist/{chunk-XUUSWR4U.js.map → chunk-FFH6R5VQ.js.map} +1 -1
  64. package/dist/{chunk-JEBH5APX.js → chunk-GE6H2COM.js} +5 -13
  65. package/dist/chunk-GE6H2COM.js.map +1 -0
  66. package/dist/{chunk-TUNR4VUM.js → chunk-GMMQ3ZK4.js} +3 -3
  67. package/dist/{chunk-SAOQW6ZJ.js → chunk-GSGE3M5P.js} +5 -13
  68. package/dist/chunk-GSGE3M5P.js.map +1 -0
  69. package/dist/{chunk-DXU7NZPH.js → chunk-HCRYAFBI.js} +3 -3
  70. package/dist/{chunk-OSVZKYXS.js → chunk-HOPUP6LA.js} +192 -156
  71. package/dist/chunk-HOPUP6LA.js.map +1 -0
  72. package/dist/chunk-HS24BL6W.js +160 -0
  73. package/dist/chunk-HS24BL6W.js.map +1 -0
  74. package/dist/chunk-HVYVG5KQ.js +16 -0
  75. package/dist/chunk-HVYVG5KQ.js.map +1 -0
  76. package/dist/{chunk-XEMLYWHK.js → chunk-I7CPLZNW.js} +4 -5
  77. package/dist/{chunk-XEMLYWHK.js.map → chunk-I7CPLZNW.js.map} +1 -1
  78. package/dist/{chunk-AULFV3KY.js → chunk-IFUCGI4I.js} +7 -2
  79. package/dist/chunk-IFUCGI4I.js.map +1 -0
  80. package/dist/{chunk-HGIPWY5Y.js → chunk-IFYXSSKR.js} +6 -6
  81. package/dist/chunk-IFYXSSKR.js.map +1 -0
  82. package/dist/chunk-IXA4DQE4.js +20 -0
  83. package/dist/chunk-IXA4DQE4.js.map +1 -0
  84. package/dist/chunk-IZMKMD3O.js +11 -0
  85. package/dist/chunk-IZMKMD3O.js.map +1 -0
  86. package/dist/{chunk-4X6CLF4F.js → chunk-JJERW2BI.js} +4 -5
  87. package/dist/{chunk-4X6CLF4F.js.map → chunk-JJERW2BI.js.map} +1 -1
  88. package/dist/{chunk-M6E7VK4D.js → chunk-JQR4HVUX.js} +2 -5
  89. package/dist/chunk-JQR4HVUX.js.map +1 -0
  90. package/dist/{chunk-BWLUBJQG.js → chunk-JXOMDLFS.js} +6 -15
  91. package/dist/chunk-JXOMDLFS.js.map +1 -0
  92. package/dist/{chunk-5ZHNPNDD.js → chunk-KIX6N7NT.js} +198 -141
  93. package/dist/chunk-KIX6N7NT.js.map +1 -0
  94. package/dist/{chunk-XFSEADPC.js → chunk-L42UTDFK.js} +7 -2
  95. package/dist/chunk-L42UTDFK.js.map +1 -0
  96. package/dist/chunk-M2UF2JHJ.js +11 -0
  97. package/dist/chunk-M2UF2JHJ.js.map +1 -0
  98. package/dist/{chunk-LPLZLSMK.js → chunk-MONC734W.js} +7 -2
  99. package/dist/chunk-MONC734W.js.map +1 -0
  100. package/dist/{chunk-XADEMW6B.js → chunk-N72RLCMU.js} +4 -5
  101. package/dist/{chunk-XADEMW6B.js.map → chunk-N72RLCMU.js.map} +1 -1
  102. package/dist/{chunk-ZPB3SLPK.js → chunk-ND4IWJ4V.js} +7 -2
  103. package/dist/chunk-ND4IWJ4V.js.map +1 -0
  104. package/dist/{chunk-ZPZQXHW2.js → chunk-NZ3EKGW4.js} +260 -178
  105. package/dist/chunk-NZ3EKGW4.js.map +1 -0
  106. package/dist/{chunk-E3KXVEYI.js → chunk-OAE57MNL.js} +22 -10
  107. package/dist/chunk-OAE57MNL.js.map +1 -0
  108. package/dist/{chunk-JBDFYIN2.js → chunk-OHKGIQB4.js} +2 -5
  109. package/dist/chunk-OHKGIQB4.js.map +1 -0
  110. package/dist/{chunk-V7JVMG63.js → chunk-OXEQSPND.js} +3 -3
  111. package/dist/{chunk-YRJICL2Q.js → chunk-PKNE5J2B.js} +5 -13
  112. package/dist/chunk-PKNE5J2B.js.map +1 -0
  113. package/dist/chunk-PSXXEGYQ.js +16 -0
  114. package/dist/chunk-PSXXEGYQ.js.map +1 -0
  115. package/dist/{chunk-KAWDDS27.js → chunk-QAOVABCR.js} +7 -2
  116. package/dist/chunk-QAOVABCR.js.map +1 -0
  117. package/dist/{chunk-SYMNWNC3.js → chunk-QQ7FP4GD.js} +4 -5
  118. package/dist/{chunk-SYMNWNC3.js.map → chunk-QQ7FP4GD.js.map} +1 -1
  119. package/dist/{chunk-3JZN3GYO.js → chunk-QYLVMC6B.js} +2 -5
  120. package/dist/chunk-QYLVMC6B.js.map +1 -0
  121. package/dist/{chunk-CXQGMFI7.js → chunk-RX3XR65X.js} +4 -5
  122. package/dist/{chunk-CXQGMFI7.js.map → chunk-RX3XR65X.js.map} +1 -1
  123. package/dist/{chunk-MRXTUFBZ.js → chunk-RYQJJB4C.js} +1 -1
  124. package/dist/chunk-RYQJJB4C.js.map +1 -0
  125. package/dist/{chunk-5I7Q7RHW.js → chunk-TUF7TCN7.js} +4 -5
  126. package/dist/{chunk-5I7Q7RHW.js.map → chunk-TUF7TCN7.js.map} +1 -1
  127. package/dist/{chunk-NLXJMXVE.js → chunk-TUX36JY5.js} +4 -5
  128. package/dist/{chunk-NLXJMXVE.js.map → chunk-TUX36JY5.js.map} +1 -1
  129. package/dist/{chunk-4GYB7DGC.js → chunk-TWRQCQWU.js} +327 -558
  130. package/dist/chunk-TWRQCQWU.js.map +1 -0
  131. package/dist/chunk-U6DFQRG3.js +20 -0
  132. package/dist/chunk-U6DFQRG3.js.map +1 -0
  133. package/dist/chunk-VI5YTKNY.js +20 -0
  134. package/dist/chunk-VI5YTKNY.js.map +1 -0
  135. package/dist/{chunk-FRGTDZQT.js → chunk-VQDF2UH5.js} +19 -5
  136. package/dist/chunk-VQDF2UH5.js.map +1 -0
  137. package/dist/{chunk-W5ZLIQFR.js → chunk-WG5YS6TC.js} +308 -200
  138. package/dist/chunk-WG5YS6TC.js.map +1 -0
  139. package/dist/{chunk-ZM44MGC5.js → chunk-WMJJ4WGF.js} +4 -5
  140. package/dist/{chunk-ZM44MGC5.js.map → chunk-WMJJ4WGF.js.map} +1 -1
  141. package/dist/{chunk-5YRWF5RP.js → chunk-WY4FNH42.js} +6 -5
  142. package/dist/chunk-WY4FNH42.js.map +1 -0
  143. package/dist/{chunk-VBYIDRNU.js → chunk-XIG5BWWH.js} +19 -10
  144. package/dist/chunk-XIG5BWWH.js.map +1 -0
  145. package/dist/chunk-XJBC3OYX.js +11 -0
  146. package/dist/chunk-XJBC3OYX.js.map +1 -0
  147. package/dist/{chunk-ZMREYTHA.js → chunk-XPRDXWK7.js} +8 -8
  148. package/dist/chunk-XPRDXWK7.js.map +1 -0
  149. package/dist/chunk-YKRQSZS7.js +96 -0
  150. package/dist/chunk-YKRQSZS7.js.map +1 -0
  151. package/dist/{chunk-IEVLWEBO.js → chunk-YMBL3VJB.js} +9 -8
  152. package/dist/chunk-YMBL3VJB.js.map +1 -0
  153. package/dist/{chunk-CGGO5NKD.js → chunk-YUJBXFYK.js} +357 -346
  154. package/dist/chunk-YUJBXFYK.js.map +1 -0
  155. package/dist/{chunk-S4KVLPBR.js → chunk-YZ4ZJNOL.js} +22 -10
  156. package/dist/chunk-YZ4ZJNOL.js.map +1 -0
  157. package/dist/chunk-ZTHVEXIV.js +11 -0
  158. package/dist/chunk-ZTHVEXIV.js.map +1 -0
  159. package/dist/{chunk-VHED2STW.js → chunk-ZVSYUCYS.js} +2 -1
  160. package/dist/chunk-ZVSYUCYS.js.map +1 -0
  161. package/dist/{config-T2IUIU5C.js → config-2YBCHU2W.js} +2 -2
  162. package/dist/{config-M3Z47VYU.js → config-3YRGRW72.js} +3 -2
  163. package/dist/config-4GSOMUMF.js +9 -0
  164. package/dist/config-5YBUWFUP.js +9 -0
  165. package/dist/{config-2LASFFRD.js → config-5ZRKJTKG.js} +3 -2
  166. package/dist/{config-W7EVPJNK.js → config-A25LTL5W.js} +2 -2
  167. package/dist/{config-WKQ3FGTZ.js → config-CLU7JABG.js} +2 -2
  168. package/dist/{config-E22XAGYN.js → config-D2RF7L3N.js} +2 -2
  169. package/dist/{config-HQXNFQZS.js → config-E55TKM6K.js} +2 -2
  170. package/dist/config-ELDOFRJW.js +9 -0
  171. package/dist/{config-EX3ZJTZI.js → config-FPC3RBFD.js} +2 -2
  172. package/dist/config-FPM3LAW7.js +9 -0
  173. package/dist/{config-IPNWAJHH.js → config-G3F54CS4.js} +3 -2
  174. package/dist/{config-BBOLI7VE.js → config-G43HRUI3.js} +2 -2
  175. package/dist/{config-QO2XUME4.js → config-GG3WO5PB.js} +3 -2
  176. package/dist/{config-QWQGOXQ5.js → config-JUYBWAZE.js} +2 -2
  177. package/dist/{config-SPW6NESU.js → config-LJ5T6TVA.js} +2 -2
  178. package/dist/{config-WVILHDFV.js → config-MDSAE4O3.js} +2 -2
  179. package/dist/{config-MZM3IPFM.js → config-NRIOKK5T.js} +2 -2
  180. package/dist/{config-L7SBSH5L.js → config-OYK2BSJK.js} +2 -2
  181. package/dist/config-PB3KA2CE.js +9 -0
  182. package/dist/{config-54USUVSE.js → config-QY4IL3PH.js} +3 -2
  183. package/dist/{config-VKKZGC7V.js → config-R4LAOEDS.js} +2 -2
  184. package/dist/{config-FRK7ZL37.js → config-RIAAD6RW.js} +3 -2
  185. package/dist/{config-J2C53GOT.js → config-SYNEQAUB.js} +2 -2
  186. package/dist/{config-XU6D5C7E.js → config-TJKGYA2B.js} +3 -2
  187. package/dist/{config-DWSJL3NH.js → config-UURRGA7U.js} +4 -2
  188. package/dist/{config-BIBFLUIR.js → config-VPLHQXVE.js} +2 -2
  189. package/dist/config-WRACCRPN.js +9 -0
  190. package/dist/{config-OJ2BPESH.js → config-WVHKXEVE.js} +3 -2
  191. package/dist/{config-CPYFOUQO.js → config-XU7R36IE.js} +3 -2
  192. package/dist/{config-A2GQYJDB.js → config-Y2KOUYSS.js} +2 -2
  193. package/dist/databricks_volume-CNCPTZHS.js +7 -0
  194. package/dist/digitalocean-DJZOUB6Q.js +11 -0
  195. package/dist/discord-ETB2CADR.js +7 -0
  196. package/dist/disk-WEHSTK3F.js +7 -0
  197. package/dist/dropbox-XN6PGLNE.js +8 -0
  198. package/dist/email-OV7XCP3T.js +8 -0
  199. package/dist/gcal-P56MRCGU.js +8 -0
  200. package/dist/gcs-HFBIAE2C.js +10 -0
  201. package/dist/gdocs-LQ3UXP3J.js +8 -0
  202. package/dist/gdrive-N6UBYLON.js +8 -0
  203. package/dist/github-BPZREGPI.js +8 -0
  204. package/dist/github_ci-7A4LUIZ7.js +8 -0
  205. package/dist/{gmail-2TBT4CVH.js → gmail-YED2MF6H.js} +2 -2
  206. package/dist/gridfs-CPLQ4G62.js +9 -0
  207. package/dist/gsheets-4BNIJPQ6.js +8 -0
  208. package/dist/gslides-GDBYLO5A.js +8 -0
  209. package/dist/hf_buckets-FTJITQ3P.js +10 -0
  210. package/dist/hf_datasets-6GXVKQD7.js +10 -0
  211. package/dist/hf_models-PJPGZAC5.js +10 -0
  212. package/dist/hf_spaces-LFNFOLBF.js +10 -0
  213. package/dist/index.d.ts +897 -609
  214. package/dist/index.js +2371 -781
  215. package/dist/index.js.map +1 -1
  216. package/dist/jaeger-GCA6MJ6E.js +8 -0
  217. package/dist/lancedb-TJ5YSJY5.js +7 -0
  218. package/dist/langfuse-RUMTUMXS.js +8 -0
  219. package/dist/linear-BCE4KEAC.js +7 -0
  220. package/dist/minio-5SO6KBTK.js +11 -0
  221. package/dist/mongodb-7C5MBESV.js +7 -0
  222. package/dist/nextcloud-4O2LZVW2.js +9 -0
  223. package/dist/notion-RVKEAQ2M.js +7 -0
  224. package/dist/oci-OQXOIC62.js +10 -0
  225. package/dist/postgres-AV45GNRS.js +7 -0
  226. package/dist/qingstor-W277YA4K.js +11 -0
  227. package/dist/r2-FUA4IORE.js +10 -0
  228. package/dist/{redis-6D55Q2WB.js → redis-LPS357NF.js} +2 -2
  229. package/dist/s3-FPNWWIVM.js +8 -0
  230. package/dist/scaleway-BP3732U7.js +11 -0
  231. package/dist/seaweedfs-MC6HIEP4.js +11 -0
  232. package/dist/slack-JFGW7VLN.js +7 -0
  233. package/dist/ssh-UYPG42LM.js +8 -0
  234. package/dist/supabase-A3KUFMDC.js +10 -0
  235. package/dist/tencent-5464UQ2X.js +11 -0
  236. package/dist/trello-O2KB3FUO.js +8 -0
  237. package/dist/wasabi-2IKBIWNO.js +10 -0
  238. package/dist/wasabi-2IKBIWNO.js.map +1 -0
  239. package/package.json +15 -3
  240. package/dist/aliyun-PGI57A43.js +0 -10
  241. package/dist/backblaze-TSPL6Y56.js +0 -10
  242. package/dist/box-7XTZYDSO.js +0 -8
  243. package/dist/ceph-C265UI5T.js +0 -10
  244. package/dist/chunk-2ERLWAGG.js.map +0 -1
  245. package/dist/chunk-2QNPKPZZ.js +0 -59
  246. package/dist/chunk-2QNPKPZZ.js.map +0 -1
  247. package/dist/chunk-3ASOQTZB.js +0 -59
  248. package/dist/chunk-3ASOQTZB.js.map +0 -1
  249. package/dist/chunk-3JZN3GYO.js.map +0 -1
  250. package/dist/chunk-4GYB7DGC.js.map +0 -1
  251. package/dist/chunk-5YRWF5RP.js.map +0 -1
  252. package/dist/chunk-5ZHNPNDD.js.map +0 -1
  253. package/dist/chunk-AULFV3KY.js.map +0 -1
  254. package/dist/chunk-BWLUBJQG.js.map +0 -1
  255. package/dist/chunk-C7TNKIK5.js.map +0 -1
  256. package/dist/chunk-CB76WPUS.js.map +0 -1
  257. package/dist/chunk-CGGO5NKD.js.map +0 -1
  258. package/dist/chunk-CQCTCW4S.js.map +0 -1
  259. package/dist/chunk-D3U7VQCG.js +0 -25
  260. package/dist/chunk-D3U7VQCG.js.map +0 -1
  261. package/dist/chunk-E3KXVEYI.js.map +0 -1
  262. package/dist/chunk-EVK6HH6Z.js +0 -17
  263. package/dist/chunk-EVK6HH6Z.js.map +0 -1
  264. package/dist/chunk-FRGTDZQT.js.map +0 -1
  265. package/dist/chunk-GF75O2EN.js +0 -54
  266. package/dist/chunk-GF75O2EN.js.map +0 -1
  267. package/dist/chunk-GTAS3QVC.js +0 -25
  268. package/dist/chunk-GTAS3QVC.js.map +0 -1
  269. package/dist/chunk-H62XQZUM.js.map +0 -1
  270. package/dist/chunk-HCU3B6FW.js.map +0 -1
  271. package/dist/chunk-HEDE2377.js.map +0 -1
  272. package/dist/chunk-HGIPWY5Y.js.map +0 -1
  273. package/dist/chunk-HSD24IP2.js.map +0 -1
  274. package/dist/chunk-HWQPEBID.js.map +0 -1
  275. package/dist/chunk-IEHPTILN.js +0 -21
  276. package/dist/chunk-IEHPTILN.js.map +0 -1
  277. package/dist/chunk-IEVLWEBO.js.map +0 -1
  278. package/dist/chunk-IKJQOYI4.js +0 -26
  279. package/dist/chunk-IKJQOYI4.js.map +0 -1
  280. package/dist/chunk-IUXXZHY3.js.map +0 -1
  281. package/dist/chunk-JBDFYIN2.js.map +0 -1
  282. package/dist/chunk-JEBH5APX.js.map +0 -1
  283. package/dist/chunk-JHI2PHHD.js +0 -25
  284. package/dist/chunk-JHI2PHHD.js.map +0 -1
  285. package/dist/chunk-KAWDDS27.js.map +0 -1
  286. package/dist/chunk-KGC2OGXI.js +0 -27
  287. package/dist/chunk-KGC2OGXI.js.map +0 -1
  288. package/dist/chunk-LPLZLSMK.js.map +0 -1
  289. package/dist/chunk-M6E7VK4D.js.map +0 -1
  290. package/dist/chunk-MIQ3ECZM.js +0 -54
  291. package/dist/chunk-MIQ3ECZM.js.map +0 -1
  292. package/dist/chunk-MRXTUFBZ.js.map +0 -1
  293. package/dist/chunk-NJ42VNXG.js.map +0 -1
  294. package/dist/chunk-OSVZKYXS.js.map +0 -1
  295. package/dist/chunk-RHUEV4I7.js.map +0 -1
  296. package/dist/chunk-S4KVLPBR.js.map +0 -1
  297. package/dist/chunk-SAOQW6ZJ.js.map +0 -1
  298. package/dist/chunk-SI4GMRXD.js.map +0 -1
  299. package/dist/chunk-UAJYJP5C.js +0 -59
  300. package/dist/chunk-UAJYJP5C.js.map +0 -1
  301. package/dist/chunk-UYA3XL3J.js +0 -54
  302. package/dist/chunk-UYA3XL3J.js.map +0 -1
  303. package/dist/chunk-VBYIDRNU.js.map +0 -1
  304. package/dist/chunk-VHED2STW.js.map +0 -1
  305. package/dist/chunk-VIICUPWQ.js +0 -23
  306. package/dist/chunk-VIICUPWQ.js.map +0 -1
  307. package/dist/chunk-VLRSOWHP.js.map +0 -1
  308. package/dist/chunk-W5ZLIQFR.js.map +0 -1
  309. package/dist/chunk-WTSSEUOZ.js +0 -59
  310. package/dist/chunk-WTSSEUOZ.js.map +0 -1
  311. package/dist/chunk-WWP2STF5.js +0 -59
  312. package/dist/chunk-WWP2STF5.js.map +0 -1
  313. package/dist/chunk-XFSEADPC.js.map +0 -1
  314. package/dist/chunk-YBVMZ7SR.js +0 -59
  315. package/dist/chunk-YBVMZ7SR.js.map +0 -1
  316. package/dist/chunk-YRJICL2Q.js.map +0 -1
  317. package/dist/chunk-ZMREYTHA.js.map +0 -1
  318. package/dist/chunk-ZPB3SLPK.js.map +0 -1
  319. package/dist/chunk-ZPZQXHW2.js.map +0 -1
  320. package/dist/config-3WDIJPTG.js +0 -9
  321. package/dist/config-4QV4QYI5.js +0 -9
  322. package/dist/config-5ZXN2T2H.js +0 -9
  323. package/dist/config-EHE52ZTK.js +0 -9
  324. package/dist/config-HTXOOAOD.js +0 -9
  325. package/dist/config-K63RX6EU.js +0 -9
  326. package/dist/config-LEALEMKA.js +0 -9
  327. package/dist/config-RI7IEZUF.js +0 -9
  328. package/dist/databricks_volume-ETRDJVVQ.js +0 -7
  329. package/dist/digitalocean-QP72DR4J.js +0 -10
  330. package/dist/discord-BSN5RB3E.js +0 -8
  331. package/dist/disk-24NWTN2I.js +0 -7
  332. package/dist/dropbox-OSTZXSIE.js +0 -8
  333. package/dist/email-4ZFPSWIN.js +0 -8
  334. package/dist/gcs-PFWR6MIW.js +0 -10
  335. package/dist/gdocs-GPAZRQG5.js +0 -8
  336. package/dist/gdrive-XSX6A7B3.js +0 -8
  337. package/dist/github-EQ4NXUTA.js +0 -8
  338. package/dist/github_ci-QL5B2Q2N.js +0 -8
  339. package/dist/gridfs-KZRZ6SIB.js +0 -9
  340. package/dist/gsheets-N53WEXN2.js +0 -8
  341. package/dist/gslides-TATSARTH.js +0 -8
  342. package/dist/hf_buckets-BK7NGJWS.js +0 -10
  343. package/dist/hf_datasets-UQ5QGM4L.js +0 -10
  344. package/dist/hf_models-75LFCQCS.js +0 -10
  345. package/dist/hf_spaces-6T2KB3UC.js +0 -10
  346. package/dist/langfuse-AMQCQWNE.js +0 -8
  347. package/dist/linear-V3TXO6CV.js +0 -8
  348. package/dist/minio-IZRZY4C5.js +0 -10
  349. package/dist/mongodb-VMKPQCPX.js +0 -7
  350. package/dist/nextcloud-5RHQCGDO.js +0 -9
  351. package/dist/notion-6PPNTQFM.js +0 -8
  352. package/dist/oci-CKYBSFZJ.js +0 -10
  353. package/dist/postgres-WIQBVL5M.js +0 -7
  354. package/dist/qingstor-AP4IIPLY.js +0 -10
  355. package/dist/r2-C4XGEWQY.js +0 -10
  356. package/dist/s3-XQBI2CXN.js +0 -8
  357. package/dist/scaleway-SEZJVURB.js +0 -10
  358. package/dist/seaweedfs-3XYIAFU2.js +0 -10
  359. package/dist/slack-ZHXDJQY4.js +0 -8
  360. package/dist/ssh-X2MO7JOV.js +0 -8
  361. package/dist/supabase-BBM44UTM.js +0 -10
  362. package/dist/tencent-X72USLJ7.js +0 -10
  363. package/dist/trello-EER5NG7L.js +0 -8
  364. package/dist/wasabi-O4MVIUFG.js +0 -10
  365. /package/dist/{aliyun-PGI57A43.js.map → aliyun-S62BR3TB.js.map} +0 -0
  366. /package/dist/{backblaze-TSPL6Y56.js.map → backblaze-4EKSW63F.js.map} +0 -0
  367. /package/dist/{box-7XTZYDSO.js.map → box-ZPLZAGMK.js.map} +0 -0
  368. /package/dist/{ceph-C265UI5T.js.map → ceph-ALKLD3MO.js.map} +0 -0
  369. /package/dist/{chunk-4M73WHIE.js.map → chunk-BZTVYOES.js.map} +0 -0
  370. /package/dist/{chunk-BWWU5T2D.js.map → chunk-ENW5BVYN.js.map} +0 -0
  371. /package/dist/{chunk-F5NWRF32.js.map → chunk-ETIAW4YD.js.map} +0 -0
  372. /package/dist/{chunk-TUNR4VUM.js.map → chunk-GMMQ3ZK4.js.map} +0 -0
  373. /package/dist/{chunk-DXU7NZPH.js.map → chunk-HCRYAFBI.js.map} +0 -0
  374. /package/dist/{chunk-V7JVMG63.js.map → chunk-OXEQSPND.js.map} +0 -0
  375. /package/dist/{config-2LASFFRD.js.map → config-2YBCHU2W.js.map} +0 -0
  376. /package/dist/{config-3WDIJPTG.js.map → config-3YRGRW72.js.map} +0 -0
  377. /package/dist/{config-4QV4QYI5.js.map → config-4GSOMUMF.js.map} +0 -0
  378. /package/dist/{config-54USUVSE.js.map → config-5YBUWFUP.js.map} +0 -0
  379. /package/dist/{config-5ZXN2T2H.js.map → config-5ZRKJTKG.js.map} +0 -0
  380. /package/dist/{config-A2GQYJDB.js.map → config-A25LTL5W.js.map} +0 -0
  381. /package/dist/{config-BBOLI7VE.js.map → config-CLU7JABG.js.map} +0 -0
  382. /package/dist/{config-BIBFLUIR.js.map → config-D2RF7L3N.js.map} +0 -0
  383. /package/dist/{config-CPYFOUQO.js.map → config-E55TKM6K.js.map} +0 -0
  384. /package/dist/{config-DWSJL3NH.js.map → config-ELDOFRJW.js.map} +0 -0
  385. /package/dist/{config-E22XAGYN.js.map → config-FPC3RBFD.js.map} +0 -0
  386. /package/dist/{config-EHE52ZTK.js.map → config-FPM3LAW7.js.map} +0 -0
  387. /package/dist/{config-EX3ZJTZI.js.map → config-G3F54CS4.js.map} +0 -0
  388. /package/dist/{config-FRK7ZL37.js.map → config-G43HRUI3.js.map} +0 -0
  389. /package/dist/{config-HQXNFQZS.js.map → config-GG3WO5PB.js.map} +0 -0
  390. /package/dist/{config-HTXOOAOD.js.map → config-JUYBWAZE.js.map} +0 -0
  391. /package/dist/{config-IPNWAJHH.js.map → config-LJ5T6TVA.js.map} +0 -0
  392. /package/dist/{config-J2C53GOT.js.map → config-MDSAE4O3.js.map} +0 -0
  393. /package/dist/{config-K63RX6EU.js.map → config-NRIOKK5T.js.map} +0 -0
  394. /package/dist/{config-L7SBSH5L.js.map → config-OYK2BSJK.js.map} +0 -0
  395. /package/dist/{config-LEALEMKA.js.map → config-PB3KA2CE.js.map} +0 -0
  396. /package/dist/{config-M3Z47VYU.js.map → config-QY4IL3PH.js.map} +0 -0
  397. /package/dist/{config-MZM3IPFM.js.map → config-R4LAOEDS.js.map} +0 -0
  398. /package/dist/{config-OJ2BPESH.js.map → config-RIAAD6RW.js.map} +0 -0
  399. /package/dist/{config-QO2XUME4.js.map → config-SYNEQAUB.js.map} +0 -0
  400. /package/dist/{config-QWQGOXQ5.js.map → config-TJKGYA2B.js.map} +0 -0
  401. /package/dist/{config-RI7IEZUF.js.map → config-UURRGA7U.js.map} +0 -0
  402. /package/dist/{config-SPW6NESU.js.map → config-VPLHQXVE.js.map} +0 -0
  403. /package/dist/{config-T2IUIU5C.js.map → config-WRACCRPN.js.map} +0 -0
  404. /package/dist/{config-VKKZGC7V.js.map → config-WVHKXEVE.js.map} +0 -0
  405. /package/dist/{config-W7EVPJNK.js.map → config-XU7R36IE.js.map} +0 -0
  406. /package/dist/{config-WKQ3FGTZ.js.map → config-Y2KOUYSS.js.map} +0 -0
  407. /package/dist/{config-WVILHDFV.js.map → databricks_volume-CNCPTZHS.js.map} +0 -0
  408. /package/dist/{config-XU6D5C7E.js.map → digitalocean-DJZOUB6Q.js.map} +0 -0
  409. /package/dist/{databricks_volume-ETRDJVVQ.js.map → discord-ETB2CADR.js.map} +0 -0
  410. /package/dist/{digitalocean-QP72DR4J.js.map → disk-WEHSTK3F.js.map} +0 -0
  411. /package/dist/{discord-BSN5RB3E.js.map → dropbox-XN6PGLNE.js.map} +0 -0
  412. /package/dist/{disk-24NWTN2I.js.map → email-OV7XCP3T.js.map} +0 -0
  413. /package/dist/{dropbox-OSTZXSIE.js.map → gcal-P56MRCGU.js.map} +0 -0
  414. /package/dist/{email-4ZFPSWIN.js.map → gcs-HFBIAE2C.js.map} +0 -0
  415. /package/dist/{gcs-PFWR6MIW.js.map → gdocs-LQ3UXP3J.js.map} +0 -0
  416. /package/dist/{gdocs-GPAZRQG5.js.map → gdrive-N6UBYLON.js.map} +0 -0
  417. /package/dist/{gdrive-XSX6A7B3.js.map → github-BPZREGPI.js.map} +0 -0
  418. /package/dist/{github-EQ4NXUTA.js.map → github_ci-7A4LUIZ7.js.map} +0 -0
  419. /package/dist/{github_ci-QL5B2Q2N.js.map → gmail-YED2MF6H.js.map} +0 -0
  420. /package/dist/{gmail-2TBT4CVH.js.map → gridfs-CPLQ4G62.js.map} +0 -0
  421. /package/dist/{gridfs-KZRZ6SIB.js.map → gsheets-4BNIJPQ6.js.map} +0 -0
  422. /package/dist/{gsheets-N53WEXN2.js.map → gslides-GDBYLO5A.js.map} +0 -0
  423. /package/dist/{gslides-TATSARTH.js.map → hf_buckets-FTJITQ3P.js.map} +0 -0
  424. /package/dist/{hf_buckets-BK7NGJWS.js.map → hf_datasets-6GXVKQD7.js.map} +0 -0
  425. /package/dist/{hf_datasets-UQ5QGM4L.js.map → hf_models-PJPGZAC5.js.map} +0 -0
  426. /package/dist/{hf_models-75LFCQCS.js.map → hf_spaces-LFNFOLBF.js.map} +0 -0
  427. /package/dist/{hf_spaces-6T2KB3UC.js.map → jaeger-GCA6MJ6E.js.map} +0 -0
  428. /package/dist/{langfuse-AMQCQWNE.js.map → lancedb-TJ5YSJY5.js.map} +0 -0
  429. /package/dist/{linear-V3TXO6CV.js.map → langfuse-RUMTUMXS.js.map} +0 -0
  430. /package/dist/{minio-IZRZY4C5.js.map → linear-BCE4KEAC.js.map} +0 -0
  431. /package/dist/{mongodb-VMKPQCPX.js.map → minio-5SO6KBTK.js.map} +0 -0
  432. /package/dist/{nextcloud-5RHQCGDO.js.map → mongodb-7C5MBESV.js.map} +0 -0
  433. /package/dist/{notion-6PPNTQFM.js.map → nextcloud-4O2LZVW2.js.map} +0 -0
  434. /package/dist/{oci-CKYBSFZJ.js.map → notion-RVKEAQ2M.js.map} +0 -0
  435. /package/dist/{postgres-WIQBVL5M.js.map → oci-OQXOIC62.js.map} +0 -0
  436. /package/dist/{qingstor-AP4IIPLY.js.map → postgres-AV45GNRS.js.map} +0 -0
  437. /package/dist/{r2-C4XGEWQY.js.map → qingstor-W277YA4K.js.map} +0 -0
  438. /package/dist/{redis-6D55Q2WB.js.map → r2-FUA4IORE.js.map} +0 -0
  439. /package/dist/{s3-XQBI2CXN.js.map → redis-LPS357NF.js.map} +0 -0
  440. /package/dist/{scaleway-SEZJVURB.js.map → s3-FPNWWIVM.js.map} +0 -0
  441. /package/dist/{seaweedfs-3XYIAFU2.js.map → scaleway-BP3732U7.js.map} +0 -0
  442. /package/dist/{slack-ZHXDJQY4.js.map → seaweedfs-MC6HIEP4.js.map} +0 -0
  443. /package/dist/{ssh-X2MO7JOV.js.map → slack-JFGW7VLN.js.map} +0 -0
  444. /package/dist/{supabase-BBM44UTM.js.map → ssh-UYPG42LM.js.map} +0 -0
  445. /package/dist/{tencent-X72USLJ7.js.map → supabase-A3KUFMDC.js.map} +0 -0
  446. /package/dist/{trello-EER5NG7L.js.map → tencent-5464UQ2X.js.map} +0 -0
  447. /package/dist/{wasabi-O4MVIUFG.js.map → trello-O2KB3FUO.js.map} +0 -0
@@ -1,25 +1,40 @@
1
1
  // src/resource/disk/disk.ts
2
- import { chmod as chmod2, mkdir as mkdir5, readdir as readdir4, readFile as readFile3, stat as fsStat3, writeFile as writeFile3 } from "fs/promises";
3
- import path8 from "path";
2
+ import {
3
+ chmod as chmod2,
4
+ mkdir as mkdir2,
5
+ readdir as readdir4,
6
+ readFile as readFile3,
7
+ stat as fsStat4,
8
+ statfs as fsStatfs,
9
+ writeFile as writeFile3
10
+ } from "fs/promises";
11
+ import path5 from "path";
4
12
  import {
5
13
  BaseResource,
14
+ CapacityState,
6
15
  PathSpec,
7
- ResourceName as ResourceName7,
16
+ ResourceName as ResourceName8,
8
17
  makeResolveGlob,
9
18
  mountKey,
10
19
  mountPrefixOf as mountPrefixOf2
11
20
  } from "@struktoai/mirage-core";
12
21
 
13
22
  // src/commands/builtin/disk/index.ts
14
- import {
15
- ResourceName as ResourceName5,
16
- makeFiletypeCommands,
17
- makeGenericCommands
18
- } from "@struktoai/mirage-core";
23
+ import { ResourceName as ResourceName6, makeGenericCommands } from "@struktoai/mirage-core";
19
24
 
20
- // src/core/disk/read.ts
21
- import { readFile } from "fs/promises";
22
- import { enoent, record, ResourceName } from "@struktoai/mirage-core";
25
+ // src/core/disk/append.ts
26
+ import { appendFile } from "fs/promises";
27
+ import { ResourceName, invalidateAfterWrite, record } from "@struktoai/mirage-core";
28
+
29
+ // src/core/disk/errors.ts
30
+ function diskError(err, spec) {
31
+ const code = err.code;
32
+ if (typeof code !== "string") return err;
33
+ const out = new Error(spec.virtual);
34
+ out.code = code;
35
+ out.virtualPath = spec.virtual;
36
+ return out;
37
+ }
23
38
 
24
39
  // src/core/disk/utils.ts
25
40
  import path from "path";
@@ -35,74 +50,17 @@ function resolveSafe(root, virtual) {
35
50
  return resolved;
36
51
  }
37
52
 
38
- // src/core/disk/read.ts
39
- async function read(accessor, path9) {
53
+ // src/core/disk/append.ts
54
+ async function appendBytes(accessor, p, data) {
40
55
  const start = performance.now();
41
- const virtual = path9.mountPath;
42
- const full = resolveSafe(accessor.root, virtual);
43
- let data;
44
- try {
45
- data = await readFile(full);
46
- } catch (err) {
47
- if (err.code === "ENOENT") {
48
- throw enoent(path9);
49
- }
50
- throw err;
51
- }
52
- record("read", virtual, ResourceName.DISK, data.byteLength, start);
53
- return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
54
- }
55
-
56
- // src/core/disk/stat.ts
57
- import { stat as fsStat } from "fs/promises";
58
- import path2 from "path";
59
- import { enoent as enoent2, FileStat, FileType, guessType } from "@struktoai/mirage-core";
60
- async function stat(accessor, p) {
61
56
  const virtual = p.mountPath;
62
57
  const full = resolveSafe(accessor.root, virtual);
63
- let st;
64
58
  try {
65
- st = await fsStat(full);
59
+ await appendFile(full, data);
66
60
  } catch (err) {
67
- if (err.code === "ENOENT") {
68
- throw enoent2(p);
69
- }
70
- throw err;
61
+ throw diskError(err, p);
71
62
  }
72
- const modified = st.mtime.toISOString();
73
- const name = path2.basename(full);
74
- if (st.isDirectory()) {
75
- return new FileStat({
76
- name,
77
- size: null,
78
- modified,
79
- type: FileType.DIRECTORY,
80
- mode: st.mode & 4095,
81
- atime: st.atime.toISOString()
82
- });
83
- }
84
- return new FileStat({
85
- name,
86
- size: st.size,
87
- modified,
88
- fingerprint: modified,
89
- type: guessType(name),
90
- mode: st.mode & 4095,
91
- atime: st.atime.toISOString()
92
- });
93
- }
94
-
95
- // src/core/disk/append.ts
96
- import { appendFile, mkdir } from "fs/promises";
97
- import path3 from "path";
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);
63
+ record("append", virtual, ResourceName.DISK, data.byteLength, start);
106
64
  await invalidateAfterWrite(p);
107
65
  }
108
66
 
@@ -110,46 +68,51 @@ async function appendBytes(accessor, p, data) {
110
68
  var SCOPE_ERROR = 5e4;
111
69
 
112
70
  // 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";
71
+ import { copyFile, stat } from "fs/promises";
72
+ import { invalidateAfterWrite as invalidateAfterWrite2 } from "@struktoai/mirage-core";
116
73
  async function copy(accessor, src, dst) {
117
74
  const s = resolveSafe(accessor.root, src.mountPath);
118
75
  const d = resolveSafe(accessor.root, dst.mountPath);
119
- await mkdir2(path4.dirname(d), { recursive: true });
120
76
  try {
121
77
  await copyFile(s, d);
122
78
  } catch (err) {
79
+ let blame = dst;
123
80
  if (err.code === "ENOENT") {
124
- throw enoent3(src);
81
+ const srcMissing = await stat(s).then(
82
+ () => false,
83
+ () => true
84
+ );
85
+ if (srcMissing) blame = src;
125
86
  }
126
- throw err;
87
+ throw diskError(err, blame);
127
88
  }
128
89
  await invalidateAfterWrite2(dst);
129
90
  }
130
91
 
131
92
  // 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";
93
+ import { writeFile } from "fs/promises";
94
+ import { ResourceName as ResourceName2, invalidateAfterWrite as invalidateAfterWrite3, record as record2 } from "@struktoai/mirage-core";
135
95
  async function writeBytes(accessor, p, data) {
136
96
  const start = performance.now();
137
97
  const virtual = p.mountPath;
138
98
  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);
99
+ try {
100
+ await writeFile(full, data);
101
+ } catch (err) {
102
+ throw diskError(err, p);
103
+ }
104
+ record2("write", virtual, ResourceName2.DISK, data.byteLength, start);
142
105
  await invalidateAfterWrite3(p);
143
106
  }
144
107
 
145
108
  // src/core/disk/create.ts
146
- function create(accessor, path9) {
147
- return writeBytes(accessor, path9, new Uint8Array());
109
+ function create(accessor, path6) {
110
+ return writeBytes(accessor, path6, new Uint8Array());
148
111
  }
149
112
 
150
- // src/core/disk/du.ts
113
+ // src/core/disk/du/walk.ts
151
114
  import { readdir, stat as stat2 } from "fs/promises";
152
- import path6 from "path";
115
+ import path2 from "path";
153
116
  async function walkSizes(full) {
154
117
  let total = 0;
155
118
  let st;
@@ -160,9 +123,9 @@ async function walkSizes(full) {
160
123
  }
161
124
  if (st.isFile()) return st.size;
162
125
  if (!st.isDirectory()) return 0;
163
- const entries = await readdir(full, { withFileTypes: true });
164
- for (const e of entries) {
165
- const child = path6.join(full, e.name);
126
+ const entries2 = await readdir(full, { withFileTypes: true });
127
+ for (const e of entries2) {
128
+ const child = path2.join(full, e.name);
166
129
  if (e.isDirectory()) total += await walkSizes(child);
167
130
  else if (e.isFile()) {
168
131
  try {
@@ -174,7 +137,7 @@ async function walkSizes(full) {
174
137
  }
175
138
  return total;
176
139
  }
177
- async function walkAll(accessor, full, entries) {
140
+ async function walkAll(accessor, full, entries2) {
178
141
  let total = 0;
179
142
  let st;
180
143
  try {
@@ -183,21 +146,21 @@ async function walkAll(accessor, full, entries) {
183
146
  return 0;
184
147
  }
185
148
  if (st.isFile()) {
186
- const rel = "/" + path6.relative(accessor.root, full).split(path6.sep).join("/");
187
- entries.push([rel, st.size]);
149
+ const rel = "/" + path2.relative(accessor.root, full).split(path2.sep).join("/");
150
+ entries2.push([rel, st.size]);
188
151
  return st.size;
189
152
  }
190
153
  if (!st.isDirectory()) return 0;
191
154
  const children = await readdir(full, { withFileTypes: true });
192
155
  for (const e of children) {
193
- const child = path6.join(full, e.name);
156
+ const child = path2.join(full, e.name);
194
157
  if (e.isDirectory()) {
195
- total += await walkAll(accessor, child, entries);
158
+ total += await walkAll(accessor, child, entries2);
196
159
  } else if (e.isFile()) {
197
160
  try {
198
161
  const cst = await stat2(child);
199
- const rel = "/" + path6.relative(accessor.root, child).split(path6.sep).join("/");
200
- entries.push([rel, cst.size]);
162
+ const rel = "/" + path2.relative(accessor.root, child).split(path2.sep).join("/");
163
+ entries2.push([rel, cst.size]);
201
164
  total += cst.size;
202
165
  } catch {
203
166
  }
@@ -205,24 +168,29 @@ async function walkAll(accessor, full, entries) {
205
168
  }
206
169
  return total;
207
170
  }
208
- async function du(accessor, p) {
209
- const virtual = p.mountPath;
171
+
172
+ // src/core/disk/du/entries.ts
173
+ import { compareCodePoints } from "@struktoai/mirage-core";
174
+ async function entries(accessor, p) {
175
+ const virtual = norm(p.mountPath);
210
176
  const full = resolveSafe(accessor.root, virtual);
211
- return walkSizes(full);
177
+ const entries2 = [];
178
+ const total = await walkAll(accessor, full, entries2);
179
+ entries2.sort((a, b) => compareCodePoints(a[0], b[0]));
180
+ return [entries2, total];
212
181
  }
213
- async function duAll(accessor, p) {
214
- const virtual = norm(p.mountPath);
182
+
183
+ // src/core/disk/du/size.ts
184
+ async function size(accessor, p) {
185
+ const virtual = p.mountPath;
215
186
  const full = resolveSafe(accessor.root, virtual);
216
- const entries = [];
217
- const total = await walkAll(accessor, full, entries);
218
- entries.sort((a, b) => a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0);
219
- return [entries, total];
187
+ return walkSizes(full);
220
188
  }
221
189
 
222
190
  // src/core/disk/exists.ts
223
191
  import { access } from "fs/promises";
224
- async function exists(accessor, path9) {
225
- const full = resolveSafe(accessor.root, path9.mountPath);
192
+ async function exists(accessor, path6) {
193
+ const full = resolveSafe(accessor.root, path6.mountPath);
226
194
  try {
227
195
  await access(full);
228
196
  return true;
@@ -233,23 +201,24 @@ async function exists(accessor, path9) {
233
201
 
234
202
  // src/core/disk/find.ts
235
203
  import { readdir as readdir2, stat as stat3 } from "fs/promises";
236
- import path7 from "path";
204
+ import path3 from "path";
237
205
  import {
238
206
  buildTree,
239
207
  emitStartPath,
240
208
  keep,
241
- startBasename
209
+ startBasename,
210
+ compareCodePoints as compareCodePoints2
242
211
  } from "@struktoai/mirage-core";
243
212
  async function walk(ctx, full, current, depth) {
244
213
  const opts = ctx.options;
245
214
  if (opts.maxDepth !== null && opts.maxDepth !== void 0 && depth > opts.maxDepth) return;
246
- let entries;
215
+ let entries2;
247
216
  try {
248
- entries = await readdir2(full, { withFileTypes: true });
217
+ entries2 = await readdir2(full, { withFileTypes: true });
249
218
  } catch {
250
219
  return;
251
220
  }
252
- for (const e of entries) {
221
+ for (const e of entries2) {
253
222
  const kind = e.isDirectory() ? "d" : "f";
254
223
  const entryPath = current === "/" ? `/${e.name}` : `${current}/${e.name}`;
255
224
  const entryName = e.name;
@@ -262,7 +231,7 @@ async function walk(ctx, full, current, depth) {
262
231
  let isEmpty = null;
263
232
  if (accept && opts.empty === true) {
264
233
  try {
265
- isEmpty = kind === "f" ? (await stat3(path7.join(full, e.name))).size === 0 : (await readdir2(path7.join(full, e.name))).length === 0;
234
+ isEmpty = kind === "f" ? (await stat3(path3.join(full, e.name))).size === 0 : (await readdir2(path3.join(full, e.name))).length === 0;
266
235
  } catch {
267
236
  isEmpty = null;
268
237
  }
@@ -280,7 +249,7 @@ async function walk(ctx, full, current, depth) {
280
249
  }
281
250
  if (accept && kind === "f" && (opts.minSize !== null || opts.maxSize !== null || opts.mtimeMin !== null || opts.mtimeMax !== null)) {
282
251
  try {
283
- const st = await stat3(path7.join(full, e.name));
252
+ const st = await stat3(path3.join(full, e.name));
284
253
  if (opts.minSize !== null && opts.minSize !== void 0 && st.size < opts.minSize)
285
254
  accept = false;
286
255
  if (opts.maxSize !== null && opts.maxSize !== void 0 && st.size > opts.maxSize)
@@ -298,7 +267,7 @@ async function walk(ctx, full, current, depth) {
298
267
  }
299
268
  if (accept) ctx.results.push(entryPath);
300
269
  if (kind === "d") {
301
- await walk(ctx, path7.join(full, e.name), entryPath, depth + 1);
270
+ await walk(ctx, path3.join(full, e.name), entryPath, depth + 1);
302
271
  }
303
272
  }
304
273
  }
@@ -344,31 +313,118 @@ async function find(accessor, p, options = {}) {
344
313
  });
345
314
  }
346
315
  await walk({ accessor, base: virtual, baseDepth, options, tree, results }, full, virtual, 0);
347
- results.sort();
316
+ results.sort(compareCodePoints2);
348
317
  return results;
349
318
  }
350
319
 
351
320
  // src/core/disk/mkdir.ts
352
321
  import { mkdir as fsMkdir } from "fs/promises";
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);
322
+ import {
323
+ invalidateAfterWrite as invalidateAfterWrite4,
324
+ invalidateAncestors,
325
+ norm as norm2
326
+ } from "@struktoai/mirage-core";
327
+
328
+ // src/core/disk/dest.ts
329
+ import { stat as fsStat } from "fs/promises";
330
+ import {
331
+ ancestors,
332
+ enotdir,
333
+ mountedPath
334
+ } from "@struktoai/mirage-core";
335
+ async function mkdirComponentError(root, spec, key) {
336
+ for (const component of ancestors(key)) {
337
+ try {
338
+ const st = await fsStat(resolveSafe(root, component));
339
+ if (!st.isDirectory()) return enotdir(mountedPath(spec, component));
340
+ } catch {
341
+ return null;
342
+ }
343
+ }
344
+ return null;
345
+ }
346
+
347
+ // src/core/disk/mkdir.ts
348
+ async function mkdir(accessor, path6, parents = false) {
349
+ const root = accessor.root;
350
+ const full = resolveSafe(root, path6.mountPath);
356
351
  if (parents) {
357
- await fsMkdir(full, { recursive: true });
358
- await invalidateAfterWrite4(path9);
359
- await invalidateAncestors(path9);
352
+ try {
353
+ await fsMkdir(full, { recursive: true });
354
+ } catch (err) {
355
+ const named = err.code === "ENOTDIR" ? await mkdirComponentError(root, path6, norm2(path6.mountPath)) : null;
356
+ throw named ?? diskError(err, path6);
357
+ }
358
+ await invalidateAfterWrite4(path6);
359
+ await invalidateAncestors(path6);
360
360
  return;
361
361
  }
362
362
  try {
363
363
  await fsMkdir(full);
364
364
  } catch (err) {
365
- const code = err.code;
366
- if (code === "ENOENT") {
367
- throw new Error(`parent directory does not exist: ${path9.mountPath}`);
365
+ throw diskError(err, path6);
366
+ }
367
+ await invalidateAfterWrite4(path6);
368
+ }
369
+
370
+ // src/core/disk/read.ts
371
+ import { open, readFile } from "fs/promises";
372
+ import { enoent, record as record3, ResourceName as ResourceName3 } from "@struktoai/mirage-core";
373
+ var CHUNK = 1 << 20;
374
+ async function read(accessor, path6) {
375
+ const start = performance.now();
376
+ const virtual = path6.mountPath;
377
+ const full = resolveSafe(accessor.root, virtual);
378
+ let data;
379
+ try {
380
+ data = await readFile(full);
381
+ } catch (err) {
382
+ if (err.code === "ENOENT") {
383
+ throw enoent(path6);
368
384
  }
369
- if (code !== "EEXIST") throw err;
385
+ throw err;
386
+ }
387
+ record3("read", virtual, ResourceName3.DISK, data.byteLength, start);
388
+ return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
389
+ }
390
+ async function readRange(accessor, path6, _index, offset, size2) {
391
+ const start = performance.now();
392
+ const virtual = path6.mountPath;
393
+ const full = resolveSafe(accessor.root, virtual);
394
+ let handle;
395
+ try {
396
+ handle = await open(full, "r");
397
+ } catch (err) {
398
+ if (err.code === "ENOENT") {
399
+ throw enoent(path6);
400
+ }
401
+ throw err;
402
+ }
403
+ try {
404
+ if (size2 !== null) {
405
+ const buf = Buffer.allocUnsafe(size2);
406
+ const { bytesRead } = await handle.read(buf, 0, size2, offset);
407
+ const out = new Uint8Array(buf.buffer, buf.byteOffset, bytesRead);
408
+ record3("read", virtual, ResourceName3.DISK, bytesRead, start);
409
+ return out;
410
+ }
411
+ const parts = [];
412
+ let total = 0;
413
+ let at = offset;
414
+ for (; ; ) {
415
+ const buf = Buffer.allocUnsafe(CHUNK);
416
+ const { bytesRead } = await handle.read(buf, 0, CHUNK, at);
417
+ if (bytesRead === 0) break;
418
+ parts.push(buf.subarray(0, bytesRead));
419
+ total += bytesRead;
420
+ at += bytesRead;
421
+ }
422
+ const joined = Buffer.concat(parts, total);
423
+ record3("read", virtual, ResourceName3.DISK, total, start);
424
+ return new Uint8Array(joined.buffer, joined.byteOffset, joined.byteLength);
425
+ } finally {
426
+ await handle.close();
370
427
  }
371
- await invalidateAfterWrite4(path9);
372
428
  }
373
429
 
374
430
  // src/core/disk/readdir.ts
@@ -376,13 +432,15 @@ import { readdir as fsReaddir } from "fs/promises";
376
432
  import {
377
433
  IndexEntry,
378
434
  ResourceType,
379
- enotdir,
435
+ enoent as enoent2,
436
+ enotdir as enotdir2,
380
437
  mountPrefixOf,
381
- rstripSlash
438
+ rstripSlash,
439
+ compareCodePoints as compareCodePoints3
382
440
  } from "@struktoai/mirage-core";
383
- async function readdir3(accessor, path9, index) {
384
- const virtual = path9.pattern !== null ? path9.directory : path9.mountPath;
385
- const mountPrefix = mountPrefixOf(path9.virtual, path9.resourcePath);
441
+ async function readdir3(accessor, path6, index) {
442
+ const virtual = path6.pattern !== null ? path6.directory : path6.mountPath;
443
+ const mountPrefix = mountPrefixOf(path6.virtual, path6.resourcePath);
386
444
  const virtualKey = rstripSlash(mountPrefix + virtual) || "/";
387
445
  if (index !== void 0) {
388
446
  const cached = await index.listDir(virtualKey);
@@ -391,18 +449,18 @@ async function readdir3(accessor, path9, index) {
391
449
  }
392
450
  }
393
451
  const full = resolveSafe(accessor.root, virtual);
394
- let entries;
452
+ let entries2;
395
453
  try {
396
- entries = await fsReaddir(full);
454
+ entries2 = await fsReaddir(full);
397
455
  } catch (err) {
398
456
  const code = err.code;
399
- if (code === "ENOTDIR") throw enotdir(path9);
400
- if (code === "ENOENT") throw enotdir(path9);
457
+ if (code === "ENOTDIR") throw enotdir2(path6);
458
+ if (code === "ENOENT") throw enoent2(path6);
401
459
  throw err;
402
460
  }
403
461
  const base = norm(virtual);
404
462
  const dirPrefix = base === "/" ? "/" : `${base}/`;
405
- const sorted = [...entries].sort();
463
+ const sorted = [...entries2].sort(compareCodePoints3);
406
464
  const virtualEntries = sorted.map((e) => `${mountPrefix}${dirPrefix}${e}`);
407
465
  if (index !== void 0) {
408
466
  const indexEntries = sorted.map((name) => [
@@ -421,7 +479,7 @@ async function readdir3(accessor, path9, index) {
421
479
  // src/core/disk/rename.ts
422
480
  import { rename as fsRename } from "fs/promises";
423
481
  import {
424
- enoent as enoent4,
482
+ enoent as enoent3,
425
483
  invalidateAfterUnlink,
426
484
  invalidateAfterWrite as invalidateAfterWrite5
427
485
  } from "@struktoai/mirage-core";
@@ -432,7 +490,7 @@ async function rename(accessor, src, dst) {
432
490
  await fsRename(s, d);
433
491
  } catch (err) {
434
492
  if (err.code === "ENOENT") {
435
- throw enoent4(src);
493
+ throw enoent3(src);
436
494
  }
437
495
  throw err;
438
496
  }
@@ -443,36 +501,36 @@ async function rename(accessor, src, dst) {
443
501
  // src/core/disk/rm.ts
444
502
  import { rm } from "fs/promises";
445
503
  import { invalidateAfterUnlink as invalidateAfterUnlink2 } from "@struktoai/mirage-core";
446
- async function rmR(accessor, path9) {
447
- const full = resolveSafe(accessor.root, path9.mountPath);
504
+ async function rmR(accessor, path6) {
505
+ const full = resolveSafe(accessor.root, path6.mountPath);
448
506
  await rm(full, { recursive: true, force: true });
449
- await invalidateAfterUnlink2(path9);
507
+ await invalidateAfterUnlink2(path6);
450
508
  }
451
509
 
452
510
  // src/core/disk/rmdir.ts
453
511
  import { rmdir as fsRmdir } from "fs/promises";
454
512
  import { invalidateAfterUnlink as invalidateAfterUnlink3 } from "@struktoai/mirage-core";
455
- async function rmdir(accessor, path9) {
456
- const full = resolveSafe(accessor.root, path9.mountPath);
513
+ async function rmdir(accessor, path6) {
514
+ const full = resolveSafe(accessor.root, path6.mountPath);
457
515
  try {
458
516
  await fsRmdir(full);
459
517
  } catch (err) {
460
518
  if (err.code === "ENOENT") return;
461
519
  throw err;
462
520
  }
463
- await invalidateAfterUnlink3(path9);
521
+ await invalidateAfterUnlink3(path6);
464
522
  }
465
523
 
466
524
  // src/core/disk/set_attrs.ts
467
525
  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);
526
+ import { enoent as enoent4 } from "@struktoai/mirage-core";
527
+ async function setAttrs(accessor, path6, fields) {
528
+ const full = resolveSafe(accessor.root, path6.mountPath);
471
529
  let st;
472
530
  try {
473
531
  st = await fsStat2(full);
474
532
  } catch (err) {
475
- if (err.code === "ENOENT") throw enoent5(path9);
533
+ if (err.code === "ENOENT") throw enoent4(path6);
476
534
  throw err;
477
535
  }
478
536
  const residual = {};
@@ -491,11 +549,47 @@ async function setAttrs(accessor, path9, fields) {
491
549
  return residual;
492
550
  }
493
551
 
552
+ // src/core/disk/stat.ts
553
+ import { stat as fsStat3 } from "fs/promises";
554
+ import path4 from "path";
555
+ import { FileStat, FileType, guessType } from "@struktoai/mirage-core";
556
+ async function stat4(accessor, p) {
557
+ const virtual = p.mountPath;
558
+ const full = resolveSafe(accessor.root, virtual);
559
+ let st;
560
+ try {
561
+ st = await fsStat3(full);
562
+ } catch (err) {
563
+ throw diskError(err, p);
564
+ }
565
+ const modified = st.mtime.toISOString();
566
+ const name = path4.basename(full);
567
+ if (st.isDirectory()) {
568
+ return new FileStat({
569
+ name,
570
+ size: null,
571
+ modified,
572
+ type: FileType.DIRECTORY,
573
+ mode: st.mode & 4095,
574
+ atime: st.atime.toISOString()
575
+ });
576
+ }
577
+ return new FileStat({
578
+ name,
579
+ size: st.size,
580
+ modified,
581
+ fingerprint: modified,
582
+ type: guessType(name),
583
+ mode: st.mode & 4095,
584
+ atime: st.atime.toISOString()
585
+ });
586
+ }
587
+
494
588
  // src/core/disk/stream.ts
495
589
  import { createReadStream } from "fs";
496
- import { enoent as enoent6, recordStream, ResourceName as ResourceName4 } from "@struktoai/mirage-core";
497
- async function* stream(accessor, path9) {
498
- const virtual = path9.mountPath;
590
+ import { enoent as enoent5, recordStream, ResourceName as ResourceName4 } from "@struktoai/mirage-core";
591
+ async function* stream(accessor, path6) {
592
+ const virtual = path6.mountPath;
499
593
  const full = resolveSafe(accessor.root, virtual);
500
594
  const rec = recordStream("read", virtual, ResourceName4.DISK);
501
595
  const rs = createReadStream(full, { highWaterMark: 65536 });
@@ -508,7 +602,7 @@ async function* stream(accessor, path9) {
508
602
  }
509
603
  } catch (err) {
510
604
  if (err.code === "ENOENT") {
511
- throw enoent6(path9);
605
+ throw enoent5(path6);
512
606
  }
513
607
  throw err;
514
608
  }
@@ -516,9 +610,10 @@ async function* stream(accessor, path9) {
516
610
 
517
611
  // src/core/disk/truncate.ts
518
612
  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);
613
+ import { ResourceName as ResourceName5, invalidateAfterWrite as invalidateAfterWrite6, record as record4 } from "@struktoai/mirage-core";
614
+ async function truncate(accessor, path6, length) {
615
+ const start = performance.now();
616
+ const full = resolveSafe(accessor.root, path6.mountPath);
522
617
  let data;
523
618
  try {
524
619
  data = await readFile2(full);
@@ -532,35 +627,37 @@ async function truncate(accessor, path9, length) {
532
627
  const out = new Uint8Array(length);
533
628
  out.set(data.subarray(0, Math.min(data.byteLength, length)));
534
629
  await writeFile2(full, out);
535
- await invalidateAfterWrite6(path9);
630
+ record4("truncate", path6.mountPath, ResourceName5.DISK, 0, start);
631
+ await invalidateAfterWrite6(path6);
536
632
  }
537
633
 
538
634
  // src/core/disk/unlink.ts
539
635
  import { unlink as fsUnlink } from "fs/promises";
540
636
  import { invalidateAfterUnlink as invalidateAfterUnlink4 } from "@struktoai/mirage-core";
541
- async function unlink(accessor, path9) {
542
- const full = resolveSafe(accessor.root, path9.mountPath);
637
+ async function unlink(accessor, path6) {
638
+ const full = resolveSafe(accessor.root, path6.mountPath);
543
639
  try {
544
640
  await fsUnlink(full);
545
641
  } catch (err) {
546
642
  if (err.code === "ENOENT") return;
547
643
  throw err;
548
644
  }
549
- await invalidateAfterUnlink4(path9);
645
+ await invalidateAfterUnlink4(path6);
550
646
  }
551
647
 
552
648
  // src/commands/builtin/disk/io.ts
553
649
  var DISK_IO = {
554
650
  readdir: readdir3,
555
651
  readBytes: read,
652
+ readRange,
556
653
  readStream: stream,
557
- stat,
654
+ stat: stat4,
558
655
  isMounted: (a) => a.root !== "",
559
656
  local: true,
560
657
  maxGlobMatches: SCOPE_ERROR,
561
658
  write: writeBytes,
562
659
  exists,
563
- mkdir: mkdir4,
660
+ mkdir,
564
661
  unlink,
565
662
  rmdir,
566
663
  rmR,
@@ -571,18 +668,12 @@ var DISK_IO = {
571
668
  append: appendBytes,
572
669
  setAttrs,
573
670
  find,
574
- duTotal: du,
575
- duAll
671
+ du: { size, entries }
576
672
  };
577
673
 
578
674
  // src/commands/builtin/disk/index.ts
579
675
  var DISK_COMMANDS = [
580
- ...makeFiletypeCommands({
581
- resource: ResourceName5.DISK,
582
- readBytes: read,
583
- statEntry: stat
584
- }),
585
- ...makeGenericCommands(ResourceName5.DISK, DISK_IO)
676
+ ...makeGenericCommands(ResourceName6.DISK, DISK_IO)
586
677
  ];
587
678
 
588
679
  // src/accessor/disk.ts
@@ -596,11 +687,9 @@ var DiskAccessor = class extends Accessor {
596
687
  };
597
688
 
598
689
  // src/ops/disk/index.ts
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
690
+ import { ResourceName as ResourceName7, makeGenericOps } from "@struktoai/mirage-core";
691
+ var DISK_OPS = makeGenericOps(ResourceName7.DISK, DISK_IO, {
692
+ mkdirParents: true
604
693
  });
605
694
 
606
695
  // src/resource/disk/prompt.ts
@@ -611,9 +700,9 @@ var DISK_PROMPT = `{prefix}
611
700
  // src/resource/disk/disk.ts
612
701
  var globCore = makeResolveGlob(readdir3, SCOPE_ERROR);
613
702
  async function walkFiles(root, current, out) {
614
- const entries = await readdir4(current, { withFileTypes: true });
615
- for (const e of entries) {
616
- const child = path8.join(current, e.name);
703
+ const entries2 = await readdir4(current, { withFileTypes: true });
704
+ for (const e of entries2) {
705
+ const child = path5.join(current, e.name);
617
706
  if (e.isDirectory()) {
618
707
  await walkFiles(root, child, out);
619
708
  } else if (e.isFile()) {
@@ -622,8 +711,10 @@ async function walkFiles(root, current, out) {
622
711
  }
623
712
  }
624
713
  var DiskResource = class extends BaseResource {
625
- kind = ResourceName7.DISK;
714
+ kind = ResourceName8.DISK;
626
715
  cachesReads = false;
716
+ // byte store: stat() sizes every file from metadata
717
+ sizesAlwaysKnown = true;
627
718
  indexTtl = 60;
628
719
  prompt = DISK_PROMPT;
629
720
  root;
@@ -632,16 +723,16 @@ var DiskResource = class extends BaseResource {
632
723
  read_bytes: read,
633
724
  write: writeBytes,
634
725
  readdir: readdir3,
635
- stat,
726
+ stat: stat4,
636
727
  unlink,
637
728
  rmdir,
638
729
  copy,
639
730
  rename,
640
- mkdir: mkdir4,
731
+ mkdir,
641
732
  read_stream: stream,
642
733
  rm_recursive: rmR,
643
- du_total: du,
644
- du_all: duAll,
734
+ du_size: size,
735
+ du_entries: entries,
645
736
  create,
646
737
  truncate,
647
738
  exists,
@@ -650,14 +741,31 @@ var DiskResource = class extends BaseResource {
650
741
  };
651
742
  constructor(options) {
652
743
  super();
653
- this.root = path8.resolve(options.root);
744
+ this.root = path5.resolve(options.root);
654
745
  this.accessor = new DiskAccessor(this.root);
655
746
  }
747
+ // The resolved root is the storage: two DiskResources built on the same
748
+ // directory are one store, however they were spelled.
749
+ storageId() {
750
+ return `${this.kind}:${this.root}`;
751
+ }
656
752
  async open() {
657
- await mkdir5(this.root, { recursive: true });
753
+ await mkdir2(this.root, { recursive: true });
658
754
  }
659
- close() {
660
- return Promise.resolve();
755
+ // A real filesystem reports real numbers (QUOTA). GNU df: used counts
756
+ // reserved blocks (blocks - bfree), available excludes them (bavail).
757
+ async statfs() {
758
+ const st = await fsStatfs(this.root);
759
+ const bsize = st.bsize;
760
+ return {
761
+ state: CapacityState.QUOTA,
762
+ total: st.blocks * bsize,
763
+ used: (st.blocks - st.bfree) * bsize,
764
+ available: st.bavail * bsize,
765
+ inodes: st.files,
766
+ inodesUsed: st.files - st.ffree,
767
+ inodesFree: st.ffree
768
+ };
661
769
  }
662
770
  ops() {
663
771
  return DISK_OPS;
@@ -681,13 +789,13 @@ var DiskResource = class extends BaseResource {
681
789
  return readdir3(this.accessor, p, this.index);
682
790
  }
683
791
  stat(p) {
684
- return stat(this.accessor, p);
792
+ return stat4(this.accessor, p);
685
793
  }
686
794
  exists(p) {
687
795
  return exists(this.accessor, p);
688
796
  }
689
797
  mkdir(p, options) {
690
- return mkdir4(this.accessor, p, options?.recursive === true);
798
+ return mkdir(this.accessor, p, options?.recursive === true);
691
799
  }
692
800
  rmdir(p) {
693
801
  return rmdir(this.accessor, p);
@@ -708,7 +816,7 @@ var DiskResource = class extends BaseResource {
708
816
  return rmR(this.accessor, p);
709
817
  }
710
818
  du(p) {
711
- return du(this.accessor, p);
819
+ return size(this.accessor, p);
712
820
  }
713
821
  find(p, options = {}) {
714
822
  return find(this.accessor, p, options);
@@ -726,16 +834,16 @@ var DiskResource = class extends BaseResource {
726
834
  return globCore(this.accessor, effective, this.index);
727
835
  }
728
836
  async getState() {
729
- await mkdir5(this.root, { recursive: true });
837
+ await mkdir2(this.root, { recursive: true });
730
838
  const files = {};
731
839
  const modes = {};
732
840
  const fileList = [];
733
841
  await walkFiles(this.root, this.root, fileList);
734
842
  for (const full of fileList) {
735
- const rel = path8.relative(this.root, full).split(path8.sep).join("/");
843
+ const rel = path5.relative(this.root, full).split(path5.sep).join("/");
736
844
  const data = await readFile3(full);
737
845
  files[rel] = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
738
- modes[rel] = (await fsStat3(full)).mode & 4095;
846
+ modes[rel] = (await fsStat4(full)).mode & 4095;
739
847
  }
740
848
  return {
741
849
  type: this.kind,
@@ -744,10 +852,10 @@ var DiskResource = class extends BaseResource {
744
852
  };
745
853
  }
746
854
  async loadState(state) {
747
- await mkdir5(this.root, { recursive: true });
855
+ await mkdir2(this.root, { recursive: true });
748
856
  for (const [rel, data] of Object.entries(state.files)) {
749
- const full = path8.join(this.root, rel);
750
- await mkdir5(path8.dirname(full), { recursive: true });
857
+ const full = path5.join(this.root, rel);
858
+ await mkdir2(path5.dirname(full), { recursive: true });
751
859
  await writeFile3(full, data);
752
860
  const mode = state.modes?.[rel];
753
861
  if (mode !== void 0) await chmod2(full, mode);
@@ -761,4 +869,4 @@ export {
761
869
  DISK_PROMPT,
762
870
  DiskResource
763
871
  };
764
- //# sourceMappingURL=chunk-W5ZLIQFR.js.map
872
+ //# sourceMappingURL=chunk-WG5YS6TC.js.map