Full IAP catalog: non-renewing products, per-platform availability, catalog diff (cross-store parity report)
This commit is contained in:
parent
346ae8cb56
commit
222a1df9e2
4 changed files with 261 additions and 4 deletions
|
|
@ -4,7 +4,9 @@
|
|||
// Per product: convertRegionPrices (USD base -> every region at local price points, plus regionsVersion), your
|
||||
// explicit overrides on top, PATCH ...?allowMissing=true (create or update), then activate the purchase option
|
||||
// (new options start as DRAFT) with purchaseOptions:batchUpdateStates. Idempotent.
|
||||
import { playCodes } from '../lib/config';
|
||||
// Play has no non-renewing type: a `non_renewing` product is a plain one-time product here (your app consumes it
|
||||
// when the access ends). Products with `platforms` that leave out android are skipped.
|
||||
import { playCodes, sellsOn } from '../lib/config';
|
||||
import type { Ctx } from '../lib/ctx';
|
||||
import { need } from '../lib/ctx';
|
||||
import { done, log, step, warn } from '../lib/log';
|
||||
|
|
@ -36,7 +38,7 @@ export async function run(ctx: Ctx): Promise<void> {
|
|||
const { config, root } = ctx.loaded;
|
||||
const pkg = need(config.play?.packageName, 'play.packageName');
|
||||
const only = ctx.args.list('only');
|
||||
const products = need(config.products, 'products').filter(p => !only.length || only.includes(p.id));
|
||||
const products = need(config.products, 'products').filter(p => (!only.length || only.includes(p.id)) && sellsOn(config, p, 'play'));
|
||||
const dry = ctx.args.has('dry');
|
||||
const play = await playClient(root, pkg);
|
||||
const existing = new Map((await listOneTimeProducts(play)).map(p => [p.productId, p]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue