@mpgd/target-config 0.17.1 → 0.18.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.
@@ -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 crazyGamesLaunch?: 'basic' | 'full';
7
8
  readonly authoritativeGameServices?: boolean;
8
9
  readonly artifact?: string;
9
10
  readonly output?: string;
package/dist/effective.js CHANGED
@@ -71,6 +71,11 @@ export function createEffectiveTargetConfig(input) {
71
71
  };
72
72
  }
73
73
  function resolveAuthoritativeGameServicesConfig(config, platformTarget) {
74
+ if (config.runtime === 'crazygames-web') {
75
+ const interstitialAds = platformTarget?.crazyGamesLaunch === 'full' && config.features.interstitialAds && config.monetization.interstitialAds;
76
+ const monetization = { ...disabledAuthoritativeMonetization, interstitialAds };
77
+ return { ...config, features: { ...config.features, ...monetization }, monetization };
78
+ }
74
79
  if (platformTarget?.authoritativeGameServices !== false) {
75
80
  return config;
76
81
  }
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", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
13
- const _iv1 = new Set(["app-store", "apps-in-toss", "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", "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"]);
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", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
32
- const _ae0 = "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"microsoft-store-pwa\" | \"tiktok-minigame\" | \"verse8-web\" | \"web\" | \"web-preview\" | \"wechat-minigame\")";
33
- const _av1 = new Set(["app-store", "apps-in-toss", "devvit", "google-play", "microsoft-store", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
34
- const _ae1 = "(\"app-store\" | \"apps-in-toss\" | \"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", "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\")";
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", "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", "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", "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", "devvit-web", "microsoft-store-pwa", "tiktok-minigame", "verse8-web", "web", "web-preview", "wechat-minigame"]);
666
- const _ae0 = "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"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", "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\")";
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", "devvit", "google-play", "microsoft-store", "tiktok-minigame", "verse8", "web", "web-preview", "wechat-minigame"]);
698
- const _ae1 = "(\"app-store\" | \"apps-in-toss\" | \"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", "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\")";
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' | 'wechat-minigame' | 'tiktok-minigame';
8
- export type ReleaseProfile = 'web' | 'web-preview' | 'microsoft-store' | 'google-play' | 'app-store' | 'apps-in-toss' | 'devvit' | 'verse8' | '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' | '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';
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
@@ -25,6 +25,13 @@ export const targetIntegrations = [
25
25
  'notifications',
26
26
  ];
27
27
  const integrationUpperBoundsByRuntime = {
28
+ 'crazygames-web': {
29
+ identityUpgrade: 'unsupported',
30
+ presentation: 'available',
31
+ sharing: 'unsupported',
32
+ inboundShare: 'unsupported',
33
+ notifications: 'unsupported',
34
+ },
28
35
  'tiktok-minigame': {
29
36
  identityUpgrade: 'unsupported',
30
37
  presentation: 'available',
@@ -96,6 +103,7 @@ export function assertTargetIntegrationRuntimeBounds(runtime, config, label) {
96
103
  const integrations = normalizeTargetIntegrationConfig(config);
97
104
  if (runtime !== 'tiktok-minigame'
98
105
  && runtime !== 'verse8-web'
106
+ && runtime !== 'crazygames-web'
99
107
  && runtime !== 'web-preview'
100
108
  && runtime !== 'wechat-minigame') {
101
109
  return integrations;
package/dist/viewport.js CHANGED
@@ -64,6 +64,7 @@ export function targetViewportShellForRuntime(runtime) {
64
64
  return 'mobile-webview';
65
65
  case 'devvit-web':
66
66
  case 'verse8-web':
67
+ case 'crazygames-web':
67
68
  return 'embedded-webview';
68
69
  case 'wechat-minigame':
69
70
  case 'tiktok-minigame':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/target-config",
3
- "version": "0.17.1",
3
+ "version": "0.18.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.7.7",
41
- "@mpgd/i18n": "0.6.6",
42
- "@mpgd/platform": "0.15.0"
40
+ "@mpgd/i18n": "0.6.7",
41
+ "@mpgd/platform": "0.16.0",
42
+ "@mpgd/catalog": "0.7.8"
43
43
  },
44
44
  "devDependencies": {
45
45
  "ttsc": "0.30.4",
package/targets.json CHANGED
@@ -389,6 +389,49 @@
389
389
  "requiresStoreReview": true,
390
390
  "requiresAitReview": false
391
391
  }
392
+ },
393
+ "crazygames": {
394
+ "runtime": "crazygames-web",
395
+ "features": {
396
+ "iap": false,
397
+ "rewardedAds": false,
398
+ "interstitialAds": true,
399
+ "leaderboard": false,
400
+ "localization": true
401
+ },
402
+ "capabilities": {
403
+ "storage": "local",
404
+ "localization": true
405
+ },
406
+ "localization": {
407
+ "fallbackLocale": "en"
408
+ },
409
+ "monetization": {
410
+ "iap": false,
411
+ "rewardedAds": false,
412
+ "interstitialAds": true
413
+ },
414
+ "leaderboard": {
415
+ "native": false
416
+ },
417
+ "release": {
418
+ "profile": "crazygames"
419
+ },
420
+ "integrations": {
421
+ "identityUpgrade": "unsupported",
422
+ "presentation": "available",
423
+ "sharing": "unsupported",
424
+ "inboundShare": "unsupported",
425
+ "notifications": "unsupported",
426
+ "presentationMode": "fullscreen"
427
+ },
428
+ "policy": {
429
+ "externalPaymentAllowed": false,
430
+ "remoteExecutableCodeAllowed": false,
431
+ "installOtherAppCTAAllowed": false,
432
+ "requiresStoreReview": false,
433
+ "requiresAitReview": false
434
+ }
392
435
  }
393
436
  }
394
437
  }