@mpgd/cli 0.44.0 → 0.46.1

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "kitGitSha": "cfab2886b7ff459b5f7cd32d162ad7bfa85929a9",
2
+ "kitGitSha": "6799cf86c8d5257db83fa5f8c56c2a74b720ae73",
3
3
  "kitDirty": false,
4
- "packageVersion": "0.44.0"
4
+ "packageVersion": "0.46.1"
5
5
  }
@@ -6372,12 +6372,17 @@ var assertTargetConfigMatrix = /* @__PURE__ */ (() => {
6372
6372
  expected: "boolean",
6373
6373
  value: input.native
6374
6374
  }, _errorFactory);
6375
- const _ao8 = (input, _path, _exceptionable = true) => true === _av1.has(input.profile) || _assertGuard_14._assertGuard(_exceptionable, {
6375
+ const _ao8 = (input, _path, _exceptionable = true) => (true === _av1.has(input.profile) || _assertGuard_14._assertGuard(_exceptionable, {
6376
6376
  method: "typia.createAssert",
6377
6377
  path: _path + ".profile",
6378
6378
  expected: _ae1,
6379
6379
  value: input.profile
6380
- }, _errorFactory);
6380
+ }, _errorFactory)) && (void 0 === input.billingAuthority || "host" === input.billingAuthority || "store" === input.billingAuthority || _assertGuard_14._assertGuard(_exceptionable, {
6381
+ method: "typia.createAssert",
6382
+ path: _path + ".billingAuthority",
6383
+ expected: '("host" | "store" | undefined)',
6384
+ value: input.billingAuthority
6385
+ }, _errorFactory));
6381
6386
  const _ao9 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.externalPaymentAllowed || _assertGuard_14._assertGuard(_exceptionable, {
6382
6387
  method: "typia.createAssert",
6383
6388
  path: _path + ".externalPaymentAllowed",
@@ -6418,7 +6423,7 @@ var assertTargetConfigMatrix = /* @__PURE__ */ (() => {
6418
6423
  const _io5 = (input) => "en" === input.fallbackLocale || "ko" === input.fallbackLocale;
6419
6424
  const _io6 = (input) => _ip0(input) && _ip1(input) && _ip2(input) && _ip3(input);
6420
6425
  const _io7 = (input) => "boolean" === typeof input.native;
6421
- const _io8 = (input) => true === _iv1.has(input.profile);
6426
+ const _io8 = (input) => true === _iv1.has(input.profile) && (void 0 === input.billingAuthority || "host" === input.billingAuthority || "store" === input.billingAuthority);
6422
6427
  const _io9 = (input) => "boolean" === typeof input.externalPaymentAllowed && "boolean" === typeof input.remoteExecutableCodeAllowed && "boolean" === typeof input.installOtherAppCTAAllowed && "boolean" === typeof input.requiresStoreReview && "boolean" === typeof input.requiresAitReview;
6423
6428
  const __is = (input) => "object" === typeof input && null !== input && _io0(input);
6424
6429
  let _errorFactory;
@@ -6672,12 +6677,17 @@ var assertTargetConfigExtensions = /* @__PURE__ */ (() => {
6672
6677
  expected: "boolean",
6673
6678
  value: input.native
6674
6679
  }, _errorFactory);
6675
- const _ao8 = (input, _path, _exceptionable = true) => true === _av1.has(input.profile) || _assertGuard_14._assertGuard(_exceptionable, {
6680
+ const _ao8 = (input, _path, _exceptionable = true) => (true === _av1.has(input.profile) || _assertGuard_14._assertGuard(_exceptionable, {
6676
6681
  method: "typia.createAssert",
6677
6682
  path: _path + ".profile",
6678
6683
  expected: _ae1,
6679
6684
  value: input.profile
6680
- }, _errorFactory);
6685
+ }, _errorFactory)) && (void 0 === input.billingAuthority || "host" === input.billingAuthority || "store" === input.billingAuthority || _assertGuard_14._assertGuard(_exceptionable, {
6686
+ method: "typia.createAssert",
6687
+ path: _path + ".billingAuthority",
6688
+ expected: '("host" | "store" | undefined)',
6689
+ value: input.billingAuthority
6690
+ }, _errorFactory));
6681
6691
  const _ao9 = (input, _path, _exceptionable = true) => ("boolean" === typeof input.externalPaymentAllowed || _assertGuard_14._assertGuard(_exceptionable, {
6682
6692
  method: "typia.createAssert",
6683
6693
  path: _path + ".externalPaymentAllowed",
@@ -6718,7 +6728,7 @@ var assertTargetConfigExtensions = /* @__PURE__ */ (() => {
6718
6728
  const _io5 = (input) => "en" === input.fallbackLocale || "ko" === input.fallbackLocale;
6719
6729
  const _io6 = (input) => _ip0(input) && _ip1(input) && _ip2(input) && _ip3(input);
6720
6730
  const _io7 = (input) => "boolean" === typeof input.native;
6721
- const _io8 = (input) => true === _iv1.has(input.profile);
6731
+ const _io8 = (input) => true === _iv1.has(input.profile) && (void 0 === input.billingAuthority || "host" === input.billingAuthority || "store" === input.billingAuthority);
6722
6732
  const _io9 = (input) => "boolean" === typeof input.externalPaymentAllowed && "boolean" === typeof input.remoteExecutableCodeAllowed && "boolean" === typeof input.installOtherAppCTAAllowed && "boolean" === typeof input.requiresStoreReview && "boolean" === typeof input.requiresAitReview;
6723
6733
  const __is = (input) => "object" === typeof input && null !== input && _io0(input);
6724
6734
  let _errorFactory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/cli",
3
- "version": "0.44.0",
3
+ "version": "0.46.1",
4
4
  "description": "Gunshi CLI for mpgd-kit starter generation and target workflow orchestration.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -58,9 +58,9 @@
58
58
  "undici": "^7.29.1",
59
59
  "vite": "8.1.3",
60
60
  "yauzl": "3.4.0",
61
- "@mpgd/catalog": "0.9.1",
61
+ "@mpgd/catalog": "0.9.3",
62
62
  "@mpgd/phaser-assets": "0.9.0",
63
- "@mpgd/target-config": "0.21.3"
63
+ "@mpgd/target-config": "0.22.1"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/node": "^24.0.0",
@@ -68,17 +68,17 @@
68
68
  "@types/yauzl": "3.4.0",
69
69
  "ttsc": "0.30.4",
70
70
  "typescript": "7.0.2",
71
- "@mpgd/adapter-browser": "0.10.0",
72
- "@mpgd/adapter-ait": "0.15.0",
73
- "@mpgd/adapter-capacitor": "0.9.0",
74
- "@mpgd/adapter-devvit": "0.9.20",
75
- "@mpgd/adapter-verse8": "0.4.6",
76
- "@mpgd/analytics": "0.4.6",
77
- "@mpgd/game-services": "0.21.0",
78
- "@mpgd/bridge": "0.12.1",
79
- "@mpgd/game-runtime": "0.6.3",
80
- "@mpgd/platform": "0.20.0",
81
- "@mpgd/i18n": "0.6.11"
71
+ "@mpgd/adapter-ait": "0.15.2",
72
+ "@mpgd/adapter-capacitor": "0.9.2",
73
+ "@mpgd/adapter-browser": "0.10.2",
74
+ "@mpgd/adapter-devvit": "0.10.1",
75
+ "@mpgd/adapter-verse8": "0.6.0",
76
+ "@mpgd/analytics": "0.4.8",
77
+ "@mpgd/bridge": "0.12.3",
78
+ "@mpgd/game-services": "0.22.0",
79
+ "@mpgd/game-runtime": "0.6.5",
80
+ "@mpgd/platform": "0.22.0",
81
+ "@mpgd/i18n": "0.6.13"
82
82
  },
83
83
  "main": "./dist/index.js",
84
84
  "types": "./dist/index.d.ts",
@@ -113,9 +113,16 @@ deployed-app log inspection. See the official
113
113
  register it once in the developer's global Codex configuration:
114
114
 
115
115
  ```sh
116
- codex mcp add devvit -- npx -y @devvit/mcp
116
+ codex mcp add devvit -- mise --no-config exec node@22 -- npx -y @devvit/mcp@0.0.27
117
117
  ```
118
118
 
119
+ The server needs Node 22: `@devvit/mcp` 0.0.27 depends on `better-sqlite3`
120
+ 11.9.1, which ships prebuilt binaries for Node 22 but not 24 and does not
121
+ build on 26. `--no-config` keeps mise from passing your mise-managed
122
+ environment to the server. Without mise, register `npx -y @devvit/mcp@0.0.27`
123
+ only if the MCP client's `PATH` resolves `npx` from Node 22. Running
124
+ `codex mcp add devvit` again replaces an older registration.
125
+
119
126
  Restart Codex or begin a new task after registering it. Use `devvit_search`
120
127
  before broad Devvit documentation exploration. Use the experimental
121
128
  `devvit_logs` tool for a deployed app and subreddit when diagnosing production
@@ -48,6 +48,14 @@ export interface DevvitBridgeRedisLike {
48
48
  watch(...keys: readonly string[]): Promise<DevvitBridgeRedisTransactionLike>;
49
49
  }
50
50
 
51
+ /**
52
+ * Serves the six `commerce.v2.*` bridge methods: `createDevvitCommerceV2BridgeHandler`
53
+ * from `@mpgd/adapter-devvit/server` over the Devvit `payments` plugin.
54
+ */
55
+ export interface DevvitBridgeCommerceHandler {
56
+ request(input: BridgeRequest): Promise<BridgeResponse>;
57
+ }
58
+
51
59
  export interface DevvitBridgeHandlerDependencies {
52
60
  readonly redis: DevvitBridgeRedisLike;
53
61
  /** Authenticated Reddit user ID from the Devvit request context, never from the payload. */
@@ -58,6 +66,12 @@ export interface DevvitBridgeHandlerDependencies {
58
66
  * game name so saves stay namespaced per game inside the shared Redis.
59
67
  */
60
68
  readonly storageKeyNamespace?: string | undefined;
69
+ /**
70
+ * Commerce v2 over the payments plugin. Absent, every `commerce.v2.*` method
71
+ * fails closed with `COMMERCE_V2_UNAVAILABLE`, so a server without the
72
+ * plugin wired never lists orders or products.
73
+ */
74
+ readonly commerce?: DevvitBridgeCommerceHandler | undefined;
61
75
  readonly warn?: ((message: string) => void) | undefined;
62
76
  }
63
77
 
@@ -197,14 +211,17 @@ export function createDevvitBridgeHandler(
197
211
  case 'storage.save':
198
212
  return saveStorage(input, dependencies, storageKeyNamespace, warn);
199
213
 
200
- // Commerce v2 providers arrive with the B-phase PRs (B6 for Devvit).
214
+ // Commerce v2 (B6): served by the configured handler over the payments
215
+ // plugin; the checkout itself opens in the webview.
201
216
  case 'commerce.v2.getCapabilities':
202
217
  case 'commerce.v2.fetchProducts':
203
218
  case 'commerce.v2.requestPurchase':
204
219
  case 'commerce.v2.getAvailablePurchases':
205
220
  case 'commerce.v2.finishTransaction':
206
221
  case 'commerce.v2.restorePurchases':
207
- return createCommerceV2UnavailableBridgeError(input, 'Devvit server bridge');
222
+ return dependencies.commerce === undefined
223
+ ? createCommerceV2UnavailableBridgeError(input, 'Devvit server bridge')
224
+ : dependencies.commerce.request(input);
208
225
 
209
226
  default:
210
227
  return createBridgeError(
@@ -1,3 +1,4 @@
1
+ import type { CommerceBillingAuthority } from '@mpgd/platform/commerce-wallet';
1
2
  import type {
2
3
  IntegrationAvailabilityState,
3
4
  PresentationMode,
@@ -57,6 +58,10 @@ const presentationModeValues = valueSet({
57
58
  fullscreen: true,
58
59
  'inline-expanded': true,
59
60
  } satisfies Record<PresentationMode, true>);
61
+ const billingAuthorities = valueSet({
62
+ store: true,
63
+ host: true,
64
+ } satisfies Record<CommerceBillingAuthority, true>);
60
65
  const targetIntegrations = Object.keys({
61
66
  identityUpgrade: true,
62
67
  presentation: true,
@@ -113,6 +118,13 @@ function assertTargetConfig(input: unknown, label: string): asserts input is Tar
113
118
 
114
119
  assertRecord(input.release, `${label}.release`);
115
120
  assertOneOf(input.release.profile, releaseProfiles, `${label}.release.profile`);
121
+ if (input.release.billingAuthority !== undefined) {
122
+ assertOneOf(
123
+ input.release.billingAuthority,
124
+ billingAuthorities,
125
+ `${label}.release.billingAuthority`,
126
+ );
127
+ }
116
128
 
117
129
  assertRecord(input.policy, `${label}.policy`);
118
130
  assertBooleanFields(