@mpgd/target-config 0.7.0 → 0.9.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.
- package/dist/effective.d.ts +1 -0
- package/dist/effective.js +52 -20
- package/dist/index.js +80 -44
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +26 -19
- package/dist/viewport.js +1 -0
- package/package.json +4 -4
- package/targets.json +45 -2
package/dist/effective.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type EffectiveAvailabilityReason = FeatureAvailabilityReason | 'missing-p
|
|
|
4
4
|
export interface EffectivePlatformTargetMetadata {
|
|
5
5
|
readonly kind: string;
|
|
6
6
|
readonly adapter: string;
|
|
7
|
+
readonly authoritativeGameServices?: boolean;
|
|
7
8
|
readonly artifact?: string;
|
|
8
9
|
readonly output?: string;
|
|
9
10
|
readonly webDir?: string;
|
package/dist/effective.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { normalizeTargetIntegrationConfig, } from './runtime.js';
|
|
2
2
|
export const defaultLeaderboardId = 'default';
|
|
3
|
+
const disabledAuthoritativeMonetization = {
|
|
4
|
+
iap: false,
|
|
5
|
+
rewardedAds: false,
|
|
6
|
+
interstitialAds: false,
|
|
7
|
+
};
|
|
3
8
|
export function createEffectiveTargetConfig(input) {
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
9
|
+
const config = resolveAuthoritativeGameServicesConfig(input.config, input.platformTarget);
|
|
10
|
+
const products = input.catalog.products.map((product) => createEffectiveProductConfig(input.target, config, product));
|
|
11
|
+
const placements = input.adPlacements.placements.map((placement) => createEffectiveAdPlacementConfig(input.target, config, placement));
|
|
12
|
+
const leaderboardEnabled = config.features.leaderboard;
|
|
7
13
|
const integrations = normalizeTargetIntegrationConfig({
|
|
8
|
-
...
|
|
14
|
+
...config.integrations,
|
|
9
15
|
...input.platformTarget?.integrations,
|
|
10
16
|
});
|
|
11
17
|
return {
|
|
@@ -15,12 +21,12 @@ export function createEffectiveTargetConfig(input) {
|
|
|
15
21
|
adPlacements: input.adPlacements.version,
|
|
16
22
|
}),
|
|
17
23
|
target: input.target,
|
|
18
|
-
runtime:
|
|
19
|
-
release:
|
|
20
|
-
features:
|
|
21
|
-
capabilities:
|
|
24
|
+
runtime: config.runtime,
|
|
25
|
+
release: config.release,
|
|
26
|
+
features: config.features,
|
|
27
|
+
capabilities: config.capabilities,
|
|
22
28
|
integrations,
|
|
23
|
-
policy:
|
|
29
|
+
policy: config.policy,
|
|
24
30
|
sources: {
|
|
25
31
|
targetConfig: input.targetConfigVersion,
|
|
26
32
|
productCatalog: input.catalog.version,
|
|
@@ -33,30 +39,43 @@ export function createEffectiveTargetConfig(input) {
|
|
|
33
39
|
}),
|
|
34
40
|
},
|
|
35
41
|
monetization: {
|
|
36
|
-
iap:
|
|
42
|
+
iap: config.monetization.iap,
|
|
37
43
|
products,
|
|
38
44
|
},
|
|
39
45
|
ads: {
|
|
40
|
-
rewardedAds:
|
|
41
|
-
interstitialAds:
|
|
46
|
+
rewardedAds: config.monetization.rewardedAds,
|
|
47
|
+
interstitialAds: config.monetization.interstitialAds,
|
|
42
48
|
placements,
|
|
43
49
|
},
|
|
44
50
|
leaderboard: {
|
|
45
|
-
native:
|
|
51
|
+
native: config.leaderboard.native,
|
|
46
52
|
enabled: leaderboardEnabled,
|
|
47
53
|
reason: leaderboardEnabled ? 'available' : 'target-disabled',
|
|
48
54
|
...(leaderboardEnabled ? { defaultLeaderboardId } : {}),
|
|
49
55
|
},
|
|
50
56
|
storage: {
|
|
51
|
-
support:
|
|
52
|
-
enabled:
|
|
57
|
+
support: config.capabilities.storage,
|
|
58
|
+
enabled: config.capabilities.storage !== 'none',
|
|
53
59
|
},
|
|
54
60
|
localization: {
|
|
55
|
-
enabled:
|
|
56
|
-
fallbackLocale:
|
|
61
|
+
enabled: config.capabilities.localization,
|
|
62
|
+
fallbackLocale: config.localization.fallbackLocale,
|
|
57
63
|
},
|
|
58
64
|
};
|
|
59
65
|
}
|
|
66
|
+
function resolveAuthoritativeGameServicesConfig(config, platformTarget) {
|
|
67
|
+
if (platformTarget?.authoritativeGameServices !== false) {
|
|
68
|
+
return config;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
...config,
|
|
72
|
+
features: {
|
|
73
|
+
...config.features,
|
|
74
|
+
...disabledAuthoritativeMonetization,
|
|
75
|
+
},
|
|
76
|
+
monetization: disabledAuthoritativeMonetization,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
60
79
|
export function createEffectiveTargetConfigMatrix(input) {
|
|
61
80
|
const targets = Object.fromEntries(Object.entries(input.configMatrix.targets).map(([target, config]) => {
|
|
62
81
|
const platformTarget = input.platformTargets?.[target];
|
|
@@ -89,7 +108,7 @@ export function getEffectiveAdPlacementConfig(config, placementId) {
|
|
|
89
108
|
}
|
|
90
109
|
function createEffectiveProductConfig(target, config, product) {
|
|
91
110
|
const platformProductId = productPlatformId(product, target);
|
|
92
|
-
const reason =
|
|
111
|
+
const reason = effectiveProductReason(target, config.features.iap, product, platformProductId);
|
|
93
112
|
return {
|
|
94
113
|
id: product.id,
|
|
95
114
|
type: product.type,
|
|
@@ -99,6 +118,15 @@ function createEffectiveProductConfig(target, config, product) {
|
|
|
99
118
|
...(platformProductId === undefined ? {} : { platformProductId }),
|
|
100
119
|
};
|
|
101
120
|
}
|
|
121
|
+
function effectiveProductReason(target, targetEnabled, product, platformProductId) {
|
|
122
|
+
if (!targetEnabled) {
|
|
123
|
+
return 'target-disabled';
|
|
124
|
+
}
|
|
125
|
+
if (target === 'verse8' && product.grant.type === 'resource') {
|
|
126
|
+
return 'capability-unsupported';
|
|
127
|
+
}
|
|
128
|
+
return effectiveItemReason(targetEnabled, platformProductId);
|
|
129
|
+
}
|
|
102
130
|
function createEffectiveAdPlacementConfig(target, config, placement) {
|
|
103
131
|
const featureEnabled = isRewardedPlacement(placement)
|
|
104
132
|
? config.features.rewardedAds
|
|
@@ -144,10 +172,14 @@ function normalizePlatformId(platformId) {
|
|
|
144
172
|
return trimmed.length === 0 ? undefined : trimmed;
|
|
145
173
|
}
|
|
146
174
|
function isProductStoreTarget(target) {
|
|
147
|
-
return target === 'android'
|
|
175
|
+
return target === 'android'
|
|
176
|
+
|| target === 'ios'
|
|
177
|
+
|| target === 'ait'
|
|
178
|
+
|| target === 'reddit'
|
|
179
|
+
|| target === 'verse8';
|
|
148
180
|
}
|
|
149
181
|
function isAdStoreTarget(target) {
|
|
150
|
-
return target === 'android' || target === 'ios' || target === 'ait';
|
|
182
|
+
return target === 'android' || target === 'ios' || target === 'ait' || target === 'verse8';
|
|
151
183
|
}
|
|
152
184
|
function isRewardedPlacement(placement) {
|
|
153
185
|
return placement.type === 'rewarded';
|
package/dist/index.js
CHANGED
|
@@ -53,7 +53,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
53
53
|
expected: "string",
|
|
54
54
|
value: input["id"]
|
|
55
55
|
}, _errorFactory);
|
|
56
|
-
const _ae0 = "({ readonly type: \"currency\"; readonly currency: \"coin\" | \"gem\"; readonly amount: number; } | { readonly type: \"entitlement\"; readonly entitlement: string; })";
|
|
56
|
+
const _ae0 = "({ readonly type: \"currency\"; readonly currency: \"coin\" | \"gem\"; readonly amount: number; } | { readonly type: \"entitlement\"; readonly entitlement: string; } | { readonly type: \"resource\"; readonly resource: string & MinLength<1>; readonly amount: number & ExclusiveMinimum<0> & Maximum<1.7976931348623157e+308>; })";
|
|
57
57
|
const _ap6 = (input, _path, _exceptionable = true) => "boolean" === typeof input["enabled"] || _assertGuard_1._assertGuard(_exceptionable, {
|
|
58
58
|
method: "typia.createAssert",
|
|
59
59
|
path: _path + ".enabled",
|
|
@@ -146,7 +146,38 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
146
146
|
expected: "string",
|
|
147
147
|
value: input.entitlement
|
|
148
148
|
}, _errorFactory));
|
|
149
|
-
const _ao13 = (input, _path, _exceptionable = true) =>
|
|
149
|
+
const _ao13 = (input, _path, _exceptionable = true) => ("resource" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
150
|
+
method: "typia.createAssert",
|
|
151
|
+
path: _path + ".type",
|
|
152
|
+
expected: "\"resource\"",
|
|
153
|
+
value: input.type
|
|
154
|
+
}, _errorFactory)) && ("string" === typeof input.resource && (1 <= input.resource.length || _assertGuard_1._assertGuard(_exceptionable, {
|
|
155
|
+
method: "typia.createAssert",
|
|
156
|
+
path: _path + ".resource",
|
|
157
|
+
expected: "string & MinLength<1>",
|
|
158
|
+
value: input.resource
|
|
159
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
160
|
+
method: "typia.createAssert",
|
|
161
|
+
path: _path + ".resource",
|
|
162
|
+
expected: "(string & MinLength<1>)",
|
|
163
|
+
value: input.resource
|
|
164
|
+
}, _errorFactory)) && ("number" === typeof input.amount && (0 < input.amount || _assertGuard_1._assertGuard(_exceptionable, {
|
|
165
|
+
method: "typia.createAssert",
|
|
166
|
+
path: _path + ".amount",
|
|
167
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
168
|
+
value: input.amount
|
|
169
|
+
}, _errorFactory)) && (input.amount <= 1.7976931348623157e+308 || _assertGuard_1._assertGuard(_exceptionable, {
|
|
170
|
+
method: "typia.createAssert",
|
|
171
|
+
path: _path + ".amount",
|
|
172
|
+
expected: "number & Maximum<1.7976931348623157e+308>",
|
|
173
|
+
value: input.amount
|
|
174
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
175
|
+
method: "typia.createAssert",
|
|
176
|
+
path: _path + ".amount",
|
|
177
|
+
expected: "(number & ExclusiveMinimum<0> & Maximum<1.7976931348623157e+308>)",
|
|
178
|
+
value: input.amount
|
|
179
|
+
}, _errorFactory));
|
|
180
|
+
const _ao14 = (input, _path, _exceptionable = true) => _ap2(input, _path, true && _exceptionable) && _ap3(input, _path, true && _exceptionable) && ((Array.isArray(input.placements) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
150
181
|
method: "typia.createAssert",
|
|
151
182
|
path: _path + ".placements",
|
|
152
183
|
expected: "ReadonlyArray<EffectiveAdPlacementConfig>",
|
|
@@ -156,7 +187,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
156
187
|
path: _path + ".placements[" + _index4 + "]",
|
|
157
188
|
expected: "EffectiveAdPlacementConfig",
|
|
158
189
|
value: elem
|
|
159
|
-
}, _errorFactory)) &&
|
|
190
|
+
}, _errorFactory)) && _ao15(elem, _path + ".placements[" + _index4 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
160
191
|
method: "typia.createAssert",
|
|
161
192
|
path: _path + ".placements[" + _index4 + "]",
|
|
162
193
|
expected: "EffectiveAdPlacementConfig",
|
|
@@ -167,7 +198,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
167
198
|
expected: "ReadonlyArray<EffectiveAdPlacementConfig>",
|
|
168
199
|
value: input.placements
|
|
169
200
|
}, _errorFactory));
|
|
170
|
-
const
|
|
201
|
+
const _ao15 = (input, _path, _exceptionable = true) => _ap5(input, _path, true && _exceptionable) && ("interstitial" === input.type || "rewarded" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
171
202
|
method: "typia.createAssert",
|
|
172
203
|
path: _path + ".type",
|
|
173
204
|
expected: "(\"interstitial\" | \"rewarded\")",
|
|
@@ -187,7 +218,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
187
218
|
path: _path + ".frequencyCap",
|
|
188
219
|
expected: "FrequencyCap",
|
|
189
220
|
value: input.frequencyCap
|
|
190
|
-
}, _errorFactory)) &&
|
|
221
|
+
}, _errorFactory)) && _ao18(input.frequencyCap, _path + ".frequencyCap", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
191
222
|
method: "typia.createAssert",
|
|
192
223
|
path: _path + ".frequencyCap",
|
|
193
224
|
expected: "FrequencyCap",
|
|
@@ -198,14 +229,14 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
198
229
|
expected: "(string | undefined)",
|
|
199
230
|
value: input.platformPlacementId
|
|
200
231
|
}, _errorFactory));
|
|
201
|
-
const
|
|
232
|
+
const _ao16 = (input, _path, _exceptionable = true) => ("continue" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
202
233
|
method: "typia.createAssert",
|
|
203
234
|
path: _path + ".type",
|
|
204
235
|
expected: "\"continue\"",
|
|
205
236
|
value: input.type
|
|
206
237
|
}, _errorFactory)) && _ap10(input, _path, true && _exceptionable);
|
|
207
|
-
const
|
|
208
|
-
const
|
|
238
|
+
const _ao17 = (input, _path, _exceptionable = true) => _ap8(input, _path, true && _exceptionable) && _ap10(input, _path, true && _exceptionable) && _ap9(input, _path, true && _exceptionable);
|
|
239
|
+
const _ao18 = (input, _path, _exceptionable = true) => ("number" === typeof input.cooldownSeconds || _assertGuard_1._assertGuard(_exceptionable, {
|
|
209
240
|
method: "typia.createAssert",
|
|
210
241
|
path: _path + ".cooldownSeconds",
|
|
211
242
|
expected: "number",
|
|
@@ -221,7 +252,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
221
252
|
expected: "(number | undefined)",
|
|
222
253
|
value: input.minStageInterval
|
|
223
254
|
}, _errorFactory));
|
|
224
|
-
const
|
|
255
|
+
const _ao19 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.native || _assertGuard_1._assertGuard(_exceptionable, {
|
|
225
256
|
method: "typia.createAssert",
|
|
226
257
|
path: _path + ".native",
|
|
227
258
|
expected: "boolean",
|
|
@@ -237,21 +268,15 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
237
268
|
expected: "(string | undefined)",
|
|
238
269
|
value: input.defaultLeaderboardId
|
|
239
270
|
}, _errorFactory));
|
|
240
|
-
const _ao19 = (input, _path, _exceptionable = true) => ("local" === input.support || "native" === input.support || "none" === input.support || _assertGuard_1._assertGuard(_exceptionable, {
|
|
241
|
-
method: "typia.createAssert",
|
|
242
|
-
path: _path + ".support",
|
|
243
|
-
expected: "(\"local\" | \"native\" | \"none\")",
|
|
244
|
-
value: input.support
|
|
245
|
-
}, _errorFactory)) && _ap6(input, _path, true && _exceptionable);
|
|
246
271
|
const _ao2 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && ("string" === typeof input.target || _assertGuard_1._assertGuard(_exceptionable, {
|
|
247
272
|
method: "typia.createAssert",
|
|
248
273
|
path: _path + ".target",
|
|
249
274
|
expected: "string",
|
|
250
275
|
value: input.target
|
|
251
|
-
}, _errorFactory)) && ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "web-preview" === input.runtime || _assertGuard_1._assertGuard(_exceptionable, {
|
|
276
|
+
}, _errorFactory)) && ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "verse8-web" === input.runtime || "web-preview" === input.runtime || _assertGuard_1._assertGuard(_exceptionable, {
|
|
252
277
|
method: "typia.createAssert",
|
|
253
278
|
path: _path + ".runtime",
|
|
254
|
-
expected: "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"web-preview\")",
|
|
279
|
+
expected: "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"verse8-web\" | \"web-preview\")",
|
|
255
280
|
value: input.runtime
|
|
256
281
|
}, _errorFactory)) && (("object" === typeof input.release && null !== input.release || _assertGuard_1._assertGuard(_exceptionable, {
|
|
257
282
|
method: "typia.createAssert",
|
|
@@ -328,7 +353,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
328
353
|
path: _path + ".ads",
|
|
329
354
|
expected: "EffectiveAdsConfig",
|
|
330
355
|
value: input.ads
|
|
331
|
-
}, _errorFactory)) &&
|
|
356
|
+
}, _errorFactory)) && _ao14(input.ads, _path + ".ads", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
332
357
|
method: "typia.createAssert",
|
|
333
358
|
path: _path + ".ads",
|
|
334
359
|
expected: "EffectiveAdsConfig",
|
|
@@ -338,7 +363,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
338
363
|
path: _path + ".leaderboard",
|
|
339
364
|
expected: "EffectiveLeaderboardConfig",
|
|
340
365
|
value: input.leaderboard
|
|
341
|
-
}, _errorFactory)) &&
|
|
366
|
+
}, _errorFactory)) && _ao19(input.leaderboard, _path + ".leaderboard", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
342
367
|
method: "typia.createAssert",
|
|
343
368
|
path: _path + ".leaderboard",
|
|
344
369
|
expected: "EffectiveLeaderboardConfig",
|
|
@@ -348,7 +373,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
348
373
|
path: _path + ".storage",
|
|
349
374
|
expected: "EffectiveStorageConfig",
|
|
350
375
|
value: input.storage
|
|
351
|
-
}, _errorFactory)) &&
|
|
376
|
+
}, _errorFactory)) && _ao20(input.storage, _path + ".storage", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
352
377
|
method: "typia.createAssert",
|
|
353
378
|
path: _path + ".storage",
|
|
354
379
|
expected: "EffectiveStorageConfig",
|
|
@@ -358,22 +383,28 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
358
383
|
path: _path + ".localization",
|
|
359
384
|
expected: "EffectiveLocalizationConfig",
|
|
360
385
|
value: input.localization
|
|
361
|
-
}, _errorFactory)) &&
|
|
386
|
+
}, _errorFactory)) && _ao21(input.localization, _path + ".localization", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
362
387
|
method: "typia.createAssert",
|
|
363
388
|
path: _path + ".localization",
|
|
364
389
|
expected: "EffectiveLocalizationConfig",
|
|
365
390
|
value: input.localization
|
|
366
391
|
}, _errorFactory));
|
|
367
|
-
const _ao20 = (input, _path, _exceptionable = true) =>
|
|
392
|
+
const _ao20 = (input, _path, _exceptionable = true) => ("local" === input.support || "native" === input.support || "none" === input.support || _assertGuard_1._assertGuard(_exceptionable, {
|
|
393
|
+
method: "typia.createAssert",
|
|
394
|
+
path: _path + ".support",
|
|
395
|
+
expected: "(\"local\" | \"native\" | \"none\")",
|
|
396
|
+
value: input.support
|
|
397
|
+
}, _errorFactory)) && _ap6(input, _path, true && _exceptionable);
|
|
398
|
+
const _ao21 = (input, _path, _exceptionable = true) => _ap6(input, _path, true && _exceptionable) && ("en" === input.fallbackLocale || "ko" === input.fallbackLocale || _assertGuard_1._assertGuard(_exceptionable, {
|
|
368
399
|
method: "typia.createAssert",
|
|
369
400
|
path: _path + ".fallbackLocale",
|
|
370
401
|
expected: "(\"en\" | \"ko\")",
|
|
371
402
|
value: input.fallbackLocale
|
|
372
403
|
}, _errorFactory));
|
|
373
|
-
const _ao3 = (input, _path, _exceptionable = true) => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "microsoft-store" === input.profile || "web-preview" === input.profile || _assertGuard_1._assertGuard(_exceptionable, {
|
|
404
|
+
const _ao3 = (input, _path, _exceptionable = true) => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "microsoft-store" === input.profile || "verse8" === input.profile || "web-preview" === input.profile || _assertGuard_1._assertGuard(_exceptionable, {
|
|
374
405
|
method: "typia.createAssert",
|
|
375
406
|
path: _path + ".profile",
|
|
376
|
-
expected: "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"web-preview\")",
|
|
407
|
+
expected: "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"verse8\" | \"web-preview\")",
|
|
377
408
|
value: input.profile
|
|
378
409
|
}, _errorFactory);
|
|
379
410
|
const _ao4 = (input, _path, _exceptionable = true) => _ap1(input, _path, true && _exceptionable) && _ap2(input, _path, true && _exceptionable) && _ap3(input, _path, true && _exceptionable) && ("boolean" === typeof input.leaderboard || _assertGuard_1._assertGuard(_exceptionable, {
|
|
@@ -497,6 +528,8 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
497
528
|
return _ao11(input, _path, true && _exceptionable);
|
|
498
529
|
else if ("entitlement" === input.type)
|
|
499
530
|
return _ao12(input, _path, true && _exceptionable);
|
|
531
|
+
else if ("resource" === input.type)
|
|
532
|
+
return _ao13(input, _path, true && _exceptionable);
|
|
500
533
|
else
|
|
501
534
|
return _assertGuard_1._assertGuard(_exceptionable, {
|
|
502
535
|
method: "typia.createAssert",
|
|
@@ -507,9 +540,9 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
507
540
|
})();
|
|
508
541
|
const _au1 = (input, _path, _exceptionable = true) => (() => {
|
|
509
542
|
if ("continue" === input.type)
|
|
510
|
-
return _ao15(input, _path, true && _exceptionable);
|
|
511
|
-
else if ("currency" === input.type)
|
|
512
543
|
return _ao16(input, _path, true && _exceptionable);
|
|
544
|
+
else if ("currency" === input.type)
|
|
545
|
+
return _ao17(input, _path, true && _exceptionable);
|
|
513
546
|
else
|
|
514
547
|
return _assertGuard_1._assertGuard(_exceptionable, {
|
|
515
548
|
method: "typia.createAssert",
|
|
@@ -528,16 +561,17 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
528
561
|
const _io10 = input => _ip5(input) && ("consumable" === input.type || "non_consumable" === input.type || "subscription" === input.type) && ("object" === typeof input.grant && null !== input.grant && _iu0(input.grant)) && _ip6(input) && _ip7(input) && (undefined === input.platformProductId || "string" === typeof input.platformProductId);
|
|
529
562
|
const _io11 = input => _ip8(input) && _ip9(input) && _ip10(input);
|
|
530
563
|
const _io12 = input => "entitlement" === input.type && "string" === typeof input.entitlement;
|
|
531
|
-
const _io13 = input =>
|
|
532
|
-
const _io14 = input =>
|
|
533
|
-
const _io15 = input => "
|
|
534
|
-
const _io16 = input =>
|
|
535
|
-
const _io17 = input =>
|
|
536
|
-
const _io18 = input => "
|
|
537
|
-
const _io19 = input => ("
|
|
538
|
-
const _io2 = input => _ip0(input) && "string" === typeof input.target && ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "web-preview" === input.runtime) && ("object" === typeof input.release && null !== input.release && _io3(input.release)) && ("object" === typeof input.features && null !== input.features && _io4(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io5(input.capabilities)) && ("object" === typeof input.integrations && null !== input.integrations && _io6(input.integrations)) && ("object" === typeof input.policy && null !== input.policy && _io7(input.policy)) && ("object" === typeof input.sources && null !== input.sources && _io8(input.sources)) && ("object" === typeof input.monetization && null !== input.monetization && _io9(input.monetization)) && ("object" === typeof input.ads && null !== input.ads &&
|
|
539
|
-
const _io20 = input =>
|
|
540
|
-
const
|
|
564
|
+
const _io13 = input => "resource" === input.type && ("string" === typeof input.resource && 1 <= input.resource.length) && ("number" === typeof input.amount && (0 < input.amount && input.amount <= 1.7976931348623157e+308));
|
|
565
|
+
const _io14 = input => _ip2(input) && _ip3(input) && (Array.isArray(input.placements) && input.placements.every(elem => "object" === typeof elem && null !== elem && _io15(elem)));
|
|
566
|
+
const _io15 = input => _ip5(input) && ("interstitial" === input.type || "rewarded" === input.type) && (undefined === input.reward || "object" === typeof input.reward && null !== input.reward && _iu1(input.reward)) && ("object" === typeof input.frequencyCap && null !== input.frequencyCap && _io18(input.frequencyCap)) && _ip6(input) && _ip7(input) && (undefined === input.platformPlacementId || "string" === typeof input.platformPlacementId);
|
|
567
|
+
const _io16 = input => "continue" === input.type && _ip10(input);
|
|
568
|
+
const _io17 = input => _ip8(input) && _ip10(input) && _ip9(input);
|
|
569
|
+
const _io18 = input => "number" === typeof input.cooldownSeconds && (undefined === input.maxPerSession || "number" === typeof input.maxPerSession) && (undefined === input.minStageInterval || "number" === typeof input.minStageInterval);
|
|
570
|
+
const _io19 = input => "boolean" === typeof input.native && _ip6(input) && ("available" === input.reason || "capability-unsupported" === input.reason || "target-disabled" === input.reason) && (undefined === input.defaultLeaderboardId || "string" === typeof input.defaultLeaderboardId);
|
|
571
|
+
const _io2 = input => _ip0(input) && "string" === typeof input.target && ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "verse8-web" === input.runtime || "web-preview" === input.runtime) && ("object" === typeof input.release && null !== input.release && _io3(input.release)) && ("object" === typeof input.features && null !== input.features && _io4(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io5(input.capabilities)) && ("object" === typeof input.integrations && null !== input.integrations && _io6(input.integrations)) && ("object" === typeof input.policy && null !== input.policy && _io7(input.policy)) && ("object" === typeof input.sources && null !== input.sources && _io8(input.sources)) && ("object" === typeof input.monetization && null !== input.monetization && _io9(input.monetization)) && ("object" === typeof input.ads && null !== input.ads && _io14(input.ads)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io19(input.leaderboard)) && ("object" === typeof input.storage && null !== input.storage && _io20(input.storage)) && ("object" === typeof input.localization && null !== input.localization && _io21(input.localization));
|
|
572
|
+
const _io20 = input => ("local" === input.support || "native" === input.support || "none" === input.support) && _ip6(input);
|
|
573
|
+
const _io21 = input => _ip6(input) && ("en" === input.fallbackLocale || "ko" === input.fallbackLocale);
|
|
574
|
+
const _io3 = input => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "microsoft-store" === input.profile || "verse8" === input.profile || "web-preview" === input.profile;
|
|
541
575
|
const _io4 = input => _ip1(input) && _ip2(input) && _ip3(input) && "boolean" === typeof input.leaderboard && _ip4(input);
|
|
542
576
|
const _io5 = input => ("local" === input.storage || "native" === input.storage || "none" === input.storage) && _ip4(input);
|
|
543
577
|
const _io6 = input => ("approval-required" === input.identityUpgrade || "available" === input.identityUpgrade || "configuration-required" === input.identityUpgrade || "disabled" === input.identityUpgrade || "unsupported" === input.identityUpgrade) && ("approval-required" === input.presentation || "available" === input.presentation || "configuration-required" === input.presentation || "disabled" === input.presentation || "unsupported" === input.presentation) && ("approval-required" === input.sharing || "available" === input.sharing || "configuration-required" === input.sharing || "disabled" === input.sharing || "unsupported" === input.sharing) && ("approval-required" === input.inboundShare || "available" === input.inboundShare || "configuration-required" === input.inboundShare || "disabled" === input.inboundShare || "unsupported" === input.inboundShare) && ("approval-required" === input.notifications || "available" === input.notifications || "configuration-required" === input.notifications || "disabled" === input.notifications || "unsupported" === input.notifications) && ("fullscreen" === input.presentationMode || "inline-expanded" === input.presentationMode);
|
|
@@ -549,14 +583,16 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
549
583
|
return _io11(input);
|
|
550
584
|
else if ("entitlement" === input.type)
|
|
551
585
|
return _io12(input);
|
|
586
|
+
else if ("resource" === input.type)
|
|
587
|
+
return _io13(input);
|
|
552
588
|
else
|
|
553
589
|
return false;
|
|
554
590
|
})();
|
|
555
591
|
const _iu1 = input => (() => {
|
|
556
592
|
if ("continue" === input.type)
|
|
557
|
-
return _io15(input);
|
|
558
|
-
else if ("currency" === input.type)
|
|
559
593
|
return _io16(input);
|
|
594
|
+
else if ("currency" === input.type)
|
|
595
|
+
return _io17(input);
|
|
560
596
|
else
|
|
561
597
|
return false;
|
|
562
598
|
})();
|
|
@@ -672,10 +708,10 @@ export const assertTargetConfigMatrix = (() => {
|
|
|
672
708
|
expected: "(\"fullscreen\" | \"inline-expanded\")",
|
|
673
709
|
value: input.presentationMode
|
|
674
710
|
}, _errorFactory));
|
|
675
|
-
const _ao2 = (input, _path, _exceptionable = true) => ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "web-preview" === input.runtime || _assertGuard_1._assertGuard(_exceptionable, {
|
|
711
|
+
const _ao2 = (input, _path, _exceptionable = true) => ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "verse8-web" === input.runtime || "web-preview" === input.runtime || _assertGuard_1._assertGuard(_exceptionable, {
|
|
676
712
|
method: "typia.createAssert",
|
|
677
713
|
path: _path + ".runtime",
|
|
678
|
-
expected: "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"web-preview\")",
|
|
714
|
+
expected: "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"verse8-web\" | \"web-preview\")",
|
|
679
715
|
value: input.runtime
|
|
680
716
|
}, _errorFactory)) && (("object" === typeof input.features && null !== input.features || _assertGuard_1._assertGuard(_exceptionable, {
|
|
681
717
|
method: "typia.createAssert",
|
|
@@ -783,10 +819,10 @@ export const assertTargetConfigMatrix = (() => {
|
|
|
783
819
|
expected: "boolean",
|
|
784
820
|
value: input.native
|
|
785
821
|
}, _errorFactory);
|
|
786
|
-
const _ao8 = (input, _path, _exceptionable = true) => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "microsoft-store" === input.profile || "web-preview" === input.profile || _assertGuard_1._assertGuard(_exceptionable, {
|
|
822
|
+
const _ao8 = (input, _path, _exceptionable = true) => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "microsoft-store" === input.profile || "verse8" === input.profile || "web-preview" === input.profile || _assertGuard_1._assertGuard(_exceptionable, {
|
|
787
823
|
method: "typia.createAssert",
|
|
788
824
|
path: _path + ".profile",
|
|
789
|
-
expected: "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"web-preview\")",
|
|
825
|
+
expected: "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"verse8\" | \"web-preview\")",
|
|
790
826
|
value: input.profile
|
|
791
827
|
}, _errorFactory);
|
|
792
828
|
const _ao9 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.externalPaymentAllowed || _assertGuard_1._assertGuard(_exceptionable, {
|
|
@@ -823,13 +859,13 @@ export const assertTargetConfigMatrix = (() => {
|
|
|
823
859
|
return "object" === typeof value && null !== value && _io2(value);
|
|
824
860
|
});
|
|
825
861
|
const _io10 = input => ("approval-required" === input.identityUpgrade || "available" === input.identityUpgrade || "configuration-required" === input.identityUpgrade || "disabled" === input.identityUpgrade || "unsupported" === input.identityUpgrade) && ("approval-required" === input.presentation || "available" === input.presentation || "configuration-required" === input.presentation || "disabled" === input.presentation || "unsupported" === input.presentation) && ("approval-required" === input.sharing || "available" === input.sharing || "configuration-required" === input.sharing || "disabled" === input.sharing || "unsupported" === input.sharing) && ("approval-required" === input.inboundShare || "available" === input.inboundShare || "configuration-required" === input.inboundShare || "disabled" === input.inboundShare || "unsupported" === input.inboundShare) && ("approval-required" === input.notifications || "available" === input.notifications || "configuration-required" === input.notifications || "disabled" === input.notifications || "unsupported" === input.notifications) && ("fullscreen" === input.presentationMode || "inline-expanded" === input.presentationMode);
|
|
826
|
-
const _io2 = input => ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "web-preview" === input.runtime) && ("object" === typeof input.features && null !== input.features && _io3(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io4(input.capabilities)) && ("object" === typeof input.localization && null !== input.localization && _io5(input.localization)) && ("object" === typeof input.monetization && null !== input.monetization && _io6(input.monetization)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io7(input.leaderboard)) && ("object" === typeof input.release && null !== input.release && _io8(input.release)) && ("object" === typeof input.policy && null !== input.policy && _io9(input.policy)) && (undefined === input.integrations || "object" === typeof input.integrations && null !== input.integrations && _io10(input.integrations));
|
|
862
|
+
const _io2 = input => ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "microsoft-store-pwa" === input.runtime || "verse8-web" === input.runtime || "web-preview" === input.runtime) && ("object" === typeof input.features && null !== input.features && _io3(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io4(input.capabilities)) && ("object" === typeof input.localization && null !== input.localization && _io5(input.localization)) && ("object" === typeof input.monetization && null !== input.monetization && _io6(input.monetization)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io7(input.leaderboard)) && ("object" === typeof input.release && null !== input.release && _io8(input.release)) && ("object" === typeof input.policy && null !== input.policy && _io9(input.policy)) && (undefined === input.integrations || "object" === typeof input.integrations && null !== input.integrations && _io10(input.integrations));
|
|
827
863
|
const _io3 = input => _ip0(input) && _ip1(input) && _ip2(input) && "boolean" === typeof input.leaderboard && _ip3(input);
|
|
828
864
|
const _io4 = input => ("local" === input.storage || "native" === input.storage || "none" === input.storage) && _ip3(input);
|
|
829
865
|
const _io5 = input => "en" === input.fallbackLocale || "ko" === input.fallbackLocale;
|
|
830
866
|
const _io6 = input => _ip0(input) && _ip1(input) && _ip2(input);
|
|
831
867
|
const _io7 = input => "boolean" === typeof input.native;
|
|
832
|
-
const _io8 = input => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "microsoft-store" === input.profile || "web-preview" === input.profile;
|
|
868
|
+
const _io8 = input => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "microsoft-store" === input.profile || "verse8" === input.profile || "web-preview" === input.profile;
|
|
833
869
|
const _io9 = input => "boolean" === typeof input.externalPaymentAllowed && "boolean" === typeof input.remoteExecutableCodeAllowed && "boolean" === typeof input.installOtherAppCTAAllowed && "boolean" === typeof input.requiresStoreReview && "boolean" === typeof input.requiresAitReview;
|
|
834
870
|
const __is = input => "object" === typeof input && null !== input && _io0(input);
|
|
835
871
|
let _errorFactory;
|
package/dist/runtime.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import type { EffectiveTargetConfig } from './effective.js';
|
|
|
4
4
|
export type PlatformFeature = 'iap' | 'rewardedAds' | 'interstitialAds' | 'leaderboard' | 'localization';
|
|
5
5
|
export type AdPlacementType = 'rewarded' | 'interstitial';
|
|
6
6
|
type PlatformConfigTarget = PlatformGateway['target'];
|
|
7
|
-
export type TargetRuntimeKind = 'web-preview' | 'microsoft-store-pwa' | 'capacitor-android' | 'capacitor-ios' | 'apps-in-toss' | 'devvit-web';
|
|
8
|
-
export type ReleaseProfile = 'web-preview' | 'microsoft-store' | 'google-play' | 'app-store' | 'apps-in-toss' | 'devvit';
|
|
7
|
+
export type TargetRuntimeKind = 'web-preview' | 'microsoft-store-pwa' | 'capacitor-android' | 'capacitor-ios' | 'apps-in-toss' | 'devvit-web' | 'verse8-web';
|
|
8
|
+
export type ReleaseProfile = 'web-preview' | 'microsoft-store' | 'google-play' | 'app-store' | 'apps-in-toss' | 'devvit' | 'verse8';
|
|
9
9
|
export type StorageSupport = 'local' | 'native' | 'none';
|
|
10
10
|
export type TargetIntegration = 'identityUpgrade' | 'presentation' | 'sharing' | 'inboundShare' | 'notifications';
|
|
11
11
|
export type IntegrationAvailabilityState = 'available' | 'disabled' | 'approval-required' | 'configuration-required' | 'unsupported';
|
package/dist/runtime.js
CHANGED
|
@@ -95,12 +95,13 @@ export function getIntegrationAvailability(integration, config, gateway) {
|
|
|
95
95
|
}
|
|
96
96
|
export function createTargetRuntimeSnapshot(input) {
|
|
97
97
|
const configTarget = input.configTarget ?? targetConfigKeyForPlatform(input.target);
|
|
98
|
+
const availabilityConfig = resolveAvailabilityConfig(input.config, input.effectiveConfig);
|
|
98
99
|
const features = {
|
|
99
|
-
iap: getFeatureAvailability('iap',
|
|
100
|
-
rewardedAds: getFeatureAvailability('rewardedAds',
|
|
101
|
-
interstitialAds: getFeatureAvailability('interstitialAds',
|
|
102
|
-
leaderboard: getFeatureAvailability('leaderboard',
|
|
103
|
-
localization: getFeatureAvailability('localization',
|
|
100
|
+
iap: getFeatureAvailability('iap', availabilityConfig, input.capabilities),
|
|
101
|
+
rewardedAds: getFeatureAvailability('rewardedAds', availabilityConfig, input.capabilities),
|
|
102
|
+
interstitialAds: getFeatureAvailability('interstitialAds', availabilityConfig, input.capabilities),
|
|
103
|
+
leaderboard: getFeatureAvailability('leaderboard', availabilityConfig, input.capabilities),
|
|
104
|
+
localization: getFeatureAvailability('localization', availabilityConfig, input.capabilities),
|
|
104
105
|
};
|
|
105
106
|
const integrationConfig = normalizeTargetIntegrationConfig(input.effectiveConfig?.integrations ?? input.config.integrations);
|
|
106
107
|
const integrationEntries = targetIntegrations.map((integration) => {
|
|
@@ -130,11 +131,8 @@ export function createTargetRuntimeSnapshot(input) {
|
|
|
130
131
|
};
|
|
131
132
|
}
|
|
132
133
|
export function withTargetAvailability(gateway, config, options = {}) {
|
|
133
|
-
|
|
134
|
-
const getGatewayCapabilities =
|
|
135
|
-
cachedGatewayCapabilities ??= await gateway.getCapabilities();
|
|
136
|
-
return cachedGatewayCapabilities;
|
|
137
|
-
};
|
|
134
|
+
const availabilityConfig = resolveAvailabilityConfig(config, options.effectiveConfig);
|
|
135
|
+
const getGatewayCapabilities = () => (gateway.getCapabilities());
|
|
138
136
|
const configTarget = options.configTarget ?? targetConfigKeyForPlatform(gateway.target);
|
|
139
137
|
const { identity: gatewayIdentity, presentation: gatewayPresentation, sharing: gatewaySharing, notifications: gatewayNotifications, ...gatewayWithoutIntegrations } = gateway;
|
|
140
138
|
const integrations = normalizeTargetIntegrationConfig(options.effectiveConfig?.integrations ?? config.integrations);
|
|
@@ -166,25 +164,26 @@ export function withTargetAvailability(gateway, config, options = {}) {
|
|
|
166
164
|
...(exposeInboundShare ? { readInboundShare } : {}),
|
|
167
165
|
};
|
|
168
166
|
const notifications = notificationsAvailable ? gatewayNotifications : undefined;
|
|
169
|
-
const isIapAvailable = async () => (
|
|
167
|
+
const isIapAvailable = async () => (availabilityConfig.features.iap && (await getGatewayCapabilities()).nativeIap);
|
|
170
168
|
const isAdPlacementAllowed = (placementId, expectedType) => {
|
|
171
169
|
const actualType = options.resolveAdPlacementType?.(placementId);
|
|
172
170
|
if (actualType !== undefined && actualType !== expectedType) {
|
|
173
171
|
return false;
|
|
174
172
|
}
|
|
175
173
|
return expectedType === 'rewarded'
|
|
176
|
-
?
|
|
177
|
-
:
|
|
174
|
+
? availabilityConfig.features.rewardedAds
|
|
175
|
+
: availabilityConfig.features.interstitialAds;
|
|
178
176
|
};
|
|
179
177
|
const canPreloadAdPlacement = (placementId) => {
|
|
180
178
|
const actualType = options.resolveAdPlacementType?.(placementId);
|
|
181
179
|
if (actualType === 'rewarded') {
|
|
182
|
-
return
|
|
180
|
+
return availabilityConfig.features.rewardedAds;
|
|
183
181
|
}
|
|
184
182
|
if (actualType === 'interstitial') {
|
|
185
|
-
return
|
|
183
|
+
return availabilityConfig.features.interstitialAds;
|
|
186
184
|
}
|
|
187
|
-
return
|
|
185
|
+
return (availabilityConfig.features.rewardedAds ||
|
|
186
|
+
availabilityConfig.features.interstitialAds);
|
|
188
187
|
};
|
|
189
188
|
return {
|
|
190
189
|
...gatewayWithoutIntegrations,
|
|
@@ -205,13 +204,13 @@ export function withTargetAvailability(gateway, config, options = {}) {
|
|
|
205
204
|
...(options.effectiveConfig === undefined
|
|
206
205
|
? {}
|
|
207
206
|
: { effectiveConfig: options.effectiveConfig }),
|
|
208
|
-
capabilities: applyTargetConfigToCapabilities(await getGatewayCapabilities(),
|
|
207
|
+
capabilities: applyTargetConfigToCapabilities(await getGatewayCapabilities(), availabilityConfig),
|
|
209
208
|
adPlacements: options.adPlacements ?? [],
|
|
210
209
|
gateway,
|
|
211
210
|
});
|
|
212
211
|
},
|
|
213
212
|
async getCapabilities() {
|
|
214
|
-
return applyTargetConfigToCapabilities(await getGatewayCapabilities(),
|
|
213
|
+
return applyTargetConfigToCapabilities(await getGatewayCapabilities(), availabilityConfig);
|
|
215
214
|
},
|
|
216
215
|
commerce: {
|
|
217
216
|
async getProducts() {
|
|
@@ -263,7 +262,7 @@ export function withTargetAvailability(gateway, config, options = {}) {
|
|
|
263
262
|
return gateway.ads.showInterstitial(input);
|
|
264
263
|
},
|
|
265
264
|
},
|
|
266
|
-
leaderboard:
|
|
265
|
+
leaderboard: availabilityConfig.features.leaderboard
|
|
267
266
|
? gateway.leaderboard
|
|
268
267
|
: {
|
|
269
268
|
async submitScore() {
|
|
@@ -275,6 +274,14 @@ export function withTargetAvailability(gateway, config, options = {}) {
|
|
|
275
274
|
},
|
|
276
275
|
};
|
|
277
276
|
}
|
|
277
|
+
function resolveAvailabilityConfig(config, effectiveConfig) {
|
|
278
|
+
return effectiveConfig === undefined
|
|
279
|
+
? config
|
|
280
|
+
: {
|
|
281
|
+
...config,
|
|
282
|
+
features: effectiveConfig.features,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
278
285
|
export function isTargetConfiguredGateway(gateway) {
|
|
279
286
|
return typeof gateway.getTargetRuntime === 'function';
|
|
280
287
|
}
|
package/dist/viewport.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpgd/target-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Target-specific platform feature availability and effective config helpers for mpgd.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"typia": "13.0.2",
|
|
40
|
-
"@mpgd/catalog": "0.
|
|
41
|
-
"@mpgd/
|
|
42
|
-
"@mpgd/
|
|
40
|
+
"@mpgd/catalog": "0.5.0",
|
|
41
|
+
"@mpgd/i18n": "0.5.3",
|
|
42
|
+
"@mpgd/platform": "0.7.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"ttsc": "0.18.4",
|
package/targets.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2026-07-
|
|
2
|
+
"version": "2026-07-19.1",
|
|
3
3
|
"targets": {
|
|
4
4
|
"web-preview": {
|
|
5
5
|
"runtime": "web-preview",
|
|
@@ -87,6 +87,49 @@
|
|
|
87
87
|
"requiresAitReview": false
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
|
+
"verse8": {
|
|
91
|
+
"runtime": "verse8-web",
|
|
92
|
+
"features": {
|
|
93
|
+
"iap": true,
|
|
94
|
+
"rewardedAds": true,
|
|
95
|
+
"interstitialAds": true,
|
|
96
|
+
"leaderboard": false,
|
|
97
|
+
"localization": true
|
|
98
|
+
},
|
|
99
|
+
"capabilities": {
|
|
100
|
+
"storage": "local",
|
|
101
|
+
"localization": true
|
|
102
|
+
},
|
|
103
|
+
"localization": {
|
|
104
|
+
"fallbackLocale": "en"
|
|
105
|
+
},
|
|
106
|
+
"monetization": {
|
|
107
|
+
"iap": true,
|
|
108
|
+
"rewardedAds": true,
|
|
109
|
+
"interstitialAds": true
|
|
110
|
+
},
|
|
111
|
+
"leaderboard": {
|
|
112
|
+
"native": false
|
|
113
|
+
},
|
|
114
|
+
"release": {
|
|
115
|
+
"profile": "verse8"
|
|
116
|
+
},
|
|
117
|
+
"integrations": {
|
|
118
|
+
"identityUpgrade": "unsupported",
|
|
119
|
+
"presentation": "available",
|
|
120
|
+
"sharing": "unsupported",
|
|
121
|
+
"inboundShare": "unsupported",
|
|
122
|
+
"notifications": "unsupported",
|
|
123
|
+
"presentationMode": "fullscreen"
|
|
124
|
+
},
|
|
125
|
+
"policy": {
|
|
126
|
+
"externalPaymentAllowed": false,
|
|
127
|
+
"remoteExecutableCodeAllowed": false,
|
|
128
|
+
"installOtherAppCTAAllowed": false,
|
|
129
|
+
"requiresStoreReview": false,
|
|
130
|
+
"requiresAitReview": false
|
|
131
|
+
}
|
|
132
|
+
},
|
|
90
133
|
"android": {
|
|
91
134
|
"runtime": "capacitor-android",
|
|
92
135
|
"features": {
|
|
@@ -183,7 +226,7 @@
|
|
|
183
226
|
"localization": true
|
|
184
227
|
},
|
|
185
228
|
"capabilities": {
|
|
186
|
-
"storage": "
|
|
229
|
+
"storage": "native",
|
|
187
230
|
"localization": true
|
|
188
231
|
},
|
|
189
232
|
"localization": {
|