domain-alive 0.1.11 → 0.1.12
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.js +6 -4
- package/dist/index.mjs +6 -4
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1320,6 +1320,7 @@ const sharedNullResponse = Object.freeze({
|
|
|
1320
1320
|
factor: retryFactor
|
|
1321
1321
|
};
|
|
1322
1322
|
const mutex = createAsyncMutex();
|
|
1323
|
+
const dnsClients = getDnsClients(dnsServers);
|
|
1323
1324
|
return async function isRegisterableDomainAlive(domain) {
|
|
1324
1325
|
domain = url.domainToASCII(domain);
|
|
1325
1326
|
return mutex(domain, ()=>cacheApply(registerableDomainResultCache, domain, async ()=>{
|
|
@@ -1350,9 +1351,9 @@ tencentcloud.com. 86400 IN SOA ns-tel1.qq.com. webmaster.qq.com. 165111089
|
|
|
1350
1351
|
;; WHEN: Fri Aug 22 00:26:29 CST 2025
|
|
1351
1352
|
;; MSG SIZE rcvd: 468
|
|
1352
1353
|
*/ // dns servers get shuffled every time called
|
|
1353
|
-
const shuffledDnsClients =
|
|
1354
|
+
const shuffledDnsClients = shuffleArray.shuffleArray(dnsClients, {
|
|
1354
1355
|
copy: true
|
|
1355
|
-
})
|
|
1356
|
+
});
|
|
1356
1357
|
let attempts = 0;
|
|
1357
1358
|
let confirmations = 0;
|
|
1358
1359
|
while(attempts < maxAttempts){
|
|
@@ -1425,6 +1426,7 @@ function createDomainAliveChecker(options = {}) {
|
|
|
1425
1426
|
factor: retryFactor
|
|
1426
1427
|
};
|
|
1427
1428
|
const mutex = createAsyncMutex();
|
|
1429
|
+
const dnsClients = getDnsClients(dnsServers);
|
|
1428
1430
|
return async function isDomainAlive(domain) {
|
|
1429
1431
|
domain = url.domainToASCII(domain);
|
|
1430
1432
|
const registerableDomainAliveResult = await isRegisterableDomainAlive(domain);
|
|
@@ -1448,9 +1450,9 @@ function createDomainAliveChecker(options = {}) {
|
|
|
1448
1450
|
}
|
|
1449
1451
|
return mutex(domain, ()=>cacheApply(resultCache, domain, async ()=>{
|
|
1450
1452
|
// shuffle every time is called
|
|
1451
|
-
const shuffledDnsClients =
|
|
1453
|
+
const shuffledDnsClients = shuffleArray.shuffleArray(dnsClients, {
|
|
1452
1454
|
copy: true
|
|
1453
|
-
})
|
|
1455
|
+
});
|
|
1454
1456
|
{
|
|
1455
1457
|
// IPv4
|
|
1456
1458
|
let attempts = 0;
|
package/dist/index.mjs
CHANGED
|
@@ -1313,6 +1313,7 @@ const sharedNullResponse = Object.freeze({
|
|
|
1313
1313
|
factor: retryFactor
|
|
1314
1314
|
};
|
|
1315
1315
|
const mutex = createAsyncMutex();
|
|
1316
|
+
const dnsClients = getDnsClients(dnsServers);
|
|
1316
1317
|
return async function isRegisterableDomainAlive(domain) {
|
|
1317
1318
|
domain = domainToASCII(domain);
|
|
1318
1319
|
return mutex(domain, ()=>cacheApply(registerableDomainResultCache, domain, async ()=>{
|
|
@@ -1343,9 +1344,9 @@ tencentcloud.com. 86400 IN SOA ns-tel1.qq.com. webmaster.qq.com. 165111089
|
|
|
1343
1344
|
;; WHEN: Fri Aug 22 00:26:29 CST 2025
|
|
1344
1345
|
;; MSG SIZE rcvd: 468
|
|
1345
1346
|
*/ // dns servers get shuffled every time called
|
|
1346
|
-
const shuffledDnsClients =
|
|
1347
|
+
const shuffledDnsClients = shuffleArray(dnsClients, {
|
|
1347
1348
|
copy: true
|
|
1348
|
-
})
|
|
1349
|
+
});
|
|
1349
1350
|
let attempts = 0;
|
|
1350
1351
|
let confirmations = 0;
|
|
1351
1352
|
while(attempts < maxAttempts){
|
|
@@ -1418,6 +1419,7 @@ function createDomainAliveChecker(options = {}) {
|
|
|
1418
1419
|
factor: retryFactor
|
|
1419
1420
|
};
|
|
1420
1421
|
const mutex = createAsyncMutex();
|
|
1422
|
+
const dnsClients = getDnsClients(dnsServers);
|
|
1421
1423
|
return async function isDomainAlive(domain) {
|
|
1422
1424
|
domain = domainToASCII(domain);
|
|
1423
1425
|
const registerableDomainAliveResult = await isRegisterableDomainAlive(domain);
|
|
@@ -1441,9 +1443,9 @@ function createDomainAliveChecker(options = {}) {
|
|
|
1441
1443
|
}
|
|
1442
1444
|
return mutex(domain, ()=>cacheApply(resultCache, domain, async ()=>{
|
|
1443
1445
|
// shuffle every time is called
|
|
1444
|
-
const shuffledDnsClients =
|
|
1446
|
+
const shuffledDnsClients = shuffleArray(dnsClients, {
|
|
1445
1447
|
copy: true
|
|
1446
|
-
})
|
|
1448
|
+
});
|
|
1447
1449
|
{
|
|
1448
1450
|
// IPv4
|
|
1449
1451
|
let attempts = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "domain-alive",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "A Node.js library for checking if an FQDN (Fully Qualified Domain Name) is alive or not, uses a combination techniques of `NS` records, WHOIS/RDAP lookups, `A/AAAA` records",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"debug": "4.4.1",
|
|
34
34
|
"dns2": "github:lsongdev/node-dns#3adb7e91b3101c0e4f43ebaca3a568269ea04d11",
|
|
35
|
-
"foxts": "^5.0.
|
|
36
|
-
"tldts": "^7.0.
|
|
35
|
+
"foxts": "^5.0.2",
|
|
36
|
+
"tldts": "^7.0.19"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@eslint-sukka/node": "^8.0.
|
|
39
|
+
"@eslint-sukka/node": "^8.0.5",
|
|
40
40
|
"@swc-node/register": "^1.11.1",
|
|
41
41
|
"@types/debug": "^4.1.12",
|
|
42
42
|
"@types/dns2": "^2.0.10",
|
|
43
|
-
"@types/node": "^24.10.
|
|
44
|
-
"bumpp": "^10.3.
|
|
43
|
+
"@types/node": "^24.10.1",
|
|
44
|
+
"bumpp": "^10.3.2",
|
|
45
45
|
"bunchee": "^6.6.2",
|
|
46
46
|
"eslint": "^9.39.1",
|
|
47
|
-
"eslint-config-sukka": "^8.0.
|
|
48
|
-
"eslint-formatter-sukka": "^8.0.
|
|
47
|
+
"eslint-config-sukka": "^8.0.5",
|
|
48
|
+
"eslint-formatter-sukka": "^8.0.5",
|
|
49
49
|
"typescript": "^5.9.3",
|
|
50
50
|
"whoiser": "2.0.0-beta.8"
|
|
51
51
|
},
|