chore(deps): absorb safe dependency refreshes

This commit is contained in:
xixu-me committed 2026-03-31 02:12:33 +08:00
1 parent 0d1f4d3e90
commit 638b3169eb
3 files changed
+52 -37

No files matched your search

+34 -28
View File
@@ -7,10 +7,10 @@
"name": "xread", "name": "xread",
"dependencies": { "dependencies": {
"@esm2cjs/normalize-url": "^8.0.0", "@esm2cjs/normalize-url": "^8.0.0",
"@koa/bodyparser": "^5.1.1", "@koa/bodyparser": "^5.1.2",
"@mozilla/readability": "^0.6.0", "@mozilla/readability": "^0.6.0",
"@napi-rs/canvas": "^0.1.97", "@napi-rs/canvas": "^0.1.97",
"@types/turndown": "^5.0.4", "@types/turndown": "^5.0.6",
"@xmldom/xmldom": "^0.9.9", "@xmldom/xmldom": "^0.9.9",
"archiver": "^7.0.1", "archiver": "^7.0.1",
"axios": "^1.14.0", "axios": "^1.14.0",
@@ -26,14 +26,14 @@
"langdetect": "^0.2.1", "langdetect": "^0.2.1",
"linkedom": "^0.18.12", "linkedom": "^0.18.12",
"lru-cache": "^11.2.7", "lru-cache": "^11.2.7",
"maxmind": "^4.3.18", "maxmind": "^4.3.29",
"minio": "^8.0.7", "minio": "^8.0.7",
"pdfjs-dist": "^4.10.38", "pdfjs-dist": "^4.10.38",
"puppeteer": "^23.3.0", "puppeteer": "^23.3.0",
"puppeteer-extra": "^3.3.6", "puppeteer-extra": "^3.3.6",
"puppeteer-extra-plugin-block-resources": "^2.4.3", "puppeteer-extra-plugin-block-resources": "^2.4.3",
"robots-parser": "^3.0.1", "robots-parser": "^3.0.1",
"set-cookie-parser": "^2.6.0", "set-cookie-parser": "^2.7.2",
"simple-zstd": "^1.4.2", "simple-zstd": "^1.4.2",
"stripe": "^11.11.0", "stripe": "^11.11.0",
"svg2png-wasm": "^1.4.1", "svg2png-wasm": "^1.4.1",
@@ -58,7 +58,7 @@
"@typescript-eslint/parser": "^8.57.2", "@typescript-eslint/parser": "^8.57.2",
"eslint": "^10.1.0", "eslint": "^10.1.0",
"pino-pretty": "^13.1.3", "pino-pretty": "^13.1.3",
"typescript": "^5.5.4" "typescript": "^5.9.3"
}, },
"engines": { "engines": {
"node": ">=18" "node": ">=18"
@@ -424,9 +424,9 @@
} }
}, },
"node_modules/@koa/bodyparser": { "node_modules/@koa/bodyparser": {
"version": "5.1.1", "version": "5.1.2",
"resolved": "https://registry.npmjs.org/@koa/bodyparser/-/bodyparser-5.1.1.tgz", "resolved": "https://registry.npmjs.org/@koa/bodyparser/-/bodyparser-5.1.2.tgz",
"integrity": "sha512-ZBF49xqNVxnmJ+8iXegq+fXPQm9RSX8giNl/aXS5rW1VpNct92wnFbGR/47vfoRJVLARGQ4HVL4WaQ0u8IJVoA==", "integrity": "sha512-eGJm9/66iUX+LUH03Cz0e94unbSKrmSPCick4MO5UorAAomcjC5Kl+SkoZ6CSyPew3neMYjj7n+djnlGYBSJAg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"co-body": "^6.1.0", "co-body": "^6.1.0",
@@ -1239,9 +1239,10 @@
} }
}, },
"node_modules/@types/turndown": { "node_modules/@types/turndown": {
"version": "5.0.4", "version": "5.0.6",
"resolved": "https://registry.npmjs.org/@types/turndown/-/turndown-5.0.4.tgz", "resolved": "https://registry.npmjs.org/@types/turndown/-/turndown-5.0.6.tgz",
"integrity": "sha512-28GI33lCCkU4SGH1GvjDhFgOVr+Tym4PXGBIU1buJUa6xQolniPArtUT+kv42RR2N9MsMLInkr904Aq+ESHBJg==" "integrity": "sha512-ru00MoyeeouE5BX4gRL+6m/BsDfbRayOskWqUvh7CLGW+UXxHQItqALa38kKnOiZPqJrtzJUgAC2+F0rL1S4Pg==",
"license": "MIT"
}, },
"node_modules/@types/webidl-conversions": { "node_modules/@types/webidl-conversions": {
"version": "7.0.3", "version": "7.0.3",
@@ -4792,12 +4793,13 @@
} }
}, },
"node_modules/maxmind": { "node_modules/maxmind": {
"version": "4.3.18", "version": "4.3.29",
"resolved": "https://registry.npmjs.org/maxmind/-/maxmind-4.3.18.tgz", "resolved": "https://registry.npmjs.org/maxmind/-/maxmind-4.3.29.tgz",
"integrity": "sha512-5b9utU7ZxcGYTBaO7hCF0FXyfw3IpankLn+FnLW4RZS1zi97RBeSdfXJFJlk5UxNsMiFZlsdMT3lzvD+bD8MLQ==", "integrity": "sha512-Vxx0rh7omBekjZnsDxpw35SrGGM3Uy7NoIKWzZlvh3UcjihGaySR8n+YSQ8YBseCvhEn+yehA98rZkTDW+uhPw==",
"license": "MIT",
"dependencies": { "dependencies": {
"mmdb-lib": "2.1.0", "mmdb-lib": "2.2.1",
"tiny-lru": "11.2.5" "tiny-lru": "11.3.4"
}, },
"engines": { "engines": {
"node": ">=12", "node": ">=12",
@@ -4970,9 +4972,10 @@
} }
}, },
"node_modules/mmdb-lib": { "node_modules/mmdb-lib": {
"version": "2.1.0", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/mmdb-lib/-/mmdb-lib-2.1.0.tgz", "resolved": "https://registry.npmjs.org/mmdb-lib/-/mmdb-lib-2.2.1.tgz",
"integrity": "sha512-tdDTZmnI5G4UoSctv2KxM/3VQt2XRj4CmR5R4VsAWsOUcS3LysHR34wtixWm/pXxXdkBDuN92auxkC0T2+qd1Q==", "integrity": "sha512-DXO4L9W+08T+A7h5+xdT32l7IMot8z7WOH+7C1Maol571PnktQ8un7Ni4CyPFp4H+vht/FDA5/tpjRvWMFQDMw==",
"license": "MIT",
"engines": { "engines": {
"node": ">=10", "node": ">=10",
"npm": ">=6" "npm": ">=6"
@@ -6290,9 +6293,10 @@
} }
}, },
"node_modules/set-cookie-parser": { "node_modules/set-cookie-parser": {
"version": "2.6.0", "version": "2.7.2",
"resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz",
"integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==" "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==",
"license": "MIT"
}, },
"node_modules/setprototypeof": { "node_modules/setprototypeof": {
"version": "1.2.0", "version": "1.2.0",
@@ -6768,9 +6772,10 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/tiny-lru": { "node_modules/tiny-lru": {
"version": "11.2.5", "version": "11.3.4",
"resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-11.2.5.tgz", "resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-11.3.4.tgz",
"integrity": "sha512-JpqM0K33lG6iQGKiigcwuURAKZlq6rHXfrgeL4/I8/REoyJTGU+tEMszvT/oTRVHG2OiylhGDjqPp1jWMlr3bw==", "integrity": "sha512-UxWEfRKpFCabAf6fkTNdlfSw/RDUJ/4C6i1aLZaDnGF82PERHyYhz5CMCVYXtLt34LbqgfpJ2bjmgGKgxuF/6A==",
"license": "BSD-3-Clause",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
@@ -6903,10 +6908,11 @@
"integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==" "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg=="
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.5.4", "version": "5.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
"integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"devOptional": true, "devOptional": true,
"license": "Apache-2.0",
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
+5 -5
View File
@@ -19,10 +19,10 @@
"main": "build/index.js", "main": "build/index.js",
"dependencies": { "dependencies": {
"@esm2cjs/normalize-url": "^8.0.0", "@esm2cjs/normalize-url": "^8.0.0",
"@koa/bodyparser": "^5.1.1", "@koa/bodyparser": "^5.1.2",
"@mozilla/readability": "^0.6.0", "@mozilla/readability": "^0.6.0",
"@napi-rs/canvas": "^0.1.97", "@napi-rs/canvas": "^0.1.97",
"@types/turndown": "^5.0.4", "@types/turndown": "^5.0.6",
"@xmldom/xmldom": "^0.9.9", "@xmldom/xmldom": "^0.9.9",
"archiver": "^7.0.1", "archiver": "^7.0.1",
"axios": "^1.14.0", "axios": "^1.14.0",
@@ -38,14 +38,14 @@
"langdetect": "^0.2.1", "langdetect": "^0.2.1",
"linkedom": "^0.18.12", "linkedom": "^0.18.12",
"lru-cache": "^11.2.7", "lru-cache": "^11.2.7",
"maxmind": "^4.3.18", "maxmind": "^4.3.29",
"minio": "^8.0.7", "minio": "^8.0.7",
"pdfjs-dist": "^4.10.38", "pdfjs-dist": "^4.10.38",
"puppeteer": "^23.3.0", "puppeteer": "^23.3.0",
"puppeteer-extra": "^3.3.6", "puppeteer-extra": "^3.3.6",
"puppeteer-extra-plugin-block-resources": "^2.4.3", "puppeteer-extra-plugin-block-resources": "^2.4.3",
"robots-parser": "^3.0.1", "robots-parser": "^3.0.1",
"set-cookie-parser": "^2.6.0", "set-cookie-parser": "^2.7.2",
"simple-zstd": "^1.4.2", "simple-zstd": "^1.4.2",
"stripe": "^11.11.0", "stripe": "^11.11.0",
"svg2png-wasm": "^1.4.1", "svg2png-wasm": "^1.4.1",
@@ -70,7 +70,7 @@
"@typescript-eslint/parser": "^8.57.2", "@typescript-eslint/parser": "^8.57.2",
"eslint": "^10.1.0", "eslint": "^10.1.0",
"pino-pretty": "^13.1.3", "pino-pretty": "^13.1.3",
"typescript": "^5.5.4" "typescript": "^5.9.3"
}, },
"overrides": { "overrides": {
"ajv": "^6.14.0", "ajv": "^6.14.0",
+13 -4
View File
@@ -221,18 +221,23 @@ async function getWebSearchResults() {
const cite = primaryLink.querySelector('cite[role=text]')?.textContent; const cite = primaryLink.querySelector('cite[role=text]')?.textContent;
let date = cite?.split('·')[1]?.trim(); let date = cite?.split('·')[1]?.trim();
const snippets = Array.from(x.querySelectorAll('div[data-sncf*="1"] span')); const snippets = Array.from(x.querySelectorAll('div[data-sncf*="1"] span'));
let snippet = snippets[snippets.length - 1]?.textContent; let snippet: string | null | undefined = snippets[snippets.length - 1]?.textContent;
if (!snippet) { if (!snippet) {
snippet = x.querySelector('div.IsZvec')?.textContent?.trim() || null; snippet = x.querySelector('div.IsZvec')?.textContent?.trim() || null;
} }
date ??= snippets[snippets.length - 2]?.textContent?.trim(); date ??= snippets[snippets.length - 2]?.textContent?.trim();
const imageUrl = x.querySelector('div[data-sncf*="1"] img[src]:not(img[src^="data"])')?.getAttribute('src'); const imageUrl = x.querySelector('div[data-sncf*="1"] img[src]:not(img[src^="data"])')?.getAttribute('src');
let siteLinks = Array.from(x.querySelectorAll('div[data-sncf*="3"] a[href]')).map((l) => { let siteLinks = Array.from(x.querySelectorAll('div[data-sncf*="3"] a[href]')).map((l) => {
const link = l.getAttribute('href');
if (!link) {
return undefined;
}
return { return {
link: l.getAttribute('href'), link,
title: l.textContent, title: l.textContent,
}; };
}); }).filter(Boolean) as any;
const perhapsParent = x.parentElement?.closest('div[data-hveid]'); const perhapsParent = x.parentElement?.closest('div[data-hveid]');
if (!siteLinks?.length && perhapsParent) { if (!siteLinks?.length && perhapsParent) {
const candidates = Array.from(perhapsParent.querySelectorAll('td h3')); const candidates = Array.from(perhapsParent.querySelectorAll('td h3'));
@@ -242,9 +247,13 @@ async function getWebSearchResults() {
if (!link) { if (!link) {
return undefined; return undefined;
} }
const href = link.getAttribute('href');
if (!href) {
return undefined;
}
const snippet = l.nextElementSibling?.textContent; const snippet = l.nextElementSibling?.textContent;
return { return {
link: link.getAttribute('href'), link: href,
title: link.textContent, title: link.textContent,
snippet, snippet,
}; };