@effect/platform-bun 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/BunContext/dist/effect-platform-bun-BunContext.cjs.d.mts +2 -0
  2. package/BunContext/dist/effect-platform-bun-BunContext.cjs.d.mts.map +1 -0
  3. package/BunContext/dist/effect-platform-bun-BunContext.cjs.d.ts +2 -0
  4. package/BunContext/dist/effect-platform-bun-BunContext.cjs.d.ts.map +1 -0
  5. package/BunContext/dist/effect-platform-bun-BunContext.cjs.dev.js +14 -0
  6. package/BunContext/dist/effect-platform-bun-BunContext.cjs.js +7 -0
  7. package/BunContext/dist/effect-platform-bun-BunContext.cjs.mjs +3 -0
  8. package/BunContext/dist/effect-platform-bun-BunContext.cjs.prod.js +14 -0
  9. package/BunContext/dist/effect-platform-bun-BunContext.esm.js +22 -0
  10. package/BunContext/package.json +4 -0
  11. package/Command/dist/effect-platform-bun-Command.cjs.d.mts +2 -0
  12. package/Command/dist/effect-platform-bun-Command.cjs.d.mts.map +1 -0
  13. package/Command/dist/effect-platform-bun-Command.cjs.d.ts +2 -0
  14. package/Command/dist/effect-platform-bun-Command.cjs.d.ts.map +1 -0
  15. package/Command/dist/effect-platform-bun-Command.cjs.dev.js +72 -0
  16. package/Command/dist/effect-platform-bun-Command.cjs.js +7 -0
  17. package/Command/dist/effect-platform-bun-Command.cjs.mjs +18 -0
  18. package/Command/dist/effect-platform-bun-Command.cjs.prod.js +72 -0
  19. package/Command/dist/effect-platform-bun-Command.esm.js +5 -0
  20. package/Command/package.json +4 -0
  21. package/CommandExecutor/dist/effect-platform-bun-CommandExecutor.cjs.d.mts +2 -0
  22. package/CommandExecutor/dist/effect-platform-bun-CommandExecutor.cjs.d.mts.map +1 -0
  23. package/CommandExecutor/dist/effect-platform-bun-CommandExecutor.cjs.d.ts +2 -0
  24. package/CommandExecutor/dist/effect-platform-bun-CommandExecutor.cjs.d.ts.map +1 -0
  25. package/CommandExecutor/dist/effect-platform-bun-CommandExecutor.cjs.dev.js +16 -0
  26. package/CommandExecutor/dist/effect-platform-bun-CommandExecutor.cjs.js +7 -0
  27. package/CommandExecutor/dist/effect-platform-bun-CommandExecutor.cjs.mjs +4 -0
  28. package/CommandExecutor/dist/effect-platform-bun-CommandExecutor.cjs.prod.js +16 -0
  29. package/CommandExecutor/dist/effect-platform-bun-CommandExecutor.esm.js +5 -0
  30. package/CommandExecutor/package.json +4 -0
  31. package/Effectify/dist/effect-platform-bun-Effectify.cjs.d.mts +2 -0
  32. package/Effectify/dist/effect-platform-bun-Effectify.cjs.d.mts.map +1 -0
  33. package/Effectify/dist/effect-platform-bun-Effectify.cjs.d.ts +2 -0
  34. package/Effectify/dist/effect-platform-bun-Effectify.cjs.d.ts.map +1 -0
  35. package/Effectify/dist/effect-platform-bun-Effectify.cjs.dev.js +12 -0
  36. package/Effectify/dist/effect-platform-bun-Effectify.cjs.js +7 -0
  37. package/Effectify/dist/effect-platform-bun-Effectify.cjs.mjs +3 -0
  38. package/Effectify/dist/effect-platform-bun-Effectify.cjs.prod.js +12 -0
  39. package/Effectify/dist/effect-platform-bun-Effectify.esm.js +5 -0
  40. package/Effectify/package.json +4 -0
  41. package/Error/dist/effect-platform-bun-Error.cjs.d.mts +2 -0
  42. package/Error/dist/effect-platform-bun-Error.cjs.d.mts.map +1 -0
  43. package/Error/dist/effect-platform-bun-Error.cjs.d.ts +2 -0
  44. package/Error/dist/effect-platform-bun-Error.cjs.d.ts.map +1 -0
  45. package/Error/dist/effect-platform-bun-Error.cjs.dev.js +28 -0
  46. package/Error/dist/effect-platform-bun-Error.cjs.js +7 -0
  47. package/Error/dist/effect-platform-bun-Error.cjs.mjs +7 -0
  48. package/Error/dist/effect-platform-bun-Error.cjs.prod.js +28 -0
  49. package/Error/dist/effect-platform-bun-Error.esm.js +5 -0
  50. package/Error/package.json +4 -0
  51. package/FileSystem/dist/effect-platform-bun-FileSystem.cjs.d.mts +2 -0
  52. package/FileSystem/dist/effect-platform-bun-FileSystem.cjs.d.mts.map +1 -0
  53. package/FileSystem/dist/effect-platform-bun-FileSystem.cjs.d.ts +2 -0
  54. package/FileSystem/dist/effect-platform-bun-FileSystem.cjs.d.ts.map +1 -0
  55. package/FileSystem/dist/effect-platform-bun-FileSystem.cjs.dev.js +20 -0
  56. package/FileSystem/dist/effect-platform-bun-FileSystem.cjs.js +7 -0
  57. package/FileSystem/dist/effect-platform-bun-FileSystem.cjs.mjs +5 -0
  58. package/FileSystem/dist/effect-platform-bun-FileSystem.cjs.prod.js +20 -0
  59. package/FileSystem/dist/effect-platform-bun-FileSystem.esm.js +5 -0
  60. package/FileSystem/package.json +4 -0
  61. package/Http/Platform/dist/effect-platform-bun-Http-Platform.cjs.d.mts +2 -0
  62. package/Http/Platform/dist/effect-platform-bun-Http-Platform.cjs.d.mts.map +1 -0
  63. package/Http/Platform/dist/effect-platform-bun-Http-Platform.cjs.d.ts +2 -0
  64. package/Http/Platform/dist/effect-platform-bun-Http-Platform.cjs.d.ts.map +1 -0
  65. package/Http/Platform/dist/effect-platform-bun-Http-Platform.cjs.dev.js +85 -0
  66. package/Http/Platform/dist/effect-platform-bun-Http-Platform.cjs.js +7 -0
  67. package/Http/Platform/dist/effect-platform-bun-Http-Platform.cjs.mjs +1 -0
  68. package/Http/Platform/dist/effect-platform-bun-Http-Platform.cjs.prod.js +85 -0
  69. package/Http/Platform/dist/effect-platform-bun-Http-Platform.esm.js +22 -0
  70. package/Http/Platform/package.json +4 -0
  71. package/Http/Server/dist/effect-platform-bun-Http-Server.cjs.d.mts +2 -0
  72. package/Http/Server/dist/effect-platform-bun-Http-Server.cjs.d.mts.map +1 -0
  73. package/Http/Server/dist/effect-platform-bun-Http-Server.cjs.d.ts +2 -0
  74. package/Http/Server/dist/effect-platform-bun-Http-Server.cjs.d.ts.map +1 -0
  75. package/Http/Server/dist/effect-platform-bun-Http-Server.cjs.dev.js +39 -0
  76. package/Http/Server/dist/effect-platform-bun-Http-Server.cjs.js +7 -0
  77. package/Http/Server/dist/effect-platform-bun-Http-Server.cjs.mjs +1 -0
  78. package/Http/Server/dist/effect-platform-bun-Http-Server.cjs.prod.js +39 -0
  79. package/Http/Server/dist/effect-platform-bun-Http-Server.esm.js +29 -0
  80. package/Http/Server/package.json +4 -0
  81. package/HttpClient/dist/effect-platform-bun-HttpClient.cjs.d.mts +2 -0
  82. package/HttpClient/dist/effect-platform-bun-HttpClient.cjs.d.mts.map +1 -0
  83. package/HttpClient/dist/effect-platform-bun-HttpClient.cjs.d.ts +2 -0
  84. package/HttpClient/dist/effect-platform-bun-HttpClient.cjs.d.ts.map +1 -0
  85. package/HttpClient/dist/effect-platform-bun-HttpClient.cjs.dev.js +47 -0
  86. package/HttpClient/dist/effect-platform-bun-HttpClient.cjs.js +7 -0
  87. package/HttpClient/dist/effect-platform-bun-HttpClient.cjs.mjs +9 -0
  88. package/HttpClient/dist/effect-platform-bun-HttpClient.cjs.prod.js +47 -0
  89. package/HttpClient/dist/effect-platform-bun-HttpClient.esm.js +18 -0
  90. package/HttpClient/package.json +4 -0
  91. package/HttpServer/dist/effect-platform-bun-HttpServer.cjs.d.mts +2 -0
  92. package/HttpServer/dist/effect-platform-bun-HttpServer.cjs.d.mts.map +1 -0
  93. package/HttpServer/dist/effect-platform-bun-HttpServer.cjs.d.ts +2 -0
  94. package/HttpServer/dist/effect-platform-bun-HttpServer.cjs.d.ts.map +1 -0
  95. package/HttpServer/dist/effect-platform-bun-HttpServer.cjs.dev.js +75 -0
  96. package/HttpServer/dist/effect-platform-bun-HttpServer.cjs.js +7 -0
  97. package/HttpServer/dist/effect-platform-bun-HttpServer.cjs.mjs +14 -0
  98. package/HttpServer/dist/effect-platform-bun-HttpServer.cjs.prod.js +75 -0
  99. package/HttpServer/dist/effect-platform-bun-HttpServer.esm.js +28 -0
  100. package/HttpServer/package.json +4 -0
  101. package/KeyValueStore/dist/effect-platform-bun-KeyValueStore.cjs.d.mts +2 -0
  102. package/KeyValueStore/dist/effect-platform-bun-KeyValueStore.cjs.d.mts.map +1 -0
  103. package/KeyValueStore/dist/effect-platform-bun-KeyValueStore.cjs.d.ts +2 -0
  104. package/KeyValueStore/dist/effect-platform-bun-KeyValueStore.cjs.d.ts.map +1 -0
  105. package/KeyValueStore/dist/effect-platform-bun-KeyValueStore.cjs.dev.js +19 -0
  106. package/KeyValueStore/dist/effect-platform-bun-KeyValueStore.cjs.js +7 -0
  107. package/KeyValueStore/dist/effect-platform-bun-KeyValueStore.cjs.mjs +1 -0
  108. package/KeyValueStore/dist/effect-platform-bun-KeyValueStore.cjs.prod.js +19 -0
  109. package/KeyValueStore/dist/effect-platform-bun-KeyValueStore.esm.js +9 -0
  110. package/KeyValueStore/package.json +4 -0
  111. package/Path/dist/effect-platform-bun-Path.cjs.d.mts +2 -0
  112. package/Path/dist/effect-platform-bun-Path.cjs.d.mts.map +1 -0
  113. package/Path/dist/effect-platform-bun-Path.cjs.d.ts +2 -0
  114. package/Path/dist/effect-platform-bun-Path.cjs.d.ts.map +1 -0
  115. package/Path/dist/effect-platform-bun-Path.cjs.dev.js +24 -0
  116. package/Path/dist/effect-platform-bun-Path.cjs.js +7 -0
  117. package/Path/dist/effect-platform-bun-Path.cjs.mjs +6 -0
  118. package/Path/dist/effect-platform-bun-Path.cjs.prod.js +24 -0
  119. package/Path/dist/effect-platform-bun-Path.esm.js +5 -0
  120. package/Path/package.json +4 -0
  121. package/Runtime/dist/effect-platform-bun-Runtime.cjs.d.mts +2 -0
  122. package/Runtime/dist/effect-platform-bun-Runtime.cjs.d.mts.map +1 -0
  123. package/Runtime/dist/effect-platform-bun-Runtime.cjs.d.ts +2 -0
  124. package/Runtime/dist/effect-platform-bun-Runtime.cjs.d.ts.map +1 -0
  125. package/Runtime/dist/effect-platform-bun-Runtime.cjs.dev.js +16 -0
  126. package/Runtime/dist/effect-platform-bun-Runtime.cjs.js +7 -0
  127. package/Runtime/dist/effect-platform-bun-Runtime.cjs.mjs +4 -0
  128. package/Runtime/dist/effect-platform-bun-Runtime.cjs.prod.js +16 -0
  129. package/Runtime/dist/effect-platform-bun-Runtime.esm.js +5 -0
  130. package/Runtime/package.json +4 -0
  131. package/Sink/dist/effect-platform-bun-Sink.cjs.d.mts +2 -0
  132. package/Sink/dist/effect-platform-bun-Sink.cjs.d.mts.map +1 -0
  133. package/Sink/dist/effect-platform-bun-Sink.cjs.d.ts +2 -0
  134. package/Sink/dist/effect-platform-bun-Sink.cjs.d.ts.map +1 -0
  135. package/Sink/dist/effect-platform-bun-Sink.cjs.dev.js +12 -0
  136. package/Sink/dist/effect-platform-bun-Sink.cjs.js +7 -0
  137. package/Sink/dist/effect-platform-bun-Sink.cjs.mjs +3 -0
  138. package/Sink/dist/effect-platform-bun-Sink.cjs.prod.js +12 -0
  139. package/Sink/dist/effect-platform-bun-Sink.esm.js +5 -0
  140. package/Sink/package.json +4 -0
  141. package/Stream/dist/effect-platform-bun-Stream.cjs.d.mts +2 -0
  142. package/Stream/dist/effect-platform-bun-Stream.cjs.d.mts.map +1 -0
  143. package/Stream/dist/effect-platform-bun-Stream.cjs.d.ts +2 -0
  144. package/Stream/dist/effect-platform-bun-Stream.cjs.d.ts.map +1 -0
  145. package/Stream/dist/effect-platform-bun-Stream.cjs.dev.js +20 -0
  146. package/Stream/dist/effect-platform-bun-Stream.cjs.js +7 -0
  147. package/Stream/dist/effect-platform-bun-Stream.cjs.mjs +5 -0
  148. package/Stream/dist/effect-platform-bun-Stream.cjs.prod.js +20 -0
  149. package/Stream/dist/effect-platform-bun-Stream.esm.js +5 -0
  150. package/Stream/package.json +4 -0
  151. package/dist/BunContext-3aacfc41.cjs.dev.js +50 -0
  152. package/dist/BunContext-af359ac7.cjs.prod.js +50 -0
  153. package/dist/Command-073352c2.cjs.dev.js +29 -0
  154. package/dist/Command-86aff121.cjs.prod.js +29 -0
  155. package/dist/CommandExecutor-79029a6f.cjs.prod.js +15 -0
  156. package/dist/CommandExecutor-9fdee39f.cjs.dev.js +15 -0
  157. package/dist/Effectify-1e2cf960.cjs.dev.js +14 -0
  158. package/dist/Effectify-583bea25.cjs.prod.js +14 -0
  159. package/dist/Error-06928f75.cjs.dev.js +18 -0
  160. package/dist/Error-77b41701.cjs.prod.js +18 -0
  161. package/dist/FileSystem-0f2d7096.cjs.prod.js +16 -0
  162. package/dist/FileSystem-3eb9e057.cjs.dev.js +16 -0
  163. package/dist/HttpClient-91ed29d7.cjs.dev.js +52 -0
  164. package/dist/HttpClient-a34271de.cjs.prod.js +52 -0
  165. package/dist/HttpServer-93d1b5e2.cjs.prod.js +66 -0
  166. package/dist/HttpServer-ae717a37.cjs.dev.js +66 -0
  167. package/dist/KeyValueStore-9e969cb3.cjs.dev.js +52 -0
  168. package/dist/KeyValueStore-ddd3d960.cjs.prod.js +52 -0
  169. package/dist/Path-49561a01.cjs.dev.js +17 -0
  170. package/dist/Path-9c4bff86.cjs.prod.js +17 -0
  171. package/dist/Runtime-399be72e.cjs.prod.js +15 -0
  172. package/dist/Runtime-ad8dde5f.cjs.dev.js +15 -0
  173. package/dist/Server-3766cdb3.cjs.dev.js +314 -0
  174. package/dist/Server-4fe393ab.cjs.prod.js +314 -0
  175. package/dist/Sink-0100d655.cjs.prod.js +14 -0
  176. package/dist/Sink-59df5de5.cjs.dev.js +14 -0
  177. package/dist/Stream-a7a516a8.cjs.dev.js +16 -0
  178. package/dist/Stream-d0a08460.cjs.prod.js +16 -0
  179. package/{BunContext.d.ts → dist/declarations/src/BunContext.d.ts} +3 -6
  180. package/dist/declarations/src/BunContext.d.ts.map +1 -0
  181. package/dist/declarations/src/Command.d.ts.map +1 -0
  182. package/dist/declarations/src/CommandExecutor.d.ts.map +1 -0
  183. package/dist/declarations/src/Effectify.d.ts.map +1 -0
  184. package/dist/declarations/src/Error.d.ts.map +1 -0
  185. package/dist/declarations/src/FileSystem.d.ts.map +1 -0
  186. package/{Http → dist/declarations/src/Http}/Platform.d.ts +1 -1
  187. package/dist/declarations/src/Http/Platform.d.ts.map +1 -0
  188. package/{Http → dist/declarations/src/Http}/Server.d.ts +1 -1
  189. package/dist/declarations/src/Http/Server.d.ts.map +1 -0
  190. package/dist/declarations/src/HttpClient.d.ts.map +1 -0
  191. package/{HttpServer.d.ts → dist/declarations/src/HttpServer.d.ts} +1 -1
  192. package/dist/declarations/src/HttpServer.d.ts.map +1 -0
  193. package/dist/declarations/src/KeyValueStore.d.ts.map +1 -0
  194. package/dist/declarations/src/Path.d.ts.map +1 -0
  195. package/dist/declarations/src/Runtime.d.ts.map +1 -0
  196. package/dist/declarations/src/Sink.d.ts.map +1 -0
  197. package/dist/declarations/src/Stream.d.ts.map +1 -0
  198. package/dist/declarations/src/index.d.ts +55 -0
  199. package/dist/declarations/src/index.d.ts.map +1 -0
  200. package/dist/effect-platform-bun.cjs.d.mts +2 -0
  201. package/dist/effect-platform-bun.cjs.d.mts.map +1 -0
  202. package/dist/effect-platform-bun.cjs.d.ts +2 -0
  203. package/dist/effect-platform-bun.cjs.d.ts.map +1 -0
  204. package/dist/effect-platform-bun.cjs.dev.js +73 -0
  205. package/dist/effect-platform-bun.cjs.js +7 -0
  206. package/dist/effect-platform-bun.cjs.mjs +15 -0
  207. package/dist/effect-platform-bun.cjs.prod.js +73 -0
  208. package/dist/effect-platform-bun.esm.js +26 -0
  209. package/internal/http/platform.esm.js +33 -0
  210. package/{mjs/internal/http/server.mjs → internal/http/server.esm.js} +26 -25
  211. package/package.json +152 -31
  212. package/src/BunContext.ts +3 -3
  213. package/src/Http/Platform.ts +2 -2
  214. package/src/Http/Server.ts +2 -2
  215. package/src/HttpServer.ts +1 -1
  216. package/src/index.ts +13 -13
  217. package/src/internal/http/platform.ts +1 -1
  218. package/src/internal/http/server.ts +3 -3
  219. package/BunContext.d.ts.map +0 -1
  220. package/BunContext.js +0 -23
  221. package/BunContext.js.map +0 -1
  222. package/Command.d.ts.map +0 -1
  223. package/Command.js +0 -103
  224. package/Command.js.map +0 -1
  225. package/CommandExecutor.d.ts.map +0 -1
  226. package/CommandExecutor.js +0 -19
  227. package/CommandExecutor.js.map +0 -1
  228. package/Effectify.d.ts.map +0 -1
  229. package/Effectify.js +0 -13
  230. package/Effectify.js.map +0 -1
  231. package/Error.d.ts.map +0 -1
  232. package/Error.js +0 -25
  233. package/Error.js.map +0 -1
  234. package/FileSystem.d.ts.map +0 -1
  235. package/FileSystem.js +0 -25
  236. package/FileSystem.js.map +0 -1
  237. package/Http/Platform.d.ts.map +0 -1
  238. package/Http/Platform.js +0 -40
  239. package/Http/Platform.js.map +0 -1
  240. package/Http/Server.d.ts.map +0 -1
  241. package/Http/Server.js +0 -46
  242. package/Http/Server.js.map +0 -1
  243. package/HttpClient.d.ts.map +0 -1
  244. package/HttpClient.js +0 -23
  245. package/HttpClient.js.map +0 -1
  246. package/HttpServer.d.ts.map +0 -1
  247. package/HttpServer.js +0 -33
  248. package/HttpServer.js.map +0 -1
  249. package/KeyValueStore.d.ts.map +0 -1
  250. package/KeyValueStore.js +0 -28
  251. package/KeyValueStore.js.map +0 -1
  252. package/Path.d.ts.map +0 -1
  253. package/Path.js +0 -31
  254. package/Path.js.map +0 -1
  255. package/Runtime.d.ts.map +0 -1
  256. package/Runtime.js +0 -19
  257. package/Runtime.js.map +0 -1
  258. package/Sink.d.ts.map +0 -1
  259. package/Sink.js +0 -13
  260. package/Sink.js.map +0 -1
  261. package/Stream.d.ts.map +0 -1
  262. package/Stream.js +0 -25
  263. package/Stream.js.map +0 -1
  264. package/index.d.ts +0 -55
  265. package/index.d.ts.map +0 -1
  266. package/index.js +0 -35
  267. package/index.js.map +0 -1
  268. package/internal/http/platform.d.ts +0 -2
  269. package/internal/http/platform.d.ts.map +0 -1
  270. package/internal/http/platform.js +0 -38
  271. package/internal/http/platform.js.map +0 -1
  272. package/internal/http/server.d.ts +0 -2
  273. package/internal/http/server.d.ts.map +0 -1
  274. package/internal/http/server.js +0 -239
  275. package/internal/http/server.js.map +0 -1
  276. package/mjs/BunContext.mjs +0 -14
  277. package/mjs/BunContext.mjs.map +0 -1
  278. package/mjs/Command.mjs +0 -85
  279. package/mjs/Command.mjs.map +0 -1
  280. package/mjs/CommandExecutor.mjs +0 -15
  281. package/mjs/CommandExecutor.mjs.map +0 -1
  282. package/mjs/Effectify.mjs +0 -10
  283. package/mjs/Effectify.mjs.map +0 -1
  284. package/mjs/Error.mjs +0 -20
  285. package/mjs/Error.mjs.map +0 -1
  286. package/mjs/FileSystem.mjs +0 -20
  287. package/mjs/FileSystem.mjs.map +0 -1
  288. package/mjs/Http/Platform.mjs +0 -16
  289. package/mjs/Http/Platform.mjs.map +0 -1
  290. package/mjs/Http/Server.mjs +0 -21
  291. package/mjs/Http/Server.mjs.map +0 -1
  292. package/mjs/HttpClient.mjs +0 -61
  293. package/mjs/HttpClient.mjs.map +0 -1
  294. package/mjs/HttpServer.mjs +0 -101
  295. package/mjs/HttpServer.mjs.map +0 -1
  296. package/mjs/KeyValueStore.mjs +0 -13
  297. package/mjs/KeyValueStore.mjs.map +0 -1
  298. package/mjs/Path.mjs +0 -25
  299. package/mjs/Path.mjs.map +0 -1
  300. package/mjs/Runtime.mjs +0 -15
  301. package/mjs/Runtime.mjs.map +0 -1
  302. package/mjs/Sink.mjs +0 -10
  303. package/mjs/Sink.mjs.map +0 -1
  304. package/mjs/Stream.mjs +0 -20
  305. package/mjs/Stream.mjs.map +0 -1
  306. package/mjs/index.mjs +0 -27
  307. package/mjs/index.mjs.map +0 -1
  308. package/mjs/internal/http/platform.mjs +0 -30
  309. package/mjs/internal/http/platform.mjs.map +0 -1
  310. package/mjs/internal/http/server.mjs.map +0 -1
  311. package/tsconfig.build.json +0 -12
  312. package/tsconfig.examples.json +0 -12
  313. package/tsconfig.json +0 -11
  314. package/tsconfig.test.json +0 -17
  315. /package/{Command.d.ts → dist/declarations/src/Command.d.ts} +0 -0
  316. /package/{CommandExecutor.d.ts → dist/declarations/src/CommandExecutor.d.ts} +0 -0
  317. /package/{Effectify.d.ts → dist/declarations/src/Effectify.d.ts} +0 -0
  318. /package/{Error.d.ts → dist/declarations/src/Error.d.ts} +0 -0
  319. /package/{FileSystem.d.ts → dist/declarations/src/FileSystem.d.ts} +0 -0
  320. /package/{HttpClient.d.ts → dist/declarations/src/HttpClient.d.ts} +0 -0
  321. /package/{KeyValueStore.d.ts → dist/declarations/src/KeyValueStore.d.ts} +0 -0
  322. /package/{Path.d.ts → dist/declarations/src/Path.d.ts} +0 -0
  323. /package/{Runtime.d.ts → dist/declarations/src/Runtime.d.ts} +0 -0
  324. /package/{Sink.d.ts → dist/declarations/src/Sink.d.ts} +0 -0
  325. /package/{Stream.d.ts → dist/declarations/src/Stream.d.ts} +0 -0
