Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
6286bfaa8f | |||
9390bbae61 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartdns",
|
"name": "@pushrocks/smartdns",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"description": "smart dns methods written in TypeScript",
|
"description": "smart dns methods written in TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
@ -34,6 +34,13 @@ export class Smartdns {
|
|||||||
this._setDnsProvider(dnsProviderArg);
|
this._setDnsProvider(dnsProviderArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check a dns record until it has propagated to Google DNS
|
||||||
|
* should be considerably fast
|
||||||
|
* @param recordNameArg
|
||||||
|
* @param recordTypeArg
|
||||||
|
* @param expectedValue
|
||||||
|
*/
|
||||||
async checkUntilAvailable(
|
async checkUntilAvailable(
|
||||||
recordNameArg: string,
|
recordNameArg: string,
|
||||||
recordTypeArg: TDnsRecordType,
|
recordTypeArg: TDnsRecordType,
|
||||||
@ -45,7 +52,7 @@ export class Smartdns {
|
|||||||
cycleArg++;
|
cycleArg++;
|
||||||
try {
|
try {
|
||||||
let myRecordArray = await this.getRecord(recordNameArg, recordTypeArg);
|
let myRecordArray = await this.getRecord(recordNameArg, recordTypeArg);
|
||||||
let myRecord = myRecordArray[0].value;
|
let myRecord = myRecordArray[0].value[0];
|
||||||
if (myRecord === expectedValue) {
|
if (myRecord === expectedValue) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user