Chore: minor changes

This commit is contained in:
SukkaW
2025-11-20 02:20:27 +08:00
parent d7f9961062
commit 9e9ee36292
4 changed files with 11 additions and 14 deletions

View File

@@ -29,8 +29,8 @@ export async function compareAndWriteFile(span: Span, linesA: string[], filePath
// The default highwater mark is normally 16384,
// So we make sure direct write to file if the content is
// most likely less than 500 lines
if (linesALen < 500) {
// most likely less than 250 lines
if (linesALen < 250) {
return writeFile(filePath, fastStringArrayJoin(linesA, '\n') + '\n');
}

View File

@@ -35,6 +35,9 @@ export async function fetchAssets(
console.log(picocolors.gray('[fetch cancelled]'), picocolors.gray(url));
throw reusedCustomAbortError;
}
if (index >= 0) {
console.log(picocolors.yellowBright('[fetch fallback begin]'), picocolors.gray(url));
}
const res = await $$fetch(url, { signal: controller.signal, ...defaultRequestInit });
let stream = nullthrow(res.body, url + ' has an empty body')