reasonix 0.44.2-rc.2 → 0.44.2-rc.3

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.
@@ -2,7 +2,7 @@
2
2
  import { createRequire as __cr } from 'node:module'; if (typeof globalThis.require === 'undefined') { globalThis.require = __cr(import.meta.url); }
3
3
  import {
4
4
  chatCommand
5
- } from "./chunk-5KU3SHDP.js";
5
+ } from "./chunk-DEXMJP2L.js";
6
6
  import "./chunk-TKVXTQ3T.js";
7
7
  import "./chunk-JMBMLOBP.js";
8
8
  import "./chunk-2V6EAEUW.js";
@@ -48,4 +48,4 @@ import "./chunk-TUK7OWJA.js";
48
48
  export {
49
49
  chatCommand
50
50
  };
51
- //# sourceMappingURL=chat-YHRGJEPE.js.map
51
+ //# sourceMappingURL=chat-EOQOUJEI.js.map
@@ -44808,12 +44808,23 @@ function spawnRenderer(opts) {
44808
44808
  env: opts.env ?? process.env,
44809
44809
  stdio: ["pipe", "inherit", stderrStdio]
44810
44810
  });
44811
+ child.on("error", (err) => {
44812
+ process.stderr.write(`[spawnRenderer] child error: ${err.message}
44813
+ `);
44814
+ });
44811
44815
  let exited = false;
44816
+ let aliveMs = 0;
44817
+ const spawnedAt = Date.now();
44812
44818
  const exitPromise = new Promise((resolve3) => {
44813
- child.once("exit", (code) => {
44819
+ child.once("exit", (code, signal) => {
44814
44820
  exited = true;
44821
+ aliveMs = Date.now() - spawnedAt;
44822
+ process.stderr.write(
44823
+ `[spawnRenderer] child exit: code=${code} signal=${signal} aliveMs=${aliveMs}
44824
+ `
44825
+ );
44815
44826
  resolve3(code);
44816
- if (opts.integrated && opts.onEvent) {
44827
+ if (opts.integrated && opts.onEvent && aliveMs >= 1500) {
44817
44828
  try {
44818
44829
  opts.onEvent({ event: "exit" });
44819
44830
  } catch {
@@ -44839,9 +44850,12 @@ function spawnRenderer(opts) {
44839
44850
  const parsed = JSON.parse(line);
44840
44851
  if (parsed && typeof parsed.event === "string") {
44841
44852
  opts.onEvent?.(parsed);
44853
+ continue;
44842
44854
  }
44843
44855
  } catch {
44844
44856
  }
44857
+ process.stderr.write(`[rust-stderr] ${line}
44858
+ `);
44845
44859
  }
44846
44860
  });
44847
44861
  }
@@ -45008,6 +45022,8 @@ function ensureInitialized() {
45008
45022
  }
45009
45023
  if (process.env[RENDERER_VAR] === "node") return;
45010
45024
  const { command, source } = resolveRenderer();
45025
+ process.stderr.write(`[trace] resolver source=${source} command=${JSON.stringify(command)}
45026
+ `);
45011
45027
  if (source === null || command.length === 0) {
45012
45028
  process.stderr.write(
45013
45029
  "\u25B2 trace.ts: resolveRenderer() returned no usable command \u2014 scene trace stays off. Check optional-dep install (`ls node_modules/@reasonix/render-*`) or set REASONIX_RENDER_BIN.\n"
@@ -45015,6 +45031,8 @@ function ensureInitialized() {
45015
45031
  return;
45016
45032
  }
45017
45033
  const integrated = process.env[INTEGRATED_VAR] !== "0";
45034
+ process.stderr.write(`[trace] spawning rust child (integrated=${integrated})
45035
+ `);
45018
45036
  state.mode = "child";
45019
45037
  state.child = spawnRenderer({
45020
45038
  command,
@@ -63828,4 +63846,4 @@ async function chatCommand(opts) {
63828
63846
  export {
63829
63847
  chatCommand
63830
63848
  };
63831
- //# sourceMappingURL=chunk-5KU3SHDP.js.map
63849
+ //# sourceMappingURL=chunk-DEXMJP2L.js.map