Merge remote-tracking branch 'origin/main' into flaky-console
This commit is contained in:
commit
2508d9031d
29 changed files with 2089 additions and 36 deletions
24
CHANGELOG.md
24
CHANGELOG.md
|
|
@ -2,6 +2,30 @@
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- ASO from official and public data only (no scraping, no third-party ASO services):
|
||||||
|
- `aso competitors [--term <kw>] [--storefront us,tr] [--top 10]`: per keyword of the locale's keyword field (and
|
||||||
|
`--term`) the top apps in the iTunes Search API (name, developer, rating count, first release, last update, genre
|
||||||
|
localized to the storefront), the words in their names that the name / subtitle / keywords do not cover (only
|
||||||
|
words of two or more developers: a one-developer word is likely a brand) and the apps new in a term's top N since
|
||||||
|
the last snapshot (`.storebound/aso/competitors/<date>.json`). Same pace as `aso rank` (one call every 3.5 s, stop
|
||||||
|
on 403 / 429). Competitor subtitles are not in any public API and are not shown.
|
||||||
|
- `aso suggest [--locale] [--fresh] [--offline] [--write]`: keyword candidates from the own name / subtitle /
|
||||||
|
description (words and two-word phrases), competitor names, the localized category names (from the Search API's
|
||||||
|
`genres`) and, with Apple Ads credentials, the Apple Ads Platform API keyword suggestions
|
||||||
|
(`POST /v1/suggestions/keywords/query`, relative popularity 0-100). Each candidate shows relevance (own text,
|
||||||
|
competitor names), competition (top apps with the word in their name) and popularity (Apple Ads only, else
|
||||||
|
"unknown"). Proposes a keyword field per locale that fits 100 bytes with the existing rules (no spaces, no
|
||||||
|
duplicates, plural-insensitive, no name / subtitle words, no filler or category words; current terms kept first
|
||||||
|
unless `--fresh`) as old -> new; `--write` puts it into `store/appstore.md` with a draft line that `check --aso` and
|
||||||
|
`aso audit` report until the owner deletes it.
|
||||||
|
- `aso audit`: one offline report: `check --aso` findings, the cross-locale free keyword room, rank trend arrows from
|
||||||
|
the `aso rank` snapshots, competitor coverage gaps, Play short description use and keyword density, App Store
|
||||||
|
conversion from the analytics snapshots, Product Page Optimization / Play listing experiment ideas (suggestions
|
||||||
|
only: PPO cannot test the subtitle; Play experiments stay in Play Console) and the next 3 actions.
|
||||||
|
- MCP: read-only `aso_competitors` (saves no snapshot), `aso_suggest` (never writes), `aso_audit` (offline).
|
||||||
|
- Desktop: an ASO card on the Growth tab (`aso.audit`): keyword field state, keywords ranked, coverage gaps, the
|
||||||
|
rank trend of the best three keywords (visx, rank 1 at the top), the rank table and the next 3 actions.
|
||||||
|
- `examples/demo-app` has listing files (`store/appstore.md`, `store/listing.md`) to try the ASO commands on.
|
||||||
- Local font files in `shots.fonts`: `title`, `body` and `fallback[]` take, besides a Google Fonts family, a path
|
- Local font files in `shots.fonts`: `title`, `body` and `fallback[]` take, besides a Google Fonts family, a path
|
||||||
(relative to the config) or `{ family, file, weight?, style?, license? }` (TTF / OTF / WOFF / WOFF2, validated by
|
(relative to the config) or `{ family, file, weight?, style?, license? }` (TTF / OTF / WOFF / WOFF2, validated by
|
||||||
extension and signature; the family comes from the name table when not given). `shots fonts` checks the file's cmap
|
extension and signature; the family comes from the name table when not given). `shots fonts` checks the file's cmap
|
||||||
|
|
|
||||||
|
|
@ -422,6 +422,9 @@ run in the background with a log (`storebound shots render > .storebound/render.
|
||||||
| `reports apple-sales \| apple-finance \| play-earnings \| play-sales` | API, read-only + local | sales / finance reports into `.storebound/reports/`, summary per product and currency, CSV export |
|
| `reports apple-sales \| apple-finance \| play-earnings \| play-sales` | API, read-only + local | sales / finance reports into `.storebound/reports/`, summary per product and currency, CSV export |
|
||||||
| `triage [--days 14]` | API, read-only | TestFlight crash and screenshot feedback, Play error reports: grouped by signature with devices, OS versions, builds |
|
| `triage [--days 14]` | API, read-only | TestFlight crash and screenshot feedback, Play error reports: grouped by signature with devices, OS versions, builds |
|
||||||
| `aso rank [--storefronts us,de]` | network + local | App Store rank per keyword and storefront plus competitors from the public iTunes Search API (rate limited) -> `.storebound/aso/` |
|
| `aso rank [--storefronts us,de]` | network + local | App Store rank per keyword and storefront plus competitors from the public iTunes Search API (rate limited) -> `.storebound/aso/` |
|
||||||
|
| `aso competitors [--term <kw>] [--storefront us,tr] [--top 10]` | network + local | top apps per keyword (name, developer, rating count, first release, last update, localized genre; no subtitles: not in any public API) and the words in their names you do not cover, same rate limit -> `.storebound/aso/competitors/` |
|
||||||
|
| `aso suggest [--locale en-US] [--write]` | local (+ Apple Ads API with credentials) | keyword candidates (own text, competitor names, localized category names, Apple Ads keyword suggestions with their relative 0-100 popularity) scored by relevance and competition, and a 100-byte keyword field per locale as a diff; `--write` puts it into `store/appstore.md` as a draft for review. Popularity is never estimated |
|
||||||
|
| `aso audit` | local | one report: `check --aso`, free keyword room, rank trend arrows, competitor gaps, Play short description and density, App Store conversion from the analytics snapshots, PPO / Play experiment ideas and the next 3 actions |
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
@ -775,7 +778,7 @@ navigation.
|
||||||
| `store-subscriptions` | subscription groups, levels, base plans, prices, intro and promotional offers, offer codes, disclosure and Terms (3.1.2), first submission |
|
| `store-subscriptions` | subscription groups, levels, base plans, prices, intro and promotional offers, offer codes, disclosure and Terms (3.1.2), first submission |
|
||||||
| `review-access` | demo account for reviewers (App Review fields, Play App access), never committed |
|
| `review-access` | demo account for reviewers (App Review fields, Play App access), never committed |
|
||||||
| `account-deletion` | Apple 5.1.1(v) in-app deletion, Play delete-account web page and Data safety |
|
| `account-deletion` | Apple 5.1.1(v) in-app deletion, Play delete-account web page and Data safety |
|
||||||
| `aso-basics` | keyword field, subtitle, cross-localization, Play placement without stuffing, keyword ranks via the iTunes Search API |
|
| `aso-basics` | keyword field, subtitle, cross-localization, Play placement without stuffing, keyword ranks, competitors, keyword field proposals and the ASO audit (iTunes Search API, Apple Ads popularity with credentials) |
|
||||||
| `app-store-promotion` | IAP offer codes, win-back offers, promoted IAPs, pre-orders (Play pre-registration: console guide), custom product pages, in-app events |
|
| `app-store-promotion` | IAP offer codes, win-back offers, promoted IAPs, pre-orders (Play pre-registration: console guide), custom product pages, in-app events |
|
||||||
| `store-declarations` | every questionnaire: Play Data safety (API) and App content (IARC, target audience, ads, advertising ID, app access, government / financial / health), Apple App Privacy labels and age rating |
|
| `store-declarations` | every questionnaire: Play Data safety (API) and App content (IARC, target audience, ads, advertising ID, app access, government / financial / health), Apple App Privacy labels and age rating |
|
||||||
| `export-compliance` | encryption answer, Info.plist key, declarations; never exempt by default |
|
| `export-compliance` | encryption answer, Info.plist key, declarations; never exempt by default |
|
||||||
|
|
@ -806,7 +809,7 @@ per-request `_meta`, `resultType`, cacheable `tools/list`) and, on the same proc
|
||||||
`initialize` (2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05). It runs each tool as a CLI call in the project directory
|
`initialize` (2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05). It runs each tool as a CLI call in the project directory
|
||||||
(the server's working directory, or `STOREBOUND_PROJECT`) and returns the output.
|
(the server's working directory, or `STOREBOUND_PROJECT`) and returns the output.
|
||||||
|
|
||||||
- One tool per command. Read-only: `scan`, `check`, `check_aso`, `validate`, `catalog_diff`, `health`, `reviews_list`, `prices_diff`,
|
- One tool per command. Read-only: `scan`, `check`, `check_aso`, `aso_competitors` (no snapshot saved), `aso_suggest` (never writes), `aso_audit`, `validate`, `catalog_diff`, `health`, `reviews_list`, `prices_diff`,
|
||||||
`analytics_compare`, `apple_status`, `apple_next_build`, `apple_testflight_status`, `apple_ppo_status`,
|
`analytics_compare`, `apple_status`, `apple_next_build`, `apple_testflight_status`, `apple_ppo_status`,
|
||||||
`play_status`, `play_next_version_code`, `privacy_manifest`, `shots_check`, `workspace_list`, `workspace_status`,
|
`play_status`, `play_next_version_code`, `privacy_manifest`, `shots_check`, `workspace_list`, `workspace_status`,
|
||||||
`release_status`, `release_plan`, `flow_list`, `flow_run` (dry mode only), `listing_check`. Local writes: `import_fastlane`, `whats_new`, `listing_translate`, `icons`,
|
`release_status`, `release_plan`, `flow_list`, `flow_run` (dry mode only), `listing_check`. Local writes: `import_fastlane`, `whats_new`, `listing_translate`, `icons`,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import type { Overrides } from './lib/identity';
|
||||||
export type {
|
export type {
|
||||||
AccountCheck, AppIdentity, AppsListResult, AppStatus, CatalogParity, DraftsResult, StoreApp, IconResult, ListingField, ListingLocale, ListingsResult, MethodDescriptor, PortfolioResult,
|
AccountCheck, AppIdentity, AppsListResult, AppStatus, CatalogParity, DraftsResult, StoreApp, IconResult, ListingField, ListingLocale, ListingsResult, MethodDescriptor, PortfolioResult,
|
||||||
ProgressParams, ProjectSummary, ReleasePhase, ReleaseTrain, ReplyDraft, StoreRelease, ToolResult,
|
ProgressParams, ProjectSummary, ReleasePhase, ReleaseTrain, ReplyDraft, StoreRelease, ToolResult,
|
||||||
AnalyticsCompare, ConsoleAnswer, ConsoleFillResult, ConsoleForm, DeclAsk, DeclarationsResult, ListingText, PpoStatus, PpoTest, PriceDiffRow, PriceRowData, PricesCurrent, PricesDiff, RenderImage, RenderTile, RendersResult,
|
AnalyticsCompare, AsoAuditView, AsoTrendRow, ConsoleAnswer, ConsoleFillResult, ConsoleForm, DeclAsk, DeclarationsResult, ListingText, PpoStatus, PpoTest, PriceDiffRow, PriceRowData, PricesCurrent, PricesDiff, RenderImage, RenderTile, RendersResult,
|
||||||
} from '../../../cli/lib/desktop-protocol';
|
} from '../../../cli/lib/desktop-protocol';
|
||||||
|
|
||||||
export interface AppInfo { version: string; identifier: string; platform: string; debug: boolean; home: string | null }
|
export interface AppInfo { version: string; identifier: string; platform: string; debug: boolean; home: string | null }
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// DEV-ONLY FIXTURE DATA for the screens that cover the rest of the CLI (prices, store art, growth, app info). Made-up
|
// DEV-ONLY FIXTURE DATA for the screens that cover the rest of the CLI (prices, store art, growth, app info). Made-up
|
||||||
// numbers around the two demo apps; drawn SVG stand-ins for the rendered screenshots. Only src/dev/fixtures.ts imports
|
// numbers around the two demo apps; drawn SVG stand-ins for the rendered screenshots. Only src/dev/fixtures.ts imports
|
||||||
// this module, and only fixture mode (dev builds) loads that.
|
// this module, and only fixture mode (dev builds) loads that.
|
||||||
import type { AnalyticsCompare, DeclarationsResult, ListingText, PpoStatus, PriceRowData, PricesCurrent, PricesDiff, RendersResult, RenderTile } from '../api';
|
import type { AnalyticsCompare, AsoAuditView, DeclarationsResult, ListingText, PpoStatus, PriceRowData, PricesCurrent, PricesDiff, RendersResult, RenderTile } from '../api';
|
||||||
|
|
||||||
const HOME = '/home/you';
|
const HOME = '/home/you';
|
||||||
const NOW = Date.now();
|
const NOW = Date.now();
|
||||||
|
|
@ -200,3 +200,38 @@ function analytics(days: number, seed: number): AnalyticsCompare {
|
||||||
return { snapshots: Math.ceil(days / 28) + 1, since: day(days), series: { apple, play }, effects };
|
return { snapshots: Math.ceil(days / 28) + 1, since: day(days), series: { apple, play }, effects };
|
||||||
}
|
}
|
||||||
export const ANALYTICS: Record<string, AnalyticsCompare | null> = { 'p-prism': analytics(56, 1), 'p-tidy': null };
|
export const ANALYTICS: Record<string, AnalyticsCompare | null> = { 'p-prism': analytics(56, 1), 'p-tidy': null };
|
||||||
|
|
||||||
|
// ---- aso.audit: `aso audit --json` of the demo apps (made up: four rank snapshots two weeks apart) ----
|
||||||
|
function asoAudit(withRanks: boolean): AsoAuditView {
|
||||||
|
const dates = [day(42), day(28), day(14), day(0)];
|
||||||
|
const series = [
|
||||||
|
{ storefront: 'us', keyword: 'match', ranks: [48, 39, 31, 24] },
|
||||||
|
{ storefront: 'us', keyword: 'puzzle', ranks: [88, 92, 71, 66] },
|
||||||
|
{ storefront: 'us', keyword: 'tiles', ranks: [null, 140, 118, 121] },
|
||||||
|
{ storefront: 'us', keyword: 'offline', ranks: [null, null, null, null] },
|
||||||
|
];
|
||||||
|
const rows = series.map(x => {
|
||||||
|
const rank = x.ranks.at(-1) ?? null, previous = x.ranks.at(-2) ?? null;
|
||||||
|
const known = x.ranks.filter((v): v is number => v !== null);
|
||||||
|
return { storefront: x.storefront, keyword: x.keyword, rank, previous, change: rank !== null && previous !== null ? previous - rank : null,
|
||||||
|
arrow: rank === null ? '·' as const : previous === null ? 'new' as const : rank < previous ? '↑' as const : rank > previous ? '↓' as const : '→' as const,
|
||||||
|
best: known.length ? Math.min(...known) : null, snapshots: x.ranks.length };
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
generated: day(0),
|
||||||
|
keywordField: { errors: 0, warnings: 1, hints: 2, findings: [{ level: 'warn', where: 'apple en-US', msg: 'keywords: 71/100 bytes used; fill at least 90 (29 bytes free)' }] },
|
||||||
|
drafts: [],
|
||||||
|
ranks: withRanks ? { snapshots: 4, latest: day(0), rows, dates, series } : { snapshots: 0, latest: null, rows: [], dates: [], series: [] },
|
||||||
|
competitors: withRanks ? { date: day(3), gaps: [{ storefront: 'us', locale: 'en-US', gaps: [{ word: 'blast', apps: 4, developers: 3 }, { word: 'block', apps: 3, developers: 3 }] }] } : { date: null, gaps: [] },
|
||||||
|
experiments: [{ store: 'apple', what: 'first screenshot caption', why: 'the first screenshot is what search results show', how: 'storebound apple ppo create --variant b --dry' }],
|
||||||
|
next: withRanks ? [
|
||||||
|
{ what: 'fill the keyword field of en-US (71/100 bytes used)', why: 'unused bytes are unused search reach', command: 'storebound aso suggest --locale en-US' },
|
||||||
|
{ what: 'consider "blast", "block" for en-US (in the names of 3 developers\' top apps)', why: 'words the top apps lead with; only if they describe your app', command: 'storebound aso suggest --locale en-US' },
|
||||||
|
{ what: 'look at the keywords that dropped: us "tiles" 118 -> 121', why: 'a drop after a listing change is the signal to revert or adjust it' },
|
||||||
|
] : [
|
||||||
|
{ what: 'take a first rank snapshot', why: 'trends need a baseline before the next listing change', command: 'storebound aso rank --dry, then storebound aso rank' },
|
||||||
|
{ what: 'read the competitors for your keywords', why: 'coverage gaps and suggest need the top apps per term', command: 'storebound aso competitors --dry, then storebound aso competitors' },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
export const ASO: Record<string, AsoAuditView> = { 'p-prism': asoAudit(true), 'p-tidy': asoAudit(false) };
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { type Account, type AccountCheck, type ConsoleFillResult, type ConsoleFo
|
||||||
type PortfolioResult, type Project, type ProjectSummary, type Settings, type StoreApp, type StoreRelease, type Studio, type ToolResult } from '../api';
|
type PortfolioResult, type Project, type ProjectSummary, type Settings, type StoreApp, type StoreRelease, type Studio, type ToolResult } from '../api';
|
||||||
import { buildApps, type Overrides } from '../lib/identity';
|
import { buildApps, type Overrides } from '../lib/identity';
|
||||||
import type { CatalogDiff, HealthSnapshot, MetricRow, Review, TestFlightStatus, ValidateResult, ScanResult } from '../lib/model';
|
import type { CatalogDiff, HealthSnapshot, MetricRow, Review, TestFlightStatus, ValidateResult, ScanResult } from '../lib/model';
|
||||||
import { ANALYTICS, DECLARATIONS, LISTING_TEXT, PPO, PPO_STORE, PRICE_DIFF, PRICES, renderArt, RENDERS } from './fixtures-more';
|
import { ANALYTICS, ASO, DECLARATIONS, LISTING_TEXT, PPO, PPO_STORE, PRICE_DIFF, PRICES, renderArt, RENDERS } from './fixtures-more';
|
||||||
|
|
||||||
export const FIXTURE_MARKER = 'storebound-dev-fixtures';
|
export const FIXTURE_MARKER = 'storebound-dev-fixtures';
|
||||||
|
|
||||||
|
|
@ -438,6 +438,7 @@ function read(method: string, id: string, args: Record<string, unknown> = {}): T
|
||||||
case 'prices.diff': return ok(method, PRICE_DIFF[id]);
|
case 'prices.diff': return ok(method, PRICE_DIFF[id]);
|
||||||
case 'apple.ppo_status': return ok(method, PPO[id]);
|
case 'apple.ppo_status': return ok(method, PPO[id]);
|
||||||
case 'analytics.compare': return ANALYTICS[id] ? ok(method, ANALYTICS[id]) : { method, ok: false, exitCode: 1, dryRun: false, command: 'storebound analytics compare --json', output: `error: no snapshots in ${HOME}/apps/tidy-lists/.storebound/analytics (storebound analytics snapshot)` };
|
case 'analytics.compare': return ANALYTICS[id] ? ok(method, ANALYTICS[id]) : { method, ok: false, exitCode: 1, dryRun: false, command: 'storebound analytics compare --json', output: `error: no snapshots in ${HOME}/apps/tidy-lists/.storebound/analytics (storebound analytics snapshot)` };
|
||||||
|
case 'aso.audit': return ASO[id] ? ok(method, ASO[id]) : { method, ok: false, exitCode: 1, dryRun: false, command: 'storebound aso audit --json', output: 'fixture: no data for aso.audit' };
|
||||||
case 'check': return { method, ok: true, exitCode: 0, dryRun: false, command: 'storebound check', output: '12:00:01 [check] config ok: storebound.config.ts\n12:00:01 [check] listing: 4 languages\n12:00:01 [check] 0 problems, 2 warnings' };
|
case 'check': return { method, ok: true, exitCode: 0, dryRun: false, command: 'storebound check', output: '12:00:01 [check] config ok: storebound.config.ts\n12:00:01 [check] listing: 4 languages\n12:00:01 [check] 0 problems, 2 warnings' };
|
||||||
default: return { method, ok: false, exitCode: 1, dryRun: false, command: `storebound ${method}`, output: `fixture: no data for ${method}` };
|
default: return { method, ok: false, exitCode: 1, dryRun: false, command: `storebound ${method}`, output: `fixture: no data for ${method}` };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1068,6 +1068,29 @@ export const en = {
|
||||||
'gr.before': 'Before',
|
'gr.before': 'Before',
|
||||||
'gr.after': 'After',
|
'gr.after': 'After',
|
||||||
'gr.reading': 'A change needs several days on both sides and enough traffic; seasonality, featuring and ads move these numbers too.',
|
'gr.reading': 'A change needs several days on both sides and enough traffic; seasonality, featuring and ads move these numbers too.',
|
||||||
|
'gr.aso': 'ASO',
|
||||||
|
'gr.asoSub': 'aso audit, offline, {date}',
|
||||||
|
'gr.asoSubNone': 'Keyword field, rank trend and next steps from the app folder (aso audit, offline)',
|
||||||
|
'gr.asoField': 'Keyword field',
|
||||||
|
'gr.asoFieldSub': 'check --aso over store/appstore.md',
|
||||||
|
'gr.asoErrors': '{count} errors',
|
||||||
|
'gr.asoErrors_one': '1 error',
|
||||||
|
'gr.asoWarnings': '{count} warnings',
|
||||||
|
'gr.asoWarnings_one': '1 warning',
|
||||||
|
'gr.asoDrafts': 'Draft keywords to review: {locales}',
|
||||||
|
'gr.asoRanked': 'Keywords ranked',
|
||||||
|
'gr.asoLatest': 'In the first 200 results · {date}',
|
||||||
|
'gr.asoNoRanks': 'No rank snapshot yet: storebound aso rank',
|
||||||
|
'gr.asoGaps': 'Coverage gaps',
|
||||||
|
'gr.asoGapsSub': 'Words in top apps\' names you do not cover · {date}',
|
||||||
|
'gr.asoNoCompetitors': 'No competitor snapshot yet: storebound aso competitors',
|
||||||
|
'gr.asoChartAria': 'Keyword ranks over the rank snapshots, rank 1 at the top',
|
||||||
|
'gr.asoNotRanked': 'not ranked',
|
||||||
|
'gr.asoKeyword': 'Keyword',
|
||||||
|
'gr.asoRank': 'Rank',
|
||||||
|
'gr.asoBest': 'Best',
|
||||||
|
'gr.asoNext': 'Next 3 actions',
|
||||||
|
'gr.asoReading': 'Ranks follow the public iTunes Search API order, which is close to, not equal to, App Store search: read them as a trend. Popularity comes only from Apple Ads (aso suggest with an Apple Ads API key), never estimated.',
|
||||||
'gr.ppo': 'Product Page Optimization',
|
'gr.ppo': 'Product Page Optimization',
|
||||||
'gr.ppoSub': 'App Store A/B tests of the screenshots',
|
'gr.ppoSub': 'App Store A/B tests of the screenshots',
|
||||||
'gr.ppoRead': 'Read tests',
|
'gr.ppoRead': 'Read tests',
|
||||||
|
|
|
||||||
|
|
@ -1070,6 +1070,29 @@ export const tr: Record<keyof typeof en, string> = {
|
||||||
'gr.before': 'Önce',
|
'gr.before': 'Önce',
|
||||||
'gr.after': 'Sonra',
|
'gr.after': 'Sonra',
|
||||||
'gr.reading': 'Bir değişiklik iki tarafta da birkaç gün ve yeterli trafik ister; mevsim, öne çıkarılma ve reklamlar da bu sayıları oynatır.',
|
'gr.reading': 'Bir değişiklik iki tarafta da birkaç gün ve yeterli trafik ister; mevsim, öne çıkarılma ve reklamlar da bu sayıları oynatır.',
|
||||||
|
'gr.aso': 'ASO',
|
||||||
|
'gr.asoSub': 'aso audit, çevrimdışı, {date}',
|
||||||
|
'gr.asoSubNone': 'Uygulama klasöründen anahtar kelime alanı, sıralama eğilimi ve sonraki adımlar (aso audit, çevrimdışı)',
|
||||||
|
'gr.asoField': 'Anahtar kelime alanı',
|
||||||
|
'gr.asoFieldSub': 'store/appstore.md üzerinde check --aso',
|
||||||
|
'gr.asoErrors': '{count} hata',
|
||||||
|
'gr.asoErrors_one': '1 hata',
|
||||||
|
'gr.asoWarnings': '{count} uyarı',
|
||||||
|
'gr.asoWarnings_one': '1 uyarı',
|
||||||
|
'gr.asoDrafts': 'Gözden geçirilecek taslak kelimeler: {locales}',
|
||||||
|
'gr.asoRanked': 'Sıralanan kelimeler',
|
||||||
|
'gr.asoLatest': 'İlk 200 sonuçta · {date}',
|
||||||
|
'gr.asoNoRanks': 'Henüz sıralama anlık görüntüsü yok: storebound aso rank',
|
||||||
|
'gr.asoGaps': 'Kapsama boşlukları',
|
||||||
|
'gr.asoGapsSub': 'Üst sıradaki uygulamaların adlarında olup sende olmayan kelimeler · {date}',
|
||||||
|
'gr.asoNoCompetitors': 'Henüz rakip anlık görüntüsü yok: storebound aso competitors',
|
||||||
|
'gr.asoChartAria': 'Sıralama anlık görüntülerine göre anahtar kelime sıraları, 1. sıra en üstte',
|
||||||
|
'gr.asoNotRanked': 'sırada değil',
|
||||||
|
'gr.asoKeyword': 'Anahtar kelime',
|
||||||
|
'gr.asoRank': 'Sıra',
|
||||||
|
'gr.asoBest': 'En iyi',
|
||||||
|
'gr.asoNext': 'Sonraki 3 adım',
|
||||||
|
'gr.asoReading': 'Sıralar herkese açık iTunes Search API sırasını izler; bu App Store aramasına yakındır ama aynı değildir: eğilim olarak oku. Popülerlik yalnızca Apple Ads\'ten gelir (Apple Ads API anahtarıyla aso suggest), asla tahmin edilmez.',
|
||||||
'gr.ppo': 'Ürün Sayfası Optimizasyonu',
|
'gr.ppo': 'Ürün Sayfası Optimizasyonu',
|
||||||
'gr.ppoSub': 'Ekran görüntülerinin App Store A/B testleri',
|
'gr.ppoSub': 'Ekran görüntülerinin App Store A/B testleri',
|
||||||
'gr.ppoRead': 'Testleri oku',
|
'gr.ppoRead': 'Testleri oku',
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Growth: store analytics snapshots against the listing changes from git (`analytics compare --json`, offline; a new
|
// Growth: store analytics snapshots against the listing changes from git (`analytics compare --json`, offline; a new
|
||||||
// snapshot and the App Store report request are confirm-gated writes), App Store Product Page Optimization tests
|
// snapshot and the App Store report request are confirm-gated writes), App Store Product Page Optimization tests
|
||||||
// (status read; create and upload treatments: dry run, dialog, real run; start / stop are owner actions with their
|
// (status read; create and upload treatments: dry run, dialog, real run; start / stop are owner actions with their
|
||||||
// own dialog, never MCP tools), and Google Play store listing experiments (no API: Play Console).
|
// own dialog, never MCP tools), Google Play store listing experiments (no API: Play Console), and the ASO card
|
||||||
|
// (`aso audit --json`, offline: keyword field findings, rank trend from the `aso rank` snapshots, the next 3 actions).
|
||||||
import { useMemo, useState } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
import { type AnalyticsCompare, api, type PpoStatus, type PpoTest } from '../../api';
|
import { type AnalyticsCompare, api, type AsoAuditView, type AsoTrendRow, type PpoStatus, type PpoTest } from '../../api';
|
||||||
import { t } from '../../i18n';
|
import { t } from '../../i18n';
|
||||||
import type { UnifiedApp } from '../../lib/identity';
|
import type { UnifiedApp } from '../../lib/identity';
|
||||||
import { analyticsCsv, exportName } from '../../lib/exports';
|
import { analyticsCsv, exportName } from '../../lib/exports';
|
||||||
|
|
@ -15,6 +16,7 @@ import { useExports } from '../../ui/Exports';
|
||||||
import { Icon, StoreGlyph } from '../../ui/icons';
|
import { Icon, StoreGlyph } from '../../ui/icons';
|
||||||
import { Card, Chip, Empty, ErrorNotice, Kpi, Notice, Seg, Skeleton } from '../../ui/kit';
|
import { Card, Chip, Empty, ErrorNotice, Kpi, Notice, Seg, Skeleton } from '../../ui/kit';
|
||||||
import { LineChart } from '../../ui/LineChart';
|
import { LineChart } from '../../ui/LineChart';
|
||||||
|
import { RankChart } from '../../ui/RankChart';
|
||||||
import { WriteButton } from '../../ui/WriteButton';
|
import { WriteButton } from '../../ui/WriteButton';
|
||||||
import { ascUrl, PLAY_CONSOLE } from '../AppView';
|
import { ascUrl, PLAY_CONSOLE } from '../AppView';
|
||||||
|
|
||||||
|
|
@ -91,6 +93,62 @@ function Analytics({ projectId, hasApple, hasPlay, name, playReports }: { projec
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const arrowTone = (a: AsoTrendRow['arrow']): 'ok' | 'warn' | 'bad' | 'info' | 'neutral' => (a === '↑' || a === 'new' ? 'ok' : a === '↓' ? 'warn' : a === 'lost' ? 'bad' : 'neutral');
|
||||||
|
|
||||||
|
function Aso({ projectId }: { projectId: string }) {
|
||||||
|
const r = useRead<AsoAuditView>(projectId, 'aso.audit', { network: false });
|
||||||
|
const a = r.data;
|
||||||
|
const ranked = a ? a.ranks.rows.filter(x => x.rank !== null) : [];
|
||||||
|
const gaps = a ? a.competitors.gaps.reduce((n, g) => n + g.gaps.length, 0) : 0;
|
||||||
|
// the three best-ranked keywords of the latest snapshot, as lines (rank 1 at the top)
|
||||||
|
const lines = a ? ranked.slice().sort((x, y) => (x.rank ?? 999) - (y.rank ?? 999)).slice(0, 3).map((row, i) => ({
|
||||||
|
label: `${row.keyword} (${row.storefront})`, cls: (['l1', 'l2', 'l3'] as const)[i]!,
|
||||||
|
ranks: a.ranks.series.find(s => s.storefront === row.storefront && s.keyword === row.keyword)?.ranks ?? [],
|
||||||
|
})) : [];
|
||||||
|
return (
|
||||||
|
<Card title={t('gr.aso')} icon="search" sub={a ? t('gr.asoSub', { date: date(a.generated) }) : t('gr.asoSubNone')} pad={false}
|
||||||
|
actions={<button className="btn btn-sm" onClick={r.refresh} disabled={r.loading}><Icon name="refresh" className={r.loading ? 'spin' : undefined} />{t('action.refresh')}</button>}>
|
||||||
|
{r.error ? <div className="card-body"><ErrorNotice error={r.error} /></div> : !a ? <div className="card-body"><Skeleton lines={4} block /></div> : (
|
||||||
|
<div className="card-body stack" style={{ gap: 16 }}>
|
||||||
|
<div className="kpis" style={{ gridTemplateColumns: 'repeat(3, minmax(0, 1fr))' }}>
|
||||||
|
<Kpi icon="text" label={t('gr.asoField')} value={a.keywordField.errors ? t('gr.asoErrors', { count: a.keywordField.errors }) : t('gr.asoWarnings', { count: a.keywordField.warnings })}
|
||||||
|
tone={a.keywordField.errors ? 'bad' : a.keywordField.warnings ? 'warn' : 'ok'} sub={a.drafts.length ? t('gr.asoDrafts', { locales: a.drafts.join(', ') }) : t('gr.asoFieldSub')} />
|
||||||
|
<Kpi icon="activity" label={t('gr.asoRanked')} value={a.ranks.snapshots ? `${num(ranked.length)} / ${num(a.ranks.rows.length)}` : '–'}
|
||||||
|
sub={a.ranks.latest ? t('gr.asoLatest', { date: date(a.ranks.latest) }) : t('gr.asoNoRanks')} />
|
||||||
|
<Kpi icon="search" label={t('gr.asoGaps')} value={a.competitors.date ? num(gaps) : '–'} sub={a.competitors.date ? t('gr.asoGapsSub', { date: date(a.competitors.date) }) : t('gr.asoNoCompetitors')} />
|
||||||
|
</div>
|
||||||
|
{a.ranks.dates.length > 1 && lines.length > 0 && <RankChart dates={a.ranks.dates} lines={lines} label={t('gr.asoChartAria')} noRank={t('gr.asoNotRanked')} />}
|
||||||
|
{a.ranks.rows.length > 0 && (
|
||||||
|
<table className="table">
|
||||||
|
<thead><tr><th>{t('gr.asoKeyword')}</th><th>{t('col.store')}</th><th className="right">{t('gr.asoRank')}</th><th className="right">{t('col.diff')}</th><th className="right">{t('gr.asoBest')}</th></tr></thead>
|
||||||
|
<tbody>
|
||||||
|
{a.ranks.rows.slice(0, 8).map(x => (
|
||||||
|
<tr key={`${x.storefront}|${x.keyword}`}>
|
||||||
|
<td className="strong">{x.keyword}</td>
|
||||||
|
<td className="mono-id">{x.storefront}</td>
|
||||||
|
<td className="right num">{x.rank === null ? '–' : `#${x.rank}`}</td>
|
||||||
|
<td className="right"><Chip tone={arrowTone(x.arrow)} dot={false}>{x.change === null ? x.arrow : `${x.arrow} ${x.change > 0 ? '+' : ''}${x.change}`}</Chip></td>
|
||||||
|
<td className="right num">{x.best === null ? '–' : `#${x.best}`}</td>
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
)}
|
||||||
|
{a.next.length > 0 && (
|
||||||
|
<div className="stack" style={{ gap: 6 }}>
|
||||||
|
<div className="act-head"><Icon name="check" />{t('gr.asoNext')}</div>
|
||||||
|
<ol className="small" style={{ margin: 0, paddingLeft: 18 }}>
|
||||||
|
{a.next.map((x, i) => <li key={i}><span className="strong">{x.what}</span><div className="muted">{x.why}{x.command ? <> · <code className="mono">{x.command}</code></> : null}</div></li>)}
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<p className="small muted">{t('gr.asoReading')}</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function Experiments({ app }: { app: UnifiedApp }) {
|
function Experiments({ app }: { app: UnifiedApp }) {
|
||||||
const d = useData();
|
const d = useData();
|
||||||
const target = app.project?.id ?? app.target;
|
const target = app.project?.id ?? app.target;
|
||||||
|
|
@ -183,6 +241,7 @@ export function GrowthTab({ app }: { app: UnifiedApp }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{app.project && <Analytics projectId={app.project.id} hasApple={hasApple} hasPlay={hasPlay} name={s?.name ?? app.name} playReports={!!s?.playReports} />}
|
{app.project && <Analytics projectId={app.project.id} hasApple={hasApple} hasPlay={hasPlay} name={s?.name ?? app.name} playReports={!!s?.playReports} />}
|
||||||
|
{app.project && (hasApple || hasPlay) && <Aso projectId={app.project.id} />}
|
||||||
<div className={`grid ${hasApple && hasPlay ? 'g-main-side' : ''}`} style={{ alignItems: 'start' }}>
|
<div className={`grid ${hasApple && hasPlay ? 'g-main-side' : ''}`} style={{ alignItems: 'start' }}>
|
||||||
{hasApple && <Experiments app={app} />}
|
{hasApple && <Experiments app={app} />}
|
||||||
{hasPlay && <PlayExperiments app={app} />}
|
{hasPlay && <PlayExperiments app={app} />}
|
||||||
|
|
|
||||||
73
apps/desktop/src/ui/RankChart.tsx
Normal file
73
apps/desktop/src/ui/RankChart.tsx
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
// Keyword ranks over the `aso rank` snapshots, drawn with visx (scales, axes, shapes, tooltip, responsive width).
|
||||||
|
// Rank 1 is the top of the chart (the y axis runs from the worst rank shown down to 1); a keyword the app was not in
|
||||||
|
// the first results for has no point that day. Reuses the line chart's styles (.lchart) and crosshair tooltip.
|
||||||
|
import { AxisBottom, AxisLeft } from '@visx/axis';
|
||||||
|
import { curveMonotoneX } from '@visx/curve';
|
||||||
|
import { Group } from '@visx/group';
|
||||||
|
import { useParentSize } from '@visx/responsive';
|
||||||
|
import { scaleLinear } from '@visx/scale';
|
||||||
|
import { Bar, Circle, Line, LinePath } from '@visx/shape';
|
||||||
|
import { date } from '../lib/format';
|
||||||
|
import { ChartTip, useIndexHover } from './charts';
|
||||||
|
import { dateTicks } from './LineChart';
|
||||||
|
|
||||||
|
export interface RankLine { label: string; ranks: (number | null)[]; cls: 'l1' | 'l2' | 'l3' }
|
||||||
|
|
||||||
|
const M = { top: 12, right: 18, bottom: 26, left: 40 };
|
||||||
|
|
||||||
|
/** The y domain: rank 1 at the top, a round worst rank at the bottom (at least 10) and up to 5 ticks. */
|
||||||
|
export function rankAxis(lines: (number | null)[][]): { worst: number; ticks: number[] } {
|
||||||
|
const hi = Math.max(10, ...lines.flat().filter((v): v is number => v !== null));
|
||||||
|
const step = hi <= 10 ? 3 : hi <= 50 ? 10 : hi <= 100 ? 25 : 50;
|
||||||
|
const worst = hi <= 10 ? 10 : Math.ceil(hi / step) * step;
|
||||||
|
const ticks = [1, ...Array.from({ length: Math.floor(worst / step) }, (_, i) => (i + 1) * step)].filter((v, i, a) => a.indexOf(v) === i && v <= worst);
|
||||||
|
return { worst, ticks };
|
||||||
|
}
|
||||||
|
|
||||||
|
export function RankChart({ dates, lines, label, noRank }: { dates: string[]; lines: RankLine[]; label: string; noRank: string }) {
|
||||||
|
const { parentRef, width } = useParentSize({ debounceTime: 50 });
|
||||||
|
const n = dates.length;
|
||||||
|
const h = useIndexHover(n, width, M.left, M.right);
|
||||||
|
if (n < 2 || !lines.length) return null;
|
||||||
|
const height = Math.round(Math.max(170, Math.min(230, width * 0.28)));
|
||||||
|
const { worst, ticks } = rankAxis(lines.map(l => l.ranks));
|
||||||
|
const x = scaleLinear({ domain: [0, n - 1], range: [M.left, Math.max(M.left + 1, width - M.right)] });
|
||||||
|
const y = scaleLinear({ domain: [1, worst], range: [M.top, height - M.bottom] });
|
||||||
|
const pts = (vs: (number | null)[]) => vs.map((v, i) => [i, v] as const);
|
||||||
|
const defined = (d: readonly [number, number | null]) => d[1] !== null;
|
||||||
|
const xs = dateTicks(n, Math.max(2, Math.floor(width / 110)));
|
||||||
|
const hv = h.hover;
|
||||||
|
return (
|
||||||
|
<div className="lchart">
|
||||||
|
<div ref={parentRef} className="lchart-plot" style={{ height }}>
|
||||||
|
{width > 0 && (
|
||||||
|
<svg width={width} height={height} role="img" aria-label={label} tabIndex={0} {...h.handlers}>
|
||||||
|
<Group className="grid-l">
|
||||||
|
{ticks.map(v => <Line key={v} from={{ x: M.left, y: y(v) }} to={{ x: width - M.right, y: y(v) }} />)}
|
||||||
|
</Group>
|
||||||
|
<AxisLeft scale={y} left={M.left} tickValues={ticks} tickFormat={v => `#${Number(v)}`} hideAxisLine hideTicks tickClassName="ax" tickLabelProps={{ className: 'ax', textAnchor: 'end', dx: -4, dy: 4 }} />
|
||||||
|
<AxisBottom scale={x} top={height - M.bottom} tickValues={xs} tickFormat={v => date(dates[Number(v)])} hideAxisLine hideTicks
|
||||||
|
tickLabelProps={(_, i) => ({ className: 'ax', textAnchor: i === 0 ? 'start' : i === xs.length - 1 ? 'end' : 'middle', dy: 4 })} />
|
||||||
|
{lines.map(l => <LinePath key={l.label} className={`ln ${l.cls}`} data={pts(l.ranks)} defined={defined} x={d => x(d[0])} y={d => y(d[1] ?? worst)} curve={curveMonotoneX} />)}
|
||||||
|
{lines.map(l => l.ranks.map((v, i) => (v === null ? null : <Circle key={`${l.label}${i}`} className={l.cls} cx={x(i)} cy={y(v)} r={2.5} />)))}
|
||||||
|
{hv !== null && (
|
||||||
|
<Group className="hov">
|
||||||
|
<Line from={{ x: x(hv), y: M.top }} to={{ x: x(hv), y: height - M.bottom }} />
|
||||||
|
</Group>
|
||||||
|
)}
|
||||||
|
<Bar x={M.left} y={M.top} width={Math.max(0, width - M.left - M.right)} height={height - M.top - M.bottom} fill="transparent" />
|
||||||
|
</svg>
|
||||||
|
)}
|
||||||
|
{hv !== null && width > 0 && (
|
||||||
|
<ChartTip left={x(hv)} top={h.tooltipTop ?? M.top}>
|
||||||
|
<b>{date(dates[hv])}</b>
|
||||||
|
{lines.map(l => <span key={l.label} className="vx-row"><i className={`sw ${l.cls}`} />{l.label}<b className="num">{l.ranks[hv] == null ? noRank : `#${l.ranks[hv]}`}</b></span>)}
|
||||||
|
</ChartTip>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="lchart-legend" aria-live="polite">
|
||||||
|
{lines.map(l => <span key={l.label} className="lg"><span className={`sw ${l.cls}`} />{l.label}</span>)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
234
cli/aso.ts
234
cli/aso.ts
|
|
@ -1,32 +1,86 @@
|
||||||
// App Store keyword rank check through Apple's public iTunes Search API (no account, no scraping).
|
// App Store keyword work from official / public data only (no scraping, no third-party ASO services).
|
||||||
// storebound aso rank [--storefronts us,de=de-DE] [--keywords "a,b"] [--only-keywords] [--competitors 3] [--limit 200]
|
// storebound aso rank [--storefronts us,de=de-DE] [--keywords "a,b"] [--only-keywords] [--competitors 3] [--limit 200]
|
||||||
// [--delay 3500] [--dry] [--json]
|
// [--delay 3500] [--dry] [--json]
|
||||||
// Keywords: the keyword field of each storefront's locale in store/appstore.md (us -> the primary locale unless
|
// storebound aso competitors [--term <kw>]... [--storefront us,tr] [--only-terms] [--top 10] [--delay 3500] [--no-save] [--dry] [--json]
|
||||||
|
// storebound aso suggest [--locale en-US,tr] [--fresh] [--offline] [--write] [--json]
|
||||||
|
// storebound aso audit [--storefront US] [--json]
|
||||||
|
// rank: keywords = the keyword field of each storefront's locale in store/appstore.md (us -> the primary locale unless
|
||||||
// "us=en-GB"), plus --keywords (--only-keywords: just those). One request per keyword and storefront, at most one
|
// "us=en-GB"), plus --keywords (--only-keywords: just those). One request per keyword and storefront, at most one
|
||||||
// every 3.5 s (Apple allows about 20 a minute); a 403 / 429 stops the run with what was read. Rank = position of the
|
// every 3.5 s (Apple allows about 20 a minute); a 403 / 429 stops the run with what was read. Rank = position of the
|
||||||
// app (apple.appId, else the bundle id) in the first --limit results, "-" when not there; plus the first competitors
|
// app (apple.appId, else the bundle id) in the first --limit results, "-" when not there; plus the first competitors
|
||||||
// (title, developer, rating). Subtitles are not in the public API and are not shown. Writes
|
// (title, developer, rating). Writes .storebound/aso/<date>.json (and compares with the previous one) unless --dry.
|
||||||
// .storebound/aso/<date>.json (and compares with the previous one) unless --dry. Pure parts: cli/lib/aso-rank.ts.
|
// competitors: the same queries and rate limit; per term the top N other apps (name, developer, rating count, first
|
||||||
|
// release, last update, genre) and the words in their names that our name / subtitle / keywords do not cover. Saves
|
||||||
|
// .storebound/aso/competitors/<date>.json unless --dry / --no-save; names the apps new in a term's top N since the
|
||||||
|
// previous snapshot. Competitor subtitles are not in any public API and are not shown.
|
||||||
|
// suggest: keyword candidates per App Store locale from our own name / subtitle / description, the latest competitor
|
||||||
|
// snapshot, the localized category names (from the Search API's genres) and, when Apple Ads credentials exist (and
|
||||||
|
// not --offline), Apple Ads keyword suggestions with their relative popularity (0-100). Prints the ranked candidates
|
||||||
|
// and a 100-byte keyword field per locale as a diff against store/appstore.md; --write puts it there with a draft
|
||||||
|
// line above it (review, then delete the line). Never invents a popularity.
|
||||||
|
// audit: one offline report (cli/lib/aso-audit.ts) with experiment ideas and the next 3 actions. Never writes.
|
||||||
|
// Pure parts: cli/lib/aso-rank.ts, cli/lib/aso-intel.ts, cli/lib/aso-audit.ts.
|
||||||
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
|
import { adsClient } from './ads/client';
|
||||||
|
import type { Snapshot } from './lib/analytics';
|
||||||
|
import { mergeSeries } from './lib/analytics';
|
||||||
|
import { auditAso } from './lib/aso';
|
||||||
|
import { auditText, buildAudit, type RankSnap } from './lib/aso-audit';
|
||||||
|
import {
|
||||||
|
ADS_KEYWORD_SUGGESTIONS, type AdsSuggestion, candidates, categoryNames, competitorRow, type CompetitorRow, type CompetitorSnapshot, coverageGaps, draftLocales,
|
||||||
|
draftMark, fitKeywordField, keywordSuggestionBody, newEntrants, parseKeywordSuggestions, setKeywords, storefrontOf, tokens,
|
||||||
|
} from './lib/aso-intel';
|
||||||
|
import { competitors, keywordList, MIN_DELAY_MS, parseStorefronts, rankDelta, rankOf, type RankRow, type SearchApp, searchUrl } from './lib/aso-rank';
|
||||||
|
import { appleName } from './lib/config';
|
||||||
|
import { parseAppStoreListing, parsePlayListing } from './lib/copy';
|
||||||
import type { Ctx } from './lib/ctx';
|
import type { Ctx } from './lib/ctx';
|
||||||
import { done, log, printJson, warn } from './lib/log';
|
import { done, log, printJson, warn } from './lib/log';
|
||||||
import { competitors, keywordList, MIN_DELAY_MS, parseStorefronts, rankDelta, rankOf, type RankRow, type SearchApp, searchUrl } from './lib/aso-rank';
|
|
||||||
import { appleSections } from './lib/project-files';
|
import { appleSections } from './lib/project-files';
|
||||||
import { textTable } from './lib/table';
|
import { textTable } from './lib/table';
|
||||||
|
|
||||||
const TAG = 'aso';
|
const TAG = 'aso';
|
||||||
|
const SUBS = ['rank', 'competitors', 'suggest', 'audit'];
|
||||||
|
const SNAP_RE = /^\d{4}-\d{2}-\d{2}\.json$/;
|
||||||
|
const today = () => new Date().toISOString().slice(0, 10);
|
||||||
|
|
||||||
export async function run(ctx: Ctx): Promise<void> {
|
function listingOf(ctx: Ctx): { file: string; md: string; sections: Map<string, Record<string, string | undefined>> } {
|
||||||
|
const { config, resolve } = ctx.loaded;
|
||||||
|
const file = resolve(config.apple?.listing ?? 'store/appstore.md');
|
||||||
|
const md = existsSync(file) ? readFileSync(file, 'utf8') : '';
|
||||||
|
return { file, md, sections: appleSections(md) };
|
||||||
|
}
|
||||||
|
|
||||||
|
const primaryLocale = (ctx: Ctx): string => ctx.loaded.config.apple?.primaryLocale ?? ctx.loaded.config.languages.find(l => l.apple)?.apple ?? 'en-US';
|
||||||
|
|
||||||
|
function snapshots<T>(dir: string): { file: string; data: T }[] {
|
||||||
|
if (!existsSync(dir)) return [];
|
||||||
|
return readdirSync(dir).filter(f => SNAP_RE.test(f)).sort().map(f => {
|
||||||
|
try { return { file: f, data: JSON.parse(readFileSync(join(dir, f), 'utf8')) as T }; } catch { return null; }
|
||||||
|
}).filter((x): x is { file: string; data: T } => x !== null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** One Search API call per item, one every `delay` ms; stops on 403 / 429 with what was read. */
|
||||||
|
async function searchAll<P extends { storefront: string; keyword: string }>(plan: P[], limit: number, delay: number, each: (p: P, results: SearchApp[], i: number) => void): Promise<number> {
|
||||||
|
let read = 0;
|
||||||
|
for (const [i, p] of plan.entries()) {
|
||||||
|
if (i) await Bun.sleep(delay);
|
||||||
|
const r = await fetch(searchUrl(p.keyword, p.storefront, limit), { headers: { Accept: 'application/json' } });
|
||||||
|
if (r.status === 403 || r.status === 429) { warn(TAG, `Search API answered ${r.status} (rate limit): stopped after ${read} of ${plan.length}; try later or with a larger --delay`); break; }
|
||||||
|
if (!r.ok) { warn(TAG, `${p.storefront} "${p.keyword}": HTTP ${r.status}`); continue; }
|
||||||
|
each(p, ((await r.json()) as { results?: SearchApp[] }).results ?? [], i);
|
||||||
|
read++;
|
||||||
|
}
|
||||||
|
return read;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function rank(ctx: Ctx): Promise<void> {
|
||||||
const { config, resolve } = ctx.loaded;
|
const { config, resolve } = ctx.loaded;
|
||||||
const a = ctx.args;
|
const a = ctx.args;
|
||||||
if (a._[0] !== 'rank') throw new Error('usage: storebound aso rank [--storefronts us,de=de-DE] [--keywords "a,b"] [--dry] [--json]');
|
|
||||||
if (!config.apple) throw new Error('aso rank checks App Store search: the config has no apple section');
|
if (!config.apple) throw new Error('aso rank checks App Store search: the config has no apple section');
|
||||||
const primary = config.apple.primaryLocale ?? config.languages.find(l => l.apple)?.apple ?? 'en-US';
|
const { file: listingFile, sections: listing } = listingOf(ctx);
|
||||||
const listingFile = resolve(config.apple.listing ?? 'store/appstore.md');
|
|
||||||
const listing = existsSync(listingFile) ? appleSections(readFileSync(listingFile, 'utf8')) : new Map<string, Record<string, string | undefined>>();
|
|
||||||
const extra = a.list('keywords');
|
const extra = a.list('keywords');
|
||||||
const fronts = parseStorefronts(a.list('storefronts'), primary);
|
const fronts = parseStorefronts(a.list('storefronts'), primaryLocale(ctx));
|
||||||
const n = a.num('competitors', 3);
|
const n = a.num('competitors', 3);
|
||||||
const limit = a.num('limit', 200);
|
const limit = a.num('limit', 200);
|
||||||
const delay = Math.max(MIN_DELAY_MS, a.num('delay', MIN_DELAY_MS));
|
const delay = Math.max(MIN_DELAY_MS, a.num('delay', MIN_DELAY_MS));
|
||||||
|
|
@ -40,21 +94,16 @@ export async function run(ctx: Ctx): Promise<void> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const rows: RankRow[] = [];
|
const rows: RankRow[] = [];
|
||||||
for (const [i, p] of plan.entries()) {
|
await searchAll(plan, limit, delay, (p, results, i) => {
|
||||||
if (i) await Bun.sleep(delay);
|
|
||||||
const r = await fetch(searchUrl(p.keyword, p.storefront, limit), { headers: { Accept: 'application/json' } });
|
|
||||||
if (r.status === 403 || r.status === 429) { warn(TAG, `Search API answered ${r.status} (rate limit): stopped after ${rows.length} of ${plan.length}; try later or with a larger --delay`); break; }
|
|
||||||
if (!r.ok) { warn(TAG, `${p.storefront} "${p.keyword}": HTTP ${r.status}`); continue; }
|
|
||||||
const results = ((await r.json()) as { results?: SearchApp[] }).results ?? [];
|
|
||||||
const row: RankRow = { storefront: p.storefront, locale: p.locale, keyword: p.keyword, rank: rankOf(results, app), results: results.length, competitors: competitors(results, app, n) };
|
const row: RankRow = { storefront: p.storefront, locale: p.locale, keyword: p.keyword, rank: rankOf(results, app), results: results.length, competitors: competitors(results, app, n) };
|
||||||
rows.push(row);
|
rows.push(row);
|
||||||
log(TAG, `${i + 1}/${plan.length} ${p.storefront} "${p.keyword}": ${row.rank ?? `not in the first ${results.length}`}`);
|
log(TAG, `${i + 1}/${plan.length} ${p.storefront} "${p.keyword}": ${row.rank ?? `not in the first ${results.length}`}`);
|
||||||
}
|
});
|
||||||
const dir = resolve('.storebound/aso');
|
const dir = resolve('.storebound/aso');
|
||||||
const prevFile = existsSync(dir) ? readdirSync(dir).filter(f => /^\d{4}-\d{2}-\d{2}\.json$/.test(f)).sort().at(-1) : undefined;
|
const prevFile = snapshots<unknown>(dir).at(-1)?.file;
|
||||||
const prev = prevFile ? (JSON.parse(readFileSync(join(dir, prevFile), 'utf8')) as { rows?: RankRow[] }).rows : undefined;
|
const prev = prevFile ? (JSON.parse(readFileSync(join(dir, prevFile), 'utf8')) as { rows?: RankRow[] }).rows : undefined;
|
||||||
const delta = rankDelta(rows, prev);
|
const delta = rankDelta(rows, prev);
|
||||||
const date = new Date().toISOString().slice(0, 10);
|
const date = today();
|
||||||
if (a.has('json')) printJson({ date, previous: prevFile ?? null, rows: rows.map(r => ({ ...r, change: delta.get(`${r.storefront}|${r.keyword.toLowerCase()}`) ?? null })) });
|
if (a.has('json')) printJson({ date, previous: prevFile ?? null, rows: rows.map(r => ({ ...r, change: delta.get(`${r.storefront}|${r.keyword.toLowerCase()}`) ?? null })) });
|
||||||
else console.log(textTable(['store', 'keyword', 'rank', 'change', 'top competitors'], rows.map(r => {
|
else console.log(textTable(['store', 'keyword', 'rank', 'change', 'top competitors'], rows.map(r => {
|
||||||
const d = delta.get(`${r.storefront}|${r.keyword.toLowerCase()}`);
|
const d = delta.get(`${r.storefront}|${r.keyword.toLowerCase()}`);
|
||||||
|
|
@ -64,3 +113,148 @@ export async function run(ctx: Ctx): Promise<void> {
|
||||||
writeFileSync(join(dir, `${date}.json`), JSON.stringify({ date, app: { appId: app.appId ?? null, bundleId: app.bundleId }, rows }, null, 2) + '\n');
|
writeFileSync(join(dir, `${date}.json`), JSON.stringify({ date, app: { appId: app.appId ?? null, bundleId: app.bundleId }, rows }, null, 2) + '\n');
|
||||||
done(TAG, `${rows.length} rank(s) saved to ${join(dir, `${date}.json`)}${prevFile ? ` (change vs ${prevFile})` : ''}; Search API order is close to App Store search, read it as a trend`);
|
done(TAG, `${rows.length} rank(s) saved to ${join(dir, `${date}.json`)}${prevFile ? ` (change vs ${prevFile})` : ''}; Search API order is close to App Store search, read it as a trend`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function competitorsCmd(ctx: Ctx): Promise<void> {
|
||||||
|
const { config, resolve } = ctx.loaded;
|
||||||
|
const a = ctx.args;
|
||||||
|
if (!config.apple) throw new Error('aso competitors reads App Store search: the config has no apple section');
|
||||||
|
const { file, sections } = listingOf(ctx);
|
||||||
|
const terms = a.many('term').flatMap(t => t.split(',')).map(t => t.trim()).filter(Boolean);
|
||||||
|
const fronts = parseStorefronts([...a.list('storefront'), ...a.list('storefronts')], primaryLocale(ctx));
|
||||||
|
const top = Math.max(1, Math.min(50, a.num('top', 10)));
|
||||||
|
const delay = Math.max(MIN_DELAY_MS, a.num('delay', MIN_DELAY_MS));
|
||||||
|
const app = { appId: config.apple.appId, bundleId: config.apple.bundleId };
|
||||||
|
const plan = fronts.flatMap(f => keywordList(a.has('only-terms') ? '' : sections.get(f.locale)?.keywords, terms).map(k => ({ ...f, keyword: k })));
|
||||||
|
if (!plan.length) throw new Error(`no terms: ${file} has no keywords for ${fronts.map(f => f.locale).join(', ')}; pass --term <keyword>`);
|
||||||
|
const limit = top + 1;
|
||||||
|
const save = !a.has('dry') && !a.has('no-save');
|
||||||
|
if (!a.has('json')) log(TAG, `${plan.length} quer${plan.length === 1 ? 'y' : 'ies'} (${fronts.map(f => f.storefront).join(', ')}), top ${top} each, one every ${delay / 1000}s: about ${Math.ceil(plan.length * delay / 60_000)} min`);
|
||||||
|
if (a.has('dry')) {
|
||||||
|
if (a.has('json')) printJson({ dryRun: true, top, queries: plan.map(p => ({ storefront: p.storefront, locale: p.locale, term: p.keyword, url: searchUrl(p.keyword, p.storefront, limit) })) });
|
||||||
|
else for (const p of plan) log(TAG, `would GET ${searchUrl(p.keyword, p.storefront, limit)}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const rows: CompetitorRow[] = [];
|
||||||
|
await searchAll(plan, limit, delay, (p, results, i) => {
|
||||||
|
rows.push(competitorRow(results, app, { storefront: p.storefront, locale: p.locale, term: p.keyword }, top));
|
||||||
|
if (!a.has('json')) log(TAG, `${i + 1}/${plan.length} ${p.storefront} "${p.keyword}": ${results.length} result(s)`);
|
||||||
|
});
|
||||||
|
const dir = resolve('.storebound/aso/competitors');
|
||||||
|
const prev = snapshots<CompetitorSnapshot>(dir).filter(s => s.file !== `${today()}.json`).at(-1);
|
||||||
|
const fresh = newEntrants(rows, prev?.data.rows);
|
||||||
|
const gaps = fronts.map(f => {
|
||||||
|
const s = sections.get(f.locale) ?? {};
|
||||||
|
const covered = [...tokens(s.name ?? appleName(config), f.locale), ...tokens(s.subtitle ?? '', f.locale), ...(s.keywords ?? '').split(',').flatMap(t => tokens(t, f.locale))];
|
||||||
|
return { storefront: f.storefront, locale: f.locale, gaps: coverageGaps(rows.filter(r => r.storefront === f.storefront && r.locale === f.locale), covered, f.locale) };
|
||||||
|
});
|
||||||
|
const snap: CompetitorSnapshot = { date: today(), app: { appId: app.appId ?? null, bundleId: app.bundleId }, top, rows };
|
||||||
|
if (a.has('json')) printJson({ ...snap, previous: prev?.file ?? null, newEntrants: Object.fromEntries(fresh), gaps, saved: save,
|
||||||
|
notes: ['Search API order is close to, not equal to, App Store search', 'competitor subtitles are not in any public API'] });
|
||||||
|
else {
|
||||||
|
for (const r of rows) {
|
||||||
|
console.log(`\n${r.storefront} "${r.term}"${r.ourRank ? ` (you: #${r.ourRank})` : ''}`);
|
||||||
|
console.log(textTable(['#', 'app', 'developer', 'ratings', 'released', 'updated', 'genre'],
|
||||||
|
r.apps.map(x => [x.rank, x.name.slice(0, 40), x.developer.slice(0, 24), x.ratings, x.released ?? '-', x.updated ?? '-', x.genres[0]?.name || x.genre])));
|
||||||
|
const n = fresh.get(`${r.storefront}|${r.term.toLowerCase()}`);
|
||||||
|
if (n?.length) log(TAG, `new in the top ${top} since ${prev!.data.date}: ${n.join(', ')}`);
|
||||||
|
}
|
||||||
|
for (const g of gaps) console.log(`\n${g.storefront} ${g.locale}: words in competitors' names you do not cover: ${g.gaps.length ? g.gaps.map(x => `${x.word} (${x.apps} apps, ${x.developers} developers)`).join(', ') : 'none'}`);
|
||||||
|
log(TAG, 'subtitles are not in any public API, so they are not shown; words one developer uses are left out (likely a brand); never put other apps\' names into your keywords');
|
||||||
|
}
|
||||||
|
if (save) {
|
||||||
|
mkdirSync(dir, { recursive: true });
|
||||||
|
writeFileSync(join(dir, `${snap.date}.json`), JSON.stringify(snap, null, 2) + '\n');
|
||||||
|
if (!a.has('json')) done(TAG, `${rows.length} term(s) saved to ${join(dir, `${snap.date}.json`)}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function suggest(ctx: Ctx): Promise<void> {
|
||||||
|
const { config, resolve, root } = ctx.loaded;
|
||||||
|
const a = ctx.args;
|
||||||
|
const json = a.has('json');
|
||||||
|
if (!config.apple) throw new Error('aso suggest proposes App Store keyword fields: the config has no apple section');
|
||||||
|
const { file, md } = listingOf(ctx);
|
||||||
|
if (!md) throw new Error(`${file} not found`);
|
||||||
|
const listing = parseAppStoreListing(md);
|
||||||
|
const locales = a.list('locale').length ? a.list('locale') : Object.keys(listing);
|
||||||
|
for (const l of locales) if (!listing[l]) throw new Error(`--locale ${l}: no "## ${l}" section in ${file}`);
|
||||||
|
const comp = snapshots<CompetitorSnapshot>(resolve('.storebound/aso/competitors')).at(-1)?.data ?? null;
|
||||||
|
const cats = Object.values(config.apple.info?.categories ?? {}).filter((x): x is string => typeof x === 'string');
|
||||||
|
// Apple Ads keyword suggestions: only with the owner's credentials and an Apple ID; never estimated without them
|
||||||
|
let ads: ReturnType<typeof adsClient> | null = null;
|
||||||
|
let adsNote = '';
|
||||||
|
if (a.has('offline')) adsNote = '--offline: Apple Ads not asked; popularity unknown';
|
||||||
|
else if (!config.apple.appId) adsNote = 'no apple.appId in the config: Apple Ads suggestions need the app\'s Apple ID; popularity unknown';
|
||||||
|
else {
|
||||||
|
try { ads = adsClient(root); if (!ads.accountId) { ads = null; adsNote = 'APPLE_ADS_ACCOUNT_ID is not set: popularity unknown'; } } catch (e) { adsNote = `no Apple Ads credentials (${(e as Error).message.split(';')[0]}): popularity unknown`; }
|
||||||
|
}
|
||||||
|
const results: { locale: string; storefront: string; ads: string; competitors: string | null; candidates: ReturnType<typeof candidates>; proposal: ReturnType<typeof fitKeywordField> }[] = [];
|
||||||
|
for (const locale of locales) {
|
||||||
|
const c = listing[locale]!;
|
||||||
|
const sf = storefrontOf(locale);
|
||||||
|
const rows = (comp?.rows ?? []).filter(r => r.locale === locale);
|
||||||
|
const name = c.name ?? appleName(config);
|
||||||
|
let sugg: AdsSuggestion[] = [];
|
||||||
|
let adsState = adsNote;
|
||||||
|
if (ads) {
|
||||||
|
const seeds = [...new Set([...tokens(name, locale), ...tokens(c.subtitle ?? '', locale), ...(c.keywords ?? '').split(',').map(t => t.trim()).filter(Boolean)])].slice(0, 20);
|
||||||
|
try {
|
||||||
|
sugg = parseKeywordSuggestions(await ads.post(ADS_KEYWORD_SUGGESTIONS, keywordSuggestionBody(config.apple.appId!, seeds, [sf])));
|
||||||
|
adsState = `Apple Ads keyword suggestions (${sf.toUpperCase()}): ${sugg.length}; popularity is Apple's relative 0-100 score, not a search volume`;
|
||||||
|
} catch (e) { adsState = `Apple Ads keyword suggestions failed (${(e as Error).message.slice(0, 160)}): popularity unknown`; }
|
||||||
|
}
|
||||||
|
const cands = candidates({ locale, name, subtitle: c.subtitle ?? '', keywords: c.keywords ?? '', description: c.description ?? '', competitors: rows, categories: categoryNames(rows, cats), ads: sugg });
|
||||||
|
const proposal = fitKeywordField({ locale, current: c.keywords ?? '', name, subtitle: c.subtitle ?? '', ranked: cands, fresh: a.has('fresh') });
|
||||||
|
results.push({ locale, storefront: sf, ads: adsState, competitors: rows.length ? `${comp!.date}: ${rows.length} term(s)` : null, candidates: cands, proposal });
|
||||||
|
}
|
||||||
|
const write = a.has('write') && !a.has('dry');
|
||||||
|
const changed = results.filter(r => r.proposal.after !== r.proposal.before);
|
||||||
|
if (json) printJson({ file, written: write && changed.length > 0, results: results.map(r => ({ ...r, candidates: r.candidates.slice(0, 60) })) });
|
||||||
|
else {
|
||||||
|
for (const r of results) {
|
||||||
|
console.log(`\n== ${r.locale} (storefront ${r.storefront}) · competitors: ${r.competitors ?? 'no snapshot (storebound aso competitors)'} · ${r.ads}`);
|
||||||
|
const shown = r.candidates.filter(c => c.status === 'candidate').slice(0, 25);
|
||||||
|
console.log(textTable(['candidate', 'from', 'relevance', 'in names', 'popularity'], shown.map(c => [c.term, c.sources.join('+'), `${c.relevance}/2`, `${c.inNames}/${c.ofApps}`,
|
||||||
|
c.popularity === null ? 'unknown' : `${c.popularity}${c.popularityFrom === 'phrase' ? ' (phrase)' : ''}`])));
|
||||||
|
const skipped = r.candidates.filter(c => c.status !== 'candidate' && c.kind === 'word').slice(0, 12);
|
||||||
|
if (skipped.length) log(TAG, `left out: ${skipped.map(c => `${c.term} (${c.why})`).join(', ')}`);
|
||||||
|
const p = r.proposal;
|
||||||
|
if (p.after === p.before) { log(TAG, `${r.locale}: keyword field unchanged (${p.bytes}/100 bytes)`); continue; }
|
||||||
|
console.log(`--- ${r.locale} keywords (store/appstore.md)\n- ${p.before || '(empty)'}\n+ ${p.after}\n ${p.bytes}/100 bytes · kept ${p.kept.length} · added ${p.added.join(', ') || 'none'}${p.dropped.length ? ` · dropped ${p.dropped.map(d => `${d.term} (${d.why})`).join(', ')}` : ''}`);
|
||||||
|
}
|
||||||
|
log(TAG, 'relevance: in your own text (+1) and in competitors\' names (+1); "in names": top apps that already have the word in their name; popularity only from Apple Ads, never estimated');
|
||||||
|
}
|
||||||
|
if (!changed.length) return;
|
||||||
|
if (!write) { if (!json) log(TAG, `dry run: nothing written; --write puts the ${changed.length} proposal(s) into ${file} as drafts for review`); return; }
|
||||||
|
let next = md;
|
||||||
|
for (const r of changed) next = setKeywords(next, r.locale, r.proposal.after, draftMark(today()));
|
||||||
|
writeFileSync(file, next);
|
||||||
|
if (!json) done(TAG, `wrote ${changed.length} draft keyword field(s) to ${file}: review them, delete the draft lines, then storebound check --aso`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function audit(ctx: Ctx): void {
|
||||||
|
const { config, resolve } = ctx.loaded;
|
||||||
|
const a = ctx.args;
|
||||||
|
const storefront = (a.get('storefront') ?? 'US').toUpperCase();
|
||||||
|
const { file, md } = listingOf(ctx);
|
||||||
|
const apple = config.apple && md ? parseAppStoreListing(md) : undefined;
|
||||||
|
const playFile = resolve(config.play?.listing ?? 'store/listing.md');
|
||||||
|
const play = config.play && existsSync(playFile) ? parsePlayListing(readFileSync(playFile, 'utf8'), config.app.name) : undefined;
|
||||||
|
const findings = auditAso({ apple, play, appName: appleName(config), storefront });
|
||||||
|
const ranks = snapshots<RankSnap>(resolve('.storebound/aso')).map(s => ({ date: s.data.date, rows: s.data.rows ?? [] }));
|
||||||
|
const comp = snapshots<CompetitorSnapshot>(resolve('.storebound/aso/competitors')).at(-1)?.data ?? null;
|
||||||
|
const analytics = mergeSeries(snapshots<Snapshot>(resolve('.storebound/analytics')).map(s => s.data)).apple;
|
||||||
|
const r = buildAudit({ today: today(), storefront, findings, drafts: md ? draftLocales(md) : [], apple, appName: appleName(config), play, ranks, competitors: comp, analytics,
|
||||||
|
variants: Object.keys(config.shots?.variants ?? {}) });
|
||||||
|
if (a.has('json')) return printJson({ ...r, files: { appstore: apple ? file : null, play: play ? playFile : null } });
|
||||||
|
console.log(auditText(r));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function run(ctx: Ctx): Promise<void> {
|
||||||
|
const sub = ctx.args._[0];
|
||||||
|
if (!sub || !SUBS.includes(sub)) throw new Error('usage: storebound aso rank | competitors | suggest | audit (see the aso-basics skill)');
|
||||||
|
if (sub === 'rank') return rank(ctx);
|
||||||
|
if (sub === 'competitors') return competitorsCmd(ctx);
|
||||||
|
if (sub === 'suggest') return suggest(ctx);
|
||||||
|
return audit(ctx);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
import { existsSync, readFileSync } from 'node:fs';
|
import { existsSync, readFileSync } from 'node:fs';
|
||||||
import { relative } from 'node:path';
|
import { relative } from 'node:path';
|
||||||
import { type AsoFinding, auditAso } from './lib/aso';
|
import { type AsoFinding, auditAso } from './lib/aso';
|
||||||
|
import { draftLocales } from './lib/aso-intel';
|
||||||
import { appleName, playCodes } from './lib/config';
|
import { appleName, playCodes } from './lib/config';
|
||||||
import { APPLE_IAP_LIMITS, appleNameIssues, len, parseAppStoreListing, parsePlayListing } from './lib/copy';
|
import { APPLE_IAP_LIMITS, appleNameIssues, len, parseAppStoreListing, parsePlayListing } from './lib/copy';
|
||||||
import type { Ctx } from './lib/ctx';
|
import type { Ctx } from './lib/ctx';
|
||||||
|
|
@ -20,9 +21,11 @@ import { type CopyFile, validateCopy } from './shots/lib';
|
||||||
|
|
||||||
function aso(ctx: Ctx): void {
|
function aso(ctx: Ctx): void {
|
||||||
const { config, resolve } = ctx.loaded;
|
const { config, resolve } = ctx.loaded;
|
||||||
const apple = config.apple ? parseAppStoreListing(readFileSync(resolve(config.apple.listing ?? 'store/appstore.md'), 'utf8')) : undefined;
|
const appleMd = config.apple ? readFileSync(resolve(config.apple.listing ?? 'store/appstore.md'), 'utf8') : '';
|
||||||
|
const apple = config.apple ? parseAppStoreListing(appleMd) : undefined;
|
||||||
const play = config.play ? parsePlayListing(readFileSync(resolve(config.play.listing ?? 'store/listing.md'), 'utf8'), config.app.name) : undefined;
|
const play = config.play ? parsePlayListing(readFileSync(resolve(config.play.listing ?? 'store/listing.md'), 'utf8'), config.app.name) : undefined;
|
||||||
const f: AsoFinding[] = auditAso({ apple, play, appName: appleName(config), storefront: ctx.args.get('storefront') ?? 'US' });
|
const f: AsoFinding[] = auditAso({ apple, play, appName: appleName(config), storefront: ctx.args.get('storefront') ?? 'US' });
|
||||||
|
for (const l of draftLocales(appleMd)) f.push({ level: 'warn', where: `apple ${l}`, msg: 'keywords: draft from `aso suggest`, not reviewed yet (review, then delete the storebound-aso draft line)' });
|
||||||
if (ctx.args.has('json')) { const errors = f.filter(x => x.level === 'error').length; printJson({ findings: f, errors }); if (errors) process.exitCode = 1; return; }
|
if (ctx.args.has('json')) { const errors = f.filter(x => x.level === 'error').length; printJson({ findings: f, errors }); if (errors) process.exitCode = 1; return; }
|
||||||
const tag = { error: 'ERROR', warn: 'warn ', info: 'info ' } as const;
|
const tag = { error: 'ERROR', warn: 'warn ', info: 'info ' } as const;
|
||||||
for (const x of f) console.log(`${tag[x.level]} [${x.where}] ${x.msg}`);
|
for (const x of f) console.log(`${tag[x.level]} [${x.where}] ${x.msg}`);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ const COMMANDS: Record<string, [() => Promise<Mod>, string]> = {
|
||||||
'catalog': [() => import('./catalog'), 'diff: cross-store parity of products + subscriptions (missing / extra / mismatched, prices per region, offers); read-only, exit 1 on mismatches | pull [--write]: store texts of IAPs + subscriptions as a config proposal'],
|
'catalog': [() => import('./catalog'), 'diff: cross-store parity of products + subscriptions (missing / extra / mismatched, prices per region, offers); read-only, exit 1 on mismatches | pull [--write]: store texts of IAPs + subscriptions as a config proposal'],
|
||||||
'reports': [() => import('./reports'), 'apple-sales | apple-finance --month | play-earnings --month | play-sales --month: download to .storebound/reports/, summary table + CSV; read-only'],
|
'reports': [() => import('./reports'), 'apple-sales | apple-finance --month | play-earnings --month | play-sales --month: download to .storebound/reports/, summary table + CSV; read-only'],
|
||||||
'triage': [() => import('./triage'), 'TestFlight crash / screenshot feedback and Play error reports grouped by signature, device, OS version, build; read-only, --json'],
|
'triage': [() => import('./triage'), 'TestFlight crash / screenshot feedback and Play error reports grouped by signature, device, OS version, build; read-only, --json'],
|
||||||
'aso': [() => import('./aso'), 'rank [--storefronts us,de] [--keywords a,b]: App Store rank per keyword and storefront + competitors from the public iTunes Search API (rate limited) -> .storebound/aso/'],
|
'aso': [() => import('./aso'), 'rank | competitors | suggest | audit: App Store ranks, top apps per keyword, keyword field proposals (Apple Ads popularity with credentials) and one ASO report, from the public iTunes Search API -> .storebound/aso/'],
|
||||||
'prices': [() => import('./prices'), 'export | import a CSV of product x store x region prices (diff first, asks before writing; Apple future-dated changes) | ppp --base <USD> (purchasing power price sheet, snapped to store price points)'],
|
'prices': [() => import('./prices'), 'export | import a CSV of product x store x region prices (diff first, asks before writing; Apple future-dated changes) | ppp --base <USD> (purchasing power price sheet, snapped to store price points)'],
|
||||||
'ads apple': [() => import('./ads/apple'), 'Apple Ads (Search Ads): status | campaigns | report (spend, taps, installs, CPA per campaign / keyword, --csv); bid | budget | pause (dry run, asks first; never via MCP)'],
|
'ads apple': [() => import('./ads/apple'), 'Apple Ads (Search Ads): status | campaigns | report (spend, taps, installs, CPA per campaign / keyword, --csv); bid | budget | pause (dry run, asks first; never via MCP)'],
|
||||||
'web': [() => import('./web'), 'init (apple-app-site-association, assetlinks.json, Smart App Banner tag, optional landing page) | check <domain> (live files: content type, no redirects, ids match)'],
|
'web': [() => import('./web'), 'init (apple-app-site-association, assetlinks.json, Smart App Banner tag, optional landing page) | check <domain> (live files: content type, no redirects, ids match)'],
|
||||||
|
|
|
||||||
221
cli/lib/aso-audit.ts
Normal file
221
cli/lib/aso-audit.ts
Normal file
|
|
@ -0,0 +1,221 @@
|
||||||
|
// `aso audit`: one offline report over everything storebound already keeps, as pure parts. Inputs: the `check --aso`
|
||||||
|
// findings and the cross-locale free-keyword-room hint (cli/lib/aso.ts), the rank snapshots of `aso rank`
|
||||||
|
// (.storebound/aso/<date>.json, trend arrows), the latest competitor snapshot of `aso competitors`
|
||||||
|
// (.storebound/aso/competitors/<date>.json, coverage gaps), the Play listing (keyword density, short description use),
|
||||||
|
// the App Store analytics snapshots (.storebound/analytics, impressions / downloads / conversion) and the screenshot
|
||||||
|
// variants of the config. Output: the report, experiment ideas (suggestions only: nothing is started) and the next 3
|
||||||
|
// concrete actions. No network, no writes.
|
||||||
|
import type { AppleDay } from './analytics';
|
||||||
|
import type { AsoFinding } from './aso';
|
||||||
|
import { words } from './aso';
|
||||||
|
import { type CompetitorSnapshot, coverageGaps, type Gap, isStop, tokens } from './aso-intel';
|
||||||
|
import type { RankRow } from './aso-rank';
|
||||||
|
import type { AppleCopy, PlayCopy } from './copy';
|
||||||
|
import { len } from './copy';
|
||||||
|
import { textTable } from './table';
|
||||||
|
|
||||||
|
export interface RankSnap { date: string; rows: RankRow[] }
|
||||||
|
export type Arrow = '↑' | '↓' | '→' | 'new' | 'lost' | '·';
|
||||||
|
export interface TrendRow { storefront: string; keyword: string; rank: number | null; previous: number | null; change: number | null; arrow: Arrow; best: number | null; snapshots: number }
|
||||||
|
|
||||||
|
const k = (r: { storefront: string; keyword: string }) => `${r.storefront}|${r.keyword.toLowerCase()}`;
|
||||||
|
|
||||||
|
/** Latest rank per storefront + keyword against the snapshot before it (positive change = moved up). Pure. */
|
||||||
|
export function rankTrend(snaps: RankSnap[]): { rows: TrendRow[]; dates: string[]; series: { storefront: string; keyword: string; ranks: (number | null)[] }[] } {
|
||||||
|
const sorted = [...snaps].sort((a, b) => a.date.localeCompare(b.date));
|
||||||
|
const dates = sorted.map(s => s.date);
|
||||||
|
const hist = new Map<string, { storefront: string; keyword: string; ranks: (number | null | undefined)[] }>();
|
||||||
|
sorted.forEach((s, i) => {
|
||||||
|
for (const r of s.rows) {
|
||||||
|
const h = hist.get(k(r)) ?? { storefront: r.storefront, keyword: r.keyword, ranks: Array(sorted.length).fill(undefined) };
|
||||||
|
h.ranks[i] = r.rank;
|
||||||
|
hist.set(k(r), h);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const rows: TrendRow[] = [];
|
||||||
|
for (const h of hist.values()) {
|
||||||
|
const seen = h.ranks.map((v, i) => ({ v, i })).filter(x => x.v !== undefined) as { v: number | null; i: number }[];
|
||||||
|
const last = seen.at(-1)!, prev = seen.at(-2);
|
||||||
|
const rank = last.v, previous = prev ? prev.v : null;
|
||||||
|
const arrow: Arrow = !prev ? (rank === null ? '·' : 'new') : rank === null ? (previous === null ? '·' : 'lost') : previous === null ? 'new'
|
||||||
|
: rank < previous ? '↑' : rank > previous ? '↓' : '→';
|
||||||
|
const known = seen.map(x => x.v).filter((v): v is number => v !== null);
|
||||||
|
rows.push({ storefront: h.storefront, keyword: h.keyword, rank, previous, change: rank !== null && previous !== null ? previous - rank : null, arrow,
|
||||||
|
best: known.length ? Math.min(...known) : null, snapshots: seen.length });
|
||||||
|
}
|
||||||
|
rows.sort((a, b) => a.storefront.localeCompare(b.storefront) || (a.rank ?? 999) - (b.rank ?? 999) || a.keyword.localeCompare(b.keyword));
|
||||||
|
const series = [...hist.values()].map(h => ({ storefront: h.storefront, keyword: h.keyword, ranks: h.ranks.map(v => v ?? null) }));
|
||||||
|
return { rows, dates, series };
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PlayUse { lang: string; title: string; shortChars: number; shortRoom: number; titleWordsInShort: boolean; shortWordsInOpening: boolean; top: { word: string; count: number; density: number }[]; stuffed: string[] }
|
||||||
|
|
||||||
|
/** Play: how the short description is used and which words the full description leans on (density). Pure. */
|
||||||
|
export function playUse(c: PlayCopy): PlayUse {
|
||||||
|
const L = c.lang;
|
||||||
|
const full = words(c.full, L);
|
||||||
|
const counts = new Map<string, number>();
|
||||||
|
for (const w of full) if (w.length > 3 && !isStop(w, L)) counts.set(w, (counts.get(w) ?? 0) + 1);
|
||||||
|
const top = [...counts.entries()].sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])).slice(0, 5)
|
||||||
|
.map(([word, count]) => ({ word, count, density: full.length ? count / full.length : 0 }));
|
||||||
|
const titleWords = tokens(c.title, L).filter(w => w.length > 2);
|
||||||
|
const shortWords = new Set(tokens(c.short, L));
|
||||||
|
const opening = new Set(words(c.full.split('\n').slice(0, 3).join(' '), L));
|
||||||
|
return {
|
||||||
|
lang: L, title: c.title, shortChars: len(c.short), shortRoom: 80 - len(c.short),
|
||||||
|
titleWordsInShort: titleWords.some(w => shortWords.has(w)),
|
||||||
|
shortWordsInOpening: [...shortWords].some(w => w.length > 3 && opening.has(w)),
|
||||||
|
top, stuffed: top.filter(t => full.length >= 80 && t.count >= 6 && t.density > 0.03).map(t => t.word),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Experiment { store: 'apple' | 'play'; what: string; why: string; how: string }
|
||||||
|
export interface Action { what: string; why: string; command?: string }
|
||||||
|
|
||||||
|
export interface AuditInput {
|
||||||
|
today: string;
|
||||||
|
storefront: string;
|
||||||
|
findings: AsoFinding[];
|
||||||
|
drafts: string[];
|
||||||
|
apple?: Record<string, AppleCopy>;
|
||||||
|
appName: string;
|
||||||
|
play?: PlayCopy[];
|
||||||
|
ranks: RankSnap[];
|
||||||
|
competitors: CompetitorSnapshot | null;
|
||||||
|
analytics: AppleDay[];
|
||||||
|
variants: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AsoAudit {
|
||||||
|
generated: string; storefront: string;
|
||||||
|
keywordField: { errors: number; warnings: number; hints: number; findings: AsoFinding[] };
|
||||||
|
crossLocale: string | null;
|
||||||
|
drafts: string[];
|
||||||
|
ranks: { snapshots: number; latest: string | null; rows: TrendRow[]; dates: string[]; series: { storefront: string; keyword: string; ranks: (number | null)[] }[] };
|
||||||
|
competitors: { date: string | null; gaps: { storefront: string; locale: string; gaps: Gap[] }[] };
|
||||||
|
play: PlayUse[];
|
||||||
|
/** check --aso findings of the Play listing (stuffing, claims, caps, emoji, short description room). */
|
||||||
|
playFindings: AsoFinding[];
|
||||||
|
analytics: { days: number; start: string; end: string; impressions: number; pageViews: number; downloads: number; conversion: number | null } | null;
|
||||||
|
experiments: Experiment[];
|
||||||
|
next: Action[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const daysBetween = (a: string, b: string) => Math.round((Date.parse(b) - Date.parse(a)) / 86_400_000);
|
||||||
|
|
||||||
|
/** The whole audit. Pure. */
|
||||||
|
export function buildAudit(i: AuditInput): AsoAudit {
|
||||||
|
const kwFindings = i.findings.filter(f => f.where.startsWith('apple ') && !/storefront$/.test(f.where));
|
||||||
|
const playFindings = i.findings.filter(f => f.where.startsWith('play '));
|
||||||
|
const cross = i.findings.find(f => /storefront$/.test(f.where))?.msg ?? null;
|
||||||
|
const trend = rankTrend(i.ranks);
|
||||||
|
const gaps: AsoAudit['competitors']['gaps'] = [];
|
||||||
|
if (i.competitors) {
|
||||||
|
const groups = new Map<string, CompetitorSnapshot['rows']>();
|
||||||
|
for (const r of i.competitors.rows) groups.set(`${r.storefront}|${r.locale}`, [...(groups.get(`${r.storefront}|${r.locale}`) ?? []), r]);
|
||||||
|
for (const [g, rows] of groups) {
|
||||||
|
const [storefront, locale] = g.split('|') as [string, string];
|
||||||
|
const c = i.apple?.[locale];
|
||||||
|
const covered = [...words(c?.name ?? i.appName, locale), ...words(c?.subtitle ?? '', locale), ...(c?.keywords ?? '').split(',').flatMap(t => words(t, locale))];
|
||||||
|
gaps.push({ storefront, locale, gaps: coverageGaps(rows, covered, locale, 8) });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const play = (i.play ?? []).map(playUse);
|
||||||
|
const last = i.analytics.slice(-28);
|
||||||
|
const sum = (f: (d: AppleDay) => number) => last.reduce((n, d) => n + f(d), 0);
|
||||||
|
const analytics = last.length ? { days: last.length, start: last[0]!.date, end: last.at(-1)!.date, impressions: sum(d => d.uniqueImpressions || d.impressions),
|
||||||
|
pageViews: sum(d => d.uniquePageViews || d.pageViews), downloads: sum(d => d.firstTimeDownloads || d.downloads), conversion: null as number | null } : null;
|
||||||
|
if (analytics) analytics.conversion = analytics.impressions ? analytics.downloads / analytics.impressions : null;
|
||||||
|
const a: AsoAudit = {
|
||||||
|
generated: i.today, storefront: i.storefront,
|
||||||
|
keywordField: { errors: kwFindings.filter(f => f.level === 'error').length, warnings: kwFindings.filter(f => f.level === 'warn').length, hints: kwFindings.filter(f => f.level === 'info').length, findings: kwFindings },
|
||||||
|
crossLocale: cross, drafts: i.drafts,
|
||||||
|
ranks: { snapshots: i.ranks.length, latest: trend.dates.at(-1) ?? null, rows: trend.rows, dates: trend.dates, series: trend.series },
|
||||||
|
competitors: { date: i.competitors?.date ?? null, gaps },
|
||||||
|
play, playFindings, analytics, experiments: [], next: [],
|
||||||
|
};
|
||||||
|
a.experiments = experimentIdeas(a, i);
|
||||||
|
a.next = nextActions(a, i);
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Product Page Optimization (Apple) and store listing experiment (Play) ideas from the audit. Suggestions only. Pure. */
|
||||||
|
export function experimentIdeas(a: AsoAudit, i: AuditInput): Experiment[] {
|
||||||
|
const out: Experiment[] = [];
|
||||||
|
if (i.apple) {
|
||||||
|
const v = i.variants[0];
|
||||||
|
out.push({ store: 'apple', what: 'first screenshot caption: lead with the search phrase people use for the app\'s main job',
|
||||||
|
why: a.analytics?.conversion !== null && a.analytics ? `App Store conversion (first-time downloads / unique impressions, last ${a.analytics.days} days) is ${(a.analytics.conversion! * 100).toFixed(1)}%: the first screenshot is what search results show` : 'the first screenshot is what search results show; PPO measures it against the original',
|
||||||
|
how: v ? `variant "${v}" exists: storebound shots render --variant ${v}, then storebound apple ppo create --variant ${v} --dry and apple ppo upload --variant ${v} --dry (starting the test is the owner's step: apple ppo start)`
|
||||||
|
: 'add a shots.variants entry with the new caption, storebound shots render --variant b, then storebound apple ppo create --variant b --dry (starting the test is the owner\'s step: apple ppo start)' });
|
||||||
|
out.push({ store: 'apple', what: 'subtitle variant',
|
||||||
|
why: 'PPO tests only icons, screenshots and app previews: the subtitle cannot be A/B tested on the App Store',
|
||||||
|
how: 'change it with the next version and compare before / after with storebound analytics compare (one change at a time)' });
|
||||||
|
}
|
||||||
|
for (const p of a.play.slice(0, 1)) {
|
||||||
|
out.push({ store: 'play', what: `short description variant (${p.lang})`,
|
||||||
|
why: p.shortRoom > 30 ? `the short description uses ${p.shortChars}/80 characters` : !p.titleWordsInShort ? 'the short description shares no word with the title' : 'the short description is the first text on the listing',
|
||||||
|
how: 'Play Console > Grow users > Store listing experiments (no API: storebound only prepares the text; the store-screenshots skill has the steps)' });
|
||||||
|
if (i.variants.length) out.push({ store: 'play', what: `screenshot variant "${i.variants[0]}"`, why: 'graphics experiments need no new version',
|
||||||
|
how: `storebound shots render --variant ${i.variants[0]} --size play, then upload it as the experiment's variant in Play Console` });
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The next 3 concrete actions, most important first. Pure. */
|
||||||
|
export function nextActions(a: AsoAudit, i: AuditInput): Action[] {
|
||||||
|
const out: Action[] = [];
|
||||||
|
const f = a.keywordField.findings;
|
||||||
|
const err = f.find(x => x.level === 'error');
|
||||||
|
if (err) out.push({ what: `fix ${err.where}: ${err.msg}`, why: 'App Store Connect refuses the keyword field as it is', command: 'storebound check --aso' });
|
||||||
|
if (a.drafts.length) out.push({ what: `review the draft keywords of ${a.drafts.join(', ')} in store/appstore.md and delete the draft line`, why: 'they were proposed by aso suggest, not reviewed yet' });
|
||||||
|
const room = f.find(x => /bytes used; fill/.test(x.msg));
|
||||||
|
if (room) out.push({ what: `fill the keyword field of ${room.where.replace('apple ', '')} (${room.msg.replace(/^keywords: /, '')})`, why: 'unused bytes are unused search reach', command: `storebound aso suggest --locale ${room.where.replace('apple ', '')}` });
|
||||||
|
const rep = f.find(x => /repeat words from the name/.test(x.msg));
|
||||||
|
if (rep) out.push({ what: `${rep.where}: replace the words the name / subtitle already index (${rep.msg.split(': ').at(-1)})`, why: 'they take bytes without adding reach', command: `storebound aso suggest --locale ${rep.where.replace('apple ', '')}` });
|
||||||
|
const gap = a.competitors.gaps.find(g => g.gaps.length);
|
||||||
|
if (gap) out.push({ what: `consider "${gap.gaps.slice(0, 3).map(g => g.word).join('", "')}" for ${gap.locale} (in the names of ${gap.gaps[0]!.developers} developers' top apps, not in your name / subtitle / keywords)`, why: 'words the top apps lead with; only if they describe your app', command: `storebound aso suggest --locale ${gap.locale}` });
|
||||||
|
const lost = a.ranks.rows.filter(r => r.arrow === '↓' || r.arrow === 'lost');
|
||||||
|
if (lost.length) out.push({ what: `look at the keywords that dropped: ${lost.slice(0, 3).map(r => `${r.storefront} "${r.keyword}" ${r.previous ?? '-'} -> ${r.rank ?? '-'}`).join(', ')}`, why: 'a drop after a listing change is the signal to revert or adjust it' });
|
||||||
|
if (!a.ranks.latest) out.push({ what: 'take a first rank snapshot', why: 'trends need a baseline before the next listing change', command: 'storebound aso rank --dry, then storebound aso rank' });
|
||||||
|
else if (daysBetween(a.ranks.latest, i.today) > 14) out.push({ what: `take a new rank snapshot (the last is from ${a.ranks.latest})`, why: 'trend arrows compare the last two snapshots', command: 'storebound aso rank' });
|
||||||
|
if (!a.competitors.date) out.push({ what: 'read the competitors for your keywords', why: 'coverage gaps and suggest need the top apps per term', command: 'storebound aso competitors --dry, then storebound aso competitors' });
|
||||||
|
for (const p of a.play) {
|
||||||
|
if (p.stuffed.length) out.push({ what: `Play ${p.lang}: use "${p.stuffed.join('", "')}" less often in the full description`, why: 'reads as keyword stuffing (Play metadata policy)' });
|
||||||
|
else if (p.shortRoom > 30) out.push({ what: `Play ${p.lang}: put the core phrase into the short description (${p.shortChars}/80 used)`, why: 'Play indexes the short description' });
|
||||||
|
}
|
||||||
|
if (!a.analytics) out.push({ what: 'start App Store analytics snapshots', why: 'conversion before / after each listing change is the real measure', command: 'storebound analytics setup --dry, then storebound analytics snapshot' });
|
||||||
|
return out.slice(0, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
const signed = (n: number | null) => (n === null ? '' : n > 0 ? `+${n}` : String(n));
|
||||||
|
|
||||||
|
/** The report as text. Pure. */
|
||||||
|
export function auditText(a: AsoAudit): string {
|
||||||
|
const o: string[] = [];
|
||||||
|
const kf = a.keywordField;
|
||||||
|
o.push(`ASO audit ${a.generated} (offline: listing files, .storebound/aso snapshots, .storebound/analytics)`, '');
|
||||||
|
o.push(`1. Keyword field (check --aso): ${kf.errors} errors, ${kf.warnings} warnings, ${kf.hints} hints`);
|
||||||
|
for (const f of kf.findings.filter(x => x.level !== 'info').slice(0, 8)) o.push(` ${f.level === 'error' ? 'ERROR' : 'warn '} [${f.where}] ${f.msg}`);
|
||||||
|
if (a.drafts.length) o.push(` draft keywords (from aso suggest, not reviewed): ${a.drafts.join(', ')}`);
|
||||||
|
if (a.crossLocale) o.push(` ${a.storefront} storefront: ${a.crossLocale}`);
|
||||||
|
o.push('', `2. Ranks (aso rank, iTunes Search API order; a trend, not App Store search itself): ${a.ranks.snapshots} snapshot(s)${a.ranks.latest ? `, latest ${a.ranks.latest}` : ''}`);
|
||||||
|
if (a.ranks.rows.length) o.push(indent(textTable(['store', 'keyword', 'rank', '', 'change', 'best'], a.ranks.rows.map(r => [r.storefront, r.keyword, r.rank ?? '-', r.arrow, signed(r.change), r.best ?? '-']))));
|
||||||
|
else o.push(' none yet: storebound aso rank');
|
||||||
|
o.push('', `3. Competitor coverage (aso competitors${a.competitors.date ? `, ${a.competitors.date}` : ''}): words in the top apps' names you do not cover`);
|
||||||
|
if (!a.competitors.date) o.push(' no snapshot yet: storebound aso competitors');
|
||||||
|
for (const g of a.competitors.gaps) o.push(` ${g.storefront} ${g.locale}: ${g.gaps.length ? g.gaps.map(x => `${x.word} (${x.apps} apps, ${x.developers} devs)`).join(', ') : 'none'}`);
|
||||||
|
o.push('', '4. Google Play listing');
|
||||||
|
if (!a.play.length) o.push(' no Play listing');
|
||||||
|
for (const f of a.playFindings.filter(x => x.level !== 'info')) o.push(` warn [${f.where}] ${f.msg}`);
|
||||||
|
for (const p of a.play) o.push(` ${p.lang}: short ${p.shortChars}/80${p.titleWordsInShort ? '' : ', no title word in it'}${p.shortWordsInOpening ? '' : ', opening lines share no word with it'}; top words ${p.top.map(t => `${t.word} ${t.count}x (${(t.density * 100).toFixed(1)}%)`).join(', ') || '-'}${p.stuffed.length ? `; STUFFING: ${p.stuffed.join(', ')}` : ''}`);
|
||||||
|
o.push('', '5. App Store analytics (analytics snapshot)');
|
||||||
|
o.push(a.analytics ? ` ${a.analytics.start} .. ${a.analytics.end} (${a.analytics.days} days): ${a.analytics.impressions} unique impressions, ${a.analytics.pageViews} product page views, ${a.analytics.downloads} first-time downloads, conversion ${a.analytics.conversion === null ? 'n/a' : `${(a.analytics.conversion * 100).toFixed(2)}%`}` : ' no snapshots: storebound analytics snapshot');
|
||||||
|
o.push('', '6. Experiment ideas (suggestions only; nothing is started)');
|
||||||
|
for (const e of a.experiments) o.push(` [${e.store === 'apple' ? 'App Store PPO' : 'Play experiment'}] ${e.what}`, ` why: ${e.why}`, ` how: ${e.how}`);
|
||||||
|
o.push('', 'Next 3 actions');
|
||||||
|
a.next.forEach((x, n) => o.push(` ${n + 1}. ${x.what}`, ` why: ${x.why}${x.command ? `; run: ${x.command}` : ''}`));
|
||||||
|
return o.join('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
const indent = (s: string) => s.split('\n').map(l => ` ${l}`).join('\n');
|
||||||
366
cli/lib/aso-intel.ts
Normal file
366
cli/lib/aso-intel.ts
Normal file
|
|
@ -0,0 +1,366 @@
|
||||||
|
// ASO keyword research from official and public data only, as pure parts. The commands are in cli/aso.ts
|
||||||
|
// (`aso competitors`, `aso suggest`); the audit report is cli/lib/aso-audit.ts.
|
||||||
|
//
|
||||||
|
// Data sources and what each number is (and is not):
|
||||||
|
// - iTunes Search API (public, no account; https://performance-partners.apple.com/search-api): the top N apps for a
|
||||||
|
// term in one storefront, with name (trackName), developer, rating count, first release date, last update, genre
|
||||||
|
// and the genre names localized to that storefront ("genres": "Produktivität" for country=de). Its order is close
|
||||||
|
// to, not equal to, App Store search. It has no subtitle field, so competitor subtitles are never shown.
|
||||||
|
// - Apple Ads Platform API, POST /v1/suggestions/keywords/query (only with the owner's Apple Ads credentials):
|
||||||
|
// keyword suggestions for the app (promotedObjectId = Apple ID, promotedObjectType APPSTORE_APP), seeded with
|
||||||
|
// `terms` and scoped with `countriesOrRegions`; each KeywordSuggestion is { text, popularity } where popularity is
|
||||||
|
// "a relative popularity score (not an absolute volume)" on a 0-100 scale. That is the only popularity signal
|
||||||
|
// storebound shows; without credentials popularity stays "unknown" (never estimated).
|
||||||
|
// https://developer.apple.com/documentation/apple-ads-platform-api/query-keyword-suggestions
|
||||||
|
// https://developer.apple.com/documentation/apple-ads-platform-api/keywordsuggestion
|
||||||
|
// https://developer.apple.com/documentation/apple-ads-platform-api/recommendationqueryrequest (pageSize 1..1000)
|
||||||
|
// (The Recommendations endpoints are budget / target CPA only; Insights has search term popularity 1-5 by genre,
|
||||||
|
// not used here.)
|
||||||
|
// - The app's own listing (store/appstore.md): name, subtitle, keyword field and description.
|
||||||
|
// Nothing here scrapes a store web page or calls a third-party ASO service.
|
||||||
|
import { FILLER, words } from './aso';
|
||||||
|
import type { SearchApp } from './aso-rank';
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------------------------------------------
|
||||||
|
// Words
|
||||||
|
|
||||||
|
/** Function words that never make a keyword (a few languages; extend as needed). FILLER (app, game, free ...) too. */
|
||||||
|
const STOP: Record<string, string[]> = {
|
||||||
|
en: ['to', 'in', 'on', 'at', 'by', 'or', 'is', 'it', 'its', 'you', 'your', 'our', 'we', 'my', 'me', 'all', 'one', 'new', 'more', 'from', 'that', 'this', 'are', 'be', 'can', 'get', 'up', 'out', 'as', 'so', 'no', 'not', 'any', 'every', 'each', 'just', 'into', 'than', 'then', 'also', 'will', 'has', 'have', 'only', 'when', 'what', 'who', 'how', 'way', 'like', 'use', 'make', 'keep', 'see'],
|
||||||
|
de: ['der', 'die', 'das', 'und', 'mit', 'für', 'von', 'zu', 'ein', 'eine', 'ist', 'im', 'in', 'auf', 'den', 'dem', 'des', 'sie', 'du', 'dein', 'deine', 'alle', 'oder', 'auch'],
|
||||||
|
fr: ['le', 'la', 'les', 'et', 'de', 'des', 'du', 'un', 'une', 'pour', 'avec', 'en', 'au', 'aux', 'vos', 'votre', 'est', 'dans', 'sur', 'ou', 'tout', 'tous'],
|
||||||
|
es: ['el', 'la', 'los', 'las', 'y', 'de', 'del', 'un', 'una', 'para', 'con', 'en', 'tu', 'tus', 'es', 'por', 'o', 'que', 'todo', 'todos'],
|
||||||
|
pt: ['o', 'a', 'os', 'as', 'e', 'de', 'do', 'da', 'um', 'uma', 'para', 'com', 'em', 'seu', 'sua', 'no', 'na', 'ou', 'que', 'todo', 'todos'],
|
||||||
|
it: ['il', 'lo', 'la', 'le', 'gli', 'e', 'di', 'del', 'un', 'una', 'per', 'con', 'in', 'tuo', 'tua', 'che', 'tutti'],
|
||||||
|
tr: ['ve', 'ile', 'için', 'göre', 'kadar', 'sonra', 'önce', 'olan', 'olarak', 'bir', 'bu', 'şu', 'da', 'de', 'mi', 'en', 'çok', 'her', 'tüm', 'gibi', 'daha', 'sen', 'senin'],
|
||||||
|
};
|
||||||
|
/** Words of listing boilerplate (account, settings, privacy ...): they describe the store page, not the app's job. */
|
||||||
|
const BOILER = new Set(['account', 'accounts', 'settings', 'sign', 'signin', 'login', 'delete', 'privacy', 'policy', 'terms', 'support', 'contact', 'feature', 'features',
|
||||||
|
'update', 'updates', 'version', 'subscription', 'purchase', 'purchases', 'time', 'any', 'back', 'between', 'off', 'next', 'keeps', 'keep', 'item', 'items',
|
||||||
|
'change', 'changes', 'show', 'shows', 'work', 'works', 'people', 'phone', 'phones', 'here', 'there', 'about', 'want', 'need', 'help', 'day', 'days', 'even', 'much', 'many']);
|
||||||
|
const lang = (locale: string): string => locale.split('-')[0]!.toLowerCase();
|
||||||
|
export const isStop = (w: string, locale: string): boolean => FILLER.has(w) || BOILER.has(w) || (STOP[lang(locale)] ?? []).includes(w) || STOP.en!.includes(w) || /^\d+$/.test(w);
|
||||||
|
/** "Ayarlar'dan" -> "Ayarlar", "it's" -> "it": the suffix after an apostrophe is not a word of its own. */
|
||||||
|
const unApostrophe = (s: string): string => s.replace(/['’]\p{L}+/gu, '');
|
||||||
|
|
||||||
|
/** Content words of a text (lowercased for the locale, function words, boilerplate and numbers left out). Pure. */
|
||||||
|
export const tokens = (s: string, locale: string): string[] => words(unApostrophe(s), locale).filter(w => !isStop(w, locale));
|
||||||
|
|
||||||
|
/** Two-word phrases of content words that stand next to each other in the text. Pure. */
|
||||||
|
export function bigrams(s: string, locale: string): string[] {
|
||||||
|
const out: string[] = [];
|
||||||
|
for (const seg of unApostrophe(s).split(/[.!?\n:;,()"“”«»•·|/–—-]+/)) {
|
||||||
|
const ws = words(seg, locale);
|
||||||
|
for (let i = 0; i + 1 < ws.length; i++) if (!isStop(ws[i]!, locale) && !isStop(ws[i + 1]!, locale)) out.push(`${ws[i]} ${ws[i + 1]}`);
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Plural-insensitive key: languages whose plural is mostly "-s" fold "lists" and "list" together. Pure. */
|
||||||
|
export function stem(w: string, locale: string): string {
|
||||||
|
const l = lang(locale);
|
||||||
|
if (l === 'en' && w.length > 4 && w.endsWith('ies')) return w.slice(0, -3) + 'y'; // groceries -> grocery
|
||||||
|
return ['en', 'fr', 'es', 'pt'].includes(l) && w.length > 3 && w.endsWith('s') && !w.endsWith('ss') ? w.slice(0, -1) : w;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Languages that add suffixes to a word ("listeler", "listelerini"): one word starts with the other. */
|
||||||
|
const SUFFIXING = new Set(['tr', 'fi', 'hu', 'et', 'az', 'kk', 'uz']);
|
||||||
|
/** The same keyword for search: plural-insensitive, and in suffixing languages a word that only adds a short suffix
|
||||||
|
* (up to 5 letters) to a word of at least 4. A heuristic: it errs on the side of not repeating a word. Pure. */
|
||||||
|
export function sameWord(a: string, b: string, locale: string): boolean {
|
||||||
|
const x = stem(a, locale), y = stem(b, locale);
|
||||||
|
if (x === y) return true;
|
||||||
|
if (!SUFFIXING.has(lang(locale))) return false;
|
||||||
|
const [s, l] = x.length <= y.length ? [x, y] : [y, x];
|
||||||
|
return s.length >= 4 && l.startsWith(s) && l.length - s.length <= 5;
|
||||||
|
}
|
||||||
|
const coveredBy = (w: string, set: Iterable<string>, locale: string): boolean => { for (const s of set) if (sameWord(w, s, locale)) return true; return false; };
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------------------------------------------
|
||||||
|
// Competitors (iTunes Search API)
|
||||||
|
|
||||||
|
/** App Store Connect category id -> iTunes genre id (the "genreIds" of Search API results). Apple's genre ids. */
|
||||||
|
export const GENRE_IDS: Record<string, string> = {
|
||||||
|
BOOKS: '6018', BUSINESS: '6000', DEVELOPER_TOOLS: '6026', EDUCATION: '6017', ENTERTAINMENT: '6016', FINANCE: '6015', FOOD_AND_DRINK: '6023', GAMES: '6014',
|
||||||
|
GRAPHICS_AND_DESIGN: '6027', HEALTH_AND_FITNESS: '6013', LIFESTYLE: '6012', MAGAZINES_AND_NEWSPAPERS: '6021', MEDICAL: '6020', MUSIC: '6011', NAVIGATION: '6010',
|
||||||
|
NEWS: '6009', PHOTO_AND_VIDEO: '6008', PRODUCTIVITY: '6007', REFERENCE: '6006', SHOPPING: '6024', SOCIAL_NETWORKING: '6005', SPORTS: '6004', STICKERS: '6025',
|
||||||
|
TRAVEL: '6003', UTILITIES: '6002', WEATHER: '6001',
|
||||||
|
GAMES_ACTION: '7001', GAMES_ADVENTURE: '7002', GAMES_CASUAL: '7003', GAMES_BOARD: '7004', GAMES_CARD: '7005', GAMES_CASINO: '7006', GAMES_FAMILY: '7009',
|
||||||
|
GAMES_MUSIC: '7011', GAMES_PUZZLE: '7012', GAMES_RACING: '7013', GAMES_ROLE_PLAYING: '7014', GAMES_SIMULATION: '7015', GAMES_SPORTS: '7016',
|
||||||
|
GAMES_STRATEGY: '7017', GAMES_TRIVIA: '7018', GAMES_WORD: '7019',
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface CompetitorApp {
|
||||||
|
rank: number; id: string; name: string; developer: string; ratings: number; rating: number | null;
|
||||||
|
/** First release (releaseDate) and the current version's release (currentVersionReleaseDate), YYYY-MM-DD. */
|
||||||
|
released: string | null; updated: string | null;
|
||||||
|
genre: string;
|
||||||
|
/** Genre ids with their names localized to the storefront. */
|
||||||
|
genres: { id: string; name: string }[];
|
||||||
|
}
|
||||||
|
export interface CompetitorRow { storefront: string; locale: string; term: string; results: number; ourRank: number | null; apps: CompetitorApp[] }
|
||||||
|
export interface CompetitorSnapshot { date: string; app: { appId: string | null; bundleId: string }; top: number; rows: CompetitorRow[] }
|
||||||
|
|
||||||
|
const isUs = (r: SearchApp, app: { appId?: string; bundleId?: string }) => !!((app.appId && String(r.trackId) === app.appId) || (app.bundleId && r.bundleId === app.bundleId));
|
||||||
|
|
||||||
|
/** One term's Search API results -> the top n other apps (and our own position among the results read). Pure. */
|
||||||
|
export function competitorRow(results: SearchApp[], app: { appId?: string; bundleId?: string }, q: { storefront: string; locale: string; term: string }, n: number): CompetitorRow {
|
||||||
|
const i = results.findIndex(r => isUs(r, app));
|
||||||
|
const apps = results.map((r, k) => ({ r, k })).filter(({ r }) => !isUs(r, app)).slice(0, n).map(({ r, k }): CompetitorApp => ({
|
||||||
|
rank: k + 1, id: String(r.trackId), name: r.trackName, developer: r.sellerName ?? '', ratings: r.userRatingCount ?? 0, rating: r.averageUserRating ?? null,
|
||||||
|
released: r.releaseDate?.slice(0, 10) ?? null, updated: r.currentVersionReleaseDate?.slice(0, 10) ?? null, genre: r.primaryGenreName ?? '',
|
||||||
|
genres: (r.genreIds ?? []).map((id, j) => ({ id: String(id), name: r.genres?.[j] ?? '' })).filter(g => g.name),
|
||||||
|
}));
|
||||||
|
return { ...q, results: results.length, ourRank: i >= 0 ? i + 1 : null, apps };
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Distinct apps of the rows (one storefront / locale), first seen first. Pure. */
|
||||||
|
export function distinctApps(rows: CompetitorRow[]): CompetitorApp[] {
|
||||||
|
const seen = new Map<string, CompetitorApp>();
|
||||||
|
for (const r of rows) for (const a of r.apps) if (!seen.has(a.id)) seen.set(a.id, a);
|
||||||
|
return [...seen.values()];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Gap { word: string; apps: number; developers: number; terms: string[]; examples: string[] }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Words in competitors' names that our name, subtitle and keyword field do not cover. A word only counts when apps of at
|
||||||
|
* least two different developers use it: a word one developer uses is most likely a brand (and other apps' names and
|
||||||
|
* trademarks must never go into a keyword field). Pure.
|
||||||
|
*/
|
||||||
|
export function coverageGaps(rows: CompetitorRow[], covered: Iterable<string>, locale: string, max = 15): Gap[] {
|
||||||
|
const have = [...covered];
|
||||||
|
const by = new Map<string, { apps: Set<string>; devs: Set<string>; terms: Set<string>; examples: string[] }>();
|
||||||
|
for (const r of rows) for (const a of r.apps) for (const w of new Set(tokens(a.name, locale))) {
|
||||||
|
if (w.length < 3 || coveredBy(w, have, locale)) continue;
|
||||||
|
const k = stem(w, locale);
|
||||||
|
const g = by.get(k) ?? { apps: new Set(), devs: new Set(), terms: new Set(), examples: [] };
|
||||||
|
if (!g.apps.has(a.id) && g.examples.length < 3) g.examples.push(a.name);
|
||||||
|
g.apps.add(a.id); g.devs.add(a.developer.toLowerCase()); g.terms.add(r.term);
|
||||||
|
by.set(k, g);
|
||||||
|
}
|
||||||
|
return [...by.entries()].filter(([, g]) => g.devs.size >= 2)
|
||||||
|
.map(([word, g]) => ({ word, apps: g.apps.size, developers: g.devs.size, terms: [...g.terms], examples: g.examples }))
|
||||||
|
.sort((a, b) => b.developers - a.developers || b.apps - a.apps || a.word.localeCompare(b.word)).slice(0, max);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Apps in the top N now that were not there in the previous snapshot, per storefront + term. Pure. */
|
||||||
|
export function newEntrants(now: CompetitorRow[], before: CompetitorRow[] | undefined): Map<string, string[]> {
|
||||||
|
const out = new Map<string, string[]>();
|
||||||
|
if (!before) return out;
|
||||||
|
const prev = new Map(before.map(r => [`${r.storefront}|${r.term.toLowerCase()}`, new Set(r.apps.map(a => a.id))] as const));
|
||||||
|
for (const r of now) {
|
||||||
|
const p = prev.get(`${r.storefront}|${r.term.toLowerCase()}`);
|
||||||
|
if (p) out.set(`${r.storefront}|${r.term.toLowerCase()}`, r.apps.filter(a => !p.has(a.id)).map(a => a.name));
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The category names of the app in one storefront's language, read from the Search API results' localized genres. Pure. */
|
||||||
|
export function categoryNames(rows: CompetitorRow[], categoryIds: string[]): string[] {
|
||||||
|
const ids = new Set(categoryIds.map(c => GENRE_IDS[c]).filter(Boolean));
|
||||||
|
const names = new Set<string>();
|
||||||
|
for (const a of distinctApps(rows)) for (const g of a.genres) if (ids.has(g.id)) names.add(g.name);
|
||||||
|
return [...names];
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------------------------------------------
|
||||||
|
// Apple Ads keyword suggestions
|
||||||
|
|
||||||
|
export const ADS_KEYWORD_SUGGESTIONS = '/suggestions/keywords/query';
|
||||||
|
|
||||||
|
/** RecommendationQueryRequest for keyword suggestions: the two required filters, seed terms, countries. Pure. */
|
||||||
|
export function keywordSuggestionBody(adamId: string, terms: string[], countries: string[], pageSize = 200): Record<string, unknown> {
|
||||||
|
const filters: Record<string, unknown>[] = [
|
||||||
|
{ field: 'promotedObjectId', operator: 'EQUALS', value: [adamId] },
|
||||||
|
{ field: 'promotedObjectType', operator: 'EQUALS', value: ['APPSTORE_APP'] },
|
||||||
|
];
|
||||||
|
if (terms.length) filters.push({ field: 'terms', operator: 'IN', value: terms });
|
||||||
|
if (countries.length) filters.push({ field: 'countriesOrRegions', operator: 'IN', value: countries.map(c => c.toUpperCase()) });
|
||||||
|
return { filters, sorting: [{ field: 'popularity', order: 'DESC' }], pagination: { offset: 0, pageSize: Math.min(1000, Math.max(1, pageSize)) } };
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AdsSuggestion { text: string; popularity: number }
|
||||||
|
/** `result` of the keyword suggestions answer -> { text, popularity } (0-100), invalid rows left out. Pure. */
|
||||||
|
export function parseKeywordSuggestions(res: unknown): AdsSuggestion[] {
|
||||||
|
const rows = (res as { result?: unknown })?.result;
|
||||||
|
if (!Array.isArray(rows)) return [];
|
||||||
|
return rows.filter((r): r is { text: string; popularity: number } => typeof r?.text === 'string' && typeof r?.popularity === 'number')
|
||||||
|
.map(r => ({ text: r.text.trim(), popularity: Math.max(0, Math.min(100, Math.round(r.popularity))) })).filter(r => r.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------------------------------------------
|
||||||
|
// Candidates and scoring
|
||||||
|
|
||||||
|
export type CandSource = 'name' | 'subtitle' | 'keywords' | 'description' | 'competitors' | 'category' | 'apple-ads';
|
||||||
|
export type CandStatus = 'candidate' | 'indexed' | 'category' | 'filler';
|
||||||
|
export interface Candidate {
|
||||||
|
term: string;
|
||||||
|
kind: 'word' | 'phrase';
|
||||||
|
sources: CandSource[];
|
||||||
|
/** Times in our own name / subtitle / description. */
|
||||||
|
ours: number;
|
||||||
|
/** relevance 0-2: +1 in our own text (name, subtitle, description, keywords), +1 in competitor names (the top apps). */
|
||||||
|
relevance: number;
|
||||||
|
/** Competition: how many of the distinct top apps already have it in their name, of how many read. */
|
||||||
|
inNames: number; ofApps: number;
|
||||||
|
/** Apple Ads relative popularity 0-100, null = unknown (no credentials, or Apple returned nothing for it). */
|
||||||
|
popularity: number | null;
|
||||||
|
/** exact: Apple Ads suggested this exact word; phrase: the highest score of a suggested phrase that contains it. */
|
||||||
|
popularityFrom: 'exact' | 'phrase' | null;
|
||||||
|
status: CandStatus;
|
||||||
|
why?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CandidateInput {
|
||||||
|
locale: string;
|
||||||
|
name: string; subtitle: string; keywords: string; description: string;
|
||||||
|
/** The competitor rows of this locale's storefront (latest `aso competitors` snapshot), may be empty. */
|
||||||
|
competitors: CompetitorRow[];
|
||||||
|
/** Category names in this language (categoryNames); matched by Apple anyway, so never put into the field. */
|
||||||
|
categories: string[];
|
||||||
|
ads: AdsSuggestion[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Every keyword candidate of one locale with its signals. Sorted: candidates first, by relevance, popularity (known
|
||||||
|
* first), lower competition, then how often our own text uses it. Pure. */
|
||||||
|
export function candidates(i: CandidateInput): Candidate[] {
|
||||||
|
const L = i.locale;
|
||||||
|
const m = new Map<string, Candidate>();
|
||||||
|
const key = (t: string) => t.split(' ').map(w => stem(w, L)).join(' ');
|
||||||
|
const add = (term: string, kind: Candidate['kind'], src: CandSource, n = 1) => {
|
||||||
|
const k = key(term);
|
||||||
|
const c = m.get(k) ?? { term, kind, sources: [], ours: 0, relevance: 0, inNames: 0, ofApps: 0, popularity: null, popularityFrom: null, status: 'candidate' as CandStatus };
|
||||||
|
if (!c.sources.includes(src)) c.sources.push(src);
|
||||||
|
if (src === 'name' || src === 'subtitle' || src === 'description') c.ours += n;
|
||||||
|
m.set(k, c);
|
||||||
|
};
|
||||||
|
for (const [src, text] of [['name', i.name], ['subtitle', i.subtitle], ['description', i.description]] as const) for (const w of tokens(text, L)) if (w.length > 2) add(w, 'word', src);
|
||||||
|
for (const w of i.keywords.split(',').flatMap(t => tokens(t, L))) if (w.length > 1) add(w, 'word', 'keywords');
|
||||||
|
// phrases: only the ones our own text uses at least twice, or that stand in the name / subtitle
|
||||||
|
const phraseCount = new Map<string, number>();
|
||||||
|
for (const b of [...bigrams(i.name, L), ...bigrams(i.subtitle, L), ...bigrams(i.subtitle, L), ...bigrams(i.description, L)]) phraseCount.set(b, (phraseCount.get(b) ?? 0) + 1);
|
||||||
|
for (const [b, n] of phraseCount) if (n >= 2) add(b, 'phrase', 'description', n);
|
||||||
|
const apps = distinctApps(i.competitors);
|
||||||
|
const nameWords = apps.map(a => new Set(tokens(a.name, L).map(w => stem(w, L))));
|
||||||
|
for (const g of coverageGaps(i.competitors, [], L, 200)) add(g.word, 'word', 'competitors');
|
||||||
|
const catWords = [...new Set(i.categories.flatMap(c => words(c, L)))];
|
||||||
|
const cats = new Set(catWords.map(w => stem(w, L)));
|
||||||
|
for (const c of catWords) add(c, 'word', 'category');
|
||||||
|
for (const s of i.ads) {
|
||||||
|
const ws = tokens(s.text, L);
|
||||||
|
if (ws.length === 1) add(ws[0]!, 'word', 'apple-ads');
|
||||||
|
}
|
||||||
|
const indexed = [...tokens(i.name, L), ...tokens(i.subtitle, L)];
|
||||||
|
for (const c of m.values()) {
|
||||||
|
const ws = c.term.split(' ').map(w => stem(w, L));
|
||||||
|
const inOurs = c.ours > 0 || c.sources.includes('keywords');
|
||||||
|
c.inNames = nameWords.filter(n => ws.every(w => n.has(w))).length;
|
||||||
|
c.ofApps = apps.length;
|
||||||
|
c.relevance = (inOurs ? 1 : 0) + (c.inNames > 0 ? 1 : 0);
|
||||||
|
const exact = i.ads.find(s => key(s.text.toLocaleLowerCase(L)) === key(c.term));
|
||||||
|
const phrases = i.ads.filter(s => ws.every(w => tokens(s.text, L).map(x => stem(x, L)).includes(w)));
|
||||||
|
if (exact) { c.popularity = exact.popularity; c.popularityFrom = 'exact'; }
|
||||||
|
else if (phrases.length) { c.popularity = Math.max(...phrases.map(s => s.popularity)); c.popularityFrom = 'phrase'; }
|
||||||
|
if (ws.some(w => cats.has(w)) && ws.length === 1) { c.status = 'category'; c.why = 'category name: matched by Apple anyway'; }
|
||||||
|
else if (ws.every(w => coveredBy(w, indexed, L))) { c.status = 'indexed'; c.why = 'already in the name / subtitle (indexed)'; }
|
||||||
|
else if (ws.some(w => FILLER.has(w))) { c.status = 'filler'; c.why = 'filler word'; }
|
||||||
|
}
|
||||||
|
const order = (c: Candidate) => (c.status === 'candidate' ? 0 : 1);
|
||||||
|
// a word only the description uses once is noise, unless competitors or Apple Ads bring it up too
|
||||||
|
const weak = (c: Candidate) => c.sources.length === 1 && c.sources[0] === 'description' && c.ours < 2;
|
||||||
|
return [...m.values()].filter(c => !weak(c)).sort((a, b) => order(a) - order(b) || b.relevance - a.relevance || (b.popularity ?? -1) - (a.popularity ?? -1)
|
||||||
|
|| a.inNames - b.inNames || b.ours - a.ours || a.term.localeCompare(b.term));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------------------------------------------
|
||||||
|
// The 100-byte keyword field
|
||||||
|
|
||||||
|
export interface FieldProposal { locale: string; before: string; after: string; bytes: number; kept: string[]; added: string[]; dropped: { term: string; why: string }[] }
|
||||||
|
|
||||||
|
const bytes = (s: string) => Buffer.byteLength(s, 'utf8');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A keyword field for one locale that fits 100 bytes (UTF-8) with the existing rules: commas without spaces, no
|
||||||
|
* duplicates (plural-insensitive), no words of the name / subtitle, no filler or category words, single words. Current
|
||||||
|
* terms that are still valid are kept first (change a few terms per release, not all), unless `fresh`; then the best
|
||||||
|
* candidates fill the room. Pure.
|
||||||
|
*/
|
||||||
|
export function fitKeywordField(o: { locale: string; current: string; name: string; subtitle: string; ranked: Candidate[]; fresh?: boolean; limit?: number }): FieldProposal {
|
||||||
|
const L = o.locale, limit = o.limit ?? 100;
|
||||||
|
const indexed = [...tokens(o.name, L), ...tokens(o.subtitle, L)];
|
||||||
|
const blocked = new Map(o.ranked.filter(c => c.status !== 'candidate' && c.kind === 'word').map(c => [stem(c.term, L), c.why ?? c.status] as const));
|
||||||
|
const out: string[] = [], kept: string[] = [], added: string[] = [], dropped: { term: string; why: string }[] = [];
|
||||||
|
const seen: string[] = [];
|
||||||
|
const fits = (t: string) => bytes([...out, t].join(',')) <= limit;
|
||||||
|
const tryAdd = (t: string, into: string[]): string | null => {
|
||||||
|
const ws = words(t, L);
|
||||||
|
if (!ws.length) return 'empty';
|
||||||
|
if (ws.every(w => coveredBy(w, indexed, L))) return 'already in the name / subtitle (indexed)';
|
||||||
|
if (ws.some(w => FILLER.has(w))) return 'filler word';
|
||||||
|
if (ws.length === 1 ? coveredBy(ws[0]!, seen, L) : seen.includes(ws.join(' '))) return 'duplicate';
|
||||||
|
const b = ws.length === 1 ? blocked.get(stem(ws[0]!, L)) : undefined;
|
||||||
|
if (b) return b;
|
||||||
|
if (!fits(t)) return 'no room in 100 bytes';
|
||||||
|
seen.push(ws.length === 1 ? ws[0]! : ws.join(' ')); out.push(t); into.push(t);
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
if (!o.fresh) for (const t of o.current.split(',').map(s => s.trim().toLocaleLowerCase(L)).filter(Boolean)) {
|
||||||
|
// keep a current phrase as the words it is made of: single words combine on their own and save bytes
|
||||||
|
const parts = /\s/.test(t) ? tokens(t, L) : [t];
|
||||||
|
for (const p of parts) { const why = tryAdd(p, kept); if (why && why !== 'duplicate') dropped.push({ term: p, why }); }
|
||||||
|
}
|
||||||
|
for (const c of o.ranked) {
|
||||||
|
if (c.status !== 'candidate' || c.kind !== 'word') continue;
|
||||||
|
tryAdd(c.term, added);
|
||||||
|
}
|
||||||
|
const after = out.join(',');
|
||||||
|
return { locale: L, before: o.current, after, bytes: bytes(after), kept, added, dropped };
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------------------------------------------
|
||||||
|
// Writing the proposal into store/appstore.md (only with --write; marked as a draft for review)
|
||||||
|
|
||||||
|
export const DRAFT_RE = /^<!--\s*storebound-aso:\s*draft\b[^>]*-->\s*$/m;
|
||||||
|
export const draftMark = (date: string): string => `<!-- storebound-aso: draft keywords from \`aso suggest\` ${date}; review them, then delete this line -->`;
|
||||||
|
|
||||||
|
/** Locales of store/appstore.md whose keywords carry the draft line. Pure. */
|
||||||
|
export function draftLocales(md: string): string[] {
|
||||||
|
const out: string[] = [];
|
||||||
|
for (const sec of md.split(/^(?=## )/m)) {
|
||||||
|
if (!sec.startsWith('## ')) continue;
|
||||||
|
const kw = sec.split(/^(?=### )/m).find(p => /^### keywords\s*$/m.test(p.split('\n')[0]!));
|
||||||
|
if (kw && DRAFT_RE.test(kw)) out.push(sec.slice(3).split(/[\s·]/)[0]!.trim());
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** store/appstore.md with the keywords block of `locale` set to `value` and the draft line above it. Pure. */
|
||||||
|
export function setKeywords(md: string, locale: string, value: string, mark: string): string {
|
||||||
|
const secs = md.split(/^(?=## )/m);
|
||||||
|
const i = secs.findIndex(s => s.startsWith('## ') && s.slice(3).split(/[\s·]/)[0]!.trim() === locale);
|
||||||
|
if (i < 0) throw new Error(`no "## ${locale}" section in the App Store listing`);
|
||||||
|
const parts = secs[i]!.split(/^(?=### )/m);
|
||||||
|
const block = `### keywords\n${mark}\n\`\`\`\n${value}\n\`\`\`\n`;
|
||||||
|
const k = parts.findIndex(p => /^### keywords\s*$/.test(p.split('\n')[0]!));
|
||||||
|
if (k >= 0) {
|
||||||
|
const old = parts[k]!;
|
||||||
|
const fence = /^```[^\n]*\n[\s\S]*?\n```[^\n]*\n?/m.exec(old);
|
||||||
|
const tail = fence ? old.slice(fence.index + fence[0].length) : old.split('\n').slice(1).join('\n');
|
||||||
|
parts[k] = block + tail.replace(DRAFT_RE, '').replace(/^\n+/, '\n');
|
||||||
|
if (!/\n$/.test(parts[k]!)) parts[k] += '\n';
|
||||||
|
} else {
|
||||||
|
const last = parts.length - 1;
|
||||||
|
parts[last] = parts[last]!.replace(/\n*$/, '\n\n') + block + (i < secs.length - 1 ? '\n' : '');
|
||||||
|
}
|
||||||
|
secs[i] = parts.join('');
|
||||||
|
return secs.join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** "us" for en-US, "tr" for tr, "jp" for ja ... : the storefront a locale is most likely meant for. Pure. */
|
||||||
|
export function storefrontOf(locale: string): string {
|
||||||
|
const [l, r] = locale.split('-');
|
||||||
|
if (r && /^[A-Za-z]{2}$/.test(r)) return r.toLowerCase();
|
||||||
|
const map: Record<string, string> = { ja: 'jp', ko: 'kr', zh: locale === 'zh-Hant' ? 'tw' : 'cn', el: 'gr', he: 'il', hi: 'in', uk: 'ua', vi: 'vn', cs: 'cz', da: 'dk', sv: 'se', nb: 'no', ms: 'my', ca: 'es', en: 'us', ar: 'sa' };
|
||||||
|
return map[l!.toLowerCase()] ?? l!.toLowerCase();
|
||||||
|
}
|
||||||
|
|
@ -8,14 +8,18 @@
|
||||||
// title (trackName), developer (sellerName), bundleId, rating and description, but no subtitle: competitor subtitles
|
// title (trackName), developer (sellerName), bundleId, rating and description, but no subtitle: competitor subtitles
|
||||||
// are not available through a public API, so they are not shown (storebound scrapes nothing).
|
// are not available through a public API, so they are not shown (storebound scrapes nothing).
|
||||||
// Result fields used (as the API returns them; Apple's table lists only the general ones): trackId, trackName,
|
// Result fields used (as the API returns them; Apple's table lists only the general ones): trackId, trackName,
|
||||||
// bundleId, sellerName, averageUserRating, userRatingCount, primaryGenreName.
|
// bundleId, sellerName, averageUserRating, userRatingCount, primaryGenreName; `aso competitors` also releaseDate,
|
||||||
|
// currentVersionReleaseDate, genres (localized to the storefront, e.g. "Produktivität" for country=de) and genreIds.
|
||||||
|
|
||||||
export const SEARCH_API = 'https://itunes.apple.com/search';
|
export const SEARCH_API = 'https://itunes.apple.com/search';
|
||||||
/** Apple: about 20 calls per minute. One call every 3.5 s stays below it with room for retries. */
|
/** Apple: about 20 calls per minute. One call every 3.5 s stays below it with room for retries. */
|
||||||
export const MIN_DELAY_MS = 3_500;
|
export const MIN_DELAY_MS = 3_500;
|
||||||
export const MAX_RESULTS = 200;
|
export const MAX_RESULTS = 200;
|
||||||
|
|
||||||
export interface SearchApp { trackId: number; trackName: string; bundleId?: string; sellerName?: string; averageUserRating?: number; userRatingCount?: number; primaryGenreName?: string }
|
export interface SearchApp {
|
||||||
|
trackId: number; trackName: string; bundleId?: string; sellerName?: string; averageUserRating?: number; userRatingCount?: number; primaryGenreName?: string;
|
||||||
|
releaseDate?: string; currentVersionReleaseDate?: string; genres?: string[]; genreIds?: string[]; primaryGenreId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
export function searchUrl(term: string, country: string, limit = MAX_RESULTS): string {
|
export function searchUrl(term: string, country: string, limit = MAX_RESULTS): string {
|
||||||
if (!/^[a-z]{2}$/i.test(country)) throw new Error(`storefront "${country}": a two-letter country code (us, de, tr)`);
|
if (!/^[a-z]{2}$/i.test(country)) throw new Error(`storefront "${country}": a two-letter country code (us, de, tr)`);
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ export const CROSS_LOCALES: Record<string, string[]> = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Words that add nothing in the keyword field (Apple: the category name and "app" are matched anyway). */
|
/** Words that add nothing in the keyword field (Apple: the category name and "app" are matched anyway). */
|
||||||
const FILLER = new Set(['app', 'apps', 'game', 'games', 'free', 'the', 'and', 'for', 'with', 'a', 'an', 'of', 'iphone', 'ipad', 'ios']);
|
export const FILLER = new Set(['app', 'apps', 'game', 'games', 'free', 'the', 'and', 'for', 'with', 'a', 'an', 'of', 'iphone', 'ipad', 'ios']);
|
||||||
|
|
||||||
const words = (s: string, locale: string): string[] =>
|
export const words = (s: string, locale: string): string[] =>
|
||||||
s.toLocaleLowerCase(locale).split(/[^\p{L}\p{N}]+/u).filter(w => w.length > 1);
|
s.toLocaleLowerCase(locale).split(/[^\p{L}\p{N}]+/u).filter(w => w.length > 1);
|
||||||
|
|
||||||
/** One locale of the App Store listing: keyword field rules. */
|
/** One locale of the App Store listing: keyword field rules. */
|
||||||
|
|
|
||||||
|
|
@ -322,6 +322,17 @@ export interface AnalyticsCompare {
|
||||||
/** Per store with no days in any snapshot: why the newest snapshot has none (no report request yet, no bucket). */
|
/** Per store with no days in any snapshot: why the newest snapshot has none (no report request yet, no bucket). */
|
||||||
errors?: { apple?: string; play?: string };
|
errors?: { apple?: string; play?: string };
|
||||||
}
|
}
|
||||||
|
/** aso.audit (`aso audit --json`, offline, cli/lib/aso-audit.ts AsoAudit): the parts the Growth tab's ASO card shows. */
|
||||||
|
export interface AsoTrendRow { storefront: string; keyword: string; rank: number | null; previous: number | null; change: number | null; arrow: '↑' | '↓' | '→' | 'new' | 'lost' | '·'; best: number | null; snapshots: number }
|
||||||
|
export interface AsoAuditView {
|
||||||
|
generated: string;
|
||||||
|
keywordField: { errors: number; warnings: number; hints: number; findings: { level: 'error' | 'warn' | 'info'; where: string; msg: string }[] };
|
||||||
|
drafts: string[];
|
||||||
|
ranks: { snapshots: number; latest: string | null; rows: AsoTrendRow[]; dates: string[]; series: { storefront: string; keyword: string; ranks: (number | null)[] }[] };
|
||||||
|
competitors: { date: string | null; gaps: { storefront: string; locale: string; gaps: { word: string; apps: number; developers: number }[] }[] };
|
||||||
|
experiments: { store: 'apple' | 'play'; what: string; why: string; how: string }[];
|
||||||
|
next: { what: string; why: string; command?: string }[];
|
||||||
|
}
|
||||||
/** console.fill (`console fill <form> --json`, cli/console/fill.ts): the answers it types into one console form. The
|
/** console.fill (`console fill <form> --json`, cli/console/fill.ts): the answers it types into one console form. The
|
||||||
* dry run has the answers only; the real run (it ends when the owner closes the browser) adds what happened. */
|
* dry run has the answers only; the real run (it ends when the owner closes the browser) adds what happened. */
|
||||||
export type ConsoleForm = 'apple-app-record' | 'apple-age-rating' | 'apple-app-privacy' | 'play-content-rating' | 'play-target-audience';
|
export type ConsoleForm = 'apple-app-record' | 'apple-age-rating' | 'apple-app-privacy' | 'play-content-rating' | 'play-target-audience';
|
||||||
|
|
|
||||||
|
|
@ -357,6 +357,20 @@ export const TOOLS: ToolDef[] = [
|
||||||
props: { storefronts: { type: 'string', pattern: '^[a-z]{2}(=[A-Za-z-]+)?(,[a-z]{2}(=[A-Za-z-]+)?)*$', description: 'e.g. us,de=de-DE (default us)' }, keywords: { type: 'string', description: 'Extra keywords, comma-separated' },
|
props: { storefronts: { type: 'string', pattern: '^[a-z]{2}(=[A-Za-z-]+)?(,[a-z]{2}(=[A-Za-z-]+)?)*$', description: 'e.g. us,de=de-DE (default us)' }, keywords: { type: 'string', description: 'Extra keywords, comma-separated' },
|
||||||
competitors: { type: 'integer', minimum: 0, maximum: 10, default: 3 } },
|
competitors: { type: 'integer', minimum: 0, maximum: 10, default: 3 } },
|
||||||
args: i => [...opt('storefronts', i.storefronts), ...opt('keywords', i.keywords), ...opt('competitors', i.competitors), '--json'] },
|
args: i => [...opt('storefronts', i.storefronts), ...opt('keywords', i.keywords), ...opt('competitors', i.competitors), '--json'] },
|
||||||
|
{ name: 'aso_competitors', title: 'App Store competitors per keyword', command: ['aso', 'competitors'], write: false, network: true,
|
||||||
|
description: 'Read-only: for each keyword of the locale\'s keyword field (plus terms) and storefront, the top apps in Apple\'s public iTunes Search API (name, developer, rating count, first release, last update, localized genre) and the words in their names that your name / subtitle / keywords do not cover (only words of at least two developers: a one-developer word is likely a brand). One request every 3.5 s. Saves no snapshot (the terminal run `storebound aso competitors` does). Search API order is close to, not equal to, App Store search; competitor subtitles are not in any public API.',
|
||||||
|
props: { storefront: { type: 'string', pattern: '^[a-z]{2}(=[A-Za-z-]+)?(,[a-z]{2}(=[A-Za-z-]+)?)*$', description: 'e.g. us,tr (default us)' },
|
||||||
|
terms: { type: 'string', description: 'Extra terms, comma-separated' }, top: { type: 'integer', minimum: 1, maximum: 50, default: 10 } },
|
||||||
|
args: i => [...opt('storefront', i.storefront), ...opt('term', i.terms), ...opt('top', i.top), '--no-save', '--json'] },
|
||||||
|
{ name: 'aso_suggest', title: 'Keyword field proposal', command: ['aso', 'suggest'], write: false, network: true,
|
||||||
|
description: 'Read-only proposal: keyword candidates per App Store locale from your own name / subtitle / description, the latest `aso competitors` snapshot, the localized category names and, when Apple Ads credentials exist, Apple Ads keyword suggestions (relative popularity 0-100; without credentials popularity is "unknown", never estimated). Scores relevance (own text, competitor names) and competition (top apps with the word in their name) and returns a 100-byte keyword field per locale as old -> new. Never writes: the owner runs `storebound aso suggest --write` in a terminal, which marks the result as a draft for review.',
|
||||||
|
props: { locale: { type: 'string', description: 'Comma-separated App Store locales (default: every locale of store/appstore.md)' },
|
||||||
|
fresh: { type: 'boolean', default: false, description: 'Do not keep the current keywords first' }, offline: { type: 'boolean', default: false, description: 'Skip Apple Ads' } },
|
||||||
|
args: i => [...opt('locale', i.locale), ...flag('fresh', i.fresh), ...flag('offline', i.offline), '--json'] },
|
||||||
|
{ name: 'aso_audit', title: 'ASO audit', command: ['aso', 'audit'], write: false, network: false,
|
||||||
|
description: 'Offline ASO report: keyword field findings (check --aso), cross-locale free keyword room, rank trend from the `aso rank` snapshots, competitor coverage gaps, Play short description use and keyword density, App Store analytics conversion from the snapshots, Product Page Optimization / Play experiment ideas (suggestions only) and the next 3 actions.',
|
||||||
|
props: { storefront: { type: 'string', description: 'App Store storefront for the cross-locale hint', default: 'US' } },
|
||||||
|
args: i => [...opt('storefront', i.storefront), '--json'] },
|
||||||
{ name: 'ads_scan', title: 'AdAttributionKit scan', command: ['ads', 'scan'], write: false, network: false,
|
{ name: 'ads_scan', title: 'AdAttributionKit scan', command: ['ads', 'scan'], write: false, network: false,
|
||||||
description: 'Local scan of an iOS project for AdAttributionKit and SKAdNetwork: ad network ids (SKAdNetworkItems, AdNetworkIdentifiers, lowercase), postback copy endpoints (AttributionCopyEndpoint, re-engagement copies, NSAdvertisingAttributionReportEndpoint), attribution windows and cooldown, conversion value updates in code, ad SDKs without ids.',
|
description: 'Local scan of an iOS project for AdAttributionKit and SKAdNetwork: ad network ids (SKAdNetworkItems, AdNetworkIdentifiers, lowercase), postback copy endpoints (AttributionCopyEndpoint, re-engagement copies, NSAdvertisingAttributionReportEndpoint), attribution windows and cooldown, conversion value updates in code, ad SDKs without ids.',
|
||||||
props: { ios: { type: 'string', description: 'Path of the iOS project folder, e.g. ios/App' } }, required: ['ios'], args: i => [...opt('ios', i.ios), '--json'] },
|
props: { ios: { type: 'string', description: 'Path of the iOS project folder, e.g. ios/App' } }, required: ['ios'], args: i => [...opt('ios', i.ios), '--json'] },
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ export const DESKTOP_EXCLUDED = new Set(['play_release_testing', 'apple_phased_r
|
||||||
export const FORBIDDEN_METHOD_WORDS = /submit|release|publish|rollout|resume|complete|send|start|stop|cancel|delete|remove|invite/i;
|
export const FORBIDDEN_METHOD_WORDS = /submit|release|publish|rollout|resume|complete|send|start|stop|cancel|delete|remove|invite/i;
|
||||||
|
|
||||||
/** Read tools whose command prints a structured result with --json. */
|
/** Read tools whose command prints a structured result with --json. */
|
||||||
export const JSON_TOOLS = new Set(['check', 'check_aso', 'scan', 'validate', 'health', 'reviews_list', 'prices_diff', 'analytics_compare', 'apple_status',
|
export const JSON_TOOLS = new Set(['check', 'check_aso', 'aso_audit', 'aso_suggest', 'aso_competitors', 'scan', 'validate', 'health', 'reviews_list', 'prices_diff', 'analytics_compare', 'apple_status',
|
||||||
'apple_next_build', 'play_status', 'play_next_version_code', 'shots_check', 'apple_testflight_status', 'apple_ppo_status', 'catalog_diff',
|
'apple_next_build', 'play_status', 'play_next_version_code', 'shots_check', 'apple_testflight_status', 'apple_ppo_status', 'catalog_diff',
|
||||||
'project_icon', 'project_listings', 'reviews_drafts', 'project_declarations', 'project_listing_text', 'project_renders', 'project_render', 'prices_current']);
|
'project_icon', 'project_listings', 'reviews_drafts', 'project_declarations', 'project_listing_text', 'project_renders', 'project_render', 'prices_current']);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ fails without the fix.
|
||||||
|
|
||||||
| # | date | lesson | guard |
|
| # | date | lesson | guard |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
|
| 11 | 2026-10 | Google Play has no public search API, so there is no Play keyword rank or Play competitor list to read without scraping. | `aso` reads App Store search only (iTunes Search API); `aso audit` covers Play through the listing text (short description, density); the aso-basics skill says so. |
|
||||||
|
| 10 | 2026-10 | The iTunes Search API order is close to, not equal to, App Store search (no personalisation, no search ads, no in-app event rows) and it has no subtitle field. | `aso rank` / `aso competitors` / `aso audit` label ranks as a trend and show no competitor subtitles; popularity only from Apple Ads, never estimated (`cli/lib/aso-intel.ts`). |
|
||||||
| 9 | 2026-10 | A retried or repeated write can duplicate on a live store: a POST create retried after a timeout or 5xx, a re-run during the list lag right after a create, two runs at once, a Play edit redone after an unclear commit, a crash in the middle of a screenshot set. | Every write is an upsert (`cli/lib/upsert.ts`: findOrCreate with a fresh re-check and a journal of recent creates, createOnce treating 409 as found, no blind retry of a create); API clients retry only requests that are safe twice; Play edits are all or nothing; asset sets keep the matching prefix; one lock per app and store (`cli/lib/lock.ts`, `--force-unlock`). Table: `docs/idempotency.md`; `tests/idempotency.test.ts` runs every write twice and asserts zero writes on the second run. |
|
| 9 | 2026-10 | A retried or repeated write can duplicate on a live store: a POST create retried after a timeout or 5xx, a re-run during the list lag right after a create, two runs at once, a Play edit redone after an unclear commit, a crash in the middle of a screenshot set. | Every write is an upsert (`cli/lib/upsert.ts`: findOrCreate with a fresh re-check and a journal of recent creates, createOnce treating 409 as found, no blind retry of a create); API clients retry only requests that are safe twice; Play edits are all or nothing; asset sets keep the matching prefix; one lock per app and store (`cli/lib/lock.ts`, `--force-unlock`). Table: `docs/idempotency.md`; `tests/idempotency.test.ts` runs every write twice and asserts zero writes on the second run. |
|
||||||
| 8 | 2026-10 | Capacitor plugins in a monorepo live in `apps/native/node_modules`, so `scan` missed them. | `scan` / `privacy-manifest` resolve workspace packages (`cli/lib/scan/project.ts`, `cli/lib/node-packages.ts`). |
|
| 8 | 2026-10 | Capacitor plugins in a monorepo live in `apps/native/node_modules`, so `scan` missed them. | `scan` / `privacy-manifest` resolve workspace packages (`cli/lib/scan/project.ts`, `cli/lib/node-packages.ts`). |
|
||||||
| 7 | 2026-10 | Console UIs: the App Store Connect sign-in runs in an `idmsa.apple.com` iframe; "User Access" is a plain heading, not a labeled group; Chrome drops session cookies without `--restore-last-session`. | `console` session and fill (`cli/console/`), `tests/console-*.test.ts`. |
|
| 7 | 2026-10 | Console UIs: the App Store Connect sign-in runs in an `idmsa.apple.com` iframe; "User Access" is a plain heading, not a labeled group; Chrome drops session cookies without `--restore-last-session`. | `console` session and fill (`cli/console/`), `tests/console-*.test.ts`. |
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ bun ../../cli/index.ts shots render --size ios69,play,feature
|
||||||
bun ../../cli/index.ts shots gallery # store/renders/index.html
|
bun ../../cli/index.ts shots gallery # store/renders/index.html
|
||||||
bun ../../cli/index.ts check # profile checks: delete-account URL, demo account, terms URL
|
bun ../../cli/index.ts check # profile checks: delete-account URL, demo account, terms URL
|
||||||
bun ../../cli/index.ts play data-safety --dry # the Data safety CSV Play imports, from dataSafety in the config
|
bun ../../cli/index.ts play data-safety --dry # the Data safety CSV Play imports, from dataSafety in the config
|
||||||
|
bun ../../cli/index.ts aso audit # offline ASO report over store/appstore.md + store/listing.md
|
||||||
|
bun ../../cli/index.ts aso suggest --offline # keyword field proposals as a diff (nothing written)
|
||||||
```
|
```
|
||||||
|
|
||||||
`bun ../../cli/index.ts scan` (offline rejection-risk scan) finds four things that are true for a fictional app and
|
`bun ../../cli/index.ts scan` (offline rejection-risk scan) finds four things that are true for a fictional app and
|
||||||
|
|
|
||||||
72
examples/demo-app/store/appstore.md
Normal file
72
examples/demo-app/store/appstore.md
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
# Tidy Lists · App Store listing copy (demo)
|
||||||
|
|
||||||
|
Source for `storebound apple listing` and the ASO commands (`check --aso`, `aso suggest`, `aso audit`). Fictional app:
|
||||||
|
the text shows the format, it is never uploaded.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## en-US · English (U.S.)
|
||||||
|
|
||||||
|
### subtitle
|
||||||
|
```
|
||||||
|
Shared lists for groceries
|
||||||
|
```
|
||||||
|
|
||||||
|
### promotionalText
|
||||||
|
```
|
||||||
|
Share a list with the people you live with and see every change as it happens.
|
||||||
|
```
|
||||||
|
|
||||||
|
### keywords
|
||||||
|
```
|
||||||
|
tasks,checklist,shopping,family,planner,list
|
||||||
|
```
|
||||||
|
|
||||||
|
### description
|
||||||
|
```
|
||||||
|
Tidy Lists keeps grocery lists, packing lists and to-do lists in one calm place.
|
||||||
|
|
||||||
|
Share a list with family or roommates and every change shows up on their phone. Check items off in the store, sort
|
||||||
|
them by aisle, and reuse a packing list for the next trip.
|
||||||
|
|
||||||
|
FEATURES
|
||||||
|
• Shared lists that sync between phones
|
||||||
|
• Grocery lists sorted by aisle
|
||||||
|
• Packing lists and checklists you can reuse
|
||||||
|
• Works offline; changes sync when you are back online
|
||||||
|
|
||||||
|
Sign in with an account to share lists. Delete your account any time in Settings.
|
||||||
|
```
|
||||||
|
|
||||||
|
## tr · Türkçe
|
||||||
|
|
||||||
|
### subtitle
|
||||||
|
```
|
||||||
|
Market için ortak listeler
|
||||||
|
```
|
||||||
|
|
||||||
|
### promotionalText
|
||||||
|
```
|
||||||
|
Bir listeyi evdekilerle paylaş ve her değişikliği anında gör.
|
||||||
|
```
|
||||||
|
|
||||||
|
### keywords
|
||||||
|
```
|
||||||
|
yapılacaklar,alışveriş,aile,planlayıcı,kontrol
|
||||||
|
```
|
||||||
|
|
||||||
|
### description
|
||||||
|
```
|
||||||
|
Tidy Lists market listelerini, valiz listelerini ve yapılacaklar listelerini tek bir sakin yerde tutar.
|
||||||
|
|
||||||
|
Bir listeyi ailenle ya da ev arkadaşlarınla paylaş; her değişiklik onların telefonunda da görünür. Markette
|
||||||
|
ürünleri işaretle, reyona göre sırala ve valiz listesini bir sonraki yolculukta yeniden kullan.
|
||||||
|
|
||||||
|
ÖZELLİKLER
|
||||||
|
• Telefonlar arasında eşitlenen ortak listeler
|
||||||
|
• Reyona göre sıralı market listeleri
|
||||||
|
• Yeniden kullanılabilen valiz ve kontrol listeleri
|
||||||
|
• Çevrimdışı çalışır; değişiklikler bağlantı gelince eşitlenir
|
||||||
|
|
||||||
|
Liste paylaşmak için bir hesapla giriş yap. Hesabını istediğin zaman Ayarlar'dan silebilirsin.
|
||||||
|
```
|
||||||
60
examples/demo-app/store/listing.md
Normal file
60
examples/demo-app/store/listing.md
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
# Tidy Lists · Google Play listing copy (demo)
|
||||||
|
|
||||||
|
Source for `storebound play listing` and the ASO commands. Fictional app: the text shows the format, it is never
|
||||||
|
uploaded.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## English (en-US)
|
||||||
|
<!-- play: en-US -->
|
||||||
|
|
||||||
|
### Play title (max 30)
|
||||||
|
```
|
||||||
|
Tidy Lists: Shared Groceries
|
||||||
|
```
|
||||||
|
|
||||||
|
### Play short description (max 80)
|
||||||
|
```
|
||||||
|
Shared grocery lists
|
||||||
|
```
|
||||||
|
|
||||||
|
### Play full description (max 4000)
|
||||||
|
```
|
||||||
|
Tidy Lists keeps groceries, packing and to-dos in one calm place.
|
||||||
|
|
||||||
|
Share a grocery list with family or roommates and every change shows up on their phone. Check items off in the
|
||||||
|
store, sort them by aisle, and reuse your packing checklist for the next trip.
|
||||||
|
|
||||||
|
FEATURES
|
||||||
|
• Shared lists that sync between phones
|
||||||
|
• Groceries sorted by aisle
|
||||||
|
• Packing checklists you can reuse
|
||||||
|
• Works offline; changes sync when you are back online
|
||||||
|
|
||||||
|
Sign in with an account to share lists. Delete your account any time in Settings.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Türkçe (tr-TR)
|
||||||
|
<!-- play: tr-TR -->
|
||||||
|
|
||||||
|
### Play title (max 30)
|
||||||
|
```
|
||||||
|
Tidy Lists: Ortak Market
|
||||||
|
```
|
||||||
|
|
||||||
|
### Play short description (max 80)
|
||||||
|
```
|
||||||
|
Ailenle ortak market ve yapılacaklar listeleri, her telefonda anında eşitlenir
|
||||||
|
```
|
||||||
|
|
||||||
|
### Play full description (max 4000)
|
||||||
|
```
|
||||||
|
Tidy Lists market listelerini, valiz listelerini ve yapılacaklar listelerini tek bir sakin yerde tutar.
|
||||||
|
|
||||||
|
Bir listeyi ailenle ya da ev arkadaşlarınla paylaş; her değişiklik onların telefonunda da görünür.
|
||||||
|
|
||||||
|
ÖZELLİKLER
|
||||||
|
• Telefonlar arasında eşitlenen ortak listeler
|
||||||
|
• Reyona göre sıralı market listeleri
|
||||||
|
• Çevrimdışı çalışır
|
||||||
|
```
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
name: aso-basics
|
name: aso-basics
|
||||||
description: App store optimization basics for a mobile app's or game's text - App Store keyword field rules (100 characters, commas without spaces, no repeats of name / subtitle words, fill 90%+), subtitle and name, cross-localization keyword room per storefront, screenshot captions with real keywords, Google Play title / short / full description keyword placement without stuffing. Keyword rank checks per storefront through the public iTunes Search API. Use when the user writes or improves store listing text, keywords, asks why the app or game is not found in store search, or wants keyword ranks and competitors.
|
description: App store optimization basics for a mobile app's or game's text - App Store keyword field rules (100 characters, commas without spaces, no repeats of name / subtitle words, fill 90%+), subtitle and name, cross-localization keyword room per storefront, screenshot captions with real keywords, Google Play title / short / full description keyword placement without stuffing. Keyword ranks, competitors per keyword, keyword field proposals and one ASO audit from official / public data (iTunes Search API, Apple Ads popularity with the owner's credentials, App Store analytics snapshots). Use when the user writes or improves store listing text, keywords, asks why the app or game is not found in store search, or wants keyword ranks, competitors, keyword ideas or an ASO review.
|
||||||
---
|
---
|
||||||
|
|
||||||
# ASO basics
|
# ASO basics
|
||||||
|
|
@ -48,6 +48,44 @@ true; never use competitor or other apps' or games' names, "best / #1", or unrel
|
||||||
429 stops the run with what was read). The table shows the app's position in the first 200 results, the change
|
429 stops the run with what was read). The table shows the app's position in the first 200 results, the change
|
||||||
since the last snapshot (`.storebound/aso/<date>.json`) and the first competitors (title, developer, rating).
|
since the last snapshot (`.storebound/aso/<date>.json`) and the first competitors (title, developer, rating).
|
||||||
|
|
||||||
|
6. Competitors: `storebound aso competitors --dry`, then without `--dry` (MCP: `aso_competitors`, read-only, saves no
|
||||||
|
snapshot). Per keyword (plus `--term`) and storefront the top N apps: name, developer, rating count, first release,
|
||||||
|
last update, genre in the storefront's language. Then the words in their names your name / subtitle / keywords do
|
||||||
|
not cover; a word only counts when two or more developers use it (one developer's word is most likely a brand).
|
||||||
|
Snapshots go to `.storebound/aso/competitors/` and the next run names the apps new in a term's top N.
|
||||||
|
7. Keyword ideas: `storebound aso suggest --locale en-US` (MCP: `aso_suggest`, never writes). Candidates come from the
|
||||||
|
own name / subtitle / description, the latest competitor snapshot, the category names in that language and, when
|
||||||
|
`APPLE_ADS_*` credentials are set (`ads apple status` works), Apple Ads keyword suggestions. For each: relevance
|
||||||
|
(in your own text +1, in competitor names +1), competition (top apps with the word in their name, "3/16"),
|
||||||
|
popularity (Apple Ads' relative 0-100 score; "unknown" otherwise). Show the owner the proposed field (old -> new,
|
||||||
|
bytes) and the left-out words with the reason. Only after a yes: `storebound aso suggest --locale en-US --write`
|
||||||
|
(terminal); it writes the field with a draft line above it. The owner reviews, deletes the line, runs
|
||||||
|
`check --aso`. Never put words in that do not describe the app, other apps' names or brands.
|
||||||
|
8. Review: `storebound aso audit` (MCP: `aso_audit`, offline) puts it together: keyword field findings, free keyword
|
||||||
|
room in other localizations, rank trend arrows (↑ ↓ → new lost), coverage gaps, Play short description use and word
|
||||||
|
density, App Store conversion from `analytics snapshot`, experiment ideas and the next 3 actions. Start there.
|
||||||
|
|
||||||
|
## Experiments (suggestions only; nothing starts on its own)
|
||||||
|
- App Store Product Page Optimization tests the icon, screenshots and app previews only, not the name or subtitle.
|
||||||
|
To test a first-screenshot caption: a `shots.variants` entry, `shots render --variant b`, `apple ppo create --variant
|
||||||
|
b --dry`, `apple ppo upload --variant b --dry` (store-screenshots skill). Starting a test (`apple ppo start`) is the
|
||||||
|
owner's step.
|
||||||
|
- A subtitle change ships with a version: change one thing, then compare with `analytics compare`.
|
||||||
|
- Google Play store listing experiments (short / full description, icon, feature graphic, screenshots) have no API:
|
||||||
|
storebound prepares the text and renders; the owner sets the experiment up in Play Console.
|
||||||
|
|
||||||
|
## Where the numbers come from (say it to the owner)
|
||||||
|
| number | source | is | is not |
|
||||||
|
|---|---|---|---|
|
||||||
|
| rank | iTunes Search API, first 200 results | the app's position in that API's order today | the App Store search position (no personalisation, ads, in-app events) |
|
||||||
|
| competitors, rating count, release dates, genre | iTunes Search API | what the top apps of that term show publicly | their subtitles (no public API has them), downloads or revenue |
|
||||||
|
| relevance, competition | own listing + competitor names | how close a word is to your text and how many top apps lead with it | search volume |
|
||||||
|
| popularity 0-100 | Apple Ads Platform API keyword suggestions (owner's credentials) | Apple's relative score across the chosen countries | an absolute number of searches; never estimated without Apple Ads |
|
||||||
|
| impressions, downloads, conversion | App Store Connect analytics snapshots | real store numbers for the window read | instant feedback: a change needs days on both sides |
|
||||||
|
|
||||||
|
Google Play has no public search API: there are no Play keyword ranks or Play competitor lists here (that would need
|
||||||
|
scraping). Use the Play Console acquisition report (search terms) and `analytics snapshot` for Play.
|
||||||
|
|
||||||
## Rank check limits (say them to the owner)
|
## Rank check limits (say them to the owner)
|
||||||
- The Search API order is close to, not the same as, App Store search (no personalisation, no Search Ads, no in-app
|
- The Search API order is close to, not the same as, App Store search (no personalisation, no Search Ads, no in-app
|
||||||
event rows). Read ranks as a trend over weeks, not as a promise.
|
event rows). Read ranks as a trend over weeks, not as a promise.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
name: store-pitfalls
|
name: store-pitfalls
|
||||||
description: Known pitfalls with App Store Connect, Google Play and storebound itself, learned from real releases, and what to do about each - store lists that lag right after a create, dry runs that print a count instead of a plan, App Store names taken on a storefront, keyword limits in bytes, Data safety answers without code evidence, missing font glyphs in screenshots, console sign-in and sessions, Capacitor monorepo plugins, duplicates from retries, re-runs and parallel runs. Read it before any store task, and when a store command does something you did not expect.
|
description: Known pitfalls with App Store Connect, Google Play and storebound itself, learned from real releases, and what to do about each - store lists that lag right after a create, dry runs that print a count instead of a plan, App Store names taken on a storefront, keyword limits in bytes, Data safety answers without code evidence, missing font glyphs in screenshots, console sign-in and sessions, Capacitor monorepo plugins, duplicates from retries, re-runs and parallel runs, App Store search ranks that are only a trend, Play without a search API. Read it before any store task, and when a store command does something you did not expect.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Store pitfalls
|
# Store pitfalls
|
||||||
|
|
@ -83,6 +83,22 @@ Each entry: **symptom** → cause → what to do → what guards it now. The ful
|
||||||
Play edits deleted on every error and never redone after an unclear commit, screenshot / preview sets keep the
|
Play edits deleted on every error and never redone after an unclear commit, screenshot / preview sets keep the
|
||||||
matching prefix in order, `.storebound/locks/` per app and store. `tests/idempotency.test.ts`.
|
matching prefix in order, `.storebound/locks/` per app and store. `tests/idempotency.test.ts`.
|
||||||
|
|
||||||
|
## 10. "We rank #4 for this keyword" (from the Search API)
|
||||||
|
- **Symptom:** `aso rank` says #4, the owner's phone shows the app lower (or higher) in App Store search.
|
||||||
|
- **Cause:** the iTunes Search API order is close to, not equal to, App Store search: no personalisation, no search
|
||||||
|
ads, no in-app event rows. It has no subtitle field either.
|
||||||
|
- **Do:** read ranks as a trend over weeks (`aso audit` arrows), never as a promise; never claim a competitor's
|
||||||
|
subtitle (no public API has it); a popularity number exists only from Apple Ads, never estimate one.
|
||||||
|
- **Guard:** `aso rank`, `aso competitors` and `aso audit` say it in their output; `aso suggest` shows popularity
|
||||||
|
"unknown" without Apple Ads credentials.
|
||||||
|
|
||||||
|
## 11. "Check our Google Play keyword ranks"
|
||||||
|
- **Symptom:** the owner asks for Play ranks or Play competitors per keyword.
|
||||||
|
- **Cause:** Google Play has no public search API; reading Play search pages would be scraping.
|
||||||
|
- **Do:** say so. Measure Play through the Play Console acquisition reports (search terms) and `analytics snapshot`
|
||||||
|
(store listing visitors, acquisitions); improve the listing text with `aso audit` (short description, density).
|
||||||
|
- **Guard:** `aso` covers App Store search only; the aso-basics skill states the limit.
|
||||||
|
|
||||||
## Adding a lesson
|
## Adding a lesson
|
||||||
Every bug found in real use gets an entry in `docs/pitfalls.md` and here, and, where possible, a check or a test
|
Every bug found in real use gets an entry in `docs/pitfalls.md` and here, and, where possible, a check or a test
|
||||||
that fails without the fix (see CONTRIBUTING.md).
|
that fails without the fix (see CONTRIBUTING.md).
|
||||||
|
|
|
||||||
322
tests/aso-plus.test.ts
Normal file
322
tests/aso-plus.test.ts
Normal file
|
|
@ -0,0 +1,322 @@
|
||||||
|
// aso competitors / suggest / audit: pure parts and the commands against recorded iTunes Search API answers
|
||||||
|
// (tests/fixtures/aso, real response shape, placeholder apps) and mocked Apple Ads keyword suggestions.
|
||||||
|
import { afterEach, beforeEach, describe, expect, test } from 'bun:test';
|
||||||
|
import { generateKeyPairSync } from 'node:crypto';
|
||||||
|
import { existsSync, readFileSync } from 'node:fs';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
import { run as aso } from '../cli/aso';
|
||||||
|
import { run as check } from '../cli/check';
|
||||||
|
import { auditText, buildAudit, nextActions, playUse, rankTrend } from '../cli/lib/aso-audit';
|
||||||
|
import {
|
||||||
|
bigrams, candidates, categoryNames, competitorRow, coverageGaps, DRAFT_RE, draftLocales, draftMark, fitKeywordField, keywordSuggestionBody, newEntrants,
|
||||||
|
parseKeywordSuggestions, sameWord, setKeywords, stem, storefrontOf, tokens,
|
||||||
|
} from '../cli/lib/aso-intel';
|
||||||
|
import type { SearchApp } from '../cli/lib/aso-rank';
|
||||||
|
import { FORBIDDEN_ARGS, TOOLS, toArgv } from '../cli/mcp-tools';
|
||||||
|
import { JSON_TOOLS, methodName } from '../cli/serve';
|
||||||
|
import { BASE, capture, jsonOut, mockFetch, project, restore } from './helpers/store-mock';
|
||||||
|
|
||||||
|
const FIX = join(import.meta.dir, 'fixtures/aso');
|
||||||
|
const US = JSON.parse(readFileSync(join(FIX, 'search-grocery-list-us.json'), 'utf8')) as { results: SearchApp[] };
|
||||||
|
const DE = JSON.parse(readFileSync(join(FIX, 'search-einkaufsliste-de.json'), 'utf8')) as { results: SearchApp[] };
|
||||||
|
const ADS = JSON.parse(readFileSync(join(FIX, 'ads-keyword-suggestions.json'), 'utf8'));
|
||||||
|
const APP = { appId: '6400000101', bundleId: 'com.example.notes' };
|
||||||
|
const ADS_KEYS = ['APPLE_ADS_CLIENT_ID', 'APPLE_ADS_TEAM_ID', 'APPLE_ADS_KEY_ID', 'APPLE_ADS_PRIVATE_KEY', 'APPLE_ADS_ACCOUNT_ID'];
|
||||||
|
const saved: Record<string, string | undefined> = {};
|
||||||
|
|
||||||
|
beforeEach(() => { for (const k of ADS_KEYS) { saved[k] = process.env[k]; delete process.env[k]; } });
|
||||||
|
afterEach(() => { restore(); for (const k of ADS_KEYS) { if (saved[k] === undefined) delete process.env[k]; else process.env[k] = saved[k]; } });
|
||||||
|
|
||||||
|
const LISTING = `# App Store
|
||||||
|
|
||||||
|
## en-US · English
|
||||||
|
|
||||||
|
### subtitle
|
||||||
|
\`\`\`
|
||||||
|
Shared grocery lists
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
### promotionalText
|
||||||
|
\`\`\`
|
||||||
|
Promo.
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
### keywords
|
||||||
|
\`\`\`
|
||||||
|
todo,checklist,list,family
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
### description
|
||||||
|
\`\`\`
|
||||||
|
Example Notes keeps grocery lists and packing lists in one place. Share a packing list with family.
|
||||||
|
|
||||||
|
Sort groceries by aisle and reuse a packing checklist.
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
## de-DE · Deutsch
|
||||||
|
|
||||||
|
### subtitle
|
||||||
|
\`\`\`
|
||||||
|
Gemeinsame Listen
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
### promotionalText
|
||||||
|
\`\`\`
|
||||||
|
Promo.
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
### keywords
|
||||||
|
\`\`\`
|
||||||
|
einkauf,familie
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
### description
|
||||||
|
\`\`\`
|
||||||
|
Einkaufslisten für die ganze Familie.
|
||||||
|
\`\`\`
|
||||||
|
`;
|
||||||
|
const PLAY = '# Play\n\n## English\n<!-- play: en-US -->\n\n### title\n```\nExample Notes: Groceries\n```\n\n### short\n```\nShared lists\n```\n\n### full\n```\nGrocery lists for the family.\n```\n';
|
||||||
|
|
||||||
|
describe('words', () => {
|
||||||
|
test('tokens, bigrams, plural-insensitive and suffix-aware sameness', () => {
|
||||||
|
expect(tokens('The best Grocery Lists for your family app', 'en-US')).toEqual(['best', 'grocery', 'lists', 'family']);
|
||||||
|
expect(tokens("Ayarlar'dan sil", 'tr')).toEqual(['ayarlar', 'sil']);
|
||||||
|
expect(bigrams('Grocery lists. Packing lists and more', 'en-US')).toEqual(['grocery lists', 'packing lists']);
|
||||||
|
expect(stem('groceries', 'en-US')).toBe('grocery');
|
||||||
|
expect(stem('lists', 'en-US')).toBe('list');
|
||||||
|
expect(stem('lists', 'de-DE')).toBe('lists');
|
||||||
|
expect(sameWord('listeler', 'listelerini', 'tr')).toBe(true);
|
||||||
|
expect(sameWord('list', 'listing', 'en-US')).toBe(false);
|
||||||
|
expect(storefrontOf('en-US')).toBe('us');
|
||||||
|
expect(storefrontOf('tr')).toBe('tr');
|
||||||
|
expect(storefrontOf('ja')).toBe('jp');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('competitors (recorded Search API answers)', () => {
|
||||||
|
const row = competitorRow(US.results, APP, { storefront: 'us', locale: 'en-US', term: 'grocery list' }, 4);
|
||||||
|
test('top N other apps with release dates and localized genres; our own position', () => {
|
||||||
|
expect(row.ourRank).toBe(3);
|
||||||
|
expect(row.apps.map(a => a.rank)).toEqual([1, 2, 4, 5]);
|
||||||
|
expect(row.apps[0]).toMatchObject({ name: 'Basket: Grocery Shopping List', developer: 'Example Studio A', ratings: 80000, released: '2012-05-11', updated: '2026-09-11', genre: 'Productivity' });
|
||||||
|
expect(row.apps[0]!.genres).toEqual([{ id: '6007', name: 'Productivity' }, { id: '6024', name: 'Shopping' }]);
|
||||||
|
});
|
||||||
|
test('coverage gaps: words of two or more developers that we do not cover; one-developer words (brands) left out', () => {
|
||||||
|
const all = competitorRow(US.results, APP, { storefront: 'us', locale: 'en-US', term: 'grocery list' }, 10);
|
||||||
|
const gaps = coverageGaps([all], ['list', 'todo'], 'en-US');
|
||||||
|
expect(gaps.map(g => g.word)).toEqual(['grocery', 'shopping']);
|
||||||
|
expect(gaps[0]).toMatchObject({ apps: 3, developers: 3 });
|
||||||
|
expect(gaps.some(g => g.word === 'cartful')).toBe(false); // one developer, two apps: a brand
|
||||||
|
expect(coverageGaps([all], ['groceries', 'lists', 'shopping'], 'en-US')).toEqual([]);
|
||||||
|
});
|
||||||
|
test('new entrants and localized category names', () => {
|
||||||
|
const before = { ...row, apps: row.apps.slice(1) };
|
||||||
|
expect(newEntrants([row], [before]).get('us|grocery list')).toEqual(['Basket: Grocery Shopping List']);
|
||||||
|
expect(newEntrants([row], undefined).size).toBe(0);
|
||||||
|
const de = competitorRow(DE.results, APP, { storefront: 'de', locale: 'de-DE', term: 'einkaufsliste' }, 10);
|
||||||
|
expect(categoryNames([de], ['PRODUCTIVITY'])).toEqual(['Produktivität']);
|
||||||
|
expect(categoryNames([de], ['FOOD_AND_DRINK'])).toEqual(['Essen und Trinken']);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Apple Ads keyword suggestions', () => {
|
||||||
|
test('request body: required filters, terms, countries, popularity order', () => {
|
||||||
|
const b = keywordSuggestionBody('6400000101', ['grocery'], ['us']) as { filters: { field: string; value: string[] }[]; sorting: unknown; pagination: unknown };
|
||||||
|
expect(b.filters.map(f => f.field)).toEqual(['promotedObjectId', 'promotedObjectType', 'terms', 'countriesOrRegions']);
|
||||||
|
expect(b.filters[1]!.value).toEqual(['APPSTORE_APP']);
|
||||||
|
expect(b.filters[3]!.value).toEqual(['US']);
|
||||||
|
expect(b.sorting).toEqual([{ field: 'popularity', order: 'DESC' }]);
|
||||||
|
expect(b.pagination).toEqual({ offset: 0, pageSize: 200 });
|
||||||
|
});
|
||||||
|
test('parse: text + popularity 0-100, junk left out', () => {
|
||||||
|
expect(parseKeywordSuggestions(ADS)).toHaveLength(4);
|
||||||
|
expect(parseKeywordSuggestions({ result: [{ text: 'x', popularity: 140 }, { text: 'y' }, null] })).toEqual([{ text: 'x', popularity: 100 }]);
|
||||||
|
expect(parseKeywordSuggestions({})).toEqual([]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('candidates and the 100-byte field', () => {
|
||||||
|
const comp = [competitorRow(US.results, APP, { storefront: 'us', locale: 'en-US', term: 'grocery list' }, 10)];
|
||||||
|
const base = { locale: 'en-US', name: 'Example Notes', subtitle: 'Shared grocery lists', keywords: 'todo,checklist,list,family', description: 'Grocery lists and packing lists. Share a packing list with family. Sort by aisle, reuse a packing checklist. Aisle sorting.', competitors: comp, categories: ['Productivity'] };
|
||||||
|
test('no popularity without Apple Ads; relevance and competition from own text and competitor names', () => {
|
||||||
|
const c = candidates({ ...base, ads: [] });
|
||||||
|
expect(c.every(x => x.popularity === null)).toBe(true);
|
||||||
|
const packing = c.find(x => x.term === 'packing')!;
|
||||||
|
expect(packing).toMatchObject({ status: 'candidate', relevance: 2, inNames: 1, ofApps: 5 });
|
||||||
|
expect(c.find(x => x.term === 'grocery')!.status).toBe('indexed');
|
||||||
|
expect(c.find(x => x.term === 'productivity')!.status).toBe('category');
|
||||||
|
expect(c.find(x => x.term === 'cartful')).toBeUndefined();
|
||||||
|
});
|
||||||
|
test('Apple Ads popularity: exact word, or the best phrase that contains it', () => {
|
||||||
|
const c = candidates({ ...base, ads: parseKeywordSuggestions(ADS) });
|
||||||
|
expect(c.find(x => x.term === 'packing')).toMatchObject({ popularity: 41, popularityFrom: 'exact' });
|
||||||
|
expect(c.find(x => x.term === 'shopping')).toMatchObject({ popularity: 64, popularityFrom: 'exact', sources: ['competitors', 'apple-ads'] });
|
||||||
|
expect(c.find(x => x.term === 'aisle')!.popularity).toBeNull();
|
||||||
|
});
|
||||||
|
test('fit: <= 100 bytes, current terms kept, indexed and duplicate words dropped', () => {
|
||||||
|
const ranked = candidates({ ...base, ads: [] });
|
||||||
|
const p = fitKeywordField({ locale: 'en-US', current: base.keywords, name: base.name, subtitle: base.subtitle, ranked });
|
||||||
|
expect(p.kept).toEqual(['todo', 'checklist', 'family']);
|
||||||
|
expect(p.dropped).toEqual([{ term: 'list', why: 'already in the name / subtitle (indexed)' }]);
|
||||||
|
expect(p.added).toContain('packing');
|
||||||
|
expect(p.after).not.toMatch(/,\s|\s,/);
|
||||||
|
expect(p.bytes).toBeLessThanOrEqual(100);
|
||||||
|
expect(new Set(p.after.split(',')).size).toBe(p.after.split(',').length);
|
||||||
|
// bytes, not characters: Turkish letters take two
|
||||||
|
const many = Array.from({ length: 30 }, (_, i) => ({ term: `şğü${i}`, kind: 'word' as const, sources: ['description' as const], ours: 2, relevance: 1, inNames: 0, ofApps: 0, popularity: null, popularityFrom: null, status: 'candidate' as const }));
|
||||||
|
const t = fitKeywordField({ locale: 'tr', current: '', name: 'X', subtitle: '', ranked: many });
|
||||||
|
expect(t.bytes).toBeLessThanOrEqual(100);
|
||||||
|
expect(Buffer.byteLength(t.after)).toBe(t.bytes);
|
||||||
|
expect(fitKeywordField({ locale: 'en-US', current: 'todo', name: 'X', subtitle: '', ranked, fresh: true }).kept).toEqual([]);
|
||||||
|
});
|
||||||
|
test('write: keywords block replaced, draft line above it, found again, then removable', () => {
|
||||||
|
const md = setKeywords(LISTING, 'en-US', 'todo,packing', draftMark('2026-10-12'));
|
||||||
|
expect(md).toContain('### keywords\n<!-- storebound-aso: draft keywords from `aso suggest` 2026-10-12; review them, then delete this line -->\n```\ntodo,packing\n```\n');
|
||||||
|
expect(md).toContain('### description\n```\nExample Notes keeps');
|
||||||
|
expect(draftLocales(md)).toEqual(['en-US']);
|
||||||
|
expect(setKeywords(md, 'en-US', 'a,b', draftMark('2026-10-13')).match(/storebound-aso/g)).toHaveLength(1);
|
||||||
|
expect(draftLocales(md.replace(DRAFT_RE, ''))).toEqual([]);
|
||||||
|
expect(() => setKeywords(LISTING, 'fr-FR', 'x', 'm')).toThrow('no "## fr-FR"');
|
||||||
|
const noKw = '## ja · 日本語\n\n### subtitle\n```\nx\n```\n';
|
||||||
|
expect(setKeywords(noKw, 'ja', 'リスト', draftMark('2026-10-12'))).toContain('### subtitle\n```\nx\n```\n\n### keywords\n<!-- storebound-aso');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('audit parts', () => {
|
||||||
|
const r = (date: string, rows: [string, number | null][]) => ({ date, rows: rows.map(([keyword, rank]) => ({ storefront: 'us', locale: 'en-US', keyword, rank, results: 200, competitors: [] })) });
|
||||||
|
test('rank trend arrows', () => {
|
||||||
|
const t = rankTrend([r('2026-09-01', [['todo', 12], ['list', 40], ['plan', null]]), r('2026-09-15', [['todo', 8], ['list', 55], ['plan', 30], ['new', null]]), r('2026-08-01', [['todo', 20], ['gone', 9]])]);
|
||||||
|
const by = Object.fromEntries(t.rows.map(x => [x.keyword, x]));
|
||||||
|
expect(t.dates).toEqual(['2026-08-01', '2026-09-01', '2026-09-15']);
|
||||||
|
expect(by.todo).toMatchObject({ rank: 8, previous: 12, change: 4, arrow: '↑', best: 8, snapshots: 3 });
|
||||||
|
expect(by.list).toMatchObject({ arrow: '↓', change: -15 });
|
||||||
|
expect(by.plan!.arrow).toBe('new');
|
||||||
|
expect(by.new!.arrow).toBe('·');
|
||||||
|
expect(by.gone).toMatchObject({ rank: 9, arrow: 'new', snapshots: 1 });
|
||||||
|
expect(t.series.find(s => s.keyword === 'todo')!.ranks).toEqual([20, 12, 8]);
|
||||||
|
});
|
||||||
|
test('play use: short description room, title words, density', () => {
|
||||||
|
const full = Array.from({ length: 12 }, () => 'grocery lists for the family to share and plan').join('. ');
|
||||||
|
const u = playUse({ lang: 'en-US', title: 'Example: Groceries', short: 'Shared lists', full, whatsNew: '' });
|
||||||
|
expect(u).toMatchObject({ shortChars: 12, shortRoom: 68, titleWordsInShort: false });
|
||||||
|
expect(u.stuffed).toContain('grocery');
|
||||||
|
});
|
||||||
|
test('audit: next 3 actions, PPO cannot test the subtitle, Play experiments are a guide', () => {
|
||||||
|
const a = buildAudit({ today: '2026-10-12', storefront: 'US', findings: [{ level: 'warn', where: 'apple en-US', msg: 'keywords: 40/100 bytes used; fill at least 90 (60 bytes free)' }],
|
||||||
|
drafts: [], appName: 'Example Notes', ranks: [], competitors: null, analytics: [], variants: ['b'],
|
||||||
|
apple: { 'en-US': { subtitle: 'x', keywords: 'a' } }, play: [{ lang: 'en-US', title: 'T', short: 'Short', full: 'Full text.', whatsNew: '' }] });
|
||||||
|
expect(a.next).toHaveLength(3);
|
||||||
|
expect(a.next[0]!.command).toBe('storebound aso suggest --locale en-US');
|
||||||
|
expect(a.next[1]!.what).toBe('take a first rank snapshot');
|
||||||
|
expect(a.experiments.find(e => e.what === 'subtitle variant')!.why).toContain('cannot be A/B tested');
|
||||||
|
expect(a.experiments.find(e => e.store === 'apple')!.how).toContain('apple ppo create --variant b --dry');
|
||||||
|
expect(a.experiments.find(e => e.store === 'play')!.how).toContain('no API');
|
||||||
|
expect(auditText(a)).toContain('Next 3 actions');
|
||||||
|
expect(nextActions({ ...a, keywordField: { ...a.keywordField, findings: [] } }, { today: '2026-10-12', variants: [] } as never).length).toBeLessThanOrEqual(3);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('commands', () => {
|
||||||
|
const files = { 'store/appstore.md': LISTING, 'store/listing.md': PLAY };
|
||||||
|
test('competitors: --dry lists the queries, a run saves a snapshot and the gaps', async () => {
|
||||||
|
const p = project(BASE, files);
|
||||||
|
const calls = mockFetch([{ match: /^\/search\?term=grocery\+list&country=us/, answer: US }]);
|
||||||
|
let r = await capture(() => aso(p.ctx(['competitors', '--term', 'grocery list', '--only-terms', '--dry', '--json'])));
|
||||||
|
expect(jsonOut(r.out).queries).toEqual([{ storefront: 'us', locale: 'en-US', term: 'grocery list', url: 'https://itunes.apple.com/search?term=grocery+list&country=us&media=software&entity=software&limit=11' }]);
|
||||||
|
expect(calls).toHaveLength(0);
|
||||||
|
r = await capture(() => aso(p.ctx(['competitors', '--term', 'grocery list', '--only-terms', '--top', '3', '--json'])));
|
||||||
|
const j = jsonOut(r.out) as { rows: { ourRank: number; apps: unknown[] }[]; gaps: { gaps: { word: string }[] }[]; saved: boolean };
|
||||||
|
expect(j.rows[0]!.ourRank).toBe(3);
|
||||||
|
expect(j.rows[0]!.apps).toHaveLength(3);
|
||||||
|
expect(j.saved).toBe(true);
|
||||||
|
const snap = join(p.root, '.storebound/aso/competitors', `${new Date().toISOString().slice(0, 10)}.json`);
|
||||||
|
expect(JSON.parse(readFileSync(snap, 'utf8')).top).toBe(3);
|
||||||
|
// MCP form: read-only, nothing saved
|
||||||
|
const q = project(BASE, files);
|
||||||
|
mockFetch([{ match: /^\/search\?term=grocery\+list/, answer: US }]);
|
||||||
|
r = await capture(() => aso(q.ctx(['competitors', '--term', 'grocery list', '--only-terms', '--no-save', '--json'])));
|
||||||
|
expect(jsonOut(r.out).saved).toBe(false);
|
||||||
|
expect(existsSync(join(q.root, '.storebound/aso/competitors'))).toBe(false);
|
||||||
|
});
|
||||||
|
test('suggest: offline proposal is a dry diff; --write marks a draft that check --aso reports', async () => {
|
||||||
|
const p = project(BASE, files);
|
||||||
|
mockFetch([]);
|
||||||
|
let r = await capture(() => aso(p.ctx(['suggest', '--locale', 'en-US', '--json'])));
|
||||||
|
const j = jsonOut(r.out) as { written: boolean; results: { ads: string; proposal: { before: string; after: string; bytes: number }; candidates: { popularity: number | null }[] }[] };
|
||||||
|
expect(j.written).toBe(false);
|
||||||
|
expect(j.results[0]!.ads).toMatch(/no Apple Ads credentials.*popularity unknown/);
|
||||||
|
expect(j.results[0]!.candidates.every(c => c.popularity === null)).toBe(true);
|
||||||
|
expect(j.results[0]!.proposal.before).toBe('todo,checklist,list,family');
|
||||||
|
expect(readFileSync(join(p.root, 'store/appstore.md'), 'utf8')).toBe(LISTING);
|
||||||
|
r = await capture(() => aso(p.ctx(['suggest', '--locale', 'en-US', '--write'])));
|
||||||
|
const md = readFileSync(join(p.root, 'store/appstore.md'), 'utf8');
|
||||||
|
expect(draftLocales(md)).toEqual(['en-US']);
|
||||||
|
expect(md).toContain(j.results[0]!.proposal.after);
|
||||||
|
r = await capture(() => check(p.ctx(['--aso'])));
|
||||||
|
expect(r.out).toContain('draft from `aso suggest`, not reviewed yet');
|
||||||
|
});
|
||||||
|
test('suggest with Apple Ads credentials: popularity from the keyword suggestions endpoint', async () => {
|
||||||
|
const { privateKey } = generateKeyPairSync('ec', { namedCurve: 'P-256' });
|
||||||
|
Object.assign(process.env, { APPLE_ADS_CLIENT_ID: 'SEARCHADS.client-placeholder', APPLE_ADS_TEAM_ID: 'SEARCHADS.team-placeholder', APPLE_ADS_KEY_ID: 'key-placeholder',
|
||||||
|
APPLE_ADS_PRIVATE_KEY: privateKey.export({ type: 'sec1', format: 'pem' }).toString(), APPLE_ADS_ACCOUNT_ID: '123456789' });
|
||||||
|
const p = project(BASE, files);
|
||||||
|
const calls = mockFetch([
|
||||||
|
{ method: 'POST', match: /^\/auth\/oauth2\/token$/, answer: { access_token: 'token-placeholder', token_type: 'Bearer', expires_in: 3600 } },
|
||||||
|
{ method: 'POST', match: /^\/v1\/suggestions\/keywords\/query$/, answer: ADS },
|
||||||
|
]);
|
||||||
|
const r = await capture(() => aso(p.ctx(['suggest', '--locale', 'en-US', '--json'])));
|
||||||
|
const j = jsonOut(r.out) as { results: { ads: string; candidates: { term: string; popularity: number | null }[] }[] };
|
||||||
|
expect(j.results[0]!.ads).toContain('Apple Ads keyword suggestions (US): 4');
|
||||||
|
expect(j.results[0]!.candidates.find(c => c.term === 'packing')!.popularity).toBe(41);
|
||||||
|
const q = calls.find(c => c.path === '/v1/suggestions/keywords/query')!;
|
||||||
|
expect((q.body as { filters: unknown[] }).filters[0]).toEqual({ field: 'promotedObjectId', operator: 'EQUALS', value: ['6400000101'] });
|
||||||
|
expect(calls.some(c => c.method !== 'POST')).toBe(false);
|
||||||
|
});
|
||||||
|
test('audit: offline report from the listing files and snapshots', async () => {
|
||||||
|
const p = project(BASE, { ...files,
|
||||||
|
'.storebound/aso/2026-09-01.json': JSON.stringify({ date: '2026-09-01', rows: [{ storefront: 'us', locale: 'en-US', keyword: 'todo', rank: 30, results: 200, competitors: [] }] }),
|
||||||
|
'.storebound/aso/2026-09-15.json': JSON.stringify({ date: '2026-09-15', rows: [{ storefront: 'us', locale: 'en-US', keyword: 'todo', rank: 21, results: 200, competitors: [] }] }),
|
||||||
|
'.storebound/aso/competitors/2026-09-15.json': JSON.stringify({ date: '2026-09-15', app: APP, top: 10, rows: [competitorRow(US.results, APP, { storefront: 'us', locale: 'en-US', term: 'grocery list' }, 10)] }),
|
||||||
|
});
|
||||||
|
const calls = mockFetch([]);
|
||||||
|
let r = await capture(() => aso(p.ctx(['audit', '--json'])));
|
||||||
|
const j = jsonOut(r.out) as { ranks: { rows: { arrow: string; change: number }[] }; competitors: { gaps: { gaps: { word: string }[] }[] }; next: unknown[]; play: unknown[] };
|
||||||
|
expect(j.ranks.rows[0]).toMatchObject({ arrow: '↑', change: 9 });
|
||||||
|
expect(j.competitors.gaps[0]!.gaps.map(g => g.word)).toContain('shopping');
|
||||||
|
expect(j.next.length).toBeLessThanOrEqual(3);
|
||||||
|
expect(j.play).toHaveLength(1);
|
||||||
|
expect(calls).toHaveLength(0);
|
||||||
|
r = await capture(() => aso(p.ctx(['audit'])));
|
||||||
|
expect(r.out).toContain('2. Ranks');
|
||||||
|
expect(r.out).toMatch(/us\s+todo\s+21\s+↑\s+\+9/);
|
||||||
|
});
|
||||||
|
test('unknown subcommand', async () => {
|
||||||
|
const p = project(BASE, files);
|
||||||
|
await expect(aso(p.ctx(['nope']))).rejects.toThrow('rank | competitors | suggest | audit');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('MCP and desktop', () => {
|
||||||
|
const t = (n: string) => TOOLS.find(x => x.name === n)!;
|
||||||
|
test('read-only tools: competitors saves nothing, suggest never writes, audit is offline', () => {
|
||||||
|
expect(t('aso_competitors')).toMatchObject({ write: false, network: true });
|
||||||
|
expect(toArgv(t('aso_competitors'), { storefront: 'us,tr', terms: 'grocery list', top: 5 }).argv).toEqual(['aso', 'competitors', '--storefront', 'us,tr', '--term', 'grocery list', '--top', '5', '--no-save', '--json']);
|
||||||
|
expect(t('aso_suggest')).toMatchObject({ write: false, network: true });
|
||||||
|
expect(toArgv(t('aso_suggest'), { locale: 'en-US', offline: true }).argv).toEqual(['aso', 'suggest', '--locale', 'en-US', '--offline', '--json']);
|
||||||
|
expect(t('aso_audit')).toMatchObject({ write: false, network: false });
|
||||||
|
expect(toArgv(t('aso_audit'), {}).argv).toEqual(['aso', 'audit', '--json']);
|
||||||
|
for (const n of ['aso_competitors', 'aso_suggest', 'aso_audit']) {
|
||||||
|
for (const a of FORBIDDEN_ARGS) expect(toArgv(t(n), { locale: 'x' }).argv).not.toContain(a);
|
||||||
|
expect(JSON_TOOLS.has(n)).toBe(true);
|
||||||
|
}
|
||||||
|
expect(methodName('aso_audit')).toBe('aso.audit');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// keep the fixture honest: placeholder apps only, the real Search API field set
|
||||||
|
test('fixtures are placeholders with the Search API fields used', () => {
|
||||||
|
for (const r of [...US.results, ...DE.results]) {
|
||||||
|
expect(r.bundleId).toMatch(/^com\.example\./);
|
||||||
|
for (const k of ['trackId', 'trackName', 'sellerName', 'userRatingCount', 'releaseDate', 'currentVersionReleaseDate', 'genres', 'genreIds', 'primaryGenreName']) expect(r).toHaveProperty(k);
|
||||||
|
}
|
||||||
|
});
|
||||||
25
tests/fixtures/aso/ads-keyword-suggestions.json
vendored
Normal file
25
tests/fixtures/aso/ads-keyword-suggestions.json
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"result": [
|
||||||
|
{
|
||||||
|
"text": "grocery list",
|
||||||
|
"popularity": 78
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "packing",
|
||||||
|
"popularity": 41
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "shopping",
|
||||||
|
"popularity": 64
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "meal planner",
|
||||||
|
"popularity": 55
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pagination": {
|
||||||
|
"offset": 0,
|
||||||
|
"pageSize": 200,
|
||||||
|
"totalCount": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
119
tests/fixtures/aso/search-einkaufsliste-de.json
vendored
Normal file
119
tests/fixtures/aso/search-einkaufsliste-de.json
vendored
Normal file
|
|
@ -0,0 +1,119 @@
|
||||||
|
{
|
||||||
|
"resultCount": 2,
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"isGameCenterEnabled": false,
|
||||||
|
"features": [
|
||||||
|
"iosUniversal"
|
||||||
|
],
|
||||||
|
"advisories": [],
|
||||||
|
"supportedDevices": [
|
||||||
|
"iPhone15-iPhone15"
|
||||||
|
],
|
||||||
|
"kind": "software",
|
||||||
|
"artistViewUrl": "https://apps.apple.com/us/developer/id1000000007?uo=4",
|
||||||
|
"artworkUrl60": "https://example.com/art60.png",
|
||||||
|
"artworkUrl100": "https://example.com/art100.png",
|
||||||
|
"artworkUrl512": "https://example.com/art512.png",
|
||||||
|
"screenshotUrls": [],
|
||||||
|
"ipadScreenshotUrls": [],
|
||||||
|
"appletvScreenshotUrls": [],
|
||||||
|
"trackCensoredName": "Einkaufsliste Plus",
|
||||||
|
"trackViewUrl": "https://apps.apple.com/us/app/id6400000906?uo=4",
|
||||||
|
"trackContentRating": "4+",
|
||||||
|
"contentAdvisoryRating": "4+",
|
||||||
|
"averageUserRating": 4.6,
|
||||||
|
"averageUserRatingForCurrentVersion": 4.6,
|
||||||
|
"userRatingCountForCurrentVersion": 3000,
|
||||||
|
"languageCodesISO2A": [
|
||||||
|
"EN"
|
||||||
|
],
|
||||||
|
"fileSizeBytes": "52428800",
|
||||||
|
"sellerUrl": "https://example.com",
|
||||||
|
"formattedPrice": "Free",
|
||||||
|
"trackId": 6400000906,
|
||||||
|
"trackName": "Einkaufsliste Plus",
|
||||||
|
"genreIds": [
|
||||||
|
"6007"
|
||||||
|
],
|
||||||
|
"genres": [
|
||||||
|
"Produktivität"
|
||||||
|
],
|
||||||
|
"primaryGenreName": "Productivity",
|
||||||
|
"primaryGenreId": 6007,
|
||||||
|
"releaseDate": "2014-01-01T07:00:00Z",
|
||||||
|
"currentVersionReleaseDate": "2026-07-01T07:00:00Z",
|
||||||
|
"sellerName": "Example Studio E",
|
||||||
|
"bundleId": "com.example.einkauf",
|
||||||
|
"artistId": 1000000007,
|
||||||
|
"artistName": "Example Studio E",
|
||||||
|
"isVppDeviceBasedLicensingEnabled": true,
|
||||||
|
"currency": "USD",
|
||||||
|
"description": "Placeholder description.",
|
||||||
|
"price": 0.0,
|
||||||
|
"releaseNotes": "Bug fixes.",
|
||||||
|
"minimumOsVersion": "16.0",
|
||||||
|
"version": "3.2.1",
|
||||||
|
"wrapperType": "software",
|
||||||
|
"userRatingCount": 3000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"isGameCenterEnabled": false,
|
||||||
|
"features": [
|
||||||
|
"iosUniversal"
|
||||||
|
],
|
||||||
|
"advisories": [],
|
||||||
|
"supportedDevices": [
|
||||||
|
"iPhone15-iPhone15"
|
||||||
|
],
|
||||||
|
"kind": "software",
|
||||||
|
"artistViewUrl": "https://apps.apple.com/us/developer/id1000000008?uo=4",
|
||||||
|
"artworkUrl60": "https://example.com/art60.png",
|
||||||
|
"artworkUrl100": "https://example.com/art100.png",
|
||||||
|
"artworkUrl512": "https://example.com/art512.png",
|
||||||
|
"screenshotUrls": [],
|
||||||
|
"ipadScreenshotUrls": [],
|
||||||
|
"appletvScreenshotUrls": [],
|
||||||
|
"trackCensoredName": "Einkaufsliste & Rezepte",
|
||||||
|
"trackViewUrl": "https://apps.apple.com/us/app/id6400000907?uo=4",
|
||||||
|
"trackContentRating": "4+",
|
||||||
|
"contentAdvisoryRating": "4+",
|
||||||
|
"averageUserRating": 4.6,
|
||||||
|
"averageUserRatingForCurrentVersion": 4.6,
|
||||||
|
"userRatingCountForCurrentVersion": 800,
|
||||||
|
"languageCodesISO2A": [
|
||||||
|
"EN"
|
||||||
|
],
|
||||||
|
"fileSizeBytes": "52428800",
|
||||||
|
"sellerUrl": "https://example.com",
|
||||||
|
"formattedPrice": "Free",
|
||||||
|
"trackId": 6400000907,
|
||||||
|
"trackName": "Einkaufsliste & Rezepte",
|
||||||
|
"genreIds": [
|
||||||
|
"6007",
|
||||||
|
"6023"
|
||||||
|
],
|
||||||
|
"genres": [
|
||||||
|
"Produktivität",
|
||||||
|
"Essen und Trinken"
|
||||||
|
],
|
||||||
|
"primaryGenreName": "Productivity",
|
||||||
|
"primaryGenreId": 6007,
|
||||||
|
"releaseDate": "2019-01-01T07:00:00Z",
|
||||||
|
"currentVersionReleaseDate": "2026-06-01T07:00:00Z",
|
||||||
|
"sellerName": "Example Studio F",
|
||||||
|
"bundleId": "com.example.rezepte",
|
||||||
|
"artistId": 1000000008,
|
||||||
|
"artistName": "Example Studio F",
|
||||||
|
"isVppDeviceBasedLicensingEnabled": true,
|
||||||
|
"currency": "USD",
|
||||||
|
"description": "Placeholder description.",
|
||||||
|
"price": 0.0,
|
||||||
|
"releaseNotes": "Bug fixes.",
|
||||||
|
"minimumOsVersion": "16.0",
|
||||||
|
"version": "3.2.1",
|
||||||
|
"wrapperType": "software",
|
||||||
|
"userRatingCount": 800
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
343
tests/fixtures/aso/search-grocery-list-us.json
vendored
Normal file
343
tests/fixtures/aso/search-grocery-list-us.json
vendored
Normal file
|
|
@ -0,0 +1,343 @@
|
||||||
|
{
|
||||||
|
"resultCount": 6,
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"isGameCenterEnabled": false,
|
||||||
|
"features": [
|
||||||
|
"iosUniversal"
|
||||||
|
],
|
||||||
|
"advisories": [],
|
||||||
|
"supportedDevices": [
|
||||||
|
"iPhone15-iPhone15"
|
||||||
|
],
|
||||||
|
"kind": "software",
|
||||||
|
"artistViewUrl": "https://apps.apple.com/us/developer/id1000000001?uo=4",
|
||||||
|
"artworkUrl60": "https://example.com/art60.png",
|
||||||
|
"artworkUrl100": "https://example.com/art100.png",
|
||||||
|
"artworkUrl512": "https://example.com/art512.png",
|
||||||
|
"screenshotUrls": [],
|
||||||
|
"ipadScreenshotUrls": [],
|
||||||
|
"appletvScreenshotUrls": [],
|
||||||
|
"trackCensoredName": "Basket: Grocery Shopping List",
|
||||||
|
"trackViewUrl": "https://apps.apple.com/us/app/id6400000901?uo=4",
|
||||||
|
"trackContentRating": "4+",
|
||||||
|
"contentAdvisoryRating": "4+",
|
||||||
|
"averageUserRating": 4.6,
|
||||||
|
"averageUserRatingForCurrentVersion": 4.6,
|
||||||
|
"userRatingCountForCurrentVersion": 80000,
|
||||||
|
"languageCodesISO2A": [
|
||||||
|
"EN"
|
||||||
|
],
|
||||||
|
"fileSizeBytes": "52428800",
|
||||||
|
"sellerUrl": "https://example.com",
|
||||||
|
"formattedPrice": "Free",
|
||||||
|
"trackId": 6400000901,
|
||||||
|
"trackName": "Basket: Grocery Shopping List",
|
||||||
|
"genreIds": [
|
||||||
|
"6007",
|
||||||
|
"6024"
|
||||||
|
],
|
||||||
|
"genres": [
|
||||||
|
"Productivity",
|
||||||
|
"Shopping"
|
||||||
|
],
|
||||||
|
"primaryGenreName": "Productivity",
|
||||||
|
"primaryGenreId": 6007,
|
||||||
|
"releaseDate": "2012-05-11T07:00:00Z",
|
||||||
|
"currentVersionReleaseDate": "2026-09-11T16:20:00Z",
|
||||||
|
"sellerName": "Example Studio A",
|
||||||
|
"bundleId": "com.example.basket",
|
||||||
|
"artistId": 1000000001,
|
||||||
|
"artistName": "Example Studio A",
|
||||||
|
"isVppDeviceBasedLicensingEnabled": true,
|
||||||
|
"currency": "USD",
|
||||||
|
"description": "Placeholder description.",
|
||||||
|
"price": 0.0,
|
||||||
|
"releaseNotes": "Bug fixes.",
|
||||||
|
"minimumOsVersion": "16.0",
|
||||||
|
"version": "3.2.1",
|
||||||
|
"wrapperType": "software",
|
||||||
|
"userRatingCount": 80000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"isGameCenterEnabled": false,
|
||||||
|
"features": [
|
||||||
|
"iosUniversal"
|
||||||
|
],
|
||||||
|
"advisories": [],
|
||||||
|
"supportedDevices": [
|
||||||
|
"iPhone15-iPhone15"
|
||||||
|
],
|
||||||
|
"kind": "software",
|
||||||
|
"artistViewUrl": "https://apps.apple.com/us/developer/id1000000002?uo=4",
|
||||||
|
"artworkUrl60": "https://example.com/art60.png",
|
||||||
|
"artworkUrl100": "https://example.com/art100.png",
|
||||||
|
"artworkUrl512": "https://example.com/art512.png",
|
||||||
|
"screenshotUrls": [],
|
||||||
|
"ipadScreenshotUrls": [],
|
||||||
|
"appletvScreenshotUrls": [],
|
||||||
|
"trackCensoredName": "Pantry Grocery Shopping List",
|
||||||
|
"trackViewUrl": "https://apps.apple.com/us/app/id6400000902?uo=4",
|
||||||
|
"trackContentRating": "4+",
|
||||||
|
"contentAdvisoryRating": "4+",
|
||||||
|
"averageUserRating": 4.6,
|
||||||
|
"averageUserRatingForCurrentVersion": 4.6,
|
||||||
|
"userRatingCountForCurrentVersion": 52000,
|
||||||
|
"languageCodesISO2A": [
|
||||||
|
"EN"
|
||||||
|
],
|
||||||
|
"fileSizeBytes": "52428800",
|
||||||
|
"sellerUrl": "https://example.com",
|
||||||
|
"formattedPrice": "Free",
|
||||||
|
"trackId": 6400000902,
|
||||||
|
"trackName": "Pantry Grocery Shopping List",
|
||||||
|
"genreIds": [
|
||||||
|
"6024"
|
||||||
|
],
|
||||||
|
"genres": [
|
||||||
|
"Shopping"
|
||||||
|
],
|
||||||
|
"primaryGenreName": "Shopping",
|
||||||
|
"primaryGenreId": 6024,
|
||||||
|
"releaseDate": "2009-08-14T07:00:00Z",
|
||||||
|
"currentVersionReleaseDate": "2026-09-15T10:00:00Z",
|
||||||
|
"sellerName": "Example Studio B",
|
||||||
|
"bundleId": "com.example.pantry",
|
||||||
|
"artistId": 1000000002,
|
||||||
|
"artistName": "Example Studio B",
|
||||||
|
"isVppDeviceBasedLicensingEnabled": true,
|
||||||
|
"currency": "USD",
|
||||||
|
"description": "Placeholder description.",
|
||||||
|
"price": 0.0,
|
||||||
|
"releaseNotes": "Bug fixes.",
|
||||||
|
"minimumOsVersion": "16.0",
|
||||||
|
"version": "3.2.1",
|
||||||
|
"wrapperType": "software",
|
||||||
|
"userRatingCount": 52000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"isGameCenterEnabled": false,
|
||||||
|
"features": [
|
||||||
|
"iosUniversal"
|
||||||
|
],
|
||||||
|
"advisories": [],
|
||||||
|
"supportedDevices": [
|
||||||
|
"iPhone15-iPhone15"
|
||||||
|
],
|
||||||
|
"kind": "software",
|
||||||
|
"artistViewUrl": "https://apps.apple.com/us/developer/id1000000003?uo=4",
|
||||||
|
"artworkUrl60": "https://example.com/art60.png",
|
||||||
|
"artworkUrl100": "https://example.com/art100.png",
|
||||||
|
"artworkUrl512": "https://example.com/art512.png",
|
||||||
|
"screenshotUrls": [],
|
||||||
|
"ipadScreenshotUrls": [],
|
||||||
|
"appletvScreenshotUrls": [],
|
||||||
|
"trackCensoredName": "Example Notes",
|
||||||
|
"trackViewUrl": "https://apps.apple.com/us/app/id6400000101?uo=4",
|
||||||
|
"trackContentRating": "4+",
|
||||||
|
"contentAdvisoryRating": "4+",
|
||||||
|
"averageUserRating": 4.6,
|
||||||
|
"averageUserRatingForCurrentVersion": 4.6,
|
||||||
|
"userRatingCountForCurrentVersion": 50,
|
||||||
|
"languageCodesISO2A": [
|
||||||
|
"EN"
|
||||||
|
],
|
||||||
|
"fileSizeBytes": "52428800",
|
||||||
|
"sellerUrl": "https://example.com",
|
||||||
|
"formattedPrice": "Free",
|
||||||
|
"trackId": 6400000101,
|
||||||
|
"trackName": "Example Notes",
|
||||||
|
"genreIds": [
|
||||||
|
"6007"
|
||||||
|
],
|
||||||
|
"genres": [
|
||||||
|
"Productivity"
|
||||||
|
],
|
||||||
|
"primaryGenreName": "Productivity",
|
||||||
|
"primaryGenreId": 6007,
|
||||||
|
"releaseDate": "2025-01-02T08:00:00Z",
|
||||||
|
"currentVersionReleaseDate": "2026-10-01T08:00:00Z",
|
||||||
|
"sellerName": "Example",
|
||||||
|
"bundleId": "com.example.notes",
|
||||||
|
"artistId": 1000000003,
|
||||||
|
"artistName": "Example",
|
||||||
|
"isVppDeviceBasedLicensingEnabled": true,
|
||||||
|
"currency": "USD",
|
||||||
|
"description": "Placeholder description.",
|
||||||
|
"price": 0.0,
|
||||||
|
"releaseNotes": "Bug fixes.",
|
||||||
|
"minimumOsVersion": "16.0",
|
||||||
|
"version": "3.2.1",
|
||||||
|
"wrapperType": "software",
|
||||||
|
"userRatingCount": 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"isGameCenterEnabled": false,
|
||||||
|
"features": [
|
||||||
|
"iosUniversal"
|
||||||
|
],
|
||||||
|
"advisories": [],
|
||||||
|
"supportedDevices": [
|
||||||
|
"iPhone15-iPhone15"
|
||||||
|
],
|
||||||
|
"kind": "software",
|
||||||
|
"artistViewUrl": "https://apps.apple.com/us/developer/id1000000004?uo=4",
|
||||||
|
"artworkUrl60": "https://example.com/art60.png",
|
||||||
|
"artworkUrl100": "https://example.com/art100.png",
|
||||||
|
"artworkUrl512": "https://example.com/art512.png",
|
||||||
|
"screenshotUrls": [],
|
||||||
|
"ipadScreenshotUrls": [],
|
||||||
|
"appletvScreenshotUrls": [],
|
||||||
|
"trackCensoredName": "Cartful: Shared Grocery List",
|
||||||
|
"trackViewUrl": "https://apps.apple.com/us/app/id6400000903?uo=4",
|
||||||
|
"trackContentRating": "4+",
|
||||||
|
"contentAdvisoryRating": "4+",
|
||||||
|
"averageUserRating": 4.6,
|
||||||
|
"averageUserRatingForCurrentVersion": 4.6,
|
||||||
|
"userRatingCountForCurrentVersion": 21000,
|
||||||
|
"languageCodesISO2A": [
|
||||||
|
"EN"
|
||||||
|
],
|
||||||
|
"fileSizeBytes": "52428800",
|
||||||
|
"sellerUrl": "https://example.com",
|
||||||
|
"formattedPrice": "Free",
|
||||||
|
"trackId": 6400000903,
|
||||||
|
"trackName": "Cartful: Shared Grocery List",
|
||||||
|
"genreIds": [
|
||||||
|
"6007"
|
||||||
|
],
|
||||||
|
"genres": [
|
||||||
|
"Productivity"
|
||||||
|
],
|
||||||
|
"primaryGenreName": "Productivity",
|
||||||
|
"primaryGenreId": 6007,
|
||||||
|
"releaseDate": "2012-07-21T07:00:00Z",
|
||||||
|
"currentVersionReleaseDate": "2026-05-28T07:00:00Z",
|
||||||
|
"sellerName": "Example Studio C",
|
||||||
|
"bundleId": "com.example.cartful",
|
||||||
|
"artistId": 1000000004,
|
||||||
|
"artistName": "Example Studio C",
|
||||||
|
"isVppDeviceBasedLicensingEnabled": true,
|
||||||
|
"currency": "USD",
|
||||||
|
"description": "Placeholder description.",
|
||||||
|
"price": 0.0,
|
||||||
|
"releaseNotes": "Bug fixes.",
|
||||||
|
"minimumOsVersion": "16.0",
|
||||||
|
"version": "3.2.1",
|
||||||
|
"wrapperType": "software",
|
||||||
|
"userRatingCount": 21000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"isGameCenterEnabled": false,
|
||||||
|
"features": [
|
||||||
|
"iosUniversal"
|
||||||
|
],
|
||||||
|
"advisories": [],
|
||||||
|
"supportedDevices": [
|
||||||
|
"iPhone15-iPhone15"
|
||||||
|
],
|
||||||
|
"kind": "software",
|
||||||
|
"artistViewUrl": "https://apps.apple.com/us/developer/id1000000005?uo=4",
|
||||||
|
"artworkUrl60": "https://example.com/art60.png",
|
||||||
|
"artworkUrl100": "https://example.com/art100.png",
|
||||||
|
"artworkUrl512": "https://example.com/art512.png",
|
||||||
|
"screenshotUrls": [],
|
||||||
|
"ipadScreenshotUrls": [],
|
||||||
|
"appletvScreenshotUrls": [],
|
||||||
|
"trackCensoredName": "Cartful Recipes",
|
||||||
|
"trackViewUrl": "https://apps.apple.com/us/app/id6400000904?uo=4",
|
||||||
|
"trackContentRating": "4+",
|
||||||
|
"contentAdvisoryRating": "4+",
|
||||||
|
"averageUserRating": 4.6,
|
||||||
|
"averageUserRatingForCurrentVersion": 4.6,
|
||||||
|
"userRatingCountForCurrentVersion": 900,
|
||||||
|
"languageCodesISO2A": [
|
||||||
|
"EN"
|
||||||
|
],
|
||||||
|
"fileSizeBytes": "52428800",
|
||||||
|
"sellerUrl": "https://example.com",
|
||||||
|
"formattedPrice": "Free",
|
||||||
|
"trackId": 6400000904,
|
||||||
|
"trackName": "Cartful Recipes",
|
||||||
|
"genreIds": [
|
||||||
|
"6023"
|
||||||
|
],
|
||||||
|
"genres": [
|
||||||
|
"Food & Drink"
|
||||||
|
],
|
||||||
|
"primaryGenreName": "Food & Drink",
|
||||||
|
"primaryGenreId": 6023,
|
||||||
|
"releaseDate": "2018-03-03T07:00:00Z",
|
||||||
|
"currentVersionReleaseDate": "2026-02-01T07:00:00Z",
|
||||||
|
"sellerName": "Example Studio C",
|
||||||
|
"bundleId": "com.example.cartful.recipes",
|
||||||
|
"artistId": 1000000005,
|
||||||
|
"artistName": "Example Studio C",
|
||||||
|
"isVppDeviceBasedLicensingEnabled": true,
|
||||||
|
"currency": "USD",
|
||||||
|
"description": "Placeholder description.",
|
||||||
|
"price": 0.0,
|
||||||
|
"releaseNotes": "Bug fixes.",
|
||||||
|
"minimumOsVersion": "16.0",
|
||||||
|
"version": "3.2.1",
|
||||||
|
"wrapperType": "software",
|
||||||
|
"userRatingCount": 900
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"isGameCenterEnabled": false,
|
||||||
|
"features": [
|
||||||
|
"iosUniversal"
|
||||||
|
],
|
||||||
|
"advisories": [],
|
||||||
|
"supportedDevices": [
|
||||||
|
"iPhone15-iPhone15"
|
||||||
|
],
|
||||||
|
"kind": "software",
|
||||||
|
"artistViewUrl": "https://apps.apple.com/us/developer/id1000000006?uo=4",
|
||||||
|
"artworkUrl60": "https://example.com/art60.png",
|
||||||
|
"artworkUrl100": "https://example.com/art100.png",
|
||||||
|
"artworkUrl512": "https://example.com/art512.png",
|
||||||
|
"screenshotUrls": [],
|
||||||
|
"ipadScreenshotUrls": [],
|
||||||
|
"appletvScreenshotUrls": [],
|
||||||
|
"trackCensoredName": "Packing Planner: Travel Lists",
|
||||||
|
"trackViewUrl": "https://apps.apple.com/us/app/id6400000905?uo=4",
|
||||||
|
"trackContentRating": "4+",
|
||||||
|
"contentAdvisoryRating": "4+",
|
||||||
|
"averageUserRating": 4.6,
|
||||||
|
"averageUserRatingForCurrentVersion": 4.6,
|
||||||
|
"userRatingCountForCurrentVersion": 1200,
|
||||||
|
"languageCodesISO2A": [
|
||||||
|
"EN"
|
||||||
|
],
|
||||||
|
"fileSizeBytes": "52428800",
|
||||||
|
"sellerUrl": "https://example.com",
|
||||||
|
"formattedPrice": "Free",
|
||||||
|
"trackId": 6400000905,
|
||||||
|
"trackName": "Packing Planner: Travel Lists",
|
||||||
|
"genreIds": [
|
||||||
|
"6003"
|
||||||
|
],
|
||||||
|
"genres": [
|
||||||
|
"Travel"
|
||||||
|
],
|
||||||
|
"primaryGenreName": "Travel",
|
||||||
|
"primaryGenreId": 6003,
|
||||||
|
"releaseDate": "2016-06-09T07:00:00Z",
|
||||||
|
"currentVersionReleaseDate": "2026-08-29T07:00:00Z",
|
||||||
|
"sellerName": "Example Studio D",
|
||||||
|
"bundleId": "com.example.packing",
|
||||||
|
"artistId": 1000000006,
|
||||||
|
"artistName": "Example Studio D",
|
||||||
|
"isVppDeviceBasedLicensingEnabled": true,
|
||||||
|
"currency": "USD",
|
||||||
|
"description": "Placeholder description.",
|
||||||
|
"price": 0.0,
|
||||||
|
"releaseNotes": "Bug fixes.",
|
||||||
|
"minimumOsVersion": "16.0",
|
||||||
|
"version": "3.2.1",
|
||||||
|
"wrapperType": "software",
|
||||||
|
"userRatingCount": 1200
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue