@rio-cloud/cdk-v2-constructs 8.2.0 → 8.2.1-alpha.0
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `dns.promises` API provides an alternative set of asynchronous DNS methods
|
|
3
3
|
* that return `Promise` objects rather than using callbacks. The API is accessible
|
|
4
|
-
* via `
|
|
4
|
+
* via `import { promises as dnsPromises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`.
|
|
5
5
|
* @since v10.6.0
|
|
6
6
|
*/
|
|
7
7
|
declare module "dns/promises" {
|
|
@@ -20,6 +20,7 @@ declare module "dns/promises" {
|
|
|
20
20
|
ResolveWithTtlOptions,
|
|
21
21
|
SoaRecord,
|
|
22
22
|
SrvRecord,
|
|
23
|
+
TlsaRecord,
|
|
23
24
|
} from "node:dns";
|
|
24
25
|
/**
|
|
25
26
|
* Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
|
|
@@ -43,24 +44,24 @@ declare module "dns/promises" {
|
|
|
43
44
|
* integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
|
|
44
45
|
* and IPv6 addresses are both returned if found.
|
|
45
46
|
*
|
|
46
|
-
* With the `all` option set to `true`, the `Promise` is resolved with `addresses`being an array of objects with the properties `address` and `family`.
|
|
47
|
+
* With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`.
|
|
47
48
|
*
|
|
48
|
-
* On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
|
|
49
|
+
* On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
|
|
49
50
|
* Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
|
|
50
51
|
* the host name does not exist but also when the lookup fails in other ways
|
|
51
52
|
* such as no available file descriptors.
|
|
52
53
|
*
|
|
53
|
-
* `dnsPromises.lookup()` does not necessarily have anything to do with the DNS
|
|
54
|
+
* [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS
|
|
54
55
|
* protocol. The implementation uses an operating system facility that can
|
|
55
56
|
* associate names with addresses and vice versa. This implementation can have
|
|
56
57
|
* subtle but important consequences on the behavior of any Node.js program. Please
|
|
57
|
-
* take some time to consult the
|
|
58
|
+
* take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before
|
|
58
59
|
* using `dnsPromises.lookup()`.
|
|
59
60
|
*
|
|
60
61
|
* Example usage:
|
|
61
62
|
*
|
|
62
63
|
* ```js
|
|
63
|
-
*
|
|
64
|
+
* import dns from 'node:dns';
|
|
64
65
|
* const dnsPromises = dns.promises;
|
|
65
66
|
* const options = {
|
|
66
67
|
* family: 6,
|
|
@@ -91,12 +92,12 @@ declare module "dns/promises" {
|
|
|
91
92
|
* the operating system's underlying `getnameinfo` implementation.
|
|
92
93
|
*
|
|
93
94
|
* If `address` is not a valid IP address, a `TypeError` will be thrown.
|
|
94
|
-
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
|
|
95
|
+
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
|
|
95
96
|
*
|
|
96
|
-
* On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
|
|
97
|
+
* On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
|
|
97
98
|
*
|
|
98
99
|
* ```js
|
|
99
|
-
*
|
|
100
|
+
* import dnsPromises from 'node:dns';
|
|
100
101
|
* dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
|
|
101
102
|
* console.log(result.hostname, result.service);
|
|
102
103
|
* // Prints: localhost ssh
|
|
@@ -119,30 +120,35 @@ declare module "dns/promises" {
|
|
|
119
120
|
*
|
|
120
121
|
* <omitted>
|
|
121
122
|
*
|
|
122
|
-
* On error, the `Promise` is rejected with an `Error` object, where `err.code`
|
|
123
|
+
* On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
|
|
124
|
+
* is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
|
|
123
125
|
* @since v10.6.0
|
|
124
126
|
* @param hostname Host name to resolve.
|
|
125
127
|
* @param [rrtype='A'] Resource record type.
|
|
126
128
|
*/
|
|
127
129
|
function resolve(hostname: string): Promise<string[]>;
|
|
128
|
-
function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
|
|
129
|
-
function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
|
|
130
|
+
function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
|
130
131
|
function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
131
132
|
function resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
|
|
132
|
-
function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
|
|
133
133
|
function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
|
134
134
|
function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
|
135
|
-
function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
|
|
136
|
-
function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
|
|
137
135
|
function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
|
138
136
|
function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
|
137
|
+
function resolve(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
|
|
139
138
|
function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
|
140
|
-
function resolve(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
function resolve(hostname: string, rrtype: string): Promise<
|
|
140
|
+
| string[]
|
|
141
|
+
| CaaRecord[]
|
|
142
|
+
| MxRecord[]
|
|
143
|
+
| NaptrRecord[]
|
|
144
|
+
| SoaRecord
|
|
145
|
+
| SrvRecord[]
|
|
146
|
+
| TlsaRecord[]
|
|
147
|
+
| string[][]
|
|
148
|
+
| AnyRecord[]
|
|
149
|
+
>;
|
|
144
150
|
/**
|
|
145
|
-
* Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv4
|
|
151
|
+
* Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4
|
|
146
152
|
* addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
|
|
147
153
|
* @since v10.6.0
|
|
148
154
|
* @param hostname Host name to resolve.
|
|
@@ -151,7 +157,7 @@ declare module "dns/promises" {
|
|
|
151
157
|
function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
|
152
158
|
function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
153
159
|
/**
|
|
154
|
-
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv6
|
|
160
|
+
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6
|
|
155
161
|
* addresses.
|
|
156
162
|
* @since v10.6.0
|
|
157
163
|
* @param hostname Host name to resolve.
|
|
@@ -191,7 +197,7 @@ declare module "dns/promises" {
|
|
|
191
197
|
/**
|
|
192
198
|
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
|
|
193
199
|
* the `Promise` is resolved with an array of objects containing available
|
|
194
|
-
* certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
|
|
200
|
+
* certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
|
|
195
201
|
* @since v15.0.0, v14.17.0
|
|
196
202
|
*/
|
|
197
203
|
function resolveCaa(hostname: string): Promise<CaaRecord[]>;
|
|
@@ -203,13 +209,13 @@ declare module "dns/promises" {
|
|
|
203
209
|
*/
|
|
204
210
|
function resolveCname(hostname: string): Promise<string[]>;
|
|
205
211
|
/**
|
|
206
|
-
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects
|
|
212
|
+
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects
|
|
207
213
|
* containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
|
|
208
214
|
* @since v10.6.0
|
|
209
215
|
*/
|
|
210
216
|
function resolveMx(hostname: string): Promise<MxRecord[]>;
|
|
211
217
|
/**
|
|
212
|
-
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array
|
|
218
|
+
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array
|
|
213
219
|
* of objects with the following properties:
|
|
214
220
|
*
|
|
215
221
|
* * `flags`
|
|
@@ -233,13 +239,13 @@ declare module "dns/promises" {
|
|
|
233
239
|
*/
|
|
234
240
|
function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
|
|
235
241
|
/**
|
|
236
|
-
* Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. On success, the `Promise` is resolved with an array of name server
|
|
242
|
+
* Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server
|
|
237
243
|
* records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
|
|
238
244
|
* @since v10.6.0
|
|
239
245
|
*/
|
|
240
246
|
function resolveNs(hostname: string): Promise<string[]>;
|
|
241
247
|
/**
|
|
242
|
-
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. On success, the `Promise` is resolved with an array of strings
|
|
248
|
+
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings
|
|
243
249
|
* containing the reply records.
|
|
244
250
|
* @since v10.6.0
|
|
245
251
|
*/
|
|
@@ -272,7 +278,7 @@ declare module "dns/promises" {
|
|
|
272
278
|
*/
|
|
273
279
|
function resolveSoa(hostname: string): Promise<SoaRecord>;
|
|
274
280
|
/**
|
|
275
|
-
* Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects with
|
|
281
|
+
* Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with
|
|
276
282
|
* the following properties:
|
|
277
283
|
*
|
|
278
284
|
* * `priority`
|
|
@@ -292,7 +298,28 @@ declare module "dns/promises" {
|
|
|
292
298
|
*/
|
|
293
299
|
function resolveSrv(hostname: string): Promise<SrvRecord[]>;
|
|
294
300
|
/**
|
|
295
|
-
* Uses the DNS protocol to resolve
|
|
301
|
+
* Uses the DNS protocol to resolve certificate associations (`TLSA` records) for
|
|
302
|
+
* the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions
|
|
303
|
+
* with these properties:
|
|
304
|
+
*
|
|
305
|
+
* * `certUsage`
|
|
306
|
+
* * `selector`
|
|
307
|
+
* * `match`
|
|
308
|
+
* * `data`
|
|
309
|
+
*
|
|
310
|
+
* ```js
|
|
311
|
+
* {
|
|
312
|
+
* certUsage: 3,
|
|
313
|
+
* selector: 1,
|
|
314
|
+
* match: 1,
|
|
315
|
+
* data: [ArrayBuffer]
|
|
316
|
+
* }
|
|
317
|
+
* ```
|
|
318
|
+
* @since v23.9.0, v22.15.0
|
|
319
|
+
*/
|
|
320
|
+
function resolveTlsa(hostname: string): Promise<TlsaRecord[]>;
|
|
321
|
+
/**
|
|
322
|
+
* Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array
|
|
296
323
|
* of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
|
|
297
324
|
* one record. Depending on the use case, these could be either joined together or
|
|
298
325
|
* treated separately.
|
|
@@ -303,12 +330,14 @@ declare module "dns/promises" {
|
|
|
303
330
|
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
|
|
304
331
|
* array of host names.
|
|
305
332
|
*
|
|
306
|
-
* On error, the `Promise` is rejected with an `Error` object, where `err.code`
|
|
333
|
+
* On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
|
|
334
|
+
* is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
|
|
307
335
|
* @since v10.6.0
|
|
308
336
|
*/
|
|
309
337
|
function reverse(ip: string): Promise<string[]>;
|
|
310
338
|
/**
|
|
311
|
-
* Get the default value for `verbatim` in {@link lookup} and
|
|
339
|
+
* Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
340
|
+
* The value could be:
|
|
312
341
|
*
|
|
313
342
|
* * `ipv4first`: for `verbatim` defaulting to `false`.
|
|
314
343
|
* * `verbatim`: for `verbatim` defaulting to `true`.
|
|
@@ -335,7 +364,7 @@ declare module "dns/promises" {
|
|
|
335
364
|
* progress.
|
|
336
365
|
*
|
|
337
366
|
* This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
|
|
338
|
-
* 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
|
|
367
|
+
* 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
|
|
339
368
|
* subsequent servers provided. Fallback DNS servers will only be used if the
|
|
340
369
|
* earlier ones time out or result in some other error.
|
|
341
370
|
* @since v10.6.0
|
|
@@ -343,28 +372,56 @@ declare module "dns/promises" {
|
|
|
343
372
|
*/
|
|
344
373
|
function setServers(servers: readonly string[]): void;
|
|
345
374
|
/**
|
|
346
|
-
* Set the default value of `
|
|
375
|
+
* Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be:
|
|
347
376
|
*
|
|
348
|
-
* * `ipv4first`: sets default `
|
|
349
|
-
* * `
|
|
377
|
+
* * `ipv4first`: sets default `order` to `ipv4first`.
|
|
378
|
+
* * `ipv6first`: sets default `order` to `ipv6first`.
|
|
379
|
+
* * `verbatim`: sets default `order` to `verbatim`.
|
|
350
380
|
*
|
|
351
|
-
* The default is `verbatim` and
|
|
352
|
-
* higher priority than `--dns-result-order
|
|
353
|
-
*
|
|
381
|
+
* The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
|
|
382
|
+
* have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
|
|
383
|
+
* When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
|
|
384
|
+
* from the main thread won't affect the default dns orders in workers.
|
|
354
385
|
* @since v16.4.0, v14.18.0
|
|
355
|
-
* @param order must be `'ipv4first'` or `'verbatim'`.
|
|
386
|
+
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
|
|
356
387
|
*/
|
|
357
|
-
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
|
|
388
|
+
function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
|
|
389
|
+
// Error codes
|
|
390
|
+
const NODATA: "ENODATA";
|
|
391
|
+
const FORMERR: "EFORMERR";
|
|
392
|
+
const SERVFAIL: "ESERVFAIL";
|
|
393
|
+
const NOTFOUND: "ENOTFOUND";
|
|
394
|
+
const NOTIMP: "ENOTIMP";
|
|
395
|
+
const REFUSED: "EREFUSED";
|
|
396
|
+
const BADQUERY: "EBADQUERY";
|
|
397
|
+
const BADNAME: "EBADNAME";
|
|
398
|
+
const BADFAMILY: "EBADFAMILY";
|
|
399
|
+
const BADRESP: "EBADRESP";
|
|
400
|
+
const CONNREFUSED: "ECONNREFUSED";
|
|
401
|
+
const TIMEOUT: "ETIMEOUT";
|
|
402
|
+
const EOF: "EOF";
|
|
403
|
+
const FILE: "EFILE";
|
|
404
|
+
const NOMEM: "ENOMEM";
|
|
405
|
+
const DESTRUCTION: "EDESTRUCTION";
|
|
406
|
+
const BADSTR: "EBADSTR";
|
|
407
|
+
const BADFLAGS: "EBADFLAGS";
|
|
408
|
+
const NONAME: "ENONAME";
|
|
409
|
+
const BADHINTS: "EBADHINTS";
|
|
410
|
+
const NOTINITIALIZED: "ENOTINITIALIZED";
|
|
411
|
+
const LOADIPHLPAPI: "ELOADIPHLPAPI";
|
|
412
|
+
const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
|
|
413
|
+
const CANCELLED: "ECANCELLED";
|
|
414
|
+
|
|
358
415
|
/**
|
|
359
416
|
* An independent resolver for DNS requests.
|
|
360
417
|
*
|
|
361
418
|
* Creating a new resolver uses the default server settings. Setting
|
|
362
|
-
* the servers used for a resolver using `resolver.setServers()` does not affect
|
|
419
|
+
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect
|
|
363
420
|
* other resolvers:
|
|
364
421
|
*
|
|
365
422
|
* ```js
|
|
366
|
-
*
|
|
367
|
-
* const resolver = new Resolver();
|
|
423
|
+
* import { promises } from 'node:dns';
|
|
424
|
+
* const resolver = new promises.Resolver();
|
|
368
425
|
* resolver.setServers(['4.4.4.4']);
|
|
369
426
|
*
|
|
370
427
|
* // This request will use the server at 4.4.4.4, independent of global settings.
|
|
@@ -400,6 +457,11 @@ declare module "dns/promises" {
|
|
|
400
457
|
*/
|
|
401
458
|
class Resolver {
|
|
402
459
|
constructor(options?: ResolverOptions);
|
|
460
|
+
/**
|
|
461
|
+
* Cancel all outstanding DNS queries made by this resolver. The corresponding
|
|
462
|
+
* callbacks will be called with an error with code `ECANCELLED`.
|
|
463
|
+
* @since v8.3.0
|
|
464
|
+
*/
|
|
403
465
|
cancel(): void;
|
|
404
466
|
getServers: typeof getServers;
|
|
405
467
|
resolve: typeof resolve;
|
|
@@ -414,8 +476,24 @@ declare module "dns/promises" {
|
|
|
414
476
|
resolvePtr: typeof resolvePtr;
|
|
415
477
|
resolveSoa: typeof resolveSoa;
|
|
416
478
|
resolveSrv: typeof resolveSrv;
|
|
479
|
+
resolveTlsa: typeof resolveTlsa;
|
|
417
480
|
resolveTxt: typeof resolveTxt;
|
|
418
481
|
reverse: typeof reverse;
|
|
482
|
+
/**
|
|
483
|
+
* The resolver instance will send its requests from the specified IP address.
|
|
484
|
+
* This allows programs to specify outbound interfaces when used on multi-homed
|
|
485
|
+
* systems.
|
|
486
|
+
*
|
|
487
|
+
* If a v4 or v6 address is not specified, it is set to the default and the
|
|
488
|
+
* operating system will choose a local address automatically.
|
|
489
|
+
*
|
|
490
|
+
* The resolver will use the v4 local address when making requests to IPv4 DNS
|
|
491
|
+
* servers, and the v6 local address when making requests to IPv6 DNS servers.
|
|
492
|
+
* The `rrtype` of resolution requests has no impact on the local address used.
|
|
493
|
+
* @since v15.1.0, v14.17.0
|
|
494
|
+
* @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
|
|
495
|
+
* @param [ipv6='::0'] A string representation of an IPv6 address.
|
|
496
|
+
*/
|
|
419
497
|
setLocalAddress(ipv4?: string, ipv6?: string): void;
|
|
420
498
|
setServers: typeof setServers;
|
|
421
499
|
}
|