@@ -0,0 +1,314 @@
1
+ 'use strict';
2
+
3
+ var FormData = require('@effect/platform-node/Http/FormData');
4
+ var Headers = require('@effect/platform/Http/Headers');
5
+ var IncomingMessage = require('@effect/platform/Http/IncomingMessage');
6
+ var Middleware = require('@effect/platform/Http/Middleware');
7
+ var Server$1 = require('@effect/platform/Http/Server');
8
+ var Error = require('@effect/platform/Http/ServerError');
9
+ var ServerRequest = require('@effect/platform/Http/ServerRequest');
10
+ var UrlParams = require('@effect/platform/Http/UrlParams');
11
+ var Cause = require('effect/Cause');
12
+ var Config = require('effect/Config');
13
+ var Effect = require('effect/Effect');
14
+ var Function = require('effect/Function');
15
+ var Layer = require('effect/Layer');
16
+ var Option = require('effect/Option');
17
+ var Runtime = require('effect/Runtime');
18
+ var Stream = require('effect/Stream');
19
+ var node_stream = require('node:stream');
20
+ var Http_Platform_dist_effectPlatformBunHttpPlatform = require('../Http/Platform/dist/effect-platform-bun-Http-Platform.cjs.dev.js');
21
+
22
+ function _interopNamespace(e) {
23
+ if (e && e.__esModule) return e;
24
+ var n = Object.create(null);
25
+ if (e) {
26
+ Object.keys(e).forEach(function (k) {
27
+ if (k !== 'default') {
28
+ var d = Object.getOwnPropertyDescriptor(e, k);
29
+ Object.defineProperty(n, k, d.get ? d : {
30
+ enumerable: true,
31
+ get: function () { return e[k]; }
32
+ });
33
+ }
34
+ });
35
+ }
36
+ n["default"] = e;
37
+ return Object.freeze(n);
38
+ }
39
+
40
+ function _mergeNamespaces(n, m) {
41
+ m.forEach(function (e) {
42
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
43
+ if (k !== 'default' && !(k in n)) {
44
+ var d = Object.getOwnPropertyDescriptor(e, k);
45
+ Object.defineProperty(n, k, d.get ? d : {
46
+ enumerable: true,
47
+ get: function () { return e[k]; }
48
+ });
49
+ }
50
+ });
51
+ });
52
+ return Object.freeze(n);
53
+ }
54
+
55
+ var FormData__namespace = /*#__PURE__*/_interopNamespace(FormData);
56
+ var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
57
+ var IncomingMessage__namespace = /*#__PURE__*/_interopNamespace(IncomingMessage);
58
+ var Middleware__namespace = /*#__PURE__*/_interopNamespace(Middleware);
59
+ var Server__namespace = /*#__PURE__*/_interopNamespace(Server$1);
60
+ var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
61
+ var ServerRequest__namespace = /*#__PURE__*/_interopNamespace(ServerRequest);
62
+ var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
63
+ var Cause__namespace = /*#__PURE__*/_interopNamespace(Cause);
64
+ var Config__namespace = /*#__PURE__*/_interopNamespace(Config);
65
+ var Effect__namespace = /*#__PURE__*/_interopNamespace(Effect);
66
+ var Layer__namespace = /*#__PURE__*/_interopNamespace(Layer);
67
+ var Option__namespace = /*#__PURE__*/_interopNamespace(Option);
68
+ var Runtime__namespace = /*#__PURE__*/_interopNamespace(Runtime);
69
+ var Stream__namespace = /*#__PURE__*/_interopNamespace(Stream);
70
+
71
+ /** @internal */
72
+ const make$1 = options => Effect__namespace.gen(function* (_) {
73
+ const handlerStack = [function (_request, _server) {
74
+ return new Response("not found", {
75
+ status: 404
76
+ });
77
+ }];
78
+ const server = Bun.serve({
79
+ ...options,
80
+ fetch: handlerStack[0]
81
+ });
82
+ yield* _(Effect__namespace.addFinalizer(() => Effect__namespace.sync(() => {
83
+ server.stop();
84
+ })));
85
+ return Server__namespace.make({
86
+ address: {
87
+ _tag: "TcpAddress",
88
+ port: server.port,
89
+ hostname: server.hostname
90
+ },
91
+ serve(httpApp, middleware) {
92
+ const app = middleware ? middleware(respond(httpApp)) : respond(httpApp);
93
+ return Function.pipe(Effect__namespace.all([Effect__namespace.runtime(), Effect__namespace.fiberId]), Effect__namespace.zipLeft(Effect__namespace.addFinalizer(() => Effect__namespace.sync(() => {
94
+ handlerStack.pop();
95
+ server.reload({
96
+ fetch: handlerStack[handlerStack.length - 1]
97
+ });
98
+ }))), Effect__namespace.flatMap(([runtime, fiberId]) => Effect__namespace.async(() => {
99
+ const runFork = Runtime__namespace.runFork(runtime);
100
+ function handler(request, _server) {
101
+ console.log(request);
102
+ return new Promise((resolve, reject) => {
103
+ const fiber = runFork(Effect__namespace.provideService(app, ServerRequest__namespace.ServerRequest, new ServerRequestImpl(request, resolve, reject, removeHost(request.url))));
104
+ request.signal.addEventListener("abort", () => {
105
+ runFork(fiber.interruptAsFork(fiberId));
106
+ });
107
+ });
108
+ }
109
+ handlerStack.push(handler);
110
+ server.reload({
111
+ fetch: handler
112
+ });
113
+ })));
114
+ }
115
+ });
116
+ });
117
+ const makeResponse = (request, response) => {
118
+ if (request.method === "HEAD") {
119
+ return new Response(undefined, {
120
+ status: response.status,
121
+ statusText: response.statusText,
122
+ headers: response.headers
123
+ });
124
+ }
125
+ const body = response.body;
126
+ switch (body._tag) {
127
+ case "Empty":
128
+ {
129
+ return new Response(undefined, {
130
+ status: response.status,
131
+ statusText: response.statusText,
132
+ headers: response.headers
133
+ });
134
+ }
135
+ case "Uint8Array":
136
+ case "Raw":
137
+ {
138
+ return new Response(body.body, {
139
+ status: response.status,
140
+ statusText: response.statusText,
141
+ headers: response.headers
142
+ });
143
+ }
144
+ case "FormData":
145
+ {
146
+ return new Response(body.formData, {
147
+ status: response.status,
148
+ statusText: response.statusText,
149
+ headers: response.headers
150
+ });
151
+ }
152
+ case "Stream":
153
+ {
154
+ return new Response(Stream__namespace.toReadableStream(body.stream), {
155
+ status: response.status,
156
+ statusText: response.statusText,
157
+ headers: response.headers
158
+ });
159
+ }
160
+ }
161
+ };
162
+ const respond = /*#__PURE__*/Middleware__namespace.make(httpApp => Effect__namespace.flatMap(ServerRequest__namespace.ServerRequest, request => Effect__namespace.onExit(httpApp, exit => Effect__namespace.sync(() => {
163
+ if (exit._tag === "Success") {
164
+ request.resolve(makeResponse(request, exit.value));
165
+ } else {
166
+ request.reject(Cause__namespace.pretty(exit.cause));
167
+ }
168
+ }))));
169
+
170
+ /** @internal */
171
+ const layer$1 = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, make$1(options)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
172
+
173
+ /** @internal */
174
+ const layerConfig$1 = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, Effect__namespace.flatMap(Effect__namespace.config(Config__namespace.unwrap(options)), make$1)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
175
+ class ServerRequestImpl {
176
+ constructor(source, resolve, reject, url, headersOverride, remoteAddressOverride) {
177
+ this.source = source;
178
+ this.resolve = resolve;
179
+ this.reject = reject;
180
+ this.url = url;
181
+ this.headersOverride = headersOverride;
182
+ this.remoteAddressOverride = remoteAddressOverride;
183
+ this[ServerRequest__namespace.TypeId] = ServerRequest__namespace.TypeId;
184
+ this[IncomingMessage__namespace.TypeId] = IncomingMessage__namespace.TypeId;
185
+ }
186
+ modify(options) {
187
+ return new ServerRequestImpl(this.source, this.resolve, this.reject, options.url ?? this.url, options.headers ?? this.headersOverride, options.remoteAddress ?? this.remoteAddressOverride);
188
+ }
189
+ get method() {
190
+ return this.source.method;
191
+ }
192
+ get originalUrl() {
193
+ return this.source.url;
194
+ }
195
+ get remoteAddress() {
196
+ return this.remoteAddressOverride ? Option__namespace.some(this.remoteAddressOverride) : Option__namespace.none();
197
+ }
198
+ get headers() {
199
+ this.headersOverride ??= Headers__namespace.fromInput(this.source.headers);
200
+ return this.headersOverride;
201
+ }
202
+ get stream() {
203
+ return this.source.body ? Stream__namespace.fromReadableStream(() => this.source.body, _ => Error__namespace.RequestError({
204
+ request: this,
205
+ reason: "Decode",
206
+ error: _
207
+ })) : Stream__namespace.fail(Error__namespace.RequestError({
208
+ request: this,
209
+ reason: "Decode",
210
+ error: "can not create stream from empty body"
211
+ }));
212
+ }
213
+ get text() {
214
+ if (this.textEffect) {
215
+ return this.textEffect;
216
+ }
217
+ this.textEffect = Effect__namespace.runSync(Effect__namespace.cached(Effect__namespace.tryPromise({
218
+ try: () => this.source.text(),
219
+ catch: error => Error__namespace.RequestError({
220
+ request: this,
221
+ reason: "Decode",
222
+ error
223
+ })
224
+ })));
225
+ return this.textEffect;
226
+ }
227
+ get json() {
228
+ return Effect__namespace.tryMap(this.text, {
229
+ try: _ => JSON.parse(_),
230
+ catch: error => Error__namespace.RequestError({
231
+ request: this,
232
+ reason: "Decode",
233
+ error
234
+ })
235
+ });
236
+ }
237
+ get urlParamsBody() {
238
+ return Effect__namespace.flatMap(this.text, _ => Effect__namespace.try({
239
+ try: () => UrlParams__namespace.fromInput(new URLSearchParams(_)),
240
+ catch: error => Error__namespace.RequestError({
241
+ request: this,
242
+ reason: "Decode",
243
+ error
244
+ })
245
+ }));
246
+ }
247
+ get formData() {
248
+ if (this.formDataEffect) {
249
+ return this.formDataEffect;
250
+ }
251
+ this.formDataEffect = Effect__namespace.runSync(Effect__namespace.cached(FormData__namespace.formData(node_stream.Readable.fromWeb(this.source.body), this.headers)));
252
+ return this.formDataEffect;
253
+ }
254
+ get formDataStream() {
255
+ return FormData__namespace.stream(node_stream.Readable.fromWeb(this.source.body), this.headers);
256
+ }
257
+ get arrayBuffer() {
258
+ if (this.arrayBuffer) {
259
+ return this.arrayBuffer;
260
+ }
261
+ this.arrayBufferEffect = Effect__namespace.runSync(Effect__namespace.cached(Effect__namespace.tryPromise({
262
+ try: () => this.source.arrayBuffer(),
263
+ catch: error => Error__namespace.RequestError({
264
+ request: this,
265
+ reason: "Decode",
266
+ error
267
+ })
268
+ })));
269
+ return this.arrayBufferEffect;
270
+ }
271
+ }
272
+ const removeHost = url => {
273
+ if (url[0] === "/") {
274
+ return url;
275
+ }
276
+ const index = url.indexOf("/", url.indexOf("//") + 2);
277
+ return index === -1 ? "/" : url.slice(index);
278
+ };
279
+
280
+ /**
281
+ * @since 1.0.0
282
+ *
283
+ * Also includes exports from [`@effect/platform/Http/Server`](https://effect-ts.github.io/platform/platform/Http/Server.ts.html).
284
+ */
285
+
286
+ /**
287
+ * @since 1.0.0
288
+ * @category constructors
289
+ */
290
+ const make = make$1;
291
+
292
+ /**
293
+ * @since 1.0.0
294
+ * @category layers
295
+ */
296
+ const layer = layer$1;
297
+
298
+ /**
299
+ * @since 1.0.0
300
+ * @category layers
301
+ */
302
+ const layerConfig = layerConfig$1;
303
+
304
+ var Server = /*#__PURE__*/_mergeNamespaces({
305
+ __proto__: null,
306
+ make: make,
307
+ layer: layer,
308
+ layerConfig: layerConfig
309
+ }, [Server__namespace]);
310
+
311
+ exports.Server = Server;
312
+ exports.layer = layer;
313
+ exports.layerConfig = layerConfig;
314
+ exports.make = make;
@@ -0,0 +1,314 @@
1
+ 'use strict';
2
+
3
+ var FormData = require('@effect/platform-node/Http/FormData');
4
+ var Headers = require('@effect/platform/Http/Headers');
5
+ var IncomingMessage = require('@effect/platform/Http/IncomingMessage');
6
+ var Middleware = require('@effect/platform/Http/Middleware');
7
+ var Server$1 = require('@effect/platform/Http/Server');
8
+ var Error = require('@effect/platform/Http/ServerError');
9
+ var ServerRequest = require('@effect/platform/Http/ServerRequest');
10
+ var UrlParams = require('@effect/platform/Http/UrlParams');
11
+ var Cause = require('effect/Cause');
12
+ var Config = require('effect/Config');
13
+ var Effect = require('effect/Effect');
14
+ var Function = require('effect/Function');
15
+ var Layer = require('effect/Layer');
16
+ var Option = require('effect/Option');
17
+ var Runtime = require('effect/Runtime');
18
+ var Stream = require('effect/Stream');
19
+ var node_stream = require('node:stream');
20
+ var Http_Platform_dist_effectPlatformBunHttpPlatform = require('../Http/Platform/dist/effect-platform-bun-Http-Platform.cjs.prod.js');
21
+
22
+ function _interopNamespace(e) {
23
+ if (e && e.__esModule) return e;
24
+ var n = Object.create(null);
25
+ if (e) {
26
+ Object.keys(e).forEach(function (k) {
27
+ if (k !== 'default') {
28
+ var d = Object.getOwnPropertyDescriptor(e, k);
29
+ Object.defineProperty(n, k, d.get ? d : {
30
+ enumerable: true,
31
+ get: function () { return e[k]; }
32
+ });
33
+ }
34
+ });
35
+ }
36
+ n["default"] = e;
37
+ return Object.freeze(n);
38
+ }
39
+
40
+ function _mergeNamespaces(n, m) {
41
+ m.forEach(function (e) {
42
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
43
+ if (k !== 'default' && !(k in n)) {
44
+ var d = Object.getOwnPropertyDescriptor(e, k);
45
+ Object.defineProperty(n, k, d.get ? d : {
46
+ enumerable: true,
47
+ get: function () { return e[k]; }
48
+ });
49
+ }
50
+ });
51
+ });
52
+ return Object.freeze(n);
53
+ }
54
+
55
+ var FormData__namespace = /*#__PURE__*/_interopNamespace(FormData);
56
+ var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
57
+ var IncomingMessage__namespace = /*#__PURE__*/_interopNamespace(IncomingMessage);
58
+ var Middleware__namespace = /*#__PURE__*/_interopNamespace(Middleware);
59
+ var Server__namespace = /*#__PURE__*/_interopNamespace(Server$1);
60
+ var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
61
+ var ServerRequest__namespace = /*#__PURE__*/_interopNamespace(ServerRequest);
62
+ var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
63
+ var Cause__namespace = /*#__PURE__*/_interopNamespace(Cause);
64
+ var Config__namespace = /*#__PURE__*/_interopNamespace(Config);
65
+ var Effect__namespace = /*#__PURE__*/_interopNamespace(Effect);
66
+ var Layer__namespace = /*#__PURE__*/_interopNamespace(Layer);
67
+ var Option__namespace = /*#__PURE__*/_interopNamespace(Option);
68
+ var Runtime__namespace = /*#__PURE__*/_interopNamespace(Runtime);
69
+ var Stream__namespace = /*#__PURE__*/_interopNamespace(Stream);
70
+
71
+ /** @internal */
72
+ const make$1 = options => Effect__namespace.gen(function* (_) {
73
+ const handlerStack = [function (_request, _server) {
74
+ return new Response("not found", {
75
+ status: 404
76
+ });
77
+ }];
78
+ const server = Bun.serve({
79
+ ...options,
80
+ fetch: handlerStack[0]
81
+ });
82
+ yield* _(Effect__namespace.addFinalizer(() => Effect__namespace.sync(() => {
83
+ server.stop();
84
+ })));
85
+ return Server__namespace.make({
86
+ address: {
87
+ _tag: "TcpAddress",
88
+ port: server.port,
89
+ hostname: server.hostname
90
+ },
91
+ serve(httpApp, middleware) {
92
+ const app = middleware ? middleware(respond(httpApp)) : respond(httpApp);
93
+ return Function.pipe(Effect__namespace.all([Effect__namespace.runtime(), Effect__namespace.fiberId]), Effect__namespace.zipLeft(Effect__namespace.addFinalizer(() => Effect__namespace.sync(() => {
94
+ handlerStack.pop();
95
+ server.reload({
96
+ fetch: handlerStack[handlerStack.length - 1]
97
+ });
98
+ }))), Effect__namespace.flatMap(([runtime, fiberId]) => Effect__namespace.async(() => {
99
+ const runFork = Runtime__namespace.runFork(runtime);
100
+ function handler(request, _server) {
101
+ console.log(request);
102
+ return new Promise((resolve, reject) => {
103
+ const fiber = runFork(Effect__namespace.provideService(app, ServerRequest__namespace.ServerRequest, new ServerRequestImpl(request, resolve, reject, removeHost(request.url))));
104
+ request.signal.addEventListener("abort", () => {
105
+ runFork(fiber.interruptAsFork(fiberId));
106
+ });
107
+ });
108
+ }
109
+ handlerStack.push(handler);
110
+ server.reload({
111
+ fetch: handler
112
+ });
113
+ })));
114
+ }
115
+ });
116
+ });
117
+ const makeResponse = (request, response) => {
118
+ if (request.method === "HEAD") {
119
+ return new Response(undefined, {
120
+ status: response.status,
121
+ statusText: response.statusText,
122
+ headers: response.headers
123
+ });
124
+ }
125
+ const body = response.body;
126
+ switch (body._tag) {
127
+ case "Empty":
128
+ {
129
+ return new Response(undefined, {
130
+ status: response.status,
131
+ statusText: response.statusText,
132
+ headers: response.headers
133
+ });
134
+ }
135
+ case "Uint8Array":
136
+ case "Raw":
137
+ {
138
+ return new Response(body.body, {
139
+ status: response.status,
140
+ statusText: response.statusText,
141
+ headers: response.headers
142
+ });
143
+ }
144
+ case "FormData":
145
+ {
146
+ return new Response(body.formData, {
147
+ status: response.status,
148
+ statusText: response.statusText,
149
+ headers: response.headers
150
+ });
151
+ }
152
+ case "Stream":
153
+ {
154
+ return new Response(Stream__namespace.toReadableStream(body.stream), {
155
+ status: response.status,
156
+ statusText: response.statusText,
157
+ headers: response.headers
158
+ });
159
+ }
160
+ }
161
+ };
162
+ const respond = /*#__PURE__*/Middleware__namespace.make(httpApp => Effect__namespace.flatMap(ServerRequest__namespace.ServerRequest, request => Effect__namespace.onExit(httpApp, exit => Effect__namespace.sync(() => {
163
+ if (exit._tag === "Success") {
164
+ request.resolve(makeResponse(request, exit.value));
165
+ } else {
166
+ request.reject(Cause__namespace.pretty(exit.cause));
167
+ }
168
+ }))));
169
+
170
+ /** @internal */
171
+ const layer$1 = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, make$1(options)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
172
+
173
+ /** @internal */
174
+ const layerConfig$1 = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, Effect__namespace.flatMap(Effect__namespace.config(Config__namespace.unwrap(options)), make$1)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
175
+ class ServerRequestImpl {
176
+ constructor(source, resolve, reject, url, headersOverride, remoteAddressOverride) {
177
+ this.source = source;
178
+ this.resolve = resolve;
179
+ this.reject = reject;
180
+ this.url = url;
181
+ this.headersOverride = headersOverride;
182
+ this.remoteAddressOverride = remoteAddressOverride;
183
+ this[ServerRequest__namespace.TypeId] = ServerRequest__namespace.TypeId;
184
+ this[IncomingMessage__namespace.TypeId] = IncomingMessage__namespace.TypeId;
185
+ }
186
+ modify(options) {
187
+ return new ServerRequestImpl(this.source, this.resolve, this.reject, options.url ?? this.url, options.headers ?? this.headersOverride, options.remoteAddress ?? this.remoteAddressOverride);
188
+ }
189
+ get method() {
190
+ return this.source.method;
191
+ }
192
+ get originalUrl() {
193
+ return this.source.url;
194
+ }
195
+ get remoteAddress() {
196
+ return this.remoteAddressOverride ? Option__namespace.some(this.remoteAddressOverride) : Option__namespace.none();
197
+ }
198
+ get headers() {
199
+ this.headersOverride ??= Headers__namespace.fromInput(this.source.headers);
200
+ return this.headersOverride;
201
+ }
202
+ get stream() {
203
+ return this.source.body ? Stream__namespace.fromReadableStream(() => this.source.body, _ => Error__namespace.RequestError({
204
+ request: this,
205
+ reason: "Decode",
206
+ error: _
207
+ })) : Stream__namespace.fail(Error__namespace.RequestError({
208
+ request: this,
209
+ reason: "Decode",
210
+ error: "can not create stream from empty body"
211
+ }));
212
+ }
213
+ get text() {
214
+ if (this.textEffect) {
215
+ return this.textEffect;
216
+ }
217
+ this.textEffect = Effect__namespace.runSync(Effect__namespace.cached(Effect__namespace.tryPromise({
218
+ try: () => this.source.text(),
219
+ catch: error => Error__namespace.RequestError({
220
+ request: this,
221
+ reason: "Decode",
222
+ error
223
+ })
224
+ })));
225
+ return this.textEffect;
226
+ }
227
+ get json() {
228
+ return Effect__namespace.tryMap(this.text, {
229
+ try: _ => JSON.parse(_),
230
+ catch: error => Error__namespace.RequestError({
231
+ request: this,
232
+ reason: "Decode",
233
+ error
234
+ })
235
+ });
236
+ }
237
+ get urlParamsBody() {
238
+ return Effect__namespace.flatMap(this.text, _ => Effect__namespace.try({
239
+ try: () => UrlParams__namespace.fromInput(new URLSearchParams(_)),
240
+ catch: error => Error__namespace.RequestError({
241
+ request: this,
242
+ reason: "Decode",
243
+ error
244
+ })
245
+ }));
246
+ }
247
+ get formData() {
248
+ if (this.formDataEffect) {
249
+ return this.formDataEffect;
250
+ }
251
+ this.formDataEffect = Effect__namespace.runSync(Effect__namespace.cached(FormData__namespace.formData(node_stream.Readable.fromWeb(this.source.body), this.headers)));
252
+ return this.formDataEffect;
253
+ }
254
+ get formDataStream() {
255
+ return FormData__namespace.stream(node_stream.Readable.fromWeb(this.source.body), this.headers);
256
+ }
257
+ get arrayBuffer() {
258
+ if (this.arrayBuffer) {
259
+ return this.arrayBuffer;
260
+ }
261
+ this.arrayBufferEffect = Effect__namespace.runSync(Effect__namespace.cached(Effect__namespace.tryPromise({
262
+ try: () => this.source.arrayBuffer(),
263
+ catch: error => Error__namespace.RequestError({
264
+ request: this,
265
+ reason: "Decode",
266
+ error
267
+ })
268
+ })));
269
+ return this.arrayBufferEffect;
270
+ }
271
+ }
272
+ const removeHost = url => {
273
+ if (url[0] === "/") {
274
+ return url;
275
+ }
276
+ const index = url.indexOf("/", url.indexOf("//") + 2);
277
+ return index === -1 ? "/" : url.slice(index);
278
+ };
279
+
280
+ /**
281
+ * @since 1.0.0
282
+ *
283
+ * Also includes exports from [`@effect/platform/Http/Server`](https://effect-ts.github.io/platform/platform/Http/Server.ts.html).
284
+ */
285
+
286
+ /**
287
+ * @since 1.0.0
288
+ * @category constructors
289
+ */
290
+ const make = make$1;
291
+
292
+ /**
293
+ * @since 1.0.0
294
+ * @category layers
295
+ */
296
+ const layer = layer$1;
297
+
298
+ /**
299
+ * @since 1.0.0
300
+ * @category layers
301
+ */
302
+ const layerConfig = layerConfig$1;
303
+
304
+ var Server = /*#__PURE__*/_mergeNamespaces({
305
+ __proto__: null,
306
+ make: make,
307
+ layer: layer,
308
+ layerConfig: layerConfig
309
+ }, [Server__namespace]);
310
+
311
+ exports.Server = Server;
312
+ exports.layer = layer;
313
+ exports.layerConfig = layerConfig;
314
+ exports.make = make;
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var Sink$1 = require('@effect/platform-node/Sink');
4
+
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+
9
+ var Sink = /*#__PURE__*/Object.freeze({
10
+ __proto__: null,
11
+ fromWritable: Sink$1.fromWritable
12
+ });
13
+
14
+ exports.Sink = Sink;
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var Sink$1 = require('@effect/platform-node/Sink');
4
+
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+
9
+ var Sink = /*#__PURE__*/Object.freeze({
10
+ __proto__: null,
11
+ fromWritable: Sink$1.fromWritable
12
+ });
13
+
14
+ exports.Sink = Sink;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var Stream$1 = require('@effect/platform-node/Stream');
4
+
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+
9
+ var Stream = /*#__PURE__*/Object.freeze({
10
+ __proto__: null,
11
+ fromReadable: Stream$1.fromReadable,
12
+ toString: Stream$1.toString,
13
+ toUint8Array: Stream$1.toUint8Array
14
+ });
15
+
16
+ exports.Stream = Stream;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var Stream$1 = require('@effect/platform-node/Stream');
4
+
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+
9
+ var Stream = /*#__PURE__*/Object.freeze({
10
+ __proto__: null,
11
+ fromReadable: Stream$1.fromReadable,
12
+ toString: Stream$1.toString,
13
+ toUint8Array: Stream$1.toUint8Array
14
+ });
15
+
16
+ exports.Stream = Stream;