{"name":"@multiformats/dns","version":"1.0.15","description":"Resolve DNS queries with browser fallback","license":"Apache-2.0 OR MIT","homepage":"https://github.com/multiformats/js-dns#readme","repository":{"type":"git","url":"git+https://github.com/multiformats/js-dns.git"},"bugs":{"url":"https://github.com/multiformats/js-dns/issues"},"publishConfig":{"access":"public","provenance":true},"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js","module-sync":"./dist/src/index.js"},"./resolvers":{"types":"./dist/src/resolvers/index.d.ts","import":"./dist/src/resolvers/index.js","module-sync":"./dist/src/resolvers/index.js"}},"release":{"branches":["main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"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"]}]]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","test":"aegir test -f","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","test:node":"aegir test -t node --cov","test:electron-main":"aegir test -t electron-main","release":"aegir release","docs":"aegir docs"},"dependencies":{"@dnsquery/dns-packet":"^6.1.1","@libp2p/interface":"^3.1.0","hashlru":"^2.3.0","p-queue":"^9.0.0","progress-events":"^1.0.0","uint8arrays":"^6.1.1"},"devDependencies":{"@types/dns-packet":"^5.6.5","@types/sinon":"^21.0.0","aegir":"^48.0.13","sinon":"^22.0.0"},"browser":{"./dist/src/resolvers/default.js":"./dist/src/resolvers/default.browser.js"},"gitHead":"7715bbbc94a6630a739926e3cd6e3e06fc9144ba","_id":"@multiformats/dns@1.0.15","_nodeVersion":"24.17.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-W0zAMABtAn+3chgFcPGvllKND7M6GblMAAFcJQTy+iMmGiyFErZYPzAh2b50Y3SFf340iFV7+ckVgZkGfUyxzA==","shasum":"d0a1bbb2250d31ac53455d882e2007bf2a99a5e3","tarball":"http://registry-npm.ywwl.com/@multiformats/dns/download/@multiformats/dns-1.0.15.tgz","fileCount":65,"unpackedSize":298350,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@multiformats%2fdns@1.0.15","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCaT24tRqnkws76pUkZCYrW7h07NStrM5NG6YjwUug1ugIgRKTxrn3Q76beJa4po7fk6NZKmgrkIMCqAgf5D6LXb0I="}],"size":80671,"noattachment":false,"key":"/@multiformats/dns/-/@multiformats/dns-1.0.15.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b7985398-4455-4e6d-8d72-68dd34882dab"}},"directories":{},"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dns_1.0.15_1782376849728_0.7277969149315613"},"_hasShrinkwrap":false,"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":1782376849848,"_cnpm_publish_time":1782376849848,"dist-tags":{"latest":"1.0.15"}}