Add support for custom fetch function and/or IANA bootstrap data (#21)

This commit is contained in:
2025-10-30 19:07:12 -04:00
committed by GitHub
parent acae007a4a
commit 619185b5d6
22 changed files with 1346 additions and 163 deletions
+8 -3
View File
@@ -155,7 +155,12 @@ export function normalizeWhois(
map.eppstatus || // .fr
[];
const statuses = statusLines.length
? statusLines.map((line) => ({ status: line.split(/\s+/)[0], raw: line }))
? statusLines
.map((line) => {
const status = line.split(/\s+/)[0];
return status ? { status, raw: line } : null;
})
.filter((s): s is { status: string; raw: string } => s !== null)
: undefined;
// Nameservers: also appear as "nserver" on some ccTLDs (.de, .ru) and as "name server"
@@ -219,8 +224,8 @@ export function normalizeWhois(
: undefined;
// Simple lock derivation from statuses
const transferLock = !!statuses?.some((s) =>
/transferprohibited/i.test(s.status),
const transferLock = !!statuses?.some(
(s) => s.status && /transferprohibited/i.test(s.status),
);
const record: DomainRecord = {