@effect/platform-node 0.19.2 → 0.19.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 (475) hide show
  1. package/Command/dist/effect-platform-node-Command.cjs.d.mts +2 -0
  2. package/Command/dist/effect-platform-node-Command.cjs.d.mts.map +1 -0
  3. package/Command/dist/effect-platform-node-Command.cjs.d.ts +2 -0
  4. package/Command/dist/effect-platform-node-Command.cjs.d.ts.map +1 -0
  5. package/Command/dist/effect-platform-node-Command.cjs.dev.js +72 -0
  6. package/Command/dist/effect-platform-node-Command.cjs.js +7 -0
  7. package/Command/dist/effect-platform-node-Command.cjs.mjs +18 -0
  8. package/Command/dist/effect-platform-node-Command.cjs.prod.js +72 -0
  9. package/Command/dist/effect-platform-node-Command.esm.js +5 -0
  10. package/Command/package.json +4 -0
  11. package/CommandExecutor/dist/effect-platform-node-CommandExecutor.cjs.d.mts +2 -0
  12. package/CommandExecutor/dist/effect-platform-node-CommandExecutor.cjs.d.mts.map +1 -0
  13. package/CommandExecutor/dist/effect-platform-node-CommandExecutor.cjs.d.ts +2 -0
  14. package/CommandExecutor/dist/effect-platform-node-CommandExecutor.cjs.d.ts.map +1 -0
  15. package/CommandExecutor/dist/effect-platform-node-CommandExecutor.cjs.dev.js +27 -0
  16. package/CommandExecutor/dist/effect-platform-node-CommandExecutor.cjs.js +7 -0
  17. package/CommandExecutor/dist/effect-platform-node-CommandExecutor.cjs.mjs +4 -0
  18. package/CommandExecutor/dist/effect-platform-node-CommandExecutor.cjs.prod.js +27 -0
  19. package/CommandExecutor/dist/effect-platform-node-CommandExecutor.esm.js +14 -0
  20. package/CommandExecutor/package.json +4 -0
  21. package/Effectify/dist/effect-platform-node-Effectify.cjs.d.mts +2 -0
  22. package/Effectify/dist/effect-platform-node-Effectify.cjs.d.mts.map +1 -0
  23. package/Effectify/dist/effect-platform-node-Effectify.cjs.d.ts +2 -0
  24. package/Effectify/dist/effect-platform-node-Effectify.cjs.d.ts.map +1 -0
  25. package/Effectify/dist/effect-platform-node-Effectify.cjs.dev.js +12 -0
  26. package/Effectify/dist/effect-platform-node-Effectify.cjs.js +7 -0
  27. package/Effectify/dist/effect-platform-node-Effectify.cjs.mjs +3 -0
  28. package/Effectify/dist/effect-platform-node-Effectify.cjs.prod.js +12 -0
  29. package/Effectify/dist/effect-platform-node-Effectify.esm.js +5 -0
  30. package/Effectify/package.json +4 -0
  31. package/Error/dist/effect-platform-node-Error.cjs.d.mts +2 -0
  32. package/Error/dist/effect-platform-node-Error.cjs.d.mts.map +1 -0
  33. package/Error/dist/effect-platform-node-Error.cjs.d.ts +2 -0
  34. package/Error/dist/effect-platform-node-Error.cjs.d.ts.map +1 -0
  35. package/Error/dist/effect-platform-node-Error.cjs.dev.js +28 -0
  36. package/Error/dist/effect-platform-node-Error.cjs.js +7 -0
  37. package/Error/dist/effect-platform-node-Error.cjs.mjs +7 -0
  38. package/Error/dist/effect-platform-node-Error.cjs.prod.js +28 -0
  39. package/Error/dist/effect-platform-node-Error.esm.js +5 -0
  40. package/Error/package.json +4 -0
  41. package/FileSystem/dist/effect-platform-node-FileSystem.cjs.d.mts +2 -0
  42. package/FileSystem/dist/effect-platform-node-FileSystem.cjs.d.mts.map +1 -0
  43. package/FileSystem/dist/effect-platform-node-FileSystem.cjs.d.ts +2 -0
  44. package/FileSystem/dist/effect-platform-node-FileSystem.cjs.d.ts.map +1 -0
  45. package/FileSystem/dist/effect-platform-node-FileSystem.cjs.dev.js +29 -0
  46. package/FileSystem/dist/effect-platform-node-FileSystem.cjs.js +7 -0
  47. package/FileSystem/dist/effect-platform-node-FileSystem.cjs.mjs +5 -0
  48. package/FileSystem/dist/effect-platform-node-FileSystem.cjs.prod.js +29 -0
  49. package/FileSystem/dist/effect-platform-node-FileSystem.esm.js +14 -0
  50. package/FileSystem/package.json +4 -0
  51. package/Http/Etag/dist/effect-platform-node-Http-Etag.cjs.d.mts +2 -0
  52. package/Http/Etag/dist/effect-platform-node-Http-Etag.cjs.d.mts.map +1 -0
  53. package/Http/Etag/dist/effect-platform-node-Http-Etag.cjs.d.ts +2 -0
  54. package/Http/Etag/dist/effect-platform-node-Http-Etag.cjs.d.ts.map +1 -0
  55. package/Http/Etag/dist/effect-platform-node-Http-Etag.cjs.dev.js +19 -0
  56. package/Http/Etag/dist/effect-platform-node-Http-Etag.cjs.js +7 -0
  57. package/Http/Etag/dist/effect-platform-node-Http-Etag.cjs.mjs +1 -0
  58. package/Http/Etag/dist/effect-platform-node-Http-Etag.cjs.prod.js +19 -0
  59. package/Http/Etag/dist/effect-platform-node-Http-Etag.esm.js +23 -0
  60. package/Http/Etag/package.json +4 -0
  61. package/Http/FormData/dist/effect-platform-node-Http-FormData.cjs.d.mts +2 -0
  62. package/Http/FormData/dist/effect-platform-node-Http-FormData.cjs.d.mts.map +1 -0
  63. package/Http/FormData/dist/effect-platform-node-Http-FormData.cjs.d.ts +2 -0
  64. package/Http/FormData/dist/effect-platform-node-Http-FormData.cjs.d.ts.map +1 -0
  65. package/Http/FormData/dist/effect-platform-node-Http-FormData.cjs.dev.js +31 -0
  66. package/Http/FormData/dist/effect-platform-node-Http-FormData.cjs.js +7 -0
  67. package/Http/FormData/dist/effect-platform-node-Http-FormData.cjs.mjs +1 -0
  68. package/Http/FormData/dist/effect-platform-node-Http-FormData.cjs.prod.js +31 -0
  69. package/Http/FormData/dist/effect-platform-node-Http-FormData.esm.js +23 -0
  70. package/Http/FormData/package.json +4 -0
  71. package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.cjs.d.mts +2 -0
  72. package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.cjs.d.mts.map +1 -0
  73. package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.cjs.d.ts +2 -0
  74. package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.cjs.d.ts.map +1 -0
  75. package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.cjs.dev.js +39 -0
  76. package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.cjs.js +7 -0
  77. package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.cjs.mjs +10 -0
  78. package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.cjs.prod.js +39 -0
  79. package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.esm.js +65 -0
  80. package/Http/NodeClient/package.json +4 -0
  81. package/Http/Platform/dist/effect-platform-node-Http-Platform.cjs.d.mts +2 -0
  82. package/Http/Platform/dist/effect-platform-node-Http-Platform.cjs.d.mts.map +1 -0
  83. package/Http/Platform/dist/effect-platform-node-Http-Platform.cjs.d.ts +2 -0
  84. package/Http/Platform/dist/effect-platform-node-Http-Platform.cjs.d.ts.map +1 -0
  85. package/Http/Platform/dist/effect-platform-node-Http-Platform.cjs.dev.js +51 -0
  86. package/Http/Platform/dist/effect-platform-node-Http-Platform.cjs.js +7 -0
  87. package/Http/Platform/dist/effect-platform-node-Http-Platform.cjs.mjs +1 -0
  88. package/Http/Platform/dist/effect-platform-node-Http-Platform.cjs.prod.js +51 -0
  89. package/{mjs/Http/Platform.mjs → Http/Platform/dist/effect-platform-node-Http-Platform.esm.js} +9 -8
  90. package/Http/Platform/package.json +4 -0
  91. package/Http/Server/dist/effect-platform-node-Http-Server.cjs.d.mts +2 -0
  92. package/Http/Server/dist/effect-platform-node-Http-Server.cjs.d.mts.map +1 -0
  93. package/Http/Server/dist/effect-platform-node-Http-Server.cjs.d.ts +2 -0
  94. package/Http/Server/dist/effect-platform-node-Http-Server.cjs.d.ts.map +1 -0
  95. package/Http/Server/dist/effect-platform-node-Http-Server.cjs.dev.js +61 -0
  96. package/Http/Server/dist/effect-platform-node-Http-Server.cjs.js +7 -0
  97. package/Http/Server/dist/effect-platform-node-Http-Server.cjs.mjs +1 -0
  98. package/Http/Server/dist/effect-platform-node-Http-Server.cjs.prod.js +61 -0
  99. package/Http/Server/dist/effect-platform-node-Http-Server.esm.js +29 -0
  100. package/Http/Server/package.json +4 -0
  101. package/HttpClient/dist/effect-platform-node-HttpClient.cjs.d.mts +2 -0
  102. package/HttpClient/dist/effect-platform-node-HttpClient.cjs.d.mts.map +1 -0
  103. package/HttpClient/dist/effect-platform-node-HttpClient.cjs.d.ts +2 -0
  104. package/HttpClient/dist/effect-platform-node-HttpClient.cjs.d.ts.map +1 -0
  105. package/HttpClient/dist/effect-platform-node-HttpClient.cjs.dev.js +67 -0
  106. package/HttpClient/dist/effect-platform-node-HttpClient.cjs.js +7 -0
  107. package/HttpClient/dist/effect-platform-node-HttpClient.cjs.mjs +10 -0
  108. package/HttpClient/dist/effect-platform-node-HttpClient.cjs.prod.js +67 -0
  109. package/HttpClient/dist/effect-platform-node-HttpClient.esm.js +20 -0
  110. package/HttpClient/package.json +4 -0
  111. package/HttpServer/dist/effect-platform-node-HttpServer.cjs.d.mts +2 -0
  112. package/HttpServer/dist/effect-platform-node-HttpServer.cjs.d.mts.map +1 -0
  113. package/HttpServer/dist/effect-platform-node-HttpServer.cjs.d.ts +2 -0
  114. package/HttpServer/dist/effect-platform-node-HttpServer.cjs.d.ts.map +1 -0
  115. package/HttpServer/dist/effect-platform-node-HttpServer.cjs.dev.js +96 -0
  116. package/HttpServer/dist/effect-platform-node-HttpServer.cjs.js +7 -0
  117. package/HttpServer/dist/effect-platform-node-HttpServer.cjs.mjs +14 -0
  118. package/HttpServer/dist/effect-platform-node-HttpServer.cjs.prod.js +96 -0
  119. package/HttpServer/dist/effect-platform-node-HttpServer.esm.js +28 -0
  120. package/HttpServer/package.json +4 -0
  121. package/KeyValueStore/dist/effect-platform-node-KeyValueStore.cjs.d.mts +2 -0
  122. package/KeyValueStore/dist/effect-platform-node-KeyValueStore.cjs.d.mts.map +1 -0
  123. package/KeyValueStore/dist/effect-platform-node-KeyValueStore.cjs.d.ts +2 -0
  124. package/KeyValueStore/dist/effect-platform-node-KeyValueStore.cjs.d.ts.map +1 -0
  125. package/KeyValueStore/dist/effect-platform-node-KeyValueStore.cjs.dev.js +32 -0
  126. package/KeyValueStore/dist/effect-platform-node-KeyValueStore.cjs.js +7 -0
  127. package/KeyValueStore/dist/effect-platform-node-KeyValueStore.cjs.mjs +1 -0
  128. package/KeyValueStore/dist/effect-platform-node-KeyValueStore.cjs.prod.js +32 -0
  129. package/KeyValueStore/dist/effect-platform-node-KeyValueStore.esm.js +19 -0
  130. package/KeyValueStore/package.json +4 -0
  131. package/NodeContext/dist/effect-platform-node-NodeContext.cjs.d.mts +2 -0
  132. package/NodeContext/dist/effect-platform-node-NodeContext.cjs.d.mts.map +1 -0
  133. package/NodeContext/dist/effect-platform-node-NodeContext.cjs.d.ts +2 -0
  134. package/NodeContext/dist/effect-platform-node-NodeContext.cjs.d.ts.map +1 -0
  135. package/NodeContext/dist/effect-platform-node-NodeContext.cjs.dev.js +33 -0
  136. package/NodeContext/dist/effect-platform-node-NodeContext.cjs.js +7 -0
  137. package/NodeContext/dist/effect-platform-node-NodeContext.cjs.mjs +3 -0
  138. package/NodeContext/dist/effect-platform-node-NodeContext.cjs.prod.js +33 -0
  139. package/NodeContext/dist/effect-platform-node-NodeContext.esm.js +22 -0
  140. package/NodeContext/package.json +4 -0
  141. package/Path/dist/effect-platform-node-Path.cjs.d.mts +2 -0
  142. package/Path/dist/effect-platform-node-Path.cjs.d.mts.map +1 -0
  143. package/Path/dist/effect-platform-node-Path.cjs.d.ts +2 -0
  144. package/Path/dist/effect-platform-node-Path.cjs.d.ts.map +1 -0
  145. package/Path/dist/effect-platform-node-Path.cjs.dev.js +21 -0
  146. package/Path/dist/effect-platform-node-Path.cjs.js +7 -0
  147. package/Path/dist/effect-platform-node-Path.cjs.mjs +6 -0
  148. package/Path/dist/effect-platform-node-Path.cjs.prod.js +21 -0
  149. package/Path/dist/effect-platform-node-Path.esm.js +26 -0
  150. package/Path/package.json +4 -0
  151. package/Runtime/dist/effect-platform-node-Runtime.cjs.d.mts +2 -0
  152. package/Runtime/dist/effect-platform-node-Runtime.cjs.d.mts.map +1 -0
  153. package/Runtime/dist/effect-platform-node-Runtime.cjs.d.ts +2 -0
  154. package/Runtime/dist/effect-platform-node-Runtime.cjs.d.ts.map +1 -0
  155. package/Runtime/dist/effect-platform-node-Runtime.cjs.dev.js +16 -0
  156. package/Runtime/dist/effect-platform-node-Runtime.cjs.js +7 -0
  157. package/Runtime/dist/effect-platform-node-Runtime.cjs.mjs +4 -0
  158. package/Runtime/dist/effect-platform-node-Runtime.cjs.prod.js +16 -0
  159. package/Runtime/dist/effect-platform-node-Runtime.esm.js +14 -0
  160. package/Runtime/package.json +4 -0
  161. package/Sink/dist/effect-platform-node-Sink.cjs.d.mts +2 -0
  162. package/Sink/dist/effect-platform-node-Sink.cjs.d.mts.map +1 -0
  163. package/Sink/dist/effect-platform-node-Sink.cjs.d.ts +2 -0
  164. package/Sink/dist/effect-platform-node-Sink.cjs.d.ts.map +1 -0
  165. package/Sink/dist/effect-platform-node-Sink.cjs.dev.js +13 -0
  166. package/Sink/dist/effect-platform-node-Sink.cjs.js +7 -0
  167. package/Sink/dist/effect-platform-node-Sink.cjs.mjs +3 -0
  168. package/Sink/dist/effect-platform-node-Sink.cjs.prod.js +13 -0
  169. package/Sink/dist/effect-platform-node-Sink.esm.js +18 -0
  170. package/Sink/package.json +4 -0
  171. package/Stream/dist/effect-platform-node-Stream.cjs.d.mts +2 -0
  172. package/Stream/dist/effect-platform-node-Stream.cjs.d.mts.map +1 -0
  173. package/Stream/dist/effect-platform-node-Stream.cjs.d.ts +2 -0
  174. package/Stream/dist/effect-platform-node-Stream.cjs.d.ts.map +1 -0
  175. package/Stream/dist/effect-platform-node-Stream.cjs.dev.js +16 -0
  176. package/Stream/dist/effect-platform-node-Stream.cjs.js +7 -0
  177. package/Stream/dist/effect-platform-node-Stream.cjs.mjs +5 -0
  178. package/Stream/dist/effect-platform-node-Stream.cjs.prod.js +16 -0
  179. package/Stream/dist/effect-platform-node-Stream.esm.js +30 -0
  180. package/Stream/package.json +4 -0
  181. package/dist/Command-15b84341.cjs.dev.js +29 -0
  182. package/dist/Command-2fc875e9.cjs.prod.js +29 -0
  183. package/dist/CommandExecutor-b7cb55b8.cjs.dev.js +195 -0
  184. package/dist/CommandExecutor-bccc7563.cjs.prod.js +195 -0
  185. package/dist/Effectify-1676f59e.cjs.prod.js +14 -0
  186. package/dist/Effectify-c94620ca.cjs.dev.js +14 -0
  187. package/dist/Error-004c8162.cjs.prod.js +18 -0
  188. package/dist/Error-6db0ba89.cjs.dev.js +18 -0
  189. package/dist/Etag-7a3db878.cjs.prod.js +112 -0
  190. package/dist/Etag-b38be81c.cjs.dev.js +112 -0
  191. package/dist/FileSystem-a207377d.cjs.prod.js +433 -0
  192. package/dist/FileSystem-d7b8eeac.cjs.dev.js +433 -0
  193. package/dist/FormData-053407d4.cjs.dev.js +67 -0
  194. package/dist/FormData-c7339a7b.cjs.prod.js +67 -0
  195. package/dist/HttpClient-595a26fa.cjs.prod.js +54 -0
  196. package/dist/HttpClient-6c942c00.cjs.dev.js +54 -0
  197. package/dist/HttpServer-2a788d37.cjs.prod.js +64 -0
  198. package/dist/HttpServer-cc291592.cjs.dev.js +64 -0
  199. package/dist/KeyValueStore-35cb6494.cjs.prod.js +62 -0
  200. package/dist/KeyValueStore-af7495b6.cjs.dev.js +62 -0
  201. package/dist/NodeClient-8db3bc84.cjs.prod.js +280 -0
  202. package/dist/NodeClient-ab5848bf.cjs.dev.js +280 -0
  203. package/dist/NodeContext-3c96e955.cjs.dev.js +50 -0
  204. package/dist/NodeContext-dff7bc0b.cjs.prod.js +50 -0
  205. package/dist/Path-bf4c3b07.cjs.prod.js +104 -0
  206. package/dist/Path-feae3dcf.cjs.dev.js +104 -0
  207. package/dist/Runtime-6aeac6f0.cjs.dev.js +68 -0
  208. package/dist/Runtime-e746c66d.cjs.prod.js +68 -0
  209. package/dist/Server-4638865c.cjs.prod.js +301 -0
  210. package/dist/Server-86853bf9.cjs.dev.js +301 -0
  211. package/dist/Sink-536c2b16.cjs.dev.js +26 -0
  212. package/dist/Sink-735101fa.cjs.prod.js +26 -0
  213. package/dist/Stream-53f57af5.cjs.dev.js +42 -0
  214. package/dist/Stream-7424efca.cjs.prod.js +42 -0
  215. package/dist/declarations/src/Command.d.ts.map +1 -0
  216. package/{CommandExecutor.d.ts → dist/declarations/src/CommandExecutor.d.ts} +3 -0
  217. package/dist/declarations/src/CommandExecutor.d.ts.map +1 -0
  218. package/dist/declarations/src/Effectify.d.ts.map +1 -0
  219. package/dist/declarations/src/Error.d.ts.map +1 -0
  220. package/dist/declarations/src/FileSystem.d.ts.map +1 -0
  221. package/{Http → dist/declarations/src/Http}/Etag.d.ts +5 -0
  222. package/dist/declarations/src/Http/Etag.d.ts.map +1 -0
  223. package/{Http → dist/declarations/src/Http}/FormData.d.ts +5 -0
  224. package/dist/declarations/src/Http/FormData.d.ts.map +1 -0
  225. package/{Http → dist/declarations/src/Http}/NodeClient.d.ts +3 -0
  226. package/dist/declarations/src/Http/NodeClient.d.ts.map +1 -0
  227. package/{Http → dist/declarations/src/Http}/Platform.d.ts +5 -0
  228. package/dist/declarations/src/Http/Platform.d.ts.map +1 -0
  229. package/{Http → dist/declarations/src/Http}/Server.d.ts +5 -0
  230. package/dist/declarations/src/Http/Server.d.ts.map +1 -0
  231. package/{HttpClient.d.ts → dist/declarations/src/HttpClient.d.ts} +1 -1
  232. package/dist/declarations/src/HttpClient.d.ts.map +1 -0
  233. package/{HttpServer.d.ts → dist/declarations/src/HttpServer.d.ts} +3 -3
  234. package/dist/declarations/src/HttpServer.d.ts.map +1 -0
  235. package/{KeyValueStore.d.ts → dist/declarations/src/KeyValueStore.d.ts} +5 -0
  236. package/dist/declarations/src/KeyValueStore.d.ts.map +1 -0
  237. package/{NodeContext.d.ts → dist/declarations/src/NodeContext.d.ts} +3 -6
  238. package/dist/declarations/src/NodeContext.d.ts.map +1 -0
  239. package/dist/declarations/src/Path.d.ts.map +1 -0
  240. package/{Runtime.d.ts → dist/declarations/src/Runtime.d.ts} +3 -0
  241. package/dist/declarations/src/Runtime.d.ts.map +1 -0
  242. package/dist/declarations/src/Sink.d.ts.map +1 -0
  243. package/{Stream.d.ts → dist/declarations/src/Stream.d.ts} +3 -0
  244. package/dist/declarations/src/Stream.d.ts.map +1 -0
  245. package/dist/declarations/src/index.d.ts +55 -0
  246. package/dist/declarations/src/index.d.ts.map +1 -0
  247. package/dist/effect-platform-node.cjs.d.mts +2 -0
  248. package/dist/effect-platform-node.cjs.d.mts.map +1 -0
  249. package/dist/effect-platform-node.cjs.d.ts +2 -0
  250. package/dist/effect-platform-node.cjs.d.ts.map +1 -0
  251. package/dist/effect-platform-node.cjs.dev.js +93 -0
  252. package/dist/effect-platform-node.cjs.js +7 -0
  253. package/dist/effect-platform-node.cjs.mjs +15 -0
  254. package/dist/effect-platform-node.cjs.prod.js +93 -0
  255. package/dist/effect-platform-node.esm.js +26 -0
  256. package/{internal/error.js → dist/error-4f074a3a.cjs.prod.js} +5 -8
  257. package/dist/error-e477c10b.cjs.dev.js +41 -0
  258. package/dist/formData-09ad7f6d.cjs.prod.js +141 -0
  259. package/dist/formData-fac89256.cjs.dev.js +141 -0
  260. package/dist/incomingMessage-28bc73d7.cjs.dev.js +85 -0
  261. package/dist/incomingMessage-ed443788.cjs.prod.js +85 -0
  262. package/dist/platform-1c31462c.cjs.dev.js +73 -0
  263. package/dist/platform-d09ef04f.cjs.prod.js +73 -0
  264. package/dist/sink-da49e187.cjs.prod.js +57 -0
  265. package/dist/sink-daf9e0e5.cjs.dev.js +57 -0
  266. package/dist/stream-1456ece0.cjs.dev.js +120 -0
  267. package/dist/stream-ef8b6a66.cjs.prod.js +120 -0
  268. package/{mjs/internal/commandExecutor.mjs → internal/commandExecutor.esm.js} +20 -15
  269. package/{mjs/internal/error.mjs → internal/error.esm.js} +5 -3
  270. package/{mjs/internal/fileSystem.mjs → internal/fileSystem.esm.js} +68 -20
  271. package/{mjs/internal/http/etag.mjs → internal/http/etag.esm.js} +10 -6
  272. package/{mjs/internal/http/formData.mjs → internal/http/formData.esm.js} +24 -23
  273. package/{mjs/internal/http/incomingMessage.mjs → internal/http/incomingMessage.esm.js} +14 -13
  274. package/{mjs/internal/http/nodeClient.mjs → internal/http/nodeClient.esm.js} +34 -26
  275. package/{mjs/internal/http/platform.mjs → internal/http/platform.esm.js} +16 -13
  276. package/{mjs/internal/http/server.mjs → internal/http/server.esm.js} +30 -27
  277. package/{mjs/internal/path.mjs → internal/path.esm.js} +15 -10
  278. package/{mjs/internal/runtime.mjs → internal/runtime.esm.js} +7 -5
  279. package/{mjs/internal/sink.mjs → internal/sink.esm.js} +7 -5
  280. package/{mjs/internal/stream.mjs → internal/stream.esm.js} +13 -8
  281. package/package.json +174 -31
  282. package/src/CommandExecutor.ts +1 -1
  283. package/src/FileSystem.ts +1 -1
  284. package/src/Http/Etag.ts +1 -1
  285. package/src/Http/FormData.ts +1 -1
  286. package/src/Http/NodeClient.ts +1 -1
  287. package/src/Http/Platform.ts +1 -1
  288. package/src/Http/Server.ts +1 -1
  289. package/src/HttpClient.ts +1 -1
  290. package/src/HttpServer.ts +3 -3
  291. package/src/KeyValueStore.ts +2 -2
  292. package/src/NodeContext.ts +3 -3
  293. package/src/Path.ts +1 -1
  294. package/src/Runtime.ts +1 -1
  295. package/src/Sink.ts +1 -1
  296. package/src/Stream.ts +1 -1
  297. package/src/index.ts +13 -13
  298. package/src/internal/commandExecutor.ts +3 -3
  299. package/src/internal/fileSystem.ts +1 -1
  300. package/src/internal/http/formData.ts +1 -1
  301. package/src/internal/http/incomingMessage.ts +1 -1
  302. package/src/internal/http/nodeClient.ts +3 -3
  303. package/src/internal/http/platform.ts +2 -2
  304. package/src/internal/http/server.ts +4 -4
  305. package/src/internal/sink.ts +1 -1
  306. package/src/internal/stream.ts +1 -1
  307. package/Command.d.ts.map +0 -1
  308. package/Command.js +0 -103
  309. package/Command.js.map +0 -1
  310. package/CommandExecutor.d.ts.map +0 -1
  311. package/CommandExecutor.js +0 -26
  312. package/CommandExecutor.js.map +0 -1
  313. package/Effectify.d.ts.map +0 -1
  314. package/Effectify.js +0 -13
  315. package/Effectify.js.map +0 -1
  316. package/Error.d.ts.map +0 -1
  317. package/Error.js +0 -25
  318. package/Error.js.map +0 -1
  319. package/FileSystem.d.ts.map +0 -1
  320. package/FileSystem.js +0 -32
  321. package/FileSystem.js.map +0 -1
  322. package/Http/Etag.d.ts.map +0 -1
  323. package/Http/Etag.js +0 -46
  324. package/Http/Etag.js.map +0 -1
  325. package/Http/FormData.d.ts.map +0 -1
  326. package/Http/FormData.js +0 -46
  327. package/Http/FormData.js.map +0 -1
  328. package/Http/NodeClient.d.ts.map +0 -1
  329. package/Http/NodeClient.js +0 -54
  330. package/Http/NodeClient.js.map +0 -1
  331. package/Http/Platform.d.ts.map +0 -1
  332. package/Http/Platform.js +0 -46
  333. package/Http/Platform.js.map +0 -1
  334. package/Http/Server.d.ts.map +0 -1
  335. package/Http/Server.js +0 -52
  336. package/Http/Server.js.map +0 -1
  337. package/HttpClient.d.ts.map +0 -1
  338. package/HttpClient.js +0 -25
  339. package/HttpClient.js.map +0 -1
  340. package/HttpServer.d.ts.map +0 -1
  341. package/HttpServer.js +0 -33
  342. package/HttpServer.js.map +0 -1
  343. package/KeyValueStore.d.ts.map +0 -1
  344. package/KeyValueStore.js +0 -43
  345. package/KeyValueStore.js.map +0 -1
  346. package/NodeContext.d.ts.map +0 -1
  347. package/NodeContext.js +0 -23
  348. package/NodeContext.js.map +0 -1
  349. package/Path.d.ts.map +0 -1
  350. package/Path.js +0 -36
  351. package/Path.js.map +0 -1
  352. package/Runtime.d.ts.map +0 -1
  353. package/Runtime.js +0 -26
  354. package/Runtime.js.map +0 -1
  355. package/Sink.d.ts.map +0 -1
  356. package/Sink.js +0 -19
  357. package/Sink.js.map +0 -1
  358. package/Stream.d.ts.map +0 -1
  359. package/Stream.js +0 -29
  360. package/Stream.js.map +0 -1
  361. package/index.d.ts +0 -55
  362. package/index.d.ts.map +0 -1
  363. package/index.js +0 -35
  364. package/index.js.map +0 -1
  365. package/internal/commandExecutor.d.ts +0 -2
  366. package/internal/commandExecutor.d.ts.map +0 -1
  367. package/internal/commandExecutor.js +0 -151
  368. package/internal/commandExecutor.js.map +0 -1
  369. package/internal/error.d.ts +0 -2
  370. package/internal/error.d.ts.map +0 -1
  371. package/internal/error.js.map +0 -1
  372. package/internal/fileSystem.d.ts +0 -2
  373. package/internal/fileSystem.d.ts.map +0 -1
  374. package/internal/fileSystem.js +0 -345
  375. package/internal/fileSystem.js.map +0 -1
  376. package/internal/http/etag.d.ts +0 -2
  377. package/internal/http/etag.d.ts.map +0 -1
  378. package/internal/http/etag.js +0 -51
  379. package/internal/http/etag.js.map +0 -1
  380. package/internal/http/formData.d.ts +0 -6
  381. package/internal/http/formData.d.ts.map +0 -1
  382. package/internal/http/formData.js +0 -116
  383. package/internal/http/formData.js.map +0 -1
  384. package/internal/http/incomingMessage.d.ts +0 -2
  385. package/internal/http/incomingMessage.d.ts.map +0 -1
  386. package/internal/http/incomingMessage.js +0 -66
  387. package/internal/http/incomingMessage.js.map +0 -1
  388. package/internal/http/nodeClient.d.ts +0 -2
  389. package/internal/http/nodeClient.d.ts.map +0 -1
  390. package/internal/http/nodeClient.js +0 -169
  391. package/internal/http/nodeClient.js.map +0 -1
  392. package/internal/http/platform.d.ts +0 -2
  393. package/internal/http/platform.d.ts.map +0 -1
  394. package/internal/http/platform.js +0 -50
  395. package/internal/http/platform.js.map +0 -1
  396. package/internal/http/server.d.ts +0 -2
  397. package/internal/http/server.d.ts.map +0 -1
  398. package/internal/http/server.js +0 -226
  399. package/internal/http/server.js.map +0 -1
  400. package/internal/path.d.ts +0 -2
  401. package/internal/path.d.ts.map +0 -1
  402. package/internal/path.js +0 -49
  403. package/internal/path.js.map +0 -1
  404. package/internal/runtime.d.ts +0 -2
  405. package/internal/runtime.d.ts.map +0 -1
  406. package/internal/runtime.js +0 -35
  407. package/internal/runtime.js.map +0 -1
  408. package/internal/sink.d.ts +0 -2
  409. package/internal/sink.d.ts.map +0 -1
  410. package/internal/sink.js +0 -41
  411. package/internal/sink.js.map +0 -1
  412. package/internal/stream.d.ts +0 -2
  413. package/internal/stream.d.ts.map +0 -1
  414. package/internal/stream.js +0 -100
  415. package/internal/stream.js.map +0 -1
  416. package/mjs/Command.mjs +0 -85
  417. package/mjs/Command.mjs.map +0 -1
  418. package/mjs/CommandExecutor.mjs +0 -16
  419. package/mjs/CommandExecutor.mjs.map +0 -1
  420. package/mjs/Effectify.mjs +0 -10
  421. package/mjs/Effectify.mjs.map +0 -1
  422. package/mjs/Error.mjs +0 -20
  423. package/mjs/Error.mjs.map +0 -1
  424. package/mjs/FileSystem.mjs +0 -21
  425. package/mjs/FileSystem.mjs.map +0 -1
  426. package/mjs/Http/Etag.mjs +0 -21
  427. package/mjs/Http/Etag.mjs.map +0 -1
  428. package/mjs/Http/FormData.mjs +0 -21
  429. package/mjs/Http/FormData.mjs.map +0 -1
  430. package/mjs/Http/NodeClient.mjs +0 -45
  431. package/mjs/Http/NodeClient.mjs.map +0 -1
  432. package/mjs/Http/Platform.mjs.map +0 -1
  433. package/mjs/Http/Server.mjs +0 -26
  434. package/mjs/Http/Server.mjs.map +0 -1
  435. package/mjs/HttpClient.mjs +0 -69
  436. package/mjs/HttpClient.mjs.map +0 -1
  437. package/mjs/HttpServer.mjs +0 -101
  438. package/mjs/HttpServer.mjs.map +0 -1
  439. package/mjs/KeyValueStore.mjs +0 -19
  440. package/mjs/KeyValueStore.mjs.map +0 -1
  441. package/mjs/NodeContext.mjs +0 -14
  442. package/mjs/NodeContext.mjs.map +0 -1
  443. package/mjs/Path.mjs +0 -26
  444. package/mjs/Path.mjs.map +0 -1
  445. package/mjs/Runtime.mjs +0 -16
  446. package/mjs/Runtime.mjs.map +0 -1
  447. package/mjs/Sink.mjs +0 -10
  448. package/mjs/Sink.mjs.map +0 -1
  449. package/mjs/Stream.mjs +0 -20
  450. package/mjs/Stream.mjs.map +0 -1
  451. package/mjs/index.mjs +0 -27
  452. package/mjs/index.mjs.map +0 -1
  453. package/mjs/internal/commandExecutor.mjs.map +0 -1
  454. package/mjs/internal/error.mjs.map +0 -1
  455. package/mjs/internal/fileSystem.mjs.map +0 -1
  456. package/mjs/internal/http/etag.mjs.map +0 -1
  457. package/mjs/internal/http/formData.mjs.map +0 -1
  458. package/mjs/internal/http/incomingMessage.mjs.map +0 -1
  459. package/mjs/internal/http/nodeClient.mjs.map +0 -1
  460. package/mjs/internal/http/platform.mjs.map +0 -1
  461. package/mjs/internal/http/server.mjs.map +0 -1
  462. package/mjs/internal/path.mjs.map +0 -1
  463. package/mjs/internal/runtime.mjs.map +0 -1
  464. package/mjs/internal/sink.mjs.map +0 -1
  465. package/mjs/internal/stream.mjs.map +0 -1
  466. package/tsconfig.build.json +0 -11
  467. package/tsconfig.examples.json +0 -12
  468. package/tsconfig.json +0 -11
  469. package/tsconfig.test.json +0 -17
  470. /package/{Command.d.ts → dist/declarations/src/Command.d.ts} +0 -0
  471. /package/{Effectify.d.ts → dist/declarations/src/Effectify.d.ts} +0 -0
  472. /package/{Error.d.ts → dist/declarations/src/Error.d.ts} +0 -0
  473. /package/{FileSystem.d.ts → dist/declarations/src/FileSystem.d.ts} +0 -0
  474. /package/{Path.d.ts → dist/declarations/src/Path.d.ts} +0 -0
  475. /package/{Sink.d.ts → dist/declarations/src/Sink.d.ts} +0 -0
