@moneybutton/paymail-client
Advanced tools
Comparing version 0.38.7 to 0.38.8
@@ -27,3 +27,6 @@ 'use strict'; | ||
class PaymailServerError extends Error {} | ||
// import { DnsOverHttps } from "./dns-over-https" | ||
class DnsClient { | ||
@@ -116,3 +119,3 @@ constructor(dns, doh) { | ||
if (dnsResponse.Status !== 0 || !dnsResponse.Answer) { | ||
throw new Error(`Insecure domain.`); | ||
throw new PaymailServerError(`${aDomain} is not correctly configured: insecure domain`); | ||
} | ||
@@ -125,3 +128,3 @@ | ||
if (!dnsResponse.AD && !this.domainsAreEqual(aDomain, responseDomain)) { | ||
throw new Error(`Insecure domain.`); | ||
throw new PaymailServerError(`${aDomain} is not correctly configured: insecure domain`); | ||
} | ||
@@ -160,4 +163,2 @@ | ||
class PaymailServerError extends Error {} | ||
function _defineProperty(obj, key, value) { | ||
@@ -342,3 +343,3 @@ if (key in obj) { | ||
const apiDescriptor = await this.getApiDescriptionFor(aDomain); | ||
return !!apiDescriptor.capabilities[capability]; | ||
return apiDescriptor.capabilities && !!apiDescriptor.capabilities[capability]; | ||
} | ||
@@ -345,0 +346,0 @@ |
@@ -21,3 +21,6 @@ import { brfc } from '@moneybutton/brfc'; | ||
class PaymailServerError extends Error {} | ||
// import { DnsOverHttps } from "./dns-over-https" | ||
class DnsClient { | ||
@@ -110,3 +113,3 @@ constructor(dns, doh) { | ||
if (dnsResponse.Status !== 0 || !dnsResponse.Answer) { | ||
throw new Error(`Insecure domain.`); | ||
throw new PaymailServerError(`${aDomain} is not correctly configured: insecure domain`); | ||
} | ||
@@ -119,3 +122,3 @@ | ||
if (!dnsResponse.AD && !this.domainsAreEqual(aDomain, responseDomain)) { | ||
throw new Error(`Insecure domain.`); | ||
throw new PaymailServerError(`${aDomain} is not correctly configured: insecure domain`); | ||
} | ||
@@ -154,4 +157,2 @@ | ||
class PaymailServerError extends Error {} | ||
function _defineProperty(obj, key, value) { | ||
@@ -336,3 +337,3 @@ if (key in obj) { | ||
const apiDescriptor = await this.getApiDescriptionFor(aDomain); | ||
return !!apiDescriptor.capabilities[capability]; | ||
return apiDescriptor.capabilities && !!apiDescriptor.capabilities[capability]; | ||
} | ||
@@ -339,0 +340,0 @@ |
{ | ||
"name": "@moneybutton/paymail-client", | ||
"version": "0.38.7", | ||
"version": "0.38.8", | ||
"description": "Money Button isomorphic Paymail utilities.", | ||
@@ -30,3 +30,3 @@ "main": "dist/paymail-client.cjs.js", | ||
"@babel/runtime": "7.5.5", | ||
"@moneybutton/brfc": "^0.38.7", | ||
"@moneybutton/brfc": "^0.38.8", | ||
"abort-controller": "3.0.0", | ||
@@ -71,3 +71,3 @@ "bsv": "2.0.7", | ||
}, | ||
"gitHead": "20cbc19ffeb4c87aebc4d863dae036c44166387e" | ||
"gitHead": "00adacccdc10abeb9c1196b3d2007c86dfbb2178" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
166771
16
Updated@moneybutton/brfc@^0.38.8