Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dat-dns

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dat-dns - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

11

index.js

@@ -16,2 +16,5 @@ const debug = require('debug')('dat')

// helper to support node6
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
// helper to call promise-generating function

@@ -41,3 +44,3 @@ function maybe (cb, p) {

var noWellknownDat = opts && opts.noWellknownDat
return maybe(cb, async function () {
return maybe(cb, _asyncToGenerator(function* () {
// parse the name as needed

@@ -75,3 +78,3 @@ var nameParsed = url.parse(name)

// do a DNS-over-HTTPS lookup
res = await fetchDnsOverHttpsRecord(name, {host: dnsHost, path: dnsPath})
res = yield fetchDnsOverHttpsRecord(name, {host: dnsHost, path: dnsPath})

@@ -89,3 +92,3 @@ // parse the record

// do a .well-known/dat lookup
res = await fetchWellKnownRecord(name)
res = yield fetchWellKnownRecord(name)
if (res.statusCode === 0 || res.statusCode === 404) {

@@ -117,3 +120,3 @@ debug('.well-known/dat lookup failed for name:', name, res.statusCode, res.err)

}
})
}))
}

@@ -120,0 +123,0 @@

{
"name": "dat-dns",
"version": "3.0.0",
"version": "3.0.1",
"description": "Issue DNS lookups for Dat archives using HTTPS requests to the target host.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -58,3 +58,3 @@ # dat-dns

**Option 1. (DNS-over-HTTPS)** Create a DNS TXT record witht he following schema:
**Option 1 (DNS-over-HTTPS).** Create a DNS TXT record witht he following schema:

@@ -65,3 +65,3 @@ ```

**Option 2. (.wellknown/dat)** Place a file at `/.well-known/dat` with the following schema:
**Option 2 (.well-known/dat).** Place a file at `/.well-known/dat` with the following schema:

@@ -68,0 +68,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc