@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,4 +1,4 @@
|
|
|
1
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.
|
|
1
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.4_effect@4.0.4/node_modules/@effect/platform-node-shared/dist/internal/utils.js
|
|
2
2
|
import * as PlatformError from "effect/PlatformError";
|
|
3
3
|
var handleErrnoException = (module, method) => (err, [path]) => {
|
|
4
4
|
let reason = "Unknown";
|
|
@@ -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/NodeHttpCompression.js
|
|
6
6
|
var NodeHttpCompression_exports = {};
|
|
7
7
|
__export(NodeHttpCompression_exports, {
|
|
8
8
|
algorithms: () => algorithms,
|
|
@@ -11,8 +11,8 @@ __export(NodeHttpCompression_exports, {
|
|
|
11
11
|
make: () => make
|
|
12
12
|
});
|
|
13
13
|
import * as Effect from "effect/Effect";
|
|
14
|
-
import * as HttpBody from "effect/
|
|
15
|
-
import * as Response from "effect/
|
|
14
|
+
import * as HttpBody from "effect/http/HttpBody";
|
|
15
|
+
import * as Response from "effect/http/HttpServerResponse";
|
|
16
16
|
import { Readable } from "node:stream";
|
|
17
17
|
import * as Zlib from "node:zlib";
|
|
18
18
|
var algorithms = /* @__PURE__ */ new Set(typeof Zlib.zstdCompress === "function" ? ["gzip", "deflate", "br", "zstd"] : ["gzip", "deflate", "br"]);
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
algorithms,
|
|
3
3
|
compressTransform,
|
|
4
4
|
make
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
layer
|
|
8
|
-
} from "./chunk-M32LDTW7.js";
|
|
5
|
+
} from "./chunk-3SL3HKQA.js";
|
|
9
6
|
import {
|
|
10
7
|
pipeThroughDuplex
|
|
11
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RQH5DSBA.js";
|
|
9
|
+
import {
|
|
10
|
+
layer
|
|
11
|
+
} from "./chunk-VIWU4EBF.js";
|
|
12
12
|
import {
|
|
13
13
|
__export
|
|
14
14
|
} from "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
16
|
+
// ../../../../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/NodeHttpPlatform.js
|
|
17
17
|
var NodeHttpPlatform_exports = {};
|
|
18
18
|
__export(NodeHttpPlatform_exports, {
|
|
19
19
|
layer: () => layer3,
|
|
@@ -21,16 +21,45 @@ __export(NodeHttpPlatform_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
import * as Effect from "effect/Effect";
|
|
23
23
|
import { pipe } from "effect/Function";
|
|
24
|
+
import * as EtagImpl from "effect/http/Etag";
|
|
25
|
+
import * as Headers from "effect/http/Headers";
|
|
26
|
+
import * as HttpBody from "effect/http/HttpBody";
|
|
27
|
+
import * as Platform from "effect/http/HttpPlatform";
|
|
28
|
+
import * as ServerResponse from "effect/http/HttpServerResponse";
|
|
29
|
+
import * as Mime from "effect/http/Mime";
|
|
24
30
|
import * as Layer from "effect/Layer";
|
|
25
31
|
import * as Option from "effect/Option";
|
|
26
|
-
import * as EtagImpl from "effect/unstable/http/Etag";
|
|
27
|
-
import * as Headers from "effect/unstable/http/Headers";
|
|
28
|
-
import * as HttpBody from "effect/unstable/http/HttpBody";
|
|
29
|
-
import * as Platform from "effect/unstable/http/HttpPlatform";
|
|
30
|
-
import * as ServerResponse from "effect/unstable/http/HttpServerResponse";
|
|
31
|
-
import * as Mime from "effect/unstable/http/Mime";
|
|
32
32
|
import * as Fs from "node:fs";
|
|
33
|
-
import { Readable } from "node:stream";
|
|
33
|
+
import { pipeline, Readable } from "node:stream";
|
|
34
|
+
var lazyReadable = (evaluate, onDestroy) => {
|
|
35
|
+
let source;
|
|
36
|
+
return new Readable({
|
|
37
|
+
read() {
|
|
38
|
+
if (source === void 0) {
|
|
39
|
+
try {
|
|
40
|
+
source = evaluate();
|
|
41
|
+
} catch (cause) {
|
|
42
|
+
this.destroy(cause instanceof Error ? cause : new Error(String(cause)));
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
source.on("data", (chunk) => {
|
|
46
|
+
if (!this.push(chunk)) source.pause();
|
|
47
|
+
});
|
|
48
|
+
source.once("end", () => this.push(null));
|
|
49
|
+
source.once("error", (cause) => this.destroy(cause));
|
|
50
|
+
source.once("close", () => {
|
|
51
|
+
if (!source.readableEnded) this.destroy(new Error("Response stream closed prematurely"));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
source.resume();
|
|
55
|
+
},
|
|
56
|
+
destroy(error, callback) {
|
|
57
|
+
source?.destroy(error ?? void 0);
|
|
58
|
+
onDestroy?.();
|
|
59
|
+
callback(error);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
};
|
|
34
63
|
var compressedBody = (response, body) => ServerResponse.removeHeader(ServerResponse.setBody(response, body), "content-length");
|
|
35
64
|
var compression = /* @__PURE__ */ make({
|
|
36
65
|
algorithms,
|
|
@@ -43,12 +72,15 @@ var compression = /* @__PURE__ */ make({
|
|
|
43
72
|
}), response.headers["content-type"] ?? body.contentType)));
|
|
44
73
|
}
|
|
45
74
|
case "Raw": {
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
75
|
+
let readable = body.body instanceof Readable ? body.body : void 0;
|
|
76
|
+
const compressed = lazyReadable(() => {
|
|
77
|
+
const transform = compressTransform(algorithm, options);
|
|
78
|
+
readable ??= Readable.fromWeb(new Response(body.body).body);
|
|
79
|
+
return pipeline(readable, transform, (cause) => {
|
|
80
|
+
if (cause) compressed.destroy(cause);
|
|
81
|
+
});
|
|
82
|
+
}, () => readable?.destroy());
|
|
83
|
+
return Effect.succeed(compressedBody(response, HttpBody.raw(compressed, {
|
|
52
84
|
contentType: response.headers["content-type"] ?? body.contentType
|
|
53
85
|
})));
|
|
54
86
|
}
|
|
@@ -62,10 +94,10 @@ var make3 = /* @__PURE__ */ Platform.make({
|
|
|
62
94
|
platform: "node",
|
|
63
95
|
compression,
|
|
64
96
|
fileResponse(path, status, statusText, headers, start, end, contentLength) {
|
|
65
|
-
const stream2 = contentLength === BigInt(0) ? Readable.from([]) : Fs.createReadStream(path, {
|
|
97
|
+
const stream2 = lazyReadable(() => contentLength === BigInt(0) ? Readable.from([]) : Fs.createReadStream(path, {
|
|
66
98
|
start,
|
|
67
99
|
end: end === void 0 ? void 0 : end - 1
|
|
68
|
-
});
|
|
100
|
+
}));
|
|
69
101
|
return ServerResponse.raw(stream2, {
|
|
70
102
|
headers: {
|
|
71
103
|
...headers,
|
|
@@ -77,9 +109,9 @@ var make3 = /* @__PURE__ */ Platform.make({
|
|
|
77
109
|
});
|
|
78
110
|
},
|
|
79
111
|
fileWebResponse(file, status, statusText, headers, _options) {
|
|
80
|
-
return ServerResponse.raw(Readable.fromWeb(file.stream()), {
|
|
112
|
+
return ServerResponse.raw(lazyReadable(() => Readable.fromWeb(file.stream())), {
|
|
81
113
|
headers: Headers.merge(headers, Headers.fromRecordUnsafe({
|
|
82
|
-
"content-type": headers["content-type"] ?? Option.getOrElse(Mime.getType(file.name), () => "application/octet-stream"),
|
|
114
|
+
"content-type": headers["content-type"] ?? (file.type === "" ? Option.getOrElse(Mime.getType(file.name), () => "application/octet-stream") : file.type),
|
|
83
115
|
"content-length": file.size.toString()
|
|
84
116
|
})),
|
|
85
117
|
status,
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
make,
|
|
7
7
|
makeTls,
|
|
8
8
|
makeWebSocket
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S6QUQLBV.js";
|
|
10
10
|
import {
|
|
11
11
|
__export
|
|
12
12
|
} from "./chunk-MLKGABMK.js";
|
|
13
13
|
|
|
14
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
14
|
+
// ../../../../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/NodeSocketServer.js
|
|
15
15
|
var NodeSocketServer_exports = {};
|
|
16
16
|
__export(NodeSocketServer_exports, {
|
|
17
17
|
IncomingMessage: () => IncomingMessage,
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S6QUQLBV.js";
|
|
4
4
|
import {
|
|
5
5
|
makeNet
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C3PGUWW5.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/NodeClusterSocket.js
|
|
12
12
|
var NodeClusterSocket_exports = {};
|
|
13
13
|
__export(NodeClusterSocket_exports, {
|
|
14
14
|
layerClientProtocol: () => layerClientProtocol,
|
|
15
15
|
layerSocketServer: () => layerSocketServer
|
|
16
16
|
});
|
|
17
|
+
import * as Runners from "effect/cluster/Runners";
|
|
18
|
+
import * as ShardingConfig from "effect/cluster/ShardingConfig";
|
|
17
19
|
import * as Effect from "effect/Effect";
|
|
18
20
|
import * as Layer from "effect/Layer";
|
|
19
21
|
import * as Option from "effect/Option";
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
22
|
-
import
|
|
23
|
-
import * as RpcSerialization from "effect/unstable/rpc/RpcSerialization";
|
|
24
|
-
import { Socket } from "effect/unstable/socket/Socket";
|
|
22
|
+
import * as RpcClient from "effect/rpc/RpcClient";
|
|
23
|
+
import * as RpcSerialization from "effect/rpc/RpcSerialization";
|
|
24
|
+
import { Socket } from "effect/socket/Socket";
|
|
25
25
|
var layerClientProtocol = /* @__PURE__ */ Layer.effect(Runners.RpcClientProtocol)(/* @__PURE__ */ Effect.gen(function* () {
|
|
26
26
|
const serialization = yield* RpcSerialization.RpcSerialization;
|
|
27
27
|
return {
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
makeNetChannel,
|
|
9
9
|
makeTls,
|
|
10
10
|
makeTlsChannel
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-C3PGUWW5.js";
|
|
12
12
|
import {
|
|
13
13
|
__export
|
|
14
14
|
} from "./chunk-MLKGABMK.js";
|
|
15
15
|
|
|
16
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
16
|
+
// ../../../../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/NodeSocket.js
|
|
17
17
|
var NodeSocket_exports = {};
|
|
18
18
|
__export(NodeSocket_exports, {
|
|
19
19
|
NetSocket: () => NetSocket,
|
|
@@ -31,8 +31,15 @@ __export(NodeSocket_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
import { flow } from "effect/Function";
|
|
33
33
|
import * as Layer from "effect/Layer";
|
|
34
|
-
import * as Socket from "effect/
|
|
35
|
-
var makeWebSocketWS = (url, options) =>
|
|
34
|
+
import * as Socket from "effect/socket/Socket";
|
|
35
|
+
var makeWebSocketWS = (url, options) => {
|
|
36
|
+
if (options === void 0 || typeof options === "string" || Array.isArray(options)) {
|
|
37
|
+
return new NodeWS.WebSocket(url, options);
|
|
38
|
+
}
|
|
39
|
+
return new NodeWS.WebSocket(url, options.protocols, {
|
|
40
|
+
headers: options.headers
|
|
41
|
+
});
|
|
42
|
+
};
|
|
36
43
|
var layerWebSocketConstructor = /* @__PURE__ */ Layer.sync(Socket.WebSocketConstructor)(() => {
|
|
37
44
|
if ("WebSocket" in globalThis) {
|
|
38
45
|
return (url, options) => {
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
layer,
|
|
3
3
|
layerPosix,
|
|
4
4
|
layerWin32
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OF3N2FN4.js";
|
|
6
6
|
import {
|
|
7
7
|
__export
|
|
8
8
|
} from "./chunk-MLKGABMK.js";
|
|
9
9
|
|
|
10
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
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/NodePath.js
|
|
11
11
|
var NodePath_exports = {};
|
|
12
12
|
__export(NodePath_exports, {
|
|
13
13
|
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-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/NodeSink.js
|
|
6
6
|
var NodeSink_exports = {};
|
|
7
7
|
__export(NodeSink_exports, {
|
|
8
8
|
fromWritable: () => fromWritable,
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-MLKGABMK.js";
|
|
4
|
+
|
|
5
|
+
// ../../../../node_modules/.pnpm/@effect+platform-node-shared@4.0.4_effect@4.0.4/node_modules/@effect/platform-node-shared/dist/NodeDns.js
|
|
6
|
+
var NodeDns_exports = {};
|
|
7
|
+
__export(NodeDns_exports, {
|
|
8
|
+
addressesFromLookup: () => addressesFromLookup,
|
|
9
|
+
dnsErrorFromCause: () => dnsErrorFromCause,
|
|
10
|
+
domainNameFromResolverUnsafe: () => domainNameFromResolverUnsafe,
|
|
11
|
+
layer: () => layer,
|
|
12
|
+
layerConfig: () => layerConfig,
|
|
13
|
+
lookup: () => lookup,
|
|
14
|
+
make: () => make2,
|
|
15
|
+
nameTextFromResolver: () => nameTextFromResolver,
|
|
16
|
+
recordsFromResolver: () => recordsFromResolver,
|
|
17
|
+
resolver: () => resolver,
|
|
18
|
+
secondsFromInt32: () => secondsFromInt32,
|
|
19
|
+
toFamily: () => toFamily,
|
|
20
|
+
utf8FromLatin1: () => utf8FromLatin1
|
|
21
|
+
});
|
|
22
|
+
import * as Arr from "effect/Array";
|
|
23
|
+
import * as Config from "effect/Config";
|
|
24
|
+
import * as Duration from "effect/Duration";
|
|
25
|
+
import * as Effect from "effect/Effect";
|
|
26
|
+
import * as Layer from "effect/Layer";
|
|
27
|
+
import * as Dns from "effect/net/Dns";
|
|
28
|
+
import * as Host from "effect/net/Host";
|
|
29
|
+
import * as NetAddress from "effect/net/NetAddress";
|
|
30
|
+
import * as Result from "effect/Result";
|
|
31
|
+
import * as NodeDns from "node:dns";
|
|
32
|
+
var reasons = {
|
|
33
|
+
ENOTFOUND: "NotFound",
|
|
34
|
+
ENODATA: "NotFound",
|
|
35
|
+
ETIMEOUT: "Timeout",
|
|
36
|
+
// `getaddrinfo` reports SERVFAIL answers as `EAI_AGAIN`, and REFUSED,
|
|
37
|
+
// FORMERR, and NOTIMP answers alike as `EAI_FAIL`.
|
|
38
|
+
EAI_AGAIN: "Temporary",
|
|
39
|
+
EAI_FAIL: "Refused",
|
|
40
|
+
ESERVFAIL: "ServerFailure",
|
|
41
|
+
EREFUSED: "Refused",
|
|
42
|
+
ECONNREFUSED: "Refused",
|
|
43
|
+
EBADNAME: "BadName",
|
|
44
|
+
ENONAME: "BadName",
|
|
45
|
+
EBADFAMILY: "BadName",
|
|
46
|
+
EBADQUERY: "BadName",
|
|
47
|
+
EFORMERR: "InvalidResponse",
|
|
48
|
+
EBADRESP: "InvalidResponse",
|
|
49
|
+
ENOTIMP: "Unsupported"
|
|
50
|
+
};
|
|
51
|
+
var dnsErrorFromCause = (cause, method, hostname, recordType) => {
|
|
52
|
+
const code = typeof cause === "object" && cause !== null && "code" in cause ? String(cause.code).replace(/^DNS_/, "") : void 0;
|
|
53
|
+
return new Dns.DnsError({
|
|
54
|
+
reason: (code !== void 0 ? reasons[code] : void 0) ?? "Unknown",
|
|
55
|
+
method,
|
|
56
|
+
hostname,
|
|
57
|
+
recordType,
|
|
58
|
+
cause
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
var absoluteName = (name) => {
|
|
62
|
+
if (name.endsWith(".")) {
|
|
63
|
+
let backslashes = 0;
|
|
64
|
+
for (let i = name.length - 2; i >= 0 && name[i] === "\\"; i--) {
|
|
65
|
+
backslashes++;
|
|
66
|
+
}
|
|
67
|
+
if (backslashes % 2 === 0) return name;
|
|
68
|
+
}
|
|
69
|
+
return `${name}.`;
|
|
70
|
+
};
|
|
71
|
+
var domainNameFromResolverUnsafe = (name) => Host.domainNameFromStringUnsafe(absoluteName(name));
|
|
72
|
+
var decoder = /* @__PURE__ */ new TextDecoder();
|
|
73
|
+
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
74
|
+
var nameParts = /\\(\d{3})|\\(.)|[^\\]+|\\/gsu;
|
|
75
|
+
var nameTextFromResolver = (name, radix = 10) => {
|
|
76
|
+
if (!name.includes("\\")) return absoluteName(name);
|
|
77
|
+
const bytes = [];
|
|
78
|
+
for (const [part, digits, escaped] of name.matchAll(nameParts)) {
|
|
79
|
+
if (digits !== void 0) {
|
|
80
|
+
const byte = Number.parseInt(digits, radix);
|
|
81
|
+
if (byte === 46 || byte === 92) bytes.push(92);
|
|
82
|
+
bytes.push(byte);
|
|
83
|
+
} else if (escaped !== void 0) {
|
|
84
|
+
if (escaped === "." || escaped === "\\") bytes.push(92);
|
|
85
|
+
bytes.push(...encoder.encode(escaped));
|
|
86
|
+
} else {
|
|
87
|
+
bytes.push(...encoder.encode(part));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return absoluteName(decoder.decode(Uint8Array.from(bytes)));
|
|
91
|
+
};
|
|
92
|
+
var secondsFromInt32 = (value) => Duration.seconds(value >>> 0);
|
|
93
|
+
var utf8FromLatin1 = (value) => (
|
|
94
|
+
// oxlint-disable-next-line no-control-regex
|
|
95
|
+
/[^\x00-\x7f]/.test(value) ? decoder.decode(Uint8Array.from(value, (character) => character.charCodeAt(0))) : value
|
|
96
|
+
);
|
|
97
|
+
var recordsFromResolver = (name, type, entries, fields) => {
|
|
98
|
+
const records = [];
|
|
99
|
+
let skipped;
|
|
100
|
+
for (const entry of entries) {
|
|
101
|
+
const result = Result.try(() => Dns.makeRecordUnsafe(type, fields(entry)));
|
|
102
|
+
if (Result.isSuccess(result)) {
|
|
103
|
+
records.push(result.success);
|
|
104
|
+
} else {
|
|
105
|
+
skipped ??= result;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return records.length === 0 && skipped !== void 0 ? Result.fail(new Dns.DnsError({
|
|
109
|
+
reason: "InvalidResponse",
|
|
110
|
+
method: "resolve",
|
|
111
|
+
hostname: name,
|
|
112
|
+
recordType: type,
|
|
113
|
+
cause: skipped.failure
|
|
114
|
+
})) : Result.succeed(records);
|
|
115
|
+
};
|
|
116
|
+
var queries = {
|
|
117
|
+
A: async (resolver2, name) => recordsFromResolver(name, "A", await resolver2.resolve4(name), (address) => ({
|
|
118
|
+
address: NetAddress.ipFromStringUnsafe(address)
|
|
119
|
+
})),
|
|
120
|
+
AAAA: async (resolver2, name) => recordsFromResolver(name, "AAAA", await resolver2.resolve6(name), (address) => ({
|
|
121
|
+
address: NetAddress.ipFromStringUnsafe(address)
|
|
122
|
+
})),
|
|
123
|
+
CAA: async (resolver2, name) => recordsFromResolver(name, "CAA", await resolver2.resolveCaa(name), (caa) => {
|
|
124
|
+
const tag = Object.keys(caa).find((key) => key !== "critical" && key !== "type");
|
|
125
|
+
if (tag === void 0) throw new Error("CAA record without a property tag");
|
|
126
|
+
return {
|
|
127
|
+
critical: (caa.critical & 128) !== 0,
|
|
128
|
+
tag,
|
|
129
|
+
value: String(caa[tag])
|
|
130
|
+
};
|
|
131
|
+
}),
|
|
132
|
+
CNAME: async (resolver2, name) => recordsFromResolver(name, "CNAME", await resolver2.resolveCname(name), (target) => ({
|
|
133
|
+
target: domainNameFromResolverUnsafe(target)
|
|
134
|
+
})),
|
|
135
|
+
MX: async (resolver2, name) => recordsFromResolver(name, "MX", await resolver2.resolveMx(name), (mx) => ({
|
|
136
|
+
exchange: domainNameFromResolverUnsafe(mx.exchange),
|
|
137
|
+
priority: mx.priority
|
|
138
|
+
})),
|
|
139
|
+
NAPTR: async (resolver2, name) => recordsFromResolver(name, "NAPTR", await resolver2.resolveNaptr(name), (naptr) => ({
|
|
140
|
+
order: naptr.order,
|
|
141
|
+
preference: naptr.preference,
|
|
142
|
+
flags: naptr.flags,
|
|
143
|
+
service: naptr.service,
|
|
144
|
+
regexp: naptr.regexp,
|
|
145
|
+
replacement: domainNameFromResolverUnsafe(naptr.replacement)
|
|
146
|
+
})),
|
|
147
|
+
NS: async (resolver2, name) => recordsFromResolver(name, "NS", await resolver2.resolveNs(name), (host) => ({
|
|
148
|
+
host: domainNameFromResolverUnsafe(host)
|
|
149
|
+
})),
|
|
150
|
+
PTR: async (resolver2, name) => recordsFromResolver(name, "PTR", await resolver2.resolvePtr(name), (host) => ({
|
|
151
|
+
host: nameTextFromResolver(host)
|
|
152
|
+
})),
|
|
153
|
+
SOA: async (resolver2, name) => recordsFromResolver(name, "SOA", [await resolver2.resolveSoa(name)], (soa) => ({
|
|
154
|
+
primary: domainNameFromResolverUnsafe(soa.nsname),
|
|
155
|
+
admin: nameTextFromResolver(soa.hostmaster),
|
|
156
|
+
serial: soa.serial,
|
|
157
|
+
refresh: secondsFromInt32(soa.refresh),
|
|
158
|
+
retry: secondsFromInt32(soa.retry),
|
|
159
|
+
expire: secondsFromInt32(soa.expire),
|
|
160
|
+
minimum: Duration.seconds(soa.minttl)
|
|
161
|
+
})),
|
|
162
|
+
SRV: async (resolver2, name) => recordsFromResolver(name, "SRV", await resolver2.resolveSrv(name), (srv) => ({
|
|
163
|
+
target: domainNameFromResolverUnsafe(srv.name),
|
|
164
|
+
port: srv.port,
|
|
165
|
+
priority: srv.priority,
|
|
166
|
+
weight: srv.weight
|
|
167
|
+
})),
|
|
168
|
+
// `resolveTlsa` was added in Node.js 22.15 and 23.9; Bun and Deno lack it.
|
|
169
|
+
TLSA: async (resolver2, name) => typeof resolver2.resolveTlsa === "function" ? recordsFromResolver(name, "TLSA", await resolver2.resolveTlsa(name), (tlsa) => ({
|
|
170
|
+
certUsage: tlsa.certUsage,
|
|
171
|
+
selector: tlsa.selector,
|
|
172
|
+
matchingType: tlsa.match,
|
|
173
|
+
data: new Uint8Array(tlsa.data)
|
|
174
|
+
})) : Result.fail(new Dns.DnsError({
|
|
175
|
+
reason: "Unsupported",
|
|
176
|
+
method: "resolve",
|
|
177
|
+
hostname: name,
|
|
178
|
+
recordType: "TLSA"
|
|
179
|
+
})),
|
|
180
|
+
TXT: async (resolver2, name) => recordsFromResolver(name, "TXT", await resolver2.resolveTxt(name), (chunks) => ({
|
|
181
|
+
chunks
|
|
182
|
+
}))
|
|
183
|
+
};
|
|
184
|
+
var toFamily = (family) => family === "IPv4" ? 4 : family === "IPv6" ? 6 : 0;
|
|
185
|
+
var stripZone = (address) => {
|
|
186
|
+
const separator = address.indexOf("%");
|
|
187
|
+
return separator === -1 ? address : address.slice(0, separator);
|
|
188
|
+
};
|
|
189
|
+
var addressesFromLookup = (entries) => Arr.filterMap(entries, (entry) => Result.try(() => NetAddress.ipFromStringUnsafe(stripZone(entry.address))));
|
|
190
|
+
var lookup = (host, family) => Effect.tryPromise({
|
|
191
|
+
// `verbatim` keeps the system order on Node versions without `order`.
|
|
192
|
+
try: () => NodeDns.promises.lookup(host, {
|
|
193
|
+
all: true,
|
|
194
|
+
family: toFamily(family),
|
|
195
|
+
order: "verbatim",
|
|
196
|
+
verbatim: true
|
|
197
|
+
}),
|
|
198
|
+
catch: (cause) => dnsErrorFromCause(cause, "lookup", host)
|
|
199
|
+
}).pipe(Effect.map(addressesFromLookup));
|
|
200
|
+
var resolverInt = (value) => value >= 1 ? Math.min(value, 2 ** 31 - 1) : 1;
|
|
201
|
+
var resolver = /* @__PURE__ */ Effect.fnUntraced(function* (options) {
|
|
202
|
+
const resolverOptions = {
|
|
203
|
+
...options?.timeout !== void 0 && {
|
|
204
|
+
timeout: resolverInt(Math.ceil(Duration.toMillis(options.timeout)))
|
|
205
|
+
},
|
|
206
|
+
...options?.tries !== void 0 && {
|
|
207
|
+
tries: resolverInt(Math.floor(options.tries))
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
const nameServers = [];
|
|
211
|
+
for (const input of options?.nameServers ?? []) {
|
|
212
|
+
const server = yield* Effect.fromResult(Dns.nameServerFromInput(input));
|
|
213
|
+
if (NetAddress.isInetAddressV6(server) && server.scopeId !== 0) {
|
|
214
|
+
return yield* new NetAddress.NetAddressError({
|
|
215
|
+
input,
|
|
216
|
+
message: "IPv6 name servers with a scope ID are not supported"
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
nameServers.push(server);
|
|
220
|
+
}
|
|
221
|
+
const resolver2 = yield* Effect.acquireRelease(Effect.sync(() => {
|
|
222
|
+
const resolver3 = new NodeDns.promises.Resolver(resolverOptions);
|
|
223
|
+
if (nameServers.length > 0) {
|
|
224
|
+
resolver3.setServers(nameServers.map(NetAddress.formatInet));
|
|
225
|
+
}
|
|
226
|
+
return resolver3;
|
|
227
|
+
}), (resolver3) => Effect.sync(() => resolver3.cancel()));
|
|
228
|
+
return (name, type) => Effect.tryPromise({
|
|
229
|
+
try: () => queries[type](resolver2, name),
|
|
230
|
+
catch: (cause) => dnsErrorFromCause(cause, "resolve", name, type)
|
|
231
|
+
}).pipe(Effect.flatMap(Effect.fromResult));
|
|
232
|
+
});
|
|
233
|
+
var utf8Strings = (record) => {
|
|
234
|
+
switch (record._tag) {
|
|
235
|
+
case "TXT":
|
|
236
|
+
return Dns.makeRecordUnsafe("TXT", {
|
|
237
|
+
chunks: Arr.map(record.chunks, utf8FromLatin1)
|
|
238
|
+
});
|
|
239
|
+
case "CAA":
|
|
240
|
+
return Dns.makeRecordUnsafe("CAA", {
|
|
241
|
+
critical: record.critical,
|
|
242
|
+
tag: record.tag,
|
|
243
|
+
value: utf8FromLatin1(record.value)
|
|
244
|
+
});
|
|
245
|
+
default:
|
|
246
|
+
return record;
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
var make2 = /* @__PURE__ */ Effect.fnUntraced(function* (options) {
|
|
250
|
+
const resolve = yield* resolver(options);
|
|
251
|
+
return Dns.make({
|
|
252
|
+
lookup,
|
|
253
|
+
resolve: (name, type) => Effect.map(resolve(name, type), Arr.map(utf8Strings))
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
var layer = /* @__PURE__ */ Layer.effect(Dns.Dns, /* @__PURE__ */ Effect.orDie(/* @__PURE__ */ make2()));
|
|
257
|
+
var layerConfig = (options) => Layer.effect(Dns.Dns, Effect.flatMap(Config.unwrap(options), make2));
|
|
258
|
+
|
|
259
|
+
export {
|
|
260
|
+
dnsErrorFromCause,
|
|
261
|
+
domainNameFromResolverUnsafe,
|
|
262
|
+
nameTextFromResolver,
|
|
263
|
+
secondsFromInt32,
|
|
264
|
+
utf8FromLatin1,
|
|
265
|
+
recordsFromResolver,
|
|
266
|
+
toFamily,
|
|
267
|
+
addressesFromLookup,
|
|
268
|
+
lookup,
|
|
269
|
+
resolver,
|
|
270
|
+
make2 as make,
|
|
271
|
+
layer,
|
|
272
|
+
layerConfig,
|
|
273
|
+
NodeDns_exports
|
|
274
|
+
};
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
toReadableNever,
|
|
10
10
|
toString,
|
|
11
11
|
toUint8Array
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RQH5DSBA.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
15
|
} from "./chunk-MLKGABMK.js";
|
|
16
16
|
|
|
17
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
17
|
+
// ../../../../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/NodeStream.js
|
|
18
18
|
var NodeStream_exports = {};
|
|
19
19
|
__export(NodeStream_exports, {
|
|
20
20
|
fromDuplex: () => fromDuplex,
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
fromWritable,
|
|
3
3
|
fromWritableChannel,
|
|
4
4
|
pullIntoWritable
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-A7UXCEJA.js";
|
|
6
6
|
import {
|
|
7
7
|
__export
|
|
8
8
|
} from "./chunk-MLKGABMK.js";
|
|
9
9
|
|
|
10
|
-
// ../../../../node_modules/.pnpm/@effect+platform-node@4.0.
|
|
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/NodeSink.js
|
|
11
11
|
var NodeSink_exports = {};
|
|
12
12
|
__export(NodeSink_exports, {
|
|
13
13
|
fromWritable: () => fromWritable,
|