aboutsummaryrefslogtreecommitdiffstats
path: root/names/dns-migrate.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-11-15 21:32:02 -0700
committerAdam Soltys <[email protected]>2026-11-15 21:32:02 -0700
commit364a3b9793654b6373a4803d52dcb8019ed11a55 (patch)
tree90ea2264eb255e2abdfe447a3af028a2eb00d6d7 /names/dns-migrate.js
parent4b222a2043ff2abc0edffe553700d5f1fe9519f7 (diff)
downloadcoinosv3-server-364a3b9793654b6373a4803d52dcb8019ed11a55.tar.gz
coinosv3-server-364a3b9793654b6373a4803d52dcb8019ed11a55.zip
dns-migrate check: Bun returns a long TXT record's character-strings as separate entries; join them all (the 2,409 'mismatches' were 615-byte URIs split at 255, stored correctly in Knot)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SwkivduFDDkMmnXjZ
Diffstat (limited to 'names/dns-migrate.js')
-rw-r--r--names/dns-migrate.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/names/dns-migrate.js b/names/dns-migrate.js
index 30ee2b0..4753c9e 100644
--- a/names/dns-migrate.js
+++ b/names/dns-migrate.js
@@ -49,7 +49,9 @@ async function check() {
res.setServers([`${address}:${k.port || 53}`]);
for (const r of names().filter((x) => x.domain === domain)) {
n++;
- const got = await res.resolveTxt(recordName(r.name, domain)).then((t) => t.map((c) => c.join('')), () => []);
+ // Bun hands each character-string of a long TXT back as its own entry;
+ // a name has one record, so its strings, in order, are the value
+ const got = await res.resolveTxt(recordName(r.name, domain)).then((t) => [t.flat().join('')], () => []);
if (got.length !== 1 || got[0] !== r.uri) { bad++; if (bad <= 10) log(`mismatch ${r.key}: ${JSON.stringify(got).slice(0, 80)}`); }
}
}