@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
@@ -0,0 +1,433 @@
1
+ 'use strict';
2
+
3
+ var Effectify = require('@effect/platform/Effectify');
4
+ var Error = require('@effect/platform/Error');
5
+ var FileSystem$1 = require('@effect/platform/FileSystem');
6
+ var Effect = require('effect/Effect');
7
+ var Function = require('effect/Function');
8
+ var Layer = require('effect/Layer');
9
+ var Option = require('effect/Option');
10
+ var Crypto = require('node:crypto');
11
+ var NFS = require('node:fs');
12
+ var OS = require('node:os');
13
+ var NodePath = require('node:path');
14
+ var error = require('./error-e477c10b.cjs.dev.js');
15
+
16
+ function _interopNamespace(e) {
17
+ if (e && e.__esModule) return e;
18
+ var n = Object.create(null);
19
+ if (e) {
20
+ Object.keys(e).forEach(function (k) {
21
+ if (k !== 'default') {
22
+ var d = Object.getOwnPropertyDescriptor(e, k);
23
+ Object.defineProperty(n, k, d.get ? d : {
24
+ enumerable: true,
25
+ get: function () { return e[k]; }
26
+ });
27
+ }
28
+ });
29
+ }
30
+ n["default"] = e;
31
+ return Object.freeze(n);
32
+ }
33
+
34
+ var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
35
+ var FileSystem__namespace = /*#__PURE__*/_interopNamespace(FileSystem$1);
36
+ var Effect__namespace = /*#__PURE__*/_interopNamespace(Effect);
37
+ var Layer__namespace = /*#__PURE__*/_interopNamespace(Layer);
38
+ var Option__namespace = /*#__PURE__*/_interopNamespace(Option);
39
+ var Crypto__namespace = /*#__PURE__*/_interopNamespace(Crypto);
40
+ var NFS__namespace = /*#__PURE__*/_interopNamespace(NFS);
41
+ var OS__namespace = /*#__PURE__*/_interopNamespace(OS);
42
+ var NodePath__namespace = /*#__PURE__*/_interopNamespace(NodePath);
43
+
44
+ const handleBadArgument = method => err => Error__namespace.BadArgument({
45
+ module: "FileSystem",
46
+ method,
47
+ message: err.message ?? String(err)
48
+ });
49
+
50
+ // == access
51
+
52
+ const access = /*#__PURE__*/(() => {
53
+ const nodeAccess = /*#__PURE__*/Effectify.effectify(NFS__namespace.access, /*#__PURE__*/error.handleErrnoException("FileSystem", "access"), /*#__PURE__*/handleBadArgument("access"));
54
+ return (path, options) => {
55
+ let mode = NFS__namespace.constants.F_OK;
56
+ if (options?.readable) {
57
+ mode |= NFS__namespace.constants.R_OK;
58
+ }
59
+ if (options?.writable) {
60
+ mode |= NFS__namespace.constants.W_OK;
61
+ }
62
+ return nodeAccess(path, mode);
63
+ };
64
+ })();
65
+
66
+ // == copy
67
+
68
+ const copy = /*#__PURE__*/(() => {
69
+ const nodeCp = /*#__PURE__*/Effectify.effectify(NFS__namespace.cp, /*#__PURE__*/error.handleErrnoException("FileSystem", "copy"), /*#__PURE__*/handleBadArgument("copy"));
70
+ return (fromPath, toPath, options) => nodeCp(fromPath, toPath, {
71
+ force: options?.overwrite ?? false,
72
+ preserveTimestamps: options?.preserveTimestamps ?? false,
73
+ recursive: true
74
+ });
75
+ })();
76
+
77
+ // == copyFile
78
+
79
+ const copyFile = /*#__PURE__*/(() => {
80
+ const nodeCopyFile = /*#__PURE__*/Effectify.effectify(NFS__namespace.copyFile, /*#__PURE__*/error.handleErrnoException("FileSystem", "copyFile"), /*#__PURE__*/handleBadArgument("copyFile"));
81
+ return (fromPath, toPath) => nodeCopyFile(fromPath, toPath);
82
+ })();
83
+
84
+ // == chmod
85
+
86
+ const chmod = /*#__PURE__*/(() => {
87
+ const nodeChmod = /*#__PURE__*/Effectify.effectify(NFS__namespace.chmod, /*#__PURE__*/error.handleErrnoException("FileSystem", "chmod"), /*#__PURE__*/handleBadArgument("chmod"));
88
+ return (path, mode) => nodeChmod(path, mode);
89
+ })();
90
+
91
+ // == chown
92
+
93
+ const chown = /*#__PURE__*/(() => {
94
+ const nodeChown = /*#__PURE__*/Effectify.effectify(NFS__namespace.chown, /*#__PURE__*/error.handleErrnoException("FileSystem", "chown"), /*#__PURE__*/handleBadArgument("chown"));
95
+ return (path, uid, gid) => nodeChown(path, uid, gid);
96
+ })();
97
+
98
+ // == link
99
+
100
+ const link = /*#__PURE__*/(() => {
101
+ const nodeLink = /*#__PURE__*/Effectify.effectify(NFS__namespace.link, /*#__PURE__*/error.handleErrnoException("FileSystem", "link"), /*#__PURE__*/handleBadArgument("link"));
102
+ return (existingPath, newPath) => nodeLink(existingPath, newPath);
103
+ })();
104
+
105
+ // == makeDirectory
106
+
107
+ const makeDirectory = /*#__PURE__*/(() => {
108
+ const nodeMkdir = /*#__PURE__*/Effectify.effectify(NFS__namespace.mkdir, /*#__PURE__*/error.handleErrnoException("FileSystem", "makeDirectory"), /*#__PURE__*/handleBadArgument("makeDirectory"));
109
+ return (path, options) => nodeMkdir(path, {
110
+ recursive: options?.recursive ?? false,
111
+ mode: options?.mode
112
+ });
113
+ })();
114
+
115
+ // == makeTempDirectory
116
+
117
+ const makeTempDirectoryFactory = method => {
118
+ const nodeMkdtemp = Effectify.effectify(NFS__namespace.mkdtemp, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
119
+ return options => Effect__namespace.suspend(() => {
120
+ const prefix = options?.prefix ?? "";
121
+ const directory = typeof options?.directory === "string" ? NodePath__namespace.join(options.directory, ".") : OS__namespace.tmpdir();
122
+ return nodeMkdtemp(prefix ? NodePath__namespace.join(directory, prefix) : directory + "/");
123
+ });
124
+ };
125
+ const makeTempDirectory = /*#__PURE__*/makeTempDirectoryFactory("makeTempDirectory");
126
+
127
+ // == remove
128
+
129
+ const removeFactory = method => {
130
+ const nodeRm = Effectify.effectify(NFS__namespace.rm, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
131
+ return (path, options) => nodeRm(path, {
132
+ recursive: options?.recursive ?? false
133
+ });
134
+ };
135
+ const remove = /*#__PURE__*/removeFactory("remove");
136
+
137
+ // == makeTempDirectoryScoped
138
+
139
+ const makeTempDirectoryScoped = /*#__PURE__*/(() => {
140
+ const makeDirectory = /*#__PURE__*/makeTempDirectoryFactory("makeTempDirectoryScoped");
141
+ const removeDirectory = /*#__PURE__*/removeFactory("makeTempDirectoryScoped");
142
+ return options => Effect__namespace.acquireRelease(makeDirectory(options), directory => Effect__namespace.orDie(removeDirectory(directory, {
143
+ recursive: true
144
+ })));
145
+ })();
146
+
147
+ // == open
148
+
149
+ const openFactory = method => {
150
+ const nodeOpen = Effectify.effectify(NFS__namespace.open, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
151
+ const nodeClose = Effectify.effectify(NFS__namespace.close, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
152
+ return (path, options) => Function.pipe(Effect__namespace.acquireRelease(nodeOpen(path, options?.flag ?? "r", options?.mode), fd => Effect__namespace.orDie(nodeClose(fd))), Effect__namespace.map(fd => makeFile(FileSystem__namespace.FileDescriptor(fd), options?.flag?.startsWith("a") ?? false)));
153
+ };
154
+ const open = /*#__PURE__*/openFactory("open");
155
+ const makeFile = /*#__PURE__*/(() => {
156
+ const nodeReadFactory = method => Effectify.effectify(NFS__namespace.read, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
157
+ const nodeRead = /*#__PURE__*/nodeReadFactory("read");
158
+ const nodeReadAlloc = /*#__PURE__*/nodeReadFactory("readAlloc");
159
+ const nodeStat = /*#__PURE__*/Effectify.effectify(NFS__namespace.fstat, /*#__PURE__*/error.handleErrnoException("FileSystem", "stat"), /*#__PURE__*/handleBadArgument("stat"));
160
+ const nodeTruncate = /*#__PURE__*/Effectify.effectify(NFS__namespace.ftruncate, /*#__PURE__*/error.handleErrnoException("FileSystem", "truncate"), /*#__PURE__*/handleBadArgument("truncate"));
161
+ const nodeWriteFactory = method => Effectify.effectify(NFS__namespace.write, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
162
+ const nodeWrite = /*#__PURE__*/nodeWriteFactory("write");
163
+ const nodeWriteAll = /*#__PURE__*/nodeWriteFactory("writeAll");
164
+ class FileImpl {
165
+ semaphore = Effect__namespace.unsafeMakeSemaphore(1);
166
+ position = 0n;
167
+ constructor(fd, append) {
168
+ this.fd = fd;
169
+ this.append = append;
170
+ this[FileSystem__namespace.FileTypeId] = FileSystem__namespace.FileTypeId;
171
+ }
172
+ get stat() {
173
+ return Effect__namespace.map(nodeStat(this.fd), makeFileInfo);
174
+ }
175
+ seek(offset, from) {
176
+ const offsetSize = FileSystem__namespace.Size(offset);
177
+ return this.semaphore.withPermits(1)(Effect__namespace.sync(() => {
178
+ if (from === "start") {
179
+ this.position = offsetSize;
180
+ } else if (from === "current") {
181
+ this.position = this.position + offsetSize;
182
+ }
183
+ return this.position;
184
+ }));
185
+ }
186
+ read(buffer) {
187
+ return this.semaphore.withPermits(1)(Effect__namespace.map(Effect__namespace.suspend(() => nodeRead(this.fd, {
188
+ buffer,
189
+ position: this.position
190
+ })), bytesRead => {
191
+ const sizeRead = FileSystem__namespace.Size(bytesRead);
192
+ this.position = this.position + sizeRead;
193
+ return sizeRead;
194
+ }));
195
+ }
196
+ readAlloc(size) {
197
+ const sizeNumber = Number(size);
198
+ return this.semaphore.withPermits(1)(Effect__namespace.flatMap(Effect__namespace.sync(() => Buffer.allocUnsafeSlow(sizeNumber)), buffer => Effect__namespace.map(nodeReadAlloc(this.fd, {
199
+ buffer,
200
+ position: this.position
201
+ }), bytesRead => {
202
+ if (bytesRead === 0) {
203
+ return Option__namespace.none();
204
+ }
205
+ this.position = this.position + BigInt(bytesRead);
206
+ if (bytesRead === sizeNumber) {
207
+ return Option__namespace.some(buffer);
208
+ }
209
+ const dst = Buffer.allocUnsafeSlow(bytesRead);
210
+ buffer.copy(dst, 0, 0, bytesRead);
211
+ return Option__namespace.some(dst);
212
+ })));
213
+ }
214
+ truncate(length) {
215
+ return this.semaphore.withPermits(1)(Effect__namespace.map(nodeTruncate(this.fd, length ? Number(length) : undefined), () => {
216
+ if (!this.append) {
217
+ const len = BigInt(length ?? 0);
218
+ if (this.position > len) {
219
+ this.position = len;
220
+ }
221
+ }
222
+ }));
223
+ }
224
+ write(buffer) {
225
+ return this.semaphore.withPermits(1)(Effect__namespace.map(Effect__namespace.suspend(() => nodeWrite(this.fd, buffer, undefined, undefined, this.append ? undefined : Number(this.position))), bytesWritten => {
226
+ const sizeWritten = FileSystem__namespace.Size(bytesWritten);
227
+ if (!this.append) {
228
+ this.position = this.position + sizeWritten;
229
+ }
230
+ return sizeWritten;
231
+ }));
232
+ }
233
+ writeAllChunk(buffer) {
234
+ return Effect__namespace.flatMap(Effect__namespace.suspend(() => nodeWriteAll(this.fd, buffer, undefined, undefined, this.append ? undefined : Number(this.position))), bytesWritten => {
235
+ if (bytesWritten === 0) {
236
+ return Effect__namespace.fail(Error__namespace.SystemError({
237
+ module: "FileSystem",
238
+ method: "writeAll",
239
+ reason: "WriteZero",
240
+ pathOrDescriptor: this.fd,
241
+ message: "write returned 0 bytes written"
242
+ }));
243
+ }
244
+ if (!this.append) {
245
+ this.position = this.position + BigInt(bytesWritten);
246
+ }
247
+ return bytesWritten < buffer.length ? this.writeAllChunk(buffer.subarray(bytesWritten)) : Effect__namespace.unit;
248
+ });
249
+ }
250
+ writeAll(buffer) {
251
+ return this.semaphore.withPermits(1)(this.writeAllChunk(buffer));
252
+ }
253
+ }
254
+ return (fd, append) => new FileImpl(fd, append);
255
+ })();
256
+
257
+ // == makeTempFile
258
+
259
+ const makeTempFileFactory = method => {
260
+ const makeDirectory = makeTempDirectoryFactory(method);
261
+ const open = openFactory(method);
262
+ const randomHexString = bytes => Effect__namespace.sync(() => Crypto__namespace.randomBytes(bytes).toString("hex"));
263
+ return options => Function.pipe(Effect__namespace.zip(makeDirectory(options), randomHexString(6)), Effect__namespace.map(([directory, random]) => NodePath__namespace.join(directory, random)), Effect__namespace.tap(path => Effect__namespace.scoped(open(path, {
264
+ flag: "w+"
265
+ }))));
266
+ };
267
+ const makeTempFile = /*#__PURE__*/makeTempFileFactory("makeTempFile");
268
+
269
+ // == makeTempFileScoped
270
+
271
+ const makeTempFileScoped = /*#__PURE__*/(() => {
272
+ const makeFile = /*#__PURE__*/makeTempFileFactory("makeTempFileScoped");
273
+ const removeFile = /*#__PURE__*/removeFactory("makeTempFileScoped");
274
+ return options => Effect__namespace.acquireRelease(makeFile(options), file => Effect__namespace.orDie(removeFile(file)));
275
+ })();
276
+
277
+ // == readDirectory
278
+
279
+ const readDirectory = /*#__PURE__*/(() => {
280
+ const nodeReadDirectory = /*#__PURE__*/Effectify.effectify(NFS__namespace.readdir, /*#__PURE__*/error.handleErrnoException("FileSystem", "readDirectory"), /*#__PURE__*/handleBadArgument("readDirectory"));
281
+ return (path, options) => nodeReadDirectory(path, options);
282
+ })();
283
+
284
+ // == readFile
285
+
286
+ const readFile = path => Effect__namespace.async((resume, signal) => {
287
+ try {
288
+ NFS__namespace.readFile(path, {
289
+ signal
290
+ }, (err, data) => {
291
+ if (err) {
292
+ resume(Effect__namespace.fail(error.handleErrnoException("FileSystem", "readFile")(err, [path])));
293
+ } else {
294
+ resume(Effect__namespace.succeed(data));
295
+ }
296
+ });
297
+ } catch (err) {
298
+ resume(Effect__namespace.fail(handleBadArgument("readFile")(err)));
299
+ }
300
+ });
301
+
302
+ // == readLink
303
+
304
+ const readLink = /*#__PURE__*/(() => {
305
+ const nodeReadLink = /*#__PURE__*/Effectify.effectify(NFS__namespace.readlink, /*#__PURE__*/error.handleErrnoException("FileSystem", "readLink"), /*#__PURE__*/handleBadArgument("readLink"));
306
+ return path => nodeReadLink(path);
307
+ })();
308
+
309
+ // == realPath
310
+
311
+ const realPath = /*#__PURE__*/(() => {
312
+ const nodeRealPath = /*#__PURE__*/Effectify.effectify(NFS__namespace.realpath, /*#__PURE__*/error.handleErrnoException("FileSystem", "realPath"), /*#__PURE__*/handleBadArgument("realPath"));
313
+ return path => nodeRealPath(path);
314
+ })();
315
+
316
+ // == rename
317
+
318
+ const rename = /*#__PURE__*/(() => {
319
+ const nodeRename = /*#__PURE__*/Effectify.effectify(NFS__namespace.rename, /*#__PURE__*/error.handleErrnoException("FileSystem", "rename"), /*#__PURE__*/handleBadArgument("rename"));
320
+ return (oldPath, newPath) => nodeRename(oldPath, newPath);
321
+ })();
322
+
323
+ // == stat
324
+
325
+ const makeFileInfo = stat => ({
326
+ type: stat.isFile() ? "File" : stat.isDirectory() ? "Directory" : stat.isSymbolicLink() ? "SymbolicLink" : stat.isBlockDevice() ? "BlockDevice" : stat.isCharacterDevice() ? "CharacterDevice" : stat.isFIFO() ? "FIFO" : stat.isSocket() ? "Socket" : "Unknown",
327
+ mtime: Option__namespace.fromNullable(stat.mtime),
328
+ atime: Option__namespace.fromNullable(stat.atime),
329
+ birthtime: Option__namespace.fromNullable(stat.birthtime),
330
+ dev: stat.dev,
331
+ rdev: Option__namespace.fromNullable(stat.rdev),
332
+ ino: Option__namespace.fromNullable(stat.ino),
333
+ mode: stat.mode,
334
+ nlink: Option__namespace.fromNullable(stat.nlink),
335
+ uid: Option__namespace.fromNullable(stat.uid),
336
+ gid: Option__namespace.fromNullable(stat.gid),
337
+ size: FileSystem__namespace.Size(stat.size),
338
+ blksize: Option__namespace.fromNullable(FileSystem__namespace.Size(stat.blksize)),
339
+ blocks: Option__namespace.fromNullable(stat.blocks)
340
+ });
341
+ const stat = /*#__PURE__*/(() => {
342
+ const nodeStat = /*#__PURE__*/Effectify.effectify(NFS__namespace.stat, /*#__PURE__*/error.handleErrnoException("FileSystem", "stat"), /*#__PURE__*/handleBadArgument("stat"));
343
+ return path => Effect__namespace.map(nodeStat(path), makeFileInfo);
344
+ })();
345
+
346
+ // == symlink
347
+
348
+ const symlink = /*#__PURE__*/(() => {
349
+ const nodeSymlink = /*#__PURE__*/Effectify.effectify(NFS__namespace.symlink, /*#__PURE__*/error.handleErrnoException("FileSystem", "symlink"), /*#__PURE__*/handleBadArgument("symlink"));
350
+ return (target, path) => nodeSymlink(target, path);
351
+ })();
352
+
353
+ // == truncate
354
+
355
+ const truncate = /*#__PURE__*/(() => {
356
+ const nodeTruncate = /*#__PURE__*/Effectify.effectify(NFS__namespace.truncate, /*#__PURE__*/error.handleErrnoException("FileSystem", "truncate"), /*#__PURE__*/handleBadArgument("truncate"));
357
+ return (path, length) => nodeTruncate(path, length !== undefined ? Number(length) : undefined);
358
+ })();
359
+
360
+ // == utimes
361
+
362
+ const utimes = /*#__PURE__*/(() => {
363
+ const nodeUtimes = /*#__PURE__*/Effectify.effectify(NFS__namespace.utimes, /*#__PURE__*/error.handleErrnoException("FileSystem", "utime"), /*#__PURE__*/handleBadArgument("utime"));
364
+ return (path, atime, mtime) => nodeUtimes(path, atime, mtime);
365
+ })();
366
+
367
+ // == writeFile
368
+
369
+ const writeFile = (path, data, options) => Effect__namespace.async((resume, signal) => {
370
+ try {
371
+ NFS__namespace.writeFile(path, data, {
372
+ signal,
373
+ flag: options?.flag,
374
+ mode: options?.mode
375
+ }, err => {
376
+ if (err) {
377
+ resume(Effect__namespace.fail(error.handleErrnoException("FileSystem", "writeFile")(err, [path])));
378
+ } else {
379
+ resume(Effect__namespace.unit);
380
+ }
381
+ });
382
+ } catch (err) {
383
+ resume(Effect__namespace.fail(handleBadArgument("writeFile")(err)));
384
+ }
385
+ });
386
+ const fileSystemImpl = /*#__PURE__*/FileSystem__namespace.make({
387
+ access,
388
+ chmod,
389
+ chown,
390
+ copy,
391
+ copyFile,
392
+ link,
393
+ makeDirectory,
394
+ makeTempDirectory,
395
+ makeTempDirectoryScoped,
396
+ makeTempFile,
397
+ makeTempFileScoped,
398
+ open,
399
+ readDirectory,
400
+ readFile,
401
+ readLink,
402
+ realPath,
403
+ remove,
404
+ rename,
405
+ stat,
406
+ symlink,
407
+ truncate,
408
+ utimes,
409
+ writeFile
410
+ });
411
+
412
+ /** @internal */
413
+ const layer$1 = /*#__PURE__*/Layer__namespace.succeed(FileSystem__namespace.FileSystem, fileSystemImpl);
414
+
415
+ /**
416
+ * @since 1.0.0
417
+ */
418
+
419
+ /**
420
+ * @since 1.0.0
421
+ * @category layer
422
+ */
423
+ const layer = layer$1;
424
+
425
+ var FileSystem = /*#__PURE__*/Object.freeze({
426
+ __proto__: null,
427
+ layer: layer,
428
+ FileSystem: FileSystem$1.FileSystem,
429
+ Size: FileSystem$1.Size
430
+ });
431
+
432
+ exports.FileSystem = FileSystem;
433
+ exports.layer = layer;
@@ -0,0 +1,67 @@
1
+ 'use strict';
2
+
3
+ var formData$1 = require('./formData-fac89256.cjs.dev.js');
4
+ var FormData$1 = require('@effect/platform/Http/FormData');
5
+
6
+ function _interopNamespace(e) {
7
+ if (e && e.__esModule) return e;
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n["default"] = e;
21
+ return Object.freeze(n);
22
+ }
23
+
24
+ function _mergeNamespaces(n, m) {
25
+ m.forEach(function (e) {
26
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
27
+ if (k !== 'default' && !(k in n)) {
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
+ return Object.freeze(n);
37
+ }
38
+
39
+ var FormData__namespace = /*#__PURE__*/_interopNamespace(FormData$1);
40
+
41
+ /**
42
+ * @since 1.0.0
43
+ *
44
+ * Also includes exports from [`@effect/platform/Http/FormData`](https://effect-ts.github.io/platform/platform/Http/FormData.ts.html).
45
+ */
46
+
47
+ /**
48
+ * @since 1.0.0
49
+ * @category constructors
50
+ */
51
+ const stream = formData$1.stream;
52
+
53
+ /**
54
+ * @since 1.0.0
55
+ * @category constructors
56
+ */
57
+ const formData = formData$1.formData;
58
+
59
+ var FormData = /*#__PURE__*/_mergeNamespaces({
60
+ __proto__: null,
61
+ stream: stream,
62
+ formData: formData
63
+ }, [FormData__namespace]);
64
+
65
+ exports.FormData = FormData;
66
+ exports.formData = formData;
67
+ exports.stream = stream;
@@ -0,0 +1,67 @@
1
+ 'use strict';
2
+
3
+ var formData$1 = require('./formData-09ad7f6d.cjs.prod.js');
4
+ var FormData$1 = require('@effect/platform/Http/FormData');
5
+
6
+ function _interopNamespace(e) {
7
+ if (e && e.__esModule) return e;
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n["default"] = e;
21
+ return Object.freeze(n);
22
+ }
23
+
24
+ function _mergeNamespaces(n, m) {
25
+ m.forEach(function (e) {
26
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
27
+ if (k !== 'default' && !(k in n)) {
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
+ return Object.freeze(n);
37
+ }
38
+
39
+ var FormData__namespace = /*#__PURE__*/_interopNamespace(FormData$1);
40
+
41
+ /**
42
+ * @since 1.0.0
43
+ *
44
+ * Also includes exports from [`@effect/platform/Http/FormData`](https://effect-ts.github.io/platform/platform/Http/FormData.ts.html).
45
+ */
46
+
47
+ /**
48
+ * @since 1.0.0
49
+ * @category constructors
50
+ */
51
+ const stream = formData$1.stream;
52
+
53
+ /**
54
+ * @since 1.0.0
55
+ * @category constructors
56
+ */
57
+ const formData = formData$1.formData;
58
+
59
+ var FormData = /*#__PURE__*/_mergeNamespaces({
60
+ __proto__: null,
61
+ stream: stream,
62
+ formData: formData
63
+ }, [FormData__namespace]);
64
+
65
+ exports.FormData = FormData;
66
+ exports.formData = formData;
67
+ exports.stream = stream;
@@ -0,0 +1,54 @@
1
+ 'use strict';
2
+
3
+ var Body = require('@effect/platform/Http/Body');
4
+ var Client = require('@effect/platform/Http/Client');
5
+ var Error = require('@effect/platform/Http/ClientError');
6
+ var ClientRequest = require('@effect/platform/Http/ClientRequest');
7
+ var ClientResponse = require('@effect/platform/Http/ClientResponse');
8
+ var Headers = require('@effect/platform/Http/Headers');
9
+ var UrlParams = require('@effect/platform/Http/UrlParams');
10
+ var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('./NodeClient-8db3bc84.cjs.prod.js');
11
+
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n["default"] = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var Body__namespace = /*#__PURE__*/_interopNamespace(Body);
31
+ var Client__namespace = /*#__PURE__*/_interopNamespace(Client);
32
+ var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
33
+ var ClientRequest__namespace = /*#__PURE__*/_interopNamespace(ClientRequest);
34
+ var ClientResponse__namespace = /*#__PURE__*/_interopNamespace(ClientResponse);
35
+ var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
36
+ var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
37
+
38
+ /**
39
+ * @since 1.0.0
40
+ */
41
+
42
+ var HttpClient = /*#__PURE__*/Object.freeze({
43
+ __proto__: null,
44
+ body: Body__namespace,
45
+ client: Client__namespace,
46
+ error: Error__namespace,
47
+ headers: Headers__namespace,
48
+ nodeClient: Http_NodeClient_dist_effectPlatformNodeHttpNodeClient.NodeClient,
49
+ request: ClientRequest__namespace,
50
+ response: ClientResponse__namespace,
51
+ urlParams: UrlParams__namespace
52
+ });
53
+
54
+ exports.HttpClient = HttpClient;
@@ -0,0 +1,54 @@
1
+ 'use strict';
2
+
3
+ var Body = require('@effect/platform/Http/Body');
4
+ var Client = require('@effect/platform/Http/Client');
5
+ var Error = require('@effect/platform/Http/ClientError');
6
+ var ClientRequest = require('@effect/platform/Http/ClientRequest');
7
+ var ClientResponse = require('@effect/platform/Http/ClientResponse');
8
+ var Headers = require('@effect/platform/Http/Headers');
9
+ var UrlParams = require('@effect/platform/Http/UrlParams');
10
+ var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('./NodeClient-ab5848bf.cjs.dev.js');
11
+
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n["default"] = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var Body__namespace = /*#__PURE__*/_interopNamespace(Body);
31
+ var Client__namespace = /*#__PURE__*/_interopNamespace(Client);
32
+ var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
33
+ var ClientRequest__namespace = /*#__PURE__*/_interopNamespace(ClientRequest);
34
+ var ClientResponse__namespace = /*#__PURE__*/_interopNamespace(ClientResponse);
35
+ var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
36
+ var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
37
+
38
+ /**
39
+ * @since 1.0.0
40
+ */
41
+
42
+ var HttpClient = /*#__PURE__*/Object.freeze({
43
+ __proto__: null,
44
+ body: Body__namespace,
45
+ client: Client__namespace,
46
+ error: Error__namespace,
47
+ headers: Headers__namespace,
48
+ nodeClient: Http_NodeClient_dist_effectPlatformNodeHttpNodeClient.NodeClient,
49
+ request: ClientRequest__namespace,
50
+ response: ClientResponse__namespace,
51
+ urlParams: UrlParams__namespace
52
+ });
53
+
54
+ exports.HttpClient = HttpClient;