@vgai/cli 0.5.52 → 0.5.53
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 +285 -24
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -25947,6 +25947,15 @@ var init_client = __esm({
|
|
|
25947
25947
|
return data.entries;
|
|
25948
25948
|
}
|
|
25949
25949
|
// --- State ---
|
|
25950
|
+
/**
|
|
25951
|
+
* The document table the host resolved — every scene, prefab, page, model,
|
|
25952
|
+
* shot, take … the project's finders produced (`getState().adapter.scenes`
|
|
25953
|
+
* is the same projection). A command, so it answers on the browser tier
|
|
25954
|
+
* too, where there is no `/__editor/state` route.
|
|
25955
|
+
*/
|
|
25956
|
+
async documentTable() {
|
|
25957
|
+
return this.command({ type: "document-table" });
|
|
25958
|
+
}
|
|
25950
25959
|
async getState() {
|
|
25951
25960
|
const res = await this.httpFetch(`${this.baseUrl}/__editor/state`);
|
|
25952
25961
|
const state = await this.readJson(res);
|
|
@@ -334365,7 +334374,28 @@ function printParseErrorCode(code) {
|
|
|
334365
334374
|
init_locate();
|
|
334366
334375
|
|
|
334367
334376
|
// ../create-vgai-project/src/additions.ts
|
|
334368
|
-
var SCAFFOLD_ADDITIONS = [
|
|
334377
|
+
var SCAFFOLD_ADDITIONS = [
|
|
334378
|
+
"three",
|
|
334379
|
+
"ui",
|
|
334380
|
+
"server",
|
|
334381
|
+
"mesh",
|
|
334382
|
+
"studio",
|
|
334383
|
+
"production"
|
|
334384
|
+
];
|
|
334385
|
+
var ADDITION_REQUIRES = {
|
|
334386
|
+
studio: ["three"],
|
|
334387
|
+
production: ["three"]
|
|
334388
|
+
};
|
|
334389
|
+
function closeAdditions(additions) {
|
|
334390
|
+
const wanted = /* @__PURE__ */ new Set();
|
|
334391
|
+
const visit2 = (addition) => {
|
|
334392
|
+
if (wanted.has(addition)) return;
|
|
334393
|
+
wanted.add(addition);
|
|
334394
|
+
for (const required2 of ADDITION_REQUIRES[addition] ?? []) visit2(required2);
|
|
334395
|
+
};
|
|
334396
|
+
for (const addition of additions) visit2(addition);
|
|
334397
|
+
return SCAFFOLD_ADDITIONS.filter((addition) => wanted.has(addition));
|
|
334398
|
+
}
|
|
334369
334399
|
function isScaffoldAddition(value) {
|
|
334370
334400
|
return typeof value === "string" && SCAFFOLD_ADDITIONS.includes(value);
|
|
334371
334401
|
}
|
|
@@ -334374,7 +334404,14 @@ var TEMPLATE_ADDITIONS = {
|
|
|
334374
334404
|
prototype: ["three"],
|
|
334375
334405
|
game: ["three", "server", "studio"],
|
|
334376
334406
|
website: ["ui"],
|
|
334377
|
-
models: ["mesh"]
|
|
334407
|
+
models: ["mesh"],
|
|
334408
|
+
// The four skews (ARCHITECTURE-CORE §Apps are addition presets, "The four
|
|
334409
|
+
// skews"): `models` is the Blender, `website` the design tool, `production`
|
|
334410
|
+
// the virtual production system, and `full` is every addition in one
|
|
334411
|
+
// project — the composition acceptance made permanent, so an addition that
|
|
334412
|
+
// special-cases the presence of another shows here first.
|
|
334413
|
+
production: ["three", "production"],
|
|
334414
|
+
full: [...SCAFFOLD_ADDITIONS]
|
|
334378
334415
|
};
|
|
334379
334416
|
var THREE_OWNED_PATHS = [
|
|
334380
334417
|
"src/world.tsx",
|
|
@@ -334523,7 +334560,7 @@ var STARTER_MODEL_SOURCE = `import * as THREE from 'three';
|
|
|
334523
334560
|
* three.js. Edit it in the editor (Edit Mesh appends each gesture as one
|
|
334524
334561
|
* line below, before the whole-mesh tail), edit it by hand, or delete the
|
|
334525
334562
|
* file once your own model exists. Blender's topology operators live in
|
|
334526
|
-
* '
|
|
334563
|
+
* '@vgai/mesh/geometry' as functions over BufferGeometry \u2014 bevel, inset,
|
|
334527
334564
|
* loopCut, extrudeRegion, subdivisionSurface\u2026 \u2014 with selectors in three.js
|
|
334528
334565
|
* coordinates (Y up) and radians:
|
|
334529
334566
|
*
|
|
@@ -334535,12 +334572,129 @@ export function build(): THREE.BufferGeometry {
|
|
|
334535
334572
|
return new THREE.BoxGeometry(1, 1, 1);
|
|
334536
334573
|
}
|
|
334537
334574
|
`;
|
|
334575
|
+
var STARTER_SHOT_PATH = "src/shots/010-establishing/010-establishing.shot.ts";
|
|
334576
|
+
var STARTER_TAKE_PATH = "src/shots/010-establishing/takes/camera-a.theatre-project.json";
|
|
334577
|
+
var STARTER_SHOT_SOURCE = `import { defineShot } from '../../lib/production/shot';
|
|
334578
|
+
|
|
334579
|
+
/**
|
|
334580
|
+
* Shot 010 \u2014 the establishing shot over the starter set. A shot names the SET
|
|
334581
|
+
* (a key of src/world.tsx's \`scenes\` table), its range and rate, the takes
|
|
334582
|
+
* recorded for it, and which take each object plays (\`select\`). Edit it by
|
|
334583
|
+
* hand; the Shots bin and the shot document read this file.
|
|
334584
|
+
*/
|
|
334585
|
+
export const shot = defineShot({
|
|
334586
|
+
id: '010',
|
|
334587
|
+
title: 'Establishing',
|
|
334588
|
+
scene: 'main',
|
|
334589
|
+
fps: 30,
|
|
334590
|
+
range: { in: 0, out: 4 },
|
|
334591
|
+
camera: 'Camera',
|
|
334592
|
+
takes: [
|
|
334593
|
+
{
|
|
334594
|
+
id: 'camera-a',
|
|
334595
|
+
sheet: '${STARTER_TAKE_PATH}',
|
|
334596
|
+
recorded: '2026-09-15',
|
|
334597
|
+
by: 'starter',
|
|
334598
|
+
kept: true,
|
|
334599
|
+
notes: 'A slow push-in while the hero box turns to camera.',
|
|
334600
|
+
},
|
|
334601
|
+
],
|
|
334602
|
+
select: {
|
|
334603
|
+
Camera: { take: 'camera-a' },
|
|
334604
|
+
'Hero Box': { take: 'camera-a' },
|
|
334605
|
+
},
|
|
334606
|
+
});
|
|
334607
|
+
`;
|
|
334608
|
+
function starterTrack(id, keys) {
|
|
334609
|
+
const keyframes = keys.map(
|
|
334610
|
+
([position, value], index) => `{ "id": "${id}-k${index}", "value": ${value}, "position": ${position}, "handles": [0.5, 1, 0.5, 0], "connectedRight": true, "type": "bezier" }`
|
|
334611
|
+
);
|
|
334612
|
+
return `"${id}": { "type": "BasicKeyframedTrack", "keyframes": [ ${keyframes.join(", ")} ] }`;
|
|
334613
|
+
}
|
|
334614
|
+
var STARTER_TAKE_SOURCE = `{
|
|
334615
|
+
"sheetsById": {
|
|
334616
|
+
"Main": {
|
|
334617
|
+
"staticOverrides": { "byObject": {} },
|
|
334618
|
+
"sequence": {
|
|
334619
|
+
"type": "PositionalSequence",
|
|
334620
|
+
"length": 4,
|
|
334621
|
+
"subUnitsPerUnit": 30,
|
|
334622
|
+
"tracksByObject": {
|
|
334623
|
+
"Camera": {
|
|
334624
|
+
"trackIdByPropPath": {
|
|
334625
|
+
"[\\"position\\",\\"x\\"]": "camera_position_x",
|
|
334626
|
+
"[\\"position\\",\\"y\\"]": "camera_position_y",
|
|
334627
|
+
"[\\"position\\",\\"z\\"]": "camera_position_z"
|
|
334628
|
+
},
|
|
334629
|
+
"trackData": {
|
|
334630
|
+
${starterTrack("camera_position_x", [
|
|
334631
|
+
[0, 7.35],
|
|
334632
|
+
[4, 5.4]
|
|
334633
|
+
])},
|
|
334634
|
+
${starterTrack("camera_position_y", [
|
|
334635
|
+
[0, 3.9],
|
|
334636
|
+
[4, 3.1]
|
|
334637
|
+
])},
|
|
334638
|
+
${starterTrack("camera_position_z", [
|
|
334639
|
+
[0, 8.15],
|
|
334640
|
+
[4, 6]
|
|
334641
|
+
])}
|
|
334642
|
+
}
|
|
334643
|
+
},
|
|
334644
|
+
"Hero Box": {
|
|
334645
|
+
"trackIdByPropPath": {
|
|
334646
|
+
"[\\"position\\",\\"y\\"]": "hero_position_y",
|
|
334647
|
+
"[\\"rotation\\",\\"y\\"]": "hero_rotation_y"
|
|
334648
|
+
},
|
|
334649
|
+
"trackData": {
|
|
334650
|
+
${starterTrack("hero_position_y", [
|
|
334651
|
+
[0, 1.3],
|
|
334652
|
+
[2, 1.9],
|
|
334653
|
+
[4, 1.3]
|
|
334654
|
+
])},
|
|
334655
|
+
${starterTrack("hero_rotation_y", [
|
|
334656
|
+
[0, -0.28],
|
|
334657
|
+
[4, 2.86]
|
|
334658
|
+
])}
|
|
334659
|
+
}
|
|
334660
|
+
}
|
|
334661
|
+
}
|
|
334662
|
+
}
|
|
334663
|
+
}
|
|
334664
|
+
},
|
|
334665
|
+
"definitionVersion": "0.4.0",
|
|
334666
|
+
"revisionHistory": []
|
|
334667
|
+
}
|
|
334668
|
+
`;
|
|
334669
|
+
var PRODUCTION_FILES = {
|
|
334670
|
+
[STARTER_SHOT_PATH]: STARTER_SHOT_SOURCE,
|
|
334671
|
+
[STARTER_TAKE_PATH]: STARTER_TAKE_SOURCE
|
|
334672
|
+
};
|
|
334673
|
+
function withTemplateEditorConfiguration(source, template, additions = new Set(TEMPLATE_ADDITIONS[template])) {
|
|
334674
|
+
const workspace = template === "production" ? "stage" : template === "models" ? "model" : template === "website" ? "design" : "game";
|
|
334675
|
+
const studio = additions.has("studio");
|
|
334676
|
+
const editor2 = ` editor: {
|
|
334677
|
+
workspace: '${workspace}',
|
|
334678
|
+
inspector: '${studio ? "column" : "card"}',
|
|
334679
|
+
playUtilities: [${studio ? "'tool:analytics.analytics'" : ""}],
|
|
334680
|
+
},`;
|
|
334681
|
+
if (!source.includes("defineAdapter({"))
|
|
334682
|
+
throw new Error("Starter vgai.adapter.ts must call defineAdapter({ ... }).");
|
|
334683
|
+
return source.replace(
|
|
334684
|
+
"defineAdapter({",
|
|
334685
|
+
`defineAdapter({
|
|
334686
|
+
${editor2}`
|
|
334687
|
+
);
|
|
334688
|
+
}
|
|
334538
334689
|
var PAGES_FINDER_SELECTION = "{ finder: 'pagesFromUiModules', include: ['src/ui/**/*page.tsx'] }";
|
|
334539
334690
|
var MODELS_FINDER_SELECTION = "{ finder: 'modelsFromMeshModules', include: ['src/models/**/*.ts'] }";
|
|
334691
|
+
var SHOTS_FINDER_SELECTION = "{ finder: 'shotsFromShotModules', include: ['src/shots/**/*.shot.ts'] }";
|
|
334692
|
+
var TAKES_FINDER_SELECTION = "{ finder: 'takesFromTheatreFiles', include: ['src/shots/**/*.theatre-project.json'] }";
|
|
334540
334693
|
function joinAdditionFinders(adapterSource, additions) {
|
|
334541
334694
|
const joined = [];
|
|
334542
334695
|
if (additions.has("ui")) joined.push(PAGES_FINDER_SELECTION);
|
|
334543
334696
|
if (additions.has("mesh")) joined.push(MODELS_FINDER_SELECTION);
|
|
334697
|
+
if (additions.has("production")) joined.push(SHOTS_FINDER_SELECTION, TAKES_FINDER_SELECTION);
|
|
334544
334698
|
if (joined.length === 0) return adapterSource;
|
|
334545
334699
|
return adapterSource.replace(
|
|
334546
334700
|
"{ finder: 'prefabsFromStories' },",
|
|
@@ -335108,7 +335262,8 @@ function mergeStringDependencies(target, field, incoming, owner, origins) {
|
|
|
335108
335262
|
const existing = merged[name];
|
|
335109
335263
|
const key = `${field}.${name}`;
|
|
335110
335264
|
if (existing !== void 0) {
|
|
335111
|
-
const
|
|
335265
|
+
const projectOwned = !origins.has(key);
|
|
335266
|
+
const winner = typeof existing !== "string" ? null : field === "scripts" ? existing === spec ? existing : null : projectOwned ? widerSpec(existing, spec) === null ? null : existing : widerSpec(existing, spec);
|
|
335112
335267
|
if (winner === null) {
|
|
335113
335268
|
const from = origins.get(key) ?? "the project package.json";
|
|
335114
335269
|
throw new Error(
|
|
@@ -335696,6 +335851,33 @@ var templates_default = {
|
|
|
335696
335851
|
"Opens in the Model workspace"
|
|
335697
335852
|
]
|
|
335698
335853
|
},
|
|
335854
|
+
{
|
|
335855
|
+
id: "production",
|
|
335856
|
+
title: "Virtual production",
|
|
335857
|
+
description: "A set to dress, shots to frame and takes to play \u2014 authored, never played. The 3D world plus the virtual-production capability.",
|
|
335858
|
+
source: "template:production",
|
|
335859
|
+
thumbnail: "packages/create-vgai-project/thumbnails/default.png",
|
|
335860
|
+
whatsInside: [
|
|
335861
|
+
"Three.js world root as the set",
|
|
335862
|
+
"src/shots/ with a starter shot and take",
|
|
335863
|
+
"The Shots bin and the shot document",
|
|
335864
|
+
"Opens in the Stage workspace; the Unreal keymap is one View \u25B8 Keymap choice"
|
|
335865
|
+
]
|
|
335866
|
+
},
|
|
335867
|
+
{
|
|
335868
|
+
id: "full",
|
|
335869
|
+
title: "Everything",
|
|
335870
|
+
description: "Every addition in one project \u2014 a 3D world, a UI root, a multiplayer server, development panels, models and virtual production. The composition acceptance: nothing here special-cases the presence of anything else.",
|
|
335871
|
+
source: "template:full",
|
|
335872
|
+
thumbnail: "packages/create-vgai-project/thumbnails/default.png",
|
|
335873
|
+
whatsInside: [
|
|
335874
|
+
"Three.js world + React DOM root",
|
|
335875
|
+
"server + multiplayer configurations",
|
|
335876
|
+
"Data, Game Inspector and Analytics stubs",
|
|
335877
|
+
"mesh + virtual-production capabilities",
|
|
335878
|
+
"Game, Model, Stage and every other workspace"
|
|
335879
|
+
]
|
|
335880
|
+
},
|
|
335699
335881
|
{
|
|
335700
335882
|
id: "first-person",
|
|
335701
335883
|
title: "First Person",
|
|
@@ -335721,7 +335903,15 @@ var templates_default = {
|
|
|
335721
335903
|
};
|
|
335722
335904
|
|
|
335723
335905
|
// ../create-vgai-project/src/templates.ts
|
|
335724
|
-
var TEMPLATE_COMPOSITION_IDS = [
|
|
335906
|
+
var TEMPLATE_COMPOSITION_IDS = [
|
|
335907
|
+
"empty",
|
|
335908
|
+
"prototype",
|
|
335909
|
+
"game",
|
|
335910
|
+
"website",
|
|
335911
|
+
"models",
|
|
335912
|
+
"production",
|
|
335913
|
+
"full"
|
|
335914
|
+
];
|
|
335725
335915
|
var SCAFFOLD_PRESENTATIONS = ["blank"];
|
|
335726
335916
|
function parseTemplateSource(source) {
|
|
335727
335917
|
const exampleId = source.startsWith("example:") ? source.slice("example:".length) : void 0;
|
|
@@ -335802,7 +335992,16 @@ function loadTemplateRegistry() {
|
|
|
335802
335992
|
}
|
|
335803
335993
|
|
|
335804
335994
|
// ../create-vgai-project/src/scaffold.ts
|
|
335805
|
-
var SCAFFOLD_TEMPLATES = [
|
|
335995
|
+
var SCAFFOLD_TEMPLATES = [
|
|
335996
|
+
"empty",
|
|
335997
|
+
"prototype",
|
|
335998
|
+
"game",
|
|
335999
|
+
"website",
|
|
336000
|
+
"models",
|
|
336001
|
+
"production",
|
|
336002
|
+
"full",
|
|
336003
|
+
"example"
|
|
336004
|
+
];
|
|
335806
336005
|
function resolveScaffoldPackageDir(monoRoot, checkoutRelativePath, packageName) {
|
|
335807
336006
|
const checkoutDir = join15(monoRoot, checkoutRelativePath);
|
|
335808
336007
|
if (existsSync10(checkoutDir)) return checkoutDir;
|
|
@@ -336303,7 +336502,21 @@ function rewriteTemplateVariantFiles(targetDir, additions) {
|
|
|
336303
336502
|
writeFileSync4(join15(targetDir, "src", "models", "cube.ts"), STARTER_MODEL_SOURCE, "utf-8");
|
|
336304
336503
|
relaxIndexAccessForModels(targetDir);
|
|
336305
336504
|
}
|
|
336505
|
+
if (additions.has("production")) {
|
|
336506
|
+
for (const [relative13, source] of Object.entries(PRODUCTION_FILES)) {
|
|
336507
|
+
mkdirSync5(dirname9(join15(targetDir, relative13)), { recursive: true });
|
|
336508
|
+
writeFileSync4(join15(targetDir, relative13), source, "utf-8");
|
|
336509
|
+
}
|
|
336510
|
+
}
|
|
336306
336511
|
if (!additions.has("ui")) return;
|
|
336512
|
+
if (additions.has("three")) {
|
|
336513
|
+
for (const [relative13, source] of Object.entries(REACT_ONLY_FILES)) {
|
|
336514
|
+
if (relative13 === "src/main.ts") continue;
|
|
336515
|
+
mkdirSync5(dirname9(join15(targetDir, relative13)), { recursive: true });
|
|
336516
|
+
writeFileSync4(join15(targetDir, relative13), source, "utf-8");
|
|
336517
|
+
}
|
|
336518
|
+
return;
|
|
336519
|
+
}
|
|
336307
336520
|
for (const relative13 of REACT_ONLY_REMOVED_PATHS) {
|
|
336308
336521
|
rmSync2(join15(targetDir, relative13), { recursive: true, force: true });
|
|
336309
336522
|
}
|
|
@@ -336337,7 +336550,11 @@ function rewriteTsconfig(targetDir, engineRelPath, editorRelPath) {
|
|
|
336337
336550
|
}
|
|
336338
336551
|
tsconfig.compilerOptions = tsconfig.compilerOptions ?? {};
|
|
336339
336552
|
tsconfig.compilerOptions.paths = {
|
|
336340
|
-
"@vgai/engine/*": [`${engineRelPath}/src/*`]
|
|
336553
|
+
"@vgai/engine/*": [`${engineRelPath}/src/*`],
|
|
336554
|
+
// `@vgai/mesh` exports extensionless `./src/*` the same way, so a model
|
|
336555
|
+
// module's `@vgai/mesh/geometry` needs the same alias to typecheck; the
|
|
336556
|
+
// entry is inert for a project that never declares the package.
|
|
336557
|
+
"@vgai/mesh/*": ["node_modules/@vgai/mesh/src/*"]
|
|
336341
336558
|
};
|
|
336342
336559
|
if (editorRelPath) {
|
|
336343
336560
|
tsconfig.compilerOptions.paths["@editor/*"] = [`${editorRelPath}/src/*`];
|
|
@@ -336385,7 +336602,9 @@ function rewriteIndexHtml(targetDir, name) {
|
|
|
336385
336602
|
function scaffoldProject(opts) {
|
|
336386
336603
|
const { name, targetDir, monoRoot } = opts;
|
|
336387
336604
|
const template = opts.template ?? "empty";
|
|
336388
|
-
const additions = template === "example" ? null :
|
|
336605
|
+
const additions = template === "example" ? null : new Set(
|
|
336606
|
+
closeAdditions([...TEMPLATE_ADDITIONS[template], ...opts.additions ?? []])
|
|
336607
|
+
);
|
|
336389
336608
|
if (template === "example" && !opts.exampleId) {
|
|
336390
336609
|
throw new Error('exampleId is required when template is "example"');
|
|
336391
336610
|
}
|
|
@@ -336415,6 +336634,18 @@ function scaffoldProject(opts) {
|
|
|
336415
336634
|
rewritePackageJson(targetDir, slug, engineDir, monoRoot);
|
|
336416
336635
|
const manifest = rewriteGameManifest(targetDir, name, slug, additions, monoRoot);
|
|
336417
336636
|
if (additions) rewriteTemplateVariantFiles(targetDir, additions);
|
|
336637
|
+
if (template !== "example") {
|
|
336638
|
+
const adapterPath = join15(targetDir, "vgai.adapter.ts");
|
|
336639
|
+
writeFileSync4(
|
|
336640
|
+
adapterPath,
|
|
336641
|
+
withTemplateEditorConfiguration(
|
|
336642
|
+
readFileSync11(adapterPath, "utf-8"),
|
|
336643
|
+
template,
|
|
336644
|
+
additions ?? void 0
|
|
336645
|
+
),
|
|
336646
|
+
"utf-8"
|
|
336647
|
+
);
|
|
336648
|
+
}
|
|
336418
336649
|
rewriteTsconfig(targetDir, engineRelPath, editorRelPath);
|
|
336419
336650
|
rewriteViteConfig(targetDir);
|
|
336420
336651
|
rewriteIndexHtml(targetDir, name);
|
|
@@ -336423,7 +336654,8 @@ function scaffoldProject(opts) {
|
|
|
336423
336654
|
if (hasCapabilityDistribution && additions) {
|
|
336424
336655
|
const ids = [
|
|
336425
336656
|
...additions.has("ui") ? DEFAULT_REACT_CAPABILITIES : [],
|
|
336426
|
-
...additions.has("mesh") ? ["mesh"] : []
|
|
336657
|
+
...additions.has("mesh") ? ["mesh"] : [],
|
|
336658
|
+
...additions.has("production") ? ["virtual-production"] : []
|
|
336427
336659
|
];
|
|
336428
336660
|
if (ids.length > 0) addCapabilities({ catalogDir, ids: [...ids], projectDir: targetDir });
|
|
336429
336661
|
}
|
|
@@ -338679,6 +338911,8 @@ var RELAY_COMMANDS = {
|
|
|
338679
338911
|
"show-build": alwaysRefresh(),
|
|
338680
338912
|
"present-view": alwaysRefresh(3e4),
|
|
338681
338913
|
"current-view": refreshIfContentChanged(),
|
|
338914
|
+
// A read of the resolved document table; changes nothing.
|
|
338915
|
+
"document-table": noDerivedRefresh(),
|
|
338682
338916
|
// ---- Inspection and authoring ------------------------------------------
|
|
338683
338917
|
// The inspection writes go through the project mutation path, which touches
|
|
338684
338918
|
// the filesystem and may wait on a collaboration revision.
|
|
@@ -354402,8 +354636,8 @@ function catalogDistributionDir() {
|
|
|
354402
354636
|
);
|
|
354403
354637
|
}
|
|
354404
354638
|
function cliVersion() {
|
|
354405
|
-
if ("0.5.
|
|
354406
|
-
return "0.5.
|
|
354639
|
+
if ("0.5.53") {
|
|
354640
|
+
return "0.5.53";
|
|
354407
354641
|
}
|
|
354408
354642
|
try {
|
|
354409
354643
|
const pkg = JSON.parse(readFileSync32(join39(__dirname4, "..", "package.json"), "utf8"));
|
|
@@ -354422,7 +354656,7 @@ function bakedTargetVersions() {
|
|
|
354422
354656
|
if (false)
|
|
354423
354657
|
return void 0;
|
|
354424
354658
|
try {
|
|
354425
|
-
return JSON.parse('{"@vgai/engine":"0.5.
|
|
354659
|
+
return JSON.parse('{"@vgai/engine":"0.5.53","@vgai/editor":"0.5.53","@vgai/p2p-colyseus":"0.5.53","@vgai/live":"0.5.53","@vgai/sdk":"0.5.53","@vgai/editor-sdk":"0.5.53","@vgai/cli":"0.5.53"}');
|
|
354426
354660
|
} catch {
|
|
354427
354661
|
return void 0;
|
|
354428
354662
|
}
|
|
@@ -354625,7 +354859,7 @@ Project:
|
|
|
354625
354859
|
below: reuses/starts a session, opens the browser, prints the URL
|
|
354626
354860
|
as the LAST line of output). Suppressed when CI is set or --no-edit
|
|
354627
354861
|
is passed \u2014 run \`vgai edit\` yourself then.
|
|
354628
|
-
--template empty|prototype|game|website|models
|
|
354862
|
+
--template empty|prototype|game|website|models|production|full
|
|
354629
354863
|
Project composition (default: empty)
|
|
354630
354864
|
--example <id> Scaffold from examples/<id>/ instead (implies --template example)
|
|
354631
354865
|
--no-edit Don't auto-launch the editor after scaffolding
|
|
@@ -355770,6 +356004,24 @@ function createProject(name, location2, template, exampleId, additions = []) {
|
|
|
355770
356004
|
...exampleId !== void 0 ? { exampleId } : {}
|
|
355771
356005
|
});
|
|
355772
356006
|
}
|
|
356007
|
+
function installCheckoutPackagesFromCheckout(projectDir, monoRoot) {
|
|
356008
|
+
const plan = planCheckoutLink(projectDir, monoRoot);
|
|
356009
|
+
if (plan.packages.length === 0) return () => void 0;
|
|
356010
|
+
const pkgPath = join39(projectDir, "package.json");
|
|
356011
|
+
const original = readFileSync32(pkgPath, "utf8");
|
|
356012
|
+
const pkg = JSON.parse(original);
|
|
356013
|
+
plan.packages.forEach((name, index) => {
|
|
356014
|
+
const dir = plan.directories[index];
|
|
356015
|
+
if (!dir) return;
|
|
356016
|
+
for (const section of ["dependencies", "devDependencies"]) {
|
|
356017
|
+
const deps = pkg[section];
|
|
356018
|
+
if (deps?.[name] !== void 0) deps[name] = `file:${dir}`;
|
|
356019
|
+
}
|
|
356020
|
+
});
|
|
356021
|
+
writeFileSync15(pkgPath, `${JSON.stringify(pkg, null, 2)}
|
|
356022
|
+
`);
|
|
356023
|
+
return () => writeFileSync15(pkgPath, original);
|
|
356024
|
+
}
|
|
355773
356025
|
function listAvailableExamples(monoRoot = ENGINE_ROOT) {
|
|
355774
356026
|
const examplesDir = resolveScaffoldExamplesDir(monoRoot);
|
|
355775
356027
|
if (!existsSync27(examplesDir)) return [];
|
|
@@ -358391,17 +358643,26 @@ Unrecognized option or invalid project name: ${name}`);
|
|
|
358391
358643
|
if (tryCloneDependencies(targetDir)) {
|
|
358392
358644
|
console.log("Dependencies cloned from the local store.");
|
|
358393
358645
|
} else {
|
|
358394
|
-
const
|
|
358395
|
-
|
|
358396
|
-
|
|
358397
|
-
|
|
358398
|
-
|
|
358399
|
-
|
|
358400
|
-
|
|
358401
|
-
|
|
358402
|
-
|
|
358403
|
-
|
|
358404
|
-
|
|
358646
|
+
const restoreSpecs = installCheckoutPackagesFromCheckout(targetDir, ENGINE_ROOT);
|
|
358647
|
+
try {
|
|
358648
|
+
const install = spawn4(
|
|
358649
|
+
"npm",
|
|
358650
|
+
["install", "--prefer-offline", "--no-audit", "--no-fund", "--loglevel=error"],
|
|
358651
|
+
{
|
|
358652
|
+
cwd: targetDir,
|
|
358653
|
+
stdio: "inherit",
|
|
358654
|
+
shell: true
|
|
358655
|
+
}
|
|
358656
|
+
);
|
|
358657
|
+
const exitCode = await new Promise((resolve22, reject) => {
|
|
358658
|
+
install.on("error", reject);
|
|
358659
|
+
install.on("close", resolve22);
|
|
358660
|
+
});
|
|
358661
|
+
if (exitCode !== 0)
|
|
358662
|
+
throw new Error(`npm install exited with code ${exitCode ?? "unknown"}`);
|
|
358663
|
+
} finally {
|
|
358664
|
+
restoreSpecs();
|
|
358665
|
+
}
|
|
358405
358666
|
cacheDependencies(targetDir);
|
|
358406
358667
|
}
|
|
358407
358668
|
try {
|
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.53",
|
|
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.53",
|
|
43
|
+
"@vgai/editor-sdk": "0.5.53",
|
|
44
|
+
"@vgai/engine": "0.5.53",
|
|
45
|
+
"@vgai/live": "0.5.53",
|
|
46
|
+
"@vgai/p2p-colyseus": "0.5.53",
|
|
47
|
+
"@vgai/sdk": "0.5.53",
|
|
48
48
|
"ink": "^7.1.0",
|
|
49
49
|
"playwright": "^1.58.2",
|
|
50
50
|
"react": "^19.2.4",
|