apple: macOS (tvOS, visionOS) versions are no longer invisible: every version and review submission lookup is per platform; status, listing, listing pull, resubmit, submit, release and screenshots take --platform and otherwise pick the platform that has the version they need (refuse naming both when several do); status, validate, release status, the report and the desktop label versions with their platform; MCP and owner actions get platform; pitfall 77

This commit is contained in:
CRTkafa 2026-10-20 03:00:05 +07:00
parent 1736300784
commit 47dfd372fe
30 changed files with 423 additions and 127 deletions

View file

@ -63,6 +63,18 @@ export function phasedFraction(p: { state?: string; currentDayNumber?: number |
return d ? PHASED_SCHEDULE[d - 1]! : p.state === 'INACTIVE' ? 0 : null;
}
const OTHER_PLATFORM: Record<string, string> = { MAC_OS: 'macOS', TV_OS: 'tvOS', VISION_OS: 'visionOS' };
/** Versions of the app's other App Store platforms (macOS, tvOS, visionOS) that are not live or replaced: the train
* is iOS, so these are named as warnings ("macOS 0.8.7: REJECTED") instead of being invisible. Pure. */
export function applePlatformWarnings(data: unknown): string[] {
const versions = ((data as J)?.versions ?? []) as J[];
return versions.filter(v => typeof v?.attributes?.versionString === 'string' && OTHER_PLATFORM[v.attributes.platform ?? 'IOS'])
.map(v => ({ v, state: String(v.attributes.appVersionState ?? v.attributes.appStoreState ?? 'UNKNOWN') }))
.filter(({ state }) => !/READY_FOR_SALE|READY_FOR_DISTRIBUTION|REPLACED_WITH_NEW_VERSION|REMOVED_FROM_SALE/.test(state))
.map(({ v, state }) => `App Store ${OTHER_PLATFORM[v.attributes.platform]} ${v.attributes.versionString}: ${state} (storebound apple status --platform ${OTHER_PLATFORM[v.attributes.platform]!.toLowerCase()})`);
}
export function appleReleases(data: unknown): StoreRelease[] {
const versions = ((data as J)?.versions ?? []) as J[];
const recent = (((data as J)?.builds ?? []) as J[]);
@ -79,7 +91,7 @@ export function appleReleases(data: unknown): StoreRelease[] {
// live but still rolling out (phased release on, not complete): the same as a Play staged rollout
if (phase === 'live' && prState === 'ACTIVE') phase = 'rollout';
if (phase === 'live' && prState === 'PAUSED') phase = 'halted';
const r: StoreRelease = { store: 'ios', version: v.attributes.versionString as string, build: (buildId && builds.get(buildId)) ? String(builds.get(buildId)) : null, state, phase, fraction, track: null };
const r: StoreRelease = { store: 'ios', platform: 'IOS', version: v.attributes.versionString as string, build: (buildId && builds.get(buildId)) ? String(builds.get(buildId)) : null, state, phase, fraction, track: null };
if (prState) r.phased = { state: prState, day };
if (typeof v.attributes.createdDate === 'string') r.date = v.attributes.createdDate;
return r;