refactor: centralize account bindings + health probes

This commit is contained in:
Peter Steinberger
2026-01-17 01:13:46 +00:00
parent 99aba3a5c4
commit f14d622c0f
12 changed files with 877 additions and 164 deletions

View File

@@ -34,6 +34,34 @@ export const LEGACY_CONFIG_MIGRATIONS_PART_1: LegacyConfigMigration[] = [
}
},
},
{
id: "bindings.match.accountID->bindings.match.accountId",
describe: "Move bindings[].match.accountID to bindings[].match.accountId",
apply: (raw, changes) => {
const bindings = Array.isArray(raw.bindings) ? raw.bindings : null;
if (!bindings) return;
let touched = false;
for (const entry of bindings) {
if (!isRecord(entry)) continue;
const match = getRecord(entry.match);
if (!match) continue;
if (match.accountId !== undefined) continue;
const accountID =
typeof match.accountID === "string" ? match.accountID.trim() : match.accountID;
if (!accountID) continue;
match.accountId = accountID;
delete match.accountID;
entry.match = match;
touched = true;
}
if (touched) {
raw.bindings = bindings;
changes.push("Moved bindings[].match.accountID → bindings[].match.accountId.");
}
},
},
{
id: "session.sendPolicy.rules.match.provider->match.channel",
describe: "Move session.sendPolicy.rules[].match.provider to match.channel",