@xyo-network/dns 5.2.18 → 5.2.19
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/neutral/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/DnsRecordType.ts","../../src/DnsReturnCode.ts","../../src/domainResolve.ts","../../src/googleDnsOverHttps.ts","../../src/domainExists.ts"],"sourcesContent":["export const DnsRecordType = {\n A: 1,\n AAAA: 28,\n CAA: 257,\n CNAME: 5,\n DNAME: 39,\n MX: 15,\n NS: 2,\n PTR: 12,\n SOA: 6,\n SPF: 99,\n SRV: 33,\n TXT: 16,\n} as const\n\nexport type DnsRecordType = typeof DnsRecordType[keyof typeof DnsRecordType]\n","export const DnsReturnCode = {\n NoError: 0,\n QueryFormatError: 1,\n ServerFailed: 2,\n DomainDoesNotExist: 3,\n NotImplemented: 4,\n Refused: 5,\n NameShouldNotExist: 6,\n RRSetShouldNotExist: 7,\n NotAuthoritative: 8,\n NotInZone: 9,\n}\n\nexport type DnsReturnCode = typeof DnsReturnCode[keyof typeof DnsReturnCode]\n","import { isDefined } from '@xylabs/
|
|
1
|
+
{"version":3,"sources":["../../src/DnsRecordType.ts","../../src/DnsReturnCode.ts","../../src/domainResolve.ts","../../src/googleDnsOverHttps.ts","../../src/domainExists.ts"],"sourcesContent":["export const DnsRecordType = {\n A: 1,\n AAAA: 28,\n CAA: 257,\n CNAME: 5,\n DNAME: 39,\n MX: 15,\n NS: 2,\n PTR: 12,\n SOA: 6,\n SPF: 99,\n SRV: 33,\n TXT: 16,\n} as const\n\nexport type DnsRecordType = typeof DnsRecordType[keyof typeof DnsRecordType]\n","export const DnsReturnCode = {\n NoError: 0,\n QueryFormatError: 1,\n ServerFailed: 2,\n DomainDoesNotExist: 3,\n NotImplemented: 4,\n Refused: 5,\n NameShouldNotExist: 6,\n RRSetShouldNotExist: 7,\n NotAuthoritative: 8,\n NotInZone: 9,\n}\n\nexport type DnsReturnCode = typeof DnsReturnCode[keyof typeof DnsReturnCode]\n","import { isDefined } from '@xylabs/sdk-js'\n\nimport { DnsRecordType } from './DnsRecordType.ts'\nimport { googleDnsOverHttps } from './googleDnsOverHttps.ts'\n\n/**\n * Resolves DNS information (resolves using DNS)\n * @param domain - string\n * @returns GoogleDnsResult\n */\nconst domainResolve = async (domain?: string, type: DnsRecordType = DnsRecordType.A) => {\n if (isDefined(domain)) {\n return await googleDnsOverHttps(domain, type)\n }\n}\n\nexport { domainResolve }\n","import { axiosJson } from '@xylabs/axios'\n\nimport { DnsRecordType } from './DnsRecordType.ts'\nimport type { GoogleDnsResult } from './GoogleDnsResult.ts'\n\nconst googleDnsOverHttps = async (name: string, type: DnsRecordType = DnsRecordType.A) => {\n return (await axiosJson.get<GoogleDnsResult>(`https://dns.google/resolve?name=${name}&type=${type}`)).data\n}\n\nexport { googleDnsOverHttps }\n","import { DnsReturnCode } from './DnsReturnCode.ts'\nimport { domainResolve } from './domainResolve.ts'\n\n/**\n * Checks if a domain exists (resolves using DNS)\n * @param domain - string\n * @returns boolean\n */\nconst domainExists = async (domain?: string) => {\n if (domain === undefined) return false\n const dnsResult = await domainResolve(domain)\n return dnsResult?.Status === DnsReturnCode.NoError\n}\n\nexport { domainExists }\n"],"mappings":";AAAO,IAAM,gBAAgB;AAAA,EAC3B,GAAG;AAAA,EACH,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;;;ACbO,IAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,WAAW;AACb;;;ACXA,SAAS,iBAAiB;;;ACA1B,SAAS,iBAAiB;AAK1B,IAAM,qBAAqB,OAAO,MAAc,OAAsB,cAAc,MAAM;AACxF,UAAQ,MAAM,UAAU,IAAqB,mCAAmC,IAAI,SAAS,IAAI,EAAE,GAAG;AACxG;;;ADGA,IAAM,gBAAgB,OAAO,QAAiB,OAAsB,cAAc,MAAM;AACtF,MAAI,UAAU,MAAM,GAAG;AACrB,WAAO,MAAM,mBAAmB,QAAQ,IAAI;AAAA,EAC9C;AACF;;;AENA,IAAM,eAAe,OAAO,WAAoB;AAC9C,MAAI,WAAW,OAAW,QAAO;AACjC,QAAM,YAAY,MAAM,cAAc,MAAM;AAC5C,SAAO,WAAW,WAAW,cAAc;AAC7C;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/dns",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.19",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"!**/*.test.*"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xylabs/axios": "~5.0.
|
|
40
|
-
"@xylabs/
|
|
39
|
+
"@xylabs/axios": "~5.0.61",
|
|
40
|
+
"@xylabs/sdk-js": "~5.0.61"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@xylabs/ts-scripts-yarn3": "~7.2.
|
|
44
|
-
"@xylabs/tsconfig": "~7.2.
|
|
43
|
+
"@xylabs/ts-scripts-yarn3": "~7.2.32",
|
|
44
|
+
"@xylabs/tsconfig": "~7.2.32",
|
|
45
45
|
"typescript": "~5.9.3"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
package/src/domainResolve.ts
CHANGED