@mpgd/target-config 0.3.2 → 0.3.3
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.js +9 -2
- package/dist/index.js +12 -12
- package/dist/runtime.d.ts +2 -2
- package/package.json +1 -1
- package/targets.json +32 -0
package/dist/effective.js
CHANGED
|
@@ -121,13 +121,20 @@ function productPlatformId(product, target) {
|
|
|
121
121
|
if (!isStoreBackedTarget(target)) {
|
|
122
122
|
return undefined;
|
|
123
123
|
}
|
|
124
|
-
return product.platformProductIds[target];
|
|
124
|
+
return normalizePlatformId(product.platformProductIds[target]);
|
|
125
125
|
}
|
|
126
126
|
function adPlacementPlatformId(placement, target) {
|
|
127
127
|
if (!isStoreBackedTarget(target)) {
|
|
128
128
|
return undefined;
|
|
129
129
|
}
|
|
130
|
-
return placement.platformPlacementIds[target];
|
|
130
|
+
return normalizePlatformId(placement.platformPlacementIds[target]);
|
|
131
|
+
}
|
|
132
|
+
function normalizePlatformId(platformId) {
|
|
133
|
+
if (platformId === undefined) {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
const trimmed = platformId.trim();
|
|
137
|
+
return trimmed.length === 0 ? undefined : trimmed;
|
|
131
138
|
}
|
|
132
139
|
function isStoreBackedTarget(target) {
|
|
133
140
|
return target === 'android' || target === 'ios' || target === 'ait';
|
package/dist/index.js
CHANGED
|
@@ -225,10 +225,10 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
225
225
|
path: _path + ".target",
|
|
226
226
|
expected: "string",
|
|
227
227
|
value: input.target
|
|
228
|
-
}, _errorFactory)) && ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "web-preview" === input.runtime || _a._assertGuard(_exceptionable, {
|
|
228
|
+
}, _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 || _a._assertGuard(_exceptionable, {
|
|
229
229
|
method: "typia.createAssert",
|
|
230
230
|
path: _path + ".runtime",
|
|
231
|
-
expected: "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"web-preview\")",
|
|
231
|
+
expected: "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"web-preview\")",
|
|
232
232
|
value: input.runtime
|
|
233
233
|
}, _errorFactory)) && (("object" === typeof input.release && null !== input.release || _a._assertGuard(_exceptionable, {
|
|
234
234
|
method: "typia.createAssert",
|
|
@@ -331,10 +331,10 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
331
331
|
expected: "EffectiveLocalizationConfig",
|
|
332
332
|
value: input.localization
|
|
333
333
|
}, _errorFactory));
|
|
334
|
-
const _ao3 = (input, _path, _exceptionable = true) => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "web-preview" === input.profile || _a._assertGuard(_exceptionable, {
|
|
334
|
+
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 || _a._assertGuard(_exceptionable, {
|
|
335
335
|
method: "typia.createAssert",
|
|
336
336
|
path: _path + ".profile",
|
|
337
|
-
expected: "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"web-preview\")",
|
|
337
|
+
expected: "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"web-preview\")",
|
|
338
338
|
value: input.profile
|
|
339
339
|
}, _errorFactory);
|
|
340
340
|
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 || _a._assertGuard(_exceptionable, {
|
|
@@ -491,8 +491,8 @@ export const assertEffectiveTargetConfigMatrix = (() => {
|
|
|
491
491
|
const _io17 = input => "boolean" === typeof input.native && _ip5(input) && ("available" === input.reason || "capability-unsupported" === input.reason || "target-disabled" === input.reason) && (undefined === input.defaultLeaderboardId || "string" === typeof input.defaultLeaderboardId);
|
|
492
492
|
const _io18 = input => ("local" === input.support || "native" === input.support || "none" === input.support) && _ip5(input);
|
|
493
493
|
const _io19 = input => _ip5(input);
|
|
494
|
-
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 || "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.policy && null !== input.policy && _io6(input.policy)) && ("object" === typeof input.sources && null !== input.sources && _io7(input.sources)) && ("object" === typeof input.monetization && null !== input.monetization && _io8(input.monetization)) && ("object" === typeof input.ads && null !== input.ads && _io12(input.ads)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io17(input.leaderboard)) && ("object" === typeof input.storage && null !== input.storage && _io18(input.storage)) && ("object" === typeof input.localization && null !== input.localization && _io19(input.localization));
|
|
495
|
-
const _io3 = input => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "web-preview" === input.profile;
|
|
494
|
+
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.policy && null !== input.policy && _io6(input.policy)) && ("object" === typeof input.sources && null !== input.sources && _io7(input.sources)) && ("object" === typeof input.monetization && null !== input.monetization && _io8(input.monetization)) && ("object" === typeof input.ads && null !== input.ads && _io12(input.ads)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io17(input.leaderboard)) && ("object" === typeof input.storage && null !== input.storage && _io18(input.storage)) && ("object" === typeof input.localization && null !== input.localization && _io19(input.localization));
|
|
495
|
+
const _io3 = 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;
|
|
496
496
|
const _io4 = input => _ip1(input) && _ip2(input) && _ip3(input) && "boolean" === typeof input.leaderboard && _ip4(input);
|
|
497
497
|
const _io5 = input => ("local" === input.storage || "native" === input.storage || "none" === input.storage) && _ip4(input);
|
|
498
498
|
const _io6 = input => "boolean" === typeof input.externalPaymentAllowed && "boolean" === typeof input.remoteExecutableCodeAllowed && "boolean" === typeof input.installOtherAppCTAAllowed && "boolean" === typeof input.requiresStoreReview && "boolean" === typeof input.requiresAitReview;
|
|
@@ -596,10 +596,10 @@ export const assertTargetConfigMatrix = (() => {
|
|
|
596
596
|
value: value
|
|
597
597
|
}, _errorFactory);
|
|
598
598
|
});
|
|
599
|
-
const _ao2 = (input, _path, _exceptionable = true) => ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-web" === input.runtime || "web-preview" === input.runtime || _a._assertGuard(_exceptionable, {
|
|
599
|
+
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 || _a._assertGuard(_exceptionable, {
|
|
600
600
|
method: "typia.createAssert",
|
|
601
601
|
path: _path + ".runtime",
|
|
602
|
-
expected: "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"web-preview\")",
|
|
602
|
+
expected: "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"web-preview\")",
|
|
603
603
|
value: input.runtime
|
|
604
604
|
}, _errorFactory)) && (("object" === typeof input.features && null !== input.features || _a._assertGuard(_exceptionable, {
|
|
605
605
|
method: "typia.createAssert",
|
|
@@ -681,10 +681,10 @@ export const assertTargetConfigMatrix = (() => {
|
|
|
681
681
|
expected: "boolean",
|
|
682
682
|
value: input.native
|
|
683
683
|
}, _errorFactory);
|
|
684
|
-
const _ao7 = (input, _path, _exceptionable = true) => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "web-preview" === input.profile || _a._assertGuard(_exceptionable, {
|
|
684
|
+
const _ao7 = (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 || _a._assertGuard(_exceptionable, {
|
|
685
685
|
method: "typia.createAssert",
|
|
686
686
|
path: _path + ".profile",
|
|
687
|
-
expected: "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"web-preview\")",
|
|
687
|
+
expected: "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"web-preview\")",
|
|
688
688
|
value: input.profile
|
|
689
689
|
}, _errorFactory);
|
|
690
690
|
const _ao8 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.externalPaymentAllowed || _a._assertGuard(_exceptionable, {
|
|
@@ -720,12 +720,12 @@ export const assertTargetConfigMatrix = (() => {
|
|
|
720
720
|
return true;
|
|
721
721
|
return "object" === typeof value && null !== value && _io2(value);
|
|
722
722
|
});
|
|
723
|
-
const _io2 = input => ("apps-in-toss" === input.runtime || "capacitor-android" === input.runtime || "capacitor-ios" === input.runtime || "devvit-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.monetization && null !== input.monetization && _io5(input.monetization)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io6(input.leaderboard)) && ("object" === typeof input.release && null !== input.release && _io7(input.release)) && ("object" === typeof input.policy && null !== input.policy && _io8(input.policy));
|
|
723
|
+
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.monetization && null !== input.monetization && _io5(input.monetization)) && ("object" === typeof input.leaderboard && null !== input.leaderboard && _io6(input.leaderboard)) && ("object" === typeof input.release && null !== input.release && _io7(input.release)) && ("object" === typeof input.policy && null !== input.policy && _io8(input.policy));
|
|
724
724
|
const _io3 = input => _ip0(input) && _ip1(input) && _ip2(input) && "boolean" === typeof input.leaderboard && _ip3(input);
|
|
725
725
|
const _io4 = input => ("local" === input.storage || "native" === input.storage || "none" === input.storage) && _ip3(input);
|
|
726
726
|
const _io5 = input => _ip0(input) && _ip1(input) && _ip2(input);
|
|
727
727
|
const _io6 = input => "boolean" === typeof input.native;
|
|
728
|
-
const _io7 = input => "app-store" === input.profile || "apps-in-toss" === input.profile || "devvit" === input.profile || "google-play" === input.profile || "web-preview" === input.profile;
|
|
728
|
+
const _io7 = 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;
|
|
729
729
|
const _io8 = input => "boolean" === typeof input.externalPaymentAllowed && "boolean" === typeof input.remoteExecutableCodeAllowed && "boolean" === typeof input.installOtherAppCTAAllowed && "boolean" === typeof input.requiresStoreReview && "boolean" === typeof input.requiresAitReview;
|
|
730
730
|
const __is = input => "object" === typeof input && null !== input && _io0(input);
|
|
731
731
|
let _errorFactory;
|
package/dist/runtime.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import type { EffectiveTargetConfig } from './effective';
|
|
|
3
3
|
export type PlatformFeature = 'iap' | 'rewardedAds' | 'interstitialAds' | 'leaderboard' | 'localization';
|
|
4
4
|
export type AdPlacementType = 'rewarded' | 'interstitial';
|
|
5
5
|
type PlatformConfigTarget = PlatformGateway['target'];
|
|
6
|
-
export type TargetRuntimeKind = 'web-preview' | 'capacitor-android' | 'capacitor-ios' | 'apps-in-toss' | 'devvit-web';
|
|
7
|
-
export type ReleaseProfile = 'web-preview' | 'google-play' | 'app-store' | 'apps-in-toss' | 'devvit';
|
|
6
|
+
export type TargetRuntimeKind = 'web-preview' | 'microsoft-store-pwa' | 'capacitor-android' | 'capacitor-ios' | 'apps-in-toss' | 'devvit-web';
|
|
7
|
+
export type ReleaseProfile = 'web-preview' | 'microsoft-store' | 'google-play' | 'app-store' | 'apps-in-toss' | 'devvit';
|
|
8
8
|
export type StorageSupport = 'local' | 'native' | 'none';
|
|
9
9
|
export interface TargetFeatureConfig {
|
|
10
10
|
readonly iap: boolean;
|
package/package.json
CHANGED
package/targets.json
CHANGED
|
@@ -33,6 +33,38 @@
|
|
|
33
33
|
"requiresAitReview": false
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
+
"microsoft-store": {
|
|
37
|
+
"runtime": "microsoft-store-pwa",
|
|
38
|
+
"features": {
|
|
39
|
+
"iap": false,
|
|
40
|
+
"rewardedAds": false,
|
|
41
|
+
"interstitialAds": false,
|
|
42
|
+
"leaderboard": false,
|
|
43
|
+
"localization": true
|
|
44
|
+
},
|
|
45
|
+
"capabilities": {
|
|
46
|
+
"storage": "local",
|
|
47
|
+
"localization": true
|
|
48
|
+
},
|
|
49
|
+
"monetization": {
|
|
50
|
+
"iap": false,
|
|
51
|
+
"rewardedAds": false,
|
|
52
|
+
"interstitialAds": false
|
|
53
|
+
},
|
|
54
|
+
"leaderboard": {
|
|
55
|
+
"native": false
|
|
56
|
+
},
|
|
57
|
+
"release": {
|
|
58
|
+
"profile": "microsoft-store"
|
|
59
|
+
},
|
|
60
|
+
"policy": {
|
|
61
|
+
"externalPaymentAllowed": false,
|
|
62
|
+
"remoteExecutableCodeAllowed": false,
|
|
63
|
+
"installOtherAppCTAAllowed": false,
|
|
64
|
+
"requiresStoreReview": true,
|
|
65
|
+
"requiresAitReview": false
|
|
66
|
+
}
|
|
67
|
+
},
|
|
36
68
|
"android": {
|
|
37
69
|
"runtime": "capacitor-android",
|
|
38
70
|
"features": {
|