@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,374 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-MLKGABMK.js";
|
|
4
|
+
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-bun@4.0.5_effect@4.0.5/node_modules/@effect/platform-bun/dist/BunDatagramSocket.js
|
|
6
|
+
var BunDatagramSocket_exports = {};
|
|
7
|
+
__export(BunDatagramSocket_exports, {
|
|
8
|
+
fromUdpSocket: () => fromUdpSocket,
|
|
9
|
+
layer: () => layer,
|
|
10
|
+
make: () => make
|
|
11
|
+
});
|
|
12
|
+
import * as Effect from "effect/Effect";
|
|
13
|
+
import * as Layer from "effect/Layer";
|
|
14
|
+
import * as NetAddress from "effect/net/NetAddress";
|
|
15
|
+
import * as Predicate from "effect/Predicate";
|
|
16
|
+
import * as DatagramSocket from "effect/socket/DatagramSocket";
|
|
17
|
+
import * as Dns from "node:dns";
|
|
18
|
+
import * as Net from "node:net";
|
|
19
|
+
import * as Os from "node:os";
|
|
20
|
+
var make = (options = {}) => DatagramSocket.makeFromBackingSocket((events) => open(options, events), options);
|
|
21
|
+
var fromUdpSocket = (acquire, options = {}) => DatagramSocket.makeFromBackingSocket((events) => Effect.flatMap(acquire, (socket) => adopt(socket, options, events)), options);
|
|
22
|
+
var layer = (options = {}) => Layer.effect(DatagramSocket.DatagramSocket, make(options));
|
|
23
|
+
var noScopeIds = /* @__PURE__ */ new Map();
|
|
24
|
+
var scopeIdsFor = (family) => {
|
|
25
|
+
if (family === "ipv4" || process.platform === "win32") return noScopeIds;
|
|
26
|
+
try {
|
|
27
|
+
return NetAddress.scopeIdsFromInterfaces(Object.entries(Os.networkInterfaces()));
|
|
28
|
+
} catch {
|
|
29
|
+
return noScopeIds;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var familyOf = (address) => {
|
|
33
|
+
if (typeof address !== "string") return NetAddress.isIpv4Address(address) ? "ipv4" : "ipv6";
|
|
34
|
+
const version = Net.isIP(address);
|
|
35
|
+
return version === 4 ? "ipv4" : version === 6 ? "ipv6" : void 0;
|
|
36
|
+
};
|
|
37
|
+
var formatHost = (endpoint, scopeIds) => NetAddress.isInetAddress(endpoint) ? NetAddress.formatNativeHost(endpoint, scopeIds) : endpoint.address === void 0 || typeof endpoint.address === "string" ? endpoint.address : NetAddress.formatIp(endpoint.address);
|
|
38
|
+
var resolve = (address, family) => {
|
|
39
|
+
if (typeof address !== "string") return Effect.undefined;
|
|
40
|
+
const literal = familyOf(address);
|
|
41
|
+
if (literal !== void 0) return Effect.succeed({
|
|
42
|
+
host: address,
|
|
43
|
+
family: literal
|
|
44
|
+
});
|
|
45
|
+
return Effect.callback((resume) => {
|
|
46
|
+
const fail2 = (error) => resume(Effect.fail(openError(error, "AddressNotAvailable")));
|
|
47
|
+
try {
|
|
48
|
+
Dns.lookup(address, {
|
|
49
|
+
all: true,
|
|
50
|
+
family: family === "ipv4" ? 4 : family === "ipv6" ? 6 : 0
|
|
51
|
+
}, (error, results) => {
|
|
52
|
+
if (error) return fail2(error);
|
|
53
|
+
const result = results.find((result2) => result2.family === 4) ?? results[0];
|
|
54
|
+
if (result === void 0) return fail2(new Error(`${address} has no addresses`));
|
|
55
|
+
resume(Effect.succeed({
|
|
56
|
+
host: result.address,
|
|
57
|
+
family: result.family === 6 ? "ipv6" : "ipv4"
|
|
58
|
+
}));
|
|
59
|
+
});
|
|
60
|
+
} catch (error) {
|
|
61
|
+
fail2(error);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
var resolveOpen = /* @__PURE__ */ Effect.fnUntraced(function* (options) {
|
|
66
|
+
const bind = options.bind;
|
|
67
|
+
const remote = options.connect ?? options.peer;
|
|
68
|
+
const fixed = options.family ?? (bind?.address === void 0 ? void 0 : familyOf(bind.address));
|
|
69
|
+
const resolvedRemote = yield* resolve(remote?.address, fixed);
|
|
70
|
+
const remoteFamily = resolvedRemote?.family ?? (remote === void 0 ? void 0 : familyOf(remote.address));
|
|
71
|
+
const resolvedBind = yield* resolve(bind?.address, fixed ?? remoteFamily);
|
|
72
|
+
const family = fixed ?? remoteFamily ?? resolvedBind?.family ?? "ipv4";
|
|
73
|
+
const scopeIds = scopeIdsFor(family);
|
|
74
|
+
return {
|
|
75
|
+
scopeIds,
|
|
76
|
+
host: resolvedBind?.host ?? (bind === void 0 ? void 0 : formatHost(bind, scopeIds)) ?? (family === "ipv6" ? "::" : "0.0.0.0"),
|
|
77
|
+
remote: remote === void 0 ? void 0 : {
|
|
78
|
+
host: resolvedRemote?.host ?? formatHost(remote, scopeIds),
|
|
79
|
+
port: remote.port
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
var errorCode = (error) => Predicate.hasProperty(error, "code") ? error.code : void 0;
|
|
84
|
+
var openError = (error, kind) => {
|
|
85
|
+
if (kind === void 0) {
|
|
86
|
+
const code = errorCode(error);
|
|
87
|
+
kind = code === "EADDRINUSE" ? "AddressInUse" : code === "EADDRNOTAVAIL" ? "AddressNotAvailable" : code === "EACCES" || code === "EPERM" ? "PermissionDenied" : "Unknown";
|
|
88
|
+
}
|
|
89
|
+
return new DatagramSocket.DatagramSocketError({
|
|
90
|
+
reason: new DatagramSocket.DatagramSocketOpenError({
|
|
91
|
+
kind,
|
|
92
|
+
cause: error
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
var ioKind = (error) => {
|
|
97
|
+
switch (errorCode(error)) {
|
|
98
|
+
case "EMSGSIZE":
|
|
99
|
+
return "MessageTooLarge";
|
|
100
|
+
case "EHOSTUNREACH":
|
|
101
|
+
case "ENETUNREACH":
|
|
102
|
+
case "EHOSTDOWN":
|
|
103
|
+
case "ENETDOWN":
|
|
104
|
+
return "Unreachable";
|
|
105
|
+
case "ECONNREFUSED":
|
|
106
|
+
return "ConnectionRefused";
|
|
107
|
+
case "EACCES":
|
|
108
|
+
case "EPERM":
|
|
109
|
+
return "PermissionDenied";
|
|
110
|
+
default:
|
|
111
|
+
return "Unknown";
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
var closedError = () => new DatagramSocket.DatagramSocketError({
|
|
115
|
+
reason: new DatagramSocket.DatagramSocketClosedError()
|
|
116
|
+
});
|
|
117
|
+
var writeError = (error) => new DatagramSocket.DatagramSocketError({
|
|
118
|
+
reason: new DatagramSocket.DatagramSocketWriteError({
|
|
119
|
+
kind: ioKind(error),
|
|
120
|
+
cause: error
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
var readError = (error) => new DatagramSocket.DatagramSocketError({
|
|
124
|
+
reason: new DatagramSocket.DatagramSocketReadError({
|
|
125
|
+
kind: ioKind(error),
|
|
126
|
+
cause: error
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
var isClosedError = (error) => Predicate.hasProperty(error, "message") && error.message === "Socket is closed";
|
|
130
|
+
var LIBUS_SOCKET_REUSE_PORT = 4;
|
|
131
|
+
var LIBUS_SOCKET_IPV6_ONLY = 8;
|
|
132
|
+
var LIBUS_SOCKET_REUSE_ADDR = 16;
|
|
133
|
+
var open = /* @__PURE__ */ Effect.fnUntraced(function* (options, events) {
|
|
134
|
+
const {
|
|
135
|
+
host,
|
|
136
|
+
remote,
|
|
137
|
+
scopeIds
|
|
138
|
+
} = yield* resolveOpen(options);
|
|
139
|
+
const backing = new BunBackingSocket(events);
|
|
140
|
+
const flags = (options.reusePort ? LIBUS_SOCKET_REUSE_PORT : 0) | (options.ipv6Only ? LIBUS_SOCKET_IPV6_ONLY : 0) | (options.reuseAddress ? LIBUS_SOCKET_REUSE_ADDR : 0);
|
|
141
|
+
const connect = options.connect === void 0 ? void 0 : {
|
|
142
|
+
hostname: remote.host,
|
|
143
|
+
port: remote.port
|
|
144
|
+
};
|
|
145
|
+
const socket = yield* Effect.tryPromise({
|
|
146
|
+
try: () => Bun.udpSocket({
|
|
147
|
+
hostname: host,
|
|
148
|
+
port: options.bind?.port ?? 0,
|
|
149
|
+
socket: backing.handlers,
|
|
150
|
+
...flags === 0 ? void 0 : {
|
|
151
|
+
flags
|
|
152
|
+
},
|
|
153
|
+
...connect === void 0 ? void 0 : {
|
|
154
|
+
connect
|
|
155
|
+
}
|
|
156
|
+
}),
|
|
157
|
+
catch: (error) => openError(error)
|
|
158
|
+
});
|
|
159
|
+
backing.socket = socket;
|
|
160
|
+
yield* Effect.try({
|
|
161
|
+
try: () => {
|
|
162
|
+
backing.attach(socket, scopeIds, remote, connect !== void 0);
|
|
163
|
+
if (options.broadcast !== void 0) socket.setBroadcast(options.broadcast);
|
|
164
|
+
if (options.ttl !== void 0) socket.setTTL(options.ttl);
|
|
165
|
+
const multicast = options.multicast;
|
|
166
|
+
if (multicast?.ttl !== void 0) socket.setMulticastTTL(multicast.ttl);
|
|
167
|
+
if (multicast?.loopback !== void 0) socket.setMulticastLoopback(multicast.loopback);
|
|
168
|
+
if (multicast?.interface !== void 0) {
|
|
169
|
+
socket.setMulticastInterface(NetAddress.formatMulticastInterface(multicast.interface, scopeIds));
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
catch: (error) => openError(error)
|
|
173
|
+
}).pipe(Effect.onError(() => Effect.sync(() => backing.close())));
|
|
174
|
+
return backing;
|
|
175
|
+
});
|
|
176
|
+
var adopt = (socket, options, events) => {
|
|
177
|
+
const backing = new BunBackingSocket(events);
|
|
178
|
+
backing.socket = socket;
|
|
179
|
+
return Effect.gen(function* () {
|
|
180
|
+
if (socket.closed) return yield* Effect.fail(openError(new Error("The adopted Bun UDP socket is closed")));
|
|
181
|
+
const family = yield* Effect.try({
|
|
182
|
+
try: () => {
|
|
183
|
+
socket.reload({
|
|
184
|
+
socket: backing.handlers
|
|
185
|
+
});
|
|
186
|
+
return socket.address.family === "IPv6" ? "ipv6" : "ipv4";
|
|
187
|
+
},
|
|
188
|
+
catch: (error) => openError(error)
|
|
189
|
+
});
|
|
190
|
+
const scopeIds = scopeIdsFor(family);
|
|
191
|
+
const remote = "remoteAddress" in socket ? socket.remoteAddress : void 0;
|
|
192
|
+
if (remote !== void 0) {
|
|
193
|
+
return backing.attach(socket, scopeIds, {
|
|
194
|
+
host: remote.address,
|
|
195
|
+
port: remote.port
|
|
196
|
+
}, true);
|
|
197
|
+
}
|
|
198
|
+
const peer = options.peer;
|
|
199
|
+
const resolved = yield* resolve(peer?.address, family);
|
|
200
|
+
return backing.attach(socket, scopeIds, peer === void 0 ? void 0 : {
|
|
201
|
+
host: resolved?.host ?? formatHost(peer, scopeIds),
|
|
202
|
+
port: peer.port
|
|
203
|
+
}, false);
|
|
204
|
+
}).pipe(Effect.onError(() => Effect.sync(() => backing.close())));
|
|
205
|
+
};
|
|
206
|
+
var BunBackingSocket = class {
|
|
207
|
+
events;
|
|
208
|
+
// installed when the socket is created, so packets can arrive before `attach`
|
|
209
|
+
handlers;
|
|
210
|
+
socket = void 0;
|
|
211
|
+
address = {
|
|
212
|
+
host: "",
|
|
213
|
+
port: 0
|
|
214
|
+
};
|
|
215
|
+
scopeIds = noScopeIds;
|
|
216
|
+
peer = void 0;
|
|
217
|
+
connected = false;
|
|
218
|
+
// entries per datagram in `sendMany`'s flat list
|
|
219
|
+
stride = 3;
|
|
220
|
+
// waiting sends, oldest first; later sends queue behind them to keep order
|
|
221
|
+
waiting = [];
|
|
222
|
+
closing = false;
|
|
223
|
+
constructor(events) {
|
|
224
|
+
this.events = events;
|
|
225
|
+
this.handlers = {
|
|
226
|
+
data: (_socket, payload, port, host) => events.onPacket(payload, host, port),
|
|
227
|
+
// also fires once right after creation, when nothing is waiting
|
|
228
|
+
drain: () => this.flush(),
|
|
229
|
+
// Bun crashes the process without an `error` handler. It passes the
|
|
230
|
+
// error alone, despite the declared `(socket, error)`.
|
|
231
|
+
error: (first, second) => this.onNativeError(second === void 0 ? first : second)
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
attach(socket, scopeIds, peer, connected) {
|
|
235
|
+
this.socket = socket;
|
|
236
|
+
this.address = {
|
|
237
|
+
host: socket.address.address,
|
|
238
|
+
port: socket.address.port
|
|
239
|
+
};
|
|
240
|
+
this.scopeIds = scopeIds;
|
|
241
|
+
this.peer = peer;
|
|
242
|
+
this.connected = connected;
|
|
243
|
+
this.stride = connected ? 1 : 3;
|
|
244
|
+
return this;
|
|
245
|
+
}
|
|
246
|
+
send(payload, destination, done) {
|
|
247
|
+
const entries = destination === void 0 ? [payload] : [payload, destination.port, destination.host];
|
|
248
|
+
if (this.waiting.length !== 0) return this.wait(entries, done);
|
|
249
|
+
let sent;
|
|
250
|
+
try {
|
|
251
|
+
sent = destination === void 0 ? this.socket.send(payload) : this.socket.send(payload, destination.port, destination.host);
|
|
252
|
+
} catch (error) {
|
|
253
|
+
return done(this.sendError(error));
|
|
254
|
+
}
|
|
255
|
+
if (sent) return done();
|
|
256
|
+
this.wait(entries, done);
|
|
257
|
+
}
|
|
258
|
+
sendMany(payloads, destinations, done) {
|
|
259
|
+
let entries = payloads;
|
|
260
|
+
if (!this.connected) {
|
|
261
|
+
const flat = new Array(payloads.length * 3);
|
|
262
|
+
for (let i = 0; i < payloads.length; i++) {
|
|
263
|
+
flat[i * 3] = payloads[i];
|
|
264
|
+
flat[i * 3 + 1] = destinations[i].port;
|
|
265
|
+
flat[i * 3 + 2] = destinations[i].host;
|
|
266
|
+
}
|
|
267
|
+
entries = flat;
|
|
268
|
+
}
|
|
269
|
+
if (this.waiting.length !== 0) return this.wait(entries, done);
|
|
270
|
+
let sent;
|
|
271
|
+
try {
|
|
272
|
+
sent = this.socket.sendMany(entries);
|
|
273
|
+
} catch (error) {
|
|
274
|
+
return done(this.sendError(error));
|
|
275
|
+
}
|
|
276
|
+
if (sent === payloads.length) return done();
|
|
277
|
+
this.wait(entries.slice(sent * this.stride), done);
|
|
278
|
+
}
|
|
279
|
+
joinMulticast({
|
|
280
|
+
group,
|
|
281
|
+
interface: ingress,
|
|
282
|
+
source
|
|
283
|
+
}) {
|
|
284
|
+
return Effect.try({
|
|
285
|
+
try: () => {
|
|
286
|
+
const socket = this.socket;
|
|
287
|
+
const groupHost = NetAddress.formatIp(group);
|
|
288
|
+
const interfaceHost = ingress === void 0 ? void 0 : NetAddress.formatMulticastInterface(ingress, this.scopeIds);
|
|
289
|
+
if (source === void 0) {
|
|
290
|
+
if (!socket.addMembership(groupHost, interfaceHost)) throw new Error(`Could not join ${groupHost}`);
|
|
291
|
+
return () => Effect.sync(() => socket.dropMembership(groupHost, interfaceHost));
|
|
292
|
+
}
|
|
293
|
+
const sourceHost = NetAddress.formatIp(source);
|
|
294
|
+
if (!socket.addSourceSpecificMembership(sourceHost, groupHost, interfaceHost)) {
|
|
295
|
+
throw new Error(`Could not join ${groupHost} from ${sourceHost}`);
|
|
296
|
+
}
|
|
297
|
+
return () => Effect.sync(() => socket.dropSourceSpecificMembership(sourceHost, groupHost, interfaceHost));
|
|
298
|
+
},
|
|
299
|
+
catch: (error) => openError(error)
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
close() {
|
|
303
|
+
if (this.closing) return;
|
|
304
|
+
this.closing = true;
|
|
305
|
+
this.failWaiting();
|
|
306
|
+
try {
|
|
307
|
+
this.socket?.close();
|
|
308
|
+
} catch {
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
wait(entries, done) {
|
|
312
|
+
if (this.socket?.closed) {
|
|
313
|
+
this.closedUnderneath();
|
|
314
|
+
return done(closedError());
|
|
315
|
+
}
|
|
316
|
+
this.waiting.push({
|
|
317
|
+
entries,
|
|
318
|
+
done
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
// on `drain`, send what the kernel refused, in order, until it refuses again
|
|
322
|
+
flush() {
|
|
323
|
+
const socket = this.socket;
|
|
324
|
+
if (socket === void 0) return;
|
|
325
|
+
while (!this.closing && this.waiting.length !== 0) {
|
|
326
|
+
const next = this.waiting[0];
|
|
327
|
+
let sent;
|
|
328
|
+
try {
|
|
329
|
+
sent = socket.sendMany(next.entries);
|
|
330
|
+
} catch (error) {
|
|
331
|
+
this.waiting.shift();
|
|
332
|
+
next.done(this.sendError(error));
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
const rest = sent * this.stride;
|
|
336
|
+
if (rest < next.entries.length) {
|
|
337
|
+
next.entries = next.entries.slice(rest);
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
this.waiting.shift();
|
|
341
|
+
next.done();
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
sendError(error) {
|
|
345
|
+
if (this.socket?.closed || isClosedError(error)) {
|
|
346
|
+
this.closedUnderneath();
|
|
347
|
+
return closedError();
|
|
348
|
+
}
|
|
349
|
+
return writeError(error);
|
|
350
|
+
}
|
|
351
|
+
onNativeError(error) {
|
|
352
|
+
if (this.closing) return;
|
|
353
|
+
if (this.socket?.closed) return this.closedUnderneath();
|
|
354
|
+
this.events.onError(readError(error));
|
|
355
|
+
}
|
|
356
|
+
closedUnderneath() {
|
|
357
|
+
if (this.closing) return;
|
|
358
|
+
this.closing = true;
|
|
359
|
+
this.failWaiting();
|
|
360
|
+
this.events.onClose();
|
|
361
|
+
}
|
|
362
|
+
failWaiting() {
|
|
363
|
+
const waiting = this.waiting;
|
|
364
|
+
this.waiting = [];
|
|
365
|
+
for (let i = 0; i < waiting.length; i++) waiting[i].done(closedError());
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
export {
|
|
370
|
+
make,
|
|
371
|
+
fromUdpSocket,
|
|
372
|
+
layer,
|
|
373
|
+
BunDatagramSocket_exports
|
|
374
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layer as layer5
|
|
3
|
+
} from "./chunk-D6XNHJPW.js";
|
|
4
|
+
import {
|
|
5
|
+
layer as layer6
|
|
6
|
+
} from "./chunk-HXGVOKHF.js";
|
|
7
|
+
import {
|
|
8
|
+
layer as layer4
|
|
9
|
+
} from "./chunk-7ZKNPDTP.js";
|
|
10
|
+
import {
|
|
11
|
+
layer
|
|
12
|
+
} from "./chunk-IXI7RW3A.js";
|
|
13
|
+
import {
|
|
14
|
+
layer as layer2
|
|
15
|
+
} from "./chunk-2ADOI6ZN.js";
|
|
16
|
+
import {
|
|
17
|
+
layer as layer3
|
|
18
|
+
} from "./chunk-QR2ZOVOL.js";
|
|
19
|
+
import {
|
|
20
|
+
__export
|
|
21
|
+
} from "./chunk-MLKGABMK.js";
|
|
22
|
+
|
|
23
|
+
// ../../../../node_modules/.pnpm/@effect+platform-bun@4.0.5_effect@4.0.5/node_modules/@effect/platform-bun/dist/BunServices.js
|
|
24
|
+
var BunServices_exports = {};
|
|
25
|
+
__export(BunServices_exports, {
|
|
26
|
+
layer: () => layer7
|
|
27
|
+
});
|
|
28
|
+
import * as Layer from "effect/Layer";
|
|
29
|
+
var layer7 = /* @__PURE__ */ layer.pipe(/* @__PURE__ */ Layer.provideMerge(/* @__PURE__ */ Layer.mergeAll(layer3, layer2, layer4, layer5, layer6)));
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
layer7 as layer,
|
|
33
|
+
BunServices_exports
|
|
34
|
+
};
|