@mpgd/target-config 0.1.0 → 0.3.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/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 || "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 || "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\" | \"web-preview\")",
231
+ expected: "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"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 || "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 || "web-preview" === input.profile || _a._assertGuard(_exceptionable, {
335
335
  method: "typia.createAssert",
336
336
  path: _path + ".profile",
337
- expected: "(\"app-store\" | \"apps-in-toss\" | \"google-play\" | \"web-preview\")",
337
+ expected: "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"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 || "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 || "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 || "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;
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 || "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 || "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\" | \"web-preview\")",
602
+ expected: "(\"apps-in-toss\" | \"capacitor-android\" | \"capacitor-ios\" | \"devvit-web\" | \"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 || "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 || "web-preview" === input.profile || _a._assertGuard(_exceptionable, {
685
685
  method: "typia.createAssert",
686
686
  path: _path + ".profile",
687
- expected: "(\"app-store\" | \"apps-in-toss\" | \"google-play\" | \"web-preview\")",
687
+ expected: "(\"app-store\" | \"apps-in-toss\" | \"devvit\" | \"google-play\" | \"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 || "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 || "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 || "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 || "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';
7
- export type ReleaseProfile = 'web-preview' | 'google-play' | 'app-store' | 'apps-in-toss';
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';
8
8
  export type StorageSupport = 'local' | 'native' | 'none';
9
9
  export interface TargetFeatureConfig {
10
10
  readonly iap: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/target-config",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Target-specific platform feature availability and effective config helpers for mpgd.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -37,8 +37,8 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "typia": "rc",
40
- "@mpgd/platform": "0.1.0",
41
- "@mpgd/catalog": "0.1.0"
40
+ "@mpgd/catalog": "0.3.0",
41
+ "@mpgd/platform": "0.3.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "ttsc": "0.16.9",
package/targets.json CHANGED
@@ -128,6 +128,38 @@
128
128
  "requiresStoreReview": false,
129
129
  "requiresAitReview": true
130
130
  }
131
+ },
132
+ "reddit": {
133
+ "runtime": "devvit-web",
134
+ "features": {
135
+ "iap": false,
136
+ "rewardedAds": false,
137
+ "interstitialAds": false,
138
+ "leaderboard": true,
139
+ "localization": true
140
+ },
141
+ "capabilities": {
142
+ "storage": "native",
143
+ "localization": true
144
+ },
145
+ "monetization": {
146
+ "iap": false,
147
+ "rewardedAds": false,
148
+ "interstitialAds": false
149
+ },
150
+ "leaderboard": {
151
+ "native": true
152
+ },
153
+ "release": {
154
+ "profile": "devvit"
155
+ },
156
+ "policy": {
157
+ "externalPaymentAllowed": false,
158
+ "remoteExecutableCodeAllowed": false,
159
+ "installOtherAppCTAAllowed": false,
160
+ "requiresStoreReview": false,
161
+ "requiresAitReview": false
162
+ }
131
163
  }
132
164
  }
133
165
  }