rahad-all-downloader 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.cache/nix/binary-cache-v6.sqlite +0 -0
- package/.cache/nix/binary-cache-v6.sqlite-journal +0 -0
- package/.cache/replit/__replit_disk_meta.json +1 -0
- package/.cache/replit/modules/nodejs-20.res +1 -0
- package/.cache/replit/modules/replit.res +1 -0
- package/.cache/replit/modules.stamp +0 -0
- package/.cache/replit/nix/env.json +1 -0
- package/.cache/typescript/5.0/node_modules/.package-lock.json +12 -0
- package/.cache/typescript/5.0/node_modules/types-registry/README.md +2 -0
- package/.cache/typescript/5.0/node_modules/types-registry/index.json +1 -0
- package/.cache/typescript/5.0/node_modules/types-registry/package.json +20 -0
- package/.cache/typescript/5.0/package-lock.json +17 -0
- package/.cache/typescript/5.0/package.json +1 -0
- package/.cache/typescript/5.3/node_modules/.package-lock.json +99 -0
- package/.cache/typescript/5.3/node_modules/@types/node/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/node/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/@types/node/assert.d.ts +996 -0
- package/.cache/typescript/5.3/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/buffer.d.ts +2362 -0
- package/.cache/typescript/5.3/node_modules/@types/node/child_process.d.ts +1540 -0
- package/.cache/typescript/5.3/node_modules/@types/node/cluster.d.ts +432 -0
- package/.cache/typescript/5.3/node_modules/@types/node/console.d.ts +415 -0
- package/.cache/typescript/5.3/node_modules/@types/node/constants.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/@types/node/crypto.d.ts +4456 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dgram.d.ts +586 -0
- package/.cache/typescript/5.3/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dns.d.ts +809 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dom-events.d.ts +122 -0
- package/.cache/typescript/5.3/node_modules/@types/node/domain.d.ts +170 -0
- package/.cache/typescript/5.3/node_modules/@types/node/events.d.ts +879 -0
- package/.cache/typescript/5.3/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/.cache/typescript/5.3/node_modules/@types/node/fs.d.ts +4291 -0
- package/.cache/typescript/5.3/node_modules/@types/node/globals.d.ts +385 -0
- package/.cache/typescript/5.3/node_modules/@types/node/globals.global.d.ts +1 -0
- package/.cache/typescript/5.3/node_modules/@types/node/http.d.ts +1888 -0
- package/.cache/typescript/5.3/node_modules/@types/node/http2.d.ts +2382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/https.d.ts +550 -0
- package/.cache/typescript/5.3/node_modules/@types/node/index.d.ts +88 -0
- package/.cache/typescript/5.3/node_modules/@types/node/inspector.d.ts +2747 -0
- package/.cache/typescript/5.3/node_modules/@types/node/module.d.ts +301 -0
- package/.cache/typescript/5.3/node_modules/@types/node/net.d.ts +949 -0
- package/.cache/typescript/5.3/node_modules/@types/node/os.d.ts +478 -0
- package/.cache/typescript/5.3/node_modules/@types/node/package.json +230 -0
- package/.cache/typescript/5.3/node_modules/@types/node/path.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/perf_hooks.d.ts +639 -0
- package/.cache/typescript/5.3/node_modules/@types/node/process.d.ts +1539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/punycode.d.ts +117 -0
- package/.cache/typescript/5.3/node_modules/@types/node/querystring.d.ts +141 -0
- package/.cache/typescript/5.3/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.3/node_modules/@types/node/readline.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/repl.d.ts +430 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/web.d.ts +350 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream.d.ts +1701 -0
- package/.cache/typescript/5.3/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/@types/node/test.d.ts +1382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/@types/node/timers.d.ts +240 -0
- package/.cache/typescript/5.3/node_modules/@types/node/tls.d.ts +1210 -0
- package/.cache/typescript/5.3/node_modules/@types/node/trace_events.d.ts +182 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/crypto.d.ts +4455 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dgram.d.ts +586 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs.d.ts +4291 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.d.ts +385 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http.d.ts +1888 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/module.d.ts +301 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/perf_hooks.d.ts +639 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/process.d.ts +1539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/web.d.ts +350 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/test.d.ts +1382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/.cache/typescript/5.3/node_modules/@types/node/tty.d.ts +208 -0
- package/.cache/typescript/5.3/node_modules/@types/node/url.d.ts +927 -0
- package/.cache/typescript/5.3/node_modules/@types/node/util.d.ts +2183 -0
- package/.cache/typescript/5.3/node_modules/@types/node/v8.d.ts +635 -0
- package/.cache/typescript/5.3/node_modules/@types/node/vm.d.ts +903 -0
- package/.cache/typescript/5.3/node_modules/@types/node/wasi.d.ts +158 -0
- package/.cache/typescript/5.3/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.3/node_modules/@types/node/zlib.d.ts +517 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/externals.d.ts +32 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/index.d.ts +214 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/package.json +83 -0
- package/.cache/typescript/5.3/node_modules/asynckit/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/asynckit/README.md +233 -0
- package/.cache/typescript/5.3/node_modules/asynckit/bench.js +76 -0
- package/.cache/typescript/5.3/node_modules/asynckit/index.js +6 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/abort.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/async.js +34 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/defer.js +26 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/iterate.js +75 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/state.js +37 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/streamify.js +141 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/terminator.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/package.json +63 -0
- package/.cache/typescript/5.3/node_modules/asynckit/parallel.js +43 -0
- package/.cache/typescript/5.3/node_modules/asynckit/serial.js +17 -0
- package/.cache/typescript/5.3/node_modules/asynckit/serialOrdered.js +75 -0
- package/.cache/typescript/5.3/node_modules/asynckit/stream.js +21 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/License +19 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/Readme.md +138 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/package.json +25 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/yarn.lock +17 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/License +19 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/Makefile +7 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/Readme.md +141 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/package.json +27 -0
- package/.cache/typescript/5.3/node_modules/form-data/License +19 -0
- package/.cache/typescript/5.3/node_modules/form-data/README.md.bak +358 -0
- package/.cache/typescript/5.3/node_modules/form-data/Readme.md +358 -0
- package/.cache/typescript/5.3/node_modules/form-data/index.d.ts +62 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/browser.js +2 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/form_data.js +501 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/populate.js +10 -0
- package/.cache/typescript/5.3/node_modules/form-data/package.json +68 -0
- package/.cache/typescript/5.3/node_modules/mime-db/HISTORY.md +507 -0
- package/.cache/typescript/5.3/node_modules/mime-db/LICENSE +23 -0
- package/.cache/typescript/5.3/node_modules/mime-db/README.md +100 -0
- package/.cache/typescript/5.3/node_modules/mime-db/db.json +8519 -0
- package/.cache/typescript/5.3/node_modules/mime-db/index.js +12 -0
- package/.cache/typescript/5.3/node_modules/mime-db/package.json +60 -0
- package/.cache/typescript/5.3/node_modules/mime-types/HISTORY.md +397 -0
- package/.cache/typescript/5.3/node_modules/mime-types/LICENSE +23 -0
- package/.cache/typescript/5.3/node_modules/mime-types/README.md +113 -0
- package/.cache/typescript/5.3/node_modules/mime-types/index.js +188 -0
- package/.cache/typescript/5.3/node_modules/mime-types/package.json +44 -0
- package/.cache/typescript/5.3/node_modules/types-registry/README.md +2 -0
- package/.cache/typescript/5.3/node_modules/types-registry/index.json +1 -0
- package/.cache/typescript/5.3/node_modules/types-registry/package.json +20 -0
- package/.cache/typescript/5.3/node_modules/undici-types/README.md +6 -0
- package/.cache/typescript/5.3/node_modules/undici-types/agent.d.ts +31 -0
- package/.cache/typescript/5.3/node_modules/undici-types/api.d.ts +43 -0
- package/.cache/typescript/5.3/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/.cache/typescript/5.3/node_modules/undici-types/cache.d.ts +36 -0
- package/.cache/typescript/5.3/node_modules/undici-types/client.d.ts +97 -0
- package/.cache/typescript/5.3/node_modules/undici-types/connector.d.ts +34 -0
- package/.cache/typescript/5.3/node_modules/undici-types/content-type.d.ts +21 -0
- package/.cache/typescript/5.3/node_modules/undici-types/cookies.d.ts +28 -0
- package/.cache/typescript/5.3/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/.cache/typescript/5.3/node_modules/undici-types/errors.d.ts +128 -0
- package/.cache/typescript/5.3/node_modules/undici-types/fetch.d.ts +209 -0
- package/.cache/typescript/5.3/node_modules/undici-types/file.d.ts +39 -0
- package/.cache/typescript/5.3/node_modules/undici-types/filereader.d.ts +54 -0
- package/.cache/typescript/5.3/node_modules/undici-types/formdata.d.ts +108 -0
- package/.cache/typescript/5.3/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/.cache/typescript/5.3/node_modules/undici-types/global-origin.d.ts +7 -0
- package/.cache/typescript/5.3/node_modules/undici-types/handlers.d.ts +9 -0
- package/.cache/typescript/5.3/node_modules/undici-types/header.d.ts +4 -0
- package/.cache/typescript/5.3/node_modules/undici-types/index.d.ts +63 -0
- package/.cache/typescript/5.3/node_modules/undici-types/interceptors.d.ts +5 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-client.d.ts +25 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/.cache/typescript/5.3/node_modules/undici-types/package.json +55 -0
- package/.cache/typescript/5.3/node_modules/undici-types/patch.d.ts +71 -0
- package/.cache/typescript/5.3/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/undici-types/pool.d.ts +28 -0
- package/.cache/typescript/5.3/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/.cache/typescript/5.3/node_modules/undici-types/readable.d.ts +61 -0
- package/.cache/typescript/5.3/node_modules/undici-types/webidl.d.ts +220 -0
- package/.cache/typescript/5.3/node_modules/undici-types/websocket.d.ts +131 -0
- package/.cache/typescript/5.3/package-lock.json +107 -0
- package/.cache/typescript/5.3/package.json +1 -0
- package/.cache/typescript/5.4/node_modules/.package-lock.json +115 -0
- package/.cache/typescript/5.4/node_modules/@types/body-parser/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/body-parser/README.md +15 -0
- package/.cache/typescript/5.4/node_modules/@types/body-parser/index.d.ts +95 -0
- package/.cache/typescript/5.4/node_modules/@types/body-parser/package.json +58 -0
- package/.cache/typescript/5.4/node_modules/@types/connect/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/connect/README.md +15 -0
- package/.cache/typescript/5.4/node_modules/@types/connect/index.d.ts +91 -0
- package/.cache/typescript/5.4/node_modules/@types/connect/package.json +32 -0
- package/.cache/typescript/5.4/node_modules/@types/express/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/express/README.md +15 -0
- package/.cache/typescript/5.4/node_modules/@types/express/index.d.ts +128 -0
- package/.cache/typescript/5.4/node_modules/@types/express/package.json +45 -0
- package/.cache/typescript/5.4/node_modules/@types/express-serve-static-core/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/express-serve-static-core/README.md +15 -0
- package/.cache/typescript/5.4/node_modules/@types/express-serve-static-core/index.d.ts +1295 -0
- package/.cache/typescript/5.4/node_modules/@types/express-serve-static-core/package.json +50 -0
- package/.cache/typescript/5.4/node_modules/@types/http-errors/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/http-errors/README.md +15 -0
- package/.cache/typescript/5.4/node_modules/@types/http-errors/index.d.ts +77 -0
- package/.cache/typescript/5.4/node_modules/@types/http-errors/package.json +30 -0
- package/.cache/typescript/5.4/node_modules/@types/mime/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/mime/Mime.d.ts +10 -0
- package/.cache/typescript/5.4/node_modules/@types/mime/README.md +15 -0
- package/.cache/typescript/5.4/node_modules/@types/mime/index.d.ts +31 -0
- package/.cache/typescript/5.4/node_modules/@types/mime/lite.d.ts +7 -0
- package/.cache/typescript/5.4/node_modules/@types/mime/package.json +30 -0
- package/.cache/typescript/5.4/node_modules/@types/node/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/node/README.md +15 -0
- package/.cache/typescript/5.4/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.4/node_modules/@types/node/assert.d.ts +1040 -0
- package/.cache/typescript/5.4/node_modules/@types/node/async_hooks.d.ts +541 -0
- package/.cache/typescript/5.4/node_modules/@types/node/buffer.d.ts +2363 -0
- package/.cache/typescript/5.4/node_modules/@types/node/child_process.d.ts +1544 -0
- package/.cache/typescript/5.4/node_modules/@types/node/cluster.d.ts +578 -0
- package/.cache/typescript/5.4/node_modules/@types/node/console.d.ts +452 -0
- package/.cache/typescript/5.4/node_modules/@types/node/constants.d.ts +19 -0
- package/.cache/typescript/5.4/node_modules/@types/node/crypto.d.ts +4523 -0
- package/.cache/typescript/5.4/node_modules/@types/node/dgram.d.ts +596 -0
- package/.cache/typescript/5.4/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/.cache/typescript/5.4/node_modules/@types/node/dns/promises.d.ts +474 -0
- package/.cache/typescript/5.4/node_modules/@types/node/dns.d.ts +864 -0
- package/.cache/typescript/5.4/node_modules/@types/node/dom-events.d.ts +124 -0
- package/.cache/typescript/5.4/node_modules/@types/node/domain.d.ts +170 -0
- package/.cache/typescript/5.4/node_modules/@types/node/events.d.ts +909 -0
- package/.cache/typescript/5.4/node_modules/@types/node/fs/promises.d.ts +1245 -0
- package/.cache/typescript/5.4/node_modules/@types/node/fs.d.ts +4317 -0
- package/.cache/typescript/5.4/node_modules/@types/node/globals.d.ts +411 -0
- package/.cache/typescript/5.4/node_modules/@types/node/globals.global.d.ts +1 -0
- package/.cache/typescript/5.4/node_modules/@types/node/http.d.ts +1908 -0
- package/.cache/typescript/5.4/node_modules/@types/node/http2.d.ts +2418 -0
- package/.cache/typescript/5.4/node_modules/@types/node/https.d.ts +550 -0
- package/.cache/typescript/5.4/node_modules/@types/node/index.d.ts +89 -0
- package/.cache/typescript/5.4/node_modules/@types/node/inspector.d.ts +2746 -0
- package/.cache/typescript/5.4/node_modules/@types/node/module.d.ts +315 -0
- package/.cache/typescript/5.4/node_modules/@types/node/net.d.ts +999 -0
- package/.cache/typescript/5.4/node_modules/@types/node/os.d.ts +495 -0
- package/.cache/typescript/5.4/node_modules/@types/node/package.json +217 -0
- package/.cache/typescript/5.4/node_modules/@types/node/path.d.ts +191 -0
- package/.cache/typescript/5.4/node_modules/@types/node/perf_hooks.d.ts +905 -0
- package/.cache/typescript/5.4/node_modules/@types/node/process.d.ts +1754 -0
- package/.cache/typescript/5.4/node_modules/@types/node/punycode.d.ts +117 -0
- package/.cache/typescript/5.4/node_modules/@types/node/querystring.d.ts +153 -0
- package/.cache/typescript/5.4/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.4/node_modules/@types/node/readline.d.ts +540 -0
- package/.cache/typescript/5.4/node_modules/@types/node/repl.d.ts +430 -0
- package/.cache/typescript/5.4/node_modules/@types/node/sea.d.ts +153 -0
- package/.cache/typescript/5.4/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.4/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.4/node_modules/@types/node/stream/web.d.ts +367 -0
- package/.cache/typescript/5.4/node_modules/@types/node/stream.d.ts +1707 -0
- package/.cache/typescript/5.4/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.4/node_modules/@types/node/test.d.ts +1718 -0
- package/.cache/typescript/5.4/node_modules/@types/node/timers/promises.d.ts +97 -0
- package/.cache/typescript/5.4/node_modules/@types/node/timers.d.ts +240 -0
- package/.cache/typescript/5.4/node_modules/@types/node/tls.d.ts +1217 -0
- package/.cache/typescript/5.4/node_modules/@types/node/trace_events.d.ts +197 -0
- package/.cache/typescript/5.4/node_modules/@types/node/tty.d.ts +208 -0
- package/.cache/typescript/5.4/node_modules/@types/node/url.d.ts +952 -0
- package/.cache/typescript/5.4/node_modules/@types/node/util.d.ts +2292 -0
- package/.cache/typescript/5.4/node_modules/@types/node/v8.d.ts +808 -0
- package/.cache/typescript/5.4/node_modules/@types/node/vm.d.ts +924 -0
- package/.cache/typescript/5.4/node_modules/@types/node/wasi.d.ts +181 -0
- package/.cache/typescript/5.4/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.4/node_modules/@types/node/zlib.d.ts +530 -0
- package/.cache/typescript/5.4/node_modules/@types/qs/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/qs/README.md +15 -0
- package/.cache/typescript/5.4/node_modules/@types/qs/index.d.ts +79 -0
- package/.cache/typescript/5.4/node_modules/@types/qs/package.json +65 -0
- package/.cache/typescript/5.4/node_modules/@types/range-parser/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/range-parser/README.md +53 -0
- package/.cache/typescript/5.4/node_modules/@types/range-parser/index.d.ts +34 -0
- package/.cache/typescript/5.4/node_modules/@types/range-parser/package.json +25 -0
- package/.cache/typescript/5.4/node_modules/@types/send/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/send/README.md +15 -0
- package/.cache/typescript/5.4/node_modules/@types/send/index.d.ts +225 -0
- package/.cache/typescript/5.4/node_modules/@types/send/package.json +33 -0
- package/.cache/typescript/5.4/node_modules/@types/serve-static/LICENSE +21 -0
- package/.cache/typescript/5.4/node_modules/@types/serve-static/README.md +15 -0
- package/.cache/typescript/5.4/node_modules/@types/serve-static/index.d.ts +107 -0
- package/.cache/typescript/5.4/node_modules/@types/serve-static/package.json +39 -0
- package/.cache/typescript/5.4/node_modules/types-registry/README.md +2 -0
- package/.cache/typescript/5.4/node_modules/types-registry/index.json +1 -0
- package/.cache/typescript/5.4/node_modules/types-registry/package.json +20 -0
- package/.cache/typescript/5.4/node_modules/undici-types/README.md +6 -0
- package/.cache/typescript/5.4/node_modules/undici-types/agent.d.ts +31 -0
- package/.cache/typescript/5.4/node_modules/undici-types/api.d.ts +43 -0
- package/.cache/typescript/5.4/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/.cache/typescript/5.4/node_modules/undici-types/cache.d.ts +36 -0
- package/.cache/typescript/5.4/node_modules/undici-types/client.d.ts +97 -0
- package/.cache/typescript/5.4/node_modules/undici-types/connector.d.ts +34 -0
- package/.cache/typescript/5.4/node_modules/undici-types/content-type.d.ts +21 -0
- package/.cache/typescript/5.4/node_modules/undici-types/cookies.d.ts +28 -0
- package/.cache/typescript/5.4/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/.cache/typescript/5.4/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/.cache/typescript/5.4/node_modules/undici-types/errors.d.ts +128 -0
- package/.cache/typescript/5.4/node_modules/undici-types/fetch.d.ts +209 -0
- package/.cache/typescript/5.4/node_modules/undici-types/file.d.ts +39 -0
- package/.cache/typescript/5.4/node_modules/undici-types/filereader.d.ts +54 -0
- package/.cache/typescript/5.4/node_modules/undici-types/formdata.d.ts +108 -0
- package/.cache/typescript/5.4/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/.cache/typescript/5.4/node_modules/undici-types/global-origin.d.ts +7 -0
- package/.cache/typescript/5.4/node_modules/undici-types/handlers.d.ts +9 -0
- package/.cache/typescript/5.4/node_modules/undici-types/header.d.ts +4 -0
- package/.cache/typescript/5.4/node_modules/undici-types/index.d.ts +63 -0
- package/.cache/typescript/5.4/node_modules/undici-types/interceptors.d.ts +5 -0
- package/.cache/typescript/5.4/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/.cache/typescript/5.4/node_modules/undici-types/mock-client.d.ts +25 -0
- package/.cache/typescript/5.4/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/.cache/typescript/5.4/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/.cache/typescript/5.4/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/.cache/typescript/5.4/node_modules/undici-types/package.json +55 -0
- package/.cache/typescript/5.4/node_modules/undici-types/patch.d.ts +71 -0
- package/.cache/typescript/5.4/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/.cache/typescript/5.4/node_modules/undici-types/pool.d.ts +28 -0
- package/.cache/typescript/5.4/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/.cache/typescript/5.4/node_modules/undici-types/readable.d.ts +61 -0
- package/.cache/typescript/5.4/node_modules/undici-types/webidl.d.ts +220 -0
- package/.cache/typescript/5.4/node_modules/undici-types/websocket.d.ts +131 -0
- package/.cache/typescript/5.4/package-lock.json +124 -0
- package/.cache/typescript/5.4/package.json +1 -0
- package/.replit +21 -0
- package/.upm/store.json +1 -0
- package/README.md +71 -0
- package/index.js +1 -0
- package/package.json +40 -0
- package/replit.nix +3 -0
@@ -0,0 +1,864 @@
|
|
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](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) for more information.
|
45
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dns.js)
|
46
|
+
*/
|
47
|
+
declare module "dns" {
|
48
|
+
import * as dnsPromises from "node:dns/promises";
|
49
|
+
// Supported getaddrinfo flags.
|
50
|
+
/**
|
51
|
+
* Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are
|
52
|
+
* only returned if the current system has at least one IPv4 address configured.
|
53
|
+
*/
|
54
|
+
export const ADDRCONFIG: number;
|
55
|
+
/**
|
56
|
+
* If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported
|
57
|
+
* on some operating systems (e.g. FreeBSD 10.1).
|
58
|
+
*/
|
59
|
+
export const V4MAPPED: number;
|
60
|
+
/**
|
61
|
+
* If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
|
62
|
+
* well as IPv4 mapped IPv6 addresses.
|
63
|
+
*/
|
64
|
+
export const ALL: number;
|
65
|
+
export interface LookupOptions {
|
66
|
+
/**
|
67
|
+
* The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
|
68
|
+
* as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used
|
69
|
+
* with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned.
|
70
|
+
* @default 0
|
71
|
+
*/
|
72
|
+
family?: number | "IPv4" | "IPv6" | undefined;
|
73
|
+
/**
|
74
|
+
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v20.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
|
75
|
+
* passed by bitwise `OR`ing their values.
|
76
|
+
*/
|
77
|
+
hints?: number | undefined;
|
78
|
+
/**
|
79
|
+
* When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address.
|
80
|
+
* @default false
|
81
|
+
*/
|
82
|
+
all?: boolean | undefined;
|
83
|
+
/**
|
84
|
+
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
|
85
|
+
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
|
86
|
+
* addresses before IPv4 addresses. Default value is configurable using
|
87
|
+
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
|
88
|
+
* @default `verbatim` (addresses are not reordered)
|
89
|
+
*/
|
90
|
+
order?: "ipv4first" | "ipv6first" | "verbatim" | undefined;
|
91
|
+
/**
|
92
|
+
* When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4
|
93
|
+
* addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified,
|
94
|
+
* `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder}
|
95
|
+
* or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
|
96
|
+
* @default true (addresses are not reordered)
|
97
|
+
*/
|
98
|
+
verbatim?: boolean | undefined;
|
99
|
+
}
|
100
|
+
export interface LookupOneOptions extends LookupOptions {
|
101
|
+
all?: false | undefined;
|
102
|
+
}
|
103
|
+
export interface LookupAllOptions extends LookupOptions {
|
104
|
+
all: true;
|
105
|
+
}
|
106
|
+
export interface LookupAddress {
|
107
|
+
/**
|
108
|
+
* A string representation of an IPv4 or IPv6 address.
|
109
|
+
*/
|
110
|
+
address: string;
|
111
|
+
/**
|
112
|
+
* `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a
|
113
|
+
* bug in the name resolution service used by the operating system.
|
114
|
+
*/
|
115
|
+
family: number;
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
|
119
|
+
* AAAA (IPv6) record. All `option` properties are optional. If `options` is an
|
120
|
+
* integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
|
121
|
+
* IPv4 and IPv6 addresses are both returned if found.
|
122
|
+
*
|
123
|
+
* With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the
|
124
|
+
* properties `address` and `family`.
|
125
|
+
*
|
126
|
+
* On error, `err` is an `Error` object, where `err.code` is the error code.
|
127
|
+
* Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
|
128
|
+
* the host name does not exist but also when the lookup fails in other ways
|
129
|
+
* such as no available file descriptors.
|
130
|
+
*
|
131
|
+
* `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
|
132
|
+
* The implementation uses an operating system facility that can associate names
|
133
|
+
* with addresses and vice versa. This implementation can have subtle but
|
134
|
+
* 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-v20.x/api/dns.html#implementation-considerations)
|
136
|
+
* before using `dns.lookup()`.
|
137
|
+
*
|
138
|
+
* Example usage:
|
139
|
+
*
|
140
|
+
* ```js
|
141
|
+
* const dns = require('node:dns');
|
142
|
+
* const options = {
|
143
|
+
* family: 6,
|
144
|
+
* hints: dns.ADDRCONFIG | dns.V4MAPPED,
|
145
|
+
* };
|
146
|
+
* dns.lookup('example.com', options, (err, address, family) =>
|
147
|
+
* console.log('address: %j family: IPv%s', address, family));
|
148
|
+
* // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
|
149
|
+
*
|
150
|
+
* // When options.all is true, the result will be an Array.
|
151
|
+
* options.all = true;
|
152
|
+
* dns.lookup('example.com', options, (err, addresses) =>
|
153
|
+
* console.log('addresses: %j', addresses));
|
154
|
+
* // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
|
155
|
+
* ```
|
156
|
+
*
|
157
|
+
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v20.x/api/util.html#utilpromisifyoriginal) ed
|
158
|
+
* version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
|
159
|
+
* @since v0.1.90
|
160
|
+
*/
|
161
|
+
export function lookup(
|
162
|
+
hostname: string,
|
163
|
+
family: number,
|
164
|
+
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
165
|
+
): void;
|
166
|
+
export function lookup(
|
167
|
+
hostname: string,
|
168
|
+
options: LookupOneOptions,
|
169
|
+
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
170
|
+
): void;
|
171
|
+
export function lookup(
|
172
|
+
hostname: string,
|
173
|
+
options: LookupAllOptions,
|
174
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
|
175
|
+
): void;
|
176
|
+
export function lookup(
|
177
|
+
hostname: string,
|
178
|
+
options: LookupOptions,
|
179
|
+
callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
|
180
|
+
): void;
|
181
|
+
export function lookup(
|
182
|
+
hostname: string,
|
183
|
+
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
184
|
+
): void;
|
185
|
+
export namespace lookup {
|
186
|
+
function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
|
187
|
+
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
|
188
|
+
function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
|
189
|
+
}
|
190
|
+
/**
|
191
|
+
* Resolves the given `address` and `port` into a host name and service using
|
192
|
+
* the operating system's underlying `getnameinfo` implementation.
|
193
|
+
*
|
194
|
+
* If `address` is not a valid IP address, a `TypeError` will be thrown.
|
195
|
+
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
|
196
|
+
*
|
197
|
+
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object,
|
198
|
+
* where `err.code` is the error code.
|
199
|
+
*
|
200
|
+
* ```js
|
201
|
+
* const dns = require('node:dns');
|
202
|
+
* dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
|
203
|
+
* console.log(hostname, service);
|
204
|
+
* // Prints: localhost ssh
|
205
|
+
* });
|
206
|
+
* ```
|
207
|
+
*
|
208
|
+
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v20.x/api/util.html#utilpromisifyoriginal) ed
|
209
|
+
* version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
|
210
|
+
* @since v0.11.14
|
211
|
+
*/
|
212
|
+
export function lookupService(
|
213
|
+
address: string,
|
214
|
+
port: number,
|
215
|
+
callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
|
216
|
+
): void;
|
217
|
+
export namespace lookupService {
|
218
|
+
function __promisify__(
|
219
|
+
address: string,
|
220
|
+
port: number,
|
221
|
+
): Promise<{
|
222
|
+
hostname: string;
|
223
|
+
service: string;
|
224
|
+
}>;
|
225
|
+
}
|
226
|
+
export interface ResolveOptions {
|
227
|
+
ttl: boolean;
|
228
|
+
}
|
229
|
+
export interface ResolveWithTtlOptions extends ResolveOptions {
|
230
|
+
ttl: true;
|
231
|
+
}
|
232
|
+
export interface RecordWithTtl {
|
233
|
+
address: string;
|
234
|
+
ttl: number;
|
235
|
+
}
|
236
|
+
/** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
|
237
|
+
export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
|
238
|
+
export interface AnyARecord extends RecordWithTtl {
|
239
|
+
type: "A";
|
240
|
+
}
|
241
|
+
export interface AnyAaaaRecord extends RecordWithTtl {
|
242
|
+
type: "AAAA";
|
243
|
+
}
|
244
|
+
export interface CaaRecord {
|
245
|
+
critical: number;
|
246
|
+
issue?: string | undefined;
|
247
|
+
issuewild?: string | undefined;
|
248
|
+
iodef?: string | undefined;
|
249
|
+
contactemail?: string | undefined;
|
250
|
+
contactphone?: string | undefined;
|
251
|
+
}
|
252
|
+
export interface MxRecord {
|
253
|
+
priority: number;
|
254
|
+
exchange: string;
|
255
|
+
}
|
256
|
+
export interface AnyMxRecord extends MxRecord {
|
257
|
+
type: "MX";
|
258
|
+
}
|
259
|
+
export interface NaptrRecord {
|
260
|
+
flags: string;
|
261
|
+
service: string;
|
262
|
+
regexp: string;
|
263
|
+
replacement: string;
|
264
|
+
order: number;
|
265
|
+
preference: number;
|
266
|
+
}
|
267
|
+
export interface AnyNaptrRecord extends NaptrRecord {
|
268
|
+
type: "NAPTR";
|
269
|
+
}
|
270
|
+
export interface SoaRecord {
|
271
|
+
nsname: string;
|
272
|
+
hostmaster: string;
|
273
|
+
serial: number;
|
274
|
+
refresh: number;
|
275
|
+
retry: number;
|
276
|
+
expire: number;
|
277
|
+
minttl: number;
|
278
|
+
}
|
279
|
+
export interface AnySoaRecord extends SoaRecord {
|
280
|
+
type: "SOA";
|
281
|
+
}
|
282
|
+
export interface SrvRecord {
|
283
|
+
priority: number;
|
284
|
+
weight: number;
|
285
|
+
port: number;
|
286
|
+
name: string;
|
287
|
+
}
|
288
|
+
export interface AnySrvRecord extends SrvRecord {
|
289
|
+
type: "SRV";
|
290
|
+
}
|
291
|
+
export interface AnyTxtRecord {
|
292
|
+
type: "TXT";
|
293
|
+
entries: string[];
|
294
|
+
}
|
295
|
+
export interface AnyNsRecord {
|
296
|
+
type: "NS";
|
297
|
+
value: string;
|
298
|
+
}
|
299
|
+
export interface AnyPtrRecord {
|
300
|
+
type: "PTR";
|
301
|
+
value: string;
|
302
|
+
}
|
303
|
+
export interface AnyCnameRecord {
|
304
|
+
type: "CNAME";
|
305
|
+
value: string;
|
306
|
+
}
|
307
|
+
export type AnyRecord =
|
308
|
+
| AnyARecord
|
309
|
+
| AnyAaaaRecord
|
310
|
+
| AnyCnameRecord
|
311
|
+
| AnyMxRecord
|
312
|
+
| AnyNaptrRecord
|
313
|
+
| AnyNsRecord
|
314
|
+
| AnyPtrRecord
|
315
|
+
| AnySoaRecord
|
316
|
+
| AnySrvRecord
|
317
|
+
| AnyTxtRecord;
|
318
|
+
/**
|
319
|
+
* Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
|
320
|
+
* of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource
|
321
|
+
* records. The type and structure of individual results varies based on `rrtype`:
|
322
|
+
*
|
323
|
+
* <omitted>
|
324
|
+
*
|
325
|
+
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object,
|
326
|
+
* where `err.code` is one of the `DNS error codes`.
|
327
|
+
* @since v0.1.27
|
328
|
+
* @param hostname Host name to resolve.
|
329
|
+
* @param [rrtype='A'] Resource record type.
|
330
|
+
*/
|
331
|
+
export function resolve(
|
332
|
+
hostname: string,
|
333
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
334
|
+
): void;
|
335
|
+
export function resolve(
|
336
|
+
hostname: string,
|
337
|
+
rrtype: "A",
|
338
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
339
|
+
): void;
|
340
|
+
export function resolve(
|
341
|
+
hostname: string,
|
342
|
+
rrtype: "AAAA",
|
343
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
344
|
+
): void;
|
345
|
+
export function resolve(
|
346
|
+
hostname: string,
|
347
|
+
rrtype: "ANY",
|
348
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
|
349
|
+
): void;
|
350
|
+
export function resolve(
|
351
|
+
hostname: string,
|
352
|
+
rrtype: "CNAME",
|
353
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
354
|
+
): void;
|
355
|
+
export function resolve(
|
356
|
+
hostname: string,
|
357
|
+
rrtype: "MX",
|
358
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
|
359
|
+
): void;
|
360
|
+
export function resolve(
|
361
|
+
hostname: string,
|
362
|
+
rrtype: "NAPTR",
|
363
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
364
|
+
): void;
|
365
|
+
export function resolve(
|
366
|
+
hostname: string,
|
367
|
+
rrtype: "NS",
|
368
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
369
|
+
): void;
|
370
|
+
export function resolve(
|
371
|
+
hostname: string,
|
372
|
+
rrtype: "PTR",
|
373
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
374
|
+
): void;
|
375
|
+
export function resolve(
|
376
|
+
hostname: string,
|
377
|
+
rrtype: "SOA",
|
378
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
|
379
|
+
): void;
|
380
|
+
export function resolve(
|
381
|
+
hostname: string,
|
382
|
+
rrtype: "SRV",
|
383
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
384
|
+
): void;
|
385
|
+
export function resolve(
|
386
|
+
hostname: string,
|
387
|
+
rrtype: "TXT",
|
388
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
|
389
|
+
): void;
|
390
|
+
export function resolve(
|
391
|
+
hostname: string,
|
392
|
+
rrtype: string,
|
393
|
+
callback: (
|
394
|
+
err: NodeJS.ErrnoException | null,
|
395
|
+
addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[],
|
396
|
+
) => void,
|
397
|
+
): void;
|
398
|
+
export namespace resolve {
|
399
|
+
function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
400
|
+
function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
401
|
+
function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
402
|
+
function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
403
|
+
function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
404
|
+
function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
405
|
+
function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
406
|
+
function __promisify__(
|
407
|
+
hostname: string,
|
408
|
+
rrtype: string,
|
409
|
+
): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
|
410
|
+
}
|
411
|
+
/**
|
412
|
+
* Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function
|
413
|
+
* will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
|
414
|
+
* @since v0.1.16
|
415
|
+
* @param hostname Host name to resolve.
|
416
|
+
*/
|
417
|
+
export function resolve4(
|
418
|
+
hostname: string,
|
419
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
420
|
+
): void;
|
421
|
+
export function resolve4(
|
422
|
+
hostname: string,
|
423
|
+
options: ResolveWithTtlOptions,
|
424
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
|
425
|
+
): void;
|
426
|
+
export function resolve4(
|
427
|
+
hostname: string,
|
428
|
+
options: ResolveOptions,
|
429
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
|
430
|
+
): void;
|
431
|
+
export namespace resolve4 {
|
432
|
+
function __promisify__(hostname: string): Promise<string[]>;
|
433
|
+
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
434
|
+
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
435
|
+
}
|
436
|
+
/**
|
437
|
+
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function
|
438
|
+
* will contain an array of IPv6 addresses.
|
439
|
+
* @since v0.1.16
|
440
|
+
* @param hostname Host name to resolve.
|
441
|
+
*/
|
442
|
+
export function resolve6(
|
443
|
+
hostname: string,
|
444
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
445
|
+
): void;
|
446
|
+
export function resolve6(
|
447
|
+
hostname: string,
|
448
|
+
options: ResolveWithTtlOptions,
|
449
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
|
450
|
+
): void;
|
451
|
+
export function resolve6(
|
452
|
+
hostname: string,
|
453
|
+
options: ResolveOptions,
|
454
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
|
455
|
+
): void;
|
456
|
+
export namespace resolve6 {
|
457
|
+
function __promisify__(hostname: string): Promise<string[]>;
|
458
|
+
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
459
|
+
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
460
|
+
}
|
461
|
+
/**
|
462
|
+
* Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function
|
463
|
+
* will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`).
|
464
|
+
* @since v0.3.2
|
465
|
+
*/
|
466
|
+
export function resolveCname(
|
467
|
+
hostname: string,
|
468
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
469
|
+
): void;
|
470
|
+
export namespace resolveCname {
|
471
|
+
function __promisify__(hostname: string): Promise<string[]>;
|
472
|
+
}
|
473
|
+
/**
|
474
|
+
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function
|
475
|
+
* will contain an array of certification authority authorization records
|
476
|
+
* available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
|
477
|
+
* @since v15.0.0, v14.17.0
|
478
|
+
*/
|
479
|
+
export function resolveCaa(
|
480
|
+
hostname: string,
|
481
|
+
callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
|
482
|
+
): void;
|
483
|
+
export namespace resolveCaa {
|
484
|
+
function __promisify__(hostname: string): Promise<CaaRecord[]>;
|
485
|
+
}
|
486
|
+
/**
|
487
|
+
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
|
488
|
+
* contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
|
489
|
+
* @since v0.1.27
|
490
|
+
*/
|
491
|
+
export function resolveMx(
|
492
|
+
hostname: string,
|
493
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
|
494
|
+
): void;
|
495
|
+
export namespace resolveMx {
|
496
|
+
function __promisify__(hostname: string): Promise<MxRecord[]>;
|
497
|
+
}
|
498
|
+
/**
|
499
|
+
* 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
|
500
|
+
* objects with the following properties:
|
501
|
+
*
|
502
|
+
* * `flags`
|
503
|
+
* * `service`
|
504
|
+
* * `regexp`
|
505
|
+
* * `replacement`
|
506
|
+
* * `order`
|
507
|
+
* * `preference`
|
508
|
+
*
|
509
|
+
* ```js
|
510
|
+
* {
|
511
|
+
* flags: 's',
|
512
|
+
* service: 'SIP+D2U',
|
513
|
+
* regexp: '',
|
514
|
+
* replacement: '_sip._udp.example.com',
|
515
|
+
* order: 30,
|
516
|
+
* preference: 100
|
517
|
+
* }
|
518
|
+
* ```
|
519
|
+
* @since v0.9.12
|
520
|
+
*/
|
521
|
+
export function resolveNaptr(
|
522
|
+
hostname: string,
|
523
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
524
|
+
): void;
|
525
|
+
export namespace resolveNaptr {
|
526
|
+
function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
527
|
+
}
|
528
|
+
/**
|
529
|
+
* Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
|
530
|
+
* contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`).
|
531
|
+
* @since v0.1.90
|
532
|
+
*/
|
533
|
+
export function resolveNs(
|
534
|
+
hostname: string,
|
535
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
536
|
+
): void;
|
537
|
+
export namespace resolveNs {
|
538
|
+
function __promisify__(hostname: string): Promise<string[]>;
|
539
|
+
}
|
540
|
+
/**
|
541
|
+
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
|
542
|
+
* be an array of strings containing the reply records.
|
543
|
+
* @since v6.0.0
|
544
|
+
*/
|
545
|
+
export function resolvePtr(
|
546
|
+
hostname: string,
|
547
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
548
|
+
): void;
|
549
|
+
export namespace resolvePtr {
|
550
|
+
function __promisify__(hostname: string): Promise<string[]>;
|
551
|
+
}
|
552
|
+
/**
|
553
|
+
* Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
|
554
|
+
* the `hostname`. The `address` argument passed to the `callback` function will
|
555
|
+
* be an object with the following properties:
|
556
|
+
*
|
557
|
+
* * `nsname`
|
558
|
+
* * `hostmaster`
|
559
|
+
* * `serial`
|
560
|
+
* * `refresh`
|
561
|
+
* * `retry`
|
562
|
+
* * `expire`
|
563
|
+
* * `minttl`
|
564
|
+
*
|
565
|
+
* ```js
|
566
|
+
* {
|
567
|
+
* nsname: 'ns.example.com',
|
568
|
+
* hostmaster: 'root.example.com',
|
569
|
+
* serial: 2013101809,
|
570
|
+
* refresh: 10000,
|
571
|
+
* retry: 2400,
|
572
|
+
* expire: 604800,
|
573
|
+
* minttl: 3600
|
574
|
+
* }
|
575
|
+
* ```
|
576
|
+
* @since v0.11.10
|
577
|
+
*/
|
578
|
+
export function resolveSoa(
|
579
|
+
hostname: string,
|
580
|
+
callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
|
581
|
+
): void;
|
582
|
+
export namespace resolveSoa {
|
583
|
+
function __promisify__(hostname: string): Promise<SoaRecord>;
|
584
|
+
}
|
585
|
+
/**
|
586
|
+
* Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
|
587
|
+
* be an array of objects with the following properties:
|
588
|
+
*
|
589
|
+
* * `priority`
|
590
|
+
* * `weight`
|
591
|
+
* * `port`
|
592
|
+
* * `name`
|
593
|
+
*
|
594
|
+
* ```js
|
595
|
+
* {
|
596
|
+
* priority: 10,
|
597
|
+
* weight: 5,
|
598
|
+
* port: 21223,
|
599
|
+
* name: 'service.example.com'
|
600
|
+
* }
|
601
|
+
* ```
|
602
|
+
* @since v0.1.27
|
603
|
+
*/
|
604
|
+
export function resolveSrv(
|
605
|
+
hostname: string,
|
606
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
607
|
+
): void;
|
608
|
+
export namespace resolveSrv {
|
609
|
+
function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
610
|
+
}
|
611
|
+
/**
|
612
|
+
* Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a
|
613
|
+
* 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
|
614
|
+
* one record. Depending on the use case, these could be either joined together or
|
615
|
+
* treated separately.
|
616
|
+
* @since v0.1.27
|
617
|
+
*/
|
618
|
+
export function resolveTxt(
|
619
|
+
hostname: string,
|
620
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
|
621
|
+
): void;
|
622
|
+
export namespace resolveTxt {
|
623
|
+
function __promisify__(hostname: string): Promise<string[][]>;
|
624
|
+
}
|
625
|
+
/**
|
626
|
+
* Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
|
627
|
+
* The `ret` argument passed to the `callback` function will be an array containing
|
628
|
+
* various types of records. Each object has a property `type` that indicates the
|
629
|
+
* type of the current record. And depending on the `type`, additional properties
|
630
|
+
* will be present on the object:
|
631
|
+
*
|
632
|
+
* <omitted>
|
633
|
+
*
|
634
|
+
* Here is an example of the `ret` object passed to the callback:
|
635
|
+
*
|
636
|
+
* ```js
|
637
|
+
* [ { type: 'A', address: '127.0.0.1', ttl: 299 },
|
638
|
+
* { type: 'CNAME', value: 'example.com' },
|
639
|
+
* { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
|
640
|
+
* { type: 'NS', value: 'ns1.example.com' },
|
641
|
+
* { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
|
642
|
+
* { type: 'SOA',
|
643
|
+
* nsname: 'ns1.example.com',
|
644
|
+
* hostmaster: 'admin.example.com',
|
645
|
+
* serial: 156696742,
|
646
|
+
* refresh: 900,
|
647
|
+
* retry: 900,
|
648
|
+
* expire: 1800,
|
649
|
+
* minttl: 60 } ]
|
650
|
+
* ```
|
651
|
+
*
|
652
|
+
* 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
|
653
|
+
* [RFC 8482](https://tools.ietf.org/html/rfc8482).
|
654
|
+
*/
|
655
|
+
export function resolveAny(
|
656
|
+
hostname: string,
|
657
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
|
658
|
+
): void;
|
659
|
+
export namespace resolveAny {
|
660
|
+
function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
661
|
+
}
|
662
|
+
/**
|
663
|
+
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
|
664
|
+
* array of host names.
|
665
|
+
*
|
666
|
+
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is
|
667
|
+
* one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
|
668
|
+
* @since v0.1.16
|
669
|
+
*/
|
670
|
+
export function reverse(
|
671
|
+
ip: string,
|
672
|
+
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
|
673
|
+
): void;
|
674
|
+
/**
|
675
|
+
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
|
676
|
+
* The value could be:
|
677
|
+
*
|
678
|
+
* * `ipv4first`: for `order` defaulting to `ipv4first`.
|
679
|
+
* * `ipv6first`: for `order` defaulting to `ipv6first`.
|
680
|
+
* * `verbatim`: for `order` defaulting to `verbatim`.
|
681
|
+
* @since v18.17.0
|
682
|
+
*/
|
683
|
+
export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
|
684
|
+
/**
|
685
|
+
* Sets the IP address and port of servers to be used when performing DNS
|
686
|
+
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
|
687
|
+
* addresses. If the port is the IANA default DNS port (53) it can be omitted.
|
688
|
+
*
|
689
|
+
* ```js
|
690
|
+
* dns.setServers([
|
691
|
+
* '4.4.4.4',
|
692
|
+
* '[2001:4860:4860::8888]',
|
693
|
+
* '4.4.4.4:1053',
|
694
|
+
* '[2001:4860:4860::8888]:1053',
|
695
|
+
* ]);
|
696
|
+
* ```
|
697
|
+
*
|
698
|
+
* An error will be thrown if an invalid address is provided.
|
699
|
+
*
|
700
|
+
* The `dns.setServers()` method must not be called while a DNS query is in
|
701
|
+
* progress.
|
702
|
+
*
|
703
|
+
* The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
|
704
|
+
*
|
705
|
+
* This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
|
706
|
+
* 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
|
707
|
+
* subsequent servers provided. Fallback DNS servers will only be used if the
|
708
|
+
* earlier ones time out or result in some other error.
|
709
|
+
* @since v0.11.3
|
710
|
+
* @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses
|
711
|
+
*/
|
712
|
+
export function setServers(servers: readonly string[]): void;
|
713
|
+
/**
|
714
|
+
* Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
|
715
|
+
* that are currently configured for DNS resolution. A string will include a port
|
716
|
+
* section if a custom port is used.
|
717
|
+
*
|
718
|
+
* ```js
|
719
|
+
* [
|
720
|
+
* '4.4.4.4',
|
721
|
+
* '2001:4860:4860::8888',
|
722
|
+
* '4.4.4.4:1053',
|
723
|
+
* '[2001:4860:4860::8888]:1053',
|
724
|
+
* ]
|
725
|
+
* ```
|
726
|
+
* @since v0.11.3
|
727
|
+
*/
|
728
|
+
export function getServers(): string[];
|
729
|
+
/**
|
730
|
+
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
|
731
|
+
* The value could be:
|
732
|
+
*
|
733
|
+
* * `ipv4first`: sets default `order` to `ipv4first`.
|
734
|
+
* * `ipv6first`: sets default `order` to `ipv6first`.
|
735
|
+
* * `verbatim`: sets default `order` to `verbatim`.
|
736
|
+
*
|
737
|
+
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
738
|
+
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). When using
|
739
|
+
* [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
740
|
+
* thread won't affect the default dns orders in workers.
|
741
|
+
* @since v16.4.0, v14.18.0
|
742
|
+
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
|
743
|
+
*/
|
744
|
+
export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
|
745
|
+
// Error codes
|
746
|
+
export const NODATA: "NODATA";
|
747
|
+
export const FORMERR: "FORMERR";
|
748
|
+
export const SERVFAIL: "SERVFAIL";
|
749
|
+
export const NOTFOUND: "NOTFOUND";
|
750
|
+
export const NOTIMP: "NOTIMP";
|
751
|
+
export const REFUSED: "REFUSED";
|
752
|
+
export const BADQUERY: "BADQUERY";
|
753
|
+
export const BADNAME: "BADNAME";
|
754
|
+
export const BADFAMILY: "BADFAMILY";
|
755
|
+
export const BADRESP: "BADRESP";
|
756
|
+
export const CONNREFUSED: "TIMEOUT";
|
757
|
+
export const TIMEOUT: "TIMEOUT";
|
758
|
+
export const EOF: "EOF";
|
759
|
+
export const FILE: "FILE";
|
760
|
+
export const NOMEM: "NOMEM";
|
761
|
+
export const DESTRUCTION: "DESTRUCTION";
|
762
|
+
export const BADSTR: "BADSTR";
|
763
|
+
export const BADFLAGS: "BADFLAGS";
|
764
|
+
export const NONAME: "NONAME";
|
765
|
+
export const BADHINTS: "BADHINTS";
|
766
|
+
export const NOTINITIALIZED: "NOTINITIALIZED";
|
767
|
+
export const LOADIPHLPAPI: "LOADIPHLPAPI";
|
768
|
+
export const ADDRGETNETWORKPARAMS: "ADDRGETNETWORKPARAMS";
|
769
|
+
export const CANCELLED: "CANCELLED";
|
770
|
+
export interface ResolverOptions {
|
771
|
+
/**
|
772
|
+
* Query timeout in milliseconds, or `-1` to use the default timeout.
|
773
|
+
*/
|
774
|
+
timeout?: number | undefined;
|
775
|
+
/**
|
776
|
+
* The number of tries the resolver will try contacting each name server before giving up.
|
777
|
+
* @default 4
|
778
|
+
*/
|
779
|
+
tries?: number;
|
780
|
+
}
|
781
|
+
/**
|
782
|
+
* An independent resolver for DNS requests.
|
783
|
+
*
|
784
|
+
* Creating a new resolver uses the default server settings. Setting
|
785
|
+
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnssetserversservers) does not affect
|
786
|
+
* other resolvers:
|
787
|
+
*
|
788
|
+
* ```js
|
789
|
+
* const { Resolver } = require('node:dns');
|
790
|
+
* const resolver = new Resolver();
|
791
|
+
* resolver.setServers(['4.4.4.4']);
|
792
|
+
*
|
793
|
+
* // This request will use the server at 4.4.4.4, independent of global settings.
|
794
|
+
* resolver.resolve4('example.org', (err, addresses) => {
|
795
|
+
* // ...
|
796
|
+
* });
|
797
|
+
* ```
|
798
|
+
*
|
799
|
+
* The following methods from the `node:dns` module are available:
|
800
|
+
*
|
801
|
+
* * `resolver.getServers()`
|
802
|
+
* * `resolver.resolve()`
|
803
|
+
* * `resolver.resolve4()`
|
804
|
+
* * `resolver.resolve6()`
|
805
|
+
* * `resolver.resolveAny()`
|
806
|
+
* * `resolver.resolveCaa()`
|
807
|
+
* * `resolver.resolveCname()`
|
808
|
+
* * `resolver.resolveMx()`
|
809
|
+
* * `resolver.resolveNaptr()`
|
810
|
+
* * `resolver.resolveNs()`
|
811
|
+
* * `resolver.resolvePtr()`
|
812
|
+
* * `resolver.resolveSoa()`
|
813
|
+
* * `resolver.resolveSrv()`
|
814
|
+
* * `resolver.resolveTxt()`
|
815
|
+
* * `resolver.reverse()`
|
816
|
+
* * `resolver.setServers()`
|
817
|
+
* @since v8.3.0
|
818
|
+
*/
|
819
|
+
export class Resolver {
|
820
|
+
constructor(options?: ResolverOptions);
|
821
|
+
/**
|
822
|
+
* Cancel all outstanding DNS queries made by this resolver. The corresponding
|
823
|
+
* callbacks will be called with an error with code `ECANCELLED`.
|
824
|
+
* @since v8.3.0
|
825
|
+
*/
|
826
|
+
cancel(): void;
|
827
|
+
getServers: typeof getServers;
|
828
|
+
resolve: typeof resolve;
|
829
|
+
resolve4: typeof resolve4;
|
830
|
+
resolve6: typeof resolve6;
|
831
|
+
resolveAny: typeof resolveAny;
|
832
|
+
resolveCaa: typeof resolveCaa;
|
833
|
+
resolveCname: typeof resolveCname;
|
834
|
+
resolveMx: typeof resolveMx;
|
835
|
+
resolveNaptr: typeof resolveNaptr;
|
836
|
+
resolveNs: typeof resolveNs;
|
837
|
+
resolvePtr: typeof resolvePtr;
|
838
|
+
resolveSoa: typeof resolveSoa;
|
839
|
+
resolveSrv: typeof resolveSrv;
|
840
|
+
resolveTxt: typeof resolveTxt;
|
841
|
+
reverse: typeof reverse;
|
842
|
+
/**
|
843
|
+
* The resolver instance will send its requests from the specified IP address.
|
844
|
+
* This allows programs to specify outbound interfaces when used on multi-homed
|
845
|
+
* systems.
|
846
|
+
*
|
847
|
+
* If a v4 or v6 address is not specified, it is set to the default and the
|
848
|
+
* operating system will choose a local address automatically.
|
849
|
+
*
|
850
|
+
* The resolver will use the v4 local address when making requests to IPv4 DNS
|
851
|
+
* servers, and the v6 local address when making requests to IPv6 DNS servers.
|
852
|
+
* The `rrtype` of resolution requests has no impact on the local address used.
|
853
|
+
* @since v15.1.0, v14.17.0
|
854
|
+
* @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
|
855
|
+
* @param [ipv6='::0'] A string representation of an IPv6 address.
|
856
|
+
*/
|
857
|
+
setLocalAddress(ipv4?: string, ipv6?: string): void;
|
858
|
+
setServers: typeof setServers;
|
859
|
+
}
|
860
|
+
export { dnsPromises as promises };
|
861
|
+
}
|
862
|
+
declare module "node:dns" {
|
863
|
+
export * from "dns";
|
864
|
+
}
|