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