@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,391 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one operating-system sandbox every confined process goes through.
|
|
3
|
+
*
|
|
4
|
+
* A caller resolves what a run may touch, a {@link Request}: the network
|
|
5
|
+
* posture, the read and write sets, and optionally which mechanism it wants.
|
|
6
|
+
* This module turns the request into an argv the host enforces, or into an
|
|
7
|
+
* {@link Unenforceable} refusal naming what the host lacks. Two callers share
|
|
8
|
+
* it: the build graph confines every target's tool run under its declared
|
|
9
|
+
* inputs and outputs (`@smthrs/targets/ExecSandbox`), and the Node
|
|
10
|
+
* `ProcessConfinement` confines every approved agent command under the
|
|
11
|
+
* grants in force.
|
|
12
|
+
*
|
|
13
|
+
* Three mechanisms, one contract:
|
|
14
|
+
*
|
|
15
|
+
* - Linux: bubblewrap. An empty root contains only enumerated system/runtime
|
|
16
|
+
* paths and declared reads and writes. The workspace and root are remounted
|
|
17
|
+
* read-only after mounting grants. A private tmp supplies HOME. The network
|
|
18
|
+
* namespace is unshared unless explicitly opened; loopback-only is refused.
|
|
19
|
+
* - macOS: seatbelt (`sandbox-exec`). Host reads are denied except enumerated
|
|
20
|
+
* system/runtime paths, declared inputs, external reads, writes and private
|
|
21
|
+
* tmp. Host credential locations are re-closed under broad grants. Writes
|
|
22
|
+
* and network access are denied except what the request opens.
|
|
23
|
+
* - Docker: `docker run` with a read-only root, declared reads mounted
|
|
24
|
+
* read-only at their host paths, declared writes read-write, `--network
|
|
25
|
+
* none` unless the request opens it. The image supplies the toolchain. It is
|
|
26
|
+
* the path on Windows and on any host without the native mechanism.
|
|
27
|
+
*
|
|
28
|
+
* Every declared confinement is enforced or the caller fails closed. Nothing
|
|
29
|
+
* here logs "unenforced" and carries on; the one caller that may run
|
|
30
|
+
* unconfined when no mechanism exists, `ProcessConfinement`, says so in its
|
|
31
|
+
* own options and never on this module's behalf.
|
|
32
|
+
*
|
|
33
|
+
* @since 1.0.0-rc.1
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* The network posture a run is confined to. `"none"` closes IP networking.
|
|
37
|
+
* Build tools retain host Unix sockets by default. Native agent confinement
|
|
38
|
+
* additionally closes host Unix sockets regardless of the IP posture, except
|
|
39
|
+
* macOS's system DNS resolver endpoint when IP networking is open, and
|
|
40
|
+
* refuses all Linux socket creation when IP networking is closed;
|
|
41
|
+
* socketpair remains available for communication inside the process family.
|
|
42
|
+
*
|
|
43
|
+
* @category models
|
|
44
|
+
* @since 1.0.0-rc.1
|
|
45
|
+
*/
|
|
46
|
+
export type Network = "none" | "loopback" | "open";
|
|
47
|
+
/**
|
|
48
|
+
* Which mechanism a request asks for. Absent means the platform's native
|
|
49
|
+
* mechanism: bubblewrap on Linux, seatbelt on macOS.
|
|
50
|
+
*
|
|
51
|
+
* @category models
|
|
52
|
+
* @since 1.0.0-rc.1
|
|
53
|
+
*/
|
|
54
|
+
export type Selection = {
|
|
55
|
+
readonly _tag: "bubblewrap";
|
|
56
|
+
} | {
|
|
57
|
+
readonly _tag: "docker";
|
|
58
|
+
readonly image: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* What a caller asks for: the network posture, the mechanism choice, and the
|
|
62
|
+
* read and write sets. Every path is workspace-relative and posix-shaped;
|
|
63
|
+
* a read may name a file or a directory, a write names a directory. A
|
|
64
|
+
* `readOnly` entry re-closes a subtree under a declared write.
|
|
65
|
+
*
|
|
66
|
+
* @category models
|
|
67
|
+
* @since 1.0.0-rc.1
|
|
68
|
+
*/
|
|
69
|
+
export interface Request {
|
|
70
|
+
readonly network: Network;
|
|
71
|
+
/** Whether host Unix sockets are permitted; defaults to true for build tools. */
|
|
72
|
+
readonly unixSockets?: boolean | undefined;
|
|
73
|
+
/** Closed-by-default process and IPC policy for untrusted native commands. */
|
|
74
|
+
readonly strict?: boolean | undefined;
|
|
75
|
+
readonly mechanism?: Selection | undefined;
|
|
76
|
+
readonly reads: ReadonlyArray<string>;
|
|
77
|
+
readonly writes: ReadonlyArray<string>;
|
|
78
|
+
/**
|
|
79
|
+
* Declared outputs whose leaf is a file rather than a directory. A file
|
|
80
|
+
* cannot be bound writable on its own and does not exist before the tool
|
|
81
|
+
* writes it, so its parent directory becomes the writable bind. Kept apart
|
|
82
|
+
* from `writes` because only the caller knows which of the two a
|
|
83
|
+
* declaration meant: inferring it from the path would hand a not-yet-created
|
|
84
|
+
* `.cargo-home` or `dist.new` its parent, and a parent that is the
|
|
85
|
+
* workspace root opens the whole workspace for the run.
|
|
86
|
+
*/
|
|
87
|
+
readonly writeFiles?: ReadonlyArray<string> | undefined;
|
|
88
|
+
readonly readOnly?: ReadonlyArray<string> | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Absolute host paths outside the workspace the tool reads: a git
|
|
91
|
+
* submodule's local source repository, for one. Bound read-only where the
|
|
92
|
+
* mechanism would otherwise hide them; a path that does not exist, or that
|
|
93
|
+
* sits inside the workspace, is dropped.
|
|
94
|
+
*/
|
|
95
|
+
readonly externalReads?: ReadonlyArray<string> | undefined;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The host facts mechanism selection reads. Injectable so every platform's
|
|
99
|
+
* argv can be tested on every other platform.
|
|
100
|
+
*
|
|
101
|
+
* @category models
|
|
102
|
+
* @since 1.0.0-rc.1
|
|
103
|
+
*/
|
|
104
|
+
export interface Host {
|
|
105
|
+
readonly platform: NodeJS.Platform;
|
|
106
|
+
/** Selected Xcode developer tree on a macOS runner. */
|
|
107
|
+
readonly developerDirectory?: string | undefined;
|
|
108
|
+
/** The real host home, used to mask credentials and locate runtime caches. */
|
|
109
|
+
readonly home?: string | undefined;
|
|
110
|
+
/** Resolves an executable name on `PATH` to an absolute path, or nothing. */
|
|
111
|
+
readonly executable: (name: string) => string | undefined;
|
|
112
|
+
/** Whether a host path exists. */
|
|
113
|
+
readonly exists: (path: string) => boolean;
|
|
114
|
+
/** Whether a host path is a directory. */
|
|
115
|
+
readonly isDirectory: (path: string) => boolean;
|
|
116
|
+
/** Tests the entry itself, including dangling links; defaults to the real host. */
|
|
117
|
+
readonly isSymbolicLink?: ((path: string) => boolean) | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* The names of a directory's direct children, or undefined when the host
|
|
120
|
+
* cannot list it. Optional: a host without it keeps every declared file as
|
|
121
|
+
* its own entry, which is correct and merely long.
|
|
122
|
+
*/
|
|
123
|
+
readonly entries?: ((directory: string) => ReadonlyArray<string> | undefined) | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Where a path's bytes actually live once every symbolic link on it is
|
|
126
|
+
* followed, or `undefined` when the host cannot say. Write validation uses
|
|
127
|
+
* the real host when this probe is omitted and refuses unresolved existing
|
|
128
|
+
* paths. Read aliases are only collected when this probe is supplied.
|
|
129
|
+
*/
|
|
130
|
+
readonly realpath?: ((path: string) => string | undefined) | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* The program a package-manager shim script runs: the absolute path on the
|
|
133
|
+
* `# cmd-shim-target=` line pnpm's cmd-shim writes, or `undefined` for any
|
|
134
|
+
* other file. Optional: a host without it treats a shim as the program.
|
|
135
|
+
*/
|
|
136
|
+
readonly shimTarget?: ((path: string) => string | undefined) | undefined;
|
|
137
|
+
readonly uid: number | undefined;
|
|
138
|
+
readonly gid: number | undefined;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* One selected enforcement mechanism.
|
|
142
|
+
*
|
|
143
|
+
* @category models
|
|
144
|
+
* @since 1.0.0-rc.1
|
|
145
|
+
*/
|
|
146
|
+
export type Mechanism = {
|
|
147
|
+
readonly _tag: "bubblewrap";
|
|
148
|
+
readonly executable: string;
|
|
149
|
+
} | {
|
|
150
|
+
readonly _tag: "seatbelt";
|
|
151
|
+
readonly executable: string;
|
|
152
|
+
} | {
|
|
153
|
+
readonly _tag: "docker";
|
|
154
|
+
readonly executable: string;
|
|
155
|
+
readonly image: string;
|
|
156
|
+
} | {
|
|
157
|
+
readonly _tag: "none";
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* The refusal a host that cannot enforce a declared confinement produces.
|
|
161
|
+
* `mechanism` names what was selected, `missing` what the host lacks.
|
|
162
|
+
*
|
|
163
|
+
* @category models
|
|
164
|
+
* @since 1.0.0-rc.1
|
|
165
|
+
*/
|
|
166
|
+
export interface Unenforceable {
|
|
167
|
+
readonly _tag: "@smthrs/platform-node/SandboxUnenforceable";
|
|
168
|
+
readonly platform: NodeJS.Platform;
|
|
169
|
+
readonly mechanism: string;
|
|
170
|
+
readonly missing: string;
|
|
171
|
+
readonly message: string;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Checks for an {@link Unenforceable} refusal.
|
|
175
|
+
*
|
|
176
|
+
* @category guards
|
|
177
|
+
* @since 1.0.0-rc.1
|
|
178
|
+
*/
|
|
179
|
+
export declare const isUnenforceable: (value: unknown) => value is Unenforceable;
|
|
180
|
+
/**
|
|
181
|
+
* Builds an {@link Unenforceable} refusal.
|
|
182
|
+
*
|
|
183
|
+
* @category constructors
|
|
184
|
+
* @since 1.0.0-rc.1
|
|
185
|
+
*/
|
|
186
|
+
export declare const unenforceable: (platform: NodeJS.Platform, mechanism: string, missing: string, detail: string) => Unenforceable;
|
|
187
|
+
/**
|
|
188
|
+
* The resolved confinement one spawn runs under. Every path is absolute and
|
|
189
|
+
* canonical.
|
|
190
|
+
*
|
|
191
|
+
* @category models
|
|
192
|
+
* @since 1.0.0-rc.1
|
|
193
|
+
*/
|
|
194
|
+
export interface Plan {
|
|
195
|
+
readonly mechanism: Exclude<Mechanism, {
|
|
196
|
+
readonly _tag: "none";
|
|
197
|
+
}>;
|
|
198
|
+
readonly network: Network;
|
|
199
|
+
/** Whether host Unix sockets are permitted; defaults to true for build tools. */
|
|
200
|
+
readonly unixSockets?: boolean | undefined;
|
|
201
|
+
/** Closed-by-default process and IPC policy for untrusted native commands. */
|
|
202
|
+
readonly strict?: boolean | undefined;
|
|
203
|
+
readonly workspaceRoot: string;
|
|
204
|
+
readonly cwd: string;
|
|
205
|
+
readonly reads: ReadonlyArray<string>;
|
|
206
|
+
/**
|
|
207
|
+
* Paths inside a granted directory that the declaration did not cover,
|
|
208
|
+
* re-closed after the grant. Only a mechanism with deny rules (seatbelt)
|
|
209
|
+
* folds; the others keep every declared file as its own entry.
|
|
210
|
+
*/
|
|
211
|
+
readonly readDenies: ReadonlyArray<string>;
|
|
212
|
+
readonly writes: ReadonlyArray<string>;
|
|
213
|
+
readonly readOnly: ReadonlyArray<string>;
|
|
214
|
+
/**
|
|
215
|
+
* Where a declared read's bytes actually live when the path reaches them
|
|
216
|
+
* through a symbolic link that leaves the workspace.
|
|
217
|
+
*
|
|
218
|
+
* Bubblewrap needs them because it replaces `/tmp` with a private tmpfs, so
|
|
219
|
+
* a link into the host's `/tmp` (the scratch tree's `node_modules`, which
|
|
220
|
+
* points back at the real workspace) resolves to nothing inside the sandbox.
|
|
221
|
+
* Binding the real location read-only makes the link resolve to the same
|
|
222
|
+
* bytes the host sees, which is what declaring the read asked for. Docker
|
|
223
|
+
* mounts them for the same reason: the image supplies everything outside
|
|
224
|
+
* the workspace, and these paths are on the host. Seatbelt leaves the host
|
|
225
|
+
* filesystem in place but must grant the resolved spelling too. The
|
|
226
|
+
* request's own `externalReads` land here too.
|
|
227
|
+
*/
|
|
228
|
+
readonly externalReads: ReadonlyArray<string>;
|
|
229
|
+
/** A host directory the run may scribble in; created by the caller, removed after. */
|
|
230
|
+
readonly tmp: string;
|
|
231
|
+
readonly uid: number | undefined;
|
|
232
|
+
readonly gid: number | undefined;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* The real host: platform, `PATH` lookup, and filesystem probes.
|
|
236
|
+
*
|
|
237
|
+
* @category resolution
|
|
238
|
+
* @since 0.1.0
|
|
239
|
+
*/
|
|
240
|
+
export declare const host: (env?: Readonly<Record<string, string | undefined>>) => Host;
|
|
241
|
+
/**
|
|
242
|
+
* Selects the mechanism a request runs under on a host.
|
|
243
|
+
*
|
|
244
|
+
* A docker selection is honored when `docker` is on `PATH` and refused
|
|
245
|
+
* otherwise; a bubblewrap selection is refused off Linux. With no selection
|
|
246
|
+
* the platform decides: bubblewrap on Linux, seatbelt on macOS, and a refusal
|
|
247
|
+
* elsewhere, because Windows has no user-level process sandbox and Docker
|
|
248
|
+
* needs an image only the caller can name.
|
|
249
|
+
*
|
|
250
|
+
* @category resolution
|
|
251
|
+
* @since 1.0.0-rc.1
|
|
252
|
+
*/
|
|
253
|
+
export declare const select: (request: Pick<Request, "network" | "mechanism">, hostFacts: Host) => Exclude<Mechanism, {
|
|
254
|
+
readonly _tag: "none";
|
|
255
|
+
}> | Unenforceable;
|
|
256
|
+
/**
|
|
257
|
+
* Rechecks write grants before directory creation and before rendering. Throws
|
|
258
|
+
* an {@link Unenforceable} refusal if a path changed since planning. Callers
|
|
259
|
+
* must keep the workspace stable until the operating system consumes mounts.
|
|
260
|
+
*
|
|
261
|
+
* @category resolution
|
|
262
|
+
* @since 0.1.0
|
|
263
|
+
*/
|
|
264
|
+
export declare const validateWrites: (confinement: Plan, hostFacts?: Host) => void;
|
|
265
|
+
/**
|
|
266
|
+
* Resolves a request against a workspace into a {@link Plan}, or refuses.
|
|
267
|
+
*
|
|
268
|
+
* Every relative path is anchored at the canonical workspace root; one that
|
|
269
|
+
* escapes the workspace is dropped, because the sandbox never grants anything
|
|
270
|
+
* outside the tree the key covers. Reads that do not exist are dropped too:
|
|
271
|
+
* bubblewrap cannot bind a missing path, and a declared input that vanished is
|
|
272
|
+
* the executor's measurement failure, not this module's. A write containing
|
|
273
|
+
* any symbolic link below the canonical root is refused, including a missing
|
|
274
|
+
* output below a linked ancestor.
|
|
275
|
+
*
|
|
276
|
+
* @category resolution
|
|
277
|
+
* @since 0.1.0
|
|
278
|
+
*/
|
|
279
|
+
export declare const plan: (request: Request, location: {
|
|
280
|
+
readonly workspaceRoot: string;
|
|
281
|
+
readonly cwd: string;
|
|
282
|
+
readonly tmp: string;
|
|
283
|
+
}, hostFacts: Host) => Plan | Unenforceable;
|
|
284
|
+
/**
|
|
285
|
+
* Environment the confined process receives on top of the tool environment:
|
|
286
|
+
* a private temporary directory and home, so nothing a tool caches lands in
|
|
287
|
+
* the real home or the shared temp directory.
|
|
288
|
+
*
|
|
289
|
+
* `COREPACK_HOME` is the one host cache kept: it holds the package-manager
|
|
290
|
+
* program a corepack shim execs, the run may only read it (the mechanisms
|
|
291
|
+
* deny writes outside the workspace), and without it a confined `pnpm` is a
|
|
292
|
+
* shim with nothing to run. A non-default cache location requires an explicit
|
|
293
|
+
* `externalReads` grant; preserving the variable does not grant access.
|
|
294
|
+
*
|
|
295
|
+
* @category rendering
|
|
296
|
+
* @since 0.1.0
|
|
297
|
+
*/
|
|
298
|
+
export declare const environment: (confinement: Plan, hostEnv?: Readonly<Record<string, string | undefined>>, hostHome?: string) => Readonly<Record<string, string>>;
|
|
299
|
+
/**
|
|
300
|
+
* The program a confined run execs, made reachable inside its empty root.
|
|
301
|
+
*
|
|
302
|
+
* Bubblewrap resolves a bare program name with `execvp` against `PATH` inside
|
|
303
|
+
* the new root, and that root holds only the runtime paths and the declared
|
|
304
|
+
* sets. A package manager installed outside them — pnpm under the
|
|
305
|
+
* `pnpm/action-setup` prefix on a CI runner, a `.bin` link into a
|
|
306
|
+
* `node_modules` tree — is on the host `PATH` and absent from the sandbox, so
|
|
307
|
+
* the run died with `bwrap: execvp pnpm` before the tool started (#3140).
|
|
308
|
+
*
|
|
309
|
+
* A bare name is resolved on the tool's `PATH` (the host's when none is
|
|
310
|
+
* given). A program already inside a granted path is left exactly as spelled,
|
|
311
|
+
* so a multi-call binary keeps the name it dispatches on, and so is one inside
|
|
312
|
+
* the workspace, whose reads only the declaration may open. Otherwise the run
|
|
313
|
+
* execs the program's real file, and the nearest package directory holding it
|
|
314
|
+
* (its `package.json`, at most three levels up, never the home or the root)
|
|
315
|
+
* is bound read-only, because a script like `pnpm.cjs` loads its siblings.
|
|
316
|
+
* With no package directory only the real file is bound. A name that resolves
|
|
317
|
+
* nowhere is left for `execvp` to report.
|
|
318
|
+
*
|
|
319
|
+
* A package-manager shim script is followed like a link. `pnpm self-update`
|
|
320
|
+
* under `pnpm/action-setup` installs pnpm as a cmd-shim in `$PNPM_HOME/bin`
|
|
321
|
+
* that runs node on a package in pnpm's global store, a path relative to the
|
|
322
|
+
* script; binding the script alone left that package missing. When the
|
|
323
|
+
* program the shim names is executable, the run execs its real file and binds
|
|
324
|
+
* its package as above.
|
|
325
|
+
*
|
|
326
|
+
* @since 1.0.0
|
|
327
|
+
* @private
|
|
328
|
+
*/
|
|
329
|
+
export declare const launcher: (program: string, searchPath: string | undefined, granted: ReadonlyArray<string>, workspaceRoot: string, hostFacts: Host) => {
|
|
330
|
+
readonly program: string;
|
|
331
|
+
readonly reads: ReadonlyArray<string>;
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* The bubblewrap argv for a plan.
|
|
335
|
+
*
|
|
336
|
+
* Order matters: bubblewrap applies operations in argument order, so the
|
|
337
|
+
* empty root goes first, runtime paths are bound, the workspace tmpfs shadows
|
|
338
|
+
* any broad runtime grant, declared paths are bound on top, and re-closed
|
|
339
|
+
* subtrees are bound read-only over their writable parents. The tmpfs is
|
|
340
|
+
* remounted read-only last so an undeclared write
|
|
341
|
+
* under the workspace fails with `EROFS` instead of vanishing into the tmpfs.
|
|
342
|
+
*
|
|
343
|
+
* @category rendering
|
|
344
|
+
* @since 0.1.0
|
|
345
|
+
*/
|
|
346
|
+
export declare const bubblewrap: (confinement: Plan, argv: ReadonlyArray<string>, hostFacts?: Host, searchPath?: string | undefined) => ReadonlyArray<string>;
|
|
347
|
+
/**
|
|
348
|
+
* The seatbelt profile for a plan.
|
|
349
|
+
*
|
|
350
|
+
* File reads start closed, then enumerated runtime paths and declared sets
|
|
351
|
+
* are opened. The workspace is re-closed before its grants so a workspace
|
|
352
|
+
* under a runtime root does not inherit the broad runtime grant. Credentials
|
|
353
|
+
* are re-closed before explicit external reads, which can opt into them.
|
|
354
|
+
*
|
|
355
|
+
* @category rendering
|
|
356
|
+
* @since 0.1.0
|
|
357
|
+
*/
|
|
358
|
+
export declare const seatbelt: (confinement: Plan, hostFacts?: Host) => string;
|
|
359
|
+
/**
|
|
360
|
+
* The `docker run` argv for a plan. Paths keep their host spelling inside the
|
|
361
|
+
* container so an argv that names workspace paths works unchanged; the image
|
|
362
|
+
* supplies everything outside the workspace.
|
|
363
|
+
*
|
|
364
|
+
* @category rendering
|
|
365
|
+
* @since 0.1.0
|
|
366
|
+
*/
|
|
367
|
+
export declare const docker: (confinement: Plan, argv: ReadonlyArray<string>, env: Readonly<Record<string, string>>, hostFacts?: Host, containerName?: string) => ReadonlyArray<string>;
|
|
368
|
+
/**
|
|
369
|
+
* Wraps a tool argv in the plan's mechanism and reports the environment the
|
|
370
|
+
* wrapper needs the child to carry. Docker runs also return the unique
|
|
371
|
+
* container name the caller must forcibly remove when the client scope closes.
|
|
372
|
+
*
|
|
373
|
+
* @category rendering
|
|
374
|
+
* @since 0.1.0
|
|
375
|
+
*/
|
|
376
|
+
export declare const wrap: (confinement: Plan, argv: ReadonlyArray<string>, env: Readonly<Record<string, string>>, hostFacts?: Host) => {
|
|
377
|
+
readonly argv: ReadonlyArray<string>;
|
|
378
|
+
readonly env: Readonly<Record<string, string>>;
|
|
379
|
+
readonly containerName?: string;
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* Names, from a failed tool's own output, the paths it touched outside the
|
|
383
|
+
* declared set. The sandbox denies at the kernel, so the only witness is the
|
|
384
|
+
* tool's error text; this reads it back and says which side of the boundary
|
|
385
|
+
* each path fell on.
|
|
386
|
+
*
|
|
387
|
+
* @category diagnostics
|
|
388
|
+
* @since 0.1.0
|
|
389
|
+
*/
|
|
390
|
+
export declare const diagnose: (confinement: Plan, text: string) => string | undefined;
|
|
391
|
+
//# sourceMappingURL=ProcessSandbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcessSandbox.d.ts","sourceRoot":"","sources":["../../src/ProcessSandbox.ts"],"names":[],"mappings":"AAAA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