@rio-cloud/cdk-v2-constructs 8.2.0 → 8.2.1
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/.jsii +2 -2
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +105 -2
- package/node_modules/@types/node/assert.d.ts +211 -92
- package/node_modules/@types/node/async_hooks.d.ts +103 -19
- package/node_modules/@types/node/buffer.buffer.d.ts +472 -0
- package/node_modules/@types/node/buffer.d.ts +88 -516
- package/node_modules/@types/node/child_process.d.ts +167 -231
- package/node_modules/@types/node/cluster.d.ts +172 -26
- package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/node/console.d.ts +66 -28
- package/node_modules/@types/node/constants.d.ts +14 -12
- package/node_modules/@types/node/crypto.d.ts +1458 -497
- package/node_modules/@types/node/dgram.d.ts +44 -30
- package/node_modules/@types/node/diagnostics_channel.d.ts +389 -4
- package/node_modules/@types/node/dns/promises.d.ts +120 -42
- package/node_modules/@types/node/dns.d.ts +209 -95
- package/node_modules/@types/node/domain.d.ts +14 -18
- package/node_modules/@types/node/events.d.ts +245 -113
- package/node_modules/@types/node/fs/promises.d.ts +194 -96
- package/node_modules/@types/node/fs.d.ts +695 -270
- package/node_modules/@types/node/globals.d.ts +97 -308
- package/node_modules/@types/node/globals.typedarray.d.ts +41 -0
- package/node_modules/@types/node/http.d.ts +363 -97
- package/node_modules/@types/node/http2.d.ts +684 -231
- package/node_modules/@types/node/https.d.ts +122 -87
- package/node_modules/@types/node/index.d.ts +24 -11
- package/node_modules/@types/node/inspector.d.ts +220 -2690
- package/node_modules/@types/node/inspector.generated.d.ts +4239 -0
- package/node_modules/@types/node/module.d.ts +705 -149
- package/node_modules/@types/node/net.d.ts +178 -54
- package/node_modules/@types/node/os.d.ts +47 -17
- package/node_modules/@types/node/package.json +22 -97
- package/node_modules/@types/node/path.d.ts +12 -3
- package/node_modules/@types/node/perf_hooks.d.ts +500 -97
- package/node_modules/@types/node/process.d.ts +657 -87
- package/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/node/querystring.d.ts +24 -13
- package/node_modules/@types/node/readline/promises.d.ts +25 -14
- package/node_modules/@types/node/readline.d.ts +102 -41
- package/node_modules/@types/node/repl.d.ts +38 -30
- package/node_modules/@types/node/sea.d.ts +162 -0
- package/node_modules/@types/node/sqlite.d.ts +1040 -0
- package/node_modules/@types/node/stream/consumers.d.ts +33 -7
- package/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/node/stream/web.d.ts +251 -28
- package/node_modules/@types/node/stream.d.ts +1060 -1055
- package/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/node/test.d.ts +2133 -1166
- package/node_modules/@types/node/timers/promises.d.ts +31 -16
- package/node_modules/@types/node/timers.d.ts +159 -114
- package/node_modules/@types/node/tls.d.ts +232 -163
- package/node_modules/@types/node/trace_events.d.ts +43 -28
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +103 -0
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
- package/node_modules/@types/node/tty.d.ts +9 -9
- package/node_modules/@types/node/url.d.ts +236 -84
- package/node_modules/@types/node/util.d.ts +562 -412
- package/node_modules/@types/node/v8.d.ts +368 -21
- package/node_modules/@types/node/vm.d.ts +443 -149
- package/node_modules/@types/node/wasi.d.ts +62 -18
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +62 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +310 -107
- package/node_modules/@types/node/zlib.d.ts +301 -73
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/agent.d.ts +13 -12
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +19 -7
- package/node_modules/undici-types/cache-interceptor.d.ts +173 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +26 -15
- package/node_modules/undici-types/connector.d.ts +2 -2
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +19 -12
- package/node_modules/undici-types/dispatcher.d.ts +148 -113
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici-types/errors.d.ts +79 -46
- package/node_modules/undici-types/eventsource.d.ts +66 -0
- package/node_modules/undici-types/fetch.d.ts +41 -39
- package/node_modules/undici-types/formdata.d.ts +8 -8
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +11 -5
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +68 -43
- package/node_modules/undici-types/interceptors.d.ts +71 -3
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +24 -23
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -42
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +21 -8
- package/node_modules/undici-types/proxy-agent.d.ts +5 -6
- package/node_modules/undici-types/readable.d.ts +24 -17
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +157 -36
- package/node_modules/undici-types/websocket.d.ts +67 -12
- package/package.json +9 -60
- package/version.json +1 -1
- package/node_modules/@types/node/dom-events.d.ts +0 -122
- package/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
- package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
- package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
- package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
- package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4455
- package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -586
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
- package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
- package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
- package/node_modules/@types/node/ts4.8/events.d.ts +0 -796
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1232
- package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4289
- package/node_modules/@types/node/ts4.8/globals.d.ts +0 -381
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/http.d.ts +0 -1888
- package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
- package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
- package/node_modules/@types/node/ts4.8/module.d.ts +0 -287
- package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
- package/node_modules/@types/node/ts4.8/os.d.ts +0 -477
- package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -639
- package/node_modules/@types/node/ts4.8/process.d.ts +0 -1532
- package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
- package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
- package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -350
- package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/ts4.8/test.d.ts +0 -1382
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
- package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
- package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
- package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
- package/node_modules/@types/node/ts4.8/util.d.ts +0 -2186
- package/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
- package/node_modules/@types/node/ts4.8/vm.d.ts +0 -901
- package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
- package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
- package/node_modules/argparse/CHANGELOG.md +0 -216
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* system do, use {@link lookup}.
|
|
10
10
|
*
|
|
11
11
|
* ```js
|
|
12
|
-
*
|
|
12
|
+
* import dns from 'node:dns';
|
|
13
13
|
*
|
|
14
14
|
* dns.lookup('example.org', (err, address, family) => {
|
|
15
15
|
* console.log('address: %j family: IPv%s', address, family);
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* DNS queries, bypassing other name-resolution facilities.
|
|
24
24
|
*
|
|
25
25
|
* ```js
|
|
26
|
-
*
|
|
26
|
+
* import dns from 'node:dns';
|
|
27
27
|
*
|
|
28
28
|
* dns.resolve4('archive.org', (err, addresses) => {
|
|
29
29
|
* if (err) throw err;
|
|
@@ -41,13 +41,21 @@
|
|
|
41
41
|
* });
|
|
42
42
|
* ```
|
|
43
43
|
*
|
|
44
|
-
* See the
|
|
45
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
44
|
+
* See the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations) for more information.
|
|
45
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/dns.js)
|
|
46
46
|
*/
|
|
47
47
|
declare module "dns" {
|
|
48
48
|
import * as dnsPromises from "node:dns/promises";
|
|
49
49
|
// Supported getaddrinfo flags.
|
|
50
|
+
/**
|
|
51
|
+
* Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are
|
|
52
|
+
* only returned if the current system has at least one IPv4 address configured.
|
|
53
|
+
*/
|
|
50
54
|
export const ADDRCONFIG: number;
|
|
55
|
+
/**
|
|
56
|
+
* If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported
|
|
57
|
+
* on some operating systems (e.g. FreeBSD 10.1).
|
|
58
|
+
*/
|
|
51
59
|
export const V4MAPPED: number;
|
|
52
60
|
/**
|
|
53
61
|
* If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
|
|
@@ -55,11 +63,38 @@ declare module "dns" {
|
|
|
55
63
|
*/
|
|
56
64
|
export const ALL: number;
|
|
57
65
|
export interface LookupOptions {
|
|
58
|
-
|
|
66
|
+
/**
|
|
67
|
+
* The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
|
|
68
|
+
* as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used
|
|
69
|
+
* with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned.
|
|
70
|
+
* @default 0
|
|
71
|
+
*/
|
|
72
|
+
family?: number | "IPv4" | "IPv6" | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v24.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
|
|
75
|
+
* passed by bitwise `OR`ing their values.
|
|
76
|
+
*/
|
|
59
77
|
hints?: number | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
60
82
|
all?: boolean | undefined;
|
|
61
83
|
/**
|
|
62
|
-
*
|
|
84
|
+
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
|
|
85
|
+
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
|
|
86
|
+
* addresses before IPv4 addresses. Default value is configurable using
|
|
87
|
+
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder).
|
|
88
|
+
* @default `verbatim` (addresses are not reordered)
|
|
89
|
+
* @since v22.1.0
|
|
90
|
+
*/
|
|
91
|
+
order?: "ipv4first" | "ipv6first" | "verbatim" | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4
|
|
94
|
+
* addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified,
|
|
95
|
+
* `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder}
|
|
96
|
+
* @default true (addresses are not reordered)
|
|
97
|
+
* @deprecated Please use `order` option
|
|
63
98
|
*/
|
|
64
99
|
verbatim?: boolean | undefined;
|
|
65
100
|
}
|
|
@@ -70,7 +105,14 @@ declare module "dns" {
|
|
|
70
105
|
all: true;
|
|
71
106
|
}
|
|
72
107
|
export interface LookupAddress {
|
|
108
|
+
/**
|
|
109
|
+
* A string representation of an IPv4 or IPv6 address.
|
|
110
|
+
*/
|
|
73
111
|
address: string;
|
|
112
|
+
/**
|
|
113
|
+
* `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a
|
|
114
|
+
* bug in the name resolution service used by the operating system.
|
|
115
|
+
*/
|
|
74
116
|
family: number;
|
|
75
117
|
}
|
|
76
118
|
/**
|
|
@@ -79,7 +121,7 @@ declare module "dns" {
|
|
|
79
121
|
* integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
|
|
80
122
|
* IPv4 and IPv6 addresses are both returned if found.
|
|
81
123
|
*
|
|
82
|
-
* With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the
|
|
124
|
+
* With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the
|
|
83
125
|
* properties `address` and `family`.
|
|
84
126
|
*
|
|
85
127
|
* On error, `err` is an `Error` object, where `err.code` is the error code.
|
|
@@ -91,12 +133,13 @@ declare module "dns" {
|
|
|
91
133
|
* The implementation uses an operating system facility that can associate names
|
|
92
134
|
* with addresses and vice versa. This implementation can have subtle but
|
|
93
135
|
* important consequences on the behavior of any Node.js program. Please take some
|
|
94
|
-
* time to consult the
|
|
136
|
+
* time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations)
|
|
137
|
+
* before using `dns.lookup()`.
|
|
95
138
|
*
|
|
96
139
|
* Example usage:
|
|
97
140
|
*
|
|
98
141
|
* ```js
|
|
99
|
-
*
|
|
142
|
+
* import dns from 'node:dns';
|
|
100
143
|
* const options = {
|
|
101
144
|
* family: 6,
|
|
102
145
|
* hints: dns.ADDRCONFIG | dns.V4MAPPED,
|
|
@@ -112,7 +155,8 @@ declare module "dns" {
|
|
|
112
155
|
* // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
|
|
113
156
|
* ```
|
|
114
157
|
*
|
|
115
|
-
* If this method is invoked as its
|
|
158
|
+
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed
|
|
159
|
+
* version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
|
|
116
160
|
* @since v0.1.90
|
|
117
161
|
*/
|
|
118
162
|
export function lookup(
|
|
@@ -149,19 +193,21 @@ declare module "dns" {
|
|
|
149
193
|
* the operating system's underlying `getnameinfo` implementation.
|
|
150
194
|
*
|
|
151
195
|
* If `address` is not a valid IP address, a `TypeError` will be thrown.
|
|
152
|
-
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
|
|
196
|
+
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
|
|
153
197
|
*
|
|
154
|
-
* On an error, `err` is an `Error` object,
|
|
198
|
+
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object,
|
|
199
|
+
* where `err.code` is the error code.
|
|
155
200
|
*
|
|
156
201
|
* ```js
|
|
157
|
-
*
|
|
202
|
+
* import dns from 'node:dns';
|
|
158
203
|
* dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
|
|
159
204
|
* console.log(hostname, service);
|
|
160
205
|
* // Prints: localhost ssh
|
|
161
206
|
* });
|
|
162
207
|
* ```
|
|
163
208
|
*
|
|
164
|
-
* If this method is invoked as its
|
|
209
|
+
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed
|
|
210
|
+
* version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
|
|
165
211
|
* @since v0.11.14
|
|
166
212
|
*/
|
|
167
213
|
export function lookupService(
|
|
@@ -204,6 +250,9 @@ declare module "dns" {
|
|
|
204
250
|
contactemail?: string | undefined;
|
|
205
251
|
contactphone?: string | undefined;
|
|
206
252
|
}
|
|
253
|
+
export interface AnyCaaRecord extends CaaRecord {
|
|
254
|
+
type: "CAA";
|
|
255
|
+
}
|
|
207
256
|
export interface MxRecord {
|
|
208
257
|
priority: number;
|
|
209
258
|
exchange: string;
|
|
@@ -243,6 +292,15 @@ declare module "dns" {
|
|
|
243
292
|
export interface AnySrvRecord extends SrvRecord {
|
|
244
293
|
type: "SRV";
|
|
245
294
|
}
|
|
295
|
+
export interface TlsaRecord {
|
|
296
|
+
certUsage: number;
|
|
297
|
+
selector: number;
|
|
298
|
+
match: number;
|
|
299
|
+
data: ArrayBuffer;
|
|
300
|
+
}
|
|
301
|
+
export interface AnyTlsaRecord extends TlsaRecord {
|
|
302
|
+
type: "TLSA";
|
|
303
|
+
}
|
|
246
304
|
export interface AnyTxtRecord {
|
|
247
305
|
type: "TXT";
|
|
248
306
|
entries: string[];
|
|
@@ -262,6 +320,7 @@ declare module "dns" {
|
|
|
262
320
|
export type AnyRecord =
|
|
263
321
|
| AnyARecord
|
|
264
322
|
| AnyAaaaRecord
|
|
323
|
+
| AnyCaaRecord
|
|
265
324
|
| AnyCnameRecord
|
|
266
325
|
| AnyMxRecord
|
|
267
326
|
| AnyNaptrRecord
|
|
@@ -269,15 +328,17 @@ declare module "dns" {
|
|
|
269
328
|
| AnyPtrRecord
|
|
270
329
|
| AnySoaRecord
|
|
271
330
|
| AnySrvRecord
|
|
331
|
+
| AnyTlsaRecord
|
|
272
332
|
| AnyTxtRecord;
|
|
273
333
|
/**
|
|
274
334
|
* Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
|
|
275
|
-
* of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource
|
|
335
|
+
* of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource
|
|
276
336
|
* records. The type and structure of individual results varies based on `rrtype`:
|
|
277
337
|
*
|
|
278
338
|
* <omitted>
|
|
279
339
|
*
|
|
280
|
-
* On error, `err` is an `Error` object,
|
|
340
|
+
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object,
|
|
341
|
+
* where `err.code` is one of the `DNS error codes`.
|
|
281
342
|
* @since v0.1.27
|
|
282
343
|
* @param hostname Host name to resolve.
|
|
283
344
|
* @param [rrtype='A'] Resource record type.
|
|
@@ -288,12 +349,7 @@ declare module "dns" {
|
|
|
288
349
|
): void;
|
|
289
350
|
export function resolve(
|
|
290
351
|
hostname: string,
|
|
291
|
-
rrtype: "A",
|
|
292
|
-
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
293
|
-
): void;
|
|
294
|
-
export function resolve(
|
|
295
|
-
hostname: string,
|
|
296
|
-
rrtype: "AAAA",
|
|
352
|
+
rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
|
|
297
353
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
298
354
|
): void;
|
|
299
355
|
export function resolve(
|
|
@@ -303,8 +359,8 @@ declare module "dns" {
|
|
|
303
359
|
): void;
|
|
304
360
|
export function resolve(
|
|
305
361
|
hostname: string,
|
|
306
|
-
rrtype: "
|
|
307
|
-
callback: (err: NodeJS.ErrnoException | null,
|
|
362
|
+
rrtype: "CAA",
|
|
363
|
+
callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
|
|
308
364
|
): void;
|
|
309
365
|
export function resolve(
|
|
310
366
|
hostname: string,
|
|
@@ -316,16 +372,6 @@ declare module "dns" {
|
|
|
316
372
|
rrtype: "NAPTR",
|
|
317
373
|
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
|
318
374
|
): void;
|
|
319
|
-
export function resolve(
|
|
320
|
-
hostname: string,
|
|
321
|
-
rrtype: "NS",
|
|
322
|
-
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
323
|
-
): void;
|
|
324
|
-
export function resolve(
|
|
325
|
-
hostname: string,
|
|
326
|
-
rrtype: "PTR",
|
|
327
|
-
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
328
|
-
): void;
|
|
329
375
|
export function resolve(
|
|
330
376
|
hostname: string,
|
|
331
377
|
rrtype: "SOA",
|
|
@@ -336,6 +382,11 @@ declare module "dns" {
|
|
|
336
382
|
rrtype: "SRV",
|
|
337
383
|
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
|
338
384
|
): void;
|
|
385
|
+
export function resolve(
|
|
386
|
+
hostname: string,
|
|
387
|
+
rrtype: "TLSA",
|
|
388
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
|
|
389
|
+
): void;
|
|
339
390
|
export function resolve(
|
|
340
391
|
hostname: string,
|
|
341
392
|
rrtype: "TXT",
|
|
@@ -346,24 +397,45 @@ declare module "dns" {
|
|
|
346
397
|
rrtype: string,
|
|
347
398
|
callback: (
|
|
348
399
|
err: NodeJS.ErrnoException | null,
|
|
349
|
-
addresses:
|
|
400
|
+
addresses:
|
|
401
|
+
| string[]
|
|
402
|
+
| CaaRecord[]
|
|
403
|
+
| MxRecord[]
|
|
404
|
+
| NaptrRecord[]
|
|
405
|
+
| SoaRecord
|
|
406
|
+
| SrvRecord[]
|
|
407
|
+
| TlsaRecord[]
|
|
408
|
+
| string[][]
|
|
409
|
+
| AnyRecord[],
|
|
350
410
|
) => void,
|
|
351
411
|
): void;
|
|
352
412
|
export namespace resolve {
|
|
353
413
|
function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
|
354
414
|
function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
415
|
+
function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
|
|
355
416
|
function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
|
356
417
|
function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
|
357
418
|
function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
|
358
419
|
function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
|
420
|
+
function __promisify__(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
|
|
359
421
|
function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
|
360
422
|
function __promisify__(
|
|
361
423
|
hostname: string,
|
|
362
424
|
rrtype: string,
|
|
363
|
-
): Promise<
|
|
425
|
+
): Promise<
|
|
426
|
+
| string[]
|
|
427
|
+
| CaaRecord[]
|
|
428
|
+
| MxRecord[]
|
|
429
|
+
| NaptrRecord[]
|
|
430
|
+
| SoaRecord
|
|
431
|
+
| SrvRecord[]
|
|
432
|
+
| TlsaRecord[]
|
|
433
|
+
| string[][]
|
|
434
|
+
| AnyRecord[]
|
|
435
|
+
>;
|
|
364
436
|
}
|
|
365
437
|
/**
|
|
366
|
-
* Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function
|
|
438
|
+
* Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function
|
|
367
439
|
* will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
|
|
368
440
|
* @since v0.1.16
|
|
369
441
|
* @param hostname Host name to resolve.
|
|
@@ -388,7 +460,7 @@ declare module "dns" {
|
|
|
388
460
|
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
389
461
|
}
|
|
390
462
|
/**
|
|
391
|
-
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
|
|
463
|
+
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function
|
|
392
464
|
* will contain an array of IPv6 addresses.
|
|
393
465
|
* @since v0.1.16
|
|
394
466
|
* @param hostname Host name to resolve.
|
|
@@ -413,8 +485,8 @@ declare module "dns" {
|
|
|
413
485
|
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
414
486
|
}
|
|
415
487
|
/**
|
|
416
|
-
* Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The`addresses` argument passed to the `callback` function
|
|
417
|
-
* will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`).
|
|
488
|
+
* Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function
|
|
489
|
+
* will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`).
|
|
418
490
|
* @since v0.3.2
|
|
419
491
|
*/
|
|
420
492
|
export function resolveCname(
|
|
@@ -425,7 +497,7 @@ declare module "dns" {
|
|
|
425
497
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
426
498
|
}
|
|
427
499
|
/**
|
|
428
|
-
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function
|
|
500
|
+
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function
|
|
429
501
|
* will contain an array of certification authority authorization records
|
|
430
502
|
* available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
|
|
431
503
|
* @since v15.0.0, v14.17.0
|
|
@@ -438,8 +510,8 @@ declare module "dns" {
|
|
|
438
510
|
function __promisify__(hostname: string): Promise<CaaRecord[]>;
|
|
439
511
|
}
|
|
440
512
|
/**
|
|
441
|
-
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
|
|
442
|
-
* contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
|
|
513
|
+
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
|
|
514
|
+
* contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
|
|
443
515
|
* @since v0.1.27
|
|
444
516
|
*/
|
|
445
517
|
export function resolveMx(
|
|
@@ -450,7 +522,7 @@ declare module "dns" {
|
|
|
450
522
|
function __promisify__(hostname: string): Promise<MxRecord[]>;
|
|
451
523
|
}
|
|
452
524
|
/**
|
|
453
|
-
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
|
|
525
|
+
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of
|
|
454
526
|
* objects with the following properties:
|
|
455
527
|
*
|
|
456
528
|
* * `flags`
|
|
@@ -480,8 +552,8 @@ declare module "dns" {
|
|
|
480
552
|
function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
|
481
553
|
}
|
|
482
554
|
/**
|
|
483
|
-
* Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
|
|
484
|
-
* contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`).
|
|
555
|
+
* Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
|
|
556
|
+
* contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`).
|
|
485
557
|
* @since v0.1.90
|
|
486
558
|
*/
|
|
487
559
|
export function resolveNs(
|
|
@@ -492,7 +564,7 @@ declare module "dns" {
|
|
|
492
564
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
493
565
|
}
|
|
494
566
|
/**
|
|
495
|
-
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
|
|
567
|
+
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
|
|
496
568
|
* be an array of strings containing the reply records.
|
|
497
569
|
* @since v6.0.0
|
|
498
570
|
*/
|
|
@@ -537,7 +609,7 @@ declare module "dns" {
|
|
|
537
609
|
function __promisify__(hostname: string): Promise<SoaRecord>;
|
|
538
610
|
}
|
|
539
611
|
/**
|
|
540
|
-
* Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
|
|
612
|
+
* Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
|
|
541
613
|
* be an array of objects with the following properties:
|
|
542
614
|
*
|
|
543
615
|
* * `priority`
|
|
@@ -563,7 +635,34 @@ declare module "dns" {
|
|
|
563
635
|
function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
|
564
636
|
}
|
|
565
637
|
/**
|
|
566
|
-
* Uses the DNS protocol to resolve
|
|
638
|
+
* Uses the DNS protocol to resolve certificate associations (`TLSA` records) for
|
|
639
|
+
* the `hostname`. The `records` argument passed to the `callback` function is an
|
|
640
|
+
* array of objects with these properties:
|
|
641
|
+
*
|
|
642
|
+
* * `certUsage`
|
|
643
|
+
* * `selector`
|
|
644
|
+
* * `match`
|
|
645
|
+
* * `data`
|
|
646
|
+
*
|
|
647
|
+
* ```js
|
|
648
|
+
* {
|
|
649
|
+
* certUsage: 3,
|
|
650
|
+
* selector: 1,
|
|
651
|
+
* match: 1,
|
|
652
|
+
* data: [ArrayBuffer]
|
|
653
|
+
* }
|
|
654
|
+
* ```
|
|
655
|
+
* @since v23.9.0, v22.15.0
|
|
656
|
+
*/
|
|
657
|
+
export function resolveTlsa(
|
|
658
|
+
hostname: string,
|
|
659
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
|
|
660
|
+
): void;
|
|
661
|
+
export namespace resolveTlsa {
|
|
662
|
+
function __promisify__(hostname: string): Promise<TlsaRecord[]>;
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a
|
|
567
666
|
* two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
|
|
568
667
|
* one record. Depending on the use case, these could be either joined together or
|
|
569
668
|
* treated separately.
|
|
@@ -603,8 +702,8 @@ declare module "dns" {
|
|
|
603
702
|
* minttl: 60 } ]
|
|
604
703
|
* ```
|
|
605
704
|
*
|
|
606
|
-
* DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see
|
|
607
|
-
* 8482](https://tools.ietf.org/html/rfc8482).
|
|
705
|
+
* DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see
|
|
706
|
+
* [RFC 8482](https://tools.ietf.org/html/rfc8482).
|
|
608
707
|
*/
|
|
609
708
|
export function resolveAny(
|
|
610
709
|
hostname: string,
|
|
@@ -617,8 +716,8 @@ declare module "dns" {
|
|
|
617
716
|
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
|
|
618
717
|
* array of host names.
|
|
619
718
|
*
|
|
620
|
-
* On error, `err` is an `Error` object, where `err.code` is
|
|
621
|
-
* one of the
|
|
719
|
+
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object, where `err.code` is
|
|
720
|
+
* one of the [DNS error codes](https://nodejs.org/docs/latest-v24.x/api/dns.html#error-codes).
|
|
622
721
|
* @since v0.1.16
|
|
623
722
|
*/
|
|
624
723
|
export function reverse(
|
|
@@ -626,13 +725,15 @@ declare module "dns" {
|
|
|
626
725
|
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
|
|
627
726
|
): void;
|
|
628
727
|
/**
|
|
629
|
-
* Get the default value for `
|
|
728
|
+
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
729
|
+
* The value could be:
|
|
630
730
|
*
|
|
631
|
-
* * `ipv4first`: for `
|
|
632
|
-
* * `
|
|
633
|
-
*
|
|
731
|
+
* * `ipv4first`: for `order` defaulting to `ipv4first`.
|
|
732
|
+
* * `ipv6first`: for `order` defaulting to `ipv6first`.
|
|
733
|
+
* * `verbatim`: for `order` defaulting to `verbatim`.
|
|
734
|
+
* @since v18.17.0
|
|
634
735
|
*/
|
|
635
|
-
export function getDefaultResultOrder(): "ipv4first" | "verbatim";
|
|
736
|
+
export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
|
|
636
737
|
/**
|
|
637
738
|
* Sets the IP address and port of servers to be used when performing DNS
|
|
638
739
|
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
|
|
@@ -652,14 +753,14 @@ declare module "dns" {
|
|
|
652
753
|
* The `dns.setServers()` method must not be called while a DNS query is in
|
|
653
754
|
* progress.
|
|
654
755
|
*
|
|
655
|
-
* The {@link setServers} method affects only {@link resolve}
|
|
756
|
+
* The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
|
|
656
757
|
*
|
|
657
758
|
* This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
|
|
658
|
-
* That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
|
|
759
|
+
* That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
|
|
659
760
|
* subsequent servers provided. Fallback DNS servers will only be used if the
|
|
660
761
|
* earlier ones time out or result in some other error.
|
|
661
762
|
* @since v0.11.3
|
|
662
|
-
* @param servers array of
|
|
763
|
+
* @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses
|
|
663
764
|
*/
|
|
664
765
|
export function setServers(servers: readonly string[]): void;
|
|
665
766
|
/**
|
|
@@ -679,59 +780,71 @@ declare module "dns" {
|
|
|
679
780
|
*/
|
|
680
781
|
export function getServers(): string[];
|
|
681
782
|
/**
|
|
682
|
-
* Set the default value of `
|
|
783
|
+
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
784
|
+
* The value could be:
|
|
683
785
|
*
|
|
684
|
-
* * `ipv4first`: sets default `
|
|
685
|
-
* * `
|
|
786
|
+
* * `ipv4first`: sets default `order` to `ipv4first`.
|
|
787
|
+
* * `ipv6first`: sets default `order` to `ipv6first`.
|
|
788
|
+
* * `verbatim`: sets default `order` to `verbatim`.
|
|
686
789
|
*
|
|
687
790
|
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
|
688
|
-
* priority than `--dns-result-order
|
|
689
|
-
*
|
|
791
|
+
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder). When using
|
|
792
|
+
* [worker threads](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
|
793
|
+
* thread won't affect the default dns orders in workers.
|
|
690
794
|
* @since v16.4.0, v14.18.0
|
|
691
|
-
* @param order must be `'ipv4first'` or `'verbatim'`.
|
|
795
|
+
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
|
|
692
796
|
*/
|
|
693
|
-
export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
|
|
797
|
+
export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
|
|
694
798
|
// Error codes
|
|
695
|
-
export const NODATA:
|
|
696
|
-
export const FORMERR:
|
|
697
|
-
export const SERVFAIL:
|
|
698
|
-
export const NOTFOUND:
|
|
699
|
-
export const NOTIMP:
|
|
700
|
-
export const REFUSED:
|
|
701
|
-
export const BADQUERY:
|
|
702
|
-
export const BADNAME:
|
|
703
|
-
export const BADFAMILY:
|
|
704
|
-
export const BADRESP:
|
|
705
|
-
export const CONNREFUSED:
|
|
706
|
-
export const TIMEOUT:
|
|
707
|
-
export const EOF:
|
|
708
|
-
export const FILE:
|
|
709
|
-
export const NOMEM:
|
|
710
|
-
export const DESTRUCTION:
|
|
711
|
-
export const BADSTR:
|
|
712
|
-
export const BADFLAGS:
|
|
713
|
-
export const NONAME:
|
|
714
|
-
export const BADHINTS:
|
|
715
|
-
export const NOTINITIALIZED:
|
|
716
|
-
export const LOADIPHLPAPI:
|
|
717
|
-
export const ADDRGETNETWORKPARAMS:
|
|
718
|
-
export const CANCELLED:
|
|
799
|
+
export const NODATA: "ENODATA";
|
|
800
|
+
export const FORMERR: "EFORMERR";
|
|
801
|
+
export const SERVFAIL: "ESERVFAIL";
|
|
802
|
+
export const NOTFOUND: "ENOTFOUND";
|
|
803
|
+
export const NOTIMP: "ENOTIMP";
|
|
804
|
+
export const REFUSED: "EREFUSED";
|
|
805
|
+
export const BADQUERY: "EBADQUERY";
|
|
806
|
+
export const BADNAME: "EBADNAME";
|
|
807
|
+
export const BADFAMILY: "EBADFAMILY";
|
|
808
|
+
export const BADRESP: "EBADRESP";
|
|
809
|
+
export const CONNREFUSED: "ECONNREFUSED";
|
|
810
|
+
export const TIMEOUT: "ETIMEOUT";
|
|
811
|
+
export const EOF: "EOF";
|
|
812
|
+
export const FILE: "EFILE";
|
|
813
|
+
export const NOMEM: "ENOMEM";
|
|
814
|
+
export const DESTRUCTION: "EDESTRUCTION";
|
|
815
|
+
export const BADSTR: "EBADSTR";
|
|
816
|
+
export const BADFLAGS: "EBADFLAGS";
|
|
817
|
+
export const NONAME: "ENONAME";
|
|
818
|
+
export const BADHINTS: "EBADHINTS";
|
|
819
|
+
export const NOTINITIALIZED: "ENOTINITIALIZED";
|
|
820
|
+
export const LOADIPHLPAPI: "ELOADIPHLPAPI";
|
|
821
|
+
export const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
|
|
822
|
+
export const CANCELLED: "ECANCELLED";
|
|
719
823
|
export interface ResolverOptions {
|
|
824
|
+
/**
|
|
825
|
+
* Query timeout in milliseconds, or `-1` to use the default timeout.
|
|
826
|
+
*/
|
|
720
827
|
timeout?: number | undefined;
|
|
721
828
|
/**
|
|
829
|
+
* The number of tries the resolver will try contacting each name server before giving up.
|
|
722
830
|
* @default 4
|
|
723
831
|
*/
|
|
724
|
-
tries?: number;
|
|
832
|
+
tries?: number | undefined;
|
|
833
|
+
/**
|
|
834
|
+
* The max retry timeout, in milliseconds.
|
|
835
|
+
* @default 0
|
|
836
|
+
*/
|
|
837
|
+
maxTimeout?: number | undefined;
|
|
725
838
|
}
|
|
726
839
|
/**
|
|
727
840
|
* An independent resolver for DNS requests.
|
|
728
841
|
*
|
|
729
842
|
* Creating a new resolver uses the default server settings. Setting
|
|
730
|
-
* the servers used for a resolver using `resolver.setServers()` does not affect
|
|
843
|
+
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnssetserversservers) does not affect
|
|
731
844
|
* other resolvers:
|
|
732
845
|
*
|
|
733
846
|
* ```js
|
|
734
|
-
*
|
|
847
|
+
* import { Resolver } from 'node:dns';
|
|
735
848
|
* const resolver = new Resolver();
|
|
736
849
|
* resolver.setServers(['4.4.4.4']);
|
|
737
850
|
*
|
|
@@ -782,6 +895,7 @@ declare module "dns" {
|
|
|
782
895
|
resolvePtr: typeof resolvePtr;
|
|
783
896
|
resolveSoa: typeof resolveSoa;
|
|
784
897
|
resolveSrv: typeof resolveSrv;
|
|
898
|
+
resolveTlsa: typeof resolveTlsa;
|
|
785
899
|
resolveTxt: typeof resolveTxt;
|
|
786
900
|
reverse: typeof reverse;
|
|
787
901
|
/**
|