storebound/cli/inspect.ts
CRT 3454a9aadb serve --stdio: desktop JSON-RPC profile on the MCP core, confirm tokens, --json results, sidecar builds
- cli/serve.ts: session.hello with a per-session secret, typed methods per tool, project.inspect,
  portfolio.status over many project folders, progress notifications, cancellation
- cli/lib/confirm-token.ts: single-use HMAC tokens bound to method + canonical params + expiry;
  writes are dry runs without one; no submit / release / publish method exists
- cli/lib/runner.ts: shared child runner for mcp and serve, works from a compiled binary
- --json on check, testflight / ppo status, next-build, next-version-code, analytics compare,
  prices import; inspect command; confirm() always answers no under serve
- tools/build-sidecars.ts: bun build --compile for five targets, ad-hoc re-sign on macOS, path leak check
- tests/serve.test.ts: methods, token binding / expiry / replay, shared vector, stdio and compiled smoke
2026-10-10 17:57:33 +00:00

28 lines
1.2 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,
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}`);
}