feat(runner): pass sceneInfoJson to Rust CLI for enhanced template rendering
This commit is contained in:
@@ -2,7 +2,7 @@ const { spawn } = require("child_process");
|
||||
const path = require("path");
|
||||
|
||||
function runGenerator(params, sseWriter, projectRoot) {
|
||||
const { sourceDir, sceneId, sceneName, sceneKind, targetUrl, outputRoot, lessons } = params;
|
||||
const { sourceDir, sceneId, sceneName, sceneKind, targetUrl, outputRoot, lessons, sceneInfoJson } = params;
|
||||
|
||||
const normalize = (p) => p.replace(/\\/g, "/");
|
||||
|
||||
@@ -35,6 +35,11 @@ function runGenerator(params, sseWriter, projectRoot) {
|
||||
args.push("--lessons", normalize(lessons));
|
||||
}
|
||||
|
||||
// Pass scene info JSON if available
|
||||
if (sceneInfoJson) {
|
||||
args.push("--scene-info-json", sceneInfoJson);
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
sseWriter.write(
|
||||
`event: status\ndata: ${JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user