upload --pre-check/--evidence, shots copy translate, game-center --locale-map, play games API-disabled hint

This commit is contained in:
CRTkafa 2026-10-24 12:10:23 +08:00
parent 26f9559e1a
commit fb1609cba7
24 changed files with 599 additions and 27 deletions

View file

@ -28,7 +28,7 @@ import { homedir, tmpdir } from 'node:os';
import { isAbsolute, join, resolve } from 'node:path';
import * as rt from './rt';
export interface ServiceAccount { client_email: string; private_key: string; token_uri?: string }
export interface ServiceAccount { client_email: string; private_key: string; token_uri?: string; project_id?: string }
export interface AscKey { keyId: string; issuerId: string; pem: string }
export interface ReviewContact { firstName: string; lastName: string; phone: string; email: string }
@ -201,7 +201,7 @@ export function parseServiceAccount(text: string): ServiceAccount {
const j = JSON.parse(text) as Partial<ServiceAccount>;
if (typeof j.client_email !== 'string' || typeof j.private_key !== 'string' || !j.private_key.includes('PRIVATE KEY'))
throw new Error('not a Google service account JSON key (client_email / private_key missing)');
return { client_email: j.client_email, private_key: j.private_key, token_uri: j.token_uri };
return { client_email: j.client_email, private_key: j.private_key, token_uri: j.token_uri, ...(typeof j.project_id === 'string' ? { project_id: j.project_id } : {}) };
}
export function playServiceAccount(root: string): ServiceAccount {