diff --git a/dnsconfig.js b/dnsconfig.js index 833d3d6a58..b9453671ca 100644 --- a/dnsconfig.js +++ b/dnsconfig.js @@ -111,7 +111,7 @@ for (var subdomain in domains) { subdomainName, tlsaRecord.usage, tlsaRecord.selector, - tlsaRecord.matchingType, + tlsaRecord.matching_type, tlsaRecord.certificate ) ); @@ -136,6 +136,10 @@ for (var subdomain in domains) { // Manage service records if (data.services) { + if (data.services.bluesky) { + records.push(TXT("_atproto." + subdomainName, "\"" + data.services.bluesky + "\"")); + } + if (data.services.discord) { if (Array.isArray(data.services.discord)) { for (var txt in data.services.discord) { @@ -146,20 +150,6 @@ for (var subdomain in domains) { } } - if (data.services.vercel) { - if (Array.isArray(data.services.vercel)) { - for (var txt in data.services.vercel) { - records.push(TXT("_vercel." + subdomainName, "\"" + data.services.vercel[txt] + "\"")); - } - } else { - records.push(TXT("_vercel." + subdomainName, "\"" + data.services.vercel + "\"")); - } - } - - if (data.services.bluesky) { - records.push(TXT("_atproto." + subdomainName, "\"" + data.services.bluesky + "\"")); - } - if (data.services.gitlab) { if (Array.isArray(data.services.gitlab)) { for (var txt in data.services.gitlab) { @@ -169,6 +159,16 @@ for (var subdomain in domains) { records.push(TXT("_gitlab-pages-verification-code." + subdomainName, "\"" + data.services.gitlab + "\"")); } } + + if (data.services.vercel) { + if (Array.isArray(data.services.vercel)) { + for (var txt in data.services.vercel) { + records.push(TXT("_vercel." + subdomainName, "\"" + data.services.vercel[txt] + "\"")); + } + } else { + records.push(TXT("_vercel." + subdomainName, "\"" + data.services.vercel + "\"")); + } + } } } diff --git a/tests/records.test.js b/tests/records.test.js index 773de6bb61..38a0108878 100644 --- a/tests/records.test.js +++ b/tests/records.test.js @@ -212,8 +212,8 @@ function validateRecordValues(t, data, file) { `${file}: Invalid selector for ${key} at index ${idx}` ); t.true( - Number.isInteger(record.matchingType) && record.matchingType >= 0 && record.matchingType <= 255, - `${file}: Invalid matchingType for ${key} at index ${idx}` + Number.isInteger(record.matching_type) && record.matching_type >= 0 && record.matching_type <= 255, + `${file}: Invalid matching_type for ${key} at index ${idx}` ); t.true( isValidHexadecimal(record.certificate),