@@ -1,21 +1,24 @@
1
- import { handleErrnoException } from "@effect/platform-node/internal/error";
2
- import { effectify } from "@effect/platform/Effectify";
3
- import * as Error from "@effect/platform/Error";
4
- import * as FileSystem from "@effect/platform/FileSystem";
5
- import * as Effect from "effect/Effect";
6
- import { pipe } from "effect/Function";
7
- import * as Layer from "effect/Layer";
8
- import * as Option from "effect/Option";
9
- import * as Crypto from "node:crypto";
10
- import * as NFS from "node:fs";
11
- import * as OS from "node:os";
12
- import * as Path from "node:path";
1
+ import { effectify } from '@effect/platform/Effectify';
2
+ import * as Error from '@effect/platform/Error';
3
+ import * as FileSystem from '@effect/platform/FileSystem';
4
+ import * as Effect from 'effect/Effect';
5
+ import { pipe } from 'effect/Function';
6
+ import * as Layer from 'effect/Layer';
7
+ import * as Option from 'effect/Option';
8
+ import * as Crypto from 'node:crypto';
9
+ import * as NFS from 'node:fs';
10
+ import * as OS from 'node:os';
11
+ import * as NodePath from 'node:path';
12
+ import { handleErrnoException } from './error.esm.js';
13
+
13
14
  const handleBadArgument = method => err => Error.BadArgument({
14
15
  module: "FileSystem",
15
16
  method,
16
17
  message: err.message ?? String(err)
17
18
  });
