@effect/platform-deno 4.0.1 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai-docs/package.json +2 -2
- package/ai-docs/tsconfig.json +2 -1
- package/dist/DenoAddressResolver.d.ts +13 -0
- package/dist/DenoAddressResolver.d.ts.map +1 -0
- package/dist/DenoAddressResolver.js +32 -0
- package/dist/DenoAddressResolver.js.map +1 -0
- package/dist/DenoChildProcessSpawner.d.ts +4 -0
- package/dist/DenoChildProcessSpawner.d.ts.map +1 -1
- package/dist/DenoChildProcessSpawner.js +2 -0
- package/dist/DenoChildProcessSpawner.js.map +1 -1
- package/dist/DenoClusterHttp.d.ts +3 -0
- package/dist/DenoClusterHttp.d.ts.map +1 -1
- package/dist/DenoClusterHttp.js +4 -0
- package/dist/DenoClusterHttp.js.map +1 -1
- package/dist/DenoClusterSocket.d.ts +5 -0
- package/dist/DenoClusterSocket.d.ts.map +1 -1
- package/dist/DenoClusterSocket.js +5 -0
- package/dist/DenoClusterSocket.js.map +1 -1
- package/dist/DenoCrypto.d.ts +3 -0
- package/dist/DenoCrypto.d.ts.map +1 -1
- package/dist/DenoCrypto.js +3 -0
- package/dist/DenoCrypto.js.map +1 -1
- package/dist/DenoDatagramSocket.d.ts +208 -0
- package/dist/DenoDatagramSocket.d.ts.map +1 -0
- package/dist/DenoDatagramSocket.js +423 -0
- package/dist/DenoDatagramSocket.js.map +1 -0
- package/dist/DenoDns.d.ts +62 -0
- package/dist/DenoDns.d.ts.map +1 -0
- package/dist/DenoDns.js +144 -0
- package/dist/DenoDns.js.map +1 -0
- package/dist/DenoFileSystem.d.ts +1 -0
- package/dist/DenoFileSystem.d.ts.map +1 -1
- package/dist/DenoFileSystem.js +50 -19
- package/dist/DenoFileSystem.js.map +1 -1
- package/dist/DenoHttpClient.d.ts +1 -0
- package/dist/DenoHttpClient.d.ts.map +1 -1
- package/dist/DenoHttpClient.js +1 -0
- package/dist/DenoHttpClient.js.map +1 -1
- package/dist/DenoHttpPlatform.d.ts +2 -0
- package/dist/DenoHttpPlatform.d.ts.map +1 -1
- package/dist/DenoHttpPlatform.js +3 -0
- package/dist/DenoHttpPlatform.js.map +1 -1
- package/dist/DenoHttpServer.d.ts +9 -1
- package/dist/DenoHttpServer.d.ts.map +1 -1
- package/dist/DenoHttpServer.js +15 -4
- package/dist/DenoHttpServer.js.map +1 -1
- package/dist/DenoHttpServerRequest.d.ts +2 -0
- package/dist/DenoHttpServerRequest.d.ts.map +1 -1
- package/dist/DenoHttpServerRequest.js +1 -0
- package/dist/DenoHttpServerRequest.js.map +1 -1
- package/dist/DenoKeyValueStore.d.ts +3 -0
- package/dist/DenoKeyValueStore.d.ts.map +1 -1
- package/dist/DenoKeyValueStore.js +3 -0
- package/dist/DenoKeyValueStore.js.map +1 -1
- package/dist/DenoMultipart.d.ts +3 -0
- package/dist/DenoMultipart.d.ts.map +1 -1
- package/dist/DenoMultipart.js +2 -0
- package/dist/DenoMultipart.js.map +1 -1
- package/dist/DenoPath.d.ts +4 -0
- package/dist/DenoPath.d.ts.map +1 -1
- package/dist/DenoPath.js +4 -0
- package/dist/DenoPath.js.map +1 -1
- package/dist/DenoRuntime.d.ts +4 -0
- package/dist/DenoRuntime.d.ts.map +1 -1
- package/dist/DenoRuntime.js +2 -0
- package/dist/DenoRuntime.js.map +1 -1
- package/dist/DenoServices.d.ts +3 -0
- package/dist/DenoServices.d.ts.map +1 -1
- package/dist/DenoServices.js +1 -0
- package/dist/DenoServices.js.map +1 -1
- package/dist/DenoSocket.d.ts +10 -0
- package/dist/DenoSocket.d.ts.map +1 -1
- package/dist/DenoSocket.js +8 -0
- package/dist/DenoSocket.js.map +1 -1
- package/dist/DenoSocketServer.d.ts +1 -0
- package/dist/DenoSocketServer.d.ts.map +1 -1
- package/dist/DenoSocketServer.js +1 -0
- package/dist/DenoSocketServer.js.map +1 -1
- package/dist/DenoStdio.d.ts +1 -0
- package/dist/DenoStdio.d.ts.map +1 -1
- package/dist/DenoStdio.js +3 -0
- package/dist/DenoStdio.js.map +1 -1
- package/dist/DenoTerminal.d.ts +6 -3
- package/dist/DenoTerminal.d.ts.map +1 -1
- package/dist/DenoTerminal.js +7 -3
- package/dist/DenoTerminal.js.map +1 -1
- package/dist/DenoWorker.d.ts +2 -0
- package/dist/DenoWorker.d.ts.map +1 -1
- package/dist/DenoWorker.js +3 -0
- package/dist/DenoWorker.js.map +1 -1
- package/dist/DenoWorkerRunner.d.ts +3 -0
- package/dist/DenoWorkerRunner.d.ts.map +1 -1
- package/dist/DenoWorkerRunner.js +4 -0
- package/dist/DenoWorkerRunner.js.map +1 -1
- package/dist/index.d.ts +36 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -1
- package/package.json +8 -6
- package/src/DenoAddressResolver.ts +36 -0
- package/src/DenoChildProcessSpawner.ts +4 -0
- package/src/DenoClusterHttp.ts +4 -0
- package/src/DenoClusterSocket.ts +5 -0
- package/src/DenoCrypto.ts +3 -0
- package/src/DenoDatagramSocket.ts +571 -0
- package/src/DenoDns.ts +196 -0
- package/src/DenoFileSystem.ts +62 -27
- package/src/DenoHttpClient.ts +1 -0
- package/src/DenoHttpPlatform.ts +3 -0
- package/src/DenoHttpServer.ts +18 -3
- package/src/DenoHttpServerRequest.ts +2 -0
- package/src/DenoKeyValueStore.ts +3 -0
- package/src/DenoMultipart.ts +3 -0
- package/src/DenoPath.ts +4 -0
- package/src/DenoRuntime.ts +4 -0
- package/src/DenoServices.ts +3 -0
- package/src/DenoSocket.ts +10 -0
- package/src/DenoSocketServer.ts +1 -0
- package/src/DenoStdio.ts +3 -0
- package/src/DenoTerminal.ts +7 -3
- package/src/DenoWorker.ts +3 -0
- package/src/DenoWorkerRunner.ts +4 -0
- package/src/index.ts +39 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deno UDP adapter for `effect/socket/DatagramSocket`, built on the native
|
|
3
|
+
* `Deno.listenDatagram`.
|
|
4
|
+
*
|
|
5
|
+
* `make` opens a new `Deno.DatagramConn` for each reader acquisition,
|
|
6
|
+
* `fromDatagramConn` adopts a connection the caller opens, and `layer`
|
|
7
|
+
* provides the `DatagramSocket` service.
|
|
8
|
+
*
|
|
9
|
+
* `Deno.listenDatagram` is unstable. Run with `--unstable-net`, or add `"net"`
|
|
10
|
+
* to the `"unstable"` list in `deno.json`. Without it, acquiring a reader fails
|
|
11
|
+
* with a `DatagramSocketUnsupportedError`, and without `--allow-net` it fails
|
|
12
|
+
* with a `DatagramSocketOpenError` of kind `"PermissionDenied"`.
|
|
13
|
+
*
|
|
14
|
+
* Compared with the Node and Bun adapters, Deno has no `connect`, no
|
|
15
|
+
* source-specific multicast, and broadcast is always on. Received packets are
|
|
16
|
+
* read into one reused 64 KiB buffer and copied out, so payloads are safe to
|
|
17
|
+
* retain. On Linux a datagram larger than that buffer is silently truncated.
|
|
18
|
+
*
|
|
19
|
+
* The reader owns the native socket, so a send-only client must still acquire
|
|
20
|
+
* a reader, or its writes wait forever. Every write waits for Deno's `send`
|
|
21
|
+
* promise, so send errors fail the write that caused them.
|
|
22
|
+
*
|
|
23
|
+
* `writeAll` sends sequentially and stops at the first failure. Earlier sends
|
|
24
|
+
* are not resent; the error carries the failed datagram's `address`. Send order
|
|
25
|
+
* does not guarantee arrival order.
|
|
26
|
+
*
|
|
27
|
+
* On Windows, ICMP connection resets or refusals reported by `receive` are
|
|
28
|
+
* passed to `onError` and reading continues.
|
|
29
|
+
*
|
|
30
|
+
* **Example** (Echo server)
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { DenoDatagramSocket } from "@effect/platform-deno"
|
|
34
|
+
* import { Effect } from "effect"
|
|
35
|
+
*
|
|
36
|
+
* const echo = Effect.gen(function*() {
|
|
37
|
+
* const socket = yield* DenoDatagramSocket.make({ bind: { port: 9000 } })
|
|
38
|
+
* const reader = yield* socket.reader
|
|
39
|
+
* const writer = yield* socket.writer
|
|
40
|
+
* while (true) {
|
|
41
|
+
* for (const received of yield* reader.pull) {
|
|
42
|
+
* yield* writer.write({ payload: received.payload, address: received })
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
* }).pipe(Effect.scoped)
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* **Example** (Send-only client)
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* import { DenoDatagramSocket } from "@effect/platform-deno"
|
|
52
|
+
* import { Effect } from "effect"
|
|
53
|
+
*
|
|
54
|
+
* const send = (payload: string) =>
|
|
55
|
+
* Effect.gen(function*() {
|
|
56
|
+
* const socket = yield* DenoDatagramSocket.make({
|
|
57
|
+
* peer: { address: "localhost", port: 9000 }
|
|
58
|
+
* })
|
|
59
|
+
* // Required even for send-only clients.
|
|
60
|
+
* yield* socket.reader
|
|
61
|
+
* const writer = yield* socket.writer
|
|
62
|
+
* yield* writer.write({ payload })
|
|
63
|
+
* }).pipe(Effect.scoped)
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* **Example** (Multicast receiver and sender)
|
|
67
|
+
*
|
|
68
|
+
* ```ts
|
|
69
|
+
* import { DenoDatagramSocket } from "@effect/platform-deno"
|
|
70
|
+
* import { Effect } from "effect"
|
|
71
|
+
* import { NetAddress } from "effect/net"
|
|
72
|
+
*
|
|
73
|
+
* const group = NetAddress.ipFromStringUnsafe("239.255.0.1")
|
|
74
|
+
*
|
|
75
|
+
* const receive = Effect.gen(function*() {
|
|
76
|
+
* if (!NetAddress.isMulticast(group) || !NetAddress.isIpv4Address(group)) return
|
|
77
|
+
* const socket = yield* DenoDatagramSocket.make({
|
|
78
|
+
* bind: { address: "0.0.0.0", port: 5000 },
|
|
79
|
+
* reuseAddress: true
|
|
80
|
+
* })
|
|
81
|
+
* const reader = yield* socket.reader
|
|
82
|
+
* yield* reader.joinMulticast({ group, interface: NetAddress.ipv4Loopback })
|
|
83
|
+
* return yield* reader.pull
|
|
84
|
+
* }).pipe(Effect.scoped)
|
|
85
|
+
*
|
|
86
|
+
* const announce = Effect.gen(function*() {
|
|
87
|
+
* const socket = yield* DenoDatagramSocket.make({
|
|
88
|
+
* // Deno has no egress `multicast.interface` option, so the bind address
|
|
89
|
+
* // picks the interface the group's datagrams leave through
|
|
90
|
+
* bind: { address: "127.0.0.1" },
|
|
91
|
+
* peer: { address: group, port: 5000 },
|
|
92
|
+
* multicast: { loopback: true }
|
|
93
|
+
* })
|
|
94
|
+
* yield* socket.reader
|
|
95
|
+
* const writer = yield* socket.writer
|
|
96
|
+
* yield* writer.write({ payload: "hello" })
|
|
97
|
+
* }).pipe(Effect.scoped)
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* @stability experimental
|
|
101
|
+
* @since 4.0.0
|
|
102
|
+
*/
|
|
103
|
+
import * as Effect from "effect/Effect";
|
|
104
|
+
import * as Layer from "effect/Layer";
|
|
105
|
+
import * as NetAddress from "effect/net/NetAddress";
|
|
106
|
+
import type * as Scope from "effect/Scope";
|
|
107
|
+
import * as DatagramSocket from "effect/socket/DatagramSocket";
|
|
108
|
+
/**
|
|
109
|
+
* An open-time endpoint. Hostnames resolve once per reader acquisition via
|
|
110
|
+
* `node:dns.lookup`.
|
|
111
|
+
* An `InetAddress` can be passed directly.
|
|
112
|
+
*
|
|
113
|
+
* @stability experimental
|
|
114
|
+
* @category models
|
|
115
|
+
* @since 4.0.0
|
|
116
|
+
*/
|
|
117
|
+
export interface Endpoint {
|
|
118
|
+
readonly address: string | NetAddress.IpAddress;
|
|
119
|
+
readonly port: number;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Options for `make` and `layer`.
|
|
123
|
+
*
|
|
124
|
+
* **Details**
|
|
125
|
+
*
|
|
126
|
+
* `bind` defaults to `0.0.0.0` (or `::` for `family: "ipv6"`) and an
|
|
127
|
+
* ephemeral port. `peer` is a default destination and doesn't filter senders;
|
|
128
|
+
* Deno has no `connect`.
|
|
129
|
+
*
|
|
130
|
+
* Family selection, in order: explicit `family`, a `bind` IP literal, the
|
|
131
|
+
* `peer` address, a `bind` hostname, then `"ipv4"`. Hostname
|
|
132
|
+
* lookups use the family selected so far, or prefer IPv4 if none is set.
|
|
133
|
+
*
|
|
134
|
+
* `reuseAddress` means `SO_REUSEADDR` on Linux and `SO_REUSEPORT` on BSD and
|
|
135
|
+
* macOS. `multicast.loopback` loops sent multicast datagrams back to the local
|
|
136
|
+
* host. Deno has no egress multicast interface setting; the `interface` of
|
|
137
|
+
* `Reader.joinMulticast` is the ingress interface, a different socket option.
|
|
138
|
+
*
|
|
139
|
+
* @stability experimental
|
|
140
|
+
* @category options
|
|
141
|
+
* @since 4.0.0
|
|
142
|
+
*/
|
|
143
|
+
export interface Options {
|
|
144
|
+
readonly bind?: {
|
|
145
|
+
readonly address?: string | NetAddress.IpAddress;
|
|
146
|
+
readonly port?: number;
|
|
147
|
+
} | undefined;
|
|
148
|
+
readonly family?: "ipv4" | "ipv6" | undefined;
|
|
149
|
+
readonly peer?: Endpoint | undefined;
|
|
150
|
+
readonly reuseAddress?: boolean | undefined;
|
|
151
|
+
readonly multicast?: {
|
|
152
|
+
readonly loopback?: boolean | undefined;
|
|
153
|
+
} | undefined;
|
|
154
|
+
readonly receiveBuffer?: DatagramSocket.ReceiveBufferOptions | undefined;
|
|
155
|
+
readonly onError?: ((error: DatagramSocket.DatagramSocketError) => void) | undefined;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Options for `fromDatagramConn`. The caller configures the adopted
|
|
159
|
+
* connection, so only the options that live in JavaScript apply.
|
|
160
|
+
*
|
|
161
|
+
* @stability experimental
|
|
162
|
+
* @category options
|
|
163
|
+
* @since 4.0.0
|
|
164
|
+
*/
|
|
165
|
+
export type AdoptOptions = Pick<Options, "peer" | "receiveBuffer" | "onError">;
|
|
166
|
+
/**
|
|
167
|
+
* Creates a `DatagramSocket` that opens and binds a new `Deno.DatagramConn`
|
|
168
|
+
* for each reader acquisition.
|
|
169
|
+
*
|
|
170
|
+
* **Details**
|
|
171
|
+
*
|
|
172
|
+
* Creating the socket never fails. Checking for `Deno.listenDatagram`,
|
|
173
|
+
* binding and resolving names happen when a reader is acquired, and fail that
|
|
174
|
+
* acquisition with a `DatagramSocketError`. Hostnames in `bind` and `peer` are
|
|
175
|
+
* resolved once per acquisition, so no send waits for DNS.
|
|
176
|
+
*
|
|
177
|
+
* Invalid `receiveBuffer.capacity` values cause a defect; use a positive
|
|
178
|
+
* safe integer.
|
|
179
|
+
*
|
|
180
|
+
* @stability experimental
|
|
181
|
+
* @category constructors
|
|
182
|
+
* @since 4.0.0
|
|
183
|
+
*/
|
|
184
|
+
export declare const make: (options?: Options) => Effect.Effect<DatagramSocket.DatagramSocket>;
|
|
185
|
+
/**
|
|
186
|
+
* Adopts a `Deno.DatagramConn`.
|
|
187
|
+
*
|
|
188
|
+
* **Details**
|
|
189
|
+
*
|
|
190
|
+
* `acquire` runs once per reader acquisition, inside the reader's scope, and
|
|
191
|
+
* the adapter closes the connection when that scope ends. The adapter starts
|
|
192
|
+
* reading as soon as `acquire` completes, so nothing else should read from the
|
|
193
|
+
* connection.
|
|
194
|
+
*
|
|
195
|
+
* @stability experimental
|
|
196
|
+
* @category constructors
|
|
197
|
+
* @since 4.0.0
|
|
198
|
+
*/
|
|
199
|
+
export declare const fromDatagramConn: <R>(acquire: Effect.Effect<Deno.DatagramConn, DatagramSocket.DatagramSocketError, R>, options?: AdoptOptions) => Effect.Effect<DatagramSocket.DatagramSocket, never, Exclude<R, Scope.Scope>>;
|
|
200
|
+
/**
|
|
201
|
+
* Provides a `DatagramSocket` built with `make`.
|
|
202
|
+
*
|
|
203
|
+
* @stability experimental
|
|
204
|
+
* @category layers
|
|
205
|
+
* @since 4.0.0
|
|
206
|
+
*/
|
|
207
|
+
export declare const layer: (options?: Options) => Layer.Layer<DatagramSocket.DatagramSocket>;
|
|
208
|
+
//# sourceMappingURL=DenoDatagramSocket.d.ts.map
|
|
@@ -0,0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Ac,CAAC,oBAAoB,GAAG,SAAS,CAAA;IACxE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,cAAc,CAAC,mBAAmB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAA;CACrF;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC,CAAA;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,IAAI,aAAa,OAAO,KAAQ,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,cAAc,CACN,CAAA;AAElF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,WACvB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,mBAAmB,EAAE,CAAC,CAAC,YACvE,YAAY,KACpB,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,cAAc,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAI3E,CAAA;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,aAAa,OAAO,KAAQ,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAC3B,CAAA"}
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deno UDP adapter for `effect/socket/DatagramSocket`, built on the native
|
|
3
|
+
* `Deno.listenDatagram`.
|
|
4
|
+
*
|
|
5
|
+
* `make` opens a new `Deno.DatagramConn` for each reader acquisition,
|
|
6
|
+
* `fromDatagramConn` adopts a connection the caller opens, and `layer`
|
|
7
|
+
* provides the `DatagramSocket` service.
|
|
8
|
+
*
|
|
9
|
+
* `Deno.listenDatagram` is unstable. Run with `--unstable-net`, or add `"net"`
|
|
10
|
+
* to the `"unstable"` list in `deno.json`. Without it, acquiring a reader fails
|
|
11
|
+
* with a `DatagramSocketUnsupportedError`, and without `--allow-net` it fails
|
|
12
|
+
* with a `DatagramSocketOpenError` of kind `"PermissionDenied"`.
|
|
13
|
+
*
|
|
14
|
+
* Compared with the Node and Bun adapters, Deno has no `connect`, no
|
|
15
|
+
* source-specific multicast, and broadcast is always on. Received packets are
|
|
16
|
+
* read into one reused 64 KiB buffer and copied out, so payloads are safe to
|
|
17
|
+
* retain. On Linux a datagram larger than that buffer is silently truncated.
|
|
18
|
+
*
|
|
19
|
+
* The reader owns the native socket, so a send-only client must still acquire
|
|
20
|
+
* a reader, or its writes wait forever. Every write waits for Deno's `send`
|
|
21
|
+
* promise, so send errors fail the write that caused them.
|
|
22
|
+
*
|
|
23
|
+
* `writeAll` sends sequentially and stops at the first failure. Earlier sends
|
|
24
|
+
* are not resent; the error carries the failed datagram's `address`. Send order
|
|
25
|
+
* does not guarantee arrival order.
|
|
26
|
+
*
|
|
27
|
+
* On Windows, ICMP connection resets or refusals reported by `receive` are
|
|
28
|
+
* passed to `onError` and reading continues.
|
|
29
|
+
*
|
|
30
|
+
* **Example** (Echo server)
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { DenoDatagramSocket } from "@effect/platform-deno"
|
|
34
|
+
* import { Effect } from "effect"
|
|
35
|
+
*
|
|
36
|
+
* const echo = Effect.gen(function*() {
|
|
37
|
+
* const socket = yield* DenoDatagramSocket.make({ bind: { port: 9000 } })
|
|
38
|
+
* const reader = yield* socket.reader
|
|
39
|
+
* const writer = yield* socket.writer
|
|
40
|
+
* while (true) {
|
|
41
|
+
* for (const received of yield* reader.pull) {
|
|
42
|
+
* yield* writer.write({ payload: received.payload, address: received })
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
* }).pipe(Effect.scoped)
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* **Example** (Send-only client)
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* import { DenoDatagramSocket } from "@effect/platform-deno"
|
|
52
|
+
* import { Effect } from "effect"
|
|
53
|
+
*
|
|
54
|
+
* const send = (payload: string) =>
|
|
55
|
+
* Effect.gen(function*() {
|
|
56
|
+
* const socket = yield* DenoDatagramSocket.make({
|
|
57
|
+
* peer: { address: "localhost", port: 9000 }
|
|
58
|
+
* })
|
|
59
|
+
* // Required even for send-only clients.
|
|
60
|
+
* yield* socket.reader
|
|
61
|
+
* const writer = yield* socket.writer
|
|
62
|
+
* yield* writer.write({ payload })
|
|
63
|
+
* }).pipe(Effect.scoped)
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* **Example** (Multicast receiver and sender)
|
|
67
|
+
*
|
|
68
|
+
* ```ts
|
|
69
|
+
* import { DenoDatagramSocket } from "@effect/platform-deno"
|
|
70
|
+
* import { Effect } from "effect"
|
|
71
|
+
* import { NetAddress } from "effect/net"
|
|
72
|
+
*
|
|
73
|
+
* const group = NetAddress.ipFromStringUnsafe("239.255.0.1")
|
|
74
|
+
*
|
|
75
|
+
* const receive = Effect.gen(function*() {
|
|
76
|
+
* if (!NetAddress.isMulticast(group) || !NetAddress.isIpv4Address(group)) return
|
|
77
|
+
* const socket = yield* DenoDatagramSocket.make({
|
|
78
|
+
* bind: { address: "0.0.0.0", port: 5000 },
|
|
79
|
+
* reuseAddress: true
|
|
80
|
+
* })
|
|
81
|
+
* const reader = yield* socket.reader
|
|
82
|
+
* yield* reader.joinMulticast({ group, interface: NetAddress.ipv4Loopback })
|
|
83
|
+
* return yield* reader.pull
|
|
84
|
+
* }).pipe(Effect.scoped)
|
|
85
|
+
*
|
|
86
|
+
* const announce = Effect.gen(function*() {
|
|
87
|
+
* const socket = yield* DenoDatagramSocket.make({
|
|
88
|
+
* // Deno has no egress `multicast.interface` option, so the bind address
|
|
89
|
+
* // picks the interface the group's datagrams leave through
|
|
90
|
+
* bind: { address: "127.0.0.1" },
|
|
91
|
+
* peer: { address: group, port: 5000 },
|
|
92
|
+
* multicast: { loopback: true }
|
|
93
|
+
* })
|
|
94
|
+
* yield* socket.reader
|
|
95
|
+
* const writer = yield* socket.writer
|
|
96
|
+
* yield* writer.write({ payload: "hello" })
|
|
97
|
+
* }).pipe(Effect.scoped)
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* @stability experimental
|
|
101
|
+
* @since 4.0.0
|
|
102
|
+
*/
|
|
103
|
+
import * as Effect from "effect/Effect";
|
|
104
|
+
import { constVoid } from "effect/Function";
|
|
105
|
+
import * as Layer from "effect/Layer";
|
|
106
|
+
import * as NetAddress from "effect/net/NetAddress";
|
|
107
|
+
import * as DatagramSocket from "effect/socket/DatagramSocket";
|
|
108
|
+
import * as Dns from "node:dns";
|
|
109
|
+
import * as Net from "node:net";
|
|
110
|
+
/**
|
|
111
|
+
* Creates a `DatagramSocket` that opens and binds a new `Deno.DatagramConn`
|
|
112
|
+
* for each reader acquisition.
|
|
113
|
+
*
|
|
114
|
+
* **Details**
|
|
115
|
+
*
|
|
116
|
+
* Creating the socket never fails. Checking for `Deno.listenDatagram`,
|
|
117
|
+
* binding and resolving names happen when a reader is acquired, and fail that
|
|
118
|
+
* acquisition with a `DatagramSocketError`. Hostnames in `bind` and `peer` are
|
|
119
|
+
* resolved once per acquisition, so no send waits for DNS.
|
|
120
|
+
*
|
|
121
|
+
* Invalid `receiveBuffer.capacity` values cause a defect; use a positive
|
|
122
|
+
* safe integer.
|
|
123
|
+
*
|
|
124
|
+
* @stability experimental
|
|
125
|
+
* @category constructors
|
|
126
|
+
* @since 4.0.0
|
|
127
|
+
*/
|
|
128
|
+
export const make = (options = {}) => DatagramSocket.makeFromBackingSocket((events) => open(options, events), options);
|
|
129
|
+
/**
|
|
130
|
+
* Adopts a `Deno.DatagramConn`.
|
|
131
|
+
*
|
|
132
|
+
* **Details**
|
|
133
|
+
*
|
|
134
|
+
* `acquire` runs once per reader acquisition, inside the reader's scope, and
|
|
135
|
+
* the adapter closes the connection when that scope ends. The adapter starts
|
|
136
|
+
* reading as soon as `acquire` completes, so nothing else should read from the
|
|
137
|
+
* connection.
|
|
138
|
+
*
|
|
139
|
+
* @stability experimental
|
|
140
|
+
* @category constructors
|
|
141
|
+
* @since 4.0.0
|
|
142
|
+
*/
|
|
143
|
+
export const fromDatagramConn = (acquire, options = {}) => DatagramSocket.makeFromBackingSocket((events) => Effect.flatMap(acquire, (conn) => adopt(conn, options, events)), options);
|
|
144
|
+
/**
|
|
145
|
+
* Provides a `DatagramSocket` built with `make`.
|
|
146
|
+
*
|
|
147
|
+
* @stability experimental
|
|
148
|
+
* @category layers
|
|
149
|
+
* @since 4.0.0
|
|
150
|
+
*/
|
|
151
|
+
export const layer = (options = {}) => Layer.effect(DatagramSocket.DatagramSocket, make(options));
|
|
152
|
+
const errorCode = (error) => error?.code;
|
|
153
|
+
const openError = (error, kind) => {
|
|
154
|
+
if (error?.name === "NotCapable") {
|
|
155
|
+
kind = "PermissionDenied";
|
|
156
|
+
}
|
|
157
|
+
else if (kind === undefined) {
|
|
158
|
+
const code = errorCode(error);
|
|
159
|
+
kind = code === "EADDRINUSE"
|
|
160
|
+
? "AddressInUse"
|
|
161
|
+
: code === "EADDRNOTAVAIL"
|
|
162
|
+
? "AddressNotAvailable"
|
|
163
|
+
: code === "EACCES" || code === "EPERM"
|
|
164
|
+
? "PermissionDenied"
|
|
165
|
+
: "Unknown";
|
|
166
|
+
}
|
|
167
|
+
return new DatagramSocket.DatagramSocketError({
|
|
168
|
+
reason: new DatagramSocket.DatagramSocketOpenError({ kind, cause: error })
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
// DNS lookup reports a missing Deno net permission as EPERM, not NotCapable.
|
|
172
|
+
const lookupOpenError = (error) => {
|
|
173
|
+
const code = error?.code;
|
|
174
|
+
return openError(error, code === "EPERM" || code === "EACCES" ? "PermissionDenied" : "AddressNotAvailable");
|
|
175
|
+
};
|
|
176
|
+
const unsupportedError = (capability) => new DatagramSocket.DatagramSocketError({
|
|
177
|
+
reason: new DatagramSocket.DatagramSocketUnsupportedError({ capability, runtime: "Deno" })
|
|
178
|
+
});
|
|
179
|
+
const ioKind = (error) => {
|
|
180
|
+
switch (errorCode(error)) {
|
|
181
|
+
case "EMSGSIZE":
|
|
182
|
+
return "MessageTooLarge";
|
|
183
|
+
case "EHOSTUNREACH":
|
|
184
|
+
case "ENETUNREACH":
|
|
185
|
+
case "EHOSTDOWN":
|
|
186
|
+
case "ENETDOWN":
|
|
187
|
+
return "Unreachable";
|
|
188
|
+
case "ECONNREFUSED":
|
|
189
|
+
case "ECONNRESET":
|
|
190
|
+
return "ConnectionRefused";
|
|
191
|
+
case "EACCES":
|
|
192
|
+
case "EPERM":
|
|
193
|
+
return "PermissionDenied";
|
|
194
|
+
}
|
|
195
|
+
switch (error?.name) {
|
|
196
|
+
case "NotCapable":
|
|
197
|
+
case "PermissionDenied":
|
|
198
|
+
return "PermissionDenied";
|
|
199
|
+
case "ConnectionRefused":
|
|
200
|
+
case "ConnectionReset":
|
|
201
|
+
return "ConnectionRefused";
|
|
202
|
+
default:
|
|
203
|
+
return "Unknown";
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
const closedError = () => new DatagramSocket.DatagramSocketError({ reason: new DatagramSocket.DatagramSocketClosedError() });
|
|
207
|
+
const writeError = (error) => error?.name === "BadResource" ? closedError() : new DatagramSocket.DatagramSocketError({
|
|
208
|
+
reason: new DatagramSocket.DatagramSocketWriteError({ kind: ioKind(error), cause: error })
|
|
209
|
+
});
|
|
210
|
+
const readError = (error) => new DatagramSocket.DatagramSocketError({
|
|
211
|
+
reason: new DatagramSocket.DatagramSocketReadError({ kind: ioKind(error), cause: error })
|
|
212
|
+
});
|
|
213
|
+
// Deno has no interface names to map, so IPv6 zones stay numeric
|
|
214
|
+
const noScopeIds = new Map();
|
|
215
|
+
const familyOfLiteral = (address) => {
|
|
216
|
+
if (typeof address !== "string")
|
|
217
|
+
return NetAddress.isIpv4Address(address) ? "ipv4" : "ipv6";
|
|
218
|
+
const version = Net.isIP(address);
|
|
219
|
+
return version === 4 ? "ipv4" : version === 6 ? "ipv6" : undefined;
|
|
220
|
+
};
|
|
221
|
+
// `endpoint` may be a whole `InetAddress`, whose IPv6 scope must survive
|
|
222
|
+
const formatEndpoint = (endpoint, scopeIds) => NetAddress.isInetAddress(endpoint)
|
|
223
|
+
? NetAddress.formatNativeHost(endpoint, scopeIds)
|
|
224
|
+
: endpoint.address === undefined || typeof endpoint.address === "string"
|
|
225
|
+
? endpoint.address
|
|
226
|
+
: NetAddress.formatIp(endpoint.address);
|
|
227
|
+
// Prefer IPv4 unless the family is fixed; IP literals resolve synchronously.
|
|
228
|
+
const resolve = (address, family, onError, next) => {
|
|
229
|
+
if (typeof address !== "string")
|
|
230
|
+
return next(undefined);
|
|
231
|
+
const literal = familyOfLiteral(address);
|
|
232
|
+
if (literal !== undefined)
|
|
233
|
+
return next({ host: address, family: literal });
|
|
234
|
+
try {
|
|
235
|
+
Dns.lookup(address, { all: true, family: family === "ipv4" ? 4 : family === "ipv6" ? 6 : 0 }, (error, results) => {
|
|
236
|
+
if (error)
|
|
237
|
+
return onError(error);
|
|
238
|
+
const result = results.find((result) => result.family === 4) ?? results[0];
|
|
239
|
+
if (result === undefined)
|
|
240
|
+
return onError(new Error(`${address} has no addresses`));
|
|
241
|
+
next({ host: result.address, family: result.family === 6 ? "ipv6" : "ipv4" });
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
catch (error) {
|
|
245
|
+
onError(error);
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
const planOpen = (options, onLookupError, next) => {
|
|
249
|
+
const { bind, remote } = options;
|
|
250
|
+
const fixed = options.family ?? (bind?.address === undefined ? undefined : familyOfLiteral(bind.address));
|
|
251
|
+
resolve(remote?.address, fixed, onLookupError, (resolvedRemote) => {
|
|
252
|
+
const remoteFamily = resolvedRemote?.family ?? (remote === undefined ? undefined : familyOfLiteral(remote.address));
|
|
253
|
+
resolve(bind?.address, fixed ?? remoteFamily, onLookupError, (resolvedBind) => {
|
|
254
|
+
const family = fixed ?? remoteFamily ?? resolvedBind?.family ?? "ipv4";
|
|
255
|
+
next({
|
|
256
|
+
bindHost: resolvedBind?.host ??
|
|
257
|
+
(bind === undefined ? undefined : formatEndpoint(bind, noScopeIds)) ??
|
|
258
|
+
(family === "ipv6" ? "::" : "0.0.0.0"),
|
|
259
|
+
remote: remote === undefined ? undefined : {
|
|
260
|
+
host: resolvedRemote?.host ?? formatEndpoint(remote, noScopeIds),
|
|
261
|
+
port: remote.port
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
const resolvePeer = (peer, family, onLookupError, next) => {
|
|
268
|
+
if (peer === undefined)
|
|
269
|
+
return next(undefined);
|
|
270
|
+
if (typeof peer.address !== "string")
|
|
271
|
+
return next({ host: formatEndpoint(peer, noScopeIds), port: peer.port });
|
|
272
|
+
resolve(peer.address, family, onLookupError, (resolved) => next({ host: resolved.host, port: peer.port }));
|
|
273
|
+
};
|
|
274
|
+
const open = (options, events) =>
|
|
275
|
+
// checked per reader, not at module load, so the module imports without the flag
|
|
276
|
+
typeof Deno.listenDatagram !== "function"
|
|
277
|
+
? Effect.fail(unsupportedError(`UDP sockets without --unstable-net (pass --unstable-net or add "net" to "unstable" in deno.json)`))
|
|
278
|
+
: Effect.callback((resume) => {
|
|
279
|
+
planOpen({ family: options.family, bind: options.bind, remote: options.peer }, (error) => resume(Effect.fail(lookupOpenError(error))), (plan) => {
|
|
280
|
+
let conn;
|
|
281
|
+
try {
|
|
282
|
+
conn = Deno.listenDatagram({
|
|
283
|
+
transport: "udp",
|
|
284
|
+
hostname: plan.bindHost,
|
|
285
|
+
port: options.bind?.port ?? 0,
|
|
286
|
+
reuseAddress: options.reuseAddress ?? false,
|
|
287
|
+
loopback: options.multicast?.loopback ?? false
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
return resume(Effect.fail(openError(error)));
|
|
292
|
+
}
|
|
293
|
+
resume(Effect.succeed(new NativeConn(conn, events).open(plan.remote)));
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
const adopt = (conn, options, events) => Effect.callback((resume) => {
|
|
297
|
+
const family = conn.addr.hostname.includes(":") ? "ipv6" : "ipv4";
|
|
298
|
+
resolvePeer(options.peer, family, (error) => {
|
|
299
|
+
try {
|
|
300
|
+
conn.close();
|
|
301
|
+
}
|
|
302
|
+
catch {
|
|
303
|
+
}
|
|
304
|
+
resume(Effect.fail(lookupOpenError(error)));
|
|
305
|
+
}, (peer) => resume(Effect.succeed(new NativeConn(conn, events).open(peer))));
|
|
306
|
+
});
|
|
307
|
+
// One `receive` in flight at a time, since concurrent receives reorder packets
|
|
308
|
+
const receiveBufferSize = 65536;
|
|
309
|
+
class NativeConn {
|
|
310
|
+
conn;
|
|
311
|
+
events;
|
|
312
|
+
buffer = new Uint8Array(receiveBufferSize);
|
|
313
|
+
closing = false;
|
|
314
|
+
// the last destination, reused while consecutive sends share it
|
|
315
|
+
lastAddr = undefined;
|
|
316
|
+
constructor(conn, events) {
|
|
317
|
+
this.conn = conn;
|
|
318
|
+
this.events = events;
|
|
319
|
+
}
|
|
320
|
+
receive() {
|
|
321
|
+
try {
|
|
322
|
+
this.conn.receive(this.buffer).then(this.onReceive, this.onReceiveError);
|
|
323
|
+
}
|
|
324
|
+
catch (error) {
|
|
325
|
+
this.onReceiveError(error);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
onReceive = (received) => {
|
|
329
|
+
if (this.closing)
|
|
330
|
+
return;
|
|
331
|
+
const addr = received[1];
|
|
332
|
+
this.events.onPacket(received[0].slice(), addr.hostname, addr.port);
|
|
333
|
+
// a woken pull may have closed the reader
|
|
334
|
+
if (!this.closing)
|
|
335
|
+
this.receive();
|
|
336
|
+
};
|
|
337
|
+
onReceiveError = (error) => {
|
|
338
|
+
if (this.closing)
|
|
339
|
+
return;
|
|
340
|
+
switch (error?.name) {
|
|
341
|
+
// a pending receive is interrupted by a close, and the next one then
|
|
342
|
+
// reports the closed socket
|
|
343
|
+
case "Interrupted":
|
|
344
|
+
return this.receive();
|
|
345
|
+
case "BadResource":
|
|
346
|
+
return this.events.onClose();
|
|
347
|
+
// ICMP reports, as Windows raises them on unconnected sockets
|
|
348
|
+
case "ConnectionReset":
|
|
349
|
+
case "ConnectionRefused":
|
|
350
|
+
this.events.onError(readError(error));
|
|
351
|
+
return this.receive();
|
|
352
|
+
default:
|
|
353
|
+
return this.events.onReadError(readError(error));
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
addrOf(destination) {
|
|
357
|
+
const last = this.lastAddr;
|
|
358
|
+
if (last !== undefined && last.hostname === destination.host && last.port === destination.port)
|
|
359
|
+
return last;
|
|
360
|
+
return this.lastAddr = { transport: "udp", hostname: destination.host, port: destination.port };
|
|
361
|
+
}
|
|
362
|
+
send(payload, destination) {
|
|
363
|
+
if (destination === undefined)
|
|
364
|
+
return Promise.reject(new Error("DatagramSocket write has no destination"));
|
|
365
|
+
try {
|
|
366
|
+
return this.conn.send(payload, this.addrOf(destination));
|
|
367
|
+
}
|
|
368
|
+
catch (error) {
|
|
369
|
+
return Promise.reject(error);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
// Await each send before submitting the next, including on a warm socket.
|
|
373
|
+
async sendAll(payloads, destinations, done) {
|
|
374
|
+
for (let i = 0; i < payloads.length; i++) {
|
|
375
|
+
try {
|
|
376
|
+
await this.send(payloads[i], destinations[i]);
|
|
377
|
+
}
|
|
378
|
+
catch (error) {
|
|
379
|
+
done(writeError(error), i);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
done();
|
|
384
|
+
}
|
|
385
|
+
open(peer) {
|
|
386
|
+
const conn = this.conn;
|
|
387
|
+
const bound = conn.addr;
|
|
388
|
+
this.receive();
|
|
389
|
+
return {
|
|
390
|
+
address: { host: bound.hostname, port: bound.port },
|
|
391
|
+
peer,
|
|
392
|
+
connected: false,
|
|
393
|
+
send: (payload, destination, done) => {
|
|
394
|
+
this.send(payload, destination).then(() => done(), (error) => done(writeError(error)));
|
|
395
|
+
},
|
|
396
|
+
sendMany: (payloads, destinations, done) => {
|
|
397
|
+
void this.sendAll(payloads, destinations, done);
|
|
398
|
+
},
|
|
399
|
+
joinMulticast: ({ group, interface: ingress, source }) => {
|
|
400
|
+
if (source !== undefined)
|
|
401
|
+
return Effect.fail(unsupportedError("source-specific multicast"));
|
|
402
|
+
return Effect.tryPromise({
|
|
403
|
+
try: () => NetAddress.isIpv4Address(group)
|
|
404
|
+
? conn.joinMulticastV4(NetAddress.formatIp(group), ingress === undefined ? "0.0.0.0" : NetAddress.formatIp(ingress))
|
|
405
|
+
: conn.joinMulticastV6(NetAddress.formatIp(group), ingress ?? 0),
|
|
406
|
+
catch: (error) => openError(error)
|
|
407
|
+
}).pipe(Effect.map((membership) => () => Effect.promise(() => membership.leave().then(constVoid, constVoid))));
|
|
408
|
+
},
|
|
409
|
+
close: () => this.close()
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
close() {
|
|
413
|
+
if (this.closing)
|
|
414
|
+
return;
|
|
415
|
+
this.closing = true;
|
|
416
|
+
try {
|
|
417
|
+
this.conn.close();
|
|
418
|
+
}
|
|
419
|
+
catch {
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
//# sourceMappingURL=DenoDatagramSocket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DenoDatagramSocket.js","sourceRoot":"","sources":["../src/DenoDatagramSocket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqGG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,KA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