@struktoai/mirage-node 0.0.3-alpha.0 → 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 (433) hide show
  1. package/README.md +1 -1
  2. package/dist/aliyun-PGI57A43.js +10 -0
  3. package/dist/backblaze-TSPL6Y56.js +10 -0
  4. package/dist/box-7XTZYDSO.js +8 -0
  5. package/dist/cas.lua +15 -0
  6. package/dist/ceph-C265UI5T.js +10 -0
  7. package/dist/{chunk-IQVNVTOP.js → chunk-25W4XQJZ.js} +5 -5
  8. package/dist/{chunk-QGRDPSAH.js → chunk-2ERLWAGG.js} +4 -2
  9. package/dist/chunk-2ERLWAGG.js.map +1 -0
  10. package/dist/{chunk-NJMGCT63.js → chunk-2QNPKPZZ.js} +7 -2
  11. package/dist/chunk-2QNPKPZZ.js.map +1 -0
  12. package/dist/{chunk-ZNWVJ6UW.js → chunk-3ASOQTZB.js} +7 -2
  13. package/dist/chunk-3ASOQTZB.js.map +1 -0
  14. package/dist/{chunk-ERELJ7BS.js → chunk-3JZN3GYO.js} +14 -13
  15. package/dist/chunk-3JZN3GYO.js.map +1 -0
  16. package/dist/{chunk-DTAY7LPC.js → chunk-4GYB7DGC.js} +295 -706
  17. package/dist/chunk-4GYB7DGC.js.map +1 -0
  18. package/dist/{chunk-G5BZE7UA.js → chunk-4M73WHIE.js} +3 -3
  19. package/dist/{chunk-Q6CDMOM6.js → chunk-4X6CLF4F.js} +3 -3
  20. package/dist/{chunk-3IJSIVKT.js → chunk-5I7Q7RHW.js} +3 -3
  21. package/dist/{chunk-YPT4JBUY.js → chunk-5YRWF5RP.js} +18 -16
  22. package/dist/chunk-5YRWF5RP.js.map +1 -0
  23. package/dist/chunk-5ZHNPNDD.js +944 -0
  24. package/dist/chunk-5ZHNPNDD.js.map +1 -0
  25. package/dist/{chunk-VGLHY6BK.js → chunk-AULFV3KY.js} +1 -2
  26. package/dist/chunk-AULFV3KY.js.map +1 -0
  27. package/dist/{chunk-A4Z6DZ22.js → chunk-BWLUBJQG.js} +20 -16
  28. package/dist/chunk-BWLUBJQG.js.map +1 -0
  29. package/dist/{chunk-OYV2DN66.js → chunk-BWWU5T2D.js} +3 -3
  30. package/dist/chunk-C7TNKIK5.js +39 -0
  31. package/dist/chunk-C7TNKIK5.js.map +1 -0
  32. package/dist/{chunk-HEHERHQ5.js → chunk-CB76WPUS.js} +13 -14
  33. package/dist/chunk-CB76WPUS.js.map +1 -0
  34. package/dist/chunk-CGGO5NKD.js +1194 -0
  35. package/dist/chunk-CGGO5NKD.js.map +1 -0
  36. package/dist/{chunk-B2ZOKNN4.js → chunk-CQCTCW4S.js} +1 -2
  37. package/dist/chunk-CQCTCW4S.js.map +1 -0
  38. package/dist/{chunk-AJICZLHT.js → chunk-CXQGMFI7.js} +3 -3
  39. package/dist/{chunk-LW25LMIH.js → chunk-D3U7VQCG.js} +1 -2
  40. package/dist/{chunk-LW25LMIH.js.map → chunk-D3U7VQCG.js.map} +1 -1
  41. package/dist/{chunk-RQYEEA2O.js → chunk-DXU7NZPH.js} +3 -3
  42. package/dist/{chunk-XGJ2QERC.js → chunk-E3KXVEYI.js} +8 -4
  43. package/dist/chunk-E3KXVEYI.js.map +1 -0
  44. package/dist/{chunk-L6JPBJAS.js → chunk-EGZNOUMH.js} +3 -3
  45. package/dist/{chunk-DNBAMB5J.js → chunk-EVK6HH6Z.js} +1 -2
  46. package/dist/{chunk-DNBAMB5J.js.map → chunk-EVK6HH6Z.js.map} +1 -1
  47. package/dist/{chunk-BYTU2YC3.js → chunk-F5NWRF32.js} +3 -3
  48. package/dist/{chunk-RLGWMJD3.js → chunk-FRGTDZQT.js} +146 -11
  49. package/dist/chunk-FRGTDZQT.js.map +1 -0
  50. package/dist/{chunk-DYXEITK3.js → chunk-GF75O2EN.js} +4 -2
  51. package/dist/chunk-GF75O2EN.js.map +1 -0
  52. package/dist/{chunk-W7FLHT65.js → chunk-GTAS3QVC.js} +1 -2
  53. package/dist/{chunk-W7FLHT65.js.map → chunk-GTAS3QVC.js.map} +1 -1
  54. package/dist/{chunk-RQK5UPMP.js → chunk-H62XQZUM.js} +4 -3
  55. package/dist/chunk-H62XQZUM.js.map +1 -0
  56. package/dist/{chunk-UT2OPSN4.js → chunk-HCU3B6FW.js} +1 -2
  57. package/dist/chunk-HCU3B6FW.js.map +1 -0
  58. package/dist/chunk-HEDE2377.js +754 -0
  59. package/dist/chunk-HEDE2377.js.map +1 -0
  60. package/dist/{chunk-JZQHKDSY.js → chunk-HGIPWY5Y.js} +22 -11
  61. package/dist/chunk-HGIPWY5Y.js.map +1 -0
  62. package/dist/{chunk-Q2IAILVC.js → chunk-HSD24IP2.js} +8 -4
  63. package/dist/chunk-HSD24IP2.js.map +1 -0
  64. package/dist/{chunk-5YOCVEUB.js → chunk-HWQPEBID.js} +19 -15
  65. package/dist/chunk-HWQPEBID.js.map +1 -0
  66. package/dist/{chunk-SFUCUARB.js → chunk-IEHPTILN.js} +4 -4
  67. package/dist/chunk-IEHPTILN.js.map +1 -0
  68. package/dist/{chunk-C6NHEDHY.js → chunk-IEVLWEBO.js} +15 -14
  69. package/dist/chunk-IEVLWEBO.js.map +1 -0
  70. package/dist/{chunk-YUK3X3B4.js → chunk-IKJQOYI4.js} +1 -2
  71. package/dist/{chunk-YUK3X3B4.js.map → chunk-IKJQOYI4.js.map} +1 -1
  72. package/dist/{chunk-MHCMHKM6.js → chunk-IUXXZHY3.js} +17 -23
  73. package/dist/chunk-IUXXZHY3.js.map +1 -0
  74. package/dist/{chunk-ABTEGAFB.js → chunk-JBDFYIN2.js} +13 -14
  75. package/dist/chunk-JBDFYIN2.js.map +1 -0
  76. package/dist/{chunk-A7X4L4JM.js → chunk-JEBH5APX.js} +15 -15
  77. package/dist/chunk-JEBH5APX.js.map +1 -0
  78. package/dist/{chunk-H3BST2LI.js → chunk-JHI2PHHD.js} +1 -2
  79. package/dist/{chunk-H3BST2LI.js.map → chunk-JHI2PHHD.js.map} +1 -1
  80. package/dist/{chunk-EGB7V74Z.js → chunk-KAWDDS27.js} +1 -3
  81. package/dist/chunk-KAWDDS27.js.map +1 -0
  82. package/dist/{chunk-DP2PP5V2.js → chunk-KGC2OGXI.js} +5 -4
  83. package/dist/chunk-KGC2OGXI.js.map +1 -0
  84. package/dist/{chunk-FXFDBF3P.js → chunk-L4GMDSMB.js} +3 -3
  85. package/dist/{chunk-O7ODGJYL.js → chunk-L7FEZ7LU.js} +3 -3
  86. package/dist/{chunk-54NTYJEO.js → chunk-LPDLPRPS.js} +1 -3
  87. package/dist/{chunk-54NTYJEO.js.map → chunk-LPDLPRPS.js.map} +1 -1
  88. package/dist/{chunk-UGK4TAVK.js → chunk-LPLZLSMK.js} +1 -2
  89. package/dist/chunk-LPLZLSMK.js.map +1 -0
  90. package/dist/{chunk-5DLOHQJ2.js → chunk-M6E7VK4D.js} +14 -14
  91. package/dist/chunk-M6E7VK4D.js.map +1 -0
  92. package/dist/{chunk-2CC5VW7K.js → chunk-MIQ3ECZM.js} +4 -2
  93. package/dist/chunk-MIQ3ECZM.js.map +1 -0
  94. package/dist/chunk-MRXTUFBZ.js +30 -0
  95. package/dist/chunk-MRXTUFBZ.js.map +1 -0
  96. package/dist/{chunk-RO5IQEDQ.js → chunk-NJ42VNXG.js} +1 -2
  97. package/dist/chunk-NJ42VNXG.js.map +1 -0
  98. package/dist/{chunk-3T3RMDNX.js → chunk-NLXJMXVE.js} +3 -3
  99. package/dist/{chunk-E2ISWXLB.js → chunk-OQKNDS66.js} +1 -1
  100. package/dist/{chunk-E2ISWXLB.js.map → chunk-OQKNDS66.js.map} +1 -1
  101. package/dist/chunk-OSVZKYXS.js +946 -0
  102. package/dist/chunk-OSVZKYXS.js.map +1 -0
  103. package/dist/{chunk-LYDMMNL2.js → chunk-RHUEV4I7.js} +12 -13
  104. package/dist/chunk-RHUEV4I7.js.map +1 -0
  105. package/dist/{chunk-JALIYI6M.js → chunk-S4KVLPBR.js} +7 -2
  106. package/dist/chunk-S4KVLPBR.js.map +1 -0
  107. package/dist/{chunk-XRU5WXZX.js → chunk-SAOQW6ZJ.js} +15 -15
  108. package/dist/chunk-SAOQW6ZJ.js.map +1 -0
  109. package/dist/{chunk-CASCUFK2.js → chunk-SI4GMRXD.js} +14 -15
  110. package/dist/chunk-SI4GMRXD.js.map +1 -0
  111. package/dist/{chunk-HQ4KWN76.js → chunk-SYMNWNC3.js} +3 -3
  112. package/dist/{chunk-PJBQKMCD.js → chunk-TUNR4VUM.js} +3 -3
  113. package/dist/{chunk-XHCBHYN4.js → chunk-UAJYJP5C.js} +7 -2
  114. package/dist/chunk-UAJYJP5C.js.map +1 -0
  115. package/dist/{chunk-OPYQ5KIO.js → chunk-UYA3XL3J.js} +4 -2
  116. package/dist/chunk-UYA3XL3J.js.map +1 -0
  117. package/dist/{chunk-WL7HS7EM.js → chunk-V7JVMG63.js} +3 -3
  118. package/dist/{chunk-LAJJPLEV.js → chunk-VBYIDRNU.js} +7 -3
  119. package/dist/chunk-VBYIDRNU.js.map +1 -0
  120. package/dist/{chunk-NHS7WLEQ.js → chunk-VHED2STW.js} +11 -8
  121. package/dist/chunk-VHED2STW.js.map +1 -0
  122. package/dist/{chunk-JZT4QGIP.js → chunk-VIICUPWQ.js} +1 -2
  123. package/dist/{chunk-JZT4QGIP.js.map → chunk-VIICUPWQ.js.map} +1 -1
  124. package/dist/{chunk-TRTUHCS4.js → chunk-VLRSOWHP.js} +17 -15
  125. package/dist/chunk-VLRSOWHP.js.map +1 -0
  126. package/dist/chunk-W5ZLIQFR.js +764 -0
  127. package/dist/chunk-W5ZLIQFR.js.map +1 -0
  128. package/dist/{chunk-YGZMVNN5.js → chunk-WTSSEUOZ.js} +7 -2
  129. package/dist/chunk-WTSSEUOZ.js.map +1 -0
  130. package/dist/{chunk-OHROA3FQ.js → chunk-WWP2STF5.js} +7 -2
  131. package/dist/chunk-WWP2STF5.js.map +1 -0
  132. package/dist/{chunk-C6NHFMIP.js → chunk-XADEMW6B.js} +3 -3
  133. package/dist/{chunk-KTNDT45N.js → chunk-XEMLYWHK.js} +3 -3
  134. package/dist/{chunk-OZAEWZZ3.js → chunk-XFSEADPC.js} +6 -2
  135. package/dist/chunk-XFSEADPC.js.map +1 -0
  136. package/dist/{chunk-TWGVQLG2.js → chunk-XUUSWR4U.js} +1 -2
  137. package/dist/{chunk-TWGVQLG2.js.map → chunk-XUUSWR4U.js.map} +1 -1
  138. package/dist/{chunk-XLQI4IT2.js → chunk-YBVMZ7SR.js} +7 -2
  139. package/dist/chunk-YBVMZ7SR.js.map +1 -0
  140. package/dist/{chunk-E7RW3SBV.js → chunk-YRJICL2Q.js} +15 -15
  141. package/dist/chunk-YRJICL2Q.js.map +1 -0
  142. package/dist/{chunk-B6SXRCBO.js → chunk-ZM44MGC5.js} +3 -3
  143. package/dist/{chunk-YAVGCQUP.js → chunk-ZMREYTHA.js} +16 -15
  144. package/dist/chunk-ZMREYTHA.js.map +1 -0
  145. package/dist/{chunk-H3I2KZIY.js → chunk-ZPB3SLPK.js} +1 -2
  146. package/dist/{chunk-H3I2KZIY.js.map → chunk-ZPB3SLPK.js.map} +1 -1
  147. package/dist/chunk-ZPZQXHW2.js +1230 -0
  148. package/dist/chunk-ZPZQXHW2.js.map +1 -0
  149. package/dist/{config-34LHOGLM.js → config-2LASFFRD.js} +2 -4
  150. package/dist/config-3WDIJPTG.js +9 -0
  151. package/dist/config-4QV4QYI5.js +9 -0
  152. package/dist/{config-ZFJYQZCH.js → config-54USUVSE.js} +2 -4
  153. package/dist/config-5ZXN2T2H.js +9 -0
  154. package/dist/config-A2GQYJDB.js +9 -0
  155. package/dist/config-BBOLI7VE.js +9 -0
  156. package/dist/{config-VM526IKB.js → config-BIBFLUIR.js} +2 -4
  157. package/dist/{config-EO23EY62.js → config-CPYFOUQO.js} +2 -4
  158. package/dist/{config-3IVQJBNW.js → config-DWSJL3NH.js} +2 -4
  159. package/dist/config-E22XAGYN.js +9 -0
  160. package/dist/config-EHE52ZTK.js +9 -0
  161. package/dist/{config-GE4W4ZJC.js → config-EX3ZJTZI.js} +2 -4
  162. package/dist/{config-QNMKWJ4M.js → config-FRK7ZL37.js} +2 -4
  163. package/dist/{config-LHFFXVYI.js → config-HQXNFQZS.js} +2 -4
  164. package/dist/config-HTXOOAOD.js +9 -0
  165. package/dist/{config-HKRMKD76.js → config-IPNWAJHH.js} +2 -4
  166. package/dist/config-J2C53GOT.js +9 -0
  167. package/dist/config-K63RX6EU.js +9 -0
  168. package/dist/config-L7SBSH5L.js +9 -0
  169. package/dist/config-LEALEMKA.js +9 -0
  170. package/dist/{config-IVY5EQQ2.js → config-M3Z47VYU.js} +2 -4
  171. package/dist/{config-EIHSP5DZ.js → config-MZM3IPFM.js} +2 -4
  172. package/dist/{config-GHRUKEQ6.js → config-OJ2BPESH.js} +2 -4
  173. package/dist/{config-WDAZFXYD.js → config-QO2XUME4.js} +2 -4
  174. package/dist/config-QWQGOXQ5.js +9 -0
  175. package/dist/config-RI7IEZUF.js +9 -0
  176. package/dist/{config-CVZ2AGCO.js → config-SPW6NESU.js} +2 -6
  177. package/dist/{config-QAA646XB.js → config-T2IUIU5C.js} +2 -4
  178. package/dist/{config-NV5WXP64.js → config-UU27ALAA.js} +2 -4
  179. package/dist/config-VKKZGC7V.js +9 -0
  180. package/dist/config-W7EVPJNK.js +11 -0
  181. package/dist/config-WKQ3FGTZ.js +9 -0
  182. package/dist/config-WVILHDFV.js +11 -0
  183. package/dist/{config-Q45Y46YT.js → config-XU6D5C7E.js} +2 -4
  184. package/dist/databricks_volume-ETRDJVVQ.js +7 -0
  185. package/dist/digitalocean-QP72DR4J.js +10 -0
  186. package/dist/discord-BSN5RB3E.js +8 -0
  187. package/dist/disk-24NWTN2I.js +7 -0
  188. package/dist/dropbox-OSTZXSIE.js +8 -0
  189. package/dist/email-4ZFPSWIN.js +8 -0
  190. package/dist/gcs-PFWR6MIW.js +10 -0
  191. package/dist/gdocs-GPAZRQG5.js +8 -0
  192. package/dist/gdrive-XSX6A7B3.js +8 -0
  193. package/dist/github-EQ4NXUTA.js +8 -0
  194. package/dist/github_ci-QL5B2Q2N.js +8 -0
  195. package/dist/gmail-2TBT4CVH.js +8 -0
  196. package/dist/gridfs-KZRZ6SIB.js +9 -0
  197. package/dist/gsheets-N53WEXN2.js +8 -0
  198. package/dist/gslides-TATSARTH.js +8 -0
  199. package/dist/hf_buckets-BK7NGJWS.js +10 -0
  200. package/dist/hf_datasets-UQ5QGM4L.js +10 -0
  201. package/dist/hf_models-75LFCQCS.js +10 -0
  202. package/dist/hf_spaces-6T2KB3UC.js +10 -0
  203. package/dist/index.d.ts +599 -79
  204. package/dist/index.js +1515 -422
  205. package/dist/index.js.map +1 -1
  206. package/dist/langfuse-AMQCQWNE.js +8 -0
  207. package/dist/linear-V3TXO6CV.js +8 -0
  208. package/dist/minio-IZRZY4C5.js +10 -0
  209. package/dist/mongodb-VMKPQCPX.js +7 -0
  210. package/dist/nextcloud-5RHQCGDO.js +9 -0
  211. package/dist/notion-6PPNTQFM.js +8 -0
  212. package/dist/oci-CKYBSFZJ.js +10 -0
  213. package/dist/postgres-WIQBVL5M.js +7 -0
  214. package/dist/qingstor-AP4IIPLY.js +10 -0
  215. package/dist/r2-C4XGEWQY.js +10 -0
  216. package/dist/redis-6D55Q2WB.js +8 -0
  217. package/dist/s3-XQBI2CXN.js +8 -0
  218. package/dist/scaleway-SEZJVURB.js +10 -0
  219. package/dist/seaweedfs-3XYIAFU2.js +10 -0
  220. package/dist/slack-ZHXDJQY4.js +8 -0
  221. package/dist/ssh-X2MO7JOV.js +8 -0
  222. package/dist/supabase-BBM44UTM.js +10 -0
  223. package/dist/supabase-BBM44UTM.js.map +1 -0
  224. package/dist/tencent-X72USLJ7.js +10 -0
  225. package/dist/tencent-X72USLJ7.js.map +1 -0
  226. package/dist/trello-EER5NG7L.js +8 -0
  227. package/dist/trello-EER5NG7L.js.map +1 -0
  228. package/dist/wasabi-O4MVIUFG.js +10 -0
  229. package/dist/wasabi-O4MVIUFG.js.map +1 -0
  230. package/package.json +9 -5
  231. package/dist/aliyun-TMZRUYCG.js +0 -10
  232. package/dist/backblaze-OHW57DLK.js +0 -10
  233. package/dist/box-UXTCAFOZ.js +0 -8
  234. package/dist/ceph-TNN4I2FT.js +0 -10
  235. package/dist/chunk-2CC5VW7K.js.map +0 -1
  236. package/dist/chunk-5DLOHQJ2.js.map +0 -1
  237. package/dist/chunk-5HCVKTP3.js +0 -2086
  238. package/dist/chunk-5HCVKTP3.js.map +0 -1
  239. package/dist/chunk-5YOCVEUB.js.map +0 -1
  240. package/dist/chunk-A4Z6DZ22.js.map +0 -1
  241. package/dist/chunk-A7X4L4JM.js.map +0 -1
  242. package/dist/chunk-ABTEGAFB.js.map +0 -1
  243. package/dist/chunk-B2ZOKNN4.js.map +0 -1
  244. package/dist/chunk-C6NHEDHY.js.map +0 -1
  245. package/dist/chunk-CASCUFK2.js.map +0 -1
  246. package/dist/chunk-DP2PP5V2.js.map +0 -1
  247. package/dist/chunk-DTAY7LPC.js.map +0 -1
  248. package/dist/chunk-DYXEITK3.js.map +0 -1
  249. package/dist/chunk-E7RW3SBV.js.map +0 -1
  250. package/dist/chunk-EGB7V74Z.js.map +0 -1
  251. package/dist/chunk-ERELJ7BS.js.map +0 -1
  252. package/dist/chunk-HEHERHQ5.js.map +0 -1
  253. package/dist/chunk-JALIYI6M.js.map +0 -1
  254. package/dist/chunk-JZQHKDSY.js.map +0 -1
  255. package/dist/chunk-LAJJPLEV.js.map +0 -1
  256. package/dist/chunk-LYDMMNL2.js.map +0 -1
  257. package/dist/chunk-MHCMHKM6.js.map +0 -1
  258. package/dist/chunk-N72CAZEH.js +0 -1990
  259. package/dist/chunk-N72CAZEH.js.map +0 -1
  260. package/dist/chunk-NHS7WLEQ.js.map +0 -1
  261. package/dist/chunk-NJMGCT63.js.map +0 -1
  262. package/dist/chunk-OHROA3FQ.js.map +0 -1
  263. package/dist/chunk-OPYQ5KIO.js.map +0 -1
  264. package/dist/chunk-OZAEWZZ3.js.map +0 -1
  265. package/dist/chunk-PBBG7VFT.js +0 -1896
  266. package/dist/chunk-PBBG7VFT.js.map +0 -1
  267. package/dist/chunk-Q2IAILVC.js.map +0 -1
  268. package/dist/chunk-QGRDPSAH.js.map +0 -1
  269. package/dist/chunk-RLGWMJD3.js.map +0 -1
  270. package/dist/chunk-RO5IQEDQ.js.map +0 -1
  271. package/dist/chunk-RQK5UPMP.js.map +0 -1
  272. package/dist/chunk-SFUCUARB.js.map +0 -1
  273. package/dist/chunk-TRTUHCS4.js.map +0 -1
  274. package/dist/chunk-U6QSXTUS.js +0 -7
  275. package/dist/chunk-U6QSXTUS.js.map +0 -1
  276. package/dist/chunk-UGK4TAVK.js.map +0 -1
  277. package/dist/chunk-UT2OPSN4.js.map +0 -1
  278. package/dist/chunk-VGLHY6BK.js.map +0 -1
  279. package/dist/chunk-WSGEIVY3.js +0 -1766
  280. package/dist/chunk-WSGEIVY3.js.map +0 -1
  281. package/dist/chunk-XGJ2QERC.js.map +0 -1
  282. package/dist/chunk-XHCBHYN4.js.map +0 -1
  283. package/dist/chunk-XLQI4IT2.js.map +0 -1
  284. package/dist/chunk-XRU5WXZX.js.map +0 -1
  285. package/dist/chunk-YAVGCQUP.js.map +0 -1
  286. package/dist/chunk-YGZMVNN5.js.map +0 -1
  287. package/dist/chunk-YPT4JBUY.js.map +0 -1
  288. package/dist/chunk-ZNWVJ6UW.js.map +0 -1
  289. package/dist/config-3BBWD5AB.js +0 -11
  290. package/dist/config-4UDVSUQJ.js +0 -11
  291. package/dist/config-CMDBAPDH.js +0 -11
  292. package/dist/config-D3RLSPNF.js +0 -11
  293. package/dist/config-DG65OEG3.js +0 -11
  294. package/dist/config-GCQK6NJY.js +0 -11
  295. package/dist/config-GVH27UPE.js +0 -11
  296. package/dist/config-HXVYIXP5.js +0 -11
  297. package/dist/config-IDZMEW73.js +0 -11
  298. package/dist/config-IJJXGLBQ.js +0 -11
  299. package/dist/config-KJOLGVB2.js +0 -11
  300. package/dist/config-KMVCVBYN.js +0 -15
  301. package/dist/config-KYTRXAB2.js +0 -15
  302. package/dist/config-OT2TQQCN.js +0 -11
  303. package/dist/config-QWCY3LBQ.js +0 -11
  304. package/dist/config-ZV6G2ZEC.js +0 -11
  305. package/dist/databricks_volume-HNQ4DJVJ.js +0 -7
  306. package/dist/digitalocean-6SPR4S7V.js +0 -10
  307. package/dist/discord-SAV2RBJV.js +0 -8
  308. package/dist/disk-POACMF4G.js +0 -8
  309. package/dist/dropbox-CQ7MTYX2.js +0 -8
  310. package/dist/email-KBQ7CXS7.js +0 -8
  311. package/dist/gcs-SMIE4VMT.js +0 -10
  312. package/dist/gdocs-X5Y2SIQX.js +0 -8
  313. package/dist/gdrive-SIQPRIGI.js +0 -8
  314. package/dist/github-KBHWANKQ.js +0 -8
  315. package/dist/github_ci-HPITNK37.js +0 -8
  316. package/dist/gmail-DKHAGJNX.js +0 -8
  317. package/dist/gsheets-ZSUDIWGK.js +0 -8
  318. package/dist/gslides-GYXM7IMJ.js +0 -8
  319. package/dist/hf_buckets-RIOMV7WG.js +0 -10
  320. package/dist/hf_datasets-QF4BQ3OK.js +0 -10
  321. package/dist/hf_models-62GC2HPZ.js +0 -10
  322. package/dist/hf_spaces-NVSMUNRM.js +0 -10
  323. package/dist/langfuse-HUAYVPHF.js +0 -8
  324. package/dist/linear-2MM55KBC.js +0 -8
  325. package/dist/minio-L3XE6PQS.js +0 -10
  326. package/dist/mongodb-ZOX4FRHJ.js +0 -7
  327. package/dist/notion-UK4GTMT4.js +0 -8
  328. package/dist/oci-NURLWPL2.js +0 -10
  329. package/dist/postgres-JNFMPAO2.js +0 -7
  330. package/dist/qingstor-W55D5YFO.js +0 -10
  331. package/dist/r2-FSZK7IFI.js +0 -10
  332. package/dist/redis-S6GIPA4Z.js +0 -8
  333. package/dist/s3-GMPUJ65D.js +0 -8
  334. package/dist/scaleway-5VM55Y6D.js +0 -10
  335. package/dist/seaweedfs-J3EPUEPE.js +0 -10
  336. package/dist/slack-FVBXY7KD.js +0 -8
  337. package/dist/ssh-GCXETJ3Z.js +0 -9
  338. package/dist/supabase-HLWNHBBE.js +0 -10
  339. package/dist/tencent-YDO73XBD.js +0 -10
  340. package/dist/trello-CQ53BQUL.js +0 -8
  341. package/dist/wasabi-SOZKPMRQ.js +0 -10
  342. /package/dist/{aliyun-TMZRUYCG.js.map → aliyun-PGI57A43.js.map} +0 -0
  343. /package/dist/{backblaze-OHW57DLK.js.map → backblaze-TSPL6Y56.js.map} +0 -0
  344. /package/dist/{box-UXTCAFOZ.js.map → box-7XTZYDSO.js.map} +0 -0
  345. /package/dist/{ceph-TNN4I2FT.js.map → ceph-C265UI5T.js.map} +0 -0
  346. /package/dist/{chunk-IQVNVTOP.js.map → chunk-25W4XQJZ.js.map} +0 -0
  347. /package/dist/{chunk-G5BZE7UA.js.map → chunk-4M73WHIE.js.map} +0 -0
  348. /package/dist/{chunk-Q6CDMOM6.js.map → chunk-4X6CLF4F.js.map} +0 -0
  349. /package/dist/{chunk-3IJSIVKT.js.map → chunk-5I7Q7RHW.js.map} +0 -0
  350. /package/dist/{chunk-OYV2DN66.js.map → chunk-BWWU5T2D.js.map} +0 -0
  351. /package/dist/{chunk-AJICZLHT.js.map → chunk-CXQGMFI7.js.map} +0 -0
  352. /package/dist/{chunk-RQYEEA2O.js.map → chunk-DXU7NZPH.js.map} +0 -0
  353. /package/dist/{chunk-L6JPBJAS.js.map → chunk-EGZNOUMH.js.map} +0 -0
  354. /package/dist/{chunk-BYTU2YC3.js.map → chunk-F5NWRF32.js.map} +0 -0
  355. /package/dist/{chunk-FXFDBF3P.js.map → chunk-L4GMDSMB.js.map} +0 -0
  356. /package/dist/{chunk-O7ODGJYL.js.map → chunk-L7FEZ7LU.js.map} +0 -0
  357. /package/dist/{chunk-3T3RMDNX.js.map → chunk-NLXJMXVE.js.map} +0 -0
  358. /package/dist/{chunk-HQ4KWN76.js.map → chunk-SYMNWNC3.js.map} +0 -0
  359. /package/dist/{chunk-PJBQKMCD.js.map → chunk-TUNR4VUM.js.map} +0 -0
  360. /package/dist/{chunk-WL7HS7EM.js.map → chunk-V7JVMG63.js.map} +0 -0
  361. /package/dist/{chunk-C6NHFMIP.js.map → chunk-XADEMW6B.js.map} +0 -0
  362. /package/dist/{chunk-KTNDT45N.js.map → chunk-XEMLYWHK.js.map} +0 -0
  363. /package/dist/{chunk-B6SXRCBO.js.map → chunk-ZM44MGC5.js.map} +0 -0
  364. /package/dist/{config-34LHOGLM.js.map → config-2LASFFRD.js.map} +0 -0
  365. /package/dist/{config-3BBWD5AB.js.map → config-3WDIJPTG.js.map} +0 -0
  366. /package/dist/{config-3IVQJBNW.js.map → config-4QV4QYI5.js.map} +0 -0
  367. /package/dist/{config-4UDVSUQJ.js.map → config-54USUVSE.js.map} +0 -0
  368. /package/dist/{config-CMDBAPDH.js.map → config-5ZXN2T2H.js.map} +0 -0
  369. /package/dist/{config-CVZ2AGCO.js.map → config-A2GQYJDB.js.map} +0 -0
  370. /package/dist/{config-D3RLSPNF.js.map → config-BBOLI7VE.js.map} +0 -0
  371. /package/dist/{config-DG65OEG3.js.map → config-BIBFLUIR.js.map} +0 -0
  372. /package/dist/{config-EIHSP5DZ.js.map → config-CPYFOUQO.js.map} +0 -0
  373. /package/dist/{config-EO23EY62.js.map → config-DWSJL3NH.js.map} +0 -0
  374. /package/dist/{config-GCQK6NJY.js.map → config-E22XAGYN.js.map} +0 -0
  375. /package/dist/{config-GE4W4ZJC.js.map → config-EHE52ZTK.js.map} +0 -0
  376. /package/dist/{config-GHRUKEQ6.js.map → config-EX3ZJTZI.js.map} +0 -0
  377. /package/dist/{config-GVH27UPE.js.map → config-FRK7ZL37.js.map} +0 -0
  378. /package/dist/{config-HKRMKD76.js.map → config-HQXNFQZS.js.map} +0 -0
  379. /package/dist/{config-HXVYIXP5.js.map → config-HTXOOAOD.js.map} +0 -0
  380. /package/dist/{config-IDZMEW73.js.map → config-IPNWAJHH.js.map} +0 -0
  381. /package/dist/{config-IJJXGLBQ.js.map → config-J2C53GOT.js.map} +0 -0
  382. /package/dist/{config-IVY5EQQ2.js.map → config-K63RX6EU.js.map} +0 -0
  383. /package/dist/{config-KJOLGVB2.js.map → config-L7SBSH5L.js.map} +0 -0
  384. /package/dist/{config-KMVCVBYN.js.map → config-LEALEMKA.js.map} +0 -0
  385. /package/dist/{config-KYTRXAB2.js.map → config-M3Z47VYU.js.map} +0 -0
  386. /package/dist/{config-LHFFXVYI.js.map → config-MZM3IPFM.js.map} +0 -0
  387. /package/dist/{config-NV5WXP64.js.map → config-OJ2BPESH.js.map} +0 -0
  388. /package/dist/{config-OT2TQQCN.js.map → config-QO2XUME4.js.map} +0 -0
  389. /package/dist/{config-Q45Y46YT.js.map → config-QWQGOXQ5.js.map} +0 -0
  390. /package/dist/{config-QAA646XB.js.map → config-RI7IEZUF.js.map} +0 -0
  391. /package/dist/{config-QNMKWJ4M.js.map → config-SPW6NESU.js.map} +0 -0
  392. /package/dist/{config-QWCY3LBQ.js.map → config-T2IUIU5C.js.map} +0 -0
  393. /package/dist/{config-VM526IKB.js.map → config-UU27ALAA.js.map} +0 -0
  394. /package/dist/{config-WDAZFXYD.js.map → config-VKKZGC7V.js.map} +0 -0
  395. /package/dist/{config-ZFJYQZCH.js.map → config-W7EVPJNK.js.map} +0 -0
  396. /package/dist/{config-ZV6G2ZEC.js.map → config-WKQ3FGTZ.js.map} +0 -0
  397. /package/dist/{databricks_volume-HNQ4DJVJ.js.map → config-WVILHDFV.js.map} +0 -0
  398. /package/dist/{digitalocean-6SPR4S7V.js.map → config-XU6D5C7E.js.map} +0 -0
  399. /package/dist/{discord-SAV2RBJV.js.map → databricks_volume-ETRDJVVQ.js.map} +0 -0
  400. /package/dist/{disk-POACMF4G.js.map → digitalocean-QP72DR4J.js.map} +0 -0
  401. /package/dist/{dropbox-CQ7MTYX2.js.map → discord-BSN5RB3E.js.map} +0 -0
  402. /package/dist/{email-KBQ7CXS7.js.map → disk-24NWTN2I.js.map} +0 -0
  403. /package/dist/{gcs-SMIE4VMT.js.map → dropbox-OSTZXSIE.js.map} +0 -0
  404. /package/dist/{gdocs-X5Y2SIQX.js.map → email-4ZFPSWIN.js.map} +0 -0
  405. /package/dist/{gdrive-SIQPRIGI.js.map → gcs-PFWR6MIW.js.map} +0 -0
  406. /package/dist/{github-KBHWANKQ.js.map → gdocs-GPAZRQG5.js.map} +0 -0
  407. /package/dist/{github_ci-HPITNK37.js.map → gdrive-XSX6A7B3.js.map} +0 -0
  408. /package/dist/{gmail-DKHAGJNX.js.map → github-EQ4NXUTA.js.map} +0 -0
  409. /package/dist/{gsheets-ZSUDIWGK.js.map → github_ci-QL5B2Q2N.js.map} +0 -0
  410. /package/dist/{gslides-GYXM7IMJ.js.map → gmail-2TBT4CVH.js.map} +0 -0
  411. /package/dist/{hf_buckets-RIOMV7WG.js.map → gridfs-KZRZ6SIB.js.map} +0 -0
  412. /package/dist/{hf_datasets-QF4BQ3OK.js.map → gsheets-N53WEXN2.js.map} +0 -0
  413. /package/dist/{hf_models-62GC2HPZ.js.map → gslides-TATSARTH.js.map} +0 -0
  414. /package/dist/{hf_spaces-NVSMUNRM.js.map → hf_buckets-BK7NGJWS.js.map} +0 -0
  415. /package/dist/{langfuse-HUAYVPHF.js.map → hf_datasets-UQ5QGM4L.js.map} +0 -0
  416. /package/dist/{linear-2MM55KBC.js.map → hf_models-75LFCQCS.js.map} +0 -0
  417. /package/dist/{minio-L3XE6PQS.js.map → hf_spaces-6T2KB3UC.js.map} +0 -0
  418. /package/dist/{mongodb-ZOX4FRHJ.js.map → langfuse-AMQCQWNE.js.map} +0 -0
  419. /package/dist/{notion-UK4GTMT4.js.map → linear-V3TXO6CV.js.map} +0 -0
  420. /package/dist/{oci-NURLWPL2.js.map → minio-IZRZY4C5.js.map} +0 -0
  421. /package/dist/{postgres-JNFMPAO2.js.map → mongodb-VMKPQCPX.js.map} +0 -0
  422. /package/dist/{qingstor-W55D5YFO.js.map → nextcloud-5RHQCGDO.js.map} +0 -0
  423. /package/dist/{r2-FSZK7IFI.js.map → notion-6PPNTQFM.js.map} +0 -0
  424. /package/dist/{redis-S6GIPA4Z.js.map → oci-CKYBSFZJ.js.map} +0 -0
  425. /package/dist/{s3-GMPUJ65D.js.map → postgres-WIQBVL5M.js.map} +0 -0
  426. /package/dist/{scaleway-5VM55Y6D.js.map → qingstor-AP4IIPLY.js.map} +0 -0
  427. /package/dist/{seaweedfs-J3EPUEPE.js.map → r2-C4XGEWQY.js.map} +0 -0
  428. /package/dist/{slack-FVBXY7KD.js.map → redis-6D55Q2WB.js.map} +0 -0
  429. /package/dist/{ssh-GCXETJ3Z.js.map → s3-XQBI2CXN.js.map} +0 -0
  430. /package/dist/{supabase-HLWNHBBE.js.map → scaleway-SEZJVURB.js.map} +0 -0
  431. /package/dist/{tencent-YDO73XBD.js.map → seaweedfs-3XYIAFU2.js.map} +0 -0
  432. /package/dist/{trello-CQ53BQUL.js.map → slack-ZHXDJQY4.js.map} +0 -0
  433. /package/dist/{wasabi-SOZKPMRQ.js.map → ssh-X2MO7JOV.js.map} +0 -0
