live read run fixes: Xcode-managed profiles in signing, TestFlight-only release trains, scan skips agent worktrees and takes an absolute --config, --all-pages paging meta, iap-submit json, report hints

This commit is contained in:
CRTkafa 2026-10-11 17:24:56 +00:00
parent 0856f2d1b2
commit 3a775f7808
15 changed files with 282 additions and 30 deletions

View file

@ -62,7 +62,18 @@ export async function run(ctx: Ctx): Promise<void> {
if (!/READY_FOR_SALE|READY_FOR_DISTRIBUTION|PENDING_DEVELOPER_RELEASE|PENDING_APPLE_RELEASE|ACCEPTED/.test(st)) continue;
phased[v.id] = (await c.maybe(`/v1/appStoreVersions/${v.id}/appStoreVersionPhasedRelease`))?.data ?? null;
}
printJson({ app, versions, builds: builds.data, iaps, subs, phased });
// builds attached to a version but older than the five newest (so the train shows their number too)
const known = new Set((builds.data as { id: string }[]).map(b => b.id));
const missing = [...new Set(versions.map(v => v.relationships?.build?.data?.id).filter((id): id is string => !!id && !known.has(id)))];
const attachedBuilds = missing.length ? ((await c.asc('GET', `/v1/builds?filter[id]=${missing.join(',')}&limit=${missing.length}`)).data ?? []) : [];
// build id -> marketing version (CFBundleShortVersionString): a TestFlight-only version is a train at "testing"
const buildVersions: Record<string, string> = {};
const pre = new Map(((builds.included ?? []) as { id: string; type?: string; attributes?: { version?: string } }[]).map(p => [p.id, p.attributes?.version] as const));
for (const b of builds.data as { id: string; relationships?: { preReleaseVersion?: { data?: { id?: string } } } }[]) {
const v = pre.get(b.relationships?.preReleaseVersion?.data?.id ?? '');
if (v) buildVersions[b.id] = v;
}
printJson({ app, versions, builds: builds.data, attachedBuilds, buildVersions, iaps, subs, phased });
return;
}