diff --git a/cli/check.ts b/cli/check.ts index 775f01c..e69099f 100644 --- a/cli/check.ts +++ b/cli/check.ts @@ -5,7 +5,6 @@ // storebound check --aso keyword audit of both listing files (App Store keyword field, Play stuffing); exit 1 on errors // --json structured result ({ ok, items, warnings, problems } or { findings, errors }), exit 1 on problems import { existsSync, readFileSync } from 'node:fs'; -import { relative } from 'node:path'; import { type AsoFinding, auditAso } from './lib/aso'; import { playCodes } from './lib/config'; import { APPLE_IAP_LIMITS, len, parseAppStoreListing, parsePlayListing } from './lib/copy'; @@ -39,12 +38,7 @@ export async function run(ctx: Ctx): Promise { const warnings: string[] = []; const note = (msg: string): void => { warnings.push(msg); warn('check', msg); }; const tryDo = (what: string, fn: () => string): void => { - try { const detail = fn(); items.push({ what, detail }); log('check', `${what}: ${detail}`); } catch (e) { - const err = e as NodeJS.ErrnoException; - // a missing file is the common first-run case: name it and say how to fix it, not the raw ENOENT - const file = err.code === 'ENOENT' && typeof err.path === 'string' ? relative(process.cwd(), err.path) || err.path : ''; - problems.push(file ? `${what}: ${file} is missing · storebound init creates it` : `${what}: ${err.message}`); - } + try { const detail = fn(); items.push({ what, detail }); log('check', `${what}: ${detail}`); } catch (e) { problems.push(`${what}: ${(e as Error).message}`); } }; if (config.play) tryDo('play listing', () => { diff --git a/cli/lib/profile.ts b/cli/lib/profile.ts index 609a4f3..303a12e 100644 --- a/cli/lib/profile.ts +++ b/cli/lib/profile.ts @@ -21,7 +21,7 @@ export function profileIssues(config: ShipConfig, o: { demoAccount: boolean }): } } else if (config.dataSafety && !acm.includes('PSL_ACM_NONE')) warn('dataSafety.accountCreation lists sign-up methods but accounts.enabled is not set: add accounts { enabled: true, deletionUrl, inApp }'); if (config.reviewAccess?.signInRequired) { - if (!o.demoAccount) err('App Review needs a demo account (sign-in required) · add reviewDemoAccount to .storebound/credentials.json · review-access skill'); + if (!o.demoAccount) err('reviewAccess.signInRequired: no demo account ("reviewDemoAccount" in .storebound/credentials.json, or REVIEW_DEMO_USER / REVIEW_DEMO_PASSWORD; review-access skill)'); if (!config.reviewAccess.instructions) warn('reviewAccess.instructions: tell the reviewer how to sign in and where the main features are'); } else if (accounts && config.reviewAccess === undefined) warn('the app has accounts: set reviewAccess { signInRequired } so App Review and Play App access get a demo account when needed'); const subs = allSubscriptions(config.subscriptions); diff --git a/site/index.html b/site/index.html index c75eaf6..f157624 100644 --- a/site/index.html +++ b/site/index.html @@ -23,9 +23,9 @@ - + - + @@ -123,9 +123,9 @@

$ storebound check

[check] config ok: storebound.config.ts

[check] data safety: 764 CSV rows

-

- play listing: store/listing.md is missing · storebound init creates it

-

- appstore listing: store/appstore.md is missing · storebound init creates it

-

- App Review needs a demo account (sign-in required) · add reviewDemoAccount to .storebound/credentials.json · review-access skill

+

- play listing: ENOENT: no such file or directory, open 'store/listing.md'

+

- appstore listing: ENOENT: no such file or directory, open 'store/appstore.md'

+

- reviewAccess.signInRequired: no demo account ("reviewDemoAccount" in .storebound/credentials.json, or REVIEW_DEMO_USER / REVIEW_DEMO_PASSWORD; review-access skill)

error: 3 problems

$ storebound init

[init] create store/listing.md

diff --git a/tests/apps.test.ts b/tests/apps.test.ts index c88c35d..ad8be25 100644 --- a/tests/apps.test.ts +++ b/tests/apps.test.ts @@ -146,7 +146,7 @@ describe('profile checks (offline)', () => { subscriptions: [group([sub()])] }), { demoAccount: false }); const text = msgs.map(m => `${m.level} ${m.msg}`).join('\n'); for (const m of ['error accounts.enabled: set accounts.deletionUrl', 'warn accounts.enabled: set accounts.inApp', 'PSL_ACM_NONE', 'deletionRequest is false', - 'error App Review needs a demo account', 'error subscriptions: set app.termsUrl', 'without reviewScreenshot']) expect(text).toContain(m); + 'error reviewAccess.signInRequired: no demo account', 'error subscriptions: set app.termsUrl', 'without reviewScreenshot']) expect(text).toContain(m); expect(profileIssues(base({ app: { ...APP, termsUrl: 'https://example.com/t' }, accounts: { enabled: true, deletionUrl: 'https://example.com/d', inApp: 'Settings' }, reviewAccess: { signInRequired: true, instructions: 'x' }, subscriptions: [group([sub({ reviewScreenshot: 'p.png' })])], dataSafety: { ...ds, deletionRequest: true, accountCreation: ['PSL_ACM_USER_ID_PASSWORD'] } }), { demoAccount: true })).toEqual([]);