mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore: use latest fetch from undici
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import retry from 'async-retry';
|
||||
import picocolors from 'picocolors';
|
||||
import { setTimeout } from 'node:timers/promises';
|
||||
import { fetch as _fetch } from 'undici';
|
||||
|
||||
function isClientError(err: unknown): err is NodeJS.ErrnoException {
|
||||
if (!err || typeof err !== 'object') return false;
|
||||
@@ -161,4 +162,4 @@ export const defaultRequestInit: RequestInit = {
|
||||
}
|
||||
};
|
||||
|
||||
export const fetchWithRetry = createFetchRetry(fetch);
|
||||
export const fetchWithRetry = createFetchRetry(_fetch as any);
|
||||
|
||||
Reference in New Issue
Block a user