Onboarding live apps without owner questions for what the stores and the code prove: storebound onboard imports the live products and subscriptions with USD / base prices (catalog diff clean), contact values, the App Review contact and demo account (credentials.json, masked), sign-in for review from Apple's review detail and auth code, and the account deletion page from the app's site; App Store keywords count characters (live fields up to 265 bytes accepted); validate accepts the 6.5-inch iPhone set and Play's default-language graphics fallback; Play Reporting API off gives the project's enable link and apps list falls back to local apps; accounts default <profile>; store-only apps (apps add --store --app-id) shown read-only in the desktop (pitfalls 43-52)

This commit is contained in:
CRTkafa 2026-10-13 07:25:01 +08:00
parent d2ce185441
commit e5f148e534
55 changed files with 1648 additions and 158 deletions

View file

@ -44,15 +44,17 @@ export function toTs(v: unknown, ind = ''): string {
return one.length <= 110 && !one.includes('\n') && entries.every(([, x]) => typeof x !== 'object' || Array.isArray(x)) ? one : `{\n${parts.map(p => `${next}${p},`).join('\n')}\n${ind}}`;
}
/** The config text with `key` set to `value` (plus an optional comment line above it). */
/** The config text with the top-level `key` set to `value` (an object, or an array: `products`, `subscriptions`;
* plus an optional comment line above it when it is new). The `key:` with the smallest indent is the top-level one. */
export function upsertBlock(text: string, file: string, key: string, value: unknown, comment?: string): string {
if (file.endsWith('.json')) {
const j = JSON.parse(text) as Record<string, unknown>;
j[key] = value;
return JSON.stringify(j, null, 2) + '\n';
}
const re = new RegExp(`^([ \\t]*)${key}\\s*:\\s*\\{`, 'm');
const m = re.exec(text);
const re = new RegExp(`^([ \\t]*)${key}\\s*:\\s*[{[]`, 'gm');
let m: RegExpExecArray | null = null;
for (let x = re.exec(text); x; x = re.exec(text)) if (!m || x[1]!.length < m[1]!.length) m = x;
if (m) {
const ind = m[1]!;
const open = m.index + m[0].length - 1;