@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,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sink adapters for writing Effect chunks into Node writable streams.
|
|
3
|
+
*
|
|
4
|
+
* `fromWritable` creates a `Sink`, `fromWritableChannel` creates a lower-level
|
|
5
|
+
* `Channel`, and `pullIntoWritable` writes from an existing pull loop. All
|
|
6
|
+
* three adapters respect writable-stream backpressure, map writable errors with
|
|
7
|
+
* the supplied `onError` function, and can end the writable when the upstream
|
|
8
|
+
* data is done.
|
|
9
|
+
*
|
|
10
|
+
* @stability unstable
|
|
11
|
+
* @since 4.0.0
|
|
12
|
+
*/
|
|
13
|
+
import type { NonEmptyReadonlyArray } from "effect/Array";
|
|
14
|
+
import * as Channel from "effect/Channel";
|
|
15
|
+
import { type LazyArg } from "effect/Function";
|
|
16
|
+
import * as Pull from "effect/Pull";
|
|
17
|
+
import * as Sink from "effect/Sink";
|
|
18
|
+
import type { Writable } from "node:stream";
|
|
19
|
+
/**
|
|
20
|
+
* Creates a `Sink` that writes chunks to a Node writable stream, respecting
|
|
21
|
+
* backpressure, mapping writable errors with `onError`, and ending the stream
|
|
22
|
+
* on completion unless `endOnDone` is `false`.
|
|
23
|
+
*
|
|
24
|
+
* @stability unstable
|
|
25
|
+
* @category constructors
|
|
26
|
+
* @since 4.0.0
|
|
27
|
+
*/
|
|
28
|
+
export declare const fromWritable: <E, A = Uint8Array | string>(options: {
|
|
29
|
+
readonly evaluate: LazyArg<Writable | NodeJS.WritableStream>;
|
|
30
|
+
readonly onError: (error: unknown) => E;
|
|
31
|
+
readonly endOnDone?: boolean | undefined;
|
|
32
|
+
readonly encoding?: BufferEncoding | undefined;
|
|
33
|
+
}) => Sink.Sink<void, A, never, E>;
|
|
34
|
+
/**
|
|
35
|
+
* Creates a `Channel` that pulls chunks from upstream and writes them to a
|
|
36
|
+
* Node writable stream, respecting backpressure and optionally ending the
|
|
37
|
+
* writable when upstream is done.
|
|
38
|
+
*
|
|
39
|
+
* @stability unstable
|
|
40
|
+
* @category constructors
|
|
41
|
+
* @since 4.0.0
|
|
42
|
+
*/
|
|
43
|
+
export declare const fromWritableChannel: <IE, E, A = Uint8Array | string>(options: {
|
|
44
|
+
readonly evaluate: LazyArg<Writable | NodeJS.WritableStream>;
|
|
45
|
+
readonly onError: (error: unknown) => E;
|
|
46
|
+
readonly endOnDone?: boolean | undefined;
|
|
47
|
+
readonly encoding?: BufferEncoding | undefined;
|
|
48
|
+
}) => Channel.Channel<never, IE | E, void, NonEmptyReadonlyArray<A>, IE>;
|
|
49
|
+
/**
|
|
50
|
+
* Writes Effect chunks into a Node writable stream.
|
|
51
|
+
*
|
|
52
|
+
* **When to use**
|
|
53
|
+
*
|
|
54
|
+
* Use to implement custom Node stream adapters that already have an upstream
|
|
55
|
+
* pull and need direct control over a writable stream.
|
|
56
|
+
*
|
|
57
|
+
* **Details**
|
|
58
|
+
*
|
|
59
|
+
* The loop waits for `drain` when needed, fails on writable errors, and ends
|
|
60
|
+
* the writable on upstream completion unless `endOnDone` is `false`.
|
|
61
|
+
*
|
|
62
|
+
* @stability unstable
|
|
63
|
+
* @category converting
|
|
64
|
+
* @since 4.0.0
|
|
65
|
+
*/
|
|
66
|
+
export declare const pullIntoWritable: <A, IE, E>(options: {
|
|
67
|
+
readonly pull: Pull.Pull<NonEmptyReadonlyArray<A>, IE, unknown>;
|
|
68
|
+
readonly writable: Writable;
|
|
69
|
+
readonly onError: (error: unknown) => E;
|
|
70
|
+
readonly endOnDone?: boolean | undefined;
|
|
71
|
+
readonly encoding?: BufferEncoding | undefined;
|
|
72
|
+
}) => Pull.Pull<never, IE | E, unknown>;
|
|
73
|
+
//# sourceMappingURL=NodeSink.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node socket adapters for Effect sockets.
|
|
3
|
+
*
|
|
4
|
+
* This module opens `node:net` or `node:tls` connections, or wraps existing
|
|
5
|
+
* Node `Duplex` streams, and presents them as `Socket.Socket` values, socket
|
|
6
|
+
* channels, or layers. It also exposes the `NetSocket` service tag for the
|
|
7
|
+
* underlying Node socket and re-exports the `ws` package namespace.
|
|
8
|
+
*
|
|
9
|
+
* @stability unstable
|
|
10
|
+
* @since 4.0.0
|
|
11
|
+
*/
|
|
12
|
+
import * as Arr from "effect/Array";
|
|
13
|
+
import * as Channel from "effect/Channel";
|
|
14
|
+
import * as Context from "effect/Context";
|
|
15
|
+
import type * as Duration from "effect/Duration";
|
|
16
|
+
import * as Effect from "effect/Effect";
|
|
17
|
+
import * as Layer from "effect/Layer";
|
|
18
|
+
import * as Scope from "effect/Scope";
|
|
19
|
+
import * as Socket from "effect/socket/Socket";
|
|
20
|
+
import * as Net from "node:net";
|
|
21
|
+
import type { Duplex } from "node:stream";
|
|
22
|
+
import * as Tls from "node:tls";
|
|
23
|
+
/**
|
|
24
|
+
* @stability unstable
|
|
25
|
+
* @category re-exports
|
|
26
|
+
* @since 4.0.0
|
|
27
|
+
*/
|
|
28
|
+
export * as NodeWS from "ws";
|
|
29
|
+
declare const NetSocket_base: Context.ServiceClass<NetSocket, "@effect/platform-node/NodeSocket/NetSocket", Net.Socket>;
|
|
30
|
+
/**
|
|
31
|
+
* Service tag for the underlying Node `net.Socket` associated with the current
|
|
32
|
+
* socket connection.
|
|
33
|
+
*
|
|
34
|
+
* @stability unstable
|
|
35
|
+
* @category services
|
|
36
|
+
* @since 4.0.0
|
|
37
|
+
*/
|
|
38
|
+
export declare class NetSocket extends NetSocket_base {
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Opens a Node TCP connection as an Effect socket.
|
|
42
|
+
*
|
|
43
|
+
* **When to use**
|
|
44
|
+
*
|
|
45
|
+
* Use to create a `Socket.Socket` whose reader acquisition dials
|
|
46
|
+
* `net.createConnection`.
|
|
47
|
+
*
|
|
48
|
+
* **Details**
|
|
49
|
+
*
|
|
50
|
+
* Supports `openTimeout` and closes or destroys the underlying socket when the
|
|
51
|
+
* reader scope is finalized.
|
|
52
|
+
*
|
|
53
|
+
* @stability unstable
|
|
54
|
+
* @category constructors
|
|
55
|
+
* @since 4.0.0
|
|
56
|
+
*/
|
|
57
|
+
export declare const makeNet: (options: Net.NetConnectOpts & {
|
|
58
|
+
readonly openTimeout?: Duration.Input | undefined;
|
|
59
|
+
}) => Effect.Effect<Socket.Socket>;
|
|
60
|
+
/**
|
|
61
|
+
* Adapts a Node `Duplex` into a `Socket.Socket`.
|
|
62
|
+
*
|
|
63
|
+
* **Details**
|
|
64
|
+
*
|
|
65
|
+
* Reader acquisition opens the duplex and keeps it paused: each pull drains
|
|
66
|
+
* Node's internal buffer with `stream.read()`. On Node 26+ that yields each
|
|
67
|
+
* buffered chunk as a separate batch element with no copy. Earlier Node
|
|
68
|
+
* concatenates the buffer into one chunk. The stream is never resumed, so once
|
|
69
|
+
* Node's buffer reaches its `highWaterMark` the kernel receive window closes
|
|
70
|
+
* and the peer blocks: backpressure is end-to-end with no buffering above
|
|
71
|
+
* Node's own.
|
|
72
|
+
*
|
|
73
|
+
* Writes use `write()` return-value backpressure, awaiting one `drain` when
|
|
74
|
+
* the internal buffer is full. `writeAll` corks the stream around the batch.
|
|
75
|
+
* Releasing the writer scope half-closes the stream (`end()`).
|
|
76
|
+
*
|
|
77
|
+
* @stability unstable
|
|
78
|
+
* @category constructors
|
|
79
|
+
* @since 4.0.0
|
|
80
|
+
*/
|
|
81
|
+
export declare const fromDuplex: <RO>(open: Effect.Effect<Duplex, Socket.SocketError, RO>, options?: {
|
|
82
|
+
readonly openTimeout?: Duration.Input | undefined;
|
|
83
|
+
readonly tlsServer?: boolean | undefined;
|
|
84
|
+
}) => Effect.Effect<Socket.Socket, never, Exclude<RO, Scope.Scope>>;
|
|
85
|
+
/**
|
|
86
|
+
* Creates a `Channel` over a TCP socket, reading arrays of `Uint8Array`
|
|
87
|
+
* chunks and writing arrays of bytes, strings, or socket close events.
|
|
88
|
+
*
|
|
89
|
+
* @stability unstable
|
|
90
|
+
* @category constructors
|
|
91
|
+
* @since 4.0.0
|
|
92
|
+
*/
|
|
93
|
+
export declare const makeNetChannel: <IE = never>(options: Net.NetConnectOpts) => Channel.Channel<Arr.NonEmptyReadonlyArray<Uint8Array>, Socket.SocketError | IE, void, Arr.NonEmptyReadonlyArray<Uint8Array | string | Socket.CloseEvent>, IE>;
|
|
94
|
+
/**
|
|
95
|
+
* Provides a `Socket.Socket` by opening a TCP connection with the supplied
|
|
96
|
+
* Node `net` connection options.
|
|
97
|
+
*
|
|
98
|
+
* @stability unstable
|
|
99
|
+
* @category layers
|
|
100
|
+
* @since 4.0.0
|
|
101
|
+
*/
|
|
102
|
+
export declare const layerNet: (options: Net.NetConnectOpts) => Layer.Layer<Socket.Socket, Socket.SocketError>;
|
|
103
|
+
/**
|
|
104
|
+
* Opens a Node TLS connection as an Effect socket.
|
|
105
|
+
*
|
|
106
|
+
* **When to use**
|
|
107
|
+
*
|
|
108
|
+
* Use to create a `Socket.Socket` whose reader acquisition dials
|
|
109
|
+
* `tls.connect` and completes once the TLS handshake has finished.
|
|
110
|
+
*
|
|
111
|
+
* **Details**
|
|
112
|
+
*
|
|
113
|
+
* Accepts the same options as `tls.connect`, so trust anchors (`ca`), client
|
|
114
|
+
* certificates (`cert` / `key`), ALPN protocols, and `servername` are set
|
|
115
|
+
* there. A failed handshake, including an untrusted or expired peer
|
|
116
|
+
* certificate, fails with a `SocketOpenError`. Supports `openTimeout` and
|
|
117
|
+
* destroys the underlying socket when the reader scope is finalized.
|
|
118
|
+
*
|
|
119
|
+
* @stability unstable
|
|
120
|
+
* @category constructors
|
|
121
|
+
* @since 4.0.0
|
|
122
|
+
*/
|
|
123
|
+
export declare const makeTls: (options: Tls.ConnectionOptions & {
|
|
124
|
+
readonly openTimeout?: Duration.Input | undefined;
|
|
125
|
+
}) => Effect.Effect<Socket.Socket>;
|
|
126
|
+
/**
|
|
127
|
+
* Creates a `Channel` over a TLS socket, reading arrays of `Uint8Array`
|
|
128
|
+
* chunks and writing arrays of bytes, strings, or socket close events.
|
|
129
|
+
*
|
|
130
|
+
* @stability unstable
|
|
131
|
+
* @category constructors
|
|
132
|
+
* @since 4.0.0
|
|
133
|
+
*/
|
|
134
|
+
export declare const makeTlsChannel: <IE = never>(options: Tls.ConnectionOptions) => Channel.Channel<Arr.NonEmptyReadonlyArray<Uint8Array>, Socket.SocketError | IE, void, Arr.NonEmptyReadonlyArray<Uint8Array | string | Socket.CloseEvent>, IE>;
|
|
135
|
+
/**
|
|
136
|
+
* Provides a `Socket.Socket` by opening a TLS connection with the supplied
|
|
137
|
+
* Node `tls` connection options.
|
|
138
|
+
*
|
|
139
|
+
* @stability unstable
|
|
140
|
+
* @category layers
|
|
141
|
+
* @since 4.0.0
|
|
142
|
+
*/
|
|
143
|
+
export declare const layerTls: (options: Tls.ConnectionOptions) => Layer.Layer<Socket.Socket, Socket.SocketError>;
|
|
144
|
+
//# sourceMappingURL=NodeSocket.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NetSocket,
|
|
3
|
+
NodeWS,
|
|
4
|
+
fromDuplex,
|
|
5
|
+
layerNet,
|
|
6
|
+
layerTls,
|
|
7
|
+
makeNet,
|
|
8
|
+
makeNetChannel,
|
|
9
|
+
makeTls,
|
|
10
|
+
makeTlsChannel
|
|
11
|
+
} from "../chunk-Q7YXUH7M.js";
|
|
12
|
+
import "../chunk-MLKGABMK.js";
|
|
13
|
+
export {
|
|
14
|
+
NetSocket,
|
|
15
|
+
NodeWS,
|
|
16
|
+
fromDuplex,
|
|
17
|
+
layerNet,
|
|
18
|
+
layerTls,
|
|
19
|
+
makeNet,
|
|
20
|
+
makeNetChannel,
|
|
21
|
+
makeTls,
|
|
22
|
+
makeTlsChannel
|
|
23
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as Context from "effect/Context";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
4
|
+
import * as Scope from "effect/Scope";
|
|
5
|
+
import * as SocketServer from "effect/socket/SocketServer";
|
|
6
|
+
import type * as Http from "node:http";
|
|
7
|
+
import * as Net from "node:net";
|
|
8
|
+
import * as Tls from "node:tls";
|
|
9
|
+
import * as NodeSocket from "./NodeSocket.ts";
|
|
10
|
+
import { NodeWS } from "./NodeSocket.ts";
|
|
11
|
+
declare const IncomingMessage_base: Context.ServiceClass<IncomingMessage, "@effect/platform-node-shared/NodeSocketServer/IncomingMessage", Http.IncomingMessage>;
|
|
12
|
+
/**
|
|
13
|
+
* Service tag for the Node `IncomingMessage` associated with the current
|
|
14
|
+
* WebSocket server connection.
|
|
15
|
+
*
|
|
16
|
+
* @stability unstable
|
|
17
|
+
* @category services
|
|
18
|
+
* @since 4.0.0
|
|
19
|
+
*/
|
|
20
|
+
export declare class IncomingMessage extends IncomingMessage_base {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Creates a scoped TCP `SocketServer` from a Node `net.Server`, starts
|
|
24
|
+
* listening with the supplied options, queues pending connections until `run`
|
|
25
|
+
* is called, and closes the server when the scope ends.
|
|
26
|
+
*
|
|
27
|
+
* @stability unstable
|
|
28
|
+
* @category constructors
|
|
29
|
+
* @since 4.0.0
|
|
30
|
+
*/
|
|
31
|
+
export declare const make: (options: Net.ServerOpts & Net.ListenOptions) => Effect.Effect<SocketServer.SocketServer["Service"], SocketServer.SocketServerError, Scope.Scope>;
|
|
32
|
+
/**
|
|
33
|
+
* Provides a TCP `SocketServer` by creating and managing a scoped Node
|
|
34
|
+
* `net.Server` with the supplied server and listen options.
|
|
35
|
+
*
|
|
36
|
+
* @stability unstable
|
|
37
|
+
* @category layers
|
|
38
|
+
* @since 4.0.0
|
|
39
|
+
*/
|
|
40
|
+
export declare const layer: (options: Net.ServerOpts & Net.ListenOptions) => Layer.Layer<SocketServer.SocketServer, SocketServer.SocketServerError>;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a scoped TLS `SocketServer` from a Node `tls.Server`, starts
|
|
43
|
+
* listening with the supplied options, queues pending connections until `run`
|
|
44
|
+
* is called, and closes the server when the scope ends.
|
|
45
|
+
*
|
|
46
|
+
* **Details**
|
|
47
|
+
*
|
|
48
|
+
* Connections reach `run` only once their handshake has completed, and the
|
|
49
|
+
* handler receives a `Socket.Socket` backed by the `tls.TLSSocket`, which is
|
|
50
|
+
* also provided as `NodeSocket.NetSocket`. Connections that fail the handshake
|
|
51
|
+
* are destroyed and the server keeps listening.
|
|
52
|
+
*
|
|
53
|
+
* @stability unstable
|
|
54
|
+
* @category constructors
|
|
55
|
+
* @since 4.0.0
|
|
56
|
+
*/
|
|
57
|
+
export declare const makeTls: (options: Tls.TlsOptions & Net.ListenOptions) => Effect.Effect<SocketServer.SocketServer["Service"], SocketServer.SocketServerError, Scope.Scope>;
|
|
58
|
+
/**
|
|
59
|
+
* Provides a TLS `SocketServer` by creating and managing a scoped Node
|
|
60
|
+
* `tls.Server` with the supplied TLS and listen options.
|
|
61
|
+
*
|
|
62
|
+
* @stability unstable
|
|
63
|
+
* @category layers
|
|
64
|
+
* @since 4.0.0
|
|
65
|
+
*/
|
|
66
|
+
export declare const layerTls: (options: Tls.TlsOptions & Net.ListenOptions) => Layer.Layer<SocketServer.SocketServer, SocketServer.SocketServerError>;
|
|
67
|
+
/**
|
|
68
|
+
* Creates a scoped WebSocket `SocketServer` backed by the `ws` package,
|
|
69
|
+
* providing the WebSocket and its Node `IncomingMessage` to connection
|
|
70
|
+
* handlers and closing the server when the scope ends.
|
|
71
|
+
*
|
|
72
|
+
* @stability unstable
|
|
73
|
+
* @category constructors
|
|
74
|
+
* @since 4.0.0
|
|
75
|
+
*/
|
|
76
|
+
export declare const makeWebSocket: (options: NodeWS.ServerOptions<typeof NodeWS.WebSocket, typeof Http.IncomingMessage>) => Effect.Effect<SocketServer.SocketServer["Service"], SocketServer.SocketServerError, Scope.Scope>;
|
|
77
|
+
/**
|
|
78
|
+
* Provides a WebSocket `SocketServer` backed by the `ws` package and managed
|
|
79
|
+
* with the supplied server options.
|
|
80
|
+
*
|
|
81
|
+
* @stability unstable
|
|
82
|
+
* @category layers
|
|
83
|
+
* @since 4.0.0
|
|
84
|
+
*/
|
|
85
|
+
export declare const layerWebSocket: (options: NodeSocket.NodeWS.ServerOptions<typeof NodeSocket.NodeWS.WebSocket, typeof Http.IncomingMessage>) => Layer.Layer<SocketServer.SocketServer, SocketServer.SocketServerError>;
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=NodeSocketServer.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IncomingMessage,
|
|
3
|
+
layer,
|
|
4
|
+
layerTls,
|
|
5
|
+
layerWebSocket,
|
|
6
|
+
make,
|
|
7
|
+
makeTls,
|
|
8
|
+
makeWebSocket
|
|
9
|
+
} from "../chunk-UXIG7ALP.js";
|
|
10
|
+
import "../chunk-Q7YXUH7M.js";
|
|
11
|
+
import "../chunk-MLKGABMK.js";
|
|
12
|
+
export {
|
|
13
|
+
IncomingMessage,
|
|
14
|
+
layer,
|
|
15
|
+
layerTls,
|
|
16
|
+
layerWebSocket,
|
|
17
|
+
make,
|
|
18
|
+
makeTls,
|
|
19
|
+
makeWebSocket
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Layer from "effect/Layer";
|
|
2
|
+
import * as Stdio from "effect/Stdio";
|
|
3
|
+
/**
|
|
4
|
+
* Provides `Stdio` from `process.argv`, `process.stdin`, `process.stdout`,
|
|
5
|
+
* and `process.stderr`; stdin remains open and stdout/stderr are not ended by
|
|
6
|
+
* default.
|
|
7
|
+
*
|
|
8
|
+
* @stability unstable
|
|
9
|
+
* @category layers
|
|
10
|
+
* @since 4.0.0
|
|
11
|
+
*/
|
|
12
|
+
export declare const layer: Layer.Layer<Stdio.Stdio>;
|
|
13
|
+
//# sourceMappingURL=NodeStdio.d.ts.map
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapters between Node streams and Effect streams, channels, and readables.
|
|
3
|
+
*
|
|
4
|
+
* This module is the stream boundary for Node APIs. It wraps `Readable` and
|
|
5
|
+
* `Duplex` values as Effect `Stream`s and `Channel`s, pipes Effect streams
|
|
6
|
+
* through Node duplex streams, exposes an Effect `Stream` back to Node as a
|
|
7
|
+
* `Readable`, and collects readable payloads into strings, array buffers, or
|
|
8
|
+
* `Uint8Array`s with optional byte limits.
|
|
9
|
+
*
|
|
10
|
+
* @stability unstable
|
|
11
|
+
* @since 4.0.0
|
|
12
|
+
*/
|
|
13
|
+
import * as Arr from "effect/Array";
|
|
14
|
+
import * as ByteSize from "effect/ByteSize";
|
|
15
|
+
import * as Cause from "effect/Cause";
|
|
16
|
+
import * as Channel from "effect/Channel";
|
|
17
|
+
import * as Effect from "effect/Effect";
|
|
18
|
+
import { type LazyArg } from "effect/Function";
|
|
19
|
+
import * as Stream from "effect/Stream";
|
|
20
|
+
import type { Duplex } from "node:stream";
|
|
21
|
+
import { Readable } from "node:stream";
|
|
22
|
+
/**
|
|
23
|
+
* Converts a Node readable stream into an Effect `Stream`, reading chunks with
|
|
24
|
+
* an optional chunk size, mapping stream errors with `onError`, and destroying
|
|
25
|
+
* the readable on completion unless `closeOnDone` is `false`.
|
|
26
|
+
*
|
|
27
|
+
* @stability unstable
|
|
28
|
+
* @category constructors
|
|
29
|
+
* @since 4.0.0
|
|
30
|
+
*/
|
|
31
|
+
export declare const fromReadable: <A = Uint8Array, E = Cause.UnknownError>(options: {
|
|
32
|
+
readonly evaluate: LazyArg<Readable | NodeJS.ReadableStream>;
|
|
33
|
+
readonly onError?: (error: unknown) => E;
|
|
34
|
+
readonly chunkSize?: number | undefined;
|
|
35
|
+
readonly closeOnDone?: boolean | undefined;
|
|
36
|
+
}) => Stream.Stream<A, E>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a `Channel` that pulls chunks from a Node readable stream, mapping
|
|
39
|
+
* errors with `onError` and destroying the readable on completion unless
|
|
40
|
+
* `closeOnDone` is `false`.
|
|
41
|
+
*
|
|
42
|
+
* @stability unstable
|
|
43
|
+
* @category constructors
|
|
44
|
+
* @since 4.0.0
|
|
45
|
+
*/
|
|
46
|
+
export declare const fromReadableChannel: <A = Uint8Array, E = Cause.UnknownError>(options: {
|
|
47
|
+
readonly evaluate: LazyArg<Readable | NodeJS.ReadableStream>;
|
|
48
|
+
readonly onError?: (error: unknown) => E;
|
|
49
|
+
readonly chunkSize?: number | undefined;
|
|
50
|
+
readonly closeOnDone?: boolean | undefined;
|
|
51
|
+
}) => Channel.Channel<Arr.NonEmptyReadonlyArray<A>, E>;
|
|
52
|
+
/**
|
|
53
|
+
* Creates a `Channel` over a Node `Duplex`, writing upstream chunks with
|
|
54
|
+
* backpressure while emitting chunks read from the duplex and optionally ending
|
|
55
|
+
* the writable side when upstream completes.
|
|
56
|
+
*
|
|
57
|
+
* @stability unstable
|
|
58
|
+
* @category constructors
|
|
59
|
+
* @since 4.0.0
|
|
60
|
+
*/
|
|
61
|
+
export declare const fromDuplex: <IE, I = Uint8Array, O = Uint8Array, E = Cause.UnknownError>(options: {
|
|
62
|
+
readonly evaluate: LazyArg<Duplex>;
|
|
63
|
+
readonly onError?: (error: unknown) => E;
|
|
64
|
+
readonly chunkSize?: number | undefined;
|
|
65
|
+
readonly endOnDone?: boolean | undefined;
|
|
66
|
+
readonly encoding?: BufferEncoding | undefined;
|
|
67
|
+
}) => Channel.Channel<Arr.NonEmptyReadonlyArray<O>, IE | E, void, Arr.NonEmptyReadonlyArray<I>, IE>;
|
|
68
|
+
/**
|
|
69
|
+
* Pipes an Effect `Stream` through a Node `Duplex`, writing the stream's
|
|
70
|
+
* chunks to the duplex and emitting chunks read back from it.
|
|
71
|
+
*
|
|
72
|
+
* @stability unstable
|
|
73
|
+
* @category combinators
|
|
74
|
+
* @since 4.0.0
|
|
75
|
+
*/
|
|
76
|
+
export declare const pipeThroughDuplex: {
|
|
77
|
+
/**
|
|
78
|
+
* Pipes an Effect `Stream` through a Node `Duplex`, writing the stream's
|
|
79
|
+
* chunks to the duplex and emitting chunks read back from it.
|
|
80
|
+
*
|
|
81
|
+
* @stability unstable
|
|
82
|
+
* @category combinators
|
|
83
|
+
* @since 4.0.0
|
|
84
|
+
*/
|
|
85
|
+
<B = Uint8Array, E2 = Cause.UnknownError>(options: {
|
|
86
|
+
readonly evaluate: LazyArg<Duplex>;
|
|
87
|
+
readonly onError?: (error: unknown) => E2;
|
|
88
|
+
readonly chunkSize?: number | undefined;
|
|
89
|
+
readonly endOnDone?: boolean | undefined;
|
|
90
|
+
readonly encoding?: BufferEncoding | undefined;
|
|
91
|
+
}): <R, E, A>(self: Stream.Stream<A, E, R>) => Stream.Stream<B, E2 | E, R>;
|
|
92
|
+
/**
|
|
93
|
+
* Pipes an Effect `Stream` through a Node `Duplex`, writing the stream's
|
|
94
|
+
* chunks to the duplex and emitting chunks read back from it.
|
|
95
|
+
*
|
|
96
|
+
* @stability unstable
|
|
97
|
+
* @category combinators
|
|
98
|
+
* @since 4.0.0
|
|
99
|
+
*/
|
|
100
|
+
<R, E, A, B = Uint8Array, E2 = Cause.UnknownError>(self: Stream.Stream<A, E, R>, options: {
|
|
101
|
+
readonly evaluate: LazyArg<Duplex>;
|
|
102
|
+
readonly onError?: (error: unknown) => E2;
|
|
103
|
+
readonly chunkSize?: number | undefined;
|
|
104
|
+
readonly endOnDone?: boolean | undefined;
|
|
105
|
+
readonly encoding?: BufferEncoding | undefined;
|
|
106
|
+
}): Stream.Stream<B, E | E2, R>;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Pipes a stream of strings or bytes through a Node `Duplex` using default
|
|
110
|
+
* options and `Cause.UnknownError` for stream failures.
|
|
111
|
+
*
|
|
112
|
+
* @stability unstable
|
|
113
|
+
* @category combinators
|
|
114
|
+
* @since 4.0.0
|
|
115
|
+
*/
|
|
116
|
+
export declare const pipeThroughSimple: {
|
|
117
|
+
/**
|
|
118
|
+
* Pipes a stream of strings or bytes through a Node `Duplex` using default
|
|
119
|
+
* options and `Cause.UnknownError` for stream failures.
|
|
120
|
+
*
|
|
121
|
+
* @stability unstable
|
|
122
|
+
* @category combinators
|
|
123
|
+
* @since 4.0.0
|
|
124
|
+
*/
|
|
125
|
+
(duplex: LazyArg<Duplex>): <R, E>(self: Stream.Stream<string | Uint8Array, E, R>) => Stream.Stream<Uint8Array, E | Cause.UnknownError, R>;
|
|
126
|
+
/**
|
|
127
|
+
* Pipes a stream of strings or bytes through a Node `Duplex` using default
|
|
128
|
+
* options and `Cause.UnknownError` for stream failures.
|
|
129
|
+
*
|
|
130
|
+
* @stability unstable
|
|
131
|
+
* @category combinators
|
|
132
|
+
* @since 4.0.0
|
|
133
|
+
*/
|
|
134
|
+
<R, E>(self: Stream.Stream<string | Uint8Array, E, R>, duplex: LazyArg<Duplex>): Stream.Stream<Uint8Array, Cause.UnknownError | E, R>;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Converts an Effect `Stream` into a Node `Readable`, using the caller's
|
|
138
|
+
* Effect context to run the stream and destroying the readable if the stream
|
|
139
|
+
* fails.
|
|
140
|
+
*
|
|
141
|
+
* @stability unstable
|
|
142
|
+
* @category converting
|
|
143
|
+
* @since 4.0.0
|
|
144
|
+
*/
|
|
145
|
+
export declare const toReadable: <E, R>(stream: Stream.Stream<string | Uint8Array, E, R>) => Effect.Effect<Readable, never, R>;
|
|
146
|
+
/**
|
|
147
|
+
* Converts a service-free Effect `Stream` into a Node `Readable` using an
|
|
148
|
+
* empty Effect context.
|
|
149
|
+
*
|
|
150
|
+
* @stability unstable
|
|
151
|
+
* @category converting
|
|
152
|
+
* @since 4.0.0
|
|
153
|
+
*/
|
|
154
|
+
export declare const toReadableNever: <E>(stream: Stream.Stream<string | Uint8Array, E, never>) => Readable;
|
|
155
|
+
/**
|
|
156
|
+
* Consumes a Node readable stream into a string using the selected encoding,
|
|
157
|
+
* failing through `onError` on stream errors or when `maxBytes` is exceeded
|
|
158
|
+
* and destroying the stream on interruption or failure.
|
|
159
|
+
*
|
|
160
|
+
* @stability unstable
|
|
161
|
+
* @category converting
|
|
162
|
+
* @since 4.0.0
|
|
163
|
+
*/
|
|
164
|
+
export declare const toString: <E = Cause.UnknownError>(readable: LazyArg<Readable | NodeJS.ReadableStream>, options?: {
|
|
165
|
+
readonly onError?: (error: unknown) => E;
|
|
166
|
+
readonly encoding?: BufferEncoding | undefined;
|
|
167
|
+
readonly maxBytes?: ByteSize.Input | undefined;
|
|
168
|
+
}) => Effect.Effect<string, E>;
|
|
169
|
+
/**
|
|
170
|
+
* Consumes a Node readable stream into an `ArrayBuffer`, failing through
|
|
171
|
+
* `onError` on stream errors or when `maxBytes` is exceeded and destroying the
|
|
172
|
+
* stream on interruption or failure.
|
|
173
|
+
*
|
|
174
|
+
* @stability unstable
|
|
175
|
+
* @category converting
|
|
176
|
+
* @since 4.0.0
|
|
177
|
+
*/
|
|
178
|
+
export declare const toArrayBuffer: <E = Cause.UnknownError>(readable: LazyArg<Readable | NodeJS.ReadableStream>, options?: {
|
|
179
|
+
readonly onError?: (error: unknown) => E;
|
|
180
|
+
readonly maxBytes?: ByteSize.Input | undefined;
|
|
181
|
+
}) => Effect.Effect<ArrayBuffer, E>;
|
|
182
|
+
/**
|
|
183
|
+
* Consumes a Node readable stream into a `Uint8Array`, using the same error
|
|
184
|
+
* mapping and `maxBytes` handling as `toArrayBuffer`.
|
|
185
|
+
*
|
|
186
|
+
* @stability unstable
|
|
187
|
+
* @category converting
|
|
188
|
+
* @since 4.0.0
|
|
189
|
+
*/
|
|
190
|
+
export declare const toUint8Array: <E = Cause.UnknownError>(readable: LazyArg<Readable | NodeJS.ReadableStream>, options?: {
|
|
191
|
+
readonly onError?: (error: unknown) => E;
|
|
192
|
+
readonly maxBytes?: ByteSize.Input | undefined;
|
|
193
|
+
}) => Effect.Effect<Uint8Array, E>;
|
|
194
|
+
//# sourceMappingURL=NodeStream.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fromDuplex,
|
|
3
|
+
fromReadable,
|
|
4
|
+
fromReadableChannel,
|
|
5
|
+
pipeThroughDuplex,
|
|
6
|
+
pipeThroughSimple,
|
|
7
|
+
toArrayBuffer,
|
|
8
|
+
toReadable,
|
|
9
|
+
toReadableNever,
|
|
10
|
+
toString,
|
|
11
|
+
toUint8Array
|
|
12
|
+
} from "../chunk-T5WDTZCE.js";
|
|
13
|
+
import "../chunk-DX4VFONH.js";
|
|
14
|
+
import "../chunk-MLKGABMK.js";
|
|
15
|
+
export {
|
|
16
|
+
fromDuplex,
|
|
17
|
+
fromReadable,
|
|
18
|
+
fromReadableChannel,
|
|
19
|
+
pipeThroughDuplex,
|
|
20
|
+
pipeThroughSimple,
|
|
21
|
+
toArrayBuffer,
|
|
22
|
+
toReadable,
|
|
23
|
+
toReadableNever,
|
|
24
|
+
toString,
|
|
25
|
+
toUint8Array
|
|
26
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Layer from "effect/Layer";
|
|
3
|
+
import type * as Scope from "effect/Scope";
|
|
4
|
+
import * as Terminal from "effect/Terminal";
|
|
5
|
+
/**
|
|
6
|
+
* Creates a scoped process-backed `Terminal` using Node `readline` and TTY raw mode.
|
|
7
|
+
* By default, Esc, Ctrl+C, and Ctrl+D end key input. Supply `shouldQuit` to
|
|
8
|
+
* override these quit keys.
|
|
9
|
+
*
|
|
10
|
+
* @stability unstable
|
|
11
|
+
* @category constructors
|
|
12
|
+
* @since 4.0.0
|
|
13
|
+
*/
|
|
14
|
+
export declare const make: (shouldQuit?: (input: Terminal.UserInput) => boolean) => Effect.Effect<Terminal.Terminal, never, Scope.Scope>;
|
|
15
|
+
/**
|
|
16
|
+
* Provides the default process-backed `Terminal` service, ending key input on
|
|
17
|
+
* bare Esc, Ctrl+C, or Ctrl+D.
|
|
18
|
+
*
|
|
19
|
+
* @stability unstable
|
|
20
|
+
* @category layers
|
|
21
|
+
* @since 4.0.0
|
|
22
|
+
*/
|
|
23
|
+
export declare const layer: Layer.Layer<Terminal.Terminal>;
|
|
24
|
+
//# sourceMappingURL=NodeTerminal.d.ts.map
|