cdk-ecr-deployment 3.0.33 → 3.0.35

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.
Files changed (175) hide show
  1. package/.jsii +2 -2
  2. package/.jsii.tabl.json +1 -1
  3. package/lib/index.js +3 -3
  4. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  5. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +1 -1
  6. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +3 -10
  7. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  8. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +1 -1
  9. package/node_modules/@types/keyv/node_modules/@types/node/package.json +3 -10
  10. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  11. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +1 -1
  12. package/node_modules/@types/responselike/node_modules/@types/node/package.json +3 -10
  13. package/package.json +3 -3
  14. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  15. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  16. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  17. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
  18. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  19. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/events.d.ts +0 -896
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +0 -1889
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +0 -954
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +0 -944
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  68. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  69. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  70. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  71. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
  72. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  73. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  74. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  75. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  76. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  77. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  78. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  79. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  80. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  81. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  82. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  83. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/events.d.ts +0 -896
  84. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  85. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  86. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  87. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  88. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +0 -1889
  89. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  90. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  91. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  92. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  93. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  94. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +0 -954
  95. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  96. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  97. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  98. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  99. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  100. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  101. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  102. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  103. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  104. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  105. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  106. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  107. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  108. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  109. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  110. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  111. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  112. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  113. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  114. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  115. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +0 -944
  116. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  117. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  118. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  119. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  120. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  121. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  122. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  123. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  124. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  125. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
  126. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  127. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  128. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  129. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  130. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  131. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  132. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  133. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  134. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  135. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  136. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  137. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/events.d.ts +0 -896
  138. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  139. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  140. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  141. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  142. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +0 -1889
  143. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  144. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  145. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  146. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  147. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  148. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +0 -954
  149. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  150. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  151. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  152. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  153. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  154. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  155. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  156. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  157. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  158. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  159. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  160. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  161. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  162. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  163. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  164. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  165. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  166. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  167. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  168. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  169. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +0 -944
  170. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  171. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  172. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  173. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  174. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  175. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
