mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Housekeeping & Make ESLint happy again
This commit is contained in:
@@ -2,7 +2,8 @@ import path from 'node:path';
|
||||
import { pipeline } from 'node:stream/promises';
|
||||
import { task } from './trace';
|
||||
import { defaultRequestInit, fetchWithRetry } from './lib/fetch-retry';
|
||||
import { extract as tarExtract, type Headers as TarEntryHeaders } from 'tar-fs';
|
||||
import { extract as tarExtract } from 'tar-fs';
|
||||
import type { Headers as TarEntryHeaders } from 'tar-fs';
|
||||
import zlib from 'node:zlib';
|
||||
import { Readable } from 'node:stream';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createTrie, type Trie } from './trie';
|
||||
import { createTrie } from './trie';
|
||||
import type { Trie } from './trie';
|
||||
|
||||
export function domainsetDeduper(inputDomains: string[] | Trie): string[] {
|
||||
let trie: Trie;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { processDomainLists } from './parse-filter';
|
||||
import * as tldts from 'tldts-experimental';
|
||||
|
||||
import { dummySpan, type Span } from '../trace';
|
||||
import { dummySpan } from '../trace';
|
||||
import type { Span } from '../trace';
|
||||
import { appendArrayInPlaceCurried } from './append-array-in-place';
|
||||
import { PHISHING_DOMAIN_LISTS_EXTRA } from '../constants/reject-data-source';
|
||||
import { loosTldOptWithPrivateDomains } from '../constants/loose-tldts-opt';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { describe, it } from 'mocha';
|
||||
|
||||
import { parse, processFilterRules, type ParseType } from './parse-filter';
|
||||
import { parse, processFilterRules } from './parse-filter';
|
||||
import type { ParseType } from './parse-filter';
|
||||
import { createCacheKey } from './cache-filesystem';
|
||||
import { createSpan } from '../trace';
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ export { type ParseType };
|
||||
export async function processFilterRules(
|
||||
parentSpan: Span,
|
||||
filterRulesUrl: string,
|
||||
fallbackUrls?: readonly string[] | undefined | null,
|
||||
fallbackUrls?: readonly string[] | null,
|
||||
ttl: number | null = null
|
||||
): Promise<{ white: string[], black: string[], foundDebugDomain: boolean }> {
|
||||
const [white, black, warningMessages] = await parentSpan.traceChild(`process filter rules: ${filterRulesUrl}`).traceAsyncFn((span) => fsFetchCache.apply<Readonly<[
|
||||
|
||||
Reference in New Issue
Block a user