Desktop: adapt to 0.5.0 (app.platforms, subscriptions, catalog diff), Dependencies polish, ~ for the home folder

- inspect reports platforms, subscription ids and the catalog each store should sell; app identity
  and parity follow app.platforms and per-item platforms; catalog.diff joins the JSON methods
- Portfolio: one Platforms column, compact catalog, paths truncated and shown with ~; the confirm
  dialog and run logs show ~ instead of the home folder
This commit is contained in:
CRTkafa 2026-10-11 02:15:48 +08:00
parent 61a1e832a0
commit 94d2f3d6ca
12 changed files with 60 additions and 24 deletions

View file

@ -4,12 +4,19 @@
- **Desktop machine interface** (`serve --stdio`): JSON-RPC session for the coming desktop app, built on the MCP core. - **Desktop machine interface** (`serve --stdio`): JSON-RPC session for the coming desktop app, built on the MCP core.
Typed methods with argument schemas, structured results, progress notifications, cancellation, `project.inspect` Typed methods with argument schemas, structured results, progress notifications, cancellation, `project.inspect`
and `portfolio.status` (many projects; `live` adds App Store and Play status). Writes are dry runs unless the host and `portfolio.status`: apps across iOS and Android with identity, config check, release trains (current and next
version on both stores) and catalog parity (`live` reads App Store and Play status). `system.tools` reports ffmpeg,
Chrome, Xcode tools, simctl, adb and git with versions; `STOREBOUND_TOOL_PATH` / `STOREBOUND_CHROME` point the CLI
at app-managed copies. Writes are dry runs unless the host
sends a single-use confirm token bound to the method, arguments and a short expiry (HMAC with a per-session secret sends a single-use confirm token bound to the method, arguments and a short expiry (HMAC with a per-session secret
handed over on stdin). No submit / release / publish method exists. Under `serve`, terminal confirmations always handed over on stdin). No submit / release / publish method exists. Under `serve`, terminal confirmations always
answer no. answer no.
- `--json` on `check` (and `check --aso`), `apple testflight status`, `apple ppo status`, `apple next-build`, - `--json` on `check` (and `check --aso`), `apple testflight status`, `apple ppo status`, `apple next-build`,
`play next-version-code`, `analytics compare` and `prices import` (read-only diff); new `inspect` command. `play next-version-code`, `analytics compare` and `prices import` (read-only diff); new `inspect` command.
- **Desktop app shell** (`apps/desktop`, not released yet): Tauri 2 + React 19, app-centric (Portfolio, App with
Releases / Catalog / Listings / Health / Reviews / TestFlight, App folders, Accounts, Dependencies, Settings), store
keys in the OS keychain, native confirm dialogs with the dry run before any write. See `docs/desktop.md`.
- `--json` on `catalog diff` goes through the same machine-readable result line.
- `tools/build-sidecars.ts`: single-file executables for macOS (arm64, x64), Linux (x64, arm64) and Windows (x64), - `tools/build-sidecars.ts`: single-file executables for macOS (arm64, x64), Linux (x64, arm64) and Windows (x64),
re-signed ad hoc on macOS and checked for build-machine paths. The MCP server now also runs from such a binary. re-signed ad hoc on macOS and checked for build-machine paths. The MCP server now also runs from such a binary.

View file

@ -388,7 +388,8 @@ The first request is `session.hello` with a per-session secret only the host kno
the call carries a single-use confirm token (HMAC over method, arguments and expiry) that the host mints after the the call carries a single-use confirm token (HMAC over method, arguments and expiry) that the host mints after the
owner confirmed a native dialog showing that dry run. There is no method that submits, releases or publishes; Play owner confirmed a native dialog showing that dry run. There is no method that submits, releases or publishes; Play
testing releases and phased release changes stay out of the desktop profile too. Types: `cli/lib/desktop-protocol.ts`. testing releases and phased release changes stay out of the desktop profile too. Types: `cli/lib/desktop-protocol.ts`.
`bun tools/build-sidecars.ts` compiles the CLI for macOS, Linux and Windows (`bun build --compile`). `bun tools/build-sidecars.ts` compiles the CLI for macOS, Linux and Windows (`bun build --compile`). Design, safety
model and the Dependencies screen (tool sources and licenses): [docs/desktop.md](docs/desktop.md).
## Safety model ## Safety model

View file

