@mpgd/cli 0.32.0 → 0.33.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.
Files changed (29) hide show
  1. package/dist/asset-pack-verify.js +5 -3
  2. package/dist/cloudflare-pages-static.js +1 -1
  3. package/dist/evidence-io.js +1 -1
  4. package/dist/game-acceptance.js +2 -2
  5. package/dist/gameplay-e2e.js +5 -5
  6. package/dist/hosted-pwa-deployment.js +2 -4
  7. package/dist/index.js +13 -4
  8. package/dist/microsoft-store-package-acceptance.js +1 -1
  9. package/dist/microsoft-store-package-generation-download.js +3 -3
  10. package/dist/microsoft-store-package-generation-input.js +1 -1
  11. package/dist/microsoft-store-package-generation-zip.js +1 -1
  12. package/dist/microsoft-store-submission.js +4 -4
  13. package/dist/offline-playtest.js +5 -5
  14. package/package.json +15 -15
  15. package/templates/phaser-game/apps/target-ait/package.json +4 -5
  16. package/templates/phaser-game/apps/target-ait/vite.config.ts +2 -7
  17. package/templates/phaser-game/apps/target-cloudflare-pages/package.json +2 -2
  18. package/templates/phaser-game/apps/target-devvit/package.json +2 -2
  19. package/templates/phaser-game/apps/target-devvit/src/server/index.ts +6 -12
  20. package/templates/phaser-game/package.json +3 -3
  21. package/templates/phaser-game/pnpm-workspace.yaml +0 -4
  22. package/templates/phaser-game/src/entry.ts +1 -4
  23. package/templates/phaser-game/src/gameEntry.ts +1 -4
  24. package/templates/phaser-game/src/platform/buildGateways/redditSandbox.ts +1 -4
  25. package/templates/phaser-game/src/platform/buildGateways/verse8.ts +1 -4
  26. package/templates/phaser-game/src/platform/devvitEntrypoint.ts +1 -4
  27. package/templates/phaser-game/tsconfig.json +1 -0
  28. package/templates/phaser-game/vite.runtime-target-config.ts +2 -2
  29. package/templates/phaser-game/vite.shared.ts +1 -3
@@ -5,7 +5,7 @@ import { verifyZipV1Archive, ZipDecodeError, } from '@mpgd/phaser-assets/archive
5
5
  import { defaultArchiveWorkerLimits } from '@mpgd/phaser-assets/archives';
6
6
  import { validatePhaserPackDeliveryManifest, } from '@mpgd/phaser-assets/pack-format';
7
7
  const DEFAULT_MANIFEST_BYTE_CAP = 32 * 1024 * 1024;
8
- const DEFAULT_VERIFY_TIMEOUT_MS = 120000;
8
+ const DEFAULT_VERIFY_TIMEOUT_MS = 120_000;
9
9
  /** The watchdog arms one millisecond after the deadline. Leave one
10
10
  * millisecond of headroom so the largest accepted timeout plus that offset
11
11
  * still fits the platform timer range instead of clamping to 1 ms. */
@@ -18,7 +18,7 @@ const STREAM_CHUNK_BYTES = 1024 * 1024;
18
18
  /** Inventory walking stops beyond this many files so an accidental root
19
19
  * choice cannot turn verification into an unbounded traversal; the report
20
20
  * marks the count truncated instead of failing silently. */
21
- const INVENTORY_FILE_CAP = 1000000;
21
+ const INVENTORY_FILE_CAP = 1_000_000;
22
22
  /** Same manifest artifact colliding under case folding means the deployment
23
23
  * is ambiguous on case-insensitive hosts. */
24
24
  /** Case-fold the collision key unconditionally: the verifier's host is not
@@ -667,7 +667,9 @@ export async function verifyAssetPackDelivery(options) {
667
667
  return {
668
668
  ok: failures.length === 0,
669
669
  manifest: {
670
- sha256: manifestBytes === undefined ? '' : createHash('sha256').update(manifestBytes).digest('hex'),
670
+ sha256: manifestBytes === undefined
671
+ ? ''
672
+ : createHash('sha256').update(manifestBytes).digest('hex'),
671
673
  bytes: manifestBytes?.byteLength ?? 0,
672
674
  format: manifest?.format ?? '',
673
675
  version: manifest?.version ?? 0,
@@ -9,7 +9,7 @@
9
9
  * being silently ignored.
10
10
  */
