@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,274 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-MLKGABMK.js";
|
|
4
|
+
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodeDns.js
|
|
6
|
+
var NodeDns_exports = {};
|
|
7
|
+
__export(NodeDns_exports, {
|
|
8
|
+
addressesFromLookup: () => addressesFromLookup,
|
|
9
|
+
dnsErrorFromCause: () => dnsErrorFromCause,
|
|
10
|
+
domainNameFromResolverUnsafe: () => domainNameFromResolverUnsafe,
|
|
11
|
+
layer: () => layer,
|
|
12
|
+
layerConfig: () => layerConfig,
|
|
13
|
+
lookup: () => lookup,
|
|
14
|
+
make: () => make2,
|
|
15
|
+
nameTextFromResolver: () => nameTextFromResolver,
|
|
16
|
+
recordsFromResolver: () => recordsFromResolver,
|
|
17
|
+
resolver: () => resolver,
|
|
18
|
+
secondsFromInt32: () => secondsFromInt32,
|
|
19
|
+
toFamily: () => toFamily,
|
|
20
|
+
utf8FromLatin1: () => utf8FromLatin1
|
|
21
|
+
});
|
|
22
|
+
import * as Arr from "effect/Array";
|
|
23
|
+
import * as Config from "effect/Config";
|
|
24
|
+
import * as Duration from "effect/Duration";
|
|
25
|
+
import * as Effect from "effect/Effect";
|
|
26
|
+
import * as Layer from "effect/Layer";
|
|
27
|
+
import * as Dns from "effect/net/Dns";
|
|
28
|
+
import * as Host from "effect/net/Host";
|
|
29
|
+
import * as NetAddress from "effect/net/NetAddress";
|
|
30
|
+
import * as Result from "effect/Result";
|
|
31
|
+
import * as NodeDns from "node:dns";
|
|
32
|
+
var reasons = {
|
|
33
|
+
ENOTFOUND: "NotFound",
|
|
34
|
+
ENODATA: "NotFound",
|
|
35
|
+
ETIMEOUT: "Timeout",
|
|
36
|
+
// `getaddrinfo` reports SERVFAIL answers as `EAI_AGAIN`, and REFUSED,
|
|
37
|
+
// FORMERR, and NOTIMP answers alike as `EAI_FAIL`.
|
|
38
|
+
EAI_AGAIN: "Temporary",
|
|
39
|
+
EAI_FAIL: "Refused",
|
|
40
|
+
ESERVFAIL: "ServerFailure",
|
|
41
|
+
EREFUSED: "Refused",
|
|
42
|
+
ECONNREFUSED: "Refused",
|
|
43
|
+
EBADNAME: "BadName",
|
|
44
|
+
ENONAME: "BadName",
|
|
45
|
+
EBADFAMILY: "BadName",
|
|
46
|
+
EBADQUERY: "BadName",
|
|
47
|
+
EFORMERR: "InvalidResponse",
|
|
48
|
+
EBADRESP: "InvalidResponse",
|
|
49
|
+
ENOTIMP: "Unsupported"
|
|
50
|
+
};
|
|
51
|
+
var dnsErrorFromCause = (cause, method, hostname, recordType) => {
|
|
52
|
+
const code = typeof cause === "object" && cause !== null && "code" in cause ? String(cause.code).replace(/^DNS_/, "") : void 0;
|
|
53
|
+
return new Dns.DnsError({
|
|
54
|
+
reason: (code !== void 0 ? reasons[code] : void 0) ?? "Unknown",
|
|
55
|
+
method,
|
|
56
|
+
hostname,
|
|
57
|
+
recordType,
|
|
58
|
+
cause
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
var absoluteName = (name) => {
|
|
62
|
+
if (name.endsWith(".")) {
|
|
63
|
+
let backslashes = 0;
|
|
64
|
+
for (let i = name.length - 2; i >= 0 && name[i] === "\\"; i--) {
|
|
65
|
+
backslashes++;
|
|
66
|
+
}
|
|
67
|
+
if (backslashes % 2 === 0) return name;
|
|
68
|
+
}
|
|
69
|
+
return `${name}.`;
|
|
70
|
+
};
|
|
71
|
+
var domainNameFromResolverUnsafe = (name) => Host.domainNameFromStringUnsafe(absoluteName(name));
|
|
72
|
+
var decoder = /* @__PURE__ */ new TextDecoder();
|
|
73
|
+
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
74
|
+
var nameParts = /\\(\d{3})|\\(.)|[^\\]+|\\/gsu;
|
|
75
|
+
var nameTextFromResolver = (name, radix = 10) => {
|
|
76
|
+
if (!name.includes("\\")) return absoluteName(name);
|
|
77
|
+
const bytes = [];
|
|
78
|
+
for (const [part, digits, escaped] of name.matchAll(nameParts)) {
|
|
79
|
+
if (digits !== void 0) {
|
|
80
|
+
const byte = Number.parseInt(digits, radix);
|
|
81
|
+
if (byte === 46 || byte === 92) bytes.push(92);
|
|
82
|
+
bytes.push(byte);
|
|
83
|
+
} else if (escaped !== void 0) {
|
|
84
|
+
if (escaped === "." || escaped === "\\") bytes.push(92);
|
|
85
|
+
bytes.push(...encoder.encode(escaped));
|
|
86
|
+
} else {
|
|
87
|
+
bytes.push(...encoder.encode(part));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return absoluteName(decoder.decode(Uint8Array.from(bytes)));
|
|
91
|
+
};
|
|
92
|
+
var secondsFromInt32 = (value) => Duration.seconds(value >>> 0);
|
|
93
|
+
var utf8FromLatin1 = (value) => (
|
|
94
|
+
// oxlint-disable-next-line no-control-regex
|
|
95
|
+
/[^\x00-\x7f]/.test(value) ? decoder.decode(Uint8Array.from(value, (character) => character.charCodeAt(0))) : value
|
|
96
|
+
);
|
|
97
|
+
var recordsFromResolver = (name, type, entries, fields) => {
|
|
98
|
+
const records = [];
|
|
99
|
+
let skipped;
|
|
100
|
+
for (const entry of entries) {
|
|
101
|
+
const result = Result.try(() => Dns.makeRecordUnsafe(type, fields(entry)));
|
|
102
|
+
if (Result.isSuccess(result)) {
|
|
103
|
+
records.push(result.success);
|
|
104
|
+
} else {
|
|
105
|
+
skipped ??= result;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return records.length === 0 && skipped !== void 0 ? Result.fail(new Dns.DnsError({
|
|
109
|
+
reason: "InvalidResponse",
|
|
110
|
+
method: "resolve",
|
|
111
|
+
hostname: name,
|
|
112
|
+
recordType: type,
|
|
113
|
+
cause: skipped.failure
|
|
114
|
+
})) : Result.succeed(records);
|
|
115
|
+
};
|
|
116
|
+
var queries = {
|
|
117
|
+
A: async (resolver2, name) => recordsFromResolver(name, "A", await resolver2.resolve4(name), (address) => ({
|
|
118
|
+
address: NetAddress.ipFromStringUnsafe(address)
|
|
119
|
+
})),
|
|
120
|
+
AAAA: async (resolver2, name) => recordsFromResolver(name, "AAAA", await resolver2.resolve6(name), (address) => ({
|
|
121
|
+
address: NetAddress.ipFromStringUnsafe(address)
|
|
122
|
+
})),
|
|
123
|
+
CAA: async (resolver2, name) => recordsFromResolver(name, "CAA", await resolver2.resolveCaa(name), (caa) => {
|
|
124
|
+
const tag = Object.keys(caa).find((key) => key !== "critical" && key !== "type");
|
|
125
|
+
if (tag === void 0) throw new Error("CAA record without a property tag");
|
|
126
|
+
return {
|
|
127
|
+
critical: (caa.critical & 128) !== 0,
|
|
128
|
+
tag,
|
|
129
|
+
value: String(caa[tag])
|
|
130
|
+
};
|
|
131
|
+
}),
|
|
132
|
+
CNAME: async (resolver2, name) => recordsFromResolver(name, "CNAME", await resolver2.resolveCname(name), (target) => ({
|
|
133
|
+
target: domainNameFromResolverUnsafe(target)
|
|
134
|
+
})),
|
|
135
|
+
MX: async (resolver2, name) => recordsFromResolver(name, "MX", await resolver2.resolveMx(name), (mx) => ({
|
|
136
|
+
exchange: domainNameFromResolverUnsafe(mx.exchange),
|
|
137
|
+
priority: mx.priority
|
|
138
|
+
})),
|
|
139
|
+
NAPTR: async (resolver2, name) => recordsFromResolver(name, "NAPTR", await resolver2.resolveNaptr(name), (naptr) => ({
|
|
140
|
+
order: naptr.order,
|
|
141
|
+
preference: naptr.preference,
|
|
142
|
+
flags: naptr.flags,
|
|
143
|
+
service: naptr.service,
|
|
144
|
+
regexp: naptr.regexp,
|
|
145
|
+
replacement: domainNameFromResolverUnsafe(naptr.replacement)
|
|
146
|
+
})),
|
|
147
|
+
NS: async (resolver2, name) => recordsFromResolver(name, "NS", await resolver2.resolveNs(name), (host) => ({
|
|
148
|
+
host: domainNameFromResolverUnsafe(host)
|
|
149
|
+
})),
|
|
150
|
+
PTR: async (resolver2, name) => recordsFromResolver(name, "PTR", await resolver2.resolvePtr(name), (host) => ({
|
|
151
|
+
host: nameTextFromResolver(host)
|
|
152
|
+
})),
|
|
153
|
+
SOA: async (resolver2, name) => recordsFromResolver(name, "SOA", [await resolver2.resolveSoa(name)], (soa) => ({
|
|
154
|
+
primary: domainNameFromResolverUnsafe(soa.nsname),
|
|
155
|
+
admin: nameTextFromResolver(soa.hostmaster),
|
|
156
|
+
serial: soa.serial,
|
|
157
|
+
refresh: secondsFromInt32(soa.refresh),
|
|
158
|
+
retry: secondsFromInt32(soa.retry),
|
|
159
|
+
expire: secondsFromInt32(soa.expire),
|
|
160
|
+
minimum: Duration.seconds(soa.minttl)
|
|
161
|
+
})),
|
|
162
|
+
SRV: async (resolver2, name) => recordsFromResolver(name, "SRV", await resolver2.resolveSrv(name), (srv) => ({
|
|
163
|
+
target: domainNameFromResolverUnsafe(srv.name),
|
|
164
|
+
port: srv.port,
|
|
165
|
+
priority: srv.priority,
|
|
166
|
+
weight: srv.weight
|
|
167
|
+
})),
|
|
168
|
+
// `resolveTlsa` was added in Node.js 22.15 and 23.9; Bun and Deno lack it.
|
|
169
|
+
TLSA: async (resolver2, name) => typeof resolver2.resolveTlsa === "function" ? recordsFromResolver(name, "TLSA", await resolver2.resolveTlsa(name), (tlsa) => ({
|
|
170
|
+
certUsage: tlsa.certUsage,
|
|
171
|
+
selector: tlsa.selector,
|
|
172
|
+
matchingType: tlsa.match,
|
|
173
|
+
data: new Uint8Array(tlsa.data)
|
|
174
|
+
})) : Result.fail(new Dns.DnsError({
|
|
175
|
+
reason: "Unsupported",
|
|
176
|
+
method: "resolve",
|
|
177
|
+
hostname: name,
|
|
178
|
+
recordType: "TLSA"
|
|
179
|
+
})),
|
|
180
|
+
TXT: async (resolver2, name) => recordsFromResolver(name, "TXT", await resolver2.resolveTxt(name), (chunks) => ({
|
|
181
|
+
chunks
|
|
182
|
+
}))
|
|
183
|
+
};
|
|
184
|
+
var toFamily = (family) => family === "IPv4" ? 4 : family === "IPv6" ? 6 : 0;
|
|
185
|
+
var stripZone = (address) => {
|
|
186
|
+
const separator = address.indexOf("%");
|
|
187
|
+
return separator === -1 ? address : address.slice(0, separator);
|
|
188
|
+
};
|
|
189
|
+
var addressesFromLookup = (entries) => Arr.filterMap(entries, (entry) => Result.try(() => NetAddress.ipFromStringUnsafe(stripZone(entry.address))));
|
|
190
|
+
var lookup = (host, family) => Effect.tryPromise({
|
|
191
|
+
// `verbatim` keeps the system order on Node versions without `order`.
|
|
192
|
+
try: () => NodeDns.promises.lookup(host, {
|
|
193
|
+
all: true,
|
|
194
|
+
family: toFamily(family),
|
|
195
|
+
order: "verbatim",
|
|
196
|
+
verbatim: true
|
|
197
|
+
}),
|
|
198
|
+
catch: (cause) => dnsErrorFromCause(cause, "lookup", host)
|
|
199
|
+
}).pipe(Effect.map(addressesFromLookup));
|
|
200
|
+
var resolverInt = (value) => value >= 1 ? Math.min(value, 2 ** 31 - 1) : 1;
|
|
201
|
+
var resolver = /* @__PURE__ */ Effect.fnUntraced(function* (options) {
|
|
202
|
+
const resolverOptions = {
|
|
203
|
+
...options?.timeout !== void 0 && {
|
|
204
|
+
timeout: resolverInt(Math.ceil(Duration.toMillis(options.timeout)))
|
|
205
|
+
},
|
|
206
|
+
...options?.tries !== void 0 && {
|
|
207
|
+
tries: resolverInt(Math.floor(options.tries))
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
const nameServers = [];
|
|
211
|
+
for (const input of options?.nameServers ?? []) {
|
|
212
|
+
const server = yield* Effect.fromResult(Dns.nameServerFromInput(input));
|
|
213
|
+
if (NetAddress.isInetAddressV6(server) && server.scopeId !== 0) {
|
|
214
|
+
return yield* new NetAddress.NetAddressError({
|
|
215
|
+
input,
|
|
216
|
+
message: "IPv6 name servers with a scope ID are not supported"
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
nameServers.push(server);
|
|
220
|
+
}
|
|
221
|
+
const resolver2 = yield* Effect.acquireRelease(Effect.sync(() => {
|
|
222
|
+
const resolver3 = new NodeDns.promises.Resolver(resolverOptions);
|
|
223
|
+
if (nameServers.length > 0) {
|
|
224
|
+
resolver3.setServers(nameServers.map(NetAddress.formatInet));
|
|
225
|
+
}
|
|
226
|
+
return resolver3;
|
|
227
|
+
}), (resolver3) => Effect.sync(() => resolver3.cancel()));
|
|
228
|
+
return (name, type) => Effect.tryPromise({
|
|
229
|
+
try: () => queries[type](resolver2, name),
|
|
230
|
+
catch: (cause) => dnsErrorFromCause(cause, "resolve", name, type)
|
|
231
|
+
}).pipe(Effect.flatMap(Effect.fromResult));
|
|
232
|
+
});
|
|
233
|
+
var utf8Strings = (record) => {
|
|
234
|
+
switch (record._tag) {
|
|
235
|
+
case "TXT":
|
|
236
|
+
return Dns.makeRecordUnsafe("TXT", {
|
|
237
|
+
chunks: Arr.map(record.chunks, utf8FromLatin1)
|
|
238
|
+
});
|
|
239
|
+
case "CAA":
|
|
240
|
+
return Dns.makeRecordUnsafe("CAA", {
|
|
241
|
+
critical: record.critical,
|
|
242
|
+
tag: record.tag,
|
|
243
|
+
value: utf8FromLatin1(record.value)
|
|
244
|
+
});
|
|
245
|
+
default:
|
|
246
|
+
return record;
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
var make2 = /* @__PURE__ */ Effect.fnUntraced(function* (options) {
|
|
250
|
+
const resolve = yield* resolver(options);
|
|
251
|
+
return Dns.make({
|
|
252
|
+
lookup,
|
|
253
|
+
resolve: (name, type) => Effect.map(resolve(name, type), Arr.map(utf8Strings))
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
var layer = /* @__PURE__ */ Layer.effect(Dns.Dns, /* @__PURE__ */ Effect.orDie(/* @__PURE__ */ make2()));
|
|
257
|
+
var layerConfig = (options) => Layer.effect(Dns.Dns, Effect.flatMap(Config.unwrap(options), make2));
|
|
258
|
+
|
|
259
|
+
export {
|
|
260
|
+
dnsErrorFromCause,
|
|
261
|
+
domainNameFromResolverUnsafe,
|
|
262
|
+
nameTextFromResolver,
|
|
263
|
+
secondsFromInt32,
|
|
264
|
+
utf8FromLatin1,
|
|
265
|
+
recordsFromResolver,
|
|
266
|
+
toFamily,
|
|
267
|
+
addressesFromLookup,
|
|
268
|
+
lookup,
|
|
269
|
+
resolver,
|
|
270
|
+
make2 as make,
|
|
271
|
+
layer,
|
|
272
|
+
layerConfig,
|
|
273
|
+
NodeDns_exports
|
|
274
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
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 {
|
|
13
|
+
__export
|
|
14
|
+
} from "./chunk-MLKGABMK.js";
|
|
15
|
+
|
|
16
|
+
// ../../../../node_modules/.pnpm/@effect+platform-bun@4.0.5_effect@4.0.5/node_modules/@effect/platform-bun/dist/BunSocket.js
|
|
17
|
+
var BunSocket_exports = {};
|
|
18
|
+
__export(BunSocket_exports, {
|
|
19
|
+
NetSocket: () => NetSocket,
|
|
20
|
+
NodeWS: () => NodeWS,
|
|
21
|
+
fromDuplex: () => fromDuplex,
|
|
22
|
+
layerNet: () => layerNet,
|
|
23
|
+
layerTls: () => layerTls,
|
|
24
|
+
layerWebSocket: () => layerWebSocket,
|
|
25
|
+
layerWebSocketConstructor: () => layerWebSocketConstructor,
|
|
26
|
+
makeNet: () => makeNet,
|
|
27
|
+
makeNetChannel: () => makeNetChannel,
|
|
28
|
+
makeTls: () => makeTls,
|
|
29
|
+
makeTlsChannel: () => makeTlsChannel
|
|
30
|
+
});
|
|
31
|
+
import { flow } from "effect/Function";
|
|
32
|
+
import * as Layer from "effect/Layer";
|
|
33
|
+
import * as Socket from "effect/socket/Socket";
|
|
34
|
+
var layerWebSocketConstructor = /* @__PURE__ */ Layer.succeed(Socket.WebSocketConstructor)((url, options) => {
|
|
35
|
+
if (options === void 0 || typeof options === "string" || Array.isArray(options)) {
|
|
36
|
+
return new globalThis.WebSocket(url, options);
|
|
37
|
+
}
|
|
38
|
+
const WebSocket = globalThis.WebSocket;
|
|
39
|
+
return new WebSocket(url, {
|
|
40
|
+
// Bun requires a sequence for `protocols` in its options object.
|
|
41
|
+
protocols: typeof options.protocols === "string" ? [options.protocols] : options.protocols,
|
|
42
|
+
headers: options.headers
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
var layerWebSocket = /* @__PURE__ */ flow(Socket.makeWebSocket, /* @__PURE__ */ Layer.effect(Socket.Socket), /* @__PURE__ */ Layer.provide(layerWebSocketConstructor));
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
layerWebSocketConstructor,
|
|
49
|
+
layerWebSocket,
|
|
50
|
+
BunSocket_exports
|
|
51
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
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 {
|
|
14
|
+
__export
|
|
15
|
+
} from "./chunk-MLKGABMK.js";
|
|
16
|
+
|
|
17
|
+
// ../../../../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/NodeStream.js
|
|
18
|
+
var NodeStream_exports = {};
|
|
19
|
+
__export(NodeStream_exports, {
|
|
20
|
+
fromDuplex: () => fromDuplex,
|
|
21
|
+
fromReadable: () => fromReadable,
|
|
22
|
+
fromReadableChannel: () => fromReadableChannel,
|
|
23
|
+
pipeThroughDuplex: () => pipeThroughDuplex,
|
|
24
|
+
pipeThroughSimple: () => pipeThroughSimple,
|
|
25
|
+
toArrayBuffer: () => toArrayBuffer,
|
|
26
|
+
toReadable: () => toReadable,
|
|
27
|
+
toReadableNever: () => toReadableNever,
|
|
28
|
+
toString: () => toString,
|
|
29
|
+
toUint8Array: () => toUint8Array
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
NodeStream_exports
|
|
34
|
+
};
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pullIntoWritable
|
|
3
|
+
} from "./chunk-DX4VFONH.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-MLKGABMK.js";
|
|
7
|
+
|
|
8
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodeStream.js
|
|
9
|
+
var NodeStream_exports = {};
|
|
10
|
+
__export(NodeStream_exports, {
|
|
11
|
+
fromDuplex: () => fromDuplex,
|
|
12
|
+
fromReadable: () => fromReadable,
|
|
13
|
+
fromReadableChannel: () => fromReadableChannel,
|
|
14
|
+
pipeThroughDuplex: () => pipeThroughDuplex,
|
|
15
|
+
pipeThroughSimple: () => pipeThroughSimple,
|
|
16
|
+
toArrayBuffer: () => toArrayBuffer,
|
|
17
|
+
toReadable: () => toReadable,
|
|
18
|
+
toReadableNever: () => toReadableNever,
|
|
19
|
+
toString: () => toString,
|
|
20
|
+
toUint8Array: () => toUint8Array
|
|
21
|
+
});
|
|
22
|
+
import * as Arr from "effect/Array";
|
|
23
|
+
import * as ByteSize from "effect/ByteSize";
|
|
24
|
+
import * as Cause from "effect/Cause";
|
|
25
|
+
import * as Channel from "effect/Channel";
|
|
26
|
+
import * as Context from "effect/Context";
|
|
27
|
+
import * as Effect from "effect/Effect";
|
|
28
|
+
import * as Exit from "effect/Exit";
|
|
29
|
+
import * as Fiber from "effect/Fiber";
|
|
30
|
+
import { dual } from "effect/Function";
|
|
31
|
+
import * as Latch from "effect/Latch";
|
|
32
|
+
import * as MutableRef from "effect/MutableRef";
|
|
33
|
+
import * as Pull from "effect/Pull";
|
|
34
|
+
import * as Scope from "effect/Scope";
|
|
35
|
+
import * as Stream from "effect/Stream";
|
|
36
|
+
import { Readable } from "node:stream";
|
|
37
|
+
var fromReadable = (options) => Stream.fromChannel(fromReadableChannel(options));
|
|
38
|
+
var fromReadableChannel = (options) => Channel.fromTransform((_, scope) => readableToPullUnsafe({
|
|
39
|
+
scope,
|
|
40
|
+
readable: options.evaluate(),
|
|
41
|
+
onError: options.onError ?? defaultOnError,
|
|
42
|
+
chunkSize: options.chunkSize,
|
|
43
|
+
closeOnDone: options.closeOnDone
|
|
44
|
+
}));
|
|
45
|
+
var fromDuplex = (options) => Channel.fromTransform((upstream, scope) => {
|
|
46
|
+
const duplex = options.evaluate();
|
|
47
|
+
const exit = MutableRef.make(void 0);
|
|
48
|
+
const latch = Latch.makeUnsafe(false);
|
|
49
|
+
return pullIntoWritable({
|
|
50
|
+
pull: upstream,
|
|
51
|
+
writable: duplex,
|
|
52
|
+
onError: options.onError ?? defaultOnError,
|
|
53
|
+
endOnDone: options.endOnDone,
|
|
54
|
+
encoding: options.encoding
|
|
55
|
+
}).pipe(Effect.catchCause((cause) => {
|
|
56
|
+
if (Pull.isDoneCause(cause)) return Effect.void;
|
|
57
|
+
exit.current = Exit.failCause(cause);
|
|
58
|
+
latch.openUnsafe();
|
|
59
|
+
return Effect.void;
|
|
60
|
+
}), Effect.forkIn(scope), Effect.flatMap(() => readableToPullUnsafe({
|
|
61
|
+
scope,
|
|
62
|
+
exit,
|
|
63
|
+
latch,
|
|
64
|
+
readable: duplex,
|
|
65
|
+
onError: options.onError ?? defaultOnError,
|
|
66
|
+
chunkSize: options.chunkSize
|
|
67
|
+
})));
|
|
68
|
+
});
|
|
69
|
+
var pipeThroughDuplex = /* @__PURE__ */ dual(2, (self, options) => Stream.pipeThroughChannelOrFail(self, fromDuplex(options)));
|
|
70
|
+
var pipeThroughSimple = /* @__PURE__ */ dual(2, (self, duplex) => pipeThroughDuplex(self, {
|
|
71
|
+
evaluate: duplex
|
|
72
|
+
}));
|
|
73
|
+
var toReadable = (stream) => Effect.map(Effect.context(), (context2) => new StreamAdapter(context2, stream));
|
|
74
|
+
var toReadableNever = (stream) => new StreamAdapter(Context.empty(), stream);
|
|
75
|
+
var toString = (readable, options) => {
|
|
76
|
+
const maxBytesNumber = toMaxBytes(options?.maxBytes);
|
|
77
|
+
const onError = options?.onError ?? defaultOnError;
|
|
78
|
+
const encoding = options?.encoding ?? "utf8";
|
|
79
|
+
return Effect.callback((resume) => {
|
|
80
|
+
const stream = readable();
|
|
81
|
+
stream.setEncoding(encoding);
|
|
82
|
+
stream.once("error", (err) => {
|
|
83
|
+
if ("closed" in stream && !stream.closed) {
|
|
84
|
+
stream.destroy();
|
|
85
|
+
}
|
|
86
|
+
resume(Effect.fail(onError(err)));
|
|
87
|
+
});
|
|
88
|
+
let string = "";
|
|
89
|
+
let bytes = 0;
|
|
90
|
+
stream.once("end", () => {
|
|
91
|
+
resume(Effect.succeed(string));
|
|
92
|
+
});
|
|
93
|
+
stream.on("data", (chunk) => {
|
|
94
|
+
string += chunk;
|
|
95
|
+
bytes += Buffer.byteLength(chunk);
|
|
96
|
+
if (maxBytesNumber !== void 0 && bytes > maxBytesNumber) {
|
|
97
|
+
if ("closed" in stream && !stream.closed) {
|
|
98
|
+
stream.destroy();
|
|
99
|
+
}
|
|
100
|
+
resume(Effect.fail(onError(new Error("maxBytes exceeded"))));
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
return Effect.sync(() => {
|
|
104
|
+
if ("closed" in stream && !stream.closed) {
|
|
105
|
+
stream.destroy();
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
var toArrayBuffer = (readable, options) => {
|
|
111
|
+
const maxBytesNumber = toMaxBytes(options?.maxBytes);
|
|
112
|
+
const onError = options?.onError ?? defaultOnError;
|
|
113
|
+
return Effect.callback((resume) => {
|
|
114
|
+
const stream = readable();
|
|
115
|
+
const buffers = [];
|
|
116
|
+
let bytes = 0;
|
|
117
|
+
stream.once("error", (err) => {
|
|
118
|
+
if ("closed" in stream && !stream.closed) {
|
|
119
|
+
stream.destroy();
|
|
120
|
+
}
|
|
121
|
+
resume(Effect.fail(onError(err)));
|
|
122
|
+
});
|
|
123
|
+
stream.once("end", () => {
|
|
124
|
+
const buffer = buffers.length === 1 ? buffers[0] : Buffer.concat(buffers);
|
|
125
|
+
if (buffer.byteOffset === 0 && buffer.buffer.byteLength === buffer.byteLength) {
|
|
126
|
+
return resume(Effect.succeed(buffer.buffer));
|
|
127
|
+
}
|
|
128
|
+
resume(Effect.succeed(buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength)));
|
|
129
|
+
});
|
|
130
|
+
stream.on("data", (chunk) => {
|
|
131
|
+
buffers.push(chunk);
|
|
132
|
+
bytes += chunk.length;
|
|
133
|
+
if (maxBytesNumber !== void 0 && bytes > maxBytesNumber) {
|
|
134
|
+
if ("closed" in stream && !stream.closed) {
|
|
135
|
+
stream.destroy();
|
|
136
|
+
}
|
|
137
|
+
resume(Effect.fail(onError(new Error("maxBytes exceeded"))));
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
return Effect.sync(() => {
|
|
141
|
+
if ("closed" in stream && !stream.closed) {
|
|
142
|
+
stream.destroy();
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
var toUint8Array = (readable, options) => Effect.map(toArrayBuffer(readable, options), (buffer) => new Uint8Array(buffer));
|
|
148
|
+
var readableToPullUnsafe = (options) => {
|
|
149
|
+
const readable = options.readable;
|
|
150
|
+
const closeOnDone = options.closeOnDone ?? true;
|
|
151
|
+
const exit = options.exit ?? MutableRef.make(void 0);
|
|
152
|
+
const latch = options.latch ?? Latch.makeUnsafe(false);
|
|
153
|
+
function onReadable() {
|
|
154
|
+
latch.openUnsafe();
|
|
155
|
+
}
|
|
156
|
+
function onError(error) {
|
|
157
|
+
exit.current = Exit.fail(options.onError(error));
|
|
158
|
+
latch.openUnsafe();
|
|
159
|
+
}
|
|
160
|
+
function onEnd() {
|
|
161
|
+
exit.current = Exit.fail(Cause.Done());
|
|
162
|
+
latch.openUnsafe();
|
|
163
|
+
}
|
|
164
|
+
readable.on("readable", onReadable);
|
|
165
|
+
readable.once("error", onError);
|
|
166
|
+
readable.once("end", onEnd);
|
|
167
|
+
const pull = Effect.suspend(function loop() {
|
|
168
|
+
let item = options.readable.read(options.chunkSize);
|
|
169
|
+
if (item === null) {
|
|
170
|
+
if (exit.current) {
|
|
171
|
+
return exit.current;
|
|
172
|
+
}
|
|
173
|
+
if (readable.readableEnded) {
|
|
174
|
+
return Effect.fail(Cause.Done());
|
|
175
|
+
}
|
|
176
|
+
latch.closeUnsafe();
|
|
177
|
+
return Effect.flatMap(latch.await, loop);
|
|
178
|
+
}
|
|
179
|
+
const chunk = Arr.of(item);
|
|
180
|
+
while (true) {
|
|
181
|
+
item = options.readable.read(options.chunkSize);
|
|
182
|
+
if (item === null) break;
|
|
183
|
+
chunk.push(item);
|
|
184
|
+
}
|
|
185
|
+
return Effect.succeed(chunk);
|
|
186
|
+
});
|
|
187
|
+
return Effect.as(Scope.addFinalizer(options.scope, Effect.sync(() => {
|
|
188
|
+
readable.off("readable", onReadable);
|
|
189
|
+
readable.off("error", onError);
|
|
190
|
+
readable.off("end", onEnd);
|
|
191
|
+
if (closeOnDone && "closed" in options.readable && !options.readable.closed) {
|
|
192
|
+
options.readable.destroy();
|
|
193
|
+
}
|
|
194
|
+
})), pull);
|
|
195
|
+
};
|
|
196
|
+
var StreamAdapter = class extends Readable {
|
|
197
|
+
readLatch;
|
|
198
|
+
fiber = void 0;
|
|
199
|
+
constructor(context2, stream) {
|
|
200
|
+
super({});
|
|
201
|
+
this.readLatch = Latch.makeUnsafe(false);
|
|
202
|
+
this.fiber = Stream.runForEachArray(stream, (chunk) => this.readLatch.whenOpen(Effect.sync(() => {
|
|
203
|
+
this.readLatch.closeUnsafe();
|
|
204
|
+
for (let i = 0; i < chunk.length; i++) {
|
|
205
|
+
const item = chunk[i];
|
|
206
|
+
if (typeof item === "string") {
|
|
207
|
+
this.push(item, "utf8");
|
|
208
|
+
} else {
|
|
209
|
+
this.push(item);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}))).pipe(this.readLatch.whenOpen, Effect.provideContext(context2), Effect.runFork);
|
|
213
|
+
this.fiber.addObserver((exit) => {
|
|
214
|
+
this.fiber = void 0;
|
|
215
|
+
if (Exit.isSuccess(exit)) {
|
|
216
|
+
this.push(null);
|
|
217
|
+
} else {
|
|
218
|
+
this.destroy(Cause.squash(exit.cause));
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
_read(_size) {
|
|
223
|
+
this.readLatch.openUnsafe();
|
|
224
|
+
}
|
|
225
|
+
_destroy(error, callback2) {
|
|
226
|
+
if (!this.fiber) {
|
|
227
|
+
return callback2(error);
|
|
228
|
+
}
|
|
229
|
+
Effect.runFork(Fiber.interrupt(this.fiber)).addObserver((exit) => {
|
|
230
|
+
callback2(exit._tag === "Failure" ? Cause.squash(exit.cause) : error);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
var defaultOnError = (error) => new Cause.UnknownError(error);
|
|
235
|
+
var toMaxBytes = (maxBytes) => maxBytes === void 0 || maxBytes === Infinity ? void 0 : Number(ByteSize.fromInputUnsafe(maxBytes));
|
|
236
|
+
|
|
237
|
+
export {
|
|
238
|
+
fromReadable,
|
|
239
|
+
fromReadableChannel,
|
|
240
|
+
fromDuplex,
|
|
241
|
+
pipeThroughDuplex,
|
|
242
|
+
pipeThroughSimple,
|
|
243
|
+
toReadable,
|
|
244
|
+
toReadableNever,
|
|
245
|
+
toString,
|
|
246
|
+
toArrayBuffer,
|
|
247
|
+
toUint8Array,
|
|
248
|
+
NodeStream_exports
|
|
249
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/internal/nodeChildProcessSpawner.js
|
|
2
|
+
var buildSpawnOptions = (options, base, platform) => {
|
|
3
|
+
const detached = options.detached ?? platform !== "win32";
|
|
4
|
+
return {
|
|
5
|
+
...base,
|
|
6
|
+
detached,
|
|
7
|
+
shell: options.shell,
|
|
8
|
+
windowsHide: options.windowsHide ?? !detached
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
buildSpawnOptions
|
|
14
|
+
};
|