Chore: minor changes

This commit is contained in:
SukkaW 2025-11-11 16:07:29 +08:00
parent c70804db3b
commit a2c0205aac
2 changed files with 3 additions and 10 deletions

View File

@ -1,7 +1,6 @@
import process from 'node:process';
import os from 'node:os';
import fs from 'node:fs';
import fsp from 'node:fs/promises';
import { downloadPreviousBuild } from './download-previous-build';
import { buildCommon } from './build-common';
@ -30,7 +29,7 @@ import { buildCloudMounterRules } from './build-cloudmounter-rules';
import { createSpan, printTraceResult, whyIsNodeRunning } from './trace';
import { buildDeprecateFiles } from './build-deprecate-files';
import path from 'node:path';
import { CACHE_DIR, ROOT_DIR } from './constants/dir';
import { ROOT_DIR } from './constants/dir';
import { isCI } from 'ci-info';
process.on('uncaughtException', (error) => {
@ -42,12 +41,6 @@ process.on('unhandledRejection', (reason) => {
process.exit(1);
});
const removesFiles = [
path.join(CACHE_DIR, '.cache.db'),
path.join(CACHE_DIR, '.cache.db-shm'),
path.join(CACHE_DIR, '.cache.db-wal')
];
const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
(async () => {
@ -90,7 +83,6 @@ const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
const buildCommonPromise = downloadPreviousBuildPromise.then(() => buildCommon(rootSpan));
await Promise.all([
...removesFiles.map(file => fsp.rm(file, { force: true })),
downloadPreviousBuildPromise,
buildCommonPromise,
downloadPreviousBuildPromise.then(() => buildRejectIPList(rootSpan)),

View File

@ -8,7 +8,8 @@ const dnsServers = [
'dns.cloudflare.com', // Cloudflare DoH that uses different IPs: 172.64.41.8,162.159.61.8
'cloudflare-dns.com', // Cloudflare DoH that uses different IPs: 104.16.249.249,104.16.248.249
// one.one.one.one // Cloudflare DoH that uses 1.1.1.1 and 1.0.0.1
// '101.101.101.101', // TWNIC, has DNS pollution, e.g. t66y.com
// '101.101.101.101', 'dns.twnic.tw' // TWNIC, has DNS pollution, e.g. t66y.com
// 'dns.hinet.net' // HiNet DoH, has DNS pollution, e.g. t66y.com
'185.222.222.222', '45.11.45.11', // DNS.SB
'doh.dns.sb', // DNS.SB, Unicast PoPs w/ GeoDNS
// 'doh.sb', // DNS.SB xTom Anycast IP