mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore/CI: use fs cache to save bandwidth
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user