mirror of
https://github.com/hanzoai/wasm.git
synced 2026-10-30 15:07:30 +00:00
rel trimmed the root with a prefix and never cleaned the name, so `import "/project/../outside"` reached Files as "../outside". Proven: the host was asked to stat and read ../outside.ts and the bundle inlined it, with no error and no diagnostic. Map cleans that name away, which is why the shipped tests were green. rel now cleans first and refuses what leaves the root, and it is the one way a string becomes a call on Files — a guest's import, a caller's Entry, the host's own Realpath answer. An on-load reads only a name some on-resolve answered for; a path in a request field is not authority. Diagnostics are one shape again: esbuild's column counted bytes where tsgo counts UTF-16 code units, so the same quote was 32 and 29, and a bare tsc diagnostic now names the file its own message names. A cancelled bundle reports context.Canceled instead of a truncated handshake. The guest's stderr is captured and capped rather than handed the host's own, the 5s wait for it to exit is the caller's context, and Register refuses a nil rather than dereferencing it at the first request. The tests fail without TSGO_WASM and ESBUILD_WASM: ok for a run that ran no compiler is worse than red. Their compilation cache belongs to the run. hostfs and hostspace are plugin and space. Co-authored-by: Hanzo Dev <[email protected]>