mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-04 04:42:32 +08:00
Minor changes here and there
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import { toASCII } from 'punycode';
|
||||
import { traceAsync } from './trace-runner';
|
||||
import { createMemoizedPromise } from './memo-promise';
|
||||
import { getPublicSuffixListTextPromise } from '../download-publicsuffixlist';
|
||||
|
||||
const customFetch = (url: string | URL): Promise<Blob> => Promise.resolve(Bun.file(url));
|
||||
|
||||
export const getGorhillPublicSuffixPromise = createMemoizedPromise(() => traceAsync('create gorhill public suffix instance', async () => {
|
||||
export const getGorhillPublicSuffixPromise = createMemoizedPromise(async () => {
|
||||
const [publicSuffixListDat, { default: gorhill }] = await Promise.all([
|
||||
getPublicSuffixListTextPromise(),
|
||||
import('@gorhill/publicsuffixlist')
|
||||
@@ -15,4 +14,4 @@ export const getGorhillPublicSuffixPromise = createMemoizedPromise(() => traceAs
|
||||
await gorhill.enableWASM({ customFetch });
|
||||
|
||||
return gorhill;
|
||||
}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user