@smthrs/platform-node 1.0.0-rc.4 → 1.0.0-rc.6
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/README.md +2 -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 +2 -2
- package/bin/win32-x64/smithers-jj-export.exe +0 -0
- package/dist/cjs/EgressHttpClient.d.ts +1 -1
- package/dist/cjs/EgressHttpClient.d.ts.map +1 -1
- package/dist/cjs/EgressHttpClient.js +4 -4
- package/dist/cjs/EgressHttpClient.js.map +2 -2
- package/dist/cjs/NodeHost.d.ts +2 -2
- package/dist/cjs/NodeHost.d.ts.map +1 -1
- package/dist/cjs/NodeHost.js.map +2 -2
- package/dist/cjs/ProcessConfinement.js +1 -1
- package/dist/cjs/ProcessConfinement.js.map +2 -2
- package/dist/cjs/ProcessReaper.d.ts +1 -1
- package/dist/cjs/ProcessReaper.d.ts.map +1 -1
- package/dist/cjs/ProcessReaper.js +1 -1
- package/dist/cjs/ProcessReaper.js.map +1 -1
- package/dist/cjs/ScopedProcess.d.ts +2 -2
- package/dist/cjs/ScopedProcess.d.ts.map +1 -1
- package/dist/cjs/ScopedProcess.js +1 -1
- package/dist/cjs/ScopedProcess.js.map +2 -2
- package/dist/cjs/internal/PipedProcess.d.ts +2 -2
- package/dist/cjs/internal/PipedProcess.d.ts.map +1 -1
- package/dist/cjs/internal/PipedProcess.js +2 -2
- package/dist/cjs/internal/PipedProcess.js.map +2 -2
- package/dist/cjs/internal/ProcessCleanup.d.ts +1 -1
- package/dist/cjs/internal/ProcessCleanup.d.ts.map +1 -1
- package/dist/cjs/internal/ProcessCleanup.js.map +1 -1
- package/dist/cjs/internal/ProcessSupervisor.d.ts +2 -2
- package/dist/cjs/internal/ProcessSupervisor.d.ts.map +1 -1
- package/dist/cjs/internal/ProcessSupervisor.js +2 -2
- package/dist/cjs/internal/ProcessSupervisor.js.map +2 -2
- package/dist/esm/EgressHttpClient.d.ts +1 -1
- package/dist/esm/EgressHttpClient.d.ts.map +1 -1
- package/dist/esm/EgressHttpClient.js +4 -4
- package/dist/esm/EgressHttpClient.js.map +1 -1
- package/dist/esm/NodeHost.d.ts +2 -2
- package/dist/esm/NodeHost.d.ts.map +1 -1
- package/dist/esm/NodeHost.js.map +1 -1
- package/dist/esm/ProcessConfinement.js +1 -1
- package/dist/esm/ProcessConfinement.js.map +1 -1
- package/dist/esm/ProcessReaper.d.ts +1 -1
- package/dist/esm/ProcessReaper.d.ts.map +1 -1
- package/dist/esm/ProcessReaper.js +1 -1
- package/dist/esm/ProcessReaper.js.map +1 -1
- package/dist/esm/ScopedProcess.d.ts +2 -2
- package/dist/esm/ScopedProcess.d.ts.map +1 -1
- package/dist/esm/ScopedProcess.js +1 -1
- package/dist/esm/ScopedProcess.js.map +1 -1
- package/dist/esm/internal/PipedProcess.d.ts +2 -2
- package/dist/esm/internal/PipedProcess.d.ts.map +1 -1
- package/dist/esm/internal/PipedProcess.js +2 -2
- package/dist/esm/internal/PipedProcess.js.map +1 -1
- package/dist/esm/internal/ProcessCleanup.d.ts +1 -1
- package/dist/esm/internal/ProcessCleanup.d.ts.map +1 -1
- package/dist/esm/internal/ProcessCleanup.js.map +1 -1
- package/dist/esm/internal/ProcessSupervisor.d.ts +2 -2
- package/dist/esm/internal/ProcessSupervisor.d.ts.map +1 -1
- package/dist/esm/internal/ProcessSupervisor.js +2 -2
- package/dist/esm/internal/ProcessSupervisor.js.map +1 -1
- package/dist/vendor/adapters.json +622 -382
- package/dist/vendor/{chunk-42QKY6T6.js → chunk-2ZAGBWTH.js} +1 -1
- package/dist/vendor/{chunk-3GR5VZ2M.js → chunk-3SL3HKQA.js} +3 -3
- package/dist/vendor/{chunk-VANKHF46.js → chunk-423HXGL6.js} +55 -23
- package/dist/vendor/{chunk-6ME2W7TF.js → chunk-4WIQ2XN7.js} +2 -2
- package/dist/vendor/{chunk-Y35ZAO5U.js → chunk-6FSJ2PMW.js} +8 -8
- package/dist/vendor/{chunk-5ZMHBXIK.js → chunk-6L2NJEOV.js} +11 -4
- package/dist/vendor/{chunk-TFIKFFSC.js → chunk-7NMJM44J.js} +2 -2
- package/dist/vendor/{chunk-OXNGN5H7.js → chunk-A7UXCEJA.js} +1 -1
- package/dist/vendor/chunk-ADP5LRUF.js +274 -0
- package/dist/vendor/{chunk-DS7GF46S.js → chunk-AWNTTSHL.js} +2 -2
- package/dist/vendor/{chunk-IIJ52ZU6.js → chunk-BUKVIAEM.js} +2 -2
- package/dist/vendor/{chunk-BKTBUBQY.js → chunk-BY3SDXID.js} +71 -7
- package/dist/vendor/{chunk-JJ24ARBQ.js → chunk-C3PGUWW5.js} +53 -33
- package/dist/vendor/{chunk-J7A4CZDO.js → chunk-D2ZL4PLZ.js} +8 -7
- package/dist/vendor/{chunk-XDKNKFBW.js → chunk-D4HEMNGU.js} +2 -2
- package/dist/vendor/{chunk-DVOAHXPG.js → chunk-FFD6R5JZ.js} +3 -3
- package/dist/vendor/{chunk-UFH5UUZK.js → chunk-HDV6VIRM.js} +1 -1
- package/dist/vendor/chunk-IWSDM4CG.js +16 -0
- package/dist/vendor/{chunk-KUUXSID7.js → chunk-KABHKTVG.js} +2 -2
- package/dist/vendor/{chunk-B3FZ67QU.js → chunk-KFDBU6RR.js} +4 -3
- package/dist/vendor/chunk-LNWGIDIG.js +20 -0
- package/dist/vendor/{chunk-TXKLEBBL.js → chunk-MUEED3C3.js} +3 -2
- package/dist/vendor/{chunk-EZWY45HP.js → chunk-N6TK35N5.js} +2 -2
- package/dist/vendor/{chunk-QPLDT6A6.js → chunk-NQO6V4KI.js} +29 -13
- package/dist/vendor/{chunk-AMQKOQNT.js → chunk-NTEWGPPG.js} +9 -9
- package/dist/vendor/chunk-NUJQMLJP.js +325 -0
- package/dist/vendor/{chunk-54RLBMTZ.js → chunk-OF3N2FN4.js} +1 -1
- package/dist/vendor/{chunk-RO2R4MJH.js → chunk-PA32ARKD.js} +17 -17
- package/dist/vendor/{chunk-JG5TTWPT.js → chunk-PECOFLCU.js} +3 -3
- package/dist/vendor/{chunk-VZBDV3TV.js → chunk-PU7QVYND.js} +2 -2
- package/dist/vendor/{chunk-2Y7WC4KU.js → chunk-QHR2RC5M.js} +2 -2
- package/dist/vendor/{chunk-QYBKAIA6.js → chunk-R327POEZ.js} +2 -2
- package/dist/vendor/chunk-RKVXYKHJ.js +29 -0
- package/dist/vendor/{chunk-XH4U3JSV.js → chunk-RQH5DSBA.js} +2 -2
- package/dist/vendor/{chunk-DWSHTSVX.js → chunk-S6QUQLBV.js} +5 -5
- package/dist/vendor/{chunk-KOZMM5PZ.js → chunk-UPIQ52FQ.js} +12 -12
- package/dist/vendor/{chunk-EGBNVEEW.js → chunk-UUQXJRMK.js} +1 -1
- package/dist/vendor/{chunk-LEUPYT3Q.js → chunk-UUYTTEDH.js} +1 -1
- package/dist/vendor/{chunk-NBVRTDTV.js → chunk-V2EB7FHY.js} +2 -2
- package/dist/vendor/{chunk-M32LDTW7.js → chunk-VIWU4EBF.js} +2 -2
- package/dist/vendor/{chunk-SIR62W3Y.js → chunk-VWSWEUN5.js} +51 -31
- package/dist/vendor/{chunk-MBSKBQ5D.js → chunk-WPZDL2D7.js} +1 -1
- package/dist/vendor/chunk-YDY5P7GL.js +20 -0
- package/dist/vendor/{chunk-FNZOJHSV.js → chunk-YFD4QFIL.js} +17 -17
- package/dist/vendor/{chunk-GXCHI7BM.js → chunk-ZVJCBTJG.js} +5 -5
- package/dist/vendor/cjs/node/NodeAddressResolver.d.ts +16 -0
- package/dist/vendor/cjs/node/NodeAddressResolver.js +1 -0
- package/dist/vendor/cjs/node/NodeChildProcessSpawner.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeClusterHttp.d.ts +13 -22
- package/dist/vendor/cjs/node/NodeClusterSocket.d.ts +14 -8
- package/dist/vendor/cjs/node/NodeCrypto.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeDatagramSocket.d.ts +10 -0
- package/dist/vendor/cjs/node/NodeDatagramSocket.js +1 -0
- package/dist/vendor/cjs/node/NodeDns.d.ts +51 -0
- package/dist/vendor/cjs/node/NodeDns.js +1 -0
- package/dist/vendor/cjs/node/NodeFileSystem.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeHttpClient.d.ts +21 -2
- package/dist/vendor/cjs/node/NodeHttpIncomingMessage.d.ts +5 -3
- package/dist/vendor/cjs/node/NodeHttpPlatform.d.ts +8 -6
- package/dist/vendor/cjs/node/NodeHttpServer.d.ts +21 -10
- package/dist/vendor/cjs/node/NodeHttpServerRequest.d.ts +4 -1
- package/dist/vendor/cjs/node/NodeMultipart.d.ts +5 -1
- package/dist/vendor/cjs/node/NodeMultipartParser.d.ts +9 -1
- package/dist/vendor/cjs/node/NodePath.d.ts +3 -0
- package/dist/vendor/cjs/node/NodeRedis.d.ts +5 -1
- package/dist/vendor/cjs/node/NodeRuntime.d.ts +3 -0
- package/dist/vendor/cjs/node/NodeServices.d.ts +4 -1
- package/dist/vendor/cjs/node/NodeSink.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeSocket.d.ts +10 -3
- package/dist/vendor/cjs/node/NodeSocketServer.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeStdio.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeStream.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeTerminal.d.ts +6 -3
- package/dist/vendor/cjs/node/NodeWorker.d.ts +3 -1
- package/dist/vendor/cjs/node/NodeWorkerRunner.d.ts +2 -1
- package/dist/vendor/cjs/node/Undici.d.ts +3 -0
- package/dist/vendor/cjs/node/index.d.ts +40 -0
- package/dist/vendor/cjs/node-shared/NodeAddressResolver.d.ts +13 -0
- package/dist/vendor/cjs/node-shared/NodeAddressResolver.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeChildProcessSpawner.d.ts +12 -3
- package/dist/vendor/cjs/node-shared/NodeClusterSocket.d.ts +17 -4
- package/dist/vendor/cjs/node-shared/NodeCrypto.d.ts +3 -0
- package/dist/vendor/cjs/node-shared/NodeDatagramSocket.d.ts +246 -0
- package/dist/vendor/cjs/node-shared/NodeDatagramSocket.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeDns.d.ts +221 -0
- package/dist/vendor/cjs/node-shared/NodeDns.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeFileSystem.d.ts +1 -0
- package/dist/vendor/cjs/node-shared/NodeHttpCompression.d.ts +5 -1
- package/dist/vendor/cjs/node-shared/NodePath.d.ts +3 -0
- package/dist/vendor/cjs/node-shared/NodeRuntime.d.ts +4 -0
- package/dist/vendor/cjs/node-shared/NodeSink.d.ts +4 -0
- package/dist/vendor/cjs/node-shared/NodeSocket.d.ts +11 -1
- package/dist/vendor/cjs/node-shared/NodeSocketServer.d.ts +8 -1
- package/dist/vendor/cjs/node-shared/NodeStdio.d.ts +1 -0
- package/dist/vendor/cjs/node-shared/NodeStream.d.ts +15 -0
- package/dist/vendor/cjs/node-shared/NodeTerminal.d.ts +6 -4
- package/dist/vendor/cjs/node-shared/index.d.ts +29 -0
- package/dist/vendor/cjs/node-shared/internal/nodeChildProcessSpawner.d.ts +1 -1
- package/dist/vendor/cjs/platform-node-shared.d.ts +29 -0
- package/dist/vendor/cjs/platform-node.d.ts +40 -0
- package/dist/vendor/node/NodeAddressResolver.d.ts +16 -0
- package/dist/vendor/node/NodeAddressResolver.js +8 -0
- package/dist/vendor/node/NodeChildProcessSpawner.d.ts +1 -0
- package/dist/vendor/node/NodeChildProcessSpawner.js +6 -6
- package/dist/vendor/node/NodeClusterHttp.d.ts +13 -22
- package/dist/vendor/node/NodeClusterHttp.js +32 -32
- package/dist/vendor/node/NodeClusterSocket.d.ts +14 -8
- package/dist/vendor/node/NodeClusterSocket.js +15 -15
- package/dist/vendor/node/NodeCrypto.d.ts +1 -0
- package/dist/vendor/node/NodeCrypto.js +2 -2
- package/dist/vendor/node/NodeDatagramSocket.d.ts +10 -0
- package/dist/vendor/node/NodeDatagramSocket.js +12 -0
- package/dist/vendor/node/NodeDns.d.ts +51 -0
- package/dist/vendor/node/NodeDns.js +12 -0
- package/dist/vendor/node/NodeFileSystem.d.ts +1 -0
- package/dist/vendor/node/NodeFileSystem.js +3 -3
- package/dist/vendor/node/NodeHttpClient.d.ts +21 -2
- package/dist/vendor/node/NodeHttpClient.js +6 -6
- package/dist/vendor/node/NodeHttpIncomingMessage.d.ts +5 -3
- package/dist/vendor/node/NodeHttpIncomingMessage.js +4 -4
- package/dist/vendor/node/NodeHttpPlatform.d.ts +8 -6
- package/dist/vendor/node/NodeHttpPlatform.js +8 -8
- package/dist/vendor/node/NodeHttpServer.d.ts +21 -10
- package/dist/vendor/node/NodeHttpServer.js +26 -26
- package/dist/vendor/node/NodeHttpServerRequest.d.ts +4 -1
- package/dist/vendor/node/NodeHttpServerRequest.js +1 -1
- package/dist/vendor/node/NodeMultipart.d.ts +5 -1
- package/dist/vendor/node/NodeMultipart.js +5 -5
- package/dist/vendor/node/NodeMultipartParser.d.ts +9 -1
- package/dist/vendor/node/NodeMultipartParser.js +1 -1
- package/dist/vendor/node/NodePath.d.ts +3 -0
- package/dist/vendor/node/NodePath.js +2 -2
- package/dist/vendor/node/NodeRedis.d.ts +5 -1
- package/dist/vendor/node/NodeRedis.js +1 -1
- package/dist/vendor/node/NodeRuntime.d.ts +3 -0
- package/dist/vendor/node/NodeRuntime.js +2 -2
- package/dist/vendor/node/NodeServices.d.ts +4 -1
- package/dist/vendor/node/NodeServices.js +17 -17
- package/dist/vendor/node/NodeSink.d.ts +1 -0
- package/dist/vendor/node/NodeSink.js +2 -2
- package/dist/vendor/node/NodeSocket.d.ts +10 -3
- package/dist/vendor/node/NodeSocket.js +2 -2
- package/dist/vendor/node/NodeSocketServer.d.ts +1 -0
- package/dist/vendor/node/NodeSocketServer.js +3 -3
- package/dist/vendor/node/NodeStdio.d.ts +1 -0
- package/dist/vendor/node/NodeStdio.js +4 -4
- package/dist/vendor/node/NodeStream.d.ts +1 -0
- package/dist/vendor/node/NodeStream.js +3 -3
- package/dist/vendor/node/NodeTerminal.d.ts +6 -3
- package/dist/vendor/node/NodeTerminal.js +2 -2
- package/dist/vendor/node/NodeWorker.d.ts +3 -1
- package/dist/vendor/node/NodeWorker.js +1 -1
- package/dist/vendor/node/NodeWorkerRunner.d.ts +2 -1
- package/dist/vendor/node/NodeWorkerRunner.js +1 -1
- package/dist/vendor/node/Undici.d.ts +3 -0
- package/dist/vendor/node/Undici.js +1 -1
- package/dist/vendor/node/index.d.ts +40 -0
- package/dist/vendor/node/index.js +70 -55
- package/dist/vendor/node-shared/NodeAddressResolver.d.ts +13 -0
- package/dist/vendor/node-shared/NodeAddressResolver.js +7 -0
- package/dist/vendor/node-shared/NodeChildProcessSpawner.d.ts +12 -3
- package/dist/vendor/node-shared/NodeChildProcessSpawner.js +5 -5
- package/dist/vendor/node-shared/NodeClusterSocket.d.ts +17 -4
- package/dist/vendor/node-shared/NodeClusterSocket.js +3 -3
- package/dist/vendor/node-shared/NodeCrypto.d.ts +3 -0
- package/dist/vendor/node-shared/NodeCrypto.js +1 -1
- package/dist/vendor/node-shared/NodeDatagramSocket.d.ts +246 -0
- package/dist/vendor/node-shared/NodeDatagramSocket.js +11 -0
- package/dist/vendor/node-shared/NodeDns.d.ts +221 -0
- package/dist/vendor/node-shared/NodeDns.js +31 -0
- package/dist/vendor/node-shared/NodeFileSystem.d.ts +1 -0
- package/dist/vendor/node-shared/NodeFileSystem.js +2 -2
- package/dist/vendor/node-shared/NodeHttpCompression.d.ts +5 -1
- package/dist/vendor/node-shared/NodeHttpCompression.js +1 -1
- package/dist/vendor/node-shared/NodePath.d.ts +3 -0
- package/dist/vendor/node-shared/NodePath.js +1 -1
- package/dist/vendor/node-shared/NodeRuntime.d.ts +4 -0
- package/dist/vendor/node-shared/NodeRuntime.js +1 -1
- package/dist/vendor/node-shared/NodeSink.d.ts +4 -0
- package/dist/vendor/node-shared/NodeSink.js +1 -1
- package/dist/vendor/node-shared/NodeSocket.d.ts +11 -1
- package/dist/vendor/node-shared/NodeSocket.js +1 -1
- package/dist/vendor/node-shared/NodeSocketServer.d.ts +8 -1
- package/dist/vendor/node-shared/NodeSocketServer.js +2 -2
- package/dist/vendor/node-shared/NodeStdio.d.ts +1 -0
- package/dist/vendor/node-shared/NodeStdio.js +3 -3
- package/dist/vendor/node-shared/NodeStream.d.ts +15 -0
- package/dist/vendor/node-shared/NodeStream.js +2 -2
- package/dist/vendor/node-shared/NodeTerminal.d.ts +6 -4
- package/dist/vendor/node-shared/NodeTerminal.js +1 -1
- package/dist/vendor/node-shared/index.d.ts +29 -0
- package/dist/vendor/node-shared/index.js +34 -22
- package/dist/vendor/node-shared/internal/nodeChildProcessSpawner.d.ts +1 -1
- package/dist/vendor/node-shared/internal/nodeChildProcessSpawner.js +1 -1
- package/dist/vendor/node-shared/internal/utils.js +1 -1
- package/dist/vendor/platform-node-shared.d.ts +29 -0
- package/dist/vendor/platform-node-shared.js +34 -22
- package/dist/vendor/platform-node.d.ts +40 -0
- package/dist/vendor/platform-node.js +70 -55
- package/docs/README.md +2 -2
- package/docs/api.md +2 -2
- package/docs/concepts/host-bundle.md +2 -2
- package/docs/installation.md +8 -9
- package/docs/quickstart.md +2 -2
- package/package.json +12 -12
- package/src/EgressHttpClient.ts +4 -4
- package/src/NodeHost.ts +2 -2
- package/src/ProcessConfinement.ts +1 -1
- package/src/ProcessReaper.ts +2 -2
- package/src/ScopedProcess.ts +2 -2
- package/src/internal/PipedProcess.ts +2 -2
- package/src/internal/ProcessCleanup.ts +1 -1
- package/src/internal/ProcessSupervisor.ts +2 -2
- /package/dist/vendor/{chunk-M7CLUILA.js → chunk-3WUGYBFU.js} +0 -0
- /package/dist/vendor/{chunk-ZJMRMY57.js → chunk-ASGOJ3XA.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleErrnoException
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2ZAGBWTH.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
6
|
} from "./chunk-MLKGABMK.js";
|
|
7
7
|
|
|
8
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.
|
|
8
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.4_effect@4.0.4/node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
|
|
9
9
|
var NodeFileSystem_exports = {};
|
|
10
10
|
__export(NodeFileSystem_exports, {
|
|
11
11
|
layer: () => layer
|
|
@@ -118,12 +118,63 @@ var makeTempDirectoryScoped = /* @__PURE__ */ (() => {
|
|
|
118
118
|
recursive: true
|
|
119
119
|
})));
|
|
120
120
|
})();
|
|
121
|
+
var openFlagBits = (flag) => {
|
|
122
|
+
const {
|
|
123
|
+
O_APPEND,
|
|
124
|
+
O_CREAT,
|
|
125
|
+
O_EXCL,
|
|
126
|
+
O_RDONLY,
|
|
127
|
+
O_RDWR,
|
|
128
|
+
O_TRUNC,
|
|
129
|
+
O_WRONLY
|
|
130
|
+
} = NFS.constants;
|
|
131
|
+
switch (flag) {
|
|
132
|
+
case "r":
|
|
133
|
+
return O_RDONLY;
|
|
134
|
+
case "r+":
|
|
135
|
+
return O_RDWR;
|
|
136
|
+
case "w":
|
|
137
|
+
return O_TRUNC | O_CREAT | O_WRONLY;
|
|
138
|
+
case "wx":
|
|
139
|
+
return O_TRUNC | O_CREAT | O_WRONLY | O_EXCL;
|
|
140
|
+
case "w+":
|
|
141
|
+
return O_TRUNC | O_CREAT | O_RDWR;
|
|
142
|
+
case "wx+":
|
|
143
|
+
return O_TRUNC | O_CREAT | O_RDWR | O_EXCL;
|
|
144
|
+
case "a":
|
|
145
|
+
return O_APPEND | O_CREAT | O_WRONLY;
|
|
146
|
+
case "ax":
|
|
147
|
+
return O_APPEND | O_CREAT | O_WRONLY | O_EXCL;
|
|
148
|
+
case "a+":
|
|
149
|
+
return O_APPEND | O_CREAT | O_RDWR;
|
|
150
|
+
case "ax+":
|
|
151
|
+
return O_APPEND | O_CREAT | O_RDWR | O_EXCL;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
var noFollowFlags = (method, flag) => Effect.suspend(() => {
|
|
155
|
+
const {
|
|
156
|
+
O_NOFOLLOW
|
|
157
|
+
} = NFS.constants;
|
|
158
|
+
if (process.platform === "win32" || typeof O_NOFOLLOW !== "number" || O_NOFOLLOW === 0) {
|
|
159
|
+
return Effect.fail(Error.badArgument({
|
|
160
|
+
module: "FileSystem",
|
|
161
|
+
method,
|
|
162
|
+
description: "noFollow is not supported on this platform"
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
return Effect.succeed(openFlagBits(flag) | O_NOFOLLOW);
|
|
166
|
+
});
|
|
121
167
|
var openFactory = (method) => {
|
|
122
168
|
const nodeOpen = effectify(NFS.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
123
169
|
const nodeClose = effectify(NFS.close, handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
124
|
-
return (path, options) => pipe(Effect.acquireRelease(nodeOpen(path, options?.flag ?? "r", options?.mode), (fd) => Effect.orDie(nodeClose(fd))), Effect.map((fd) => makeFile(fd, options?.flag?.startsWith("a") ?? false)));
|
|
170
|
+
return (path, options) => pipe(Effect.acquireRelease(options?.noFollow === true ? Effect.flatMap(noFollowFlags(method, options.flag ?? "r"), (flags) => nodeOpen(path, flags, options.mode)) : nodeOpen(path, options?.flag ?? "r", options?.mode), (fd) => Effect.orDie(nodeClose(fd))), Effect.map((fd) => makeFile(fd, options?.flag?.startsWith("a") ?? false)));
|
|
125
171
|
};
|
|
126
172
|
var open2 = /* @__PURE__ */ openFactory("open");
|
|
173
|
+
var negativePosition = (method) => Error.badArgument({
|
|
174
|
+
module: "FileSystem",
|
|
175
|
+
method,
|
|
176
|
+
description: "Cannot read before the start of the file"
|
|
177
|
+
});
|
|
127
178
|
var makeFile = /* @__PURE__ */ (() => {
|
|
128
179
|
const nodeReadFactory = (method) => effectify(NFS.read, handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
129
180
|
const nodeRead = /* @__PURE__ */ nodeReadFactory("read");
|
|
@@ -166,8 +217,15 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
166
217
|
return Effect.succeed(position);
|
|
167
218
|
});
|
|
168
219
|
}
|
|
169
|
-
read(buffer) {
|
|
220
|
+
read(buffer, options) {
|
|
170
221
|
return Effect.suspend(() => {
|
|
222
|
+
const explicit = options?.position;
|
|
223
|
+
if (explicit !== void 0) {
|
|
224
|
+
return explicit < BigInt(0) ? Effect.fail(negativePosition("read")) : nodeRead(this.fd, {
|
|
225
|
+
buffer,
|
|
226
|
+
position: explicit
|
|
227
|
+
});
|
|
228
|
+
}
|
|
171
229
|
const position = this.position;
|
|
172
230
|
return Effect.map(nodeRead(this.fd, {
|
|
173
231
|
buffer,
|
|
@@ -178,14 +236,18 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
178
236
|
});
|
|
179
237
|
});
|
|
180
238
|
}
|
|
181
|
-
readAlloc(size) {
|
|
239
|
+
readAlloc(size, options) {
|
|
182
240
|
return Effect.suspend(() => {
|
|
183
241
|
try {
|
|
184
242
|
if (!Number.isInteger(size) || size < 0) {
|
|
185
243
|
throw new RangeError("size must be a non-negative integer");
|
|
186
244
|
}
|
|
245
|
+
const explicit = options?.position;
|
|
246
|
+
if (explicit !== void 0 && explicit < BigInt(0)) {
|
|
247
|
+
return Effect.fail(negativePosition("readAlloc"));
|
|
248
|
+
}
|
|
187
249
|
const buffer = Buffer.allocUnsafeSlow(size);
|
|
188
|
-
const position = this.position;
|
|
250
|
+
const position = explicit ?? this.position;
|
|
189
251
|
return Effect.map(nodeReadAlloc(this.fd, {
|
|
190
252
|
buffer,
|
|
191
253
|
position
|
|
@@ -193,7 +255,9 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
193
255
|
if (bytesRead === 0) {
|
|
194
256
|
return Option.none();
|
|
195
257
|
}
|
|
196
|
-
|
|
258
|
+
if (explicit === void 0) {
|
|
259
|
+
this.position = position + BigInt(bytesRead);
|
|
260
|
+
}
|
|
197
261
|
if (bytesRead === size) {
|
|
198
262
|
return Option.some(buffer);
|
|
199
263
|
}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__export
|
|
3
3
|
} from "./chunk-MLKGABMK.js";
|
|
4
4
|
|
|
5
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.4_effect@4.0.4/node_modules/@effect/platform-node-shared/dist/NodeSocket.js
|
|
6
6
|
var NodeSocket_exports = {};
|
|
7
7
|
__export(NodeSocket_exports, {
|
|
8
8
|
NetSocket: () => NetSocket,
|
|
@@ -25,7 +25,7 @@ import * as Latch from "effect/Latch";
|
|
|
25
25
|
import * as Layer from "effect/Layer";
|
|
26
26
|
import * as Redacted from "effect/Redacted";
|
|
27
27
|
import * as Scope from "effect/Scope";
|
|
28
|
-
import * as Socket from "effect/
|
|
28
|
+
import * as Socket from "effect/socket/Socket";
|
|
29
29
|
import { Buffer } from "node:buffer";
|
|
30
30
|
import * as Net from "node:net";
|
|
31
31
|
import * as Tls from "node:tls";
|
|
@@ -35,7 +35,7 @@ var NetSocket = class extends (/* @__PURE__ */ Context.Service()("@effect/platfo
|
|
|
35
35
|
};
|
|
36
36
|
var readAvailable = (conn) => {
|
|
37
37
|
const first = conn.read();
|
|
38
|
-
if (first === null) return
|
|
38
|
+
if (first === null) return void 0;
|
|
39
39
|
const second = conn.read();
|
|
40
40
|
if (second === null) return [first];
|
|
41
41
|
const out = [first, second];
|
|
@@ -95,52 +95,74 @@ var fromDuplex = (open, options) => Effect.withFiber((fiber) => {
|
|
|
95
95
|
}) : identity);
|
|
96
96
|
let error;
|
|
97
97
|
let waiter;
|
|
98
|
+
let pending;
|
|
99
|
+
let reading = false;
|
|
100
|
+
let closed = false;
|
|
98
101
|
let upgradeAvailable = true;
|
|
99
|
-
function
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
function drain() {
|
|
103
|
+
if (waiter === void 0 || reading) return;
|
|
104
|
+
let chunk = pending;
|
|
105
|
+
pending = void 0;
|
|
106
|
+
if (chunk === void 0 && !closed) {
|
|
107
|
+
reading = true;
|
|
108
|
+
try {
|
|
109
|
+
chunk = readAvailable(conn);
|
|
110
|
+
} finally {
|
|
111
|
+
reading = false;
|
|
112
|
+
}
|
|
105
113
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
114
|
+
if (closed) chunk = void 0;
|
|
115
|
+
if (waiter === void 0) {
|
|
116
|
+
pending = chunk;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const result = chunk !== void 0 ? Effect.succeed(chunk) : error !== void 0 ? Effect.fail(error) : void 0;
|
|
120
|
+
if (result === void 0) return;
|
|
111
121
|
const resume = waiter;
|
|
112
122
|
waiter = void 0;
|
|
113
|
-
resume(
|
|
123
|
+
resume(result);
|
|
124
|
+
}
|
|
125
|
+
function end(err) {
|
|
126
|
+
error ??= err;
|
|
127
|
+
drain();
|
|
128
|
+
}
|
|
129
|
+
function close(err) {
|
|
130
|
+
error ??= err;
|
|
131
|
+
closed = true;
|
|
132
|
+
pending = void 0;
|
|
133
|
+
drain();
|
|
114
134
|
}
|
|
115
135
|
function onEnd() {
|
|
116
|
-
|
|
136
|
+
end(new Socket.SocketError({
|
|
117
137
|
reason: new Socket.SocketCloseError({
|
|
118
138
|
code: 1e3
|
|
119
139
|
})
|
|
120
140
|
}));
|
|
121
141
|
}
|
|
122
142
|
function onError(cause) {
|
|
123
|
-
|
|
143
|
+
close(new Socket.SocketError({
|
|
124
144
|
reason: new Socket.SocketReadError({
|
|
125
145
|
cause
|
|
126
146
|
})
|
|
127
147
|
}));
|
|
128
148
|
}
|
|
129
149
|
function onClose(hadError) {
|
|
130
|
-
|
|
150
|
+
const err = new Socket.SocketError({
|
|
131
151
|
reason: new Socket.SocketCloseError({
|
|
132
152
|
code: hadError ? 1006 : 1e3
|
|
133
153
|
})
|
|
134
|
-
})
|
|
154
|
+
});
|
|
155
|
+
if (hadError) close(err);
|
|
156
|
+
else end(err);
|
|
135
157
|
}
|
|
136
158
|
function attachReadListeners(conn2) {
|
|
137
|
-
conn2.on("readable",
|
|
159
|
+
conn2.on("readable", drain);
|
|
138
160
|
conn2.on("end", onEnd);
|
|
139
161
|
conn2.on("error", onError);
|
|
140
162
|
conn2.on("close", onClose);
|
|
141
163
|
}
|
|
142
164
|
function detachReadListeners(conn2) {
|
|
143
|
-
conn2.off("readable",
|
|
165
|
+
conn2.off("readable", drain);
|
|
144
166
|
conn2.off("end", onEnd);
|
|
145
167
|
conn2.off("error", onError);
|
|
146
168
|
conn2.off("close", onClose);
|
|
@@ -148,7 +170,7 @@ var fromDuplex = (open, options) => Effect.withFiber((fiber) => {
|
|
|
148
170
|
if (!isDeno) conn.pause();
|
|
149
171
|
attachReadListeners(conn);
|
|
150
172
|
yield* Scope.addFinalizer(scope2, Effect.sync(() => {
|
|
151
|
-
|
|
173
|
+
close(new Socket.SocketError({
|
|
152
174
|
reason: new Socket.SocketCloseError({
|
|
153
175
|
code: 1006
|
|
154
176
|
})
|
|
@@ -160,15 +182,12 @@ var fromDuplex = (open, options) => Effect.withFiber((fiber) => {
|
|
|
160
182
|
}));
|
|
161
183
|
currentSocket = conn;
|
|
162
184
|
latch.openUnsafe();
|
|
163
|
-
const pull = Effect.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if (
|
|
167
|
-
return Effect.
|
|
168
|
-
waiter =
|
|
169
|
-
return Effect.sync(() => {
|
|
170
|
-
if (waiter === resume) waiter = void 0;
|
|
171
|
-
});
|
|
185
|
+
const pull = Effect.callback((resume) => {
|
|
186
|
+
waiter = resume;
|
|
187
|
+
drain();
|
|
188
|
+
if (waiter !== resume) return;
|
|
189
|
+
return Effect.sync(() => {
|
|
190
|
+
if (waiter === resume) waiter = void 0;
|
|
172
191
|
});
|
|
173
192
|
});
|
|
174
193
|
const upgrade = (upgradeOptions = {}) => Effect.suspend(() => {
|
|
@@ -210,6 +229,7 @@ var fromDuplex = (open, options) => Effect.withFiber((fiber) => {
|
|
|
210
229
|
isServer: true
|
|
211
230
|
}) : Tls.connect({
|
|
212
231
|
...tlsOptions,
|
|
232
|
+
servername: upgradeOptions.servername,
|
|
213
233
|
socket: raw
|
|
214
234
|
});
|
|
215
235
|
} catch (cause) {
|
|
@@ -242,7 +262,7 @@ var fromDuplex = (open, options) => Effect.withFiber((fiber) => {
|
|
|
242
262
|
cause
|
|
243
263
|
})
|
|
244
264
|
});
|
|
245
|
-
|
|
265
|
+
close(upgradeError);
|
|
246
266
|
resume(Effect.fail(upgradeError));
|
|
247
267
|
}
|
|
248
268
|
function onUpgradeClose() {
|
|
@@ -253,7 +273,7 @@ var fromDuplex = (open, options) => Effect.withFiber((fiber) => {
|
|
|
253
273
|
tls.once("close", onUpgradeClose);
|
|
254
274
|
return Effect.sync(() => {
|
|
255
275
|
cleanup();
|
|
256
|
-
|
|
276
|
+
close(new Socket.SocketError({
|
|
257
277
|
reason: new Socket.SocketCloseError({
|
|
258
278
|
code: 1006
|
|
259
279
|
})
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fromReadable,
|
|
3
3
|
toArrayBuffer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RQH5DSBA.js";
|
|
5
5
|
import {
|
|
6
6
|
__export
|
|
7
7
|
} from "./chunk-MLKGABMK.js";
|
|
8
8
|
|
|
9
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
9
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.4_effect@4.0.4_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeHttpIncomingMessage.js
|
|
10
10
|
var NodeHttpIncomingMessage_exports = {};
|
|
11
11
|
__export(NodeHttpIncomingMessage_exports, {
|
|
12
12
|
NodeHttpIncomingMessage: () => NodeHttpIncomingMessage
|
|
13
13
|
});
|
|
14
14
|
import * as Effect from "effect/Effect";
|
|
15
|
+
import * as Headers from "effect/http/Headers";
|
|
16
|
+
import * as IncomingMessage from "effect/http/HttpIncomingMessage";
|
|
17
|
+
import * as UrlParams from "effect/http/UrlParams";
|
|
15
18
|
import * as Inspectable from "effect/Inspectable";
|
|
16
19
|
import * as Option from "effect/Option";
|
|
17
|
-
|
|
18
|
-
import * as IncomingMessage from "effect/unstable/http/HttpIncomingMessage";
|
|
19
|
-
import * as UrlParams from "effect/unstable/http/UrlParams";
|
|
20
|
+
var textDecoder = /* @__PURE__ */ new TextDecoder();
|
|
20
21
|
var NodeHttpIncomingMessage = class extends Inspectable.Class {
|
|
21
22
|
/**
|
|
22
23
|
* Marks this value as an HTTP incoming message for runtime guards.
|
|
@@ -45,7 +46,7 @@ var NodeHttpIncomingMessage = class extends Inspectable.Class {
|
|
|
45
46
|
if (this.textEffect) {
|
|
46
47
|
return this.textEffect;
|
|
47
48
|
}
|
|
48
|
-
this.textEffect = Effect.map(this.arrayBuffer, (_) =>
|
|
49
|
+
this.textEffect = Effect.map(this.arrayBuffer, (_) => textDecoder.decode(_));
|
|
49
50
|
return this.textEffect;
|
|
50
51
|
}
|
|
51
52
|
get textUnsafe() {
|
|
@@ -81,7 +82,7 @@ var NodeHttpIncomingMessage = class extends Inspectable.Class {
|
|
|
81
82
|
onError: this.onError,
|
|
82
83
|
maxBytes: fiber.getRef(IncomingMessage.MaxBodySize)
|
|
83
84
|
})).pipe(Effect.cached, Effect.runSync);
|
|
84
|
-
this.textEffect = Effect.map(this.arrayBufferEffect, (_) =>
|
|
85
|
+
this.textEffect = Effect.map(this.arrayBufferEffect, (_) => textDecoder.decode(_));
|
|
85
86
|
return this.arrayBufferEffect;
|
|
86
87
|
}
|
|
87
88
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layer,
|
|
3
3
|
make
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MUEED3C3.js";
|
|
5
5
|
import {
|
|
6
6
|
__export
|
|
7
7
|
} from "./chunk-MLKGABMK.js";
|
|
8
8
|
|
|
9
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
9
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.4_effect@4.0.4_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeTerminal.js
|
|
10
10
|
var NodeTerminal_exports = {};
|
|
11
11
|
__export(NodeTerminal_exports, {
|
|
12
12
|
layer: () => layer2,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__export
|
|
3
3
|
} from "./chunk-MLKGABMK.js";
|
|
4
4
|
|
|
5
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.4_effect@4.0.4_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeWorkerRunner.js
|
|
6
6
|
var NodeWorkerRunner_exports = {};
|
|
7
7
|
__export(NodeWorkerRunner_exports, {
|
|
8
8
|
layer: () => layer
|
|
@@ -14,8 +14,8 @@ import * as Exit from "effect/Exit";
|
|
|
14
14
|
import * as Fiber from "effect/Fiber";
|
|
15
15
|
import * as Layer from "effect/Layer";
|
|
16
16
|
import * as Scope from "effect/Scope";
|
|
17
|
-
import { WorkerError, WorkerReceiveError, WorkerSpawnError } from "effect/
|
|
18
|
-
import * as WorkerRunner from "effect/
|
|
17
|
+
import { WorkerError, WorkerReceiveError, WorkerSpawnError } from "effect/workers/WorkerError";
|
|
18
|
+
import * as WorkerRunner from "effect/workers/WorkerRunner";
|
|
19
19
|
import * as WorkerThreads from "node:worker_threads";
|
|
20
20
|
var layer = /* @__PURE__ */ Layer.succeed(WorkerRunner.WorkerRunnerPlatform)({
|
|
21
21
|
start() {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__export
|
|
3
3
|
} from "./chunk-MLKGABMK.js";
|
|
4
4
|
|
|
5
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.4_effect@4.0.4/node_modules/@effect/platform-node-shared/dist/NodeCrypto.js
|
|
6
6
|
var NodeCrypto_exports = {};
|
|
7
7
|
__export(NodeCrypto_exports, {
|
|
8
8
|
layer: () => layer,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
layer
|
|
3
|
+
} from "./chunk-RKVXYKHJ.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-MLKGABMK.js";
|
|
7
|
+
|
|
8
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.4_effect@4.0.4_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeAddressResolver.js
|
|
9
|
+
var NodeAddressResolver_exports = {};
|
|
10
|
+
__export(NodeAddressResolver_exports, {
|
|
11
|
+
layer: () => layer
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
NodeAddressResolver_exports
|
|
16
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KFDBU6RR.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
6
|
} from "./chunk-MLKGABMK.js";
|
|
7
7
|
|
|
8
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
8
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.4_effect@4.0.4_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeStdio.js
|
|
9
9
|
var NodeStdio_exports = {};
|
|
10
10
|
__export(NodeStdio_exports, {
|
|
11
11
|
layer: () => layer2
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fromReadable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RQH5DSBA.js";
|
|
4
4
|
import {
|
|
5
5
|
fromWritable
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A7UXCEJA.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./chunk-MLKGABMK.js";
|
|
10
10
|
|
|
11
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.
|
|
11
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.4_effect@4.0.4/node_modules/@effect/platform-node-shared/dist/NodeStdio.js
|
|
12
12
|
var NodeStdio_exports = {};
|
|
13
13
|
__export(NodeStdio_exports, {
|
|
14
14
|
layer: () => layer
|
|
@@ -21,6 +21,7 @@ var layer = /* @__PURE__ */ Layer.succeed(Stdio.Stdio, /* @__PURE__ */ Stdio.mak
|
|
|
21
21
|
args: /* @__PURE__ */ Effect.sync(() => process.argv.slice(2)),
|
|
22
22
|
stdinIsTerminal: /* @__PURE__ */ Effect.sync(() => process.stdin.isTTY === true),
|
|
23
23
|
stdoutIsTerminal: /* @__PURE__ */ Effect.sync(() => process.stdout.isTTY === true),
|
|
24
|
+
stderrIsTerminal: /* @__PURE__ */ Effect.sync(() => process.stderr.isTTY === true),
|
|
24
25
|
stdout: (options) => fromWritable({
|
|
25
26
|
evaluate: () => process.stdout,
|
|
26
27
|
onError: (cause) => systemError({
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fromSocket,
|
|
3
|
+
layer,
|
|
4
|
+
make
|
|
5
|
+
} from "./chunk-NUJQMLJP.js";
|
|
6
|
+
import {
|
|
7
|
+
__export
|
|
8
|
+
} from "./chunk-MLKGABMK.js";
|
|
9
|
+
|
|
10
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.4_effect@4.0.4_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeDatagramSocket.js
|
|
11
|
+
var NodeDatagramSocket_exports = {};
|
|
12
|
+
__export(NodeDatagramSocket_exports, {
|
|
13
|
+
fromSocket: () => fromSocket,
|
|
14
|
+
layer: () => layer,
|
|
15
|
+
make: () => make
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
NodeDatagramSocket_exports
|
|
20
|
+
};
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__export
|
|
3
3
|
} from "./chunk-MLKGABMK.js";
|
|
4
4
|
|
|
5
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.4_effect@4.0.4/node_modules/@effect/platform-node-shared/dist/NodeTerminal.js
|
|
6
6
|
var NodeTerminal_exports = {};
|
|
7
7
|
__export(NodeTerminal_exports, {
|
|
8
8
|
layer: () => layer,
|
|
@@ -133,7 +133,8 @@ var make4 = /* @__PURE__ */ Effect.fnUntraced(function* (shouldQuit = defaultSho
|
|
|
133
133
|
});
|
|
134
134
|
var layer = /* @__PURE__ */ Layer.effect(Terminal.Terminal, /* @__PURE__ */ make4(defaultShouldQuit));
|
|
135
135
|
function defaultShouldQuit(input) {
|
|
136
|
-
|
|
136
|
+
const key = input.key;
|
|
137
|
+
return key.name === "escape" || key.ctrl && (key.name === "c" || key.name === "d");
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runMain
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UUYTTEDH.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
6
|
} from "./chunk-MLKGABMK.js";
|
|
7
7
|
|
|
8
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
8
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.4_effect@4.0.4_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeRuntime.js
|
|
9
9
|
var NodeRuntime_exports = {};
|
|
10
10
|
__export(NodeRuntime_exports, {
|
|
11
11
|
runMain: () => runMain2
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSpawnOptions
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
handleErrnoException
|
|
6
|
-
} from "./chunk-42QKY6T6.js";
|
|
3
|
+
} from "./chunk-UUQXJRMK.js";
|
|
7
4
|
import {
|
|
8
5
|
fromReadable
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RQH5DSBA.js";
|
|
10
7
|
import {
|
|
11
8
|
fromWritable
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-A7UXCEJA.js";
|
|
10
|
+
import {
|
|
11
|
+
handleErrnoException
|
|
12
|
+
} from "./chunk-2ZAGBWTH.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
15
|
} from "./chunk-MLKGABMK.js";
|
|
16
16
|
|
|
17
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.
|
|
17
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.4_effect@4.0.4/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
18
18
|
var NodeChildProcessSpawner_exports = {};
|
|
19
19
|
__export(NodeChildProcessSpawner_exports, {
|
|
20
20
|
flattenCommand: () => flattenCommand,
|
|
@@ -28,10 +28,10 @@ import * as FileSystem from "effect/FileSystem";
|
|
|
28
28
|
import * as Layer from "effect/Layer";
|
|
29
29
|
import * as Path from "effect/Path";
|
|
30
30
|
import * as Predicate from "effect/Predicate";
|
|
31
|
+
import * as ChildProcess from "effect/process/ChildProcess";
|
|
32
|
+
import { ChildProcessSpawner, ExitCode, make as makeSpawner, makeHandle, ProcessId } from "effect/process/ChildProcessSpawner";
|
|
31
33
|
import * as Sink from "effect/Sink";
|
|
32
34
|
import * as Stream from "effect/Stream";
|
|
33
|
-
import * as ChildProcess from "effect/unstable/process/ChildProcess";
|
|
34
|
-
import { ChildProcessSpawner, ExitCode, make as makeSpawner, makeHandle, ProcessId } from "effect/unstable/process/ChildProcessSpawner";
|
|
35
35
|
import * as NodeChildProcess from "node:child_process";
|
|
36
36
|
import { PassThrough } from "node:stream";
|
|
37
37
|
var toError = (error) => error instanceof globalThis.Error ? error : new globalThis.Error(String(error));
|
|
@@ -47,6 +47,12 @@ var toPlatformError = (method, error, command) => {
|
|
|
47
47
|
};
|
|
48
48
|
var processGroupGraceMillis = 1e3;
|
|
49
49
|
var processGroupPollIntervalMillis = 10;
|
|
50
|
+
var handleInputErrors = (writable) => {
|
|
51
|
+
const onError = () => {
|
|
52
|
+
};
|
|
53
|
+
writable.on("error", onError);
|
|
54
|
+
writable.once("close", () => writable.off("error", onError));
|
|
55
|
+
};
|
|
50
56
|
var isProcessAlive = (childProcess, exitSignal) => {
|
|
51
57
|
if (!Deferred.isDoneUnsafe(exitSignal)) {
|
|
52
58
|
return true;
|
|
@@ -62,9 +68,15 @@ var isProcessAlive = (childProcess, exitSignal) => {
|
|
|
62
68
|
}
|
|
63
69
|
};
|
|
64
70
|
var taskkill = (childProcess, onExit = () => {
|
|
65
|
-
}) =>
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
}) => {
|
|
72
|
+
if (childProcess.exitCode !== null || childProcess.signalCode !== null) {
|
|
73
|
+
onExit(null);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
NodeChildProcess.execFile("taskkill", ["/pid", String(childProcess.pid), "/T", "/F"], {
|
|
77
|
+
windowsHide: true
|
|
78
|
+
}, onExit);
|
|
79
|
+
};
|
|
68
80
|
var make2 = /* @__PURE__ */ Effect.gen(function* () {
|
|
69
81
|
const fs = yield* FileSystem.FileSystem;
|
|
70
82
|
const path = yield* Path.Path;
|
|
@@ -181,6 +193,7 @@ var make2 = /* @__PURE__ */ Effect.gen(function* () {
|
|
|
181
193
|
case "input": {
|
|
182
194
|
let sink = Sink.drain;
|
|
183
195
|
if (nodeStream && "write" in nodeStream) {
|
|
196
|
+
handleInputErrors(nodeStream);
|
|
184
197
|
sink = fromWritable({
|
|
185
198
|
evaluate: () => nodeStream,
|
|
186
199
|
onError: (error) => toPlatformError(`fromWritable(fd${fd})`, toError(error), command)
|
|
@@ -219,6 +232,7 @@ var make2 = /* @__PURE__ */ Effect.gen(function* () {
|
|
|
219
232
|
const setupChildStdin = (command, childProcess, config) => Effect.suspend(() => {
|
|
220
233
|
let sink = Sink.drain;
|
|
221
234
|
if (Predicate.isNotNull(childProcess.stdin)) {
|
|
235
|
+
handleInputErrors(childProcess.stdin);
|
|
222
236
|
sink = fromWritable({
|
|
223
237
|
evaluate: () => childProcess.stdin,
|
|
224
238
|
onError: (error) => toPlatformError("fromWritable(stdin)", toError(error), command),
|
|
@@ -388,7 +402,9 @@ var make2 = /* @__PURE__ */ Effect.gen(function* () {
|
|
|
388
402
|
if (exited) {
|
|
389
403
|
const [code] = yield* Deferred.await(exitSignal2);
|
|
390
404
|
if (code !== 0 && Predicate.isNotNull(code)) {
|
|
391
|
-
yield* Effect.ignore(
|
|
405
|
+
yield* Effect.ignore(terminateProcessGroup(cmd, childProcess2, exitSignal2, cmd.options));
|
|
406
|
+
} else if (isReferenced && process.platform !== "win32" && cmd.options.detached !== false) {
|
|
407
|
+
yield* Effect.ignore(terminateProcessGroup(cmd, childProcess2, exitSignal2, cmd.options));
|
|
392
408
|
}
|
|
393
409
|
return;
|
|
394
410
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
layer as layer5
|
|
3
|
-
} from "./chunk-KUUXSID7.js";
|
|
4
1
|
import {
|
|
5
2
|
layer as layer6
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-D4HEMNGU.js";
|
|
4
|
+
import {
|
|
5
|
+
layer as layer5
|
|
6
|
+
} from "./chunk-KABHKTVG.js";
|
|
7
7
|
import {
|
|
8
8
|
layer as layer4
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7NMJM44J.js";
|
|
10
10
|
import {
|
|
11
11
|
layer
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NQO6V4KI.js";
|
|
13
13
|
import {
|
|
14
14
|
layer as layer2
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PU7QVYND.js";
|
|
16
16
|
import {
|
|
17
17
|
layer as layer3
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VIWU4EBF.js";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./chunk-MLKGABMK.js";
|
|
22
22
|
|
|
23
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
23
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.4_effect@4.0.4_redis@6.2.1_@opentelemetry+api@1.9.1_/node_modules/@effect/platform-node/dist/NodeServices.js
|
|
24
24
|
var NodeServices_exports = {};
|
|
25
25
|
__export(NodeServices_exports, {
|
|
26
26
|
layer: () => layer7
|