From acad137167e2a73c69096ee971becd04eb5d1d7e Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 6 Apr 2025 22:04:11 +0800 Subject: [PATCH] Chore: minor changes --- Build/lib/get-phishing-domains.ts | 4 +++- Build/lib/normalize-domain.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Build/lib/get-phishing-domains.ts b/Build/lib/get-phishing-domains.ts index e9fb4085..2fd3b6af 100644 --- a/Build/lib/get-phishing-domains.ts +++ b/Build/lib/get-phishing-domains.ts @@ -6,6 +6,7 @@ import { dummySpan, printTraceResult } from '../trace'; import type { Span } from '../trace'; import { appendArrayInPlaceCurried } from './append-array-in-place'; import { PHISHING_DOMAIN_LISTS_EXTRA, PHISHING_HOSTS_EXTRA } from '../constants/reject-data-source'; +import type { TldTsParsed } from './normalize-domain'; const downloads = [ ...PHISHING_DOMAIN_LISTS_EXTRA.map(entry => processDomainListsWithPreload(...entry)), @@ -43,6 +44,7 @@ const pool = new Worktank({ let tld: string | null = ''; let apexDomain: string | null = ''; let subdomain: string | null = ''; + let parsed: TldTsParsed; // const set = new Set(); // let duplicateCount = 0; @@ -56,7 +58,7 @@ const pool = new Worktank({ // set.add(line); // } - const parsed = tldts.parse(line, loosTldOptWithPrivateDomains); + parsed = tldts.parse(line, loosTldOptWithPrivateDomains); if (parsed.isPrivate) { continue; } diff --git a/Build/lib/normalize-domain.ts b/Build/lib/normalize-domain.ts index 32c7c99c..c2f7983f 100644 --- a/Build/lib/normalize-domain.ts +++ b/Build/lib/normalize-domain.ts @@ -5,7 +5,7 @@ import tldts from 'tldts'; import { normalizeTldtsOpt } from '../constants/loose-tldts-opt'; import { isProbablyIpv4, isProbablyIpv6 } from 'foxts/is-probably-ip'; -type TldTsParsed = ReturnType; +export type TldTsParsed = ReturnType; /** * Skipped the input non-empty check, the `domain` should not be empty.