@smthrs/platform-bun 0.0.0-stage → 1.0.0-rc.13

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 (429) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/LICENSE +21 -0
  3. package/README.md +110 -2
  4. package/dist/cjs/BunFileSystem.d.ts +44 -0
  5. package/dist/cjs/BunFileSystem.d.ts.map +1 -0
  6. package/dist/cjs/BunFileSystem.js +38 -0
  7. package/dist/cjs/BunFileSystem.js.map +7 -0
  8. package/dist/cjs/BunHost.d.ts +205 -0
  9. package/dist/cjs/BunHost.d.ts.map +1 -0
  10. package/dist/cjs/BunHost.js +148 -0
  11. package/dist/cjs/BunHost.js.map +7 -0
  12. package/dist/cjs/index.d.ts +26 -0
  13. package/dist/cjs/index.d.ts.map +1 -0
  14. package/dist/cjs/index.js +37 -0
  15. package/dist/cjs/index.js.map +7 -0
  16. package/dist/cjs/package.json +1 -0
  17. package/dist/esm/BunFileSystem.d.ts +44 -0
  18. package/dist/esm/BunFileSystem.d.ts.map +1 -0
  19. package/dist/esm/BunFileSystem.js +35 -0
  20. package/dist/esm/BunFileSystem.js.map +1 -0
  21. package/dist/esm/BunHost.d.ts +205 -0
  22. package/dist/esm/BunHost.d.ts.map +1 -0
  23. package/dist/esm/BunHost.js +248 -0
  24. package/dist/esm/BunHost.js.map +1 -0
  25. package/dist/esm/index.d.ts +26 -0
  26. package/dist/esm/index.d.ts.map +1 -0
  27. package/dist/esm/index.js +26 -0
  28. package/dist/esm/index.js.map +1 -0
  29. package/dist/vendor/adapters.json +3067 -0
  30. package/dist/vendor/bun/BunAddressResolver.d.ts +15 -0
  31. package/dist/vendor/bun/BunAddressResolver.js +8 -0
  32. package/dist/vendor/bun/BunChildProcessSpawner.d.ts +8 -0
  33. package/dist/vendor/bun/BunChildProcessSpawner.js +14 -0
  34. package/dist/vendor/bun/BunClusterHttp.d.ts +76 -0
  35. package/dist/vendor/bun/BunClusterHttp.js +39 -0
  36. package/dist/vendor/bun/BunClusterSocket.d.ts +70 -0
  37. package/dist/vendor/bun/BunClusterSocket.js +22 -0
  38. package/dist/vendor/bun/BunCrypto.d.ts +11 -0
  39. package/dist/vendor/bun/BunCrypto.js +8 -0
  40. package/dist/vendor/bun/BunDatagramSocket.d.ts +227 -0
  41. package/dist/vendor/bun/BunDatagramSocket.js +11 -0
  42. package/dist/vendor/bun/BunDns.d.ts +72 -0
  43. package/dist/vendor/bun/BunDns.js +12 -0
  44. package/dist/vendor/bun/BunFileSystem.d.ts +11 -0
  45. package/dist/vendor/bun/BunFileSystem.js +9 -0
  46. package/dist/vendor/bun/BunHttpClient.d.ts +10 -0
  47. package/dist/vendor/bun/BunHttpClient.js +1 -0
  48. package/dist/vendor/bun/BunHttpPlatform.d.ts +11 -0
  49. package/dist/vendor/bun/BunHttpPlatform.js +11 -0
  50. package/dist/vendor/bun/BunHttpServer.d.ts +151 -0
  51. package/dist/vendor/bun/BunHttpServer.js +38 -0
  52. package/dist/vendor/bun/BunHttpServerRequest.d.ts +20 -0
  53. package/dist/vendor/bun/BunHttpServerRequest.js +7 -0
  54. package/dist/vendor/bun/BunMultipart.d.ts +34 -0
  55. package/dist/vendor/bun/BunMultipart.js +12 -0
  56. package/dist/vendor/bun/BunPath.d.ts +27 -0
  57. package/dist/vendor/bun/BunPath.js +12 -0
  58. package/dist/vendor/bun/BunRedis.d.ts +53 -0
  59. package/dist/vendor/bun/BunRedis.js +11 -0
  60. package/dist/vendor/bun/BunRuntime.d.ts +88 -0
  61. package/dist/vendor/bun/BunRuntime.js +8 -0
  62. package/dist/vendor/bun/BunServices.d.ts +37 -0
  63. package/dist/vendor/bun/BunServices.js +23 -0
  64. package/dist/vendor/bun/BunSink.d.ts +9 -0
  65. package/dist/vendor/bun/BunSink.js +12 -0
  66. package/dist/vendor/bun/BunSocket.d.ts +45 -0
  67. package/dist/vendor/bun/BunSocket.js +29 -0
  68. package/dist/vendor/bun/BunSocketServer.d.ts +9 -0
  69. package/dist/vendor/bun/BunSocketServer.js +21 -0
  70. package/dist/vendor/bun/BunStdio.d.ts +12 -0
  71. package/dist/vendor/bun/BunStdio.js +10 -0
  72. package/dist/vendor/bun/BunStream.d.ts +20 -0
  73. package/dist/vendor/bun/BunStream.js +30 -0
  74. package/dist/vendor/bun/BunTerminal.d.ts +24 -0
  75. package/dist/vendor/bun/BunTerminal.js +10 -0
  76. package/dist/vendor/bun/BunWorker.d.ts +22 -0
  77. package/dist/vendor/bun/BunWorker.js +9 -0
  78. package/dist/vendor/bun/BunWorkerRunner.d.ts +13 -0
  79. package/dist/vendor/bun/BunWorkerRunner.js +7 -0
  80. package/dist/vendor/bun/LICENSE +21 -0
  81. package/dist/vendor/bun/index.d.ts +130 -0
  82. package/dist/vendor/bun/index.js +121 -0
  83. package/dist/vendor/chunk-226TYKP6.js +60 -0
  84. package/dist/vendor/chunk-2ADOI6ZN.js +18 -0
  85. package/dist/vendor/chunk-2AP6TO77.js +71 -0
  86. package/dist/vendor/chunk-2LGUVSNM.js +20 -0
  87. package/dist/vendor/chunk-3SUO3TTE.js +40 -0
  88. package/dist/vendor/chunk-4O4Z52A2.js +48 -0
  89. package/dist/vendor/chunk-4YK2MHSO.js +20 -0
  90. package/dist/vendor/chunk-6B775XB2.js +85 -0
  91. package/dist/vendor/chunk-6KYVM2ZC.js +419 -0
  92. package/dist/vendor/chunk-6QPSLCUZ.js +0 -0
  93. package/dist/vendor/chunk-6R444NFO.js +104 -0
  94. package/dist/vendor/chunk-7JOAEKDV.js +503 -0
  95. package/dist/vendor/chunk-7VJC3PHX.js +63 -0
  96. package/dist/vendor/chunk-7ZKNPDTP.js +26 -0
  97. package/dist/vendor/chunk-ABPRHPJP.js +15 -0
  98. package/dist/vendor/chunk-AMAL6TRE.js +93 -0
  99. package/dist/vendor/chunk-AW6WQVI7.js +29 -0
  100. package/dist/vendor/chunk-BHV44Z6K.js +36 -0
  101. package/dist/vendor/chunk-BIR74JJK.js +93 -0
  102. package/dist/vendor/chunk-BTXZUHUI.js +7 -0
  103. package/dist/vendor/chunk-BVV46N3V.js +515 -0
  104. package/dist/vendor/chunk-C7UMBJO6.js +31 -0
  105. package/dist/vendor/chunk-CN4K2U6M.js +20 -0
  106. package/dist/vendor/chunk-D6XNHJPW.js +18 -0
  107. package/dist/vendor/chunk-DHTPLWAP.js +34 -0
  108. package/dist/vendor/chunk-DWSNOBD4.js +18 -0
  109. package/dist/vendor/chunk-DX4VFONH.js +81 -0
  110. package/dist/vendor/chunk-EIO7BKW3.js +63 -0
  111. package/dist/vendor/chunk-FIPFWLCV.js +144 -0
  112. package/dist/vendor/chunk-GITB76ZP.js +22 -0
  113. package/dist/vendor/chunk-GMORYZG4.js +62 -0
  114. package/dist/vendor/chunk-HXGVOKHF.js +22 -0
  115. package/dist/vendor/chunk-HYPKWCVW.js +374 -0
  116. package/dist/vendor/chunk-IJON5WTO.js +34 -0
  117. package/dist/vendor/chunk-IXI7RW3A.js +580 -0
  118. package/dist/vendor/chunk-J43O5GFH.js +28 -0
  119. package/dist/vendor/chunk-JTST2Z7N.js +58 -0
  120. package/dist/vendor/chunk-JYD572EF.js +18 -0
  121. package/dist/vendor/chunk-K6GWBGJM.js +16 -0
  122. package/dist/vendor/chunk-KANNAI65.js +62 -0
  123. package/dist/vendor/chunk-KEMBVIRS.js +128 -0
  124. package/dist/vendor/chunk-LOB26XOO.js +0 -0
  125. package/dist/vendor/chunk-M2QOSF47.js +53 -0
  126. package/dist/vendor/chunk-MLKGABMK.js +9 -0
  127. package/dist/vendor/chunk-NGGMPIWR.js +65 -0
  128. package/dist/vendor/chunk-NNTJGFLB.js +21 -0
  129. package/dist/vendor/chunk-NU53DHQR.js +18 -0
  130. package/dist/vendor/chunk-OAY4MA3I.js +28 -0
  131. package/dist/vendor/chunk-OV2KKGBA.js +16 -0
  132. package/dist/vendor/chunk-PBM2HJOX.js +118 -0
  133. package/dist/vendor/chunk-Q5UCOQNO.js +70 -0
  134. package/dist/vendor/chunk-Q7YXUH7M.js +414 -0
  135. package/dist/vendor/chunk-QKYYD3AZ.js +131 -0
  136. package/dist/vendor/chunk-QLI7T34M.js +18 -0
  137. package/dist/vendor/chunk-QR2ZOVOL.js +18 -0
  138. package/dist/vendor/chunk-R2PFJKSP.js +274 -0
  139. package/dist/vendor/chunk-RX5TKFP7.js +51 -0
  140. package/dist/vendor/chunk-S3MN5OXB.js +34 -0
  141. package/dist/vendor/chunk-T5WDTZCE.js +249 -0
  142. package/dist/vendor/chunk-TBMTA5LD.js +14 -0
  143. package/dist/vendor/chunk-TCKM3JXD.js +325 -0
  144. package/dist/vendor/chunk-UXIG7ALP.js +229 -0
  145. package/dist/vendor/chunk-V577GRCI.js +438 -0
  146. package/dist/vendor/chunk-VS6VBUH6.js +57 -0
  147. package/dist/vendor/chunk-WGUQHMX2.js +18 -0
  148. package/dist/vendor/chunk-WNS3OER2.js +18 -0
  149. package/dist/vendor/chunk-X6FYP2EH.js +109 -0
  150. package/dist/vendor/chunk-XAVBQY4D.js +20 -0
  151. package/dist/vendor/chunk-XAZH2ZEU.js +43 -0
  152. package/dist/vendor/chunk-XDPP24MG.js +129 -0
  153. package/dist/vendor/chunk-XF3WZCMZ.js +26 -0
  154. package/dist/vendor/chunk-XXVMTKX5.js +0 -0
  155. package/dist/vendor/chunk-YJGNV6EV.js +85 -0
  156. package/dist/vendor/chunk-ZJEHEPDQ.js +18 -0
  157. package/dist/vendor/cjs/bun/BunAddressResolver.d.ts +15 -0
  158. package/dist/vendor/cjs/bun/BunAddressResolver.js +1 -0
  159. package/dist/vendor/cjs/bun/BunChildProcessSpawner.d.ts +8 -0
  160. package/dist/vendor/cjs/bun/BunChildProcessSpawner.js +1 -0
  161. package/dist/vendor/cjs/bun/BunClusterHttp.d.ts +76 -0
  162. package/dist/vendor/cjs/bun/BunClusterHttp.js +1 -0
  163. package/dist/vendor/cjs/bun/BunClusterSocket.d.ts +70 -0
  164. package/dist/vendor/cjs/bun/BunClusterSocket.js +1 -0
  165. package/dist/vendor/cjs/bun/BunCrypto.d.ts +11 -0
  166. package/dist/vendor/cjs/bun/BunCrypto.js +1 -0
  167. package/dist/vendor/cjs/bun/BunDatagramSocket.d.ts +227 -0
  168. package/dist/vendor/cjs/bun/BunDatagramSocket.js +1 -0
  169. package/dist/vendor/cjs/bun/BunDns.d.ts +72 -0
  170. package/dist/vendor/cjs/bun/BunDns.js +1 -0
  171. package/dist/vendor/cjs/bun/BunFileSystem.d.ts +11 -0
  172. package/dist/vendor/cjs/bun/BunFileSystem.js +1 -0
  173. package/dist/vendor/cjs/bun/BunHttpClient.d.ts +10 -0
  174. package/dist/vendor/cjs/bun/BunHttpClient.js +1 -0
  175. package/dist/vendor/cjs/bun/BunHttpPlatform.d.ts +11 -0
  176. package/dist/vendor/cjs/bun/BunHttpPlatform.js +1 -0
  177. package/dist/vendor/cjs/bun/BunHttpServer.d.ts +151 -0
  178. package/dist/vendor/cjs/bun/BunHttpServer.js +1 -0
  179. package/dist/vendor/cjs/bun/BunHttpServerRequest.d.ts +20 -0
  180. package/dist/vendor/cjs/bun/BunHttpServerRequest.js +1 -0
  181. package/dist/vendor/cjs/bun/BunMultipart.d.ts +34 -0
  182. package/dist/vendor/cjs/bun/BunMultipart.js +1 -0
  183. package/dist/vendor/cjs/bun/BunPath.d.ts +27 -0
  184. package/dist/vendor/cjs/bun/BunPath.js +1 -0
  185. package/dist/vendor/cjs/bun/BunRedis.d.ts +53 -0
  186. package/dist/vendor/cjs/bun/BunRedis.js +1 -0
  187. package/dist/vendor/cjs/bun/BunRuntime.d.ts +88 -0
  188. package/dist/vendor/cjs/bun/BunRuntime.js +1 -0
  189. package/dist/vendor/cjs/bun/BunServices.d.ts +37 -0
  190. package/dist/vendor/cjs/bun/BunServices.js +1 -0
  191. package/dist/vendor/cjs/bun/BunSink.d.ts +9 -0
  192. package/dist/vendor/cjs/bun/BunSink.js +1 -0
  193. package/dist/vendor/cjs/bun/BunSocket.d.ts +45 -0
  194. package/dist/vendor/cjs/bun/BunSocket.js +1 -0
  195. package/dist/vendor/cjs/bun/BunSocketServer.d.ts +9 -0
  196. package/dist/vendor/cjs/bun/BunSocketServer.js +1 -0
  197. package/dist/vendor/cjs/bun/BunStdio.d.ts +12 -0
  198. package/dist/vendor/cjs/bun/BunStdio.js +1 -0
  199. package/dist/vendor/cjs/bun/BunStream.d.ts +20 -0
  200. package/dist/vendor/cjs/bun/BunStream.js +1 -0
  201. package/dist/vendor/cjs/bun/BunTerminal.d.ts +24 -0
  202. package/dist/vendor/cjs/bun/BunTerminal.js +1 -0
  203. package/dist/vendor/cjs/bun/BunWorker.d.ts +22 -0
  204. package/dist/vendor/cjs/bun/BunWorker.js +1 -0
  205. package/dist/vendor/cjs/bun/BunWorkerRunner.d.ts +13 -0
  206. package/dist/vendor/cjs/bun/BunWorkerRunner.js +1 -0
  207. package/dist/vendor/cjs/bun/index.d.ts +130 -0
  208. package/dist/vendor/cjs/bun/index.js +1 -0
  209. package/dist/vendor/cjs/node/NodeAddressResolver.d.ts +16 -0
  210. package/dist/vendor/cjs/node/NodeAddressResolver.js +1 -0
  211. package/dist/vendor/cjs/node/NodeChildProcessSpawner.d.ts +8 -0
  212. package/dist/vendor/cjs/node/NodeChildProcessSpawner.js +1 -0
  213. package/dist/vendor/cjs/node/NodeClusterHttp.d.ts +54 -0
  214. package/dist/vendor/cjs/node/NodeClusterHttp.js +1 -0
  215. package/dist/vendor/cjs/node/NodeClusterSocket.d.ts +85 -0
  216. package/dist/vendor/cjs/node/NodeClusterSocket.js +1 -0
  217. package/dist/vendor/cjs/node/NodeCrypto.d.ts +11 -0
  218. package/dist/vendor/cjs/node/NodeCrypto.js +1 -0
  219. package/dist/vendor/cjs/node/NodeDatagramSocket.d.ts +10 -0
  220. package/dist/vendor/cjs/node/NodeDatagramSocket.js +1 -0
  221. package/dist/vendor/cjs/node/NodeDns.d.ts +51 -0
  222. package/dist/vendor/cjs/node/NodeDns.js +1 -0
  223. package/dist/vendor/cjs/node/NodeFileSystem.d.ts +11 -0
  224. package/dist/vendor/cjs/node/NodeFileSystem.js +1 -0
  225. package/dist/vendor/cjs/node/NodeHttpClient.d.ts +303 -0
  226. package/dist/vendor/cjs/node/NodeHttpClient.js +1 -0
  227. package/dist/vendor/cjs/node/NodeHttpIncomingMessage.d.ts +64 -0
  228. package/dist/vendor/cjs/node/NodeHttpIncomingMessage.js +1 -0
  229. package/dist/vendor/cjs/node/NodeHttpPlatform.d.ts +38 -0
  230. package/dist/vendor/cjs/node/NodeHttpPlatform.js +1 -0
  231. package/dist/vendor/cjs/node/NodeHttpServer.d.ts +131 -0
  232. package/dist/vendor/cjs/node/NodeHttpServer.js +1 -0
  233. package/dist/vendor/cjs/node/NodeHttpServerRequest.d.ts +32 -0
  234. package/dist/vendor/cjs/node/NodeHttpServerRequest.js +1 -0
  235. package/dist/vendor/cjs/node/NodeMultipart.d.ts +50 -0
  236. package/dist/vendor/cjs/node/NodeMultipart.js +1 -0
  237. package/dist/vendor/cjs/node/NodeMultipartParser.d.ts +105 -0
  238. package/dist/vendor/cjs/node/NodeMultipartParser.js +1 -0
  239. package/dist/vendor/cjs/node/NodePath.d.ts +30 -0
  240. package/dist/vendor/cjs/node/NodePath.js +1 -0
  241. package/dist/vendor/cjs/node/NodeRedis.d.ts +78 -0
  242. package/dist/vendor/cjs/node/NodeRedis.js +1 -0
  243. package/dist/vendor/cjs/node/NodeRuntime.d.ts +88 -0
  244. package/dist/vendor/cjs/node/NodeRuntime.js +1 -0
  245. package/dist/vendor/cjs/node/NodeServices.d.ts +37 -0
  246. package/dist/vendor/cjs/node/NodeServices.js +1 -0
  247. package/dist/vendor/cjs/node/NodeSink.d.ts +9 -0
  248. package/dist/vendor/cjs/node/NodeSink.js +1 -0
  249. package/dist/vendor/cjs/node/NodeSocket.d.ts +45 -0
  250. package/dist/vendor/cjs/node/NodeSocket.js +1 -0
  251. package/dist/vendor/cjs/node/NodeSocketServer.d.ts +9 -0
  252. package/dist/vendor/cjs/node/NodeSocketServer.js +1 -0
  253. package/dist/vendor/cjs/node/NodeStdio.d.ts +12 -0
  254. package/dist/vendor/cjs/node/NodeStdio.js +1 -0
  255. package/dist/vendor/cjs/node/NodeStream.d.ts +9 -0
  256. package/dist/vendor/cjs/node/NodeStream.js +1 -0
  257. package/dist/vendor/cjs/node/NodeTerminal.d.ts +24 -0
  258. package/dist/vendor/cjs/node/NodeTerminal.js +1 -0
  259. package/dist/vendor/cjs/node/NodeWorker.d.ts +24 -0
  260. package/dist/vendor/cjs/node/NodeWorker.js +1 -0
  261. package/dist/vendor/cjs/node/NodeWorkerRunner.d.ts +13 -0
  262. package/dist/vendor/cjs/node/NodeWorkerRunner.js +1 -0
  263. package/dist/vendor/cjs/node/Undici.d.ts +31 -0
  264. package/dist/vendor/cjs/node/Undici.js +1 -0
  265. package/dist/vendor/cjs/node/index.d.ts +140 -0
  266. package/dist/vendor/cjs/node/index.js +1 -0
  267. package/dist/vendor/cjs/node-shared/NodeAddressResolver.d.ts +13 -0
  268. package/dist/vendor/cjs/node-shared/NodeAddressResolver.js +1 -0
  269. package/dist/vendor/cjs/node-shared/NodeChildProcessSpawner.d.ts +66 -0
  270. package/dist/vendor/cjs/node-shared/NodeChildProcessSpawner.js +1 -0
  271. package/dist/vendor/cjs/node-shared/NodeClusterSocket.d.ts +35 -0
  272. package/dist/vendor/cjs/node-shared/NodeClusterSocket.js +1 -0
  273. package/dist/vendor/cjs/node-shared/NodeCrypto.d.ts +30 -0
  274. package/dist/vendor/cjs/node-shared/NodeCrypto.js +1 -0
  275. package/dist/vendor/cjs/node-shared/NodeDatagramSocket.d.ts +246 -0
  276. package/dist/vendor/cjs/node-shared/NodeDatagramSocket.js +1 -0
  277. package/dist/vendor/cjs/node-shared/NodeDns.d.ts +221 -0
  278. package/dist/vendor/cjs/node-shared/NodeDns.js +1 -0
  279. package/dist/vendor/cjs/node-shared/NodeFileSystem.d.ts +12 -0
  280. package/dist/vendor/cjs/node-shared/NodeFileSystem.js +1 -0
  281. package/dist/vendor/cjs/node-shared/NodeHttpCompression.d.ts +40 -0
  282. package/dist/vendor/cjs/node-shared/NodeHttpCompression.js +1 -0
  283. package/dist/vendor/cjs/node-shared/NodePath.d.ts +30 -0
  284. package/dist/vendor/cjs/node-shared/NodePath.js +1 -0
  285. package/dist/vendor/cjs/node-shared/NodeRuntime.d.ts +51 -0
  286. package/dist/vendor/cjs/node-shared/NodeRuntime.js +1 -0
  287. package/dist/vendor/cjs/node-shared/NodeSink.d.ts +73 -0
  288. package/dist/vendor/cjs/node-shared/NodeSink.js +1 -0
  289. package/dist/vendor/cjs/node-shared/NodeSocket.d.ts +144 -0
  290. package/dist/vendor/cjs/node-shared/NodeSocket.js +1 -0
  291. package/dist/vendor/cjs/node-shared/NodeSocketServer.d.ts +87 -0
  292. package/dist/vendor/cjs/node-shared/NodeSocketServer.js +1 -0
  293. package/dist/vendor/cjs/node-shared/NodeStdio.d.ts +13 -0
  294. package/dist/vendor/cjs/node-shared/NodeStdio.js +1 -0
  295. package/dist/vendor/cjs/node-shared/NodeStream.d.ts +194 -0
  296. package/dist/vendor/cjs/node-shared/NodeStream.js +1 -0
  297. package/dist/vendor/cjs/node-shared/NodeTerminal.d.ts +24 -0
  298. package/dist/vendor/cjs/node-shared/NodeTerminal.js +1 -0
  299. package/dist/vendor/cjs/node-shared/index.d.ts +85 -0
  300. package/dist/vendor/cjs/node-shared/index.js +1 -0
  301. package/dist/vendor/cjs/node-shared/internal/nodeChildProcessSpawner.d.ts +4 -0
  302. package/dist/vendor/cjs/node-shared/internal/nodeChildProcessSpawner.js +1 -0
  303. package/dist/vendor/cjs/node-shared/internal/utils.d.ts +2 -0
  304. package/dist/vendor/cjs/node-shared/internal/utils.js +1 -0
  305. package/dist/vendor/cjs/package.json +1 -0
  306. package/dist/vendor/cjs/platform-bun.d.ts +130 -0
  307. package/dist/vendor/cjs/platform-bun.js +1 -0
  308. package/dist/vendor/cjs/platform-node-shared.d.ts +85 -0
  309. package/dist/vendor/cjs/platform-node-shared.js +1 -0
  310. package/dist/vendor/cjs/platform-node.d.ts +140 -0
  311. package/dist/vendor/cjs/platform-node.js +1 -0
  312. package/dist/vendor/node/LICENSE +21 -0
  313. package/dist/vendor/node/NodeAddressResolver.d.ts +16 -0
  314. package/dist/vendor/node/NodeAddressResolver.js +8 -0
  315. package/dist/vendor/node/NodeChildProcessSpawner.d.ts +8 -0
  316. package/dist/vendor/node/NodeChildProcessSpawner.js +14 -0
  317. package/dist/vendor/node/NodeClusterHttp.d.ts +54 -0
  318. package/dist/vendor/node/NodeClusterHttp.js +43 -0
  319. package/dist/vendor/node/NodeClusterSocket.d.ts +85 -0
  320. package/dist/vendor/node/NodeClusterSocket.js +30 -0
  321. package/dist/vendor/node/NodeCrypto.d.ts +11 -0
  322. package/dist/vendor/node/NodeCrypto.js +8 -0
  323. package/dist/vendor/node/NodeDatagramSocket.d.ts +10 -0
  324. package/dist/vendor/node/NodeDatagramSocket.js +12 -0
  325. package/dist/vendor/node/NodeDns.d.ts +51 -0
  326. package/dist/vendor/node/NodeDns.js +12 -0
  327. package/dist/vendor/node/NodeFileSystem.d.ts +11 -0
  328. package/dist/vendor/node/NodeFileSystem.js +9 -0
  329. package/dist/vendor/node/NodeHttpClient.d.ts +303 -0
  330. package/dist/vendor/node/NodeHttpClient.js +54 -0
  331. package/dist/vendor/node/NodeHttpIncomingMessage.d.ts +64 -0
  332. package/dist/vendor/node/NodeHttpIncomingMessage.js +10 -0
  333. package/dist/vendor/node/NodeHttpPlatform.d.ts +38 -0
  334. package/dist/vendor/node/NodeHttpPlatform.js +16 -0
  335. package/dist/vendor/node/NodeHttpServer.d.ts +131 -0
  336. package/dist/vendor/node/NodeHttpServer.js +46 -0
  337. package/dist/vendor/node/NodeHttpServerRequest.d.ts +32 -0
  338. package/dist/vendor/node/NodeHttpServerRequest.js +9 -0
  339. package/dist/vendor/node/NodeMultipart.d.ts +50 -0
  340. package/dist/vendor/node/NodeMultipart.js +15 -0
  341. package/dist/vendor/node/NodeMultipartParser.d.ts +105 -0
  342. package/dist/vendor/node/NodeMultipartParser.js +11 -0
  343. package/dist/vendor/node/NodePath.d.ts +30 -0
  344. package/dist/vendor/node/NodePath.js +12 -0
  345. package/dist/vendor/node/NodeRedis.d.ts +78 -0
  346. package/dist/vendor/node/NodeRedis.js +11 -0
  347. package/dist/vendor/node/NodeRuntime.d.ts +88 -0
  348. package/dist/vendor/node/NodeRuntime.js +8 -0
  349. package/dist/vendor/node/NodeServices.d.ts +37 -0
  350. package/dist/vendor/node/NodeServices.js +23 -0
  351. package/dist/vendor/node/NodeSink.d.ts +9 -0
  352. package/dist/vendor/node/NodeSink.js +12 -0
  353. package/dist/vendor/node/NodeSocket.d.ts +45 -0
  354. package/dist/vendor/node/NodeSocket.js +31 -0
  355. package/dist/vendor/node/NodeSocketServer.d.ts +9 -0
  356. package/dist/vendor/node/NodeSocketServer.js +21 -0
  357. package/dist/vendor/node/NodeStdio.d.ts +12 -0
  358. package/dist/vendor/node/NodeStdio.js +10 -0
  359. package/dist/vendor/node/NodeStream.d.ts +9 -0
  360. package/dist/vendor/node/NodeStream.js +27 -0
  361. package/dist/vendor/node/NodeTerminal.d.ts +24 -0
  362. package/dist/vendor/node/NodeTerminal.js +10 -0
  363. package/dist/vendor/node/NodeWorker.d.ts +24 -0
  364. package/dist/vendor/node/NodeWorker.js +9 -0
  365. package/dist/vendor/node/NodeWorkerRunner.d.ts +13 -0
  366. package/dist/vendor/node/NodeWorkerRunner.js +7 -0
  367. package/dist/vendor/node/Undici.d.ts +31 -0
  368. package/dist/vendor/node/Undici.js +9 -0
  369. package/dist/vendor/node/index.d.ts +140 -0
  370. package/dist/vendor/node/index.js +130 -0
  371. package/dist/vendor/node-shared/LICENSE +21 -0
  372. package/dist/vendor/node-shared/NodeAddressResolver.d.ts +13 -0
  373. package/dist/vendor/node-shared/NodeAddressResolver.js +7 -0
  374. package/dist/vendor/node-shared/NodeChildProcessSpawner.d.ts +66 -0
  375. package/dist/vendor/node-shared/NodeChildProcessSpawner.js +13 -0
  376. package/dist/vendor/node-shared/NodeClusterSocket.d.ts +35 -0
  377. package/dist/vendor/node-shared/NodeClusterSocket.js +11 -0
  378. package/dist/vendor/node-shared/NodeCrypto.d.ts +30 -0
  379. package/dist/vendor/node-shared/NodeCrypto.js +9 -0
  380. package/dist/vendor/node-shared/NodeDatagramSocket.d.ts +246 -0
  381. package/dist/vendor/node-shared/NodeDatagramSocket.js +11 -0
  382. package/dist/vendor/node-shared/NodeDns.d.ts +221 -0
  383. package/dist/vendor/node-shared/NodeDns.js +31 -0
  384. package/dist/vendor/node-shared/NodeFileSystem.d.ts +12 -0
  385. package/dist/vendor/node-shared/NodeFileSystem.js +8 -0
  386. package/dist/vendor/node-shared/NodeHttpCompression.d.ts +40 -0
  387. package/dist/vendor/node-shared/NodeHttpCompression.js +13 -0
  388. package/dist/vendor/node-shared/NodePath.d.ts +30 -0
  389. package/dist/vendor/node-shared/NodePath.js +11 -0
  390. package/dist/vendor/node-shared/NodeRuntime.d.ts +51 -0
  391. package/dist/vendor/node-shared/NodeRuntime.js +7 -0
  392. package/dist/vendor/node-shared/NodeSink.d.ts +73 -0
  393. package/dist/vendor/node-shared/NodeSink.js +11 -0
  394. package/dist/vendor/node-shared/NodeSocket.d.ts +144 -0
  395. package/dist/vendor/node-shared/NodeSocket.js +23 -0
  396. package/dist/vendor/node-shared/NodeSocketServer.d.ts +87 -0
  397. package/dist/vendor/node-shared/NodeSocketServer.js +20 -0
  398. package/dist/vendor/node-shared/NodeStdio.d.ts +13 -0
  399. package/dist/vendor/node-shared/NodeStdio.js +9 -0
  400. package/dist/vendor/node-shared/NodeStream.d.ts +194 -0
  401. package/dist/vendor/node-shared/NodeStream.js +26 -0
  402. package/dist/vendor/node-shared/NodeTerminal.d.ts +24 -0
  403. package/dist/vendor/node-shared/NodeTerminal.js +9 -0
  404. package/dist/vendor/node-shared/index.d.ts +85 -0
  405. package/dist/vendor/node-shared/index.js +70 -0
  406. package/dist/vendor/node-shared/internal/nodeChildProcessSpawner.d.ts +4 -0
  407. package/dist/vendor/node-shared/internal/nodeChildProcessSpawner.js +7 -0
  408. package/dist/vendor/node-shared/internal/utils.d.ts +2 -0
  409. package/dist/vendor/node-shared/internal/utils.js +7 -0
  410. package/dist/vendor/platform-bun.d.ts +130 -0
  411. package/dist/vendor/platform-bun.js +121 -0
  412. package/dist/vendor/platform-node-shared.d.ts +85 -0
  413. package/dist/vendor/platform-node-shared.js +70 -0
  414. package/dist/vendor/platform-node.d.ts +140 -0
  415. package/dist/vendor/platform-node.js +130 -0
  416. package/docs/README.md +135 -0
  417. package/docs/api.md +264 -0
  418. package/docs/concepts/host-surface.md +152 -0
  419. package/docs/concepts/runtime-parity.md +80 -0
  420. package/docs/guides/bind-a-repository-root.md +109 -0
  421. package/docs/guides/configure-the-filesystem-helper.md +113 -0
  422. package/docs/guides/contain-child-processes.md +178 -0
  423. package/docs/installation.md +131 -0
  424. package/docs/quickstart.md +163 -0
  425. package/docs/troubleshooting.md +163 -0
  426. package/package.json +146 -3
  427. package/src/BunFileSystem.ts +47 -0
  428. package/src/BunHost.ts +345 -0
  429. package/src/index.ts +27 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Bun implementation of Effect's `AddressResolver` service.
