fix(runtime): close portable backend boundary gaps

This commit is contained in:
Tianyi Cui
2026-07-29 19:40:39 +08:00
parent c1d550de58
commit 124fc6a611
7 changed files with 59 additions and 14 deletions

View File

@@ -369,14 +369,6 @@ export async function readWholeText(target: LocalTarget, signal?: AbortSignal):
return decodeUtf8(raw, 'read', target.displayPath)
}
/**
* Read one regular UTF-8 file through a single no-follow handle, retaining at
* most `maxBytes + 1` bytes so a concurrent grow cannot bypass the bound.
* @param target - the resolved file to read.
* @param maxBytes - positive safe-integer byte ceiling.
* @param signal - aborts between handle operations.
* @returns the complete decoded text when it fits.
*/
/**
* Stream a whole regular UTF-8 text file as decoded text chunks. Same text
* semantics as {@link readWholeText} (regular-file check, binary/NUL rejection,