mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Chore: some minor changes
This commit is contained in:
@@ -7,8 +7,9 @@ import { appendArrayInPlace } from './lib/append-array-in-place';
|
||||
import { SOURCE_DIR } from './constants/dir';
|
||||
import { DomainsetOutput } from './lib/create-file';
|
||||
import { CRASHLYTICS_WHITELIST } from './constants/reject-data-source';
|
||||
import { appendSetElementsToArray } from 'foxts/append-set-elements-to-array';
|
||||
|
||||
const getS3OSSDomainsPromise = (async (): Promise<string[]> => {
|
||||
const getS3OSSDomainsPromise = (async (): Promise<Set<string>> => {
|
||||
const trie = new HostnameTrie();
|
||||
|
||||
for await (const line of await fetchRemoteTextByLine('https://publicsuffix.org/list/public_suffix_list.dat', true)) {
|
||||
@@ -44,7 +45,7 @@ const getS3OSSDomainsPromise = (async (): Promise<string[]> => {
|
||||
}
|
||||
});
|
||||
|
||||
return Array.from(S3OSSDomains);
|
||||
return S3OSSDomains;
|
||||
})();
|
||||
|
||||
export const buildCdnDownloadConf = task(require.main === module, __filename)(async (span) => {
|
||||
@@ -62,7 +63,7 @@ export const buildCdnDownloadConf = task(require.main === module, __filename)(as
|
||||
]);
|
||||
|
||||
// Move S3 domains to download domain set, since S3 files may be large
|
||||
appendArrayInPlace(downloadDomainSet, S3OSSDomains);
|
||||
appendSetElementsToArray(downloadDomainSet, S3OSSDomains);
|
||||
appendArrayInPlace(downloadDomainSet, steamDomainSet);
|
||||
|
||||
// we have whitelisted the crashlytics domain, and we also want to put it in CDN policy
|
||||
|
||||
Reference in New Issue
Block a user