11
11
  const maximumHeaderBlocks = 100;
12
- const maximumLineLength = 2000;
12
+ const maximumLineLength = 2_000;
13
13
  const supportedRedirectCodes = new Set([301, 302, 303, 307, 308]);
14
14
  export function parseCloudflarePagesHeaders(input) {
15
15
  const lines = input.replaceAll('\r\n', '\n').replaceAll('\r', '\n').split('\n');
@@ -38,7 +38,7 @@ export function escapeMarkdownInline(value) {
38
38
  .replaceAll('\n', ' ');
39
39
  }
40
40
  export function formatDuration(durationMs) {
41
- return durationMs < 1000 ? `${durationMs}ms` : `${(durationMs / 1000).toFixed(1)}s`;
41
+ return durationMs < 1_000 ? `${durationMs}ms` : `${(durationMs / 1_000).toFixed(1)}s`;
42
42
  }
43
43
  export function formatError(error) {
44
44
  return error instanceof Error ? error.message : String(error);
@@ -3,9 +3,9 @@ import { existsSync, mkdirSync, rmSync } from 'node:fs';
3
3
  import path from 'node:path';
4
4
  import { escapeMarkdownInline, escapeMarkdownTable, formatDuration, formatError, readBoundedUtf8File, relativeOrAbsolute, writeEvidenceReportFiles, } from './evidence-io.js';
5
5
  import { collectGameplayE2EPathEvidence, maximumGameplayE2EStates, readGameplayE2EPlan, resolveGameplayE2EPathInsideGameRoot, } from './gameplay-e2e.js';
6
- export const defaultGameAcceptanceCommandTimeoutMs = 30 * 60 * 1000;
6
+ export const defaultGameAcceptanceCommandTimeoutMs = 30 * 60 * 1_000;
7
7
  const defaultGameAcceptanceReleaseManifestFile = 'artifacts/release-manifest.json';
8
- export const maximumGameplayE2EReportBytes = 1024 * 1024;
8
+ export const maximumGameplayE2EReportBytes = 1_024 * 1_024;
9
9
  export function resolveGameAcceptanceReleaseManifestFile(gameRoot, env = process.env) {
10
10
  const configuredFile = env.MPGD_RELEASE_MANIFEST_FILE;
11
11
  return path.resolve(gameRoot, configuredFile === undefined || configuredFile.length === 0
@@ -7,13 +7,13 @@ const gameplayStateIdPattern = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u;
7
7
  const gameplayKeyControlCharacterPattern = /[\u0000-\u001f\u007f]/u;
8
8
  export const maximumGameplayE2EStates = 50;
9
9
  const maximumActionsPerState = 100;
10
- const maximumWaitMs = 60000;
11
- const maximumBackgroundMs = 5 * 60000;
12
- const maximumHashReadChunkBytes = 64 * 1024;
10
+ const maximumWaitMs = 60_000;
11
+ const maximumBackgroundMs = 5 * 60_000;
12
+ const maximumHashReadChunkBytes = 64 * 1_024;
13
13
  const defaultGameplayE2EHashLimits = {
14
14
  maximumDepth: 128,
15
- maximumEntries: 100000,
16
- maximumTotalFileBytes: 4 * 1024 * 1024 * 1024,
15
+ maximumEntries: 100_000,
16
+ maximumTotalFileBytes: 4 * 1_024 * 1_024 * 1_024,
17
17
  };
18
18
  class GameplayE2EAggregatedError extends Error {
19
19
  errors;
@@ -966,7 +966,7 @@ function decodeCssEscapes(value) {
966
966
  return plain ?? '';
967
967
  }
968
968
  const codePoint = Number.parseInt(hex, 16);
969
- return codePoint > 1114111 || Number.isNaN(codePoint)
969
+ return codePoint > 0x10_ffff || Number.isNaN(codePoint)
970
970
  ? '\uFFFD'
971
971
  : String.fromCodePoint(codePoint);
972
972
  });
@@ -1161,9 +1161,7 @@ function verifyCloudflarePagesHeaders(deploymentRoot, sourceFiles, deploymentFil
1161
1161
  if (sourcePaths.has(file.slice(1))) {
1162
1162
  requirements.push({
1163
1163
  requestPath: file,
1164
- expected: noStoreCacheControlFiles.has(file)
1165
- ? noStoreCacheControl
1166
- : freshCacheControl,
1164
+ expected: noStoreCacheControlFiles.has(file) ? noStoreCacheControl : freshCacheControl,
1167
1165
  label: file.slice(1),
1168
1166
  });
1169
1167
  }
package/dist/index.js CHANGED
@@ -2192,9 +2192,7 @@ function createGameApp(input) {
2192
2192
  relativePath: file.relativePath,
2193
2193
  content: file.content,
2194
2194
  });
2195
- return prepared === undefined
2196
- ? []
2197
- : [{ ...file, content: renderTemplate(prepared, context) }];
2195
+ return prepared === undefined ? [] : [{ ...file, content: renderTemplate(prepared, context) }];
2198
2196
  });
2199
2197
  if (input.dryRun) {
2200
2198
  console.info(`Would create ${path.relative(process.cwd(), appDir) || appDir}:`);
@@ -2285,8 +2283,17 @@ function createTemplateContext(input) {
2285
2283
  if (input.workspace && kitPath === undefined) {
2286
2284
  throw new Error('Could not detect an mpgd-kit checkout for --workspace. Pass --kit-path or set MPGD_KIT_PATH.');
2287
2285
  }
2288
- const workspaceRoot = toTemplatePath(path.relative(input.appDir, kitPath ?? input.appDir) || '.');
2286
+ const relativeKitPath = path.relative(input.appDir, kitPath ?? input.appDir);
2287
+ if (input.workspace && path.isAbsolute(relativeKitPath)) {
2288
+ throw new Error('--workspace requires the game and mpgd-kit to share a filesystem root.');
2289
+ }
2290
+ const workspaceRoot = toTemplatePath(relativeKitPath || '.');
2289
2291
  const workspacePrefix = workspaceRoot;
2292
+ // The normalized relative path's parent hops reach the common source root.
2293
+ // Do not inherit the kit's narrower root when the game is a sibling checkout.
2294
+ const tsconfigRootDir = input.workspace
2295
+ ? workspacePrefix.split('/').filter((segment) => segment === '..').join('/') || '.'
2296
+ : '.';
2290
2297
  const mpgdDependencyVersionReplacements = resolveMpgdDependencyVersionReplacements({
2291
2298
  ...(input.dependencyVersion === undefined
2292
2299
  ? {}
@@ -2307,6 +2314,7 @@ function createTemplateContext(input) {
2307
2314
  tsconfigExtendsLine: input.workspace
2308
2315
  ? ` "extends": "${workspacePrefix}/tsconfig.base.json",`
2309
2316
  : '',
2317
+ tsconfigRootDir,
2310
2318
  tsconfigWorkspaceIncludes: input.workspace
2311
2319
  ? [
2312
2320
  `,\n "${workspacePrefix}/packages/**/*.ts"`,
@@ -2424,6 +2432,7 @@ function renderTemplate(content, context) {
2424
2432
  .replaceAll('__PACKAGE_NAME__', context.packageName)
2425
2433
  .replaceAll('__MPGD_DEPENDENCY_VERSION__', context.defaultDependencyVersion)
2426
2434
  .replaceAll('__TSCONFIG_EXTENDS_LINE__', context.tsconfigExtendsLine)
2435
+ .replaceAll('__TSCONFIG_ROOT_DIR__', context.tsconfigRootDir)
2427
2436
  .replaceAll('__TSCONFIG_WORKSPACE_INCLUDES__', context.tsconfigWorkspaceIncludes)
2428
2437
  .replaceAll('__TSCONFIG_WORKSPACE_EXCLUDES__', context.tsconfigWorkspaceExcludes)
2429
2438
  .replaceAll('__WORKSPACE_I18N_BUILD_PREFIX__', context.workspaceI18nBuildPrefix)
@@ -6,7 +6,7 @@ import path from 'node:path';
6
6
  import { escapeMarkdownInline, escapeMarkdownTable, formatError, relativeOrAbsolute, } from './evidence-io.js';
7
7
  export const microsoftStorePackageAcceptanceSchemaVersion = 1;
8
8
  const supportedPackageExtensions = ['.appx', '.appxbundle', '.msix', '.msixbundle'];
9
- const maximumWindowsPackageCommandDurationMs = 60 * 60 * 1000;
9
+ const maximumWindowsPackageCommandDurationMs = 60 * 60 * 1_000;
10
10
  const maximumWindowsPackageCommandOutputBytes = 16 * 1024 * 1024;
11
11
  const maximumWindowsPackageCommandDiagnosticCharacters = 8 * 1024;
12
12
  const xmlNamedEntities = {
@@ -11,9 +11,9 @@ import { assertMicrosoftStorePackageZip } from './microsoft-store-package-genera
11
11
  const maximumManifestBytes = 1024 * 1024;
12
12
  const maximumManifestIconBytes = 2 * 1024 * 1024;
13
13
  const maximumArchiveBytes = 512 * 1024 * 1024;
14
- const manifestRequestTimeoutMs = 30000;
15
- const manifestIconRequestTimeoutMs = 30000;
16
- const packageRequestTimeoutMs = 10 * 60 * 1000;
14
+ const manifestRequestTimeoutMs = 30_000;
15
+ const manifestIconRequestTimeoutMs = 30_000;
16
+ const packageRequestTimeoutMs = 10 * 60 * 1_000;
17
17
  const blockedIpv4Addresses = createBlockedIpv4Addresses();
18
18
  const blockedIpv6Addresses = createBlockedIpv6Addresses();
19
19
  const allowedIpv6GlobalUnicastAddresses = createAllowedIpv6GlobalUnicastAddresses();
@@ -261,7 +261,7 @@ function requireStorePackageVersion(input, label) {
261
261
  }
262
262
  const numbers = parts.map(Number);
263
263
  if (numbers[0] === 0
264
- || numbers.some((part) => part > 65535)
264
+ || numbers.some((part) => part > 65_535)
265
265
  || (numbers[3] ?? 0) !== 0) {
266
266
  throw new Error(`${label} must start from 1, keep every part at or below 65535, and end in .0.`);
267
267
  }
@@ -10,7 +10,7 @@ export function assertMicrosoftStorePackageZip(file, sizeBytes) {
10
10
  if (header.readUInt32LE(0) !== 0x04034b50) {
11
11
  throw new Error('PWABuilder package archive must start with a ZIP local file header.');
12
12
  }
13
- const tailLength = Math.min(sizeBytes, 65557);
13
+ const tailLength = Math.min(sizeBytes, 65_557);
14
14
  const tail = Buffer.allocUnsafe(tailLength);
15
15
  readExactly(descriptor, tail, sizeBytes - tailLength);
16
16
  const endOffset = findEndOfCentralDirectory(tail);
@@ -7,7 +7,7 @@ import { escapeMarkdownInline, escapeMarkdownTable, formatError, relativeOrAbsol
7
7
  import { isMicrosoftStoreSupportedListingLocale } from './microsoft-store-supported-locales.js';
8
8
  export const microsoftStoreSubmissionSchemaVersion = 1;
9
9
  // Microsoft Store listing and package identity limits documented by Microsoft Learn.
10
- const maximumStoreDescriptionCharacters = 10000;
10
+ const maximumStoreDescriptionCharacters = 10_000;
11
11
  const maximumStoreDesktopScreenshots = 10;
12
12
  const maximumStoreManifestIcons = 32;
13
13
  const maximumStoreScreenshotBytes = 50 * 1024 * 1024;
@@ -907,20 +907,20 @@ function pngPassLength(size, start, step) {
907
907
  return size <= start ? 0 : Math.ceil((size - start) / step);
908
908
  }
909
909
  function crc32Png(parts) {
910
- let crc = 4294967295;
910
+ let crc = 0xffff_ffff;
911
911
  for (const part of parts) {
912
912
  for (const byte of part) {
913
913
  crc = (crc >>> 8) ^ (pngCrc32Table[(crc ^ byte) & 0xff] ?? 0);
914
914
  }
915
915
  }
916
- return (crc ^ 4294967295) >>> 0;
916
+ return (crc ^ 0xffff_ffff) >>> 0;
917
917
  }
918
918
  function createPngCrc32Table() {
919
919
  const table = new Uint32Array(256);
920
920
  for (let value = 0; value < table.length; value += 1) {
921
921
  let crc = value;
922
922
  for (let bit = 0; bit < 8; bit += 1) {
923
- crc = (crc >>> 1) ^ (crc & 1 ? 3988292384 : 0);
923
+ crc = (crc >>> 1) ^ (crc & 1 ? 0xedb8_8320 : 0);
924
924
  }
925
925
  table[value] = crc >>> 0;
926
926
  }
@@ -3142,7 +3142,7 @@ function assertSupportedHtmlDocument(html) {
3142
3142
  throw new Error('Offline playtest does not support content before the head element.');
3143
3143
  }
3144
3144
  const charsetEndBytes = Buffer.byteLength(`${html.slice(0, headTag.end)}\n${offlineCharsetDeclaration}`);
3145
- if (charsetEndBytes > 1024) {
3145
+ if (charsetEndBytes > 1_024) {
3146
3146
  throw new Error('Offline playtest requires the generated UTF-8 charset declaration within the first 1024 bytes.');
3147
3147
  }
3148
3148
  const activeHtml = maskInertHtmlTemplateContents(html);
@@ -5340,9 +5340,9 @@ function assertSelfContainedGltf(gltfFile, source) {
5340
5340
  assertNoExternalGltfUri(gltfFile, parsed);
5341
5341
  }
5342
5342
  function assertSelfContainedGlb(glbFile, source) {
5343
- const glbMagic = 1179937895;
5344
- const jsonChunkType = 1313821514;
5345
- const binaryChunkType = 5130562;
5343
+ const glbMagic = 0x4654_6C67;
5344
+ const jsonChunkType = 0x4E4F_534A;
5345
+ const binaryChunkType = 0x004E_4942;
5346
5346
  if (source.length < 24
5347
5347
  || source.length % 4 !== 0
5348
5348
  || source.readUInt32LE(0) !== glbMagic
@@ -5696,7 +5696,7 @@ function decodeHtmlCharacterReferences(value) {
5696
5696
  function safeCodePoint(value) {
5697
5697
  return !Number.isInteger(value)
5698
5698
  || value <= 0
5699
- || value > 1114111
5699
+ || value > 0x10_FFFF
5700
5700
  || (value >= 0xD800 && value <= 0xDFFF)
5701
5701
  ? '\uFFFD'
5702
5702
  : String.fromCodePoint(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/cli",
3
- "version": "0.32.0",
3
+ "version": "0.33.1",
4
4
  "description": "Gunshi CLI for mpgd-kit starter generation and target workflow orchestration.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -47,24 +47,24 @@
47
47
  "esbuild": "^0.28.1",
48
48
  "gunshi": "^0.35.1",
49
49
  "undici": "^7.28.0",
50
- "@mpgd/phaser-assets": "0.6.0"
50
+ "@mpgd/phaser-assets": "0.7.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "^24.0.0",
54
- "ttsc": "0.18.4",
54
+ "ttsc": "0.30.4",
55
55
  "typescript": "7.0.2",
56
- "@mpgd/adapter-browser": "0.7.3",
57
- "@mpgd/adapter-capacitor": "0.4.10",
58
- "@mpgd/adapter-devvit": "0.9.8",
59
- "@mpgd/adapter-ait": "0.12.1",
60
- "@mpgd/adapter-verse8": "0.3.6",
61
- "@mpgd/bridge": "0.9.0",
62
- "@mpgd/catalog": "0.7.2",
63
- "@mpgd/i18n": "0.6.1",
64
- "@mpgd/platform": "0.12.0",
65
- "@mpgd/game-services": "0.15.1",
66
- "@mpgd/target-config": "0.15.0",
67
- "@mpgd/analytics": "0.3.12"
56
+ "@mpgd/adapter-ait": "0.12.3",
57
+ "@mpgd/adapter-browser": "0.7.4",
58
+ "@mpgd/adapter-devvit": "0.9.9",
59
+ "@mpgd/adapter-capacitor": "0.4.11",
60
+ "@mpgd/adapter-verse8": "0.3.7",
61
+ "@mpgd/analytics": "0.3.13",
62
+ "@mpgd/bridge": "0.9.1",
63
+ "@mpgd/game-services": "0.15.2",
64
+ "@mpgd/i18n": "0.6.2",
65
+ "@mpgd/target-config": "0.15.1",
66
+ "@mpgd/platform": "0.12.1",
67
+ "@mpgd/catalog": "0.7.3"
68
68
  },
69
69
  "main": "./dist/index.js",
70
70
  "types": "./dist/index.d.ts",
@@ -16,15 +16,14 @@
16
16
  "fix": "ttsc fix"
17
17
  },
18
18
  "dependencies": {
19
- "@apps-in-toss/web-framework": "3.1.1",
19
+ "@apps-in-toss/web-framework": "3.5.0",
20
20
  "@mpgd/adapter-ait": "__MPGD_DEPENDENCY_VERSION_ADAPTER_AIT__"
21
21
  },
22
22
  "devDependencies": {
23
- "@ait-co/devtools": "^0.1.140",
24
- "@apps-in-toss/cli": "3.1.1",
25
- "@ttsc/unplugin": "0.18.4",
23
+ "@apps-in-toss/cli": "3.5.0",
24
+ "@ttsc/unplugin": "0.30.4",
26
25
  "@types/node": "^24.0.0",
27
- "ttsc": "0.18.4",
26
+ "ttsc": "0.30.4",
28
27
  "typescript": "7.0.2",
29
28
  "vite": "8.1.3"
30
29
  }
@@ -1,9 +1,6 @@
1
1
  import { readFileSync } from 'node:fs';
2
2
 
3
- import {
4
- extractAitAdBridgeConfig,
5
- type AitAdBridgeConfig,
6
- } from '@mpgd/adapter-ait/ad-config';
3
+ import { extractAitAdBridgeConfig, type AitAdBridgeConfig } from '@mpgd/adapter-ait/ad-config';
7
4
  import ttsc from '@ttsc/unplugin/vite';
8
5
  import { defineConfig, type Plugin } from 'vite';
9
6
 
@@ -58,9 +55,7 @@ function createAitRuntimeConfigPlugin(input: Readonly<{
58
55
  return id === publicId ? resolvedId : null;
59
56
  },
60
57
  load(id) {
61
- return id === resolvedId
62
- ? `export default Object.freeze(${JSON.stringify(input)});\n`
63
- : null;
58
+ return id === resolvedId ? `export default Object.freeze(${JSON.stringify(input)});\n` : null;
64
59
  },
65
60
  };
66
61
  }
@@ -19,8 +19,8 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@cloudflare/workers-types": "^5.20260707.1",
22
- "@ttsc/unplugin": "0.18.4",
23
- "ttsc": "0.18.4",
22
+ "@ttsc/unplugin": "0.30.4",
23
+ "ttsc": "0.30.4",
24
24
  "typescript": "7.0.2",
25
25
  "vite": "8.1.3",
26
26
  "wrangler": "^4.107.0"
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@devvit/start": "0.14.1",
28
- "@ttsc/unplugin": "0.18.4",
28
+ "@ttsc/unplugin": "0.30.4",
29
29
  "@types/node": "^24.0.0",
30
30
  "devvit": "0.14.1",
31
- "ttsc": "0.18.4",
31
+ "ttsc": "0.30.4",
32
32
  "typescript": "7.0.2",
33
33
  "vite": "7.3.6"
34
34
  }
@@ -1,6 +1,6 @@
1
1
  import type { IncomingMessage, ServerResponse } from 'node:http';
2
2
 
3
- import { createServer, context, getServerPort, reddit, redis } from '@devvit/web/server';
3
+ import { context, createServer, getServerPort, reddit, redis } from '@devvit/web/server';
4
4
  import type { UiResponse } from '@devvit/web/shared';
5
5
  import {
6
6
  bridgeStorageLoadProtocol,
@@ -9,10 +9,7 @@ import {
9
9
  type BridgeResponse,
10
10
  type BridgeStorageLoadData,
11
11
  } from '@mpgd/bridge';
12
- import {
13
- createBridgeRpcRouter,
14
- defaultBridgeRpcEndpoint,
15
- } from '@mpgd/bridge/orpc';
12
+ import { createBridgeRpcRouter, defaultBridgeRpcEndpoint } from '@mpgd/bridge/orpc';
16
13
  import { createBridgeRpcNodeHandler } from '@mpgd/bridge/orpc/node';
17
14
 
18
15
  const maxStorageKeyLength = 128;
@@ -21,13 +18,10 @@ const maxStorageValueBytes = 262_144;
21
18
  const maxRequestBodySize = 1_048_576;
22
19
  const gameName = '__GAME_NAME__';
23
20
  const gameTitle = __GAME_TITLE_TS_LITERAL__;
24
- const bridgeRpcHandler = createBridgeRpcNodeHandler(
25
- createBridgeRpcRouter(handleBridgeRequest),
26
- {
27
- maxBodySize: maxRequestBodySize,
28
- prefix: defaultBridgeRpcEndpoint,
29
- },
30
- );
21
+ const bridgeRpcHandler = createBridgeRpcNodeHandler(createBridgeRpcRouter(handleBridgeRequest), {
22
+ maxBodySize: maxRequestBodySize,
23
+ prefix: defaultBridgeRpcEndpoint,
24
+ });
31
25
 
32
26
  async function handleHttpRequest(
33
27
  request: IncomingMessage,
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@ait-co/polyfill": "^0.1.19",
59
- "@apps-in-toss/web-framework": "3.1.1",
59
+ "@apps-in-toss/web-framework": "3.5.0",
60
60
  "@mpgd/adapter-ait": "__MPGD_DEPENDENCY_VERSION_ADAPTER_AIT__",
61
61
  "@mpgd/adapter-browser": "__MPGD_DEPENDENCY_VERSION_ADAPTER_BROWSER__",
62
62
  "@mpgd/adapter-capacitor": "__MPGD_DEPENDENCY_VERSION_ADAPTER_CAPACITOR__",
@@ -76,9 +76,9 @@
76
76
  "@ait-co/console-cli": "^0.1.49",
77
77
  "@cloudflare/workers-types": "^5.20260707.1",
78
78
  "@mpgd/cli": "__MPGD_DEPENDENCY_VERSION_CLI__",
79
- "@ttsc/unplugin": "0.18.4",
79
+ "@ttsc/unplugin": "0.30.4",
80
80
  "@types/node": "^24.0.0",
81
- "ttsc": "0.18.4",
81
+ "ttsc": "0.30.4",
82
82
  "typescript": "7.0.2",
83
83
  "vite": "8.1.3",
84
84
  "wrangler": "^4.107.0"
@@ -5,13 +5,9 @@ __PNPM_WORKSPACE_KIT_PACKAGES__
5
5
  allowBuilds:
6
6
  '@sentry/cli': true
7
7
  '@swc/core': true
8
- cloudflared: false
9
8
  esbuild: true
10
9
  protobufjs: true
11
10
  sharp: true
12
11
  workerd: true
13
12
  overrides:
14
13
  '@xmldom/xmldom': '0.9.12'
15
- peerDependencyRules:
16
- allowedVersions:
17
- '@ait-co/devtools>@apps-in-toss/web-framework': '3.1.1'
@@ -1,10 +1,7 @@
1
1
  import gameProjectConfig from '../mpgd.game.json';
2
2
 
3
3
  import { renderEntryFailure } from './runtime/renderEntryFailure';
4
- import {
5
- installTextSelectionPolicy,
6
- resolveTextSelectionMode,
7
- } from './platform/textSelection';
4
+ import { installTextSelectionPolicy, resolveTextSelectionMode } from './platform/textSelection';
8
5
 
9
6
  try {
10
7
  installTextSelectionPolicy(
@@ -1,10 +1,7 @@
1
1
  import gameProjectConfig from '../mpgd.game.json';
2
2
 
3
3
  import { renderEntryFailure } from './runtime/renderEntryFailure';
4
- import {
5
- installTextSelectionPolicy,
6
- resolveTextSelectionMode,
7
- } from './platform/textSelection';
4
+ import { installTextSelectionPolicy, resolveTextSelectionMode } from './platform/textSelection';
8
5
 
9
6
  try {
10
7
  installTextSelectionPolicy(
@@ -1,7 +1,4 @@
1
- import {
2
- createDevvitPlatformGateway,
3
- createDevvitSandboxBridge,
4
- } from '@mpgd/adapter-devvit';
1
+ import { createDevvitPlatformGateway, createDevvitSandboxBridge } from '@mpgd/adapter-devvit';
5
2
  import type { PlatformGateway } from '@mpgd/platform';
6
3
 
7
4
  import type { RuntimeConfig } from '../runtimeDetector';
@@ -1,8 +1,5 @@
1
1
  import { createVerse8PlatformGateway } from '@mpgd/adapter-verse8';
2
- import {
3
- resolveAdPlacementPlatformId,
4
- type AdPlacements,
5
- } from '@mpgd/catalog';
2
+ import { resolveAdPlacementPlatformId, type AdPlacements } from '@mpgd/catalog';
6
3
  import adPlacementsJson from '@mpgd/catalog/placements.json';
7
4
  import type { PlatformGateway } from '@mpgd/platform';
8
5
 
@@ -1,7 +1,4 @@
1
- import {
2
- requestDevvitExpandedMode,
3
- startDevvitPreviewWebView,
4
- } from '@mpgd/adapter-devvit/web';
1
+ import { requestDevvitExpandedMode, startDevvitPreviewWebView } from '@mpgd/adapter-devvit/web';
5
2
 
6
3
  const expandedRequestRecoveryMs = 8_000;
7
4
 
@@ -2,6 +2,7 @@
2
2
  __TSCONFIG_EXTENDS_LINE__
3
3
  "compilerOptions": {
4
4
  "target": "ES2022",
5
+ "rootDir": "__TSCONFIG_ROOT_DIR__",
5
6
  "useDefineForClassFields": true,
6
7
  "strict": true,
7
8
  "strictNullChecks": true,
@@ -30,8 +30,8 @@ const releaseProfiles = valueSet({
30
30
  'google-play': true,
31
31
  'app-store': true,
32
32
  'apps-in-toss': true,
33
- 'devvit': true,
34
- 'verse8': true,
33
+ devvit: true,
34
+ verse8: true,
35
35
  'wechat-minigame': true,
36
36
  'tiktok-minigame': true,
37
37
  } satisfies Record<ReleaseProfile, true>);
@@ -249,9 +249,7 @@ function readRuntimePlatformTarget(
249
249
  target.authoritativeGameServices !== undefined
250
250
  && typeof target.authoritativeGameServices !== 'boolean'
251
251
  ) {
252
- throw new Error(
253
- `Platform target ${configTarget} authoritativeGameServices must be a boolean.`,
254
- );
252
+ throw new Error(`Platform target ${configTarget} authoritativeGameServices must be a boolean.`);
255
253
  }
256
254
 
257
255
  return {