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

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-2ZAGBWTH.js +40 -0
  84. package/dist/vendor/chunk-3SL3HKQA.js +118 -0
  85. package/dist/vendor/chunk-3WUGYBFU.js +0 -0
  86. package/dist/vendor/chunk-4WIQ2XN7.js +28 -0
  87. package/dist/vendor/chunk-5ET7NHI7.js +15 -0
  88. package/dist/vendor/chunk-6FSJ2PMW.js +53 -0
  89. package/dist/vendor/chunk-6L2NJEOV.js +62 -0
  90. package/dist/vendor/chunk-72X6VEVD.js +62 -0
  91. package/dist/vendor/chunk-7NMJM44J.js +26 -0
  92. package/dist/vendor/chunk-A7AY2JP7.js +71 -0
  93. package/dist/vendor/chunk-A7UXCEJA.js +81 -0
  94. package/dist/vendor/chunk-ADP5LRUF.js +274 -0
  95. package/dist/vendor/chunk-ASGOJ3XA.js +0 -0
  96. package/dist/vendor/chunk-AWNTTSHL.js +34 -0
  97. package/dist/vendor/chunk-BUKVIAEM.js +20 -0
  98. package/dist/vendor/chunk-BY3SDXID.js +501 -0
  99. package/dist/vendor/chunk-C3PGUWW5.js +414 -0
  100. package/dist/vendor/chunk-CL4EIDIY.js +7 -0
  101. package/dist/vendor/chunk-D2ZL4PLZ.js +93 -0
  102. package/dist/vendor/chunk-D4HEMNGU.js +22 -0
  103. package/dist/vendor/chunk-F4V5TRY7.js +85 -0
  104. package/dist/vendor/chunk-F772LLZ5.js +31 -0
  105. package/dist/vendor/chunk-FFD6R5JZ.js +104 -0
  106. package/dist/vendor/chunk-G4HOH7GK.js +65 -0
  107. package/dist/vendor/chunk-GJN7MEBF.js +18 -0
  108. package/dist/vendor/chunk-HDV6VIRM.js +48 -0
  109. package/dist/vendor/chunk-IHV7Z4SW.js +34 -0
  110. package/dist/vendor/chunk-IWSDM4CG.js +16 -0
  111. package/dist/vendor/chunk-JOQDB2HC.js +26 -0
  112. package/dist/vendor/chunk-KABHKTVG.js +18 -0
  113. package/dist/vendor/chunk-KFDBU6RR.js +60 -0
  114. package/dist/vendor/chunk-KHPN5DWT.js +20 -0
  115. package/dist/vendor/chunk-LNWGIDIG.js +20 -0
  116. package/dist/vendor/chunk-MLKGABMK.js +9 -0
  117. package/dist/vendor/chunk-MUEED3C3.js +144 -0
  118. package/dist/vendor/chunk-N6TK35N5.js +18 -0
  119. package/dist/vendor/chunk-NQO6V4KI.js +580 -0
  120. package/dist/vendor/chunk-NUJQMLJP.js +325 -0
  121. package/dist/vendor/chunk-OF3N2FN4.js +61 -0
  122. package/dist/vendor/chunk-OGZJACUS.js +57 -0
  123. package/dist/vendor/chunk-PCEVZYXO.js +63 -0
  124. package/dist/vendor/chunk-PECOFLCU.js +85 -0
  125. package/dist/vendor/chunk-PU7QVYND.js +18 -0
  126. package/dist/vendor/chunk-QGPZPULA.js +51 -0
  127. package/dist/vendor/chunk-QHR2RC5M.js +109 -0
  128. package/dist/vendor/chunk-R2YON4A6.js +28 -0
  129. package/dist/vendor/chunk-R327POEZ.js +18 -0
  130. package/dist/vendor/chunk-REFJNBQR.js +18 -0
  131. package/dist/vendor/chunk-RHJ6LV32.js +43 -0
  132. package/dist/vendor/chunk-RKVXYKHJ.js +29 -0
  133. package/dist/vendor/chunk-RP3EWS4C.js +0 -0
  134. package/dist/vendor/chunk-RQH5DSBA.js +249 -0
  135. package/dist/vendor/chunk-RQQ5TSCD.js +374 -0
  136. package/dist/vendor/chunk-S6QUQLBV.js +229 -0
  137. package/dist/vendor/chunk-SCXQLSNW.js +34 -0
  138. package/dist/vendor/chunk-SD4X5NGU.js +515 -0
  139. package/dist/vendor/chunk-T332WJRS.js +128 -0
  140. package/dist/vendor/chunk-T5FQGISI.js +18 -0
  141. package/dist/vendor/chunk-TBPDCAMH.js +70 -0
  142. package/dist/vendor/chunk-UFWLKG4I.js +16 -0
  143. package/dist/vendor/chunk-UPIQ52FQ.js +426 -0
  144. package/dist/vendor/chunk-UUQXJRMK.js +14 -0
  145. package/dist/vendor/chunk-UUYTTEDH.js +36 -0
  146. package/dist/vendor/chunk-V2EB7FHY.js +129 -0
  147. package/dist/vendor/chunk-VIWU4EBF.js +18 -0
  148. package/dist/vendor/chunk-WPZDL2D7.js +21 -0
  149. package/dist/vendor/chunk-X4YPHWAE.js +22 -0
  150. package/dist/vendor/chunk-XACFQJY7.js +93 -0
  151. package/dist/vendor/chunk-Y7V6ISZS.js +418 -0
  152. package/dist/vendor/chunk-YDY5P7GL.js +20 -0
  153. package/dist/vendor/chunk-ZNKZXDUD.js +18 -0
  154. package/dist/vendor/chunk-ZS3VW5QR.js +63 -0
  155. package/dist/vendor/chunk-ZUUCLHBP.js +18 -0
  156. package/dist/vendor/chunk-ZVJCBTJG.js +131 -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 +198 -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 +198 -0
  330. package/dist/vendor/node/NodeHttpClient.js +46 -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,38 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as EtagImpl from "effect/http/Etag";
