analytics and reports for a collector: store-only configs, --json snapshot, App Usage and Play install stock numbers, per-day sales ranges for both stores

This commit is contained in:
CRTkafa 2026-10-26 10:20:27 +07:00
parent b59665c661
commit 5833776a4b
15 changed files with 651 additions and 60 deletions

View file

@ -10,7 +10,7 @@ import { existsSync, readFileSync, statSync } from 'node:fs';
import { join } from 'node:path';
import { platformsOf, playCategoryOf, profileOf, sellsOn } from './lib/config';
import type { Ctx } from './lib/ctx';
import { maskUser, reviewContact, reviewDemoAccount } from './lib/credentials';
import { credentialValue, maskUser, reviewContact, reviewDemoAccount } from './lib/credentials';
import { DATA_SAFETY_UPLOADED, declarations } from './lib/declarations';
import type { ProjectSummary } from './lib/desktop-protocol';
import { log, printJson } from './lib/log';
@ -42,7 +42,7 @@ export function summarize(ctx: Ctx): ProjectSummary {
profile: profileOf(config),
icon: findIcon(config, root),
variants: Object.keys(config.shots?.variants ?? {}),
playReports: !!config.play?.reportsBucket,
playReports: !!config.play?.reportsBucket || !!credentialValue(root, 'PLAY_REPORTS_BUCKET'),
playRelease: config.play ? { managedPublishing: config.play.managedPublishing ?? null, countries: config.play.countries?.length ?? null, category: playCategoryOf(config)?.category ?? null } : null,
games: config.games ? { gameCenter: config.games.gameCenter === true, playGames: !!config.games.playGames, leaderboards: config.games.leaderboards?.length ?? 0, achievements: config.games.achievements?.length ?? 0 } : null,
};