19
+
18
20
  // == access
21
+
19
22
  const access = /*#__PURE__*/(() => {
20
23
  const nodeAccess = /*#__PURE__*/effectify(NFS.access, /*#__PURE__*/handleErrnoException("FileSystem", "access"), /*#__PURE__*/handleBadArgument("access"));
21
24
  return (path, options) => {
@@ -29,7 +32,9 @@ const access = /*#__PURE__*/(() => {
29
32
  return nodeAccess(path, mode);
30
33
  };
31
34
  })();
35
+
32
36
  // == copy
37
+
33
38
  const copy = /*#__PURE__*/(() => {
34
39
  const nodeCp = /*#__PURE__*/effectify(NFS.cp, /*#__PURE__*/handleErrnoException("FileSystem", "copy"), /*#__PURE__*/handleBadArgument("copy"));
35
40
  return (fromPath, toPath, options) => nodeCp(fromPath, toPath, {
@@ -38,27 +43,37 @@ const copy = /*#__PURE__*/(() => {
38
43
  recursive: true
39
44
  });
40
45
  })();
46
+
41
47
  // == copyFile
48
+
42
49
  const copyFile = /*#__PURE__*/(() => {
43
50
  const nodeCopyFile = /*#__PURE__*/effectify(NFS.copyFile, /*#__PURE__*/handleErrnoException("FileSystem", "copyFile"), /*#__PURE__*/handleBadArgument("copyFile"));
44
51
  return (fromPath, toPath) => nodeCopyFile(fromPath, toPath);
45
52
  })();
53
+
46
54
  // == chmod
55
+
47
56
  const chmod = /*#__PURE__*/(() => {
48
57
  const nodeChmod = /*#__PURE__*/effectify(NFS.chmod, /*#__PURE__*/handleErrnoException("FileSystem", "chmod"), /*#__PURE__*/handleBadArgument("chmod"));
49
58
  return (path, mode) => nodeChmod(path, mode);
50
59
  })();
60
+
51
61
  // == chown
62
+
52
63
  const chown = /*#__PURE__*/(() => {
53
64
  const nodeChown = /*#__PURE__*/effectify(NFS.chown, /*#__PURE__*/handleErrnoException("FileSystem", "chown"), /*#__PURE__*/handleBadArgument("chown"));
54
65
  return (path, uid, gid) => nodeChown(path, uid, gid);
55
66
  })();
67
+
56
68
  // == link
69
+
57
70
  const link = /*#__PURE__*/(() => {
58
71
  const nodeLink = /*#__PURE__*/effectify(NFS.link, /*#__PURE__*/handleErrnoException("FileSystem", "link"), /*#__PURE__*/handleBadArgument("link"));
59
72
  return (existingPath, newPath) => nodeLink(existingPath, newPath);
60
73
  })();
74
+
61
75
  // == makeDirectory
76
+
62
77
  const makeDirectory = /*#__PURE__*/(() => {
63
78
  const nodeMkdir = /*#__PURE__*/effectify(NFS.mkdir, /*#__PURE__*/handleErrnoException("FileSystem", "makeDirectory"), /*#__PURE__*/handleBadArgument("makeDirectory"));
64
79
  return (path, options) => nodeMkdir(path, {
@@ -66,17 +81,21 @@ const makeDirectory = /*#__PURE__*/(() => {
66
81
  mode: options?.mode
67
82
  });
68
83
  })();
84
+
69
85
  // == makeTempDirectory
86
+
70
87
  const makeTempDirectoryFactory = method => {
71
88
  const nodeMkdtemp = effectify(NFS.mkdtemp, handleErrnoException("FileSystem", method), handleBadArgument(method));
72
89
  return options => Effect.suspend(() => {
73
90
  const prefix = options?.prefix ?? "";
74
- const directory = typeof options?.directory === "string" ? Path.join(options.directory, ".") : OS.tmpdir();
75
- return nodeMkdtemp(prefix ? Path.join(directory, prefix) : directory + "/");
91
+ const directory = typeof options?.directory === "string" ? NodePath.join(options.directory, ".") : OS.tmpdir();
92
+ return nodeMkdtemp(prefix ? NodePath.join(directory, prefix) : directory + "/");
76
93
  });
77
94
  };
78
95
  const makeTempDirectory = /*#__PURE__*/makeTempDirectoryFactory("makeTempDirectory");
96
+
79
97
  // == remove
98
+
80
99
  const removeFactory = method => {
81
100
  const nodeRm = effectify(NFS.rm, handleErrnoException("FileSystem", method), handleBadArgument(method));
82
101
  return (path, options) => nodeRm(path, {
@@ -84,7 +103,9 @@ const removeFactory = method => {
84
103
  });
85
104
  };
86
105
  const remove = /*#__PURE__*/removeFactory("remove");
106
+
87
107
  // == makeTempDirectoryScoped
108
+
88
109
  const makeTempDirectoryScoped = /*#__PURE__*/(() => {
89
110
  const makeDirectory = /*#__PURE__*/makeTempDirectoryFactory("makeTempDirectoryScoped");
90
111
  const removeDirectory = /*#__PURE__*/removeFactory("makeTempDirectoryScoped");
@@ -92,7 +113,9 @@ const makeTempDirectoryScoped = /*#__PURE__*/(() => {
92
113
  recursive: true
93
114
  })));
94
115
  })();
116
+
95
117
  // == open
118
+
96
119
  const openFactory = method => {
97
120
  const nodeOpen = effectify(NFS.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
98
121
  const nodeClose = effectify(NFS.close, handleErrnoException("FileSystem", method), handleBadArgument(method));
@@ -109,11 +132,11 @@ const makeFile = /*#__PURE__*/(() => {
109
132
  const nodeWrite = /*#__PURE__*/nodeWriteFactory("write");
110
133
  const nodeWriteAll = /*#__PURE__*/nodeWriteFactory("writeAll");
111
134
  class FileImpl {
135
+ semaphore = Effect.unsafeMakeSemaphore(1);
136
+ position = 0n;
112
137
  constructor(fd, append) {
113
138
  this.fd = fd;
114
139
  this.append = append;
115
- this.semaphore = Effect.unsafeMakeSemaphore(1);
116
- this.position = 0n;
117
140
  this[FileSystem.FileTypeId] = FileSystem.FileTypeId;
118
141
  }
119
142
  get stat() {
@@ -198,31 +221,38 @@ const makeFile = /*#__PURE__*/(() => {
198
221
  return this.semaphore.withPermits(1)(this.writeAllChunk(buffer));
199
222
  }
200
223
  }
201
- FileSystem.FileTypeId;
202
224
  return (fd, append) => new FileImpl(fd, append);
203
225
  })();
226
+
204
227
  // == makeTempFile
228
+
205
229
  const makeTempFileFactory = method => {
206
230
  const makeDirectory = makeTempDirectoryFactory(method);
207
231
  const open = openFactory(method);
208
232
  const randomHexString = bytes => Effect.sync(() => Crypto.randomBytes(bytes).toString("hex"));
209
- return options => pipe(Effect.zip(makeDirectory(options), randomHexString(6)), Effect.map(([directory, random]) => Path.join(directory, random)), Effect.tap(path => Effect.scoped(open(path, {
233
+ return options => pipe(Effect.zip(makeDirectory(options), randomHexString(6)), Effect.map(([directory, random]) => NodePath.join(directory, random)), Effect.tap(path => Effect.scoped(open(path, {
210
234
  flag: "w+"
211
235
  }))));
212
236
  };
213
237
  const makeTempFile = /*#__PURE__*/makeTempFileFactory("makeTempFile");
238
+
214
239
  // == makeTempFileScoped
240
+
215
241
  const makeTempFileScoped = /*#__PURE__*/(() => {
216
242
  const makeFile = /*#__PURE__*/makeTempFileFactory("makeTempFileScoped");
217
243
  const removeFile = /*#__PURE__*/removeFactory("makeTempFileScoped");
218
244
  return options => Effect.acquireRelease(makeFile(options), file => Effect.orDie(removeFile(file)));
219
245
  })();
246
+
220
247
  // == readDirectory
248
+
221
249
  const readDirectory = /*#__PURE__*/(() => {
222
250
  const nodeReadDirectory = /*#__PURE__*/effectify(NFS.readdir, /*#__PURE__*/handleErrnoException("FileSystem", "readDirectory"), /*#__PURE__*/handleBadArgument("readDirectory"));
223
251
  return (path, options) => nodeReadDirectory(path, options);
224
252
  })();
253
+
225
254
  // == readFile
255
+
226
256
  const readFile = path => Effect.async((resume, signal) => {
227
257
  try {
228
258
  NFS.readFile(path, {
@@ -238,22 +268,30 @@ const readFile = path => Effect.async((resume, signal) => {
238
268
  resume(Effect.fail(handleBadArgument("readFile")(err)));
239
269
  }
240
270
  });
271
+
241
272
  // == readLink
273
+
242
274
  const readLink = /*#__PURE__*/(() => {
243
275
  const nodeReadLink = /*#__PURE__*/effectify(NFS.readlink, /*#__PURE__*/handleErrnoException("FileSystem", "readLink"), /*#__PURE__*/handleBadArgument("readLink"));
244
276
  return path => nodeReadLink(path);
245
277
  })();
278
+
246
279
  // == realPath
280
+
247
281
  const realPath = /*#__PURE__*/(() => {
248
282
  const nodeRealPath = /*#__PURE__*/effectify(NFS.realpath, /*#__PURE__*/handleErrnoException("FileSystem", "realPath"), /*#__PURE__*/handleBadArgument("realPath"));
249
283
  return path => nodeRealPath(path);
250
284
  })();
285
+
251
286
  // == rename
287
+
252
288
  const rename = /*#__PURE__*/(() => {
253
289
  const nodeRename = /*#__PURE__*/effectify(NFS.rename, /*#__PURE__*/handleErrnoException("FileSystem", "rename"), /*#__PURE__*/handleBadArgument("rename"));
254
290
  return (oldPath, newPath) => nodeRename(oldPath, newPath);
255
291
  })();
292
+
256
293
  // == stat
294
+
257
295
  const makeFileInfo = stat => ({
258
296
  type: stat.isFile() ? "File" : stat.isDirectory() ? "Directory" : stat.isSymbolicLink() ? "SymbolicLink" : stat.isBlockDevice() ? "BlockDevice" : stat.isCharacterDevice() ? "CharacterDevice" : stat.isFIFO() ? "FIFO" : stat.isSocket() ? "Socket" : "Unknown",
259
297
  mtime: Option.fromNullable(stat.mtime),
@@ -274,22 +312,30 @@ const stat = /*#__PURE__*/(() => {
274
312
  const nodeStat = /*#__PURE__*/effectify(NFS.stat, /*#__PURE__*/handleErrnoException("FileSystem", "stat"), /*#__PURE__*/handleBadArgument("stat"));
275
313
  return path => Effect.map(nodeStat(path), makeFileInfo);
276
314
  })();
315
+
277
316
  // == symlink
317
+
278
318
  const symlink = /*#__PURE__*/(() => {
279
319
  const nodeSymlink = /*#__PURE__*/effectify(NFS.symlink, /*#__PURE__*/handleErrnoException("FileSystem", "symlink"), /*#__PURE__*/handleBadArgument("symlink"));
280
320
  return (target, path) => nodeSymlink(target, path);
281
321
  })();
322
+
282
323
  // == truncate
324
+
283
325
  const truncate = /*#__PURE__*/(() => {
284
326
  const nodeTruncate = /*#__PURE__*/effectify(NFS.truncate, /*#__PURE__*/handleErrnoException("FileSystem", "truncate"), /*#__PURE__*/handleBadArgument("truncate"));
285
327
  return (path, length) => nodeTruncate(path, length !== undefined ? Number(length) : undefined);
286
328
  })();
329
+
287
330
  // == utimes
331
+
288
332
  const utimes = /*#__PURE__*/(() => {
289
333
  const nodeUtimes = /*#__PURE__*/effectify(NFS.utimes, /*#__PURE__*/handleErrnoException("FileSystem", "utime"), /*#__PURE__*/handleBadArgument("utime"));
290
334
  return (path, atime, mtime) => nodeUtimes(path, atime, mtime);
291
335
  })();
336
+
292
337
  // == writeFile
338
+
293
339
  const writeFile = (path, data, options) => Effect.async((resume, signal) => {
294
340
  try {
295
341
  NFS.writeFile(path, data, {
@@ -332,6 +378,8 @@ const fileSystemImpl = /*#__PURE__*/FileSystem.make({
332
378
  utimes,
333
379
  writeFile
334
380
  });
381
+
335
382
  /** @internal */
336
- export const layer = /*#__PURE__*/Layer.succeed(FileSystem.FileSystem, fileSystemImpl);
337
- //# sourceMappingURL=fileSystem.mjs.map
383
+ const layer = /*#__PURE__*/Layer.succeed(FileSystem.FileSystem, fileSystemImpl);
384
+
385
+ export { layer };
@@ -1,6 +1,7 @@
1
- import * as Etag from "@effect/platform/Http/Etag";
2
- import * as Effect from "effect/Effect";
3
- import * as Layer from "effect/Layer";
1
+ import * as Etag from '@effect/platform/Http/Etag';
2
+ import * as Effect from 'effect/Effect';
3
+ import * as Layer from 'effect/Layer';
4
+
4
5
  const fromFileInfo = info => {
5
6
  const mtime = info.mtime._tag === "Some" ? info.mtime.value.getTime().toString(16) : "0";
6
7
  return `${info.size.toString(16)}-${mtime}`;
@@ -8,8 +9,9 @@ const fromFileInfo = info => {
8
9
  const fromFileWeb = file => {
9
10
  return `${file.size.toString(16)}-${file.lastModified.toString(16)}`;
10
11
  };
12
+
11
13
  /** @internal */
12
- export const layer = /*#__PURE__*/Layer.succeed(Etag.Generator, /*#__PURE__*/Etag.Generator.of({
14
+ const layer = /*#__PURE__*/Layer.succeed(Etag.Generator, /*#__PURE__*/Etag.Generator.of({
13
15
  [Etag.GeneratorTypeId]: Etag.GeneratorTypeId,
14
16
  fromFileInfo(info) {
15
17
  return Effect.sync(() => ({
@@ -24,8 +26,9 @@ export const layer = /*#__PURE__*/Layer.succeed(Etag.Generator, /*#__PURE__*/Eta
24
26
  }));
25
27
  }
26
28
  }));
29
+
27
30
  /** @internal */
28
- export const layerWeak = /*#__PURE__*/Layer.succeed(Etag.Generator, /*#__PURE__*/Etag.Generator.of({
31
+ const layerWeak = /*#__PURE__*/Layer.succeed(Etag.Generator, /*#__PURE__*/Etag.Generator.of({
29
32
  [Etag.GeneratorTypeId]: Etag.GeneratorTypeId,
30
33
  fromFileInfo(info) {
31
34
  return Effect.sync(() => ({
@@ -40,4 +43,5 @@ export const layerWeak = /*#__PURE__*/Layer.succeed(Etag.Generator, /*#__PURE__*
40
43
  }));
41
44
  }
42
45
  }));
43
- //# sourceMappingURL=etag.mjs.map
46
+
47
+ export { layer, layerWeak };
@@ -1,17 +1,18 @@
1
- import * as NodeStream from "@effect/platform-node/Stream";
2
- import * as FileSystem from "@effect/platform/FileSystem";
3
- import * as FormData from "@effect/platform/Http/FormData";
4
- import * as Path from "@effect/platform/Path";
5
- import Busboy from "busboy";
6
- import * as Chunk from "effect/Chunk";
7
- import * as Effect from "effect/Effect";
8
- import * as FiberRef from "effect/FiberRef";
9
- import { pipe } from "effect/Function";
10
- import * as Option from "effect/Option";
11
- import * as Stream from "effect/Stream";
12
- import * as NodeFs from "node:fs";
13
- import * as NodeStreamP from "node:stream/promises";
14
- export const stream = (source, headers) => pipe(Effect.Do, Effect.bind("maxParts", () => FiberRef.get(FormData.maxParts)), Effect.bind("maxFields", () => FiberRef.get(FormData.maxFields)), Effect.bind("maxFiles", () => FiberRef.get(FormData.maxFiles)), Effect.bind("fieldMimeTypes", () => FiberRef.get(FormData.fieldMimeTypes)), Effect.bind("maxFieldSize", () => FiberRef.get(FormData.maxFieldSize)), Effect.bind("maxFileSize", () => FiberRef.get(FormData.maxFileSize)), Effect.bind("busboy", ({
1
+ import * as FileSystem from '@effect/platform/FileSystem';
2
+ import * as FormData from '@effect/platform/Http/FormData';
3
+ import * as Path from '@effect/platform/Path';
4
+ import Busboy from 'busboy';
5
+ import * as Chunk from 'effect/Chunk';
6
+ import * as Effect from 'effect/Effect';
7
+ import * as FiberRef from 'effect/FiberRef';
8
+ import { pipe } from 'effect/Function';
9
+ import * as Option from 'effect/Option';
10
+ import * as Stream from 'effect/Stream';
11
+ import * as NFS from 'node:fs';
12
+ import * as NodeStreamP from 'node:stream/promises';
13
+ import { fromReadable, toString } from '../../Stream/dist/effect-platform-node-Stream.esm.js';
14
+
15
+ const stream = (source, headers) => pipe(Effect.Do, Effect.bind("maxParts", () => FiberRef.get(FormData.maxParts)), Effect.bind("maxFields", () => FiberRef.get(FormData.maxFields)), Effect.bind("maxFiles", () => FiberRef.get(FormData.maxFiles)), Effect.bind("fieldMimeTypes", () => FiberRef.get(FormData.fieldMimeTypes)), Effect.bind("maxFieldSize", () => FiberRef.get(FormData.maxFieldSize)), Effect.bind("maxFileSize", () => FiberRef.get(FormData.maxFileSize)), Effect.bind("busboy", ({
15
16
  maxFieldSize,
16
17
  maxFields,
17
18
  maxFileSize,
@@ -46,7 +47,7 @@ export const stream = (source, headers) => pipe(Effect.Do, Effect.bind("maxParts
46
47
  stream.once("limit", () => {
47
48
  emit.fail(FormData.FormDataError("FileTooLarge", new Error("maxFileSize exceeded")));
48
49
  });
49
- emit.single(new FileImpl(name, info.filename, info.mimeType, NodeStream.fromReadable(() => stream, error => FormData.FormDataError("InternalError", error)), stream));
50
+ emit.single(new FileImpl(name, info.filename, info.mimeType, fromReadable(() => stream, error => FormData.FormDataError("InternalError", error)), stream));
50
51
  });
51
52
  busboy.on("error", _ => {
52
53
  emit.fail(FormData.FormDataError("InternalError", _));
@@ -55,34 +56,33 @@ export const stream = (source, headers) => pipe(Effect.Do, Effect.bind("maxParts
55
56
  emit.end();
56
57
  });
57
58
  source.pipe(busboy);
58
- }), part => part._tag === "File" && Chunk.some(fieldMimeTypes, _ => part.contentType.includes(_)) ? Effect.map(NodeStream.toString({
59
+ }), part => part._tag === "File" && Chunk.some(fieldMimeTypes, _ => part.contentType.includes(_)) ? Effect.map(toString({
59
60
  readable: () => part.source,
60
61
  onFailure: error => FormData.FormDataError("InternalError", error)
61
62
  }), content => new FieldImpl(part.key, part.contentType, content)) : Effect.succeed(part))), Stream.unwrapScoped);
62
63
  class FieldImpl {
64
+ _tag = "Field";
63
65
  constructor(key, contentType, value) {
64
66
  this.key = key;
65
67
  this.contentType = contentType;
66
68
  this.value = value;
67
- this._tag = "Field";
68
69
  this[FormData.TypeId] = FormData.TypeId;
69
70
  }
70
71
  }
71
- FormData.TypeId;
72
72
  class FileImpl {
73
+ _tag = "File";
73
74
  constructor(key, name, contentType, content, source) {
74
75
  this.key = key;
75
76
  this.name = name;
76
77
  this.contentType = contentType;
77
78
  this.content = content;
78
79
  this.source = source;
79
- this._tag = "File";
80
80
  this[FormData.TypeId] = FormData.TypeId;
81
81
  }
82
82
  }
83
- FormData.TypeId;
83
+
84
84
  /** @internal */
85
- export const formData = (source, headers) => Effect.flatMap(Effect.all([Effect.mapError(Effect.flatMap(FileSystem.FileSystem, fs => fs.makeTempDirectoryScoped()), error => FormData.FormDataError("InternalError", error)), Path.Path]), ([dir, path_]) => Stream.runFoldEffect(stream(source, headers), new globalThis.FormData(), (formData, part) => {
85
+ const formData = (source, headers) => Effect.flatMap(Effect.all([Effect.mapError(Effect.flatMap(FileSystem.FileSystem, fs => fs.makeTempDirectoryScoped()), error => FormData.FormDataError("InternalError", error)), Path.Path]), ([dir, path_]) => Stream.runFoldEffect(stream(source, headers), new globalThis.FormData(), (formData, part) => {
86
86
  if (part._tag === "Field") {
87
87
  formData.append(part.key, part.value);
88
88
  return Effect.succeed(formData);
@@ -96,10 +96,11 @@ export const formData = (source, headers) => Effect.flatMap(Effect.all([Effect.m
96
96
  });
97
97
  formData.append(part.key, blob, path);
98
98
  return Effect.as(Effect.tryPromise({
99
- try: signal => NodeStreamP.pipeline(file.source, NodeFs.createWriteStream(path), {
99
+ try: signal => NodeStreamP.pipeline(file.source, NFS.createWriteStream(path), {
100
100
  signal
101
101
  }),
102
102
  catch: error => FormData.FormDataError("InternalError", error)
103
103
  }), formData);
104
104
  }));
105
- //# sourceMappingURL=formData.mjs.map
105
+
106
+ export { formData, stream };
@@ -1,12 +1,13 @@
1
- import * as NodeStream from "@effect/platform-node/Stream";
2
- import * as Headers from "@effect/platform/Http/Headers";
3
- import * as IncomingMessage from "@effect/platform/Http/IncomingMessage";
4
- import * as UrlParams from "@effect/platform/Http/UrlParams";
5
- import * as Effect from "effect/Effect";
6
- import * as FiberRef from "effect/FiberRef";
7
- import * as Option from "effect/Option";
1
+ import * as Headers from '@effect/platform/Http/Headers';
2
+ import * as IncomingMessage from '@effect/platform/Http/IncomingMessage';
3
+ import * as UrlParams from '@effect/platform/Http/UrlParams';
4
+ import * as Effect from 'effect/Effect';
5
+ import * as FiberRef from 'effect/FiberRef';
6
+ import * as Option from 'effect/Option';
7
+ import { toString, fromReadable, toUint8Array } from '../../Stream/dist/effect-platform-node-Stream.esm.js';
8
+
8
9
  /** @internal */
9
- export class IncomingMessageImpl {
10
+ class IncomingMessageImpl {
10
11
  constructor(source, onError, remoteAddressOverride) {
11
12
  this.source = source;
12
13
  this.onError = onError;
@@ -23,7 +24,7 @@ export class IncomingMessageImpl {
23
24
  if (this.textEffect) {
24
25
  return this.textEffect;
25
26
  }
26
- this.textEffect = Effect.runSync(Effect.cached(Effect.flatMap(FiberRef.get(IncomingMessage.maxBodySize), maxBodySize => NodeStream.toString({
27
+ this.textEffect = Effect.runSync(Effect.cached(Effect.flatMap(FiberRef.get(IncomingMessage.maxBodySize), maxBodySize => toString({
27
28
  readable: () => this.source,
28
29
  onFailure: this.onError,
29
30
  maxBytes: Option.getOrUndefined(maxBodySize)
@@ -43,15 +44,15 @@ export class IncomingMessageImpl {
43
44
  }));
44
45
  }
45
46
  get stream() {
46
- return NodeStream.fromReadable(() => this.source, this.onError);
47
+ return fromReadable(() => this.source, this.onError);
47
48
  }
48
49
  get arrayBuffer() {
49
- return Effect.flatMap(FiberRef.get(IncomingMessage.maxBodySize), maxBodySize => NodeStream.toUint8Array({
50
+ return Effect.flatMap(FiberRef.get(IncomingMessage.maxBodySize), maxBodySize => toUint8Array({
50
51
  readable: () => this.source,
51
52
  onFailure: this.onError,
52
53
  maxBytes: Option.getOrUndefined(maxBodySize)
53
54
  }));
54
55
  }
55
56
  }
56
- IncomingMessage.TypeId;
57
- //# sourceMappingURL=incomingMessage.mjs.map
57
+
58
+ export { IncomingMessageImpl };
@@ -1,32 +1,37 @@
1
- import { IncomingMessageImpl } from "@effect/platform-node/internal/http/incomingMessage";
2
- import * as NodeSink from "@effect/platform-node/Sink";
3
- import * as Client from "@effect/platform/Http/Client";
4
- import * as Error from "@effect/platform/Http/ClientError";
5
- import * as ClientResponse from "@effect/platform/Http/ClientResponse";
6
- import * as UrlParams from "@effect/platform/Http/UrlParams";
7
- import * as Context from "effect/Context";
8
- import * as Effect from "effect/Effect";
9
- import { pipe } from "effect/Function";
10
- import * as Layer from "effect/Layer";
11
- import * as Stream from "effect/Stream";
12
- import * as Http from "node:http";
13
- import * as Https from "node:https";
14
- import { Readable } from "node:stream";
15
- import { pipeline } from "node:stream/promises";
1
+ import * as Client from '@effect/platform/Http/Client';
2
+ import * as Error from '@effect/platform/Http/ClientError';
3
+ import * as ClientResponse from '@effect/platform/Http/ClientResponse';
4
+ import * as UrlParams from '@effect/platform/Http/UrlParams';
5
+ import * as Context from 'effect/Context';
6
+ import * as Effect from 'effect/Effect';
7
+ import { pipe } from 'effect/Function';
8
+ import * as Layer from 'effect/Layer';
9
+ import * as Stream from 'effect/Stream';
10
+ import * as Http from 'node:http';
11
+ import * as Https from 'node:https';
12
+ import { Readable } from 'node:stream';
13
+ import { pipeline } from 'node:stream/promises';
14
+ import { fromWritable } from '../../Sink/dist/effect-platform-node-Sink.esm.js';
15
+ import { IncomingMessageImpl } from './incomingMessage.esm.js';
16
+
16
17
  /** @internal */
17
- export const HttpAgentTypeId = /*#__PURE__*/Symbol.for("@effect/platform-node/Http/NodeClient/HttpAgent");
18
+ const HttpAgentTypeId = /*#__PURE__*/Symbol.for("@effect/platform-node/Http/NodeClient/HttpAgent");
19
+
18
20
  /** @internal */
19
- export const HttpAgent = /*#__PURE__*/Context.Tag(HttpAgentTypeId);
21
+ const HttpAgent = /*#__PURE__*/Context.Tag(HttpAgentTypeId);
22
+
20
23
  /** @internal */
21
- export const makeAgent = options => Effect.map(Effect.all([Effect.acquireRelease(Effect.sync(() => new Http.Agent(options)), agent => Effect.sync(() => agent.destroy())), Effect.acquireRelease(Effect.sync(() => new Https.Agent(options)), agent => Effect.sync(() => agent.destroy()))]), ([http, https]) => ({
24
+ const makeAgent = options => Effect.map(Effect.all([Effect.acquireRelease(Effect.sync(() => new Http.Agent(options)), agent => Effect.sync(() => agent.destroy())), Effect.acquireRelease(Effect.sync(() => new Https.Agent(options)), agent => Effect.sync(() => agent.destroy()))]), ([http, https]) => ({
22
25
  [HttpAgentTypeId]: HttpAgentTypeId,
23
26
  http,
24
27
  https
25
28
  }));
29
+
26
30
  /** @internal */
27
- export const makeAgentLayer = options => Layer.scoped(HttpAgent, makeAgent(options));
31
+ const makeAgentLayer = options => Layer.scoped(HttpAgent, makeAgent(options));
32
+
28
33
  /** @internal */
29
- export const agentLayer = /*#__PURE__*/makeAgentLayer();
34
+ const agentLayer = /*#__PURE__*/makeAgentLayer();
30
35
  const fromAgent = agent => Client.make(request => Effect.flatMap(UrlParams.makeUrl(request.url, request.urlParams, _ => Error.RequestError({
31
36
  request,
32
37
  reason: "InvalidUrl",
@@ -82,7 +87,7 @@ const sendBody = (nodeRequest, request, body) => Effect.suspend(() => {
82
87
  request,
83
88
  reason: "Encode",
84
89
  error: _
85
- })), NodeSink.fromWritable(() => nodeRequest, _ => Error.RequestError({
90
+ })), fromWritable(() => nodeRequest, _ => Error.RequestError({
86
91
  request,
87
92
  reason: "Transport",
88
93
  error: _
@@ -149,11 +154,14 @@ class ClientResponseImpl extends IncomingMessageImpl {
149
154
  };
150
155
  }
151
156
  }
152
- ClientResponse.TypeId;
157
+
153
158
  /** @internal */
154
- export const make = /*#__PURE__*/Effect.map(HttpAgent, fromAgent);
159
+ const make = /*#__PURE__*/Effect.map(HttpAgent, fromAgent);
160
+
155
161
  /** @internal */
156
- export const layerWithoutAgent = /*#__PURE__*/Layer.effect(Client.Client, make);
162
+ const layerWithoutAgent = /*#__PURE__*/Layer.effect(Client.Client, make);
163
+
157
164
  /** @internal */
158
- export const layer = /*#__PURE__*/Layer.provide(agentLayer, layerWithoutAgent);
159
- //# sourceMappingURL=nodeClient.mjs.map
165
+ const layer = /*#__PURE__*/Layer.provide(agentLayer, layerWithoutAgent);
166
+
167
+ export { HttpAgent, HttpAgentTypeId, agentLayer, layer, layerWithoutAgent, make, makeAgent, makeAgentLayer };
@@ -1,16 +1,17 @@
1
- import * as FileSystem from "@effect/platform-node/FileSystem";
2
- import * as Etag from "@effect/platform-node/Http/Etag";
3
- import * as Platform from "@effect/platform/Http/Platform";
4
- import * as ServerResponse from "@effect/platform/Http/ServerResponse";
5
- import { pipe } from "effect/Function";
6
- import * as Layer from "effect/Layer";
7
- import Mime from "mime";
8
- import * as Fs from "node:fs";
9
- import { Readable } from "node:stream";
1
+ import * as Platform from '@effect/platform/Http/Platform';
2
+ import * as ServerResponse from '@effect/platform/Http/ServerResponse';
3
+ import { pipe } from 'effect/Function';
4
+ import * as Layer from 'effect/Layer';
5
+ import Mime from 'mime';
6
+ import * as NFS from 'node:fs';
7
+ import { Readable } from 'node:stream';
8
+ import { layer as layer$1 } from '../../FileSystem/dist/effect-platform-node-FileSystem.esm.js';
9
+ import { layer as layer$2 } from '../../Http/Http/Etag/dist/effect-platform-node-Http-Etag.esm.js';
10
+
10
11
  /** @internal */
11
- export const make = /*#__PURE__*/Platform.make({
12
+ const make = /*#__PURE__*/Platform.make({
12
13
  fileResponse(path, status, statusText, headers, start, end, contentLength) {
13
- const stream = Fs.createReadStream(path, {
14
+ const stream = NFS.createReadStream(path, {
14
15
  start,
15
16
  end
16
17
  });
@@ -36,6 +37,8 @@ export const make = /*#__PURE__*/Platform.make({
36
37
  });
37
38
  }
38
39
  });
40
+
39
41
  /** @internal */
40
- export const layer = /*#__PURE__*/pipe( /*#__PURE__*/Layer.effect(Platform.Platform, make), /*#__PURE__*/Layer.use(FileSystem.layer), /*#__PURE__*/Layer.use(Etag.layer));
41
- //# sourceMappingURL=platform.mjs.map
42
+ const layer = /*#__PURE__*/pipe( /*#__PURE__*/Layer.effect(Platform.Platform, make), /*#__PURE__*/Layer.use(layer$1), /*#__PURE__*/Layer.use(layer$2));
43
+
44
+ export { layer, make };