3
+ *
4
+ * IPv6 literals with a named zone such as `fe80::1%eth0` get their scope ID
5
+ * from `os.networkInterfaces()`, listed each time a named zone is resolved.
6
+ *
7
+ * @stability experimental
8
+ * @since 4.0.0
9
+ */
10
+ /**
11
+ * @stability experimental
12
+ * @since 4.0.0
13
+ */
14
+ export * from "../node-shared/NodeAddressResolver.js";
15
+ //# sourceMappingURL=BunAddressResolver.d.ts.map
@@ -0,0 +1,8 @@
1
+ import "../chunk-K6GWBGJM.js";
2
+ import {
3
+ layer
4
+ } from "../chunk-AW6WQVI7.js";
5
+ import "../chunk-MLKGABMK.js";
6
+ export {
7
+ layer
8
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Bun implementation of `ChildProcessSpawner`.
3
+ *
4
+ * @stability unstable
5
+ * @since 4.0.0
6
+ */
7
+ export * from "../node-shared/NodeChildProcessSpawner.js";
8
+ //# sourceMappingURL=BunChildProcessSpawner.d.ts.map
@@ -0,0 +1,14 @@
1
+ import "../chunk-JYD572EF.js";
2
+ import {
3
+ flattenCommand,
4
+ layer
5
+ } from "../chunk-IXI7RW3A.js";
6
+ import "../chunk-TBMTA5LD.js";
7
+ import "../chunk-T5WDTZCE.js";
8
+ import "../chunk-DX4VFONH.js";
9
+ import "../chunk-3SUO3TTE.js";
10
+ import "../chunk-MLKGABMK.js";
11
+ export {
12
+ flattenCommand,
13
+ layer
14
+ };
@@ -0,0 +1,76 @@
1
+ import * as MessageStorage from "effect/cluster/MessageStorage";
2
+ import * as Runners from "effect/cluster/Runners";
3
+ import * as RunnerStorage from "effect/cluster/RunnerStorage";
4
+ import type { Sharding } from "effect/cluster/Sharding";
5
+ import * as ShardingConfig from "effect/cluster/ShardingConfig";
6
+ import type * as Config from "effect/Config";
7
+ import type * as Etag from "effect/http/Etag";
8
+ import type { HttpPlatform } from "effect/http/HttpPlatform";
9
+ import type { HttpServer } from "effect/http/HttpServer";
10
+ import type { ServeError } from "effect/http/HttpServerError";
11
+ import * as Layer from "effect/Layer";
12
+ import type { SqlClient } from "effect/sql/SqlClient";
13
+ import { layerK8sHttpClient } from "./BunClusterSocket.ts";
14
+ import type { BunServices } from "./BunServices.ts";
15
+ export {
16
+ /**
17
+ * Layer that provides a Kubernetes HTTP client for runner health checks.
18
+ *
19
+ * @stability unstable
20
+ * @category re-exports
21
+ * @since 4.0.0
22
+ */
23
+ layerK8sHttpClient };
24
+ /**
25
+ * Layer that provides a Bun HTTP server for cluster runners.
26
+ *
27
+ * @stability unstable
28
+ * @category layers
29
+ * @since 4.0.0
30
+ */
31
+ export declare const layerHttpServer: Layer.Layer<HttpPlatform | Etag.Generator | BunServices | HttpServer, ServeError, ShardingConfig.ShardingConfig>;
32
+ /**
33
+ * Creates Bun cluster layers for HTTP or WebSocket transport, configuring serialization, storage, runner health, and optional client-only mode.
34
+ *
35
+ * **When to use**
36
+ *
37
+ * Use to install the complete Bun HTTP or WebSocket cluster layer, including
38
+ * client-only cluster access when a process should connect without serving
39
+ * runner RPCs.
40
+ *
41
+ * **Details**
42
+ *
43
+ * `serialization` defaults to SchemaBinary, `runnerHealth` defaults to ping
44
+ * checks, SQL-backed storage is used by default, and `shardingConfig` is
45
+ * overlaid on environment-loaded sharding configuration. `local` storage uses
46
+ * no-op message storage plus in-memory runner storage, while `byo` leaves both
47
+ * message and runner storage for the caller to provide.
48
+ *
49
+ * **Gotchas**
50
+ *
51
+ * `clientOnly` does not start the HTTP server or receive shard assignments.
52
+ * Non-client-only mode listens with `runnerListenAddress` when present, falling
53
+ * back to `runnerAddress`. HTTP and WebSocket runner RPCs use the default
54
+ * `HttpRunner` route.
55
+ *
56
+ * @see {@link layerHttpServer} for the server layer used by non-client-only transports
57
+ * @see {@link layerK8sHttpClient} for Kubernetes runner health support
58
+ *
59
+ * @stability unstable
60
+ * @category layers
61
+ * @since 4.0.0
62
+ */
63
+ export declare const layer: <const ClientOnly extends boolean = false, const Storage extends "local" | "sql" | "byo" = never>(options: {
64
+ readonly transport: "http" | "websocket";
65
+ readonly serialization?: "binary" | "ndjson" | undefined;
66
+ readonly serializationMaxBufferSize?: number | "unbounded" | undefined;
67
+ readonly clientOnly?: ClientOnly | undefined;
68
+ readonly storage?: Storage | undefined;
69
+ readonly runnerHealth?: "ping" | "k8s" | undefined;
70
+ readonly runnerHealthK8s?: {
71
+ readonly namespace?: string | undefined;
72
+ readonly labelSelector?: string | undefined;
73
+ } | undefined;
74
+ readonly shardingConfig?: Partial<ShardingConfig.ShardingConfig["Service"]> | undefined;
75
+ }) => ClientOnly extends true ? Layer.Layer<Sharding | Runners.Runners | ("byo" extends Storage ? never : MessageStorage.MessageStorage), Config.ConfigError, "local" extends Storage ? never : "byo" extends Storage ? (MessageStorage.MessageStorage | RunnerStorage.RunnerStorage) : SqlClient> : Layer.Layer<Sharding | Runners.Runners | MessageStorage.MessageStorage, ServeError | Config.ConfigError, "local" extends Storage ? never : "byo" extends Storage ? (MessageStorage.MessageStorage | RunnerStorage.RunnerStorage) : SqlClient>;
76
+ //# sourceMappingURL=BunClusterHttp.d.ts.map
@@ -0,0 +1,39 @@
1
+ import {
2
+ layer,
3
+ layerHttpServer
4
+ } from "../chunk-NGGMPIWR.js";
5
+ import "../chunk-RX5TKFP7.js";
6
+ import "../chunk-BVV46N3V.js";
7
+ import "../chunk-IJON5WTO.js";
8
+ import "../chunk-D6XNHJPW.js";
9
+ import "../chunk-226TYKP6.js";
10
+ import "../chunk-HXGVOKHF.js";
11
+ import "../chunk-FIPFWLCV.js";
12
+ import "../chunk-VS6VBUH6.js";
13
+ import "../chunk-PBM2HJOX.js";
14
+ import "../chunk-C7UMBJO6.js";
15
+ import "../chunk-Q5UCOQNO.js";
16
+ import "../chunk-7ZKNPDTP.js";
17
+ import "../chunk-JTST2Z7N.js";
18
+ import "../chunk-JYD572EF.js";
19
+ import "../chunk-IXI7RW3A.js";
20
+ import "../chunk-TBMTA5LD.js";
21
+ import "../chunk-T5WDTZCE.js";
22
+ import "../chunk-DX4VFONH.js";
23
+ import {
24
+ layerK8sHttpClient
25
+ } from "../chunk-EIO7BKW3.js";
26
+ import "../chunk-M2QOSF47.js";
27
+ import "../chunk-UXIG7ALP.js";
28
+ import "../chunk-Q7YXUH7M.js";
29
+ import "../chunk-2ADOI6ZN.js";
30
+ import "../chunk-4O4Z52A2.js";
31
+ import "../chunk-QR2ZOVOL.js";
32
+ import "../chunk-7JOAEKDV.js";
33
+ import "../chunk-3SUO3TTE.js";
34
+ import "../chunk-MLKGABMK.js";
35
+ export {
36
+ layer,
37
+ layerHttpServer,
38
+ layerK8sHttpClient
39
+ };
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Bun socket layers for Effect Cluster runners.
3
+ *
4
+ * The main `layer` builds a sharding layer for socket transport, choosing
5
+ * serialization, runner health checks, runner storage, message storage, and
6
+ * optional client-only mode from the supplied options. This module also
7
+ * re-exports the shared socket client and server protocol layers and provides
8
+ * `layerK8sHttpClient` for Kubernetes runner health checks.
9
+ *
10
+ * @stability unstable
11
+ * @since 4.0.0
12
+ */
13
+ import { layerClientProtocol, layerSocketServer } from "../node-shared/NodeClusterSocket.js";
14
+ import * as K8sHttpClient from "effect/cluster/K8sHttpClient";
15
+ import * as MessageStorage from "effect/cluster/MessageStorage";
16
+ import * as Runners from "effect/cluster/Runners";
17
+ import * as RunnerStorage from "effect/cluster/RunnerStorage";
18
+ import type { Sharding } from "effect/cluster/Sharding";
19
+ import * as ShardingConfig from "effect/cluster/ShardingConfig";
20
+ import type * as Config from "effect/Config";
21
+ import * as Layer from "effect/Layer";
22
+ import type * as SocketServer from "effect/socket/SocketServer";
23
+ import type { SqlClient } from "effect/sql/SqlClient";
24
+ export {
25
+ /**
26
+ * Provides the cluster `RpcClientProtocol` using the shared socket client
27
+ * implementation.
28
+ *
29
+ * @stability unstable
30
+ * @category re-exports
31
+ * @since 4.0.0
32
+ */
33
+ layerClientProtocol,
34
+ /**
35
+ * Provides the socket server used by Bun cluster runners through the shared
36
+ * socket server implementation.
37
+ *
38
+ * @stability unstable
39
+ * @category re-exports
40
+ * @since 4.0.0
41
+ */
42
+ layerSocketServer };
43
+ /**
44
+ * Creates Bun socket cluster layers, configuring serialization, storage, runner health, and optional client-only mode.
45
+ *
46
+ * @stability unstable
47
+ * @category layers
48
+ * @since 4.0.0
49
+ */
50
+ export declare const layer: <const ClientOnly extends boolean = false, const Storage extends "local" | "sql" | "byo" = never>(options?: {
51
+ readonly serialization?: "binary" | "ndjson" | undefined;
52
+ readonly serializationMaxBufferSize?: number | "unbounded" | undefined;
53
+ readonly clientOnly?: ClientOnly | undefined;
54
+ readonly storage?: Storage | undefined;
55
+ readonly runnerHealth?: "ping" | "k8s" | undefined;
56
+ readonly runnerHealthK8s?: {
57
+ readonly namespace?: string | undefined;
58
+ readonly labelSelector?: string | undefined;
59
+ } | undefined;
60
+ readonly shardingConfig?: Partial<ShardingConfig.ShardingConfig["Service"]> | undefined;
61
+ }) => ClientOnly extends true ? Layer.Layer<Sharding | Runners.Runners | ("byo" extends Storage ? never : MessageStorage.MessageStorage), Config.ConfigError, "local" extends Storage ? never : "byo" extends Storage ? (MessageStorage.MessageStorage | RunnerStorage.RunnerStorage) : SqlClient> : Layer.Layer<Sharding | Runners.Runners | ("byo" extends Storage ? never : MessageStorage.MessageStorage), SocketServer.SocketServerError | Config.ConfigError, "local" extends Storage ? never : "byo" extends Storage ? (MessageStorage.MessageStorage | RunnerStorage.RunnerStorage) : SqlClient>;
62
+ /**
63
+ * Layer that provides `K8sHttpClient`, using the Kubernetes service-account CA certificate when it is available.
64
+ *
65
+ * @stability unstable
66
+ * @category layers
67
+ * @since 4.0.0
68
+ */
69
+ export declare const layerK8sHttpClient: Layer.Layer<K8sHttpClient.K8sHttpClient>;
70
+ //# sourceMappingURL=BunClusterSocket.d.ts.map
@@ -0,0 +1,22 @@
1
+ import {
2
+ layer,
3
+ layerK8sHttpClient
4
+ } from "../chunk-EIO7BKW3.js";
5
+ import {
6
+ layerClientProtocol,
7
+ layerSocketServer
8
+ } from "../chunk-M2QOSF47.js";
9
+ import "../chunk-UXIG7ALP.js";
10
+ import "../chunk-Q7YXUH7M.js";
11
+ import "../chunk-2ADOI6ZN.js";
12
+ import "../chunk-4O4Z52A2.js";
13
+ import "../chunk-QR2ZOVOL.js";
14
+ import "../chunk-7JOAEKDV.js";
15
+ import "../chunk-3SUO3TTE.js";
16
+ import "../chunk-MLKGABMK.js";
17
+ export {
18
+ layer,
19
+ layerClientProtocol,
20
+ layerK8sHttpClient,
21
+ layerSocketServer
22
+ };
@@ -0,0 +1,11 @@
1
+ import type * as Crypto from "effect/Crypto";
2
+ import type * as Layer from "effect/Layer";
3
+ /**
4
+ * Layer that provides the Bun Crypto service implementation.
5
+ *
6
+ * @stability unstable
7
+ * @category layers
8
+ * @since 1.0.0
9
+ */
10
+ export declare const layer: Layer.Layer<Crypto.Crypto>;
11
+ //# sourceMappingURL=BunCrypto.d.ts.map
@@ -0,0 +1,8 @@
1
+ import {
2
+ layer
3
+ } from "../chunk-2ADOI6ZN.js";
4
+ import "../chunk-4O4Z52A2.js";
5
+ import "../chunk-MLKGABMK.js";
6
+ export {
7
+ layer
8
+ };
@@ -0,0 +1,227 @@
1
+ /**
2
+ * Bun UDP adapter for `effect/socket/DatagramSocket`, built on the native
3
+ * `Bun.udpSocket`. Requires Bun 1.4 or later: earlier versions throw `EAGAIN`
4
+ * from `send` instead of returning `false`, and never fire `drain`.
5
+ *
6
+ * `make` opens a new Bun socket for each reader acquisition, `fromUdpSocket`
7
+ * adopts a socket the caller creates, and `layer` provides the
8
+ * `DatagramSocket` service.
9
+ *
10
+ * The reader owns the native socket, so a send-only client must still acquire
11
+ * a reader, or its writes wait forever. Bun sends synchronously: a send error
12
+ * fails the write that caused it, and when the kernel buffer is full the write
13
+ * waits for `drain` and sends what is left.
14
+ *
15
+ * `writeAll` sends the batch with one `sendMany` call and fails with its first
16
+ * error. Which datagrams went out is unspecified, nothing is resent, and the
17
+ * error has no `address`, because Bun reports one error for the whole call.
18
+ *
19
+ * ICMP reports, such as a refused port, arrive after the write has completed,
20
+ * so they go to the `onError` option as a `DatagramSocketReadError` with no
21
+ * address.
22
+ *
23
+ * On macOS and Windows a poll error closes the socket without any event. The
24
+ * adapter notices on the next write, which fails with
25
+ * `DatagramSocketClosedError`, as do the reader and any write waiting for
26
+ * `drain`. Until then those waiting writes and `pull` keep waiting. The same
27
+ * applies when the caller closes a socket adopted with `fromUdpSocket`.
28
+ *
29
+ * **Example** (Echo server)
30
+ *
31
+ * ```ts
32
+ * import { BunDatagramSocket } from "@effect/platform-bun"
33
+ * import { Effect } from "effect"
34
+ *
35
+ * const echo = Effect.gen(function*() {
36
+ * const socket = yield* BunDatagramSocket.make({ bind: { port: 9000 } })
37
+ * const reader = yield* socket.reader
38
+ * const writer = yield* socket.writer
39
+ * while (true) {
40
+ * for (const received of yield* reader.pull) {
41
+ * yield* writer.write({ payload: received.payload, address: received })
42
+ * }
43
+ * }
44
+ * }).pipe(Effect.scoped)
45
+ * ```
46
+ *
47
+ * **Example** (Send-only client with a connected socket)
48
+ *
49
+ * ```ts
50
+ * import { BunDatagramSocket } from "@effect/platform-bun"
51
+ * import { Effect } from "effect"
52
+ *
53
+ * const send = (payload: string) =>
54
+ * Effect.gen(function*() {
55
+ * const socket = yield* BunDatagramSocket.make({
56
+ * connect: { address: "localhost", port: 9000 }
57
+ * })
58
+ * // Required even for send-only clients.
59
+ * yield* socket.reader
60
+ * const writer = yield* socket.writer
61
+ * yield* writer.write({ payload })
62
+ * }).pipe(Effect.scoped)
63
+ * ```
64
+ *
65
+ * **Example** (Adopting a socket)
66
+ *
67
+ * ```ts
68
+ * import { BunDatagramSocket } from "@effect/platform-bun"
69
+ * import { Effect } from "effect"
70
+ *
71
+ * const receive = Effect.gen(function*() {
72
+ * // `fromUdpSocket` replaces the socket's handlers with its own
73
+ * const socket = yield* BunDatagramSocket.fromUdpSocket(
74
+ * Effect.promise(() => Bun.udpSocket({ hostname: "127.0.0.1", port: 9000 }))
75
+ * )
76
+ * const reader = yield* socket.reader
77
+ * return yield* reader.pull
78
+ * }).pipe(Effect.scoped)
79
+ * ```
80
+ *
81
+ * @stability experimental
82
+ * @since 4.0.0
83
+ */
84
+ import * as Effect from "effect/Effect";
85
+ import * as Layer from "effect/Layer";
86
+ import * as NetAddress from "effect/net/NetAddress";
87
+ import type * as Scope from "effect/Scope";
88
+ import * as DatagramSocket from "effect/socket/DatagramSocket";
89
+ /**
90
+ * An open-time endpoint. Hostnames resolve once per reader acquisition via
91
+ * `node:dns.lookup`, avoiding Bun's synchronous `getaddrinfo`.
92
+ * An `InetAddress` can be passed directly.
93
+ *
94
+ * @stability experimental
95
+ * @category models
96
+ * @since 4.0.0
97
+ */
98
+ export interface Endpoint {
99
+ readonly address: string | NetAddress.IpAddress;
100
+ readonly port: number;
101
+ }
102
+ /**
103
+ * The local address and port to bind. Defaults to `0.0.0.0` (or `::` for
104
+ * `family: "ipv6"`) and an ephemeral port.
105
+ *
106
+ * @stability experimental
107
+ * @category models
108
+ * @since 4.0.0
109
+ */
110
+ export interface BindOptions {
111
+ readonly address?: string | NetAddress.IpAddress | undefined;
112
+ readonly port?: number | undefined;
113
+ }
114
+ /**
115
+ * Options for `fromUdpSocket`. The caller configures the adopted socket, so
116
+ * only the options that live in JavaScript apply.
117
+ *
118
+ * @stability experimental
119
+ * @category models
120
+ * @since 4.0.0
121
+ */
122
+ export interface AdoptOptions {
123
+ readonly peer?: Endpoint | undefined;
124
+ readonly receiveBuffer?: DatagramSocket.ReceiveBufferOptions | undefined;
125
+ readonly onError?: ((error: DatagramSocket.DatagramSocketError) => void) | undefined;
126
+ }
127
+ /**
128
+ * Options for `make` and `layer`.
129
+ *
130
+ * **Details**
131
+ *
132
+ * `peer` is a default destination and doesn't filter senders. `connect`
133
+ * connects the socket when Bun creates it, so the kernel filters senders. The
134
+ * two can't be combined.
135
+ *
136
+ * Family selection, in order: explicit `family`, a `bind` IP literal, the
137
+ * `peer` or `connect` address, a `bind` hostname, then `"ipv4"`. Hostname
138
+ * lookups use the family selected so far, or prefer IPv4 if none is set.
139
+ *
140
+ * `reuseAddress` means `SO_REUSEADDR` on Linux and `SO_REUSEPORT` on BSD and
141
+ * macOS.
142
+ *
143
+ * `multicast.interface` is the egress interface for datagrams sent to a group,
144
+ * which is a different socket option from the ingress `interface` of
145
+ * `Reader.joinMulticast`.
146
+ *
147
+ * @stability experimental
148
+ * @category models
149
+ * @since 4.0.0
150
+ */
151
+ export type Options = {
152
+ readonly bind?: BindOptions | undefined;
153
+ readonly family?: "ipv4" | "ipv6" | undefined;
154
+ readonly reuseAddress?: boolean | undefined;
155
+ readonly reusePort?: boolean | undefined;
156
+ readonly ipv6Only?: boolean | undefined;
157
+ readonly broadcast?: boolean | undefined;
158
+ readonly ttl?: number | undefined;
159
+ readonly multicast?: {
160
+ readonly interface?: NetAddress.MulticastInterface | undefined;
161
+ readonly loopback?: boolean | undefined;
162
+ readonly ttl?: number | undefined;
163
+ } | undefined;
164
+ readonly receiveBuffer?: DatagramSocket.ReceiveBufferOptions | undefined;
165
+ readonly onError?: ((error: DatagramSocket.DatagramSocketError) => void) | undefined;
166
+ } & ({
167
+ readonly peer?: Endpoint | undefined;
168
+ readonly connect?: undefined;
169
+ } | {
170
+ readonly connect: Endpoint;
171
+ readonly peer?: undefined;
172
+ });
173
+ /**
174
+ * A native Bun UDP socket, connected or not.
175
+ *
176
+ * @stability experimental
177
+ * @category models
178
+ * @since 4.0.0
179
+ */
180
+ export type UdpSocket = Bun.udp.Socket<"buffer"> | Bun.udp.ConnectedSocket<"buffer">;
181
+ /**
182
+ * Creates a `DatagramSocket` that opens and binds a new Bun UDP socket for
183
+ * each reader acquisition.
184
+ *
185
+ * **Details**
186
+ *
187
+ * Creating the socket never fails. Binding, applying options and resolving
188
+ * names happen on reader acquisition and fail it with a `DatagramSocketError`.
189
+ * Hostnames in `bind`, `peer` and `connect` are resolved once per acquisition;
190
+ * sends never wait for DNS.
191
+ *
192
+ * Invalid `receiveBuffer.capacity` values cause a defect; use a positive
193
+ * safe integer.
194
+ *
195
+ * @stability experimental
196
+ * @category constructors
197
+ * @since 4.0.0
198
+ */
199
+ export declare const make: (options?: Options) => Effect.Effect<DatagramSocket.DatagramSocket>;
200
+ /**
201
+ * Adopts a Bun UDP socket.
202
+ *
203
+ * **Details**
204
+ *
205
+ * `acquire` runs once per reader acquisition, inside the reader's scope, and
206
+ * the adapter closes the socket when that scope ends. Whether the socket is
207
+ * connected is checked once at open.
208
+ *
209
+ * The adapter installs its own `data`, `drain` and `error` handlers with
210
+ * `socket.reload`, which replaces the ones the caller passed to
211
+ * `Bun.udpSocket`. Packets that arrive before `acquire` completes still go to
212
+ * the caller's handlers.
213
+ *
214
+ * @stability experimental
215
+ * @category constructors
216
+ * @since 4.0.0
217
+ */
218
+ export declare const fromUdpSocket: <R>(acquire: Effect.Effect<UdpSocket, DatagramSocket.DatagramSocketError, R>, options?: AdoptOptions) => Effect.Effect<DatagramSocket.DatagramSocket, never, Exclude<R, Scope.Scope>>;
219
+ /**
220
+ * Provides a `DatagramSocket` built with `make`.
221
+ *
222
+ * @stability experimental
223
+ * @category layers
224
+ * @since 4.0.0
225
+ */
226
+ export declare const layer: (options?: Options) => Layer.Layer<DatagramSocket.DatagramSocket>;
227
+ //# sourceMappingURL=BunDatagramSocket.d.ts.map
@@ -0,0 +1,11 @@
1
+ import {
2
+ fromUdpSocket,
3
+ layer,
4
+ make
5
+ } from "../chunk-HYPKWCVW.js";
6
+ import "../chunk-MLKGABMK.js";
7
+ export {
8
+ fromUdpSocket,
9
+ layer,
10
+ make
11
+ };
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Bun implementation of Effect's `Dns` service.
3
+ *
4
+ * Address lookups use `Bun.dns.lookup` with the `system` backend, which calls
5
+ * the operating system resolver (`getaddrinfo`) and therefore also reads the
6
+ * hosts file. Bun's `node:dns` lookup uses c-ares instead, which bypasses the
7
+ * system's name service configuration. Record queries and reverse lookups use
8
+ * `NodeDns.resolver` without the UTF-8 correction of `NodeDns.make`,
9
+ * because Bun already decodes TXT and CAA character strings as UTF-8.
10
+ *
11
+ * **Gotchas**
12
+ *
13
+ * Bun returns each character string of a TXT record as a separate record, so
14
+ * a record made of several strings arrives as several TXT records whose chunks
15
+ * cannot be reassembled (https://github.com/oven-sh/bun/issues/44692).
16
+ *
17
+ * Bun's resolver cannot query TLSA records, so TLSA queries fail with
18
+ * `Unsupported`.
19
+ *
20
+ * @stability experimental
21
+ * @since 4.0.0
22
+ */
23
+ import * as NodeDns from "../node-shared/NodeDns.js";
24
+ import * as Config from "effect/Config";
25
+ import * as Effect from "effect/Effect";
26
+ import * as Layer from "effect/Layer";
27
+ import * as Dns from "effect/net/Dns";
28
+ import type * as NetAddress from "effect/net/NetAddress";
29
+ export type {
30
+ /**
31
+ * Options for the Bun `Dns` service: name servers, timeout, and tries for
32
+ * record queries and reverse lookups.
33
+ *
34
+ * @stability experimental
35
+ * @category re-exports
36
+ * @since 4.0.0
37
+ */
38
+ Options } from "../node-shared/NodeDns.js";
39
+ /**
40
+ * Creates a Bun `Dns` service whose resolver lives as long as the scope.
41
+ *
42
+ * @stability experimental
43
+ * @category constructors
44
+ * @since 4.0.0
45
+ */
46
+ export declare const make: (options?: NodeDns.Options | undefined) => Effect.Effect<{
47
+ lookup<F extends NetAddress.IpFamily>(host: import("effect/net/Host").DomainNameInput, options: {
48
+ readonly family: F;
49
+ }): Effect.Effect<import("effect/Array").NonEmptyReadonlyArray<NetAddress.FamilyAddress<F>>, Dns.DnsError>;
50
+ lookup(host: import("effect/net/Host").DomainNameInput, options?: Dns.LookupOptions): Effect.Effect<import("effect/Array").NonEmptyReadonlyArray<NetAddress.IpAddress>, Dns.DnsError>;
51
+ resolve<T extends Dns.RecordType>(name: import("effect/net/Host").DomainNameInput, type: T): Effect.Effect<import("effect/Array").NonEmptyReadonlyArray<Dns.RecordFor<T>>, Dns.DnsError>;
52
+ reverse(address: NetAddress.IpAddressInput): Effect.Effect<import("effect/Array").NonEmptyReadonlyArray<import("effect/net/Host").DomainName>, Dns.DnsError>;
53
+ }, NetAddress.NetAddressError, import("effect/Scope").Scope>;
54
+ /**
55
+ * Layer that provides the Bun `Dns` service using the system resolver
56
+ * configuration.
57
+ *
58
+ * @stability experimental
59
+ * @category layers
60
+ * @since 4.0.0
61
+ */
62
+ export declare const layer: Layer.Layer<Dns.Dns>;
63
+ /**
64
+ * Creates a layer that provides the Bun `Dns` service with options read
65
+ * from configuration.
66
+ *
67
+ * @stability experimental
68
+ * @category layers
69
+ * @since 4.0.0
70
+ */
71
+ export declare const layerConfig: (options: Config.Wrap<NodeDns.Options>) => Layer.Layer<Dns.Dns, Config.ConfigError | NetAddress.NetAddressError>;
72
+ //# sourceMappingURL=BunDns.d.ts.map
@@ -0,0 +1,12 @@
1
+ import {
2
+ layer,
3
+ layerConfig,
4
+ make
5
+ } from "../chunk-XAZH2ZEU.js";
6
+ import "../chunk-R2PFJKSP.js";
7
+ import "../chunk-MLKGABMK.js";
8
+ export {
9
+ layer,
10
+ layerConfig,
11
+ make
12
+ };
@@ -0,0 +1,11 @@
1
+ import type { FileSystem } from "effect/FileSystem";
2
+ import type * as Layer from "effect/Layer";
3
+ /**
4
+ * Layer that provides the `FileSystem` service for Bun using the shared Node file-system implementation.
5
+ *
6
+ * @stability unstable
7
+ * @category layers
8
+ * @since 4.0.0
9
+ */
10
+ export declare const layer: Layer.Layer<FileSystem, never, never>;
11
+ //# sourceMappingURL=BunFileSystem.d.ts.map
@@ -0,0 +1,9 @@
1
+ import {
2
+ layer
3
+ } from "../chunk-QR2ZOVOL.js";
4
+ import "../chunk-7JOAEKDV.js";
5
+ import "../chunk-3SUO3TTE.js";
6
+ import "../chunk-MLKGABMK.js";
7
+ export {
8
+ layer
9
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @stability unstable
3
+ * @since 4.0.0
4
+ */
5
+ /**
6
+ * @category re-exports
7
+ * @since 4.0.0
8
+ */
9
+ export * from "effect/http/FetchHttpClient";
10
+ //# sourceMappingURL=BunHttpClient.d.ts.map
@@ -0,0 +1 @@
1
+ import "../chunk-BTXZUHUI.js";
@@ -0,0 +1,11 @@
1
+ import * as Platform from "effect/http/HttpPlatform";
2
+ import * as Layer from "effect/Layer";
3
+ /**
4
+ * Layer that provides the Bun `HttpPlatform`, including file responses backed by `Bun.file`.
5
+ *
6
+ * @stability unstable
7
+ * @category layers
8
+ * @since 4.0.0
9
+ */
10
+ export declare const layer: Layer.Layer<Platform.HttpPlatform, never, never>;
11
+ //# sourceMappingURL=BunHttpPlatform.d.ts.map
@@ -0,0 +1,11 @@
1
+ import {
2
+ layer
3
+ } from "../chunk-VS6VBUH6.js";
4
+ import "../chunk-PBM2HJOX.js";
5
+ import "../chunk-QR2ZOVOL.js";
6
+ import "../chunk-7JOAEKDV.js";
7
+ import "../chunk-3SUO3TTE.js";
8
+ import "../chunk-MLKGABMK.js";
9
+ export {
10
+ layer
11
+ };