logical.importZonefunctionno test imports itfunction importZone(source: string, text: string, origin?: string): FoundThe names of a zone as domains, with the links of its CNAMEs. origin is the zone's name where the text does not say it.
DNS zone files (the master file format of RFC 1035): every name that owns a record is a domain (signed where its zone has a DNSKEY at the apex), and a CNAME to another name of the zone links the two (resolves-to). The zone is read as text: $ORIGIN and $TTL are honoured, a record may span lines in parentheses, a missing owner is the one before, and a comment is dropped. Addresses and text are not copied.
import { importZone } from "./dns.ts";
importZone("z.db", "$ORIGIN example.test.\nwww IN A 192.0.2.1\n").assets.length; // 1logical.importZonefunctionno test imports itfunction importZone(source: string, text: string, origin?: string): FoundThe names of a zone as domains, with the links of its CNAMEs. origin is the zone's name where the text does not say it.
importZonefunctionfunction importZone(source: string, text: string, origin?: string): FoundThe names of a zone as domains, with the links of its CNAMEs. origin is the zone's name where the text does not say it.