@astrofoundry/pi-astro 0.40.16 → 0.40.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/specialists/dns/run.ts +2 -1
package/package.json
CHANGED
package/specialists/dns/run.ts
CHANGED
|
@@ -223,7 +223,8 @@ async function join(config: DnsConfig, args: string[]): Promise<number> {
|
|
|
223
223
|
|
|
224
224
|
const token = readSecret(SERVICE, "TECHNITIUM_TOKEN");
|
|
225
225
|
const state = await technitiumCall(config.technitiumPrimaryUrl, "/api/admin/cluster/state", {}, token, "primary");
|
|
226
|
-
|
|
226
|
+
// Technitium 15.6 returns `clusterNodes`; the API documentation still shows `nodes`.
|
|
227
|
+
const primary = ((state.response as { clusterNodes?: ClusterNode[] } | undefined)?.clusterNodes ?? []).find((n) => n.type === "Primary");
|
|
227
228
|
const primaryIp = primary?.ipAddresses?.[0];
|
|
228
229
|
if (primary === undefined || primaryIp === undefined) throw new ServiceError("the primary reports no initialized cluster");
|
|
229
230
|
|