@mpgd/cli 0.61.1 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/app-store-iap-asc.d.ts +23 -0
  2. package/dist/app-store-iap-asc.js +326 -0
  3. package/dist/app-store-iap-port.d.ts +125 -0
  4. package/dist/app-store-iap-port.js +14 -0
  5. package/dist/capacitor-shell-starter.js +18 -1
  6. package/dist/crash-reporting-starter.d.ts +5 -3
  7. package/dist/crash-reporting-starter.js +10 -7
  8. package/dist/crash-symbols-upload.d.ts +67 -0
  9. package/dist/crash-symbols-upload.js +232 -0
  10. package/dist/index.d.ts +4 -0
  11. package/dist/index.js +143 -2
  12. package/dist/native-build-info.json +2 -2
  13. package/dist/native-build-symbols.d.ts +95 -0
  14. package/dist/native-build-symbols.js +261 -0
  15. package/dist/native-build-target.js +1044 -767
  16. package/dist/native-deploy-run.d.ts +2 -0
  17. package/dist/native-deploy-run.js +60 -10
  18. package/dist/native-deploy-submission.d.ts +8 -0
  19. package/dist/native-deploy-submission.js +50 -8
  20. package/dist/play-product-port.d.ts +101 -0
  21. package/dist/play-product-port.js +7 -0
  22. package/dist/play-sdk-adapter.js +67 -0
  23. package/dist/pnpm-build-approvals.d.ts +59 -0
  24. package/dist/pnpm-build-approvals.js +157 -0
  25. package/dist/release-state.d.ts +69 -0
  26. package/dist/release-state.js +150 -5
  27. package/dist/release-workspace.d.ts +3 -0
  28. package/dist/release-workspace.js +44 -1
  29. package/dist/store-products-app-store.d.ts +144 -0
  30. package/dist/store-products-app-store.js +632 -0
  31. package/dist/store-products-command.d.ts +50 -0
  32. package/dist/store-products-command.js +182 -0
  33. package/dist/store-products-play.d.ts +112 -0
  34. package/dist/store-products-play.js +622 -0
  35. package/dist/store-products.d.ts +46 -0
  36. package/dist/store-products.js +124 -0
  37. package/dist/testflight-submission.d.ts +1 -1
  38. package/package.json +11 -11
  39. package/templates/phaser-game/pnpm-workspace.yaml +2 -0
