@xyo-network/dns
Advanced tools
Comparing version 2.107.3 to 2.107.4
@@ -1,2 +0,63 @@ | ||
var N=Object.defineProperty;var r=(t,o)=>N(t,"name",{value:o,configurable:!0});var m;(function(t){t[t.A=1]="A",t[t.AAAA=28]="AAAA",t[t.CAA=257]="CAA",t[t.CNAME=5]="CNAME",t[t.DNAME=39]="DNAME",t[t.MX=15]="MX",t[t.NS=2]="NS",t[t.PTR=12]="PTR",t[t.SOA=6]="SOA",t[t.SPF=99]="SPF",t[t.SRV=33]="SRV",t[t.TXT=16]="TXT"})(m||(m={}));var a;(function(t){t[t.NoError=0]="NoError",t[t.QueryFormatError=1]="QueryFormatError",t[t.ServerFailed=2]="ServerFailed",t[t.DomainDoesNotExist=3]="DomainDoesNotExist",t[t.NotImplemented=4]="NotImplemented",t[t.Refused=5]="Refused",t[t.NameShouldNotExist=6]="NameShouldNotExist",t[t.RRSetShouldNotExist=7]="RRSetShouldNotExist",t[t.NotAuthoratative=8]="NotAuthoratative",t[t.NotInZone=9]="NotInZone"})(a||(a={}));import{axios as f}from"@xylabs/axios";var i=r(async(t,o=m.A)=>(await f.get(`https://dns.google/resolve?name=${t}&type=${o}`)).data,"googleDnsOverHttps");var A=r(async(t,o=m.A)=>{if(t)return await i(t,o)},"domainResolve");var X=r(async t=>t===void 0?!1:(await A(t))?.Status===a.NoError,"domainExists");export{m as DnsRecordType,a as DnsReturnCode,X as domainExists,A as domainResolve,i as googleDnsOverHttps}; | ||
var __defProp = Object.defineProperty; | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
// src/DnsRecordType.ts | ||
var DnsRecordType; | ||
(function(DnsRecordType2) { | ||
DnsRecordType2[DnsRecordType2["A"] = 1] = "A"; | ||
DnsRecordType2[DnsRecordType2["AAAA"] = 28] = "AAAA"; | ||
DnsRecordType2[DnsRecordType2["CAA"] = 257] = "CAA"; | ||
DnsRecordType2[DnsRecordType2["CNAME"] = 5] = "CNAME"; | ||
DnsRecordType2[DnsRecordType2["DNAME"] = 39] = "DNAME"; | ||
DnsRecordType2[DnsRecordType2["MX"] = 15] = "MX"; | ||
DnsRecordType2[DnsRecordType2["NS"] = 2] = "NS"; | ||
DnsRecordType2[DnsRecordType2["PTR"] = 12] = "PTR"; | ||
DnsRecordType2[DnsRecordType2["SOA"] = 6] = "SOA"; | ||
DnsRecordType2[DnsRecordType2["SPF"] = 99] = "SPF"; | ||
DnsRecordType2[DnsRecordType2["SRV"] = 33] = "SRV"; | ||
DnsRecordType2[DnsRecordType2["TXT"] = 16] = "TXT"; | ||
})(DnsRecordType || (DnsRecordType = {})); | ||
// src/DnsReturnCode.ts | ||
var DnsReturnCode; | ||
(function(DnsReturnCode2) { | ||
DnsReturnCode2[DnsReturnCode2["NoError"] = 0] = "NoError"; | ||
DnsReturnCode2[DnsReturnCode2["QueryFormatError"] = 1] = "QueryFormatError"; | ||
DnsReturnCode2[DnsReturnCode2["ServerFailed"] = 2] = "ServerFailed"; | ||
DnsReturnCode2[DnsReturnCode2["DomainDoesNotExist"] = 3] = "DomainDoesNotExist"; | ||
DnsReturnCode2[DnsReturnCode2["NotImplemented"] = 4] = "NotImplemented"; | ||
DnsReturnCode2[DnsReturnCode2["Refused"] = 5] = "Refused"; | ||
DnsReturnCode2[DnsReturnCode2["NameShouldNotExist"] = 6] = "NameShouldNotExist"; | ||
DnsReturnCode2[DnsReturnCode2["RRSetShouldNotExist"] = 7] = "RRSetShouldNotExist"; | ||
DnsReturnCode2[DnsReturnCode2["NotAuthoratative"] = 8] = "NotAuthoratative"; | ||
DnsReturnCode2[DnsReturnCode2["NotInZone"] = 9] = "NotInZone"; | ||
})(DnsReturnCode || (DnsReturnCode = {})); | ||
// src/googleDnsOverHttps.ts | ||
import { axios } from "@xylabs/axios"; | ||
var googleDnsOverHttps = /* @__PURE__ */ __name(async (name, type = DnsRecordType.A) => { | ||
return (await axios.get(`https://dns.google/resolve?name=${name}&type=${type}`)).data; | ||
}, "googleDnsOverHttps"); | ||
// src/domainResolve.ts | ||
var domainResolve = /* @__PURE__ */ __name(async (domain, type = DnsRecordType.A) => { | ||
if (domain) { | ||
const dnsResult = await googleDnsOverHttps(domain, type); | ||
return dnsResult; | ||
} | ||
}, "domainResolve"); | ||
// src/domainExists.ts | ||
var domainExists = /* @__PURE__ */ __name(async (domain) => { | ||
if (domain === void 0) return false; | ||
const dnsResult = await domainResolve(domain); | ||
return dnsResult?.Status === DnsReturnCode.NoError; | ||
}, "domainExists"); | ||
export { | ||
DnsRecordType, | ||
DnsReturnCode, | ||
domainExists, | ||
domainResolve, | ||
googleDnsOverHttps | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,63 @@ | ||
var N=Object.defineProperty;var r=(t,o)=>N(t,"name",{value:o,configurable:!0});var m;(function(t){t[t.A=1]="A",t[t.AAAA=28]="AAAA",t[t.CAA=257]="CAA",t[t.CNAME=5]="CNAME",t[t.DNAME=39]="DNAME",t[t.MX=15]="MX",t[t.NS=2]="NS",t[t.PTR=12]="PTR",t[t.SOA=6]="SOA",t[t.SPF=99]="SPF",t[t.SRV=33]="SRV",t[t.TXT=16]="TXT"})(m||(m={}));var a;(function(t){t[t.NoError=0]="NoError",t[t.QueryFormatError=1]="QueryFormatError",t[t.ServerFailed=2]="ServerFailed",t[t.DomainDoesNotExist=3]="DomainDoesNotExist",t[t.NotImplemented=4]="NotImplemented",t[t.Refused=5]="Refused",t[t.NameShouldNotExist=6]="NameShouldNotExist",t[t.RRSetShouldNotExist=7]="RRSetShouldNotExist",t[t.NotAuthoratative=8]="NotAuthoratative",t[t.NotInZone=9]="NotInZone"})(a||(a={}));import{axios as f}from"@xylabs/axios";var i=r(async(t,o=m.A)=>(await f.get(`https://dns.google/resolve?name=${t}&type=${o}`)).data,"googleDnsOverHttps");var A=r(async(t,o=m.A)=>{if(t)return await i(t,o)},"domainResolve");var X=r(async t=>t===void 0?!1:(await A(t))?.Status===a.NoError,"domainExists");export{m as DnsRecordType,a as DnsReturnCode,X as domainExists,A as domainResolve,i as googleDnsOverHttps}; | ||
var __defProp = Object.defineProperty; | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
// src/DnsRecordType.ts | ||
var DnsRecordType; | ||
(function(DnsRecordType2) { | ||
DnsRecordType2[DnsRecordType2["A"] = 1] = "A"; | ||
DnsRecordType2[DnsRecordType2["AAAA"] = 28] = "AAAA"; | ||
DnsRecordType2[DnsRecordType2["CAA"] = 257] = "CAA"; | ||
DnsRecordType2[DnsRecordType2["CNAME"] = 5] = "CNAME"; | ||
DnsRecordType2[DnsRecordType2["DNAME"] = 39] = "DNAME"; | ||
DnsRecordType2[DnsRecordType2["MX"] = 15] = "MX"; | ||
DnsRecordType2[DnsRecordType2["NS"] = 2] = "NS"; | ||
DnsRecordType2[DnsRecordType2["PTR"] = 12] = "PTR"; | ||
DnsRecordType2[DnsRecordType2["SOA"] = 6] = "SOA"; | ||
DnsRecordType2[DnsRecordType2["SPF"] = 99] = "SPF"; | ||
DnsRecordType2[DnsRecordType2["SRV"] = 33] = "SRV"; | ||
DnsRecordType2[DnsRecordType2["TXT"] = 16] = "TXT"; | ||
})(DnsRecordType || (DnsRecordType = {})); | ||
// src/DnsReturnCode.ts | ||
var DnsReturnCode; | ||
(function(DnsReturnCode2) { | ||
DnsReturnCode2[DnsReturnCode2["NoError"] = 0] = "NoError"; | ||
DnsReturnCode2[DnsReturnCode2["QueryFormatError"] = 1] = "QueryFormatError"; | ||
DnsReturnCode2[DnsReturnCode2["ServerFailed"] = 2] = "ServerFailed"; | ||
DnsReturnCode2[DnsReturnCode2["DomainDoesNotExist"] = 3] = "DomainDoesNotExist"; | ||
DnsReturnCode2[DnsReturnCode2["NotImplemented"] = 4] = "NotImplemented"; | ||
DnsReturnCode2[DnsReturnCode2["Refused"] = 5] = "Refused"; | ||
DnsReturnCode2[DnsReturnCode2["NameShouldNotExist"] = 6] = "NameShouldNotExist"; | ||
DnsReturnCode2[DnsReturnCode2["RRSetShouldNotExist"] = 7] = "RRSetShouldNotExist"; | ||
DnsReturnCode2[DnsReturnCode2["NotAuthoratative"] = 8] = "NotAuthoratative"; | ||
DnsReturnCode2[DnsReturnCode2["NotInZone"] = 9] = "NotInZone"; | ||
})(DnsReturnCode || (DnsReturnCode = {})); | ||
// src/googleDnsOverHttps.ts | ||
import { axios } from "@xylabs/axios"; | ||
var googleDnsOverHttps = /* @__PURE__ */ __name(async (name, type = DnsRecordType.A) => { | ||
return (await axios.get(`https://dns.google/resolve?name=${name}&type=${type}`)).data; | ||
}, "googleDnsOverHttps"); | ||
// src/domainResolve.ts | ||
var domainResolve = /* @__PURE__ */ __name(async (domain, type = DnsRecordType.A) => { | ||
if (domain) { | ||
const dnsResult = await googleDnsOverHttps(domain, type); | ||
return dnsResult; | ||
} | ||
}, "domainResolve"); | ||
// src/domainExists.ts | ||
var domainExists = /* @__PURE__ */ __name(async (domain) => { | ||
if (domain === void 0) return false; | ||
const dnsResult = await domainResolve(domain); | ||
return dnsResult?.Status === DnsReturnCode.NoError; | ||
}, "domainExists"); | ||
export { | ||
DnsRecordType, | ||
DnsReturnCode, | ||
domainExists, | ||
domainResolve, | ||
googleDnsOverHttps | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,63 @@ | ||
var N=Object.defineProperty;var r=(t,o)=>N(t,"name",{value:o,configurable:!0});var m;(function(t){t[t.A=1]="A",t[t.AAAA=28]="AAAA",t[t.CAA=257]="CAA",t[t.CNAME=5]="CNAME",t[t.DNAME=39]="DNAME",t[t.MX=15]="MX",t[t.NS=2]="NS",t[t.PTR=12]="PTR",t[t.SOA=6]="SOA",t[t.SPF=99]="SPF",t[t.SRV=33]="SRV",t[t.TXT=16]="TXT"})(m||(m={}));var a;(function(t){t[t.NoError=0]="NoError",t[t.QueryFormatError=1]="QueryFormatError",t[t.ServerFailed=2]="ServerFailed",t[t.DomainDoesNotExist=3]="DomainDoesNotExist",t[t.NotImplemented=4]="NotImplemented",t[t.Refused=5]="Refused",t[t.NameShouldNotExist=6]="NameShouldNotExist",t[t.RRSetShouldNotExist=7]="RRSetShouldNotExist",t[t.NotAuthoratative=8]="NotAuthoratative",t[t.NotInZone=9]="NotInZone"})(a||(a={}));import{axios as f}from"@xylabs/axios";var i=r(async(t,o=m.A)=>(await f.get(`https://dns.google/resolve?name=${t}&type=${o}`)).data,"googleDnsOverHttps");var A=r(async(t,o=m.A)=>{if(t)return await i(t,o)},"domainResolve");var w=r(async t=>{if(t===void 0)return!1;let o=await A(t);return(o==null?void 0:o.Status)===a.NoError},"domainExists");export{m as DnsRecordType,a as DnsReturnCode,w as domainExists,A as domainResolve,i as googleDnsOverHttps}; | ||
var __defProp = Object.defineProperty; | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
// src/DnsRecordType.ts | ||
var DnsRecordType; | ||
(function(DnsRecordType2) { | ||
DnsRecordType2[DnsRecordType2["A"] = 1] = "A"; | ||
DnsRecordType2[DnsRecordType2["AAAA"] = 28] = "AAAA"; | ||
DnsRecordType2[DnsRecordType2["CAA"] = 257] = "CAA"; | ||
DnsRecordType2[DnsRecordType2["CNAME"] = 5] = "CNAME"; | ||
DnsRecordType2[DnsRecordType2["DNAME"] = 39] = "DNAME"; | ||
DnsRecordType2[DnsRecordType2["MX"] = 15] = "MX"; | ||
DnsRecordType2[DnsRecordType2["NS"] = 2] = "NS"; | ||
DnsRecordType2[DnsRecordType2["PTR"] = 12] = "PTR"; | ||
DnsRecordType2[DnsRecordType2["SOA"] = 6] = "SOA"; | ||
DnsRecordType2[DnsRecordType2["SPF"] = 99] = "SPF"; | ||
DnsRecordType2[DnsRecordType2["SRV"] = 33] = "SRV"; | ||
DnsRecordType2[DnsRecordType2["TXT"] = 16] = "TXT"; | ||
})(DnsRecordType || (DnsRecordType = {})); | ||
// src/DnsReturnCode.ts | ||
var DnsReturnCode; | ||
(function(DnsReturnCode2) { | ||
DnsReturnCode2[DnsReturnCode2["NoError"] = 0] = "NoError"; | ||
DnsReturnCode2[DnsReturnCode2["QueryFormatError"] = 1] = "QueryFormatError"; | ||
DnsReturnCode2[DnsReturnCode2["ServerFailed"] = 2] = "ServerFailed"; | ||
DnsReturnCode2[DnsReturnCode2["DomainDoesNotExist"] = 3] = "DomainDoesNotExist"; | ||
DnsReturnCode2[DnsReturnCode2["NotImplemented"] = 4] = "NotImplemented"; | ||
DnsReturnCode2[DnsReturnCode2["Refused"] = 5] = "Refused"; | ||
DnsReturnCode2[DnsReturnCode2["NameShouldNotExist"] = 6] = "NameShouldNotExist"; | ||
DnsReturnCode2[DnsReturnCode2["RRSetShouldNotExist"] = 7] = "RRSetShouldNotExist"; | ||
DnsReturnCode2[DnsReturnCode2["NotAuthoratative"] = 8] = "NotAuthoratative"; | ||
DnsReturnCode2[DnsReturnCode2["NotInZone"] = 9] = "NotInZone"; | ||
})(DnsReturnCode || (DnsReturnCode = {})); | ||
// src/googleDnsOverHttps.ts | ||
import { axios } from "@xylabs/axios"; | ||
var googleDnsOverHttps = /* @__PURE__ */ __name(async (name, type = DnsRecordType.A) => { | ||
return (await axios.get(`https://dns.google/resolve?name=${name}&type=${type}`)).data; | ||
}, "googleDnsOverHttps"); | ||
// src/domainResolve.ts | ||
var domainResolve = /* @__PURE__ */ __name(async (domain, type = DnsRecordType.A) => { | ||
if (domain) { | ||
const dnsResult = await googleDnsOverHttps(domain, type); | ||
return dnsResult; | ||
} | ||
}, "domainResolve"); | ||
// src/domainExists.ts | ||
var domainExists = /* @__PURE__ */ __name(async (domain) => { | ||
if (domain === void 0) return false; | ||
const dnsResult = await domainResolve(domain); | ||
return (dnsResult == null ? void 0 : dnsResult.Status) === DnsReturnCode.NoError; | ||
}, "domainExists"); | ||
export { | ||
DnsRecordType, | ||
DnsReturnCode, | ||
domainExists, | ||
domainResolve, | ||
googleDnsOverHttps | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -17,4 +17,4 @@ { | ||
"devDependencies": { | ||
"@xylabs/ts-scripts-yarn3": "^3.11.9", | ||
"@xylabs/tsconfig": "^3.11.9", | ||
"@xylabs/ts-scripts-yarn3": "^3.11.10", | ||
"@xylabs/tsconfig": "^3.11.10", | ||
"typescript": "^5.5.2" | ||
@@ -60,4 +60,4 @@ }, | ||
"sideEffects": false, | ||
"version": "2.107.3", | ||
"version": "2.107.4", | ||
"type": "module" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
100931
747
0
375