fix(utf8): закрыть lossy-границы конфигурации и API

This commit is contained in:
2026-09-07 17:25:27 +05:00
parent ab788725cf
commit af9f476658
38 changed files with 759 additions and 159 deletions
+2 -1
View File
@@ -8,6 +8,7 @@
*/
import { parseUpstreamHashes } from "../src/build/hysteriaRelease";
import { readText } from "../src/lib/fs";
function fail(message: string): never {
console.error(`[hy2xs-build] ERROR: ${message}`);
@@ -47,7 +48,7 @@ function parseArgs(argv: string[]): { file: string; asset: string } {
const { file, asset } = parseArgs(Bun.argv.slice(2));
try {
const text = await Bun.file(file).text();
const text = await readText(file);
process.stdout.write(`${parseUpstreamHashes(text, asset)}\n`);
} catch (error) {
fail(error instanceof Error ? error.message : String(error));