rahad-media-downloader 2.1.12 → 2.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. package/.cache/replit/modules/nodejs-20.res +1 -0
  2. package/.cache/replit/modules/replit.res +1 -0
  3. package/.cache/typescript/5.4/node_modules/.package-lock.json +185 -0
  4. package/.cache/typescript/5.4/node_modules/@types/caseless/LICENSE +21 -0
  5. package/.cache/typescript/5.4/node_modules/@types/caseless/README.md +48 -0
  6. package/.cache/typescript/5.4/node_modules/@types/caseless/index.d.ts +29 -0
  7. package/.cache/typescript/5.4/node_modules/@types/caseless/package.json +35 -0
  8. package/.cache/typescript/5.4/node_modules/@types/domhandler/LICENSE +21 -0
  9. package/.cache/typescript/5.4/node_modules/@types/domhandler/README.md +92 -0
  10. package/.cache/typescript/5.4/node_modules/@types/domhandler/index.d.ts +73 -0
  11. package/.cache/typescript/5.4/node_modules/@types/domhandler/package.json +25 -0
  12. package/.cache/typescript/5.4/node_modules/@types/domutils/LICENSE +21 -0
  13. package/.cache/typescript/5.4/node_modules/@types/domutils/README.md +15 -0
  14. package/.cache/typescript/5.4/node_modules/@types/domutils/index.d.ts +124 -0
  15. package/.cache/typescript/5.4/node_modules/@types/domutils/package.json +27 -0
  16. package/.cache/typescript/5.4/node_modules/@types/htmlparser2/LICENSE +21 -0
  17. package/.cache/typescript/5.4/node_modules/@types/htmlparser2/README.md +15 -0
  18. package/.cache/typescript/5.4/node_modules/@types/htmlparser2/index.d.ts +120 -0
  19. package/.cache/typescript/5.4/node_modules/@types/htmlparser2/package.json +45 -0
  20. package/.cache/typescript/5.4/node_modules/@types/node/LICENSE +21 -0
  21. package/.cache/typescript/5.4/node_modules/@types/node/README.md +15 -0
  22. package/.cache/typescript/5.4/node_modules/@types/node/assert/strict.d.ts +8 -0
  23. package/.cache/typescript/5.4/node_modules/@types/node/assert.d.ts +1040 -0
  24. package/.cache/typescript/5.4/node_modules/@types/node/async_hooks.d.ts +541 -0
  25. package/.cache/typescript/5.4/node_modules/@types/node/buffer.d.ts +2363 -0
  26. package/.cache/typescript/5.4/node_modules/@types/node/child_process.d.ts +1542 -0
  27. package/.cache/typescript/5.4/node_modules/@types/node/cluster.d.ts +578 -0
  28. package/.cache/typescript/5.4/node_modules/@types/node/console.d.ts +452 -0
  29. package/.cache/typescript/5.4/node_modules/@types/node/constants.d.ts +19 -0
  30. package/.cache/typescript/5.4/node_modules/@types/node/crypto.d.ts +4522 -0
  31. package/.cache/typescript/5.4/node_modules/@types/node/dgram.d.ts +596 -0
  32. package/.cache/typescript/5.4/node_modules/@types/node/diagnostics_channel.d.ts +545 -0
  33. package/.cache/typescript/5.4/node_modules/@types/node/dns/promises.d.ts +473 -0
  34. package/.cache/typescript/5.4/node_modules/@types/node/dns.d.ts +853 -0
  35. package/.cache/typescript/5.4/node_modules/@types/node/dom-events.d.ts +124 -0
  36. package/.cache/typescript/5.4/node_modules/@types/node/domain.d.ts +170 -0
  37. package/.cache/typescript/5.4/node_modules/@types/node/events.d.ts +884 -0
  38. package/.cache/typescript/5.4/node_modules/@types/node/fs/promises.d.ts +1245 -0
  39. package/.cache/typescript/5.4/node_modules/@types/node/fs.d.ts +4317 -0
  40. package/.cache/typescript/5.4/node_modules/@types/node/globals.d.ts +411 -0
  41. package/.cache/typescript/5.4/node_modules/@types/node/globals.global.d.ts +1 -0
  42. package/.cache/typescript/5.4/node_modules/@types/node/http.d.ts +1889 -0
  43. package/.cache/typescript/5.4/node_modules/@types/node/http2.d.ts +2418 -0
  44. package/.cache/typescript/5.4/node_modules/@types/node/https.d.ts +550 -0
  45. package/.cache/typescript/5.4/node_modules/@types/node/index.d.ts +89 -0
  46. package/.cache/typescript/5.4/node_modules/@types/node/inspector.d.ts +2746 -0
  47. package/.cache/typescript/5.4/node_modules/@types/node/module.d.ts +315 -0
  48. package/.cache/typescript/5.4/node_modules/@types/node/net.d.ts +996 -0
  49. package/.cache/typescript/5.4/node_modules/@types/node/os.d.ts +495 -0
  50. package/.cache/typescript/5.4/node_modules/@types/node/package.json +217 -0
  51. package/.cache/typescript/5.4/node_modules/@types/node/path.d.ts +191 -0
  52. package/.cache/typescript/5.4/node_modules/@types/node/perf_hooks.d.ts +645 -0
  53. package/.cache/typescript/5.4/node_modules/@types/node/process.d.ts +1747 -0
  54. package/.cache/typescript/5.4/node_modules/@types/node/punycode.d.ts +117 -0
  55. package/.cache/typescript/5.4/node_modules/@types/node/querystring.d.ts +153 -0
  56. package/.cache/typescript/5.4/node_modules/@types/node/readline/promises.d.ts +150 -0
  57. package/.cache/typescript/5.4/node_modules/@types/node/readline.d.ts +540 -0
  58. package/.cache/typescript/5.4/node_modules/@types/node/repl.d.ts +430 -0
  59. package/.cache/typescript/5.4/node_modules/@types/node/sea.d.ts +153 -0
  60. package/.cache/typescript/5.4/node_modules/@types/node/stream/consumers.d.ts +12 -0
  61. package/.cache/typescript/5.4/node_modules/@types/node/stream/promises.d.ts +83 -0
  62. package/.cache/typescript/5.4/node_modules/@types/node/stream/web.d.ts +367 -0
  63. package/.cache/typescript/5.4/node_modules/@types/node/stream.d.ts +1707 -0
  64. package/.cache/typescript/5.4/node_modules/@types/node/string_decoder.d.ts +67 -0
  65. package/.cache/typescript/5.4/node_modules/@types/node/test.d.ts +1470 -0
  66. package/.cache/typescript/5.4/node_modules/@types/node/timers/promises.d.ts +97 -0
  67. package/.cache/typescript/5.4/node_modules/@types/node/timers.d.ts +240 -0
  68. package/.cache/typescript/5.4/node_modules/@types/node/tls.d.ts +1217 -0
  69. package/.cache/typescript/5.4/node_modules/@types/node/trace_events.d.ts +197 -0
  70. package/.cache/typescript/5.4/node_modules/@types/node/tty.d.ts +208 -0
  71. package/.cache/typescript/5.4/node_modules/@types/node/url.d.ts +944 -0
  72. package/.cache/typescript/5.4/node_modules/@types/node/util.d.ts +2276 -0
  73. package/.cache/typescript/5.4/node_modules/@types/node/v8.d.ts +764 -0
  74. package/.cache/typescript/5.4/node_modules/@types/node/vm.d.ts +921 -0
  75. package/.cache/typescript/5.4/node_modules/@types/node/wasi.d.ts +181 -0
  76. package/.cache/typescript/5.4/node_modules/@types/node/worker_threads.d.ts +691 -0
  77. package/.cache/typescript/5.4/node_modules/@types/node/zlib.d.ts +530 -0
  78. package/.cache/typescript/5.4/node_modules/@types/node-fetch/LICENSE +21 -0
  79. package/.cache/typescript/5.4/node_modules/@types/node-fetch/README.md +15 -0
  80. package/.cache/typescript/5.4/node_modules/@types/node-fetch/externals.d.ts +32 -0
  81. package/.cache/typescript/5.4/node_modules/@types/node-fetch/index.d.ts +238 -0
  82. package/.cache/typescript/5.4/node_modules/@types/node-fetch/package.json +83 -0
  83. package/.cache/typescript/5.4/node_modules/@types/qs/LICENSE +21 -0
  84. package/.cache/typescript/5.4/node_modules/@types/qs/README.md +15 -0
  85. package/.cache/typescript/5.4/node_modules/@types/qs/index.d.ts +79 -0
  86. package/.cache/typescript/5.4/node_modules/@types/qs/package.json +65 -0
  87. package/.cache/typescript/5.4/node_modules/@types/request/LICENSE +21 -0
  88. package/.cache/typescript/5.4/node_modules/@types/request/README.md +15 -0
  89. package/.cache/typescript/5.4/node_modules/@types/request/index.d.ts +395 -0
  90. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/License +19 -0
  91. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/README.md +350 -0
  92. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/README.md.bak +350 -0
  93. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/index.d.ts +51 -0
  94. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/lib/browser.js +2 -0
  95. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/lib/form_data.js +483 -0
  96. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/lib/populate.js +10 -0
  97. package/.cache/typescript/5.4/node_modules/@types/request/node_modules/form-data/package.json +68 -0
  98. package/.cache/typescript/5.4/node_modules/@types/request/package.json +70 -0
  99. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/LICENSE +21 -0
  100. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/README.md +15 -0
  101. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/index.d.ts +321 -0
  102. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/package.json +35 -0
  103. package/.cache/typescript/5.4/node_modules/asynckit/LICENSE +21 -0
  104. package/.cache/typescript/5.4/node_modules/asynckit/README.md +233 -0
  105. package/.cache/typescript/5.4/node_modules/asynckit/bench.js +76 -0
  106. package/.cache/typescript/5.4/node_modules/asynckit/index.js +6 -0
  107. package/.cache/typescript/5.4/node_modules/asynckit/lib/abort.js +29 -0
  108. package/.cache/typescript/5.4/node_modules/asynckit/lib/async.js +34 -0
  109. package/.cache/typescript/5.4/node_modules/asynckit/lib/defer.js +26 -0
  110. package/.cache/typescript/5.4/node_modules/asynckit/lib/iterate.js +75 -0
  111. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  112. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_parallel.js +25 -0
  113. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_serial.js +25 -0
  114. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  115. package/.cache/typescript/5.4/node_modules/asynckit/lib/state.js +37 -0
  116. package/.cache/typescript/5.4/node_modules/asynckit/lib/streamify.js +141 -0
  117. package/.cache/typescript/5.4/node_modules/asynckit/lib/terminator.js +29 -0
  118. package/.cache/typescript/5.4/node_modules/asynckit/package.json +63 -0
  119. package/.cache/typescript/5.4/node_modules/asynckit/parallel.js +43 -0
  120. package/.cache/typescript/5.4/node_modules/asynckit/serial.js +17 -0
  121. package/.cache/typescript/5.4/node_modules/asynckit/serialOrdered.js +75 -0
  122. package/.cache/typescript/5.4/node_modules/asynckit/stream.js +21 -0
  123. package/.cache/typescript/5.4/node_modules/combined-stream/License +19 -0
  124. package/.cache/typescript/5.4/node_modules/combined-stream/Readme.md +138 -0
  125. package/.cache/typescript/5.4/node_modules/combined-stream/lib/combined_stream.js +208 -0
  126. package/.cache/typescript/5.4/node_modules/combined-stream/package.json +25 -0
  127. package/.cache/typescript/5.4/node_modules/combined-stream/yarn.lock +17 -0
  128. package/.cache/typescript/5.4/node_modules/delayed-stream/License +19 -0
  129. package/.cache/typescript/5.4/node_modules/delayed-stream/Makefile +7 -0
  130. package/.cache/typescript/5.4/node_modules/delayed-stream/Readme.md +141 -0
  131. package/.cache/typescript/5.4/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  132. package/.cache/typescript/5.4/node_modules/delayed-stream/package.json +27 -0
  133. package/.cache/typescript/5.4/node_modules/domelementtype/LICENSE +11 -0
  134. package/.cache/typescript/5.4/node_modules/domelementtype/index.js +15 -0
  135. package/.cache/typescript/5.4/node_modules/domelementtype/package.json +16 -0
  136. package/.cache/typescript/5.4/node_modules/domelementtype/readme.md +1 -0
  137. package/.cache/typescript/5.4/node_modules/domhandler/.travis.yml +6 -0
  138. package/.cache/typescript/5.4/node_modules/domhandler/LICENSE +11 -0
  139. package/.cache/typescript/5.4/node_modules/domhandler/index.js +217 -0
  140. package/.cache/typescript/5.4/node_modules/domhandler/lib/element.js +20 -0
  141. package/.cache/typescript/5.4/node_modules/domhandler/lib/node.js +44 -0
  142. package/.cache/typescript/5.4/node_modules/domhandler/package.json +41 -0
  143. package/.cache/typescript/5.4/node_modules/domhandler/readme.md +116 -0
  144. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/01-basic.json +57 -0
  145. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/02-single_tag_1.json +21 -0
  146. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/03-single_tag_2.json +21 -0
  147. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/04-unescaped_in_script.json +27 -0
  148. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/05-tags_in_comment.json +18 -0
  149. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/06-comment_in_script.json +18 -0
  150. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/07-unescaped_in_style.json +20 -0
  151. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json +20 -0
  152. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/09-unquoted_attrib.json +20 -0
  153. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/10-singular_attribute.json +15 -0
  154. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/11-text_outside_tags.json +40 -0
  155. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/12-text_only.json +11 -0
  156. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/13-comment_in_text.json +19 -0
  157. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/14-comment_in_text_in_script.json +18 -0
  158. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/15-non-verbose.json +22 -0
  159. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/16-normalize_whitespace.json +47 -0
  160. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/17-xml_namespace.json +18 -0
  161. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/18-enforce_empty_tags.json +16 -0
  162. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/19-ignore_empty_tags.json +20 -0
  163. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/20-template_script_tags.json +20 -0
  164. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/21-conditional_comments.json +15 -0
  165. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/22-lowercase_tags.json +41 -0
  166. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/23-dom-lvl1.json +131 -0
  167. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/24-with-start-indices.json +85 -0
  168. package/.cache/typescript/5.4/node_modules/domhandler/test/cases/25-with-end-indices.json +86 -0
  169. package/.cache/typescript/5.4/node_modules/domhandler/test/tests.js +60 -0
  170. package/.cache/typescript/5.4/node_modules/form-data/License +19 -0
  171. package/.cache/typescript/5.4/node_modules/form-data/README.md.bak +358 -0
  172. package/.cache/typescript/5.4/node_modules/form-data/Readme.md +358 -0
  173. package/.cache/typescript/5.4/node_modules/form-data/index.d.ts +62 -0
  174. package/.cache/typescript/5.4/node_modules/form-data/lib/browser.js +2 -0
  175. package/.cache/typescript/5.4/node_modules/form-data/lib/form_data.js +501 -0
  176. package/.cache/typescript/5.4/node_modules/form-data/lib/populate.js +10 -0
  177. package/.cache/typescript/5.4/node_modules/form-data/package.json +68 -0
  178. package/.cache/typescript/5.4/node_modules/mime-db/HISTORY.md +507 -0
  179. package/.cache/typescript/5.4/node_modules/mime-db/LICENSE +23 -0
  180. package/.cache/typescript/5.4/node_modules/mime-db/README.md +100 -0
  181. package/.cache/typescript/5.4/node_modules/mime-db/db.json +8519 -0
  182. package/.cache/typescript/5.4/node_modules/mime-db/index.js +12 -0
  183. package/.cache/typescript/5.4/node_modules/mime-db/package.json +60 -0
  184. package/.cache/typescript/5.4/node_modules/mime-types/HISTORY.md +397 -0
  185. package/.cache/typescript/5.4/node_modules/mime-types/LICENSE +23 -0
  186. package/.cache/typescript/5.4/node_modules/mime-types/README.md +113 -0
  187. package/.cache/typescript/5.4/node_modules/mime-types/index.js +188 -0
  188. package/.cache/typescript/5.4/node_modules/mime-types/package.json +44 -0
  189. package/.cache/typescript/5.4/node_modules/types-registry/README.md +2 -0
  190. package/.cache/typescript/5.4/node_modules/types-registry/index.json +1 -0
  191. package/.cache/typescript/5.4/node_modules/types-registry/package.json +20 -0
  192. package/.cache/typescript/5.4/node_modules/undici-types/README.md +6 -0
  193. package/.cache/typescript/5.4/node_modules/undici-types/agent.d.ts +31 -0
  194. package/.cache/typescript/5.4/node_modules/undici-types/api.d.ts +43 -0
  195. package/.cache/typescript/5.4/node_modules/undici-types/balanced-pool.d.ts +18 -0
  196. package/.cache/typescript/5.4/node_modules/undici-types/cache.d.ts +36 -0
  197. package/.cache/typescript/5.4/node_modules/undici-types/client.d.ts +97 -0
  198. package/.cache/typescript/5.4/node_modules/undici-types/connector.d.ts +34 -0
  199. package/.cache/typescript/5.4/node_modules/undici-types/content-type.d.ts +21 -0
  200. package/.cache/typescript/5.4/node_modules/undici-types/cookies.d.ts +28 -0
  201. package/.cache/typescript/5.4/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  202. package/.cache/typescript/5.4/node_modules/undici-types/dispatcher.d.ts +241 -0
  203. package/.cache/typescript/5.4/node_modules/undici-types/errors.d.ts +128 -0
  204. package/.cache/typescript/5.4/node_modules/undici-types/fetch.d.ts +209 -0
  205. package/.cache/typescript/5.4/node_modules/undici-types/file.d.ts +39 -0
  206. package/.cache/typescript/5.4/node_modules/undici-types/filereader.d.ts +54 -0
  207. package/.cache/typescript/5.4/node_modules/undici-types/formdata.d.ts +108 -0
  208. package/.cache/typescript/5.4/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  209. package/.cache/typescript/5.4/node_modules/undici-types/global-origin.d.ts +7 -0
  210. package/.cache/typescript/5.4/node_modules/undici-types/handlers.d.ts +9 -0
  211. package/.cache/typescript/5.4/node_modules/undici-types/header.d.ts +4 -0
  212. package/.cache/typescript/5.4/node_modules/undici-types/index.d.ts +63 -0
  213. package/.cache/typescript/5.4/node_modules/undici-types/interceptors.d.ts +5 -0
  214. package/.cache/typescript/5.4/node_modules/undici-types/mock-agent.d.ts +50 -0
  215. package/.cache/typescript/5.4/node_modules/undici-types/mock-client.d.ts +25 -0
  216. package/.cache/typescript/5.4/node_modules/undici-types/mock-errors.d.ts +12 -0
  217. package/.cache/typescript/5.4/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  218. package/.cache/typescript/5.4/node_modules/undici-types/mock-pool.d.ts +25 -0
  219. package/.cache/typescript/5.4/node_modules/undici-types/package.json +55 -0
  220. package/.cache/typescript/5.4/node_modules/undici-types/patch.d.ts +71 -0
  221. package/.cache/typescript/5.4/node_modules/undici-types/pool-stats.d.ts +19 -0
  222. package/.cache/typescript/5.4/node_modules/undici-types/pool.d.ts +28 -0
  223. package/.cache/typescript/5.4/node_modules/undici-types/proxy-agent.d.ts +30 -0
  224. package/.cache/typescript/5.4/node_modules/undici-types/readable.d.ts +61 -0
  225. package/.cache/typescript/5.4/node_modules/undici-types/webidl.d.ts +220 -0
  226. package/.cache/typescript/5.4/node_modules/undici-types/websocket.d.ts +131 -0
  227. package/.cache/typescript/5.4/package-lock.json +197 -0
  228. package/.cache/typescript/5.4/package.json +1 -0
  229. package/index.js +1 -1
  230. package/package.json +8 -2
  231. package/.cache/replit/modules/nodejs-20:v36-20240502-f4453db.res +0 -1
  232. package/.cache/replit/modules/replit:v9-20240429-0325cbb.res +0 -1
