chore(debug): TEMP dump Ford subgroup object keys/leaf

This commit is contained in:
2026-06-05 17:15:35 +03:00
parent e22b8820f9
commit 9c3f3bf970

View File

@@ -1819,7 +1819,16 @@ export class PL24FordLegacyService {
this.logger.warn(`FORD-MAP L2 maingroups=${mgs.length}: ${JSON.stringify(mgs.slice(0, 4).map((x: any) => ({ c: x.caption, u: (x.jsonUrl || "").slice(0, 60) })))}`);
if (mgs[0]?.jsonUrl) {
const sg = await this.fetchP4Page(mgs[0].jsonUrl, serviceName, false);
this.logger.warn(`FORD-MAP L3 sub raw(1400): ${sg?.slice(0, 1400)}`);
let sgj: any = null;
try {
sgj = JSON.parse(sg as string);
} catch {}
const subs = sgj?.subgroups || [];
const withUrl = subs.filter((x: any) => x.jsonUrl).length;
this.logger.warn(`FORD-MAP L3 subs=${subs.length} withJsonUrl=${withUrl} firstObj=${JSON.stringify(subs[0])}`);
// try to fetch parts for a leaf (jsonUrl null) — probe candidate endpoints
const leaf = subs.find((x: any) => !x.jsonUrl) || subs[0];
if (leaf) this.logger.warn(`FORD-MAP leaf keys=${Object.keys(leaf).join(",")} id=${leaf.id} url=${leaf.url}`);
}
}
}