@mpgd/cli 0.31.0 → 0.33.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/asset-pack-build.d.ts +32 -0
- package/dist/asset-pack-build.js +411 -0
- package/dist/asset-pack-verify.d.ts +76 -0
- package/dist/asset-pack-verify.js +922 -0
- package/dist/asset-pack-zip.d.ts +19 -0
- package/dist/asset-pack-zip.js +81 -0
- package/dist/bin.js +6 -1
- package/dist/cloudflare-pages-static.js +1 -1
- package/dist/evidence-io.js +1 -1
- package/dist/game-acceptance.js +2 -2
- package/dist/gameplay-e2e.js +5 -5
- package/dist/hosted-pwa-deployment.js +2 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +296 -5
- package/dist/microsoft-store-package-acceptance.js +1 -1
- package/dist/microsoft-store-package-generation-download.js +3 -3
- package/dist/microsoft-store-package-generation-input.js +1 -1
- package/dist/microsoft-store-package-generation-zip.js +1 -1
- package/dist/microsoft-store-submission.js +4 -4
- package/dist/offline-playtest.js +5 -5
- package/package.json +16 -16
- package/templates/phaser-game/apps/target-ait/package.json +4 -5
- package/templates/phaser-game/apps/target-ait/vite.config.ts +2 -7
- package/templates/phaser-game/apps/target-cloudflare-pages/package.json +2 -2
- package/templates/phaser-game/apps/target-devvit/package.json +2 -2
- package/templates/phaser-game/apps/target-devvit/src/server/index.ts +6 -12
- package/templates/phaser-game/package.json +3 -3
- package/templates/phaser-game/pnpm-workspace.yaml +0 -4
- package/templates/phaser-game/src/entry.ts +1 -4
- package/templates/phaser-game/src/gameEntry.ts +1 -4
- package/templates/phaser-game/src/platform/buildGateways/redditSandbox.ts +1 -4
- package/templates/phaser-game/src/platform/buildGateways/verse8.ts +1 -4
- package/templates/phaser-game/src/platform/devvitEntrypoint.ts +1 -4
- package/templates/phaser-game/tsconfig.json +1 -0
- package/templates/phaser-game/vite.runtime-target-config.ts +2 -2
- package/templates/phaser-game/vite.shared.ts +1 -3
package/dist/offline-playtest.js
CHANGED
|
@@ -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 >
|
|
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 =
|
|
5344
|
-
const jsonChunkType =
|
|
5345
|
-
const binaryChunkType =
|
|
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 >
|
|
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.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Gunshi CLI for mpgd-kit starter generation and target workflow orchestration.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -46,25 +46,25 @@
|
|
|
46
46
|
"entities": "^8.0.0",
|
|
47
47
|
"esbuild": "^0.28.1",
|
|
48
48
|
"gunshi": "^0.35.1",
|
|
49
|
-
"undici": "^7.28.0"
|
|
49
|
+
"undici": "^7.28.0",
|
|
50
|
+
"@mpgd/phaser-assets": "0.7.0"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@types/node": "^24.0.0",
|
|
53
|
-
"ttsc": "0.
|
|
54
|
+
"ttsc": "0.30.4",
|
|
54
55
|
"typescript": "7.0.2",
|
|
55
|
-
"@mpgd/adapter-
|
|
56
|
-
"@mpgd/adapter-capacitor": "0.4.
|
|
57
|
-
"@mpgd/adapter-
|
|
58
|
-
"@mpgd/adapter-
|
|
59
|
-
"@mpgd/adapter-
|
|
60
|
-
"@mpgd/analytics": "0.3.
|
|
61
|
-
"@mpgd/
|
|
62
|
-
"@mpgd/
|
|
63
|
-
"@mpgd/
|
|
64
|
-
"@mpgd/
|
|
65
|
-
"@mpgd/
|
|
66
|
-
"@mpgd/
|
|
67
|
-
"@mpgd/i18n": "0.6.1"
|
|
56
|
+
"@mpgd/adapter-browser": "0.7.4",
|
|
57
|
+
"@mpgd/adapter-capacitor": "0.4.11",
|
|
58
|
+
"@mpgd/adapter-devvit": "0.9.9",
|
|
59
|
+
"@mpgd/adapter-ait": "0.12.2",
|
|
60
|
+
"@mpgd/adapter-verse8": "0.3.7",
|
|
61
|
+
"@mpgd/analytics": "0.3.13",
|
|
62
|
+
"@mpgd/game-services": "0.15.2",
|
|
63
|
+
"@mpgd/catalog": "0.7.3",
|
|
64
|
+
"@mpgd/platform": "0.12.1",
|
|
65
|
+
"@mpgd/i18n": "0.6.2",
|
|
66
|
+
"@mpgd/target-config": "0.15.1",
|
|
67
|
+
"@mpgd/bridge": "0.9.1"
|
|
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.
|
|
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
|
-
"@
|
|
24
|
-
"@
|
|
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.
|
|
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
|
}
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@devvit/start": "0.14.1",
|
|
28
|
-
"@ttsc/unplugin": "0.
|
|
28
|
+
"@ttsc/unplugin": "0.30.4",
|
|
29
29
|
"@types/node": "^24.0.0",
|
|
30
30
|
"devvit": "0.14.1",
|
|
31
|
-
"ttsc": "0.
|
|
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 {
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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.
|
|
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.
|
|
79
|
+
"@ttsc/unplugin": "0.30.4",
|
|
80
80
|
"@types/node": "^24.0.0",
|
|
81
|
-
"ttsc": "0.
|
|
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
|
|
|
@@ -30,8 +30,8 @@ const releaseProfiles = valueSet({
|
|
|
30
30
|
'google-play': true,
|
|
31
31
|
'app-store': true,
|
|
32
32
|
'apps-in-toss': true,
|
|
33
|
-
|
|
34
|
-
|
|
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 {
|