Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

function matchesParentDomain (srvAddress: string, parentDomain: string): boolean {
const regex = /^.*?\./;
const srv = `.${srvAddress.replace(regex, '')}`;
const parent = `.${parentDomain.replace(regex, '')}`;
const srv = `.${(srvAddress.endsWith(".") ? srvAddress.slice(0, -1) : srvAddress).replace(regex, "")}`;

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 12.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 12.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 14.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 14.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (macos-latest, 16.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (macos-latest, 16.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 16.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 16.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 16.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 16.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 14.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 14.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 12.x)

Strings must use singlequote

Check failure on line 18 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 12.x)

Strings must use singlequote
const parent = `.${(parentDomain.endsWith(".") ? parentDomain.slice(0, -1) : parentDomain).replace(regex, "")}`;

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 12.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 12.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 14.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 14.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (macos-latest, 16.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (macos-latest, 16.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 16.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 16.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 16.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 16.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 14.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 14.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 12.x)

Strings must use singlequote

Check failure on line 19 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 12.x)

Strings must use singlequote
return srv.endsWith(parent);
}

Expand All @@ -39,7 +39,7 @@
let records: string[][] | undefined;
try {
records = await promisify(dns.resolveTxt)(lookupAddress);
} catch (err: any) {

Check warning on line 42 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 12.x)

Unexpected any. Specify a different type

Check warning on line 42 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 14.x)

Unexpected any. Specify a different type

Check warning on line 42 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (macos-latest, 16.x)

Unexpected any. Specify a different type

Check warning on line 42 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, 16.x)

Unexpected any. Specify a different type

Check warning on line 42 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 16.x)

Unexpected any. Specify a different type

Check warning on line 42 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 14.x)

Unexpected any. Specify a different type

Check warning on line 42 in src/index.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest, 12.x)

Unexpected any. Specify a different type
if (err?.code && (err.code !== 'ENODATA' && err.code !== 'ENOTFOUND')) {
throw err;
}
Expand Down
Loading