apple.macos listing / review notes per platform + iOS-only claim warnings; apple upload of a .pkg: bounded pkgutil, macOS processing wait, heartbeats; release 409 pattern

This commit is contained in:
CRTkafa 2026-11-03 23:30:59 +07:00
parent 53d57544bf
commit 1e47c2ee60
18 changed files with 417 additions and 63 deletions

View file

@ -1,10 +1,11 @@
// App Review information on the editable version: contact, demo account, notes. Idempotent.
// storebound apple review-details [--contact-from <Apple ID of another app>] [--dry]
// storebound apple review-details [--platform ios|macos|tvos|visionos] [--contact-from <Apple ID of another app>] [--dry]
// The contact (name, phone, email) is personal data, so it is never in the config: it comes from
// .storebound/credentials.json "reviewContact", or is copied from another app of the same team with --contact-from.
// Demo account (reviewAccess.signInRequired: true): "reviewDemoAccount" in .storebound/credentials.json or
// REVIEW_DEMO_USER / REVIEW_DEMO_PASSWORD; masked in every log line. Notes: apple.info.reviewNotes plus
// reviewAccess.instructions and accounts.inApp (lib/review-details.ts).
// reviewAccess.instructions and accounts.inApp (lib/review-details.ts). --platform macos: apple.macos.reviewNotes
// replaces apple.info.reviewNotes when set (a Mac app may have no Game Center, IAP or ads).
import { refuseTemplate } from '../lib/template-answers';
import type { Ctx } from '../lib/ctx';
import { need } from '../lib/ctx';
@ -12,7 +13,8 @@ import { findReviewContact, maskSecret, maskUser, noContactMessage, reviewDemoAc
import { reviewDetailPlan } from '../lib/review-details';
import { done, log } from '../lib/log';
import { createOnce } from '../lib/upsert';
import { ascClient } from './asc';
import { ascClient, EDITABLE, type J } from './asc';
import { allVersions, parsePlatform, pickPlatform, platformLabel } from './platform';
type Attrs = Record<string, unknown>;
const shown = (k: string, v: unknown): string => {
@ -36,8 +38,10 @@ export async function run(ctx: Ctx): Promise<void> {
const { config, root } = ctx.loaded;
refuseTemplate(config, ['reviewNotes', 'reviewAccess', 'accounts'], 'apple review-details (App Review notes, demo account requirement)');
const c = await ascClient(root, need(config.apple?.bundleId, 'apple.bundleId'), config.apple?.appId);
const version = await c.editableVersion();
if (!version) throw new Error('no editable App Store version (apple listing --version x.y.z creates it)');
const appId = await c.app();
const platform = parsePlatform(ctx.args.get('platform')) ?? pickPlatform(await allVersions(c, appId), (x: J) => EDITABLE.has(x.attributes.appVersionState ?? x.attributes.appStoreState), undefined, 'an editable version');
const version = await c.editableVersion(platform);
if (!version) throw new Error(`no editable ${platformLabel(platform)} App Store version (apple listing --version x.y.z creates it)`);
let contact: Record<string, string> | null = null;
const from = ctx.args.get('contact-from');
@ -57,7 +61,7 @@ export async function run(ctx: Ctx): Promise<void> {
}
if (!contact) throw new Error(noContactMessage(root, checked));
const { attributes, summary } = reviewDetailPlan(config, contact, reviewDemoAccount(root));
const { attributes, summary } = reviewDetailPlan(config, contact, reviewDemoAccount(root), platform);
const read = async () => (await c.maybe(`/v1/appStoreVersions/${version.id}/appStoreReviewDetail`))?.data ?? null;
const cur = await read();
if (ctx.args.has('dry')) {