@@ -0,0 +1,473 @@
1
+ /**
2
+ * The `dns.promises` API provides an alternative set of asynchronous DNS methods
3
+ * that return `Promise` objects rather than using callbacks. The API is accessible
4
+ * via `require('node:dns').promises` or `require('node:dns/promises')`.
5
+ * @since v10.6.0
6
+ */
7
+ declare module "dns/promises" {
8
+ import {
9
+ AnyRecord,
10
+ CaaRecord,
11
+ LookupAddress,
12
+ LookupAllOptions,
13
+ LookupOneOptions,
14
+ LookupOptions,
15
+ MxRecord,
16
+ NaptrRecord,
17
+ RecordWithTtl,
18
+ ResolveOptions,
19
+ ResolverOptions,
20
+ ResolveWithTtlOptions,
21
+ SoaRecord,
22
+ SrvRecord,
23
+ } from "node:dns";
24
+ /**
25
+ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
26
+ * that are currently configured for DNS resolution. A string will include a port
27
+ * section if a custom port is used.
28
+ *
29
+ * ```js
30
+ * [
31
+ * '4.4.4.4',
32
+ * '2001:4860:4860::8888',
33
+ * '4.4.4.4:1053',
34
+ * '[2001:4860:4860::8888]:1053',
35
+ * ]
36
+ * ```
37
+ * @since v10.6.0
38
+ */
39
+ function getServers(): string[];
40
+ /**
41
+ * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
42
+ * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
43
+ * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
44
+ * and IPv6 addresses are both returned if found.
45
+ *
46
+ * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`.
47
+ *
48
+ * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
49
+ * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
50
+ * the host name does not exist but also when the lookup fails in other ways
51
+ * such as no available file descriptors.
52
+ *
53
+ * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS
54
+ * protocol. The implementation uses an operating system facility that can
55
+ * associate names with addresses and vice versa. This implementation can have
56
+ * subtle but important consequences on the behavior of any Node.js program. Please
57
+ * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before
58
+ * using `dnsPromises.lookup()`.
59
+ *
60
+ * Example usage:
61
+ *
62
+ * ```js
63
+ * const dns = require('node:dns');
64
+ * const dnsPromises = dns.promises;
65
+ * const options = {
66
+ * family: 6,
67
+ * hints: dns.ADDRCONFIG | dns.V4MAPPED,
68
+ * };
69
+ *
70
+ * dnsPromises.lookup('example.com', options).then((result) => {
71
+ * console.log('address: %j family: IPv%s', result.address, result.family);
72
+ * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
73
+ * });
74
+ *
75
+ * // When options.all is true, the result will be an Array.
76
+ * options.all = true;
77
+ * dnsPromises.lookup('example.com', options).then((result) => {
78
+ * console.log('addresses: %j', result);
79
+ * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
80
+ * });
81
+ * ```
82
+ * @since v10.6.0
83
+ */
84
+ function lookup(hostname: string, family: number): Promise<LookupAddress>;
85
+ function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
86
+ function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
87
+ function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
88
+ function lookup(hostname: string): Promise<LookupAddress>;
89
+ /**
90
+ * Resolves the given `address` and `port` into a host name and service using
91
+ * the operating system's underlying `getnameinfo` implementation.
92
+ *
93
+ * If `address` is not a valid IP address, a `TypeError` will be thrown.
94
+ * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
95
+ *
96
+ * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
97
+ *
98
+ * ```js
99
+ * const dnsPromises = require('node:dns').promises;
100
+ * dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
101
+ * console.log(result.hostname, result.service);
102
+ * // Prints: localhost ssh
103
+ * });
104
+ * ```
105
+ * @since v10.6.0
106
+ */
107
+ function lookupService(
108
+ address: string,
109
+ port: number,
110
+ ): Promise<{
111
+ hostname: string;
112
+ service: string;
113
+ }>;
114
+ /**
115
+ * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
116
+ * of the resource records. When successful, the `Promise` is resolved with an
117
+ * array of resource records. The type and structure of individual results vary
118
+ * based on `rrtype`:
119
+ *
120
+ * <omitted>
121
+ *
122
+ * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
123
+ * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
124
+ * @since v10.6.0
125
+ * @param hostname Host name to resolve.
126
+ * @param [rrtype='A'] Resource record type.
127
+ */
128
+ function resolve(hostname: string): Promise<string[]>;
129
+ function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
130
+ function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
131
+ function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
132
+ function resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
133
+ function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
134
+ function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
135
+ function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
136
+ function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
137
+ function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
138
+ function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
139
+ function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
140
+ function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
141
+ function resolve(
142
+ hostname: string,
143
+ rrtype: string,
144
+ ): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
145
+ /**
146
+ * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4
147
+ * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
148
+ * @since v10.6.0
149
+ * @param hostname Host name to resolve.
150
+ */
151
+ function resolve4(hostname: string): Promise<string[]>;
152
+ function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
153
+ function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
154
+ /**
155
+ * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6
156
+ * addresses.
157
+ * @since v10.6.0
158
+ * @param hostname Host name to resolve.
159
+ */
160
+ function resolve6(hostname: string): Promise<string[]>;
161
+ function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
162
+ function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
163
+ /**
164
+ * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
165
+ * On success, the `Promise` is resolved with an array containing various types of
166
+ * records. Each object has a property `type` that indicates the type of the
167
+ * current record. And depending on the `type`, additional properties will be
168
+ * present on the object:
169
+ *
170
+ * <omitted>
171
+ *
172
+ * Here is an example of the result object:
173
+ *
174
+ * ```js
175
+ * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
176
+ * { type: 'CNAME', value: 'example.com' },
177
+ * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
178
+ * { type: 'NS', value: 'ns1.example.com' },
179
+ * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
180
+ * { type: 'SOA',
181
+ * nsname: 'ns1.example.com',
182
+ * hostmaster: 'admin.example.com',
183
+ * serial: 156696742,
184
+ * refresh: 900,
185
+ * retry: 900,
186
+ * expire: 1800,
187
+ * minttl: 60 } ]
188
+ * ```
189
+ * @since v10.6.0
190
+ */
191
+ function resolveAny(hostname: string): Promise<AnyRecord[]>;
192
+ /**
193
+ * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
194
+ * the `Promise` is resolved with an array of objects containing available
195
+ * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
196
+ * @since v15.0.0, v14.17.0
197
+ */
198
+ function resolveCaa(hostname: string): Promise<CaaRecord[]>;
199
+ /**
200
+ * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success,
201
+ * the `Promise` is resolved with an array of canonical name records available for
202
+ * the `hostname` (e.g. `['bar.example.com']`).
203
+ * @since v10.6.0
204
+ */
205
+ function resolveCname(hostname: string): Promise<string[]>;
206
+ /**
207
+ * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects
208
+ * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
209
+ * @since v10.6.0
210
+ */
211
+ function resolveMx(hostname: string): Promise<MxRecord[]>;
212
+ /**
213
+ * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array
214
+ * of objects with the following properties:
215
+ *
216
+ * * `flags`
217
+ * * `service`
218
+ * * `regexp`
219
+ * * `replacement`
220
+ * * `order`
221
+ * * `preference`
222
+ *
223
+ * ```js
224
+ * {
225
+ * flags: 's',
226
+ * service: 'SIP+D2U',
227
+ * regexp: '',
228
+ * replacement: '_sip._udp.example.com',
229
+ * order: 30,
230
+ * preference: 100
231
+ * }
232
+ * ```
233
+ * @since v10.6.0
234
+ */
235
+ function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
236
+ /**
237
+ * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server
238
+ * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
239
+ * @since v10.6.0
240
+ */
241
+ function resolveNs(hostname: string): Promise<string[]>;
242
+ /**
243
+ * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings
244
+ * containing the reply records.
245
+ * @since v10.6.0
246
+ */
247
+ function resolvePtr(hostname: string): Promise<string[]>;
248
+ /**
249
+ * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
250
+ * the `hostname`. On success, the `Promise` is resolved with an object with the
251
+ * following properties:
252
+ *
253
+ * * `nsname`
254
+ * * `hostmaster`
255
+ * * `serial`
256
+ * * `refresh`
257
+ * * `retry`
258
+ * * `expire`
259
+ * * `minttl`
260
+ *
261
+ * ```js
262
+ * {
263
+ * nsname: 'ns.example.com',
264
+ * hostmaster: 'root.example.com',
265
+ * serial: 2013101809,
266
+ * refresh: 10000,
267
+ * retry: 2400,
268
+ * expire: 604800,
269
+ * minttl: 3600
270
+ * }
271
+ * ```
272
+ * @since v10.6.0
273
+ */
274
+ function resolveSoa(hostname: string): Promise<SoaRecord>;
275
+ /**
276
+ * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with
277
+ * the following properties:
278
+ *
279
+ * * `priority`
280
+ * * `weight`
281
+ * * `port`
282
+ * * `name`
283
+ *
284
+ * ```js
285
+ * {
286
+ * priority: 10,
287
+ * weight: 5,
288
+ * port: 21223,
289
+ * name: 'service.example.com'
290
+ * }
291
+ * ```
292
+ * @since v10.6.0
293
+ */
294
+ function resolveSrv(hostname: string): Promise<SrvRecord[]>;
295
+ /**
296
+ * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array
297
+ * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
298
+ * one record. Depending on the use case, these could be either joined together or
299
+ * treated separately.
300
+ * @since v10.6.0
301
+ */
302
+ function resolveTxt(hostname: string): Promise<string[][]>;
303
+ /**
304
+ * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
305
+ * array of host names.
306
+ *
307
+ * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
308
+ * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
309
+ * @since v10.6.0
310
+ */
311
+ function reverse(ip: string): Promise<string[]>;
312
+ /**
313
+ * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
314
+ * The value could be:
315
+ *
316
+ * * `ipv4first`: for `verbatim` defaulting to `false`.
317
+ * * `verbatim`: for `verbatim` defaulting to `true`.
318
+ * @since v20.1.0
319
+ */
320
+ function getDefaultResultOrder(): "ipv4first" | "verbatim";
321
+ /**
322
+ * Sets the IP address and port of servers to be used when performing DNS
323
+ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
324
+ * addresses. If the port is the IANA default DNS port (53) it can be omitted.
325
+ *
326
+ * ```js
327
+ * dnsPromises.setServers([
328
+ * '4.4.4.4',
329
+ * '[2001:4860:4860::8888]',
330
+ * '4.4.4.4:1053',
331
+ * '[2001:4860:4860::8888]:1053',
332
+ * ]);
333
+ * ```
334
+ *
335
+ * An error will be thrown if an invalid address is provided.
336
+ *
337
+ * The `dnsPromises.setServers()` method must not be called while a DNS query is in
338
+ * progress.
339
+ *
340
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
341
+ * 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
342
+ * subsequent servers provided. Fallback DNS servers will only be used if the
343
+ * earlier ones time out or result in some other error.
344
+ * @since v10.6.0
345
+ * @param servers array of `RFC 5952` formatted addresses
346
+ */
347
+ function setServers(servers: readonly string[]): void;
348
+ /**
349
+ * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:
350
+ *
351
+ * * `ipv4first`: sets default `verbatim` `false`.
352
+ * * `verbatim`: sets default `verbatim` `true`.
353
+ *
354
+ * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
355
+ * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
356
+ * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
357
+ * from the main thread won't affect the default dns orders in workers.
358
+ * @since v16.4.0, v14.18.0
359
+ * @param order must be `'ipv4first'` or `'verbatim'`.
360
+ */
361
+ function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
362
+ const NODATA: "NODATA";
363
+ const FORMERR: "FORMERR";
364
+ const SERVFAIL: "SERVFAIL";
365
+ const NOTFOUND: "NOTFOUND";
366
+ const NOTIMP: "NOTIMP";
367
+ const REFUSED: "REFUSED";
368
+ const BADQUERY: "BADQUERY";
369
+ const BADNAME: "BADNAME";
370
+ const BADFAMILY: "BADFAMILY";
371
+ const BADRESP: "BADRESP";
372
+ const CONNREFUSED: "TIMEOUT";
373
+ const TIMEOUT: "TIMEOUT";
374
+ const EOF: "EOF";
375
+ const FILE: "FILE";
376
+ const NOMEM: "NOMEM";
377
+ const DESTRUCTION: "DESTRUCTION";
378
+ const BADSTR: "BADSTR";
379
+ const BADFLAGS: "BADFLAGS";
380
+ const NONAME: "NONAME";
381
+ const BADHINTS: "BADHINTS";
382
+ const NOTINITIALIZED: "NOTINITIALIZED";
383
+ const LOADIPHLPAPI: "LOADIPHLPAPI";
384
+ const ADDRGETNETWORKPARAMS: "ADDRGETNETWORKPARAMS";
385
+ const CANCELLED: "CANCELLED";
386
+ /**
387
+ * An independent resolver for DNS requests.
388
+ *
389
+ * Creating a new resolver uses the default server settings. Setting
390
+ * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect
391
+ * other resolvers:
392
+ *
393
+ * ```js
394
+ * const { Resolver } = require('node:dns').promises;
395
+ * const resolver = new Resolver();
396
+ * resolver.setServers(['4.4.4.4']);
397
+ *
398
+ * // This request will use the server at 4.4.4.4, independent of global settings.
399
+ * resolver.resolve4('example.org').then((addresses) => {
400
+ * // ...
401
+ * });
402
+ *
403
+ * // Alternatively, the same code can be written using async-await style.
404
+ * (async function() {
405
+ * const addresses = await resolver.resolve4('example.org');
406
+ * })();
407
+ * ```
408
+ *
409
+ * The following methods from the `dnsPromises` API are available:
410
+ *
411
+ * * `resolver.getServers()`
412
+ * * `resolver.resolve()`
413
+ * * `resolver.resolve4()`
414
+ * * `resolver.resolve6()`
415
+ * * `resolver.resolveAny()`
416
+ * * `resolver.resolveCaa()`
417
+ * * `resolver.resolveCname()`
418
+ * * `resolver.resolveMx()`
419
+ * * `resolver.resolveNaptr()`
420
+ * * `resolver.resolveNs()`
421
+ * * `resolver.resolvePtr()`
422
+ * * `resolver.resolveSoa()`
423
+ * * `resolver.resolveSrv()`
424
+ * * `resolver.resolveTxt()`
425
+ * * `resolver.reverse()`
426
+ * * `resolver.setServers()`
427
+ * @since v10.6.0
428
+ */
429
+ class Resolver {
430
+ constructor(options?: ResolverOptions);
431
+ /**
432
+ * Cancel all outstanding DNS queries made by this resolver. The corresponding
433
+ * callbacks will be called with an error with code `ECANCELLED`.
434
+ * @since v8.3.0
435
+ */
436
+ cancel(): void;
437
+ getServers: typeof getServers;
438
+ resolve: typeof resolve;
439
+ resolve4: typeof resolve4;
440
+ resolve6: typeof resolve6;
441
+ resolveAny: typeof resolveAny;
442
+ resolveCaa: typeof resolveCaa;
443
+ resolveCname: typeof resolveCname;
444
+ resolveMx: typeof resolveMx;
445
+ resolveNaptr: typeof resolveNaptr;
446
+ resolveNs: typeof resolveNs;
447
+ resolvePtr: typeof resolvePtr;
448
+ resolveSoa: typeof resolveSoa;
449
+ resolveSrv: typeof resolveSrv;
450
+ resolveTxt: typeof resolveTxt;
451
+ reverse: typeof reverse;
452
+ /**
453
+ * The resolver instance will send its requests from the specified IP address.
454
+ * This allows programs to specify outbound interfaces when used on multi-homed
455
+ * systems.
456
+ *
457
+ * If a v4 or v6 address is not specified, it is set to the default and the
458
+ * operating system will choose a local address automatically.
459
+ *
460
+ * The resolver will use the v4 local address when making requests to IPv4 DNS
461
+ * servers, and the v6 local address when making requests to IPv6 DNS servers.
462
+ * The `rrtype` of resolution requests has no impact on the local address used.
463
+ * @since v15.1.0, v14.17.0
464
+ * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
465
+ * @param [ipv6='::0'] A string representation of an IPv6 address.
466
+ */
467
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
468
+ setServers: typeof setServers;
469
+ }
470
+ }
471
+ declare module "node:dns/promises" {
472
+ export * from "dns/promises";
473
+ }