storebound/cli/inspect.ts
CRT 347fcc3cca serve: app-centric portfolio (apps across iOS / Android, release trains, catalog parity) and local tool detection
- portfolio.status returns apps: identity with both platforms, offline config check, release trains
  (current = highest version live on a store, next = highest above it; per-store phase, build,
  rollout fraction) and catalog parity (config vs both stores) when live
- inspect --json adds product ids and the subscription count
- system.tools: ffmpeg, ffprobe, Chrome / Chrome for Testing, Xcode tools, simctl, adb, git with
  versions and source; STOREBOUND_TOOL_PATH (front of PATH for every command) and STOREBOUND_CHROME
  (Playwright executablePath) let the desktop app hand over its own copies
2026-10-10 17:57:33 +00:00

31 lines
1.4 KiB
TypeScript

// Offline summary of the project config: app name, store ids, languages, products, shots. No network, no credentials.
// storebound inspect [--json]
import type { Ctx } from './lib/ctx';
import type { ProjectSummary } from './lib/desktop-protocol';
import { log, printJson } from './lib/log';
export function summarize(ctx: Ctx): ProjectSummary {
const { config, root, path } = ctx.loaded;
return {
dir: root,
config: path,
name: config.app.name,
languages: config.languages.map(l => l.id),
play: config.play ? { packageName: config.play.packageName } : null,
apple: config.apple ? { bundleId: config.apple.bundleId, appId: config.apple.appId ?? null } : null,
products: config.products?.length ?? 0,
productIds: (config.products ?? []).map(p => p.id),
// subscriptions arrive in the config schema separately; counted when present
subscriptions: ((config as { subscriptions?: unknown[] }).subscriptions ?? []).length,
shots: !!config.shots,
testflightGroups: config.apple?.testflight?.groups?.length ?? 0,
};
}
export async function run(ctx: Ctx): Promise<void> {
const s = summarize(ctx);
if (ctx.args.has('json')) { printJson(s); return; }
log('inspect', `${s.name} · ${s.languages.length} languages · ${s.products} products`);
log('inspect', `play ${s.play?.packageName ?? '-'} · apple ${s.apple?.bundleId ?? '-'}${s.apple?.appId ? ` (${s.apple.appId})` : ''}`);
log('inspect', `config ${s.config}`);
}