@effect/platform 0.18.1 → 0.18.3
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.
- package/Command/dist/effect-platform-Command.cjs.d.mts +2 -0
- package/Command/dist/effect-platform-Command.cjs.d.mts.map +1 -0
- package/Command/dist/effect-platform-Command.cjs.d.ts +2 -0
- package/Command/dist/effect-platform-Command.cjs.d.ts.map +1 -0
- package/Command/dist/effect-platform-Command.cjs.dev.js +36 -0
- package/Command/dist/effect-platform-Command.cjs.js +7 -0
- package/Command/dist/effect-platform-Command.cjs.mjs +19 -0
- package/Command/dist/effect-platform-Command.cjs.prod.js +36 -0
- package/{mjs/Command.mjs → Command/dist/effect-platform-Command.esm.js} +80 -19
- package/Command/package.json +4 -0
- package/CommandExecutor/dist/effect-platform-CommandExecutor.cjs.d.mts +2 -0
- package/CommandExecutor/dist/effect-platform-CommandExecutor.cjs.d.mts.map +1 -0
- package/CommandExecutor/dist/effect-platform-CommandExecutor.cjs.d.ts +2 -0
- package/CommandExecutor/dist/effect-platform-CommandExecutor.cjs.d.ts.map +1 -0
- package/CommandExecutor/dist/effect-platform-CommandExecutor.cjs.dev.js +21 -0
- package/CommandExecutor/dist/effect-platform-CommandExecutor.cjs.js +7 -0
- package/CommandExecutor/dist/effect-platform-CommandExecutor.cjs.mjs +7 -0
- package/CommandExecutor/dist/effect-platform-CommandExecutor.cjs.prod.js +21 -0
- package/CommandExecutor/dist/effect-platform-CommandExecutor.esm.js +71 -0
- package/CommandExecutor/package.json +4 -0
- package/Effectify/dist/effect-platform-Effectify.cjs.d.mts +2 -0
- package/Effectify/dist/effect-platform-Effectify.cjs.d.mts.map +1 -0
- package/Effectify/dist/effect-platform-Effectify.cjs.d.ts +2 -0
- package/Effectify/dist/effect-platform-Effectify.cjs.d.ts.map +1 -0
- package/Effectify/dist/effect-platform-Effectify.cjs.dev.js +10 -0
- package/Effectify/dist/effect-platform-Effectify.cjs.js +7 -0
- package/Effectify/dist/effect-platform-Effectify.cjs.mjs +3 -0
- package/Effectify/dist/effect-platform-Effectify.cjs.prod.js +10 -0
- package/Effectify/dist/effect-platform-Effectify.esm.js +23 -0
- package/Effectify/package.json +4 -0
- package/Error/dist/effect-platform-Error.cjs.d.mts +2 -0
- package/Error/dist/effect-platform-Error.cjs.d.mts.map +1 -0
- package/Error/dist/effect-platform-Error.cjs.d.ts +2 -0
- package/Error/dist/effect-platform-Error.cjs.d.ts.map +1 -0
- package/Error/dist/effect-platform-Error.cjs.dev.js +12 -0
- package/Error/dist/effect-platform-Error.cjs.js +7 -0
- package/Error/dist/effect-platform-Error.cjs.mjs +5 -0
- package/Error/dist/effect-platform-Error.cjs.prod.js +12 -0
- package/Error/dist/effect-platform-Error.esm.js +54 -0
- package/Error/package.json +4 -0
- package/FileSystem/dist/effect-platform-FileSystem.cjs.d.mts +2 -0
- package/FileSystem/dist/effect-platform-FileSystem.cjs.d.mts.map +1 -0
- package/FileSystem/dist/effect-platform-FileSystem.cjs.d.ts +2 -0
- package/FileSystem/dist/effect-platform-FileSystem.cjs.d.ts.map +1 -0
- package/FileSystem/dist/effect-platform-FileSystem.cjs.dev.js +28 -0
- package/FileSystem/dist/effect-platform-FileSystem.cjs.js +7 -0
- package/FileSystem/dist/effect-platform-FileSystem.cjs.mjs +13 -0
- package/FileSystem/dist/effect-platform-FileSystem.cjs.prod.js +28 -0
- package/FileSystem/dist/effect-platform-FileSystem.esm.js +177 -0
- package/FileSystem/package.json +4 -0
- package/Http/App/dist/effect-platform-Http-App.cjs.d.mts +2 -0
- package/Http/App/dist/effect-platform-Http-App.cjs.d.mts.map +1 -0
- package/Http/App/dist/effect-platform-Http-App.cjs.d.ts +2 -0
- package/Http/App/dist/effect-platform-Http-App.cjs.d.ts.map +1 -0
- package/Http/App/dist/effect-platform-Http-App.cjs.dev.js +2 -0
- package/Http/App/dist/effect-platform-Http-App.cjs.js +7 -0
- package/Http/App/dist/effect-platform-Http-App.cjs.mjs +1 -0
- package/Http/App/dist/effect-platform-Http-App.cjs.prod.js +2 -0
- package/Http/App/package.json +4 -0
- package/Http/Body/dist/effect-platform-Http-Body.cjs.d.mts +2 -0
- package/Http/Body/dist/effect-platform-Http-Body.cjs.d.mts.map +1 -0
- package/Http/Body/dist/effect-platform-Http-Body.cjs.d.ts +2 -0
- package/Http/Body/dist/effect-platform-Http-Body.cjs.d.ts.map +1 -0
- package/Http/Body/dist/effect-platform-Http-Body.cjs.dev.js +35 -0
- package/Http/Body/dist/effect-platform-Http-Body.cjs.js +7 -0
- package/Http/Body/dist/effect-platform-Http-Body.cjs.mjs +17 -0
- package/Http/Body/dist/effect-platform-Http-Body.cjs.prod.js +35 -0
- package/Http/Body/package.json +4 -0
- package/Http/Client/dist/effect-platform-Http-Client.cjs.d.mts +2 -0
- package/Http/Client/dist/effect-platform-Http-Client.cjs.d.mts.map +1 -0
- package/Http/Client/dist/effect-platform-Http-Client.cjs.d.ts +2 -0
- package/Http/Client/dist/effect-platform-Http-Client.cjs.d.ts.map +1 -0
- package/Http/Client/dist/effect-platform-Http-Client.cjs.dev.js +59 -0
- package/Http/Client/dist/effect-platform-Http-Client.cjs.js +7 -0
- package/Http/Client/dist/effect-platform-Http-Client.cjs.mjs +26 -0
- package/Http/Client/dist/effect-platform-Http-Client.cjs.prod.js +59 -0
- package/Http/Client/package.json +4 -0
- package/Http/ClientError/dist/effect-platform-Http-ClientError.cjs.d.mts +2 -0
- package/Http/ClientError/dist/effect-platform-Http-ClientError.cjs.d.mts.map +1 -0
- package/Http/ClientError/dist/effect-platform-Http-ClientError.cjs.d.ts +2 -0
- package/Http/ClientError/dist/effect-platform-Http-ClientError.cjs.d.ts.map +1 -0
- package/Http/ClientError/dist/effect-platform-Http-ClientError.cjs.dev.js +13 -0
- package/Http/ClientError/dist/effect-platform-Http-ClientError.cjs.js +7 -0
- package/Http/ClientError/dist/effect-platform-Http-ClientError.cjs.mjs +5 -0
- package/Http/ClientError/dist/effect-platform-Http-ClientError.cjs.prod.js +13 -0
- package/Http/ClientError/package.json +4 -0
- package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.cjs.d.mts +2 -0
- package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.cjs.d.mts.map +1 -0
- package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.cjs.d.ts +2 -0
- package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.cjs.d.ts.map +1 -0
- package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.cjs.dev.js +63 -0
- package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.cjs.js +7 -0
- package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.cjs.mjs +38 -0
- package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.cjs.prod.js +63 -0
- package/Http/ClientRequest/package.json +4 -0
- package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.d.mts +2 -0
- package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.d.mts.map +1 -0
- package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.d.ts +2 -0
- package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.d.ts.map +1 -0
- package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.dev.js +36 -0
- package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.js +7 -0
- package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.mjs +8 -0
- package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.prod.js +36 -0
- package/Http/ClientResponse/package.json +4 -0
- package/Http/Etag/dist/effect-platform-Http-Etag.cjs.d.mts +2 -0
- package/Http/Etag/dist/effect-platform-Http-Etag.cjs.d.mts.map +1 -0
- package/Http/Etag/dist/effect-platform-Http-Etag.cjs.d.ts +2 -0
- package/Http/Etag/dist/effect-platform-Http-Etag.cjs.d.ts.map +1 -0
- package/Http/Etag/dist/effect-platform-Http-Etag.cjs.dev.js +92 -0
- package/Http/Etag/dist/effect-platform-Http-Etag.cjs.js +7 -0
- package/Http/Etag/dist/effect-platform-Http-Etag.cjs.mjs +5 -0
- package/Http/Etag/dist/effect-platform-Http-Etag.cjs.prod.js +92 -0
- package/Http/Etag/package.json +4 -0
- package/Http/FormData/dist/effect-platform-Http-FormData.cjs.d.mts +2 -0
- package/Http/FormData/dist/effect-platform-Http-FormData.cjs.d.mts.map +1 -0
- package/Http/FormData/dist/effect-platform-Http-FormData.cjs.d.ts +2 -0
- package/Http/FormData/dist/effect-platform-Http-FormData.cjs.d.ts.map +1 -0
- package/Http/FormData/dist/effect-platform-Http-FormData.cjs.dev.js +43 -0
- package/Http/FormData/dist/effect-platform-Http-FormData.cjs.js +7 -0
- package/Http/FormData/dist/effect-platform-Http-FormData.cjs.mjs +21 -0
- package/Http/FormData/dist/effect-platform-Http-FormData.cjs.prod.js +43 -0
- package/Http/FormData/package.json +4 -0
- package/Http/Headers/dist/effect-platform-Http-Headers.cjs.d.mts +2 -0
- package/Http/Headers/dist/effect-platform-Http-Headers.cjs.d.mts.map +1 -0
- package/Http/Headers/dist/effect-platform-Http-Headers.cjs.d.ts +2 -0
- package/Http/Headers/dist/effect-platform-Http-Headers.cjs.d.ts.map +1 -0
- package/Http/Headers/dist/effect-platform-Http-Headers.cjs.dev.js +18 -0
- package/Http/Headers/dist/effect-platform-Http-Headers.cjs.js +7 -0
- package/Http/Headers/dist/effect-platform-Http-Headers.cjs.mjs +9 -0
- package/Http/Headers/dist/effect-platform-Http-Headers.cjs.prod.js +18 -0
- package/Http/Headers/package.json +4 -0
- package/Http/Http/App/dist/effect-platform-Http-App.esm.js +1 -0
- package/Http/Http/Body/dist/effect-platform-Http-Body.esm.js +151 -0
- package/Http/Http/Client/dist/effect-platform-Http-Client.esm.js +164 -0
- package/Http/Http/ClientError/dist/effect-platform-Http-ClientError.esm.js +48 -0
- package/Http/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.esm.js +241 -0
- package/Http/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.esm.js +36 -0
- package/Http/Http/Etag/dist/effect-platform-Http-Etag.esm.js +50 -0
- package/Http/Http/FormData/dist/effect-platform-Http-FormData.esm.js +155 -0
- package/Http/Http/Headers/dist/effect-platform-Http-Headers.esm.js +74 -0
- package/{mjs/Http/IncomingMessage.mjs → Http/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.esm.js} +35 -17
- package/Http/Http/Method/dist/effect-platform-Http-Method.esm.js +11 -0
- package/Http/Http/Middleware/dist/effect-platform-Http-Middleware.esm.js +52 -0
- package/Http/Http/Platform/dist/effect-platform-Http-Platform.esm.js +34 -0
- package/Http/Http/Router/dist/effect-platform-Http-Router.esm.js +224 -0
- package/Http/Http/Server/dist/effect-platform-Http-Server.esm.js +60 -0
- package/Http/Http/ServerError/dist/effect-platform-Http-ServerError.esm.js +70 -0
- package/Http/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.esm.js +66 -0
- package/Http/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.esm.js +126 -0
- package/{mjs/Http/UrlParams.mjs → Http/Http/UrlParams/dist/effect-platform-Http-UrlParams.esm.js} +34 -13
- package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.d.mts +2 -0
- package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.d.mts.map +1 -0
- package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.d.ts +2 -0
- package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.d.ts.map +1 -0
- package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.dev.js +150 -0
- package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.js +7 -0
- package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.mjs +9 -0
- package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.prod.js +150 -0
- package/Http/IncomingMessage/package.json +4 -0
- package/Http/Method/dist/effect-platform-Http-Method.cjs.d.mts +2 -0
- package/Http/Method/dist/effect-platform-Http-Method.cjs.d.mts.map +1 -0
- package/Http/Method/dist/effect-platform-Http-Method.cjs.d.ts +2 -0
- package/Http/Method/dist/effect-platform-Http-Method.cjs.d.ts.map +1 -0
- package/Http/Method/dist/effect-platform-Http-Method.cjs.dev.js +15 -0
- package/Http/Method/dist/effect-platform-Http-Method.cjs.js +7 -0
- package/Http/Method/dist/effect-platform-Http-Method.cjs.mjs +3 -0
- package/Http/Method/dist/effect-platform-Http-Method.cjs.prod.js +15 -0
- package/Http/Method/package.json +4 -0
- package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.d.mts +2 -0
- package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.d.mts.map +1 -0
- package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.d.ts +2 -0
- package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.d.ts.map +1 -0
- package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.dev.js +43 -0
- package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.js +7 -0
- package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.mjs +8 -0
- package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.prod.js +43 -0
- package/Http/Middleware/package.json +4 -0
- package/Http/Platform/dist/effect-platform-Http-Platform.cjs.d.mts +2 -0
- package/Http/Platform/dist/effect-platform-Http-Platform.cjs.d.mts.map +1 -0
- package/Http/Platform/dist/effect-platform-Http-Platform.cjs.d.ts +2 -0
- package/Http/Platform/dist/effect-platform-Http-Platform.cjs.d.ts.map +1 -0
- package/Http/Platform/dist/effect-platform-Http-Platform.cjs.dev.js +116 -0
- package/Http/Platform/dist/effect-platform-Http-Platform.cjs.js +7 -0
- package/Http/Platform/dist/effect-platform-Http-Platform.cjs.mjs +5 -0
- package/Http/Platform/dist/effect-platform-Http-Platform.cjs.prod.js +116 -0
- package/Http/Platform/package.json +4 -0
- package/Http/Router/dist/effect-platform-Http-Router.cjs.d.mts +2 -0
- package/Http/Router/dist/effect-platform-Http-Router.cjs.d.mts.map +1 -0
- package/Http/Router/dist/effect-platform-Http-Router.cjs.d.ts +2 -0
- package/Http/Router/dist/effect-platform-Http-Router.cjs.d.ts.map +1 -0
- package/Http/Router/dist/effect-platform-Http-Router.cjs.dev.js +62 -0
- package/Http/Router/dist/effect-platform-Http-Router.cjs.js +7 -0
- package/Http/Router/dist/effect-platform-Http-Router.cjs.mjs +32 -0
- package/Http/Router/dist/effect-platform-Http-Router.cjs.prod.js +62 -0
- package/Http/Router/package.json +4 -0
- package/Http/Server/dist/effect-platform-Http-Server.cjs.d.mts +2 -0
- package/Http/Server/dist/effect-platform-Http-Server.cjs.d.mts.map +1 -0
- package/Http/Server/dist/effect-platform-Http-Server.cjs.d.ts +2 -0
- package/Http/Server/dist/effect-platform-Http-Server.cjs.d.ts.map +1 -0
- package/Http/Server/dist/effect-platform-Http-Server.cjs.dev.js +105 -0
- package/Http/Server/dist/effect-platform-Http-Server.cjs.js +7 -0
- package/Http/Server/dist/effect-platform-Http-Server.cjs.mjs +6 -0
- package/Http/Server/dist/effect-platform-Http-Server.cjs.prod.js +105 -0
- package/Http/Server/package.json +4 -0
- package/Http/ServerError/dist/effect-platform-Http-ServerError.cjs.d.mts +2 -0
- package/Http/ServerError/dist/effect-platform-Http-ServerError.cjs.d.mts.map +1 -0
- package/Http/ServerError/dist/effect-platform-Http-ServerError.cjs.d.ts +2 -0
- package/Http/ServerError/dist/effect-platform-Http-ServerError.cjs.d.ts.map +1 -0
- package/Http/ServerError/dist/effect-platform-Http-ServerError.cjs.dev.js +14 -0
- package/Http/ServerError/dist/effect-platform-Http-ServerError.cjs.js +7 -0
- package/Http/ServerError/dist/effect-platform-Http-ServerError.cjs.mjs +7 -0
- package/Http/ServerError/dist/effect-platform-Http-ServerError.cjs.prod.js +14 -0
- package/Http/ServerError/package.json +4 -0
- package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.cjs.d.mts +2 -0
- package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.cjs.d.mts.map +1 -0
- package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.cjs.d.ts +2 -0
- package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.cjs.d.ts.map +1 -0
- package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.cjs.dev.js +37 -0
- package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.cjs.js +7 -0
- package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.cjs.mjs +11 -0
- package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.cjs.prod.js +37 -0
- package/Http/ServerRequest/package.json +4 -0
- package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.d.mts +2 -0
- package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.d.mts.map +1 -0
- package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.d.ts +2 -0
- package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.d.ts.map +1 -0
- package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.dev.js +45 -0
- package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.js +7 -0
- package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.mjs +19 -0
- package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.prod.js +45 -0
- package/Http/ServerResponse/package.json +4 -0
- package/Http/UrlParams/dist/effect-platform-Http-UrlParams.cjs.d.mts +2 -0
- package/Http/UrlParams/dist/effect-platform-Http-UrlParams.cjs.d.mts.map +1 -0
- package/Http/UrlParams/dist/effect-platform-Http-UrlParams.cjs.d.ts +2 -0
- package/Http/UrlParams/dist/effect-platform-Http-UrlParams.cjs.d.ts.map +1 -0
- package/Http/UrlParams/dist/effect-platform-Http-UrlParams.cjs.dev.js +20 -0
- package/Http/UrlParams/dist/effect-platform-Http-UrlParams.cjs.js +7 -0
- package/Http/UrlParams/dist/effect-platform-Http-UrlParams.cjs.mjs +11 -0
- package/Http/UrlParams/dist/effect-platform-Http-UrlParams.cjs.prod.js +20 -0
- package/Http/UrlParams/package.json +4 -0
- package/HttpClient/dist/effect-platform-HttpClient.cjs.d.mts +2 -0
- package/HttpClient/dist/effect-platform-HttpClient.cjs.d.mts.map +1 -0
- package/HttpClient/dist/effect-platform-HttpClient.cjs.d.ts +2 -0
- package/HttpClient/dist/effect-platform-HttpClient.cjs.d.ts.map +1 -0
- package/HttpClient/dist/effect-platform-HttpClient.cjs.dev.js +46 -0
- package/HttpClient/dist/effect-platform-HttpClient.cjs.js +7 -0
- package/HttpClient/dist/effect-platform-HttpClient.cjs.mjs +9 -0
- package/HttpClient/dist/effect-platform-HttpClient.cjs.prod.js +46 -0
- package/HttpClient/dist/effect-platform-HttpClient.esm.js +18 -0
- package/HttpClient/package.json +4 -0
- package/HttpServer/dist/effect-platform-HttpServer.cjs.d.mts +2 -0
- package/HttpServer/dist/effect-platform-HttpServer.cjs.d.mts.map +1 -0
- package/HttpServer/dist/effect-platform-HttpServer.cjs.d.ts +2 -0
- package/HttpServer/dist/effect-platform-HttpServer.cjs.d.ts.map +1 -0
- package/HttpServer/dist/effect-platform-HttpServer.cjs.dev.js +53 -0
- package/HttpServer/dist/effect-platform-HttpServer.cjs.js +7 -0
- package/HttpServer/dist/effect-platform-HttpServer.cjs.mjs +12 -0
- package/HttpServer/dist/effect-platform-HttpServer.cjs.prod.js +53 -0
- package/HttpServer/dist/effect-platform-HttpServer.esm.js +24 -0
- package/HttpServer/package.json +4 -0
- package/KeyValueStore/dist/effect-platform-KeyValueStore.cjs.d.mts +2 -0
- package/KeyValueStore/dist/effect-platform-KeyValueStore.cjs.d.mts.map +1 -0
- package/KeyValueStore/dist/effect-platform-KeyValueStore.cjs.d.ts +2 -0
- package/KeyValueStore/dist/effect-platform-KeyValueStore.cjs.d.ts.map +1 -0
- package/KeyValueStore/dist/effect-platform-KeyValueStore.cjs.dev.js +30 -0
- package/KeyValueStore/dist/effect-platform-KeyValueStore.cjs.js +7 -0
- package/KeyValueStore/dist/effect-platform-KeyValueStore.cjs.mjs +10 -0
- package/KeyValueStore/dist/effect-platform-KeyValueStore.cjs.prod.js +30 -0
- package/KeyValueStore/dist/effect-platform-KeyValueStore.esm.js +78 -0
- package/KeyValueStore/package.json +4 -0
- package/Path/dist/effect-platform-Path.cjs.d.mts +2 -0
- package/Path/dist/effect-platform-Path.cjs.d.mts.map +1 -0
- package/Path/dist/effect-platform-Path.cjs.d.ts +2 -0
- package/Path/dist/effect-platform-Path.cjs.d.ts.map +1 -0
- package/Path/dist/effect-platform-Path.cjs.dev.js +17 -0
- package/Path/dist/effect-platform-Path.cjs.js +7 -0
- package/Path/dist/effect-platform-Path.cjs.mjs +4 -0
- package/Path/dist/effect-platform-Path.cjs.prod.js +17 -0
- package/{mjs/Path.mjs → Path/dist/effect-platform-Path.esm.js} +17 -4
- package/Path/package.json +4 -0
- package/Runtime/dist/effect-platform-Runtime.cjs.d.mts +2 -0
- package/Runtime/dist/effect-platform-Runtime.cjs.d.mts.map +1 -0
- package/Runtime/dist/effect-platform-Runtime.cjs.d.ts +2 -0
- package/Runtime/dist/effect-platform-Runtime.cjs.d.ts.map +1 -0
- package/Runtime/dist/effect-platform-Runtime.cjs.dev.js +11 -0
- package/Runtime/dist/effect-platform-Runtime.cjs.js +7 -0
- package/Runtime/dist/effect-platform-Runtime.cjs.mjs +3 -0
- package/Runtime/dist/effect-platform-Runtime.cjs.prod.js +11 -0
- package/Runtime/dist/effect-platform-Runtime.esm.js +26 -0
- package/Runtime/package.json +4 -0
- package/dist/App-0916639a.cjs.prod.js +7 -0
- package/dist/App-44aa3275.cjs.dev.js +7 -0
- package/dist/Body-86ef2922.cjs.dev.js +187 -0
- package/dist/Body-b77eac75.cjs.prod.js +187 -0
- package/dist/Client-15671ed6.cjs.dev.js +397 -0
- package/dist/Client-6b3e3de8.cjs.prod.js +397 -0
- package/dist/ClientError-22781879.cjs.prod.js +60 -0
- package/dist/ClientError-b7828377.cjs.dev.js +60 -0
- package/dist/ClientRequest-00e89da8.cjs.dev.js +319 -0
- package/dist/ClientRequest-750d8d59.cjs.prod.js +319 -0
- package/dist/ClientResponse-8f65511e.cjs.prod.js +51 -0
- package/dist/ClientResponse-a1d64ab8.cjs.dev.js +51 -0
- package/dist/Command-032c414c.cjs.dev.js +446 -0
- package/dist/Command-25ef5e94.cjs.prod.js +446 -0
- package/dist/CommandExecutor-158ea1d3.cjs.dev.js +87 -0
- package/dist/CommandExecutor-7fcae408.cjs.prod.js +87 -0
- package/dist/Effectify-2d8c3af9.cjs.dev.js +66 -0
- package/dist/Effectify-38757ba5.cjs.prod.js +66 -0
- package/dist/Error-09496a70.cjs.dev.js +100 -0
- package/dist/Error-2c4e6ce2.cjs.prod.js +100 -0
- package/dist/FileSystem-3d439a05.cjs.prod.js +308 -0
- package/dist/FileSystem-4c7daaf0.cjs.dev.js +308 -0
- package/dist/FormData-902afd18.cjs.prod.js +318 -0
- package/dist/FormData-ee0b1cf2.cjs.dev.js +318 -0
- package/dist/Headers-122cb877.cjs.prod.js +115 -0
- package/dist/Headers-f56bc667.cjs.dev.js +115 -0
- package/dist/HttpClient-cefc7da9.cjs.dev.js +26 -0
- package/dist/HttpClient-d3c69877.cjs.prod.js +26 -0
- package/dist/HttpServer-5b9d992e.cjs.dev.js +32 -0
- package/dist/HttpServer-60325fb0.cjs.prod.js +32 -0
- package/dist/KeyValueStore-f6c5b981.cjs.prod.js +244 -0
- package/dist/KeyValueStore-f9c93610.cjs.dev.js +244 -0
- package/dist/Middleware-8e7cd600.cjs.dev.js +133 -0
- package/dist/Middleware-d4f1a1cd.cjs.prod.js +133 -0
- package/dist/Path-3574641f.cjs.prod.js +154 -0
- package/dist/Path-7ba7e370.cjs.dev.js +154 -0
- package/dist/Router-6c80a4c9.cjs.prod.js +515 -0
- package/dist/Router-bd2b3014.cjs.dev.js +515 -0
- package/dist/Runtime-1edd577a.cjs.dev.js +55 -0
- package/dist/Runtime-515efccf.cjs.prod.js +55 -0
- package/dist/ServerError-55c5e24b.cjs.dev.js +126 -0
- package/dist/ServerError-605b2fa2.cjs.prod.js +126 -0
- package/dist/ServerRequest-8d9c2c6b.cjs.dev.js +156 -0
- package/dist/ServerRequest-938f3ed0.cjs.prod.js +156 -0
- package/dist/ServerResponse-7d60c7d1.cjs.dev.js +288 -0
- package/dist/ServerResponse-830f1052.cjs.prod.js +288 -0
- package/dist/UrlParams-1228a686.cjs.prod.js +146 -0
- package/dist/UrlParams-5e0910f1.cjs.dev.js +146 -0
- package/dist/body-33521da5.cjs.prod.js +150 -0
- package/dist/body-c7d7a944.cjs.dev.js +150 -0
- package/dist/clientError-52d24cd8.cjs.dev.js +41 -0
- package/dist/clientError-de103d6a.cjs.prod.js +41 -0
- package/dist/clientRequest-3e72ec54.cjs.prod.js +240 -0
- package/dist/clientRequest-423fd562.cjs.dev.js +240 -0
- package/dist/clientResponse-2c6a83f1.cjs.prod.js +138 -0
- package/dist/clientResponse-c58a116c.cjs.dev.js +138 -0
- package/dist/commandExecutor-17a55a1c.cjs.prod.js +79 -0
- package/dist/commandExecutor-fc92de95.cjs.dev.js +79 -0
- package/{Command.d.ts → dist/declarations/src/Command.d.ts} +2 -2
- package/dist/declarations/src/Command.d.ts.map +1 -0
- package/{CommandExecutor.d.ts → dist/declarations/src/CommandExecutor.d.ts} +2 -2
- package/dist/declarations/src/CommandExecutor.d.ts.map +1 -0
- package/{Effectify.d.ts → dist/declarations/src/Effectify.d.ts} +3 -0
- package/dist/declarations/src/Effectify.d.ts.map +1 -0
- package/{Error.d.ts → dist/declarations/src/Error.d.ts} +3 -0
- package/dist/declarations/src/Error.d.ts.map +1 -0
- package/{FileSystem.d.ts → dist/declarations/src/FileSystem.d.ts} +1 -1
- package/dist/declarations/src/FileSystem.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/App.d.ts +2 -2
- package/dist/declarations/src/Http/App.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/Body.d.ts +2 -2
- package/dist/declarations/src/Http/Body.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/Client.d.ts +3 -3
- package/dist/declarations/src/Http/Client.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/ClientError.d.ts +2 -2
- package/dist/declarations/src/Http/ClientError.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/ClientRequest.d.ts +7 -7
- package/dist/declarations/src/Http/ClientRequest.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/ClientResponse.d.ts +5 -5
- package/dist/declarations/src/Http/ClientResponse.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/Etag.d.ts +2 -2
- package/dist/declarations/src/Http/Etag.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/FormData.d.ts +1 -1
- package/dist/declarations/src/Http/FormData.d.ts.map +1 -0
- package/dist/declarations/src/Http/Headers.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/IncomingMessage.d.ts +3 -3
- package/dist/declarations/src/Http/IncomingMessage.d.ts.map +1 -0
- package/dist/declarations/src/Http/Method.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/Middleware.d.ts +1 -4
- package/dist/declarations/src/Http/Middleware.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/Platform.d.ts +5 -5
- package/dist/declarations/src/Http/Platform.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/Router.d.ts +5 -5
- package/dist/declarations/src/Http/Router.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/Server.d.ts +4 -4
- package/dist/declarations/src/Http/Server.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/ServerError.d.ts +2 -2
- package/dist/declarations/src/Http/ServerError.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/ServerRequest.d.ts +8 -8
- package/dist/declarations/src/Http/ServerRequest.d.ts.map +1 -0
- package/{Http → dist/declarations/src/Http}/ServerResponse.d.ts +6 -6
- package/dist/declarations/src/Http/ServerResponse.d.ts.map +1 -0
- package/dist/declarations/src/Http/UrlParams.d.ts.map +1 -0
- package/{HttpClient.d.ts → dist/declarations/src/HttpClient.d.ts} +7 -7
- package/dist/declarations/src/HttpClient.d.ts.map +1 -0
- package/{HttpServer.d.ts → dist/declarations/src/HttpServer.d.ts} +10 -10
- package/dist/declarations/src/HttpServer.d.ts.map +1 -0
- package/{KeyValueStore.d.ts → dist/declarations/src/KeyValueStore.d.ts} +3 -3
- package/dist/declarations/src/KeyValueStore.d.ts.map +1 -0
- package/{Path.d.ts → dist/declarations/src/Path.d.ts} +1 -1
- package/dist/declarations/src/Path.d.ts.map +1 -0
- package/dist/declarations/src/Runtime.d.ts.map +1 -0
- package/dist/declarations/src/index.d.ts +41 -0
- package/dist/declarations/src/index.d.ts.map +1 -0
- package/dist/effect-platform.cjs.d.mts +2 -0
- package/dist/effect-platform.cjs.d.mts.map +1 -0
- package/dist/effect-platform.cjs.d.ts +2 -0
- package/dist/effect-platform.cjs.d.ts.map +1 -0
- package/dist/effect-platform.cjs.dev.js +75 -0
- package/dist/effect-platform.cjs.js +7 -0
- package/dist/effect-platform.cjs.mjs +12 -0
- package/dist/effect-platform.cjs.prod.js +75 -0
- package/dist/effect-platform.esm.js +20 -0
- package/{mjs/internal/command.mjs → internal/command.esm.js} +48 -29
- package/{mjs/internal/commandExecutor.mjs → internal/commandExecutor.esm.js} +19 -13
- package/{mjs/internal/effectify.mjs → internal/effectify.esm.js} +5 -3
- package/internal/error.esm.js +17 -0
- package/{mjs/internal/fileSystem.mjs → internal/fileSystem.esm.js} +28 -18
- package/internal/http/body.esm.js +111 -0
- package/internal/http/client.esm.js +157 -0
- package/internal/http/clientError.esm.js +17 -0
- package/internal/http/clientRequest.esm.js +184 -0
- package/{mjs/internal/http/clientResponse.mjs → internal/http/clientResponse.esm.js} +26 -23
- package/internal/http/etag.esm.js +19 -0
- package/internal/http/formData.esm.js +95 -0
- package/internal/http/middleware.esm.js +46 -0
- package/{mjs/internal/http/platform.mjs → internal/http/platform.esm.js} +17 -13
- package/internal/http/router.esm.js +199 -0
- package/internal/http/server.esm.js +20 -0
- package/internal/http/serverError.esm.js +23 -0
- package/internal/http/serverRequest.esm.js +50 -0
- package/internal/http/serverResponse.esm.js +105 -0
- package/{mjs/internal/keyValueStore.mjs → internal/keyValueStore.esm.js} +29 -19
- package/{mjs/internal/path.mjs → internal/path.esm.js} +14 -9
- package/package.json +232 -30
- package/src/Command.ts +3 -3
- package/src/CommandExecutor.ts +3 -3
- package/src/Effectify.ts +1 -1
- package/src/Error.ts +1 -1
- package/src/FileSystem.ts +2 -2
- package/src/Http/App.ts +2 -2
- package/src/Http/Body.ts +3 -3
- package/src/Http/Client.ts +4 -4
- package/src/Http/ClientError.ts +3 -3
- package/src/Http/ClientRequest.ts +8 -8
- package/src/Http/ClientResponse.ts +6 -6
- package/src/Http/Etag.ts +3 -3
- package/src/Http/FormData.ts +2 -2
- package/src/Http/IncomingMessage.ts +3 -3
- package/src/Http/Middleware.ts +2 -2
- package/src/Http/Platform.ts +6 -6
- package/src/Http/Router.ts +6 -6
- package/src/Http/Server.ts +5 -5
- package/src/Http/ServerError.ts +3 -3
- package/src/Http/ServerRequest.ts +9 -9
- package/src/Http/ServerResponse.ts +7 -7
- package/src/HttpClient.ts +7 -7
- package/src/HttpServer.ts +10 -10
- package/src/KeyValueStore.ts +4 -4
- package/src/Path.ts +2 -2
- package/src/index.ts +10 -10
- package/src/internal/command.ts +4 -4
- package/src/internal/commandExecutor.ts +1 -1
- package/src/internal/effectify.ts +1 -1
- package/src/internal/error.ts +1 -1
- package/src/internal/fileSystem.ts +2 -2
- package/src/internal/http/body.ts +3 -3
- package/src/internal/http/client.ts +11 -11
- package/src/internal/http/clientError.ts +1 -1
- package/src/internal/http/clientRequest.ts +9 -9
- package/src/internal/http/clientResponse.ts +7 -7
- package/src/internal/http/etag.ts +1 -1
- package/src/internal/http/formData.ts +2 -2
- package/src/internal/http/middleware.ts +5 -5
- package/src/internal/http/platform.ts +5 -5
- package/src/internal/http/router.ts +6 -6
- package/src/internal/http/server.ts +5 -5
- package/src/internal/http/serverError.ts +1 -1
- package/src/internal/http/serverRequest.ts +4 -4
- package/src/internal/http/serverResponse.ts +8 -8
- package/src/internal/keyValueStore.ts +3 -3
- package/src/internal/path.ts +2 -2
- package/Command.d.ts.map +0 -1
- package/Command.js +0 -147
- package/Command.js.map +0 -1
- package/CommandExecutor.d.ts.map +0 -1
- package/CommandExecutor.js +0 -35
- package/CommandExecutor.js.map +0 -1
- package/Effectify.d.ts.map +0 -1
- package/Effectify.js +0 -18
- package/Effectify.js.map +0 -1
- package/Error.d.ts.map +0 -1
- package/Error.js +0 -29
- package/Error.js.map +0 -1
- package/FileSystem.d.ts.map +0 -1
- package/FileSystem.js +0 -67
- package/FileSystem.js.map +0 -1
- package/Http/App.d.ts.map +0 -1
- package/Http/App.js +0 -6
- package/Http/App.js.map +0 -1
- package/Http/Body.d.ts.map +0 -1
- package/Http/Body.js +0 -85
- package/Http/Body.js.map +0 -1
- package/Http/Client.d.ts.map +0 -1
- package/Http/Client.js +0 -130
- package/Http/Client.js.map +0 -1
- package/Http/ClientError.d.ts.map +0 -1
- package/Http/ClientError.js +0 -25
- package/Http/ClientError.js.map +0 -1
- package/Http/ClientRequest.d.ts.map +0 -1
- package/Http/ClientRequest.js +0 -190
- package/Http/ClientRequest.js.map +0 -1
- package/Http/ClientResponse.d.ts.map +0 -1
- package/Http/ClientResponse.js +0 -45
- package/Http/ClientResponse.js.map +0 -1
- package/Http/Etag.d.ts.map +0 -1
- package/Http/Etag.js +0 -25
- package/Http/Etag.js.map +0 -1
- package/Http/FormData.d.ts.map +0 -1
- package/Http/FormData.js +0 -105
- package/Http/FormData.js.map +0 -1
- package/Http/Headers.d.ts.map +0 -1
- package/Http/Headers.js +0 -65
- package/Http/Headers.js.map +0 -1
- package/Http/IncomingMessage.d.ts.map +0 -1
- package/Http/IncomingMessage.js +0 -103
- package/Http/IncomingMessage.js.map +0 -1
- package/Http/Method.d.ts.map +0 -1
- package/Http/Method.js +0 -12
- package/Http/Method.js.map +0 -1
- package/Http/Middleware.d.ts.map +0 -1
- package/Http/Middleware.js +0 -40
- package/Http/Middleware.js.map +0 -1
- package/Http/Platform.d.ts.map +0 -1
- package/Http/Platform.js +0 -25
- package/Http/Platform.js.map +0 -1
- package/Http/Router.d.ts.map +0 -1
- package/Http/Router.js +0 -160
- package/Http/Router.js.map +0 -1
- package/Http/Server.d.ts.map +0 -1
- package/Http/Server.js +0 -30
- package/Http/Server.js.map +0 -1
- package/Http/ServerError.d.ts.map +0 -1
- package/Http/ServerError.js +0 -35
- package/Http/ServerError.js.map +0 -1
- package/Http/ServerRequest.d.ts.map +0 -1
- package/Http/ServerRequest.js +0 -58
- package/Http/ServerRequest.js.map +0 -1
- package/Http/ServerResponse.d.ts.map +0 -1
- package/Http/ServerResponse.js +0 -94
- package/Http/ServerResponse.js.map +0 -1
- package/Http/UrlParams.d.ts.map +0 -1
- package/Http/UrlParams.js +0 -92
- package/Http/UrlParams.js.map +0 -1
- package/HttpClient.d.ts.map +0 -1
- package/HttpClient.js +0 -23
- package/HttpClient.js.map +0 -1
- package/HttpServer.d.ts.map +0 -1
- package/HttpServer.js +0 -29
- package/HttpServer.js.map +0 -1
- package/KeyValueStore.d.ts.map +0 -1
- package/KeyValueStore.js +0 -50
- package/KeyValueStore.js.map +0 -1
- package/Path.d.ts.map +0 -1
- package/Path.js +0 -29
- package/Path.js.map +0 -1
- package/Runtime.d.ts.map +0 -1
- package/Runtime.js +0 -23
- package/Runtime.js.map +0 -1
- package/index.d.ts +0 -41
- package/index.d.ts.map +0 -1
- package/index.js +0 -29
- package/index.js.map +0 -1
- package/internal/command.d.ts +0 -2
- package/internal/command.d.ts.map +0 -1
- package/internal/command.js +0 -182
- package/internal/command.js.map +0 -1
- package/internal/commandExecutor.d.ts +0 -2
- package/internal/commandExecutor.d.ts.map +0 -1
- package/internal/commandExecutor.js +0 -52
- package/internal/commandExecutor.js.map +0 -1
- package/internal/effectify.d.ts +0 -2
- package/internal/effectify.d.ts.map +0 -1
- package/internal/effectify.js +0 -25
- package/internal/effectify.js.map +0 -1
- package/internal/error.d.ts +0 -2
- package/internal/error.d.ts.map +0 -1
- package/internal/error.js +0 -21
- package/internal/error.js.map +0 -1
- package/internal/fileSystem.d.ts +0 -2
- package/internal/fileSystem.d.ts.map +0 -1
- package/internal/fileSystem.js +0 -87
- package/internal/fileSystem.js.map +0 -1
- package/internal/http/body.d.ts +0 -2
- package/internal/http/body.d.ts.map +0 -1
- package/internal/http/body.js +0 -115
- package/internal/http/body.js.map +0 -1
- package/internal/http/client.d.ts +0 -2
- package/internal/http/client.d.ts.map +0 -1
- package/internal/http/client.js +0 -144
- package/internal/http/client.js.map +0 -1
- package/internal/http/clientError.d.ts +0 -2
- package/internal/http/clientError.d.ts.map +0 -1
- package/internal/http/clientError.js +0 -21
- package/internal/http/clientError.js.map +0 -1
- package/internal/http/clientRequest.d.ts +0 -2
- package/internal/http/clientRequest.d.ts.map +0 -1
- package/internal/http/clientRequest.js +0 -156
- package/internal/http/clientRequest.js.map +0 -1
- package/internal/http/clientResponse.d.ts +0 -2
- package/internal/http/clientResponse.d.ts.map +0 -1
- package/internal/http/clientResponse.js +0 -118
- package/internal/http/clientResponse.js.map +0 -1
- package/internal/http/etag.d.ts +0 -2
- package/internal/http/etag.d.ts.map +0 -1
- package/internal/http/etag.js +0 -24
- package/internal/http/etag.js.map +0 -1
- package/internal/http/formData.d.ts +0 -2
- package/internal/http/formData.d.ts.map +0 -1
- package/internal/http/formData.js +0 -88
- package/internal/http/formData.js.map +0 -1
- package/internal/http/middleware.d.ts +0 -2
- package/internal/http/middleware.d.ts.map +0 -1
- package/internal/http/middleware.js +0 -48
- package/internal/http/middleware.js.map +0 -1
- package/internal/http/platform.d.ts +0 -2
- package/internal/http/platform.d.ts.map +0 -1
- package/internal/http/platform.js +0 -57
- package/internal/http/platform.js.map +0 -1
- package/internal/http/router.d.ts +0 -5
- package/internal/http/router.d.ts.map +0 -1
- package/internal/http/router.js +0 -182
- package/internal/http/router.js.map +0 -1
- package/internal/http/server.d.ts +0 -2
- package/internal/http/server.d.ts.map +0 -1
- package/internal/http/server.js +0 -27
- package/internal/http/server.js.map +0 -1
- package/internal/http/serverError.d.ts +0 -2
- package/internal/http/serverError.d.ts.map +0 -1
- package/internal/http/serverError.js +0 -25
- package/internal/http/serverError.js.map +0 -1
- package/internal/http/serverRequest.d.ts +0 -2
- package/internal/http/serverRequest.d.ts.map +0 -1
- package/internal/http/serverRequest.js +0 -54
- package/internal/http/serverRequest.js.map +0 -1
- package/internal/http/serverResponse.d.ts +0 -2
- package/internal/http/serverResponse.d.ts.map +0 -1
- package/internal/http/serverResponse.js +0 -110
- package/internal/http/serverResponse.js.map +0 -1
- package/internal/keyValueStore.d.ts +0 -2
- package/internal/keyValueStore.d.ts.map +0 -1
- package/internal/keyValueStore.js +0 -124
- package/internal/keyValueStore.js.map +0 -1
- package/internal/path.d.ts +0 -2
- package/internal/path.d.ts.map +0 -1
- package/internal/path.js +0 -95
- package/internal/path.js.map +0 -1
- package/mjs/Command.mjs.map +0 -1
- package/mjs/CommandExecutor.mjs +0 -27
- package/mjs/CommandExecutor.mjs.map +0 -1
- package/mjs/Effectify.mjs +0 -9
- package/mjs/Effectify.mjs.map +0 -1
- package/mjs/Error.mjs +0 -20
- package/mjs/Error.mjs.map +0 -1
- package/mjs/FileSystem.mjs +0 -58
- package/mjs/FileSystem.mjs.map +0 -1
- package/mjs/Http/App.mjs +0 -2
- package/mjs/Http/App.mjs.map +0 -1
- package/mjs/Http/Body.mjs +0 -77
- package/mjs/Http/Body.mjs.map +0 -1
- package/mjs/Http/Client.mjs +0 -122
- package/mjs/Http/Client.mjs.map +0 -1
- package/mjs/Http/ClientError.mjs +0 -17
- package/mjs/Http/ClientError.mjs.map +0 -1
- package/mjs/Http/ClientRequest.mjs +0 -182
- package/mjs/Http/ClientRequest.mjs.map +0 -1
- package/mjs/Http/ClientResponse.mjs +0 -33
- package/mjs/Http/ClientResponse.mjs.map +0 -1
- package/mjs/Http/Etag.mjs +0 -17
- package/mjs/Http/Etag.mjs.map +0 -1
- package/mjs/Http/FormData.mjs +0 -97
- package/mjs/Http/FormData.mjs.map +0 -1
- package/mjs/Http/Headers.mjs +0 -55
- package/mjs/Http/Headers.mjs.map +0 -1
- package/mjs/Http/IncomingMessage.mjs.map +0 -1
- package/mjs/Http/Method.mjs +0 -5
- package/mjs/Http/Method.mjs.map +0 -1
- package/mjs/Http/Middleware.mjs +0 -32
- package/mjs/Http/Middleware.mjs.map +0 -1
- package/mjs/Http/Platform.mjs +0 -17
- package/mjs/Http/Platform.mjs.map +0 -1
- package/mjs/Http/Router.mjs +0 -152
- package/mjs/Http/Router.mjs.map +0 -1
- package/mjs/Http/Server.mjs +0 -22
- package/mjs/Http/Server.mjs.map +0 -1
- package/mjs/Http/ServerError.mjs +0 -27
- package/mjs/Http/ServerError.mjs.map +0 -1
- package/mjs/Http/ServerRequest.mjs +0 -48
- package/mjs/Http/ServerRequest.mjs.map +0 -1
- package/mjs/Http/ServerResponse.mjs +0 -86
- package/mjs/Http/ServerResponse.mjs.map +0 -1
- package/mjs/Http/UrlParams.mjs.map +0 -1
- package/mjs/HttpClient.mjs +0 -61
- package/mjs/HttpClient.mjs.map +0 -1
- package/mjs/HttpServer.mjs +0 -85
- package/mjs/HttpServer.mjs.map +0 -1
- package/mjs/KeyValueStore.mjs +0 -42
- package/mjs/KeyValueStore.mjs.map +0 -1
- package/mjs/Path.mjs.map +0 -1
- package/mjs/Runtime.mjs +0 -13
- package/mjs/Runtime.mjs.map +0 -1
- package/mjs/index.mjs +0 -21
- package/mjs/index.mjs.map +0 -1
- package/mjs/internal/command.mjs.map +0 -1
- package/mjs/internal/commandExecutor.mjs.map +0 -1
- package/mjs/internal/effectify.mjs.map +0 -1
- package/mjs/internal/error.mjs +0 -13
- package/mjs/internal/error.mjs.map +0 -1
- package/mjs/internal/fileSystem.mjs.map +0 -1
- package/mjs/internal/http/body.mjs +0 -95
- package/mjs/internal/http/body.mjs.map +0 -1
- package/mjs/internal/http/client.mjs +0 -132
- package/mjs/internal/http/client.mjs.map +0 -1
- package/mjs/internal/http/clientError.mjs +0 -13
- package/mjs/internal/http/clientError.mjs.map +0 -1
- package/mjs/internal/http/clientRequest.mjs +0 -145
- package/mjs/internal/http/clientRequest.mjs.map +0 -1
- package/mjs/internal/http/clientResponse.mjs.map +0 -1
- package/mjs/internal/http/etag.mjs +0 -15
- package/mjs/internal/http/etag.mjs.map +0 -1
- package/mjs/internal/http/formData.mjs +0 -76
- package/mjs/internal/http/formData.mjs.map +0 -1
- package/mjs/internal/http/middleware.mjs +0 -39
- package/mjs/internal/http/middleware.mjs.map +0 -1
- package/mjs/internal/http/platform.mjs.map +0 -1
- package/mjs/internal/http/router.mjs +0 -169
- package/mjs/internal/http/router.mjs.map +0 -1
- package/mjs/internal/http/server.mjs +0 -17
- package/mjs/internal/http/server.mjs.map +0 -1
- package/mjs/internal/http/serverError.mjs +0 -17
- package/mjs/internal/http/serverError.mjs.map +0 -1
- package/mjs/internal/http/serverRequest.mjs +0 -41
- package/mjs/internal/http/serverRequest.mjs.map +0 -1
- package/mjs/internal/http/serverResponse.mjs +0 -88
- package/mjs/internal/http/serverResponse.mjs.map +0 -1
- package/mjs/internal/keyValueStore.mjs.map +0 -1
- package/mjs/internal/path.mjs.map +0 -1
- package/tsconfig.build.json +0 -10
- package/tsconfig.examples.json +0 -11
- package/tsconfig.json +0 -11
- package/tsconfig.test.json +0 -12
- /package/{Http → dist/declarations/src/Http}/Headers.d.ts +0 -0
- /package/{Http → dist/declarations/src/Http}/Method.d.ts +0 -0
- /package/{Http → dist/declarations/src/Http}/UrlParams.d.ts +0 -0
- /package/{Runtime.d.ts → dist/declarations/src/Runtime.d.ts} +0 -0
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import * as Context from 'effect/Context';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { pipe } from 'effect/Function';
|
|
4
|
+
import { FileSystem } from '../../FileSystem/dist/effect-platform-FileSystem.esm.js';
|
|
5
|
+
import { Generator, toString } from '../../Http/Http/Etag/dist/effect-platform-Http-Etag.esm.js';
|
|
6
|
+
|
|
6
7
|
/** @internal */
|
|
7
|
-
|
|
8
|
+
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/Platform");
|
|
9
|
+
|
|
8
10
|
/** @internal */
|
|
9
|
-
|
|
11
|
+
const tag = /*#__PURE__*/Context.Tag(TypeId);
|
|
12
|
+
|
|
10
13
|
/** @internal */
|
|
11
|
-
|
|
12
|
-
const fs = yield* _(FileSystem
|
|
13
|
-
const etagGen = yield* _(
|
|
14
|
+
const make = impl => Effect.gen(function* (_) {
|
|
15
|
+
const fs = yield* _(FileSystem);
|
|
16
|
+
const etagGen = yield* _(Generator);
|
|
14
17
|
return tag.of({
|
|
15
18
|
[TypeId]: TypeId,
|
|
16
19
|
fileResponse(path, options) {
|
|
@@ -24,7 +27,7 @@ export const make = impl => Effect.gen(function* (_) {
|
|
|
24
27
|
const end = options?.bytesToRead !== undefined ? start + Number(options.bytesToRead) : undefined;
|
|
25
28
|
const headers = {
|
|
26
29
|
...(options?.headers ?? {}),
|
|
27
|
-
etag:
|
|
30
|
+
etag: toString(etag)
|
|
28
31
|
};
|
|
29
32
|
if (info.mtime._tag === "Some") {
|
|
30
33
|
headers["last-modified"] = info.mtime.value.toUTCString();
|
|
@@ -37,7 +40,7 @@ export const make = impl => Effect.gen(function* (_) {
|
|
|
37
40
|
return Effect.map(etagGen.fromFileWeb(file), etag => {
|
|
38
41
|
const headers = {
|
|
39
42
|
...(options?.headers ?? {}),
|
|
40
|
-
etag:
|
|
43
|
+
etag: toString(etag),
|
|
41
44
|
"last-modified": new Date(file.lastModified).toUTCString()
|
|
42
45
|
};
|
|
43
46
|
return impl.fileWebResponse(file, options?.status ?? 200, options?.statusText, headers, options);
|
|
@@ -45,4 +48,5 @@ export const make = impl => Effect.gen(function* (_) {
|
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
50
|
});
|
|
48
|
-
|
|
51
|
+
|
|
52
|
+
export { TypeId, make, tag };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import * as Schema from '@effect/schema/Schema';
|
|
2
|
+
import * as Chunk from 'effect/Chunk';
|
|
3
|
+
import * as Context from 'effect/Context';
|
|
4
|
+
import * as Effect from 'effect/Effect';
|
|
5
|
+
import * as Effectable from 'effect/Effectable';
|
|
6
|
+
import { dual } from 'effect/Function';
|
|
7
|
+
import * as Inspectable from 'effect/Inspectable';
|
|
8
|
+
import * as Option from 'effect/Option';
|
|
9
|
+
import FindMyWay from 'find-my-way';
|
|
10
|
+
import { RouteNotFound } from '../../Http/Http/ServerError/dist/effect-platform-Http-ServerError.esm.js';
|
|
11
|
+
import { ServerRequest } from '../../Http/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.esm.js';
|
|
12
|
+
|
|
13
|
+
/** @internal */
|
|
14
|
+
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/Router");
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
const RouteTypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/Router/Route");
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
const RouteContextTypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/Router/RouteContext");
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
const RouteContext = /*#__PURE__*/Context.Tag("@effect/platform/Http/Router/RouteContext");
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
const params = /*#__PURE__*/Effect.map(RouteContext, _ => _.params);
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
const searchParams = /*#__PURE__*/Effect.map(RouteContext, _ => _.searchParams);
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
const schemaParams = schema => {
|
|
33
|
+
const parse = Schema.parse(schema);
|
|
34
|
+
return Effect.flatMap(RouteContext, _ => parse({
|
|
35
|
+
..._.searchParams,
|
|
36
|
+
..._.params
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
class RouterImpl extends Effectable.Effectable {
|
|
40
|
+
constructor(routes, mounts) {
|
|
41
|
+
super();
|
|
42
|
+
this.routes = routes;
|
|
43
|
+
this.mounts = mounts;
|
|
44
|
+
this[TypeId] = TypeId;
|
|
45
|
+
}
|
|
46
|
+
commit() {
|
|
47
|
+
if (this.httpApp === undefined) {
|
|
48
|
+
this.httpApp = toHttpApp(this);
|
|
49
|
+
}
|
|
50
|
+
return this.httpApp;
|
|
51
|
+
}
|
|
52
|
+
toJSON() {
|
|
53
|
+
return {
|
|
54
|
+
_id: "Router",
|
|
55
|
+
routes: this.routes.toJSON(),
|
|
56
|
+
mounts: this.mounts.toJSON()
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
toString() {
|
|
60
|
+
return Inspectable.toString(this);
|
|
61
|
+
}
|
|
62
|
+
[Inspectable.NodeInspectSymbol]() {
|
|
63
|
+
return this.toJSON();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const toHttpApp = self => {
|
|
67
|
+
const router = FindMyWay();
|
|
68
|
+
const mounts = Chunk.toReadonlyArray(self.mounts);
|
|
69
|
+
const mountsLen = mounts.length;
|
|
70
|
+
Chunk.forEach(self.routes, route => {
|
|
71
|
+
function fn() {
|
|
72
|
+
return route;
|
|
73
|
+
}
|
|
74
|
+
if (route.method === "*") {
|
|
75
|
+
router.all(route.path, fn);
|
|
76
|
+
} else {
|
|
77
|
+
router.on(route.method, route.path, fn);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return Effect.flatMap(ServerRequest, request => {
|
|
81
|
+
if (mountsLen > 0) {
|
|
82
|
+
for (let i = 0; i < mountsLen; i++) {
|
|
83
|
+
const [path, app] = mounts[i];
|
|
84
|
+
if (request.url.startsWith(path)) {
|
|
85
|
+
return Effect.provideService(app, ServerRequest, sliceRequestUrl(request, path));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
let result = router.find(request.method, request.url);
|
|
90
|
+
if (result === null && request.method === "HEAD") {
|
|
91
|
+
result = router.find("GET", request.url);
|
|
92
|
+
}
|
|
93
|
+
if (result === null) {
|
|
94
|
+
return Effect.fail(RouteNotFound({
|
|
95
|
+
request
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
const route = result.handler();
|
|
99
|
+
if (route.prefix._tag === "Some") {
|
|
100
|
+
request = sliceRequestUrl(request, route.prefix.value);
|
|
101
|
+
}
|
|
102
|
+
return Effect.mapInputContext(route.handler, context => Context.add(Context.add(context, ServerRequest, request), RouteContext, new RouteContextImpl(result.params, result.searchParams)));
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
function sliceRequestUrl(request, prefix) {
|
|
106
|
+
const prefexLen = prefix.length;
|
|
107
|
+
return request.modify({
|
|
108
|
+
url: request.url.length <= prefexLen ? "/" : request.url.slice(prefexLen)
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
class RouteImpl {
|
|
112
|
+
constructor(method, path, handler, prefix = Option.none()) {
|
|
113
|
+
this.method = method;
|
|
114
|
+
this.path = path;
|
|
115
|
+
this.handler = handler;
|
|
116
|
+
this.prefix = prefix;
|
|
117
|
+
this[RouteTypeId] = RouteTypeId;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
class RouteContextImpl {
|
|
121
|
+
constructor(params, searchParams) {
|
|
122
|
+
this.params = params;
|
|
123
|
+
this.searchParams = searchParams;
|
|
124
|
+
this[RouteContextTypeId] = RouteContextTypeId;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** @internal */
|
|
129
|
+
const empty = /*#__PURE__*/new RouterImpl( /*#__PURE__*/Chunk.empty(), /*#__PURE__*/Chunk.empty());
|
|
130
|
+
|
|
131
|
+
/** @internal */
|
|
132
|
+
const fromIterable = routes => new RouterImpl(Chunk.fromIterable(routes), Chunk.empty());
|
|
133
|
+
|
|
134
|
+
/** @internal */
|
|
135
|
+
const makeRoute = (method, path, handler, prefix = Option.none()) => new RouteImpl(method, path, handler, prefix);
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
const concat = /*#__PURE__*/dual(2, (self, that) => new RouterImpl(Chunk.appendAll(self.routes, that.routes), self.mounts));
|
|
139
|
+
const removeTrailingSlash = path => path.endsWith("/") ? path.slice(0, -1) : path;
|
|
140
|
+
|
|
141
|
+
/** @internal */
|
|
142
|
+
const prefixAll = /*#__PURE__*/dual(2, (self, prefix) => {
|
|
143
|
+
prefix = removeTrailingSlash(prefix);
|
|
144
|
+
return new RouterImpl(Chunk.map(self.routes, route => new RouteImpl(route.method, route.path === "/" ? prefix : prefix + route.path, route.handler, Option.orElse(Option.map(route.prefix, _ => prefix + _), () => Option.some(prefix)))), Chunk.map(self.mounts, ([path, app]) => [path === "/" ? prefix : prefix + path, app]));
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
/** @internal */
|
|
148
|
+
const mount = /*#__PURE__*/dual(3, (self, path, that) => concat(self, prefixAll(that, path)));
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
const mountApp = /*#__PURE__*/dual(3, (self, path, that) => new RouterImpl(self.routes, Chunk.append(self.mounts, [removeTrailingSlash(path), that])));
|
|
152
|
+
|
|
153
|
+
/** @internal */
|
|
154
|
+
const route = method => dual(3, (self, path, handler) => new RouterImpl(Chunk.append(self.routes, new RouteImpl(method, path, handler)), self.mounts));
|
|
155
|
+
|
|
156
|
+
/** @internal */
|
|
157
|
+
const all = /*#__PURE__*/route("*");
|
|
158
|
+
|
|
159
|
+
/** @internal */
|
|
160
|
+
const get = /*#__PURE__*/route("GET");
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
const post = /*#__PURE__*/route("POST");
|
|
164
|
+
|
|
165
|
+
/** @internal */
|
|
166
|
+
const put = /*#__PURE__*/route("PUT");
|
|
167
|
+
|
|
168
|
+
/** @internal */
|
|
169
|
+
const patch = /*#__PURE__*/route("PATCH");
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
const del = /*#__PURE__*/route("DELETE");
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
const head = /*#__PURE__*/route("HEAD");
|
|
176
|
+
|
|
177
|
+
/** @internal */
|
|
178
|
+
const options = /*#__PURE__*/route("OPTIONS");
|
|
179
|
+
|
|
180
|
+
/** @internal */
|
|
181
|
+
const use = /*#__PURE__*/dual(2, (self, f) => new RouterImpl(Chunk.map(self.routes, route => new RouteImpl(route.method, route.path, f(route.handler), route.prefix)), Chunk.map(self.mounts, ([path, app]) => [path, f(app)])));
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
const catchAll = /*#__PURE__*/dual(2, (self, f) => use(self, Effect.catchAll(f)));
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
const catchAllCause = /*#__PURE__*/dual(2, (self, f) => use(self, Effect.catchAllCause(f)));
|
|
188
|
+
|
|
189
|
+
/** @internal */
|
|
190
|
+
const catchTag = /*#__PURE__*/dual(3, (self, k, f) => use(self, Effect.catchTag(k, f)));
|
|
191
|
+
|
|
192
|
+
/** @internal */
|
|
193
|
+
const catchTags = /*#__PURE__*/dual(2, (self, cases) => use(self, Effect.catchTags(cases)));
|
|
194
|
+
const provideService = /*#__PURE__*/dual(3, (self, tag, service) => use(self, Effect.provideService(tag, service)));
|
|
195
|
+
|
|
196
|
+
/* @internal */
|
|
197
|
+
const provideServiceEffect = /*#__PURE__*/dual(3, (self, tag, effect) => use(self, Effect.provideServiceEffect(tag, effect)));
|
|
198
|
+
|
|
199
|
+
export { RouteContext, RouteContextTypeId, RouteTypeId, TypeId, all, catchAll, catchAllCause, catchTag, catchTags, concat, del, empty, fromIterable, get, head, makeRoute, mount, mountApp, options, params, patch, post, prefixAll, provideService, provideServiceEffect, put, route, schemaParams, searchParams, use };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as Context from 'effect/Context';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { dual } from 'effect/Function';
|
|
4
|
+
|
|
5
|
+
/** @internal */
|
|
6
|
+
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/Server");
|
|
7
|
+
|
|
8
|
+
/** @internal */
|
|
9
|
+
const serverTag = /*#__PURE__*/Context.Tag(TypeId);
|
|
10
|
+
const serverProto = {
|
|
11
|
+
[TypeId]: TypeId
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
const make = options => Object.assign(Object.create(serverProto), options);
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
const serve = /*#__PURE__*/dual(args => Effect.isEffect(args[0]), (httpApp, middleware) => Effect.flatMap(serverTag, server => server.serve(httpApp, middleware)));
|
|
19
|
+
|
|
20
|
+
export { TypeId, make, serve, serverTag };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as Data from 'effect/Data';
|
|
2
|
+
|
|
3
|
+
/** @internal */
|
|
4
|
+
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/Error");
|
|
5
|
+
const make = tag => props => Data.struct({
|
|
6
|
+
[TypeId]: TypeId,
|
|
7
|
+
_tag: tag,
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
const requestError = /*#__PURE__*/make("RequestError");
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
const responseError = /*#__PURE__*/make("ResponseError");
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
const routeNotFound = /*#__PURE__*/make("RouteNotFound");
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
const serveError = /*#__PURE__*/make("ServeError");
|
|
22
|
+
|
|
23
|
+
export { TypeId, requestError, responseError, routeNotFound, serveError };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as Context from 'effect/Context';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { toRecord, schemaRecord, schemaJson } from '../../Http/Http/FormData/dist/effect-platform-Http-FormData.esm.js';
|
|
4
|
+
import { schemaHeaders as schemaHeaders$1, schemaBodyJson as schemaBodyJson$1, schemaBodyUrlParams as schemaBodyUrlParams$1 } from '../../Http/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.esm.js';
|
|
5
|
+
import { RequestError } from '../../Http/Http/ServerError/dist/effect-platform-Http-ServerError.esm.js';
|
|
6
|
+
|
|
7
|
+
/** @internal */
|
|
8
|
+
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/ServerRequest");
|
|
9
|
+
|
|
10
|
+
/** @internal */
|
|
11
|
+
const serverRequestTag = /*#__PURE__*/Context.Tag(TypeId);
|
|
12
|
+
|
|
13
|
+
/** @internal */
|
|
14
|
+
const formDataRecord = /*#__PURE__*/Effect.map( /*#__PURE__*/Effect.flatMap(serverRequestTag, request => request.formData), toRecord);
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
const schemaHeaders = schema => {
|
|
18
|
+
const parse = schemaHeaders$1(schema);
|
|
19
|
+
return Effect.flatMap(serverRequestTag, parse);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
const schemaBodyJson = schema => {
|
|
24
|
+
const parse = schemaBodyJson$1(schema);
|
|
25
|
+
return Effect.flatMap(serverRequestTag, parse);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
const schemaBodyUrlParams = schema => {
|
|
30
|
+
const parse = schemaBodyUrlParams$1(schema);
|
|
31
|
+
return Effect.flatMap(serverRequestTag, parse);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
const schemaFormData = schema => {
|
|
36
|
+
const parse = schemaRecord(schema);
|
|
37
|
+
return Effect.flatMap(Effect.flatMap(serverRequestTag, request => request.formData), parse);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
const schemaFormDataJson = schema => {
|
|
42
|
+
const parse = schemaJson(schema);
|
|
43
|
+
return field => Effect.flatMap(serverRequestTag, request => Effect.flatMap(request.formData, formData => Effect.catchTag(parse(formData, field), "FormDataError", error => Effect.fail(RequestError({
|
|
44
|
+
reason: "Decode",
|
|
45
|
+
request,
|
|
46
|
+
error: error.error
|
|
47
|
+
})))));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { TypeId, formDataRecord, schemaBodyJson, schemaBodyUrlParams, schemaFormData, schemaFormDataJson, schemaHeaders, serverRequestTag };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { dual } from 'effect/Function';
|
|
3
|
+
import { pipeArguments } from 'effect/Pipeable';
|
|
4
|
+
import { empty as empty$1, set, setAll, remove } from '../../Http/Http/Headers/dist/effect-platform-Http-Headers.esm.js';
|
|
5
|
+
import { Platform } from '../../Http/Http/Platform/dist/effect-platform-Http-Platform.esm.js';
|
|
6
|
+
import { toString, fromInput } from '../../Http/Http/UrlParams/dist/effect-platform-Http-UrlParams.esm.js';
|
|
7
|
+
import { empty as empty$2, uint8Array as uint8Array$1, text as text$1, json as json$1, unsafeJson as unsafeJson$1, jsonSchema, raw as raw$1, formData as formData$1, stream as stream$1 } from './body.esm.js';
|
|
8
|
+
|
|
9
|
+
/** @internal */
|
|
10
|
+
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/ServerResponse");
|
|
11
|
+
class ServerResponseImpl {
|
|
12
|
+
constructor(status, statusText, headers, body) {
|
|
13
|
+
this.status = status;
|
|
14
|
+
this.statusText = statusText;
|
|
15
|
+
this.body = body;
|
|
16
|
+
this[TypeId] = TypeId;
|
|
17
|
+
if (body.contentType || body.contentLength) {
|
|
18
|
+
const newHeaders = {
|
|
19
|
+
...headers
|
|
20
|
+
};
|
|
21
|
+
if (body.contentType) {
|
|
22
|
+
newHeaders["content-type"] = body.contentType;
|
|
23
|
+
}
|
|
24
|
+
if (body.contentLength) {
|
|
25
|
+
newHeaders["content-length"] = body.contentLength.toString();
|
|
26
|
+
}
|
|
27
|
+
this.headers = newHeaders;
|
|
28
|
+
} else {
|
|
29
|
+
this.headers = headers;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
pipe() {
|
|
33
|
+
return pipeArguments(this, arguments);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
const isServerResponse = u => typeof u === "object" && u !== null && TypeId in u;
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
const empty = options => new ServerResponseImpl(options?.status ?? 204, options?.statusText, options?.headers ?? empty$1, empty$2);
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
const uint8Array = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$1, uint8Array$1(body, getContentType(options)));
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
const text = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$1, text$1(body, getContentType(options)));
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
const json = (body, options) => Effect.map(json$1(body), body => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$1, body));
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
const unsafeJson = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$1, unsafeJson$1(body));
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
const schemaJson = schema => {
|
|
57
|
+
const encode = jsonSchema(schema);
|
|
58
|
+
return (body, options) => Effect.map(encode(body), body => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$1, body));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
const file = (path, options) => Effect.flatMap(Platform, platform => platform.fileResponse(path, options));
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
const fileWeb = (file, options) => Effect.flatMap(Platform, platform => platform.fileWebResponse(file, options));
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
const urlParams = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$1, text$1(toString(fromInput(body)), "application/x-www-form-urlencoded"));
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
const raw = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$1, raw$1(body));
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
const formData = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$1, formData$1(body));
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
const stream = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$1, stream$1(body, getContentType(options), options?.contentLength));
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
const getContentType = options => {
|
|
81
|
+
if (options?.contentType) {
|
|
82
|
+
return options.contentType;
|
|
83
|
+
} else if (options?.headers) {
|
|
84
|
+
return options.headers["content-type"];
|
|
85
|
+
} else {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
const setHeader = /*#__PURE__*/dual(3, (self, key, value) => new ServerResponseImpl(self.status, self.statusText, set(self.headers, key, value), self.body));
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
const setHeaders = /*#__PURE__*/dual(2, (self, input) => new ServerResponseImpl(self.status, self.statusText, setAll(self.headers, input), self.body));
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
const setBody = /*#__PURE__*/dual(2, (self, body) => {
|
|
98
|
+
let headers = self.headers;
|
|
99
|
+
if (body._tag === "Empty") {
|
|
100
|
+
headers = remove(remove(headers, "Content-Type"), "Content-length");
|
|
101
|
+
}
|
|
102
|
+
return new ServerResponseImpl(self.status, self.statusText, headers, body);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export { TypeId, empty, file, fileWeb, formData, getContentType, isServerResponse, json, raw, schemaJson, setBody, setHeader, setHeaders, stream, text, uint8Array, unsafeJson, urlParams };
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import * as Schema from '@effect/schema/Schema';
|
|
2
|
+
import * as Context from 'effect/Context';
|
|
3
|
+
import * as Effect from 'effect/Effect';
|
|
4
|
+
import { dual, pipe } from 'effect/Function';
|
|
5
|
+
import * as Layer from 'effect/Layer';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
7
|
+
import { FileSystem } from '../FileSystem/dist/effect-platform-FileSystem.esm.js';
|
|
8
|
+
import { Path } from '../Path/dist/effect-platform-Path.esm.js';
|
|
9
|
+
|
|
9
10
|
/** @internal */
|
|
10
|
-
|
|
11
|
+
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/KeyValueStore");
|
|
12
|
+
|
|
11
13
|
/** @internal */
|
|
12
|
-
|
|
14
|
+
const keyValueStoreTag = /*#__PURE__*/Context.Tag(TypeId);
|
|
15
|
+
|
|
13
16
|
/** @internal */
|
|
14
|
-
|
|
17
|
+
const make = impl => keyValueStoreTag.of({
|
|
15
18
|
[TypeId]: TypeId,
|
|
16
19
|
has: key => Effect.map(impl.get(key), Option.isSome),
|
|
17
20
|
isEmpty: Effect.map(impl.size, size => size === 0),
|
|
@@ -27,8 +30,9 @@ export const make = impl => keyValueStoreTag.of({
|
|
|
27
30
|
},
|
|
28
31
|
...impl
|
|
29
32
|
});
|
|
33
|
+
|
|
30
34
|
/** @internal */
|
|
31
|
-
|
|
35
|
+
const prefix = /*#__PURE__*/dual(2, (self, prefix) => ({
|
|
32
36
|
...self,
|
|
33
37
|
get: key => self.get(`${prefix}${key}`),
|
|
34
38
|
set: (key, value) => self.set(`${prefix}${key}`, value),
|
|
@@ -36,8 +40,10 @@ export const prefix = /*#__PURE__*/dual(2, (self, prefix) => ({
|
|
|
36
40
|
has: key => self.has(`${prefix}${key}`),
|
|
37
41
|
modify: (key, f) => self.modify(`${prefix}${key}`, f)
|
|
38
42
|
}));
|
|
43
|
+
|
|
39
44
|
/** @internal */
|
|
40
|
-
|
|
45
|
+
const SchemaStoreTypeId = /*#__PURE__*/Symbol.for("@effect/platform/KeyValueStore/SchemaStore");
|
|
46
|
+
|
|
41
47
|
/** @internal */
|
|
42
48
|
const makeSchemaStore = (store, schema) => {
|
|
43
49
|
const jsonSchema = Schema.compose(Schema.ParseJson, schema);
|
|
@@ -67,8 +73,9 @@ const makeSchemaStore = (store, schema) => {
|
|
|
67
73
|
isEmpty: store.isEmpty
|
|
68
74
|
};
|
|
69
75
|
};
|
|
76
|
+
|
|
70
77
|
/** @internal */
|
|
71
|
-
|
|
78
|
+
const layerMemory = /*#__PURE__*/Layer.sync(keyValueStoreTag, () => {
|
|
72
79
|
const store = new Map();
|
|
73
80
|
return make({
|
|
74
81
|
get: key => Effect.sync(() => Option.fromNullable(store.get(key))),
|
|
@@ -78,10 +85,11 @@ export const layerMemory = /*#__PURE__*/Layer.sync(keyValueStoreTag, () => {
|
|
|
78
85
|
size: Effect.sync(() => store.size)
|
|
79
86
|
});
|
|
80
87
|
});
|
|
88
|
+
|
|
81
89
|
/** @internal */
|
|
82
|
-
|
|
83
|
-
const fs = yield* _(FileSystem
|
|
84
|
-
const path = yield* _(Path
|
|
90
|
+
const layerFileSystem = directory => Layer.effect(keyValueStoreTag, Effect.gen(function* (_) {
|
|
91
|
+
const fs = yield* _(FileSystem);
|
|
92
|
+
const path = yield* _(Path);
|
|
85
93
|
const keyPath = key => path.join(directory, encodeURIComponent(key));
|
|
86
94
|
if (!(yield* _(fs.exists(directory)))) {
|
|
87
95
|
yield* _(fs.makeDirectory(directory, {
|
|
@@ -101,8 +109,9 @@ export const layerFileSystem = directory => Layer.effect(keyValueStoreTag, Effec
|
|
|
101
109
|
size: Effect.map(fs.readDirectory(directory), files => files.length)
|
|
102
110
|
});
|
|
103
111
|
}));
|
|
112
|
+
|
|
104
113
|
/** @internal */
|
|
105
|
-
|
|
114
|
+
const layerSchema = (schema, tagIdentifier) => {
|
|
106
115
|
const tag = Context.Tag(tagIdentifier);
|
|
107
116
|
const layer = Layer.effect(tag, Effect.map(keyValueStoreTag, store => store.forSchema(schema)));
|
|
108
117
|
return {
|
|
@@ -110,4 +119,5 @@ export const layerSchema = (schema, tagIdentifier) => {
|
|
|
110
119
|
layer
|
|
111
120
|
};
|
|
112
121
|
};
|
|
113
|
-
|
|
122
|
+
|
|
123
|
+
export { SchemaStoreTypeId, TypeId, keyValueStoreTag, layerFileSystem, layerMemory, layerSchema, make, prefix };
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
1
|
+
import { Tag } from 'effect/Context';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { identity } from 'effect/Function';
|
|
4
|
+
import * as Layer from 'effect/Layer';
|
|
5
|
+
import * as PathB from 'path-browserify';
|
|
6
|
+
import { BadArgument } from '../Error/dist/effect-platform-Error.esm.js';
|
|
7
|
+
|
|
7
8
|
/** @internal */
|
|
8
|
-
|
|
9
|
+
const Path = /*#__PURE__*/Tag("@effect/platform/Path");
|
|
10
|
+
|
|
9
11
|
/** @internal */
|
|
10
|
-
|
|
12
|
+
const layer = /*#__PURE__*/Layer.succeed(Path, /*#__PURE__*/Path.of({
|
|
11
13
|
...PathB,
|
|
12
14
|
fromFileUrl,
|
|
13
15
|
toFileUrl,
|
|
14
16
|
toNamespacedPath: identity
|
|
15
17
|
}));
|
|
18
|
+
|
|
16
19
|
/**
|
|
17
20
|
* The following functions are adapted from the Node.js source code:
|
|
18
21
|
* https://github.com/nodejs/node/blob/main/lib/internal/url.js
|
|
@@ -20,6 +23,7 @@ export const layer = /*#__PURE__*/Layer.succeed(Path, /*#__PURE__*/Path.of({
|
|
|
20
23
|
* The following license applies to these functions:
|
|
21
24
|
* - MIT
|
|
22
25
|
*/
|
|
26
|
+
|
|
23
27
|
function fromFileUrl(url) {
|
|
24
28
|
if (url.protocol !== "file:") {
|
|
25
29
|
return Effect.fail(BadArgument({
|
|
@@ -84,4 +88,5 @@ function encodePathChars(filepath) {
|
|
|
84
88
|
}
|
|
85
89
|
return filepath;
|
|
86
90
|
}
|
|
87
|
-
|
|
91
|
+
|
|
92
|
+
export { Path, layer };
|