@smthrs/platform-bun 0.0.0-stage → 1.0.0-rc.13
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/CHANGELOG.md +73 -0
- package/LICENSE +21 -0
- package/README.md +110 -2
- package/dist/cjs/BunFileSystem.d.ts +44 -0
- package/dist/cjs/BunFileSystem.d.ts.map +1 -0
- package/dist/cjs/BunFileSystem.js +38 -0
- package/dist/cjs/BunFileSystem.js.map +7 -0
- package/dist/cjs/BunHost.d.ts +205 -0
- package/dist/cjs/BunHost.d.ts.map +1 -0
- package/dist/cjs/BunHost.js +148 -0
- package/dist/cjs/BunHost.js.map +7 -0
- package/dist/cjs/index.d.ts +26 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +37 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/BunFileSystem.d.ts +44 -0
- package/dist/esm/BunFileSystem.d.ts.map +1 -0
- package/dist/esm/BunFileSystem.js +35 -0
- package/dist/esm/BunFileSystem.js.map +1 -0
- package/dist/esm/BunHost.d.ts +205 -0
- package/dist/esm/BunHost.d.ts.map +1 -0
- package/dist/esm/BunHost.js +248 -0
- package/dist/esm/BunHost.js.map +1 -0
- package/dist/esm/index.d.ts +26 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/vendor/adapters.json +3067 -0
- package/dist/vendor/bun/BunAddressResolver.d.ts +15 -0
- package/dist/vendor/bun/BunAddressResolver.js +8 -0
- package/dist/vendor/bun/BunChildProcessSpawner.d.ts +8 -0
- package/dist/vendor/bun/BunChildProcessSpawner.js +14 -0
- package/dist/vendor/bun/BunClusterHttp.d.ts +76 -0
- package/dist/vendor/bun/BunClusterHttp.js +39 -0
- package/dist/vendor/bun/BunClusterSocket.d.ts +70 -0
- package/dist/vendor/bun/BunClusterSocket.js +22 -0
- package/dist/vendor/bun/BunCrypto.d.ts +11 -0
- package/dist/vendor/bun/BunCrypto.js +8 -0
- package/dist/vendor/bun/BunDatagramSocket.d.ts +227 -0
- package/dist/vendor/bun/BunDatagramSocket.js +11 -0
- package/dist/vendor/bun/BunDns.d.ts +72 -0
- package/dist/vendor/bun/BunDns.js +12 -0
- package/dist/vendor/bun/BunFileSystem.d.ts +11 -0
- package/dist/vendor/bun/BunFileSystem.js +9 -0
- package/dist/vendor/bun/BunHttpClient.d.ts +10 -0
- package/dist/vendor/bun/BunHttpClient.js +1 -0
- package/dist/vendor/bun/BunHttpPlatform.d.ts +11 -0
- package/dist/vendor/bun/BunHttpPlatform.js +11 -0
- package/dist/vendor/bun/BunHttpServer.d.ts +151 -0
- package/dist/vendor/bun/BunHttpServer.js +38 -0
- package/dist/vendor/bun/BunHttpServerRequest.d.ts +20 -0
- package/dist/vendor/bun/BunHttpServerRequest.js +7 -0
- package/dist/vendor/bun/BunMultipart.d.ts +34 -0
- package/dist/vendor/bun/BunMultipart.js +12 -0
- package/dist/vendor/bun/BunPath.d.ts +27 -0
- package/dist/vendor/bun/BunPath.js +12 -0
- package/dist/vendor/bun/BunRedis.d.ts +53 -0
- package/dist/vendor/bun/BunRedis.js +11 -0
- package/dist/vendor/bun/BunRuntime.d.ts +88 -0
- package/dist/vendor/bun/BunRuntime.js +8 -0
- package/dist/vendor/bun/BunServices.d.ts +37 -0
- package/dist/vendor/bun/BunServices.js +23 -0
- package/dist/vendor/bun/BunSink.d.ts +9 -0
- package/dist/vendor/bun/BunSink.js +12 -0
- package/dist/vendor/bun/BunSocket.d.ts +45 -0
- package/dist/vendor/bun/BunSocket.js +29 -0
- package/dist/vendor/bun/BunSocketServer.d.ts +9 -0
- package/dist/vendor/bun/BunSocketServer.js +21 -0
- package/dist/vendor/bun/BunStdio.d.ts +12 -0
- package/dist/vendor/bun/BunStdio.js +10 -0
- package/dist/vendor/bun/BunStream.d.ts +20 -0
- package/dist/vendor/bun/BunStream.js +30 -0
- package/dist/vendor/bun/BunTerminal.d.ts +24 -0
- package/dist/vendor/bun/BunTerminal.js +10 -0
- package/dist/vendor/bun/BunWorker.d.ts +22 -0
- package/dist/vendor/bun/BunWorker.js +9 -0
- package/dist/vendor/bun/BunWorkerRunner.d.ts +13 -0
- package/dist/vendor/bun/BunWorkerRunner.js +7 -0
- package/dist/vendor/bun/LICENSE +21 -0
- package/dist/vendor/bun/index.d.ts +130 -0
- package/dist/vendor/bun/index.js +121 -0
- package/dist/vendor/chunk-226TYKP6.js +60 -0
- package/dist/vendor/chunk-2ADOI6ZN.js +18 -0
- package/dist/vendor/chunk-2AP6TO77.js +71 -0
- package/dist/vendor/chunk-2LGUVSNM.js +20 -0
- package/dist/vendor/chunk-3SUO3TTE.js +40 -0
- package/dist/vendor/chunk-4O4Z52A2.js +48 -0
- package/dist/vendor/chunk-4YK2MHSO.js +20 -0
- package/dist/vendor/chunk-6B775XB2.js +85 -0
- package/dist/vendor/chunk-6KYVM2ZC.js +419 -0
- package/dist/vendor/chunk-6QPSLCUZ.js +0 -0
- package/dist/vendor/chunk-6R444NFO.js +104 -0
- package/dist/vendor/chunk-7JOAEKDV.js +503 -0
- package/dist/vendor/chunk-7VJC3PHX.js +63 -0
- package/dist/vendor/chunk-7ZKNPDTP.js +26 -0
- package/dist/vendor/chunk-ABPRHPJP.js +15 -0
- package/dist/vendor/chunk-AMAL6TRE.js +93 -0
- package/dist/vendor/chunk-AW6WQVI7.js +29 -0
- package/dist/vendor/chunk-BHV44Z6K.js +36 -0
- package/dist/vendor/chunk-BIR74JJK.js +93 -0
- package/dist/vendor/chunk-BTXZUHUI.js +7 -0
- package/dist/vendor/chunk-BVV46N3V.js +515 -0
- package/dist/vendor/chunk-C7UMBJO6.js +31 -0
- package/dist/vendor/chunk-CN4K2U6M.js +20 -0
- package/dist/vendor/chunk-D6XNHJPW.js +18 -0
- package/dist/vendor/chunk-DHTPLWAP.js +34 -0
- package/dist/vendor/chunk-DWSNOBD4.js +18 -0
- package/dist/vendor/chunk-DX4VFONH.js +81 -0
- package/dist/vendor/chunk-EIO7BKW3.js +63 -0
- package/dist/vendor/chunk-FIPFWLCV.js +144 -0
- package/dist/vendor/chunk-GITB76ZP.js +22 -0
- package/dist/vendor/chunk-GMORYZG4.js +62 -0
- package/dist/vendor/chunk-HXGVOKHF.js +22 -0
- package/dist/vendor/chunk-HYPKWCVW.js +374 -0
- package/dist/vendor/chunk-IJON5WTO.js +34 -0
- package/dist/vendor/chunk-IXI7RW3A.js +580 -0
- package/dist/vendor/chunk-J43O5GFH.js +28 -0
- package/dist/vendor/chunk-JTST2Z7N.js +58 -0
- package/dist/vendor/chunk-JYD572EF.js +18 -0
- package/dist/vendor/chunk-K6GWBGJM.js +16 -0
- package/dist/vendor/chunk-KANNAI65.js +62 -0
- package/dist/vendor/chunk-KEMBVIRS.js +128 -0
- package/dist/vendor/chunk-LOB26XOO.js +0 -0
- package/dist/vendor/chunk-M2QOSF47.js +53 -0
- package/dist/vendor/chunk-MLKGABMK.js +9 -0
- package/dist/vendor/chunk-NGGMPIWR.js +65 -0
- package/dist/vendor/chunk-NNTJGFLB.js +21 -0
- package/dist/vendor/chunk-NU53DHQR.js +18 -0
- package/dist/vendor/chunk-OAY4MA3I.js +28 -0
- package/dist/vendor/chunk-OV2KKGBA.js +16 -0
- package/dist/vendor/chunk-PBM2HJOX.js +118 -0
- package/dist/vendor/chunk-Q5UCOQNO.js +70 -0
- package/dist/vendor/chunk-Q7YXUH7M.js +414 -0
- package/dist/vendor/chunk-QKYYD3AZ.js +131 -0
- package/dist/vendor/chunk-QLI7T34M.js +18 -0
- package/dist/vendor/chunk-QR2ZOVOL.js +18 -0
- package/dist/vendor/chunk-R2PFJKSP.js +274 -0
- package/dist/vendor/chunk-RX5TKFP7.js +51 -0
- package/dist/vendor/chunk-S3MN5OXB.js +34 -0
- package/dist/vendor/chunk-T5WDTZCE.js +249 -0
- package/dist/vendor/chunk-TBMTA5LD.js +14 -0
- package/dist/vendor/chunk-TCKM3JXD.js +325 -0
- package/dist/vendor/chunk-UXIG7ALP.js +229 -0
- package/dist/vendor/chunk-V577GRCI.js +438 -0
- package/dist/vendor/chunk-VS6VBUH6.js +57 -0
- package/dist/vendor/chunk-WGUQHMX2.js +18 -0
- package/dist/vendor/chunk-WNS3OER2.js +18 -0
- package/dist/vendor/chunk-X6FYP2EH.js +109 -0
- package/dist/vendor/chunk-XAVBQY4D.js +20 -0
- package/dist/vendor/chunk-XAZH2ZEU.js +43 -0
- package/dist/vendor/chunk-XDPP24MG.js +129 -0
- package/dist/vendor/chunk-XF3WZCMZ.js +26 -0
- package/dist/vendor/chunk-XXVMTKX5.js +0 -0
- package/dist/vendor/chunk-YJGNV6EV.js +85 -0
- package/dist/vendor/chunk-ZJEHEPDQ.js +18 -0
- package/dist/vendor/cjs/bun/BunAddressResolver.d.ts +15 -0
- package/dist/vendor/cjs/bun/BunAddressResolver.js +1 -0
- package/dist/vendor/cjs/bun/BunChildProcessSpawner.d.ts +8 -0
- package/dist/vendor/cjs/bun/BunChildProcessSpawner.js +1 -0
- package/dist/vendor/cjs/bun/BunClusterHttp.d.ts +76 -0
- package/dist/vendor/cjs/bun/BunClusterHttp.js +1 -0
- package/dist/vendor/cjs/bun/BunClusterSocket.d.ts +70 -0
- package/dist/vendor/cjs/bun/BunClusterSocket.js +1 -0
- package/dist/vendor/cjs/bun/BunCrypto.d.ts +11 -0
- package/dist/vendor/cjs/bun/BunCrypto.js +1 -0
- package/dist/vendor/cjs/bun/BunDatagramSocket.d.ts +227 -0
- package/dist/vendor/cjs/bun/BunDatagramSocket.js +1 -0
- package/dist/vendor/cjs/bun/BunDns.d.ts +72 -0
- package/dist/vendor/cjs/bun/BunDns.js +1 -0
- package/dist/vendor/cjs/bun/BunFileSystem.d.ts +11 -0
- package/dist/vendor/cjs/bun/BunFileSystem.js +1 -0
- package/dist/vendor/cjs/bun/BunHttpClient.d.ts +10 -0
- package/dist/vendor/cjs/bun/BunHttpClient.js +1 -0
- package/dist/vendor/cjs/bun/BunHttpPlatform.d.ts +11 -0
- package/dist/vendor/cjs/bun/BunHttpPlatform.js +1 -0
- package/dist/vendor/cjs/bun/BunHttpServer.d.ts +151 -0
- package/dist/vendor/cjs/bun/BunHttpServer.js +1 -0
- package/dist/vendor/cjs/bun/BunHttpServerRequest.d.ts +20 -0
- package/dist/vendor/cjs/bun/BunHttpServerRequest.js +1 -0
- package/dist/vendor/cjs/bun/BunMultipart.d.ts +34 -0
- package/dist/vendor/cjs/bun/BunMultipart.js +1 -0
- package/dist/vendor/cjs/bun/BunPath.d.ts +27 -0
- package/dist/vendor/cjs/bun/BunPath.js +1 -0
- package/dist/vendor/cjs/bun/BunRedis.d.ts +53 -0
- package/dist/vendor/cjs/bun/BunRedis.js +1 -0
- package/dist/vendor/cjs/bun/BunRuntime.d.ts +88 -0
- package/dist/vendor/cjs/bun/BunRuntime.js +1 -0
- package/dist/vendor/cjs/bun/BunServices.d.ts +37 -0
- package/dist/vendor/cjs/bun/BunServices.js +1 -0
- package/dist/vendor/cjs/bun/BunSink.d.ts +9 -0
- package/dist/vendor/cjs/bun/BunSink.js +1 -0
- package/dist/vendor/cjs/bun/BunSocket.d.ts +45 -0
- package/dist/vendor/cjs/bun/BunSocket.js +1 -0
- package/dist/vendor/cjs/bun/BunSocketServer.d.ts +9 -0
- package/dist/vendor/cjs/bun/BunSocketServer.js +1 -0
- package/dist/vendor/cjs/bun/BunStdio.d.ts +12 -0
- package/dist/vendor/cjs/bun/BunStdio.js +1 -0
- package/dist/vendor/cjs/bun/BunStream.d.ts +20 -0
- package/dist/vendor/cjs/bun/BunStream.js +1 -0
- package/dist/vendor/cjs/bun/BunTerminal.d.ts +24 -0
- package/dist/vendor/cjs/bun/BunTerminal.js +1 -0
- package/dist/vendor/cjs/bun/BunWorker.d.ts +22 -0
- package/dist/vendor/cjs/bun/BunWorker.js +1 -0
- package/dist/vendor/cjs/bun/BunWorkerRunner.d.ts +13 -0
- package/dist/vendor/cjs/bun/BunWorkerRunner.js +1 -0
- package/dist/vendor/cjs/bun/index.d.ts +130 -0
- package/dist/vendor/cjs/bun/index.js +1 -0
- package/dist/vendor/cjs/node/NodeAddressResolver.d.ts +16 -0
- package/dist/vendor/cjs/node/NodeAddressResolver.js +1 -0
- package/dist/vendor/cjs/node/NodeChildProcessSpawner.d.ts +8 -0
- package/dist/vendor/cjs/node/NodeChildProcessSpawner.js +1 -0
- package/dist/vendor/cjs/node/NodeClusterHttp.d.ts +54 -0
- package/dist/vendor/cjs/node/NodeClusterHttp.js +1 -0
- package/dist/vendor/cjs/node/NodeClusterSocket.d.ts +85 -0
- package/dist/vendor/cjs/node/NodeClusterSocket.js +1 -0
- package/dist/vendor/cjs/node/NodeCrypto.d.ts +11 -0
- package/dist/vendor/cjs/node/NodeCrypto.js +1 -0
- package/dist/vendor/cjs/node/NodeDatagramSocket.d.ts +10 -0
- package/dist/vendor/cjs/node/NodeDatagramSocket.js +1 -0
- package/dist/vendor/cjs/node/NodeDns.d.ts +51 -0
- package/dist/vendor/cjs/node/NodeDns.js +1 -0
- package/dist/vendor/cjs/node/NodeFileSystem.d.ts +11 -0
- package/dist/vendor/cjs/node/NodeFileSystem.js +1 -0
- package/dist/vendor/cjs/node/NodeHttpClient.d.ts +303 -0
- package/dist/vendor/cjs/node/NodeHttpClient.js +1 -0
- package/dist/vendor/cjs/node/NodeHttpIncomingMessage.d.ts +64 -0
- package/dist/vendor/cjs/node/NodeHttpIncomingMessage.js +1 -0
- package/dist/vendor/cjs/node/NodeHttpPlatform.d.ts +38 -0
- package/dist/vendor/cjs/node/NodeHttpPlatform.js +1 -0
- package/dist/vendor/cjs/node/NodeHttpServer.d.ts +131 -0
- package/dist/vendor/cjs/node/NodeHttpServer.js +1 -0
- package/dist/vendor/cjs/node/NodeHttpServerRequest.d.ts +32 -0
- package/dist/vendor/cjs/node/NodeHttpServerRequest.js +1 -0
- package/dist/vendor/cjs/node/NodeMultipart.d.ts +50 -0
- package/dist/vendor/cjs/node/NodeMultipart.js +1 -0
- package/dist/vendor/cjs/node/NodeMultipartParser.d.ts +105 -0
- package/dist/vendor/cjs/node/NodeMultipartParser.js +1 -0
- package/dist/vendor/cjs/node/NodePath.d.ts +30 -0
- package/dist/vendor/cjs/node/NodePath.js +1 -0
- package/dist/vendor/cjs/node/NodeRedis.d.ts +78 -0
- package/dist/vendor/cjs/node/NodeRedis.js +1 -0
- package/dist/vendor/cjs/node/NodeRuntime.d.ts +88 -0
- package/dist/vendor/cjs/node/NodeRuntime.js +1 -0
- package/dist/vendor/cjs/node/NodeServices.d.ts +37 -0
- package/dist/vendor/cjs/node/NodeServices.js +1 -0
- package/dist/vendor/cjs/node/NodeSink.d.ts +9 -0
- package/dist/vendor/cjs/node/NodeSink.js +1 -0
- package/dist/vendor/cjs/node/NodeSocket.d.ts +45 -0
- package/dist/vendor/cjs/node/NodeSocket.js +1 -0
- package/dist/vendor/cjs/node/NodeSocketServer.d.ts +9 -0
- package/dist/vendor/cjs/node/NodeSocketServer.js +1 -0
- package/dist/vendor/cjs/node/NodeStdio.d.ts +12 -0
- package/dist/vendor/cjs/node/NodeStdio.js +1 -0
- package/dist/vendor/cjs/node/NodeStream.d.ts +9 -0
- package/dist/vendor/cjs/node/NodeStream.js +1 -0
- package/dist/vendor/cjs/node/NodeTerminal.d.ts +24 -0
- package/dist/vendor/cjs/node/NodeTerminal.js +1 -0
- package/dist/vendor/cjs/node/NodeWorker.d.ts +24 -0
- package/dist/vendor/cjs/node/NodeWorker.js +1 -0
- package/dist/vendor/cjs/node/NodeWorkerRunner.d.ts +13 -0
- package/dist/vendor/cjs/node/NodeWorkerRunner.js +1 -0
- package/dist/vendor/cjs/node/Undici.d.ts +31 -0
- package/dist/vendor/cjs/node/Undici.js +1 -0
- package/dist/vendor/cjs/node/index.d.ts +140 -0
- package/dist/vendor/cjs/node/index.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeAddressResolver.d.ts +13 -0
- package/dist/vendor/cjs/node-shared/NodeAddressResolver.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeChildProcessSpawner.d.ts +66 -0
- package/dist/vendor/cjs/node-shared/NodeChildProcessSpawner.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeClusterSocket.d.ts +35 -0
- package/dist/vendor/cjs/node-shared/NodeClusterSocket.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeCrypto.d.ts +30 -0
- package/dist/vendor/cjs/node-shared/NodeCrypto.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeDatagramSocket.d.ts +246 -0
- package/dist/vendor/cjs/node-shared/NodeDatagramSocket.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeDns.d.ts +221 -0
- package/dist/vendor/cjs/node-shared/NodeDns.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeFileSystem.d.ts +12 -0
- package/dist/vendor/cjs/node-shared/NodeFileSystem.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeHttpCompression.d.ts +40 -0
- package/dist/vendor/cjs/node-shared/NodeHttpCompression.js +1 -0
- package/dist/vendor/cjs/node-shared/NodePath.d.ts +30 -0
- package/dist/vendor/cjs/node-shared/NodePath.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeRuntime.d.ts +51 -0
- package/dist/vendor/cjs/node-shared/NodeRuntime.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeSink.d.ts +73 -0
- package/dist/vendor/cjs/node-shared/NodeSink.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeSocket.d.ts +144 -0
- package/dist/vendor/cjs/node-shared/NodeSocket.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeSocketServer.d.ts +87 -0
- package/dist/vendor/cjs/node-shared/NodeSocketServer.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeStdio.d.ts +13 -0
- package/dist/vendor/cjs/node-shared/NodeStdio.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeStream.d.ts +194 -0
- package/dist/vendor/cjs/node-shared/NodeStream.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeTerminal.d.ts +24 -0
- package/dist/vendor/cjs/node-shared/NodeTerminal.js +1 -0
- package/dist/vendor/cjs/node-shared/index.d.ts +85 -0
- package/dist/vendor/cjs/node-shared/index.js +1 -0
- package/dist/vendor/cjs/node-shared/internal/nodeChildProcessSpawner.d.ts +4 -0
- package/dist/vendor/cjs/node-shared/internal/nodeChildProcessSpawner.js +1 -0
- package/dist/vendor/cjs/node-shared/internal/utils.d.ts +2 -0
- package/dist/vendor/cjs/node-shared/internal/utils.js +1 -0
- package/dist/vendor/cjs/package.json +1 -0
- package/dist/vendor/cjs/platform-bun.d.ts +130 -0
- package/dist/vendor/cjs/platform-bun.js +1 -0
- package/dist/vendor/cjs/platform-node-shared.d.ts +85 -0
- package/dist/vendor/cjs/platform-node-shared.js +1 -0
- package/dist/vendor/cjs/platform-node.d.ts +140 -0
- package/dist/vendor/cjs/platform-node.js +1 -0
- package/dist/vendor/node/LICENSE +21 -0
- package/dist/vendor/node/NodeAddressResolver.d.ts +16 -0
- package/dist/vendor/node/NodeAddressResolver.js +8 -0
- package/dist/vendor/node/NodeChildProcessSpawner.d.ts +8 -0
- package/dist/vendor/node/NodeChildProcessSpawner.js +14 -0
- package/dist/vendor/node/NodeClusterHttp.d.ts +54 -0
- package/dist/vendor/node/NodeClusterHttp.js +43 -0
- package/dist/vendor/node/NodeClusterSocket.d.ts +85 -0
- package/dist/vendor/node/NodeClusterSocket.js +30 -0
- package/dist/vendor/node/NodeCrypto.d.ts +11 -0
- package/dist/vendor/node/NodeCrypto.js +8 -0
- package/dist/vendor/node/NodeDatagramSocket.d.ts +10 -0
- package/dist/vendor/node/NodeDatagramSocket.js +12 -0
- package/dist/vendor/node/NodeDns.d.ts +51 -0
- package/dist/vendor/node/NodeDns.js +12 -0
- package/dist/vendor/node/NodeFileSystem.d.ts +11 -0
- package/dist/vendor/node/NodeFileSystem.js +9 -0
- package/dist/vendor/node/NodeHttpClient.d.ts +303 -0
- package/dist/vendor/node/NodeHttpClient.js +54 -0
- package/dist/vendor/node/NodeHttpIncomingMessage.d.ts +64 -0
- package/dist/vendor/node/NodeHttpIncomingMessage.js +10 -0
- package/dist/vendor/node/NodeHttpPlatform.d.ts +38 -0
- package/dist/vendor/node/NodeHttpPlatform.js +16 -0
- package/dist/vendor/node/NodeHttpServer.d.ts +131 -0
- package/dist/vendor/node/NodeHttpServer.js +46 -0
- package/dist/vendor/node/NodeHttpServerRequest.d.ts +32 -0
- package/dist/vendor/node/NodeHttpServerRequest.js +9 -0
- package/dist/vendor/node/NodeMultipart.d.ts +50 -0
- package/dist/vendor/node/NodeMultipart.js +15 -0
- package/dist/vendor/node/NodeMultipartParser.d.ts +105 -0
- package/dist/vendor/node/NodeMultipartParser.js +11 -0
- package/dist/vendor/node/NodePath.d.ts +30 -0
- package/dist/vendor/node/NodePath.js +12 -0
- package/dist/vendor/node/NodeRedis.d.ts +78 -0
- package/dist/vendor/node/NodeRedis.js +11 -0
- package/dist/vendor/node/NodeRuntime.d.ts +88 -0
- package/dist/vendor/node/NodeRuntime.js +8 -0
- package/dist/vendor/node/NodeServices.d.ts +37 -0
- package/dist/vendor/node/NodeServices.js +23 -0
- package/dist/vendor/node/NodeSink.d.ts +9 -0
- package/dist/vendor/node/NodeSink.js +12 -0
- package/dist/vendor/node/NodeSocket.d.ts +45 -0
- package/dist/vendor/node/NodeSocket.js +31 -0
- package/dist/vendor/node/NodeSocketServer.d.ts +9 -0
- package/dist/vendor/node/NodeSocketServer.js +21 -0
- package/dist/vendor/node/NodeStdio.d.ts +12 -0
- package/dist/vendor/node/NodeStdio.js +10 -0
- package/dist/vendor/node/NodeStream.d.ts +9 -0
- package/dist/vendor/node/NodeStream.js +27 -0
- package/dist/vendor/node/NodeTerminal.d.ts +24 -0
- package/dist/vendor/node/NodeTerminal.js +10 -0
- package/dist/vendor/node/NodeWorker.d.ts +24 -0
- package/dist/vendor/node/NodeWorker.js +9 -0
- package/dist/vendor/node/NodeWorkerRunner.d.ts +13 -0
- package/dist/vendor/node/NodeWorkerRunner.js +7 -0
- package/dist/vendor/node/Undici.d.ts +31 -0
- package/dist/vendor/node/Undici.js +9 -0
- package/dist/vendor/node/index.d.ts +140 -0
- package/dist/vendor/node/index.js +130 -0
- package/dist/vendor/node-shared/LICENSE +21 -0
- package/dist/vendor/node-shared/NodeAddressResolver.d.ts +13 -0
- package/dist/vendor/node-shared/NodeAddressResolver.js +7 -0
- package/dist/vendor/node-shared/NodeChildProcessSpawner.d.ts +66 -0
- package/dist/vendor/node-shared/NodeChildProcessSpawner.js +13 -0
- package/dist/vendor/node-shared/NodeClusterSocket.d.ts +35 -0
- package/dist/vendor/node-shared/NodeClusterSocket.js +11 -0
- package/dist/vendor/node-shared/NodeCrypto.d.ts +30 -0
- package/dist/vendor/node-shared/NodeCrypto.js +9 -0
- package/dist/vendor/node-shared/NodeDatagramSocket.d.ts +246 -0
- package/dist/vendor/node-shared/NodeDatagramSocket.js +11 -0
- package/dist/vendor/node-shared/NodeDns.d.ts +221 -0
- package/dist/vendor/node-shared/NodeDns.js +31 -0
- package/dist/vendor/node-shared/NodeFileSystem.d.ts +12 -0
- package/dist/vendor/node-shared/NodeFileSystem.js +8 -0
- package/dist/vendor/node-shared/NodeHttpCompression.d.ts +40 -0
- package/dist/vendor/node-shared/NodeHttpCompression.js +13 -0
- package/dist/vendor/node-shared/NodePath.d.ts +30 -0
- package/dist/vendor/node-shared/NodePath.js +11 -0
- package/dist/vendor/node-shared/NodeRuntime.d.ts +51 -0
- package/dist/vendor/node-shared/NodeRuntime.js +7 -0
- package/dist/vendor/node-shared/NodeSink.d.ts +73 -0
- package/dist/vendor/node-shared/NodeSink.js +11 -0
- package/dist/vendor/node-shared/NodeSocket.d.ts +144 -0
- package/dist/vendor/node-shared/NodeSocket.js +23 -0
- package/dist/vendor/node-shared/NodeSocketServer.d.ts +87 -0
- package/dist/vendor/node-shared/NodeSocketServer.js +20 -0
- package/dist/vendor/node-shared/NodeStdio.d.ts +13 -0
- package/dist/vendor/node-shared/NodeStdio.js +9 -0
- package/dist/vendor/node-shared/NodeStream.d.ts +194 -0
- package/dist/vendor/node-shared/NodeStream.js +26 -0
- package/dist/vendor/node-shared/NodeTerminal.d.ts +24 -0
- package/dist/vendor/node-shared/NodeTerminal.js +9 -0
- package/dist/vendor/node-shared/index.d.ts +85 -0
- package/dist/vendor/node-shared/index.js +70 -0
- package/dist/vendor/node-shared/internal/nodeChildProcessSpawner.d.ts +4 -0
- package/dist/vendor/node-shared/internal/nodeChildProcessSpawner.js +7 -0
- package/dist/vendor/node-shared/internal/utils.d.ts +2 -0
- package/dist/vendor/node-shared/internal/utils.js +7 -0
- package/dist/vendor/platform-bun.d.ts +130 -0
- package/dist/vendor/platform-bun.js +121 -0
- package/dist/vendor/platform-node-shared.d.ts +85 -0
- package/dist/vendor/platform-node-shared.js +70 -0
- package/dist/vendor/platform-node.d.ts +140 -0
- package/dist/vendor/platform-node.js +130 -0
- package/docs/README.md +135 -0
- package/docs/api.md +264 -0
- package/docs/concepts/host-surface.md +152 -0
- package/docs/concepts/runtime-parity.md +80 -0
- package/docs/guides/bind-a-repository-root.md +109 -0
- package/docs/guides/configure-the-filesystem-helper.md +113 -0
- package/docs/guides/contain-child-processes.md +178 -0
- package/docs/installation.md +131 -0
- package/docs/quickstart.md +163 -0
- package/docs/troubleshooting.md +163 -0
- package/package.json +146 -3
- package/src/BunFileSystem.ts +47 -0
- package/src/BunHost.ts +345 -0
- package/src/index.ts +27 -0
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NodeHttpIncomingMessage
|
|
3
|
+
} from "./chunk-AMAL6TRE.js";
|
|
4
|
+
import {
|
|
5
|
+
fromReadable,
|
|
6
|
+
toReadable
|
|
7
|
+
} from "./chunk-T5WDTZCE.js";
|
|
8
|
+
import {
|
|
9
|
+
fromWritable
|
|
10
|
+
} from "./chunk-DX4VFONH.js";
|
|
11
|
+
import {
|
|
12
|
+
__export
|
|
13
|
+
} from "./chunk-MLKGABMK.js";
|
|
14
|
+
|
|
15
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeHttpClient.js
|
|
16
|
+
var NodeHttpClient_exports = {};
|
|
17
|
+
__export(NodeHttpClient_exports, {
|
|
18
|
+
Dispatcher: () => Dispatcher,
|
|
19
|
+
Fetch: () => Fetch,
|
|
20
|
+
HttpAgent: () => HttpAgent,
|
|
21
|
+
RequestInit: () => RequestInit,
|
|
22
|
+
UndiciOptions: () => UndiciOptions,
|
|
23
|
+
dispatcherLayerGlobal: () => dispatcherLayerGlobal,
|
|
24
|
+
layerAgent: () => layerAgent,
|
|
25
|
+
layerAgentOptions: () => layerAgentOptions,
|
|
26
|
+
layerDispatcher: () => layerDispatcher,
|
|
27
|
+
layerDispatcherOptions: () => layerDispatcherOptions,
|
|
28
|
+
layerFetch: () => layer,
|
|
29
|
+
layerNodeHttp: () => layerNodeHttp,
|
|
30
|
+
layerNodeHttpNoAgent: () => layerNodeHttpNoAgent,
|
|
31
|
+
layerNodeHttpOptions: () => layerNodeHttpOptions,
|
|
32
|
+
layerUndici: () => layerUndici,
|
|
33
|
+
layerUndiciNoDispatcher: () => layerUndiciNoDispatcher,
|
|
34
|
+
layerUndiciOptions: () => layerUndiciOptions,
|
|
35
|
+
makeAgent: () => makeAgent,
|
|
36
|
+
makeDispatcher: () => makeDispatcher,
|
|
37
|
+
makeDispatcherOptions: () => makeDispatcherOptions,
|
|
38
|
+
makeNodeHttp: () => makeNodeHttp,
|
|
39
|
+
makeUndici: () => makeUndici
|
|
40
|
+
});
|
|
41
|
+
import * as Context from "effect/Context";
|
|
42
|
+
import * as Effect from "effect/Effect";
|
|
43
|
+
import { flow } from "effect/Function";
|
|
44
|
+
import * as Cookies from "effect/http/Cookies";
|
|
45
|
+
import * as Headers from "effect/http/Headers";
|
|
46
|
+
import * as Client from "effect/http/HttpClient";
|
|
47
|
+
import * as Error from "effect/http/HttpClientError";
|
|
48
|
+
import * as Response from "effect/http/HttpClientResponse";
|
|
49
|
+
import * as IncomingMessage from "effect/http/HttpIncomingMessage";
|
|
50
|
+
import * as UrlParams from "effect/http/UrlParams";
|
|
51
|
+
import * as Inspectable from "effect/Inspectable";
|
|
52
|
+
import * as Layer from "effect/Layer";
|
|
53
|
+
import * as Option from "effect/Option";
|
|
54
|
+
import { pipeArguments } from "effect/Pipeable";
|
|
55
|
+
import * as Stream from "effect/Stream";
|
|
56
|
+
import * as Http from "node:http";
|
|
57
|
+
import * as Https from "node:https";
|
|
58
|
+
import { Readable } from "node:stream";
|
|
59
|
+
import { pipeline } from "node:stream/promises";
|
|
60
|
+
import {
|
|
61
|
+
Fetch,
|
|
62
|
+
layer,
|
|
63
|
+
RequestInit
|
|
64
|
+
} from "effect/http/FetchHttpClient";
|
|
65
|
+
var Dispatcher = class extends (/* @__PURE__ */ Context.Service()("@effect/platform-node/NodeHttpClient/Dispatcher")) {
|
|
66
|
+
};
|
|
67
|
+
var loadUndici = /* @__PURE__ */ Effect.promise(() => import("./node/Undici.js"));
|
|
68
|
+
var makeDispatcherOptions = (options) => Effect.acquireRelease(Effect.map(loadUndici, (_) => new _.Agent(options)), (dispatcher) => Effect.promise(() => dispatcher.destroy()));
|
|
69
|
+
var makeDispatcher = /* @__PURE__ */ makeDispatcherOptions();
|
|
70
|
+
var layerDispatcherOptions = /* @__PURE__ */ flow(makeDispatcherOptions, /* @__PURE__ */ Layer.effect(Dispatcher));
|
|
71
|
+
var layerDispatcher = /* @__PURE__ */ layerDispatcherOptions();
|
|
72
|
+
var dispatcherLayerGlobal = /* @__PURE__ */ Layer.effect(Dispatcher)(/* @__PURE__ */ Effect.map(loadUndici, (_) => _.getGlobalDispatcher()));
|
|
73
|
+
var UndiciOptions = /* @__PURE__ */ Context.Reference("@effect/platform-node/NodeHttpClient/UndiciOptions", {
|
|
74
|
+
defaultValue: () => ({})
|
|
75
|
+
});
|
|
76
|
+
var makeUndici = /* @__PURE__ */ Effect.gen(function* () {
|
|
77
|
+
const dispatcher = yield* Dispatcher;
|
|
78
|
+
return Client.make((request3, url, signal, fiber) => convertBody(request3.body).pipe(Effect.flatMap((body) => Effect.tryPromise({
|
|
79
|
+
try: () => dispatcher.request({
|
|
80
|
+
...fiber.getRef(UndiciOptions),
|
|
81
|
+
signal,
|
|
82
|
+
method: request3.method,
|
|
83
|
+
headers: request3.headers,
|
|
84
|
+
origin: url.origin,
|
|
85
|
+
path: url.pathname + url.search,
|
|
86
|
+
body,
|
|
87
|
+
// leave timeouts to Effect.timeout etc
|
|
88
|
+
headersTimeout: 60 * 60 * 1e3,
|
|
89
|
+
bodyTimeout: 0
|
|
90
|
+
}),
|
|
91
|
+
catch: (cause) => new Error.HttpClientError({
|
|
92
|
+
reason: new Error.TransportError({
|
|
93
|
+
request: request3,
|
|
94
|
+
cause
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
})), Effect.map((response) => new UndiciResponse(request3, response, url.href.split("#")[0]))));
|
|
98
|
+
});
|
|
99
|
+
function convertBody(body) {
|
|
100
|
+
switch (body._tag) {
|
|
101
|
+
case "Empty": {
|
|
102
|
+
return Effect.succeed(null);
|
|
103
|
+
}
|
|
104
|
+
case "Uint8Array":
|
|
105
|
+
case "Raw": {
|
|
106
|
+
return Effect.succeed(body.body);
|
|
107
|
+
}
|
|
108
|
+
case "FormData": {
|
|
109
|
+
return Effect.succeed(body.formData);
|
|
110
|
+
}
|
|
111
|
+
case "Stream": {
|
|
112
|
+
return toReadable(body.stream);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function noopErrorHandler(_) {
|
|
117
|
+
}
|
|
118
|
+
var UndiciResponse = class extends Inspectable.Class {
|
|
119
|
+
[IncomingMessage.TypeId];
|
|
120
|
+
[Response.TypeId];
|
|
121
|
+
request;
|
|
122
|
+
source;
|
|
123
|
+
url;
|
|
124
|
+
constructor(request3, source, url) {
|
|
125
|
+
super();
|
|
126
|
+
this[IncomingMessage.TypeId] = IncomingMessage.TypeId;
|
|
127
|
+
this[Response.TypeId] = Response.TypeId;
|
|
128
|
+
this.request = request3;
|
|
129
|
+
this.source = source;
|
|
130
|
+
this.url = url;
|
|
131
|
+
source.body.on("error", noopErrorHandler);
|
|
132
|
+
}
|
|
133
|
+
get status() {
|
|
134
|
+
return this.source.statusCode;
|
|
135
|
+
}
|
|
136
|
+
get statusText() {
|
|
137
|
+
return void 0;
|
|
138
|
+
}
|
|
139
|
+
get headers() {
|
|
140
|
+
return Headers.fromInput(this.source.headers);
|
|
141
|
+
}
|
|
142
|
+
cachedCookies;
|
|
143
|
+
get cookies() {
|
|
144
|
+
if (this.cachedCookies !== void 0) {
|
|
145
|
+
return this.cachedCookies;
|
|
146
|
+
}
|
|
147
|
+
const header = this.source.headers["set-cookie"];
|
|
148
|
+
return this.cachedCookies = header ? Cookies.fromSetCookie(header) : Cookies.empty;
|
|
149
|
+
}
|
|
150
|
+
get remoteAddress() {
|
|
151
|
+
return Option.none();
|
|
152
|
+
}
|
|
153
|
+
get stream() {
|
|
154
|
+
return fromReadable({
|
|
155
|
+
evaluate: () => this.source.body,
|
|
156
|
+
onError: (cause) => new Error.HttpClientError({
|
|
157
|
+
reason: new Error.DecodeError({
|
|
158
|
+
request: this.request,
|
|
159
|
+
response: this,
|
|
160
|
+
cause
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
get json() {
|
|
166
|
+
return Effect.flatMap(this.text, (text) => Effect.try({
|
|
167
|
+
try: () => text === "" ? null : JSON.parse(text),
|
|
168
|
+
catch: (cause) => new Error.HttpClientError({
|
|
169
|
+
reason: new Error.DecodeError({
|
|
170
|
+
request: this.request,
|
|
171
|
+
response: this,
|
|
172
|
+
cause
|
|
173
|
+
})
|
|
174
|
+
})
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
177
|
+
textBody;
|
|
178
|
+
get text() {
|
|
179
|
+
if (this.textBody) {
|
|
180
|
+
return this.textBody;
|
|
181
|
+
}
|
|
182
|
+
this.textBody = Effect.map(this.arrayBuffer, (_) => new TextDecoder().decode(_));
|
|
183
|
+
return this.textBody;
|
|
184
|
+
}
|
|
185
|
+
get urlParamsBody() {
|
|
186
|
+
return Effect.flatMap(this.text, (_) => Effect.try({
|
|
187
|
+
try: () => UrlParams.fromInput(new URLSearchParams(_)),
|
|
188
|
+
catch: (cause) => new Error.HttpClientError({
|
|
189
|
+
reason: new Error.DecodeError({
|
|
190
|
+
request: this.request,
|
|
191
|
+
response: this,
|
|
192
|
+
cause
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
formDataBody;
|
|
198
|
+
get formData() {
|
|
199
|
+
return this.formDataBody ??= Effect.flatMap(this.arrayBuffer, (body) => Effect.tryPromise({
|
|
200
|
+
try: () => new globalThis.Response(body, {
|
|
201
|
+
headers: this.headers
|
|
202
|
+
}).formData(),
|
|
203
|
+
catch: (cause) => new Error.HttpClientError({
|
|
204
|
+
reason: new Error.DecodeError({
|
|
205
|
+
request: this.request,
|
|
206
|
+
response: this,
|
|
207
|
+
cause
|
|
208
|
+
})
|
|
209
|
+
})
|
|
210
|
+
})).pipe(Effect.cached, Effect.runSync);
|
|
211
|
+
}
|
|
212
|
+
arrayBufferBody;
|
|
213
|
+
get arrayBuffer() {
|
|
214
|
+
if (this.arrayBufferBody) {
|
|
215
|
+
return this.arrayBufferBody;
|
|
216
|
+
}
|
|
217
|
+
this.arrayBufferBody = Effect.tryPromise({
|
|
218
|
+
try: () => this.source.body.arrayBuffer(),
|
|
219
|
+
catch: (cause) => new Error.HttpClientError({
|
|
220
|
+
reason: new Error.DecodeError({
|
|
221
|
+
request: this.request,
|
|
222
|
+
response: this,
|
|
223
|
+
cause
|
|
224
|
+
})
|
|
225
|
+
})
|
|
226
|
+
}).pipe(Effect.cached, Effect.runSync);
|
|
227
|
+
this.textBody = Effect.map(this.arrayBufferBody, (_) => new TextDecoder().decode(_));
|
|
228
|
+
return this.arrayBufferBody;
|
|
229
|
+
}
|
|
230
|
+
toJSON() {
|
|
231
|
+
return IncomingMessage.inspect(this, {
|
|
232
|
+
_id: "effect/http/HttpClientResponse",
|
|
233
|
+
request: this.request.toJSON(),
|
|
234
|
+
status: this.status
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
pipe() {
|
|
238
|
+
return pipeArguments(this, arguments);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
var layerUndiciNoDispatcher = /* @__PURE__ */ Client.layerMergedContext(makeUndici);
|
|
242
|
+
var layerUndici = /* @__PURE__ */ Layer.provide(layerUndiciNoDispatcher, layerDispatcher);
|
|
243
|
+
var layerUndiciOptions = (options) => Layer.provide(layerUndiciNoDispatcher, layerDispatcherOptions(options));
|
|
244
|
+
var HttpAgent = class extends (/* @__PURE__ */ Context.Service()("@effect/platform-node/NodeHttpClient/HttpAgent")) {
|
|
245
|
+
};
|
|
246
|
+
var makeAgent = (options) => Effect.zipWith(Effect.acquireRelease(Effect.sync(() => new Http.Agent(options)), (agent) => Effect.sync(() => agent.destroy())), Effect.acquireRelease(Effect.sync(() => new Https.Agent(options)), (agent) => Effect.sync(() => agent.destroy())), (http, https) => ({
|
|
247
|
+
http,
|
|
248
|
+
https
|
|
249
|
+
}));
|
|
250
|
+
var layerAgentOptions = /* @__PURE__ */ flow(makeAgent, /* @__PURE__ */ Layer.effect(HttpAgent));
|
|
251
|
+
var layerAgent = /* @__PURE__ */ layerAgentOptions();
|
|
252
|
+
var makeNodeHttp = /* @__PURE__ */ Effect.gen(function* () {
|
|
253
|
+
const agent = yield* HttpAgent;
|
|
254
|
+
return Client.make((request3, url, signal) => {
|
|
255
|
+
const nodeRequest = url.protocol === "https:" ? Https.request(url, {
|
|
256
|
+
agent: agent.https,
|
|
257
|
+
method: request3.method,
|
|
258
|
+
headers: request3.headers,
|
|
259
|
+
signal
|
|
260
|
+
}) : Http.request(url, {
|
|
261
|
+
agent: agent.http,
|
|
262
|
+
method: request3.method,
|
|
263
|
+
headers: request3.headers,
|
|
264
|
+
signal
|
|
265
|
+
});
|
|
266
|
+
return Effect.raceFirst(waitForResponse(nodeRequest, request3), sendBody(nodeRequest, request3, request3.body).pipe(Effect.andThen(Effect.never))).pipe(Effect.onError(() => Effect.sync(() => nodeRequest.destroy())), Effect.map((_) => new NodeHttpResponse(request3, _, url.href.split("#")[0])));
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
var sendBody = (nodeRequest, request3, body) => Effect.suspend(() => {
|
|
270
|
+
switch (body._tag) {
|
|
271
|
+
case "Empty": {
|
|
272
|
+
nodeRequest.end();
|
|
273
|
+
return waitForFinish(nodeRequest, request3);
|
|
274
|
+
}
|
|
275
|
+
case "Uint8Array":
|
|
276
|
+
case "Raw": {
|
|
277
|
+
nodeRequest.end(body.body);
|
|
278
|
+
return waitForFinish(nodeRequest, request3);
|
|
279
|
+
}
|
|
280
|
+
case "FormData": {
|
|
281
|
+
const response = new globalThis.Response(body.formData);
|
|
282
|
+
response.headers.forEach((value, key) => {
|
|
283
|
+
nodeRequest.setHeader(key, value);
|
|
284
|
+
});
|
|
285
|
+
return Effect.tryPromise({
|
|
286
|
+
try: () => pipeline(Readable.fromWeb(response.body), nodeRequest),
|
|
287
|
+
catch: (cause) => new Error.HttpClientError({
|
|
288
|
+
reason: new Error.TransportError({
|
|
289
|
+
request: request3,
|
|
290
|
+
cause
|
|
291
|
+
})
|
|
292
|
+
})
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
case "Stream": {
|
|
296
|
+
return Stream.run(Stream.mapError(body.stream, (cause) => new Error.HttpClientError({
|
|
297
|
+
reason: new Error.EncodeError({
|
|
298
|
+
request: request3,
|
|
299
|
+
cause
|
|
300
|
+
})
|
|
301
|
+
})), fromWritable({
|
|
302
|
+
evaluate: () => nodeRequest,
|
|
303
|
+
onError: (cause) => new Error.HttpClientError({
|
|
304
|
+
reason: new Error.TransportError({
|
|
305
|
+
request: request3,
|
|
306
|
+
cause
|
|
307
|
+
})
|
|
308
|
+
})
|
|
309
|
+
}));
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
var waitForResponse = (nodeRequest, request3) => Effect.callback((resume) => {
|
|
314
|
+
function onError2(cause) {
|
|
315
|
+
resume(Effect.fail(new Error.HttpClientError({
|
|
316
|
+
reason: new Error.TransportError({
|
|
317
|
+
request: request3,
|
|
318
|
+
cause
|
|
319
|
+
})
|
|
320
|
+
})));
|
|
321
|
+
}
|
|
322
|
+
nodeRequest.on("error", onError2);
|
|
323
|
+
function onResponse(response) {
|
|
324
|
+
nodeRequest.off("error", onError2);
|
|
325
|
+
resume(Effect.succeed(response));
|
|
326
|
+
}
|
|
327
|
+
nodeRequest.on("upgrade", onResponse);
|
|
328
|
+
nodeRequest.on("response", onResponse);
|
|
329
|
+
return Effect.sync(() => {
|
|
330
|
+
nodeRequest.off("error", onError2);
|
|
331
|
+
nodeRequest.off("upgrade", onResponse);
|
|
332
|
+
nodeRequest.off("response", onResponse);
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
var waitForFinish = (nodeRequest, request3) => Effect.callback((resume) => {
|
|
336
|
+
function onError2(cause) {
|
|
337
|
+
resume(Effect.fail(new Error.HttpClientError({
|
|
338
|
+
reason: new Error.TransportError({
|
|
339
|
+
request: request3,
|
|
340
|
+
cause
|
|
341
|
+
})
|
|
342
|
+
})));
|
|
343
|
+
}
|
|
344
|
+
nodeRequest.once("error", onError2);
|
|
345
|
+
function onFinish() {
|
|
346
|
+
nodeRequest.off("error", onError2);
|
|
347
|
+
resume(Effect.void);
|
|
348
|
+
}
|
|
349
|
+
nodeRequest.once("finish", onFinish);
|
|
350
|
+
return Effect.sync(() => {
|
|
351
|
+
nodeRequest.off("error", onError2);
|
|
352
|
+
nodeRequest.off("finish", onFinish);
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
var NodeHttpResponse = class extends NodeHttpIncomingMessage {
|
|
356
|
+
[Response.TypeId];
|
|
357
|
+
request;
|
|
358
|
+
url;
|
|
359
|
+
constructor(request3, source, url) {
|
|
360
|
+
super(source, (cause) => new Error.HttpClientError({
|
|
361
|
+
reason: new Error.DecodeError({
|
|
362
|
+
request: request3,
|
|
363
|
+
response: this,
|
|
364
|
+
cause
|
|
365
|
+
})
|
|
366
|
+
}));
|
|
367
|
+
this[Response.TypeId] = Response.TypeId;
|
|
368
|
+
this.request = request3;
|
|
369
|
+
this.url = url;
|
|
370
|
+
}
|
|
371
|
+
get status() {
|
|
372
|
+
return this.source.statusCode;
|
|
373
|
+
}
|
|
374
|
+
cachedCookies;
|
|
375
|
+
get cookies() {
|
|
376
|
+
if (this.cachedCookies !== void 0) {
|
|
377
|
+
return this.cachedCookies;
|
|
378
|
+
}
|
|
379
|
+
const header = this.source.headers["set-cookie"];
|
|
380
|
+
return this.cachedCookies = header ? Cookies.fromSetCookie(header) : Cookies.empty;
|
|
381
|
+
}
|
|
382
|
+
get formData() {
|
|
383
|
+
return Effect.tryPromise({
|
|
384
|
+
try: () => {
|
|
385
|
+
const init = {
|
|
386
|
+
headers: new globalThis.Headers(this.source.headers)
|
|
387
|
+
};
|
|
388
|
+
if (this.source.statusCode) {
|
|
389
|
+
init.status = this.source.statusCode;
|
|
390
|
+
}
|
|
391
|
+
if (this.source.statusMessage) {
|
|
392
|
+
init.statusText = this.source.statusMessage;
|
|
393
|
+
}
|
|
394
|
+
return new globalThis.Response(Readable.toWeb(this.source), init).formData();
|
|
395
|
+
},
|
|
396
|
+
catch: this.onError
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
toJSON() {
|
|
400
|
+
return IncomingMessage.inspect(this, {
|
|
401
|
+
_id: "effect/http/HttpClientResponse",
|
|
402
|
+
request: this.request.toJSON(),
|
|
403
|
+
status: this.status
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
pipe() {
|
|
407
|
+
return pipeArguments(this, arguments);
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
var layerNodeHttpNoAgent = /* @__PURE__ */ Client.layerMergedContext(makeNodeHttp);
|
|
411
|
+
var layerNodeHttp = /* @__PURE__ */ Layer.provide(layerNodeHttpNoAgent, layerAgent);
|
|
412
|
+
var layerNodeHttpOptions = (options) => Layer.provide(layerNodeHttpNoAgent, layerAgentOptions(options));
|
|
413
|
+
|
|
414
|
+
export {
|
|
415
|
+
Dispatcher,
|
|
416
|
+
makeDispatcherOptions,
|
|
417
|
+
makeDispatcher,
|
|
418
|
+
layerDispatcherOptions,
|
|
419
|
+
layerDispatcher,
|
|
420
|
+
dispatcherLayerGlobal,
|
|
421
|
+
UndiciOptions,
|
|
422
|
+
makeUndici,
|
|
423
|
+
layerUndiciNoDispatcher,
|
|
424
|
+
layerUndici,
|
|
425
|
+
layerUndiciOptions,
|
|
426
|
+
HttpAgent,
|
|
427
|
+
makeAgent,
|
|
428
|
+
layerAgentOptions,
|
|
429
|
+
layerAgent,
|
|
430
|
+
makeNodeHttp,
|
|
431
|
+
layerNodeHttpNoAgent,
|
|
432
|
+
layerNodeHttp,
|
|
433
|
+
layerNodeHttpOptions,
|
|
434
|
+
NodeHttpClient_exports,
|
|
435
|
+
Fetch,
|
|
436
|
+
layer,
|
|
437
|
+
RequestInit
|
|
438
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
make
|
|
3
|
+
} from "./chunk-PBM2HJOX.js";
|
|
4
|
+
import {
|
|
5
|
+
layer
|
|
6
|
+
} from "./chunk-QR2ZOVOL.js";
|
|
7
|
+
import {
|
|
8
|
+
__export
|
|
9
|
+
} from "./chunk-MLKGABMK.js";
|
|
10
|
+
|
|
11
|
+
// ../../../../node_modules/.pnpm/@effect+platform-bun@4.0.5_effect@4.0.5/node_modules/@effect/platform-bun/dist/BunHttpPlatform.js
|
|
12
|
+
var BunHttpPlatform_exports = {};
|
|
13
|
+
__export(BunHttpPlatform_exports, {
|
|
14
|
+
layer: () => layer3
|
|
15
|
+
});
|
|
16
|
+
import * as Etag from "effect/http/Etag";
|
|
17
|
+
import * as Platform from "effect/http/HttpPlatform";
|
|
18
|
+
import * as Response from "effect/http/HttpServerResponse";
|
|
19
|
+
import * as Layer from "effect/Layer";
|
|
20
|
+
var compression = /* @__PURE__ */ make(/* @__PURE__ */ Platform.makeCompressionWeb({
|
|
21
|
+
algorithms: ["gzip", "deflate", "br", "zstd"],
|
|
22
|
+
transform: (algorithm) => Platform.compressionTransformWeb(algorithm === "br" ? "brotli" : algorithm)
|
|
23
|
+
}));
|
|
24
|
+
var make3 = /* @__PURE__ */ Platform.make({
|
|
25
|
+
platform: "bun",
|
|
26
|
+
compression,
|
|
27
|
+
fileResponse(path, status, statusText, headers, start, end, contentLength) {
|
|
28
|
+
let file = Bun.file(path);
|
|
29
|
+
if (start > 0 || end !== void 0) {
|
|
30
|
+
file = file.slice(start, end);
|
|
31
|
+
}
|
|
32
|
+
return Response.raw(file, {
|
|
33
|
+
headers: {
|
|
34
|
+
...headers,
|
|
35
|
+
"content-length": contentLength.toString()
|
|
36
|
+
},
|
|
37
|
+
status,
|
|
38
|
+
statusText
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
fileWebResponse(file, status, statusText, headers, options) {
|
|
42
|
+
const start = options?.offset ?? 0;
|
|
43
|
+
const end = options?.bytesToRead !== void 0 ? start + options.bytesToRead : void 0;
|
|
44
|
+
const body = start > 0 || end !== void 0 ? file.slice(start, end, file.type) : file;
|
|
45
|
+
return Response.raw(body, {
|
|
46
|
+
headers,
|
|
47
|
+
status,
|
|
48
|
+
statusText
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
var layer3 = /* @__PURE__ */ Layer.effect(Platform.HttpPlatform)(make3).pipe(/* @__PURE__ */ Layer.provide(layer), /* @__PURE__ */ Layer.provide(Etag.layer));
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
layer3 as layer,
|
|
56
|
+
BunHttpPlatform_exports
|
|
57
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layer
|
|
3
|
+
} from "./chunk-226TYKP6.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-MLKGABMK.js";
|
|
7
|
+
|
|
8
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeStdio.js
|
|
9
|
+
var NodeStdio_exports = {};
|
|
10
|
+
__export(NodeStdio_exports, {
|
|
11
|
+
layer: () => layer2
|
|
12
|
+
});
|
|
13
|
+
var layer2 = layer;
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
layer2 as layer,
|
|
17
|
+
NodeStdio_exports
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layer
|
|
3
|
+
} from "./chunk-7JOAEKDV.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-MLKGABMK.js";
|
|
7
|
+
|
|
8
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeFileSystem.js
|
|
9
|
+
var NodeFileSystem_exports = {};
|
|
10
|
+
__export(NodeFileSystem_exports, {
|
|
11
|
+
layer: () => layer2
|
|
12
|
+
});
|
|
13
|
+
var layer2 = layer;
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
layer2 as layer,
|
|
17
|
+
NodeFileSystem_exports
|
|
18
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-MLKGABMK.js";
|
|
4
|
+
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeMultipartParser.js
|
|
6
|
+
var NodeMultipartParser_exports = {};
|
|
7
|
+
__export(NodeMultipartParser_exports, {
|
|
8
|
+
FileStream: () => FileStream,
|
|
9
|
+
MultipartStream: () => MultipartStream,
|
|
10
|
+
make: () => make
|
|
11
|
+
});
|
|
12
|
+
import { make as makeParser } from "effect/http/MultipartParser";
|
|
13
|
+
import { Duplex, Readable } from "node:stream";
|
|
14
|
+
var MultipartStream = class extends Duplex {
|
|
15
|
+
_parser;
|
|
16
|
+
_canWrite = true;
|
|
17
|
+
_writeCallback;
|
|
18
|
+
constructor(config) {
|
|
19
|
+
super({
|
|
20
|
+
readableObjectMode: true
|
|
21
|
+
});
|
|
22
|
+
let currentError;
|
|
23
|
+
let currentFile;
|
|
24
|
+
this._parser = makeParser({
|
|
25
|
+
...config,
|
|
26
|
+
onField: (info, value) => {
|
|
27
|
+
if (currentError !== void 0) return;
|
|
28
|
+
const field = {
|
|
29
|
+
_tag: "Field",
|
|
30
|
+
info,
|
|
31
|
+
value
|
|
32
|
+
};
|
|
33
|
+
this.push(field);
|
|
34
|
+
this.emit("field", field);
|
|
35
|
+
},
|
|
36
|
+
onFile: (info) => {
|
|
37
|
+
if (currentError !== void 0) return (_) => {
|
|
38
|
+
};
|
|
39
|
+
const file = new FileStream(info, this);
|
|
40
|
+
currentFile = file;
|
|
41
|
+
this.push(file);
|
|
42
|
+
this.emit("file", file);
|
|
43
|
+
return (chunk) => {
|
|
44
|
+
if (currentError !== void 0) return;
|
|
45
|
+
this._canWrite = file.push(chunk);
|
|
46
|
+
if (chunk === null && !this._canWrite) {
|
|
47
|
+
currentFile = void 0;
|
|
48
|
+
this._resume();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
onError: (error) => {
|
|
53
|
+
this.emit("error", error);
|
|
54
|
+
currentFile?.emit("error", error);
|
|
55
|
+
currentError = error;
|
|
56
|
+
},
|
|
57
|
+
onDone: () => {
|
|
58
|
+
this.push(null);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
_resume() {
|
|
63
|
+
this._canWrite = true;
|
|
64
|
+
if (this._writeCallback !== void 0) {
|
|
65
|
+
const callback = this._writeCallback;
|
|
66
|
+
this._writeCallback = void 0;
|
|
67
|
+
callback();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
_read(_size) {
|
|
71
|
+
}
|
|
72
|
+
_write(chunk, encoding, callback) {
|
|
73
|
+
this._parser.write(chunk instanceof Uint8Array ? chunk : Buffer.from(chunk, encoding));
|
|
74
|
+
if (this._canWrite) {
|
|
75
|
+
callback();
|
|
76
|
+
} else {
|
|
77
|
+
this._writeCallback = callback;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
_final(callback) {
|
|
81
|
+
this._parser.end();
|
|
82
|
+
callback();
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var make = (config) => new MultipartStream(config);
|
|
86
|
+
var FileStream = class extends Readable {
|
|
87
|
+
_tag = "File";
|
|
88
|
+
filename;
|
|
89
|
+
info;
|
|
90
|
+
_parent;
|
|
91
|
+
constructor(info, parent) {
|
|
92
|
+
super();
|
|
93
|
+
this.info = info;
|
|
94
|
+
this._parent = parent;
|
|
95
|
+
this.filename = info.filename;
|
|
96
|
+
}
|
|
97
|
+
_read(_size) {
|
|
98
|
+
if (this._parent._canWrite === false) {
|
|
99
|
+
this._parent._resume();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export {
|
|
105
|
+
MultipartStream,
|
|
106
|
+
make,
|
|
107
|
+
FileStream,
|
|
108
|
+
NodeMultipartParser_exports
|
|
109
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fromWritable,
|
|
3
|
+
fromWritableChannel,
|
|
4
|
+
pullIntoWritable
|
|
5
|
+
} from "./chunk-DX4VFONH.js";
|
|
6
|
+
import {
|
|
7
|
+
__export
|
|
8
|
+
} from "./chunk-MLKGABMK.js";
|
|
9
|
+
|
|
10
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeSink.js
|
|
11
|
+
var NodeSink_exports = {};
|
|
12
|
+
__export(NodeSink_exports, {
|
|
13
|
+
fromWritable: () => fromWritable,
|
|
14
|
+
fromWritableChannel: () => fromWritableChannel,
|
|
15
|
+
pullIntoWritable: () => pullIntoWritable
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
NodeSink_exports
|
|
20
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addressesFromLookup,
|
|
3
|
+
dnsErrorFromCause,
|
|
4
|
+
resolver,
|
|
5
|
+
toFamily
|
|
6
|
+
} from "./chunk-R2PFJKSP.js";
|
|
7
|
+
import {
|
|
8
|
+
__export
|
|
9
|
+
} from "./chunk-MLKGABMK.js";
|
|
10
|
+
|
|
11
|
+
// ../../../../node_modules/.pnpm/@effect+platform-bun@4.0.5_effect@4.0.5/node_modules/@effect/platform-bun/dist/BunDns.js
|
|
12
|
+
var BunDns_exports = {};
|
|
13
|
+
__export(BunDns_exports, {
|
|
14
|
+
layer: () => layer,
|
|
15
|
+
layerConfig: () => layerConfig,
|
|
16
|
+
make: () => make2
|
|
17
|
+
});
|
|
18
|
+
import * as Config from "effect/Config";
|
|
19
|
+
import * as Effect from "effect/Effect";
|
|
20
|
+
import * as Layer from "effect/Layer";
|
|
21
|
+
import * as Dns from "effect/net/Dns";
|
|
22
|
+
var make2 = /* @__PURE__ */ Effect.fnUntraced(function* (options) {
|
|
23
|
+
const resolve = yield* resolver(options);
|
|
24
|
+
return Dns.make({
|
|
25
|
+
lookup: (host, family) => Effect.tryPromise({
|
|
26
|
+
try: () => Bun.dns.lookup(host, {
|
|
27
|
+
family: toFamily(family),
|
|
28
|
+
backend: "system"
|
|
29
|
+
}),
|
|
30
|
+
catch: (cause) => dnsErrorFromCause(cause, "lookup", host)
|
|
31
|
+
}).pipe(Effect.map(addressesFromLookup)),
|
|
32
|
+
resolve
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
var layer = /* @__PURE__ */ Layer.effect(Dns.Dns, /* @__PURE__ */ Effect.orDie(/* @__PURE__ */ make2()));
|
|
36
|
+
var layerConfig = (options) => Layer.effect(Dns.Dns, Effect.flatMap(Config.unwrap(options), make2));
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
make2 as make,
|
|
40
|
+
layer,
|
|
41
|
+
layerConfig,
|
|
42
|
+
BunDns_exports
|
|
43
|
+
};
|