@@ -7,6 +7,7 @@ var CephConfigSchema = z.object({
7
7
  secretAccessKey: secretStr(),
8
8
  region: z.string(),
9
9
  forcePathStyle: z.boolean(),
10
+ keyPrefix: z.string().optional(),
10
11
  timeoutMs: z.number().optional()
11
12
  });
12
13
  function cephToS3Config(config) {
@@ -17,6 +18,7 @@ function cephToS3Config(config) {
17
18
  accessKeyId: config.accessKeyId,
18
19
  secretAccessKey: config.secretAccessKey,
19
20
  forcePathStyle: config.forcePathStyle ?? true,
21
+ ...config.keyPrefix !== void 0 ? { keyPrefix: config.keyPrefix } : {},
20
22
  ...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
21
23
  };
22
24
  }
@@ -34,6 +36,7 @@ function normalizeCephConfig(input) {
34
36
  secret_access_key: "secretAccessKey",
35
37
  endpoint_url: "endpoint",
36
38
  path_style: "forcePathStyle",
39
+ key_prefix: "keyPrefix",
37
40
  timeout: "timeoutMs"
38
41
  },
39
42
  transform: {
@@ -44,9 +47,8 @@ function normalizeCephConfig(input) {
44
47
  }
45
48
 
46
49
  export {
47
- CephConfigSchema,
48
50
  cephToS3Config,
49
51
  redactCephConfig,
50
52
  normalizeCephConfig
51
53
  };
52
- //# sourceMappingURL=chunk-OPYQ5KIO.js.map
54
+ //# sourceMappingURL=chunk-UYA3XL3J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/ceph/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\nimport type { S3Config } from '../s3/config.ts'\n\nexport interface CephConfig {\n bucket: string\n endpoint: string\n accessKeyId: string\n secretAccessKey: string\n region?: string\n forcePathStyle?: boolean\n keyPrefix?: string\n timeoutMs?: number\n}\n\nexport interface CephConfigRedacted {\n bucket: string\n endpoint: string\n accessKeyId: string\n secretAccessKey: string\n region: string\n forcePathStyle: boolean\n keyPrefix?: string\n timeoutMs?: number\n}\n\nconst CephConfigSchema = z.object({\n bucket: z.string(),\n endpoint: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n region: z.string(),\n forcePathStyle: z.boolean(),\n keyPrefix: z.string().optional(),\n timeoutMs: z.number().optional(),\n})\n\nexport function cephToS3Config(config: CephConfig): S3Config {\n return {\n bucket: config.bucket,\n region: config.region ?? 'us-east-1',\n endpoint: config.endpoint,\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey,\n forcePathStyle: config.forcePathStyle ?? true,\n ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n }\n}\n\nexport function redactCephConfig(config: CephConfig): CephConfigRedacted {\n return redactConfigWithSchema(CephConfigSchema, {\n ...config,\n region: config.region ?? 'us-east-1',\n forcePathStyle: config.forcePathStyle ?? true,\n }) as unknown as CephConfigRedacted\n}\n\nexport function normalizeCephConfig(input: Record<string, unknown>): CephConfig {\n return normalizeFields(input, {\n rename: {\n access_key_id: 'accessKeyId',\n secret_access_key: 'secretAccessKey',\n endpoint_url: 'endpoint',\n path_style: 'forcePathStyle',\n key_prefix: 'keyPrefix',\n timeout: 'timeoutMs',\n },\n transform: {\n timeout: (v: unknown) => (typeof v === 'number' ? v * 1000 : v),\n },\n drop: ['proxy'],\n }) as unknown as CephConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAyBtE,IAAM,mBAAmB,EAAE,OAAO;AAAA,EAChC,QAAQ,EAAE,OAAO;AAAA,EACjB,UAAU,EAAE,OAAO;AAAA,EACnB,aAAa,UAAU;AAAA,EACvB,iBAAiB,UAAU;AAAA,EAC3B,QAAQ,EAAE,OAAO;AAAA,EACjB,gBAAgB,EAAE,QAAQ;AAAA,EAC1B,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAEM,SAAS,eAAe,QAA8B;AAC3D,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO,UAAU;AAAA,IACzB,UAAU,OAAO;AAAA,IACjB,aAAa,OAAO;AAAA,IACpB,iBAAiB,OAAO;AAAA,IACxB,gBAAgB,OAAO,kBAAkB;AAAA,IACzC,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,IACxE,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;AACF;AAEO,SAAS,iBAAiB,QAAwC;AACvE,SAAO,uBAAuB,kBAAkB;AAAA,IAC9C,GAAG;AAAA,IACH,QAAQ,OAAO,UAAU;AAAA,IACzB,gBAAgB,OAAO,kBAAkB;AAAA,EAC3C,CAAC;AACH;AAEO,SAAS,oBAAoB,OAA4C;AAC9E,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,SAAS,CAAC,MAAgB,OAAO,MAAM,WAAW,IAAI,MAAO;AAAA,IAC/D;AAAA,IACA,MAAM,CAAC,OAAO;AAAA,EAChB,CAAC;AACH;","names":[]}
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  HfModelsAccessor,
3
3
  HfResource
4
- } from "./chunk-WSGEIVY3.js";
4
+ } from "./chunk-HEDE2377.js";
5
5
  import {
6
6
  assertHfRepoId,
7
7
  redactHfRepoConfig
8
- } from "./chunk-EGB7V74Z.js";
8
+ } from "./chunk-KAWDDS27.js";
9
9
 
