{"name":"@multiformats/dns","version":"1.0.9","license":"Apache-2.0 OR MIT","_id":"@multiformats/dns@1.0.9","maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"vmx","email":"volker.mische@gmail.com"},{"name":"mikeal","email":"mikeal.rogers@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"rvagg","email":"r@va.gg"},{"name":"lidel","email":"lidel@lidel.org"},{"name":"npm-service-account-multiformats","email":"npm-service-account+multiformats@ipfs.tech"}],"homepage":"https://github.com/multiformats/js-dns#readme","bugs":{"url":"https://github.com/multiformats/js-dns/issues"},"dist":{"shasum":"1b0b1a4234ecbd25888fa92c5c58a1592e4b1026","tarball":"http://registry-npm.ywwl.com/@multiformats/dns/download/@multiformats/dns-1.0.9.tgz","fileCount":60,"integrity":"sha512-Ja4hevWI9p96ICx11K3suFvFirnMmXILzS7FpsR2KG3FoKF/XJijm8ylf3vY6kRFGr98yfZYM+zIn18KaINs3A==","signatures":[{"sig":"MEUCIFps5MOrUerRJbYLzBbzGveTf6Q07MtrP4wj8K8sUxTRAiEAl9U/+KG7ezKMmuPw6JWyCb0d0l6BuEnk85qqzMEhuuI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@multiformats%2fdns@1.0.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":257217,"size":70647,"noattachment":false,"key":"/@multiformats/dns/-/@multiformats/dns-1.0.9.tgz"},"type":"module","types":"./dist/src/index.d.ts","browser":{"./dist/src/resolvers/default.js":"./dist/src/resolvers/default.browser.js"},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"},"./resolvers":{"types":"./dist/src/resolvers/index.d.ts","import":"./dist/src/resolvers/index.js"}},"gitHead":"2691bd62dda9cb6381b9df8824a84f34390e3d46","release":{"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"release":"major","breaking":true},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["CHANGELOG.md","package.json"]}]],"branches":["main"]},"scripts":{"docs":"aegir docs","lint":"aegir lint","test":"aegir test -f","build":"aegir build","clean":"aegir clean","release":"aegir release","dep-check":"aegir dep-check -i buffer","test:node":"aegir test -t node --cov","test:chrome":"aegir test -t browser --cov","test:firefox":"aegir test -t browser -- --browser firefox","test:electron-main":"aegir test -t electron-main","test:chrome-webworker":"aegir test -t webworker","test:firefox-webworker":"aegir test -t webworker -- --browser firefox"},"_npmUser":{"name":"npm-service-account-multiformats","email":"npm-service-account+multiformats@ipfs.tech"},"repository":{"url":"git+https://github.com/multiformats/js-dns.git","type":"git"},"_npmVersion":"10.9.3","description":"Resolve DNS queries with browser fallback","directories":{},"_nodeVersion":"22.19.0","dependencies":{"buffer":"^6.0.3","hashlru":"^2.3.0","p-queue":"^8.0.1","dns-packet":"^5.6.1","uint8arrays":"^5.0.2","progress-events":"^1.0.0"},"publishConfig":{"access":"public","provenance":true},"typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"_hasShrinkwrap":false,"devDependencies":{"aegir":"^47.0.21","sinon":"^18.0.0","@types/sinon":"^17.0.2","@types/dns-packet":"^5.6.5"},"_npmOperationalInternal":{"tmp":"tmp/dns_1.0.9_1757325707293_0.11221527409654364","host":"s3://npm-registry-packages-npm-production"},"readme":"# @multiformats/dns\n\n[![multiformats.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://multiformats.io)\n[![codecov](https://img.shields.io/codecov/c/github/multiformats/js-dns.svg?style=flat-square)](https://codecov.io/gh/multiformats/js-dns)\n[![CI](https://img.shields.io/github/actions/workflow/status/multiformats/js-dns/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/multiformats/js-dns/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> Resolve DNS queries with browser fallback\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nQuery DNS records using `node:dns`, DNS over HTTP and/or DNSJSON over HTTP.\n\nA list of publicly accessible servers can be found [here](https://github.com/curl/curl/wiki/DNS-over-HTTPS#publicly-available-servers).\n\n## Example - Using the default resolver\n\n```TypeScript\nimport { dns } from '@multiformats/dns'\n\nconst resolver = dns()\n\n// resolve A records with a 5s timeout\nconst result = await dns.query('google.com', {\n  signal: AbortSignal.timeout(5000)\n})\n```\n\n## Example - Using per-TLD resolvers\n\n```TypeScript\nimport { dns } from '@multiformats/dns'\nimport { dnsJsonOverHttps } from '@multiformats/dns/resolvers'\n\nconst resolver = dns({\n  resolvers: {\n    // will only be used to resolve `.com` addresses\n    'com.': dnsJsonOverHttps('https://cloudflare-dns.com/dns-query'),\n\n    // this can also be an array, resolvers will be shuffled and tried in\n    // series\n    'net.': [\n      dnsJsonOverHttps('https://dns.google/resolve'),\n      dnsJsonOverHttps('https://dns.pub/dns-query')\n    ],\n\n    // will only be used to resolve all other addresses\n    '.': dnsJsonOverHttps('https://dnsforge.de/dns-query'),\n  }\n})\n```\n\n## Example - Query for specific record types\n\n```TypeScript\nimport { dns, RecordType } from '@multiformats/dns'\n\nconst resolver = dns()\n\n// resolve only TXT records\nconst result = await dns.query('google.com', {\n  types: [\n    RecordType.TXT\n  ]\n})\n```\n\n## Caching\n\nIndividual Aanswers are cached so. If you make a request, for which all\nrecord types are cached, all values will be pulled from the cache.\n\nIf any of the record types are not cached, a new request will be resolved as\nif none of the records were cached, and the cache will be updated to include\nthe new results.\n\n## Example - Ignoring the cache\n\n```TypeScript\nimport { dns, RecordType } from '@multiformats/dns'\n\nconst resolver = dns()\n\n// do not used cached results, always resolve a new query\nconst result = await dns.query('google.com', {\n  cached: false\n})\n```\n\n# Install\n\n```console\n$ npm i @multiformats/dns\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make its exports available as `MultiformatsDns` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/@multiformats/dns/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://multiformats.github.io/js-dns>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/multiformats/js-dns/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/multiformats/js-dns/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","publish_time":1757325707475,"_cnpm_publish_time":1757325707475,"dist-tags":{"latest":"1.0.15"}}