@mpgd/target-config 0.19.0 → 0.20.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/asset-packs.d.ts +33 -0
- package/dist/asset-packs.js +122 -0
- package/dist/effective.d.ts +3 -0
- package/dist/effective.js +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +209 -139
- package/package.json +8 -4
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Provider-neutral locations for non-executable asset-pack payloads. */
|
|
2
|
+
export type AssetPackLocation = 'packaged' | 'remote';
|
|
3
|
+
export interface AssetPackDeliveryPolicy {
|
|
4
|
+
readonly defaultLocation: AssetPackLocation;
|
|
5
|
+
readonly packs?: Readonly<Record<string, AssetPackLocation>>;
|
|
6
|
+
/** These packs and their dependency closure must work on first launch offline. */
|
|
7
|
+
readonly offlineRequired?: readonly string[];
|
|
8
|
+
/** HTTPS directory URL; HTTP is accepted only for loopback development. */
|
|
9
|
+
readonly remoteBaseUrl?: string;
|
|
10
|
+
/** Total packaged asset namespace, including manifest and policy metadata. */
|
|
11
|
+
readonly maxPackagedBytes?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface AssetPackTargetPolicy extends AssetPackDeliveryPolicy {
|
|
14
|
+
/** Build config path relative to mpgd.targets.json. No credentials belong here. */
|
|
15
|
+
readonly buildConfig: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AssetPackPolicyPack {
|
|
18
|
+
readonly packId: string;
|
|
19
|
+
readonly revision: string;
|
|
20
|
+
readonly dependencies: readonly {
|
|
21
|
+
readonly packId: string;
|
|
22
|
+
readonly revision: string;
|
|
23
|
+
}[];
|
|
24
|
+
}
|
|
25
|
+
export declare function assertAssetPackDeliveryPolicy(input: unknown): asserts input is AssetPackDeliveryPolicy;
|
|
26
|
+
export declare function assertAssetPackTargetPolicy(input: unknown): asserts input is AssetPackTargetPolicy;
|
|
27
|
+
/** Resolve the offline dependency closure; explicit remote conflicts fail closed. */
|
|
28
|
+
export declare function resolveAssetPackLocations(policy: AssetPackDeliveryPolicy, packs: readonly AssetPackPolicyPack[]): Readonly<Record<string, AssetPackLocation>>;
|
|
29
|
+
/** Compatible with Phaser delivery's resolveURL; its path is already encoded once. */
|
|
30
|
+
export declare function createAssetPackTargetURLResolver(policy: AssetPackDeliveryPolicy, packs: readonly AssetPackPolicyPack[], packagedBaseUrl: string): (encodedPath: string, context: {
|
|
31
|
+
readonly packId: string;
|
|
32
|
+
readonly revision: string;
|
|
33
|
+
}) => string;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
function record(value) {
|
|
2
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
3
|
+
}
|
|
4
|
+
export function assertAssetPackDeliveryPolicy(input) {
|
|
5
|
+
if (!record(input) || (input.defaultLocation !== 'packaged' && input.defaultLocation !== 'remote')) {
|
|
6
|
+
throw new Error('assetPacks.defaultLocation must be packaged or remote');
|
|
7
|
+
}
|
|
8
|
+
const keys = new Set([
|
|
9
|
+
'buildConfig',
|
|
10
|
+
'defaultLocation',
|
|
11
|
+
'packs',
|
|
12
|
+
'offlineRequired',
|
|
13
|
+
'remoteBaseUrl',
|
|
14
|
+
'maxPackagedBytes',
|
|
15
|
+
]);
|
|
16
|
+
if (Object.keys(input).some((key) => !keys.has(key))) {
|
|
17
|
+
throw new Error('assetPacks contains an unknown field; credentials are not target configuration');
|
|
18
|
+
}
|
|
19
|
+
if (input.packs !== undefined) {
|
|
20
|
+
if (!record(input.packs) || Object.keys(input.packs).length > 4096) {
|
|
21
|
+
throw new Error('assetPacks.packs must be a bounded pack-location map');
|
|
22
|
+
}
|
|
23
|
+
for (const [id, location] of Object.entries(input.packs)) {
|
|
24
|
+
if (!id || (location !== 'packaged' && location !== 'remote')) {
|
|
25
|
+
throw new Error('assetPacks.packs contains an invalid pack location');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (input.offlineRequired !== undefined && (!Array.isArray(input.offlineRequired)
|
|
30
|
+
|| input.offlineRequired.length > 4096
|
|
31
|
+
|| input.offlineRequired.some((id) => typeof id !== 'string' || !id))) {
|
|
32
|
+
throw new Error('assetPacks.offlineRequired must be a bounded list of pack IDs');
|
|
33
|
+
}
|
|
34
|
+
if (input.maxPackagedBytes !== undefined && (!Number.isSafeInteger(input.maxPackagedBytes)
|
|
35
|
+
|| input.maxPackagedBytes <= 0)) {
|
|
36
|
+
throw new Error('assetPacks.maxPackagedBytes must be a positive safe integer');
|
|
37
|
+
}
|
|
38
|
+
if (input.remoteBaseUrl !== undefined) {
|
|
39
|
+
if (typeof input.remoteBaseUrl !== 'string') {
|
|
40
|
+
throw new Error('assetPacks.remoteBaseUrl must be a directory URL');
|
|
41
|
+
}
|
|
42
|
+
const url = new URL(input.remoteBaseUrl);
|
|
43
|
+
const loopback = ['localhost', '127.0.0.1', '[::1]'].includes(url.hostname);
|
|
44
|
+
if ((url.protocol !== 'https:' && !(url.protocol === 'http:' && loopback))
|
|
45
|
+
|| url.username || url.password || url.search || url.hash || !url.pathname.endsWith('/')) {
|
|
46
|
+
throw new Error('assetPacks.remoteBaseUrl requires an HTTPS directory URL without credentials, query or fragment (HTTP loopback allowed)');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export function assertAssetPackTargetPolicy(input) {
|
|
51
|
+
assertAssetPackDeliveryPolicy(input);
|
|
52
|
+
const buildConfig = input.buildConfig;
|
|
53
|
+
if (typeof buildConfig !== 'string' || !buildConfig.trim()) {
|
|
54
|
+
throw new Error('assetPacks.buildConfig must be a non-empty path');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/** Resolve the offline dependency closure; explicit remote conflicts fail closed. */
|
|
58
|
+
export function resolveAssetPackLocations(policy, packs) {
|
|
59
|
+
assertAssetPackDeliveryPolicy(policy);
|
|
60
|
+
const byId = new Map(packs.map((pack) => [pack.packId, pack]));
|
|
61
|
+
if (byId.size !== packs.length || packs.length > 4096) {
|
|
62
|
+
throw new Error('Asset pack policy requires unique, bounded pack IDs');
|
|
63
|
+
}
|
|
64
|
+
const locations = Object.create(null);
|
|
65
|
+
for (const pack of packs) {
|
|
66
|
+
locations[pack.packId] = policy.packs && Object.hasOwn(policy.packs, pack.packId)
|
|
67
|
+
? policy.packs[pack.packId] : policy.defaultLocation;
|
|
68
|
+
for (const dependency of pack.dependencies) {
|
|
69
|
+
if (byId.get(dependency.packId)?.revision !== dependency.revision) {
|
|
70
|
+
throw new Error(`Unknown dependency revision in pack ${pack.packId}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
for (const id of Object.keys(policy.packs ?? {})) {
|
|
75
|
+
if (!byId.has(id)) {
|
|
76
|
+
throw new Error(`Unknown asset pack override: ${id}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const pending = [...(policy.offlineRequired ?? [])];
|
|
80
|
+
const visited = new Set();
|
|
81
|
+
while (pending.length) {
|
|
82
|
+
const id = pending.pop();
|
|
83
|
+
if (visited.has(id)) {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
const pack = byId.get(id);
|
|
87
|
+
if (!pack) {
|
|
88
|
+
throw new Error(`Unknown offline-required asset pack: ${id}`);
|
|
89
|
+
}
|
|
90
|
+
if (policy.packs && Object.hasOwn(policy.packs, id) && policy.packs[id] === 'remote') {
|
|
91
|
+
throw new Error(`Offline-required dependency ${id} is explicitly remote`);
|
|
92
|
+
}
|
|
93
|
+
visited.add(id);
|
|
94
|
+
locations[id] = 'packaged';
|
|
95
|
+
pending.push(...pack.dependencies.map((dependency) => dependency.packId));
|
|
96
|
+
}
|
|
97
|
+
if (Object.values(locations).includes('remote') && policy.remoteBaseUrl === undefined) {
|
|
98
|
+
throw new Error('Remote asset packs require assetPacks.remoteBaseUrl');
|
|
99
|
+
}
|
|
100
|
+
return Object.freeze(locations);
|
|
101
|
+
}
|
|
102
|
+
/** Compatible with Phaser delivery's resolveURL; its path is already encoded once. */
|
|
103
|
+
export function createAssetPackTargetURLResolver(policy, packs, packagedBaseUrl) {
|
|
104
|
+
const locations = resolveAssetPackLocations(policy, packs);
|
|
105
|
+
const revisions = new Map(packs.map((pack) => [pack.packId, pack.revision]));
|
|
106
|
+
const local = new URL(packagedBaseUrl);
|
|
107
|
+
if (!local.pathname.endsWith('/') || local.username || local.password || local.search || local.hash) {
|
|
108
|
+
throw new Error('Packaged asset base must be a directory URL');
|
|
109
|
+
}
|
|
110
|
+
const remote = policy.remoteBaseUrl;
|
|
111
|
+
return (encodedPath, context) => {
|
|
112
|
+
if (revisions.get(context.packId) !== context.revision) {
|
|
113
|
+
throw new Error('Asset URL context does not match the selected pack revision');
|
|
114
|
+
}
|
|
115
|
+
if (!encodedPath || encodedPath.startsWith('/') || /[?#:\\]/.test(encodedPath)
|
|
116
|
+
|| encodedPath.split('/').some((part) => !part || ['.', '..'].includes(decodeURIComponent(part))
|
|
117
|
+
|| /[/\\]/.test(decodeURIComponent(part)))) {
|
|
118
|
+
throw new Error('Asset URL requires an encoded relative artifact path');
|
|
119
|
+
}
|
|
120
|
+
return new URL(encodedPath, locations[context.packId] === 'remote' ? remote : local).href;
|
|
121
|
+
};
|
|
122
|
+
}
|
package/dist/effective.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type AdPlacementEntry, type AdPlacements, type ProductCatalog, type ProductCatalogEntry } from '@mpgd/catalog';
|
|
2
2
|
import { type FeatureAvailabilityReason, type TargetCapabilityConfig, type TargetConfig, type TargetConfigMatrix, type TargetFeatureConfig, type TargetIntegrationConfig, type TargetLocalizationConfig, type TargetPolicyRestrictions, type TargetReleaseConfig, type TargetRuntimeKind } from './runtime.js';
|
|
3
|
+
import { type AssetPackDeliveryPolicy, type AssetPackTargetPolicy } from './asset-packs.js';
|
|
3
4
|
export type EffectiveAvailabilityReason = FeatureAvailabilityReason | 'missing-platform-id';
|
|
4
5
|
export interface EffectivePlatformTargetMetadata {
|
|
6
|
+
readonly assetPacks?: AssetPackTargetPolicy;
|
|
5
7
|
readonly kind: string;
|
|
6
8
|
readonly adapter: string;
|
|
7
9
|
readonly crazyGamesLaunch?: 'basic' | 'full';
|
|
@@ -61,6 +63,7 @@ export interface EffectiveLocalizationConfig {
|
|
|
61
63
|
readonly fallbackLocale: TargetLocalizationConfig['fallbackLocale'];
|
|
62
64
|
}
|
|
63
65
|
export interface EffectiveTargetConfig {
|
|
66
|
+
readonly assetPacks?: AssetPackDeliveryPolicy;
|
|
64
67
|
readonly version: string;
|
|
65
68
|
readonly target: string;
|
|
66
69
|
readonly runtime: TargetRuntimeKind;
|
package/dist/effective.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { resolveAdPlacementPlatformId, resolveProductPlatformId, } from '@mpgd/catalog';
|
|
2
2
|
import { adPlacementFeatureFor, assertTargetIntegrationRuntimeBounds, } from './runtime.js';
|
|
3
|
+
import { assertAssetPackTargetPolicy, } from './asset-packs.js';
|
|
3
4
|
export const defaultLeaderboardId = 'default';
|
|
4
5
|
const disabledAuthoritativeMonetization = {
|
|
5
6
|
iap: false,
|
|
@@ -10,6 +11,17 @@ const disabledAuthoritativeMonetization = {
|
|
|
10
11
|
};
|
|
11
12
|
export function createEffectiveTargetConfig(input) {
|
|
12
13
|
const config = resolveAuthoritativeGameServicesConfig(input.config, input.platformTarget);
|
|
14
|
+
if (input.platformTarget?.assetPacks !== undefined) {
|
|
15
|
+
assertAssetPackTargetPolicy(input.platformTarget.assetPacks);
|
|
16
|
+
}
|
|
17
|
+
const assetPolicy = input.platformTarget?.assetPacks;
|
|
18
|
+
const runtimeAssetPacks = assetPolicy === undefined ? undefined : {
|
|
19
|
+
defaultLocation: assetPolicy.defaultLocation,
|
|
20
|
+
...(assetPolicy.packs === undefined ? {} : { packs: { ...assetPolicy.packs } }),
|
|
21
|
+
...(assetPolicy.offlineRequired === undefined ? {} : { offlineRequired: [...assetPolicy.offlineRequired] }),
|
|
22
|
+
...(assetPolicy.remoteBaseUrl === undefined ? {} : { remoteBaseUrl: assetPolicy.remoteBaseUrl }),
|
|
23
|
+
...(assetPolicy.maxPackagedBytes === undefined ? {} : { maxPackagedBytes: assetPolicy.maxPackagedBytes }),
|
|
24
|
+
};
|
|
13
25
|
const products = input.catalog.products.map((product) => createEffectiveProductConfig(input.target, config, product));
|
|
14
26
|
const placements = input.adPlacements.placements.map((placement) => createEffectiveAdPlacementConfig(input.target, config, placement));
|
|
15
27
|
const leaderboardEnabled = config.features.leaderboard;
|
|
@@ -24,6 +36,7 @@ export function createEffectiveTargetConfig(input) {
|
|
|
24
36
|
adPlacements: input.adPlacements.version,
|
|
25
37
|
}),
|
|
26
38
|
target: input.target,
|
|
39
|
+
...(runtimeAssetPacks === undefined ? {} : { assetPacks: runtimeAssetPacks }),
|
|
27
40
|
runtime: config.runtime,
|
|
28
41
|
release: config.release,
|
|
29
42
|
features: config.features,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EffectiveTargetConfigMatrix } from './effective.js';
|
|
2
2
|
import type { TargetConfigMatrix } from './runtime.js';
|
|
3
3
|
export * from './effective.js';
|
|
4
|
+
export * from './asset-packs.js';
|
|
4
5
|
export * from './platformVersionAllocation.js';
|
|
5
6
|
export * from './releaseIdentity.js';
|
|
6
7
|
export * from './runtime.js';
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import * as _accessExpressionAsString_1 from "typia/lib/internal/_accessExpressi
|
|
|
3
3
|
const __typia_transform__accessExpressionAsString = _accessExpressionAsString_1._accessExpressionAsString;
|
|
4
4
|
import typia from 'typia';
|
|
5
5
|
export * from './effective.js';
|
|
6
|
+
export * from './asset-packs.js';
|
|
6
7
|
export * from './platformVersionAllocation.js';
|
|
7
8
|
export * from './releaseIdentity.js';
|
|
8
9
|
export * from './runtime.js';
|
|
@@ -131,7 +132,54 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
131
132
|
value: value
|
|
132
133
|
}, _errorFactory);
|
|
133
134
|
});
|
|
134
|
-
const _ao10 = (input, _path, _exceptionable = true) =>
|
|
135
|
+
const _ao10 = (input, _path, _exceptionable = true) => ("string" === typeof input.targetConfig || _assertGuard_1._assertGuard(_exceptionable, {
|
|
136
|
+
method: "typia.createAssert",
|
|
137
|
+
path: _path + ".targetConfig",
|
|
138
|
+
expected: "string",
|
|
139
|
+
value: input.targetConfig
|
|
140
|
+
}, _errorFactory)) && ("string" === typeof input.productCatalog || _assertGuard_1._assertGuard(_exceptionable, {
|
|
141
|
+
method: "typia.createAssert",
|
|
142
|
+
path: _path + ".productCatalog",
|
|
143
|
+
expected: "string",
|
|
144
|
+
value: input.productCatalog
|
|
145
|
+
}, _errorFactory)) && ("string" === typeof input.adPlacements || _assertGuard_1._assertGuard(_exceptionable, {
|
|
146
|
+
method: "typia.createAssert",
|
|
147
|
+
path: _path + ".adPlacements",
|
|
148
|
+
expected: "string",
|
|
149
|
+
value: input.adPlacements
|
|
150
|
+
}, _errorFactory)) && (undefined === input.platformTargetKind || "string" === typeof input.platformTargetKind || _assertGuard_1._assertGuard(_exceptionable, {
|
|
151
|
+
method: "typia.createAssert",
|
|
152
|
+
path: _path + ".platformTargetKind",
|
|
153
|
+
expected: "(string | undefined)",
|
|
154
|
+
value: input.platformTargetKind
|
|
155
|
+
}, _errorFactory)) && (undefined === input.platformAdapter || "string" === typeof input.platformAdapter || _assertGuard_1._assertGuard(_exceptionable, {
|
|
156
|
+
method: "typia.createAssert",
|
|
157
|
+
path: _path + ".platformAdapter",
|
|
158
|
+
expected: "(string | undefined)",
|
|
159
|
+
value: input.platformAdapter
|
|
160
|
+
}, _errorFactory));
|
|
161
|
+
const _ao11 = (input, _path, _exceptionable = true) => _ap1(input, _path, true && _exceptionable) && _ap2(input, _path, true && _exceptionable) && ((Array.isArray(input.products) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
162
|
+
method: "typia.createAssert",
|
|
163
|
+
path: _path + ".products",
|
|
164
|
+
expected: "ReadonlyArray<EffectiveProductConfig>",
|
|
165
|
+
value: input.products
|
|
166
|
+
}, _errorFactory)) && input.products.every((elem, _index5) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
167
|
+
method: "typia.createAssert",
|
|
168
|
+
path: _path + ".products[" + _index5 + "]",
|
|
169
|
+
expected: "EffectiveProductConfig",
|
|
170
|
+
value: elem
|
|
171
|
+
}, _errorFactory)) && _ao12(elem, _path + ".products[" + _index5 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
172
|
+
method: "typia.createAssert",
|
|
173
|
+
path: _path + ".products[" + _index5 + "]",
|
|
174
|
+
expected: "EffectiveProductConfig",
|
|
175
|
+
value: elem
|
|
176
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
177
|
+
method: "typia.createAssert",
|
|
178
|
+
path: _path + ".products",
|
|
179
|
+
expected: "ReadonlyArray<EffectiveProductConfig>",
|
|
180
|
+
value: input.products
|
|
181
|
+
}, _errorFactory));
|
|
182
|
+
const _ao12 = (input, _path, _exceptionable = true) => _ap6(input, _path, true && _exceptionable) && ("consumable" === input.type || "non_consumable" === input.type || "subscription" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
135
183
|
method: "typia.createAssert",
|
|
136
184
|
path: _path + ".type",
|
|
137
185
|
expected: "(\"consumable\" | \"non_consumable\" | \"subscription\")",
|
|
@@ -152,8 +200,8 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
152
200
|
expected: "(string | undefined)",
|
|
153
201
|
value: input.platformProductId
|
|
154
202
|
}, _errorFactory));
|
|
155
|
-
const
|
|
156
|
-
const
|
|
203
|
+
const _ao13 = (input, _path, _exceptionable = true) => _ap9(input, _path, true && _exceptionable) && _ap10(input, _path, true && _exceptionable) && _ap11(input, _path, true && _exceptionable);
|
|
204
|
+
const _ao14 = (input, _path, _exceptionable = true) => ("entitlement" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
157
205
|
method: "typia.createAssert",
|
|
158
206
|
path: _path + ".type",
|
|
159
207
|
expected: "\"entitlement\"",
|
|
@@ -164,7 +212,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
164
212
|
expected: "string",
|
|
165
213
|
value: input.entitlement
|
|
166
214
|
}, _errorFactory));
|
|
167
|
-
const
|
|
215
|
+
const _ao15 = (input, _path, _exceptionable = true) => ("resource" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
168
216
|
method: "typia.createAssert",
|
|
169
217
|
path: _path + ".type",
|
|
170
218
|
expected: "\"resource\"",
|
|
@@ -195,7 +243,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
195
243
|
expected: "(number & ExclusiveMinimum<0> & Maximum<1.7976931348623157e+308>)",
|
|
196
244
|
value: input.amount
|
|
197
245
|
}, _errorFactory));
|
|
198
|
-
const
|
|
246
|
+
const _ao16 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.bannerAds || _assertGuard_1._assertGuard(_exceptionable, {
|
|
199
247
|
method: "typia.createAssert",
|
|
200
248
|
path: _path + ".bannerAds",
|
|
201
249
|
expected: "boolean",
|
|
@@ -205,14 +253,14 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
205
253
|
path: _path + ".placements",
|
|
206
254
|
expected: "ReadonlyArray<EffectiveAdPlacementConfig>",
|
|
207
255
|
value: input.placements
|
|
208
|
-
}, _errorFactory)) && input.placements.every((elem,
|
|
256
|
+
}, _errorFactory)) && input.placements.every((elem, _index6) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
209
257
|
method: "typia.createAssert",
|
|
210
|
-
path: _path + ".placements[" +
|
|
258
|
+
path: _path + ".placements[" + _index6 + "]",
|
|
211
259
|
expected: "EffectiveAdPlacementConfig",
|
|
212
260
|
value: elem
|
|
213
|
-
}, _errorFactory)) &&
|
|
261
|
+
}, _errorFactory)) && _ao17(elem, _path + ".placements[" + _index6 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
214
262
|
method: "typia.createAssert",
|
|
215
|
-
path: _path + ".placements[" +
|
|
263
|
+
path: _path + ".placements[" + _index6 + "]",
|
|
216
264
|
expected: "EffectiveAdPlacementConfig",
|
|
217
265
|
value: elem
|
|
218
266
|
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
@@ -221,7 +269,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
221
269
|
expected: "ReadonlyArray<EffectiveAdPlacementConfig>",
|
|
222
270
|
value: input.placements
|
|
223
271
|
}, _errorFactory));
|
|
224
|
-
const
|
|
272
|
+
const _ao17 = (input, _path, _exceptionable = true) => _ap6(input, _path, true && _exceptionable) && ("banner" === input.type || "interstitial" === input.type || "rewarded" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
225
273
|
method: "typia.createAssert",
|
|
226
274
|
path: _path + ".type",
|
|
227
275
|
expected: "(\"banner\" | \"interstitial\" | \"rewarded\")",
|
|
@@ -241,7 +289,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
241
289
|
path: _path + ".frequencyCap",
|
|
242
290
|
expected: "FrequencyCap",
|
|
243
291
|
value: input.frequencyCap
|
|
244
|
-
}, _errorFactory)) &&
|
|
292
|
+
}, _errorFactory)) && _ao20(input.frequencyCap, _path + ".frequencyCap", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
245
293
|
method: "typia.createAssert",
|
|
246
294
|
path: _path + ".frequencyCap",
|
|
247
295
|
expected: "FrequencyCap",
|
|
@@ -252,46 +300,24 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
252
300
|
expected: "(string | undefined)",
|
|
253
301
|
value: input.platformPlacementId
|
|
254
302
|
}, _errorFactory));
|
|
255
|
-
const
|
|
303
|
+
const _ao18 = (input, _path, _exceptionable = true) => ("continue" === input.type || _assertGuard_1._assertGuard(_exceptionable, {
|
|
256
304
|
method: "typia.createAssert",
|
|
257
305
|
path: _path + ".type",
|
|
258
306
|
expected: "\"continue\"",
|
|
259
307
|
value: input.type
|
|
260
308
|
}, _errorFactory)) && _ap11(input, _path, true && _exceptionable);
|
|
261
|
-
const
|
|
262
|
-
const
|
|
309
|
+
const _ao19 = (input, _path, _exceptionable = true) => _ap9(input, _path, true && _exceptionable) && _ap11(input, _path, true && _exceptionable) && _ap10(input, _path, true && _exceptionable);
|
|
310
|
+
const _ao2 = (input, _path, _exceptionable = true) => (undefined === input.assetPacks || ("object" === typeof input.assetPacks && null !== input.assetPacks || _assertGuard_1._assertGuard(_exceptionable, {
|
|
263
311
|
method: "typia.createAssert",
|
|
264
|
-
path: _path + ".
|
|
265
|
-
expected: "
|
|
266
|
-
value: input.
|
|
267
|
-
}, _errorFactory)) && (
|
|
268
|
-
method: "typia.createAssert",
|
|
269
|
-
path: _path + ".maxPerSession",
|
|
270
|
-
expected: "(number | undefined)",
|
|
271
|
-
value: input.maxPerSession
|
|
272
|
-
}, _errorFactory)) && (undefined === input.minStageInterval || "number" === typeof input.minStageInterval || _assertGuard_1._assertGuard(_exceptionable, {
|
|
273
|
-
method: "typia.createAssert",
|
|
274
|
-
path: _path + ".minStageInterval",
|
|
275
|
-
expected: "(number | undefined)",
|
|
276
|
-
value: input.minStageInterval
|
|
277
|
-
}, _errorFactory));
|
|
278
|
-
const _ao19 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.native || _assertGuard_1._assertGuard(_exceptionable, {
|
|
312
|
+
path: _path + ".assetPacks",
|
|
313
|
+
expected: "(AssetPackDeliveryPolicy | undefined)",
|
|
314
|
+
value: input.assetPacks
|
|
315
|
+
}, _errorFactory)) && _ao3(input.assetPacks, _path + ".assetPacks", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
279
316
|
method: "typia.createAssert",
|
|
280
|
-
path: _path + ".
|
|
281
|
-
expected: "
|
|
282
|
-
value: input.
|
|
283
|
-
}, _errorFactory)) &&
|
|
284
|
-
method: "typia.createAssert",
|
|
285
|
-
path: _path + ".reason",
|
|
286
|
-
expected: _ae6,
|
|
287
|
-
value: input.reason
|
|
288
|
-
}, _errorFactory)) && (undefined === input.defaultLeaderboardId || "string" === typeof input.defaultLeaderboardId || _assertGuard_1._assertGuard(_exceptionable, {
|
|
289
|
-
method: "typia.createAssert",
|
|
290
|
-
path: _path + ".defaultLeaderboardId",
|
|
291
|
-
expected: "(string | undefined)",
|
|
292
|
-
value: input.defaultLeaderboardId
|
|
293
|
-
}, _errorFactory));
|
|
294
|
-
const _ao2 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && ("string" === typeof input.target || _assertGuard_1._assertGuard(_exceptionable, {
|
|
317
|
+
path: _path + ".assetPacks",
|
|
318
|
+
expected: "(AssetPackDeliveryPolicy | undefined)",
|
|
319
|
+
value: input.assetPacks
|
|
320
|
+
}, _errorFactory)) && _ap0(input, _path, true && _exceptionable) && ("string" === typeof input.target || _assertGuard_1._assertGuard(_exceptionable, {
|
|
295
321
|
method: "typia.createAssert",
|
|
296
322
|
path: _path + ".target",
|
|
297
323
|
expected: "string",
|
|
@@ -306,7 +332,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
306
332
|
path: _path + ".release",
|
|
307
333
|
expected: "TargetReleaseConfig",
|
|
308
334
|
value: input.release
|
|
309
|
-
}, _errorFactory)) &&
|
|
335
|
+
}, _errorFactory)) && _ao5(input.release, _path + ".release", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
310
336
|
method: "typia.createAssert",
|
|
311
337
|
path: _path + ".release",
|
|
312
338
|
expected: "TargetReleaseConfig",
|
|
@@ -316,7 +342,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
316
342
|
path: _path + ".features",
|
|
317
343
|
expected: "TargetFeatureConfig",
|
|
318
344
|
value: input.features
|
|
319
|
-
}, _errorFactory)) &&
|
|
345
|
+
}, _errorFactory)) && _ao6(input.features, _path + ".features", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
320
346
|
method: "typia.createAssert",
|
|
321
347
|
path: _path + ".features",
|
|
322
348
|
expected: "TargetFeatureConfig",
|
|
@@ -326,7 +352,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
326
352
|
path: _path + ".capabilities",
|
|
327
353
|
expected: "TargetCapabilityConfig",
|
|
328
354
|
value: input.capabilities
|
|
329
|
-
}, _errorFactory)) &&
|
|
355
|
+
}, _errorFactory)) && _ao7(input.capabilities, _path + ".capabilities", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
330
356
|
method: "typia.createAssert",
|
|
331
357
|
path: _path + ".capabilities",
|
|
332
358
|
expected: "TargetCapabilityConfig",
|
|
@@ -336,7 +362,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
336
362
|
path: _path + ".integrations",
|
|
337
363
|
expected: "TargetIntegrationConfig",
|
|
338
364
|
value: input.integrations
|
|
339
|
-
}, _errorFactory)) &&
|
|
365
|
+
}, _errorFactory)) && _ao8(input.integrations, _path + ".integrations", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
340
366
|
method: "typia.createAssert",
|
|
341
367
|
path: _path + ".integrations",
|
|
342
368
|
expected: "TargetIntegrationConfig",
|
|
@@ -346,7 +372,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
346
372
|
path: _path + ".policy",
|
|
347
373
|
expected: "TargetPolicyRestrictions",
|
|
348
374
|
value: input.policy
|
|
349
|
-
}, _errorFactory)) &&
|
|
375
|
+
}, _errorFactory)) && _ao9(input.policy, _path + ".policy", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
350
376
|
method: "typia.createAssert",
|
|
351
377
|
path: _path + ".policy",
|
|
352
378
|
expected: "TargetPolicyRestrictions",
|
|
@@ -356,7 +382,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
356
382
|
path: _path + ".sources",
|
|
357
383
|
expected: "EffectiveTargetConfigSources",
|
|
358
384
|
value: input.sources
|
|
359
|
-
}, _errorFactory)) &&
|
|
385
|
+
}, _errorFactory)) && _ao10(input.sources, _path + ".sources", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
360
386
|
method: "typia.createAssert",
|
|
361
387
|
path: _path + ".sources",
|
|
362
388
|
expected: "EffectiveTargetConfigSources",
|
|
@@ -366,7 +392,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
366
392
|
path: _path + ".monetization",
|
|
367
393
|
expected: "EffectiveMonetizationConfig",
|
|
368
394
|
value: input.monetization
|
|
369
|
-
}, _errorFactory)) &&
|
|
395
|
+
}, _errorFactory)) && _ao11(input.monetization, _path + ".monetization", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
370
396
|
method: "typia.createAssert",
|
|
371
397
|
path: _path + ".monetization",
|
|
372
398
|
expected: "EffectiveMonetizationConfig",
|
|
@@ -376,7 +402,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
376
402
|
path: _path + ".ads",
|
|
377
403
|
expected: "EffectiveAdsConfig",
|
|
378
404
|
value: input.ads
|
|
379
|
-
}, _errorFactory)) &&
|
|
405
|
+
}, _errorFactory)) && _ao16(input.ads, _path + ".ads", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
380
406
|
method: "typia.createAssert",
|
|
381
407
|
path: _path + ".ads",
|
|
382
408
|
expected: "EffectiveAdsConfig",
|
|
@@ -386,7 +412,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
386
412
|
path: _path + ".leaderboard",
|
|
387
413
|
expected: "EffectiveLeaderboardConfig",
|
|
388
414
|
value: input.leaderboard
|
|
389
|
-
}, _errorFactory)) &&
|
|
415
|
+
}, _errorFactory)) && _ao21(input.leaderboard, _path + ".leaderboard", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
390
416
|
method: "typia.createAssert",
|
|
391
417
|
path: _path + ".leaderboard",
|
|
392
418
|
expected: "EffectiveLeaderboardConfig",
|
|
@@ -396,7 +422,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
396
422
|
path: _path + ".storage",
|
|
397
423
|
expected: "EffectiveStorageConfig",
|
|
398
424
|
value: input.storage
|
|
399
|
-
}, _errorFactory)) &&
|
|
425
|
+
}, _errorFactory)) && _ao22(input.storage, _path + ".storage", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
400
426
|
method: "typia.createAssert",
|
|
401
427
|
path: _path + ".storage",
|
|
402
428
|
expected: "EffectiveStorageConfig",
|
|
@@ -406,31 +432,115 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
406
432
|
path: _path + ".localization",
|
|
407
433
|
expected: "EffectiveLocalizationConfig",
|
|
408
434
|
value: input.localization
|
|
409
|
-
}, _errorFactory)) &&
|
|
435
|
+
}, _errorFactory)) && _ao23(input.localization, _path + ".localization", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
410
436
|
method: "typia.createAssert",
|
|
411
437
|
path: _path + ".localization",
|
|
412
438
|
expected: "EffectiveLocalizationConfig",
|
|
413
439
|
value: input.localization
|
|
414
440
|
}, _errorFactory));
|
|
415
|
-
const _ao20 = (input, _path, _exceptionable = true) => ("
|
|
441
|
+
const _ao20 = (input, _path, _exceptionable = true) => ("number" === typeof input.cooldownSeconds || _assertGuard_1._assertGuard(_exceptionable, {
|
|
442
|
+
method: "typia.createAssert",
|
|
443
|
+
path: _path + ".cooldownSeconds",
|
|
444
|
+
expected: "number",
|
|
445
|
+
value: input.cooldownSeconds
|
|
446
|
+
}, _errorFactory)) && (undefined === input.maxPerSession || "number" === typeof input.maxPerSession || _assertGuard_1._assertGuard(_exceptionable, {
|
|
447
|
+
method: "typia.createAssert",
|
|
448
|
+
path: _path + ".maxPerSession",
|
|
449
|
+
expected: "(number | undefined)",
|
|
450
|
+
value: input.maxPerSession
|
|
451
|
+
}, _errorFactory)) && (undefined === input.minStageInterval || "number" === typeof input.minStageInterval || _assertGuard_1._assertGuard(_exceptionable, {
|
|
452
|
+
method: "typia.createAssert",
|
|
453
|
+
path: _path + ".minStageInterval",
|
|
454
|
+
expected: "(number | undefined)",
|
|
455
|
+
value: input.minStageInterval
|
|
456
|
+
}, _errorFactory));
|
|
457
|
+
const _ao21 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.native || _assertGuard_1._assertGuard(_exceptionable, {
|
|
458
|
+
method: "typia.createAssert",
|
|
459
|
+
path: _path + ".native",
|
|
460
|
+
expected: "boolean",
|
|
461
|
+
value: input.native
|
|
462
|
+
}, _errorFactory)) && _ap7(input, _path, true && _exceptionable) && ("action-required" === input.reason || "available" === input.reason || "capability-unsupported" === input.reason || "configuration-required" === input.reason || "target-disabled" === input.reason || "temporarily-unavailable" === input.reason || _assertGuard_1._assertGuard(_exceptionable, {
|
|
463
|
+
method: "typia.createAssert",
|
|
464
|
+
path: _path + ".reason",
|
|
465
|
+
expected: _ae6,
|
|
466
|
+
value: input.reason
|
|
467
|
+
}, _errorFactory)) && (undefined === input.defaultLeaderboardId || "string" === typeof input.defaultLeaderboardId || _assertGuard_1._assertGuard(_exceptionable, {
|
|
468
|
+
method: "typia.createAssert",
|
|
469
|
+
path: _path + ".defaultLeaderboardId",
|
|
470
|
+
expected: "(string | undefined)",
|
|
471
|
+
value: input.defaultLeaderboardId
|
|
472
|
+
}, _errorFactory));
|
|
473
|
+
const _ao22 = (input, _path, _exceptionable = true) => ("local" === input.support || "native" === input.support || "none" === input.support || _assertGuard_1._assertGuard(_exceptionable, {
|
|
416
474
|
method: "typia.createAssert",
|
|
417
475
|
path: _path + ".support",
|
|
418
476
|
expected: "(\"local\" | \"native\" | \"none\")",
|
|
419
477
|
value: input.support
|
|
420
478
|
}, _errorFactory)) && _ap7(input, _path, true && _exceptionable);
|
|
421
|
-
const
|
|
479
|
+
const _ao23 = (input, _path, _exceptionable = true) => _ap7(input, _path, true && _exceptionable) && ("en" === input.fallbackLocale || "ko" === input.fallbackLocale || _assertGuard_1._assertGuard(_exceptionable, {
|
|
422
480
|
method: "typia.createAssert",
|
|
423
481
|
path: _path + ".fallbackLocale",
|
|
424
482
|
expected: "(\"en\" | \"ko\")",
|
|
425
483
|
value: input.fallbackLocale
|
|
426
484
|
}, _errorFactory));
|
|
427
|
-
const _ao3 = (input, _path, _exceptionable = true) =>
|
|
485
|
+
const _ao3 = (input, _path, _exceptionable = true) => ("packaged" === input.defaultLocation || "remote" === input.defaultLocation || _assertGuard_1._assertGuard(_exceptionable, {
|
|
486
|
+
method: "typia.createAssert",
|
|
487
|
+
path: _path + ".defaultLocation",
|
|
488
|
+
expected: "(\"packaged\" | \"remote\")",
|
|
489
|
+
value: input.defaultLocation
|
|
490
|
+
}, _errorFactory)) && (undefined === input.packs || ("object" === typeof input.packs && null !== input.packs && false === Array.isArray(input.packs) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
491
|
+
method: "typia.createAssert",
|
|
492
|
+
path: _path + ".packs",
|
|
493
|
+
expected: "(Readonly<Record<string, AssetPackLocation>> | undefined)",
|
|
494
|
+
value: input.packs
|
|
495
|
+
}, _errorFactory)) && _ao4(input.packs, _path + ".packs", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
496
|
+
method: "typia.createAssert",
|
|
497
|
+
path: _path + ".packs",
|
|
498
|
+
expected: "(Readonly<Record<string, AssetPackLocation>> | undefined)",
|
|
499
|
+
value: input.packs
|
|
500
|
+
}, _errorFactory)) && (undefined === input.offlineRequired || (Array.isArray(input.offlineRequired) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
501
|
+
method: "typia.createAssert",
|
|
502
|
+
path: _path + ".offlineRequired",
|
|
503
|
+
expected: "(ReadonlyArray<string> | undefined)",
|
|
504
|
+
value: input.offlineRequired
|
|
505
|
+
}, _errorFactory)) && input.offlineRequired.every((elem, _index4) => "string" === typeof elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
506
|
+
method: "typia.createAssert",
|
|
507
|
+
path: _path + ".offlineRequired[" + _index4 + "]",
|
|
508
|
+
expected: "string",
|
|
509
|
+
value: elem
|
|
510
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
511
|
+
method: "typia.createAssert",
|
|
512
|
+
path: _path + ".offlineRequired",
|
|
513
|
+
expected: "(ReadonlyArray<string> | undefined)",
|
|
514
|
+
value: input.offlineRequired
|
|
515
|
+
}, _errorFactory)) && (undefined === input.remoteBaseUrl || "string" === typeof input.remoteBaseUrl || _assertGuard_1._assertGuard(_exceptionable, {
|
|
516
|
+
method: "typia.createAssert",
|
|
517
|
+
path: _path + ".remoteBaseUrl",
|
|
518
|
+
expected: "(string | undefined)",
|
|
519
|
+
value: input.remoteBaseUrl
|
|
520
|
+
}, _errorFactory)) && (undefined === input.maxPackagedBytes || "number" === typeof input.maxPackagedBytes || _assertGuard_1._assertGuard(_exceptionable, {
|
|
521
|
+
method: "typia.createAssert",
|
|
522
|
+
path: _path + ".maxPackagedBytes",
|
|
523
|
+
expected: "(number | undefined)",
|
|
524
|
+
value: input.maxPackagedBytes
|
|
525
|
+
}, _errorFactory));
|
|
526
|
+
const _ao4 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
527
|
+
const value = input[key];
|
|
528
|
+
if (undefined === value)
|
|
529
|
+
return true;
|
|
530
|
+
return "packaged" === value || "remote" === value || _assertGuard_1._assertGuard(_exceptionable, {
|
|
531
|
+
method: "typia.createAssert",
|
|
532
|
+
path: _path + __typia_transform__accessExpressionAsString(key),
|
|
533
|
+
expected: "(\"packaged\" | \"remote\")",
|
|
534
|
+
value: value
|
|
535
|
+
}, _errorFactory);
|
|
536
|
+
});
|
|
537
|
+
const _ao5 = (input, _path, _exceptionable = true) => true === _av1.has(input.profile) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
428
538
|
method: "typia.createAssert",
|
|
429
539
|
path: _path + ".profile",
|
|
430
540
|
expected: _ae1,
|
|
431
541
|
value: input.profile
|
|
432
542
|
}, _errorFactory);
|
|
433
|
-
const
|
|
543
|
+
const _ao6 = (input, _path, _exceptionable = true) => _ap1(input, _path, true && _exceptionable) && _ap2(input, _path, true && _exceptionable) && (undefined === input.bannerAds || "boolean" === typeof input.bannerAds || _assertGuard_1._assertGuard(_exceptionable, {
|
|
434
544
|
method: "typia.createAssert",
|
|
435
545
|
path: _path + ".bannerAds",
|
|
436
546
|
expected: "(boolean | undefined)",
|
|
@@ -451,13 +561,13 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
451
561
|
expected: "(boolean | undefined)",
|
|
452
562
|
value: input.remoteLeaderboard
|
|
453
563
|
}, _errorFactory)) && _ap5(input, _path, true && _exceptionable);
|
|
454
|
-
const
|
|
564
|
+
const _ao7 = (input, _path, _exceptionable = true) => ("local" === input.storage || "native" === input.storage || "none" === input.storage || _assertGuard_1._assertGuard(_exceptionable, {
|
|
455
565
|
method: "typia.createAssert",
|
|
456
566
|
path: _path + ".storage",
|
|
457
567
|
expected: "(\"local\" | \"native\" | \"none\")",
|
|
458
568
|
value: input.storage
|
|
459
569
|
}, _errorFactory)) && _ap5(input, _path, true && _exceptionable);
|
|
460
|
-
const
|
|
570
|
+
const _ao8 = (input, _path, _exceptionable = true) => ("action-required" === input.identityUpgrade || "approval-required" === input.identityUpgrade || "available" === input.identityUpgrade || "configuration-required" === input.identityUpgrade || "disabled" === input.identityUpgrade || "temporarily-unavailable" === input.identityUpgrade || "unsupported" === input.identityUpgrade || _assertGuard_1._assertGuard(_exceptionable, {
|
|
461
571
|
method: "typia.createAssert",
|
|
462
572
|
path: _path + ".identityUpgrade",
|
|
463
573
|
expected: _ae2,
|
|
@@ -488,7 +598,7 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
488
598
|
expected: "(\"fullscreen\" | \"inline-expanded\")",
|
|
489
599
|
value: input.presentationMode
|
|
490
600
|
}, _errorFactory));
|
|
491
|
-
const
|
|
601
|
+
const _ao9 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.externalPaymentAllowed || _assertGuard_1._assertGuard(_exceptionable, {
|
|
492
602
|
method: "typia.createAssert",
|
|
493
603
|
path: _path + ".externalPaymentAllowed",
|
|
494
604
|
expected: "boolean",
|
|
@@ -514,60 +624,13 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
514
624
|
expected: "boolean",
|
|
515
625
|
value: input.requiresAitReview
|
|
516
626
|
}, _errorFactory));
|
|
517
|
-
const _ao8 = (input, _path, _exceptionable = true) => ("string" === typeof input.targetConfig || _assertGuard_1._assertGuard(_exceptionable, {
|
|
518
|
-
method: "typia.createAssert",
|
|
519
|
-
path: _path + ".targetConfig",
|
|
520
|
-
expected: "string",
|
|
521
|
-
value: input.targetConfig
|
|
522
|
-
}, _errorFactory)) && ("string" === typeof input.productCatalog || _assertGuard_1._assertGuard(_exceptionable, {
|
|
523
|
-
method: "typia.createAssert",
|
|
524
|
-
path: _path + ".productCatalog",
|
|
525
|
-
expected: "string",
|
|
526
|
-
value: input.productCatalog
|
|
527
|
-
}, _errorFactory)) && ("string" === typeof input.adPlacements || _assertGuard_1._assertGuard(_exceptionable, {
|
|
528
|
-
method: "typia.createAssert",
|
|
529
|
-
path: _path + ".adPlacements",
|
|
530
|
-
expected: "string",
|
|
531
|
-
value: input.adPlacements
|
|
532
|
-
}, _errorFactory)) && (undefined === input.platformTargetKind || "string" === typeof input.platformTargetKind || _assertGuard_1._assertGuard(_exceptionable, {
|
|
533
|
-
method: "typia.createAssert",
|
|
534
|
-
path: _path + ".platformTargetKind",
|
|
535
|
-
expected: "(string | undefined)",
|
|
536
|
-
value: input.platformTargetKind
|
|
537
|
-
}, _errorFactory)) && (undefined === input.platformAdapter || "string" === typeof input.platformAdapter || _assertGuard_1._assertGuard(_exceptionable, {
|
|
538
|
-
method: "typia.createAssert",
|
|
539
|
-
path: _path + ".platformAdapter",
|
|
540
|
-
expected: "(string | undefined)",
|
|
541
|
-
value: input.platformAdapter
|
|
542
|
-
}, _errorFactory));
|
|
543
|
-
const _ao9 = (input, _path, _exceptionable = true) => _ap1(input, _path, true && _exceptionable) && _ap2(input, _path, true && _exceptionable) && ((Array.isArray(input.products) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
544
|
-
method: "typia.createAssert",
|
|
545
|
-
path: _path + ".products",
|
|
546
|
-
expected: "ReadonlyArray<EffectiveProductConfig>",
|
|
547
|
-
value: input.products
|
|
548
|
-
}, _errorFactory)) && input.products.every((elem, _index3) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
549
|
-
method: "typia.createAssert",
|
|
550
|
-
path: _path + ".products[" + _index3 + "]",
|
|
551
|
-
expected: "EffectiveProductConfig",
|
|
552
|
-
value: elem
|
|
553
|
-
}, _errorFactory)) && _ao10(elem, _path + ".products[" + _index3 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
554
|
-
method: "typia.createAssert",
|
|
555
|
-
path: _path + ".products[" + _index3 + "]",
|
|
556
|
-
expected: "EffectiveProductConfig",
|
|
557
|
-
value: elem
|
|
558
|
-
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
559
|
-
method: "typia.createAssert",
|
|
560
|
-
path: _path + ".products",
|
|
561
|
-
expected: "ReadonlyArray<EffectiveProductConfig>",
|
|
562
|
-
value: input.products
|
|
563
|
-
}, _errorFactory));
|
|
564
627
|
const _au0 = (input, _path, _exceptionable = true) => (() => {
|
|
565
628
|
if ("currency" === input.type)
|
|
566
|
-
return
|
|
629
|
+
return _ao13(input, _path, true && _exceptionable);
|
|
567
630
|
else if ("entitlement" === input.type)
|
|
568
|
-
return
|
|
631
|
+
return _ao14(input, _path, true && _exceptionable);
|
|
569
632
|
else if ("resource" === input.type)
|
|
570
|
-
return
|
|
633
|
+
return _ao15(input, _path, true && _exceptionable);
|
|
571
634
|
else
|
|
572
635
|
return _assertGuard_1._assertGuard(_exceptionable, {
|
|
573
636
|
method: "typia.createAssert",
|
|
@@ -578,9 +641,9 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
578
641
|
})();
|
|
579
642
|
const _au1 = (input, _path, _exceptionable = true) => (() => {
|
|
580
643
|
if ("continue" === input.type)
|
|
581
|
-
return
|
|
644
|
+
return _ao18(input, _path, true && _exceptionable);
|
|
582
645
|
else if ("currency" === input.type)
|
|
583
|
-
return
|
|
646
|
+
return _ao19(input, _path, true && _exceptionable);
|
|
584
647
|
else
|
|
585
648
|
return _assertGuard_1._assertGuard(_exceptionable, {
|
|
586
649
|
method: "typia.createAssert",
|
|
@@ -596,41 +659,48 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
596
659
|
return true;
|
|
597
660
|
return "object" === typeof value && null !== value && _io2(value);
|
|
598
661
|
});
|
|
599
|
-
const _io10 = input =>
|
|
600
|
-
const _io11 = input =>
|
|
601
|
-
const _io12 = input => "
|
|
602
|
-
const _io13 = input =>
|
|
603
|
-
const _io14 = input => "
|
|
604
|
-
const _io15 = input =>
|
|
605
|
-
const _io16 = input => "
|
|
606
|
-
const _io17 = input =>
|
|
607
|
-
const _io18 = input => "
|
|
608
|
-
const _io19 = input =>
|
|
609
|
-
const _io2 = input => _ip0(input) && "string" === typeof input.target && true === _iv0.has(input.runtime) && ("object" === typeof input.release && null !== input.release &&
|
|
610
|
-
const _io20 = input =>
|
|
611
|
-
const _io21 = input => _ip7(input) && ("
|
|
612
|
-
const
|
|
613
|
-
const
|
|
614
|
-
const
|
|
615
|
-
const
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
662
|
+
const _io10 = input => "string" === typeof input.targetConfig && "string" === typeof input.productCatalog && "string" === typeof input.adPlacements && (undefined === input.platformTargetKind || "string" === typeof input.platformTargetKind) && (undefined === input.platformAdapter || "string" === typeof input.platformAdapter);
|
|
663
|
+
const _io11 = input => _ip1(input) && _ip2(input) && (Array.isArray(input.products) && input.products.every(elem => "object" === typeof elem && null !== elem && _io12(elem)));
|
|
664
|
+
const _io12 = input => _ip6(input) && ("consumable" === input.type || "non_consumable" === input.type || "subscription" === input.type) && ("object" === typeof input.grant && null !== input.grant && _iu0(input.grant)) && _ip7(input) && _ip8(input) && (undefined === input.platformProductId || "string" === typeof input.platformProductId);
|
|
665
|
+
const _io13 = input => _ip9(input) && _ip10(input) && _ip11(input);
|
|
666
|
+
const _io14 = input => "entitlement" === input.type && "string" === typeof input.entitlement;
|
|
667
|
+
const _io15 = input => "resource" === input.type && ("string" === typeof input.resource && 1 <= input.resource.length) && ("number" === typeof input.amount && (0 < input.amount && input.amount <= 1.7976931348623157e+308));
|
|
668
|
+
const _io16 = input => "boolean" === typeof input.bannerAds && _ip3(input) && _ip4(input) && (Array.isArray(input.placements) && input.placements.every(elem => "object" === typeof elem && null !== elem && _io17(elem)));
|
|
669
|
+
const _io17 = input => _ip6(input) && ("banner" === input.type || "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 && _io20(input.frequencyCap)) && _ip7(input) && _ip8(input) && (undefined === input.platformPlacementId || "string" === typeof input.platformPlacementId);
|
|
670
|
+
const _io18 = input => "continue" === input.type && _ip11(input);
|
|
671
|
+
const _io19 = input => _ip9(input) && _ip11(input) && _ip10(input);
|
|
672
|
+
const _io2 = input => (undefined === input.assetPacks || "object" === typeof input.assetPacks && null !== input.assetPacks && _io3(input.assetPacks)) && _ip0(input) && "string" === typeof input.target && true === _iv0.has(input.runtime) && ("object" === typeof input.release && null !== input.release && _io5(input.release)) && ("object" === typeof input.features && null !== input.features && _io6(input.features)) && ("object" === typeof input.capabilities && null !== input.capabilities && _io7(input.capabilities)) && ("object" === typeof input.integrations && null !== input.integrations && _io8(input.integrations)) && ("object" === typeof input.policy && null !== input.policy && _io9(input.policy)) && ("object" === typeof input.sources && null !== input.sources && _io10(input.sources)) && ("object" === typeof input.monetization && null !== input.monetization && _io11(input.monetization)) && ("object" === typeof input.ads && null !== input.ads && _io16(input.ads)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io21(input.leaderboard)) && ("object" === typeof input.storage && null !== input.storage && _io22(input.storage)) && ("object" === typeof input.localization && null !== input.localization && _io23(input.localization));
|
|
673
|
+
const _io20 = input => "number" === typeof input.cooldownSeconds && (undefined === input.maxPerSession || "number" === typeof input.maxPerSession) && (undefined === input.minStageInterval || "number" === typeof input.minStageInterval);
|
|
674
|
+
const _io21 = input => "boolean" === typeof input.native && _ip7(input) && ("action-required" === input.reason || "available" === input.reason || "capability-unsupported" === input.reason || "configuration-required" === input.reason || "target-disabled" === input.reason || "temporarily-unavailable" === input.reason) && (undefined === input.defaultLeaderboardId || "string" === typeof input.defaultLeaderboardId);
|
|
675
|
+
const _io22 = input => ("local" === input.support || "native" === input.support || "none" === input.support) && _ip7(input);
|
|
676
|
+
const _io23 = input => _ip7(input) && ("en" === input.fallbackLocale || "ko" === input.fallbackLocale);
|
|
677
|
+
const _io3 = input => ("packaged" === input.defaultLocation || "remote" === input.defaultLocation) && (undefined === input.packs || "object" === typeof input.packs && null !== input.packs && false === Array.isArray(input.packs) && _io4(input.packs)) && (undefined === input.offlineRequired || Array.isArray(input.offlineRequired) && input.offlineRequired.every(elem => "string" === typeof elem)) && (undefined === input.remoteBaseUrl || "string" === typeof input.remoteBaseUrl) && (undefined === input.maxPackagedBytes || "number" === typeof input.maxPackagedBytes);
|
|
678
|
+
const _io4 = input => Object.keys(input).every(key => {
|
|
679
|
+
const value = input[key];
|
|
680
|
+
if (undefined === value)
|
|
681
|
+
return true;
|
|
682
|
+
return "packaged" === value || "remote" === value;
|
|
683
|
+
});
|
|
684
|
+
const _io5 = input => true === _iv1.has(input.profile);
|
|
685
|
+
const _io6 = input => _ip1(input) && _ip2(input) && (undefined === input.bannerAds || "boolean" === typeof input.bannerAds) && _ip3(input) && _ip4(input) && "boolean" === typeof input.leaderboard && (undefined === input.nativeLeaderboard || "boolean" === typeof input.nativeLeaderboard) && (undefined === input.remoteLeaderboard || "boolean" === typeof input.remoteLeaderboard) && _ip5(input);
|
|
686
|
+
const _io7 = input => ("local" === input.storage || "native" === input.storage || "none" === input.storage) && _ip5(input);
|
|
687
|
+
const _io8 = input => ("action-required" === input.identityUpgrade || "approval-required" === input.identityUpgrade || "available" === input.identityUpgrade || "configuration-required" === input.identityUpgrade || "disabled" === input.identityUpgrade || "temporarily-unavailable" === input.identityUpgrade || "unsupported" === input.identityUpgrade) && ("action-required" === input.presentation || "approval-required" === input.presentation || "available" === input.presentation || "configuration-required" === input.presentation || "disabled" === input.presentation || "temporarily-unavailable" === input.presentation || "unsupported" === input.presentation) && ("action-required" === input.sharing || "approval-required" === input.sharing || "available" === input.sharing || "configuration-required" === input.sharing || "disabled" === input.sharing || "temporarily-unavailable" === input.sharing || "unsupported" === input.sharing) && ("action-required" === input.inboundShare || "approval-required" === input.inboundShare || "available" === input.inboundShare || "configuration-required" === input.inboundShare || "disabled" === input.inboundShare || "temporarily-unavailable" === input.inboundShare || "unsupported" === input.inboundShare) && ("action-required" === input.notifications || "approval-required" === input.notifications || "available" === input.notifications || "configuration-required" === input.notifications || "disabled" === input.notifications || "temporarily-unavailable" === input.notifications || "unsupported" === input.notifications) && ("fullscreen" === input.presentationMode || "inline-expanded" === input.presentationMode);
|
|
688
|
+
const _io9 = input => "boolean" === typeof input.externalPaymentAllowed && "boolean" === typeof input.remoteExecutableCodeAllowed && "boolean" === typeof input.installOtherAppCTAAllowed && "boolean" === typeof input.requiresStoreReview && "boolean" === typeof input.requiresAitReview;
|
|
619
689
|
const _iu0 = input => (() => {
|
|
620
690
|
if ("currency" === input.type)
|
|
621
|
-
return
|
|
691
|
+
return _io13(input);
|
|
622
692
|
else if ("entitlement" === input.type)
|
|
623
|
-
return
|
|
693
|
+
return _io14(input);
|
|
624
694
|
else if ("resource" === input.type)
|
|
625
|
-
return
|
|
695
|
+
return _io15(input);
|
|
626
696
|
else
|
|
627
697
|
return false;
|
|
628
698
|
})();
|
|
629
699
|
const _iu1 = input => (() => {
|
|
630
700
|
if ("continue" === input.type)
|
|
631
|
-
return
|
|
701
|
+
return _io18(input);
|
|
632
702
|
else if ("currency" === input.type)
|
|
633
|
-
return
|
|
703
|
+
return _io19(input);
|
|
634
704
|
else
|
|
635
705
|
return false;
|
|
636
706
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpgd/target-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Target-specific platform feature availability and effective config helpers for mpgd.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,11 @@
|
|
|
29
29
|
"types": "./dist/index.d.ts",
|
|
30
30
|
"default": "./dist/index.js"
|
|
31
31
|
},
|
|
32
|
-
"./targets.json": "./targets.json"
|
|
32
|
+
"./targets.json": "./targets.json",
|
|
33
|
+
"./asset-packs": {
|
|
34
|
+
"types": "./dist/asset-packs.d.ts",
|
|
35
|
+
"default": "./dist/asset-packs.js"
|
|
36
|
+
}
|
|
33
37
|
},
|
|
34
38
|
"files": [
|
|
35
39
|
"dist",
|
|
@@ -38,8 +42,8 @@
|
|
|
38
42
|
"dependencies": {
|
|
39
43
|
"typia": "13.0.2",
|
|
40
44
|
"@mpgd/catalog": "0.8.0",
|
|
41
|
-
"@mpgd/
|
|
42
|
-
"@mpgd/
|
|
45
|
+
"@mpgd/i18n": "0.6.8",
|
|
46
|
+
"@mpgd/platform": "0.17.0"
|
|
43
47
|
},
|
|
44
48
|
"devDependencies": {
|
|
45
49
|
"ttsc": "0.30.4",
|