10
10
  // src/resource/hf_models/hf_models.ts
11
11
  import { normalizeKeyPrefix, ResourceName } from "@struktoai/mirage-core";
@@ -47,4 +47,4 @@ export {
47
47
  HF_MODELS_PROMPT,
48
48
  HfModelsResource
49
49
  };
50
- //# sourceMappingURL=chunk-WL7HS7EM.js.map
50
+ //# sourceMappingURL=chunk-V7JVMG63.js.map
@@ -8,6 +8,8 @@ var R2ConfigSchema = z.object({
8
8
  endpoint: z.string(),
9
9
  region: z.string(),
10
10
  profile: z.string().optional(),
11
+ forcePathStyle: z.boolean().optional(),
12
+ keyPrefix: z.string().optional(),
11
13
  timeoutMs: z.number().optional()
12
14
  });
13
15
  function resolvedR2Endpoint(config) {
@@ -25,6 +27,8 @@ function r2ToS3Config(config) {
25
27
  accessKeyId: config.accessKeyId,
26
28
  secretAccessKey: config.secretAccessKey,
27
29
  ...config.profile !== void 0 ? { profile: config.profile } : {},
30
+ ...config.forcePathStyle !== void 0 ? { forcePathStyle: config.forcePathStyle } : {},
31
+ ...config.keyPrefix !== void 0 ? { keyPrefix: config.keyPrefix } : {},
28
32
  ...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
29
33
  };
30
34
  }
