@mpgd/target-config 0.18.0 → 0.19.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.js CHANGED
@@ -71,6 +71,20 @@ export function createEffectiveTargetConfig(input) {
71
71
  };
72
72
  }
73
73
  function resolveAuthoritativeGameServicesConfig(config, platformTarget) {
74
+ if (config.runtime === 'oneplay-web') {
75
+ // Independent server integrations are opt-in; an ordinary preview cannot authorize grants.
76
+ const authority = platformTarget?.authoritativeGameServices === true;
77
+ const iap = authority && config.features.iap && config.monetization.iap;
78
+ const rewardedAds = authority && config.features.rewardedAds && config.monetization.rewardedAds;
79
+ const interstitialAds = config.features.interstitialAds && config.monetization.interstitialAds;
80
+ const monetization = {
81
+ ...disabledAuthoritativeMonetization,
82
+ iap,
83
+ rewardedAds,
84
+ interstitialAds,
85
+ };
86
+ return { ...config, features: { ...config.features, ...monetization }, monetization };
87
+ }
74
88
  if (config.runtime === 'crazygames-web') {
75
89
  const interstitialAds = platformTarget?.crazyGamesLaunch === 'full' && config.features.interstitialAds && config.monetization.interstitialAds;
76
90
  const monetization = { ...disabledAuthoritativeMonetization, interstitialAds };
package/dist/index.js CHANGED
@@ -9,8 +9,8 @@ export * from './runtime.js';
9
9
  export * from './viewport.js';
10
10
  export const assertEffectiveTargetConfigMatrix = (() => {
11
11
  const _ip0 = input => "string" === typeof input["version"];
12
- const _iv0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "crazygames-web", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
13
- const _iv1 = new Set(["app-store", "apps-in-toss", "crazygames", "devvit", "google-play", "microsoft-store", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
12
+ const _iv0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "crazygames-web", "devvit-web", "microsoft-store-pwa", "oneplay-web", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
13
+ const _iv1 = new Set(["app-store", "apps-in-toss", "crazygames", "devvit", "google-play", "microsoft-store", "oneplay", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
14
14
  const _ip1 = input => "boolean" === typeof input["iap"];
15
15
  const _ip2 = input => undefined === input["subscriptions"] || "boolean" === typeof input["subscriptions"];
16
16
  const _ip3 = input => "boolean" === typeof input["rewardedAds"];
@@ -28,10 +28,10 @@ export const assertEffectiveTargetConfigMatrix = (() => {
28
28
  expected: "string",
29
29
  value: input["version"]
30
30
  }, _errorFactory);
31
- const _av0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "crazygames-web", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
32
- const _ae0 = "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"crazygames-web\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"tiktok-minigame\" | \"verse8-web\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
33
- const _av1 = new Set(["app-store", "apps-in-toss", "crazygames", "devvit", "google-play", "microsoft-store", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
34
- const _ae1 = "(\"app-store\" | \"apps-in-toss\" | \"crazygames\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"tiktok-minigame\" | \"verse8\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
31
+ const _av0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "crazygames-web", "devvit-web", "microsoft-store-pwa", "oneplay-web", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
32
+ const _ae0 = "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"crazygames-web\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"oneplay-web\" | \"tiktok-minigame\" | \"verse8-web\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
33
+ const _av1 = new Set(["app-store", "apps-in-toss", "crazygames", "devvit", "google-play", "microsoft-store", "oneplay", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
34
+ const _ae1 = "(\"app-store\" | \"apps-in-toss\" | \"crazygames\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"oneplay\" | \"tiktok-minigame\" | \"verse8\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
35
35
  const _ap1 = (input, _path, _exceptionable = true) => "boolean" === typeof input["iap"] || _assertGuard_1._assertGuard(_exceptionable, {
36
36
  method: "typia.createAssert",
37
37
  path: _path + ".iap",
@@ -655,15 +655,15 @@ export const assertEffectiveTargetConfigMatrix = (() => {
655
655
  };
656
656
  })();
657
657
  export const assertTargetConfigMatrix = (() => {
658
- const _iv0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "crazygames-web", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
658
+ const _iv0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "crazygames-web", "devvit-web", "microsoft-store-pwa", "oneplay-web", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
659
659
  const _ip0 = input => "boolean" === typeof input["iap"];
660
660
  const _ip1 = input => undefined === input["bannerAds"] || "boolean" === typeof input["bannerAds"];
661
661
  const _ip2 = input => "boolean" === typeof input["rewardedAds"];
662
662
  const _ip3 = input => "boolean" === typeof input["interstitialAds"];
663
663
  const _ip4 = input => "boolean" === typeof input["localization"];
664
- const _iv1 = new Set(["app-store", "apps-in-toss", "crazygames", "devvit", "google-play", "microsoft-store", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
665
- const _av0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "crazygames-web", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
666
- const _ae0 = "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"crazygames-web\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"tiktok-minigame\" | \"verse8-web\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
664
+ const _iv1 = new Set(["app-store", "apps-in-toss", "crazygames", "devvit", "google-play", "microsoft-store", "oneplay", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
665
+ const _av0 = new Set(["apps-in-toss", "capacitor-android", "capacitor-ios", "crazygames-web", "devvit-web", "microsoft-store-pwa", "oneplay-web", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
666
+ const _ae0 = "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"crazygames-web\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"oneplay-web\" | \"tiktok-minigame\" | \"verse8-web\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
667
667
  const _ap0 = (input, _path, _exceptionable = true) => "boolean" === typeof input["iap"] || _assertGuard_1._assertGuard(_exceptionable, {
668
668
  method: "typia.createAssert",
669
669
  path: _path + ".iap",
@@ -694,8 +694,8 @@ export const assertTargetConfigMatrix = (() => {
694
694
  expected: "boolean",
695
695
  value: input["localization"]
696
696
  }, _errorFactory);
697
- const _av1 = new Set(["app-store", "apps-in-toss", "crazygames", "devvit", "google-play", "microsoft-store", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
698
- const _ae1 = "(\"app-store\" | \"apps-in-toss\" | \"crazygames\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"tiktok-minigame\" | \"verse8\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
697
+ const _av1 = new Set(["app-store", "apps-in-toss", "crazygames", "devvit", "google-play", "microsoft-store", "oneplay", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
698
+ const _ae1 = "(\"app-store\" | \"apps-in-toss\" | \"crazygames\" | \"devvit\" | \"google-play\" | \"microsoft-store\" | \"oneplay\" | \"tiktok-minigame\" | \"verse8\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
699
699
  const _ae2 = "(\"action-required\" | \"approval-required\" | \"available\" | \"configuration-required\" | \"disabled\" | \"temporarily-unavailable\" | \"unsupported\")";
700
700
  const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.version || _assertGuard_1._assertGuard(_exceptionable, {
701
701
  method: "typia.createAssert",
package/dist/runtime.d.ts CHANGED
@@ -4,8 +4,8 @@ import type { EffectiveTargetConfig } from './effective.js';
4
4
  export type PlatformFeature = 'iap' | 'subscriptions' | 'bannerAds' | 'rewardedAds' | 'interstitialAds' | 'leaderboard' | 'nativeLeaderboard' | 'remoteLeaderboard' | 'localization';
5
5
  export type AdPlacementType = 'rewarded' | 'interstitial' | 'banner';
6
6
  type PlatformConfigTarget = PlatformGateway['target'];
7
- export type TargetRuntimeKind = 'web' | 'web-preview' | 'microsoft-store-pwa' | 'capacitor-android' | 'capacitor-ios' | 'apps-in-toss' | 'devvit-web' | 'verse8-web' | 'crazygames-web' | 'wechat-minigame' | 'tiktok-minigame';
8
- export type ReleaseProfile = 'web' | 'web-preview' | 'microsoft-store' | 'google-play' | 'app-store' | 'apps-in-toss' | 'devvit' | 'verse8' | 'crazygames' | 'wechat-minigame' | 'tiktok-minigame';
7
+ export type TargetRuntimeKind = 'web' | 'web-preview' | 'microsoft-store-pwa' | 'capacitor-android' | 'capacitor-ios' | 'apps-in-toss' | 'devvit-web' | 'verse8-web' | 'crazygames-web' | 'oneplay-web' | 'wechat-minigame' | 'tiktok-minigame';
8
+ export type ReleaseProfile = 'web' | 'web-preview' | 'microsoft-store' | 'google-play' | 'app-store' | 'apps-in-toss' | 'devvit' | 'verse8' | 'crazygames' | 'oneplay' | 'wechat-minigame' | 'tiktok-minigame';
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' | 'action-required' | 'configuration-required' | 'temporarily-unavailable' | 'unsupported';
package/dist/runtime.js CHANGED
@@ -32,6 +32,13 @@ const integrationUpperBoundsByRuntime = {
32
32
  inboundShare: 'unsupported',
33
33
  notifications: 'unsupported',
34
34
  },
35
+ 'oneplay-web': {
36
+ identityUpgrade: 'unsupported',
37
+ presentation: 'available',
38
+ sharing: 'unsupported',
39
+ inboundShare: 'unsupported',
40
+ notifications: 'unsupported',
41
+ },
35
42
  'tiktok-minigame': {
36
43
  identityUpgrade: 'unsupported',
37
44
  presentation: 'available',
@@ -104,6 +111,7 @@ export function assertTargetIntegrationRuntimeBounds(runtime, config, label) {
104
111
  if (runtime !== 'tiktok-minigame'
105
112
  && runtime !== 'verse8-web'
106
113
  && runtime !== 'crazygames-web'
114
+ && runtime !== 'oneplay-web'
107
115
  && runtime !== 'web-preview'
108
116
  && runtime !== 'wechat-minigame') {
109
117
  return integrations;
package/dist/viewport.js CHANGED
@@ -61,6 +61,7 @@ export function targetViewportShellForRuntime(runtime) {
61
61
  case 'capacitor-android':
62
62
  case 'capacitor-ios':
63
63
  case 'apps-in-toss':
64
+ case 'oneplay-web':
64
65
  return 'mobile-webview';
65
66
  case 'devvit-web':
66
67
  case 'verse8-web':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/target-config",
3
- "version": "0.18.0",
3
+ "version": "0.19.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/i18n": "0.6.7",
41
- "@mpgd/platform": "0.16.0",
42
- "@mpgd/catalog": "0.7.8"
40
+ "@mpgd/catalog": "0.8.0",
41
+ "@mpgd/platform": "0.17.0",
42
+ "@mpgd/i18n": "0.6.8"
43
43
  },
44
44
  "devDependencies": {
45
45
  "ttsc": "0.30.4",
package/targets.json CHANGED
@@ -432,6 +432,49 @@
432
432
  "requiresStoreReview": false,
433
433
  "requiresAitReview": false
434
434
  }
435
+ },
436
+ "oneplay": {
437
+ "runtime": "oneplay-web",
438
+ "features": {
439
+ "iap": false,
440
+ "rewardedAds": false,
441
+ "interstitialAds": false,
442
+ "leaderboard": false,
443
+ "localization": true
444
+ },
445
+ "capabilities": {
446
+ "storage": "local",
447
+ "localization": true
448
+ },
449
+ "localization": {
450
+ "fallbackLocale": "en"
451
+ },
452
+ "monetization": {
453
+ "iap": false,
454
+ "rewardedAds": false,
455
+ "interstitialAds": false
456
+ },
457
+ "leaderboard": {
458
+ "native": false
459
+ },
460
+ "release": {
461
+ "profile": "oneplay"
462
+ },
463
+ "integrations": {
464
+ "identityUpgrade": "unsupported",
465
+ "presentation": "available",
466
+ "sharing": "unsupported",
467
+ "inboundShare": "unsupported",
468
+ "notifications": "unsupported",
469
+ "presentationMode": "fullscreen"
470
+ },
471
+ "policy": {
472
+ "externalPaymentAllowed": false,
473
+ "remoteExecutableCodeAllowed": false,
474
+ "installOtherAppCTAAllowed": false,
475
+ "requiresStoreReview": true,
476
+ "requiresAitReview": false
477
+ }
435
478
  }
436
479
  }
437
480
  }