3
+ import * as HttpBody from "effect/http/HttpBody";
4
+ import * as Platform from "effect/http/HttpPlatform";
5
+ import * as ServerResponse from "effect/http/HttpServerResponse";
6
+ import * as Layer from "effect/Layer";
7
+ /**
8
+ * Creates the Node `HttpPlatform`, serving file responses from Node readable
9
+ * streams and adding MIME type and content-length headers when needed.
10
+ *
11
+ * @stability unstable
12
+ * @category constructors
13
+ * @since 4.0.0
14
+ */
15
+ export declare const make: Effect.Effect<{
16
+ readonly platform: "deno" | "node" | "bun" | "web";
17
+ readonly compression: Platform.Compression;
18
+ readonly fileResponse: (path: string, options?: ServerResponse.Options.WithContentType & {
19
+ readonly bytesToRead?: import("effect/ByteSize").Input | undefined;
20
+ readonly chunkSize?: number | undefined;
21
+ readonly offset?: import("effect/ByteSize").Input | undefined;
22
+ }) => Effect.Effect<ServerResponse.HttpServerResponse, import("effect/PlatformError").PlatformError>;
23
+ readonly fileWebResponse: (file: HttpBody.HttpBody.FileLike, options?: ServerResponse.Options.WithContentType & {
24
+ readonly bytesToRead?: number | undefined;
25
+ readonly chunkSize?: number | undefined;
26
+ readonly offset?: number | undefined;
27
+ }) => Effect.Effect<ServerResponse.HttpServerResponse>;
28
+ }, never, import("effect/FileSystem").FileSystem | EtagImpl.Generator>;
29
+ /**
30
+ * Provides the Node `HttpPlatform` together with the filesystem and ETag
31
+ * services it needs for file responses.
32
+ *
33
+ * @stability unstable
34
+ * @category layers
35
+ * @since 4.0.0
36
+ */
37
+ export declare const layer: Layer.Layer<Platform.HttpPlatform>;
38
+ //# sourceMappingURL=NodeHttpPlatform.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../node/NodeHttpPlatform.js")
@@ -0,0 +1,131 @@
1
+ import * as Config from "effect/Config";
2
+ import * as Duration from "effect/Duration";
3
+ import * as Effect from "effect/Effect";
4
+ import type * as FileSystem from "effect/FileSystem";
5
+ import { type LazyArg } from "effect/Function";
6
+ import * as Etag from "effect/http/Etag";
7
+ import type { HttpClient } from "effect/http/HttpClient";
8
+ import type * as Middleware from "effect/http/HttpMiddleware";
9
+ import type * as HttpPlatform from "effect/http/HttpPlatform";
10
+ import * as HttpServer from "effect/http/HttpServer";
11
+ import { ServeError } from "effect/http/HttpServerError";
12
+ import { HttpServerRequest } from "effect/http/HttpServerRequest";
13
+ import type { HttpServerResponse } from "effect/http/HttpServerResponse";
14
+ import * as Layer from "effect/Layer";
15
+ import * as NetAddress from "effect/net/NetAddress";
16
+ import type * as Path from "effect/Path";
17
+ import * as Scope from "effect/Scope";
18
+ import * as Http from "node:http";
19
+ import type * as Net from "node:net";
20
+ import type { Duplex } from "node:stream";
21
+ import * as NodeServices from "./NodeServices.ts";
22
+ import { NodeWS } from "./NodeSocket.ts";
23
+ /**
24
+ * Options accepted by the Node `HttpServer` constructors and layers.
25
+ *
26
+ * @stability unstable
27
+ * @category options
28
+ * @since 4.0.0
29
+ */
30
+ export interface Options extends Net.ListenOptions {
31
+ readonly disablePreemptiveShutdown?: boolean | undefined;
32
+ readonly gracefulShutdownTimeout?: Duration.Input | undefined;
33
+ /**
34
+ * Options forwarded to the underlying `ws` `WebSocketServer`, minus the
35
+ * wiring options the server manages itself. Use this to enable
36
+ * `permessage-deflate` compression or tune payload limits, e.g.
37
+ * `websocket: { perMessageDeflate: true }`.
38
+ *
39
+ * @stability unstable
40
+ */
41
+ readonly websocket?: Omit<NodeWS.ServerOptions, "noServer" | "server" | "host" | "port" | "path"> | undefined;
42
+ }
43
+ /**
44
+ * Creates a scoped `HttpServer` from a Node `http.Server`, starts listening
45
+ * with the supplied options, registers request and upgrade handling, and closes
46
+ * the server during scope finalization with optional graceful-shutdown control.
47
+ *
48
+ * @stability unstable
49
+ * @category constructors
50
+ * @since 4.0.0
51
+ */
52
+ export declare const make: (evaluate: LazyArg<Http.Server<typeof Http.IncomingMessage, typeof Http.ServerResponse>>, options: Options) => Effect.Effect<{
53
+ readonly serve: {
54
+ <E, R>(effect: Effect.Effect<HttpServerResponse, E, R>): Effect.Effect<void, never, Exclude<R, HttpServerRequest> | Scope.Scope>;
55
+ <E, R, App extends Effect.Effect<HttpServerResponse, any, any>>(effect: Effect.Effect<HttpServerResponse, E, R>, middleware: Middleware.HttpMiddleware.Applied<App, E, R>): Effect.Effect<void, never, Exclude<Effect.Services<App>, HttpServerRequest> | Scope.Scope>;
56
+ };
57
+ readonly address: NetAddress.SocketAddress;
58
+ }, ServeError, Scope.Scope>;
59
+ /**
60
+ * Creates a Node `request` event handler for an Effect HTTP application,
61
+ * injecting a `HttpServerRequest` and interrupting the request fiber if the
62
+ * client closes the response before it finishes.
63
+ *
64
+ * @stability unstable
65
+ * @category handlers
66
+ * @since 4.0.0
67
+ */
68
+ export declare const makeHandler: <R, E, App extends Effect.Effect<HttpServerResponse, any, any> = Effect.Effect<HttpServerResponse, E, R>>(httpEffect: Effect.Effect<HttpServerResponse, E, R>, options: {
69
+ readonly scope: Scope.Scope;
70
+ readonly middleware?: Middleware.HttpMiddleware.Applied<App, E, R> | undefined;
71
+ }) => Effect.Effect<(nodeRequest: Http.IncomingMessage, nodeResponse: Http.ServerResponse) => void, never, Exclude<Effect.Services<App>, HttpServerRequest | Scope.Scope>>;
72
+ /**
73
+ * Creates a Node `upgrade` event handler for an Effect HTTP application,
74
+ * exposing the upgraded WebSocket as the request's `upgrade` effect and
75
+ * interrupting the request fiber when the socket closes early.
76
+ *
77
+ * @stability unstable
78
+ * @category handlers
79
+ * @since 4.0.0
80
+ */
81
+ export declare const makeUpgradeHandler: <R, E, App extends Effect.Effect<HttpServerResponse, any, any> = Effect.Effect<HttpServerResponse, E, R>>(lazyWss: Effect.Effect<NodeWS.WebSocketServer>, httpEffect: Effect.Effect<HttpServerResponse, E, R>, options: {
82
+ readonly scope: Scope.Scope;
83
+ readonly middleware?: Middleware.HttpMiddleware.Applied<App, E, R> | undefined;
84
+ }) => Effect.Effect<(nodeRequest: Http.IncomingMessage, socket: Duplex, head: Buffer) => void, never, Exclude<Effect.Services<App>, HttpServerRequest | Scope.Scope>>;
85
+ /**
86
+ * Provides an `HttpServer` by creating and managing a scoped Node
87
+ * `http.Server` with the supplied listen and shutdown options.
88
+ *
89
+ * @stability unstable
90
+ * @category layers
91
+ * @since 4.0.0
92
+ */
93
+ export declare const layerServer: (evaluate: LazyArg<Http.Server<typeof Http.IncomingMessage, typeof Http.ServerResponse>>, options: Options) => Layer.Layer<HttpServer.HttpServer, ServeError>;
94
+ /**
95
+ * Provides the Node HTTP support services used by `NodeHttpServer`, including
96
+ * the HTTP platform, ETag generator, and core Node platform services.
97
+ *
98
+ * @stability unstable
99
+ * @category layers
100
+ * @since 4.0.0
101
+ */
102
+ export declare const layerHttpServices: Layer.Layer<NodeServices.NodeServices | HttpPlatform.HttpPlatform | Etag.Generator>;
103
+ /**
104
+ * Provides a Node `HttpServer` together with the Node HTTP platform, ETag, and
105
+ * core platform services required to serve requests.
106
+ *
107
+ * @stability unstable
108
+ * @category layers
109
+ * @since 4.0.0
110
+ */
111
+ export declare const layer: (evaluate: LazyArg<Http.Server>, options: Options) => Layer.Layer<HttpServer.HttpServer | NodeServices.NodeServices | HttpPlatform.HttpPlatform | Etag.Generator, ServeError>;
112
+ /**
113
+ * Provides a Node `HttpServer` together with the Node HTTP platform, ETag,
114
+ * and core Node platform services, reading the listen and shutdown options from
115
+ * a `Config` value.
116
+ *
117
+ * @stability unstable
118
+ * @category layers
119
+ * @since 4.0.0
120
+ */
121
+ export declare const layerConfig: (evaluate: LazyArg<Http.Server>, options: Config.Wrap<Options>) => Layer.Layer<HttpServer.HttpServer | NodeServices.NodeServices | HttpPlatform.HttpPlatform | Etag.Generator, ServeError | Config.ConfigError>;
122
+ /**
123
+ * Provides a test HTTP server listening on an ephemeral port together with a
124
+ * Fetch-backed `HttpClient` configured for server integration tests.
125
+ *
126
+ * @stability unstable
127
+ * @category testing
128
+ * @since 4.0.0
129
+ */
130
+ export declare const layerTest: Layer.Layer<HttpServer.HttpServer | FileSystem.FileSystem | Path.Path | HttpPlatform.HttpPlatform | Etag.Generator | HttpClient, ServeError, never>;
131
+ //# sourceMappingURL=NodeHttpServer.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../node/NodeHttpServer.js")
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Accessors for the Node.js objects behind an Effect HTTP server request.
3
+ *
4
+ * `toIncomingMessage` returns the underlying Node `http.IncomingMessage`.
5
+ * `toServerResponse` returns the underlying Node `http.ServerResponse`,
6
+ * evaluating the stored response thunk when the response was created lazily.
7
+ *
8
+ * @stability unstable
9
+ * @since 4.0.0
10
+ */
11
+ import type { HttpServerRequest } from "effect/http/HttpServerRequest";
12
+ import type * as Http from "node:http";
13
+ /**
14
+ * Returns the underlying Node `IncomingMessage` for a platform Node
15
+ * `HttpServerRequest`.
16
+ *
17
+ * @stability unstable
18
+ * @category accessors
19
+ * @since 4.0.0
20
+ */
21
+ export declare const toIncomingMessage: (self: HttpServerRequest) => Http.IncomingMessage;
22
+ /**
23
+ * Returns the underlying Node `ServerResponse` for a platform Node
24
+ * `HttpServerRequest`, evaluating the stored response thunk when the response
25
+ * was created lazily.
26
+ *
27
+ * @stability unstable
28
+ * @category accessors
29
+ * @since 4.0.0
30
+ */
31
+ export declare const toServerResponse: (self: HttpServerRequest) => Http.ServerResponse;
32
+ //# sourceMappingURL=NodeHttpServerRequest.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../node/NodeHttpServerRequest.js")
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Node.js multipart parsing for HTTP `multipart/form-data` request bodies.
3
+ *
4
+ * `NodeMultipart` adapts a Node `Readable` plus incoming HTTP headers into
5
+ * Effect's shared multipart model. It can expose form parts as a stream or
6
+ * collect a complete persisted form by writing file uploads to scoped temporary
7
+ * files through the current `FileSystem` and `Path` services. `fileToReadable`
8
+ * returns the underlying Node readable stream for file parts produced by this
9
+ * parser.
10
+ *
11
+ * @stability unstable
12
+ * @since 4.0.0
13
+ */
14
+ import * as Effect from "effect/Effect";
15
+ import type * as FileSystem from "effect/FileSystem";
16
+ import * as Multipart from "effect/http/Multipart";
17
+ import type * as Path from "effect/Path";
18
+ import type * as Scope from "effect/Scope";
19
+ import * as Stream from "effect/Stream";
20
+ import type { IncomingHttpHeaders } from "node:http";
21
+ import type { Readable } from "node:stream";
22
+ /**
23
+ * Parses multipart data from a Node readable request body and headers into a
24
+ * stream of `Multipart.Part` values, converting parser failures to
25
+ * `MultipartError`.
26
+ *
27
+ * @stability unstable
28
+ * @category constructors
29
+ * @since 4.0.0
30
+ */
31
+ export declare const stream: (source: Readable, headers: IncomingHttpHeaders) => Stream.Stream<Multipart.Part, Multipart.MultipartError>;
32
+ /**
33
+ * Parses multipart data from a Node readable request body and persists file
34
+ * parts using the current `FileSystem`, `Path`, and `Scope` services.
35
+ *
36
+ * @stability unstable
37
+ * @category constructors
38
+ * @since 4.0.0
39
+ */
40
+ export declare const persisted: (source: Readable, headers: IncomingHttpHeaders) => Effect.Effect<Multipart.Persisted, Multipart.MultipartError, Scope.Scope | FileSystem.FileSystem | Path.Path>;
41
+ /**
42
+ * Returns the underlying Node readable stream for a multipart file produced by
43
+ * the Node multipart parser.
44
+ *
45
+ * @stability unstable
46
+ * @category converting
47
+ * @since 4.0.0
48
+ */
49
+ export declare const fileToReadable: (file: Multipart.File) => Readable;
50
+ //# sourceMappingURL=NodeMultipart.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../node/NodeMultipart.js")
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Node.js streams adapter for the low-level multipart parser.
3
+ *
4
+ * @stability unstable
5
+ * @since 4.0.0
6
+ */
7
+ import type { BaseConfig, MultipartError, PartInfo } from "effect/http/MultipartParser";
8
+ import type { IncomingHttpHeaders } from "node:http";
9
+ import { Duplex, Readable } from "node:stream";
10
+ /**
11
+ * A part emitted by the Node.js multipart parser.
12
+ *
13
+ * @stability unstable
14
+ * @category models
15
+ * @since 4.0.0
16
+ */
17
+ export type Part = Field | FileStream;
18
+ /**
19
+ * A parsed multipart field.
20
+ *
21
+ * @stability unstable
22
+ * @category models
23
+ * @since 4.0.0
24
+ */
25
+ export interface Field {
26
+ readonly _tag: "Field";
27
+ readonly info: PartInfo;
28
+ readonly value: Uint8Array;
29
+ }
30
+ /**
31
+ * A Node.js duplex stream that emits parsed multipart parts.
32
+ *
33
+ * @stability unstable
34
+ * @category models
35
+ * @since 4.0.0
36
+ */
37
+ export interface MultipartStream extends Duplex {
38
+ [Symbol.asyncIterator](): NodeJS.AsyncIterator<Part>;
39
+ on(event: "field", listener: (field: Field) => void): this;
40
+ on(event: "file", listener: (file: FileStream) => void): this;
41
+ on(event: "close", listener: () => void): this;
42
+ on(event: "data", listener: (part: Part) => void): this;
43
+ on(event: "drain", listener: () => void): this;
44
+ on(event: "end", listener: () => void): this;
45
+ on(event: "error", listener: (err: MultipartError) => void): this;
46
+ on(event: "finish", listener: () => void): this;
47
+ on(event: "pause", listener: () => void): this;
48
+ on(event: "pipe", listener: (src: Readable) => void): this;
49
+ on(event: "readable", listener: () => void): this;
50
+ on(event: "resume", listener: () => void): this;
51
+ on(event: "unpipe", listener: (src: Readable) => void): this;
52
+ on(event: string | symbol, listener: (...args: Array<any>) => void): this;
53
+ read(size?: number): Part | null;
54
+ }
55
+ /**
56
+ * Configuration for the Node.js multipart parser.
57
+ *
58
+ * @stability unstable
59
+ * @category models
60
+ * @since 4.0.0
61
+ */
62
+ export type NodeConfig = Omit<BaseConfig, "headers"> & {
63
+ readonly headers: IncomingHttpHeaders;
64
+ };
65
+ /**
66
+ * A Node.js duplex stream that parses multipart input.
67
+ *
68
+ * @stability unstable
69
+ * @category models
70
+ * @since 4.0.0
71
+ */
72
+ export declare class MultipartStream extends Duplex {
73
+ private _parser;
74
+ _canWrite: boolean;
75
+ private _writeCallback;
76
+ constructor(config: NodeConfig);
77
+ _resume(): void;
78
+ _read(_size: number): void;
79
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null | undefined) => void): void;
80
+ _final(callback: (error?: Error | null | undefined) => void): void;
81
+ }
82
+ /**
83
+ * Creates a Node.js multipart parser stream.
84
+ *
85
+ * @stability unstable
86
+ * @category constructors
87
+ * @since 4.0.0
88
+ */
89
+ export declare const make: (config: NodeConfig) => MultipartStream;
90
+ /**
91
+ * A readable stream containing a parsed multipart file.
92
+ *
93
+ * @stability unstable
94
+ * @category models
95
+ * @since 4.0.0
96
+ */
97
+ export declare class FileStream extends Readable {
98
+ readonly _tag = "File";
99
+ readonly filename: string | undefined;
100
+ readonly info: PartInfo;
101
+ private _parent;
102
+ constructor(info: PartInfo, parent: MultipartStream);
103
+ _read(_size: number): void;
104
+ }
105
+ //# sourceMappingURL=NodeMultipartParser.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../node/NodeMultipartParser.js")
@@ -0,0 +1,30 @@
1
+ import type * as Layer from "effect/Layer";
2
+ import type { Path } from "effect/Path";
3
+ /**
4
+ * Provides the default Node `Path` service using the platform's `node:path`
5
+ * implementation.
6
+ *
7
+ * @stability unstable
8
+ * @category layers
9
+ * @since 4.0.0
10
+ */
11
+ export declare const layer: Layer.Layer<Path>;
12
+ /**
13
+ * Provides the `Path` service using Node's POSIX path implementation,
14
+ * regardless of the host platform.
15
+ *
16
+ * @stability unstable
17
+ * @category layers
18
+ * @since 4.0.0
19
+ */
20
+ export declare const layerPosix: Layer.Layer<Path>;
21
+ /**
22
+ * Provides the `Path` service using Node's Windows path implementation,
23
+ * regardless of the host platform.
24
+ *
25
+ * @stability unstable
26
+ * @category layers
27
+ * @since 4.0.0
28
+ */
29
+ export declare const layerWin32: Layer.Layer<Path>;
30
+ //# sourceMappingURL=NodePath.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../node/NodePath.js")
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Node.js Redis integration backed by `redis` (node-redis).
3
+ *
4
+ * This module creates a scoped `node-redis` client and exposes it in two forms:
5
+ * the generic `Redis` service and the {@link NodeRedis} service for direct
6
+ * access to the underlying client. `layer` accepts node-redis client options
7
+ * directly, while `layerConfig` reads them from Effect config. `node-redis`
8
+ * connects explicitly, so layer construction can fail with a `RedisError`.
9
+ * Both layers close the client when the layer scope ends.
10
+ *
11
+ * @stability unstable
12
+ * @since 4.0.0
13
+ */
14
+ import * as Config from "effect/Config";
15
+ import * as Context from "effect/Context";
16
+ import * as Effect from "effect/Effect";
17
+ import * as Layer from "effect/Layer";
18
+ import * as Redis from "effect/persistence/Redis";
19
+ import { createClient } from "redis";
20
+ type NodeRedisClient = ReturnType<typeof createClient>;
21
+ type NodeRedisClientOptions = NonNullable<Parameters<typeof createClient>[0]>;
22
+ declare const NodeRedis_base: Context.ServiceClass<NodeRedis, "@effect/platform-node/NodeRedis", {
23
+ readonly client: NodeRedisClient;
24
+ readonly use: <A>(f: (client: NodeRedisClient) => Promise<A>) => Effect.Effect<A, Redis.RedisError>;
25
+ }>;
26
+ /**
27
+ * Service tag for the Node Redis integration, exposing the underlying
28
+ * `node-redis` client and a `use` helper that maps client failures to
29
+ * `RedisError`.
30
+ *
31
+ * @stability unstable
32
+ * @category services
33
+ * @since 4.0.0
34
+ */
35
+ export declare class NodeRedis extends NodeRedis_base {
36
+ }
37
+ /**
38
+ * Provides `Redis` and `NodeRedis` services backed by a `node-redis` client
39
+ * created with the supplied options, connected when the layer is built and
40
+ * closed when the layer scope ends.
41
+ *
42
+ * **Details**
43
+ *
44
+ * By default, the initial connection fails on its first connection error. A
45
+ * caller-supplied `socket.reconnectStrategy` is used instead when present. Once
46
+ * the client has emitted `ready`, the default reconnect strategy uses
47
+ * node-redis' exponential backoff and stops on socket timeouts.
48
+ *
49
+ * Scope finalization calls `close()`, which waits for in-flight commands,
50
+ * including blocking commands, and can therefore delay scope closure.
51
+ *
52
+ * @stability unstable
53
+ * @category layers
54
+ * @since 4.0.0
55
+ */
56
+ export declare const layer: (options?: NodeRedisClientOptions | undefined) => Layer.Layer<Redis.Redis | NodeRedis, Redis.RedisError>;
57
+ /**
58
+ * Provides `Redis` and `NodeRedis` services from `Config`-backed node-redis
59
+ * client options, connecting the client when the layer is built and closing it
60
+ * when the layer scope ends.
61
+ *
62
+ * **Details**
63
+ *
64
+ * By default, the initial connection fails on its first connection error. A
65
+ * caller-supplied `socket.reconnectStrategy` is used instead when present. Once
66
+ * the client has emitted `ready`, the default reconnect strategy uses
67
+ * node-redis' exponential backoff and stops on socket timeouts.
68
+ *
69
+ * Scope finalization calls `close()`, which waits for in-flight commands,
70
+ * including blocking commands, and can therefore delay scope closure.
71
+ *
72
+ * @stability unstable
73
+ * @category layers
74
+ * @since 4.0.0
75
+ */
76
+ export declare const layerConfig: (options: Config.Wrap<NodeRedisClientOptions>) => Layer.Layer<Redis.Redis | NodeRedis, Redis.RedisError | Config.ConfigError>;
77
+ export {};
78
+ //# sourceMappingURL=NodeRedis.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../node/NodeRedis.js")
@@ -0,0 +1,88 @@
1
+ import type { Effect } from "effect/Effect";
2
+ import type * as Runtime from "effect/Runtime";
3
+ /**
4
+ * Helps you run a main effect with built-in error handling, logging, and signal management.
5
+ *
6
+ * **When to use**
7
+ *
8
+ * Use to run a Node.js application's main Effect with structured error
9
+ * handling, log management, interrupt support, or advanced teardown
10
+ * capabilities.
11
+ *
12
+ * **Details**
13
+ *
14
+ * This function launches an Effect as the main entry point, setting exit codes
15
+ * based on success or failure, handling interrupts (e.g., Ctrl+C), and optionally
16
+ * logging errors. By default, it logs errors and uses a "pretty" format, but both
17
+ * behaviors can be turned off. You can also provide custom teardown logic to
18
+ * finalize resources or produce different exit codes.
19
+ *
20
+ * The optional configuration object can include:
21
+ * - `disableErrorReporting`: Turn off automatic error logging.
22
+ * - `teardown`: Provide custom finalization logic.
23
+ *
24
+ * @stability unstable
25
+ * @category running
26
+ * @since 4.0.0
27
+ */
28
+ export declare const runMain: {
29
+ /**
30
+ * Helps you run a main effect with built-in error handling, logging, and signal management.
31
+ *
32
+ * **When to use**
33
+ *
34
+ * Use to run a Node.js application's main Effect with structured error
35
+ * handling, log management, interrupt support, or advanced teardown
36
+ * capabilities.
37
+ *
38
+ * **Details**
39
+ *
40
+ * This function launches an Effect as the main entry point, setting exit codes
41
+ * based on success or failure, handling interrupts (e.g., Ctrl+C), and optionally
42
+ * logging errors. By default, it logs errors and uses a "pretty" format, but both
43
+ * behaviors can be turned off. You can also provide custom teardown logic to
44
+ * finalize resources or produce different exit codes.
45
+ *
46
+ * The optional configuration object can include:
47
+ * - `disableErrorReporting`: Turn off automatic error logging.
48
+ * - `teardown`: Provide custom finalization logic.
49
+ *
50
+ * @stability unstable
51
+ * @category running
52
+ * @since 4.0.0
53
+ */
54
+ (options?: {
55
+ readonly disableErrorReporting?: boolean | undefined;
56
+ readonly teardown?: Runtime.Teardown | undefined;
57
+ }): <E, A>(effect: Effect<A, E>) => void;
58
+ /**
59
+ * Helps you run a main effect with built-in error handling, logging, and signal management.
60
+ *
61
+ * **When to use**
62
+ *
63
+ * Use to run a Node.js application's main Effect with structured error
64
+ * handling, log management, interrupt support, or advanced teardown
65
+ * capabilities.
66
+ *
67
+ * **Details**
68
+ *
69
+ * This function launches an Effect as the main entry point, setting exit codes
70
+ * based on success or failure, handling interrupts (e.g., Ctrl+C), and optionally
71
+ * logging errors. By default, it logs errors and uses a "pretty" format, but both
72
+ * behaviors can be turned off. You can also provide custom teardown logic to
73
+ * finalize resources or produce different exit codes.
74
+ *
75
+ * The optional configuration object can include:
76
+ * - `disableErrorReporting`: Turn off automatic error logging.
77
+ * - `teardown`: Provide custom finalization logic.
78
+ *
79
+ * @stability unstable
80
+ * @category running
81
+ * @since 4.0.0
82
+ */
83
+ <E, A>(effect: Effect<A, E>, options?: {
84
+ readonly disableErrorReporting?: boolean | undefined;
85
+ readonly teardown?: Runtime.Teardown | undefined;
86
+ }): void;
87
+ };
88
+ //# sourceMappingURL=NodeRuntime.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../node/NodeRuntime.js")
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Aggregate Node.js platform services layer.
3
+ *
4
+ * This module defines the `NodeServices` union and a single `layer` that
5
+ * provides Node-backed child process spawning, crypto, filesystem, path, stdio,
6
+ * and terminal services. Use the layer when a Node program wants the standard
7
+ * platform services from one place.
8
+ *
9
+ * @stability unstable
10
+ * @since 4.0.0
11
+ */
12
+ import type { Crypto } from "effect/Crypto";
13
+ import type { FileSystem } from "effect/FileSystem";
14
+ import * as Layer from "effect/Layer";
15
+ import type { Path } from "effect/Path";
16
+ import type { ChildProcessSpawner } from "effect/process/ChildProcessSpawner";
17
+ import type { Stdio } from "effect/Stdio";
18
+ import type { Terminal } from "effect/Terminal";
19
+ /**
20
+ * The union of core services provided by the Node platform layer, including
21
+ * child process spawning, filesystem, path, stdio, and terminal services.
22
+ *
23
+ * @stability unstable
24
+ * @category models
25
+ * @since 4.0.0
26
+ */
27
+ export type NodeServices = ChildProcessSpawner | Crypto | FileSystem | Path | Stdio | Terminal;
28
+ /**
29
+ * Provides the default Node implementations for child process spawning,
30
+ * filesystem, path, stdio, and terminal services.
31
+ *
32
+ * @stability unstable
33
+ * @category layers
34
+ * @since 4.0.0
35
+ */
36
+ export declare const layer: Layer.Layer<NodeServices>;
37
+ //# sourceMappingURL=NodeServices.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../node/NodeServices.js")
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @stability unstable
3
+ * @since 4.0.0
4
+ */
5
+ /**
6
+ * @since 4.0.0
7
+ */
8
+ export * from "../node-shared/NodeSink.js";
9
+ //# sourceMappingURL=NodeSink.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../node/NodeSink.js")