@smthrs/platform-node 0.0.0-stage → 1.0.0-rc.4
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 +211 -0
- package/LICENSE +21 -0
- package/README.md +165 -2
- package/bin/darwin-arm64/smithers-jj-export +0 -0
- package/bin/darwin-x64/smithers-jj-export +0 -0
- package/bin/linux-arm64/smithers-jj-export +0 -0
- package/bin/linux-x64/smithers-jj-export +4 -0
- package/bin/win32-x64/smithers-jj-export.exe +0 -0
- package/dist/cjs/AtomicFileSystem.d.ts +147 -0
- package/dist/cjs/AtomicFileSystem.d.ts.map +1 -0
- package/dist/cjs/AtomicFileSystem.js +234 -0
- package/dist/cjs/AtomicFileSystem.js.map +7 -0
- package/dist/cjs/EgressHttpClient.d.ts +106 -0
- package/dist/cjs/EgressHttpClient.d.ts.map +1 -0
- package/dist/cjs/EgressHttpClient.js +202 -0
- package/dist/cjs/EgressHttpClient.js.map +7 -0
- package/dist/cjs/HostLiveness.d.ts +81 -0
- package/dist/cjs/HostLiveness.d.ts.map +1 -0
- package/dist/cjs/HostLiveness.js +49 -0
- package/dist/cjs/HostLiveness.js.map +7 -0
- package/dist/cjs/NodeHost.d.ts +145 -0
- package/dist/cjs/NodeHost.d.ts.map +1 -0
- package/dist/cjs/NodeHost.js +128 -0
- package/dist/cjs/NodeHost.js.map +7 -0
- package/dist/cjs/ProcessConfinement.d.ts +61 -0
- package/dist/cjs/ProcessConfinement.d.ts.map +1 -0
- package/dist/cjs/ProcessConfinement.js +292 -0
- package/dist/cjs/ProcessConfinement.js.map +7 -0
- package/dist/cjs/ProcessReaper.d.ts +457 -0
- package/dist/cjs/ProcessReaper.d.ts.map +1 -0
- package/dist/cjs/ProcessReaper.js +349 -0
- package/dist/cjs/ProcessReaper.js.map +7 -0
- package/dist/cjs/ProcessSandbox.d.ts +391 -0
- package/dist/cjs/ProcessSandbox.d.ts.map +1 -0
- package/dist/cjs/ProcessSandbox.js +774 -0
- package/dist/cjs/ProcessSandbox.js.map +7 -0
- package/dist/cjs/ScopedProcess.d.ts +66 -0
- package/dist/cjs/ScopedProcess.d.ts.map +1 -0
- package/dist/cjs/ScopedProcess.js +87 -0
- package/dist/cjs/ScopedProcess.js.map +7 -0
- package/dist/cjs/index.d.ts +38 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +47 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/internal/AtomicFileSystemExecutable.d.ts +61 -0
- package/dist/cjs/internal/AtomicFileSystemExecutable.d.ts.map +1 -0
- package/dist/cjs/internal/AtomicFileSystemExecutable.js +250 -0
- package/dist/cjs/internal/AtomicFileSystemExecutable.js.map +7 -0
- package/dist/cjs/internal/AtomicFileSystemProtocol.d.ts +78 -0
- package/dist/cjs/internal/AtomicFileSystemProtocol.d.ts.map +1 -0
- package/dist/cjs/internal/AtomicFileSystemProtocol.js +382 -0
- package/dist/cjs/internal/AtomicFileSystemProtocol.js.map +7 -0
- package/dist/cjs/internal/AtomicFileSystemTransport.d.ts +44 -0
- package/dist/cjs/internal/AtomicFileSystemTransport.d.ts.map +1 -0
- package/dist/cjs/internal/AtomicFileSystemTransport.js +197 -0
- package/dist/cjs/internal/AtomicFileSystemTransport.js.map +7 -0
- package/dist/cjs/internal/AtomicHelperError.d.ts +35 -0
- package/dist/cjs/internal/AtomicHelperError.d.ts.map +1 -0
- package/dist/cjs/internal/AtomicHelperError.js +45 -0
- package/dist/cjs/internal/AtomicHelperError.js.map +7 -0
- package/dist/cjs/internal/AtomicHelperFault.d.ts +59 -0
- package/dist/cjs/internal/AtomicHelperFault.d.ts.map +1 -0
- package/dist/cjs/internal/AtomicHelperFault.js +66 -0
- package/dist/cjs/internal/AtomicHelperFault.js.map +7 -0
- package/dist/cjs/internal/PipedProcess.d.ts +35 -0
- package/dist/cjs/internal/PipedProcess.d.ts.map +1 -0
- package/dist/cjs/internal/PipedProcess.js +309 -0
- package/dist/cjs/internal/PipedProcess.js.map +7 -0
- package/dist/cjs/internal/ProcSnapshot.d.ts +85 -0
- package/dist/cjs/internal/ProcSnapshot.d.ts.map +1 -0
- package/dist/cjs/internal/ProcSnapshot.js +123 -0
- package/dist/cjs/internal/ProcSnapshot.js.map +7 -0
- package/dist/cjs/internal/ProcessCleanup.d.ts +64 -0
- package/dist/cjs/internal/ProcessCleanup.d.ts.map +1 -0
- package/dist/cjs/internal/ProcessCleanup.js +62 -0
- package/dist/cjs/internal/ProcessCleanup.js.map +7 -0
- package/dist/cjs/internal/ProcessCleanupPolicyError.d.ts +30 -0
- package/dist/cjs/internal/ProcessCleanupPolicyError.d.ts.map +1 -0
- package/dist/cjs/internal/ProcessCleanupPolicyError.js +33 -0
- package/dist/cjs/internal/ProcessCleanupPolicyError.js.map +7 -0
- package/dist/cjs/internal/ProcessFault.d.ts +63 -0
- package/dist/cjs/internal/ProcessFault.d.ts.map +1 -0
- package/dist/cjs/internal/ProcessFault.js +63 -0
- package/dist/cjs/internal/ProcessFault.js.map +7 -0
- package/dist/cjs/internal/ProcessSupervisor.d.ts +143 -0
- package/dist/cjs/internal/ProcessSupervisor.d.ts.map +1 -0
- package/dist/cjs/internal/ProcessSupervisor.js +685 -0
- package/dist/cjs/internal/ProcessSupervisor.js.map +7 -0
- package/dist/cjs/internal/SupervisorProgram.d.ts +9 -0
- package/dist/cjs/internal/SupervisorProgram.d.ts.map +1 -0
- package/dist/cjs/internal/SupervisorProgram.js +326 -0
- package/dist/cjs/internal/SupervisorProgram.js.map +7 -0
- package/dist/cjs/internal/WindowsProcessJob.d.ts +39 -0
- package/dist/cjs/internal/WindowsProcessJob.d.ts.map +1 -0
- package/dist/cjs/internal/WindowsProcessJob.js +113 -0
- package/dist/cjs/internal/WindowsProcessJob.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/AtomicFileSystem.d.ts +147 -0
- package/dist/esm/AtomicFileSystem.d.ts.map +1 -0
- package/dist/esm/AtomicFileSystem.js +290 -0
- package/dist/esm/AtomicFileSystem.js.map +1 -0
- package/dist/esm/EgressHttpClient.d.ts +106 -0
- package/dist/esm/EgressHttpClient.d.ts.map +1 -0
- package/dist/esm/EgressHttpClient.js +259 -0
- package/dist/esm/EgressHttpClient.js.map +1 -0
- package/dist/esm/HostLiveness.d.ts +81 -0
- package/dist/esm/HostLiveness.d.ts.map +1 -0
- package/dist/esm/HostLiveness.js +68 -0
- package/dist/esm/HostLiveness.js.map +1 -0
- package/dist/esm/NodeHost.d.ts +145 -0
- package/dist/esm/NodeHost.d.ts.map +1 -0
- package/dist/esm/NodeHost.js +162 -0
- package/dist/esm/NodeHost.js.map +1 -0
- package/dist/esm/ProcessConfinement.d.ts +61 -0
- package/dist/esm/ProcessConfinement.d.ts.map +1 -0
- package/dist/esm/ProcessConfinement.js +311 -0
- package/dist/esm/ProcessConfinement.js.map +1 -0
- package/dist/esm/ProcessReaper.d.ts +457 -0
- package/dist/esm/ProcessReaper.d.ts.map +1 -0
- package/dist/esm/ProcessReaper.js +711 -0
- package/dist/esm/ProcessReaper.js.map +1 -0
- package/dist/esm/ProcessSandbox.d.ts +391 -0
- package/dist/esm/ProcessSandbox.d.ts.map +1 -0
- package/dist/esm/ProcessSandbox.js +1043 -0
- package/dist/esm/ProcessSandbox.js.map +1 -0
- package/dist/esm/ScopedProcess.d.ts +66 -0
- package/dist/esm/ScopedProcess.d.ts.map +1 -0
- package/dist/esm/ScopedProcess.js +67 -0
- package/dist/esm/ScopedProcess.js.map +1 -0
- package/dist/esm/index.d.ts +38 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +38 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internal/AtomicFileSystemExecutable.d.ts +61 -0
- package/dist/esm/internal/AtomicFileSystemExecutable.d.ts.map +1 -0
- package/dist/esm/internal/AtomicFileSystemExecutable.js +350 -0
- package/dist/esm/internal/AtomicFileSystemExecutable.js.map +1 -0
- package/dist/esm/internal/AtomicFileSystemProtocol.d.ts +78 -0
- package/dist/esm/internal/AtomicFileSystemProtocol.d.ts.map +1 -0
- package/dist/esm/internal/AtomicFileSystemProtocol.js +412 -0
- package/dist/esm/internal/AtomicFileSystemProtocol.js.map +1 -0
- package/dist/esm/internal/AtomicFileSystemTransport.d.ts +44 -0
- package/dist/esm/internal/AtomicFileSystemTransport.d.ts.map +1 -0
- package/dist/esm/internal/AtomicFileSystemTransport.js +242 -0
- package/dist/esm/internal/AtomicFileSystemTransport.js.map +1 -0
- package/dist/esm/internal/AtomicHelperError.d.ts +35 -0
- package/dist/esm/internal/AtomicHelperError.d.ts.map +1 -0
- package/dist/esm/internal/AtomicHelperError.js +39 -0
- package/dist/esm/internal/AtomicHelperError.js.map +1 -0
- package/dist/esm/internal/AtomicHelperFault.d.ts +59 -0
- package/dist/esm/internal/AtomicHelperFault.d.ts.map +1 -0
- package/dist/esm/internal/AtomicHelperFault.js +66 -0
- package/dist/esm/internal/AtomicHelperFault.js.map +1 -0
- package/dist/esm/internal/PipedProcess.d.ts +35 -0
- package/dist/esm/internal/PipedProcess.d.ts.map +1 -0
- package/dist/esm/internal/PipedProcess.js +321 -0
- package/dist/esm/internal/PipedProcess.js.map +1 -0
- package/dist/esm/internal/ProcSnapshot.d.ts +85 -0
- package/dist/esm/internal/ProcSnapshot.d.ts.map +1 -0
- package/dist/esm/internal/ProcSnapshot.js +188 -0
- package/dist/esm/internal/ProcSnapshot.js.map +1 -0
- package/dist/esm/internal/ProcessCleanup.d.ts +64 -0
- package/dist/esm/internal/ProcessCleanup.d.ts.map +1 -0
- package/dist/esm/internal/ProcessCleanup.js +45 -0
- package/dist/esm/internal/ProcessCleanup.js.map +1 -0
- package/dist/esm/internal/ProcessCleanupPolicyError.d.ts +30 -0
- package/dist/esm/internal/ProcessCleanupPolicyError.d.ts.map +1 -0
- package/dist/esm/internal/ProcessCleanupPolicyError.js +25 -0
- package/dist/esm/internal/ProcessCleanupPolicyError.js.map +1 -0
- package/dist/esm/internal/ProcessFault.d.ts +63 -0
- package/dist/esm/internal/ProcessFault.d.ts.map +1 -0
- package/dist/esm/internal/ProcessFault.js +64 -0
- package/dist/esm/internal/ProcessFault.js.map +1 -0
- package/dist/esm/internal/ProcessSupervisor.d.ts +143 -0
- package/dist/esm/internal/ProcessSupervisor.d.ts.map +1 -0
- package/dist/esm/internal/ProcessSupervisor.js +689 -0
- package/dist/esm/internal/ProcessSupervisor.js.map +1 -0
- package/dist/esm/internal/SupervisorProgram.d.ts +9 -0
- package/dist/esm/internal/SupervisorProgram.d.ts.map +1 -0
- package/dist/esm/internal/SupervisorProgram.js +310 -0
- package/dist/esm/internal/SupervisorProgram.js.map +1 -0
- package/dist/esm/internal/WindowsProcessJob.d.ts +39 -0
- package/dist/esm/internal/WindowsProcessJob.d.ts.map +1 -0
- package/dist/esm/internal/WindowsProcessJob.js +115 -0
- package/dist/esm/internal/WindowsProcessJob.js.map +1 -0
- package/dist/vendor/adapters.json +1757 -0
- package/dist/vendor/chunk-2Y7WC4KU.js +109 -0
- package/dist/vendor/chunk-3GR5VZ2M.js +118 -0
- package/dist/vendor/chunk-42QKY6T6.js +40 -0
- package/dist/vendor/chunk-54RLBMTZ.js +61 -0
- package/dist/vendor/chunk-5ZMHBXIK.js +55 -0
- package/dist/vendor/chunk-6ME2W7TF.js +28 -0
- package/dist/vendor/chunk-AMQKOQNT.js +34 -0
- package/dist/vendor/chunk-B3FZ67QU.js +59 -0
- package/dist/vendor/chunk-BKTBUBQY.js +437 -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-EZWY45HP.js +18 -0
- package/dist/vendor/chunk-FNZOJHSV.js +71 -0
- package/dist/vendor/chunk-GXCHI7BM.js +131 -0
- package/dist/vendor/chunk-IIJ52ZU6.js +20 -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-KOZMM5PZ.js +426 -0
- package/dist/vendor/chunk-KUUXSID7.js +18 -0
- package/dist/vendor/chunk-LEUPYT3Q.js +36 -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-NBVRTDTV.js +129 -0
- package/dist/vendor/chunk-OXNGN5H7.js +81 -0
- package/dist/vendor/chunk-QPLDT6A6.js +564 -0
- package/dist/vendor/chunk-QYBKAIA6.js +18 -0
- package/dist/vendor/chunk-RO2R4MJH.js +62 -0
- package/dist/vendor/chunk-SIR62W3Y.js +398 -0
- package/dist/vendor/chunk-TFIKFFSC.js +26 -0
- package/dist/vendor/chunk-TXKLEBBL.js +143 -0
- package/dist/vendor/chunk-UFH5UUZK.js +48 -0
- package/dist/vendor/chunk-VANKHF46.js +96 -0
- package/dist/vendor/chunk-VZBDV3TV.js +18 -0
- package/dist/vendor/chunk-XDKNKFBW.js +22 -0
- package/dist/vendor/chunk-XH4U3JSV.js +249 -0
- package/dist/vendor/chunk-Y35ZAO5U.js +53 -0
- package/dist/vendor/chunk-ZJMRMY57.js +0 -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-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-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 +129 -0
- package/docs/api.md +553 -0
- package/docs/concepts/descriptor-relative-filesystem.md +181 -0
- package/docs/concepts/host-bundle.md +125 -0
- package/docs/concepts/process-containment.md +190 -0
- package/docs/guides/answer-run-ownership.md +87 -0
- package/docs/guides/configure-the-filesystem-helper.md +152 -0
- package/docs/guides/contain-child-processes.md +139 -0
- package/docs/guides/match-files-with-glob.md +151 -0
- package/docs/installation.md +204 -0
- package/docs/quickstart.md +147 -0
- package/docs/troubleshooting.md +130 -0
- package/package.json +202 -3
- package/src/AtomicFileSystem.ts +415 -0
- package/src/EgressHttpClient.ts +327 -0
- package/src/HostLiveness.ts +103 -0
- package/src/NodeHost.ts +253 -0
- package/src/ProcessConfinement.ts +363 -0
- package/src/ProcessReaper.ts +951 -0
- package/src/ProcessSandbox.ts +1307 -0
- package/src/ScopedProcess.ts +124 -0
- package/src/index.ts +44 -0
- package/src/internal/AtomicFileSystemExecutable.ts +379 -0
- package/src/internal/AtomicFileSystemProtocol.ts +502 -0
- package/src/internal/AtomicFileSystemTransport.ts +272 -0
- package/src/internal/AtomicHelperError.ts +50 -0
- package/src/internal/AtomicHelperFault.ts +84 -0
- package/src/internal/PipedProcess.ts +357 -0
- package/src/internal/ProcSnapshot.ts +193 -0
- package/src/internal/ProcessCleanup.ts +99 -0
- package/src/internal/ProcessCleanupPolicyError.ts +30 -0
- package/src/internal/ProcessFault.ts +82 -0
- package/src/internal/ProcessSupervisor.ts +807 -0
- package/src/internal/SupervisorProgram.ts +309 -0
- package/src/internal/WindowsProcessJob.ts +114 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node.js implementations of the Effect `HttpClient`.
|
|
3
|
+
*
|
|
4
|
+
* This module supplies Node runtime backends for the platform-independent
|
|
5
|
+
* Effect HTTP client API. It re-exports the fetch-based `Fetch`, `RequestInit`,
|
|
6
|
+
* and `layerFetch` APIs, defines an Undici-backed client with dispatcher
|
|
7
|
+
* services and request options, and defines a lower-level `node:http` /
|
|
8
|
+
* `node:https` client with scoped HTTP agent layers.
|
|
9
|
+
*
|
|
10
|
+
* @since 4.0.0
|
|
11
|
+
*/
|
|
12
|
+
import * as Context from "effect/Context";
|
|
13
|
+
import * as Effect from "effect/Effect";
|
|
14
|
+
import * as Layer from "effect/Layer";
|
|
15
|
+
import type * as Scope from "effect/Scope";
|
|
16
|
+
import * as Client from "effect/unstable/http/HttpClient";
|
|
17
|
+
import * as Http from "node:http";
|
|
18
|
+
import * as Https from "node:https";
|
|
19
|
+
import type * as Undici from "./Undici.ts";
|
|
20
|
+
export {
|
|
21
|
+
/**
|
|
22
|
+
* Provides a fetch-based HTTP client implementation for Node.js.
|
|
23
|
+
*
|
|
24
|
+
* **When to use**
|
|
25
|
+
*
|
|
26
|
+
* Use to access or override the fetch implementation used by the Node
|
|
27
|
+
* fetch-based HTTP client.
|
|
28
|
+
*
|
|
29
|
+
* @category services
|
|
30
|
+
* @since 4.0.0
|
|
31
|
+
*/
|
|
32
|
+
Fetch,
|
|
33
|
+
/**
|
|
34
|
+
* Layer that provides the fetch-based HTTP client implementation.
|
|
35
|
+
*
|
|
36
|
+
* @category layers
|
|
37
|
+
* @since 4.0.0
|
|
38
|
+
*/
|
|
39
|
+
layer as layerFetch,
|
|
40
|
+
/**
|
|
41
|
+
* Provides request initialization options accepted by the fetch-based HTTP client.
|
|
42
|
+
*
|
|
43
|
+
* **When to use**
|
|
44
|
+
*
|
|
45
|
+
* Use to provide default fetch request options for Node HTTP requests.
|
|
46
|
+
*
|
|
47
|
+
* @category services
|
|
48
|
+
* @since 4.0.0
|
|
49
|
+
*/
|
|
50
|
+
RequestInit } from "effect/unstable/http/FetchHttpClient";
|
|
51
|
+
declare const Dispatcher_base: Context.ServiceClass<Dispatcher, "@effect/platform-node/NodeHttpClient/Dispatcher", Undici.Dispatcher>;
|
|
52
|
+
/**
|
|
53
|
+
* Service tag for the Undici `Dispatcher` used by the Undici-backed HTTP
|
|
54
|
+
* client.
|
|
55
|
+
*
|
|
56
|
+
* @category services
|
|
57
|
+
* @since 4.0.0
|
|
58
|
+
*/
|
|
59
|
+
export declare class Dispatcher extends Dispatcher_base {
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Acquires a new Undici `Agent` dispatcher and destroys it when the enclosing
|
|
63
|
+
* scope is finalized.
|
|
64
|
+
*
|
|
65
|
+
* @category resource management
|
|
66
|
+
* @since 4.0.0
|
|
67
|
+
*/
|
|
68
|
+
export declare const makeDispatcher: Effect.Effect<Undici.Dispatcher, never, Scope.Scope>;
|
|
69
|
+
/**
|
|
70
|
+
* Provides the `Dispatcher` service using a scoped Undici `Agent`.
|
|
71
|
+
*
|
|
72
|
+
* @category layers
|
|
73
|
+
* @since 4.0.0
|
|
74
|
+
*/
|
|
75
|
+
export declare const layerDispatcher: Layer.Layer<Dispatcher>;
|
|
76
|
+
/**
|
|
77
|
+
* Provides the `Dispatcher` service from Undici's process-global dispatcher,
|
|
78
|
+
* without creating or owning a new agent.
|
|
79
|
+
*
|
|
80
|
+
* @category layers
|
|
81
|
+
* @since 4.0.0
|
|
82
|
+
*/
|
|
83
|
+
export declare const dispatcherLayerGlobal: Layer.Layer<Dispatcher>;
|
|
84
|
+
/**
|
|
85
|
+
* Fiber reference containing default Undici request options applied to requests
|
|
86
|
+
* sent by `makeUndici`.
|
|
87
|
+
*
|
|
88
|
+
* @category services
|
|
89
|
+
* @since 4.0.0
|
|
90
|
+
*/
|
|
91
|
+
export declare const UndiciOptions: Context.Reference<Partial<Undici.Dispatcher.RequestOptions<null>>>;
|
|
92
|
+
/**
|
|
93
|
+
* Creates an `HttpClient` that sends requests through the current Undici
|
|
94
|
+
* `Dispatcher`, converts Effect HTTP bodies to Undici bodies, and maps
|
|
95
|
+
* transport and decode failures to `HttpClientError`.
|
|
96
|
+
*
|
|
97
|
+
* @category constructors
|
|
98
|
+
* @since 4.0.0
|
|
99
|
+
*/
|
|
100
|
+
export declare const makeUndici: Effect.Effect<Client.HttpClient, never, Dispatcher>;
|
|
101
|
+
/**
|
|
102
|
+
* Provides an Undici-backed `HttpClient` using the current `Dispatcher`
|
|
103
|
+
* service.
|
|
104
|
+
*
|
|
105
|
+
* @category layers
|
|
106
|
+
* @since 4.0.0
|
|
107
|
+
*/
|
|
108
|
+
export declare const layerUndiciNoDispatcher: Layer.Layer<Client.HttpClient, never, Dispatcher>;
|
|
109
|
+
/**
|
|
110
|
+
* Provides an Undici-backed `HttpClient` together with a scoped default
|
|
111
|
+
* Undici `Agent` dispatcher.
|
|
112
|
+
*
|
|
113
|
+
* @category layers
|
|
114
|
+
* @since 4.0.0
|
|
115
|
+
*/
|
|
116
|
+
export declare const layerUndici: Layer.Layer<Client.HttpClient>;
|
|
117
|
+
declare const HttpAgent_base: Context.ServiceClass<HttpAgent, "@effect/platform-node/NodeHttpClient/HttpAgent", {
|
|
118
|
+
readonly http: Http.Agent;
|
|
119
|
+
readonly https: Https.Agent;
|
|
120
|
+
}>;
|
|
121
|
+
/**
|
|
122
|
+
* Service tag for the paired Node `http` and `https` agents used by the
|
|
123
|
+
* node:http-backed HTTP client.
|
|
124
|
+
*
|
|
125
|
+
* @category services
|
|
126
|
+
* @since 4.0.0
|
|
127
|
+
*/
|
|
128
|
+
export declare class HttpAgent extends HttpAgent_base {
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Acquires Node `http` and `https` agents with the supplied options and
|
|
132
|
+
* destroys both agents when the enclosing scope is finalized.
|
|
133
|
+
*
|
|
134
|
+
* @category resource management
|
|
135
|
+
* @since 4.0.0
|
|
136
|
+
*/
|
|
137
|
+
export declare const makeAgent: (options?: Https.AgentOptions) => Effect.Effect<HttpAgent["Service"], never, Scope.Scope>;
|
|
138
|
+
/**
|
|
139
|
+
* Provides the `HttpAgent` service using scoped Node `http` and `https`
|
|
140
|
+
* agents configured with the supplied options.
|
|
141
|
+
*
|
|
142
|
+
* @category layers
|
|
143
|
+
* @since 4.0.0
|
|
144
|
+
*/
|
|
145
|
+
export declare const layerAgentOptions: (options?: Https.AgentOptions | undefined) => Layer.Layer<HttpAgent>;
|
|
146
|
+
/**
|
|
147
|
+
* Provides the `HttpAgent` service using default scoped Node `http` and
|
|
148
|
+
* `https` agents.
|
|
149
|
+
*
|
|
150
|
+
* @category layers
|
|
151
|
+
* @since 4.0.0
|
|
152
|
+
*/
|
|
153
|
+
export declare const layerAgent: Layer.Layer<HttpAgent>;
|
|
154
|
+
/**
|
|
155
|
+
* Creates an `HttpClient` backed by Node `http` and `https`, using the
|
|
156
|
+
* current `HttpAgent`, streaming request bodies, and wrapping Node responses
|
|
157
|
+
* as `HttpClientResponse` values.
|
|
158
|
+
*
|
|
159
|
+
* @category constructors
|
|
160
|
+
* @since 4.0.0
|
|
161
|
+
*/
|
|
162
|
+
export declare const makeNodeHttp: Effect.Effect<Client.HttpClient, never, HttpAgent>;
|
|
163
|
+
/**
|
|
164
|
+
* Provides a node:http-backed `HttpClient` using the current `HttpAgent`
|
|
165
|
+
* service.
|
|
166
|
+
*
|
|
167
|
+
* @category layers
|
|
168
|
+
* @since 4.0.0
|
|
169
|
+
*/
|
|
170
|
+
export declare const layerNodeHttpNoAgent: Layer.Layer<Client.HttpClient, never, HttpAgent>;
|
|
171
|
+
/**
|
|
172
|
+
* Provides a node:http-backed `HttpClient` together with default scoped Node
|
|
173
|
+
* `http` and `https` agents.
|
|
174
|
+
*
|
|
175
|
+
* @category layers
|
|
176
|
+
* @since 4.0.0
|
|
177
|
+
*/
|
|
178
|
+
export declare const layerNodeHttp: Layer.Layer<Client.HttpClient>;
|
|
179
|
+
//# sourceMappingURL=NodeHttpClient.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Dispatcher,
|
|
3
|
+
Fetch,
|
|
4
|
+
HttpAgent,
|
|
5
|
+
RequestInit,
|
|
6
|
+
UndiciOptions,
|
|
7
|
+
dispatcherLayerGlobal,
|
|
8
|
+
layer,
|
|
9
|
+
layerAgent,
|
|
10
|
+
layerAgentOptions,
|
|
11
|
+
layerDispatcher,
|
|
12
|
+
layerNodeHttp,
|
|
13
|
+
layerNodeHttpNoAgent,
|
|
14
|
+
layerUndici,
|
|
15
|
+
layerUndiciNoDispatcher,
|
|
16
|
+
makeAgent,
|
|
17
|
+
makeDispatcher,
|
|
18
|
+
makeNodeHttp,
|
|
19
|
+
makeUndici
|
|
20
|
+
} from "../chunk-KOZMM5PZ.js";
|
|
21
|
+
import "../chunk-IIJ52ZU6.js";
|
|
22
|
+
import "../chunk-J7A4CZDO.js";
|
|
23
|
+
import "../chunk-DS7GF46S.js";
|
|
24
|
+
import "../chunk-XH4U3JSV.js";
|
|
25
|
+
import "../chunk-OXNGN5H7.js";
|
|
26
|
+
import "../chunk-MLKGABMK.js";
|
|
27
|
+
export {
|
|
28
|
+
Dispatcher,
|
|
29
|
+
Fetch,
|
|
30
|
+
HttpAgent,
|
|
31
|
+
RequestInit,
|
|
32
|
+
UndiciOptions,
|
|
33
|
+
dispatcherLayerGlobal,
|
|
34
|
+
layerAgent,
|
|
35
|
+
layerAgentOptions,
|
|
36
|
+
layerDispatcher,
|
|
37
|
+
layer as layerFetch,
|
|
38
|
+
layerNodeHttp,
|
|
39
|
+
layerNodeHttpNoAgent,
|
|
40
|
+
layerUndici,
|
|
41
|
+
layerUndiciNoDispatcher,
|
|
42
|
+
makeAgent,
|
|
43
|
+
makeDispatcher,
|
|
44
|
+
makeNodeHttp,
|
|
45
|
+
makeUndici
|
|
46
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapter base for exposing Node `http.IncomingMessage` values as Effect HTTP
|
|
3
|
+
* incoming messages.
|
|
4
|
+
*
|
|
5
|
+
* Server requests and Node client responses both arrive as Node readable
|
|
6
|
+
* streams with raw header objects, socket metadata, and one-shot body
|
|
7
|
+
* consumption. This module's `NodeHttpIncomingMessage` class keeps the original
|
|
8
|
+
* Node message available while presenting Effect's `HttpIncomingMessage` shape:
|
|
9
|
+
* typed headers, remote address lookup, stream access, and text, JSON,
|
|
10
|
+
* URL-encoded, and array-buffer body readers.
|
|
11
|
+
*
|
|
12
|
+
* @since 4.0.0
|
|
13
|
+
*/
|
|
14
|
+
import * as Effect from "effect/Effect";
|
|
15
|
+
import * as Inspectable from "effect/Inspectable";
|
|
16
|
+
import * as Option from "effect/Option";
|
|
17
|
+
import type * as Schema from "effect/Schema";
|
|
18
|
+
import type * as Stream from "effect/Stream";
|
|
19
|
+
import * as Headers from "effect/unstable/http/Headers";
|
|
20
|
+
import * as IncomingMessage from "effect/unstable/http/HttpIncomingMessage";
|
|
21
|
+
import * as UrlParams from "effect/unstable/http/UrlParams";
|
|
22
|
+
import type * as Http from "node:http";
|
|
23
|
+
/**
|
|
24
|
+
* Adapts a Node `IncomingMessage` to Effect HTTP incoming messages.
|
|
25
|
+
*
|
|
26
|
+
* **When to use**
|
|
27
|
+
*
|
|
28
|
+
* Use to implement Node HTTP request or response adapters that expose the
|
|
29
|
+
* Effect HTTP incoming-message interface.
|
|
30
|
+
*
|
|
31
|
+
* **Details**
|
|
32
|
+
*
|
|
33
|
+
* The adapter exposes headers, remote address, stream access, and cached body
|
|
34
|
+
* decoders. Subclasses provide the error mapping for unknown Node errors.
|
|
35
|
+
*
|
|
36
|
+
* @category constructors
|
|
37
|
+
* @since 4.0.0
|
|
38
|
+
*/
|
|
39
|
+
export declare abstract class NodeHttpIncomingMessage<E> extends Inspectable.Class implements IncomingMessage.HttpIncomingMessage<E> {
|
|
40
|
+
/**
|
|
41
|
+
* Marks this value as an HTTP incoming message for runtime guards.
|
|
42
|
+
*
|
|
43
|
+
* @since 4.0.0
|
|
44
|
+
*/
|
|
45
|
+
readonly [IncomingMessage.TypeId]: typeof IncomingMessage.TypeId;
|
|
46
|
+
readonly source: Http.IncomingMessage;
|
|
47
|
+
readonly onError: (error: unknown) => E;
|
|
48
|
+
readonly remoteAddressOverride?: Option.Option<string> | undefined;
|
|
49
|
+
constructor(source: Http.IncomingMessage, onError: (error: unknown) => E, remoteAddressOverride?: Option.Option<string>);
|
|
50
|
+
get headers(): Headers.Headers;
|
|
51
|
+
get remoteAddress(): Option.Option<string>;
|
|
52
|
+
private textEffect;
|
|
53
|
+
get text(): Effect.Effect<string, E>;
|
|
54
|
+
get textUnsafe(): string;
|
|
55
|
+
get json(): Effect.Effect<Schema.Json, E>;
|
|
56
|
+
get jsonUnsafe(): Schema.Json;
|
|
57
|
+
get urlParamsBody(): Effect.Effect<UrlParams.UrlParams, E>;
|
|
58
|
+
get stream(): Stream.Stream<Uint8Array, E>;
|
|
59
|
+
private arrayBufferEffect;
|
|
60
|
+
get arrayBuffer(): Effect.Effect<ArrayBuffer, E>;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=NodeHttpIncomingMessage.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Layer from "effect/Layer";
|
|
3
|
+
import * as EtagImpl from "effect/unstable/http/Etag";
|
|
4
|
+
import * as HttpBody from "effect/unstable/http/HttpBody";
|
|
5
|
+
import * as Platform from "effect/unstable/http/HttpPlatform";
|
|
6
|
+
import * as ServerResponse from "effect/unstable/http/HttpServerResponse";
|
|
7
|
+
/**
|
|
8
|
+
* Creates the Node `HttpPlatform`, serving file responses from Node readable
|
|
9
|
+
* streams and adding MIME type and content-length headers when needed.
|
|
10
|
+
*
|
|
11
|
+
* @category constructors
|
|
12
|
+
* @since 4.0.0
|
|
13
|
+
*/
|
|
14
|
+
export declare const make: Effect.Effect<{
|
|
15
|
+
readonly platform: "deno" | "node" | "bun" | "web";
|
|
16
|
+
readonly compression: Platform.Compression;
|
|
17
|
+
readonly fileResponse: (path: string, options?: ServerResponse.Options.WithContent & {
|
|
18
|
+
readonly bytesToRead?: import("effect/ByteSize").Input | undefined;
|
|
19
|
+
readonly chunkSize?: number | undefined;
|
|
20
|
+
readonly offset?: import("effect/ByteSize").Input | undefined;
|
|
21
|
+
}) => Effect.Effect<ServerResponse.HttpServerResponse, import("effect/PlatformError").PlatformError>;
|
|
22
|
+
readonly fileWebResponse: (file: HttpBody.HttpBody.FileLike, options?: ServerResponse.Options.WithContent & {
|
|
23
|
+
readonly bytesToRead?: number | undefined;
|
|
24
|
+
readonly chunkSize?: number | undefined;
|
|
25
|
+
readonly offset?: number | undefined;
|
|
26
|
+
}) => Effect.Effect<ServerResponse.HttpServerResponse>;
|
|
27
|
+
}, never, import("effect/FileSystem").FileSystem | EtagImpl.Generator>;
|
|
28
|
+
/**
|
|
29
|
+
* Provides the Node `HttpPlatform` together with the filesystem and ETag
|
|
30
|
+
* services it needs for file responses.
|
|
31
|
+
*
|
|
32
|
+
* @category layers
|
|
33
|
+
* @since 4.0.0
|
|
34
|
+
*/
|
|
35
|
+
export declare const layer: Layer.Layer<Platform.HttpPlatform>;
|
|
36
|
+
//# sourceMappingURL=NodeHttpPlatform.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layer,
|
|
3
|
+
make
|
|
4
|
+
} from "../chunk-VANKHF46.js";
|
|
5
|
+
import "../chunk-3GR5VZ2M.js";
|
|
6
|
+
import "../chunk-M32LDTW7.js";
|
|
7
|
+
import "../chunk-BKTBUBQY.js";
|
|
8
|
+
import "../chunk-42QKY6T6.js";
|
|
9
|
+
import "../chunk-DS7GF46S.js";
|
|
10
|
+
import "../chunk-XH4U3JSV.js";
|
|
11
|
+
import "../chunk-OXNGN5H7.js";
|
|
12
|
+
import "../chunk-MLKGABMK.js";
|
|
13
|
+
export {
|
|
14
|
+
layer,
|
|
15
|
+
make
|
|
16
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as Config from "effect/Config";
|
|
2
|
+
import * as Duration from "effect/Duration";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import type * as FileSystem from "effect/FileSystem";
|
|
5
|
+
import { type LazyArg } from "effect/Function";
|
|
6
|
+
import * as Layer from "effect/Layer";
|
|
7
|
+
import type * as Path from "effect/Path";
|
|
8
|
+
import * as Scope from "effect/Scope";
|
|
9
|
+
import * as Etag from "effect/unstable/http/Etag";
|
|
10
|
+
import type { HttpClient } from "effect/unstable/http/HttpClient";
|
|
11
|
+
import type * as Middleware from "effect/unstable/http/HttpMiddleware";
|
|
12
|
+
import type * as HttpPlatform from "effect/unstable/http/HttpPlatform";
|
|
13
|
+
import * as HttpServer from "effect/unstable/http/HttpServer";
|
|
14
|
+
import { ServeError } from "effect/unstable/http/HttpServerError";
|
|
15
|
+
import { HttpServerRequest } from "effect/unstable/http/HttpServerRequest";
|
|
16
|
+
import type { HttpServerResponse } from "effect/unstable/http/HttpServerResponse";
|
|
17
|
+
import * as NetAddress from "effect/unstable/net/NetAddress";
|
|
18
|
+
import * as Http from "node:http";
|
|
19
|
+
import type * as Net from "node:net";
|
|
20
|
+
import type { Duplex } from "node:stream";
|
|
21
|
+
import * as NodeServices from "./NodeServices.ts";
|
|
22
|
+
import { NodeWS } from "./NodeSocket.ts";
|
|
23
|
+
/**
|
|
24
|
+
* Options accepted by the Node `HttpServer` constructors and layers.
|
|
25
|
+
*
|
|
26
|
+
* @category options
|
|
27
|
+
* @since 4.0.0
|
|
28
|
+
*/
|
|
29
|
+
export interface Options extends Net.ListenOptions {
|
|
30
|
+
readonly disablePreemptiveShutdown?: boolean | undefined;
|
|
31
|
+
readonly gracefulShutdownTimeout?: Duration.Input | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Options forwarded to the underlying `ws` `WebSocketServer`, minus the
|
|
34
|
+
* wiring options the server manages itself. Use this to enable
|
|
35
|
+
* `permessage-deflate` compression or tune payload limits, e.g.
|
|
36
|
+
* `websocket: { perMessageDeflate: true }`.
|
|
37
|
+
*/
|
|
38
|
+
readonly websocket?: Omit<NodeWS.ServerOptions, "noServer" | "server" | "host" | "port" | "path"> | undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates a scoped `HttpServer` from a Node `http.Server`, starts listening
|
|
42
|
+
* with the supplied options, registers request and upgrade handling, and closes
|
|
43
|
+
* the server during scope finalization with optional graceful-shutdown control.
|
|
44
|
+
*
|
|
45
|
+
* @category constructors
|
|
46
|
+
* @since 4.0.0
|
|
47
|
+
*/
|
|
48
|
+
export declare const make: (evaluate: LazyArg<Http.Server<typeof Http.IncomingMessage, typeof Http.ServerResponse>>, options: Options) => Effect.Effect<{
|
|
49
|
+
readonly serve: {
|
|
50
|
+
<E, R>(effect: Effect.Effect<HttpServerResponse, E, R>): Effect.Effect<void, never, Exclude<R, HttpServerRequest> | Scope.Scope>;
|
|
51
|
+
<E, R, App extends Effect.Effect<HttpServerResponse, any, any>>(effect: Effect.Effect<HttpServerResponse, E, R>, middleware: Middleware.HttpMiddleware.Applied<App, E, R>): Effect.Effect<void, never, Exclude<R, HttpServerRequest> | Scope.Scope>;
|
|
52
|
+
};
|
|
53
|
+
readonly address: NetAddress.SocketAddress;
|
|
54
|
+
}, ServeError, Scope.Scope>;
|
|
55
|
+
/**
|
|
56
|
+
* Creates a Node `request` event handler for an Effect HTTP application,
|
|
57
|
+
* injecting a `HttpServerRequest` and interrupting the request fiber if the
|
|
58
|
+
* client closes the response before it finishes.
|
|
59
|
+
*
|
|
60
|
+
* @category handlers
|
|
61
|
+
* @since 4.0.0
|
|
62
|
+
*/
|
|
63
|
+
export declare const makeHandler: <R, E, App extends Effect.Effect<HttpServerResponse, any, any> = Effect.Effect<HttpServerResponse, E, R>>(httpEffect: Effect.Effect<HttpServerResponse, E, R>, options: {
|
|
64
|
+
readonly scope: Scope.Scope;
|
|
65
|
+
readonly middleware?: Middleware.HttpMiddleware.Applied<App, E, R> | undefined;
|
|
66
|
+
}) => Effect.Effect<(nodeRequest: Http.IncomingMessage, nodeResponse: Http.ServerResponse) => void, never, Exclude<Effect.Services<App>, HttpServerRequest | Scope.Scope>>;
|
|
67
|
+
/**
|
|
68
|
+
* Creates a Node `upgrade` event handler for an Effect HTTP application,
|
|
69
|
+
* exposing the upgraded WebSocket as the request's `upgrade` effect and
|
|
70
|
+
* interrupting the request fiber when the socket closes early.
|
|
71
|
+
*
|
|
72
|
+
* @category handlers
|
|
73
|
+
* @since 4.0.0
|
|
74
|
+
*/
|
|
75
|
+
export declare const makeUpgradeHandler: <R, E, App extends Effect.Effect<HttpServerResponse, any, any> = Effect.Effect<HttpServerResponse, E, R>>(lazyWss: Effect.Effect<NodeWS.WebSocketServer>, httpEffect: Effect.Effect<HttpServerResponse, E, R>, options: {
|
|
76
|
+
readonly scope: Scope.Scope;
|
|
77
|
+
readonly middleware?: Middleware.HttpMiddleware.Applied<App, E, R> | undefined;
|
|
78
|
+
}) => Effect.Effect<(nodeRequest: Http.IncomingMessage, socket: Duplex, head: Buffer) => void, never, Exclude<Effect.Services<App>, HttpServerRequest | Scope.Scope>>;
|
|
79
|
+
/**
|
|
80
|
+
* Provides an `HttpServer` by creating and managing a scoped Node
|
|
81
|
+
* `http.Server` with the supplied listen and shutdown options.
|
|
82
|
+
*
|
|
83
|
+
* @category layers
|
|
84
|
+
* @since 4.0.0
|
|
85
|
+
*/
|
|
86
|
+
export declare const layerServer: (evaluate: LazyArg<Http.Server<typeof Http.IncomingMessage, typeof Http.ServerResponse>>, options: Options) => Layer.Layer<HttpServer.HttpServer, ServeError>;
|
|
87
|
+
/**
|
|
88
|
+
* Provides the Node HTTP support services used by `NodeHttpServer`, including
|
|
89
|
+
* the HTTP platform, ETag generator, and core Node platform services.
|
|
90
|
+
*
|
|
91
|
+
* @category layers
|
|
92
|
+
* @since 4.0.0
|
|
93
|
+
*/
|
|
94
|
+
export declare const layerHttpServices: Layer.Layer<NodeServices.NodeServices | HttpPlatform.HttpPlatform | Etag.Generator>;
|
|
95
|
+
/**
|
|
96
|
+
* Provides a Node `HttpServer` together with the Node HTTP platform, ETag, and
|
|
97
|
+
* core platform services required to serve requests.
|
|
98
|
+
*
|
|
99
|
+
* @category layers
|
|
100
|
+
* @since 4.0.0
|
|
101
|
+
*/
|
|
102
|
+
export declare const layer: (evaluate: LazyArg<Http.Server>, options: Options) => Layer.Layer<HttpServer.HttpServer | NodeServices.NodeServices | HttpPlatform.HttpPlatform | Etag.Generator, ServeError>;
|
|
103
|
+
/**
|
|
104
|
+
* Provides a Node `HttpServer` together with the Node HTTP platform, ETag,
|
|
105
|
+
* and core Node platform services, reading the listen and shutdown options from
|
|
106
|
+
* a `Config` value.
|
|
107
|
+
*
|
|
108
|
+
* @category layers
|
|
109
|
+
* @since 4.0.0
|
|
110
|
+
*/
|
|
111
|
+
export declare const layerConfig: (evaluate: LazyArg<Http.Server>, options: Config.Wrap<Options>) => Layer.Layer<HttpServer.HttpServer | NodeServices.NodeServices | HttpPlatform.HttpPlatform | Etag.Generator, ServeError | Config.ConfigError>;
|
|
112
|
+
/**
|
|
113
|
+
* Provides a test HTTP server listening on an ephemeral port together with a
|
|
114
|
+
* Fetch-backed `HttpClient` configured for server integration tests.
|
|
115
|
+
*
|
|
116
|
+
* @category testing
|
|
117
|
+
* @since 4.0.0
|
|
118
|
+
*/
|
|
119
|
+
export declare const layerTest: Layer.Layer<HttpServer.HttpServer | FileSystem.FileSystem | Path.Path | HttpPlatform.HttpPlatform | Etag.Generator | HttpClient, ServeError, never>;
|
|
120
|
+
//# sourceMappingURL=NodeHttpServer.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layer,
|
|
3
|
+
layerConfig,
|
|
4
|
+
layerHttpServices,
|
|
5
|
+
layerServer,
|
|
6
|
+
layerTest,
|
|
7
|
+
make,
|
|
8
|
+
makeHandler,
|
|
9
|
+
makeUpgradeHandler
|
|
10
|
+
} from "../chunk-SIR62W3Y.js";
|
|
11
|
+
import "../chunk-5ZMHBXIK.js";
|
|
12
|
+
import "../chunk-GXCHI7BM.js";
|
|
13
|
+
import "../chunk-2Y7WC4KU.js";
|
|
14
|
+
import "../chunk-AMQKOQNT.js";
|
|
15
|
+
import "../chunk-KUUXSID7.js";
|
|
16
|
+
import "../chunk-B3FZ67QU.js";
|
|
17
|
+
import "../chunk-XDKNKFBW.js";
|
|
18
|
+
import "../chunk-TXKLEBBL.js";
|
|
19
|
+
import "../chunk-TFIKFFSC.js";
|
|
20
|
+
import "../chunk-54RLBMTZ.js";
|
|
21
|
+
import "../chunk-QYBKAIA6.js";
|
|
22
|
+
import "../chunk-QPLDT6A6.js";
|
|
23
|
+
import "../chunk-EGBNVEEW.js";
|
|
24
|
+
import "../chunk-JJ24ARBQ.js";
|
|
25
|
+
import "../chunk-VZBDV3TV.js";
|
|
26
|
+
import "../chunk-UFH5UUZK.js";
|
|
27
|
+
import "../chunk-J7A4CZDO.js";
|
|
28
|
+
import "../chunk-VANKHF46.js";
|
|
29
|
+
import "../chunk-3GR5VZ2M.js";
|
|
30
|
+
import "../chunk-M32LDTW7.js";
|
|
31
|
+
import "../chunk-BKTBUBQY.js";
|
|
32
|
+
import "../chunk-42QKY6T6.js";
|
|
33
|
+
import "../chunk-DS7GF46S.js";
|
|
34
|
+
import "../chunk-XH4U3JSV.js";
|
|
35
|
+
import "../chunk-OXNGN5H7.js";
|
|
36
|
+
import "../chunk-MLKGABMK.js";
|
|
37
|
+
export {
|
|
38
|
+
layer,
|
|
39
|
+
layerConfig,
|
|
40
|
+
layerHttpServices,
|
|
41
|
+
layerServer,
|
|
42
|
+
layerTest,
|
|
43
|
+
make,
|
|
44
|
+
makeHandler,
|
|
45
|
+
makeUpgradeHandler
|
|
46
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessors for the Node.js objects behind an Effect HTTP server request.
|
|
3
|
+
*
|
|
4
|
+
* `toIncomingMessage` returns the underlying Node `http.IncomingMessage`.
|
|
5
|
+
* `toServerResponse` returns the underlying Node `http.ServerResponse`,
|
|
6
|
+
* evaluating the stored response thunk when the response was created lazily.
|
|
7
|
+
*
|
|
8
|
+
* @since 4.0.0
|
|
9
|
+
*/
|
|
10
|
+
import type { HttpServerRequest } from "effect/unstable/http/HttpServerRequest";
|
|
11
|
+
import type * as Http from "node:http";
|
|
12
|
+
/**
|
|
13
|
+
* Returns the underlying Node `IncomingMessage` for a platform Node
|
|
14
|
+
* `HttpServerRequest`.
|
|
15
|
+
*
|
|
16
|
+
* @category accessors
|
|
17
|
+
* @since 4.0.0
|
|
18
|
+
*/
|
|
19
|
+
export declare const toIncomingMessage: (self: HttpServerRequest) => Http.IncomingMessage;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the underlying Node `ServerResponse` for a platform Node
|
|
22
|
+
* `HttpServerRequest`, evaluating the stored response thunk when the response
|
|
23
|
+
* was created lazily.
|
|
24
|
+
*
|
|
25
|
+
* @category accessors
|
|
26
|
+
* @since 4.0.0
|
|
27
|
+
*/
|
|
28
|
+
export declare const toServerResponse: (self: HttpServerRequest) => Http.ServerResponse;
|
|
29
|
+
//# sourceMappingURL=NodeHttpServerRequest.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node.js multipart parsing for HTTP `multipart/form-data` request bodies.
|
|
3
|
+
*
|
|
4
|
+
* `NodeMultipart` adapts a Node `Readable` plus incoming HTTP headers into
|
|
5
|
+
* Effect's shared multipart model. It can expose form parts as a stream or
|
|
6
|
+
* collect a complete persisted form by writing file uploads to scoped temporary
|
|
7
|
+
* files through the current `FileSystem` and `Path` services. `fileToReadable`
|
|
8
|
+
* returns the underlying Node readable stream for file parts produced by this
|
|
9
|
+
* parser.
|
|
10
|
+
*
|
|
11
|
+
* @since 4.0.0
|
|
12
|
+
*/
|
|
13
|
+
import * as Effect from "effect/Effect";
|
|
14
|
+
import type * as FileSystem from "effect/FileSystem";
|
|
15
|
+
import type * as Path from "effect/Path";
|
|
16
|
+
import type * as Scope from "effect/Scope";
|
|
17
|
+
import * as Stream from "effect/Stream";
|
|
18
|
+
import * as Multipart from "effect/unstable/http/Multipart";
|
|
19
|
+
import type { IncomingHttpHeaders } from "node:http";
|
|
20
|
+
import type { Readable } from "node:stream";
|
|
21
|
+
/**
|
|
22
|
+
* Parses multipart data from a Node readable request body and headers into a
|
|
23
|
+
* stream of `Multipart.Part` values, converting parser failures to
|
|
24
|
+
* `MultipartError`.
|
|
25
|
+
*
|
|
26
|
+
* @category constructors
|
|
27
|
+
* @since 4.0.0
|
|
28
|
+
*/
|
|
29
|
+
export declare const stream: (source: Readable, headers: IncomingHttpHeaders) => Stream.Stream<Multipart.Part, Multipart.MultipartError>;
|
|
30
|
+
/**
|
|
31
|
+
* Parses multipart data from a Node readable request body and persists file
|
|
32
|
+
* parts using the current `FileSystem`, `Path`, and `Scope` services.
|
|
33
|
+
*
|
|
34
|
+
* @category constructors
|
|
35
|
+
* @since 4.0.0
|
|
36
|
+
*/
|
|
37
|
+
export declare const persisted: (source: Readable, headers: IncomingHttpHeaders) => Effect.Effect<Multipart.Persisted, Multipart.MultipartError, Scope.Scope | FileSystem.FileSystem | Path.Path>;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the underlying Node readable stream for a multipart file produced by
|
|
40
|
+
* the Node multipart parser.
|
|
41
|
+
*
|
|
42
|
+
* @category converting
|
|
43
|
+
* @since 4.0.0
|
|
44
|
+
*/
|
|
45
|
+
export declare const fileToReadable: (file: Multipart.File) => Readable;
|
|
46
|
+
//# sourceMappingURL=NodeMultipart.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fileToReadable,
|
|
3
|
+
persisted,
|
|
4
|
+
stream
|
|
5
|
+
} from "../chunk-GXCHI7BM.js";
|
|
6
|
+
import "../chunk-2Y7WC4KU.js";
|
|
7
|
+
import "../chunk-DS7GF46S.js";
|
|
8
|
+
import "../chunk-XH4U3JSV.js";
|
|
9
|
+
import "../chunk-OXNGN5H7.js";
|
|
10
|
+
import "../chunk-MLKGABMK.js";
|
|
11
|
+
export {
|
|
12
|
+
fileToReadable,
|
|
13
|
+
persisted,
|
|
14
|
+
stream
|
|
15
|
+
};
|