@ -83,7 +83,7 @@ export function AppFolders({ data }: { data: Data }) {
</select> </select>
</td> </td>
<td> <td>
<div className="actions" style={{ justifyContent: 'flex-end' }}> <div className="actions" style={{ justifyContent: 'flex-end', flexWrap: 'nowrap' }}>
<button className="btn" onClick={() => check(p)} disabled={!!busy}>Check</button> <button className="btn" onClick={() => check(p)} disabled={!!busy}>Check</button>
<button className="btn" onClick={() => gallery(p)} disabled={!!busy} title="Dry run first, then a confirmation dialog">Review gallery</button> <button className="btn" onClick={() => gallery(p)} disabled={!!busy} title="Dry run first, then a confirmation dialog">Review gallery</button>
<button className="btn btn-quiet" onClick={() => remove(p)} disabled={!!busy} aria-label={`Remove ${p.name} from the list`}>Remove</button> <button className="btn btn-quiet" onClick={() => remove(p)} disabled={!!busy} aria-label={`Remove ${p.name} from the list`}>Remove</button>

View file

@ -50,7 +50,7 @@ export function Portfolio({ data, open, go }: { data: Data; open: (p: Project) =
) : ( ) : (
<div className="card"> <div className="card">
<table> <table>
<thead><tr><th>App</th><th>iOS</th><th>Android</th><th>Live</th><th>Next</th><th>Catalog</th><th>Config</th></tr></thead> <thead><tr><th>App</th><th>Platforms</th><th>Live</th><th>Next</th><th title="In-app products · subscriptions">Catalog</th><th>Config</th></tr></thead>
<tbody> <tbody>
{data.projects.map(p => { {data.projects.map(p => {
const e = data.statusOf(p); const e = data.statusOf(p);
@ -60,11 +60,17 @@ export function Portfolio({ data, open, go }: { data: Data; open: (p: Project) =
return ( return (
<tr key={p.id}> <tr key={p.id}>
<td><button className="link name" onClick={() => open(p)}>{e?.app?.name ?? p.name}</button><div className="path selectable" title={p.path}>{shortPath(p.path, data.home)}</div></td> <td><button className="link name" onClick={() => open(p)}>{e?.app?.name ?? p.name}</button><div className="path selectable" title={p.path}>{shortPath(p.path, data.home)}</div></td>
<td className="selectable">{ios ? ios.bundleId : <span className="tag tag-muted">none</span>}{e?.storeErrors.ios && <div className="tag tag-bad" title={e.storeErrors.ios}>unreadable</div>}</td> <td>
<td className="selectable">{android ? android.packageName : <span className="tag tag-muted">none</span>}{e?.storeErrors.android && <div className="tag tag-bad" title={e.storeErrors.android}>unreadable</div>}</td> {e && (
<div className="plat">
<div><span className={`tag ${ios ? 'tag-local' : 'tag-muted'}`}>iOS</span> <span className="selectable">{ios?.bundleId ?? 'not set up'}</span>{e.storeErrors.ios && <span className="tag tag-bad" title={e.storeErrors.ios}>unreadable</span>}</div>
<div><span className={`tag ${android ? 'tag-ok' : 'tag-muted'}`}>Android</span> <span className="selectable">{android?.packageName ?? 'not set up'}</span>{e.storeErrors.android && <span className="tag tag-bad" title={e.storeErrors.android}>unreadable</span>}</div>
</div>
)}
</td>
<td className="nowrap">{e ? trainText(e.release.current, e.release.source) : ''}</td> <td className="nowrap">{e ? trainText(e.release.current, e.release.source) : ''}</td>
<td className="nowrap">{e ? trainText(e.release.next, e.release.source) : ''}</td> <td className="nowrap">{e ? trainText(e.release.next, e.release.source) : ''}</td>
<td>{cat ? <span className={`tag tag-${cat.ok ? (cat.checked === 'live' ? 'ok' : 'muted') : 'warn'}`} title={cat.checked === 'live' ? 'compared with both stores' : 'from the config; read the stores to compare'}>{cat.products} products · {cat.subscriptions} subs</span> : ''}</td> <td>{cat ? <span className={`tag tag-${cat.ok ? (cat.checked === 'live' ? 'ok' : 'muted') : 'warn'}`} title={`${cat.products} in-app products, ${cat.subscriptions} subscriptions; ${cat.checked === 'live' ? 'compared with both stores' : 'from the config, read the stores to compare'}`}>{cat.products} · {cat.subscriptions}</span> : ''}</td>
<td><span className={`tag tag-${st.tone}`} title={[...(e?.errors ?? []), ...(e?.check?.problems ?? []), ...(e?.check?.warnings ?? [])].join('\n')}>{st.text}</span></td> <td><span className={`tag tag-${st.tone}`} title={[...(e?.errors ?? []), ...(e?.check?.problems ?? []), ...(e?.check?.warnings ?? [])].join('\n')}>{st.text}</span></td>
</tr> </tr>
); );

View file

@ -117,10 +117,14 @@ th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color:
th:first-child { border-top-left-radius: var(--radius); } th:first-child { border-top-left-radius: var(--radius); }
th:last-child { border-top-right-radius: var(--radius); } th:last-child { border-top-right-radius: var(--radius); }
tr:last-child td { border-bottom: 0; } tr:last-child td { border-bottom: 0; }
td .path { color: var(--muted); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; } td .path { color: var(--muted); font-family: var(--mono); font-size: 12px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td:first-child { min-width: 180px; }
.card:has(> table) { overflow-x: auto; }
.name { font-weight: 650; } .name { font-weight: 650; }
.nowrap { white-space: nowrap; } .nowrap { white-space: nowrap; }
.plat { display: grid; gap: 6px; font-size: 13px; }
.plat .tag { min-width: 64px; text-align: center; margin-right: 6px; }
.tag { white-space: nowrap; display: inline-block; font: 700 10.5px/1 var(--mono); letter-spacing: .05em; padding: 5px 8px; border-radius: 999px; text-transform: uppercase; } .tag { white-space: nowrap; display: inline-block; font: 700 10.5px/1 var(--mono); letter-spacing: .05em; padding: 5px 8px; border-radius: 999px; text-transform: uppercase; }
.tag-ok { background: var(--ok-bg); color: var(--ok-ink); } .tag-ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag-local { background: var(--local-bg); color: var(--local-ink); } .tag-local { background: var(--local-bg); color: var(--local-ink); }

View file

@ -9,7 +9,7 @@ import { appleCurrent, pages, playProduct } from './prices';
import { ascClient, type J } from './apple/asc'; import { ascClient, type J } from './apple/asc';
import { type CatalogRow, catalogDiff, fromApplePeriod, fromAppleType, regionOf, type StoreItem, wantedCatalog } from './lib/catalog'; import { type CatalogRow, catalogDiff, fromApplePeriod, fromAppleType, regionOf, type StoreItem, wantedCatalog } from './lib/catalog';
import type { Ctx } from './lib/ctx'; import type { Ctx } from './lib/ctx';
import { done, log } from './lib/log'; import { done, log, printJson } from './lib/log';
import { fromMoney } from './lib/money'; import { fromMoney } from './lib/money';
import { listOneTimeProducts } from './play/products'; import { listOneTimeProducts } from './play/products';
import { playClient } from './play/client'; import { playClient } from './play/client';
@ -94,7 +94,7 @@ export async function run(ctx: Ctx): Promise<void> {
const play = (!store || store === 'play') && config.play ? await playItems(ctx) : null; const play = (!store || store === 'play') && config.play ? await playItems(ctx) : null;
const { rows, parity } = catalogDiff(want, { apple, play }, { threshold: a.num('threshold', 10) / 100 }); const { rows, parity } = catalogDiff(want, { apple, play }, { threshold: a.num('threshold', 10) / 100 });
const errors = rows.filter(r => r.level === 'error').length; const errors = rows.filter(r => r.level === 'error').length;
if (a.has('json')) console.log(JSON.stringify({ errors, rows, parity }, null, 2)); if (a.has('json')) printJson({ errors, rows, parity });
else { else {
console.log(formatRows(rows)); console.log(formatRows(rows));
if (parity.length) console.log(`\nprice differences between the stores (same currency, over ${a.num('threshold', 10)} %):\n` + if (parity.length) console.log(`\nprice differences between the stores (same currency, over ${a.num('threshold', 10)} %):\n` +

View file

@ -1,11 +1,13 @@
// Offline summary of the project config: app name, store ids, languages, products, shots. No network, no credentials. // Offline summary of the project config: app name, store ids, languages, products, shots. No network, no credentials.
// storebound inspect [--json] // storebound inspect [--json]
import { platformsOf, sellsOn } from './lib/config';
import type { Ctx } from './lib/ctx'; import type { Ctx } from './lib/ctx';
import type { ProjectSummary } from './lib/desktop-protocol'; import type { ProjectSummary } from './lib/desktop-protocol';
import { log, printJson } from './lib/log'; import { log, printJson } from './lib/log';
export function summarize(ctx: Ctx): ProjectSummary { export function summarize(ctx: Ctx): ProjectSummary {
const { config, root, path } = ctx.loaded; const { config, root, path } = ctx.loaded;
const subs = (config.subscriptions ?? []).flatMap(g => g.subscriptions);
return { return {
dir: root, dir: root,
config: path, config: path,
@ -13,10 +15,16 @@ export function summarize(ctx: Ctx): ProjectSummary {
languages: config.languages.map(l => l.id), languages: config.languages.map(l => l.id),
play: config.play ? { packageName: config.play.packageName } : null, play: config.play ? { packageName: config.play.packageName } : null,
apple: config.apple ? { bundleId: config.apple.bundleId, appId: config.apple.appId ?? null } : null, apple: config.apple ? { bundleId: config.apple.bundleId, appId: config.apple.appId ?? null } : null,
platforms: platformsOf(config),
products: config.products?.length ?? 0, products: config.products?.length ?? 0,
productIds: (config.products ?? []).map(p => p.id), productIds: (config.products ?? []).map(p => p.id),
// subscriptions arrive in the config schema separately; counted when present subscriptions: subs.length,
subscriptions: ((config as { subscriptions?: unknown[] }).subscriptions ?? []).length, subscriptionIds: subs.map(s => s.id),
// the catalog each store should sell (items can be limited to one platform)
catalog: {
ios: config.apple ? [...(config.products ?? []), ...subs].filter(x => sellsOn(config, x, 'apple')).map(x => x.id) : [],
android: config.play ? [...(config.products ?? []), ...subs].filter(x => sellsOn(config, x, 'play')).map(x => x.id) : [],
},
shots: !!config.shots, shots: !!config.shots,
testflightGroups: config.apple?.testflight?.groups?.length ?? 0, testflightGroups: config.apple?.testflight?.groups?.length ?? 0,
}; };
@ -25,7 +33,7 @@ export function summarize(ctx: Ctx): ProjectSummary {
export async function run(ctx: Ctx): Promise<void> { export async function run(ctx: Ctx): Promise<void> {
const s = summarize(ctx); const s = summarize(ctx);
if (ctx.args.has('json')) { printJson(s); return; } if (ctx.args.has('json')) { printJson(s); return; }
log('inspect', `${s.name} · ${s.languages.length} languages · ${s.products} products`); log('inspect', `${s.name} · ${s.platforms.join(' + ')} · ${s.languages.length} languages · ${s.products} products · ${s.subscriptions} subscriptions`);
log('inspect', `play ${s.play?.packageName ?? '-'} · apple ${s.apple?.bundleId ?? '-'}${s.apple?.appId ? ` (${s.apple.appId})` : ''}`); log('inspect', `play ${s.play?.packageName ?? '-'} · apple ${s.apple?.bundleId ?? '-'}${s.apple?.appId ? ` (${s.apple.appId})` : ''}`);
log('inspect', `config ${s.config}`); log('inspect', `config ${s.config}`);
} }

View file

@ -78,11 +78,16 @@ export interface ProjectSummary {
languages: string[]; languages: string[];
play: { packageName: string } | null; play: { packageName: string } | null;
apple: { bundleId: string; appId: string | null } | null; apple: { bundleId: string; appId: string | null } | null;
/** One-time in-app products in the config (shared by both stores). */ /** app.platforms (default: from the apple / play sections). */
platforms: ('ios' | 'android')[];
/** One-time in-app products in the config (one shared catalog). */
products: number; products: number;
productIds: string[]; productIds: string[];
/** Subscriptions in the config (0 until the config defines them). */ /** Auto-renewable subscriptions in the config (all groups). */
subscriptions: number; subscriptions: number;
subscriptionIds: string[];
/** Product and subscription ids each store should sell (items may be limited to one platform). */
catalog: { ios: string[]; android: string[] };
shots: boolean; shots: boolean;
testflightGroups: number; testflightGroups: number;
} }

View file

@ -10,8 +10,8 @@ export function appIdentity(s: ProjectSummary): AppIdentity {
id: s.dir, id: s.dir,
name: s.name, name: s.name,
platforms: { platforms: {
ios: s.apple ? { bundleId: s.apple.bundleId, ascAppId: s.apple.appId } : null, ios: s.apple && s.platforms.includes('ios') ? { bundleId: s.apple.bundleId, ascAppId: s.apple.appId } : null,
android: s.play ? { packageName: s.play.packageName } : null, android: s.play && s.platforms.includes('android') ? { packageName: s.play.packageName } : null,
}, },
}; };
} }
@ -86,12 +86,13 @@ export const playProductIds = (data: unknown): string[] => (((data as J)?.produc
* and config ids missing from a store the app is on. * and config ids missing from a store the app is on.
*/ */
export function catalogParity(s: ProjectSummary, apple?: string[], play?: string[]): CatalogParity { export function catalogParity(s: ProjectSummary, apple?: string[], play?: string[]): CatalogParity {
const ids = s.productIds;
const live = apple !== undefined || play !== undefined; const live = apple !== undefined || play !== undefined;
const onlyIos = apple && play ? apple.filter(x => !play.includes(x)) : []; const onlyIos = apple && play ? apple.filter(x => !play.includes(x)) : [];
const onlyAndroid = apple && play ? play.filter(x => !apple.includes(x)) : []; const onlyAndroid = apple && play ? play.filter(x => !apple.includes(x)) : [];
const missingIos = s.apple && apple ? ids.filter(x => !apple.includes(x)) : []; // the status reads list one-time products; subscriptions are compared by `catalog diff` (catalog.diff method)
const missingAndroid = s.play && play ? ids.filter(x => !play.includes(x)) : []; const sold = (ids: string[]) => ids.filter(x => s.productIds.includes(x));
const missingIos = apple ? sold(s.catalog.ios).filter(x => !apple.includes(x)) : [];
const missingAndroid = play ? sold(s.catalog.android).filter(x => !play.includes(x)) : [];
return { return {
checked: live ? 'live' : 'config', products: s.products, subscriptions: s.subscriptions, checked: live ? 'live' : 'config', products: s.products, subscriptions: s.subscriptions,
onlyIos, onlyAndroid, missingIos, missingAndroid, onlyIos, onlyAndroid, missingIos, missingAndroid,

View file

@ -37,7 +37,7 @@ export const FORBIDDEN_METHOD_WORDS = /submit|release|publish|rollout|resume|com
/** Read tools whose command prints a structured result with --json. */ /** Read tools whose command prints a structured result with --json. */
export const JSON_TOOLS = new Set(['check', 'check_aso', 'validate', 'health', 'reviews_list', 'prices_diff', 'analytics_compare', 'apple_status', export const JSON_TOOLS = new Set(['check', 'check_aso', 'validate', 'health', 'reviews_list', 'prices_diff', 'analytics_compare', 'apple_status',
'apple_next_build', 'play_status', 'play_next_version_code', 'shots_check', 'apple_testflight_status', 'apple_ppo_status']); 'apple_next_build', 'play_status', 'play_next_version_code', 'shots_check', 'apple_testflight_status', 'apple_ppo_status', 'catalog_diff']);
/** `apple_testflight_status` -> `apple.testflight_status`: first underscore becomes the namespace dot. */ /** `apple_testflight_status` -> `apple.testflight_status`: first underscore becomes the namespace dot. */
export const methodName = (tool: string): string => tool.replace('_', '.'); export const methodName = (tool: string): string => tool.replace('_', '.');

View file

@ -5,7 +5,8 @@ import { appIdentity, applePhase, appleProductIds, appleReleases, catalogParity,
const summary: ProjectSummary = { const summary: ProjectSummary = {
dir: '/games/demo', config: '/games/demo/storebound.config.ts', name: 'Demo', languages: ['en'], dir: '/games/demo', config: '/games/demo/storebound.config.ts', name: 'Demo', languages: ['en'],
play: { packageName: 'com.example.demo' }, apple: { bundleId: 'com.example.demo', appId: null }, play: { packageName: 'com.example.demo' }, apple: { bundleId: 'com.example.demo', appId: null },
products: 2, productIds: ['coins', 'no_ads'], subscriptions: 0, shots: false, testflightGroups: 0, platforms: ['ios', 'android'], products: 2, productIds: ['coins', 'no_ads'], subscriptions: 1, subscriptionIds: ['pro_monthly'],
catalog: { ios: ['coins', 'no_ads', 'pro_monthly'], android: ['coins', 'no_ads', 'pro_monthly'] }, shots: false, testflightGroups: 0,
}; };
const apple = { const apple = {
@ -29,6 +30,7 @@ describe('portfolio (apps, release trains, catalog parity)', () => {
test('identity: one app, both platforms', () => { test('identity: one app, both platforms', () => {
expect(appIdentity(summary)).toEqual({ id: '/games/demo', name: 'Demo', platforms: { ios: { bundleId: 'com.example.demo', ascAppId: null }, android: { packageName: 'com.example.demo' } } }); expect(appIdentity(summary)).toEqual({ id: '/games/demo', name: 'Demo', platforms: { ios: { bundleId: 'com.example.demo', ascAppId: null }, android: { packageName: 'com.example.demo' } } });
expect(appIdentity({ ...summary, apple: null }).platforms.ios).toBeNull(); expect(appIdentity({ ...summary, apple: null }).platforms.ios).toBeNull();
expect(appIdentity({ ...summary, platforms: ['android'] }).platforms.ios).toBeNull();
}); });
test('versions and phases', () => { test('versions and phases', () => {
expect(cmpVersion('2.10.0', '2.9.1')).toBeGreaterThan(0); expect(cmpVersion('2.10.0', '2.9.1')).toBeGreaterThan(0);
@ -59,9 +61,11 @@ describe('portfolio (apps, release trains, catalog parity)', () => {
expect(onlyNext.next?.version).toBe('2.3.0'); expect(onlyNext.next?.version).toBe('2.3.0');
}); });
test('catalog parity: config only offline, both stores live', () => { test('catalog parity: config only offline, both stores live', () => {
expect(catalogParity(summary)).toEqual({ checked: 'config', products: 2, subscriptions: 0, onlyIos: [], onlyAndroid: [], missingIos: [], missingAndroid: [], ok: true }); expect(catalogParity(summary)).toEqual({ checked: 'config', products: 2, subscriptions: 1, onlyIos: [], onlyAndroid: [], missingIos: [], missingAndroid: [], ok: true });
const live = catalogParity(summary, appleProductIds(apple), playProductIds(play)); const live = catalogParity(summary, appleProductIds(apple), playProductIds(play));
expect(live).toMatchObject({ checked: 'live', onlyIos: ['ios_only'], onlyAndroid: ['no_ads', 'android_only'], missingIos: ['no_ads'], missingAndroid: [], ok: false }); expect(live).toMatchObject({ checked: 'live', onlyIos: ['ios_only'], onlyAndroid: ['no_ads', 'android_only'], missingIos: ['no_ads'], missingAndroid: [], ok: false });
// an item sold on Android only is not missing on iOS
expect(catalogParity({ ...summary, catalog: { ios: ['coins'], android: ['coins', 'no_ads'] } }, appleProductIds(apple), playProductIds(play)).missingIos).toEqual([]);
// one store unreadable: no cross-store claims // one store unreadable: no cross-store claims
expect(catalogParity(summary, undefined, playProductIds(play))).toMatchObject({ onlyIos: [], onlyAndroid: [], missingIos: [], missingAndroid: [] }); expect(catalogParity(summary, undefined, playProductIds(play))).toMatchObject({ onlyIos: [], onlyAndroid: [], missingIos: [], missingAndroid: [] });
}); });

View file

@ -163,7 +163,7 @@ describe('serve --stdio: session', () => {
expect(errOf(await pending).code).toBe(ERR.cancelled); expect(errOf(await pending).code).toBe(ERR.cancelled);
}); });
test('portfolio.status: apps across platforms, release trains, catalog parity, per-app errors, progress n/total', async () => { test('portfolio.status: apps across platforms, release trains, catalog parity, per-app errors, progress n/total', async () => {
const summary = { dir: DEMO, name: 'Demo', apple: { bundleId: 'com.example.demo', appId: null }, play: { packageName: 'com.example.demo' }, products: 2, productIds: ['coins', 'no_ads'], subscriptions: 0 }; const summary = { dir: DEMO, name: 'Demo', apple: { bundleId: 'com.example.demo', appId: null }, play: { packageName: 'com.example.demo' }, platforms: ['ios', 'android'], products: 2, productIds: ['coins', 'no_ads'], subscriptions: 0, subscriptionIds: [], catalog: { ios: ['coins', 'no_ads'], android: ['coins', 'no_ads'] } };
const { call, sent } = await session(argv => argv[0] === 'inspect' ? { data: summary } const { call, sent } = await session(argv => argv[0] === 'inspect' ? { data: summary }
: argv[0] === 'check' ? { data: { ok: true, problems: [], warnings: ['w'] } } : argv[0] === 'check' ? { data: { ok: true, problems: [], warnings: ['w'] } }
: argv[0] === 'apple' ? { code: 1, out: 'error: ASC_KEY_ID and ASC_ISSUER_ID are not set' } : argv[0] === 'apple' ? { code: 1, out: 'error: ASC_KEY_ID and ASC_ISSUER_ID are not set' }