From adfd5eca81f696bfedfc8982ecb0fae9eb47ecf1 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sat, 7 Sep 2024 17:02:03 +0800 Subject: [PATCH 01/19] Update CDN Hosts --- Source/domainset/cdn.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/domainset/cdn.conf b/Source/domainset/cdn.conf index efca076d4..22b48370f 100644 --- a/Source/domainset/cdn.conf +++ b/Source/domainset/cdn.conf @@ -13,6 +13,13 @@ google-ohttp-relay-safebrowsing.fastly-edge.com .privacy-gateway.cloudflare.com .proxy.safebrowsing.apple +# >> Apple Relay +apple-relay.fastly-edge.com +apple-relay.cloudflare.com +cp2.cloudflare.com +cp3.cloudflare.com +cp4.cloudflare.com + # >> Open Source CDN .jsdelivr.net data.jsdelivr.com From f5613c6d3db0ba505063262647fa3d62793278e4 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sat, 7 Sep 2024 23:25:43 +0800 Subject: [PATCH 02/19] Update CDN & Global Hosts --- Source/domainset/cdn.conf | 3 +++ Source/non_ip/global.conf | 1 + 2 files changed, 4 insertions(+) diff --git a/Source/domainset/cdn.conf b/Source/domainset/cdn.conf index 22b48370f..89beb57f3 100644 --- a/Source/domainset/cdn.conf +++ b/Source/domainset/cdn.conf @@ -486,6 +486,8 @@ compass-ssl.xbox.com amp.azure.net # Azure Static Web App .azurestaticapps.net +# Azure Packages Registry +pkgs.dev.azure.com # Minecraft launchercontent.mojang.com @@ -2797,3 +2799,4 @@ cdn.kinopio.club img.shoplineapp.com image.gyutto.com image.gyutto.jp +.makeuseofimages.com diff --git a/Source/non_ip/global.conf b/Source/non_ip/global.conf index 352e30485..52f616b8b 100644 --- a/Source/non_ip/global.conf +++ b/Source/non_ip/global.conf @@ -431,6 +431,7 @@ DOMAIN-SUFFIX,disqus.com DOMAIN-SUFFIX,dlsite.com DOMAIN-SUFFIX,dns-oarc.net DOMAIN-SUFFIX,doujins.com +DOMAIN-SUFFIX,downdetector.com DOMAIN-SUFFIX,dribbble.com DOMAIN-KEYWORD,dropbox DOMAIN-SUFFIX,dropbox.com From d4ee25e75a29be834e38843470042893c0075e0d Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 8 Sep 2024 00:15:57 +0800 Subject: [PATCH 03/19] Chore: remove outdated files --- Build/build-apple-cdn.ts | 30 +++++++++--------------------- Build/build-common.ts | 22 ---------------------- Build/build-deprecate-files.ts | 17 +++++++++++++++-- Build/index.ts | 4 +--- Source/domainset/steam.conf | 1 - 5 files changed, 25 insertions(+), 49 deletions(-) diff --git a/Build/build-apple-cdn.ts b/Build/build-apple-cdn.ts index 8e7183d88..2fc3c5afd 100644 --- a/Build/build-apple-cdn.ts +++ b/Build/build-apple-cdn.ts @@ -32,27 +32,15 @@ export const buildAppleCdn = task(require.main === module, __filename)(async (sp ' - https://github.com/felixonmars/dnsmasq-china-list' ]; - const ruleset = res.map(domain => `DOMAIN-SUFFIX,${domain}`); const domainset = res.map(i => `.${i}`); - return Promise.all([ - createRuleset( - span, - 'Sukka\'s Ruleset - Apple CDN', - description, - new Date(), - ruleset, - 'ruleset', - output('apple_cdn', 'non_ip') - ), - createRuleset( - span, - 'Sukka\'s Ruleset - Apple CDN', - description, - new Date(), - domainset, - 'domainset', - output('apple_cdn', 'domainset') - ) - ]); + return createRuleset( + span, + 'Sukka\'s Ruleset - Apple CDN', + description, + new Date(), + domainset, + 'domainset', + output('apple_cdn', 'domainset') + ); }); diff --git a/Build/build-common.ts b/Build/build-common.ts index a5e730a22..c075f5246 100644 --- a/Build/build-common.ts +++ b/Build/build-common.ts @@ -10,11 +10,9 @@ import { task } from './trace'; import { SHARED_DESCRIPTION } from './lib/constants'; import { fdir as Fdir } from 'fdir'; import { appendArrayInPlace } from './lib/append-array-in-place'; -import { removeFiles } from './lib/misc'; import { OUTPUT_CLASH_DIR, OUTPUT_SINGBOX_DIR, OUTPUT_SURGE_DIR, SOURCE_DIR } from './constants/dir'; const MAGIC_COMMAND_SKIP = '# $ custom_build_script'; -const MAGIC_COMMAND_RM = '# $ custom_no_output'; const MAGIC_COMMAND_TITLE = '# $ meta_title '; const MAGIC_COMMAND_DESCRIPTION = '# $ meta_description '; @@ -68,7 +66,6 @@ export const buildCommon = task(require.main === module, __filename)(async (span }); const $skip = Symbol('skip'); -const $rm = Symbol('rm'); const processFile = (span: Span, sourcePath: string) => { // console.log('Processing', sourcePath); @@ -80,9 +77,6 @@ const processFile = (span: Span, sourcePath: string) => { try { for await (const line of readFileByLine(sourcePath)) { - if (line.startsWith(MAGIC_COMMAND_RM)) { - return $rm; - } if (line.startsWith(MAGIC_COMMAND_SKIP)) { return $skip; } @@ -121,14 +115,6 @@ function transformDomainset(parentSpan: Span, sourcePath: string, relativePath: const clashFileBasename = relativePath.slice(0, -path.extname(relativePath).length); - if (res === $rm) { - return removeFiles([ - path.resolve(OUTPUT_SURGE_DIR, relativePath), - path.resolve(OUTPUT_CLASH_DIR, `${clashFileBasename}.txt`), - path.resolve(OUTPUT_SINGBOX_DIR, `${clashFileBasename}.json`) - ]); - } - const [title, descriptions, lines] = res; const deduped = domainDeduper(lines); @@ -170,14 +156,6 @@ async function transformRuleset(parentSpan: Span, sourcePath: string, relativePa const clashFileBasename = relativePath.slice(0, -path.extname(relativePath).length); - if (res === $rm) { - return removeFiles([ - path.resolve(OUTPUT_SURGE_DIR, relativePath), - path.resolve(OUTPUT_CLASH_DIR, `${clashFileBasename}.txt`), - path.resolve(OUTPUT_SINGBOX_DIR, `${clashFileBasename}.json`) - ]); - } - const [title, descriptions, lines] = res; let description: string[]; diff --git a/Build/build-deprecate-files.ts b/Build/build-deprecate-files.ts index 7b0faa18d..e64470188 100644 --- a/Build/build-deprecate-files.ts +++ b/Build/build-deprecate-files.ts @@ -1,7 +1,8 @@ -import { OUTPUT_CLASH_DIR, OUTPUT_SURGE_DIR } from './constants/dir'; +import { OUTPUT_CLASH_DIR, OUTPUT_SURGE_DIR, PUBLIC_DIR } from './constants/dir'; import { compareAndWriteFile } from './lib/create-file'; import { task } from './trace'; import path from 'node:path'; +import fsp from 'node:fs/promises'; const DEPRECATED_FILES = [ ['non_ip/global_plus', 'This file has been merged with non_ip/global'], @@ -9,8 +10,20 @@ const DEPRECATED_FILES = [ ['domainset/reject_phishing', 'This file has been merged with domainset/reject'] ]; +const REMOVED_FILES = [ + 'Internal/cdn.txt', + 'List/domainset/steam.conf', + 'List/internal/appprofile.php', + 'Clash/domainset/steam.txt', + 'sing-box/domainset/steam.json' +]; + export const buildDeprecateFiles = task(require.main === module, __filename)((span) => span.traceChildAsync('create deprecated files', async (childSpan) => { - const promises: Array> = []; + const promises: Array> = REMOVED_FILES + .map(f => fsp.rm( + path.join(PUBLIC_DIR, f), + { force: true, recursive: true } + )); for (const [filePath, description] of DEPRECATED_FILES) { const surgeFile = path.resolve(OUTPUT_SURGE_DIR, `${filePath}.conf`); diff --git a/Build/index.ts b/Build/index.ts index d6337cc2a..05d0ab2a8 100644 --- a/Build/index.ts +++ b/Build/index.ts @@ -71,8 +71,6 @@ process.on('unhandledRejection', (reason) => { const buildCloudMounterRulesPromise = downloadPreviousBuildPromise.then(() => buildCloudMounterRules(rootSpan)); - const buildDeprecateFilesPromise = downloadPreviousBuildPromise.then(() => buildDeprecateFiles(rootSpan)); - await Promise.all([ downloadPreviousBuildPromise, buildCommonPromise, @@ -93,10 +91,10 @@ process.on('unhandledRejection', (reason) => { buildMicrosoftCdnPromise, buildSSPanelUIMAppProfilePromise, buildCloudMounterRulesPromise, - buildDeprecateFilesPromise, downloadMockAssetsPromise ]); + await buildDeprecateFiles(rootSpan); await buildPublic(rootSpan); rootSpan.stop(); diff --git a/Source/domainset/steam.conf b/Source/domainset/steam.conf index 05dfd7007..d815df5fc 100644 --- a/Source/domainset/steam.conf +++ b/Source/domainset/steam.conf @@ -1,4 +1,3 @@ -# $ custom_no_output # $ custom_build_script -- will be included in download.conf # Steam From 90079b99879803582646f247ef8b477f0200ef9f Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 8 Sep 2024 01:28:54 +0800 Subject: [PATCH 04/19] Chore: dedupe and sort other rulesets --- Build/build-cdn-download-conf.ts | 6 +- Build/build-common.ts | 4 +- Build/build-reject-domainset.ts | 6 +- Build/build-speedtest-domainset.ts | 4 +- Build/lib/bitwise.ts | 9 +++ Build/lib/create-file.ts | 94 ++++++++++++++++++------------ Build/lib/domain-deduper.ts | 29 +-------- Build/lib/trie.ts | 49 ++++++++++------ 8 files changed, 110 insertions(+), 91 deletions(-) create mode 100644 Build/lib/bitwise.ts diff --git a/Build/build-cdn-download-conf.ts b/Build/build-cdn-download-conf.ts index 6eaa5c4b8..377e84881 100644 --- a/Build/build-cdn-download-conf.ts +++ b/Build/build-cdn-download-conf.ts @@ -5,7 +5,7 @@ import { createTrie } from './lib/trie'; import { task } from './trace'; import { SHARED_DESCRIPTION } from './lib/constants'; import { getPublicSuffixListTextPromise } from './lib/download-publicsuffixlist'; -import { domainDeduper } from './lib/domain-deduper'; +import { domainsetDeduper } from './lib/domain-deduper'; import { appendArrayInPlace } from './lib/append-array-in-place'; import { sortDomains } from './lib/stable-sort-domain'; import { output } from './lib/misc'; @@ -76,7 +76,7 @@ export const buildCdnDownloadConf = task(require.main === module, __filename)(as 'This file contains object storage and static assets CDN domains.' ], new Date(), - sortDomains(domainDeduper(cdnDomainsList)), + sortDomains(domainsetDeduper(cdnDomainsList)), 'domainset', output('cdn', 'domainset') ), @@ -89,7 +89,7 @@ export const buildCdnDownloadConf = task(require.main === module, __filename)(as 'This file contains domains for software updating & large file hosting.' ], new Date(), - sortDomains(domainDeduper(downloadDomainSet)), + sortDomains(domainsetDeduper(downloadDomainSet)), 'domainset', output('download', 'domainset') ) diff --git a/Build/build-common.ts b/Build/build-common.ts index c075f5246..0945323ce 100644 --- a/Build/build-common.ts +++ b/Build/build-common.ts @@ -4,7 +4,7 @@ import * as path from 'node:path'; import { readFileByLine } from './lib/fetch-text-by-line'; import { processLine } from './lib/process-line'; import { createRuleset } from './lib/create-file'; -import { domainDeduper } from './lib/domain-deduper'; +import { domainsetDeduper } from './lib/domain-deduper'; import type { Span } from './trace'; import { task } from './trace'; import { SHARED_DESCRIPTION } from './lib/constants'; @@ -116,7 +116,7 @@ function transformDomainset(parentSpan: Span, sourcePath: string, relativePath: const clashFileBasename = relativePath.slice(0, -path.extname(relativePath).length); const [title, descriptions, lines] = res; - const deduped = domainDeduper(lines); + const deduped = domainsetDeduper(lines); let description: string[]; if (descriptions.length) { diff --git a/Build/build-reject-domainset.ts b/Build/build-reject-domainset.ts index c5f7fd482..1f2f7e6d8 100644 --- a/Build/build-reject-domainset.ts +++ b/Build/build-reject-domainset.ts @@ -7,7 +7,7 @@ import { createTrie } from './lib/trie'; import { HOSTS, ADGUARD_FILTERS, PREDEFINED_WHITELIST, DOMAIN_LISTS, HOSTS_EXTRA, DOMAIN_LISTS_EXTRA, ADGUARD_FILTERS_EXTRA, PHISHING_DOMAIN_LISTS_EXTRA } from './constants/reject-data-source'; import { createRuleset, compareAndWriteFile } from './lib/create-file'; -import { domainDeduper } from './lib/domain-deduper'; +import { domainsetDeduper } from './lib/domain-deduper'; import createKeywordFilter from './lib/aho-corasick'; import { readFileByLine, readFileIntoProcessedArray } from './lib/fetch-text-by-line'; import { buildParseDomainMap, sortDomains } from './lib/stable-sort-domain'; @@ -149,8 +149,8 @@ export const buildRejectDomainSet = task(require.main === module, __filename)(as }); // Dedupe domainSets - const dudupedDominArray = span.traceChildSync('dedupe from covered subdomain (base)', () => domainDeduper(baseTrie)); - const dudupedDominArrayExtra = span.traceChildSync('dedupe from covered subdomain (extra)', () => domainDeduper(extraTrie)); + const dudupedDominArray = span.traceChildSync('dedupe from covered subdomain (base)', () => domainsetDeduper(baseTrie)); + const dudupedDominArrayExtra = span.traceChildSync('dedupe from covered subdomain (extra)', () => domainsetDeduper(extraTrie)); console.log(`Final size ${dudupedDominArray.length} + ${dudupedDominArrayExtra.length}`); diff --git a/Build/build-speedtest-domainset.ts b/Build/build-speedtest-domainset.ts index afab4157e..5704f02d4 100644 --- a/Build/build-speedtest-domainset.ts +++ b/Build/build-speedtest-domainset.ts @@ -1,4 +1,4 @@ -import { domainDeduper } from './lib/domain-deduper'; +import { domainsetDeduper } from './lib/domain-deduper'; import path from 'node:path'; import { createRuleset } from './lib/create-file'; import { sortDomains } from './lib/stable-sort-domain'; @@ -235,7 +235,7 @@ export const buildSpeedtestDomainSet = task(require.main === module, __filename) } })))); - const deduped = span.traceChildSync('sort result', () => sortDomains(domainDeduper(domainTrie))); + const deduped = span.traceChildSync('sort result', () => sortDomains(domainsetDeduper(domainTrie))); const description = [ ...SHARED_DESCRIPTION, diff --git a/Build/lib/bitwise.ts b/Build/lib/bitwise.ts new file mode 100644 index 000000000..0ff904369 --- /dev/null +++ b/Build/lib/bitwise.ts @@ -0,0 +1,9 @@ +/** Packs two 16-bit integers into one 32-bit integer */ +export const pack = (a: number, b: number): number => { + return (a << 16) | b; +}; + +/** Unpacks two 16-bit integers from one 32-bit integer */ +export const unpack = (value: number): [a: number, b: number] => { + return [(value >> 16) & 0xFFFF, value & 0xFFFF]; +}; diff --git a/Build/lib/create-file.ts b/Build/lib/create-file.ts index f2a6c13ab..5602cd6ea 100644 --- a/Build/lib/create-file.ts +++ b/Build/lib/create-file.ts @@ -8,6 +8,8 @@ import { fastStringArrayJoin, writeFile } from './misc'; import { readFileByLine } from './fetch-text-by-line'; import stringify from 'json-stringify-pretty-compact'; import { ipCidrListToSingbox, surgeDomainsetToSingbox, surgeRulesetToSingbox } from './singbox'; +import { createTrie } from './trie'; +import { pack, unpack } from './bitwise'; export async function compareAndWriteFile(span: Span, linesA: string[], filePath: string) { let isEqual = true; @@ -92,17 +94,6 @@ const withBannerArray = (title: string, description: string[] | readonly string[ ]; }; -const collectType = (rule: string) => { - let buf = ''; - for (let i = 0, len = rule.length; i < len; i++) { - if (rule[i] === ',') { - return buf; - } - buf += rule[i]; - } - return null; -}; - const defaultSortTypeOrder = Symbol('defaultSortTypeOrder'); const sortTypeOrder: Record = { DOMAIN: 1, @@ -120,33 +111,62 @@ const sortTypeOrder: Record = { 'IP-CIDR': 400, 'IP-CIDR6': 400 }; -// sort DOMAIN-SUFFIX and DOMAIN first, then DOMAIN-KEYWORD, then IP-CIDR and IP-CIDR6 if any -export const sortRuleSet = (ruleSet: string[]) => { - return ruleSet.map((rule) => { - const type = collectType(rule); - if (!type) { - return [10, rule] as const; - } - if (!(type in sortTypeOrder)) { - return [sortTypeOrder[defaultSortTypeOrder], rule] as const; - } - if (type === 'URL-REGEX') { - let extraWeight = 0; - if (rule.includes('.+') || rule.includes('.*')) { - extraWeight += 10; - } - if (rule.includes('|')) { - extraWeight += 1; - } - return [ - sortTypeOrder[type] + extraWeight, - rule - ] as const; +const flagDomain = 1 << 2; +const flagDomainSuffix = 1 << 3; + +// dedupe and sort based on rule type +const processRuleSet = (ruleSet: string[]) => { + const trie = createTrie(null, true); + + const sortMap: Array<[value: number, weight: number]> = []; + for (let i = 0, len = ruleSet.length; i < len; i++) { + const line = ruleSet[i]; + const [type, value] = line.split(','); + + let extraWeight = 0; + + switch (type) { + case 'DOMAIN': + trie.add(value, pack(i, flagDomain)); + break; + case 'DOMAIN-SUFFIX': + trie.add('.' + value, pack(i, flagDomainSuffix)); + break; + case 'URL-REGEX': + if (value.includes('.+') || value.includes('.*')) { + extraWeight += 10; + } + if (value.includes('|')) { + extraWeight += 1; + } + sortMap.push([i, sortTypeOrder[type] + extraWeight]); + break; + case null: + sortMap.push([i, 10]); + break; + default: + if (type in sortTypeOrder) { + sortMap.push([i, sortTypeOrder[type]]); + } else { + sortMap.push([i, sortTypeOrder[defaultSortTypeOrder]]); + } } - return [sortTypeOrder[type], rule] as const; - }).sort((a, b) => a[0] - b[0]) - .map(c => c[1]); + } + + const dumped = trie.dumpWithMeta(); + for (let i = 0, len = dumped.length; i < len; i++) { + const [originalIndex, flag] = unpack(dumped[i][1]); + console.log(dumped[i][0], ruleSet[originalIndex]); + + const type = flag === flagDomain ? 'DOMAIN' : 'DOMAIN-SUFFIX'; + + sortMap.push([originalIndex, sortTypeOrder[type]]); + } + + return sortMap + .sort((a, b) => a[1] - b[1]) + .map(c => ruleSet[c[0]]); }; const MARK = 'this_ruleset_is_made_by_sukkaw.ruleset.skk.moe'; @@ -162,7 +182,7 @@ export const createRuleset = ( _clashMrsPath?: string ] ) => parentSpan.traceChild(`create ruleset: ${path.basename(surgePath, path.extname(surgePath))}`).traceAsyncFn(async (childSpan) => { - content = sortRuleSet(content); + content = processRuleSet(content); const surgeContent = childSpan.traceChildSync('process surge ruleset', () => { let _surgeContent; switch (type) { diff --git a/Build/lib/domain-deduper.ts b/Build/lib/domain-deduper.ts index c0d78d478..1a6cabe04 100644 --- a/Build/lib/domain-deduper.ts +++ b/Build/lib/domain-deduper.ts @@ -1,8 +1,6 @@ import { createTrie, type Trie } from './trie'; -export function domainDeduper(inputDomains: string[] | Trie, toArray?: true): string[]; -export function domainDeduper(inputDomains: string[] | Trie, toArray: false): Set; -export function domainDeduper(inputDomains: string[] | Trie, toArray = true): string[] | Set { +export function domainsetDeduper(inputDomains: string[] | Trie): string[] { let trie: Trie; if (Array.isArray(inputDomains)) { trie = createTrie(inputDomains, true); @@ -12,28 +10,5 @@ export function domainDeduper(inputDomains: string[] | Trie, toArray = true): st throw new Error('Invalid trie'); } - const dumped = trie.dump(); - if (toArray) { - return dumped; - } - return new Set(dumped); - - // const trie = createTrie(inputDomains, true); - // const sets = new Set(inputDomains); - - // for (let i = 0, len1 = inputDomains.length; i < len1; i++) { - // const d = inputDomains[i]; - // if (d[0] !== '.') { - // continue; - // } - - // trie.substractSetInPlaceFromFound(d, sets); - // sets.delete(d.slice(1)); - // } - - // if (toArray) { - // return Array.from(sets); - // } - - // return sets; + return trie.dump(); } diff --git a/Build/lib/trie.ts b/Build/lib/trie.ts index 57523538c..bc47fecf4 100644 --- a/Build/lib/trie.ts +++ b/Build/lib/trie.ts @@ -7,10 +7,11 @@ import { inspect } from 'node:util'; const noop = () => { /** noop */ }; -type TrieNode = [ +type TrieNode = [ boolean, /** sentinel */ TrieNode | null, /** parent */ - Map /** children */ + Map, /** children */ + Meta /** meta */ ]; const deepTrieNodeToJSON = (node: TrieNode) => { @@ -18,14 +19,17 @@ const deepTrieNodeToJSON = (node: TrieNode) => { if (node[0]) { obj['[start]'] = node[0]; } + if (node[3] !== undefined) { + obj['[meta]'] = node[3]; + } node[2].forEach((value, key) => { obj[key] = deepTrieNodeToJSON(value); }); return obj; }; -const createNode = (parent: TrieNode | null = null): TrieNode => { - return [false, parent, new Map()] as TrieNode; +const createNode = (parent: TrieNode | null = null, meta: Meta | null = null): TrieNode => { + return [false, parent, new Map(), meta] as TrieNode; }; export const hostnameToTokens = (hostname: string): string[] => { @@ -72,16 +76,16 @@ const walkHostnameTokens = (hostname: string, onToken: (token: string) => boolea return false; }; -export const createTrie = (from?: string[] | Set | null, smolTree = false) => { +export const createTrie = (from?: string[] | Set | null, smolTree = false) => { let size = 0; - const root: TrieNode = createNode(); + const root: TrieNode = createNode(); /** * Method used to add the given suffix to the trie. */ const add = smolTree - ? (suffix: string): void => { - let node: TrieNode = root; + ? (suffix: string, meta?: Meta): void => { + let node: TrieNode = root; const onToken = (token: string) => { if (node[2].has(token)) { @@ -98,6 +102,7 @@ export const createTrie = (from?: string[] | Set | null, smolTree = fals node = newNode; } + node[3] = meta!; return false; }; @@ -128,8 +133,8 @@ export const createTrie = (from?: string[] | Set | null, smolTree = fals node[0] = true; } - : (suffix: string): void => { - let node: TrieNode = root; + : (suffix: string, meta?: Meta): void => { + let node: TrieNode = root; const onToken = (token: string) => { if (node[2].has(token)) { @@ -140,6 +145,7 @@ export const createTrie = (from?: string[] | Set | null, smolTree = fals node = newNode; } + node[3] = meta!; return false; }; @@ -221,15 +227,15 @@ export const createTrie = (from?: string[] | Set | null, smolTree = fals }; const walk = ( - onMatches: (suffix: string[]) => void, + onMatches: (suffix: string[], meta: Meta) => void, initialNode = root, initialSuffix: string[] = [] ) => { - const nodeStack: TrieNode[] = [initialNode]; + const nodeStack: Array> = [initialNode]; // Resolving initial string (begin the start of the stack) const suffixStack: string[][] = [initialSuffix]; - let node: TrieNode = root; + let node: TrieNode = root; do { node = nodeStack.pop()!; @@ -244,7 +250,7 @@ export const createTrie = (from?: string[] | Set | null, smolTree = fals // If the node is a sentinel, we push the suffix to the results if (node[0]) { - onMatches(suffix); + onMatches(suffix, node[3]); } } while (nodeStack.length); }; @@ -383,6 +389,16 @@ export const createTrie = (from?: string[] | Set | null, smolTree = fals return results; }; + const dumpWithMeta = () => { + const results: Array<[string, Meta]> = []; + + walk((suffix, meta) => { + results.push([fastStringArrayJoin(suffix, ''), meta]); + }); + + return results; + }; + const whitelist = (suffix: string) => { if (!smolTree) { throw new Error('whitelist method is only available in smolTree mode.'); @@ -428,7 +444,7 @@ export const createTrie = (from?: string[] | Set | null, smolTree = fals add(from[i]); } } else if (from) { - from.forEach(add); + from.forEach((value) => add(value)); } return { @@ -440,6 +456,7 @@ export const createTrie = (from?: string[] | Set | null, smolTree = fals delete: remove, has, dump, + dumpWithMeta, get size() { if (smolTree) { throw new Error('A Trie with smolTree enabled cannot have correct size!'); @@ -460,5 +477,3 @@ export const createTrie = (from?: string[] | Set | null, smolTree = fals }; export type Trie = ReturnType; - -export default createTrie; From 56383be02d988a5d16c91011a03b5d6334b151bd Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 8 Sep 2024 02:10:39 +0800 Subject: [PATCH 05/19] CI: make GitLab faster --- .github/workflows/main.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 49972ac2c..da07fff43 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,15 +72,11 @@ jobs: command: pages deploy public --project-name=sukkaw-ruleset --commit-dirty=true --branch=main - name: Upload Dist to GitLab run: | - mkdir ./deploy-git + git clone --filter=blob:none https://${GITLAB_TOKEN_NAME}:${GITLAB_TOKEN}@gitlab.com/SukkaW/ruleset.skk.moe.git ./deploy-git cd ./deploy-git - git config --global init.defaultBranch master - git init git config --global push.default matching git config --global user.email "${GITLAB_EMAIL}" git config --global user.name "${GITLAB_USER}" - git remote add origin https://${GITLAB_TOKEN_NAME}:${GITLAB_TOKEN}@gitlab.com/SukkaW/ruleset.skk.moe.git - git pull origin master rm -rf ./* cp -rf ../public/* ./ git add --all . From 689b896091363a05cb2f1b2b525758c3677928bf Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 8 Sep 2024 20:06:13 +0800 Subject: [PATCH 06/19] Whitelist `duckdns.org` again --- Source/domainset/reject_sukka.conf | 2 -- Source/non_ip/my_git.conf | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 Source/non_ip/my_git.conf diff --git a/Source/domainset/reject_sukka.conf b/Source/domainset/reject_sukka.conf index 2ee5af2f2..05cc04bc3 100644 --- a/Source/domainset/reject_sukka.conf +++ b/Source/domainset/reject_sukka.conf @@ -87,8 +87,6 @@ optimus-ads.amap.com # >> Abuse (way too many of them) -# free ddns -.duckdns.org # cheap web hosting with free subdomain .webcindario.com # online d'n'd website builder diff --git a/Source/non_ip/my_git.conf b/Source/non_ip/my_git.conf new file mode 100644 index 000000000..b4f0690af --- /dev/null +++ b/Source/non_ip/my_git.conf @@ -0,0 +1,5 @@ +# $ meta_title Sukka's Ruleset - Internal Special + +DOMAIN-SUFFIX,huggingface.co +DOMAIN,github.com +DOMAIN,gitlab.com From 461f61afa73145d2e39d992d95f243a686281df3 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 8 Sep 2024 22:38:36 +0800 Subject: [PATCH 07/19] Drop non-standard DNSPod IP --- Source/non_ip/domestic.ts | 2 +- Source/non_ip/my_direct.conf | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/non_ip/domestic.ts b/Source/non_ip/domestic.ts index 6b0cb32ca..f5d03fc6f 100644 --- a/Source/non_ip/domestic.ts +++ b/Source/non_ip/domestic.ts @@ -85,7 +85,7 @@ export const DOMESTICS = { hosts: { 'dot.pub': ['120.53.53.53', '1.12.12.12', '1.12.34.56'], 'doh.pub': ['120.53.53.53', '1.12.12.12', '1.12.34.56'], - 'dns.pub': ['120.53.53.53', '1.12.12.12', '1.12.34.56', '162.14.21.178', '162.14.21.56'] + 'dns.pub': ['120.53.53.53', '1.12.12.12', '1.12.34.56'] }, dns: 'https://doh.pub/dns-query', domains: [ diff --git a/Source/non_ip/my_direct.conf b/Source/non_ip/my_direct.conf index 4f09adc38..4300ca8cf 100644 --- a/Source/non_ip/my_direct.conf +++ b/Source/non_ip/my_direct.conf @@ -5,7 +5,5 @@ DOMAIN-SUFFIX,download.555mac.com DOMAIN-KEYWORD,mac-torrent-download DOMAIN-SUFFIX,engage.cloudflareclient.com -DOMAIN-SUFFIX,ec2-reachability.amazonaws.com - PROCESS-NAME,AdGuardHome PROCESS-NAME,nmap From 6d9a99fede5edd5ae1a748ac25120cce40366ba0 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 8 Sep 2024 23:30:14 +0800 Subject: [PATCH 08/19] CI: run deploys in parallel --- .github/workflows/main.yml | 43 ++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da07fff43..daa8b55e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,10 +4,15 @@ on: branches: - master schedule: - - cron: '0 12 * * *' + - cron: "0 12 * * *" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: build: + name: Build runs-on: ubuntu-latest steps: @@ -18,12 +23,12 @@ jobs: - uses: pnpm/action-setup@v4 name: Install pnpm with: - run_install: false + run_install: false - name: Use Node.js uses: actions/setup-node@v4 with: - node-version-file: '.node-version' - cache: 'pnpm' + node-version-file: ".node-version" + cache: "pnpm" - name: Get current date id: date run: | @@ -64,12 +69,42 @@ jobs: echo "public directory is empty" exit 1 fi + - uses: actions/upload-artifact@v4 + with: + name: build-artifact-${{ github. ref_name }} + path: public + if-no-files-found: error + retention-days: 1 + compression-level: 4 + include-hidden-files: false + deploy_to_cloudflare_pages: + needs: + - build + name: Deploy to Cloudflare Pages + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + name: build-artifact-${{ github. ref_name }} + path: public - name: Deploy to Cloudflare Pages uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} command: pages deploy public --project-name=sukkaw-ruleset --commit-dirty=true --branch=main + deploy_to_github_gitlab: + needs: + - build + name: Deploy to GitHub and GitLab + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + name: build-artifact-${{ github.ref_name }} + path: public - name: Upload Dist to GitLab run: | git clone --filter=blob:none https://${GITLAB_TOKEN_NAME}:${GITLAB_TOKEN}@gitlab.com/SukkaW/ruleset.skk.moe.git ./deploy-git From 3f47564a380bc45badb4b3d57871d3454ad846c3 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 8 Sep 2024 23:56:11 +0800 Subject: [PATCH 09/19] Housekeeping --- package.json | 8 +- pnpm-lock.yaml | 326 ++++++++++++++++++++++++++----------------------- 2 files changed, 174 insertions(+), 160 deletions(-) diff --git a/package.json b/package.json index 7da1c3d4e..16a7a4fed 100644 --- a/package.json +++ b/package.json @@ -36,14 +36,14 @@ "punycode": "^2.3.1", "table": "^6.8.2", "tar-stream": "^3.1.7", - "tldts": "^6.1.41", - "tldts-experimental": "^6.1.41", + "tldts": "^6.1.43", + "tldts-experimental": "^6.1.43", "yaml": "^2.5.1" }, "devDependencies": { "@eslint-sukka/node": "^6.3.0", "@swc-node/register": "^1.10.9", - "@swc/core": "^1.7.23", + "@swc/core": "^1.7.24", "@types/async-retry": "^1.4.8", "@types/better-sqlite3": "^7.6.11", "@types/chai": "^4.3.19", @@ -51,7 +51,7 @@ "@types/punycode": "^2.1.4", "@types/tar-stream": "^3.1.3", "chai": "4", - "eslint": "^9.9.1", + "eslint": "^9.10.0", "eslint-config-sukka": "^6.3.0", "eslint-formatter-sukka": "^6.3.0", "mitata": "^0.1.14", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2529aa1f5..ff0679ab2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,24 +60,24 @@ importers: specifier: ^3.1.7 version: 3.1.7 tldts: - specifier: ^6.1.41 - version: 6.1.41 + specifier: ^6.1.43 + version: 6.1.43 tldts-experimental: - specifier: ^6.1.41 - version: 6.1.41 + specifier: ^6.1.43 + version: 6.1.43 yaml: specifier: ^2.5.1 version: 2.5.1 devDependencies: '@eslint-sukka/node': specifier: ^6.3.0 - version: 6.3.0(eslint@9.9.1)(typescript@5.5.4) + version: 6.3.0(eslint@9.10.0)(typescript@5.5.4) '@swc-node/register': specifier: ^1.10.9 - version: 1.10.9(@swc/core@1.7.23)(@swc/types@0.1.12)(typescript@5.5.4) + version: 1.10.9(@swc/core@1.7.24)(@swc/types@0.1.12)(typescript@5.5.4) '@swc/core': - specifier: ^1.7.23 - version: 1.7.23 + specifier: ^1.7.24 + version: 1.7.24 '@types/async-retry': specifier: ^1.4.8 version: 1.4.8 @@ -100,11 +100,11 @@ importers: specifier: '4' version: 4.4.1 eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 eslint-config-sukka: specifier: ^6.3.0 - version: 6.3.0(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4) + version: 6.3.0(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4) eslint-formatter-sukka: specifier: ^6.3.0 version: 6.3.0 @@ -171,6 +171,10 @@ packages: resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.10.0': + resolution: {integrity: sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.9.1': resolution: {integrity: sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -179,6 +183,10 @@ packages: resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/plugin-kit@0.1.0': + resolution: {integrity: sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} @@ -312,68 +320,68 @@ packages: '@swc-node/sourcemap-support@0.5.1': resolution: {integrity: sha512-JxIvIo/Hrpv0JCHSyRpetAdQ6lB27oFYhv0PKCNf1g2gUXOjpeR1exrXccRxLMuAV5WAmGFBwRnNOJqN38+qtg==} - '@swc/core-darwin-arm64@1.7.23': - resolution: {integrity: sha512-yyOHPfti6yKlQulfVWMt7BVKst+SyEZYCWuQSGMn1KgmNCH/bYufRWfQXIhkGSj44ZkEepJmsJ8tDyIb4k5WyA==} + '@swc/core-darwin-arm64@1.7.24': + resolution: {integrity: sha512-s0k09qAcsoa8jIncwgRRd43VApYqXu28R4OmICtDffV4S01HtsRLRarXsMuLutoZk3tbxqitep+A8MPBuqNgdg==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] - '@swc/core-darwin-x64@1.7.23': - resolution: {integrity: sha512-GzqHwQ0Y1VyjdI/bBKFX2GKm5HD3PIB6OhuAQtWZMTtEr2yIrlT0YK2T+XKh7oIg31JwxGBeQdBk3KTI7DARmQ==} + '@swc/core-darwin-x64@1.7.24': + resolution: {integrity: sha512-1dlsulJ/fiOoJoJyQgaCewIEaZ7Sh6aJN4r5Uhl4lIZuNWa27XOb28A3K29/6HDO9JML3IJrvXPnl5o0vxDQuQ==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.7.23': - resolution: {integrity: sha512-qwX4gB41OS6/OZkHcpTqLFGsdmvoZyffnJIlgB/kZKwH3lfeJWzv6vx57zXtNpM/t7GoQEe0VZUVdmNjxSxBZw==} + '@swc/core-linux-arm-gnueabihf@1.7.24': + resolution: {integrity: sha512-2ft1NmxyvHCu5CY4r2rNVybPqZtJaxpRSzvCcPlVjN/2D5Q3QgM5kBoo1t+0RCFfk4TS2V0KWJhtqKz0CNX62Q==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm64-gnu@1.7.23': - resolution: {integrity: sha512-TsrbUZdMaUwzI7+g/8rHPLWbntMKYSu5Bn5IBSqVKPeyqaXxNnlIUnWXgXcUcRAc+T+Y8ADfr7EiFz9iz5DuSA==} + '@swc/core-linux-arm64-gnu@1.7.24': + resolution: {integrity: sha512-v/Z8I9tUUNkNHKa1Sw4r1Q7Wp66ezbRhe6xMIxvPNKVJQFaMOsRpe0t8T5qbk5sV2hJGOCKpQynSpZqQXLcJDQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-musl@1.7.23': - resolution: {integrity: sha512-JEdtwdthazKq4PBz53KSubwwK8MvqODAihGSAzc8u3Unq4ojcvaS8b0CwLBeD+kTQ78HpxOXTt3DsFIxpgaCAA==} + '@swc/core-linux-arm64-musl@1.7.24': + resolution: {integrity: sha512-0jJx0IcajcyOXaJsx1jXy86lYVrbupyy2VUj/OiJux/ic4oBJLjfL+WOuc8T8/hZj2p6X0X4jvfSCqWSuic4kA==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-x64-gnu@1.7.23': - resolution: {integrity: sha512-V51gFPWaVAHbI1yg9ahsoya3aB4uawye3SZ5uQWgcP7wdCdiv60dw4F5nuPJf5Z1oXD3U/BslXuamv8Oh9vXqQ==} + '@swc/core-linux-x64-gnu@1.7.24': + resolution: {integrity: sha512-2+3aKQpSGjVnWKDTKUPuJzitQlTQrGorg+PVFMRkv6l+RcNCHZQNe/8VYpMhyBhxDMb3LUlbp7776FRevcruxg==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-linux-x64-musl@1.7.23': - resolution: {integrity: sha512-BBqQi4+UdeRqag3yM4IJjaHG4yc1o3l9ksENHToE0o/u2DT0FY5+K/DiYGZLC1JHbSFzNqRCYsa7DIzRtZ0A1A==} + '@swc/core-linux-x64-musl@1.7.24': + resolution: {integrity: sha512-PMQ6SkCtMoj0Ks77DiishpEmIuHpYjFLDuVOzzJCzGeGoii0yRP5lKy/VeglFYLPqJzmhK9BHlpVehVf/8ZpvA==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-win32-arm64-msvc@1.7.23': - resolution: {integrity: sha512-JPk6pvCKncL6bXG7p+NLZf8PWx4FakVvKNdwGeMrYunb+yk1IZf7qf9LJk8+GDGF5QviDXPs8opZrTrfsW80fA==} + '@swc/core-win32-arm64-msvc@1.7.24': + resolution: {integrity: sha512-SNdCa4DtGXNWrPVHqctVUxgEVZVETuqERpqF50KFHO0Bvf5V/m1IJ4hFr2BxXlrzgnIW4t1Dpi6YOJbcGbEmnA==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-ia32-msvc@1.7.23': - resolution: {integrity: sha512-2Whxi8d+bLQBzJcQ5qYPHlk02YYVGsMVav0fWk+FnX2z1QRREIu1L1xvrpi7gBpjXp6BIU40ya8GiKeekNT2bg==} + '@swc/core-win32-ia32-msvc@1.7.24': + resolution: {integrity: sha512-5p3olHqwibMfrVFg2yVuSIPh9HArDYYlJXNZ9JKqeZk23A19J1pl9MuPmXDw+sxsiPfYJ/nUedIGeUHPF/+EDw==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-x64-msvc@1.7.23': - resolution: {integrity: sha512-82fARk4/yJ40kwWKY/gdKDisPdtgJE9jgpl/vkNG3alyJxrCzuNM7+CtiKoYbXLeqM8GQTS3wlvCaJu9oQ8dag==} + '@swc/core-win32-x64-msvc@1.7.24': + resolution: {integrity: sha512-gRyPIxDznS8d2ClfmWbytjp2d48bij6swHnDLWhukNuOvXdQkEmaIzjEsionFG/zhcFLnz8zKfTvjEjInAMzxg==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core@1.7.23': - resolution: {integrity: sha512-VDNkpDvDlreGh2E3tlDj8B3piiuLhhQA/7rIVZpiLUvG1YpucAa6N7iDXA7Gc/+Hah8spaCg/qvEaBkCmcIYCQ==} + '@swc/core@1.7.24': + resolution: {integrity: sha512-FzJaai6z6DYdICAY1UKNN5pzTn296ksK2zzEjjaXlpZtoMkGktWT0ttS7hbdBCPGhLOu5Q9TA2zdPejKUFjgig==} engines: {node: '>=10'} peerDependencies: '@swc/helpers': '*' @@ -810,8 +818,8 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.9.1: - resolution: {integrity: sha512-dHvhrbfr4xFQ9/dq+jcVneZMyRYLjggWjk6RVsIiHsP8Rz6yZ8LvZ//iU4TrZF+SXWG+JkNF2OyiZRvzgRDqMg==} + eslint@9.10.0: + resolution: {integrity: sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1415,14 +1423,14 @@ packages: text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - tldts-core@6.1.41: - resolution: {integrity: sha512-SkwZgo1ZzMp2ziMBwci5VBnLR9VywCi02jSgMX5TO5kf9fdaBsxZkblLff3NlJNTcH0vfvEsgw2B7jVR556Vgw==} + tldts-core@6.1.43: + resolution: {integrity: sha512-iO1G3F2NqtmJUYlTfcH2liSdaqDnjpYn6iGftbLRNx8DF6IRIjbknVt+q0ijwZ2KGZX3J8zeYGFoiI+ZtHT5MQ==} - tldts-experimental@6.1.41: - resolution: {integrity: sha512-sHpzKl2XpmoByBEZvEyTcq/58YPSdA4LDXN2yFQDm7P+i8z8FTDH9IAGkz/GKdgHtP2Doc50BvoHrgm1y/hqmg==} + tldts-experimental@6.1.43: + resolution: {integrity: sha512-sziyPA9lOF4QQ1lB51HYVvPfoGmwWEuMrpJ9PleIRLWf1RU3O5JWqEDF07EiuuqilBOPfoeZvnJhOVYksTMtoA==} - tldts@6.1.41: - resolution: {integrity: sha512-RNpUkL5fYD2DTQQCdr8QMDp6UL0ThtpXT3q3+qPE05dIT+RK2I3M0VByVbQN1dEhLUGzimivVwxK2By9epLk6w==} + tldts@6.1.43: + resolution: {integrity: sha512-5J2v/CbNH8CkwsQV+igsuu0+3eeTfRDn1CFf38a24ZD6FIrbm3DZFu4UrrpoOSejhuP4N1PNDNUvJcw+f4nXNw==} hasBin: true to-regex-range@5.0.1: @@ -1540,7 +1548,7 @@ snapshots: '@remusao/smaz': 1.10.0 '@types/chrome': 0.0.270 '@types/firefox-webext-browser': 120.0.4 - tldts-experimental: 6.1.41 + tldts-experimental: 6.1.43 '@dual-bundle/import-meta-resolve@4.1.0': {} @@ -1560,34 +1568,34 @@ snapshots: tslib: 2.7.0 optional: true - '@eslint-community/eslint-plugin-eslint-comments@4.4.0(eslint@9.9.1)': + '@eslint-community/eslint-plugin-eslint-comments@4.4.0(eslint@9.10.0)': dependencies: escape-string-regexp: 4.0.0 - eslint: 9.9.1 + eslint: 9.10.0 ignore: 5.3.2 - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.1)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.10.0)': dependencies: - eslint: 9.9.1 + eslint: 9.10.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint-sukka/node@6.3.0(eslint@9.9.1)(typescript@5.5.4)': + '@eslint-sukka/node@6.3.0(eslint@9.10.0)(typescript@5.5.4)': dependencies: - '@eslint-sukka/shared': 6.3.0(eslint@9.9.1)(typescript@5.5.4) - eslint-plugin-n: 17.10.2(eslint@9.9.1) - eslint-plugin-sukka: 6.3.0(eslint@9.9.1)(typescript@5.5.4) + '@eslint-sukka/shared': 6.3.0(eslint@9.10.0)(typescript@5.5.4) + eslint-plugin-n: 17.10.2(eslint@9.10.0) + eslint-plugin-sukka: 6.3.0(eslint@9.10.0)(typescript@5.5.4) transitivePeerDependencies: - eslint - supports-color - typescript - '@eslint-sukka/shared@6.3.0(eslint@9.9.1)(typescript@5.5.4)': + '@eslint-sukka/shared@6.3.0(eslint@9.10.0)(typescript@5.5.4)': dependencies: '@dual-bundle/import-meta-resolve': 4.1.0 '@types/eslint': 9.6.1 - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) type-fest: 4.26.0 transitivePeerDependencies: - eslint @@ -1616,10 +1624,16 @@ snapshots: transitivePeerDependencies: - supports-color + '@eslint/js@9.10.0': {} + '@eslint/js@9.9.1': {} '@eslint/object-schema@2.1.4': {} + '@eslint/plugin-kit@0.1.0': + dependencies: + levn: 0.4.1 + '@humanwhocodes/module-importer@1.0.1': {} '@humanwhocodes/retry@0.3.0': {} @@ -1702,39 +1716,39 @@ snapshots: '@remusao/trie@1.5.0': {} - '@stylistic/eslint-plugin-js@2.7.2(eslint@9.9.1)': + '@stylistic/eslint-plugin-js@2.7.2(eslint@9.10.0)': dependencies: '@types/eslint': 9.6.1 - eslint: 9.9.1 + eslint: 9.10.0 eslint-visitor-keys: 4.0.0 espree: 10.1.0 - '@stylistic/eslint-plugin-plus@2.7.2(eslint@9.9.1)': + '@stylistic/eslint-plugin-plus@2.7.2(eslint@9.10.0)': dependencies: '@types/eslint': 9.6.1 - eslint: 9.9.1 + eslint: 9.10.0 - '@stylistic/eslint-plugin-ts@2.7.2(eslint@9.9.1)(typescript@5.5.4)': + '@stylistic/eslint-plugin-ts@2.7.2(eslint@9.10.0)(typescript@5.5.4)': dependencies: '@types/eslint': 9.6.1 - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - eslint: 9.9.1 + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + eslint: 9.10.0 eslint-visitor-keys: 4.0.0 espree: 10.1.0 transitivePeerDependencies: - supports-color - typescript - '@swc-node/core@1.13.3(@swc/core@1.7.23)(@swc/types@0.1.12)': + '@swc-node/core@1.13.3(@swc/core@1.7.24)(@swc/types@0.1.12)': dependencies: - '@swc/core': 1.7.23 + '@swc/core': 1.7.24 '@swc/types': 0.1.12 - '@swc-node/register@1.10.9(@swc/core@1.7.23)(@swc/types@0.1.12)(typescript@5.5.4)': + '@swc-node/register@1.10.9(@swc/core@1.7.24)(@swc/types@0.1.12)(typescript@5.5.4)': dependencies: - '@swc-node/core': 1.13.3(@swc/core@1.7.23)(@swc/types@0.1.12) + '@swc-node/core': 1.13.3(@swc/core@1.7.24)(@swc/types@0.1.12) '@swc-node/sourcemap-support': 0.5.1 - '@swc/core': 1.7.23 + '@swc/core': 1.7.24 colorette: 2.0.20 debug: 4.3.6(supports-color@8.1.1) oxc-resolver: 1.10.2 @@ -1750,51 +1764,51 @@ snapshots: source-map-support: 0.5.21 tslib: 2.7.0 - '@swc/core-darwin-arm64@1.7.23': + '@swc/core-darwin-arm64@1.7.24': optional: true - '@swc/core-darwin-x64@1.7.23': + '@swc/core-darwin-x64@1.7.24': optional: true - '@swc/core-linux-arm-gnueabihf@1.7.23': + '@swc/core-linux-arm-gnueabihf@1.7.24': optional: true - '@swc/core-linux-arm64-gnu@1.7.23': + '@swc/core-linux-arm64-gnu@1.7.24': optional: true - '@swc/core-linux-arm64-musl@1.7.23': + '@swc/core-linux-arm64-musl@1.7.24': optional: true - '@swc/core-linux-x64-gnu@1.7.23': + '@swc/core-linux-x64-gnu@1.7.24': optional: true - '@swc/core-linux-x64-musl@1.7.23': + '@swc/core-linux-x64-musl@1.7.24': optional: true - '@swc/core-win32-arm64-msvc@1.7.23': + '@swc/core-win32-arm64-msvc@1.7.24': optional: true - '@swc/core-win32-ia32-msvc@1.7.23': + '@swc/core-win32-ia32-msvc@1.7.24': optional: true - '@swc/core-win32-x64-msvc@1.7.23': + '@swc/core-win32-x64-msvc@1.7.24': optional: true - '@swc/core@1.7.23': + '@swc/core@1.7.24': dependencies: '@swc/counter': 0.1.3 '@swc/types': 0.1.12 optionalDependencies: - '@swc/core-darwin-arm64': 1.7.23 - '@swc/core-darwin-x64': 1.7.23 - '@swc/core-linux-arm-gnueabihf': 1.7.23 - '@swc/core-linux-arm64-gnu': 1.7.23 - '@swc/core-linux-arm64-musl': 1.7.23 - '@swc/core-linux-x64-gnu': 1.7.23 - '@swc/core-linux-x64-musl': 1.7.23 - '@swc/core-win32-arm64-msvc': 1.7.23 - '@swc/core-win32-ia32-msvc': 1.7.23 - '@swc/core-win32-x64-msvc': 1.7.23 + '@swc/core-darwin-arm64': 1.7.24 + '@swc/core-darwin-x64': 1.7.24 + '@swc/core-linux-arm-gnueabihf': 1.7.24 + '@swc/core-linux-arm64-gnu': 1.7.24 + '@swc/core-linux-arm64-musl': 1.7.24 + '@swc/core-linux-x64-gnu': 1.7.24 + '@swc/core-linux-x64-musl': 1.7.24 + '@swc/core-win32-arm64-msvc': 1.7.24 + '@swc/core-win32-ia32-msvc': 1.7.24 + '@swc/core-win32-x64-msvc': 1.7.24 '@swc/counter@0.1.3': {} @@ -1855,15 +1869,15 @@ snapshots: dependencies: '@types/node': 20.14.11 - '@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/parser': 8.4.0(eslint@9.10.0)(typescript@5.5.4) '@typescript-eslint/scope-manager': 8.4.0 - '@typescript-eslint/type-utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.4.0 - eslint: 9.9.1 + eslint: 9.10.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -1873,14 +1887,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.4.0 debug: 4.3.6(supports-color@8.1.1) - eslint: 9.9.1 + eslint: 9.10.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -1891,10 +1905,10 @@ snapshots: '@typescript-eslint/types': 8.4.0 '@typescript-eslint/visitor-keys': 8.4.0 - '@typescript-eslint/type-utils@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.4.0(eslint@9.10.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) debug: 4.3.6(supports-color@8.1.1) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: @@ -1920,13 +1934,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/utils@8.4.0(eslint@9.10.0)(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) - eslint: 9.9.1 + eslint: 9.10.0 transitivePeerDependencies: - supports-color - typescript @@ -2149,34 +2163,34 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.9.1): + eslint-compat-utils@0.5.1(eslint@9.10.0): dependencies: - eslint: 9.9.1 + eslint: 9.10.0 semver: 7.6.3 - eslint-config-sukka@6.3.0(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4): + eslint-config-sukka@6.3.0(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4): dependencies: - '@eslint-community/eslint-plugin-eslint-comments': 4.4.0(eslint@9.9.1) - '@eslint-sukka/shared': 6.3.0(eslint@9.9.1)(typescript@5.5.4) + '@eslint-community/eslint-plugin-eslint-comments': 4.4.0(eslint@9.10.0) + '@eslint-sukka/shared': 6.3.0(eslint@9.10.0)(typescript@5.5.4) '@eslint/js': 9.9.1 - '@stylistic/eslint-plugin-js': 2.7.2(eslint@9.9.1) - '@stylistic/eslint-plugin-plus': 2.7.2(eslint@9.9.1) - '@stylistic/eslint-plugin-ts': 2.7.2(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@stylistic/eslint-plugin-js': 2.7.2(eslint@9.10.0) + '@stylistic/eslint-plugin-plus': 2.7.2(eslint@9.10.0) + '@stylistic/eslint-plugin-ts': 2.7.2(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.4.0(eslint@9.10.0)(typescript@5.5.4) ci-info: 4.0.0 defu: 6.1.4 eslint-import-resolver-ts-bundled: 6.3.0 - eslint-plugin-autofix: 2.2.0(eslint@9.9.1) - eslint-plugin-import-x: 4.2.1(eslint@9.9.1)(typescript@5.5.4) - eslint-plugin-jsonc: 2.16.0(eslint@9.9.1) - eslint-plugin-promise: 7.1.0(eslint@9.9.1) - eslint-plugin-regexp: 2.6.0(eslint@9.9.1) - eslint-plugin-sukka: 6.3.0(eslint@9.9.1)(typescript@5.5.4) - eslint-plugin-unused-imports: 4.1.3(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1) + eslint-plugin-autofix: 2.2.0(eslint@9.10.0) + eslint-plugin-import-x: 4.2.1(eslint@9.10.0)(typescript@5.5.4) + eslint-plugin-jsonc: 2.16.0(eslint@9.10.0) + eslint-plugin-promise: 7.1.0(eslint@9.10.0) + eslint-plugin-regexp: 2.6.0(eslint@9.10.0) + eslint-plugin-sukka: 6.3.0(eslint@9.10.0)(typescript@5.5.4) + eslint-plugin-unused-imports: 4.1.3(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0) jsonc-eslint-parser: 2.4.0 local-pkg: 0.5.0 picocolors: 1.1.0 - typescript-eslint: 8.4.0(eslint@9.9.1)(typescript@5.5.4) + typescript-eslint: 8.4.0(eslint@9.10.0)(typescript@5.5.4) transitivePeerDependencies: - '@typescript-eslint/eslint-plugin' - eslint @@ -2200,27 +2214,27 @@ snapshots: dependencies: enhanced-resolve: 5.17.1 - eslint-plugin-autofix@2.2.0(eslint@9.9.1): + eslint-plugin-autofix@2.2.0(eslint@9.10.0): dependencies: - eslint: 9.9.1 + eslint: 9.10.0 eslint-rule-composer: 0.3.0 espree: 9.6.1 esutils: 2.0.3 string-similarity: 4.0.4 - eslint-plugin-es-x@7.8.0(eslint@9.9.1): + eslint-plugin-es-x@7.8.0(eslint@9.10.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) '@eslint-community/regexpp': 4.11.0 - eslint: 9.9.1 - eslint-compat-utils: 0.5.1(eslint@9.9.1) + eslint: 9.10.0 + eslint-compat-utils: 0.5.1(eslint@9.10.0) - eslint-plugin-import-x@4.2.1(eslint@9.9.1)(typescript@5.5.4): + eslint-plugin-import-x@4.2.1(eslint@9.10.0)(typescript@5.5.4): dependencies: - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) debug: 4.3.6(supports-color@8.1.1) doctrine: 3.0.0 - eslint: 9.9.1 + eslint: 9.10.0 eslint-import-resolver-node: 0.3.9 get-tsconfig: 4.8.0 is-glob: 4.0.3 @@ -2232,59 +2246,59 @@ snapshots: - supports-color - typescript - eslint-plugin-jsonc@2.16.0(eslint@9.9.1): + eslint-plugin-jsonc@2.16.0(eslint@9.10.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) - eslint: 9.9.1 - eslint-compat-utils: 0.5.1(eslint@9.9.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) + eslint: 9.10.0 + eslint-compat-utils: 0.5.1(eslint@9.10.0) espree: 9.6.1 graphemer: 1.4.0 jsonc-eslint-parser: 2.4.0 natural-compare: 1.4.0 synckit: 0.6.2 - eslint-plugin-n@17.10.2(eslint@9.9.1): + eslint-plugin-n@17.10.2(eslint@9.10.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) enhanced-resolve: 5.17.1 - eslint: 9.9.1 - eslint-plugin-es-x: 7.8.0(eslint@9.9.1) + eslint: 9.10.0 + eslint-plugin-es-x: 7.8.0(eslint@9.10.0) get-tsconfig: 4.8.0 globals: 15.9.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-promise@7.1.0(eslint@9.9.1): + eslint-plugin-promise@7.1.0(eslint@9.10.0): dependencies: - eslint: 9.9.1 + eslint: 9.10.0 - eslint-plugin-regexp@2.6.0(eslint@9.9.1): + eslint-plugin-regexp@2.6.0(eslint@9.10.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) '@eslint-community/regexpp': 4.11.0 comment-parser: 1.4.1 - eslint: 9.9.1 + eslint: 9.10.0 jsdoc-type-pratt-parser: 4.1.0 refa: 0.12.1 regexp-ast-analysis: 0.7.1 scslre: 0.3.0 - eslint-plugin-sukka@6.3.0(eslint@9.9.1)(typescript@5.5.4): + eslint-plugin-sukka@6.3.0(eslint@9.10.0)(typescript@5.5.4): dependencies: - '@eslint-sukka/shared': 6.3.0(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/type-utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@eslint-sukka/shared': 6.3.0(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) transitivePeerDependencies: - eslint - supports-color - typescript - eslint-plugin-unused-imports@4.1.3(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1): + eslint-plugin-unused-imports@4.1.3(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0): dependencies: - eslint: 9.9.1 + eslint: 9.10.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4) eslint-rule-composer@0.3.0: {} @@ -2297,13 +2311,14 @@ snapshots: eslint-visitor-keys@4.0.0: {} - eslint@9.9.1: + eslint@9.10.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) '@eslint-community/regexpp': 4.11.0 '@eslint/config-array': 0.18.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.1 + '@eslint/js': 9.10.0 + '@eslint/plugin-kit': 0.1.0 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 @@ -2326,7 +2341,6 @@ snapshots: is-glob: 4.0.3 is-path-inside: 3.0.3 json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 @@ -2917,15 +2931,15 @@ snapshots: text-table@0.2.0: {} - tldts-core@6.1.41: {} + tldts-core@6.1.43: {} - tldts-experimental@6.1.41: + tldts-experimental@6.1.43: dependencies: - tldts-core: 6.1.41 + tldts-core: 6.1.43 - tldts@6.1.41: + tldts@6.1.43: dependencies: - tldts-core: 6.1.41 + tldts-core: 6.1.43 to-regex-range@5.0.1: dependencies: @@ -2949,11 +2963,11 @@ snapshots: type-fest@4.26.0: {} - typescript-eslint@8.4.0(eslint@9.9.1)(typescript@5.5.4): + typescript-eslint@8.4.0(eslint@9.10.0)(typescript@5.5.4): dependencies: - '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: From f3c8a1dcbfc72e3ebd32f11f3e3a364166eaacc1 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Mon, 9 Sep 2024 01:33:23 +0800 Subject: [PATCH 10/19] Update CDN Hosts --- Source/domainset/cdn.conf | 1 + Source/non_ip/global.conf | 2 ++ Source/non_ip/my_proxy.conf | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/Source/domainset/cdn.conf b/Source/domainset/cdn.conf index 89beb57f3..4bc131760 100644 --- a/Source/domainset/cdn.conf +++ b/Source/domainset/cdn.conf @@ -2800,3 +2800,4 @@ img.shoplineapp.com image.gyutto.com image.gyutto.jp .makeuseofimages.com +web-assets.esetstatic.com diff --git a/Source/non_ip/global.conf b/Source/non_ip/global.conf index 52f616b8b..acbe2cc09 100644 --- a/Source/non_ip/global.conf +++ b/Source/non_ip/global.conf @@ -316,6 +316,7 @@ DOMAIN-SUFFIX,annas-archive.gs DOMAIN-SUFFIX,annas-archive.org # >> DNS Leaks +# u.fastly-analytics.com is included in fastly-analytics.com DOMAIN-SUFFIX,dnsleaktest.com DOMAIN-SUFFIX,browserleaks.org DOMAIN-SUFFIX,ipleak.net @@ -459,6 +460,7 @@ DOMAIN-SUFFIX,fanbox.cc DOMAIN-SUFFIX,fastly.net DOMAIN-SUFFIX,fastlylb.net DOMAIN-SUFFIX,fastly-edge.com +DOMAIN-SUFFIX,fastly-analytics.com DOMAIN-SUFFIX,fc2.com DOMAIN-SUFFIX,feedly.com DOMAIN-SUFFIX,flickr.com diff --git a/Source/non_ip/my_proxy.conf b/Source/non_ip/my_proxy.conf index 843a97e1e..5e9f2c85c 100644 --- a/Source/non_ip/my_proxy.conf +++ b/Source/non_ip/my_proxy.conf @@ -12,3 +12,7 @@ DOMAIN-SUFFIX,ipstack.com DOMAIN-SUFFIX,nextdns.io DOMAIN-SUFFIX,services.googleapis.cn + +# Prevents pollution +DOMAIN,fonts.gstatic.cn +DOMAIN,fonts.googleapis.cn From 238a15f3457b8edef545a26aaf4c403fe4da0f74 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Mon, 9 Sep 2024 04:00:18 +0800 Subject: [PATCH 11/19] Update CDN & Download Hosts --- Source/domainset/cdn.conf | 3 +-- Source/domainset/download.conf | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/domainset/cdn.conf b/Source/domainset/cdn.conf index 4bc131760..b0f78601a 100644 --- a/Source/domainset/cdn.conf +++ b/Source/domainset/cdn.conf @@ -546,8 +546,6 @@ archive.mozilla.org detectportal.firefox.com stubdownloader.services.mozilla.com firefox.settings.services.mozilla.com -# extension update check -versioncheck-bg.addons.mozilla.org # >> Hubspot .hubspotusercontent30.com @@ -1962,6 +1960,7 @@ staticassets.music.com # Forbes .forbesimg.com imageio.forbes.com +thumbor.forbes.com # influxdata .cloud.influxdata.com .cloud1.influxdata.com diff --git a/Source/domainset/download.conf b/Source/domainset/download.conf index da1700034..bd0a041d7 100644 --- a/Source/domainset/download.conf +++ b/Source/domainset/download.conf @@ -246,6 +246,11 @@ download.sketch.com .dl.wireshark.org # Mozilla download.mozilla.org +# Mozilla extension update check +versioncheck-bg.addons.mozilla.org +# Mozilla others update check +aus2-community.mozilla.org +aus5.mozilla.org # AnyDesk download.anydesk.com # Arc From 1b41a5904a5194188a7d3cd66c5dfe51551430c4 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Mon, 9 Sep 2024 05:36:37 +0800 Subject: [PATCH 12/19] Update CDN & Reject Hosts --- Source/domainset/cdn.conf | 54 ++++++++++++++++++++++++++++++ Source/domainset/reject_sukka.conf | 2 -- Source/non_ip/cdn.conf | 2 ++ Source/non_ip/domestic.ts | 4 ++- Source/non_ip/my_git.conf | 1 + Source/non_ip/reject.conf | 2 ++ 6 files changed, 62 insertions(+), 3 deletions(-) diff --git a/Source/domainset/cdn.conf b/Source/domainset/cdn.conf index b0f78601a..e30f4cab5 100644 --- a/Source/domainset/cdn.conf +++ b/Source/domainset/cdn.conf @@ -82,6 +82,7 @@ webpack.js.org vuejs.org .react.dev .reactjs.org +.radix-ui.com storybook.js.org www.typescriptlang.org typescript.azureedge.net @@ -445,6 +446,8 @@ prod.msocdn.com spoprod-a.akamaihd.net spoppe-b.azureedge.net img-prod-cms-rt-microsoft-com.akamaized.net +prod-streaming-video-msn-com.akamaized.net +prod-video-cms-amp-microsoft-com.akamaized.net statics-marketingsites-eas-ms-com.akamaized.net spoprod-a.akamaihd.net assets.onestore.ms @@ -960,6 +963,15 @@ app-static.turtl.co .quip-cdn.com .quip-marketing.com .intuitcdn.net +adkit.9pub.io +.dwcdn.net +tags.bkrtx.com +public.flourish.studio +players.brightcove.net +sync.getpublica.com + +loader.mantis-intelligence.com +mantisloader.mantis-awx.com cdn.transcend.io .transcend-cdn.com @@ -1612,8 +1624,12 @@ media.gettyimages.com # ABC News res.abc.net.au .abc-cdn.net +.abc-cdn.net.au assets-cdn.abcnews.com +assets-cdn.abcotvs.net +keyframe-cdn.abcnews.com s.abcnews.com +.abcnewsfe.com # Fox News static.foxnews.com static.foxbusiness.com @@ -1622,10 +1638,22 @@ a57.foxnews.com # BBC static.files.bbci.co.uk ichef.bbci.co.uk +static.bbci.co.uk +gn-web-assets.api.bbc.com +# the domain below is served from S3 using cloudfront +emp.bbci.co.uk # CNN media.cnn.com registry.api.cnn.io .cdn.turner.com +# CNBC +image.cnbcfm.com +static-redesign.cnbcfm.com +# the domain below is served from S3 using cloudfront +zephr-templates.cnbc.com +# AP News +assets.apnews.com +dims.apnews.com # DailyMail i.dailymail.co.uk scripts.dailymail.co.uk @@ -1636,10 +1664,19 @@ talk.washingtonpost.com .bstatic.com # The Guardian i.guim.co.uk +static.guim.co.uk +assets.guim.co.uk interactive.guim.co.uk static.theguardian.com uploads.guim.co.uk sourcepoint.theguardian.com +# washingtonpost +img.washingtonpost.com +# Financial Times +consent-manager.ft.com +consent-notice.ft.com +# NY Post +pbc.nypost.com # XDA .xdaimages.com # Video.js @@ -1848,6 +1885,9 @@ media.theporndude.com # CBS doppler-config.cbsivideo.com production-cmp.isgprivacy.cbsi.com +.cbsnewsstatic.com +at.cbsi.com +cdn.privacy.paramount.com # utteranc.es utteranc.es # setapp @@ -1955,6 +1995,8 @@ frames-commandbar-prod.commandbar.com nodeassets.nbcnews.com media-cldnry.s-nbcnews.com iframe.nbcnews.com +nbcnewsdigital-static.nbcuni.com +prodamdnewsencoding.akamaized.net # music.com staticassets.music.com # Forbes @@ -2112,6 +2154,8 @@ m.wsj.net s.wsj.net vir.wsj.net optimizely.wsj.net +sts3.wsj.net +pbc.wsj.com # Rakuten cdn.rex.contents.rakuten.co.jp ias.r10s.jp @@ -2301,6 +2345,7 @@ static.getbutton.io .zippyshare.com .sendspace.com static.dw.com +consent.dw.com tvdownloaddw-a.akamaihd.net .tedcdn.com static.gopro.com @@ -2800,3 +2845,12 @@ image.gyutto.com image.gyutto.jp .makeuseofimages.com web-assets.esetstatic.com +i.insider.com +icons.llamao.fi +static.axios.com +images.axios.com +static.ffx.io +cdn.britannica.com +static.politico.com +s3.cointelegraph.com +images.financemagnates.com diff --git a/Source/domainset/reject_sukka.conf b/Source/domainset/reject_sukka.conf index 05cc04bc3..64f4e3489 100644 --- a/Source/domainset/reject_sukka.conf +++ b/Source/domainset/reject_sukka.conf @@ -33,7 +33,6 @@ optimus-ads.amap.com .kuaizhan.com .lapin365.com .miaozhen.com -.omtrdc.net .pv.com.cn .scorecardresearch.com .sensorsdata.cn @@ -751,7 +750,6 @@ comments.gazo.space .webhop.net .2o7.net -.omtrdc.net .footprintdns.com .measure.office.com diff --git a/Source/non_ip/cdn.conf b/Source/non_ip/cdn.conf index 06eacbb6f..616fa33e0 100644 --- a/Source/non_ip/cdn.conf +++ b/Source/non_ip/cdn.conf @@ -41,6 +41,8 @@ DOMAIN-WILDCARD,static-??-cdn.eporner.com # Mikufuns DOMAIN-WILDCARD,file?.mikuclub.fun DOMAIN-WILDCARD,cdn?.mikuclub.fun +# >> Embed +DOMAIN-WILDCARD,cdns.*.gigya.com # >> Misc # FC2 DOMAIN-WILDCARD,video?-thumbnail?.fc2.com diff --git a/Source/non_ip/domestic.ts b/Source/non_ip/domestic.ts index f5d03fc6f..bdec85b5b 100644 --- a/Source/non_ip/domestic.ts +++ b/Source/non_ip/domestic.ts @@ -242,7 +242,9 @@ export const DOMESTICS = { 'baike.com', 'zjcdn.com', 'zijieapi.com', - 'feelgood.cn' + 'feelgood.cn', + 'bytetcc.com', // Use hichina.com as NS + 'bytednsdoc.com' // Uses alidns.com as NS ] }, BAIDU: { diff --git a/Source/non_ip/my_git.conf b/Source/non_ip/my_git.conf index b4f0690af..d02227ed3 100644 --- a/Source/non_ip/my_git.conf +++ b/Source/non_ip/my_git.conf @@ -2,4 +2,5 @@ DOMAIN-SUFFIX,huggingface.co DOMAIN,github.com +DOMAIN,api.github.com DOMAIN,gitlab.com diff --git a/Source/non_ip/reject.conf b/Source/non_ip/reject.conf index f4fbf5052..0fecf95e6 100644 --- a/Source/non_ip/reject.conf +++ b/Source/non_ip/reject.conf @@ -85,6 +85,8 @@ DOMAIN,api-js.mixpanel.com # AdGuardDNSFilter unblocks iterable.com because of CNAME, but the primary domain is blockable DOMAIN,api.iterable.com DOMAIN,js.iterable.com +# Force block omtrdc.net +DOMAIN-SUFFIX,omtrdc.net DOMAIN-KEYWORD,.net.daraz. DOMAIN-KEYWORD,.zooplus. From c1fa3c7b96159a13e85833b183278cfde287a829 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Mon, 9 Sep 2024 06:00:54 +0800 Subject: [PATCH 13/19] Chore: print build platform info --- Build/index.ts | 23 +++++++++++++++++++++-- Build/lib/create-file.ts | 2 -- Build/lib/get-phishing-domains.ts | 2 -- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Build/index.ts b/Build/index.ts index 05d0ab2a8..00c7ace7d 100644 --- a/Build/index.ts +++ b/Build/index.ts @@ -1,6 +1,5 @@ import process from 'node:process'; - -console.log('Version:', process.version); +import os from 'node:os'; import { downloadPreviousBuild } from './download-previous-build'; import { buildCommon } from './build-common'; @@ -39,6 +38,26 @@ process.on('unhandledRejection', (reason) => { }); (async () => { + console.log('Version:', process.version); + + console.log(`OS: ${os.type()} ${os.release()} ${os.arch()}`); + console.log(`Node.js: ${process.versions.node}`); + console.log(`V8: ${process.versions.v8}`); + + const cpus = os.cpus() + .map(cpu => cpu.model) + .reduce>((o, model) => { + o[model] = (o[model] || 0) + 1; + return o; + }, {}); + + console.log(`CPU: ${ + Object.keys(cpus) + .map((key) => `${key} x ${cpus[key]}`) + .join('\n') + }`); + console.log(`Memory: ${os.totalmem() / (1024 * 1024)} MiB`); + const rootSpan = createSpan('root'); try { diff --git a/Build/lib/create-file.ts b/Build/lib/create-file.ts index 5602cd6ea..5361a1a82 100644 --- a/Build/lib/create-file.ts +++ b/Build/lib/create-file.ts @@ -157,8 +157,6 @@ const processRuleSet = (ruleSet: string[]) => { const dumped = trie.dumpWithMeta(); for (let i = 0, len = dumped.length; i < len; i++) { const [originalIndex, flag] = unpack(dumped[i][1]); - console.log(dumped[i][0], ruleSet[originalIndex]); - const type = flag === flagDomain ? 'DOMAIN' : 'DOMAIN-SUFFIX'; sortMap.push([originalIndex, sortTypeOrder[type]]); diff --git a/Build/lib/get-phishing-domains.ts b/Build/lib/get-phishing-domains.ts index adfd9359b..789a0578f 100644 --- a/Build/lib/get-phishing-domains.ts +++ b/Build/lib/get-phishing-domains.ts @@ -215,8 +215,6 @@ export const getPhishingDomains = (parentSpan: Span) => parentSpan.traceChild('g } } - // console.log(domainScoreMap['']); - return domainArr; }); From 385147f7846caf1a659c9295bc2c1c805b9d03db Mon Sep 17 00:00:00 2001 From: SukkaW Date: Mon, 9 Sep 2024 06:15:32 +0800 Subject: [PATCH 14/19] Chore: replace `tar-stream` w/ `tar-fs` --- Build/download-previous-build.ts | 36 ++++++++--------- package.json | 3 +- pnpm-lock.yaml | 69 ++++++++++++++++++++++++++++---- 3 files changed, 80 insertions(+), 28 deletions(-) diff --git a/Build/download-previous-build.ts b/Build/download-previous-build.ts index c1843fe17..b12c12238 100644 --- a/Build/download-previous-build.ts +++ b/Build/download-previous-build.ts @@ -1,10 +1,8 @@ -import { createWriteStream } from 'node:fs'; -import { mkdir } from 'node:fs/promises'; import path from 'node:path'; import { pipeline } from 'node:stream/promises'; import { task } from './trace'; import { defaultRequestInit, fetchWithRetry } from './lib/fetch-retry'; -import tarStream from 'tar-stream'; +import { extract as tarExtract } from 'tar-fs'; import zlib from 'node:zlib'; import { Readable } from 'node:stream'; @@ -58,28 +56,26 @@ export const downloadPreviousBuild = task(require.main === module, __filename)(a throw new Error('Download previous build failed! No body found'); } + const pathPrefix = 'ruleset.skk.moe-master/'; + const gunzip = zlib.createGunzip(); - const extract = tarStream.extract(); + const extract = tarExtract( + publicDir, + { + ignore(_, header) { + return header?.type !== 'file' && header?.type !== 'directory'; + }, + map(header) { + header.name = header.name.replace(pathPrefix, ''); + return header; + } + } + ); - pipeline( + return pipeline( Readable.fromWeb(resp.body), gunzip, extract ); - - const pathPrefix = 'ruleset.skk.moe-master/'; - - for await (const entry of extract) { - if (entry.header.type !== 'file') { - entry.resume(); // Drain the entry - continue; - } - - const relativeEntryPath = entry.header.name.replace(pathPrefix, ''); - const targetPath = path.join(publicDir, relativeEntryPath); - - await mkdir(path.dirname(targetPath), { recursive: true }); - await pipeline(entry, createWriteStream(targetPath)); - } }); }); diff --git a/package.json b/package.json index 16a7a4fed..a7b2b3bf6 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "picocolors": "^1.1.0", "punycode": "^2.3.1", "table": "^6.8.2", - "tar-stream": "^3.1.7", + "tar-fs": "^3.0.6", "tldts": "^6.1.43", "tldts-experimental": "^6.1.43", "yaml": "^2.5.1" @@ -49,6 +49,7 @@ "@types/chai": "^4.3.19", "@types/mocha": "^10.0.7", "@types/punycode": "^2.1.4", + "@types/tar-fs": "^2.0.4", "@types/tar-stream": "^3.1.3", "chai": "4", "eslint": "^9.10.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ff0679ab2..fa76972c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,9 +56,9 @@ importers: table: specifier: ^6.8.2 version: 6.8.2 - tar-stream: - specifier: ^3.1.7 - version: 3.1.7 + tar-fs: + specifier: ^3.0.6 + version: 3.0.6 tldts: specifier: ^6.1.43 version: 6.1.43 @@ -93,6 +93,9 @@ importers: '@types/punycode': specifier: ^2.1.4 version: 2.1.4 + '@types/tar-fs': + specifier: ^2.0.4 + version: 2.0.4 '@types/tar-stream': specifier: ^3.1.3 version: 3.1.3 @@ -443,6 +446,9 @@ packages: '@types/retry@0.12.5': resolution: {integrity: sha512-3xSjTp3v03X/lSQLkczaN9UIEwJMoMCA1+Nb5HfbJEQWogdeQIyVtTvxPXDQjZ5zws8rFQfVfRdz03ARihPJgw==} + '@types/tar-fs@2.0.4': + resolution: {integrity: sha512-ipPec0CjTmVDWE+QKr9cTmIIoTl7dFG/yARCM5MqK8i6CNLIG1P8x4kwDsOQY1ChZOZjH0wO9nvfgBvWl4R3kA==} + '@types/tar-stream@3.1.3': resolution: {integrity: sha512-Zbnx4wpkWBMBSu5CytMbrT5ZpMiF55qgM+EpHzR4yIDu7mv52cej8hTkOc6K+LzpkOAbxwn/m7j3iO+/l42YkQ==} @@ -560,6 +566,18 @@ packages: bare-events@2.4.2: resolution: {integrity: sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q==} + bare-fs@2.3.3: + resolution: {integrity: sha512-7RYKL+vZVCyAsMLi5SPu7QGauGGT8avnP/HO571ndEuV4MYdGXvLhtW67FuLPeEI8EiIY7zbbRR9x7x7HU0kgw==} + + bare-os@2.4.2: + resolution: {integrity: sha512-HZoJwzC+rZ9lqEemTMiO0luOePoGYNBgsLLgegKR/cljiJvcDNhDZQkzC+NC5Oh0aHbdBNSOHpghwMuB5tqhjg==} + + bare-path@2.1.3: + resolution: {integrity: sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==} + + bare-stream@2.2.1: + resolution: {integrity: sha512-YTB47kHwBW9zSG8LD77MIBAAQXjU2WjAkMHeeb7hUplVs6+IoM5I7uEVQNPMB7lj9r8I76UMdoMkGnCodHOLqg==} + base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -1353,8 +1371,8 @@ packages: stable-hash@0.0.4: resolution: {integrity: sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==} - streamx@2.18.0: - resolution: {integrity: sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==} + streamx@2.20.0: + resolution: {integrity: sha512-ZGd1LhDeGFucr1CUCTBOS58ZhEendd0ttpGT3usTvosS4ntIwKN9LJFp+OeCSprsCPL14BXVRZlHGRY1V9PVzQ==} string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} @@ -1410,6 +1428,9 @@ packages: tar-fs@2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} + tar-fs@3.0.6: + resolution: {integrity: sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==} + tar-stream@2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} @@ -1865,6 +1886,11 @@ snapshots: '@types/retry@0.12.5': {} + '@types/tar-fs@2.0.4': + dependencies: + '@types/node': 20.14.11 + '@types/tar-stream': 3.1.3 + '@types/tar-stream@3.1.3': dependencies: '@types/node': 20.14.11 @@ -2002,6 +2028,27 @@ snapshots: bare-events@2.4.2: optional: true + bare-fs@2.3.3: + dependencies: + bare-events: 2.4.2 + bare-path: 2.1.3 + bare-stream: 2.2.1 + optional: true + + bare-os@2.4.2: + optional: true + + bare-path@2.1.3: + dependencies: + bare-os: 2.4.2 + optional: true + + bare-stream@2.2.1: + dependencies: + b4a: 1.6.6 + streamx: 2.20.0 + optional: true + base64-js@1.5.1: {} better-sqlite3@11.2.1: @@ -2850,7 +2897,7 @@ snapshots: stable-hash@0.0.4: {} - streamx@2.18.0: + streamx@2.20.0: dependencies: fast-fifo: 1.3.2 queue-tick: 1.0.1 @@ -2911,6 +2958,14 @@ snapshots: pump: 3.0.0 tar-stream: 2.2.0 + tar-fs@3.0.6: + dependencies: + pump: 3.0.0 + tar-stream: 3.1.7 + optionalDependencies: + bare-fs: 2.3.3 + bare-path: 2.1.3 + tar-stream@2.2.0: dependencies: bl: 4.1.0 @@ -2923,7 +2978,7 @@ snapshots: dependencies: b4a: 1.6.6 fast-fifo: 1.3.2 - streamx: 2.18.0 + streamx: 2.20.0 text-decoder@1.1.1: dependencies: From f58c10e34ced4f78799153dcf99885cfbfdffcd4 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Mon, 9 Sep 2024 23:02:57 +0800 Subject: [PATCH 15/19] Fix: trie meta --- Build/lib/create-file.ts | 10 +++++++++- Build/lib/trie.ts | 39 ++++++++++++++++++++++++--------------- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/Build/lib/create-file.ts b/Build/lib/create-file.ts index 5361a1a82..ea999ce60 100644 --- a/Build/lib/create-file.ts +++ b/Build/lib/create-file.ts @@ -62,7 +62,7 @@ export async function compareAndWriteFile(span: Span, linesA: string[], filePath } if (isEqual) { - console.log(picocolors.dim(`same content, bail out writing: ${filePath}`)); + console.log(picocolors.gray(picocolors.dim(`same content, bail out writing: ${filePath}`))); return; } @@ -154,6 +154,14 @@ const processRuleSet = (ruleSet: string[]) => { } } + if (ruleSet.includes('DOMAIN,github.com')) { + console.log(trie.inspect(0, (meta) => ({ + index: ruleSet[unpack(meta!)[0]], + flag: unpack(meta!)[1] === flagDomain ? 'DOMAIN' : 'DOMAIN-SUFFIX' + }))); + console.log(trie.root); + } + const dumped = trie.dumpWithMeta(); for (let i = 0, len = dumped.length; i < len; i++) { const [originalIndex, flag] = unpack(dumped[i][1]); diff --git a/Build/lib/trie.ts b/Build/lib/trie.ts index bc47fecf4..e53469c98 100644 --- a/Build/lib/trie.ts +++ b/Build/lib/trie.ts @@ -3,7 +3,7 @@ */ import { fastStringArrayJoin } from './misc'; -import { inspect } from 'node:util'; +import util from 'node:util'; const noop = () => { /** noop */ }; @@ -14,22 +14,29 @@ type TrieNode = [ Meta /** meta */ ]; -const deepTrieNodeToJSON = (node: TrieNode) => { +const deepTrieNodeToJSON = ( + node: TrieNode, + unpackMeta: ((meta?: any) => string) | undefined +) => { const obj: Record = {}; if (node[0]) { obj['[start]'] = node[0]; } - if (node[3] !== undefined) { - obj['[meta]'] = node[3]; + if (node[3] != null) { + if (unpackMeta) { + obj['[meta]'] = unpackMeta(node[3]); + } else { + obj['[meta]'] = node[3]; + } } node[2].forEach((value, key) => { - obj[key] = deepTrieNodeToJSON(value); + obj[key] = deepTrieNodeToJSON(value, unpackMeta); }); return obj; }; -const createNode = (parent: TrieNode | null = null, meta: Meta | null = null): TrieNode => { - return [false, parent, new Map(), meta] as TrieNode; +const createNode = (parent: TrieNode | null = null): TrieNode => { + return [false, parent, new Map(), null] as TrieNode; }; export const hostnameToTokens = (hostname: string): string[] => { @@ -102,7 +109,6 @@ export const createTrie = (from?: string[] | Set | null, smo node = newNode; } - node[3] = meta!; return false; }; @@ -132,6 +138,7 @@ export const createTrie = (from?: string[] | Set | null, smo } node[0] = true; + node[3] = meta!; } : (suffix: string, meta?: Meta): void => { let node: TrieNode = root; @@ -145,7 +152,6 @@ export const createTrie = (from?: string[] | Set | null, smo node = newNode; } - node[3] = meta!; return false; }; @@ -154,9 +160,10 @@ export const createTrie = (from?: string[] | Set | null, smo return; } - if (!node[0]) { // smol tree don't have size, so else-if here + if (!node[0]) { size++; node[0] = true; + node[3] = meta!; } }; @@ -447,6 +454,11 @@ export const createTrie = (from?: string[] | Set | null, smo from.forEach((value) => add(value)); } + const inspect = (depth: number, unpackMeta?: (meta?: Meta) => any) => fastStringArrayJoin( + JSON.stringify(deepTrieNodeToJSON(root, unpackMeta), null, 2).split('\n').map((line) => ' '.repeat(depth) + line), + '\n' + ); + return { add, contains, @@ -467,11 +479,8 @@ export const createTrie = (from?: string[] | Set | null, smo return root; }, whitelist, - - [inspect.custom]: (depth: number) => fastStringArrayJoin( - JSON.stringify(deepTrieNodeToJSON(root), null, 2).split('\n').map((line) => ' '.repeat(depth) + line), - '\n' - ), + inspect, + [util.inspect.custom]: inspect, smolTree }; }; From 05ccd9fa50550a76930d0f2272349879175b4741 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Tue, 10 Sep 2024 00:17:11 +0800 Subject: [PATCH 16/19] Perf: faster adguard filter syntax parsing --- Build/constants/loose-tldts-opt.ts | 5 +++++ Build/lib/normalize-domain.ts | 28 +++++++++++++++++----------- Build/lib/parse-filter.test.ts | 12 ++++++++++-- Build/lib/parse-filter.ts | 26 ++++++++++---------------- 4 files changed, 42 insertions(+), 29 deletions(-) diff --git a/Build/constants/loose-tldts-opt.ts b/Build/constants/loose-tldts-opt.ts index 882757f77..ee764c392 100644 --- a/Build/constants/loose-tldts-opt.ts +++ b/Build/constants/loose-tldts-opt.ts @@ -12,3 +12,8 @@ export const loosTldOptWithPrivateDomains: Parameters ...looseTldtsOpt, allowPrivateDomains: true }; + +export const normalizeTldtsOpt: Parameters[1] = { + allowPrivateDomains: true + // detectIp: true +}; diff --git a/Build/lib/normalize-domain.ts b/Build/lib/normalize-domain.ts index d09642a2c..6da49dbcb 100644 --- a/Build/lib/normalize-domain.ts +++ b/Build/lib/normalize-domain.ts @@ -1,26 +1,32 @@ // https://github.com/remusao/tldts/issues/2121 // import tldts from 'tldts-experimental'; import tldts from 'tldts'; -export const normalizeDomain = (domain: string) => { - if (!domain) return null; +import { normalizeTldtsOpt } from '../constants/loose-tldts-opt'; + +type TldTsParsed = ReturnType; + +export const normalizeDomain = (domain: string, parsed: TldTsParsed | null = null) => { + if (domain.length === 0) return null; + + parsed ??= tldts.parse(domain, normalizeTldtsOpt); - const parsed = tldts.parse(domain, { allowPrivateDomains: true, allowIcannDomains: true, detectIp: true }); if (parsed.isIp) return null; - if (!parsed.hostname) return null; - // Private invalid domain (things like .tor, .dn42, etc) - if (!parsed.isIcann && !parsed.isPrivate) return null; let h = parsed.hostname; + if (h === null) return null; + // Private invalid domain (things like .tor, .dn42, etc) + if (!parsed.isIcann && !parsed.isPrivate) return null; - let sliceStart: number | undefined; - let sliceEnd: number | undefined; + let sliceStart = 0; + let sliceEnd = 0; if (h[0] === '.') sliceStart = 1; - if (h.endsWith('.')) sliceEnd = -1; + // eslint-disable-next-line sukka/string/prefer-string-starts-ends-with -- performance + if (h[h.length - 1] === '.') sliceEnd = -1; - if (sliceStart !== undefined || sliceEnd !== undefined) { + if (sliceStart !== 0 || sliceEnd !== 0) { h = h.slice(sliceStart, sliceEnd); } - return h || null; + return h.length > 0 ? h : null; }; diff --git a/Build/lib/parse-filter.test.ts b/Build/lib/parse-filter.test.ts index 337b615e8..13ac1879e 100644 --- a/Build/lib/parse-filter.test.ts +++ b/Build/lib/parse-filter.test.ts @@ -1,12 +1,20 @@ import { describe, it } from 'mocha'; -import { processFilterRules } from './parse-filter'; +import { parse, processFilterRules, type ParseType } from './parse-filter'; import { createCacheKey } from './cache-filesystem'; import { createSpan } from '../trace'; const cacheKey = createCacheKey(__filename); -describe('processFilterRules', () => { +describe('parse', () => { + const MUTABLE_PARSE_LINE_RESULT: [string, ParseType] = ['', 1000]; + + it('||top.mail.ru^$badfilter', () => { + console.log(parse('||top.mail.ru^$badfilter', MUTABLE_PARSE_LINE_RESULT)); + }); +}); + +describe.skip('processFilterRules', () => { it('https://filters.adtidy.org/extension/ublock/filters/18_optimized.txt', () => { console.log(processFilterRules( createSpan('noop'), diff --git a/Build/lib/parse-filter.ts b/Build/lib/parse-filter.ts index d680ef932..a833b83f5 100644 --- a/Build/lib/parse-filter.ts +++ b/Build/lib/parse-filter.ts @@ -143,6 +143,8 @@ const enum ParseType { Null = 1000 } +export { type ParseType }; + export async function processFilterRules( parentSpan: Span, filterRulesUrl: string, @@ -289,10 +291,12 @@ const kwfilter = createKeywordFilter([ '$popup', '$removeparam', '$popunder', - '$cname' + '$cname', + // some bad syntax + '^popup' ]); -function parse($line: string, result: [string, ParseType]): [hostname: string, flag: ParseType] { +export function parse($line: string, result: [string, ParseType]): [hostname: string, flag: ParseType] { if ( // doesn't include !$line.includes('.') // rule with out dot can not be a domain @@ -685,6 +689,7 @@ function parse($line: string, result: [string, ParseType]): [hostname: string, f */ let sliceStart = 0; let sliceEnd: number | undefined; + if (lineStartsWithSingleDot) { sliceStart = 1; } @@ -696,28 +701,17 @@ function parse($line: string, result: [string, ParseType]): [hostname: string, f line.endsWith('$document') ) { sliceEnd = -9; + } else if (line.endsWith('$badfilter')) { + sliceEnd = -10; } const sliced = (sliceStart !== 0 || sliceEnd !== undefined) ? line.slice(sliceStart, sliceEnd) : line; - const suffix = tldts.getPublicSuffix(sliced, looseTldtsOpt); - /** - * Fast exclude definitely not domain-like resource - * - * `.gatracking.js`, suffix is `js`, - * `.ads.css`, suffix is `css`, - * `-cpm-ads.$badfilter`, suffix is `$badfilter`, - * `portal.librus.pl$$advertisement-module`, suffix is `pl$$advertisement-module` - */ - if (!suffix) { - // This exclude domain-like resource like `.gatracking.js`, `.beacon.min.js` and `.cookielaw.js` - result[1] = ParseType.Null; - return result; - } const tryNormalizeDomain = normalizeDomain(sliced); if (tryNormalizeDomain === sliced) { // the entire rule is domain result[0] = sliced; result[1] = ParseType.BlackIncludeSubdomain; + return result; } From 3b91b69406f1525d6e12cac66f936d4f14a64e06 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Tue, 10 Sep 2024 01:09:14 +0800 Subject: [PATCH 17/19] Perf: drop array --- Build/lib/bitwise.ts | 9 +++++++-- Build/lib/create-file.ts | 32 ++++++++++++++------------------ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Build/lib/bitwise.ts b/Build/lib/bitwise.ts index 0ff904369..4df4110de 100644 --- a/Build/lib/bitwise.ts +++ b/Build/lib/bitwise.ts @@ -4,6 +4,11 @@ export const pack = (a: number, b: number): number => { }; /** Unpacks two 16-bit integers from one 32-bit integer */ -export const unpack = (value: number): [a: number, b: number] => { - return [(value >> 16) & 0xFFFF, value & 0xFFFF]; +export const unpack = (value: number, arr: [a: number, b: number] = Array.from(new Array(2).keys()) as any): [a: number, b: number] => { + arr[0] = (value >> 16) & 0xFFFF; + arr[1] = value & 0xFFFF; + return arr; }; + +export const unpackFirst = (value: number): number => (value >> 16) & 0xFFFF; +export const unpackSecond = (value: number): number => value & 0xFFFF; diff --git a/Build/lib/create-file.ts b/Build/lib/create-file.ts index ea999ce60..a501722eb 100644 --- a/Build/lib/create-file.ts +++ b/Build/lib/create-file.ts @@ -9,7 +9,7 @@ import { readFileByLine } from './fetch-text-by-line'; import stringify from 'json-stringify-pretty-compact'; import { ipCidrListToSingbox, surgeDomainsetToSingbox, surgeRulesetToSingbox } from './singbox'; import { createTrie } from './trie'; -import { pack, unpack } from './bitwise'; +import { pack, unpackFirst, unpackSecond } from './bitwise'; export async function compareAndWriteFile(span: Span, linesA: string[], filePath: string) { let isEqual = true; @@ -119,7 +119,8 @@ const flagDomainSuffix = 1 << 3; const processRuleSet = (ruleSet: string[]) => { const trie = createTrie(null, true); - const sortMap: Array<[value: number, weight: number]> = []; + /** Packed Array<[valueIndex: number, weight: number]> */ + const sortMap: number[] = []; for (let i = 0, len = ruleSet.length; i < len; i++) { const line = ruleSet[i]; const [type, value] = line.split(','); @@ -140,39 +141,34 @@ const processRuleSet = (ruleSet: string[]) => { if (value.includes('|')) { extraWeight += 1; } - sortMap.push([i, sortTypeOrder[type] + extraWeight]); + sortMap.push(pack(i, sortTypeOrder[type] + extraWeight)); break; case null: - sortMap.push([i, 10]); + sortMap.push(pack(i, 10)); break; default: if (type in sortTypeOrder) { - sortMap.push([i, sortTypeOrder[type]]); + sortMap.push(pack(i, sortTypeOrder[type])); } else { - sortMap.push([i, sortTypeOrder[defaultSortTypeOrder]]); + sortMap.push(pack(i, sortTypeOrder[defaultSortTypeOrder])); } } } - if (ruleSet.includes('DOMAIN,github.com')) { - console.log(trie.inspect(0, (meta) => ({ - index: ruleSet[unpack(meta!)[0]], - flag: unpack(meta!)[1] === flagDomain ? 'DOMAIN' : 'DOMAIN-SUFFIX' - }))); - console.log(trie.root); - } - const dumped = trie.dumpWithMeta(); + for (let i = 0, len = dumped.length; i < len; i++) { - const [originalIndex, flag] = unpack(dumped[i][1]); + const originalIndex = unpackFirst(dumped[i][1]); + const flag = unpackSecond(dumped[i][1]); + const type = flag === flagDomain ? 'DOMAIN' : 'DOMAIN-SUFFIX'; - sortMap.push([originalIndex, sortTypeOrder[type]]); + sortMap.push(pack(originalIndex, sortTypeOrder[type])); } return sortMap - .sort((a, b) => a[1] - b[1]) - .map(c => ruleSet[c[0]]); + .sort((a, b) => unpackSecond(a) - unpackSecond(b)) + .map(c => ruleSet[unpackFirst(c)]); }; const MARK = 'this_ruleset_is_made_by_sukkaw.ruleset.skk.moe'; From 4522c8c96391e3277b538610102f38dcac451b9d Mon Sep 17 00:00:00 2001 From: SukkaW Date: Tue, 10 Sep 2024 01:09:46 +0800 Subject: [PATCH 18/19] Fix: drop corrupted files --- Build/download-previous-build.ts | 21 +++++++++++++++++---- Script/abema_unlock.js | 24 ------------------------ Source/domainset/cdn.conf | 1 + 3 files changed, 18 insertions(+), 28 deletions(-) delete mode 100644 Script/abema_unlock.js diff --git a/Build/download-previous-build.ts b/Build/download-previous-build.ts index b12c12238..2f704d20c 100644 --- a/Build/download-previous-build.ts +++ b/Build/download-previous-build.ts @@ -2,7 +2,7 @@ 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 } from 'tar-fs'; +import { extract as tarExtract, type Headers as TarEntryHeaders } from 'tar-fs'; import zlib from 'node:zlib'; import { Readable } from 'node:stream'; @@ -62,9 +62,7 @@ export const downloadPreviousBuild = task(require.main === module, __filename)(a const extract = tarExtract( publicDir, { - ignore(_, header) { - return header?.type !== 'file' && header?.type !== 'directory'; - }, + ignore: tarOnIgnore, map(header) { header.name = header.name.replace(pathPrefix, ''); return header; @@ -79,3 +77,18 @@ export const downloadPreviousBuild = task(require.main === module, __filename)(a ); }); }); + +function tarOnIgnore(_: string, header?: TarEntryHeaders) { + if (header) { + if (header.type !== 'file' && header.type !== 'directory') { + return true; + } + + const extname = path.extname(header.name); + if (extname === '.ts') { + return true; + } + } + + return false; +} diff --git a/Script/abema_unlock.js b/Script/abema_unlock.js deleted file mode 100644 index 56c2ebccb..000000000 --- a/Script/abema_unlock.js +++ /dev/null @@ -1,24 +0,0 @@ -/* global $request, $response, $done */ - -const url = $request.url; -const body = url.endsWith('region') || url.endsWith('region/') - ? 'OK' - : $response.body; - -if ($request.method === 'OPTION') { - $done({}); -} else { - $done({ - status: 200, - body, - headers: { - 'Content-Type': 'text/plain; charset=utf-8', - 'Access-Control-Allow-Origin': '*', - 'Access-Control-Allow-Credentials': '*', - 'Access-Control-Allow-Headers': 'origin,range,hdntl,hdnts', - 'Access-Control-Allow-Methods': 'GET,HEAD,POST,PUT,DELETE,OPTIONS', - 'Access-Control-Expose-Headers': 'Server,range,hdntl,hdnts,Akamai-Mon-Iucid-Ing,Akamai-Mon-Iucid-Del,Akamai-Request-BC', - 'Access-Control-Max-Age': '86400' - } - }); -} diff --git a/Source/domainset/cdn.conf b/Source/domainset/cdn.conf index e30f4cab5..dc8f36dbc 100644 --- a/Source/domainset/cdn.conf +++ b/Source/domainset/cdn.conf @@ -83,6 +83,7 @@ vuejs.org .react.dev .reactjs.org .radix-ui.com +.nextui.org storybook.js.org www.typescriptlang.org typescript.azureedge.net From 2fd66d85a005ebec948c47bfc8032dcec179190b Mon Sep 17 00:00:00 2001 From: SukkaW Date: Tue, 10 Sep 2024 01:47:30 +0800 Subject: [PATCH 19/19] Housekeeping --- package.json | 12 ++-- pnpm-lock.yaml | 182 ++++++++++++++++++++++++------------------------- 2 files changed, 94 insertions(+), 100 deletions(-) diff --git a/package.json b/package.json index a7b2b3bf6..7dc6b92ba 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "csv-parse": "^5.5.6", "fast-cidr-tools": "^0.2.5", "fdir": "^6.3.0", - "foxact": "^0.2.37", + "foxact": "^0.2.38", "json-stringify-pretty-compact": "^3.0.0", "mnemonist": "^0.39.8", "picocolors": "^1.1.0", @@ -41,7 +41,7 @@ "yaml": "^2.5.1" }, "devDependencies": { - "@eslint-sukka/node": "^6.3.0", + "@eslint-sukka/node": "^6.4.1", "@swc-node/register": "^1.10.9", "@swc/core": "^1.7.24", "@types/async-retry": "^1.4.8", @@ -53,13 +53,13 @@ "@types/tar-stream": "^3.1.3", "chai": "4", "eslint": "^9.10.0", - "eslint-config-sukka": "^6.3.0", - "eslint-formatter-sukka": "^6.3.0", + "eslint-config-sukka": "^6.4.1", + "eslint-formatter-sukka": "^6.4.1", "mitata": "^0.1.14", "mocha": "^10.7.3", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, - "packageManager": "pnpm@9.9.0", + "packageManager": "pnpm@9.10.0", "resolutions": { "has": "npm:@nolyfill/has@latest" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fa76972c2..fb6ab94c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: ^6.3.0 version: 6.3.0(picomatch@4.0.2) foxact: - specifier: ^0.2.37 - version: 0.2.37 + specifier: ^0.2.38 + version: 0.2.38 json-stringify-pretty-compact: specifier: ^3.0.0 version: 3.0.0 @@ -70,11 +70,11 @@ importers: version: 2.5.1 devDependencies: '@eslint-sukka/node': - specifier: ^6.3.0 - version: 6.3.0(eslint@9.10.0)(typescript@5.5.4) + specifier: ^6.4.1 + version: 6.4.1(eslint@9.10.0)(typescript@5.6.2) '@swc-node/register': specifier: ^1.10.9 - version: 1.10.9(@swc/core@1.7.24)(@swc/types@0.1.12)(typescript@5.5.4) + version: 1.10.9(@swc/core@1.7.24)(@swc/types@0.1.12)(typescript@5.6.2) '@swc/core': specifier: ^1.7.24 version: 1.7.24 @@ -106,11 +106,11 @@ importers: specifier: ^9.10.0 version: 9.10.0 eslint-config-sukka: - specifier: ^6.3.0 - version: 6.3.0(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4) + specifier: ^6.4.1 + version: 6.4.1(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2) eslint-formatter-sukka: - specifier: ^6.3.0 - version: 6.3.0 + specifier: ^6.4.1 + version: 6.4.1 mitata: specifier: ^0.1.14 version: 0.1.14 @@ -118,8 +118,8 @@ importers: specifier: ^10.7.3 version: 10.7.3 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages: @@ -160,11 +160,11 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-sukka/node@6.3.0': - resolution: {integrity: sha512-lArWfoOwETB26+zFfTR7udmf4YAty6QQliqkxXUpIM2/4JaoW5yClUXBXHl8MecM4K9867VaxQOBE8nUmZth6g==} + '@eslint-sukka/node@6.4.1': + resolution: {integrity: sha512-O+t4BOW9rj8+czz8J7S6iqgoXBv93oMGe2Ydos8nWBxNh6kWCCzFJ54y2duLd2jBwfpYhwUBr+wO8EQpC3dGQw==} - '@eslint-sukka/shared@6.3.0': - resolution: {integrity: sha512-/zxd8/xitXwudU3l6x7ozdrjuM+jElJMzIdhFgzSLBa3YSSbFTdseFB9fVHqMXuu8KzvpNuPJTEzMn8bjXU5ww==} + '@eslint-sukka/shared@6.4.1': + resolution: {integrity: sha512-b6wk0b7pcci25lbTL6FWRqiFpF1q1fLQUIDKRqtRJs73JHAnlsxTl4gebyX9ozwyRmZaevh5lf1cZ1TgJreMSw==} '@eslint/config-array@0.18.0': resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} @@ -178,10 +178,6 @@ packages: resolution: {integrity: sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.9.1': - resolution: {integrity: sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/object-schema@2.1.4': resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -754,17 +750,17 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-sukka@6.3.0: - resolution: {integrity: sha512-XYm25/RngYas0QdE6FJ/Ibu3lmLU8e+X93BjfQHcywFIWdOVKKi8mkNnR0XevIpn1U9XOp6GltOBuPpktnkLqw==} + eslint-config-sukka@6.4.1: + resolution: {integrity: sha512-RNqUunICE90CsEZTQlAmKPHPgDHzj9OwI2dydTy2mYKf8cltzP87weSfo0eSFYh7XcoRgSdfzN3/Ju3dzx0bbQ==} - eslint-formatter-sukka@6.3.0: - resolution: {integrity: sha512-gDoRt9MXvKLVdnjPOMP3pK9o6S0lwOYpD6oylZswyhu9/VaZiJOAq92LyVZ2H3Oka/FEkQujTsaKPX1bovLa5A==} + eslint-formatter-sukka@6.4.1: + resolution: {integrity: sha512-9uWeL44hjLhYqolk+cT/Z+U0zuJ//y/NeFP7QmW2Yp+qNywUlsq6eeh6G6JN4ADlJXszK/B0pl0hMlPezB1cmw==} eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - eslint-import-resolver-ts-bundled@6.3.0: - resolution: {integrity: sha512-jSFINgcE4y+uPXZTbaUokDMzZNATzt7rYJ3r0jfqgwsN/iY/CtTGGq2ajn7lynKBZKEuOoF9leQpFGB0mVdAxA==} + eslint-import-resolver-ts-bundled@6.4.1: + resolution: {integrity: sha512-vnbwGxRFsBsDRAeKN6eMilm5ydD28eDeEkwS1xtUkZY45Uwh1Bs5nxuGqGSnFxyX6UtI5DeaDJ87AtrI7QhiDA==} eslint-plugin-autofix@2.2.0: resolution: {integrity: sha512-lu8+0r+utyTroROqXIL+a8sUpICi6za22hIzlpb0+x0tQGRnOjhOKU7v8mC/NS/faDoVsw6xW3vUpc+Mcz5NWA==} @@ -808,8 +804,8 @@ packages: peerDependencies: eslint: '>=8.44.0' - eslint-plugin-sukka@6.3.0: - resolution: {integrity: sha512-rPjq7aR6LLV4Kcp0ZjKYp0vIgNEMS4lKvjUWOAq9ecmGsjpm6iC1b1NgN4JwBEOyGisxn91G7KPB9kSGaSazBA==} + eslint-plugin-sukka@6.4.1: + resolution: {integrity: sha512-OcGk7ATMTPlCItyjtJ555Q2b6fEHIPgxSEtafzObB9oHKO8Bamk9gol8D2XujLqvpOLIgP8RwZ2udqUCxZAueg==} eslint-plugin-unused-imports@4.1.3: resolution: {integrity: sha512-lqrNZIZjFMUr7P06eoKtQLwyVRibvG7N+LtfKtObYGizAAGrcqLkc3tDx+iAik2z7q0j/XI3ihjupIqxhFabFA==} @@ -934,8 +930,8 @@ packages: flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - foxact@0.2.37: - resolution: {integrity: sha512-nzK7n3JAnmCWO3GJXe4ry196s7wlOUnJVBn/RQ9Og1FJ/pEaRi94atLGFmzM0CVDgIbSFdMnH49PtkWjSqtMSw==} + foxact@0.2.38: + resolution: {integrity: sha512-ClxI9lwzhWpE/JIGfPjSpUNqG6MccNq60jrxuPidNl4CAUrATba4ViQTBFn1Zc5+9q9nAFXWaZKendXIbGvrvQ==} peerDependencies: react: '*' peerDependenciesMeta: @@ -1478,8 +1474,8 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} - type-fest@4.26.0: - resolution: {integrity: sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==} + type-fest@4.26.1: + resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} engines: {node: '>=16'} typescript-eslint@8.4.0: @@ -1491,8 +1487,8 @@ packages: typescript: optional: true - typescript@5.5.4: - resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} hasBin: true @@ -1602,22 +1598,22 @@ snapshots: '@eslint-community/regexpp@4.11.0': {} - '@eslint-sukka/node@6.3.0(eslint@9.10.0)(typescript@5.5.4)': + '@eslint-sukka/node@6.4.1(eslint@9.10.0)(typescript@5.6.2)': dependencies: - '@eslint-sukka/shared': 6.3.0(eslint@9.10.0)(typescript@5.5.4) + '@eslint-sukka/shared': 6.4.1(eslint@9.10.0)(typescript@5.6.2) eslint-plugin-n: 17.10.2(eslint@9.10.0) - eslint-plugin-sukka: 6.3.0(eslint@9.10.0)(typescript@5.5.4) + eslint-plugin-sukka: 6.4.1(eslint@9.10.0)(typescript@5.6.2) transitivePeerDependencies: - eslint - supports-color - typescript - '@eslint-sukka/shared@6.3.0(eslint@9.10.0)(typescript@5.5.4)': + '@eslint-sukka/shared@6.4.1(eslint@9.10.0)(typescript@5.6.2)': dependencies: '@dual-bundle/import-meta-resolve': 4.1.0 '@types/eslint': 9.6.1 - '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) - type-fest: 4.26.0 + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.6.2) + type-fest: 4.26.1 transitivePeerDependencies: - eslint - supports-color @@ -1647,8 +1643,6 @@ snapshots: '@eslint/js@9.10.0': {} - '@eslint/js@9.9.1': {} - '@eslint/object-schema@2.1.4': {} '@eslint/plugin-kit@0.1.0': @@ -1749,10 +1743,10 @@ snapshots: '@types/eslint': 9.6.1 eslint: 9.10.0 - '@stylistic/eslint-plugin-ts@2.7.2(eslint@9.10.0)(typescript@5.5.4)': + '@stylistic/eslint-plugin-ts@2.7.2(eslint@9.10.0)(typescript@5.6.2)': dependencies: '@types/eslint': 9.6.1 - '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.6.2) eslint: 9.10.0 eslint-visitor-keys: 4.0.0 espree: 10.1.0 @@ -1765,7 +1759,7 @@ snapshots: '@swc/core': 1.7.24 '@swc/types': 0.1.12 - '@swc-node/register@1.10.9(@swc/core@1.7.24)(@swc/types@0.1.12)(typescript@5.5.4)': + '@swc-node/register@1.10.9(@swc/core@1.7.24)(@swc/types@0.1.12)(typescript@5.6.2)': dependencies: '@swc-node/core': 1.13.3(@swc/core@1.7.24)(@swc/types@0.1.12) '@swc-node/sourcemap-support': 0.5.1 @@ -1775,7 +1769,7 @@ snapshots: oxc-resolver: 1.10.2 pirates: 4.0.6 tslib: 2.7.0 - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - '@swc/types' - supports-color @@ -1895,34 +1889,34 @@ snapshots: dependencies: '@types/node': 20.14.11 - '@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.4.0(eslint@9.10.0)(typescript@5.6.2) '@typescript-eslint/scope-manager': 8.4.0 - '@typescript-eslint/type-utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.4.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.6.2) '@typescript-eslint/visitor-keys': 8.4.0 eslint: 9.10.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4)': + '@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.6.2)': dependencies: '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.2) '@typescript-eslint/visitor-keys': 8.4.0 debug: 4.3.6(supports-color@8.1.1) eslint: 9.10.0 optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color @@ -1931,21 +1925,21 @@ snapshots: '@typescript-eslint/types': 8.4.0 '@typescript-eslint/visitor-keys': 8.4.0 - '@typescript-eslint/type-utils@8.4.0(eslint@9.10.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.4.0(eslint@9.10.0)(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.6.2) debug: 4.3.6(supports-color@8.1.1) - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - eslint - supports-color '@typescript-eslint/types@8.4.0': {} - '@typescript-eslint/typescript-estree@8.4.0(typescript@5.5.4)': + '@typescript-eslint/typescript-estree@8.4.0(typescript@5.6.2)': dependencies: '@typescript-eslint/types': 8.4.0 '@typescript-eslint/visitor-keys': 8.4.0 @@ -1954,18 +1948,18 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.4.0(eslint@9.10.0)(typescript@5.5.4)': + '@typescript-eslint/utils@8.4.0(eslint@9.10.0)(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.2) eslint: 9.10.0 transitivePeerDependencies: - supports-color @@ -2215,36 +2209,36 @@ snapshots: eslint: 9.10.0 semver: 7.6.3 - eslint-config-sukka@6.3.0(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4): + eslint-config-sukka@6.4.1(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2): dependencies: '@eslint-community/eslint-plugin-eslint-comments': 4.4.0(eslint@9.10.0) - '@eslint-sukka/shared': 6.3.0(eslint@9.10.0)(typescript@5.5.4) - '@eslint/js': 9.9.1 + '@eslint-sukka/shared': 6.4.1(eslint@9.10.0)(typescript@5.6.2) + '@eslint/js': 9.10.0 '@stylistic/eslint-plugin-js': 2.7.2(eslint@9.10.0) '@stylistic/eslint-plugin-plus': 2.7.2(eslint@9.10.0) - '@stylistic/eslint-plugin-ts': 2.7.2(eslint@9.10.0)(typescript@5.5.4) - '@typescript-eslint/parser': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@stylistic/eslint-plugin-ts': 2.7.2(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/parser': 8.4.0(eslint@9.10.0)(typescript@5.6.2) ci-info: 4.0.0 defu: 6.1.4 - eslint-import-resolver-ts-bundled: 6.3.0 + eslint-import-resolver-ts-bundled: 6.4.1 eslint-plugin-autofix: 2.2.0(eslint@9.10.0) - eslint-plugin-import-x: 4.2.1(eslint@9.10.0)(typescript@5.5.4) + eslint-plugin-import-x: 4.2.1(eslint@9.10.0)(typescript@5.6.2) eslint-plugin-jsonc: 2.16.0(eslint@9.10.0) eslint-plugin-promise: 7.1.0(eslint@9.10.0) eslint-plugin-regexp: 2.6.0(eslint@9.10.0) - eslint-plugin-sukka: 6.3.0(eslint@9.10.0)(typescript@5.5.4) - eslint-plugin-unused-imports: 4.1.3(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0) + eslint-plugin-sukka: 6.4.1(eslint@9.10.0)(typescript@5.6.2) + eslint-plugin-unused-imports: 4.1.3(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0) jsonc-eslint-parser: 2.4.0 local-pkg: 0.5.0 picocolors: 1.1.0 - typescript-eslint: 8.4.0(eslint@9.10.0)(typescript@5.5.4) + typescript-eslint: 8.4.0(eslint@9.10.0)(typescript@5.6.2) transitivePeerDependencies: - '@typescript-eslint/eslint-plugin' - eslint - supports-color - typescript - eslint-formatter-sukka@6.3.0: + eslint-formatter-sukka@6.4.1: dependencies: ci-info: 4.0.0 picocolors: 1.1.0 @@ -2257,7 +2251,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-ts-bundled@6.3.0: + eslint-import-resolver-ts-bundled@6.4.1: dependencies: enhanced-resolve: 5.17.1 @@ -2276,9 +2270,9 @@ snapshots: eslint: 9.10.0 eslint-compat-utils: 0.5.1(eslint@9.10.0) - eslint-plugin-import-x@4.2.1(eslint@9.10.0)(typescript@5.5.4): + eslint-plugin-import-x@4.2.1(eslint@9.10.0)(typescript@5.6.2): dependencies: - '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.6.2) debug: 4.3.6(supports-color@8.1.1) doctrine: 3.0.0 eslint: 9.10.0 @@ -2331,21 +2325,21 @@ snapshots: regexp-ast-analysis: 0.7.1 scslre: 0.3.0 - eslint-plugin-sukka@6.3.0(eslint@9.10.0)(typescript@5.5.4): + eslint-plugin-sukka@6.4.1(eslint@9.10.0)(typescript@5.6.2): dependencies: - '@eslint-sukka/shared': 6.3.0(eslint@9.10.0)(typescript@5.5.4) - '@typescript-eslint/type-utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@eslint-sukka/shared': 6.4.1(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/type-utils': 8.4.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.6.2) transitivePeerDependencies: - eslint - supports-color - typescript - eslint-plugin-unused-imports@4.1.3(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0): + eslint-plugin-unused-imports@4.1.3(@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0): dependencies: eslint: 9.10.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2) eslint-rule-composer@0.3.0: {} @@ -2475,7 +2469,7 @@ snapshots: flatted@3.3.1: {} - foxact@0.2.37: + foxact@0.2.38: dependencies: client-only: 0.0.1 server-only: 0.0.1 @@ -3000,9 +2994,9 @@ snapshots: dependencies: is-number: 7.0.0 - ts-api-utils@1.3.0(typescript@5.5.4): + ts-api-utils@1.3.0(typescript@5.6.2): dependencies: - typescript: 5.5.4 + typescript: 5.6.2 tslib@2.7.0: {} @@ -3016,20 +3010,20 @@ snapshots: type-detect@4.0.8: {} - type-fest@4.26.0: {} + type-fest@4.26.1: {} - typescript-eslint@8.4.0(eslint@9.10.0)(typescript@5.5.4): + typescript-eslint@8.4.0(eslint@9.10.0)(typescript@5.6.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.5.4))(eslint@9.10.0)(typescript@5.5.4) - '@typescript-eslint/parser': 8.4.0(eslint@9.10.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/parser': 8.4.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.4.0(eslint@9.10.0)(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - eslint - supports-color - typescript@5.5.4: {} + typescript@5.6.2: {} ufo@1.5.4: {}