Open in Google Play Console deep-links the app: Play developer id per credential profile (accounts play-developer, desktop Accounts), shared playAppUrl builder for desktop, CLI and watch; developer chooser instead of the console root

This commit is contained in:
CRTkafa 2026-10-23 09:20:35 +08:00
parent 7c769c18f4
commit 4a74989a95
33 changed files with 311 additions and 40 deletions

View file

@ -6,6 +6,7 @@ import { existsSync } from 'node:fs';
import { dirname, isAbsolute, join, resolve } from 'node:path';
import * as rt from './rt';
import { PROFILE_RE, setConfigAccount } from './credentials';
import { playIdsOf } from './play-ids';
import { validateCapture, validateRecord } from '../shots/devices';
import { featureBackgroundIssues, paletteIssues } from '../shots/palette';
import { type AppleDataTypeId, type AppleTypeAnswer, validateAppPrivacyTypes } from './app-privacy';
@ -1286,7 +1287,8 @@ export async function loadConfig(explicit?: string, start = process.cwd()): Prom
if (errors.length) throw new Error(`${path}:\n ` + errors.join('\n '));
const root = dirname(path);
setConfigAccount(root, config.account);
setConsoleIds(consoleIdsFromConfig(config));
const play = playIdsOf(config, root);
setConsoleIds({ ...consoleIdsFromConfig(config), playDeveloperId: play.developerId, playAppId: play.appId });
return { config, root, path, resolve: (p: string) => (isAbsolute(p) ? p : join(root, p)) };
}