cdk-common 2.0.1351 → 2.0.1353
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 +38 -2
- package/API.md +36 -0
- package/lib/main.js +1 -1
- package/lib/managed-policies.d.ts +7 -1
- package/lib/managed-policies.js +7 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert/strict.d.ts +5 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +9 -169
- package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +8 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +44 -168
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +16 -64
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +240 -332
- package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +49 -351
- package/node_modules/@types/concat-stream/node_modules/@types/node/constants.d.ts +3 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +279 -1631
- package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +15 -51
- package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns/promises.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +131 -132
- package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +13 -17
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +869 -791
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +7 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +417 -455
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.d.ts +6 -26
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.typedarray.d.ts +60 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +263 -254
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +528 -804
- package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +59 -239
- package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +15 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +6 -59
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.generated.d.ts +3 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +47 -122
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +63 -184
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +6 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +120 -133
- package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +282 -643
- package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +156 -128
- package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/quic.d.ts +910 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +67 -120
- package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +75 -98
- package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +176 -453
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +555 -478
- package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +80 -180
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +4 -130
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +102 -177
- package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +9 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/index.d.ts +15 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/index.d.ts +15 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +58 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +54 -592
- package/node_modules/@types/concat-stream/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +120 -792
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +32 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +13 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/crypto.d.ts +7 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/fetch.d.ts +4 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/streams.d.ts +93 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +176 -358
- package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +8 -71
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert/strict.d.ts +5 -11
- package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +9 -169
- package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +8 -8
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +44 -168
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +16 -64
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +240 -332
- package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +49 -351
- package/node_modules/@types/form-data/node_modules/@types/node/constants.d.ts +3 -4
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +279 -1631
- package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +15 -51
- package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/dns/promises.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +131 -132
- package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +13 -17
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +869 -791
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +7 -8
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +417 -455
- package/node_modules/@types/form-data/node_modules/@types/node/globals.d.ts +6 -26
- package/node_modules/@types/form-data/node_modules/@types/node/globals.typedarray.d.ts +60 -0
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +263 -254
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +528 -804
- package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +59 -239
- package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +15 -1
- package/node_modules/@types/form-data/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +6 -59
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.generated.d.ts +3 -10
- package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +47 -122
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +63 -184
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +6 -6
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/form-data/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +120 -133
- package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +282 -643
- package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +156 -128
- package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/quic.d.ts +910 -0
- package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +67 -120
- package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +75 -98
- package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/form-data/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +176 -453
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +555 -478
- package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +80 -180
- package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +4 -130
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +102 -177
- package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +9 -9
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/index.d.ts +15 -1
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/index.d.ts +15 -1
- package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +58 -16
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +54 -592
- package/node_modules/@types/form-data/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +120 -792
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +32 -5
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +13 -13
- package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/crypto.d.ts +7 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/fetch.d.ts +4 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/streams.d.ts +93 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +176 -358
- package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +8 -71
- package/package.json +4 -4
|
@@ -41,28 +41,27 @@
|
|
|
41
41
|
* });
|
|
42
42
|
* ```
|
|
43
43
|
*
|
|
44
|
-
* See the [Implementation considerations section](https://nodejs.org/docs/latest-
|
|
45
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
44
|
+
* See the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations) for more information.
|
|
45
|
+
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dns.js)
|
|
46
46
|
*/
|
|
47
|
-
declare module "dns" {
|
|
48
|
-
import * as dnsPromises from "node:dns/promises";
|
|
47
|
+
declare module "node:dns" {
|
|
49
48
|
// Supported getaddrinfo flags.
|
|
50
49
|
/**
|
|
51
50
|
* Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are
|
|
52
51
|
* only returned if the current system has at least one IPv4 address configured.
|
|
53
52
|
*/
|
|
54
|
-
|
|
53
|
+
const ADDRCONFIG: number;
|
|
55
54
|
/**
|
|
56
55
|
* If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported
|
|
57
56
|
* on some operating systems (e.g. FreeBSD 10.1).
|
|
58
57
|
*/
|
|
59
|
-
|
|
58
|
+
const V4MAPPED: number;
|
|
60
59
|
/**
|
|
61
60
|
* If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
|
|
62
61
|
* well as IPv4 mapped IPv6 addresses.
|
|
63
62
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
const ALL: number;
|
|
64
|
+
interface LookupOptions {
|
|
66
65
|
/**
|
|
67
66
|
* The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
|
|
68
67
|
* as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used
|
|
@@ -71,7 +70,7 @@ declare module "dns" {
|
|
|
71
70
|
*/
|
|
72
71
|
family?: number | "IPv4" | "IPv6" | undefined;
|
|
73
72
|
/**
|
|
74
|
-
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-
|
|
73
|
+
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v25.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
|
|
75
74
|
* passed by bitwise `OR`ing their values.
|
|
76
75
|
*/
|
|
77
76
|
hints?: number | undefined;
|
|
@@ -84,7 +83,7 @@ declare module "dns" {
|
|
|
84
83
|
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
|
|
85
84
|
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
|
|
86
85
|
* addresses before IPv4 addresses. Default value is configurable using
|
|
87
|
-
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-
|
|
86
|
+
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder).
|
|
88
87
|
* @default `verbatim` (addresses are not reordered)
|
|
89
88
|
* @since v22.1.0
|
|
90
89
|
*/
|
|
@@ -98,13 +97,13 @@ declare module "dns" {
|
|
|
98
97
|
*/
|
|
99
98
|
verbatim?: boolean | undefined;
|
|
100
99
|
}
|
|
101
|
-
|
|
100
|
+
interface LookupOneOptions extends LookupOptions {
|
|
102
101
|
all?: false | undefined;
|
|
103
102
|
}
|
|
104
|
-
|
|
103
|
+
interface LookupAllOptions extends LookupOptions {
|
|
105
104
|
all: true;
|
|
106
105
|
}
|
|
107
|
-
|
|
106
|
+
interface LookupAddress {
|
|
108
107
|
/**
|
|
109
108
|
* A string representation of an IPv4 or IPv6 address.
|
|
110
109
|
*/
|
|
@@ -133,7 +132,7 @@ declare module "dns" {
|
|
|
133
132
|
* The implementation uses an operating system facility that can associate names
|
|
134
133
|
* with addresses and vice versa. This implementation can have subtle but
|
|
135
134
|
* important consequences on the behavior of any Node.js program. Please take some
|
|
136
|
-
* time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-
|
|
135
|
+
* time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations)
|
|
137
136
|
* before using `dns.lookup()`.
|
|
138
137
|
*
|
|
139
138
|
* Example usage:
|
|
@@ -155,35 +154,35 @@ declare module "dns" {
|
|
|
155
154
|
* // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
|
|
156
155
|
* ```
|
|
157
156
|
*
|
|
158
|
-
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-
|
|
157
|
+
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
|
|
159
158
|
* version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
|
|
160
159
|
* @since v0.1.90
|
|
161
160
|
*/
|
|
162
|
-
|
|
161
|
+
function lookup(
|
|
163
162
|
hostname: string,
|
|
164
163
|
family: number,
|
|
165
164
|
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
166
165
|
): void;
|
|
167
|
-
|
|
166
|
+
function lookup(
|
|
168
167
|
hostname: string,
|
|
169
168
|
options: LookupOneOptions,
|
|
170
169
|
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
171
170
|
): void;
|
|
172
|
-
|
|
171
|
+
function lookup(
|
|
173
172
|
hostname: string,
|
|
174
173
|
options: LookupAllOptions,
|
|
175
174
|
callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
|
|
176
175
|
): void;
|
|
177
|
-
|
|
176
|
+
function lookup(
|
|
178
177
|
hostname: string,
|
|
179
178
|
options: LookupOptions,
|
|
180
179
|
callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
|
|
181
180
|
): void;
|
|
182
|
-
|
|
181
|
+
function lookup(
|
|
183
182
|
hostname: string,
|
|
184
183
|
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
185
184
|
): void;
|
|
186
|
-
|
|
185
|
+
namespace lookup {
|
|
187
186
|
function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
|
|
188
187
|
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
|
|
189
188
|
function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
|
|
@@ -195,7 +194,7 @@ declare module "dns" {
|
|
|
195
194
|
* If `address` is not a valid IP address, a `TypeError` will be thrown.
|
|
196
195
|
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
|
|
197
196
|
*
|
|
198
|
-
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-
|
|
197
|
+
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
|
|
199
198
|
* where `err.code` is the error code.
|
|
200
199
|
*
|
|
201
200
|
* ```js
|
|
@@ -206,16 +205,16 @@ declare module "dns" {
|
|
|
206
205
|
* });
|
|
207
206
|
* ```
|
|
208
207
|
*
|
|
209
|
-
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-
|
|
208
|
+
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
|
|
210
209
|
* version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
|
|
211
210
|
* @since v0.11.14
|
|
212
211
|
*/
|
|
213
|
-
|
|
212
|
+
function lookupService(
|
|
214
213
|
address: string,
|
|
215
214
|
port: number,
|
|
216
215
|
callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
|
|
217
216
|
): void;
|
|
218
|
-
|
|
217
|
+
namespace lookupService {
|
|
219
218
|
function __promisify__(
|
|
220
219
|
address: string,
|
|
221
220
|
port: number,
|
|
@@ -224,25 +223,23 @@ declare module "dns" {
|
|
|
224
223
|
service: string;
|
|
225
224
|
}>;
|
|
226
225
|
}
|
|
227
|
-
|
|
226
|
+
interface ResolveOptions {
|
|
228
227
|
ttl: boolean;
|
|
229
228
|
}
|
|
230
|
-
|
|
229
|
+
interface ResolveWithTtlOptions extends ResolveOptions {
|
|
231
230
|
ttl: true;
|
|
232
231
|
}
|
|
233
|
-
|
|
232
|
+
interface RecordWithTtl {
|
|
234
233
|
address: string;
|
|
235
234
|
ttl: number;
|
|
236
235
|
}
|
|
237
|
-
|
|
238
|
-
export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
|
|
239
|
-
export interface AnyARecord extends RecordWithTtl {
|
|
236
|
+
interface AnyARecord extends RecordWithTtl {
|
|
240
237
|
type: "A";
|
|
241
238
|
}
|
|
242
|
-
|
|
239
|
+
interface AnyAaaaRecord extends RecordWithTtl {
|
|
243
240
|
type: "AAAA";
|
|
244
241
|
}
|
|
245
|
-
|
|
242
|
+
interface CaaRecord {
|
|
246
243
|
critical: number;
|
|
247
244
|
issue?: string | undefined;
|
|
248
245
|
issuewild?: string | undefined;
|
|
@@ -250,17 +247,17 @@ declare module "dns" {
|
|
|
250
247
|
contactemail?: string | undefined;
|
|
251
248
|
contactphone?: string | undefined;
|
|
252
249
|
}
|
|
253
|
-
|
|
250
|
+
interface AnyCaaRecord extends CaaRecord {
|
|
254
251
|
type: "CAA";
|
|
255
252
|
}
|
|
256
|
-
|
|
253
|
+
interface MxRecord {
|
|
257
254
|
priority: number;
|
|
258
255
|
exchange: string;
|
|
259
256
|
}
|
|
260
|
-
|
|
257
|
+
interface AnyMxRecord extends MxRecord {
|
|
261
258
|
type: "MX";
|
|
262
259
|
}
|
|
263
|
-
|
|
260
|
+
interface NaptrRecord {
|
|
264
261
|
flags: string;
|
|
265
262
|
service: string;
|
|
266
263
|
regexp: string;
|
|
@@ -268,10 +265,10 @@ declare module "dns" {
|
|
|
268
265
|
order: number;
|
|
269
266
|
preference: number;
|
|
270
267
|
}
|
|
271
|
-
|
|
268
|
+
interface AnyNaptrRecord extends NaptrRecord {
|
|
272
269
|
type: "NAPTR";
|
|
273
270
|
}
|
|
274
|
-
|
|
271
|
+
interface SoaRecord {
|
|
275
272
|
nsname: string;
|
|
276
273
|
hostmaster: string;
|
|
277
274
|
serial: number;
|
|
@@ -280,44 +277,44 @@ declare module "dns" {
|
|
|
280
277
|
expire: number;
|
|
281
278
|
minttl: number;
|
|
282
279
|
}
|
|
283
|
-
|
|
280
|
+
interface AnySoaRecord extends SoaRecord {
|
|
284
281
|
type: "SOA";
|
|
285
282
|
}
|
|
286
|
-
|
|
283
|
+
interface SrvRecord {
|
|
287
284
|
priority: number;
|
|
288
285
|
weight: number;
|
|
289
286
|
port: number;
|
|
290
287
|
name: string;
|
|
291
288
|
}
|
|
292
|
-
|
|
289
|
+
interface AnySrvRecord extends SrvRecord {
|
|
293
290
|
type: "SRV";
|
|
294
291
|
}
|
|
295
|
-
|
|
292
|
+
interface TlsaRecord {
|
|
296
293
|
certUsage: number;
|
|
297
294
|
selector: number;
|
|
298
295
|
match: number;
|
|
299
296
|
data: ArrayBuffer;
|
|
300
297
|
}
|
|
301
|
-
|
|
298
|
+
interface AnyTlsaRecord extends TlsaRecord {
|
|
302
299
|
type: "TLSA";
|
|
303
300
|
}
|
|
304
|
-
|
|
301
|
+
interface AnyTxtRecord {
|
|
305
302
|
type: "TXT";
|
|
306
303
|
entries: string[];
|
|
307
304
|
}
|
|
308
|
-
|
|
305
|
+
interface AnyNsRecord {
|
|
309
306
|
type: "NS";
|
|
310
307
|
value: string;
|
|
311
308
|
}
|
|
312
|
-
|
|
309
|
+
interface AnyPtrRecord {
|
|
313
310
|
type: "PTR";
|
|
314
311
|
value: string;
|
|
315
312
|
}
|
|
316
|
-
|
|
313
|
+
interface AnyCnameRecord {
|
|
317
314
|
type: "CNAME";
|
|
318
315
|
value: string;
|
|
319
316
|
}
|
|
320
|
-
|
|
317
|
+
type AnyRecord =
|
|
321
318
|
| AnyARecord
|
|
322
319
|
| AnyAaaaRecord
|
|
323
320
|
| AnyCaaRecord
|
|
@@ -337,62 +334,62 @@ declare module "dns" {
|
|
|
337
334
|
*
|
|
338
335
|
* <omitted>
|
|
339
336
|
*
|
|
340
|
-
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-
|
|
337
|
+
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
|
|
341
338
|
* where `err.code` is one of the `DNS error codes`.
|
|
342
339
|
* @since v0.1.27
|
|
343
340
|
* @param hostname Host name to resolve.
|
|
344
341
|
* @param [rrtype='A'] Resource record type.
|
|
345
342
|
*/
|
|
346
|
-
|
|
343
|
+
function resolve(
|
|
347
344
|
hostname: string,
|
|
348
345
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
349
346
|
): void;
|
|
350
|
-
|
|
347
|
+
function resolve(
|
|
351
348
|
hostname: string,
|
|
352
349
|
rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
|
|
353
350
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
354
351
|
): void;
|
|
355
|
-
|
|
352
|
+
function resolve(
|
|
356
353
|
hostname: string,
|
|
357
354
|
rrtype: "ANY",
|
|
358
355
|
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
|
|
359
356
|
): void;
|
|
360
|
-
|
|
357
|
+
function resolve(
|
|
361
358
|
hostname: string,
|
|
362
359
|
rrtype: "CAA",
|
|
363
360
|
callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
|
|
364
361
|
): void;
|
|
365
|
-
|
|
362
|
+
function resolve(
|
|
366
363
|
hostname: string,
|
|
367
364
|
rrtype: "MX",
|
|
368
365
|
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
|
|
369
366
|
): void;
|
|
370
|
-
|
|
367
|
+
function resolve(
|
|
371
368
|
hostname: string,
|
|
372
369
|
rrtype: "NAPTR",
|
|
373
370
|
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
|
374
371
|
): void;
|
|
375
|
-
|
|
372
|
+
function resolve(
|
|
376
373
|
hostname: string,
|
|
377
374
|
rrtype: "SOA",
|
|
378
375
|
callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
|
|
379
376
|
): void;
|
|
380
|
-
|
|
377
|
+
function resolve(
|
|
381
378
|
hostname: string,
|
|
382
379
|
rrtype: "SRV",
|
|
383
380
|
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
|
384
381
|
): void;
|
|
385
|
-
|
|
382
|
+
function resolve(
|
|
386
383
|
hostname: string,
|
|
387
384
|
rrtype: "TLSA",
|
|
388
385
|
callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
|
|
389
386
|
): void;
|
|
390
|
-
|
|
387
|
+
function resolve(
|
|
391
388
|
hostname: string,
|
|
392
389
|
rrtype: "TXT",
|
|
393
390
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
|
|
394
391
|
): void;
|
|
395
|
-
|
|
392
|
+
function resolve(
|
|
396
393
|
hostname: string,
|
|
397
394
|
rrtype: string,
|
|
398
395
|
callback: (
|
|
@@ -409,7 +406,7 @@ declare module "dns" {
|
|
|
409
406
|
| AnyRecord[],
|
|
410
407
|
) => void,
|
|
411
408
|
): void;
|
|
412
|
-
|
|
409
|
+
namespace resolve {
|
|
413
410
|
function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
|
414
411
|
function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
415
412
|
function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
|
|
@@ -440,21 +437,21 @@ declare module "dns" {
|
|
|
440
437
|
* @since v0.1.16
|
|
441
438
|
* @param hostname Host name to resolve.
|
|
442
439
|
*/
|
|
443
|
-
|
|
440
|
+
function resolve4(
|
|
444
441
|
hostname: string,
|
|
445
442
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
446
443
|
): void;
|
|
447
|
-
|
|
444
|
+
function resolve4(
|
|
448
445
|
hostname: string,
|
|
449
446
|
options: ResolveWithTtlOptions,
|
|
450
447
|
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
|
|
451
448
|
): void;
|
|
452
|
-
|
|
449
|
+
function resolve4(
|
|
453
450
|
hostname: string,
|
|
454
451
|
options: ResolveOptions,
|
|
455
452
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
|
|
456
453
|
): void;
|
|
457
|
-
|
|
454
|
+
namespace resolve4 {
|
|
458
455
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
459
456
|
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
|
460
457
|
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
@@ -465,21 +462,21 @@ declare module "dns" {
|
|
|
465
462
|
* @since v0.1.16
|
|
466
463
|
* @param hostname Host name to resolve.
|
|
467
464
|
*/
|
|
468
|
-
|
|
465
|
+
function resolve6(
|
|
469
466
|
hostname: string,
|
|
470
467
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
471
468
|
): void;
|
|
472
|
-
|
|
469
|
+
function resolve6(
|
|
473
470
|
hostname: string,
|
|
474
471
|
options: ResolveWithTtlOptions,
|
|
475
472
|
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
|
|
476
473
|
): void;
|
|
477
|
-
|
|
474
|
+
function resolve6(
|
|
478
475
|
hostname: string,
|
|
479
476
|
options: ResolveOptions,
|
|
480
477
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
|
|
481
478
|
): void;
|
|
482
|
-
|
|
479
|
+
namespace resolve6 {
|
|
483
480
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
484
481
|
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
|
485
482
|
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
@@ -489,11 +486,11 @@ declare module "dns" {
|
|
|
489
486
|
* will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`).
|
|
490
487
|
* @since v0.3.2
|
|
491
488
|
*/
|
|
492
|
-
|
|
489
|
+
function resolveCname(
|
|
493
490
|
hostname: string,
|
|
494
491
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
495
492
|
): void;
|
|
496
|
-
|
|
493
|
+
namespace resolveCname {
|
|
497
494
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
498
495
|
}
|
|
499
496
|
/**
|
|
@@ -502,11 +499,11 @@ declare module "dns" {
|
|
|
502
499
|
* available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
|
|
503
500
|
* @since v15.0.0, v14.17.0
|
|
504
501
|
*/
|
|
505
|
-
|
|
502
|
+
function resolveCaa(
|
|
506
503
|
hostname: string,
|
|
507
504
|
callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
|
|
508
505
|
): void;
|
|
509
|
-
|
|
506
|
+
namespace resolveCaa {
|
|
510
507
|
function __promisify__(hostname: string): Promise<CaaRecord[]>;
|
|
511
508
|
}
|
|
512
509
|
/**
|
|
@@ -514,11 +511,11 @@ declare module "dns" {
|
|
|
514
511
|
* contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
|
|
515
512
|
* @since v0.1.27
|
|
516
513
|
*/
|
|
517
|
-
|
|
514
|
+
function resolveMx(
|
|
518
515
|
hostname: string,
|
|
519
516
|
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
|
|
520
517
|
): void;
|
|
521
|
-
|
|
518
|
+
namespace resolveMx {
|
|
522
519
|
function __promisify__(hostname: string): Promise<MxRecord[]>;
|
|
523
520
|
}
|
|
524
521
|
/**
|
|
@@ -544,11 +541,11 @@ declare module "dns" {
|
|
|
544
541
|
* ```
|
|
545
542
|
* @since v0.9.12
|
|
546
543
|
*/
|
|
547
|
-
|
|
544
|
+
function resolveNaptr(
|
|
548
545
|
hostname: string,
|
|
549
546
|
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
|
550
547
|
): void;
|
|
551
|
-
|
|
548
|
+
namespace resolveNaptr {
|
|
552
549
|
function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
|
553
550
|
}
|
|
554
551
|
/**
|
|
@@ -556,11 +553,11 @@ declare module "dns" {
|
|
|
556
553
|
* contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`).
|
|
557
554
|
* @since v0.1.90
|
|
558
555
|
*/
|
|
559
|
-
|
|
556
|
+
function resolveNs(
|
|
560
557
|
hostname: string,
|
|
561
558
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
562
559
|
): void;
|
|
563
|
-
|
|
560
|
+
namespace resolveNs {
|
|
564
561
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
565
562
|
}
|
|
566
563
|
/**
|
|
@@ -568,11 +565,11 @@ declare module "dns" {
|
|
|
568
565
|
* be an array of strings containing the reply records.
|
|
569
566
|
* @since v6.0.0
|
|
570
567
|
*/
|
|
571
|
-
|
|
568
|
+
function resolvePtr(
|
|
572
569
|
hostname: string,
|
|
573
570
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
574
571
|
): void;
|
|
575
|
-
|
|
572
|
+
namespace resolvePtr {
|
|
576
573
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
577
574
|
}
|
|
578
575
|
/**
|
|
@@ -601,11 +598,11 @@ declare module "dns" {
|
|
|
601
598
|
* ```
|
|
602
599
|
* @since v0.11.10
|
|
603
600
|
*/
|
|
604
|
-
|
|
601
|
+
function resolveSoa(
|
|
605
602
|
hostname: string,
|
|
606
603
|
callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
|
|
607
604
|
): void;
|
|
608
|
-
|
|
605
|
+
namespace resolveSoa {
|
|
609
606
|
function __promisify__(hostname: string): Promise<SoaRecord>;
|
|
610
607
|
}
|
|
611
608
|
/**
|
|
@@ -627,11 +624,11 @@ declare module "dns" {
|
|
|
627
624
|
* ```
|
|
628
625
|
* @since v0.1.27
|
|
629
626
|
*/
|
|
630
|
-
|
|
627
|
+
function resolveSrv(
|
|
631
628
|
hostname: string,
|
|
632
629
|
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
|
633
630
|
): void;
|
|
634
|
-
|
|
631
|
+
namespace resolveSrv {
|
|
635
632
|
function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
|
636
633
|
}
|
|
637
634
|
/**
|
|
@@ -654,11 +651,11 @@ declare module "dns" {
|
|
|
654
651
|
* ```
|
|
655
652
|
* @since v23.9.0, v22.15.0
|
|
656
653
|
*/
|
|
657
|
-
|
|
654
|
+
function resolveTlsa(
|
|
658
655
|
hostname: string,
|
|
659
656
|
callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
|
|
660
657
|
): void;
|
|
661
|
-
|
|
658
|
+
namespace resolveTlsa {
|
|
662
659
|
function __promisify__(hostname: string): Promise<TlsaRecord[]>;
|
|
663
660
|
}
|
|
664
661
|
/**
|
|
@@ -668,11 +665,11 @@ declare module "dns" {
|
|
|
668
665
|
* treated separately.
|
|
669
666
|
* @since v0.1.27
|
|
670
667
|
*/
|
|
671
|
-
|
|
668
|
+
function resolveTxt(
|
|
672
669
|
hostname: string,
|
|
673
670
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
|
|
674
671
|
): void;
|
|
675
|
-
|
|
672
|
+
namespace resolveTxt {
|
|
676
673
|
function __promisify__(hostname: string): Promise<string[][]>;
|
|
677
674
|
}
|
|
678
675
|
/**
|
|
@@ -705,27 +702,27 @@ declare module "dns" {
|
|
|
705
702
|
* 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
703
|
* [RFC 8482](https://tools.ietf.org/html/rfc8482).
|
|
707
704
|
*/
|
|
708
|
-
|
|
705
|
+
function resolveAny(
|
|
709
706
|
hostname: string,
|
|
710
707
|
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
|
|
711
708
|
): void;
|
|
712
|
-
|
|
709
|
+
namespace resolveAny {
|
|
713
710
|
function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
|
714
711
|
}
|
|
715
712
|
/**
|
|
716
713
|
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
|
|
717
714
|
* array of host names.
|
|
718
715
|
*
|
|
719
|
-
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-
|
|
720
|
-
* one of the [DNS error codes](https://nodejs.org/docs/latest-
|
|
716
|
+
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, where `err.code` is
|
|
717
|
+
* one of the [DNS error codes](https://nodejs.org/docs/latest-v25.x/api/dns.html#error-codes).
|
|
721
718
|
* @since v0.1.16
|
|
722
719
|
*/
|
|
723
|
-
|
|
720
|
+
function reverse(
|
|
724
721
|
ip: string,
|
|
725
722
|
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
|
|
726
723
|
): void;
|
|
727
724
|
/**
|
|
728
|
-
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-
|
|
725
|
+
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
729
726
|
* The value could be:
|
|
730
727
|
*
|
|
731
728
|
* * `ipv4first`: for `order` defaulting to `ipv4first`.
|
|
@@ -733,7 +730,7 @@ declare module "dns" {
|
|
|
733
730
|
* * `verbatim`: for `order` defaulting to `verbatim`.
|
|
734
731
|
* @since v18.17.0
|
|
735
732
|
*/
|
|
736
|
-
|
|
733
|
+
function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
|
|
737
734
|
/**
|
|
738
735
|
* Sets the IP address and port of servers to be used when performing DNS
|
|
739
736
|
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
|
|
@@ -762,7 +759,7 @@ declare module "dns" {
|
|
|
762
759
|
* @since v0.11.3
|
|
763
760
|
* @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses
|
|
764
761
|
*/
|
|
765
|
-
|
|
762
|
+
function setServers(servers: readonly string[]): void;
|
|
766
763
|
/**
|
|
767
764
|
* Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
|
|
768
765
|
* that are currently configured for DNS resolution. A string will include a port
|
|
@@ -778,9 +775,9 @@ declare module "dns" {
|
|
|
778
775
|
* ```
|
|
779
776
|
* @since v0.11.3
|
|
780
777
|
*/
|
|
781
|
-
|
|
778
|
+
function getServers(): string[];
|
|
782
779
|
/**
|
|
783
|
-
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-
|
|
780
|
+
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
784
781
|
* The value could be:
|
|
785
782
|
*
|
|
786
783
|
* * `ipv4first`: sets default `order` to `ipv4first`.
|
|
@@ -788,39 +785,39 @@ declare module "dns" {
|
|
|
788
785
|
* * `verbatim`: sets default `order` to `verbatim`.
|
|
789
786
|
*
|
|
790
787
|
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
|
791
|
-
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-
|
|
792
|
-
* [worker threads](https://nodejs.org/docs/latest-
|
|
788
|
+
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder). When using
|
|
789
|
+
* [worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
|
793
790
|
* thread won't affect the default dns orders in workers.
|
|
794
791
|
* @since v16.4.0, v14.18.0
|
|
795
792
|
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
|
|
796
793
|
*/
|
|
797
|
-
|
|
794
|
+
function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
|
|
798
795
|
// Error codes
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
796
|
+
const NODATA: "ENODATA";
|
|
797
|
+
const FORMERR: "EFORMERR";
|
|
798
|
+
const SERVFAIL: "ESERVFAIL";
|
|
799
|
+
const NOTFOUND: "ENOTFOUND";
|
|
800
|
+
const NOTIMP: "ENOTIMP";
|
|
801
|
+
const REFUSED: "EREFUSED";
|
|
802
|
+
const BADQUERY: "EBADQUERY";
|
|
803
|
+
const BADNAME: "EBADNAME";
|
|
804
|
+
const BADFAMILY: "EBADFAMILY";
|
|
805
|
+
const BADRESP: "EBADRESP";
|
|
806
|
+
const CONNREFUSED: "ECONNREFUSED";
|
|
807
|
+
const TIMEOUT: "ETIMEOUT";
|
|
808
|
+
const EOF: "EOF";
|
|
809
|
+
const FILE: "EFILE";
|
|
810
|
+
const NOMEM: "ENOMEM";
|
|
811
|
+
const DESTRUCTION: "EDESTRUCTION";
|
|
812
|
+
const BADSTR: "EBADSTR";
|
|
813
|
+
const BADFLAGS: "EBADFLAGS";
|
|
814
|
+
const NONAME: "ENONAME";
|
|
815
|
+
const BADHINTS: "EBADHINTS";
|
|
816
|
+
const NOTINITIALIZED: "ENOTINITIALIZED";
|
|
817
|
+
const LOADIPHLPAPI: "ELOADIPHLPAPI";
|
|
818
|
+
const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
|
|
819
|
+
const CANCELLED: "ECANCELLED";
|
|
820
|
+
interface ResolverOptions {
|
|
824
821
|
/**
|
|
825
822
|
* Query timeout in milliseconds, or `-1` to use the default timeout.
|
|
826
823
|
*/
|
|
@@ -840,7 +837,7 @@ declare module "dns" {
|
|
|
840
837
|
* An independent resolver for DNS requests.
|
|
841
838
|
*
|
|
842
839
|
* Creating a new resolver uses the default server settings. Setting
|
|
843
|
-
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-
|
|
840
|
+
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnssetserversservers) does not affect
|
|
844
841
|
* other resolvers:
|
|
845
842
|
*
|
|
846
843
|
* ```js
|
|
@@ -874,7 +871,7 @@ declare module "dns" {
|
|
|
874
871
|
* * `resolver.setServers()`
|
|
875
872
|
* @since v8.3.0
|
|
876
873
|
*/
|
|
877
|
-
|
|
874
|
+
class Resolver {
|
|
878
875
|
constructor(options?: ResolverOptions);
|
|
879
876
|
/**
|
|
880
877
|
* Cancel all outstanding DNS queries made by this resolver. The corresponding
|
|
@@ -916,8 +913,10 @@ declare module "dns" {
|
|
|
916
913
|
setLocalAddress(ipv4?: string, ipv6?: string): void;
|
|
917
914
|
setServers: typeof setServers;
|
|
918
915
|
}
|
|
919
|
-
export { dnsPromises as promises };
|
|
920
916
|
}
|
|
921
917
|
declare module "node:dns" {
|
|
922
|
-
export * from "dns";
|
|
918
|
+
export * as promises from "node:dns/promises";
|
|
919
|
+
}
|
|
920
|
+
declare module "dns" {
|
|
921
|
+
export * from "node:dns";
|
|
923
922
|
}
|