@smthrs/platform-bun 0.0.0-stage → 1.0.0-rc.12
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-2ZAGBWTH.js +40 -0
- package/dist/vendor/chunk-3SL3HKQA.js +118 -0
- package/dist/vendor/chunk-3WUGYBFU.js +0 -0
- package/dist/vendor/chunk-4WIQ2XN7.js +28 -0
- package/dist/vendor/chunk-5ET7NHI7.js +15 -0
- package/dist/vendor/chunk-6FSJ2PMW.js +53 -0
- package/dist/vendor/chunk-6L2NJEOV.js +62 -0
- package/dist/vendor/chunk-72X6VEVD.js +62 -0
- package/dist/vendor/chunk-7NMJM44J.js +26 -0
- package/dist/vendor/chunk-A7AY2JP7.js +71 -0
- package/dist/vendor/chunk-A7UXCEJA.js +81 -0
- package/dist/vendor/chunk-ADP5LRUF.js +274 -0
- package/dist/vendor/chunk-ASGOJ3XA.js +0 -0
- package/dist/vendor/chunk-AWNTTSHL.js +34 -0
- package/dist/vendor/chunk-BUKVIAEM.js +20 -0
- package/dist/vendor/chunk-BY3SDXID.js +501 -0
- package/dist/vendor/chunk-C3PGUWW5.js +414 -0
- package/dist/vendor/chunk-CL4EIDIY.js +7 -0
- package/dist/vendor/chunk-D2ZL4PLZ.js +93 -0
- package/dist/vendor/chunk-D4HEMNGU.js +22 -0
- package/dist/vendor/chunk-F4V5TRY7.js +85 -0
- package/dist/vendor/chunk-F772LLZ5.js +31 -0
- package/dist/vendor/chunk-FFD6R5JZ.js +104 -0
- package/dist/vendor/chunk-G4HOH7GK.js +65 -0
- package/dist/vendor/chunk-GJN7MEBF.js +18 -0
- package/dist/vendor/chunk-HDV6VIRM.js +48 -0
- package/dist/vendor/chunk-IHV7Z4SW.js +34 -0
- package/dist/vendor/chunk-IWSDM4CG.js +16 -0
- package/dist/vendor/chunk-JOQDB2HC.js +26 -0
- package/dist/vendor/chunk-KABHKTVG.js +18 -0
- package/dist/vendor/chunk-KFDBU6RR.js +60 -0
- package/dist/vendor/chunk-KHPN5DWT.js +20 -0
- package/dist/vendor/chunk-LNWGIDIG.js +20 -0
- package/dist/vendor/chunk-MLKGABMK.js +9 -0
- package/dist/vendor/chunk-MUEED3C3.js +144 -0
- package/dist/vendor/chunk-N6TK35N5.js +18 -0
- package/dist/vendor/chunk-NQO6V4KI.js +580 -0
- package/dist/vendor/chunk-NUJQMLJP.js +325 -0
- package/dist/vendor/chunk-OF3N2FN4.js +61 -0
- package/dist/vendor/chunk-OGZJACUS.js +57 -0
- package/dist/vendor/chunk-PCEVZYXO.js +63 -0
- package/dist/vendor/chunk-PECOFLCU.js +85 -0
- package/dist/vendor/chunk-PU7QVYND.js +18 -0
- package/dist/vendor/chunk-QGPZPULA.js +51 -0
- package/dist/vendor/chunk-QHR2RC5M.js +109 -0
- package/dist/vendor/chunk-R2YON4A6.js +28 -0
- package/dist/vendor/chunk-R327POEZ.js +18 -0
- package/dist/vendor/chunk-REFJNBQR.js +18 -0
- package/dist/vendor/chunk-RHJ6LV32.js +43 -0
- package/dist/vendor/chunk-RKVXYKHJ.js +29 -0
- package/dist/vendor/chunk-RP3EWS4C.js +0 -0
- package/dist/vendor/chunk-RQH5DSBA.js +249 -0
- package/dist/vendor/chunk-RQQ5TSCD.js +374 -0
- package/dist/vendor/chunk-S6QUQLBV.js +229 -0
- package/dist/vendor/chunk-SCXQLSNW.js +34 -0
- package/dist/vendor/chunk-SD4X5NGU.js +515 -0
- package/dist/vendor/chunk-T332WJRS.js +128 -0
- package/dist/vendor/chunk-T5FQGISI.js +18 -0
- package/dist/vendor/chunk-TBPDCAMH.js +70 -0
- package/dist/vendor/chunk-UFWLKG4I.js +16 -0
- package/dist/vendor/chunk-UPIQ52FQ.js +426 -0
- package/dist/vendor/chunk-UUQXJRMK.js +14 -0
- package/dist/vendor/chunk-UUYTTEDH.js +36 -0
- package/dist/vendor/chunk-V2EB7FHY.js +129 -0
- package/dist/vendor/chunk-VIWU4EBF.js +18 -0
- package/dist/vendor/chunk-WPZDL2D7.js +21 -0
- package/dist/vendor/chunk-X4YPHWAE.js +22 -0
- package/dist/vendor/chunk-XACFQJY7.js +93 -0
- package/dist/vendor/chunk-Y7V6ISZS.js +418 -0
- package/dist/vendor/chunk-YDY5P7GL.js +20 -0
- package/dist/vendor/chunk-ZNKZXDUD.js +18 -0
- package/dist/vendor/chunk-ZS3VW5QR.js +63 -0
- package/dist/vendor/chunk-ZUUCLHBP.js +18 -0
- package/dist/vendor/chunk-ZVJCBTJG.js +131 -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 +198 -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 +198 -0
- package/dist/vendor/node/NodeHttpClient.js +46 -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,325 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-MLKGABMK.js";
|
|
4
|
+
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.4_effect@4.0.4/node_modules/@effect/platform-node-shared/dist/NodeDatagramSocket.js
|
|
6
|
+
var NodeDatagramSocket_exports = {};
|
|
7
|
+
__export(NodeDatagramSocket_exports, {
|
|
8
|
+
fromSocket: () => fromSocket,
|
|
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 DatagramSocket from "effect/socket/DatagramSocket";
|
|
16
|
+
import * as Dgram from "node:dgram";
|
|
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 fromSocket = (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 interfaceScopeIds = () => {
|
|
25
|
+
if (process.platform === "win32") return noScopeIds;
|
|
26
|
+
try {
|
|
27
|
+
return NetAddress.scopeIdsFromInterfaces(Object.entries(Os.networkInterfaces()));
|
|
28
|
+
} catch {
|
|
29
|
+
return noScopeIds;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var scopeIdsFor = (family) => family === "ipv6" ? interfaceScopeIds() : noScopeIds;
|
|
33
|
+
var familyOfLiteral = (address) => {
|
|
34
|
+
if (typeof address !== "string") return NetAddress.isIpv4Address(address) ? "ipv4" : "ipv6";
|
|
35
|
+
const version = Net.isIP(address);
|
|
36
|
+
return version === 4 ? "ipv4" : version === 6 ? "ipv6" : void 0;
|
|
37
|
+
};
|
|
38
|
+
var formatEndpoint = (endpoint, scopeIds) => NetAddress.isInetAddress(endpoint) ? NetAddress.formatNativeHost(endpoint, scopeIds) : endpoint.address === void 0 || typeof endpoint.address === "string" ? endpoint.address : NetAddress.formatIp(endpoint.address);
|
|
39
|
+
var resolve = (address, family, onError, next) => {
|
|
40
|
+
if (typeof address !== "string") return next(void 0);
|
|
41
|
+
const literal = familyOfLiteral(address);
|
|
42
|
+
if (literal !== void 0) return next({
|
|
43
|
+
host: address,
|
|
44
|
+
family: literal
|
|
45
|
+
});
|
|
46
|
+
try {
|
|
47
|
+
Dns.lookup(address, {
|
|
48
|
+
all: true,
|
|
49
|
+
family: family === "ipv4" ? 4 : family === "ipv6" ? 6 : 0
|
|
50
|
+
}, (error, results) => {
|
|
51
|
+
if (error) return onError(error);
|
|
52
|
+
const result = results.find((result2) => result2.family === 4) ?? results[0];
|
|
53
|
+
if (result === void 0) return onError(new Error(`${address} has no addresses`));
|
|
54
|
+
next({
|
|
55
|
+
host: result.address,
|
|
56
|
+
family: result.family === 6 ? "ipv6" : "ipv4"
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
} catch (error) {
|
|
60
|
+
onError(error);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var planOpen = (options, scopeIdsOf, onLookupError, next) => {
|
|
64
|
+
const {
|
|
65
|
+
bind: bind2,
|
|
66
|
+
remote
|
|
67
|
+
} = options;
|
|
68
|
+
const fixed = options.family ?? (bind2?.address === void 0 ? void 0 : familyOfLiteral(bind2.address));
|
|
69
|
+
resolve(remote?.address, fixed, onLookupError, (resolvedRemote) => {
|
|
70
|
+
const remoteFamily = resolvedRemote?.family ?? (remote === void 0 ? void 0 : familyOfLiteral(remote.address));
|
|
71
|
+
resolve(bind2?.address, fixed ?? remoteFamily, onLookupError, (resolvedBind) => {
|
|
72
|
+
const family = fixed ?? remoteFamily ?? resolvedBind?.family ?? "ipv4";
|
|
73
|
+
const scopeIds = scopeIdsOf(family);
|
|
74
|
+
next({
|
|
75
|
+
family,
|
|
76
|
+
scopeIds,
|
|
77
|
+
bindHost: resolvedBind?.host ?? (bind2 === void 0 ? void 0 : formatEndpoint(bind2, scopeIds)) ?? (family === "ipv6" ? "::" : "0.0.0.0"),
|
|
78
|
+
remote: remote === void 0 ? void 0 : {
|
|
79
|
+
host: resolvedRemote?.host ?? formatEndpoint(remote, scopeIds),
|
|
80
|
+
port: remote.port
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
var resolvePeer = (peer, family, scopeIds, onLookupError, next) => {
|
|
87
|
+
if (peer === void 0) return next(void 0);
|
|
88
|
+
if (typeof peer.address !== "string") return next({
|
|
89
|
+
host: formatEndpoint(peer, scopeIds),
|
|
90
|
+
port: peer.port
|
|
91
|
+
});
|
|
92
|
+
resolve(peer.address, family, onLookupError, (resolved) => next({
|
|
93
|
+
host: resolved.host,
|
|
94
|
+
port: peer.port
|
|
95
|
+
}));
|
|
96
|
+
};
|
|
97
|
+
var errorCode = (error) => typeof error === "object" && error !== null ? error.code : void 0;
|
|
98
|
+
var openError = (error, kind) => {
|
|
99
|
+
if (kind === void 0) {
|
|
100
|
+
const code = errorCode(error);
|
|
101
|
+
kind = code === "EADDRINUSE" ? "AddressInUse" : code === "EADDRNOTAVAIL" ? "AddressNotAvailable" : code === "EACCES" || code === "EPERM" ? "PermissionDenied" : "Unknown";
|
|
102
|
+
}
|
|
103
|
+
return new DatagramSocket.DatagramSocketError({
|
|
104
|
+
reason: new DatagramSocket.DatagramSocketOpenError({
|
|
105
|
+
kind,
|
|
106
|
+
cause: error
|
|
107
|
+
})
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
var ioKind = (error) => {
|
|
111
|
+
switch (errorCode(error)) {
|
|
112
|
+
case "EMSGSIZE":
|
|
113
|
+
return "MessageTooLarge";
|
|
114
|
+
case "EHOSTUNREACH":
|
|
115
|
+
case "ENETUNREACH":
|
|
116
|
+
case "EHOSTDOWN":
|
|
117
|
+
case "ENETDOWN":
|
|
118
|
+
return "Unreachable";
|
|
119
|
+
case "ECONNREFUSED":
|
|
120
|
+
return "ConnectionRefused";
|
|
121
|
+
case "EACCES":
|
|
122
|
+
case "EPERM":
|
|
123
|
+
return "PermissionDenied";
|
|
124
|
+
default:
|
|
125
|
+
return "Unknown";
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
var closedError = () => new DatagramSocket.DatagramSocketError({
|
|
129
|
+
reason: new DatagramSocket.DatagramSocketClosedError()
|
|
130
|
+
});
|
|
131
|
+
var ioWriteError = (error, kind = ioKind(error)) => new DatagramSocket.DatagramSocketError({
|
|
132
|
+
reason: new DatagramSocket.DatagramSocketWriteError({
|
|
133
|
+
kind,
|
|
134
|
+
cause: error
|
|
135
|
+
})
|
|
136
|
+
});
|
|
137
|
+
var readError = (error, kind = ioKind(error)) => new DatagramSocket.DatagramSocketError({
|
|
138
|
+
reason: new DatagramSocket.DatagramSocketReadError({
|
|
139
|
+
kind,
|
|
140
|
+
cause: error
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
var immediateLookup = (hostname, family, callback2) => callback2(null, hostname, family === 6 ? 6 : 4);
|
|
144
|
+
var writeError = (error) => errorCode(error) === "ERR_SOCKET_DGRAM_NOT_RUNNING" ? closedError() : ioWriteError(error);
|
|
145
|
+
var open = (options, events) => (
|
|
146
|
+
// Core lets uncancellable lookups finish and closes abandoned sockets.
|
|
147
|
+
Effect.callback((resume) => {
|
|
148
|
+
planOpen({
|
|
149
|
+
family: options.family,
|
|
150
|
+
bind: options.bind,
|
|
151
|
+
remote: options.connect ?? options.peer
|
|
152
|
+
}, scopeIdsFor, (error) => resume(Effect.fail(openError(error, "AddressNotAvailable"))), (plan) => bind(options, events, plan, resume));
|
|
153
|
+
})
|
|
154
|
+
);
|
|
155
|
+
var bind = (options, events, {
|
|
156
|
+
bindHost: host,
|
|
157
|
+
family,
|
|
158
|
+
remote,
|
|
159
|
+
scopeIds
|
|
160
|
+
}, resume) => {
|
|
161
|
+
let socket;
|
|
162
|
+
try {
|
|
163
|
+
socket = Dgram.createSocket({
|
|
164
|
+
type: family === "ipv6" ? "udp6" : "udp4",
|
|
165
|
+
reuseAddr: options.reuseAddress,
|
|
166
|
+
reusePort: options.reusePort,
|
|
167
|
+
ipv6Only: options.ipv6Only,
|
|
168
|
+
lookup: immediateLookup
|
|
169
|
+
});
|
|
170
|
+
} catch (error) {
|
|
171
|
+
return resume(Effect.fail(openError(error)));
|
|
172
|
+
}
|
|
173
|
+
const native = new NativeSocket(socket, events);
|
|
174
|
+
const fail2 = (error) => {
|
|
175
|
+
native.close();
|
|
176
|
+
resume(Effect.fail(error));
|
|
177
|
+
};
|
|
178
|
+
native.onOpenError = (error) => fail2(openError(error));
|
|
179
|
+
try {
|
|
180
|
+
socket.bind({
|
|
181
|
+
address: host,
|
|
182
|
+
port: options.bind?.port ?? 0
|
|
183
|
+
}, () => {
|
|
184
|
+
try {
|
|
185
|
+
if (options.kernelReceiveBufferSize !== void 0) socket.setRecvBufferSize(options.kernelReceiveBufferSize);
|
|
186
|
+
if (options.kernelSendBufferSize !== void 0) socket.setSendBufferSize(options.kernelSendBufferSize);
|
|
187
|
+
if (options.broadcast !== void 0) socket.setBroadcast(options.broadcast);
|
|
188
|
+
if (options.ttl !== void 0) socket.setTTL(options.ttl);
|
|
189
|
+
const multicast = options.multicast;
|
|
190
|
+
if (multicast?.ttl !== void 0) socket.setMulticastTTL(multicast.ttl);
|
|
191
|
+
if (multicast?.loopback !== void 0) socket.setMulticastLoopback(multicast.loopback);
|
|
192
|
+
if (multicast?.interface !== void 0) {
|
|
193
|
+
socket.setMulticastInterface(NetAddress.formatMulticastInterface(multicast.interface, scopeIds));
|
|
194
|
+
}
|
|
195
|
+
} catch (error) {
|
|
196
|
+
return fail2(openError(error));
|
|
197
|
+
}
|
|
198
|
+
if (options.connect === void 0) return resume(Effect.succeed(native.open(scopeIds, remote, false)));
|
|
199
|
+
try {
|
|
200
|
+
socket.connect(remote.port, remote.host, (error) => {
|
|
201
|
+
if (error) return fail2(openError(error));
|
|
202
|
+
resume(Effect.succeed(native.open(scopeIds, remote, true)));
|
|
203
|
+
});
|
|
204
|
+
} catch (error) {
|
|
205
|
+
fail2(openError(error));
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
} catch (error) {
|
|
209
|
+
fail2(openError(error));
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
var adopt = (socket, options, events) => Effect.callback((resume) => {
|
|
213
|
+
const native = new NativeSocket(socket, events);
|
|
214
|
+
const fail2 = (error) => {
|
|
215
|
+
native.close();
|
|
216
|
+
resume(Effect.fail(error));
|
|
217
|
+
};
|
|
218
|
+
let family;
|
|
219
|
+
let remote;
|
|
220
|
+
try {
|
|
221
|
+
family = socket.address().family === "IPv6" ? "ipv6" : "ipv4";
|
|
222
|
+
} catch (error) {
|
|
223
|
+
return fail2(openError(error));
|
|
224
|
+
}
|
|
225
|
+
try {
|
|
226
|
+
remote = socket.remoteAddress();
|
|
227
|
+
} catch {
|
|
228
|
+
}
|
|
229
|
+
const scopeIds = scopeIdsFor(family);
|
|
230
|
+
if (remote !== void 0) {
|
|
231
|
+
return resume(Effect.succeed(native.open(scopeIds, {
|
|
232
|
+
host: remote.address,
|
|
233
|
+
port: remote.port
|
|
234
|
+
}, true)));
|
|
235
|
+
}
|
|
236
|
+
resolvePeer(options.peer, family, scopeIds, (error) => fail2(openError(error, "AddressNotAvailable")), (peer) => resume(Effect.succeed(native.open(scopeIds, peer, false))));
|
|
237
|
+
});
|
|
238
|
+
var NativeSocket = class {
|
|
239
|
+
socket;
|
|
240
|
+
onOpenError = void 0;
|
|
241
|
+
closing = false;
|
|
242
|
+
constructor(socket, events) {
|
|
243
|
+
this.socket = socket;
|
|
244
|
+
socket.on("message", (payload, info) => events.onPacket(payload, info.address, info.port));
|
|
245
|
+
socket.on("error", (error) => {
|
|
246
|
+
if (this.onOpenError !== void 0) return this.onOpenError(error);
|
|
247
|
+
events.onError(readError(error));
|
|
248
|
+
});
|
|
249
|
+
socket.on("close", () => {
|
|
250
|
+
if (!this.closing) events.onClose();
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
open(scopeIds, peer, connected) {
|
|
254
|
+
this.onOpenError = void 0;
|
|
255
|
+
const socket = this.socket;
|
|
256
|
+
const bound = socket.address();
|
|
257
|
+
const send = (payload, destination, done) => {
|
|
258
|
+
try {
|
|
259
|
+
if (destination === void 0) socket.send(payload, done);
|
|
260
|
+
else socket.send(payload, destination.port, destination.host, done);
|
|
261
|
+
} catch (error) {
|
|
262
|
+
done(error);
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
return {
|
|
266
|
+
address: {
|
|
267
|
+
host: bound.address,
|
|
268
|
+
port: bound.port
|
|
269
|
+
},
|
|
270
|
+
scopeIds,
|
|
271
|
+
peer,
|
|
272
|
+
connected,
|
|
273
|
+
send: (payload, destination, done) => send(payload, destination, (error) => done(error == null ? void 0 : writeError(error))),
|
|
274
|
+
sendMany: (payloads, destinations, done) => {
|
|
275
|
+
let remaining = payloads.length;
|
|
276
|
+
let failure;
|
|
277
|
+
let failedAt;
|
|
278
|
+
const report = (error, index) => {
|
|
279
|
+
if (error != null && failure === void 0) {
|
|
280
|
+
failure = writeError(error);
|
|
281
|
+
failedAt = index;
|
|
282
|
+
}
|
|
283
|
+
if (--remaining === 0) done(failure, failedAt);
|
|
284
|
+
};
|
|
285
|
+
for (let i = 0; i < payloads.length; i++) {
|
|
286
|
+
send(payloads[i], destinations[i], (error) => report(error, i));
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
joinMulticast: ({
|
|
290
|
+
group,
|
|
291
|
+
interface: ingress,
|
|
292
|
+
source
|
|
293
|
+
}) => Effect.try({
|
|
294
|
+
try: () => {
|
|
295
|
+
const groupHost = NetAddress.formatIp(group);
|
|
296
|
+
const interfaceHost = ingress === void 0 ? void 0 : NetAddress.formatMulticastInterface(ingress, scopeIds);
|
|
297
|
+
if (source === void 0) {
|
|
298
|
+
socket.addMembership(groupHost, interfaceHost);
|
|
299
|
+
return () => Effect.sync(() => socket.dropMembership(groupHost, interfaceHost));
|
|
300
|
+
}
|
|
301
|
+
const sourceHost = NetAddress.formatIp(source);
|
|
302
|
+
socket.addSourceSpecificMembership(sourceHost, groupHost, interfaceHost);
|
|
303
|
+
return () => Effect.sync(() => socket.dropSourceSpecificMembership(sourceHost, groupHost, interfaceHost));
|
|
304
|
+
},
|
|
305
|
+
catch: (error) => openError(error)
|
|
306
|
+
}),
|
|
307
|
+
close: () => this.close()
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
close() {
|
|
311
|
+
if (this.closing) return;
|
|
312
|
+
this.closing = true;
|
|
313
|
+
try {
|
|
314
|
+
this.socket.close();
|
|
315
|
+
} catch {
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
export {
|
|
321
|
+
make,
|
|
322
|
+
fromSocket,
|
|
323
|
+
layer,
|
|
324
|
+
NodeDatagramSocket_exports
|
|
325
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-MLKGABMK.js";
|
|
4
|
+
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.4_effect@4.0.4/node_modules/@effect/platform-node-shared/dist/NodePath.js
|
|
6
|
+
var NodePath_exports = {};
|
|
7
|
+
__export(NodePath_exports, {
|
|
8
|
+
layer: () => layer,
|
|
9
|
+
layerPosix: () => layerPosix,
|
|
10
|
+
layerWin32: () => layerWin32
|
|
11
|
+
});
|
|
12
|
+
import * as Effect from "effect/Effect";
|
|
13
|
+
import * as Layer from "effect/Layer";
|
|
14
|
+
import { Path, TypeId } from "effect/Path";
|
|
15
|
+
import { BadArgument } from "effect/PlatformError";
|
|
16
|
+
import * as NodePath from "node:path";
|
|
17
|
+
import * as NodeUrl from "node:url";
|
|
18
|
+
var fileUrlOps = (windows) => ({
|
|
19
|
+
fromFileUrl: (url) => Effect.try({
|
|
20
|
+
try: () => NodeUrl.fileURLToPath(url, {
|
|
21
|
+
windows
|
|
22
|
+
}),
|
|
23
|
+
catch: (cause) => new BadArgument({
|
|
24
|
+
module: "Path",
|
|
25
|
+
method: "fromFileUrl",
|
|
26
|
+
cause
|
|
27
|
+
})
|
|
28
|
+
}),
|
|
29
|
+
toFileUrl: (path) => Effect.try({
|
|
30
|
+
try: () => NodeUrl.pathToFileURL(path, {
|
|
31
|
+
windows
|
|
32
|
+
}),
|
|
33
|
+
catch: (cause) => new BadArgument({
|
|
34
|
+
module: "Path",
|
|
35
|
+
method: "toFileUrl",
|
|
36
|
+
cause
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
var layerPosix = /* @__PURE__ */ Layer.succeed(Path)({
|
|
41
|
+
[TypeId]: TypeId,
|
|
42
|
+
...NodePath.posix,
|
|
43
|
+
.../* @__PURE__ */ fileUrlOps(false)
|
|
44
|
+
});
|
|
45
|
+
var layerWin32 = /* @__PURE__ */ Layer.succeed(Path)({
|
|
46
|
+
[TypeId]: TypeId,
|
|
47
|
+
...NodePath.win32,
|
|
48
|
+
.../* @__PURE__ */ fileUrlOps(true)
|
|
49
|
+
});
|
|
50
|
+
var layer = /* @__PURE__ */ Layer.succeed(Path)({
|
|
51
|
+
[TypeId]: TypeId,
|
|
52
|
+
...NodePath,
|
|
53
|
+
.../* @__PURE__ */ fileUrlOps(void 0)
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
layerPosix,
|
|
58
|
+
layerWin32,
|
|
59
|
+
layer,
|
|
60
|
+
NodePath_exports
|
|
61
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
make
|
|
3
|
+
} from "./chunk-3SL3HKQA.js";
|
|
4
|
+
import {
|
|
5
|
+
layer
|
|
6
|
+
} from "./chunk-ZNKZXDUD.js";
|
|
7
|
+
import {
|
|
8
|
+
__export
|
|
9
|
+
} from "./chunk-MLKGABMK.js";
|
|
10
|
+
|
|
11
|
+
// ../../../../node_modules/.pnpm/@effect+platform-bun@4.0.4_effect@4.0.4/node_modules/@effect/platform-bun/dist/BunHttpPlatform.js
|
|
12
|
+
var BunHttpPlatform_exports = {};
|
|
13
|
+
__export(BunHttpPlatform_exports, {
|
|
14
|
+
layer: () => layer3
|
|
15
|
+
});
|
|
16
|
+
import * as Etag from "effect/http/Etag";
|
|
17
|
+
import * as Platform from "effect/http/HttpPlatform";
|
|
18
|
+
import * as Response from "effect/http/HttpServerResponse";
|
|
19
|
+
import * as Layer from "effect/Layer";
|
|
20
|
+
var compression = /* @__PURE__ */ make(/* @__PURE__ */ Platform.makeCompressionWeb({
|
|
21
|
+
algorithms: ["gzip", "deflate", "br", "zstd"],
|
|
22
|
+
transform: (algorithm) => Platform.compressionTransformWeb(algorithm === "br" ? "brotli" : algorithm)
|
|
23
|
+
}));
|
|
24
|
+
var make3 = /* @__PURE__ */ Platform.make({
|
|
25
|
+
platform: "bun",
|
|
26
|
+
compression,
|
|
27
|
+
fileResponse(path, status, statusText, headers, start, end, contentLength) {
|
|
28
|
+
let file = Bun.file(path);
|
|
29
|
+
if (start > 0 || end !== void 0) {
|
|
30
|
+
file = file.slice(start, end);
|
|
31
|
+
}
|
|
32
|
+
return Response.raw(file, {
|
|
33
|
+
headers: {
|
|
34
|
+
...headers,
|
|
35
|
+
"content-length": contentLength.toString()
|
|
36
|
+
},
|
|
37
|
+
status,
|
|
38
|
+
statusText
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
fileWebResponse(file, status, statusText, headers, options) {
|
|
42
|
+
const start = options?.offset ?? 0;
|
|
43
|
+
const end = options?.bytesToRead !== void 0 ? start + options.bytesToRead : void 0;
|
|
44
|
+
const body = start > 0 || end !== void 0 ? file.slice(start, end, file.type) : file;
|
|
45
|
+
return Response.raw(body, {
|
|
46
|
+
headers,
|
|
47
|
+
status,
|
|
48
|
+
statusText
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
var layer3 = /* @__PURE__ */ Layer.effect(Platform.HttpPlatform)(make3).pipe(/* @__PURE__ */ Layer.provide(layer), /* @__PURE__ */ Layer.provide(Etag.layer));
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
layer3 as layer,
|
|
56
|
+
BunHttpPlatform_exports
|
|
57
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layerClientProtocol,
|
|
3
|
+
layerSocketServer
|
|
4
|
+
} from "./chunk-6FSJ2PMW.js";
|
|
5
|
+
import {
|
|
6
|
+
layer
|
|
7
|
+
} from "./chunk-GJN7MEBF.js";
|
|
8
|
+
import {
|
|
9
|
+
layer as layer2
|
|
10
|
+
} from "./chunk-ZNKZXDUD.js";
|
|
11
|
+
import {
|
|
12
|
+
__export
|
|
13
|
+
} from "./chunk-MLKGABMK.js";
|
|
14
|
+
|
|
15
|
+
// ../../../../node_modules/.pnpm/@effect+platform-bun@4.0.4_effect@4.0.4/node_modules/@effect/platform-bun/dist/BunClusterSocket.js
|
|
16
|
+
var BunClusterSocket_exports = {};
|
|
17
|
+
__export(BunClusterSocket_exports, {
|
|
18
|
+
layer: () => layer8,
|
|
19
|
+
layerClientProtocol: () => layerClientProtocol,
|
|
20
|
+
layerK8sHttpClient: () => layerK8sHttpClient,
|
|
21
|
+
layerSocketServer: () => layerSocketServer
|
|
22
|
+
});
|
|
23
|
+
import * as K8sHttpClient from "effect/cluster/K8sHttpClient";
|
|
24
|
+
import * as MessageStorage from "effect/cluster/MessageStorage";
|
|
25
|
+
import * as RunnerHealth from "effect/cluster/RunnerHealth";
|
|
26
|
+
import * as Runners from "effect/cluster/Runners";
|
|
27
|
+
import * as RunnerStorage from "effect/cluster/RunnerStorage";
|
|
28
|
+
import * as ShardingConfig from "effect/cluster/ShardingConfig";
|
|
29
|
+
import * as SocketRunner from "effect/cluster/SocketRunner";
|
|
30
|
+
import * as SqlMessageStorage from "effect/cluster/SqlMessageStorage";
|
|
31
|
+
import * as SqlRunnerStorage from "effect/cluster/SqlRunnerStorage";
|
|
32
|
+
import * as Effect from "effect/Effect";
|
|
33
|
+
import * as FileSystem from "effect/FileSystem";
|
|
34
|
+
import * as FetchHttpClient from "effect/http/FetchHttpClient";
|
|
35
|
+
import * as Layer from "effect/Layer";
|
|
36
|
+
import * as RpcSerialization from "effect/rpc/RpcSerialization";
|
|
37
|
+
var layer8 = (options) => {
|
|
38
|
+
const layer9 = options?.clientOnly ? Layer.provide(SocketRunner.layerClientOnly, layerClientProtocol) : Layer.provide(SocketRunner.layer, [layerSocketServer, layerClientProtocol]);
|
|
39
|
+
const runnerHealth = options?.clientOnly ? Layer.empty : options?.runnerHealth === "k8s" ? RunnerHealth.layerK8s(options.runnerHealthK8s).pipe(Layer.provide([layer2, layerK8sHttpClient])) : RunnerHealth.layerPing.pipe(Layer.provide(Runners.layerRpc), Layer.provide(layerClientProtocol));
|
|
40
|
+
return layer9.pipe(Layer.provide(runnerHealth), Layer.provideMerge(options?.storage === "local" ? MessageStorage.layerNoop : options?.storage === "byo" ? Layer.empty : Layer.orDie(SqlMessageStorage.layer).pipe(Layer.provide(layer))), Layer.provide(options?.storage === "local" ? RunnerStorage.layerMemory : options?.storage === "byo" ? Layer.empty : Layer.orDie(SqlRunnerStorage.layer)), Layer.provide(ShardingConfig.layerFromEnv(options?.shardingConfig)), Layer.provide(options?.serialization === "ndjson" ? RpcSerialization.layerNdjsonWith({
|
|
41
|
+
maxBufferSize: options?.serializationMaxBufferSize
|
|
42
|
+
}) : RpcSerialization.layerSchemaBinary({
|
|
43
|
+
maxFrameSize: options?.serializationMaxBufferSize
|
|
44
|
+
})));
|
|
45
|
+
};
|
|
46
|
+
var layerK8sHttpClient = /* @__PURE__ */ K8sHttpClient.layer.pipe(/* @__PURE__ */ Layer.provide(/* @__PURE__ */ Layer.unwrap(/* @__PURE__ */ Effect.gen(function* () {
|
|
47
|
+
const fs = yield* FileSystem.FileSystem;
|
|
48
|
+
const caCertOption = yield* fs.readFile("/var/run/secrets/kubernetes.io/serviceaccount/ca.crt").pipe(Effect.option);
|
|
49
|
+
if (caCertOption._tag === "None") {
|
|
50
|
+
return FetchHttpClient.layer;
|
|
51
|
+
}
|
|
52
|
+
return Layer.fresh(FetchHttpClient.layer).pipe(Layer.provide(Layer.succeed(FetchHttpClient.RequestInit, {
|
|
53
|
+
tls: {
|
|
54
|
+
ca: caCertOption.value
|
|
55
|
+
}
|
|
56
|
+
})));
|
|
57
|
+
}))), /* @__PURE__ */ Layer.provide(layer2));
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
layer8 as layer,
|
|
61
|
+
layerK8sHttpClient,
|
|
62
|
+
BunClusterSocket_exports
|
|
63
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-MLKGABMK.js";
|
|
4
|
+
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.4_effect@4.0.4_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeWorker.js
|
|
6
|
+
var NodeWorker_exports = {};
|
|
7
|
+
__export(NodeWorker_exports, {
|
|
8
|
+
layer: () => layer,
|
|
9
|
+
layerPlatform: () => layerPlatform
|
|
10
|
+
});
|
|
11
|
+
import * as Deferred from "effect/Deferred";
|
|
12
|
+
import * as Effect from "effect/Effect";
|
|
13
|
+
import * as Exit from "effect/Exit";
|
|
14
|
+
import * as Layer from "effect/Layer";
|
|
15
|
+
import * as Scope from "effect/Scope";
|
|
16
|
+
import * as Worker from "effect/workers/Worker";
|
|
17
|
+
import { WorkerError, WorkerReceiveError } from "effect/workers/WorkerError";
|
|
18
|
+
var layerPlatform = /* @__PURE__ */ Layer.succeed(Worker.WorkerPlatform)(/* @__PURE__ */ Worker.makePlatform()({
|
|
19
|
+
setup({
|
|
20
|
+
scope,
|
|
21
|
+
worker
|
|
22
|
+
}) {
|
|
23
|
+
const exitDeferred = Deferred.makeUnsafe();
|
|
24
|
+
const thing = "postMessage" in worker ? {
|
|
25
|
+
postMessage(msg, t) {
|
|
26
|
+
worker.postMessage(msg, t);
|
|
27
|
+
},
|
|
28
|
+
kill: () => worker.terminate(),
|
|
29
|
+
worker
|
|
30
|
+
} : {
|
|
31
|
+
postMessage(msg, _) {
|
|
32
|
+
worker.send(msg);
|
|
33
|
+
},
|
|
34
|
+
kill: () => worker.kill("SIGKILL"),
|
|
35
|
+
worker
|
|
36
|
+
};
|
|
37
|
+
worker.on("exit", () => {
|
|
38
|
+
Deferred.doneUnsafe(exitDeferred, Exit.void);
|
|
39
|
+
});
|
|
40
|
+
return Effect.as(Scope.addFinalizer(scope, Effect.suspend(() => {
|
|
41
|
+
thing.postMessage([1]);
|
|
42
|
+
return Deferred.await(exitDeferred);
|
|
43
|
+
}).pipe(Effect.timeout(5e3), Effect.catchCause(() => Effect.promise(() => Promise.resolve(thing.kill()))))), thing);
|
|
44
|
+
},
|
|
45
|
+
listen({
|
|
46
|
+
deferred,
|
|
47
|
+
emit,
|
|
48
|
+
port
|
|
49
|
+
}) {
|
|
50
|
+
port.worker.on("message", (message) => {
|
|
51
|
+
emit(message);
|
|
52
|
+
});
|
|
53
|
+
port.worker.on("messageerror", (cause) => {
|
|
54
|
+
Deferred.doneUnsafe(deferred, new WorkerError({
|
|
55
|
+
reason: new WorkerReceiveError({
|
|
56
|
+
message: "An messageerror event was emitted",
|
|
57
|
+
cause
|
|
58
|
+
})
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
port.worker.on("error", (cause) => {
|
|
62
|
+
Deferred.doneUnsafe(deferred, new WorkerError({
|
|
63
|
+
reason: new WorkerReceiveError({
|
|
64
|
+
message: "An error event was emitted",
|
|
65
|
+
cause
|
|
66
|
+
})
|
|
67
|
+
}));
|
|
68
|
+
});
|
|
69
|
+
port.worker.on("exit", (code) => {
|
|
70
|
+
Deferred.doneUnsafe(deferred, new WorkerError({
|
|
71
|
+
reason: new WorkerReceiveError({
|
|
72
|
+
message: "The worker has exited with code: " + code
|
|
73
|
+
})
|
|
74
|
+
}));
|
|
75
|
+
});
|
|
76
|
+
return Effect.void;
|
|
77
|
+
}
|
|
78
|
+
}));
|
|
79
|
+
var layer = (spawn) => Layer.merge(Worker.layerSpawner(spawn), layerPlatform);
|
|
80
|
+
|
|
81
|
+
export {
|
|
82
|
+
layerPlatform,
|
|
83
|
+
layer,
|
|
84
|
+
NodeWorker_exports
|
|
85
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layer
|
|
3
|
+
} from "./chunk-HDV6VIRM.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-MLKGABMK.js";
|
|
7
|
+
|
|
8
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.4_effect@4.0.4_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeCrypto.js
|
|
9
|
+
var NodeCrypto_exports = {};
|
|
10
|
+
__export(NodeCrypto_exports, {
|
|
11
|
+
layer: () => layer2
|
|
12
|
+
});
|
|
13
|
+
var layer2 = layer;
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
layer2 as layer,
|
|
17
|
+
NodeCrypto_exports
|
|
18
|
+
};
|
|
@@ -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-C3PGUWW5.js";
|
|
12
|
+
import {
|
|
13
|
+
__export
|
|
14
|
+
} from "./chunk-MLKGABMK.js";
|
|
15
|
+
|
|
16
|
+
// ../../../../node_modules/.pnpm/@effect+platform-bun@4.0.4_effect@4.0.4/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
|
+
};
|