@@ -1,809 +0,0 @@
1
- /**
2
- * The `node:dns` module enables name resolution. For example, use it to look up IP
3
- * addresses of host names.
4
- *
5
- * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the
6
- * DNS protocol for lookups. {@link lookup} uses the operating system
7
- * facilities to perform name resolution. It may not need to perform any network
8
- * communication. To perform name resolution the way other applications on the same
9
- * system do, use {@link lookup}.
10
- *
11
- * ```js
12
- * const dns = require('node:dns');
13
- *
14
- * dns.lookup('example.org', (err, address, family) => {
15
- * console.log('address: %j family: IPv%s', address, family);
16
- * });
17
- * // address: "93.184.216.34" family: IPv4
18
- * ```
19
- *
20
- * All other functions in the `node:dns` module connect to an actual DNS server to
21
- * perform name resolution. They will always use the network to perform DNS
22
- * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform
23
- * DNS queries, bypassing other name-resolution facilities.
24
- *
25
- * ```js
26
- * const dns = require('node:dns');
27
- *
28
- * dns.resolve4('archive.org', (err, addresses) => {
29
- * if (err) throw err;
30
- *
31
- * console.log(`addresses: ${JSON.stringify(addresses)}`);
32
- *
33
- * addresses.forEach((a) => {
34
- * dns.reverse(a, (err, hostnames) => {
35
- * if (err) {
36
- * throw err;
37
- * }
38
- * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
39
- * });
40
- * });
41
- * });
42
- * ```
43
- *
44
- * See the `Implementation considerations section` for more information.
45
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dns.js)
46
- */
47
- declare module "dns" {
48
- import * as dnsPromises from "node:dns/promises";
49
- // Supported getaddrinfo flags.
50
- export const ADDRCONFIG: number;
51
- export const V4MAPPED: number;
52
- /**
53
- * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
54
- * well as IPv4 mapped IPv6 addresses.
55
- */
56
- export const ALL: number;
57
- export interface LookupOptions {
58
- family?: number | undefined;
59
- hints?: number | undefined;
60
- all?: boolean | undefined;
61
- /**
62
- * @default true
63
- */
64
- verbatim?: boolean | undefined;
65
- }
66
- export interface LookupOneOptions extends LookupOptions {
67
- all?: false | undefined;
68
- }
69
- export interface LookupAllOptions extends LookupOptions {
70
- all: true;
71
- }
72
- export interface LookupAddress {
73
- address: string;
74
- family: number;
75
- }
76
- /**
77
- * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
78
- * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
79
- * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
80
- * IPv4 and IPv6 addresses are both returned if found.
81
- *
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
83
- * properties `address` and `family`.
84
- *
85
- * On error, `err` is an `Error` object, where `err.code` is the error code.
86
- * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
87
- * the host name does not exist but also when the lookup fails in other ways
88
- * such as no available file descriptors.
89
- *
90
- * `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
91
- * The implementation uses an operating system facility that can associate names
92
- * with addresses and vice versa. This implementation can have subtle but
93
- * important consequences on the behavior of any Node.js program. Please take some
94
- * time to consult the `Implementation considerations section` before using`dns.lookup()`.
95
- *
96
- * Example usage:
97
- *
98
- * ```js
99
- * const dns = require('node:dns');
100
- * const options = {
101
- * family: 6,
102
- * hints: dns.ADDRCONFIG | dns.V4MAPPED,
103
- * };
104
- * dns.lookup('example.com', options, (err, address, family) =>
105
- * console.log('address: %j family: IPv%s', address, family));
106
- * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
107
- *
108
- * // When options.all is true, the result will be an Array.
109
- * options.all = true;
110
- * dns.lookup('example.com', options, (err, addresses) =>
111
- * console.log('addresses: %j', addresses));
112
- * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
113
- * ```
114
- *
115
- * If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties.
116
- * @since v0.1.90
117
- */
118
- export function lookup(
119
- hostname: string,
120
- family: number,
121
- callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
122
- ): void;
123
- export function lookup(
124
- hostname: string,
125
- options: LookupOneOptions,
126
- callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
127
- ): void;
128
- export function lookup(
129
- hostname: string,
130
- options: LookupAllOptions,
131
- callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
132
- ): void;
133
- export function lookup(
134
- hostname: string,
135
- options: LookupOptions,
136
- callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
137
- ): void;
138
- export function lookup(
139
- hostname: string,
140
- callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
141
- ): void;
142
- export namespace lookup {
143
- function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
144
- function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
145
- function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
146
- }
147
- /**
148
- * Resolves the given `address` and `port` into a host name and service using
149
- * the operating system's underlying `getnameinfo` implementation.
150
- *
151
- * 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.
153
- *
154
- * On an error, `err` is an `Error` object, where `err.code` is the error code.
155
- *
156
- * ```js
157
- * const dns = require('node:dns');
158
- * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
159
- * console.log(hostname, service);
160
- * // Prints: localhost ssh
161
- * });
162
- * ```
163
- *
164
- * If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties.
165
- * @since v0.11.14
166
- */
167
- export function lookupService(
168
- address: string,
169
- port: number,
170
- callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
171
- ): void;
172
- export namespace lookupService {
173
- function __promisify__(
174
- address: string,
175
- port: number,
176
- ): Promise<{
177
- hostname: string;
178
- service: string;
179
- }>;
180
- }
181
- export interface ResolveOptions {
182
- ttl: boolean;
183
- }
184
- export interface ResolveWithTtlOptions extends ResolveOptions {
185
- ttl: true;
186
- }
187
- export interface RecordWithTtl {
188
- address: string;
189
- ttl: number;
190
- }
191
- /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
192
- export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
193
- export interface AnyARecord extends RecordWithTtl {
194
- type: "A";
195
- }
196
- export interface AnyAaaaRecord extends RecordWithTtl {
197
- type: "AAAA";
198
- }
199
- export interface CaaRecord {
200
- critical: number;
201
- issue?: string | undefined;
202
- issuewild?: string | undefined;
203
- iodef?: string | undefined;
204
- contactemail?: string | undefined;
205
- contactphone?: string | undefined;
206
- }
207
- export interface MxRecord {
208
- priority: number;
209
- exchange: string;
210
- }
211
- export interface AnyMxRecord extends MxRecord {
212
- type: "MX";
213
- }
214
- export interface NaptrRecord {
215
- flags: string;
216
- service: string;
217
- regexp: string;
218
- replacement: string;
219
- order: number;
220
- preference: number;
221
- }
222
- export interface AnyNaptrRecord extends NaptrRecord {
223
- type: "NAPTR";
224
- }
225
- export interface SoaRecord {
226
- nsname: string;
227
- hostmaster: string;
228
- serial: number;
229
- refresh: number;
230
- retry: number;
231
- expire: number;
232
- minttl: number;
233
- }
234
- export interface AnySoaRecord extends SoaRecord {
235
- type: "SOA";
236
- }
237
- export interface SrvRecord {
238
- priority: number;
239
- weight: number;
240
- port: number;
241
- name: string;
242
- }
243
- export interface AnySrvRecord extends SrvRecord {
244
- type: "SRV";
245
- }
246
- export interface AnyTxtRecord {
247
- type: "TXT";
248
- entries: string[];
249
- }
250
- export interface AnyNsRecord {
251
- type: "NS";
252
- value: string;
253
- }
254
- export interface AnyPtrRecord {
255
- type: "PTR";
256
- value: string;
257
- }
258
- export interface AnyCnameRecord {
259
- type: "CNAME";
260
- value: string;
261
- }
262
- export type AnyRecord =
263
- | AnyARecord
264
- | AnyAaaaRecord
265
- | AnyCnameRecord
266
- | AnyMxRecord
267
- | AnyNaptrRecord
268
- | AnyNsRecord
269
- | AnyPtrRecord
270
- | AnySoaRecord
271
- | AnySrvRecord
272
- | AnyTxtRecord;
273
- /**
274
- * 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
276
- * records. The type and structure of individual results varies based on `rrtype`:
277
- *
278
- * <omitted>
279
- *
280
- * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`.
281
- * @since v0.1.27
282
- * @param hostname Host name to resolve.
283
- * @param [rrtype='A'] Resource record type.
284
- */
285
- export function resolve(
286
- hostname: string,
287
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
288
- ): void;
289
- export function resolve(
290
- 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",
297
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
298
- ): void;
299
- export function resolve(
300
- hostname: string,
301
- rrtype: "ANY",
302
- callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
303
- ): void;
304
- export function resolve(
305
- hostname: string,
306
- rrtype: "CNAME",
307
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
308
- ): void;
309
- export function resolve(
310
- hostname: string,
311
- rrtype: "MX",
312
- callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
313
- ): void;
314
- export function resolve(
315
- hostname: string,
316
- rrtype: "NAPTR",
317
- callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
318
- ): 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
- export function resolve(
330
- hostname: string,
331
- rrtype: "SOA",
332
- callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
333
- ): void;
334
- export function resolve(
335
- hostname: string,
336
- rrtype: "SRV",
337
- callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
338
- ): void;
339
- export function resolve(
340
- hostname: string,
341
- rrtype: "TXT",
342
- callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
343
- ): void;
344
- export function resolve(
345
- hostname: string,
346
- rrtype: string,
347
- callback: (
348
- err: NodeJS.ErrnoException | null,
349
- addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[],
350
- ) => void,
351
- ): void;
352
- export namespace resolve {
353
- function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
354
- function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
355
- function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
356
- function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
357
- function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
358
- function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
359
- function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
360
- function __promisify__(
361
- hostname: string,
362
- rrtype: string,
363
- ): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
364
- }
365
- /**
366
- * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function
367
- * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
368
- * @since v0.1.16
369
- * @param hostname Host name to resolve.
370
- */
371
- export function resolve4(
372
- hostname: string,
373
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
374
- ): void;
375
- export function resolve4(
376
- hostname: string,
377
- options: ResolveWithTtlOptions,
378
- callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
379
- ): void;
380
- export function resolve4(
381
- hostname: string,
382
- options: ResolveOptions,
383
- callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
384
- ): void;
385
- export namespace resolve4 {
386
- function __promisify__(hostname: string): Promise<string[]>;
387
- function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
388
- function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
389
- }
390
- /**
391
- * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
392
- * will contain an array of IPv6 addresses.
393
- * @since v0.1.16
394
- * @param hostname Host name to resolve.
395
- */
396
- export function resolve6(
397
- hostname: string,
398
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
399
- ): void;
400
- export function resolve6(
401
- hostname: string,
402
- options: ResolveWithTtlOptions,
403
- callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
404
- ): void;
405
- export function resolve6(
406
- hostname: string,
407
- options: ResolveOptions,
408
- callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
409
- ): void;
410
- export namespace resolve6 {
411
- function __promisify__(hostname: string): Promise<string[]>;
412
- function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
413
- function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
414
- }
415
- /**
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']`).
418
- * @since v0.3.2
419
- */
420
- export function resolveCname(
421
- hostname: string,
422
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
423
- ): void;
424
- export namespace resolveCname {
425
- function __promisify__(hostname: string): Promise<string[]>;
426
- }
427
- /**
428
- * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function
429
- * will contain an array of certification authority authorization records
430
- * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
431
- * @since v15.0.0, v14.17.0
432
- */
433
- export function resolveCaa(
434
- hostname: string,
435
- callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
436
- ): void;
437
- export namespace resolveCaa {
438
- function __promisify__(hostname: string): Promise<CaaRecord[]>;
439
- }
440
- /**
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'}, ...]`).
443
- * @since v0.1.27
444
- */
445
- export function resolveMx(
446
- hostname: string,
447
- callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
448
- ): void;
449
- export namespace resolveMx {
450
- function __promisify__(hostname: string): Promise<MxRecord[]>;
451
- }
452
- /**
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
454
- * objects with the following properties:
455
- *
456
- * * `flags`
457
- * * `service`
458
- * * `regexp`
459
- * * `replacement`
460
- * * `order`
461
- * * `preference`
462
- *
463
- * ```js
464
- * {
465
- * flags: 's',
466
- * service: 'SIP+D2U',
467
- * regexp: '',
468
- * replacement: '_sip._udp.example.com',
469
- * order: 30,
470
- * preference: 100
471
- * }
472
- * ```
473
- * @since v0.9.12
474
- */
475
- export function resolveNaptr(
476
- hostname: string,
477
- callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
478
- ): void;
479
- export namespace resolveNaptr {
480
- function __promisify__(hostname: string): Promise<NaptrRecord[]>;
481
- }
482
- /**
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']`).
485
- * @since v0.1.90
486
- */
487
- export function resolveNs(
488
- hostname: string,
489
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
490
- ): void;
491
- export namespace resolveNs {
492
- function __promisify__(hostname: string): Promise<string[]>;
493
- }
494
- /**
495
- * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
496
- * be an array of strings containing the reply records.
497
- * @since v6.0.0
498
- */
499
- export function resolvePtr(
500
- hostname: string,
501
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
502
- ): void;
503
- export namespace resolvePtr {
504
- function __promisify__(hostname: string): Promise<string[]>;
505
- }
506
- /**
507
- * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
508
- * the `hostname`. The `address` argument passed to the `callback` function will
509
- * be an object with the following properties:
510
- *
511
- * * `nsname`
512
- * * `hostmaster`
513
- * * `serial`
514
- * * `refresh`
515
- * * `retry`
516
- * * `expire`
517
- * * `minttl`
518
- *
519
- * ```js
520
- * {
521
- * nsname: 'ns.example.com',
522
- * hostmaster: 'root.example.com',
523
- * serial: 2013101809,
524
- * refresh: 10000,
525
- * retry: 2400,
526
- * expire: 604800,
527
- * minttl: 3600
528
- * }
529
- * ```
530
- * @since v0.11.10
531
- */
532
- export function resolveSoa(
533
- hostname: string,
534
- callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
535
- ): void;
536
- export namespace resolveSoa {
537
- function __promisify__(hostname: string): Promise<SoaRecord>;
538
- }
539
- /**
540
- * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
541
- * be an array of objects with the following properties:
542
- *
543
- * * `priority`
544
- * * `weight`
545
- * * `port`
546
- * * `name`
547
- *
548
- * ```js
549
- * {
550
- * priority: 10,
551
- * weight: 5,
552
- * port: 21223,
553
- * name: 'service.example.com'
554
- * }
555
- * ```
556
- * @since v0.1.27
557
- */
558
- export function resolveSrv(
559
- hostname: string,
560
- callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
561
- ): void;
562
- export namespace resolveSrv {
563
- function __promisify__(hostname: string): Promise<SrvRecord[]>;
564
- }
565
- /**
566
- * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. The `records` argument passed to the `callback` function is a
567
- * 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
- * one record. Depending on the use case, these could be either joined together or
569
- * treated separately.
570
- * @since v0.1.27
571
- */
572
- export function resolveTxt(
573
- hostname: string,
574
- callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
575
- ): void;
576
- export namespace resolveTxt {
577
- function __promisify__(hostname: string): Promise<string[][]>;
578
- }
579
- /**
580
- * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
581
- * The `ret` argument passed to the `callback` function will be an array containing
582
- * various types of records. Each object has a property `type` that indicates the
583
- * type of the current record. And depending on the `type`, additional properties
584
- * will be present on the object:
585
- *
586
- * <omitted>
587
- *
588
- * Here is an example of the `ret` object passed to the callback:
589
- *
590
- * ```js
591
- * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
592
- * { type: 'CNAME', value: 'example.com' },
593
- * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
594
- * { type: 'NS', value: 'ns1.example.com' },
595
- * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
596
- * { type: 'SOA',
597
- * nsname: 'ns1.example.com',
598
- * hostmaster: 'admin.example.com',
599
- * serial: 156696742,
600
- * refresh: 900,
601
- * retry: 900,
602
- * expire: 1800,
603
- * minttl: 60 } ]
604
- * ```
605
- *
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 [RFC
607
- * 8482](https://tools.ietf.org/html/rfc8482).
608
- */
609
- export function resolveAny(
610
- hostname: string,
611
- callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
612
- ): void;
613
- export namespace resolveAny {
614
- function __promisify__(hostname: string): Promise<AnyRecord[]>;
615
- }
616
- /**
617
- * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
618
- * array of host names.
619
- *
620
- * On error, `err` is an `Error` object, where `err.code` is
621
- * one of the `DNS error codes`.
622
- * @since v0.1.16
623
- */
624
- export function reverse(
625
- ip: string,
626
- callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
627
- ): void;
628
- /**
629
- * Get the default value for `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
630
- *
631
- * * `ipv4first`: for `verbatim` defaulting to `false`.
632
- * * `verbatim`: for `verbatim` defaulting to `true`.
633
- * @since v20.1.0
634
- */
635
- export function getDefaultResultOrder(): "ipv4first" | "verbatim";
636
- /**
637
- * Sets the IP address and port of servers to be used when performing DNS
638
- * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
639
- * addresses. If the port is the IANA default DNS port (53) it can be omitted.
640
- *
641
- * ```js
642
- * dns.setServers([
643
- * '4.4.4.4',
644
- * '[2001:4860:4860::8888]',
645
- * '4.4.4.4:1053',
646
- * '[2001:4860:4860::8888]:1053',
647
- * ]);
648
- * ```
649
- *
650
- * An error will be thrown if an invalid address is provided.
651
- *
652
- * The `dns.setServers()` method must not be called while a DNS query is in
653
- * progress.
654
- *
655
- * The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
656
- *
657
- * 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
659
- * subsequent servers provided. Fallback DNS servers will only be used if the
660
- * earlier ones time out or result in some other error.
661
- * @since v0.11.3
662
- * @param servers array of `RFC 5952` formatted addresses
663
- */
664
- export function setServers(servers: readonly string[]): void;
665
- /**
666
- * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
667
- * that are currently configured for DNS resolution. A string will include a port
668
- * section if a custom port is used.
669
- *
670
- * ```js
671
- * [
672
- * '4.4.4.4',
673
- * '2001:4860:4860::8888',
674
- * '4.4.4.4:1053',
675
- * '[2001:4860:4860::8888]:1053',
676
- * ]
677
- * ```
678
- * @since v0.11.3
679
- */
680
- export function getServers(): string[];
681
- /**
682
- * Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
683
- *
684
- * * `ipv4first`: sets default `verbatim` `false`.
685
- * * `verbatim`: sets default `verbatim` `true`.
686
- *
687
- * The default is `verbatim` and {@link setDefaultResultOrder} have higher
688
- * priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default
689
- * dns orders in workers.
690
- * @since v16.4.0, v14.18.0
691
- * @param order must be `'ipv4first'` or `'verbatim'`.
692
- */
693
- export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
694
- // Error codes
695
- export const NODATA: string;
696
- export const FORMERR: string;
697
- export const SERVFAIL: string;
698
- export const NOTFOUND: string;
699
- export const NOTIMP: string;
700
- export const REFUSED: string;
701
- export const BADQUERY: string;
702
- export const BADNAME: string;
703
- export const BADFAMILY: string;
704
- export const BADRESP: string;
705
- export const CONNREFUSED: string;
706
- export const TIMEOUT: string;
707
- export const EOF: string;
708
- export const FILE: string;
709
- export const NOMEM: string;
710
- export const DESTRUCTION: string;
711
- export const BADSTR: string;
712
- export const BADFLAGS: string;
713
- export const NONAME: string;
714
- export const BADHINTS: string;
715
- export const NOTINITIALIZED: string;
716
- export const LOADIPHLPAPI: string;
717
- export const ADDRGETNETWORKPARAMS: string;
718
- export const CANCELLED: string;
719
- export interface ResolverOptions {
720
- timeout?: number | undefined;
721
- /**
722
- * @default 4
723
- */
724
- tries?: number;
725
- }
726
- /**
727
- * An independent resolver for DNS requests.
728
- *
729
- * Creating a new resolver uses the default server settings. Setting
730
- * the servers used for a resolver using `resolver.setServers()` does not affect
731
- * other resolvers:
732
- *
733
- * ```js
734
- * const { Resolver } = require('node:dns');
735
- * const resolver = new Resolver();
736
- * resolver.setServers(['4.4.4.4']);
737
- *
738
- * // This request will use the server at 4.4.4.4, independent of global settings.
739
- * resolver.resolve4('example.org', (err, addresses) => {
740
- * // ...
741
- * });
742
- * ```
743
- *
744
- * The following methods from the `node:dns` module are available:
745
- *
746
- * * `resolver.getServers()`
747
- * * `resolver.resolve()`
748
- * * `resolver.resolve4()`
749
- * * `resolver.resolve6()`
750
- * * `resolver.resolveAny()`
751
- * * `resolver.resolveCaa()`
752
- * * `resolver.resolveCname()`
753
- * * `resolver.resolveMx()`
754
- * * `resolver.resolveNaptr()`
755
- * * `resolver.resolveNs()`
756
- * * `resolver.resolvePtr()`
757
- * * `resolver.resolveSoa()`
758
- * * `resolver.resolveSrv()`
759
- * * `resolver.resolveTxt()`
760
- * * `resolver.reverse()`
761
- * * `resolver.setServers()`
762
- * @since v8.3.0
763
- */
764
- export class Resolver {
765
- constructor(options?: ResolverOptions);
766
- /**
767
- * Cancel all outstanding DNS queries made by this resolver. The corresponding
768
- * callbacks will be called with an error with code `ECANCELLED`.
769
- * @since v8.3.0
770
- */
771
- cancel(): void;
772
- getServers: typeof getServers;
773
- resolve: typeof resolve;
774
- resolve4: typeof resolve4;
775
- resolve6: typeof resolve6;
776
- resolveAny: typeof resolveAny;
777
- resolveCaa: typeof resolveCaa;
778
- resolveCname: typeof resolveCname;
779
- resolveMx: typeof resolveMx;
780
- resolveNaptr: typeof resolveNaptr;
781
- resolveNs: typeof resolveNs;
782
- resolvePtr: typeof resolvePtr;
783
- resolveSoa: typeof resolveSoa;
784
- resolveSrv: typeof resolveSrv;
785
- resolveTxt: typeof resolveTxt;
786
- reverse: typeof reverse;
787
- /**
788
- * The resolver instance will send its requests from the specified IP address.
789
- * This allows programs to specify outbound interfaces when used on multi-homed
790
- * systems.
791
- *
792
- * If a v4 or v6 address is not specified, it is set to the default and the
793
- * operating system will choose a local address automatically.
794
- *
795
- * The resolver will use the v4 local address when making requests to IPv4 DNS
796
- * servers, and the v6 local address when making requests to IPv6 DNS servers.
797
- * The `rrtype` of resolution requests has no impact on the local address used.
798
- * @since v15.1.0, v14.17.0
799
- * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
800
- * @param [ipv6='::0'] A string representation of an IPv6 address.
801
- */
802
- setLocalAddress(ipv4?: string, ipv6?: string): void;
803
- setServers: typeof setServers;
804
- }
805
- export { dnsPromises as promises };
806
- }
807
- declare module "node:dns" {
808
- export * from "dns";
809
- }