Chore/CI: use fs cache to save bandwidth

This commit is contained in:
SukkaW
2023-12-23 04:27:35 +08:00
parent 7fbd4a570f
commit 230ac3eb18
21 changed files with 358 additions and 206 deletions

View File

@@ -1,5 +1,7 @@
import type { BunFile } from 'bun';
import { fetchWithRetry, defaultRequestInit } from './fetch-retry';
import { fsCache } from './cache-filesystem';
import picocolors from 'picocolors';
// import { TextLineStream } from './text-line-transform-stream';
// import { PolyfillTextDecoderStream } from './text-decoder-stream';
@@ -78,6 +80,6 @@ export async function *createReadlineInterfaceFromResponse(resp: Response): Asyn
}
}
export function fetchRemoteTextAndReadByLine(url: string | URL) {
export function fetchRemoteTextByLine(url: string | URL) {
return fetchWithRetry(url, defaultRequestInit).then(res => createReadlineInterfaceFromResponse(res as Response));
}