@dnsid-ai/transport 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -282,7 +282,9 @@ function createDnsResolverFromServer(server) {
|
|
|
282
282
|
let hostPromise;
|
|
283
283
|
return {
|
|
284
284
|
async fetchTXT(name, options) {
|
|
285
|
-
hostPromise ??= net2.isIP(parsed.host) ? Promise.resolve(parsed.host) : dnsPromises.lookup(parsed.host).then(({ address }) => address)
|
|
285
|
+
hostPromise ??= net2.isIP(parsed.host) ? Promise.resolve(parsed.host) : dnsPromises.lookup(parsed.host).then(({ address }) => address).catch((cause) => {
|
|
286
|
+
throw new import_protocol2.VerificationError("DNS server hostname lookup failed", { code: import_protocol2.VerificationCode.DNSResolution, transient: true, cause });
|
|
287
|
+
});
|
|
286
288
|
return resolveTxtWithTtl(name, await hostPromise, port, options?.signal);
|
|
287
289
|
}
|
|
288
290
|
};
|
package/dist/index.js
CHANGED
|
@@ -240,7 +240,9 @@ function createDnsResolverFromServer(server) {
|
|
|
240
240
|
let hostPromise;
|
|
241
241
|
return {
|
|
242
242
|
async fetchTXT(name, options) {
|
|
243
|
-
hostPromise ??= net2.isIP(parsed.host) ? Promise.resolve(parsed.host) : dnsPromises.lookup(parsed.host).then(({ address }) => address)
|
|
243
|
+
hostPromise ??= net2.isIP(parsed.host) ? Promise.resolve(parsed.host) : dnsPromises.lookup(parsed.host).then(({ address }) => address).catch((cause) => {
|
|
244
|
+
throw new VerificationError("DNS server hostname lookup failed", { code: VerificationCode.DNSResolution, transient: true, cause });
|
|
245
|
+
});
|
|
244
246
|
return resolveTxtWithTtl(name, await hostPromise, port, options?.signal);
|
|
245
247
|
}
|
|
246
248
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dnsid-ai/transport",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Node.js DNS and HTTPS transport implementations for DNSid.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"typecheck": "tsc --noEmit"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@dnsid-ai/protocol": "^0.
|
|
41
|
+
"@dnsid-ai/protocol": "^0.29.0",
|
|
42
42
|
"dns-packet": "5.6.1",
|
|
43
43
|
"undici": "^8.11.0"
|
|
44
44
|
},
|