@mpgd/cli 0.20.1 → 0.21.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.
|
@@ -9,10 +9,14 @@ export interface ProductionTargetReadinessInput {
|
|
|
9
9
|
export interface ProductionTargetPolicy {
|
|
10
10
|
readonly runtime: string;
|
|
11
11
|
readonly features: {
|
|
12
|
+
readonly iap: boolean;
|
|
12
13
|
readonly rewardedAds: boolean;
|
|
14
|
+
readonly interstitialAds: boolean;
|
|
13
15
|
};
|
|
14
16
|
readonly monetization: {
|
|
17
|
+
readonly iap: boolean;
|
|
15
18
|
readonly rewardedAds: boolean;
|
|
19
|
+
readonly interstitialAds: boolean;
|
|
16
20
|
};
|
|
17
21
|
}
|
|
18
22
|
export declare function assertProductionTargetReadiness(input: ProductionTargetReadinessInput): void;
|
|
@@ -22,7 +22,16 @@ export function assertProductionTargetReadiness(input) {
|
|
|
22
22
|
const requiresVerse8RewardAuthority = input.targetPolicy?.runtime === 'verse8-web'
|
|
23
23
|
&& (input.targetPolicy.features.rewardedAds
|
|
24
24
|
|| input.targetPolicy.monetization.rewardedAds);
|
|
25
|
-
|
|
25
|
+
const requiresWebMonetizationAuthority = input.targetPolicy?.runtime === 'web'
|
|
26
|
+
&& (input.targetPolicy.features.iap
|
|
27
|
+
|| input.targetPolicy.features.rewardedAds
|
|
28
|
+
|| input.targetPolicy.features.interstitialAds
|
|
29
|
+
|| input.targetPolicy.monetization.iap
|
|
30
|
+
|| input.targetPolicy.monetization.rewardedAds
|
|
31
|
+
|| input.targetPolicy.monetization.interstitialAds);
|
|
32
|
+
const requiresMonetizationAuthority = requiresVerse8RewardAuthority
|
|
33
|
+
|| requiresWebMonetizationAuthority;
|
|
34
|
+
if (ownerPathKey === undefined && !requiresMonetizationAuthority) {
|
|
26
35
|
return;
|
|
27
36
|
}
|
|
28
37
|
const targetConfig = readTargets(input.targetsFile)[input.target];
|
|
@@ -30,12 +39,12 @@ export function assertProductionTargetReadiness(input) {
|
|
|
30
39
|
throw new Error(`Missing target configuration for ${input.target}.`);
|
|
31
40
|
}
|
|
32
41
|
if (ownerPathKey === undefined) {
|
|
33
|
-
if (
|
|
42
|
+
if (requiresMonetizationAuthority
|
|
34
43
|
&& targetConfig.authoritativeGameServices === false) {
|
|
35
|
-
throw new Error(`Production target ${input.target} cannot enable
|
|
44
|
+
throw new Error(`Production target ${input.target} cannot enable monetization without `
|
|
36
45
|
+ 'authoritative game services.');
|
|
37
46
|
}
|
|
38
|
-
if (
|
|
47
|
+
if (requiresMonetizationAuthority || targetConfig.authoritativeGameServices !== false) {
|
|
39
48
|
assertAuthoritativeGameServicesUrl(input.gameServicesUrl, input.target);
|
|
40
49
|
}
|
|
41
50
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpgd/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "Gunshi CLI for mpgd-kit starter generation and target workflow orchestration.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
"ttsc": "0.18.4",
|
|
52
52
|
"typescript": "7.0.2",
|
|
53
53
|
"@mpgd/adapter-ait": "0.8.0",
|
|
54
|
+
"@mpgd/adapter-browser": "0.5.1",
|
|
54
55
|
"@mpgd/adapter-capacitor": "0.4.5",
|
|
55
56
|
"@mpgd/adapter-devvit": "0.8.6",
|
|
56
57
|
"@mpgd/adapter-verse8": "0.2.3",
|
|
57
58
|
"@mpgd/analytics": "0.3.8",
|
|
58
|
-
"@mpgd/adapter-browser": "0.5.1",
|
|
59
59
|
"@mpgd/bridge": "0.7.0",
|
|
60
|
-
"@mpgd/catalog": "0.5.2",
|
|
61
60
|
"@mpgd/game-services": "0.11.1",
|
|
62
61
|
"@mpgd/i18n": "0.5.4",
|
|
62
|
+
"@mpgd/catalog": "0.5.2",
|
|
63
63
|
"@mpgd/phaser-assets": "0.4.1",
|
|
64
64
|
"@mpgd/platform": "0.8.0",
|
|
65
|
-
"@mpgd/target-config": "0.
|
|
65
|
+
"@mpgd/target-config": "0.11.0"
|
|
66
66
|
},
|
|
67
67
|
"main": "./dist/index.js",
|
|
68
68
|
"types": "./dist/index.d.ts",
|
|
@@ -73,6 +73,10 @@ set the authority flag to `true`, add app-owned product or ad IDs, and configure
|
|
|
73
73
|
`VITE_MPGD_GAME_SERVICES_URL` to a public HTTPS verifier without embedded
|
|
74
74
|
credentials.
|
|
75
75
|
|
|
76
|
+
The same verifier URL is required when a deployed custom `web` runtime enables
|
|
77
|
+
IAP or ads. This production gate prevents client-only grants even when the
|
|
78
|
+
browser adapter itself is game-owned.
|
|
79
|
+
|
|
76
80
|
The Capacitor entries still intentionally point at kit reference shells, so
|
|
77
81
|
their reusable validation builds use the `staging` profile. Before an Android
|
|
78
82
|
or iOS production build, copy or create the shell under this game directory and
|
|
@@ -12,6 +12,7 @@ import type {
|
|
|
12
12
|
export type { TargetConfigMatrix } from '@mpgd/target-config';
|
|
13
13
|
|
|
14
14
|
const runtimeKinds = valueSet({
|
|
15
|
+
web: true,
|
|
15
16
|
'web-preview': true,
|
|
16
17
|
'microsoft-store-pwa': true,
|
|
17
18
|
'capacitor-android': true,
|
|
@@ -21,6 +22,7 @@ const runtimeKinds = valueSet({
|
|
|
21
22
|
'verse8-web': true,
|
|
22
23
|
} satisfies Record<TargetRuntimeKind, true>);
|
|
23
24
|
const releaseProfiles = valueSet({
|
|
25
|
+
web: true,
|
|
24
26
|
'web-preview': true,
|
|
25
27
|
'microsoft-store': true,
|
|
26
28
|
'google-play': true,
|