@@ -43,6 +47,8 @@ function normalizeR2Config(input) {
43
47
  secret_access_key: "secretAccessKey",
44
48
  aws_profile: "profile",
45
49
  endpoint_url: "endpoint",
50
+ path_style: "forcePathStyle",
51
+ key_prefix: "keyPrefix",
46
52
  timeout: "timeoutMs"
47
53
  },
48
54
  transform: {
@@ -53,10 +59,8 @@ function normalizeR2Config(input) {
53
59
  }
54
60
 
55
61
  export {
56
- R2ConfigSchema,
57
- resolvedR2Endpoint,
58
62
  r2ToS3Config,
59
63
  redactR2Config,
60
64
  normalizeR2Config
61
65
  };
62
- //# sourceMappingURL=chunk-LAJJPLEV.js.map
66
+ //# sourceMappingURL=chunk-VBYIDRNU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/r2/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\nimport type { S3Config } from '../s3/config.ts'\n\nexport interface R2Config {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n accountId?: string\n endpoint?: string\n region?: string\n profile?: string\n forcePathStyle?: boolean\n keyPrefix?: string\n timeoutMs?: number\n}\n\nexport interface R2ConfigRedacted {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n accountId?: string\n endpoint: string\n region: string\n profile?: string\n forcePathStyle?: boolean\n keyPrefix?: string\n timeoutMs?: number\n}\n\nconst R2ConfigSchema = z.object({\n bucket: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n accountId: z.string().optional(),\n endpoint: z.string(),\n region: z.string(),\n profile: z.string().optional(),\n forcePathStyle: z.boolean().optional(),\n keyPrefix: z.string().optional(),\n timeoutMs: z.number().optional(),\n})\n\nfunction resolvedR2Endpoint(config: R2Config): string {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.accountId !== undefined && config.accountId !== '') {\n return `https://${config.accountId}.r2.cloudflarestorage.com`\n }\n throw new Error('R2Config requires accountId or endpoint')\n}\n\nexport function r2ToS3Config(config: R2Config): S3Config {\n return {\n bucket: config.bucket,\n region: config.region ?? 'auto',\n endpoint: resolvedR2Endpoint(config),\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey,\n ...(config.profile !== undefined ? { profile: config.profile } : {}),\n ...(config.forcePathStyle !== undefined ? { forcePathStyle: config.forcePathStyle } : {}),\n ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n }\n}\n\nexport function redactR2Config(config: R2Config): R2ConfigRedacted {\n return redactConfigWithSchema(R2ConfigSchema, {\n ...config,\n endpoint: resolvedR2Endpoint(config),\n region: config.region ?? 'auto',\n }) as unknown as R2ConfigRedacted\n}\n\nexport function normalizeR2Config(input: Record<string, unknown>): R2Config {\n return normalizeFields(input, {\n rename: {\n account_id: 'accountId',\n access_key_id: 'accessKeyId',\n secret_access_key: 'secretAccessKey',\n aws_profile: 'profile',\n endpoint_url: 'endpoint',\n path_style: 'forcePathStyle',\n key_prefix: 'keyPrefix',\n timeout: 'timeoutMs',\n },\n transform: {\n timeout: (v: unknown) => (typeof v === 'number' ? v * 1000 : v),\n },\n drop: ['proxy'],\n }) as unknown as R2Config\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AA6BtE,IAAM,iBAAiB,EAAE,OAAO;AAAA,EAC9B,QAAQ,EAAE,OAAO;AAAA,EACjB,aAAa,UAAU;AAAA,EACvB,iBAAiB,UAAU;AAAA,EAC3B,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,UAAU,EAAE,OAAO;AAAA,EACnB,QAAQ,EAAE,OAAO;AAAA,EACjB,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,gBAAgB,EAAE,QAAQ,EAAE,SAAS;AAAA,EACrC,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAED,SAAS,mBAAmB,QAA0B;AACpD,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,MAAI,OAAO,cAAc,UAAa,OAAO,cAAc,IAAI;AAC7D,WAAO,WAAW,OAAO,SAAS;AAAA,EACpC;AACA,QAAM,IAAI,MAAM,yCAAyC;AAC3D;AAEO,SAAS,aAAa,QAA4B;AACvD,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO,UAAU;AAAA,IACzB,UAAU,mBAAmB,MAAM;AAAA,IACnC,aAAa,OAAO;AAAA,IACpB,iBAAiB,OAAO;AAAA,IACxB,GAAI,OAAO,YAAY,SAAY,EAAE,SAAS,OAAO,QAAQ,IAAI,CAAC;AAAA,IAClE,GAAI,OAAO,mBAAmB,SAAY,EAAE,gBAAgB,OAAO,eAAe,IAAI,CAAC;AAAA,IACvF,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,IACxE,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;AACF;AAEO,SAAS,eAAe,QAAoC;AACjE,SAAO,uBAAuB,gBAAgB;AAAA,IAC5C,GAAG;AAAA,IACH,UAAU,mBAAmB,MAAM;AAAA,IACnC,QAAQ,OAAO,UAAU;AAAA,EAC3B,CAAC;AACH;AAEO,SAAS,kBAAkB,OAA0C;AAC1E,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,SAAS,CAAC,MAAgB,OAAO,MAAM,WAAW,IAAI,MAAO;AAAA,IAC/D;AAAA,IACA,MAAM,CAAC,OAAO;AAAA,EAChB,CAAC;AACH;","names":[]}
@@ -1,17 +1,19 @@
1
1
  // src/resource/postgres/postgres.ts
2
2
  import {
3
3
  BaseResource,
4
- PathSpec,
5
4
  POSTGRES_COMMANDS,
6
5
  POSTGRES_OPS,
7
6
  POSTGRES_PROMPT,
7
+ PathSpec,
8
8
  PostgresAccessor,
9
+ ResourceName,
10
+ mountKey,
11
+ mountPrefixOf,
9
12
  postgresRead,
10
13
  postgresReaddir,
11
14
  postgresStat,
12
- ResourceName,
13
15
  resolvePostgresConfig,
14
- resolvePostgresGlob
16
+ makeResolveGlob
15
17
  } from "@struktoai/mirage-core";
16
18
 
17
19
  // src/resource/postgres/store.ts
@@ -58,9 +60,10 @@ var PostgresStore = class {
58
60
  };
59
61
 
60
62
  // src/resource/postgres/postgres.ts
63
+ var resolvePostgresGlob = makeResolveGlob(postgresReaddir);
61
64
  var PostgresResource = class extends BaseResource {
62
65
  kind = ResourceName.POSTGRES;
63
- isRemote = true;
66
+ cachesReads = false;
64
67
  indexTtl = 0;
65
68
  prompt;
66
69
  config;
@@ -97,12 +100,12 @@ var PostgresResource = class extends BaseResource {
97
100
  }
98
101
  glob(paths, prefix = "") {
99
102
  const effective = prefix !== "" ? paths.map(
100
- (p) => p.prefix !== "" ? p : new PathSpec({
101
- original: p.original,
103
+ (p) => mountPrefixOf(p.virtual, p.resourcePath) !== "" ? p : new PathSpec({
104
+ virtual: p.virtual,
102
105
  directory: p.directory,
103
106
  ...p.pattern !== null ? { pattern: p.pattern } : {},
104
107
  resolved: p.resolved,
105
- prefix
108
+ resourcePath: mountKey(p.virtual, prefix)
106
109
  })
107
110
  ) : paths;
108
111
  return resolvePostgresGlob(this.accessor, effective, this.index);
@@ -113,4 +116,4 @@ export {
113
116
  PostgresStore,
114
117
  PostgresResource
115
118
  };
116
- //# sourceMappingURL=chunk-NHS7WLEQ.js.map
119
+ //# sourceMappingURL=chunk-VHED2STW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/postgres/postgres.ts","../src/resource/postgres/store.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BaseResource,\n POSTGRES_COMMANDS,\n POSTGRES_OPS,\n POSTGRES_PROMPT,\n PathSpec,\n PostgresAccessor,\n ResourceName,\n mountKey,\n mountPrefixOf,\n postgresRead,\n postgresReaddir,\n postgresStat,\n resolvePostgresConfig,\n makeResolveGlob,\n type FileStat,\n type PostgresConfig,\n type PostgresConfigResolved,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n} from '@struktoai/mirage-core'\nimport { PostgresStore } from './store.ts'\n\nconst resolvePostgresGlob = makeResolveGlob(postgresReaddir)\n\nexport interface PostgresResourceOptions {\n config: PostgresConfig\n prefix?: string\n}\n\nexport class PostgresResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.POSTGRES\n readonly cachesReads: boolean = false\n override readonly indexTtl: number = 0\n readonly prompt: string\n readonly config: PostgresConfigResolved\n readonly store: PostgresStore\n readonly accessor: PostgresAccessor\n\n constructor(options: PostgresResourceOptions | PostgresConfig) {\n super()\n const { config, prefix } =\n 'config' in options ? options : { config: options, prefix: undefined }\n this.config = resolvePostgresConfig(config)\n this.store = new PostgresStore(this.config)\n this.accessor = new PostgresAccessor(this.store, this.config)\n this.prompt = POSTGRES_PROMPT.replace('{prefix}', prefix ?? '')\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n async close(): Promise<void> {\n await this.store.close()\n }\n\n ops(): readonly RegisteredOp[] {\n return POSTGRES_OPS\n }\n\n commands(): readonly RegisteredCommand[] {\n return POSTGRES_COMMANDS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return postgresRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return postgresReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return postgresStat(this.accessor, p, this.index)\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n mountPrefixOf(p.virtual, p.resourcePath) !== ''\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, prefix),\n }),\n )\n : paths\n return resolvePostgresGlob(this.accessor, effective, this.index)\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { loadOptionalPeer, type PgDriver, type PgQueryResult } from '@struktoai/mirage-core'\nimport type { PostgresConfigResolved } from '@struktoai/mirage-core'\n\ninterface PgPoolLike {\n query: (\n sql: string,\n params?: readonly unknown[],\n ) => Promise<{ rows: unknown[]; rowCount: number | null }>\n end: () => Promise<void>\n}\n\ninterface PgModule {\n Pool: new (options: Record<string, unknown>) => PgPoolLike\n}\n\nexport class PostgresStore implements PgDriver {\n readonly config: PostgresConfigResolved\n private poolPromise: Promise<PgPoolLike> | null = null\n\n constructor(config: PostgresConfigResolved) {\n this.config = config\n }\n\n async query<R = Record<string, unknown>>(\n sql: string,\n params?: readonly unknown[],\n ): Promise<PgQueryResult<R>> {\n const pool = await this._pool()\n const result = await pool.query(sql, params)\n return { rows: result.rows as R[], rowCount: result.rowCount ?? 0 }\n }\n\n async databaseName(): Promise<string> {\n const result = await this.query<{ db: string }>('SELECT current_database() AS db')\n return result.rows[0]?.db ?? ''\n }\n\n async close(): Promise<void> {\n if (this.poolPromise === null) return\n const pool = await this.poolPromise\n this.poolPromise = null\n await pool.end()\n }\n\n private async _pool(): Promise<PgPoolLike> {\n this.poolPromise ??= this._connect()\n return this.poolPromise\n }\n\n protected async _connect(): Promise<PgPoolLike> {\n const mod = await loadOptionalPeer(\n () => import('pg') as unknown as Promise<{ default?: PgModule } & Partial<PgModule>>,\n { feature: 'PostgresResource', packageName: 'pg' },\n )\n const Pool = mod.default?.Pool ?? mod.Pool\n if (Pool === undefined) {\n throw new Error('postgres: pg package missing Pool export')\n }\n return new Pool({\n connectionString: this.config.dsn,\n options: '-c default_transaction_read_only=on',\n })\n }\n}\n"],"mappings":";AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;;;ACrBP,SAAS,wBAA2D;AAe7D,IAAM,gBAAN,MAAwC;AAAA,EACpC;AAAA,EACD,cAA0C;AAAA,EAElD,YAAY,QAAgC;AAC1C,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,MAAM,MACJ,KACA,QAC2B;AAC3B,UAAM,OAAO,MAAM,KAAK,MAAM;AAC9B,UAAM,SAAS,MAAM,KAAK,MAAM,KAAK,MAAM;AAC3C,WAAO,EAAE,MAAM,OAAO,MAAa,UAAU,OAAO,YAAY,EAAE;AAAA,EACpE;AAAA,EAEA,MAAM,eAAgC;AACpC,UAAM,SAAS,MAAM,KAAK,MAAsB,iCAAiC;AACjF,WAAO,OAAO,KAAK,CAAC,GAAG,MAAM;AAAA,EAC/B;AAAA,EAEA,MAAM,QAAuB;AAC3B,QAAI,KAAK,gBAAgB,KAAM;AAC/B,UAAM,OAAO,MAAM,KAAK;AACxB,SAAK,cAAc;AACnB,UAAM,KAAK,IAAI;AAAA,EACjB;AAAA,EAEA,MAAc,QAA6B;AACzC,SAAK,gBAAgB,KAAK,SAAS;AACnC,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAgB,WAAgC;AAC9C,UAAM,MAAM,MAAM;AAAA,MAChB,MAAM,OAAO,IAAI;AAAA,MACjB,EAAE,SAAS,oBAAoB,aAAa,KAAK;AAAA,IACnD;AACA,UAAM,OAAO,IAAI,SAAS,QAAQ,IAAI;AACtC,QAAI,SAAS,QAAW;AACtB,YAAM,IAAI,MAAM,0CAA0C;AAAA,IAC5D;AACA,WAAO,IAAI,KAAK;AAAA,MACd,kBAAkB,KAAK,OAAO;AAAA,MAC9B,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AACF;;;ADvCA,IAAM,sBAAsB,gBAAgB,eAAe;AAOpD,IAAM,mBAAN,cAA+B,aAAiC;AAAA,EAC5D,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA,EACd,WAAmB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,SAAmD;AAC7D,UAAM;AACN,UAAM,EAAE,QAAQ,OAAO,IACrB,YAAY,UAAU,UAAU,EAAE,QAAQ,SAAS,QAAQ,OAAU;AACvE,SAAK,SAAS,sBAAsB,MAAM;AAC1C,SAAK,QAAQ,IAAI,cAAc,KAAK,MAAM;AAC1C,SAAK,WAAW,IAAI,iBAAiB,KAAK,OAAO,KAAK,MAAM;AAC5D,SAAK,SAAS,gBAAgB,QAAQ,YAAY,UAAU,EAAE;AAAA,EAChE;AAAA,EAEA,OAAsB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,MAAM,QAAuB;AAC3B,UAAM,KAAK,MAAM,MAAM;AAAA,EACzB;AAAA,EAEA,MAA+B;AAC7B,WAAO;AAAA,EACT;AAAA,EAEA,WAAyC;AACvC,WAAO;AAAA,EACT;AAAA,EAEA,SAAS,GAAkC;AACzC,WAAO,aAAa,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAClD;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,gBAAgB,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACrD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,aAAa,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAClD;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,cAAc,EAAE,SAAS,EAAE,YAAY,MAAM,KACzC,IACA,IAAI,SAAS;AAAA,QACX,SAAS,EAAE;AAAA,QACX,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ,cAAc,SAAS,EAAE,SAAS,MAAM;AAAA,MAC1C,CAAC;AAAA,IACP,IACA;AACN,WAAO,oBAAoB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EACjE;AACF;","names":[]}
@@ -17,8 +17,7 @@ function normalizeNotionConfig(input) {
17
17
  }
18
18
 
19
19
  export {
20
- NotionConfigSchema,
21
20
  redactNotionConfig,
22
21
  normalizeNotionConfig
23
22
  };
24
- //# sourceMappingURL=chunk-JZT4QGIP.js.map
23
+ //# sourceMappingURL=chunk-VIICUPWQ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resource/notion/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\n\nexport interface NotionConfig {\n apiKey: string\n baseUrl?: string\n}\n\nexport interface NotionConfigRedacted {\n apiKey: '<REDACTED>'\n baseUrl?: string\n}\n\nexport const NotionConfigSchema = z.object({\n apiKey: secretStr(),\n baseUrl: z.string().optional(),\n})\n\nexport function redactNotionConfig(config: NotionConfig): NotionConfigRedacted {\n return redactConfigWithSchema(NotionConfigSchema, config) as unknown as NotionConfigRedacted\n}\n\nexport function normalizeNotionConfig(input: Record<string, unknown>): NotionConfig {\n return normalizeFields(input, {\n rename: {\n api_key: 'apiKey',\n base_url: 'baseUrl',\n },\n }) as unknown as NotionConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAY/D,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,QAAQ,UAAU;AAAA,EAClB,SAAS,EAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AAEM,SAAS,mBAAmB,QAA4C;AAC7E,SAAO,uBAAuB,oBAAoB,MAAM;AAC1D;AAEO,SAAS,sBAAsB,OAA8C;AAClF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,IACZ;AAAA,EACF,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../src/resource/notion/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\n\nexport interface NotionConfig {\n apiKey: string\n baseUrl?: string\n}\n\nexport interface NotionConfigRedacted {\n apiKey: '<REDACTED>'\n baseUrl?: string\n}\n\nconst NotionConfigSchema = z.object({\n apiKey: secretStr(),\n baseUrl: z.string().optional(),\n})\n\nexport function redactNotionConfig(config: NotionConfig): NotionConfigRedacted {\n return redactConfigWithSchema(NotionConfigSchema, config) as unknown as NotionConfigRedacted\n}\n\nexport function normalizeNotionConfig(input: Record<string, unknown>): NotionConfig {\n return normalizeFields(input, {\n rename: {\n api_key: 'apiKey',\n base_url: 'baseUrl',\n },\n }) as unknown as NotionConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAYtE,IAAM,qBAAqB,EAAE,OAAO;AAAA,EAClC,QAAQ,UAAU;AAAA,EAClB,SAAS,EAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AAEM,SAAS,mBAAmB,QAA4C;AAC7E,SAAO,uBAAuB,oBAAoB,MAAM;AAC1D;AAEO,SAAS,sBAAsB,OAA8C;AAClF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,IACZ;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1,25 +1,29 @@
1
1
  import {
2
2
  redactGDriveConfig
3
- } from "./chunk-DP2PP5V2.js";
3
+ } from "./chunk-KGC2OGXI.js";
4
4
 
5
5
  // src/resource/gdrive/gdrive.ts
6
6
  import {
7
7
  BaseResource,
8
8
  GDRIVE_COMMANDS,
9
9
  GDRIVE_PROMPT,
10
- GDRIVE_VFS_OPS,
10
+ GDRIVE_OPS,
11
11
  GDriveAccessor,
12
12
  PathSpec,
13
13
  ResourceName,
14
14
  TokenManager,
15
15
  gdriveRead,
16
16
  gdriveReaddir,
17
- gdriveResolveGlob,
18
- gdriveStat
17
+ makeResolveGlob,
18
+ gdriveStat,
19
+ mountKey,
20
+ mountPrefixOf
19
21
  } from "@struktoai/mirage-core";
22
+ var gdriveResolveGlob = makeResolveGlob(gdriveReaddir);
20
23
  var GDriveResource = class extends BaseResource {
21
24
  kind = ResourceName.GDRIVE;
22
- isRemote = true;
25
+ cachesReads = true;
26
+ supportsSnapshot = true;
23
27
  indexTtl = 86400;
24
28
  prompt = GDRIVE_PROMPT;
25
29
  config;
@@ -30,7 +34,9 @@ var GDriveResource = class extends BaseResource {
30
34
  const tm = new TokenManager({
31
35
  clientId: config.clientId,
32
36
  clientSecret: config.clientSecret,
33
- refreshToken: config.refreshToken
37
+ refreshToken: config.refreshToken,
38
+ ...config.refreshFn !== void 0 ? { refreshFn: config.refreshFn } : {},
39
+ ...config.folderId !== void 0 ? { folderId: config.folderId } : {}
34
40
  });
35
41
  this.accessor = new GDriveAccessor({ tokenManager: tm });
36
42
  }
@@ -44,7 +50,7 @@ var GDriveResource = class extends BaseResource {
44
50
  return GDRIVE_COMMANDS;
45
51
  }
46
52
  ops() {
47
- return GDRIVE_VFS_OPS;
53
+ return GDRIVE_OPS;
48
54
  }
49
55
  readFile(p) {
50
56
  return gdriveRead(this.accessor, p, this.index);
@@ -55,18 +61,14 @@ var GDriveResource = class extends BaseResource {
55
61
  stat(p) {
56
62
  return gdriveStat(this.accessor, p, this.index);
57
63
  }
58
- async fingerprint(p) {
59
- const lookup = await this.index.get(p.original);
60
- return lookup.entry?.remoteTime ?? null;
61
- }
62
64
  glob(paths, prefix = "") {
63
65
  const effective = prefix !== "" ? paths.map(
64
- (p) => p.prefix !== "" ? p : new PathSpec({
65
- original: p.original,
66
+ (p) => mountPrefixOf(p.virtual, p.resourcePath) !== "" ? p : new PathSpec({
67
+ virtual: p.virtual,
66
68
  directory: p.directory,
67
69
  ...p.pattern !== null ? { pattern: p.pattern } : {},
68
70
  resolved: p.resolved,
69
- prefix
71
+ resourcePath: mountKey(p.virtual, prefix)
70
72
  })
71
73
  ) : paths;
72
74
  return gdriveResolveGlob(this.accessor, effective, this.index);
@@ -85,4 +87,4 @@ var GDriveResource = class extends BaseResource {
85
87
  export {
86
88
  GDriveResource
87
89
  };
88
- //# sourceMappingURL=chunk-TRTUHCS4.js.map
90
+ //# sourceMappingURL=chunk-VLRSOWHP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/gdrive/gdrive.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BaseResource,\n GDRIVE_COMMANDS,\n GDRIVE_PROMPT,\n GDRIVE_OPS,\n GDriveAccessor,\n PathSpec,\n ResourceName,\n TokenManager,\n gdriveRead,\n gdriveReaddir,\n makeResolveGlob,\n gdriveStat,\n mountKey,\n mountPrefixOf,\n type FileStat,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n} from '@struktoai/mirage-core'\nimport { redactGDriveConfig, type GDriveConfig, type GDriveConfigRedacted } from './config.ts'\n\nconst gdriveResolveGlob = makeResolveGlob(gdriveReaddir)\n\nexport interface GDriveResourceState {\n type: string\n config: GDriveConfigRedacted\n}\n\nexport class GDriveResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.GDRIVE\n readonly cachesReads: boolean = true\n readonly supportsSnapshot: boolean = true\n override readonly indexTtl: number = 86_400\n readonly prompt: string = GDRIVE_PROMPT\n readonly config: GDriveConfig\n readonly accessor: GDriveAccessor\n\n constructor(config: GDriveConfig) {\n super()\n this.config = config\n const tm = new TokenManager({\n clientId: config.clientId,\n clientSecret: config.clientSecret,\n refreshToken: config.refreshToken,\n ...(config.refreshFn !== undefined ? { refreshFn: config.refreshFn } : {}),\n ...(config.folderId !== undefined ? { folderId: config.folderId } : {}),\n })\n this.accessor = new GDriveAccessor({ tokenManager: tm })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return GDRIVE_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GDRIVE_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return gdriveRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return gdriveReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return gdriveStat(this.accessor, p, this.index)\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n mountPrefixOf(p.virtual, p.resourcePath) !== ''\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, prefix),\n }),\n )\n : paths\n return gdriveResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GDriveResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactGDriveConfig(this.config),\n })\n }\n\n loadState(_state: GDriveResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAGP,IAAM,oBAAoB,gBAAgB,aAAa;AAOhD,IAAM,iBAAN,cAA6B,aAAiC;AAAA,EAC1D,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA,EACvB,mBAA4B;AAAA,EACnB,WAAmB;AAAA,EAC5B,SAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EAET,YAAY,QAAsB;AAChC,UAAM;AACN,SAAK,SAAS;AACd,UAAM,KAAK,IAAI,aAAa;AAAA,MAC1B,UAAU,OAAO;AAAA,MACjB,cAAc,OAAO;AAAA,MACrB,cAAc,OAAO;AAAA,MACrB,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,MACxE,GAAI,OAAO,aAAa,SAAY,EAAE,UAAU,OAAO,SAAS,IAAI,CAAC;AAAA,IACvE,CAAC;AACD,SAAK,WAAW,IAAI,eAAe,EAAE,cAAc,GAAG,CAAC;AAAA,EACzD;AAAA,EAEA,OAAsB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,QAAuB;AACrB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,WAAyC;AACvC,WAAO;AAAA,EACT;AAAA,EAEA,MAA+B;AAC7B,WAAO;AAAA,EACT;AAAA,EAEA,SAAS,GAAkC;AACzC,WAAO,WAAW,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAChD;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,cAAc,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACnD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,WAAW,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAChD;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,cAAc,EAAE,SAAS,EAAE,YAAY,MAAM,KACzC,IACA,IAAI,SAAS;AAAA,QACX,SAAS,EAAE;AAAA,QACX,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ,cAAc,SAAS,EAAE,SAAS,MAAM;AAAA,MAC1C,CAAC;AAAA,IACP,IACA;AACN,WAAO,kBAAkB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAC/D;AAAA,EAEA,WAAyC;AACvC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAmB,KAAK,MAAM;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA4C;AACpD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}