@@ -0,0 +1,144 @@
1
+ import { type ProductCatalog, type StoreListingCatalog } from '@mpgd/catalog';
2
+ import type { AscIapPort, AscIapType } from './app-store-iap-port.js';
3
+ import { type StoreProductAction } from './store-products.js';
4
+ /**
5
+ * App Store Connect in-app purchase sync: compare the game's catalog and
6
+ * store listing file with App Store Connect and plan the writes. The plan
7
+ * only reads; in-app purchases only on App Store Connect are reported, never
8
+ * deleted; localizations and territories the file does not name are kept.
9
+ * Nothing is submitted for review: an in-app purchase's first review goes
10
+ * with an app version (App Store Connect Help, "Submit an In-App Purchase").
11
+ */
12
+ export type AppStoreProductChange = 'create' | 'reference-name' | 'family-sharing' | 'version' | 'localizations' | 'prices' | 'availability' | 'review-screenshot';
13
+ export interface AppStoreLocalizationEntry {
14
+ readonly locale: string;
15
+ readonly name: string;
16
+ readonly description: string;
17
+ }
18
+ export interface AppStoreProductWrite {
19
+ readonly create?: {
20
+ readonly type: AscIapType;
21
+ readonly referenceName: string;
22
+ readonly familySharable: boolean;
23
+ };
24
+ readonly update?: {
25
+ readonly referenceName?: string;
26
+ readonly familySharable?: true;
27
+ };
28
+ /**
29
+ * Localizations to upsert by locale. `existing` writes to `versionId`;
30
+ * `create` makes a new draft version first (App Store Connect copies the
31
+ * current metadata into it); `resolve` (a new in-app purchase) uses the
32
+ * version App Store Connect provisioned, or creates one.
33
+ */
34
+ readonly localizations?: {
35
+ readonly version: 'existing' | 'create' | 'resolve';
36
+ readonly versionId?: string;
37
+ readonly entries: readonly AppStoreLocalizationEntry[];
38
+ };
39
+ /** A new schedule effective now; the base territory's price comes first. */
40
+ readonly prices?: {
41
+ readonly baseTerritory: string;
42
+ /** `pricePointId` is resolved at plan time for an existing in-app purchase. */
43
+ readonly prices: readonly {
44
+ readonly territory: string;
45
+ readonly customerPrice: string;
46
+ readonly pricePointId?: string;
47
+ }[];
48
+ };
49
+ readonly availability?: {
50
+ readonly territories: readonly string[];
51
+ readonly availableInNewTerritories: boolean;
52
+ };
53
+ readonly reviewScreenshot?: {
54
+ /** Absolute path on this checkout. */
55
+ readonly file: string;
56
+ /** Path relative to the listing file, as the file names it. */
57
+ readonly path: string;
58
+ readonly md5: string;
59
+ /** The completed screenshot to delete first (App Store Connect keeps one). */
60
+ readonly replaceId?: string;
61
+ };
62
+ }
63
+ export interface AppStorePriceChange {
64
+ /** Alpha-3 territory, or `base-territory`. */
65
+ readonly territory: string;
66
+ readonly from?: string;
67
+ readonly to?: string;
68
+ }
69
+ export interface PlannedAppStoreProduct {
70
+ readonly logicalId: string;
71
+ readonly productId: string;
72
+ readonly action: StoreProductAction;
73
+ readonly changes: readonly AppStoreProductChange[];
74
+ readonly iapId?: string;
75
+ readonly state?: string;
76
+ /** `APPROVED`: the in-app purchase is on sale wherever the app is. */
77
+ readonly live: boolean;
78
+ readonly livePriceChange: boolean;
79
+ readonly priceChanges: readonly AppStorePriceChange[];
80
+ readonly notes: readonly string[];
81
+ readonly remoteSha256: string | null;
82
+ readonly desiredSha256: string;
83
+ readonly write?: AppStoreProductWrite;
84
+ }
85
+ export interface AppStoreProductPlan {
86
+ readonly schemaVersion: 1;
87
+ readonly store: 'app-store';
88
+ /** Numeric App Store Connect app ID. */
89
+ readonly appId: string;
90
+ readonly bundleId: string;
91
+ readonly catalogTarget: string;
92
+ readonly keepLivePrices: boolean;
93
+ readonly products: readonly PlannedAppStoreProduct[];
94
+ readonly skipped: readonly {
95
+ readonly logicalId: string;
96
+ readonly productId?: string;
97
+ readonly reason: string;
98
+ }[];
99
+ /** Product IDs on App Store Connect that no catalog product names. Never deleted. */
100
+ readonly remoteOnly: readonly string[];
101
+ /** What the sync cannot do; the reviewer does it in App Store Connect. */
102
+ readonly manual: readonly string[];
103
+ }
104
+ export interface AppStoreProductPlanInput {
105
+ readonly appId: string;
106
+ readonly bundleId: string;
107
+ readonly catalog: ProductCatalog;
108
+ readonly listings: StoreListingCatalog;
109
+ /** Directory of the listing file; review screenshot paths resolve against it. */
110
+ readonly listingsDirectory: string;
111
+ /** Catalog `platformProductIds` key of the App Store; defaults to `ios`. */
112
+ readonly catalogTarget?: string;
113
+ readonly keepLivePrices?: boolean;
114
+ }
115
+ export declare function planAppStoreProducts(input: AppStoreProductPlanInput, port: AscIapPort): Promise<AppStoreProductPlan>;
116
+ export interface AppStoreProductApplyResult {
117
+ readonly appId: string;
118
+ readonly products: readonly {
119
+ readonly productId: string;
120
+ readonly status: 'created' | 'updated' | 'unchanged';
121
+ readonly iapId?: string;
122
+ }[];
123
+ readonly manual: readonly string[];
124
+ }
125
+ export declare class AppStoreProductApplyError extends Error {
126
+ readonly productId: string;
127
+ readonly stage: string;
128
+ readonly done: AppStoreProductApplyResult['products'];
129
+ constructor(productId: string, stage: string, done: AppStoreProductApplyResult['products'], cause: unknown, detail?: string);
130
+ }
131
+ /**
132
+ * Apply a reviewed plan, like the Google Play apply: `current` is a fresh
133
+ * plan, and every product apply would write must still match the reviewed
134
+ * remote state and planned write.
135
+ */
136
+ export declare function applyAppStoreProductPlan(input: {
137
+ readonly saved: AppStoreProductPlan;
138
+ readonly current: AppStoreProductPlan;
139
+ readonly port: AscIapPort;
140
+ readonly approved: boolean;
141
+ readonly confirmPriceChange?: boolean;
142
+ }): Promise<AppStoreProductApplyResult>;
143
+ /** One line per product for the terminal, then the manual steps. */
144
+ export declare function formatAppStoreProductPlan(plan: AppStoreProductPlan): string;