@smthrs/platform-bun 0.0.0-stage → 1.0.0-rc.3
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 +113 -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 +147 -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 +242 -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 +2707 -0
- package/dist/vendor/bun/BunChildProcessSpawner.d.ts +7 -0
- package/dist/vendor/bun/BunChildProcessSpawner.js +14 -0
- package/dist/vendor/bun/BunClusterHttp.d.ts +83 -0
- package/dist/vendor/bun/BunClusterHttp.js +39 -0
- package/dist/vendor/bun/BunClusterSocket.d.ts +65 -0
- package/dist/vendor/bun/BunClusterSocket.js +22 -0
- package/dist/vendor/bun/BunCrypto.d.ts +10 -0
- package/dist/vendor/bun/BunCrypto.js +8 -0
- package/dist/vendor/bun/BunFileSystem.d.ts +10 -0
- package/dist/vendor/bun/BunFileSystem.js +9 -0
- package/dist/vendor/bun/BunHttpClient.d.ts +9 -0
- package/dist/vendor/bun/BunHttpClient.js +1 -0
- package/dist/vendor/bun/BunHttpPlatform.d.ts +10 -0
- package/dist/vendor/bun/BunHttpPlatform.js +11 -0
- package/dist/vendor/bun/BunHttpServer.d.ts +142 -0
- package/dist/vendor/bun/BunHttpServer.js +38 -0
- package/dist/vendor/bun/BunHttpServerRequest.d.ts +18 -0
- package/dist/vendor/bun/BunHttpServerRequest.js +7 -0
- package/dist/vendor/bun/BunMultipart.d.ts +31 -0
- package/dist/vendor/bun/BunMultipart.js +12 -0
- package/dist/vendor/bun/BunPath.d.ts +24 -0
- package/dist/vendor/bun/BunPath.js +12 -0
- package/dist/vendor/bun/BunRedis.d.ts +49 -0
- package/dist/vendor/bun/BunRedis.js +11 -0
- package/dist/vendor/bun/BunRuntime.d.ts +85 -0
- package/dist/vendor/bun/BunRuntime.js +8 -0
- package/dist/vendor/bun/BunServices.d.ts +34 -0
- package/dist/vendor/bun/BunServices.js +23 -0
- package/dist/vendor/bun/BunSink.d.ts +8 -0
- package/dist/vendor/bun/BunSink.js +12 -0
- package/dist/vendor/bun/BunSocket.d.ts +40 -0
- package/dist/vendor/bun/BunSocket.js +29 -0
- package/dist/vendor/bun/BunSocketServer.d.ts +8 -0
- package/dist/vendor/bun/BunSocketServer.js +21 -0
- package/dist/vendor/bun/BunStdio.d.ts +11 -0
- package/dist/vendor/bun/BunStdio.js +10 -0
- package/dist/vendor/bun/BunStream.d.ts +19 -0
- package/dist/vendor/bun/BunStream.js +30 -0
- package/dist/vendor/bun/BunTerminal.d.ts +21 -0
- package/dist/vendor/bun/BunTerminal.js +10 -0
- package/dist/vendor/bun/BunWorker.d.ts +20 -0
- package/dist/vendor/bun/BunWorker.js +9 -0
- package/dist/vendor/bun/BunWorkerRunner.d.ts +12 -0
- package/dist/vendor/bun/BunWorkerRunner.js +7 -0
- package/dist/vendor/bun/LICENSE +21 -0
- package/dist/vendor/bun/index.d.ts +92 -0
- package/dist/vendor/bun/index.js +107 -0
- package/dist/vendor/chunk-2KZ2IFIZ.js +71 -0
- package/dist/vendor/chunk-2Y7WC4KU.js +109 -0
- package/dist/vendor/chunk-3GR5VZ2M.js +118 -0
- package/dist/vendor/chunk-3QW2PNUY.js +7 -0
- package/dist/vendor/chunk-42QKY6T6.js +40 -0
- package/dist/vendor/chunk-54RLBMTZ.js +61 -0
- package/dist/vendor/chunk-5U3MC37H.js +63 -0
- package/dist/vendor/chunk-5ZMHBXIK.js +55 -0
- package/dist/vendor/chunk-64Q2B7BA.js +34 -0
- package/dist/vendor/chunk-6CRG556Y.js +15 -0
- package/dist/vendor/chunk-6HWHSZL3.js +34 -0
- package/dist/vendor/chunk-6J25AYCI.js +93 -0
- package/dist/vendor/chunk-6ME2W7TF.js +28 -0
- package/dist/vendor/chunk-6TZ7LQAC.js +18 -0
- package/dist/vendor/chunk-B3FZ67QU.js +59 -0
- package/dist/vendor/chunk-BBLQEPNJ.js +22 -0
- package/dist/vendor/chunk-BKTBUBQY.js +437 -0
- package/dist/vendor/chunk-CIB6JB2Y.js +63 -0
- package/dist/vendor/chunk-DS7GF46S.js +34 -0
- package/dist/vendor/chunk-DVOAHXPG.js +104 -0
- package/dist/vendor/chunk-DWSHTSVX.js +229 -0
- package/dist/vendor/chunk-EGBNVEEW.js +14 -0
- package/dist/vendor/chunk-EHDTBBPL.js +45 -0
- package/dist/vendor/chunk-EZWY45HP.js +18 -0
- package/dist/vendor/chunk-F7VENFF4.js +507 -0
- package/dist/vendor/chunk-GXCHI7BM.js +131 -0
- package/dist/vendor/chunk-HX4AXITW.js +65 -0
- package/dist/vendor/chunk-IIJ52ZU6.js +20 -0
- package/dist/vendor/chunk-IR7WG7SA.js +564 -0
- package/dist/vendor/chunk-J7A4CZDO.js +92 -0
- package/dist/vendor/chunk-JG5TTWPT.js +85 -0
- package/dist/vendor/chunk-JJ24ARBQ.js +394 -0
- package/dist/vendor/chunk-JUVIPOOR.js +18 -0
- package/dist/vendor/chunk-KCLEGTEN.js +86 -0
- package/dist/vendor/chunk-KOZMM5PZ.js +426 -0
- package/dist/vendor/chunk-KUUXSID7.js +18 -0
- package/dist/vendor/chunk-KWOY4JDR.js +398 -0
- package/dist/vendor/chunk-LEUPYT3Q.js +36 -0
- package/dist/vendor/chunk-LJVI2DIF.js +57 -0
- package/dist/vendor/chunk-M32LDTW7.js +18 -0
- package/dist/vendor/chunk-M7CLUILA.js +0 -0
- package/dist/vendor/chunk-MBSKBQ5D.js +21 -0
- package/dist/vendor/chunk-MLKGABMK.js +9 -0
- package/dist/vendor/chunk-MMEGG3WE.js +96 -0
- package/dist/vendor/chunk-MSWDMTAF.js +18 -0
- package/dist/vendor/chunk-NBVRTDTV.js +129 -0
- package/dist/vendor/chunk-NBYGGMAE.js +70 -0
- package/dist/vendor/chunk-NLMT7VBU.js +18 -0
- package/dist/vendor/chunk-OXNGN5H7.js +81 -0
- package/dist/vendor/chunk-RBKBXDZW.js +18 -0
- package/dist/vendor/chunk-RNBBYWS2.js +26 -0
- package/dist/vendor/chunk-SFHVFMSR.js +18 -0
- package/dist/vendor/chunk-TFIKFFSC.js +26 -0
- package/dist/vendor/chunk-TXKLEBBL.js +143 -0
- package/dist/vendor/chunk-U6OWSZD2.js +62 -0
- package/dist/vendor/chunk-UFH5UUZK.js +48 -0
- package/dist/vendor/chunk-UJAEC4DS.js +20 -0
- package/dist/vendor/chunk-VZBDV3TV.js +18 -0
- package/dist/vendor/chunk-WGN4AMSX.js +0 -0
- package/dist/vendor/chunk-WIYD3THC.js +31 -0
- package/dist/vendor/chunk-XDKNKFBW.js +22 -0
- package/dist/vendor/chunk-XH4U3JSV.js +249 -0
- package/dist/vendor/chunk-XWPHMSXO.js +28 -0
- package/dist/vendor/chunk-Y35ZAO5U.js +53 -0
- package/dist/vendor/chunk-ZJMRMY57.js +0 -0
- package/dist/vendor/cjs/bun/BunChildProcessSpawner.d.ts +7 -0
- package/dist/vendor/cjs/bun/BunChildProcessSpawner.js +1 -0
- package/dist/vendor/cjs/bun/BunClusterHttp.d.ts +83 -0
- package/dist/vendor/cjs/bun/BunClusterHttp.js +1 -0
- package/dist/vendor/cjs/bun/BunClusterSocket.d.ts +65 -0
- package/dist/vendor/cjs/bun/BunClusterSocket.js +1 -0
- package/dist/vendor/cjs/bun/BunCrypto.d.ts +10 -0
- package/dist/vendor/cjs/bun/BunCrypto.js +1 -0
- package/dist/vendor/cjs/bun/BunFileSystem.d.ts +10 -0
- package/dist/vendor/cjs/bun/BunFileSystem.js +1 -0
- package/dist/vendor/cjs/bun/BunHttpClient.d.ts +9 -0
- package/dist/vendor/cjs/bun/BunHttpClient.js +1 -0
- package/dist/vendor/cjs/bun/BunHttpPlatform.d.ts +10 -0
- package/dist/vendor/cjs/bun/BunHttpPlatform.js +1 -0
- package/dist/vendor/cjs/bun/BunHttpServer.d.ts +142 -0
- package/dist/vendor/cjs/bun/BunHttpServer.js +1 -0
- package/dist/vendor/cjs/bun/BunHttpServerRequest.d.ts +18 -0
- package/dist/vendor/cjs/bun/BunHttpServerRequest.js +1 -0
- package/dist/vendor/cjs/bun/BunMultipart.d.ts +31 -0
- package/dist/vendor/cjs/bun/BunMultipart.js +1 -0
- package/dist/vendor/cjs/bun/BunPath.d.ts +24 -0
- package/dist/vendor/cjs/bun/BunPath.js +1 -0
- package/dist/vendor/cjs/bun/BunRedis.d.ts +49 -0
- package/dist/vendor/cjs/bun/BunRedis.js +1 -0
- package/dist/vendor/cjs/bun/BunRuntime.d.ts +85 -0
- package/dist/vendor/cjs/bun/BunRuntime.js +1 -0
- package/dist/vendor/cjs/bun/BunServices.d.ts +34 -0
- package/dist/vendor/cjs/bun/BunServices.js +1 -0
- package/dist/vendor/cjs/bun/BunSink.d.ts +8 -0
- package/dist/vendor/cjs/bun/BunSink.js +1 -0
- package/dist/vendor/cjs/bun/BunSocket.d.ts +40 -0
- package/dist/vendor/cjs/bun/BunSocket.js +1 -0
- package/dist/vendor/cjs/bun/BunSocketServer.d.ts +8 -0
- package/dist/vendor/cjs/bun/BunSocketServer.js +1 -0
- package/dist/vendor/cjs/bun/BunStdio.d.ts +11 -0
- package/dist/vendor/cjs/bun/BunStdio.js +1 -0
- package/dist/vendor/cjs/bun/BunStream.d.ts +19 -0
- package/dist/vendor/cjs/bun/BunStream.js +1 -0
- package/dist/vendor/cjs/bun/BunTerminal.d.ts +21 -0
- package/dist/vendor/cjs/bun/BunTerminal.js +1 -0
- package/dist/vendor/cjs/bun/BunWorker.d.ts +20 -0
- package/dist/vendor/cjs/bun/BunWorker.js +1 -0
- package/dist/vendor/cjs/bun/BunWorkerRunner.d.ts +12 -0
- package/dist/vendor/cjs/bun/BunWorkerRunner.js +1 -0
- package/dist/vendor/cjs/bun/index.d.ts +92 -0
- package/dist/vendor/cjs/bun/index.js +1 -0
- package/dist/vendor/cjs/node/NodeChildProcessSpawner.d.ts +7 -0
- package/dist/vendor/cjs/node/NodeChildProcessSpawner.js +1 -0
- package/dist/vendor/cjs/node/NodeClusterHttp.d.ts +63 -0
- package/dist/vendor/cjs/node/NodeClusterHttp.js +1 -0
- package/dist/vendor/cjs/node/NodeClusterSocket.d.ts +79 -0
- package/dist/vendor/cjs/node/NodeClusterSocket.js +1 -0
- package/dist/vendor/cjs/node/NodeCrypto.d.ts +10 -0
- package/dist/vendor/cjs/node/NodeCrypto.js +1 -0
- package/dist/vendor/cjs/node/NodeFileSystem.d.ts +10 -0
- package/dist/vendor/cjs/node/NodeFileSystem.js +1 -0
- package/dist/vendor/cjs/node/NodeHttpClient.d.ts +179 -0
- package/dist/vendor/cjs/node/NodeHttpClient.js +1 -0
- package/dist/vendor/cjs/node/NodeHttpIncomingMessage.d.ts +62 -0
- package/dist/vendor/cjs/node/NodeHttpIncomingMessage.js +1 -0
- package/dist/vendor/cjs/node/NodeHttpPlatform.d.ts +36 -0
- package/dist/vendor/cjs/node/NodeHttpPlatform.js +1 -0
- package/dist/vendor/cjs/node/NodeHttpServer.d.ts +120 -0
- package/dist/vendor/cjs/node/NodeHttpServer.js +1 -0
- package/dist/vendor/cjs/node/NodeHttpServerRequest.d.ts +29 -0
- package/dist/vendor/cjs/node/NodeHttpServerRequest.js +1 -0
- package/dist/vendor/cjs/node/NodeMultipart.d.ts +46 -0
- package/dist/vendor/cjs/node/NodeMultipart.js +1 -0
- package/dist/vendor/cjs/node/NodeMultipartParser.d.ts +97 -0
- package/dist/vendor/cjs/node/NodeMultipartParser.js +1 -0
- package/dist/vendor/cjs/node/NodePath.d.ts +27 -0
- package/dist/vendor/cjs/node/NodePath.js +1 -0
- package/dist/vendor/cjs/node/NodeRedis.d.ts +74 -0
- package/dist/vendor/cjs/node/NodeRedis.js +1 -0
- package/dist/vendor/cjs/node/NodeRuntime.d.ts +85 -0
- package/dist/vendor/cjs/node/NodeRuntime.js +1 -0
- package/dist/vendor/cjs/node/NodeServices.d.ts +34 -0
- package/dist/vendor/cjs/node/NodeServices.js +1 -0
- package/dist/vendor/cjs/node/NodeSink.d.ts +8 -0
- package/dist/vendor/cjs/node/NodeSink.js +1 -0
- package/dist/vendor/cjs/node/NodeSocket.d.ts +38 -0
- package/dist/vendor/cjs/node/NodeSocket.js +1 -0
- package/dist/vendor/cjs/node/NodeSocketServer.d.ts +8 -0
- package/dist/vendor/cjs/node/NodeSocketServer.js +1 -0
- package/dist/vendor/cjs/node/NodeStdio.d.ts +11 -0
- package/dist/vendor/cjs/node/NodeStdio.js +1 -0
- package/dist/vendor/cjs/node/NodeStream.d.ts +8 -0
- package/dist/vendor/cjs/node/NodeStream.js +1 -0
- package/dist/vendor/cjs/node/NodeTerminal.d.ts +21 -0
- package/dist/vendor/cjs/node/NodeTerminal.js +1 -0
- package/dist/vendor/cjs/node/NodeWorker.d.ts +22 -0
- package/dist/vendor/cjs/node/NodeWorker.js +1 -0
- package/dist/vendor/cjs/node/NodeWorkerRunner.d.ts +12 -0
- package/dist/vendor/cjs/node/NodeWorkerRunner.js +1 -0
- package/dist/vendor/cjs/node/Undici.d.ts +28 -0
- package/dist/vendor/cjs/node/Undici.js +1 -0
- package/dist/vendor/cjs/node/index.d.ts +100 -0
- package/dist/vendor/cjs/node/index.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeChildProcessSpawner.d.ts +57 -0
- package/dist/vendor/cjs/node-shared/NodeChildProcessSpawner.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeClusterSocket.d.ts +22 -0
- package/dist/vendor/cjs/node-shared/NodeClusterSocket.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeCrypto.d.ts +27 -0
- package/dist/vendor/cjs/node-shared/NodeCrypto.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeFileSystem.d.ts +11 -0
- package/dist/vendor/cjs/node-shared/NodeFileSystem.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeHttpCompression.d.ts +36 -0
- package/dist/vendor/cjs/node-shared/NodeHttpCompression.js +1 -0
- package/dist/vendor/cjs/node-shared/NodePath.d.ts +27 -0
- package/dist/vendor/cjs/node-shared/NodePath.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeRuntime.d.ts +47 -0
- package/dist/vendor/cjs/node-shared/NodeRuntime.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeSink.d.ts +69 -0
- package/dist/vendor/cjs/node-shared/NodeSink.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeSocket.d.ts +134 -0
- package/dist/vendor/cjs/node-shared/NodeSocket.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeSocketServer.d.ts +80 -0
- package/dist/vendor/cjs/node-shared/NodeSocketServer.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeStdio.d.ts +12 -0
- package/dist/vendor/cjs/node-shared/NodeStdio.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeStream.d.ts +179 -0
- package/dist/vendor/cjs/node-shared/NodeStream.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeTerminal.d.ts +22 -0
- package/dist/vendor/cjs/node-shared/NodeTerminal.js +1 -0
- package/dist/vendor/cjs/node-shared/index.d.ts +56 -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 +92 -0
- package/dist/vendor/cjs/platform-bun.js +1 -0
- package/dist/vendor/cjs/platform-node-shared.d.ts +56 -0
- package/dist/vendor/cjs/platform-node-shared.js +1 -0
- package/dist/vendor/cjs/platform-node.d.ts +100 -0
- package/dist/vendor/cjs/platform-node.js +1 -0
- package/dist/vendor/node/LICENSE +21 -0
- package/dist/vendor/node/NodeChildProcessSpawner.d.ts +7 -0
- package/dist/vendor/node/NodeChildProcessSpawner.js +14 -0
- package/dist/vendor/node/NodeClusterHttp.d.ts +63 -0
- package/dist/vendor/node/NodeClusterHttp.js +43 -0
- package/dist/vendor/node/NodeClusterSocket.d.ts +79 -0
- package/dist/vendor/node/NodeClusterSocket.js +30 -0
- package/dist/vendor/node/NodeCrypto.d.ts +10 -0
- package/dist/vendor/node/NodeCrypto.js +8 -0
- package/dist/vendor/node/NodeFileSystem.d.ts +10 -0
- package/dist/vendor/node/NodeFileSystem.js +9 -0
- package/dist/vendor/node/NodeHttpClient.d.ts +179 -0
- package/dist/vendor/node/NodeHttpClient.js +46 -0
- package/dist/vendor/node/NodeHttpIncomingMessage.d.ts +62 -0
- package/dist/vendor/node/NodeHttpIncomingMessage.js +10 -0
- package/dist/vendor/node/NodeHttpPlatform.d.ts +36 -0
- package/dist/vendor/node/NodeHttpPlatform.js +16 -0
- package/dist/vendor/node/NodeHttpServer.d.ts +120 -0
- package/dist/vendor/node/NodeHttpServer.js +46 -0
- package/dist/vendor/node/NodeHttpServerRequest.d.ts +29 -0
- package/dist/vendor/node/NodeHttpServerRequest.js +9 -0
- package/dist/vendor/node/NodeMultipart.d.ts +46 -0
- package/dist/vendor/node/NodeMultipart.js +15 -0
- package/dist/vendor/node/NodeMultipartParser.d.ts +97 -0
- package/dist/vendor/node/NodeMultipartParser.js +11 -0
- package/dist/vendor/node/NodePath.d.ts +27 -0
- package/dist/vendor/node/NodePath.js +12 -0
- package/dist/vendor/node/NodeRedis.d.ts +74 -0
- package/dist/vendor/node/NodeRedis.js +11 -0
- package/dist/vendor/node/NodeRuntime.d.ts +85 -0
- package/dist/vendor/node/NodeRuntime.js +8 -0
- package/dist/vendor/node/NodeServices.d.ts +34 -0
- package/dist/vendor/node/NodeServices.js +23 -0
- package/dist/vendor/node/NodeSink.d.ts +8 -0
- package/dist/vendor/node/NodeSink.js +12 -0
- package/dist/vendor/node/NodeSocket.d.ts +38 -0
- package/dist/vendor/node/NodeSocket.js +31 -0
- package/dist/vendor/node/NodeSocketServer.d.ts +8 -0
- package/dist/vendor/node/NodeSocketServer.js +21 -0
- package/dist/vendor/node/NodeStdio.d.ts +11 -0
- package/dist/vendor/node/NodeStdio.js +10 -0
- package/dist/vendor/node/NodeStream.d.ts +8 -0
- package/dist/vendor/node/NodeStream.js +27 -0
- package/dist/vendor/node/NodeTerminal.d.ts +21 -0
- package/dist/vendor/node/NodeTerminal.js +10 -0
- package/dist/vendor/node/NodeWorker.d.ts +22 -0
- package/dist/vendor/node/NodeWorker.js +9 -0
- package/dist/vendor/node/NodeWorkerRunner.d.ts +12 -0
- package/dist/vendor/node/NodeWorkerRunner.js +7 -0
- package/dist/vendor/node/Undici.d.ts +28 -0
- package/dist/vendor/node/Undici.js +9 -0
- package/dist/vendor/node/index.d.ts +100 -0
- package/dist/vendor/node/index.js +115 -0
- package/dist/vendor/node-shared/LICENSE +21 -0
- package/dist/vendor/node-shared/NodeChildProcessSpawner.d.ts +57 -0
- package/dist/vendor/node-shared/NodeChildProcessSpawner.js +13 -0
- package/dist/vendor/node-shared/NodeClusterSocket.d.ts +22 -0
- package/dist/vendor/node-shared/NodeClusterSocket.js +11 -0
- package/dist/vendor/node-shared/NodeCrypto.d.ts +27 -0
- package/dist/vendor/node-shared/NodeCrypto.js +9 -0
- package/dist/vendor/node-shared/NodeFileSystem.d.ts +11 -0
- package/dist/vendor/node-shared/NodeFileSystem.js +8 -0
- package/dist/vendor/node-shared/NodeHttpCompression.d.ts +36 -0
- package/dist/vendor/node-shared/NodeHttpCompression.js +13 -0
- package/dist/vendor/node-shared/NodePath.d.ts +27 -0
- package/dist/vendor/node-shared/NodePath.js +11 -0
- package/dist/vendor/node-shared/NodeRuntime.d.ts +47 -0
- package/dist/vendor/node-shared/NodeRuntime.js +7 -0
- package/dist/vendor/node-shared/NodeSink.d.ts +69 -0
- package/dist/vendor/node-shared/NodeSink.js +11 -0
- package/dist/vendor/node-shared/NodeSocket.d.ts +134 -0
- package/dist/vendor/node-shared/NodeSocket.js +23 -0
- package/dist/vendor/node-shared/NodeSocketServer.d.ts +80 -0
- package/dist/vendor/node-shared/NodeSocketServer.js +20 -0
- package/dist/vendor/node-shared/NodeStdio.d.ts +12 -0
- package/dist/vendor/node-shared/NodeStdio.js +9 -0
- package/dist/vendor/node-shared/NodeStream.d.ts +179 -0
- package/dist/vendor/node-shared/NodeStream.js +26 -0
- package/dist/vendor/node-shared/NodeTerminal.d.ts +22 -0
- package/dist/vendor/node-shared/NodeTerminal.js +9 -0
- package/dist/vendor/node-shared/index.d.ts +56 -0
- package/dist/vendor/node-shared/index.js +58 -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 +92 -0
- package/dist/vendor/platform-bun.js +107 -0
- package/dist/vendor/platform-node-shared.d.ts +56 -0
- package/dist/vendor/platform-node-shared.js +58 -0
- package/dist/vendor/platform-node.d.ts +100 -0
- package/dist/vendor/platform-node.js +115 -0
- package/docs/README.md +132 -0
- package/docs/api.md +265 -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 +109 -0
- package/docs/guides/contain-child-processes.md +176 -0
- package/docs/installation.md +128 -0
- package/docs/quickstart.md +159 -0
- package/docs/troubleshooting.md +178 -0
- package/package.json +146 -3
- package/src/BunFileSystem.ts +47 -0
- package/src/BunHost.ts +338 -0
- package/src/index.ts +27 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fromReadableStream
|
|
3
|
+
} from "./chunk-NBYGGMAE.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-MLKGABMK.js";
|
|
7
|
+
|
|
8
|
+
// ../../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-rc.115_effect@4.0.0-rc.115/node_modules/@effect/platform-bun/dist/BunMultipart.js
|
|
9
|
+
var BunMultipart_exports = {};
|
|
10
|
+
__export(BunMultipart_exports, {
|
|
11
|
+
persisted: () => persisted,
|
|
12
|
+
stream: () => stream
|
|
13
|
+
});
|
|
14
|
+
import * as Stream from "effect/Stream";
|
|
15
|
+
import * as Multipart from "effect/unstable/http/Multipart";
|
|
16
|
+
var stream = (source) => fromReadableStream({
|
|
17
|
+
evaluate: () => source.body ?? new ReadableStream({
|
|
18
|
+
start(controller) {
|
|
19
|
+
controller.enqueue(new Uint8Array());
|
|
20
|
+
controller.close();
|
|
21
|
+
}
|
|
22
|
+
}),
|
|
23
|
+
onError: (cause) => Multipart.MultipartError.fromReason("InternalError", cause)
|
|
24
|
+
}).pipe(Stream.pipeThroughChannel(Multipart.makeChannel(Object.fromEntries(source.headers))));
|
|
25
|
+
var persisted = (source) => Multipart.toPersisted(stream(source));
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
stream,
|
|
29
|
+
persisted,
|
|
30
|
+
BunMultipart_exports
|
|
31
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layer,
|
|
3
|
+
make
|
|
4
|
+
} from "./chunk-TXKLEBBL.js";
|
|
5
|
+
import {
|
|
6
|
+
__export
|
|
7
|
+
} from "./chunk-MLKGABMK.js";
|
|
8
|
+
|
|
9
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.0-rc.115_effect@4.0.0-rc.115_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeTerminal.js
|
|
10
|
+
var NodeTerminal_exports = {};
|
|
11
|
+
__export(NodeTerminal_exports, {
|
|
12
|
+
layer: () => layer2,
|
|
13
|
+
make: () => make2
|
|
14
|
+
});
|
|
15
|
+
var make2 = make;
|
|
16
|
+
var layer2 = layer;
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
make2 as make,
|
|
20
|
+
layer2 as layer,
|
|
21
|
+
NodeTerminal_exports
|
|
22
|
+
};
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pullIntoWritable
|
|
3
|
+
} from "./chunk-OXNGN5H7.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-MLKGABMK.js";
|
|
7
|
+
|
|
8
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-rc.115_effect@4.0.0-rc.115/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,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IncomingMessage,
|
|
3
|
+
layer,
|
|
4
|
+
layerTls,
|
|
5
|
+
layerWebSocket,
|
|
6
|
+
make,
|
|
7
|
+
makeTls,
|
|
8
|
+
makeWebSocket
|
|
9
|
+
} from "./chunk-DWSHTSVX.js";
|
|
10
|
+
import {
|
|
11
|
+
__export
|
|
12
|
+
} from "./chunk-MLKGABMK.js";
|
|
13
|
+
|
|
14
|
+
// ../../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-rc.115_effect@4.0.0-rc.115/node_modules/@effect/platform-bun/dist/BunSocketServer.js
|
|
15
|
+
var BunSocketServer_exports = {};
|
|
16
|
+
__export(BunSocketServer_exports, {
|
|
17
|
+
IncomingMessage: () => IncomingMessage,
|
|
18
|
+
layer: () => layer,
|
|
19
|
+
layerTls: () => layerTls,
|
|
20
|
+
layerWebSocket: () => layerWebSocket,
|
|
21
|
+
make: () => make,
|
|
22
|
+
makeTls: () => makeTls,
|
|
23
|
+
makeWebSocket: () => makeWebSocket
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
BunSocketServer_exports
|
|
28
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layer
|
|
3
|
+
} from "./chunk-DWSHTSVX.js";
|
|
4
|
+
import {
|
|
5
|
+
makeNet
|
|
6
|
+
} from "./chunk-JJ24ARBQ.js";
|
|
7
|
+
import {
|
|
8
|
+
__export
|
|
9
|
+
} from "./chunk-MLKGABMK.js";
|
|
10
|
+
|
|
11
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-rc.115_effect@4.0.0-rc.115/node_modules/@effect/platform-node-shared/dist/NodeClusterSocket.js
|
|
12
|
+
var NodeClusterSocket_exports = {};
|
|
13
|
+
__export(NodeClusterSocket_exports, {
|
|
14
|
+
layerClientProtocol: () => layerClientProtocol,
|
|
15
|
+
layerSocketServer: () => layerSocketServer
|
|
16
|
+
});
|
|
17
|
+
import * as Effect from "effect/Effect";
|
|
18
|
+
import * as Layer from "effect/Layer";
|
|
19
|
+
import * as Option from "effect/Option";
|
|
20
|
+
import * as Runners from "effect/unstable/cluster/Runners";
|
|
21
|
+
import * as ShardingConfig from "effect/unstable/cluster/ShardingConfig";
|
|
22
|
+
import * as RpcClient from "effect/unstable/rpc/RpcClient";
|
|
23
|
+
import * as RpcSerialization from "effect/unstable/rpc/RpcSerialization";
|
|
24
|
+
import { Socket } from "effect/unstable/socket/Socket";
|
|
25
|
+
var layerClientProtocol = /* @__PURE__ */ Layer.effect(Runners.RpcClientProtocol)(/* @__PURE__ */ Effect.gen(function* () {
|
|
26
|
+
const serialization = yield* RpcSerialization.RpcSerialization;
|
|
27
|
+
return {
|
|
28
|
+
codecFor: serialization.codecFor,
|
|
29
|
+
make: Effect.fnUntraced(function* (address) {
|
|
30
|
+
const socket = yield* makeNet({
|
|
31
|
+
openTimeout: 1e3,
|
|
32
|
+
timeout: 5500,
|
|
33
|
+
host: address.host,
|
|
34
|
+
port: address.port
|
|
35
|
+
});
|
|
36
|
+
return yield* RpcClient.makeProtocolSocket().pipe(Effect.provideService(Socket, socket), Effect.provideService(RpcSerialization.RpcSerialization, serialization));
|
|
37
|
+
}, Effect.orDie)
|
|
38
|
+
};
|
|
39
|
+
}));
|
|
40
|
+
var layerSocketServer = /* @__PURE__ */ Effect.gen(function* () {
|
|
41
|
+
const config = yield* ShardingConfig.ShardingConfig;
|
|
42
|
+
const listenAddress = Option.orElse(config.runnerListenAddress, () => config.runnerAddress);
|
|
43
|
+
if (Option.isNone(listenAddress)) {
|
|
44
|
+
return yield* Effect.die("layerSocketServer: ShardingConfig.runnerListenAddress is None");
|
|
45
|
+
}
|
|
46
|
+
return layer(listenAddress.value);
|
|
47
|
+
}).pipe(Layer.unwrap);
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
layerClientProtocol,
|
|
51
|
+
layerSocketServer,
|
|
52
|
+
NodeClusterSocket_exports
|
|
53
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../bun/BunChildProcessSpawner.js")
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bun HTTP and WebSocket layers for Effect Cluster runners.
|
|
3
|
+
*
|
|
4
|
+
* `layerHttpServer` provides the Bun HTTP server used by cluster runners. The
|
|
5
|
+
* main `layer` builds a sharding layer for HTTP or WebSocket transport,
|
|
6
|
+
* choosing serialization, runner health checks, runner storage, message
|
|
7
|
+
* storage, and optional client-only mode from the supplied options.
|
|
8
|
+
*
|
|
9
|
+
* @since 4.0.0
|
|
10
|
+
*/
|
|
11
|
+
import type * as Config from "effect/Config";
|
|
12
|
+
import * as Layer from "effect/Layer";
|
|
13
|
+
import * as MessageStorage from "effect/unstable/cluster/MessageStorage";
|
|
14
|
+
import * as Runners from "effect/unstable/cluster/Runners";
|
|
15
|
+
import * as RunnerStorage from "effect/unstable/cluster/RunnerStorage";
|
|
16
|
+
import type { Sharding } from "effect/unstable/cluster/Sharding";
|
|
17
|
+
import * as ShardingConfig from "effect/unstable/cluster/ShardingConfig";
|
|
18
|
+
import type * as Etag from "effect/unstable/http/Etag";
|
|
19
|
+
import type { HttpPlatform } from "effect/unstable/http/HttpPlatform";
|
|
20
|
+
import type { HttpServer } from "effect/unstable/http/HttpServer";
|
|
21
|
+
import type { ServeError } from "effect/unstable/http/HttpServerError";
|
|
22
|
+
import type { SqlClient } from "effect/unstable/sql/SqlClient";
|
|
23
|
+
import { layerK8sHttpClient } from "./BunClusterSocket.ts";
|
|
24
|
+
import type { BunServices } from "./BunServices.ts";
|
|
25
|
+
export {
|
|
26
|
+
/**
|
|
27
|
+
* Layer that provides a Kubernetes HTTP client for runner health checks.
|
|
28
|
+
*
|
|
29
|
+
* @category re-exports
|
|
30
|
+
* @since 4.0.0
|
|
31
|
+
*/
|
|
32
|
+
layerK8sHttpClient };
|
|
33
|
+
/**
|
|
34
|
+
* Layer that provides a Bun HTTP server for cluster runners.
|
|
35
|
+
*
|
|
36
|
+
* @category layers
|
|
37
|
+
* @since 4.0.0
|
|
38
|
+
*/
|
|
39
|
+
export declare const layerHttpServer: Layer.Layer<HttpPlatform | Etag.Generator | BunServices | HttpServer, ServeError, ShardingConfig.ShardingConfig>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates Bun cluster layers for HTTP or WebSocket transport, configuring serialization, storage, runner health, and optional client-only mode.
|
|
42
|
+
*
|
|
43
|
+
* **When to use**
|
|
44
|
+
*
|
|
45
|
+
* Use to install the complete Bun HTTP or WebSocket cluster layer, including
|
|
46
|
+
* client-only cluster access when a process should connect without serving
|
|
47
|
+
* runner RPCs.
|
|
48
|
+
*
|
|
49
|
+
* **Details**
|
|
50
|
+
*
|
|
51
|
+
* `serialization` defaults to SchemaBinary, `runnerHealth` defaults to ping
|
|
52
|
+
* checks, SQL-backed storage is used by default, and `shardingConfig` is
|
|
53
|
+
* overlaid on environment-loaded sharding configuration. `local` storage uses
|
|
54
|
+
* no-op message storage plus in-memory runner storage, while `byo` leaves both
|
|
55
|
+
* message and runner storage for the caller to provide.
|
|
56
|
+
*
|
|
57
|
+
* **Gotchas**
|
|
58
|
+
*
|
|
59
|
+
* `clientOnly` does not start the HTTP server or receive shard assignments.
|
|
60
|
+
* Non-client-only mode listens with `runnerListenAddress` when present, falling
|
|
61
|
+
* back to `runnerAddress`. HTTP and WebSocket runner RPCs use the default
|
|
62
|
+
* `HttpRunner` route.
|
|
63
|
+
*
|
|
64
|
+
* @see {@link layerHttpServer} for the server layer used by non-client-only transports
|
|
65
|
+
* @see {@link layerK8sHttpClient} for Kubernetes runner health support
|
|
66
|
+
*
|
|
67
|
+
* @category layers
|
|
68
|
+
* @since 4.0.0
|
|
69
|
+
*/
|
|
70
|
+
export declare const layer: <const ClientOnly extends boolean = false, const Storage extends "local" | "sql" | "byo" = never>(options: {
|
|
71
|
+
readonly transport: "http" | "websocket";
|
|
72
|
+
readonly serialization?: "binary" | "ndjson" | undefined;
|
|
73
|
+
readonly serializationMaxBufferSize?: number | "unbounded" | undefined;
|
|
74
|
+
readonly clientOnly?: ClientOnly | undefined;
|
|
75
|
+
readonly storage?: Storage | undefined;
|
|
76
|
+
readonly runnerHealth?: "ping" | "k8s" | undefined;
|
|
77
|
+
readonly runnerHealthK8s?: {
|
|
78
|
+
readonly namespace?: string | undefined;
|
|
79
|
+
readonly labelSelector?: string | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
readonly shardingConfig?: Partial<ShardingConfig.ShardingConfig["Service"]> | undefined;
|
|
82
|
+
}) => ClientOnly extends true ? Layer.Layer<Sharding | Runners.Runners | ("byo" extends Storage ? never : MessageStorage.MessageStorage), Config.ConfigError, "local" extends Storage ? never : "byo" extends Storage ? (MessageStorage.MessageStorage | RunnerStorage.RunnerStorage) : SqlClient> : Layer.Layer<Sharding | Runners.Runners | MessageStorage.MessageStorage, ServeError | Config.ConfigError, "local" extends Storage ? never : "byo" extends Storage ? (MessageStorage.MessageStorage | RunnerStorage.RunnerStorage) : SqlClient>;
|
|
83
|
+
//# sourceMappingURL=BunClusterHttp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../bun/BunClusterHttp.js")
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bun socket layers for Effect Cluster runners.
|
|
3
|
+
*
|
|
4
|
+
* The main `layer` builds a sharding layer for socket transport, choosing
|
|
5
|
+
* serialization, runner health checks, runner storage, message storage, and
|
|
6
|
+
* optional client-only mode from the supplied options. This module also
|
|
7
|
+
* re-exports the shared socket client and server protocol layers and provides
|
|
8
|
+
* `layerK8sHttpClient` for Kubernetes runner health checks.
|
|
9
|
+
*
|
|
10
|
+
* @since 4.0.0
|
|
11
|
+
*/
|
|
12
|
+
import { layerClientProtocol, layerSocketServer } from "../node-shared/NodeClusterSocket.js";
|
|
13
|
+
import type * as Config from "effect/Config";
|
|
14
|
+
import * as Layer from "effect/Layer";
|
|
15
|
+
import * as K8sHttpClient from "effect/unstable/cluster/K8sHttpClient";
|
|
16
|
+
import * as MessageStorage from "effect/unstable/cluster/MessageStorage";
|
|
17
|
+
import * as Runners from "effect/unstable/cluster/Runners";
|
|
18
|
+
import * as RunnerStorage from "effect/unstable/cluster/RunnerStorage";
|
|
19
|
+
import type { Sharding } from "effect/unstable/cluster/Sharding";
|
|
20
|
+
import * as ShardingConfig from "effect/unstable/cluster/ShardingConfig";
|
|
21
|
+
import type * as SocketServer from "effect/unstable/socket/SocketServer";
|
|
22
|
+
import type { SqlClient } from "effect/unstable/sql/SqlClient";
|
|
23
|
+
export {
|
|
24
|
+
/**
|
|
25
|
+
* Provides the cluster `RpcClientProtocol` using the shared socket client
|
|
26
|
+
* implementation.
|
|
27
|
+
*
|
|
28
|
+
* @category re-exports
|
|
29
|
+
* @since 4.0.0
|
|
30
|
+
*/
|
|
31
|
+
layerClientProtocol,
|
|
32
|
+
/**
|
|
33
|
+
* Provides the socket server used by Bun cluster runners through the shared
|
|
34
|
+
* socket server implementation.
|
|
35
|
+
*
|
|
36
|
+
* @category re-exports
|
|
37
|
+
* @since 4.0.0
|
|
38
|
+
*/
|
|
39
|
+
layerSocketServer };
|
|
40
|
+
/**
|
|
41
|
+
* Creates Bun socket cluster layers, configuring serialization, storage, runner health, and optional client-only mode.
|
|
42
|
+
*
|
|
43
|
+
* @category layers
|
|
44
|
+
* @since 4.0.0
|
|
45
|
+
*/
|
|
46
|
+
export declare const layer: <const ClientOnly extends boolean = false, const Storage extends "local" | "sql" | "byo" = never>(options?: {
|
|
47
|
+
readonly serialization?: "binary" | "ndjson" | undefined;
|
|
48
|
+
readonly serializationMaxBufferSize?: number | "unbounded" | undefined;
|
|
49
|
+
readonly clientOnly?: ClientOnly | undefined;
|
|
50
|
+
readonly storage?: Storage | undefined;
|
|
51
|
+
readonly runnerHealth?: "ping" | "k8s" | undefined;
|
|
52
|
+
readonly runnerHealthK8s?: {
|
|
53
|
+
readonly namespace?: string | undefined;
|
|
54
|
+
readonly labelSelector?: string | undefined;
|
|
55
|
+
} | undefined;
|
|
56
|
+
readonly shardingConfig?: Partial<ShardingConfig.ShardingConfig["Service"]> | undefined;
|
|
57
|
+
}) => ClientOnly extends true ? Layer.Layer<Sharding | Runners.Runners | ("byo" extends Storage ? never : MessageStorage.MessageStorage), Config.ConfigError, "local" extends Storage ? never : "byo" extends Storage ? (MessageStorage.MessageStorage | RunnerStorage.RunnerStorage) : SqlClient> : Layer.Layer<Sharding | Runners.Runners | ("byo" extends Storage ? never : MessageStorage.MessageStorage), SocketServer.SocketServerError | Config.ConfigError, "local" extends Storage ? never : "byo" extends Storage ? (MessageStorage.MessageStorage | RunnerStorage.RunnerStorage) : SqlClient>;
|
|
58
|
+
/**
|
|
59
|
+
* Layer that provides `K8sHttpClient`, using the Kubernetes service-account CA certificate when it is available.
|
|
60
|
+
*
|
|
61
|
+
* @category layers
|
|
62
|
+
* @since 4.0.0
|
|
63
|
+
*/
|
|
64
|
+
export declare const layerK8sHttpClient: Layer.Layer<K8sHttpClient.K8sHttpClient>;
|
|
65
|
+
//# sourceMappingURL=BunClusterSocket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../bun/BunClusterSocket.js")
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as Crypto from "effect/Crypto";
|
|
2
|
+
import type * as Layer from "effect/Layer";
|
|
3
|
+
/**
|
|
4
|
+
* Layer that provides the Bun Crypto service implementation.
|
|
5
|
+
*
|
|
6
|
+
* @category layers
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare const layer: Layer.Layer<Crypto.Crypto>;
|
|
10
|
+
//# sourceMappingURL=BunCrypto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../bun/BunCrypto.js")
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FileSystem } from "effect/FileSystem";
|
|
2
|
+
import type * as Layer from "effect/Layer";
|
|
3
|
+
/**
|
|
4
|
+
* Layer that provides the `FileSystem` service for Bun using the shared Node file-system implementation.
|
|
5
|
+
*
|
|
6
|
+
* @category layers
|
|
7
|
+
* @since 4.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare const layer: Layer.Layer<FileSystem, never, never>;
|
|
10
|
+
//# sourceMappingURL=BunFileSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../bun/BunFileSystem.js")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../bun/BunHttpClient.js")
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as Layer from "effect/Layer";
|
|
2
|
+
import * as Platform from "effect/unstable/http/HttpPlatform";
|
|
3
|
+
/**
|
|
4
|
+
* Layer that provides the Bun `HttpPlatform`, including file responses backed by `Bun.file`.
|
|
5
|
+
*
|
|
6
|
+
* @category layers
|
|
7
|
+
* @since 4.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare const layer: Layer.Layer<Platform.HttpPlatform, never, never>;
|
|
10
|
+
//# sourceMappingURL=BunHttpPlatform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../bun/BunHttpPlatform.js")
|