@vgai/cli 0.5.9 → 0.5.11
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 +16 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -39660,6 +39660,9 @@ var init_schema = __esm({
|
|
|
39660
39660
|
entryHtml: external_exports.string().optional().describe(
|
|
39661
39661
|
"Entry HTML path, project-relative. WIRED for opaque-embed (D-W2): the file`s bytes are read verbatim through the project-static route and hosted in a sandboxed iframe (embed-only, no scene introspection), for both canvas and three roots. Legal but NOT wired to a mount for iframe-reachable (a named error at resolve names this \u2014 use `bundleUrl` instead, the wired reachable route)."
|
|
39662
39662
|
),
|
|
39663
|
+
contractShim: external_exports.string().optional().describe(
|
|
39664
|
+
'Project-relative path to a HOST-ADDED ES module that declares this game\'s `window.vgaiGame` contract (adapter/ingest/game-contract.ts) WITHOUT editing a vendored byte \u2014 the pristine-copy door. The host injects it as a `<script type="module">` into the assembled iframe document AFTER the game`s own importmap (moving a module load ahead of an import map invalidates the map) and BEFORE the game`s entry module, so deferred module scripts run it first. TIMING CONTRACT, which a shim author must obey: because it runs before the game`s entry, it MUST assign `window.vgaiGame` SYNCHRONOUSLY at top level \u2014 the host waits for that assignment and fails the mount by name if it never arrives. Anything that needs the game`s own modules must be LAZY: a dynamic `import()` INSIDE each verb/provider closure, resolved at call time. Importing a game module eagerly from the shim would evaluate it ahead of the game`s own entry and reorder its module side effects. Read by the vendored/self-hosted three route only (strategy `iframe-reachable` with `entryHtml`); declaring it elsewhere is a schema error rather than a silently dead field.'
|
|
39665
|
+
),
|
|
39663
39666
|
assets: external_exports.record(external_exports.string(), external_exports.string()).optional().describe(
|
|
39664
39667
|
"Path-substring -> served-URL rewrites for this ingested game (IngestGame.assets today)"
|
|
39665
39668
|
),
|
|
@@ -39694,6 +39697,15 @@ var init_schema = __esm({
|
|
|
39694
39697
|
}).describe(
|
|
39695
39698
|
"Ingest adapter configuration for an unmodified game (a repo-vendored game or your own external folder)"
|
|
39696
39699
|
).superRefine((ingest, ctx) => {
|
|
39700
|
+
if (ingest.contractShim === void 0 || ingest.strategy === "iframe-reachable" && ingest.entryHtml !== void 0) {
|
|
39701
|
+
return;
|
|
39702
|
+
}
|
|
39703
|
+
ctx.addIssue({
|
|
39704
|
+
code: external_exports.ZodIssueCode.custom,
|
|
39705
|
+
message: `\`contractShim\` is read ONLY by the self-hosted entry-document route, so it requires strategy 'iframe-reachable' together with \`entryHtml\` (got strategy "${ingest.strategy}"${ingest.entryHtml === void 0 ? " and no `entryHtml`" : ""}) \u2014 the host injects the shim module into the GAME'S OWN entry HTML (ingest-self-hosted-three-adapter.ts), and no other mount has such a document.`,
|
|
39706
|
+
path: ["contractShim"]
|
|
39707
|
+
});
|
|
39708
|
+
}).superRefine((ingest, ctx) => {
|
|
39697
39709
|
const iframeOnlyFields = [
|
|
39698
39710
|
["bundleUrl", ingest.bundleUrl !== void 0],
|
|
39699
39711
|
["baseHref", ingest.baseHref !== void 0],
|
|
@@ -39935,6 +39947,7 @@ function resolveAdapter(root) {
|
|
|
39935
39947
|
surface: adapter.surface,
|
|
39936
39948
|
strategy: ingest.strategy,
|
|
39937
39949
|
entryHtml: ingest.entryHtml,
|
|
39950
|
+
contractShim: ingest.contractShim,
|
|
39938
39951
|
assets: ingest.assets,
|
|
39939
39952
|
domStubs: ingest.domStubs,
|
|
39940
39953
|
captureTimeoutMs: ingest.captureTimeoutMs,
|
|
@@ -324685,8 +324698,8 @@ function catalogDistributionDir() {
|
|
|
324685
324698
|
);
|
|
324686
324699
|
}
|
|
324687
324700
|
function cliVersion() {
|
|
324688
|
-
if ("0.5.
|
|
324689
|
-
return "0.5.
|
|
324701
|
+
if ("0.5.11") {
|
|
324702
|
+
return "0.5.11";
|
|
324690
324703
|
}
|
|
324691
324704
|
try {
|
|
324692
324705
|
const pkg = JSON.parse(readFileSync32(join39(__dirname4, "..", "package.json"), "utf8"));
|
|
@@ -324705,7 +324718,7 @@ function bakedTargetVersions() {
|
|
|
324705
324718
|
if (false)
|
|
324706
324719
|
return void 0;
|
|
324707
324720
|
try {
|
|
324708
|
-
return JSON.parse('{"@vgai/engine":"0.5.
|
|
324721
|
+
return JSON.parse('{"@vgai/engine":"0.5.11","@vgai/editor":"0.5.11","@vgai/p2p-colyseus":"0.5.11","@vgai/live":"0.5.11","@vgai/sdk":"0.5.11","@vgai/editor-sdk":"0.5.11","@vgai/cli":"0.5.11"}');
|
|
324709
324722
|
} catch {
|
|
324710
324723
|
return void 0;
|
|
324711
324724
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@vgai/cli",
|
|
3
3
|
"author": "Volter AI, Inc.",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "0.5.
|
|
5
|
+
"version": "0.5.11",
|
|
6
6
|
"description": "Create, open, control, validate, and playtest VGAI game projects.",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"game-engine",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@oclif/core": "^4.11.14",
|
|
42
|
-
"@vgai/editor": "0.5.
|
|
43
|
-
"@vgai/editor-sdk": "0.5.
|
|
44
|
-
"@vgai/engine": "0.5.
|
|
45
|
-
"@vgai/live": "0.5.
|
|
46
|
-
"@vgai/p2p-colyseus": "0.5.
|
|
47
|
-
"@vgai/sdk": "0.5.
|
|
42
|
+
"@vgai/editor": "0.5.11",
|
|
43
|
+
"@vgai/editor-sdk": "0.5.11",
|
|
44
|
+
"@vgai/engine": "0.5.11",
|
|
45
|
+
"@vgai/live": "0.5.11",
|
|
46
|
+
"@vgai/p2p-colyseus": "0.5.11",
|
|
47
|
+
"@vgai/sdk": "0.5.11",
|
|
48
48
|
"ink": "^7.1.0",
|
|
49
49
|
"playwright": "^1.58.2",
|
|
50
50
|
"react": "^19.2.4",
|