From 07f728ba9a13cb3e6638c9e4b933c331424a10f0 Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 27 Jan 2025 02:29:05 +0800 Subject: [PATCH 0001/2658] fix(route): 2048 jump logic (#18221) --- lib/routes/2048/index.ts | 57 +++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/lib/routes/2048/index.ts b/lib/routes/2048/index.ts index 4aede42b4643..df17b1d8e34b 100644 --- a/lib/routes/2048/index.ts +++ b/lib/routes/2048/index.ts @@ -3,13 +3,12 @@ import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import ofetch from '@/utils/ofetch'; export const route: Route = { path: '/:id?', @@ -65,25 +64,37 @@ export const route: Route = { }; async function handler(ctx) { - const id = ctx.req.param('id') ?? '2'; + const id = ctx.req.param('id') ?? '3'; const rootUrl = 'https://hjd2048.com'; - const entranceDomain = await cache.tryGet('2048:entranceDomain', async () => { - const { data: response } = await got('https://hjd.tw', { + const domainInfo = (await cache.tryGet('2048:domainInfo', async () => { + const response = await ofetch('https://hjd.tw', { headers: { accept: '*/*', }, }); - const $ = load(response); - const targetLink = new URL($('table.group-table tr').eq(1).find('td a').eq(0).attr('href')).href; - return targetLink; + let $ = load(response); + const targetLink = new URL($('.address-list a').eq(0).attr('href'), 'https://hjd.tw').href; + const redirectResponse = await ofetch.raw(targetLink); + $ = load(redirectResponse._data); + return { + url: redirectResponse.url, + cookie: + $('script') + .text() + .match(/var safeid='(.*?)',/)?.[1] ?? '', + }; + })) as { url: string; cookie: string }; + + const currentUrl = `${domainInfo.url}thread.php?fid-${id}.html`; + + const response = await ofetch.raw(currentUrl, { + headers: { + cookie: `_safe=${domainInfo.cookie}`, + }, }); - const currentUrl = `${entranceDomain}2048/thread.php?fid-${id}.html`; - - const response = await ofetch.raw(currentUrl); - const $ = load(response._data); const currentHost = `https://${new URL(response.url).host}`; // redirected host @@ -99,7 +110,7 @@ async function handler(ctx) { return { title: item.text(), - link: `${currentHost}/2048/${item.attr('href')}`, + link: `${currentHost}/${item.attr('href')}`, guid: `${rootUrl}/2048/${item.attr('href')}`, }; }) @@ -108,12 +119,13 @@ async function handler(ctx) { const items = await Promise.all( list.map((item) => cache.tryGet(item.guid, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, + const detailResponse = await ofetch(item.link, { + headers: { + cookie: `_safe=${domainInfo.cookie}`, + }, }); - const content = load(detailResponse.data); + const content = load(detailResponse); content('.ads, .tips').remove(); @@ -126,17 +138,14 @@ async function handler(ctx) { const downloadLink = content('#read_tpc').first().find('a').last(); const copyLink = content('#copytext')?.first()?.text(); - if (downloadLink?.text()?.startsWith('http') && /down2048\.com$/.test(new URL(downloadLink.text()).hostname)) { - const torrentResponse = await got({ - method: 'get', - url: downloadLink.text(), - }); + if (downloadLink?.text()?.startsWith('http') && /bt\.azvmw\.com$/.test(new URL(downloadLink.text()).hostname)) { + const torrentResponse = await ofetch(downloadLink.text()); - const torrent = load(torrentResponse.data); + const torrent = load(torrentResponse); item.enclosure_type = 'application/x-bittorrent'; const ahref = torrent('.uk-button').last().attr('href'); - item.enclosure_url = ahref?.startsWith('http') ? ahref : `https://data.datapps.org/${ahref}`; + item.enclosure_url = ahref?.startsWith('http') ? ahref : `https://bt.azvmw.com/${ahref}`; const magnet = torrent('.uk-button').first().attr('href'); From 091feba32ab3d34fa61c92a5079723afe3fc8331 Mon Sep 17 00:00:00 2001 From: AiraNadih <128119996+AiraNadih@users.noreply.github.com> Date: Mon, 27 Jan 2025 03:09:17 +0800 Subject: [PATCH 0002/2658] feat(route): add route "CosplayTele" (#18217) * feat(route): add route "CosplayTele" * feat(route/cosplaytele): add route "popular" * refactor(route/cosplaytele): optimize article loading with WP API * feat(route/cosplaytele): add route "tag" * perf(route/cosplaytele): optimize popular posts retrieval --- lib/routes/cosplaytele/article.ts | 13 +++++ lib/routes/cosplaytele/category.ts | 47 ++++++++++++++++++ lib/routes/cosplaytele/const.ts | 4 ++ lib/routes/cosplaytele/latest.ts | 41 ++++++++++++++++ lib/routes/cosplaytele/namespace.ts | 8 +++ lib/routes/cosplaytele/popular.ts | 75 +++++++++++++++++++++++++++++ lib/routes/cosplaytele/tag.ts | 47 ++++++++++++++++++ lib/routes/cosplaytele/types.ts | 12 +++++ 8 files changed, 247 insertions(+) create mode 100644 lib/routes/cosplaytele/article.ts create mode 100644 lib/routes/cosplaytele/category.ts create mode 100644 lib/routes/cosplaytele/const.ts create mode 100644 lib/routes/cosplaytele/latest.ts create mode 100644 lib/routes/cosplaytele/namespace.ts create mode 100644 lib/routes/cosplaytele/popular.ts create mode 100644 lib/routes/cosplaytele/tag.ts create mode 100644 lib/routes/cosplaytele/types.ts diff --git a/lib/routes/cosplaytele/article.ts b/lib/routes/cosplaytele/article.ts new file mode 100644 index 000000000000..c5a534cceb44 --- /dev/null +++ b/lib/routes/cosplaytele/article.ts @@ -0,0 +1,13 @@ +import { parseDate } from '@/utils/parse-date'; +import { WPPost } from './types'; + +function loadArticle(item: WPPost) { + return { + title: item.title.rendered, + description: item.content.rendered, + pubDate: parseDate(item.date_gmt), + link: item.link, + }; +} + +export default loadArticle; diff --git a/lib/routes/cosplaytele/category.ts b/lib/routes/cosplaytele/category.ts new file mode 100644 index 000000000000..755f01fd388d --- /dev/null +++ b/lib/routes/cosplaytele/category.ts @@ -0,0 +1,47 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; +import { WPPost } from './types'; + +export const route: Route = { + path: '/category/:category', + categories: ['picture'], + example: '/cosplaytele/category/cosplay', + parameters: { category: 'Category' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['cosplaytele.com/category/:category'], + target: '/category/:category', + }, + ], + name: 'Category', + maintainers: ['AiraNadih'], + handler, + url: 'cosplaytele.com/', +}; + +async function handler(ctx) { + const limit = Number.parseInt(ctx.req.query('limit')) || 20; + const category = ctx.req.param('category'); + const categoryUrl = `${SUB_URL}category/${category}/`; + + const { + data: [{ id: categoryId }], + } = await got(`${SUB_URL}wp-json/wp/v2/categories?slug=${category}`); + const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?categories=${categoryId}&per_page=${limit}`); + + return { + title: `${SUB_NAME_PREFIX} - Category: ${category}`, + link: categoryUrl, + item: posts.map((post) => loadArticle(post as WPPost)), + }; +} diff --git a/lib/routes/cosplaytele/const.ts b/lib/routes/cosplaytele/const.ts new file mode 100644 index 000000000000..c196c2ab8b45 --- /dev/null +++ b/lib/routes/cosplaytele/const.ts @@ -0,0 +1,4 @@ +const SUB_NAME_PREFIX = 'CosplayTele'; +const SUB_URL = 'https://cosplaytele.com/'; + +export { SUB_NAME_PREFIX, SUB_URL }; diff --git a/lib/routes/cosplaytele/latest.ts b/lib/routes/cosplaytele/latest.ts new file mode 100644 index 000000000000..b986a8d73122 --- /dev/null +++ b/lib/routes/cosplaytele/latest.ts @@ -0,0 +1,41 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; +import { WPPost } from './types'; + +export const route: Route = { + path: '/', + categories: ['picture'], + example: '/cosplaytele', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['cosplaytele.com/'], + target: '', + }, + ], + name: 'Latest', + maintainers: ['AiraNadih'], + handler, + url: 'cosplaytele.com/', +}; + +async function handler(ctx) { + const limit = Number.parseInt(ctx.req.query('limit')) || 20; + const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?per_page=${limit}`); + + return { + title: `${SUB_NAME_PREFIX} - Latest`, + link: SUB_URL, + item: posts.map((post) => loadArticle(post as WPPost)), + }; +} diff --git a/lib/routes/cosplaytele/namespace.ts b/lib/routes/cosplaytele/namespace.ts new file mode 100644 index 000000000000..bcba7214fa56 --- /dev/null +++ b/lib/routes/cosplaytele/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CosplayTele', + url: 'cosplaytele.com', + description: 'Cosplaytele - Fast - Security - Free', + lang: 'en', +}; diff --git a/lib/routes/cosplaytele/popular.ts b/lib/routes/cosplaytele/popular.ts new file mode 100644 index 000000000000..fe2b20577f73 --- /dev/null +++ b/lib/routes/cosplaytele/popular.ts @@ -0,0 +1,75 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; +import { WPPost } from './types'; + +export const route: Route = { + path: '/popular/:period', + categories: ['picture'], + example: '/cosplaytele/popular/3', + parameters: { period: 'Days' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['cosplaytele.com/:period'], + target: '/popular/:period', + }, + ], + name: 'Popular', + maintainers: ['AiraNadih'], + handler, + url: 'cosplaytele.com/', +}; + +function getPeriodConfig(period) { + if (period === '1') { + return { + url: `${SUB_URL}24-hours/`, + range: 'daily', + title: `${SUB_NAME_PREFIX} - Top views in 24 hours`, + }; + } + return { + url: `${SUB_URL}${period}-day/`, + range: `last${period}days`, + title: `${SUB_NAME_PREFIX} - Top views in ${period} days`, + }; +} + +async function handler(ctx) { + const limit = Number.parseInt(ctx.req.query('limit')) || 20; + const period = ctx.req.param('period'); + + const { url, range, title } = getPeriodConfig(period); + + const { data } = await got.post(`${SUB_URL}wp-json/wordpress-popular-posts/v2/widget`, { + json: { + limit, + range, + order_by: 'views', + }, + }); + + const $ = load(data.widget); + const links = $('.wpp-list li') + .toArray() + .map((post) => $(post).find('.wpp-post-title').attr('href')) + .filter((link) => link !== undefined); + const slugs = links.map((link) => link.split('/').findLast(Boolean)); + const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?slug=${slugs.join(',')}&per_page=${limit}`); + + return { + title, + link: url, + item: posts.map((post) => loadArticle(post as WPPost)), + }; +} diff --git a/lib/routes/cosplaytele/tag.ts b/lib/routes/cosplaytele/tag.ts new file mode 100644 index 000000000000..41676a57cfef --- /dev/null +++ b/lib/routes/cosplaytele/tag.ts @@ -0,0 +1,47 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; +import { WPPost } from './types'; + +export const route: Route = { + path: '/tag/:tag', + categories: ['picture'], + example: '/cosplaytele/tag/aqua', + parameters: { tag: 'Tag' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['cosplaytele.com/tag/:tag'], + target: '/tag/:tag', + }, + ], + name: 'Tag', + maintainers: ['AiraNadih'], + handler, + url: 'cosplaytele.com/', +}; + +async function handler(ctx) { + const limit = Number.parseInt(ctx.req.query('limit')) || 20; + const tag = ctx.req.param('tag'); + const tagUrl = `${SUB_URL}tag/${tag}/`; + + const { + data: [{ id: tagId }], + } = await got(`${SUB_URL}wp-json/wp/v2/tags?slug=${tag}`); + const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?tags=${tagId}&per_page=${limit}`); + + return { + title: `${SUB_NAME_PREFIX} - Tag: ${tag}`, + link: tagUrl, + item: posts.map((post) => loadArticle(post as WPPost)), + }; +} diff --git a/lib/routes/cosplaytele/types.ts b/lib/routes/cosplaytele/types.ts new file mode 100644 index 000000000000..d3ea3ac2a8cc --- /dev/null +++ b/lib/routes/cosplaytele/types.ts @@ -0,0 +1,12 @@ +interface WPPost { + title: { + rendered: string; + }; + content: { + rendered: string; + }; + date_gmt: string; + link: string; +} + +export type { WPPost }; From dbf420e727f6d88b564f862418d19fc2bcac266b Mon Sep 17 00:00:00 2001 From: AiraNadih <128119996+AiraNadih@users.noreply.github.com> Date: Mon, 27 Jan 2025 04:56:32 +0800 Subject: [PATCH 0003/2658] feat(route): add route "4KUP" (#18218) * feat(route): add route "4KUP" * perf(route/4kup): optimize popular posts retrieval --- lib/routes/4kup/article.ts | 29 +++++++++++++ lib/routes/4kup/category.ts | 47 +++++++++++++++++++++ lib/routes/4kup/const.ts | 4 ++ lib/routes/4kup/latest.ts | 41 ++++++++++++++++++ lib/routes/4kup/namespace.ts | 8 ++++ lib/routes/4kup/popular.ts | 81 ++++++++++++++++++++++++++++++++++++ lib/routes/4kup/tag.ts | 47 +++++++++++++++++++++ lib/routes/4kup/types.ts | 12 ++++++ 8 files changed, 269 insertions(+) create mode 100644 lib/routes/4kup/article.ts create mode 100644 lib/routes/4kup/category.ts create mode 100644 lib/routes/4kup/const.ts create mode 100644 lib/routes/4kup/latest.ts create mode 100644 lib/routes/4kup/namespace.ts create mode 100644 lib/routes/4kup/popular.ts create mode 100644 lib/routes/4kup/tag.ts create mode 100644 lib/routes/4kup/types.ts diff --git a/lib/routes/4kup/article.ts b/lib/routes/4kup/article.ts new file mode 100644 index 000000000000..fbdbbbb52e9e --- /dev/null +++ b/lib/routes/4kup/article.ts @@ -0,0 +1,29 @@ +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import { WPPost } from './types'; + +const processLazyImages = ($) => { + $('a.thumb-photo').each((_, elem) => { + const $elem = $(elem); + const largePhotoUrl = $elem.attr('href'); + if (largePhotoUrl) { + $elem.find('img').attr('src', largePhotoUrl); + } + }); + + $('.caption').remove(); +}; + +function loadArticle(item: WPPost) { + const article = load(item.content.rendered); + processLazyImages(article); + + return { + title: item.title.rendered, + description: article.html() ?? '', + pubDate: parseDate(item.date_gmt), + link: item.link, + }; +} + +export default loadArticle; diff --git a/lib/routes/4kup/category.ts b/lib/routes/4kup/category.ts new file mode 100644 index 000000000000..9b227ec32939 --- /dev/null +++ b/lib/routes/4kup/category.ts @@ -0,0 +1,47 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; +import { WPPost } from './types'; + +export const route: Route = { + path: '/category/:category', + categories: ['picture'], + example: '/4kup/category/coser', + parameters: { category: 'Category' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['4kup.net/category/:category'], + target: '/category/:category', + }, + ], + name: 'Category', + maintainers: ['AiraNadih'], + handler, + url: '4kup.net/', +}; + +async function handler(ctx) { + const limit = Number.parseInt(ctx.req.query('limit')) || 20; + const category = ctx.req.param('category'); + const categoryUrl = `${SUB_URL}category/${category}/`; + + const { + data: [{ id: categoryId }], + } = await got(`${SUB_URL}wp-json/wp/v2/categories?slug=${category}`); + const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?categories=${categoryId}&per_page=${limit}`); + + return { + title: `${SUB_NAME_PREFIX} - Category: ${category}`, + link: categoryUrl, + item: posts.map((post) => loadArticle(post as WPPost)), + }; +} diff --git a/lib/routes/4kup/const.ts b/lib/routes/4kup/const.ts new file mode 100644 index 000000000000..52c67eacb74a --- /dev/null +++ b/lib/routes/4kup/const.ts @@ -0,0 +1,4 @@ +const SUB_NAME_PREFIX = '4KUP'; +const SUB_URL = 'https://4kup.net/'; + +export { SUB_NAME_PREFIX, SUB_URL }; diff --git a/lib/routes/4kup/latest.ts b/lib/routes/4kup/latest.ts new file mode 100644 index 000000000000..12da303c6173 --- /dev/null +++ b/lib/routes/4kup/latest.ts @@ -0,0 +1,41 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; +import { WPPost } from './types'; + +export const route: Route = { + path: '/', + categories: ['picture'], + example: '/4kup', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['4kup.net/'], + target: '', + }, + ], + name: 'Latest', + maintainers: ['AiraNadih'], + handler, + url: '4kup.net/', +}; + +async function handler(ctx) { + const limit = Number.parseInt(ctx.req.query('limit')) || 20; + const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?per_page=${limit}`); + + return { + title: `${SUB_NAME_PREFIX} - Latest`, + link: SUB_URL, + item: posts.map((post) => loadArticle(post as WPPost)), + }; +} diff --git a/lib/routes/4kup/namespace.ts b/lib/routes/4kup/namespace.ts new file mode 100644 index 000000000000..41b591a0d5eb --- /dev/null +++ b/lib/routes/4kup/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '4KUP', + url: '4kup.net', + description: '4KUP - Beautiful Girls Collection', + lang: 'en', +}; diff --git a/lib/routes/4kup/popular.ts b/lib/routes/4kup/popular.ts new file mode 100644 index 000000000000..326673d1b007 --- /dev/null +++ b/lib/routes/4kup/popular.ts @@ -0,0 +1,81 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; +import { WPPost } from './types'; + +export const route: Route = { + path: '/popular/:period', + categories: ['picture'], + example: '/4kup/popular/7', + parameters: { period: 'Days' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['4kup.net/:period'], + target: '/popular/:period', + }, + ], + name: 'Popular', + maintainers: ['AiraNadih'], + handler, + url: '4kup.net/', +}; + +function getPeriodConfig(period) { + if (period === '7') { + return { + url: `${SUB_URL}hot-of-week/`, + range: 'last7days', + title: `${SUB_NAME_PREFIX} - Top views in 7 days`, + }; + } else if (period === '30') { + return { + url: `${SUB_URL}hot-of-month/`, + range: 'last30days', + title: `${SUB_NAME_PREFIX} - Top views in 30 days`, + }; + } + return { + url: `${SUB_URL}most-view/`, + range: `all`, + title: `${SUB_NAME_PREFIX} - Most views`, + }; +} + +async function handler(ctx) { + const limit = Number.parseInt(ctx.req.query('limit')) || 20; + const period = ctx.req.param('period'); + + const { url, range, title } = getPeriodConfig(period); + + const { data } = await got.post(`${SUB_URL}wp-json/wordpress-popular-posts/v2/widget`, { + json: { + limit, + range, + order_by: 'views', + }, + }); + + const $ = load(data.widget); + const links = $('.wpp-list li') + .toArray() + .map((post) => $(post).find('.wpp-post-title').attr('href')) + .filter((link) => link !== undefined); + const slugs = links.map((link) => link.split('/').findLast(Boolean)); + const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?slug=${slugs.join(',')}&per_page=${limit}`); + + return { + title, + link: url, + item: posts.map((post) => loadArticle(post as WPPost)), + }; +} diff --git a/lib/routes/4kup/tag.ts b/lib/routes/4kup/tag.ts new file mode 100644 index 000000000000..93acd7ec98e2 --- /dev/null +++ b/lib/routes/4kup/tag.ts @@ -0,0 +1,47 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; +import { WPPost } from './types'; + +export const route: Route = { + path: '/tag/:tag', + categories: ['picture'], + example: '/4kup/tag/asian', + parameters: { tag: 'Tag' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['4kup.net/tag/:tag'], + target: '/tag/:tag', + }, + ], + name: 'Tag', + maintainers: ['AiraNadih'], + handler, + url: '4kup.net/', +}; + +async function handler(ctx) { + const limit = Number.parseInt(ctx.req.query('limit')) || 20; + const tag = ctx.req.param('tag'); + const tagUrl = `${SUB_URL}tag/${tag}/`; + + const { + data: [{ id: tagId }], + } = await got(`${SUB_URL}wp-json/wp/v2/tags?slug=${tag}`); + const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?tags=${tagId}&per_page=${limit}`); + + return { + title: `${SUB_NAME_PREFIX} - Tag: ${tag}`, + link: tagUrl, + item: posts.map((post) => loadArticle(post as WPPost)), + }; +} diff --git a/lib/routes/4kup/types.ts b/lib/routes/4kup/types.ts new file mode 100644 index 000000000000..d3ea3ac2a8cc --- /dev/null +++ b/lib/routes/4kup/types.ts @@ -0,0 +1,12 @@ +interface WPPost { + title: { + rendered: string; + }; + content: { + rendered: string; + }; + date_gmt: string; + link: string; +} + +export type { WPPost }; From 03e27107fd22ff0cdb498b673c0d75d6656cd856 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Mon, 27 Jan 2025 15:50:20 +0800 Subject: [PATCH 0004/2658] =?UTF-8?q?feat(route):=20add=20=E6=9C=BA?= =?UTF-8?q?=E6=A0=B8=E7=BD=91=E8=B5=84=E8=AE=AF=20(#18220)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 机核网资讯 * refactor: Use alternative loop instead of reduce for readability --- lib/routes/gcores/namespace.ts | 1 + lib/routes/gcores/news.ts | 172 ++++++++++++++ lib/routes/gcores/templates/description.art | 36 +++ lib/routes/gcores/util.ts | 241 ++++++++++++++++++++ 4 files changed, 450 insertions(+) create mode 100644 lib/routes/gcores/news.ts create mode 100644 lib/routes/gcores/templates/description.art create mode 100644 lib/routes/gcores/util.ts diff --git a/lib/routes/gcores/namespace.ts b/lib/routes/gcores/namespace.ts index 490cf738270e..a7d59141f695 100644 --- a/lib/routes/gcores/namespace.ts +++ b/lib/routes/gcores/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '机核网', url: 'gcores.com', lang: 'zh-CN', + description: '机核 GCORES', }; diff --git a/lib/routes/gcores/news.ts b/lib/routes/gcores/news.ts new file mode 100644 index 000000000000..ec506d126207 --- /dev/null +++ b/lib/routes/gcores/news.ts @@ -0,0 +1,172 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import { art } from '@/utils/render'; +import { getCurrentPath } from '@/utils/helpers'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +import { type CheerioAPI, load } from 'cheerio'; +import { type Context } from 'hono'; +import path from 'node:path'; + +import { parseContent } from './util'; + +export const __dirname = getCurrentPath(import.meta.url); + +export const handler = async (ctx: Context): Promise => { + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const baseUrl: string = 'https://www.gcores.com'; + const imageBaseUrl: string = 'https://image.gcores.com'; + const audioBaseUrl: string = 'https://alioss.gcores.com'; + const targetUrl: string = new URL('news', baseUrl).href; + const apiUrl: string = new URL('gapi/v1/articles', baseUrl).href; + + const response = await ofetch(apiUrl, { + query: { + 'page[limit]': limit, + sort: '-published-at', + include: 'category,user,media', + 'filter[is-news]': 1, + }, + }); + + const included = response.included; + + const targetResponse = await ofetch(targetUrl); + const $: CheerioAPI = load(targetResponse); + const language = $('html').attr('lang') ?? 'zh-CN'; + + let items: DataItem[] = []; + + items = response.data?.slice(0, limit).map((item): DataItem => { + const attributes = item.attributes; + + const title: string = attributes.title; + const pubDate: number | string = attributes['published-at']; + const linkUrl: string | undefined = `${item.type}/${item.id}`; + + const categoryObj = item.relationships?.category?.data; + const categories: string[] = categoryObj ? [included.find((i) => i.type === categoryObj.type && i.id === categoryObj.id)?.attributes?.name].filter(Boolean) : []; + + const authorObj = item.relationships?.user?.data; + const authorIncluded = included.find((i) => i.type === authorObj.type && i.id === authorObj.id); + const authors: DataItem['author'] = authorIncluded + ? [ + { + name: authorIncluded.attributes?.nickname, + url: authorIncluded.id ? new URL(`${authorObj.type}/${authorIncluded.id}`, baseUrl).href : undefined, + avatar: authorIncluded.thumb ? new URL(authorIncluded.thumb, imageBaseUrl).href : undefined, + }, + ] + : undefined; + + const guid: string = `gcores-${item.id}`; + const image: string | undefined = (attributes.cover ?? attributes.thumb) ? new URL(attributes.cover ?? attributes.thumb, imageBaseUrl).href : undefined; + const updated: number | string = pubDate; + + let processedItem: DataItem = { + title, + pubDate: pubDate ? parseDate(pubDate) : undefined, + link: linkUrl, + category: categories, + author: authors, + guid, + id: guid, + image, + banner: image, + updated: updated ? parseDate(updated) : undefined, + language, + }; + + const enclosureUrl: string | undefined = attributes['speech-path'] ? new URL(`uploads/audio/${attributes['speech-path']}`, audioBaseUrl).href : undefined; + + if (enclosureUrl) { + const enclosureType: string = `audio/${enclosureUrl.split(/\./).pop()}`; + const enclosureLength: number = attributes.duration ? Number(attributes.duration) : 0; + + processedItem = { + ...processedItem, + enclosure_url: enclosureUrl, + enclosure_type: enclosureType, + enclosure_title: title, + enclosure_length: enclosureLength, + itunes_duration: enclosureLength, + itunes_item_image: image, + }; + } + + const description: string = art(path.join(__dirname, 'templates/description.art'), { + images: attributes.cover + ? [ + { + src: new URL(attributes.cover, imageBaseUrl).href, + alt: title, + }, + ] + : undefined, + audios: enclosureUrl + ? [ + { + src: enclosureUrl, + type: `audio/${enclosureUrl.split(/\./).pop()}`, + }, + ] + : undefined, + intro: attributes.desc || attributes.excerpt, + description: attributes.content ? parseContent(JSON.parse(attributes.content)) : undefined, + }); + + processedItem = { + ...processedItem, + description, + content: { + html: description, + text: description, + }, + }; + + return processedItem; + }); + + const title: string = $('title').text(); + + return { + title, + description: $('meta[name="description"]').attr('content'), + link: targetUrl, + item: items, + allowEmpty: true, + author: title.split(/\|/).pop()?.trim(), + language, + id: $('meta[property="og: url"]').attr('content'), + }; +}; + +export const route: Route = { + path: '/news', + name: '资讯', + url: 'www.gcores.com', + maintainers: ['nczitzk'], + handler, + example: '/gcores/news', + parameters: undefined, + description: undefined, + categories: ['game'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.gcores.com/news'], + target: '/gcores/news', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/gcores/templates/description.art b/lib/routes/gcores/templates/description.art new file mode 100644 index 000000000000..7ac6d47081bb --- /dev/null +++ b/lib/routes/gcores/templates/description.art @@ -0,0 +1,36 @@ +{{ if images }} + {{ each images image }} + {{ if image?.src }} + {{ image.alt }} + {{ /if }} + {{ /each }} +{{ /if }} + +{{ if audios }} + {{ each audios audio }} + {{ if audio?.src }} + + {{ /if }} + {{ /each }} +{{ /if }} + +{{ if intro }} +
{{ intro }}
+{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file diff --git a/lib/routes/gcores/util.ts b/lib/routes/gcores/util.ts new file mode 100644 index 000000000000..c307154621cc --- /dev/null +++ b/lib/routes/gcores/util.ts @@ -0,0 +1,241 @@ +import { art } from '@/utils/render'; +import { getCurrentPath } from '@/utils/helpers'; + +import path from 'node:path'; + +export const __dirname = getCurrentPath(import.meta.url); + +interface Style { + [key: string]: string; +} + +interface BlockType { + element: string; + parentElement?: string; + aliasedElements?: string[]; +} + +interface InlineStyleRange { + offset: number; + length: number; + style: string; +} + +interface EntityRange { + offset: number; + length: number; + key: number; +} + +interface Entity { + type: string; + mutability: string; + data: any; +} + +interface Block { + key: string; + text: string; + type: string; + depth: number; + inlineStyleRanges: InlineStyleRange[]; + entityRanges: EntityRange[]; + data: any; +} + +interface Content { + blocks: Block[]; + entityMap: { [key: string]: Entity }; +} + +const imageBaseUrl: string = 'https://image.gcores.com'; + +const STYLES: Readonly> = { + BOLD: { fontWeight: 'bold' }, + CODE: { fontFamily: 'monospace', wordWrap: 'break-word' }, + ITALIC: { fontStyle: 'italic' }, + STRIKETHROUGH: { textDecoration: 'line-through' }, + UNDERLINE: { textDecoration: 'underline' }, +}; + +const BLOCK_TYPES: Readonly> = { + 'header-one': { element: 'h1' }, + 'header-two': { element: 'h2' }, + 'header-three': { element: 'h3' }, + 'header-four': { element: 'h4' }, + 'header-five': { element: 'h5' }, + 'header-six': { element: 'h6' }, + 'unordered-list-item': { element: 'li', parentElement: 'ul' }, + 'ordered-list-item': { element: 'li', parentElement: 'ol' }, + blockquote: { element: 'blockquote' }, + atomic: { element: 'figure' }, + 'code-block': { element: 'pre' }, + unstyled: { element: 'div', aliasedElements: ['p'] }, +}; + +/** + * Creates a styled HTML fragment for a given text and style object. + * @param text The text content of the fragment. + * @param style An object containing CSS styles (key-value pairs). + * @returns An HTML string representing the styled fragment. + */ +const createStyledFragment = (text: string, style: Record): string => + `${text}`; + +/** + * Applies inline styles to a text string. + * @param text The text to style. + * @param inlineStyleRanges An array of inline style ranges. + * @returns The styled text. + */ +const applyStyles = (text: string, inlineStyleRanges: readonly InlineStyleRange[]): string => { + if (!inlineStyleRanges || inlineStyleRanges.length === 0) { + return text; + } + + const sortedRanges = [...inlineStyleRanges].sort((a, b) => a.offset - b.offset); + + let lastOffset = 0; + const styledFragments = sortedRanges.map((range) => { + const style = STYLES[range.style]; + if (!style) { + return text.substring(lastOffset, range.offset); + } + + const styledText = createStyledFragment(text.substring(range.offset, range.offset + range.length), style); + const preText = text.substring(lastOffset, range.offset); + lastOffset = range.offset + range.length; + return preText + styledText; + }); + let result = styledFragments.join(''); + result += text.substring(lastOffset); + return result; +}; + +/** + * Creates an HTML element for a given entity. + * @param entity The entity to create an element for. + * @param block The current block the entity belongs to, for debugging purposes. + * @returns The HTML element string. + */ +const createEntityElement = (entity: Entity, block: Block): string => { + switch (entity.type) { + case 'EMBED': + return entity.data.content.startsWith('http') ? `${entity.data.content}` : entity.data.content; + case 'IMAGE': + return art(path.join(__dirname, 'templates/description.art'), { + images: entity.data.path + ? [ + { + src: new URL(entity.data.path, imageBaseUrl).href, + alt: entity.data.caption, + width: entity.data.width, + height: entity.data.height, + }, + ] + : undefined, + }); + case 'GALLERY': + if (!entity.data.images || !Array.isArray(entity.data.images)) { + return ''; + } + return art(path.join(__dirname, 'templates/description.art'), { + images: entity.data.images.map((image: any) => ({ + src: new URL(image.path, imageBaseUrl).href, + alt: image.caption, + width: image.width, + height: image.height, + })), + }); + case 'LINK': + return `${block.text}`; + case 'WIDGET': + return `${entity.data.title}`; + default: + return ''; + } +}; + +/** + * Parses a single content block into an HTML string. + * @param block The block to parse. + * @param entityMap The entity map. + * @returns The parsed HTML string. + */ +const parseBlock = (block: Block, entityMap: { [key: string]: Entity }): string => { + const blockType = BLOCK_TYPES[block.type]; + if (!blockType) { + return ''; + } + + const usedElement = blockType.aliasedElements?.[0] ?? blockType.element; + + let content = applyStyles(block.text, block.inlineStyleRanges); + + if (block.entityRanges && block.entityRanges.length > 0) { + const entityElements = block.entityRanges + .map((range) => entityMap[range.key]) + .filter(Boolean) + .map((entity) => createEntityElement(entity!, block)); + + content = entityElements.join(''); + } + + return `<${usedElement}>${content}`; +}; + +/** + * Parses a Content object into an HTML string using a for loop. + * @param content The Content object to parse. + * @returns The parsed HTML string. + */ +const parseContent = (content: Content): string => { + const { blocks, entityMap } = content; + + if (!blocks || blocks.length === 0) { + return ''; + } + + let html = ''; + let currentParent: string | undefined = undefined; + let parentContent = ''; + + for (const block of blocks) { + const blockType = BLOCK_TYPES[block.type]; + if (!blockType) { + continue; + } + + const parentElement = blockType.parentElement; + const parsedBlock = parseBlock(block, entityMap); + + if (parentElement) { + if (currentParent === parentElement) { + parentContent += parsedBlock; + } else { + if (currentParent) { + html += `<${currentParent}>${parentContent}`; + } + currentParent = parentElement; + parentContent = parsedBlock; + } + } else { + if (currentParent) { + html += `<${currentParent}>${parentContent}`; + currentParent = undefined; + parentContent = ''; + } + html += parsedBlock; + } + } + + if (currentParent) { + html += `<${currentParent}>${parentContent}`; + } + + return html; +}; + +export { parseContent }; From da9b438e00ade3e5df20a7de3c3a8602fed1b267 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 08:48:11 +0000 Subject: [PATCH 0005/2658] chore(deps-dev): bump lint-staged from 15.4.2 to 15.4.3 (#18224) Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 15.4.2 to 15.4.3. - [Release notes](https://github.com/lint-staged/lint-staged/releases) - [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md) - [Commits](https://github.com/lint-staged/lint-staged/compare/v15.4.2...v15.4.3) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 54 +++++++++++++++++++++++++------------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index a4475f58c59e..058a13eae591 100644 --- a/package.json +++ b/package.json @@ -184,7 +184,7 @@ "got": "14.4.5", "husky": "9.1.7", "js-beautify": "1.15.1", - "lint-staged": "15.4.2", + "lint-staged": "15.4.3", "mockdate": "3.0.5", "msw": "2.4.3", "node-network-devtools": "1.0.25", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ae22628108fe..5c0dc41ff45b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -413,8 +413,8 @@ importers: specifier: 1.15.1 version: 1.15.1 lint-staged: - specifier: 15.4.2 - version: 15.4.2 + specifier: 15.4.3 + version: 15.4.3 mockdate: specifier: 3.0.5 version: 3.0.5 @@ -581,8 +581,8 @@ packages: resolution: {integrity: sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.26.0': - resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} + '@babel/helpers@7.26.7': + resolution: {integrity: sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==} engines: {node: '>=6.9.0'} '@babel/highlight@7.25.9': @@ -594,8 +594,8 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/parser@7.26.5': - resolution: {integrity: sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw==} + '@babel/parser@7.26.7': + resolution: {integrity: sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==} engines: {node: '>=6.0.0'} hasBin: true @@ -1004,16 +1004,16 @@ packages: resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.26.5': - resolution: {integrity: sha512-rkOSPOw+AXbgtwUga3U4u8RpoK9FEFWBNAlTpcnkLFjL5CT+oyHNuUUC/xx6XefEJ16r38r8Bc/lfp6rYuHeJQ==} + '@babel/traverse@7.26.7': + resolution: {integrity: sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA==} engines: {node: '>=6.9.0'} '@babel/types@7.26.0': resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} - '@babel/types@7.26.5': - resolution: {integrity: sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg==} + '@babel/types@7.26.7': + resolution: {integrity: sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==} engines: {node: '>=6.9.0'} '@bbob/core@4.1.1': @@ -3938,8 +3938,8 @@ packages: linkify-it@5.0.0: resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - lint-staged@15.4.2: - resolution: {integrity: sha512-gCqzB/Li281uZJgReNci+oXXqUEdrFAQAzTE/LwoxxiEuP41vozNe4BATS+4ehdqkWn+Z6bGc3EDcBja3npBVw==} + lint-staged@15.4.3: + resolution: {integrity: sha512-FoH1vOeouNh1pw+90S+cnuoFwRfUD9ijY2GKy5h7HS3OR7JVir2N2xrsa0+Twc1B7cW72L+88geG5cW4wIhn7g==} engines: {node: '>=18.12.0'} hasBin: true @@ -5840,11 +5840,11 @@ snapshots: '@babel/generator': 7.26.5 '@babel/helper-compilation-targets': 7.26.5 '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) - '@babel/helpers': 7.26.0 - '@babel/parser': 7.26.5 + '@babel/helpers': 7.26.7 + '@babel/parser': 7.26.7 '@babel/template': 7.25.9 - '@babel/traverse': 7.26.5 - '@babel/types': 7.26.5 + '@babel/traverse': 7.26.7 + '@babel/types': 7.26.7 convert-source-map: 2.0.0 debug: 4.4.0 gensync: 1.0.0-beta.2 @@ -5863,8 +5863,8 @@ snapshots: '@babel/generator@7.26.5': dependencies: - '@babel/parser': 7.26.5 - '@babel/types': 7.26.5 + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.1.0 @@ -6002,10 +6002,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helpers@7.26.0': + '@babel/helpers@7.26.7': dependencies: '@babel/template': 7.25.9 - '@babel/types': 7.26.5 + '@babel/types': 7.26.7 '@babel/highlight@7.25.9': dependencies: @@ -6018,9 +6018,9 @@ snapshots: dependencies: '@babel/types': 7.26.0 - '@babel/parser@7.26.5': + '@babel/parser@7.26.7': dependencies: - '@babel/types': 7.26.5 + '@babel/types': 7.26.7 '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9(@babel/core@7.26.0)': dependencies: @@ -6541,13 +6541,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/traverse@7.26.5': + '@babel/traverse@7.26.7': dependencies: '@babel/code-frame': 7.26.2 '@babel/generator': 7.26.5 - '@babel/parser': 7.26.5 + '@babel/parser': 7.26.7 '@babel/template': 7.25.9 - '@babel/types': 7.26.5 + '@babel/types': 7.26.7 debug: 4.4.0 globals: 11.12.0 transitivePeerDependencies: @@ -6558,7 +6558,7 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 - '@babel/types@7.26.5': + '@babel/types@7.26.7': dependencies: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 @@ -9693,7 +9693,7 @@ snapshots: dependencies: uc.micro: 2.1.0 - lint-staged@15.4.2: + lint-staged@15.4.3: dependencies: chalk: 5.4.1 commander: 13.1.0 From 9d3aa6c848ee2de4cc68e5f07ba9b3f74be986ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 08:48:39 +0000 Subject: [PATCH 0006/2658] chore(deps): bump chrono-node from 2.7.7 to 2.7.8 (#18229) Bumps [chrono-node](https://github.com/wanasit/chrono) from 2.7.7 to 2.7.8. - [Release notes](https://github.com/wanasit/chrono/releases) - [Commits](https://github.com/wanasit/chrono/compare/v2.7.7...v2.7.8) --- updated-dependencies: - dependency-name: chrono-node dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 058a13eae591..373694c62128 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "aes-js": "3.1.2", "art-template": "4.13.2", "cheerio": "1.0.0", - "chrono-node": "2.7.7", + "chrono-node": "2.7.8", "city-timezones": "1.3.0", "cross-env": "7.0.3", "crypto-js": "4.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5c0dc41ff45b..051f24aeaafe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -76,8 +76,8 @@ importers: specifier: 1.0.0 version: 1.0.0 chrono-node: - specifier: 2.7.7 - version: 2.7.7 + specifier: 2.7.8 + version: 2.7.8 city-timezones: specifier: 1.3.0 version: 1.3.0 @@ -2499,8 +2499,8 @@ packages: peerDependencies: devtools-protocol: '*' - chrono-node@2.7.7: - resolution: {integrity: sha512-p3S7gotuTPu5oqhRL2p1fLwQXGgdQaRTtWR3e8Di9P1Pa9mzkK5DWR5AWBieMUh2ZdOnPgrK+zCrbbtyuA+D/Q==} + chrono-node@2.7.8: + resolution: {integrity: sha512-pzxemrTKu6jFVyAfkNxUckp9nlrmRFtr5lGrEJcVKyeKV9WSeGT78Oysazlzd/H0BdMv7EzACtJrw0pi2KODBQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} ci-info@4.0.0: @@ -8072,7 +8072,7 @@ snapshots: urlpattern-polyfill: 10.0.0 zod: 3.22.4 - chrono-node@2.7.7: + chrono-node@2.7.8: dependencies: dayjs: 1.11.8 From 69b3af44e0f9e4318ebeab80a50a949bc4c0a14a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 16:58:46 +0800 Subject: [PATCH 0007/2658] chore(deps): bump tldts from 6.1.74 to 6.1.75 (#18228) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.74 to 6.1.75. - [Release notes](https://github.com/remusao/tldts/releases) - [Changelog](https://github.com/remusao/tldts/blob/master/CHANGELOG.md) - [Commits](https://github.com/remusao/tldts/compare/v6.1.74...v6.1.75) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 373694c62128..6394132b2b03 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "telegram": "2.26.16", "tiny-async-pool": "2.1.0", "title": "4.0.1", - "tldts": "6.1.74", + "tldts": "6.1.75", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.1.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 051f24aeaafe..982504e1e901 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -241,8 +241,8 @@ importers: specifier: 4.0.1 version: 4.0.1 tldts: - specifier: 6.1.74 - version: 6.1.74 + specifier: 6.1.75 + version: 6.1.75 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5266,11 +5266,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.74: - resolution: {integrity: sha512-gTwtY6L2GfuxiL4CWpLknv9JDYYqBvKCk/BT5uAaAvCA0s6pzX7lr2IrkQZSUlnSjRHIjTl8ZwKCVXJ7XNRWYw==} + tldts-core@6.1.75: + resolution: {integrity: sha512-AOvV5YYIAFFBfransBzSTyztkc3IMfz5Eq3YluaRiEu55nn43Fzaufx70UqEKYr8BoLCach4q8g/bg6e5+/aFw==} - tldts@6.1.74: - resolution: {integrity: sha512-O5vTZ1UmmEmrLl/59U9igitnSMlprALLaLgbv//dEvjobPT9vyURhHXKMCDLEhn3qxZFIkb9PwAfNYV0Ol7RPQ==} + tldts@6.1.75: + resolution: {integrity: sha512-+lFzEXhpl7JXgWYaXcB6DqTYXbUArvrWAE/5ioq/X3CdWLbDjpPP4XTrQBmEJ91y3xbe4Fkw7Lxv4P3GWeJaNg==} hasBin: true tmp@0.0.33: @@ -11183,11 +11183,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.74: {} + tldts-core@6.1.75: {} - tldts@6.1.74: + tldts@6.1.75: dependencies: - tldts-core: 6.1.74 + tldts-core: 6.1.75 tmp@0.0.33: dependencies: @@ -11223,7 +11223,7 @@ snapshots: tough-cookie@5.1.0: dependencies: - tldts: 6.1.74 + tldts: 6.1.75 tr46@0.0.3: {} From 2432c01058b22e1ce450e21430b3ab5d97f28082 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 17:05:47 +0800 Subject: [PATCH 0008/2658] chore(deps-dev): bump @eslint/js from 9.18.0 to 9.19.0 (#18225) Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.18.0 to 9.19.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.19.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6394132b2b03..98951d83e5a9 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "@babel/preset-typescript": "7.26.0", "@bbob/types": "4.2.0", "@eslint/eslintrc": "3.2.0", - "@eslint/js": "9.18.0", + "@eslint/js": "9.19.0", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "2.13.0", "@types/aes-js": "3.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 982504e1e901..455b59b537ee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -287,8 +287,8 @@ importers: specifier: 3.2.0 version: 3.2.0 '@eslint/js': - specifier: 9.18.0 - version: 9.18.0 + specifier: 9.19.0 + version: 9.19.0 '@microsoft/eslint-formatter-sarif': specifier: 3.1.0 version: 3.1.0 @@ -1403,6 +1403,10 @@ packages: resolution: {integrity: sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.19.0': + resolution: {integrity: sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==} + 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} @@ -6839,6 +6843,8 @@ snapshots: '@eslint/js@9.18.0': {} + '@eslint/js@9.19.0': {} + '@eslint/object-schema@2.1.4': {} '@eslint/plugin-kit@0.2.5': From 19e871940a1aa24d546d49543fc4b9e8f791b3a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 17:08:23 +0800 Subject: [PATCH 0009/2658] chore(deps-dev): bump @babel/preset-env and @types/babel__preset-env (#18227) Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) and [@types/babel__preset-env](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/babel__preset-env). These dependencies needed to be updated together. Updates `@babel/preset-env` from 7.26.0 to 7.26.7 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.26.7/packages/babel-preset-env) Updates `@types/babel__preset-env` from 7.9.7 to 7.10.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/babel__preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: "@types/babel__preset-env" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 442 +++++++++++++++++++++++++++---------------------- 2 files changed, 248 insertions(+), 198 deletions(-) diff --git a/package.json b/package.json index 98951d83e5a9..6c2dc54fb31c 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "zod": "3.24.1" }, "devDependencies": { - "@babel/preset-env": "7.26.0", + "@babel/preset-env": "7.26.7", "@babel/preset-typescript": "7.26.0", "@bbob/types": "4.2.0", "@eslint/eslintrc": "3.2.0", @@ -146,7 +146,7 @@ "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "2.13.0", "@types/aes-js": "3.1.4", - "@types/babel__preset-env": "7.9.7", + "@types/babel__preset-env": "7.10.0", "@types/crypto-js": "4.2.2", "@types/eslint": "9.6.1", "@types/etag": "1.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 455b59b537ee..0551ec36c145 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -275,8 +275,8 @@ importers: version: 3.24.1 devDependencies: '@babel/preset-env': - specifier: 7.26.0 - version: 7.26.0(@babel/core@7.26.0) + specifier: 7.26.7 + version: 7.26.7(@babel/core@7.26.0) '@babel/preset-typescript': specifier: 7.26.0 version: 7.26.0(@babel/core@7.26.0) @@ -299,8 +299,8 @@ importers: specifier: 3.1.4 version: 3.1.4 '@types/babel__preset-env': - specifier: 7.9.7 - version: 7.9.7 + specifier: 7.10.0 + version: 7.10.0 '@types/crypto-js': specifier: 4.2.2 version: 4.2.2 @@ -470,10 +470,6 @@ packages: resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.26.2': - resolution: {integrity: sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==} - engines: {node: '>=6.9.0'} - '@babel/compat-data@7.26.5': resolution: {integrity: sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg==} engines: {node: '>=6.9.0'} @@ -494,14 +490,6 @@ packages: resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} engines: {node: '>=6.9.0'} - '@babel/helper-builder-binary-assignment-operator-visitor@7.25.9': - resolution: {integrity: sha512-C47lC7LIDCnz0h4vai/tpNOI95tCd5ZT3iBt/DBH5lXKHZsyNQv18yf1wIIg2ntiQNgmAvA+DgZ82iW8Qdym8g==} - engines: {node: '>=6.9.0'} - - '@babel/helper-compilation-targets@7.25.9': - resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.26.5': resolution: {integrity: sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==} engines: {node: '>=6.9.0'} @@ -512,14 +500,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-create-regexp-features-plugin@7.25.9': - resolution: {integrity: sha512-ORPNZ3h6ZRkOyAa/SaHU+XsLZr0UQzRwuDQ0cczIA17nAzZ+85G5cVkOJIj7QavLZGSe8QXUmNFxSZzjcZF9bw==} + '@babel/helper-create-regexp-features-plugin@7.26.3': + resolution: {integrity: sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-define-polyfill-provider@0.6.2': - resolution: {integrity: sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==} + '@babel/helper-define-polyfill-provider@0.6.3': + resolution: {integrity: sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 @@ -545,6 +533,10 @@ packages: resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} engines: {node: '>=6.9.0'} + '@babel/helper-plugin-utils@7.26.5': + resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} + engines: {node: '>=6.9.0'} + '@babel/helper-remap-async-to-generator@7.25.9': resolution: {integrity: sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==} engines: {node: '>=6.9.0'} @@ -557,6 +549,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-replace-supers@7.26.5': + resolution: {integrity: sha512-bJ6iIVdYX1YooY2X7w1q6VITt+LnUILtNk7zT78ykuwStx8BauCzxvFqFaHjOpW1bVnSUM1PN1f0p5P21wHxvg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-simple-access@7.25.9': resolution: {integrity: sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q==} engines: {node: '>=6.9.0'} @@ -683,8 +681,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoped-functions@7.25.9': - resolution: {integrity: sha512-toHc9fzab0ZfenFpsyYinOX0J/5dgJVA2fm64xPewu7CoYHWEivIWKxkK2rMi4r3yQqLnVmheMXRdG+k239CgA==} + '@babel/plugin-transform-block-scoped-functions@7.26.5': + resolution: {integrity: sha512-chuTSY+hq09+/f5lMj8ZSYgCFpppV2CbYrhNFJ1BFoXpiWPnnAb7R0MqrafCpN8E1+YRrtM1MXZHJdIx8B6rMQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -749,8 +747,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-exponentiation-operator@7.25.9': - resolution: {integrity: sha512-KRhdhlVk2nObA5AYa7QMgTMTVJdfHprfpAk4DjZVtllqRg9qarilstTKEhpVjyt+Npi8ThRyiV8176Am3CodPA==} + '@babel/plugin-transform-exponentiation-operator@7.26.3': + resolution: {integrity: sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -809,6 +807,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-modules-commonjs@7.26.3': + resolution: {integrity: sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-modules-systemjs@7.25.9': resolution: {integrity: sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==} engines: {node: '>=6.9.0'} @@ -833,8 +837,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-nullish-coalescing-operator@7.25.9': - resolution: {integrity: sha512-ENfftpLZw5EItALAD4WsY/KUWvhUlZndm5GC7G3evUsVeSJB6p0pBeLQUnRnBCBx7zV0RKQjR9kCuwrsIrjWog==} + '@babel/plugin-transform-nullish-coalescing-operator@7.26.6': + resolution: {integrity: sha512-CKW8Vu+uUZneQCPtXmSBUC6NCAUdya26hWCElAWh5mVSlSRsmiCPUUDKb3Z0szng1hiAJa098Hkhg9o4SE35Qw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -935,8 +939,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typeof-symbol@7.25.9': - resolution: {integrity: sha512-v61XqUMiueJROUv66BVIOi0Fv/CUuZuZMl5NkRoCVxLAnMexZ0A3kMe7vvZ0nulxMuMp0Mk6S5hNh48yki08ZA==} + '@babel/plugin-transform-typeof-symbol@7.26.7': + resolution: {integrity: sha512-jfoTXXZTgGg36BmhqT3cAYK5qkmqvJpvNrPhaK/52Vgjhw4Rq29s9UqpWWV0D6yuRmgiFH/BUVlkl96zJWqnaw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -971,8 +975,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/preset-env@7.26.0': - resolution: {integrity: sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw==} + '@babel/preset-env@7.26.7': + resolution: {integrity: sha512-Ycg2tnXwixaXOVb29rana8HNPgLVBof8qqtNQ9LE22IoyZboQbGSxI6ZySMdW3K5nAe6gu35IaJefUJflhUFTQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -992,8 +996,8 @@ packages: resolution: {integrity: sha512-AQKSxUdaM7uTEGFmLZj1LOgX3LaLdt4udjqywaVdN6R5P2KAgqtBkDW4TS2ySRYNqcKmEe8Xv96jegHJNNb7Gg==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.26.0': - resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + '@babel/runtime@7.26.7': + resolution: {integrity: sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==} engines: {node: '>=6.9.0'} '@babel/template@7.25.9': @@ -1915,8 +1919,8 @@ packages: '@types/aes-js@3.1.4': resolution: {integrity: sha512-v3D66IptpUqh+pHKVNRxY8yvp2ESSZXe0rTzsGdzUhEwag7ljVfgCllkWv2YgiYXDhWFBrEywll4A5JToyTNFA==} - '@types/babel__preset-env@7.9.7': - resolution: {integrity: sha512-m63P4DQR9d0/g8GwRsmyizGqfCGWI6LVnuNg4OV8YhNM+VMBAepJ4394Z/rJA0pBYV+AXgFfHP4RiIlk9mYVVQ==} + '@types/babel__preset-env@7.10.0': + resolution: {integrity: sha512-LS8hRb/8TQir2f8W9/s5enDtrRS2F/6fsdkVw5ePHp6Q8SrSJHOGtWnP93ryaYMmg2du03vOsiGrl5mllz4uDA==} '@types/bluebird@3.5.42': resolution: {integrity: sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==} @@ -2299,8 +2303,8 @@ packages: b4a@1.6.7: resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} - babel-plugin-polyfill-corejs2@0.4.11: - resolution: {integrity: sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==} + babel-plugin-polyfill-corejs2@0.4.12: + resolution: {integrity: sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 @@ -2309,8 +2313,8 @@ packages: peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - babel-plugin-polyfill-regenerator@0.6.2: - resolution: {integrity: sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==} + babel-plugin-polyfill-regenerator@0.6.3: + resolution: {integrity: sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 @@ -2385,6 +2389,11 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + browserslist@4.24.4: + resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + buffer-crc32@0.2.13: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} @@ -2443,6 +2452,9 @@ packages: caniuse-lite@1.0.30001677: resolution: {integrity: sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==} + caniuse-lite@1.0.30001695: + resolution: {integrity: sha512-vHyLade6wTgI2u1ec3WQBxv+2BrTERV28UXQu9LO6lZ9pYeMk34vjXFLOxo1A4UBA8XTL4njRQZdno/yYaSmWw==} + caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -2638,6 +2650,9 @@ packages: core-js-compat@3.39.0: resolution: {integrity: sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==} + core-js-compat@3.40.0: + resolution: {integrity: sha512-0XEDpr5y5mijvw8Lbc6E5AkjrHfp7eEoPlu36SWeAbcL8fn1G1ANe8DBlo2XoNN89oVpxWwOjYIPVzR4ZvsKCQ==} + core-js@2.6.12: resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==} deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. @@ -2901,6 +2916,9 @@ packages: electron-to-chromium@1.5.50: resolution: {integrity: sha512-eMVObiUQ2LdgeO1F/ySTXsvqvxb6ZH2zPGaMYsWzRDdOddUa77tdmI0ltg+L16UpbWdhPmuF3wIQYyQq65WfZw==} + electron-to-chromium@1.5.88: + resolution: {integrity: sha512-K3C2qf1o+bGzbilTDCTBhTQcMS9KW60yTAaTeeXsfvQuTDDwlokLam/AdqlqcSy9u4UainDgsHV23ksXAOgamw==} + ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -4344,6 +4362,9 @@ packages: node-releases@2.0.18: resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + node-releases@2.0.19: + resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + nodemailer@6.10.0: resolution: {integrity: sha512-SQ3wZCExjeSatLE/HBaXS5vqUOQk6GtBdIIKxiFdmm01mOQZX/POJkO3SUX1wDiYcwUOJwT23scFSC9fY2H8IA==} engines: {node: '>=6.0.0'} @@ -4817,8 +4838,8 @@ packages: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true - regexpu-core@6.1.1: - resolution: {integrity: sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==} + regexpu-core@6.2.0: + resolution: {integrity: sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==} engines: {node: '>=4'} regjsgen@0.8.0: @@ -4828,8 +4849,8 @@ packages: resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} hasBin: true - regjsparser@0.11.2: - resolution: {integrity: sha512-3OGZZ4HoLJkkAZx/48mTXJNlmqTGOzc0o9OWQPuWpkOlXXPbyN6OafCcoXUnBqE2D3f/T5L+pWc1kdEmnfnRsA==} + regjsparser@0.12.0: + resolution: {integrity: sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==} hasBin: true relateurl@0.2.7: @@ -4882,8 +4903,9 @@ packages: resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} hasBin: true responselike@3.0.0: @@ -5478,6 +5500,12 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + update-browserslist-db@1.1.2: + resolution: {integrity: sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + upper-case@1.1.3: resolution: {integrity: sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==} @@ -5833,8 +5861,6 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/compat-data@7.26.2': {} - '@babel/compat-data@7.26.5': {} '@babel/core@7.26.0': @@ -5859,8 +5885,8 @@ snapshots: '@babel/generator@7.26.2': dependencies: - '@babel/parser': 7.26.2 - '@babel/types': 7.26.0 + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.0.2 @@ -5877,26 +5903,11 @@ snapshots: dependencies: '@babel/types': 7.26.0 - '@babel/helper-builder-binary-assignment-operator-visitor@7.25.9': - dependencies: - '@babel/traverse': 7.25.9 - '@babel/types': 7.26.0 - transitivePeerDependencies: - - supports-color - - '@babel/helper-compilation-targets@7.25.9': - dependencies: - '@babel/compat-data': 7.26.2 - '@babel/helper-validator-option': 7.25.9 - browserslist: 4.24.2 - lru-cache: 5.1.1 - semver: 6.3.1 - '@babel/helper-compilation-targets@7.26.5': dependencies: '@babel/compat-data': 7.26.5 '@babel/helper-validator-option': 7.25.9 - browserslist: 4.24.2 + browserslist: 4.24.4 lru-cache: 5.1.1 semver: 6.3.1 @@ -5913,35 +5924,35 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-create-regexp-features-plugin@7.25.9(@babel/core@7.26.0)': + '@babel/helper-create-regexp-features-plugin@7.26.3(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-annotate-as-pure': 7.25.9 - regexpu-core: 6.1.1 + regexpu-core: 6.2.0 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.26.0)': + '@babel/helper-define-polyfill-provider@0.6.3(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-plugin-utils': 7.26.5 debug: 4.4.0 lodash.debounce: 4.0.8 - resolve: 1.22.8 + resolve: 1.22.10 transitivePeerDependencies: - supports-color '@babel/helper-member-expression-to-functions@7.25.9': dependencies: - '@babel/traverse': 7.25.9 - '@babel/types': 7.26.0 + '@babel/traverse': 7.26.7 + '@babel/types': 7.26.7 transitivePeerDependencies: - supports-color '@babel/helper-module-imports@7.25.9': dependencies: - '@babel/traverse': 7.25.9 - '@babel/types': 7.26.0 + '@babel/traverse': 7.26.7 + '@babel/types': 7.26.7 transitivePeerDependencies: - supports-color @@ -5956,16 +5967,18 @@ snapshots: '@babel/helper-optimise-call-expression@7.25.9': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.26.7 '@babel/helper-plugin-utils@7.25.9': {} + '@babel/helper-plugin-utils@7.26.5': {} + '@babel/helper-remap-async-to-generator@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-annotate-as-pure': 7.25.9 '@babel/helper-wrap-function': 7.25.9 - '@babel/traverse': 7.25.9 + '@babel/traverse': 7.26.7 transitivePeerDependencies: - supports-color @@ -5974,7 +5987,16 @@ snapshots: '@babel/core': 7.26.0 '@babel/helper-member-expression-to-functions': 7.25.9 '@babel/helper-optimise-call-expression': 7.25.9 - '@babel/traverse': 7.25.9 + '@babel/traverse': 7.26.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-replace-supers@7.26.5(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-member-expression-to-functions': 7.25.9 + '@babel/helper-optimise-call-expression': 7.25.9 + '@babel/traverse': 7.26.7 transitivePeerDependencies: - supports-color @@ -6001,8 +6023,8 @@ snapshots: '@babel/helper-wrap-function@7.25.9': dependencies: '@babel/template': 7.25.9 - '@babel/traverse': 7.25.9 - '@babel/types': 7.26.0 + '@babel/traverse': 7.26.7 + '@babel/types': 7.26.7 transitivePeerDependencies: - supports-color @@ -6020,7 +6042,7 @@ snapshots: '@babel/parser@7.26.2': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.26.7 '@babel/parser@7.26.7': dependencies: @@ -6029,25 +6051,25 @@ snapshots: '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/traverse': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 + '@babel/traverse': 7.26.7 transitivePeerDependencies: - supports-color '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.26.0) transitivePeerDependencies: @@ -6056,8 +6078,8 @@ snapshots: '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/traverse': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 + '@babel/traverse': 7.26.7 transitivePeerDependencies: - supports-color @@ -6068,12 +6090,12 @@ snapshots: '@babel/plugin-syntax-import-assertions@7.26.0(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0)': dependencies: @@ -6083,25 +6105,25 @@ snapshots: '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.26.3(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-arrow-functions@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-async-generator-functions@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.26.0) - '@babel/traverse': 7.25.9 + '@babel/traverse': 7.26.7 transitivePeerDependencies: - supports-color @@ -6109,26 +6131,26 @@ snapshots: dependencies: '@babel/core': 7.26.0 '@babel/helper-module-imports': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.26.0) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-block-scoped-functions@7.25.9(@babel/core@7.26.0)': + '@babel/plugin-transform-block-scoped-functions@7.26.5(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-block-scoping@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-class-properties@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 transitivePeerDependencies: - supports-color @@ -6136,7 +6158,7 @@ snapshots: dependencies: '@babel/core': 7.26.0 '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 transitivePeerDependencies: - supports-color @@ -6144,10 +6166,10 @@ snapshots: dependencies: '@babel/core': 7.26.0 '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-replace-supers': 7.25.9(@babel/core@7.26.0) - '@babel/traverse': 7.25.9 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-replace-supers': 7.26.5(@babel/core@7.26.0) + '@babel/traverse': 7.26.7 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -6155,53 +6177,50 @@ snapshots: '@babel/plugin-transform-computed-properties@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/template': 7.25.9 '@babel/plugin-transform-destructuring@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-dotall-regex@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.26.3(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-duplicate-keys@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.26.3(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-dynamic-import@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-exponentiation-operator@7.25.9(@babel/core@7.26.0)': + '@babel/plugin-transform-exponentiation-operator@7.26.3(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - transitivePeerDependencies: - - supports-color + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-export-namespace-from@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-for-of@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color @@ -6209,37 +6228,37 @@ snapshots: '@babel/plugin-transform-function-name@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/traverse': 7.25.9 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-plugin-utils': 7.26.5 + '@babel/traverse': 7.26.7 transitivePeerDependencies: - supports-color '@babel/plugin-transform-json-strings@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-literals@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-logical-assignment-operators@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-member-expression-literals@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-modules-amd@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 transitivePeerDependencies: - supports-color @@ -6252,13 +6271,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-modules-commonjs@7.26.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.26.5 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-modules-systemjs@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.25.9 + '@babel/traverse': 7.26.7 transitivePeerDependencies: - supports-color @@ -6266,55 +6293,55 @@ snapshots: dependencies: '@babel/core': 7.26.0 '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 transitivePeerDependencies: - supports-color '@babel/plugin-transform-named-capturing-groups-regex@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.26.3(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-new-target@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-nullish-coalescing-operator@7.25.9(@babel/core@7.26.0)': + '@babel/plugin-transform-nullish-coalescing-operator@7.26.6(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-numeric-separator@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-object-rest-spread@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-object-super@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-replace-supers': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-replace-supers': 7.26.5(@babel/core@7.26.0) transitivePeerDependencies: - supports-color '@babel/plugin-transform-optional-catch-binding@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-optional-chaining@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color @@ -6322,13 +6349,13 @@ snapshots: '@babel/plugin-transform-parameters@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-private-methods@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 transitivePeerDependencies: - supports-color @@ -6337,41 +6364,41 @@ snapshots: '@babel/core': 7.26.0 '@babel/helper-annotate-as-pure': 7.25.9 '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 transitivePeerDependencies: - supports-color '@babel/plugin-transform-property-literals@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-regenerator@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 regenerator-transform: 0.15.2 '@babel/plugin-transform-regexp-modifiers@7.26.0(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.26.3(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-reserved-words@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-shorthand-properties@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-spread@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color @@ -6379,17 +6406,17 @@ snapshots: '@babel/plugin-transform-sticky-regex@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-template-literals@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-typeof-symbol@7.25.9(@babel/core@7.26.0)': + '@babel/plugin-transform-typeof-symbol@7.26.7(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-typescript@7.25.9(@babel/core@7.26.0)': dependencies: @@ -6405,32 +6432,32 @@ snapshots: '@babel/plugin-transform-unicode-escapes@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-unicode-property-regex@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.26.3(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-unicode-regex@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.26.3(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.26.5 '@babel/plugin-transform-unicode-sets-regex@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.26.0) - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.26.3(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.26.5 - '@babel/preset-env@7.26.0(@babel/core@7.26.0)': + '@babel/preset-env@7.26.7(@babel/core@7.26.0)': dependencies: - '@babel/compat-data': 7.26.2 + '@babel/compat-data': 7.26.5 '@babel/core': 7.26.0 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-plugin-utils': 7.26.5 '@babel/helper-validator-option': 7.25.9 '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.9(@babel/core@7.26.0) '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.9(@babel/core@7.26.0) @@ -6444,7 +6471,7 @@ snapshots: '@babel/plugin-transform-arrow-functions': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-async-generator-functions': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-async-to-generator': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-block-scoped-functions': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-block-scoped-functions': 7.26.5(@babel/core@7.26.0) '@babel/plugin-transform-block-scoping': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-class-properties': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-class-static-block': 7.26.0(@babel/core@7.26.0) @@ -6455,7 +6482,7 @@ snapshots: '@babel/plugin-transform-duplicate-keys': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-dynamic-import': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-exponentiation-operator': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-exponentiation-operator': 7.26.3(@babel/core@7.26.0) '@babel/plugin-transform-export-namespace-from': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-for-of': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-function-name': 7.25.9(@babel/core@7.26.0) @@ -6464,12 +6491,12 @@ snapshots: '@babel/plugin-transform-logical-assignment-operators': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-member-expression-literals': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-modules-amd': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-modules-commonjs': 7.26.3(@babel/core@7.26.0) '@babel/plugin-transform-modules-systemjs': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-modules-umd': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-named-capturing-groups-regex': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-new-target': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-nullish-coalescing-operator': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-nullish-coalescing-operator': 7.26.6(@babel/core@7.26.0) '@babel/plugin-transform-numeric-separator': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-object-rest-spread': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-object-super': 7.25.9(@babel/core@7.26.0) @@ -6486,16 +6513,16 @@ snapshots: '@babel/plugin-transform-spread': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-sticky-regex': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-template-literals': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-typeof-symbol': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-typeof-symbol': 7.26.7(@babel/core@7.26.0) '@babel/plugin-transform-unicode-escapes': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-unicode-property-regex': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-unicode-regex': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-unicode-sets-regex': 7.25.9(@babel/core@7.26.0) '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.26.0) - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.26.0) + babel-plugin-polyfill-corejs2: 0.4.12(@babel/core@7.26.0) babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.26.0) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.26.0) - core-js-compat: 3.39.0 + babel-plugin-polyfill-regenerator: 0.6.3(@babel/core@7.26.0) + core-js-compat: 3.40.0 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -6503,8 +6530,8 @@ snapshots: '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-plugin-utils': 7.25.9 - '@babel/types': 7.26.0 + '@babel/helper-plugin-utils': 7.26.5 + '@babel/types': 7.26.7 esutils: 2.0.3 '@babel/preset-typescript@7.26.0(@babel/core@7.26.0)': @@ -6523,15 +6550,15 @@ snapshots: core-js: 2.6.12 regenerator-runtime: 0.14.1 - '@babel/runtime@7.26.0': + '@babel/runtime@7.26.7': dependencies: regenerator-runtime: 0.14.1 '@babel/template@7.25.9': dependencies: '@babel/code-frame': 7.26.2 - '@babel/parser': 7.26.2 - '@babel/types': 7.26.0 + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 '@babel/traverse@7.25.9': dependencies: @@ -6539,7 +6566,7 @@ snapshots: '@babel/generator': 7.26.2 '@babel/parser': 7.26.2 '@babel/template': 7.25.9 - '@babel/types': 7.26.0 + '@babel/types': 7.26.7 debug: 4.4.0 globals: 11.12.0 transitivePeerDependencies: @@ -7372,7 +7399,7 @@ snapshots: '@types/aes-js@3.1.4': {} - '@types/babel__preset-env@7.9.7': {} + '@types/babel__preset-env@7.10.0': {} '@types/bluebird@3.5.42': {} @@ -7819,11 +7846,11 @@ snapshots: b4a@1.6.7: {} - babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.26.0): + babel-plugin-polyfill-corejs2@0.4.12(@babel/core@7.26.0): dependencies: - '@babel/compat-data': 7.26.2 + '@babel/compat-data': 7.26.5 '@babel/core': 7.26.0 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.26.0) + '@babel/helper-define-polyfill-provider': 0.6.3(@babel/core@7.26.0) semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -7831,15 +7858,15 @@ snapshots: babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.26.0): dependencies: '@babel/core': 7.26.0 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.26.0) - core-js-compat: 3.39.0 + '@babel/helper-define-polyfill-provider': 0.6.3(@babel/core@7.26.0) + core-js-compat: 3.40.0 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.26.0): + babel-plugin-polyfill-regenerator@0.6.3(@babel/core@7.26.0): dependencies: '@babel/core': 7.26.0 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.26.0) + '@babel/helper-define-polyfill-provider': 0.6.3(@babel/core@7.26.0) transitivePeerDependencies: - supports-color @@ -7922,6 +7949,13 @@ snapshots: node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) + browserslist@4.24.4: + dependencies: + caniuse-lite: 1.0.30001695 + electron-to-chromium: 1.5.88 + node-releases: 2.0.19 + update-browserslist-db: 1.1.2(browserslist@4.24.4) + buffer-crc32@0.2.13: {} buffer-equal-constant-time@1.0.1: {} @@ -7986,6 +8020,8 @@ snapshots: caniuse-lite@1.0.30001677: {} + caniuse-lite@1.0.30001695: {} + caseless@0.12.0: {} chai@5.1.2: @@ -8203,6 +8239,10 @@ snapshots: dependencies: browserslist: 4.24.2 + core-js-compat@3.40.0: + dependencies: + browserslist: 4.24.4 + core-js@2.6.12: {} core-util-is@1.0.2: {} @@ -8443,6 +8483,8 @@ snapshots: electron-to-chromium@1.5.50: {} + electron-to-chromium@1.5.88: {} + ellipsize@0.1.0: {} emoji-regex@10.4.0: {} @@ -10170,6 +10212,8 @@ snapshots: node-releases@2.0.18: {} + node-releases@2.0.19: {} + nodemailer@6.10.0: {} nodemailer@6.9.16: {} @@ -10185,7 +10229,7 @@ snapshots: normalize-package-data@2.5.0: dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.8 + resolve: 1.22.10 semver: 5.7.2 validate-npm-package-license: 3.0.4 @@ -10685,16 +10729,16 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.26.0 + '@babel/runtime': 7.26.7 regexp-tree@0.1.27: {} - regexpu-core@6.1.1: + regexpu-core@6.2.0: dependencies: regenerate: 1.4.2 regenerate-unicode-properties: 10.2.0 regjsgen: 0.8.0 - regjsparser: 0.11.2 + regjsparser: 0.12.0 unicode-match-property-ecmascript: 2.0.0 unicode-match-property-value-ecmascript: 2.2.0 @@ -10704,7 +10748,7 @@ snapshots: dependencies: jsesc: 0.5.0 - regjsparser@0.11.2: + regjsparser@0.12.0: dependencies: jsesc: 3.0.2 @@ -10769,7 +10813,7 @@ snapshots: resolve-pkg-maps@1.0.0: {} - resolve@1.22.8: + resolve@1.22.10: dependencies: is-core-module: '@nolyfill/is-core-module@1.0.39' path-parse: 1.0.7 @@ -11361,6 +11405,12 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + update-browserslist-db@1.1.2(browserslist@4.24.4): + dependencies: + browserslist: 4.24.4 + escalade: 3.2.0 + picocolors: 1.1.1 + upper-case@1.1.3: {} uri-js@4.4.1: From ff885d25d30dad32e2edcd3c9e06bfcd05528308 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 17:37:43 +0800 Subject: [PATCH 0010/2658] chore(deps-dev): bump eslint from 9.18.0 to 9.19.0 (#18230) Bumps [eslint](https://github.com/eslint/eslint) from 9.18.0 to 9.19.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.18.0...v9.19.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 162 ++++++++++++++++++++++++------------------------- 2 files changed, 79 insertions(+), 85 deletions(-) diff --git a/package.json b/package.json index 6c2dc54fb31c..d0cbc6d76317 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ "@vercel/nft": "0.29.0", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.117", - "eslint": "9.18.0", + "eslint": "9.19.0", "eslint-config-prettier": "10.0.1", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.15.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0551ec36c145..19424f05bafb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -294,7 +294,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 2.13.0 - version: 2.13.0(eslint@9.18.0)(typescript@5.7.3) + version: 2.13.0(eslint@9.19.0)(typescript@5.7.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -363,10 +363,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.21.0 - version: 8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0)(typescript@5.7.3) + version: 8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3) '@typescript-eslint/parser': specifier: 8.21.0 - version: 8.21.0(eslint@9.18.0)(typescript@5.7.3) + version: 8.21.0(eslint@9.19.0)(typescript@5.7.3) '@vercel/nft': specifier: 0.29.0 version: 0.29.0(rollup@4.24.4) @@ -377,26 +377,26 @@ importers: specifier: 0.37.117 version: 0.37.117 eslint: - specifier: 9.18.0 - version: 9.18.0 + specifier: 9.19.0 + version: 9.19.0 eslint-config-prettier: specifier: 10.0.1 - version: 10.0.1(eslint@9.18.0) + version: 10.0.1(eslint@9.19.0) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.18.0) + version: 8.1.0(eslint@9.19.0) eslint-plugin-n: specifier: 17.15.1 - version: 17.15.1(eslint@9.18.0) + version: 17.15.1(eslint@9.19.0) eslint-plugin-prettier: specifier: 5.2.3 - version: 5.2.3(@types/eslint@9.6.1)(eslint-config-prettier@10.0.1(eslint@9.18.0))(eslint@9.18.0)(prettier@3.4.2) + version: 5.2.3(@types/eslint@9.6.1)(eslint-config-prettier@10.0.1(eslint@9.19.0))(eslint@9.19.0)(prettier@3.4.2) eslint-plugin-unicorn: specifier: 56.0.1 - version: 56.0.1(eslint@9.18.0) + version: 56.0.1(eslint@9.19.0) eslint-plugin-yml: specifier: 1.16.0 - version: 1.16.0(eslint@9.18.0) + version: 1.16.0(eslint@9.19.0) fs-extra: specifier: 11.3.0 version: 11.3.0 @@ -1383,8 +1383,8 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.19.0': - resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} + '@eslint/config-array@0.19.1': + resolution: {integrity: sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/core@0.10.0': @@ -1403,16 +1403,12 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.18.0': - resolution: {integrity: sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.19.0': resolution: {integrity: sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + '@eslint/object-schema@2.1.5': + resolution: {integrity: sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/plugin-kit@0.2.5': @@ -3115,8 +3111,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.18.0: - resolution: {integrity: sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA==} + eslint@9.19.0: + resolution: {integrity: sha512-ug92j0LepKlbbEv6hD911THhoRHmbdXt2gX+VDABAW/Ir7D3nqKdv5Pf5vtlyY6HQMTEP2skXY43ueqTCWssEA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -3283,8 +3279,8 @@ packages: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} - flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} fn.name@1.1.0: resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} @@ -6819,16 +6815,16 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.1(eslint@9.18.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.19.0)': dependencies: - eslint: 9.18.0 + eslint: 9.19.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.19.0': + '@eslint/config-array@0.19.1': dependencies: - '@eslint/object-schema': 2.1.4 + '@eslint/object-schema': 2.1.5 debug: 4.4.0 minimatch: 3.1.2 transitivePeerDependencies: @@ -6868,11 +6864,9 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.18.0': {} - '@eslint/js@9.19.0': {} - '@eslint/object-schema@2.1.4': {} + '@eslint/object-schema@2.1.5': {} '@eslint/plugin-kit@0.2.5': dependencies: @@ -7377,10 +7371,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.13.0(eslint@9.18.0)(typescript@5.7.3)': + '@stylistic/eslint-plugin@2.13.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/utils': 8.19.1(eslint@9.18.0)(typescript@5.7.3) - eslint: 9.18.0 + '@typescript-eslint/utils': 8.19.1(eslint@9.19.0)(typescript@5.7.3) + eslint: 9.19.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -7549,15 +7543,15 @@ snapshots: '@types/node': 22.10.10 optional: true - '@typescript-eslint/eslint-plugin@8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3))(eslint@9.18.0)(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.21.0(eslint@9.18.0)(typescript@5.7.3) + '@typescript-eslint/parser': 8.21.0(eslint@9.19.0)(typescript@5.7.3) '@typescript-eslint/scope-manager': 8.21.0 - '@typescript-eslint/type-utils': 8.21.0(eslint@9.18.0)(typescript@5.7.3) - '@typescript-eslint/utils': 8.21.0(eslint@9.18.0)(typescript@5.7.3) + '@typescript-eslint/type-utils': 8.21.0(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.21.0(eslint@9.19.0)(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.21.0 - eslint: 9.18.0 + eslint: 9.19.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -7566,14 +7560,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.21.0(eslint@9.18.0)(typescript@5.7.3)': + '@typescript-eslint/parser@8.21.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@typescript-eslint/scope-manager': 8.21.0 '@typescript-eslint/types': 8.21.0 '@typescript-eslint/typescript-estree': 8.21.0(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.21.0 debug: 4.4.0 - eslint: 9.18.0 + eslint: 9.19.0 typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -7588,12 +7582,12 @@ snapshots: '@typescript-eslint/types': 8.21.0 '@typescript-eslint/visitor-keys': 8.21.0 - '@typescript-eslint/type-utils@8.21.0(eslint@9.18.0)(typescript@5.7.3)': + '@typescript-eslint/type-utils@8.21.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@typescript-eslint/typescript-estree': 8.21.0(typescript@5.7.3) - '@typescript-eslint/utils': 8.21.0(eslint@9.18.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.21.0(eslint@9.19.0)(typescript@5.7.3) debug: 4.4.0 - eslint: 9.18.0 + eslint: 9.19.0 ts-api-utils: 2.0.0(typescript@5.7.3) typescript: 5.7.3 transitivePeerDependencies: @@ -7631,24 +7625,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.19.1(eslint@9.18.0)(typescript@5.7.3)': + '@typescript-eslint/utils@8.19.1(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) '@typescript-eslint/scope-manager': 8.19.1 '@typescript-eslint/types': 8.19.1 '@typescript-eslint/typescript-estree': 8.19.1(typescript@5.7.3) - eslint: 9.18.0 + eslint: 9.19.0 typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.21.0(eslint@9.18.0)(typescript@5.7.3)': + '@typescript-eslint/utils@8.21.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) '@typescript-eslint/scope-manager': 8.21.0 '@typescript-eslint/types': 8.21.0 '@typescript-eslint/typescript-estree': 8.21.0(typescript@5.7.3) - eslint: 9.18.0 + eslint: 9.19.0 typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -8621,23 +8615,23 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.18.0): + eslint-compat-utils@0.5.1(eslint@9.19.0): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 semver: 7.6.3 - eslint-compat-utils@0.6.4(eslint@9.18.0): + eslint-compat-utils@0.6.4(eslint@9.19.0): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 semver: 7.6.3 - eslint-config-prettier@10.0.1(eslint@9.18.0): + eslint-config-prettier@10.0.1(eslint@9.19.0): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 - eslint-filtered-fix@0.3.0(eslint@9.18.0): + eslint-filtered-fix@0.3.0(eslint@9.19.0): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -8648,54 +8642,54 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.18.0): + eslint-nibble@8.1.0(eslint@9.19.0): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.18.0 - eslint-filtered-fix: 0.3.0(eslint@9.18.0) + eslint: 9.19.0 + eslint-filtered-fix: 0.3.0(eslint@9.19.0) eslint-formatter-friendly: 7.0.0 eslint-summary: 1.0.0 inquirer: 8.2.6 optionator: 0.9.4 - eslint-plugin-es-x@7.8.0(eslint@9.18.0): + eslint-plugin-es-x@7.8.0(eslint@9.19.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) '@eslint-community/regexpp': 4.12.1 - eslint: 9.18.0 - eslint-compat-utils: 0.5.1(eslint@9.18.0) + eslint: 9.19.0 + eslint-compat-utils: 0.5.1(eslint@9.19.0) - eslint-plugin-n@17.15.1(eslint@9.18.0): + eslint-plugin-n@17.15.1(eslint@9.19.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) enhanced-resolve: 5.17.1 - eslint: 9.18.0 - eslint-plugin-es-x: 7.8.0(eslint@9.18.0) + eslint: 9.19.0 + eslint-plugin-es-x: 7.8.0(eslint@9.19.0) get-tsconfig: 4.8.1 globals: 15.14.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.3(@types/eslint@9.6.1)(eslint-config-prettier@10.0.1(eslint@9.18.0))(eslint@9.18.0)(prettier@3.4.2): + eslint-plugin-prettier@5.2.3(@types/eslint@9.6.1)(eslint-config-prettier@10.0.1(eslint@9.19.0))(eslint@9.19.0)(prettier@3.4.2): dependencies: - eslint: 9.18.0 + eslint: 9.19.0 prettier: 3.4.2 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 10.0.1(eslint@9.18.0) + eslint-config-prettier: 10.0.1(eslint@9.19.0) - eslint-plugin-unicorn@56.0.1(eslint@9.18.0): + eslint-plugin-unicorn@56.0.1(eslint@9.19.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.39.0 - eslint: 9.18.0 + eslint: 9.19.0 esquery: 1.6.0 globals: 15.14.0 indent-string: 4.0.0 @@ -8708,11 +8702,11 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-yml@1.16.0(eslint@9.18.0): + eslint-plugin-yml@1.16.0(eslint@9.19.0): dependencies: debug: 4.3.7 - eslint: 9.18.0 - eslint-compat-utils: 0.6.4(eslint@9.18.0) + eslint: 9.19.0 + eslint-compat-utils: 0.6.4(eslint@9.19.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.3 @@ -8781,14 +8775,14 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.18.0: + eslint@9.19.0: dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.19.0 + '@eslint/config-array': 0.19.1 '@eslint/core': 0.10.0 '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.18.0 + '@eslint/js': 9.19.0 '@eslint/plugin-kit': 0.2.5 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 @@ -8983,16 +8977,16 @@ snapshots: flat-cache@3.2.0: dependencies: - flatted: 3.3.1 + flatted: 3.3.2 keyv: 4.5.4 rimraf: 3.0.2 flat-cache@4.0.1: dependencies: - flatted: 3.3.1 + flatted: 3.3.2 keyv: 4.5.4 - flatted@3.3.1: {} + flatted@3.3.2: {} fn.name@1.1.0: {} From f56c2b10fd4ced0561914a40de90723cae58c77a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 17:45:36 +0800 Subject: [PATCH 0011/2658] chore(deps): bump hono from 4.6.18 to 4.6.19 (#18223) Bumps [hono](https://github.com/honojs/hono) from 4.6.18 to 4.6.19. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.18...v4.6.19) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index d0cbc6d76317..b9b057c71e1d 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "fanfou-sdk": "5.0.0", "form-data": "4.0.1", "googleapis": "144.0.0", - "hono": "4.6.18", + "hono": "4.6.19", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.8", "https-proxy-agent": "7.0.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 19424f05bafb..c869aad8788a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,10 +23,10 @@ importers: version: 4.2.0 '@hono/node-server': specifier: 1.13.7 - version: 1.13.7(hono@4.6.18) + version: 1.13.7(hono@4.6.19) '@hono/zod-openapi': specifier: 0.18.3 - version: 0.18.3(hono@4.6.18)(zod@3.24.1) + version: 0.18.3(hono@4.6.19)(zod@3.24.1) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -59,7 +59,7 @@ importers: version: 0.0.25 '@scalar/hono-api-reference': specifier: 0.5.168 - version: 0.5.168(hono@4.6.18) + version: 0.5.168(hono@4.6.19) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -118,8 +118,8 @@ importers: specifier: 144.0.0 version: 144.0.0 hono: - specifier: 4.6.18 - version: 4.6.18 + specifier: 4.6.19 + version: 4.6.19 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3496,8 +3496,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.18: - resolution: {integrity: sha512-Fu7hEPvdwtPG8LqSAiPn8p8HjD+PDxrP/HVnwRBnwtVKOn5zDDKsw0ma2Xt58oq97Rlp3t/mRNADEV/Ym6cDng==} + hono@4.6.19: + resolution: {integrity: sha512-Xw5DwU2cewEsQ1DkDCdy6aBJkEBARl5loovoL1gL3/gw81RdaPbXrNJYp3LoQpzpJ7ECC/1OFi/vn3UZTLHFEw==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6873,20 +6873,20 @@ snapshots: '@eslint/core': 0.10.0 levn: 0.4.1 - '@hono/node-server@1.13.7(hono@4.6.18)': + '@hono/node-server@1.13.7(hono@4.6.19)': dependencies: - hono: 4.6.18 + hono: 4.6.19 - '@hono/zod-openapi@0.18.3(hono@4.6.18)(zod@3.24.1)': + '@hono/zod-openapi@0.18.3(hono@4.6.19)(zod@3.24.1)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.24.1) - '@hono/zod-validator': 0.4.1(hono@4.6.18)(zod@3.24.1) - hono: 4.6.18 + '@hono/zod-validator': 0.4.1(hono@4.6.19)(zod@3.24.1) + hono: 4.6.19 zod: 3.24.1 - '@hono/zod-validator@0.4.1(hono@4.6.18)(zod@3.24.1)': + '@hono/zod-validator@0.4.1(hono@4.6.19)(zod@3.24.1)': dependencies: - hono: 4.6.18 + hono: 4.6.19 zod: 3.24.1 '@humanfs/core@0.19.1': {} @@ -7316,10 +7316,10 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/hono-api-reference@0.5.168(hono@4.6.18)': + '@scalar/hono-api-reference@0.5.168(hono@4.6.19)': dependencies: '@scalar/types': 0.0.27 - hono: 4.6.18 + hono: 4.6.19 '@scalar/openapi-types@0.1.6': {} @@ -9243,7 +9243,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.18: {} + hono@4.6.19: {} hookable@5.5.3: {} From c5d86504e9329a3e282a4feabfc3ac166f825f21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 18:11:34 +0800 Subject: [PATCH 0012/2658] chore(deps-dev): bump @stylistic/eslint-plugin from 2.13.0 to 3.0.0 (#18226) Bumps [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) from 2.13.0 to 3.0.0. - [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases) - [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v3.0.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@stylistic/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 81 +++++++++++++++++++++++++++++--------------------- 2 files changed, 48 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index b9b057c71e1d..501b1bb11417 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "@eslint/eslintrc": "3.2.0", "@eslint/js": "9.19.0", "@microsoft/eslint-formatter-sarif": "3.1.0", - "@stylistic/eslint-plugin": "2.13.0", + "@stylistic/eslint-plugin": "3.0.0", "@types/aes-js": "3.1.4", "@types/babel__preset-env": "7.10.0", "@types/crypto-js": "4.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c869aad8788a..9a099142c807 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -293,8 +293,8 @@ importers: specifier: 3.1.0 version: 3.1.0 '@stylistic/eslint-plugin': - specifier: 2.13.0 - version: 2.13.0(eslint@9.19.0)(typescript@5.7.3) + specifier: 3.0.0 + version: 3.0.0(eslint@9.19.0)(typescript@5.7.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -1895,8 +1895,8 @@ packages: resolution: {integrity: sha512-QWLl2P+rsCJeofkDNIT3WFmb6NrRud1SUYW8dIhXK/46XFV8Q/g7Bsvib0Askb0reRLe+WYPeeE+l5cH7SlkuQ==} engines: {node: '>=18'} - '@stylistic/eslint-plugin@2.13.0': - resolution: {integrity: sha512-RnO1SaiCFHn666wNz2QfZEFxvmiNRqhzaMXHXxXXKt+MEP7aajlPxUSMIQpKAaJfverpovEYqjBOXDq6dDcaOQ==} + '@stylistic/eslint-plugin@3.0.0': + resolution: {integrity: sha512-9GJI6iBtGjOqSsyCKUvE6Vn7qDT52hbQaoq/SwxH6A1bciymZfvBfHIIrD3E7Koi2sjzOa/MNQ2XOguHtVJOyw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' @@ -2074,8 +2074,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/scope-manager@8.19.1': - resolution: {integrity: sha512-60L9KIuN/xgmsINzonOcMDSB8p82h95hoBfSBtXuO4jlR1R9L1xSkmVZKgCPVfavDlXihh4ARNjXhh1gGnLC7Q==} + '@typescript-eslint/scope-manager@8.13.0': + resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/scope-manager@8.21.0': @@ -2089,19 +2089,22 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/types@8.19.1': - resolution: {integrity: sha512-JBVHMLj7B1K1v1051ZaMMgLW4Q/jre5qGK0Ew6UgXz1Rqh+/xPzV1aW581OM00X6iOfyr1be+QyW8LOUf19BbA==} + '@typescript-eslint/types@8.13.0': + resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/types@8.21.0': resolution: {integrity: sha512-PAL6LUuQwotLW2a8VsySDBwYMm129vFm4tMVlylzdoTybTHaAi0oBp7Ac6LhSrHHOdLM3efH+nAR6hAWoMF89A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.19.1': - resolution: {integrity: sha512-jk/TZwSMJlxlNnqhy0Eod1PNEvCkpY6MXOXE/WLlblZ6ibb32i2We4uByoKPv1d0OD2xebDv4hbs3fm11SMw8Q==} + '@typescript-eslint/typescript-estree@8.13.0': + resolution: {integrity: sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <5.8.0' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true '@typescript-eslint/typescript-estree@8.21.0': resolution: {integrity: sha512-x+aeKh/AjAArSauz0GiQZsjT8ciadNMHdkUSwBB9Z6PrKc/4knM4g3UfHml6oDJmKC88a6//cdxnO/+P2LkMcg==} @@ -2109,12 +2112,11 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/utils@8.19.1': - resolution: {integrity: sha512-IxG5gLO0Ne+KaUc8iW1A+XuKLd63o4wlbI1Zp692n1xojCl/THvgIKXJXBZixTh5dd5+yTJ/VXH7GJaaw21qXA==} + '@typescript-eslint/utils@8.13.0': + resolution: {integrity: sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/utils@8.21.0': resolution: {integrity: sha512-xcXBfcq0Kaxgj7dwejMbFyq7IOHgpNMtVuDveK7w3ZGwG9owKzhALVwKpTF2yrZmEwl9SWdetf3fxNzJQaVuxw==} @@ -2123,8 +2125,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/visitor-keys@8.19.1': - resolution: {integrity: sha512-fzmjU8CHK853V/avYZAvuVut3ZTfwN5YtMaoi+X9Y9MA9keaWNHC3zEQ9zvyX/7Hj+5JkNyK1l7TOR2hevHB6Q==} + '@typescript-eslint/visitor-keys@8.13.0': + resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/visitor-keys@8.21.0': @@ -5342,6 +5344,12 @@ packages: trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} + ts-api-utils@1.4.3: + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + ts-api-utils@2.0.0: resolution: {integrity: sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==} engines: {node: '>=18.12'} @@ -7371,9 +7379,9 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.13.0(eslint@9.19.0)(typescript@5.7.3)': + '@stylistic/eslint-plugin@3.0.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/utils': 8.19.1(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.13.0(eslint@9.19.0)(typescript@5.7.3) eslint: 9.19.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 @@ -7572,10 +7580,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.19.1': + '@typescript-eslint/scope-manager@8.13.0': dependencies: - '@typescript-eslint/types': 8.19.1 - '@typescript-eslint/visitor-keys': 8.19.1 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/visitor-keys': 8.13.0 '@typescript-eslint/scope-manager@8.21.0': dependencies: @@ -7593,20 +7601,21 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.19.1': {} + '@typescript-eslint/types@8.13.0': {} '@typescript-eslint/types@8.21.0': {} - '@typescript-eslint/typescript-estree@8.19.1(typescript@5.7.3)': + '@typescript-eslint/typescript-estree@8.13.0(typescript@5.7.3)': dependencies: - '@typescript-eslint/types': 8.19.1 - '@typescript-eslint/visitor-keys': 8.19.1 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/visitor-keys': 8.13.0 debug: 4.4.0 fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 2.0.0(typescript@5.7.3) + ts-api-utils: 1.4.3(typescript@5.7.3) + optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -7625,16 +7634,16 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.19.1(eslint@9.19.0)(typescript@5.7.3)': + '@typescript-eslint/utils@8.13.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) - '@typescript-eslint/scope-manager': 8.19.1 - '@typescript-eslint/types': 8.19.1 - '@typescript-eslint/typescript-estree': 8.19.1(typescript@5.7.3) + '@typescript-eslint/scope-manager': 8.13.0 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.7.3) eslint: 9.19.0 - typescript: 5.7.3 transitivePeerDependencies: - supports-color + - typescript '@typescript-eslint/utils@8.21.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: @@ -7647,10 +7656,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.19.1': + '@typescript-eslint/visitor-keys@8.13.0': dependencies: - '@typescript-eslint/types': 8.19.1 - eslint-visitor-keys: 4.2.0 + '@typescript-eslint/types': 8.13.0 + eslint-visitor-keys: 3.4.3 '@typescript-eslint/visitor-keys@8.21.0': dependencies: @@ -11279,6 +11288,10 @@ snapshots: trough@2.2.0: {} + ts-api-utils@1.4.3(typescript@5.7.3): + dependencies: + typescript: 5.7.3 + ts-api-utils@2.0.0(typescript@5.7.3): dependencies: typescript: 5.7.3 From b4bc35a45e3a3859b5d662413f2a72df03d7f467 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Tue, 28 Jan 2025 02:23:51 +0800 Subject: [PATCH 0013/2658] =?UTF-8?q?feat(routes):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AF=B9=E6=A0=87=E7=AD=BE=E5=85=B3=E6=B3=A8=E7=9A=84=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=80=BB=E8=BE=91=20(#18231)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/juejin/dynamic.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/routes/juejin/dynamic.ts b/lib/routes/juejin/dynamic.ts index 8f997ac99b51..d37bebcc8b4d 100644 --- a/lib/routes/juejin/dynamic.ts +++ b/lib/routes/juejin/dynamic.ts @@ -40,7 +40,7 @@ async function handler(ctx) { const username = user.user_name; const items = list.map((e) => { - const { target_type, target_data, action, time } = e; // action: 0.发布文章;1.点赞文章;2.发布沸点;3.点赞沸点;4.关注用户 + const { target_type, target_data, action, time } = e; // action: 0.发布文章;1.点赞文章;2.发布沸点;3.点赞沸点;4.关注用户;5.关注标签 let title: string | undefined; let description: string | undefined; let pubDate: Date | undefined; @@ -90,6 +90,16 @@ async function handler(ctx) { pubDate = parseDate(time * 1000); break; } + case 'tag': { + // 关注标签 + const { tag_name } = target_data; + title = `${username} 关注了标签 ${tag_name}`; + description = tag_name; + category = [tag_name]; + link = `https://juejin.cn/tag/${encodeURIComponent(tag_name)}`; + pubDate = parseDate(time * 1000); + break; + } default: break; } From 3fbf48b99bdcef66243696a2ed356c185f78480f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 08:27:21 +0000 Subject: [PATCH 0014/2658] chore(deps-dev): bump @vercel/nft from 0.29.0 to 0.29.1 (#18232) Bumps [@vercel/nft](https://github.com/vercel/nft) from 0.29.0 to 0.29.1. - [Release notes](https://github.com/vercel/nft/releases) - [Commits](https://github.com/vercel/nft/compare/0.29.0...0.29.1) --- updated-dependencies: - dependency-name: "@vercel/nft" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 62 +++++++++++++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 501b1bb11417..30b6028f3b81 100644 --- a/package.json +++ b/package.json @@ -169,7 +169,7 @@ "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.21.0", "@typescript-eslint/parser": "8.21.0", - "@vercel/nft": "0.29.0", + "@vercel/nft": "0.29.1", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.117", "eslint": "9.19.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9a099142c807..6d3cce618afe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -368,8 +368,8 @@ importers: specifier: 8.21.0 version: 8.21.0(eslint@9.19.0)(typescript@5.7.3) '@vercel/nft': - specifier: 0.29.0 - version: 0.29.0(rollup@4.24.4) + specifier: 0.29.1 + version: 0.29.1(rollup@4.24.4) '@vitest/coverage-v8': specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.10.10)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))) @@ -1527,8 +1527,8 @@ packages: '@lifeomic/attempt@3.1.0': resolution: {integrity: sha512-QZqem4QuAnAyzfz+Gj5/+SLxqwCAw2qmt7732ZXodr6VDWGeYLG6w1i/vYLa55JQM9wRuBKLmXmiZ2P0LtE5rw==} - '@mapbox/node-pre-gyp@2.0.0-rc.0': - resolution: {integrity: sha512-nhSMNprz3WmeRvd8iUs5JqkKr0Ncx46JtPxM3AhXes84XpSJfmIwKeWXRpsr53S7kqPkQfPhzrMFUxSNb23qSA==} + '@mapbox/node-pre-gyp@2.0.0': + resolution: {integrity: sha512-llMXd39jtP0HpQLVI37Bf1m2ADlEb35GYSh1SDSLsBhR+5iCxiNGlT31yqbNtVHygHAtMy6dWFERpU2JgufhPg==} engines: {node: '>=18'} hasBin: true @@ -1735,8 +1735,8 @@ packages: engines: {node: '>=18'} hasBin: true - '@rollup/pluginutils@5.1.3': - resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} + '@rollup/pluginutils@5.1.4': + resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -2139,8 +2139,8 @@ packages: '@unhead/schema@1.11.18': resolution: {integrity: sha512-a3TA/OJCRdfbFhcA3Hq24k1ZU1o9szicESrw8DZcGyQFacHnh84mVgnyqSkMnwgCmfN4kvjSiTBlLEHS6+wATw==} - '@vercel/nft@0.29.0': - resolution: {integrity: sha512-LAkWyznNySxZ57ibqEGKnWFPqiRxyLvewFyB9iCHFfMsZlVyiu8MNFbjrGk3eV0vuyim5HzBloqlvSrG4BpZ7g==} + '@vercel/nft@0.29.1': + resolution: {integrity: sha512-6239JJM1V9b3OjvZIjbe+47/hGxMr44FEzlbTErrqzebCaoKAHK+yvahn3gdNacybDUbTxVF8Zuh0vqaeM8aKQ==} engines: {node: '>=18'} hasBin: true @@ -2174,6 +2174,10 @@ packages: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + abbrev@3.0.0: + resolution: {integrity: sha512-+/kfrslGQ7TNV2ecmQwMJj/B65g5KVq1/L3SGVZ3tCYGqlzFuFCGBZJtMP99wH3NpEUyAjn0zPdPUg0D+DwrOA==} + engines: {node: ^18.17.0 || >=20.5.0} + acorn-import-attributes@1.9.5: resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} peerDependencies: @@ -2631,8 +2635,8 @@ packages: config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} - consola@3.2.3: - resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + consola@3.4.0: + resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==} engines: {node: ^14.18.0 || >=16.10.0} convert-source-map@2.0.0: @@ -4344,8 +4348,8 @@ packages: encoding: optional: true - node-gyp-build@4.8.2: - resolution: {integrity: sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==} + node-gyp-build@4.8.4: + resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} hasBin: true node-localstorage@2.2.1: @@ -4376,8 +4380,8 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true - nopt@8.0.0: - resolution: {integrity: sha512-1L/fTJ4UmV/lUxT2Uf006pfZKTvAgCF+chz+0OgBHO8u2Z67pE7AaAUUj7CJy0lXqHmymUvGFt6NE9R3HER0yw==} + nopt@8.1.0: + resolution: {integrity: sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==} engines: {node: ^18.17.0 || >=20.5.0} hasBin: true @@ -6997,13 +7001,13 @@ snapshots: '@lifeomic/attempt@3.1.0': {} - '@mapbox/node-pre-gyp@2.0.0-rc.0': + '@mapbox/node-pre-gyp@2.0.0': dependencies: - consola: 3.2.3 + consola: 3.4.0 detect-libc: 2.0.3 https-proxy-agent: 7.0.6 node-fetch: 2.7.0 - nopt: 8.0.0 + nopt: 8.1.0 semver: 7.6.3 tar: 7.4.3 transitivePeerDependencies: @@ -7247,7 +7251,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@rollup/pluginutils@5.1.3(rollup@4.24.4)': + '@rollup/pluginutils@5.1.4(rollup@4.24.4)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 @@ -7673,10 +7677,10 @@ snapshots: hookable: 5.5.3 zhead: 2.2.4 - '@vercel/nft@0.29.0(rollup@4.24.4)': + '@vercel/nft@0.29.1(rollup@4.24.4)': dependencies: - '@mapbox/node-pre-gyp': 2.0.0-rc.0 - '@rollup/pluginutils': 5.1.3(rollup@4.24.4) + '@mapbox/node-pre-gyp': 2.0.0 + '@rollup/pluginutils': 5.1.4(rollup@4.24.4) acorn: 8.14.0 acorn-import-attributes: 1.9.5(acorn@8.14.0) async-sema: 3.1.1 @@ -7684,7 +7688,7 @@ snapshots: estree-walker: 2.0.2 glob: 7.2.3 graceful-fs: 4.2.11 - node-gyp-build: 4.8.2 + node-gyp-build: 4.8.4 picomatch: 4.0.2 resolve-from: 5.0.0 transitivePeerDependencies: @@ -7749,6 +7753,8 @@ snapshots: abbrev@2.0.0: {} + abbrev@3.0.0: {} + acorn-import-attributes@1.9.5(acorn@8.14.0): dependencies: acorn: 8.14.0 @@ -7975,7 +7981,7 @@ snapshots: bufferutil@4.0.8: dependencies: - node-gyp-build: 4.8.2 + node-gyp-build: 4.8.4 builtin-modules@3.3.0: {} @@ -8230,7 +8236,7 @@ snapshots: ini: 1.3.8 proto-list: 1.2.4 - consola@3.2.3: {} + consola@3.4.0: {} convert-source-map@2.0.0: {} @@ -10197,7 +10203,7 @@ snapshots: dependencies: whatwg-url: 5.0.0 - node-gyp-build@4.8.2: {} + node-gyp-build@4.8.4: {} node-localstorage@2.2.1: dependencies: @@ -10225,9 +10231,9 @@ snapshots: dependencies: abbrev: 2.0.0 - nopt@8.0.0: + nopt@8.1.0: dependencies: - abbrev: 2.0.0 + abbrev: 3.0.0 normalize-package-data@2.5.0: dependencies: @@ -11440,7 +11446,7 @@ snapshots: utf-8-validate@5.0.10: dependencies: - node-gyp-build: 4.8.2 + node-gyp-build: 4.8.4 utf8@3.0.0: {} From 744cb08a51c1618e5bc9e2df51111a600c26639b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 08:27:28 +0000 Subject: [PATCH 0015/2658] chore(deps): bump @scalar/hono-api-reference from 0.5.168 to 0.5.169 (#18233) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.5.168 to 0.5.169. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 30b6028f3b81..19c7f379f198 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.28.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.5.168", + "@scalar/hono-api-reference": "0.5.169", "@sentry/node": "7.119.1", "@tonyrl/rand-user-agent": "2.0.81", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d3cce618afe..b933c58b0148 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,8 +58,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.5.168 - version: 0.5.168(hono@4.6.19) + specifier: 0.5.169 + version: 0.5.169(hono@4.6.19) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1843,8 +1843,8 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/hono-api-reference@0.5.168': - resolution: {integrity: sha512-kNtmHki6vaNbCpCo3eJQT+UOz+8MG/9l4XqnD9LAmPahBsKrmVvnwzpRYCovHvT8gf2bIHqFdhJUAz5sxF/MNA==} + '@scalar/hono-api-reference@0.5.169': + resolution: {integrity: sha512-K6mGd1mxKXh5/jqxo0yHIOFi4N5jjQj8PL2TAJMhcUZ39qwSZ7/V7SGMBBpGtWNsGofac0bZ7q/7yoTsY3/RYg==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1853,8 +1853,8 @@ packages: resolution: {integrity: sha512-V+KnESyVJqorJzEN0QFlu3tAImCHjnvPov6QcQvjfY7s0+CjrI3rRO3oVIRlXURTQrQGrnhxvK0SkXGAZ+dxvw==} engines: {node: '>=18'} - '@scalar/types@0.0.27': - resolution: {integrity: sha512-5f293PX78gwE3NwcBNXf7+qc9OIB6lYsRpzGZts7eaN3aN9i23ysWewF76DOs74oARRP5LgNBMC7JCo9dIxM1Q==} + '@scalar/types@0.0.28': + resolution: {integrity: sha512-NRGWtxWE/YfpAiNKh/XCV5o9CaYlg8etwelux1q7VRAbZqbpti5c14a5/t2mCiFSrfoyh4ghAHuYC9n3uwnuXQ==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7328,14 +7328,14 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/hono-api-reference@0.5.168(hono@4.6.19)': + '@scalar/hono-api-reference@0.5.169(hono@4.6.19)': dependencies: - '@scalar/types': 0.0.27 + '@scalar/types': 0.0.28 hono: 4.6.19 '@scalar/openapi-types@0.1.6': {} - '@scalar/types@0.0.27': + '@scalar/types@0.0.28': dependencies: '@scalar/openapi-types': 0.1.6 '@unhead/schema': 1.11.18 From 29bf05199656c61dfcfab84a66c5aec445639b5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 08:28:00 +0000 Subject: [PATCH 0016/2658] chore(deps-dev): bump discord-api-types from 0.37.117 to 0.37.118 (#18236) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.117 to 0.37.118. - [Release notes](https://github.com/discordjs/discord-api-types/releases) - [Changelog](https://github.com/discordjs/discord-api-types/blob/main/CHANGELOG.md) - [Commits](https://github.com/discordjs/discord-api-types/compare/0.37.117...0.37.118) --- updated-dependencies: - dependency-name: discord-api-types dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 19c7f379f198..c03a83ca4e78 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "@typescript-eslint/parser": "8.21.0", "@vercel/nft": "0.29.1", "@vitest/coverage-v8": "2.0.5", - "discord-api-types": "0.37.117", + "discord-api-types": "0.37.118", "eslint": "9.19.0", "eslint-config-prettier": "10.0.1", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b933c58b0148..9a750de0887a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -374,8 +374,8 @@ importers: specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.10.10)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: - specifier: 0.37.117 - version: 0.37.117 + specifier: 0.37.118 + version: 0.37.118 eslint: specifier: 9.19.0 version: 9.19.0 @@ -2848,8 +2848,8 @@ packages: resolution: {integrity: sha512-dSApZXgx29qO/6AVigdsoC6HSvaHWinJ4HTRPKrlMAxX71FgPzn/WEWbgM+aB1PlKD9IfSC3Ir2ouYYQR1uy+g==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.117: - resolution: {integrity: sha512-d+Z6RKd7v3q22lsil7yASucqMfVVV0s0XSqu3cw7kyHVXiDO/mAnqMzqma26IYnIm2mk3TlupYJDGrdL908ZKA==} + discord-api-types@0.37.118: + resolution: {integrity: sha512-MQkHHZcytmNQ3nQOBj6a0z38swsmHiROX7hdayfd0eWVrLxaQp/6tWBZ7FO2MCKKsc+W3QWnnfOJTbtyk8C4TQ==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8407,7 +8407,7 @@ snapshots: directory-import@3.3.2: {} - discord-api-types@0.37.117: {} + discord-api-types@0.37.118: {} doctrine@3.0.0: dependencies: From 94f60ebe452fd94db434d5f1ad5cc8bb645577e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 23:13:31 +0800 Subject: [PATCH 0017/2658] chore(deps-dev): bump @typescript-eslint/parser from 8.21.0 to 8.22.0 (#18235) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.21.0 to 8.22.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.22.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 68 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 57 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index c03a83ca4e78..85b5261db955 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,7 @@ "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.21.0", - "@typescript-eslint/parser": "8.21.0", + "@typescript-eslint/parser": "8.22.0", "@vercel/nft": "0.29.1", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.118", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9a750de0887a..5e7f4427da95 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -363,10 +363,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.21.0 - version: 8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3) + version: 8.21.0(@typescript-eslint/parser@8.22.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3) '@typescript-eslint/parser': - specifier: 8.21.0 - version: 8.21.0(eslint@9.19.0)(typescript@5.7.3) + specifier: 8.22.0 + version: 8.22.0(eslint@9.19.0)(typescript@5.7.3) '@vercel/nft': specifier: 0.29.1 version: 0.29.1(rollup@4.24.4) @@ -2067,8 +2067,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/parser@8.21.0': - resolution: {integrity: sha512-Wy+/sdEH9kI3w9civgACwabHbKl+qIOu0uFZ9IMKzX3Jpv9og0ZBJrZExGrPpFAY7rWsXuxs5e7CPPP17A4eYA==} + '@typescript-eslint/parser@8.22.0': + resolution: {integrity: sha512-MqtmbdNEdoNxTPzpWiWnqNac54h8JDAmkWtJExBVVnSrSmi9z+sZUt0LfKqk9rjqmKOIeRhO4fHHJ1nQIjduIQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2082,6 +2082,10 @@ packages: resolution: {integrity: sha512-G3IBKz0/0IPfdeGRMbp+4rbjfSSdnGkXsM/pFZA8zM9t9klXDnB/YnKOBQ0GoPmoROa4bCq2NeHgJa5ydsQ4mA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.22.0': + resolution: {integrity: sha512-/lwVV0UYgkj7wPSw0o8URy6YI64QmcOdwHuGuxWIYznO6d45ER0wXUbksr9pYdViAofpUCNJx/tAzNukgvaaiQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.21.0': resolution: {integrity: sha512-95OsL6J2BtzoBxHicoXHxgk3z+9P3BEcQTpBKriqiYzLKnM2DeSqs+sndMKdamU8FosiadQFT3D+BSL9EKnAJQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2097,6 +2101,10 @@ packages: resolution: {integrity: sha512-PAL6LUuQwotLW2a8VsySDBwYMm129vFm4tMVlylzdoTybTHaAi0oBp7Ac6LhSrHHOdLM3efH+nAR6hAWoMF89A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.22.0': + resolution: {integrity: sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.13.0': resolution: {integrity: sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2112,6 +2120,12 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.8.0' + '@typescript-eslint/typescript-estree@8.22.0': + resolution: {integrity: sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.8.0' + '@typescript-eslint/utils@8.13.0': resolution: {integrity: sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2133,6 +2147,10 @@ packages: resolution: {integrity: sha512-BkLMNpdV6prozk8LlyK/SOoWLmUFi+ZD+pcqti9ILCbVvHGk1ui1g4jJOc2WDLaeExz2qWwojxlPce5PljcT3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.22.0': + resolution: {integrity: sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -7555,10 +7573,10 @@ snapshots: '@types/node': 22.10.10 optional: true - '@typescript-eslint/eslint-plugin@8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.21.0(@typescript-eslint/parser@8.22.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.21.0(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/parser': 8.22.0(eslint@9.19.0)(typescript@5.7.3) '@typescript-eslint/scope-manager': 8.21.0 '@typescript-eslint/type-utils': 8.21.0(eslint@9.19.0)(typescript@5.7.3) '@typescript-eslint/utils': 8.21.0(eslint@9.19.0)(typescript@5.7.3) @@ -7572,12 +7590,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.21.0(eslint@9.19.0)(typescript@5.7.3)': + '@typescript-eslint/parser@8.22.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/scope-manager': 8.21.0 - '@typescript-eslint/types': 8.21.0 - '@typescript-eslint/typescript-estree': 8.21.0(typescript@5.7.3) - '@typescript-eslint/visitor-keys': 8.21.0 + '@typescript-eslint/scope-manager': 8.22.0 + '@typescript-eslint/types': 8.22.0 + '@typescript-eslint/typescript-estree': 8.22.0(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.22.0 debug: 4.4.0 eslint: 9.19.0 typescript: 5.7.3 @@ -7594,6 +7612,11 @@ snapshots: '@typescript-eslint/types': 8.21.0 '@typescript-eslint/visitor-keys': 8.21.0 + '@typescript-eslint/scope-manager@8.22.0': + dependencies: + '@typescript-eslint/types': 8.22.0 + '@typescript-eslint/visitor-keys': 8.22.0 + '@typescript-eslint/type-utils@8.21.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@typescript-eslint/typescript-estree': 8.21.0(typescript@5.7.3) @@ -7609,6 +7632,8 @@ snapshots: '@typescript-eslint/types@8.21.0': {} + '@typescript-eslint/types@8.22.0': {} + '@typescript-eslint/typescript-estree@8.13.0(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 8.13.0 @@ -7638,6 +7663,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.22.0(typescript@5.7.3)': + dependencies: + '@typescript-eslint/types': 8.22.0 + '@typescript-eslint/visitor-keys': 8.22.0 + debug: 4.4.0 + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 2.0.0(typescript@5.7.3) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.13.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) @@ -7670,6 +7709,11 @@ snapshots: '@typescript-eslint/types': 8.21.0 eslint-visitor-keys: 4.2.0 + '@typescript-eslint/visitor-keys@8.22.0': + dependencies: + '@typescript-eslint/types': 8.22.0 + eslint-visitor-keys: 4.2.0 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.18': From b8f0d9da070b14543632341c732f8b84a4d4c64b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 00:09:44 +0800 Subject: [PATCH 0018/2658] chore(deps-dev): bump @typescript-eslint/eslint-plugin (#18234) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.21.0 to 8.22.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.22.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 84 ++++++++++++-------------------------------------- 2 files changed, 21 insertions(+), 65 deletions(-) diff --git a/package.json b/package.json index 85b5261db955..cc5bce86d6bb 100644 --- a/package.json +++ b/package.json @@ -167,7 +167,7 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.21.0", + "@typescript-eslint/eslint-plugin": "8.22.0", "@typescript-eslint/parser": "8.22.0", "@vercel/nft": "0.29.1", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5e7f4427da95..9b23590a6b05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -362,8 +362,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.21.0 - version: 8.21.0(@typescript-eslint/parser@8.22.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3) + specifier: 8.22.0 + version: 8.22.0(@typescript-eslint/parser@8.22.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3) '@typescript-eslint/parser': specifier: 8.22.0 version: 8.22.0(eslint@9.19.0)(typescript@5.7.3) @@ -2059,8 +2059,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.21.0': - resolution: {integrity: sha512-eTH+UOR4I7WbdQnG4Z48ebIA6Bgi7WO8HvFEneeYBxG8qCOYgTOFPSg6ek9ITIDvGjDQzWHcoWHCDO2biByNzA==} + '@typescript-eslint/eslint-plugin@8.22.0': + resolution: {integrity: sha512-4Uta6REnz/xEJMvwf72wdUnC3rr4jAQf5jnTkeRQ9b6soxLxhDEbS/pfMPoJLDfFPNVRdryqWUIV/2GZzDJFZw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -2078,16 +2078,12 @@ packages: resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.21.0': - resolution: {integrity: sha512-G3IBKz0/0IPfdeGRMbp+4rbjfSSdnGkXsM/pFZA8zM9t9klXDnB/YnKOBQ0GoPmoROa4bCq2NeHgJa5ydsQ4mA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.22.0': resolution: {integrity: sha512-/lwVV0UYgkj7wPSw0o8URy6YI64QmcOdwHuGuxWIYznO6d45ER0wXUbksr9pYdViAofpUCNJx/tAzNukgvaaiQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.21.0': - resolution: {integrity: sha512-95OsL6J2BtzoBxHicoXHxgk3z+9P3BEcQTpBKriqiYzLKnM2DeSqs+sndMKdamU8FosiadQFT3D+BSL9EKnAJQ==} + '@typescript-eslint/type-utils@8.22.0': + resolution: {integrity: sha512-NzE3aB62fDEaGjaAYZE4LH7I1MUwHooQ98Byq0G0y3kkibPJQIXVUspzlFOmOfHhiDLwKzMlWxaNv+/qcZurJA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2097,10 +2093,6 @@ packages: resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.21.0': - resolution: {integrity: sha512-PAL6LUuQwotLW2a8VsySDBwYMm129vFm4tMVlylzdoTybTHaAi0oBp7Ac6LhSrHHOdLM3efH+nAR6hAWoMF89A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.22.0': resolution: {integrity: sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2114,12 +2106,6 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.21.0': - resolution: {integrity: sha512-x+aeKh/AjAArSauz0GiQZsjT8ciadNMHdkUSwBB9Z6PrKc/4knM4g3UfHml6oDJmKC88a6//cdxnO/+P2LkMcg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/typescript-estree@8.22.0': resolution: {integrity: sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2132,8 +2118,8 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.21.0': - resolution: {integrity: sha512-xcXBfcq0Kaxgj7dwejMbFyq7IOHgpNMtVuDveK7w3ZGwG9owKzhALVwKpTF2yrZmEwl9SWdetf3fxNzJQaVuxw==} + '@typescript-eslint/utils@8.22.0': + resolution: {integrity: sha512-T8oc1MbF8L+Bk2msAvCUzjxVB2Z2f+vXYfcucE2wOmYs7ZUwco5Ep0fYZw8quNwOiw9K8GYVL+Kgc2pETNTLOg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2143,10 +2129,6 @@ packages: resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.21.0': - resolution: {integrity: sha512-BkLMNpdV6prozk8LlyK/SOoWLmUFi+ZD+pcqti9ILCbVvHGk1ui1g4jJOc2WDLaeExz2qWwojxlPce5PljcT3w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.22.0': resolution: {integrity: sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7573,14 +7555,14 @@ snapshots: '@types/node': 22.10.10 optional: true - '@typescript-eslint/eslint-plugin@8.21.0(@typescript-eslint/parser@8.22.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.22.0(@typescript-eslint/parser@8.22.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.22.0(eslint@9.19.0)(typescript@5.7.3) - '@typescript-eslint/scope-manager': 8.21.0 - '@typescript-eslint/type-utils': 8.21.0(eslint@9.19.0)(typescript@5.7.3) - '@typescript-eslint/utils': 8.21.0(eslint@9.19.0)(typescript@5.7.3) - '@typescript-eslint/visitor-keys': 8.21.0 + '@typescript-eslint/scope-manager': 8.22.0 + '@typescript-eslint/type-utils': 8.22.0(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.22.0(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.22.0 eslint: 9.19.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7607,20 +7589,15 @@ snapshots: '@typescript-eslint/types': 8.13.0 '@typescript-eslint/visitor-keys': 8.13.0 - '@typescript-eslint/scope-manager@8.21.0': - dependencies: - '@typescript-eslint/types': 8.21.0 - '@typescript-eslint/visitor-keys': 8.21.0 - '@typescript-eslint/scope-manager@8.22.0': dependencies: '@typescript-eslint/types': 8.22.0 '@typescript-eslint/visitor-keys': 8.22.0 - '@typescript-eslint/type-utils@8.21.0(eslint@9.19.0)(typescript@5.7.3)': + '@typescript-eslint/type-utils@8.22.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.21.0(typescript@5.7.3) - '@typescript-eslint/utils': 8.21.0(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/typescript-estree': 8.22.0(typescript@5.7.3) + '@typescript-eslint/utils': 8.22.0(eslint@9.19.0)(typescript@5.7.3) debug: 4.4.0 eslint: 9.19.0 ts-api-utils: 2.0.0(typescript@5.7.3) @@ -7630,8 +7607,6 @@ snapshots: '@typescript-eslint/types@8.13.0': {} - '@typescript-eslint/types@8.21.0': {} - '@typescript-eslint/types@8.22.0': {} '@typescript-eslint/typescript-estree@8.13.0(typescript@5.7.3)': @@ -7649,20 +7624,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.21.0(typescript@5.7.3)': - dependencies: - '@typescript-eslint/types': 8.21.0 - '@typescript-eslint/visitor-keys': 8.21.0 - debug: 4.4.0 - fast-glob: 3.3.3 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 2.0.0(typescript@5.7.3) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.22.0(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 8.22.0 @@ -7688,12 +7649,12 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.21.0(eslint@9.19.0)(typescript@5.7.3)': + '@typescript-eslint/utils@8.22.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) - '@typescript-eslint/scope-manager': 8.21.0 - '@typescript-eslint/types': 8.21.0 - '@typescript-eslint/typescript-estree': 8.21.0(typescript@5.7.3) + '@typescript-eslint/scope-manager': 8.22.0 + '@typescript-eslint/types': 8.22.0 + '@typescript-eslint/typescript-estree': 8.22.0(typescript@5.7.3) eslint: 9.19.0 typescript: 5.7.3 transitivePeerDependencies: @@ -7704,11 +7665,6 @@ snapshots: '@typescript-eslint/types': 8.13.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.21.0': - dependencies: - '@typescript-eslint/types': 8.21.0 - eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.22.0': dependencies: '@typescript-eslint/types': 8.22.0 From 25e0c1b8895970611746c2af1d9cd05f9711c273 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 00:23:25 +0800 Subject: [PATCH 0019/2658] chore(deps-dev): bump @types/node from 22.10.10 to 22.12.0 (#18237) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.10.10 to 22.12.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 66 +++++++++++++++++++++++++------------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index cc5bce86d6bb..c1b31b946a7a 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.10.10", + "@types/node": "22.12.0", "@types/sanitize-html": "2.13.0", "@types/supertest": "6.0.2", "@types/tiny-async-pool": "2.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b23590a6b05..71bb89ffd884 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -344,8 +344,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.10.10 - version: 22.10.10 + specifier: 22.12.0 + version: 22.12.0 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -372,7 +372,7 @@ importers: version: 0.29.1(rollup@4.24.4) '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.10.10)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.12.0)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.118 version: 0.37.118 @@ -441,10 +441,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.7.3)(vite@5.4.10(@types/node@22.10.10)) + version: 5.1.4(typescript@5.7.3)(vite@5.4.10(@types/node@22.12.0)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.10.10)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.12.0)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -2011,8 +2011,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.10.10': - resolution: {integrity: sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==} + '@types/node@22.12.0': + resolution: {integrity: sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6939,7 +6939,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.10.10 + '@types/node': 22.12.0 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7432,12 +7432,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.10.10 + '@types/node': 22.12.0 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.10.10 + '@types/node': 22.12.0 '@types/html-to-text@9.0.4': {} @@ -7445,13 +7445,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.10.10 + '@types/node': 22.12.0 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.10.10 + '@types/node': 22.12.0 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7461,7 +7461,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.10.10 + '@types/node': 22.12.0 '@types/jsrsasign@10.5.13': {} @@ -7471,7 +7471,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.10.10 + '@types/node': 22.12.0 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7493,14 +7493,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.10.10 + '@types/node': 22.12.0 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.10.10 + '@types/node': 22.12.0 form-data: 4.0.1 - '@types/node@22.10.10': + '@types/node@22.12.0': dependencies: undici-types: 6.20.0 @@ -7514,7 +7514,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.10.10 + '@types/node': 22.12.0 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7528,7 +7528,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.10.10 + '@types/node': 22.12.0 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7552,7 +7552,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.10.10 + '@types/node': 22.12.0 optional: true '@typescript-eslint/eslint-plugin@8.22.0(@typescript-eslint/parser@8.22.0(eslint@9.19.0)(typescript@5.7.3))(eslint@9.19.0)(typescript@5.7.3)': @@ -7696,7 +7696,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.10.10)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.12.0)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7710,7 +7710,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.10.10)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.12.0)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10550,7 +10550,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.10.10 + '@types/node': 22.12.0 long: 5.2.3 proxy-agent@6.4.0: @@ -11485,13 +11485,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.10.10): + vite-node@2.0.5(@types/node@22.12.0): dependencies: cac: 6.7.14 debug: 4.4.0 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.10.10) + vite: 5.4.10(@types/node@22.12.0) transitivePeerDependencies: - '@types/node' - less @@ -11503,27 +11503,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.7.3)(vite@5.4.10(@types/node@22.10.10)): + vite-tsconfig-paths@5.1.4(typescript@5.7.3)(vite@5.4.10(@types/node@22.12.0)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.7.3) optionalDependencies: - vite: 5.4.10(@types/node@22.10.10) + vite: 5.4.10(@types/node@22.12.0) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.10.10): + vite@5.4.10(@types/node@22.12.0): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.4 optionalDependencies: - '@types/node': 22.10.10 + '@types/node': 22.12.0 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.10.10)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.12.0)(jsdom@26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11541,11 +11541,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.10.10) - vite-node: 2.0.5(@types/node@22.10.10) + vite: 5.4.10(@types/node@22.12.0) + vite-node: 2.0.5(@types/node@22.12.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.10 + '@types/node': 22.12.0 jsdom: 26.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 69d78b09d6ea064cbc8ed4aa2951607266573f47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 08:48:08 +0000 Subject: [PATCH 0020/2658] chore(deps): bump imapflow from 1.0.178 to 1.0.179 (#18240) Bumps [imapflow](https://github.com/postalsys/imapflow) from 1.0.178 to 1.0.179. - [Release notes](https://github.com/postalsys/imapflow/releases) - [Changelog](https://github.com/postalsys/imapflow/blob/master/CHANGELOG.md) - [Commits](https://github.com/postalsys/imapflow/compare/v1.0.178...v1.0.179) --- updated-dependencies: - dependency-name: imapflow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c1b31b946a7a..fdf99d856b5d 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "http-cookie-agent": "6.0.8", "https-proxy-agent": "7.0.6", "iconv-lite": "0.6.3", - "imapflow": "1.0.178", + "imapflow": "1.0.179", "instagram-private-api": "1.46.1", "ioredis": "5.4.2", "ip-regex": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 71bb89ffd884..7ad1977153a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -133,8 +133,8 @@ importers: specifier: 0.6.3 version: 0.6.3 imapflow: - specifier: 1.0.178 - version: 1.0.178 + specifier: 1.0.179 + version: 1.0.179 instagram-private-api: specifier: 1.46.1 version: 1.46.1 @@ -3606,8 +3606,8 @@ packages: engines: {node: '>=6.9.0'} hasBin: true - imapflow@1.0.178: - resolution: {integrity: sha512-Pl2rBKn39e/szBYIHhP9lGSob0KkRmVMbiCMTDWc1S94icELaFumnCrt6mynV8Ro6T78QbwucBjr47u3pDhaPw==} + imapflow@1.0.179: + resolution: {integrity: sha512-I2MfddxWmPltchxpPguoJNnuDwKZIWrGeySZq1CgB0gkEWHbdZ+nRRcQ9Z23hjw2lJyF9/WoRSN76kcwW34Jjg==} immediate@3.0.6: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} @@ -9380,7 +9380,7 @@ snapshots: image-size@0.7.5: {} - imapflow@1.0.178: + imapflow@1.0.179: dependencies: encoding-japanese: 2.2.0 iconv-lite: 0.6.3 From d4c3bc942714d389ef7dbdd14510dac0d20aa84e Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Thu, 30 Jan 2025 00:32:38 +0800 Subject: [PATCH 0021/2658] =?UTF-8?q?feat(route):=20add=20=E6=9C=BA?= =?UTF-8?q?=E6=A0=B8=E7=BD=91=E6=96=87=E7=AB=A0=20(#18238)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 机核网文章 * fix: missing reference * fix typo --- lib/routes/gcores/articles.ts | 49 +++ lib/routes/gcores/news.ts | 135 +------ lib/routes/gcores/parser.ts | 241 +++++++++++++ lib/routes/gcores/templates/description.art | 16 + lib/routes/gcores/util.ts | 369 ++++++++------------ 5 files changed, 462 insertions(+), 348 deletions(-) create mode 100644 lib/routes/gcores/articles.ts create mode 100644 lib/routes/gcores/parser.ts diff --git a/lib/routes/gcores/articles.ts b/lib/routes/gcores/articles.ts new file mode 100644 index 000000000000..321c3193d2d2 --- /dev/null +++ b/lib/routes/gcores/articles.ts @@ -0,0 +1,49 @@ +import { type Data, type Route, ViewType } from '@/types'; + +import { getCurrentPath } from '@/utils/helpers'; +import { type Context } from 'hono'; + +import { baseUrl, processItems } from './util'; + +export const __dirname = getCurrentPath(import.meta.url); + +export const handler = async (ctx: Context): Promise => { + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const targetUrl: string = new URL('articles', baseUrl).href; + const apiUrl: string = new URL(`gapi/v1/articles`, baseUrl).href; + + const query = { + 'filter[is-news]': 0, + }; + + return await processItems(limit, query, apiUrl, targetUrl); +}; + +export const route: Route = { + path: '/articles', + name: '文章', + url: 'www.gcores.com', + maintainers: ['nczitzk'], + handler, + example: '/gcores/articles', + parameters: undefined, + description: undefined, + categories: ['game'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.gcores.com/articles'], + target: '/gcores/articles', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/gcores/news.ts b/lib/routes/gcores/news.ts index ec506d126207..2fbf8a54e48e 100644 --- a/lib/routes/gcores/news.ts +++ b/lib/routes/gcores/news.ts @@ -1,146 +1,23 @@ -import { type Data, type DataItem, type Route, ViewType } from '@/types'; +import { type Data, type Route, ViewType } from '@/types'; -import { art } from '@/utils/render'; import { getCurrentPath } from '@/utils/helpers'; -import ofetch from '@/utils/ofetch'; -import { parseDate } from '@/utils/parse-date'; - -import { type CheerioAPI, load } from 'cheerio'; import { type Context } from 'hono'; -import path from 'node:path'; -import { parseContent } from './util'; +import { baseUrl, processItems } from './util'; export const __dirname = getCurrentPath(import.meta.url); export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); - const baseUrl: string = 'https://www.gcores.com'; - const imageBaseUrl: string = 'https://image.gcores.com'; - const audioBaseUrl: string = 'https://alioss.gcores.com'; const targetUrl: string = new URL('news', baseUrl).href; const apiUrl: string = new URL('gapi/v1/articles', baseUrl).href; - const response = await ofetch(apiUrl, { - query: { - 'page[limit]': limit, - sort: '-published-at', - include: 'category,user,media', - 'filter[is-news]': 1, - }, - }); - - const included = response.included; - - const targetResponse = await ofetch(targetUrl); - const $: CheerioAPI = load(targetResponse); - const language = $('html').attr('lang') ?? 'zh-CN'; - - let items: DataItem[] = []; - - items = response.data?.slice(0, limit).map((item): DataItem => { - const attributes = item.attributes; - - const title: string = attributes.title; - const pubDate: number | string = attributes['published-at']; - const linkUrl: string | undefined = `${item.type}/${item.id}`; - - const categoryObj = item.relationships?.category?.data; - const categories: string[] = categoryObj ? [included.find((i) => i.type === categoryObj.type && i.id === categoryObj.id)?.attributes?.name].filter(Boolean) : []; - - const authorObj = item.relationships?.user?.data; - const authorIncluded = included.find((i) => i.type === authorObj.type && i.id === authorObj.id); - const authors: DataItem['author'] = authorIncluded - ? [ - { - name: authorIncluded.attributes?.nickname, - url: authorIncluded.id ? new URL(`${authorObj.type}/${authorIncluded.id}`, baseUrl).href : undefined, - avatar: authorIncluded.thumb ? new URL(authorIncluded.thumb, imageBaseUrl).href : undefined, - }, - ] - : undefined; - - const guid: string = `gcores-${item.id}`; - const image: string | undefined = (attributes.cover ?? attributes.thumb) ? new URL(attributes.cover ?? attributes.thumb, imageBaseUrl).href : undefined; - const updated: number | string = pubDate; - - let processedItem: DataItem = { - title, - pubDate: pubDate ? parseDate(pubDate) : undefined, - link: linkUrl, - category: categories, - author: authors, - guid, - id: guid, - image, - banner: image, - updated: updated ? parseDate(updated) : undefined, - language, - }; - - const enclosureUrl: string | undefined = attributes['speech-path'] ? new URL(`uploads/audio/${attributes['speech-path']}`, audioBaseUrl).href : undefined; - - if (enclosureUrl) { - const enclosureType: string = `audio/${enclosureUrl.split(/\./).pop()}`; - const enclosureLength: number = attributes.duration ? Number(attributes.duration) : 0; - - processedItem = { - ...processedItem, - enclosure_url: enclosureUrl, - enclosure_type: enclosureType, - enclosure_title: title, - enclosure_length: enclosureLength, - itunes_duration: enclosureLength, - itunes_item_image: image, - }; - } - - const description: string = art(path.join(__dirname, 'templates/description.art'), { - images: attributes.cover - ? [ - { - src: new URL(attributes.cover, imageBaseUrl).href, - alt: title, - }, - ] - : undefined, - audios: enclosureUrl - ? [ - { - src: enclosureUrl, - type: `audio/${enclosureUrl.split(/\./).pop()}`, - }, - ] - : undefined, - intro: attributes.desc || attributes.excerpt, - description: attributes.content ? parseContent(JSON.parse(attributes.content)) : undefined, - }); - - processedItem = { - ...processedItem, - description, - content: { - html: description, - text: description, - }, - }; - - return processedItem; - }); - - const title: string = $('title').text(); - - return { - title, - description: $('meta[name="description"]').attr('content'), - link: targetUrl, - item: items, - allowEmpty: true, - author: title.split(/\|/).pop()?.trim(), - language, - id: $('meta[property="og: url"]').attr('content'), + const query = { + 'filter[is-news]': 1, }; + + return await processItems(limit, query, apiUrl, targetUrl); }; export const route: Route = { diff --git a/lib/routes/gcores/parser.ts b/lib/routes/gcores/parser.ts new file mode 100644 index 000000000000..c307154621cc --- /dev/null +++ b/lib/routes/gcores/parser.ts @@ -0,0 +1,241 @@ +import { art } from '@/utils/render'; +import { getCurrentPath } from '@/utils/helpers'; + +import path from 'node:path'; + +export const __dirname = getCurrentPath(import.meta.url); + +interface Style { + [key: string]: string; +} + +interface BlockType { + element: string; + parentElement?: string; + aliasedElements?: string[]; +} + +interface InlineStyleRange { + offset: number; + length: number; + style: string; +} + +interface EntityRange { + offset: number; + length: number; + key: number; +} + +interface Entity { + type: string; + mutability: string; + data: any; +} + +interface Block { + key: string; + text: string; + type: string; + depth: number; + inlineStyleRanges: InlineStyleRange[]; + entityRanges: EntityRange[]; + data: any; +} + +interface Content { + blocks: Block[]; + entityMap: { [key: string]: Entity }; +} + +const imageBaseUrl: string = 'https://image.gcores.com'; + +const STYLES: Readonly> = { + BOLD: { fontWeight: 'bold' }, + CODE: { fontFamily: 'monospace', wordWrap: 'break-word' }, + ITALIC: { fontStyle: 'italic' }, + STRIKETHROUGH: { textDecoration: 'line-through' }, + UNDERLINE: { textDecoration: 'underline' }, +}; + +const BLOCK_TYPES: Readonly> = { + 'header-one': { element: 'h1' }, + 'header-two': { element: 'h2' }, + 'header-three': { element: 'h3' }, + 'header-four': { element: 'h4' }, + 'header-five': { element: 'h5' }, + 'header-six': { element: 'h6' }, + 'unordered-list-item': { element: 'li', parentElement: 'ul' }, + 'ordered-list-item': { element: 'li', parentElement: 'ol' }, + blockquote: { element: 'blockquote' }, + atomic: { element: 'figure' }, + 'code-block': { element: 'pre' }, + unstyled: { element: 'div', aliasedElements: ['p'] }, +}; + +/** + * Creates a styled HTML fragment for a given text and style object. + * @param text The text content of the fragment. + * @param style An object containing CSS styles (key-value pairs). + * @returns An HTML string representing the styled fragment. + */ +const createStyledFragment = (text: string, style: Record): string => + `${text}`; + +/** + * Applies inline styles to a text string. + * @param text The text to style. + * @param inlineStyleRanges An array of inline style ranges. + * @returns The styled text. + */ +const applyStyles = (text: string, inlineStyleRanges: readonly InlineStyleRange[]): string => { + if (!inlineStyleRanges || inlineStyleRanges.length === 0) { + return text; + } + + const sortedRanges = [...inlineStyleRanges].sort((a, b) => a.offset - b.offset); + + let lastOffset = 0; + const styledFragments = sortedRanges.map((range) => { + const style = STYLES[range.style]; + if (!style) { + return text.substring(lastOffset, range.offset); + } + + const styledText = createStyledFragment(text.substring(range.offset, range.offset + range.length), style); + const preText = text.substring(lastOffset, range.offset); + lastOffset = range.offset + range.length; + return preText + styledText; + }); + let result = styledFragments.join(''); + result += text.substring(lastOffset); + return result; +}; + +/** + * Creates an HTML element for a given entity. + * @param entity The entity to create an element for. + * @param block The current block the entity belongs to, for debugging purposes. + * @returns The HTML element string. + */ +const createEntityElement = (entity: Entity, block: Block): string => { + switch (entity.type) { + case 'EMBED': + return entity.data.content.startsWith('http') ? `${entity.data.content}` : entity.data.content; + case 'IMAGE': + return art(path.join(__dirname, 'templates/description.art'), { + images: entity.data.path + ? [ + { + src: new URL(entity.data.path, imageBaseUrl).href, + alt: entity.data.caption, + width: entity.data.width, + height: entity.data.height, + }, + ] + : undefined, + }); + case 'GALLERY': + if (!entity.data.images || !Array.isArray(entity.data.images)) { + return ''; + } + return art(path.join(__dirname, 'templates/description.art'), { + images: entity.data.images.map((image: any) => ({ + src: new URL(image.path, imageBaseUrl).href, + alt: image.caption, + width: image.width, + height: image.height, + })), + }); + case 'LINK': + return `${block.text}`; + case 'WIDGET': + return `${entity.data.title}`; + default: + return ''; + } +}; + +/** + * Parses a single content block into an HTML string. + * @param block The block to parse. + * @param entityMap The entity map. + * @returns The parsed HTML string. + */ +const parseBlock = (block: Block, entityMap: { [key: string]: Entity }): string => { + const blockType = BLOCK_TYPES[block.type]; + if (!blockType) { + return ''; + } + + const usedElement = blockType.aliasedElements?.[0] ?? blockType.element; + + let content = applyStyles(block.text, block.inlineStyleRanges); + + if (block.entityRanges && block.entityRanges.length > 0) { + const entityElements = block.entityRanges + .map((range) => entityMap[range.key]) + .filter(Boolean) + .map((entity) => createEntityElement(entity!, block)); + + content = entityElements.join(''); + } + + return `<${usedElement}>${content}`; +}; + +/** + * Parses a Content object into an HTML string using a for loop. + * @param content The Content object to parse. + * @returns The parsed HTML string. + */ +const parseContent = (content: Content): string => { + const { blocks, entityMap } = content; + + if (!blocks || blocks.length === 0) { + return ''; + } + + let html = ''; + let currentParent: string | undefined = undefined; + let parentContent = ''; + + for (const block of blocks) { + const blockType = BLOCK_TYPES[block.type]; + if (!blockType) { + continue; + } + + const parentElement = blockType.parentElement; + const parsedBlock = parseBlock(block, entityMap); + + if (parentElement) { + if (currentParent === parentElement) { + parentContent += parsedBlock; + } else { + if (currentParent) { + html += `<${currentParent}>${parentContent}`; + } + currentParent = parentElement; + parentContent = parsedBlock; + } + } else { + if (currentParent) { + html += `<${currentParent}>${parentContent}`; + currentParent = undefined; + parentContent = ''; + } + html += parsedBlock; + } + } + + if (currentParent) { + html += `<${currentParent}>${parentContent}`; + } + + return html; +}; + +export { parseContent }; diff --git a/lib/routes/gcores/templates/description.art b/lib/routes/gcores/templates/description.art index 7ac6d47081bb..bc3dbd13bdfa 100644 --- a/lib/routes/gcores/templates/description.art +++ b/lib/routes/gcores/templates/description.art @@ -27,6 +27,22 @@ {{ /each }} {{ /if }} +{{ if video }} + {{ each videos video }} + {{ if video?.src }} + + {{ /if }} + {{ /each }} +{{ /if }} + {{ if intro }}
{{ intro }}
{{ /if }} diff --git a/lib/routes/gcores/util.ts b/lib/routes/gcores/util.ts index c307154621cc..5550c953c45d 100644 --- a/lib/routes/gcores/util.ts +++ b/lib/routes/gcores/util.ts @@ -1,241 +1,172 @@ +import { type Data, type DataItem } from '@/types'; + import { art } from '@/utils/render'; import { getCurrentPath } from '@/utils/helpers'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import { type CheerioAPI, load } from 'cheerio'; import path from 'node:path'; -export const __dirname = getCurrentPath(import.meta.url); - -interface Style { - [key: string]: string; -} - -interface BlockType { - element: string; - parentElement?: string; - aliasedElements?: string[]; -} - -interface InlineStyleRange { - offset: number; - length: number; - style: string; -} - -interface EntityRange { - offset: number; - length: number; - key: number; -} - -interface Entity { - type: string; - mutability: string; - data: any; -} - -interface Block { - key: string; - text: string; - type: string; - depth: number; - inlineStyleRanges: InlineStyleRange[]; - entityRanges: EntityRange[]; - data: any; -} - -interface Content { - blocks: Block[]; - entityMap: { [key: string]: Entity }; -} +const __dirname = getCurrentPath(import.meta.url); + +import { parseContent } from './parser'; +const baseUrl: string = 'https://www.gcores.com'; const imageBaseUrl: string = 'https://image.gcores.com'; +const audioBaseUrl: string = 'https://alioss.gcores.com'; -const STYLES: Readonly> = { - BOLD: { fontWeight: 'bold' }, - CODE: { fontFamily: 'monospace', wordWrap: 'break-word' }, - ITALIC: { fontStyle: 'italic' }, - STRIKETHROUGH: { textDecoration: 'line-through' }, - UNDERLINE: { textDecoration: 'underline' }, +const baseQuery = { + sort: '-published-at', + include: 'category,user,media', + 'filter[list-all]': 1, + 'filter[is-news]': 1, }; -const BLOCK_TYPES: Readonly> = { - 'header-one': { element: 'h1' }, - 'header-two': { element: 'h2' }, - 'header-three': { element: 'h3' }, - 'header-four': { element: 'h4' }, - 'header-five': { element: 'h5' }, - 'header-six': { element: 'h6' }, - 'unordered-list-item': { element: 'li', parentElement: 'ul' }, - 'ordered-list-item': { element: 'li', parentElement: 'ol' }, - blockquote: { element: 'blockquote' }, - atomic: { element: 'figure' }, - 'code-block': { element: 'pre' }, - unstyled: { element: 'div', aliasedElements: ['p'] }, -}; +const processItems = async (limit: number, query: any, apiUrl: string, targetUrl: string): Promise => { + const response = await ofetch(apiUrl, { + query: { + ...baseQuery, + query, + }, + }); -/** - * Creates a styled HTML fragment for a given text and style object. - * @param text The text content of the fragment. - * @param style An object containing CSS styles (key-value pairs). - * @returns An HTML string representing the styled fragment. - */ -const createStyledFragment = (text: string, style: Record): string => - `${text}`; - -/** - * Applies inline styles to a text string. - * @param text The text to style. - * @param inlineStyleRanges An array of inline style ranges. - * @returns The styled text. - */ -const applyStyles = (text: string, inlineStyleRanges: readonly InlineStyleRange[]): string => { - if (!inlineStyleRanges || inlineStyleRanges.length === 0) { - return text; - } - - const sortedRanges = [...inlineStyleRanges].sort((a, b) => a.offset - b.offset); - - let lastOffset = 0; - const styledFragments = sortedRanges.map((range) => { - const style = STYLES[range.style]; - if (!style) { - return text.substring(lastOffset, range.offset); + const included = response.included; + + const targetResponse = await ofetch(targetUrl); + const $: CheerioAPI = load(targetResponse); + const language = $('html').attr('lang') ?? 'zh-CN'; + + let items: DataItem[] = []; + + items = response.data?.slice(0, limit).map((item): DataItem => { + const attributes = item.attributes; + const relationships = item.relationships; + + const title: string = attributes.title; + const pubDate: number | string = attributes['published-at']; + const linkUrl: string | undefined = `${item.type}/${item.id}`; + + const categoryObj = relationships?.category?.data; + const categories: string[] = categoryObj ? [included.find((i) => i.type === categoryObj.type && i.id === categoryObj.id)?.attributes?.name].filter(Boolean) : []; + + const authorObj = relationships?.user?.data; + const authorIncluded = included.find((i) => i.type === authorObj.type && i.id === authorObj.id); + const authors: DataItem['author'] = authorIncluded + ? [ + { + name: authorIncluded.attributes?.nickname, + url: authorIncluded.id ? new URL(`${authorObj.type}/${authorIncluded.id}`, baseUrl).href : undefined, + avatar: authorIncluded.thumb ? new URL(authorIncluded.thumb, imageBaseUrl).href : undefined, + }, + ] + : undefined; + + const guid: string = `gcores-${item.id}`; + const image: string | undefined = (attributes.cover ?? attributes.thumb) ? new URL(attributes.cover ?? attributes.thumb, imageBaseUrl).href : undefined; + const updated: number | string = pubDate; + + let processedItem: DataItem = { + title, + pubDate: pubDate ? parseDate(pubDate) : undefined, + link: linkUrl, + category: categories, + author: authors, + guid, + id: guid, + image, + banner: image, + updated: updated ? parseDate(updated) : undefined, + language, + }; + + let enclosureUrl: string | undefined; + let enclosureType: string | undefined; + + const mediaAttrs = included.find((i) => i.id === relationships.media?.data?.id)?.attributes; + + if (attributes['speech-path']) { + enclosureUrl = new URL(`uploads/audio/${attributes['speech-path']}`, audioBaseUrl).href; + enclosureType = `audio/${enclosureUrl?.split(/\./).pop()}`; + } else if (mediaAttrs) { + if (mediaAttrs.audio) { + enclosureUrl = mediaAttrs.audio; + enclosureType = `audio/${enclosureUrl?.split(/\./).pop()}`; + } else if (mediaAttrs['original-src']) { + enclosureUrl = mediaAttrs['original-src']; + enclosureType = 'video/mpeg'; + } } - const styledText = createStyledFragment(text.substring(range.offset, range.offset + range.length), style); - const preText = text.substring(lastOffset, range.offset); - lastOffset = range.offset + range.length; - return preText + styledText; - }); - let result = styledFragments.join(''); - result += text.substring(lastOffset); - return result; -}; + if (enclosureUrl) { + const enclosureLength: number = attributes.duration ? Number(attributes.duration) : 0; + + processedItem = { + ...processedItem, + enclosure_url: enclosureUrl, + enclosure_type: enclosureType, + enclosure_title: title, + enclosure_length: enclosureLength, + itunes_duration: enclosureLength, + itunes_item_image: image, + }; + } -/** - * Creates an HTML element for a given entity. - * @param entity The entity to create an element for. - * @param block The current block the entity belongs to, for debugging purposes. - * @returns The HTML element string. - */ -const createEntityElement = (entity: Entity, block: Block): string => { - switch (entity.type) { - case 'EMBED': - return entity.data.content.startsWith('http') ? `${entity.data.content}` : entity.data.content; - case 'IMAGE': - return art(path.join(__dirname, 'templates/description.art'), { - images: entity.data.path + const description: string = art(path.join(__dirname, 'templates/description.art'), { + images: attributes.cover + ? [ + { + src: new URL(attributes.cover, imageBaseUrl).href, + alt: title, + }, + ] + : undefined, + audios: + enclosureType?.startsWith('audio') && enclosureUrl ? [ { - src: new URL(entity.data.path, imageBaseUrl).href, - alt: entity.data.caption, - width: entity.data.width, - height: entity.data.height, + src: enclosureUrl, + type: enclosureType, }, ] : undefined, - }); - case 'GALLERY': - if (!entity.data.images || !Array.isArray(entity.data.images)) { - return ''; - } - return art(path.join(__dirname, 'templates/description.art'), { - images: entity.data.images.map((image: any) => ({ - src: new URL(image.path, imageBaseUrl).href, - alt: image.caption, - width: image.width, - height: image.height, - })), - }); - case 'LINK': - return `${block.text}`; - case 'WIDGET': - return `${entity.data.title}`; - default: - return ''; - } -}; - -/** - * Parses a single content block into an HTML string. - * @param block The block to parse. - * @param entityMap The entity map. - * @returns The parsed HTML string. - */ -const parseBlock = (block: Block, entityMap: { [key: string]: Entity }): string => { - const blockType = BLOCK_TYPES[block.type]; - if (!blockType) { - return ''; - } - - const usedElement = blockType.aliasedElements?.[0] ?? blockType.element; - - let content = applyStyles(block.text, block.inlineStyleRanges); - - if (block.entityRanges && block.entityRanges.length > 0) { - const entityElements = block.entityRanges - .map((range) => entityMap[range.key]) - .filter(Boolean) - .map((entity) => createEntityElement(entity!, block)); - - content = entityElements.join(''); - } - - return `<${usedElement}>${content}`; -}; - -/** - * Parses a Content object into an HTML string using a for loop. - * @param content The Content object to parse. - * @returns The parsed HTML string. - */ -const parseContent = (content: Content): string => { - const { blocks, entityMap } = content; - - if (!blocks || blocks.length === 0) { - return ''; - } - - let html = ''; - let currentParent: string | undefined = undefined; - let parentContent = ''; - - for (const block of blocks) { - const blockType = BLOCK_TYPES[block.type]; - if (!blockType) { - continue; - } - - const parentElement = blockType.parentElement; - const parsedBlock = parseBlock(block, entityMap); - - if (parentElement) { - if (currentParent === parentElement) { - parentContent += parsedBlock; - } else { - if (currentParent) { - html += `<${currentParent}>${parentContent}`; - } - currentParent = parentElement; - parentContent = parsedBlock; - } - } else { - if (currentParent) { - html += `<${currentParent}>${parentContent}`; - currentParent = undefined; - parentContent = ''; - } - html += parsedBlock; - } - } - - if (currentParent) { - html += `<${currentParent}>${parentContent}`; - } + videos: + enclosureType?.startsWith('video') && enclosureUrl + ? [ + { + src: enclosureUrl, + type: enclosureType, + }, + ] + : undefined, + intro: attributes.desc || attributes.excerpt, + description: attributes.content ? parseContent(JSON.parse(attributes.content)) : undefined, + }); + + processedItem = { + ...processedItem, + description, + content: { + html: description, + text: description, + }, + }; + + return processedItem; + }); - return html; + const title: string = $('title').text(); + + return { + title, + description: $('meta[name="description"]').attr('content'), + link: targetUrl, + item: items, + allowEmpty: true, + author: title.split(/\|/).pop()?.trim(), + language, + id: $('meta[property="og:url"]').attr('content'), + }; }; -export { parseContent }; +export { baseUrl, imageBaseUrl, audioBaseUrl, processItems }; From 57a8d6e3b88d620b8a8093ef4eb43f010f8239d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 08:11:20 +0000 Subject: [PATCH 0022/2658] chore(deps-dev): bump @stylistic/eslint-plugin from 3.0.0 to 3.0.1 (#18245) Bumps [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases) - [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v3.0.1/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@stylistic/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 87 ++++---------------------------------------------- 2 files changed, 7 insertions(+), 82 deletions(-) diff --git a/package.json b/package.json index fdf99d856b5d..be2f997b3e8b 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "@eslint/eslintrc": "3.2.0", "@eslint/js": "9.19.0", "@microsoft/eslint-formatter-sarif": "3.1.0", - "@stylistic/eslint-plugin": "3.0.0", + "@stylistic/eslint-plugin": "3.0.1", "@types/aes-js": "3.1.4", "@types/babel__preset-env": "7.10.0", "@types/crypto-js": "4.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7ad1977153a9..fdca6fd43680 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -293,8 +293,8 @@ importers: specifier: 3.1.0 version: 3.1.0 '@stylistic/eslint-plugin': - specifier: 3.0.0 - version: 3.0.0(eslint@9.19.0)(typescript@5.7.3) + specifier: 3.0.1 + version: 3.0.1(eslint@9.19.0)(typescript@5.7.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -1895,8 +1895,8 @@ packages: resolution: {integrity: sha512-QWLl2P+rsCJeofkDNIT3WFmb6NrRud1SUYW8dIhXK/46XFV8Q/g7Bsvib0Askb0reRLe+WYPeeE+l5cH7SlkuQ==} engines: {node: '>=18'} - '@stylistic/eslint-plugin@3.0.0': - resolution: {integrity: sha512-9GJI6iBtGjOqSsyCKUvE6Vn7qDT52hbQaoq/SwxH6A1bciymZfvBfHIIrD3E7Koi2sjzOa/MNQ2XOguHtVJOyw==} + '@stylistic/eslint-plugin@3.0.1': + resolution: {integrity: sha512-rQ3tcT5N2cynofJfbjUsnL4seoewTaOVBLyUEwtNldo7iNMPo3h/GUQk+Cl3iHEWwRxjq2wuH6q0FufQrbVL1A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' @@ -2074,10 +2074,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/scope-manager@8.13.0': - resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.22.0': resolution: {integrity: sha512-/lwVV0UYgkj7wPSw0o8URy6YI64QmcOdwHuGuxWIYznO6d45ER0wXUbksr9pYdViAofpUCNJx/tAzNukgvaaiQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2089,35 +2085,16 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/types@8.13.0': - resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.22.0': resolution: {integrity: sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.13.0': - resolution: {integrity: sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.22.0': resolution: {integrity: sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/utils@8.13.0': - resolution: {integrity: sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.22.0': resolution: {integrity: sha512-T8oc1MbF8L+Bk2msAvCUzjxVB2Z2f+vXYfcucE2wOmYs7ZUwco5Ep0fYZw8quNwOiw9K8GYVL+Kgc2pETNTLOg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2125,10 +2102,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/visitor-keys@8.13.0': - resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.22.0': resolution: {integrity: sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5348,12 +5321,6 @@ packages: trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} - ts-api-utils@1.4.3: - resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - ts-api-utils@2.0.0: resolution: {integrity: sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==} engines: {node: '>=18.12'} @@ -7383,9 +7350,9 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@3.0.0(eslint@9.19.0)(typescript@5.7.3)': + '@stylistic/eslint-plugin@3.0.1(eslint@9.19.0)(typescript@5.7.3)': dependencies: - '@typescript-eslint/utils': 8.13.0(eslint@9.19.0)(typescript@5.7.3) + '@typescript-eslint/utils': 8.22.0(eslint@9.19.0)(typescript@5.7.3) eslint: 9.19.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 @@ -7584,11 +7551,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.13.0': - dependencies: - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/visitor-keys': 8.13.0 - '@typescript-eslint/scope-manager@8.22.0': dependencies: '@typescript-eslint/types': 8.22.0 @@ -7605,25 +7567,8 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.13.0': {} - '@typescript-eslint/types@8.22.0': {} - '@typescript-eslint/typescript-estree@8.13.0(typescript@5.7.3)': - dependencies: - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/visitor-keys': 8.13.0 - debug: 4.4.0 - fast-glob: 3.3.3 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.3(typescript@5.7.3) - optionalDependencies: - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.22.0(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 8.22.0 @@ -7638,17 +7583,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.13.0(eslint@9.19.0)(typescript@5.7.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.7.3) - eslint: 9.19.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.22.0(eslint@9.19.0)(typescript@5.7.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0) @@ -7660,11 +7594,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.13.0': - dependencies: - '@typescript-eslint/types': 8.13.0 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.22.0': dependencies: '@typescript-eslint/types': 8.22.0 @@ -11294,10 +11223,6 @@ snapshots: trough@2.2.0: {} - ts-api-utils@1.4.3(typescript@5.7.3): - dependencies: - typescript: 5.7.3 - ts-api-utils@2.0.0(typescript@5.7.3): dependencies: typescript: 5.7.3 From 35c0458f5728084b1b0701d3fc8b60e1aff36467 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Fri, 31 Jan 2025 00:39:12 +0800 Subject: [PATCH 0023/2658] =?UTF-8?q?feat(route):=20add=20=E9=92=9B?= =?UTF-8?q?=E5=AA=92=E4=BD=93=E6=9C=80=E6=96=B0=E8=B5=84=E8=AE=AF=20(#1824?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 钛媒体最新资讯 * refactor: Replace Array#reduce() with for loop * fix typo --- lib/routes/tmtpost/new.ts | 237 +++++++++++++++++++ lib/routes/tmtpost/templates/description.art | 7 + 2 files changed, 244 insertions(+) create mode 100644 lib/routes/tmtpost/new.ts create mode 100644 lib/routes/tmtpost/templates/description.art diff --git a/lib/routes/tmtpost/new.ts b/lib/routes/tmtpost/new.ts new file mode 100644 index 000000000000..8ff8b7bb53d6 --- /dev/null +++ b/lib/routes/tmtpost/new.ts @@ -0,0 +1,237 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import { art } from '@/utils/render'; +import cache from '@/utils/cache'; +import { getCurrentPath } from '@/utils/helpers'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +import { type CheerioAPI, load } from 'cheerio'; +import { type Context } from 'hono'; +import path from 'node:path'; + +const __dirname = getCurrentPath(import.meta.url); + +export const handler = async (ctx: Context): Promise => { + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '1', 10); + + const baseUrl: string = 'https://www.tmtpost.com'; + const apiBaseUrl: string = 'https://api.tmtpost.com'; + const targetUrl: string = new URL('new', baseUrl).href; + const listApiUrl: string = new URL('v1/lists/new', apiBaseUrl).href; + const postApiUrl: string = new URL('v1/posts/', apiBaseUrl).href; + + const headers = { + 'app-version': 'web1.0', + }; + + const response = await ofetch(listApiUrl, { + query: { + limit, + }, + headers, + }); + + const targetResponse = await ofetch(targetUrl); + const $: CheerioAPI = load(targetResponse); + const language = $('html').attr('lang') ?? 'zh-CN'; + + let items: DataItem[] = []; + + items = response.data.slice(0, limit).map((item): DataItem => { + const title: string = item.title; + const description: string = art(path.join(__dirname, 'templates/description.art'), { + intro: item.summary, + }); + const pubDate: number | string = item.time_published; + const linkUrl: string | undefined = item.share_link; + const guid: string = item.guid; + const image: string | undefined = item.thumb_image?.original?.url; + const updated: number | string = item.updated ?? pubDate; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDate ? parseDate(pubDate, 'X') : undefined, + link: linkUrl, + guid, + id: guid, + content: { + html: description, + text: item.content ?? description, + }, + image, + banner: image, + updated: updated ? parseDate(updated, 'X') : undefined, + language, + }; + + return processedItem; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async (): Promise => { + const apiUrl: string = new URL(item.guid as string, postApiUrl).href; + + const detailResponse = await ofetch(apiUrl, { + query: { + fields: ['authors', 'tags', 'featured_image', 'categories', 'stock_list', 'big_plate', 'concept_plate', 'plate', 'plate_list', 'share_link'].join(';'), + }, + headers, + }); + const data = detailResponse.data; + + if (!data) { + return item; + } + + const title: string = data.title; + const description: string = art(path.join(__dirname, 'templates/description.art'), { + intro: data.summary, + description: data.main, + }); + const pubDate: number | string = data.time_published; + const linkUrl: string | undefined = data.share_link; + const categories: string[] = [ + ...new Set( + ( + [...(data.categories ?? []), ...(data.stock_list ?? []), ...(data.big_plate ?? []), ...(data.concept_plate ?? []), ...(data.plate ?? []), ...(data.plate_list ?? []), ...(data.tags ?? [])].map( + (c) => c.title ?? c.name ?? c.tag + ) as string[] + ).filter(Boolean) + ), + ]; + const authors: DataItem['author'] = data.authors?.map((author) => ({ + name: author.username, + url: new URL(`user/${author.guid}`, baseUrl).href, + avatar: author.avatar, + })); + const guid: string = `tmtpost-${data.post_guid}`; + const image: string | undefined = data.images?.[0]?.url; + const updated: number | string = data.time_updated; + + let processedItem: DataItem = { + title, + description, + pubDate: pubDate ? parseDate(pubDate, 'X') : undefined, + link: linkUrl ?? item.link, + category: categories, + author: authors, + guid, + id: guid, + content: { + html: description, + text: description, + }, + image, + banner: image, + updated: updated ? parseDate(updated, 'X') : undefined, + language, + }; + + const enclosureUrl: string | undefined = data.audio; + + if (enclosureUrl) { + const enclosureType: string = `audio/${enclosureUrl.split(/\./).pop()}`; + const itunesDuration: string | number | undefined = data.duration; + + processedItem = { + ...processedItem, + enclosure_url: enclosureUrl, + enclosure_type: enclosureType, + enclosure_title: title, + enclosure_length: undefined, + itunes_duration: itunesDuration, + itunes_item_image: image, + }; + } + + const medias: Record> = {}; + + if (data.full_size_images ?? data.images) { + const images = data.full_size_images ?? data.images; + for (const media of images) { + const url: string | undefined = media.url ?? media; + + if (!url) { + continue; + } + + const medium: string = 'image'; + const count: number = Object.values(medias).filter((m) => m.medium === medium).length + 1; + const key: string = `${medium}${count}`; + + medias[key] = { + url, + medium, + title, + thumbnail: media.thumbnail ?? url, + }; + } + } + + processedItem = { + ...processedItem, + media: medias, + }; + + return { + ...item, + ...processedItem, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + const title: string = $('title').text(); + const author: string | undefined = title.split(/-/).pop(); + + return { + title, + description: $('meta[property="og:description"]').attr('content'), + link: targetUrl, + item: items, + allowEmpty: true, + image: $('meta[property="og:image"]').attr('content'), + author: title.split(/-/).pop(), + language, + itunes_author: author, + itunes_category: 'Technology', + id: targetUrl, + }; +}; + +export const route: Route = { + path: '/new', + name: '最新', + url: 'www.tmtpost.com', + maintainers: ['nczitzk'], + handler, + example: '/tmtpost/new', + parameters: undefined, + description: undefined, + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.tmtpost.com'], + target: '/new', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/tmtpost/templates/description.art b/lib/routes/tmtpost/templates/description.art new file mode 100644 index 000000000000..57498ab45a9d --- /dev/null +++ b/lib/routes/tmtpost/templates/description.art @@ -0,0 +1,7 @@ +{{ if intro }} +
{{ intro }}
+{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From 2dcd9c00836a2f69fb524fdbb7e864950c894001 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 09:00:05 +0000 Subject: [PATCH 0024/2658] chore(deps): bump @hono/node-server from 1.13.7 to 1.13.8 (#18248) Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.13.7 to 1.13.8. - [Release notes](https://github.com/honojs/node-server/releases) - [Commits](https://github.com/honojs/node-server/compare/v1.13.7...v1.13.8) --- updated-dependencies: - dependency-name: "@hono/node-server" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index be2f997b3e8b..def0f257ef4b 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "dependencies": { "@bbob/html": "4.2.0", "@bbob/preset-html5": "4.2.0", - "@hono/node-server": "1.13.7", + "@hono/node-server": "1.13.8", "@hono/zod-openapi": "0.18.3", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fdca6fd43680..9deab097c4b6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,8 +22,8 @@ importers: specifier: 4.2.0 version: 4.2.0 '@hono/node-server': - specifier: 1.13.7 - version: 1.13.7(hono@4.6.19) + specifier: 1.13.8 + version: 1.13.8(hono@4.6.19) '@hono/zod-openapi': specifier: 0.18.3 version: 0.18.3(hono@4.6.19)(zod@3.24.1) @@ -1415,8 +1415,8 @@ packages: resolution: {integrity: sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@hono/node-server@1.13.7': - resolution: {integrity: sha512-kTfUMsoloVKtRA2fLiGSd9qBddmru9KadNyhJCwgKBxTiNkaAJEwkVN9KV/rS4HtmmNRtUh6P+YpmjRMl0d9vQ==} + '@hono/node-server@1.13.8': + resolution: {integrity: sha512-fsn8ucecsAXUoVxrUil0m13kOEq4mkX4/4QozCqmY+HpGfKl74OYSn8JcMA8GnG0ClfdRI4/ZSeG7zhFaVg+wg==} engines: {node: '>=18.14.1'} peerDependencies: hono: ^4 @@ -6852,7 +6852,7 @@ snapshots: '@eslint/core': 0.10.0 levn: 0.4.1 - '@hono/node-server@1.13.7(hono@4.6.19)': + '@hono/node-server@1.13.8(hono@4.6.19)': dependencies: hono: 4.6.19 From 7630782964e45aa2163fe3bf0683730c700aedd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 09:02:51 +0000 Subject: [PATCH 0025/2658] chore(deps): bump @scalar/hono-api-reference from 0.5.169 to 0.5.170 (#18251) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.5.169 to 0.5.170. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index def0f257ef4b..e5fbc558a49b 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.28.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.5.169", + "@scalar/hono-api-reference": "0.5.170", "@sentry/node": "7.119.1", "@tonyrl/rand-user-agent": "2.0.81", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9deab097c4b6..3f23b67a0eb9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,8 +58,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.5.169 - version: 0.5.169(hono@4.6.19) + specifier: 0.5.170 + version: 0.5.170(hono@4.6.19) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1843,8 +1843,8 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/hono-api-reference@0.5.169': - resolution: {integrity: sha512-K6mGd1mxKXh5/jqxo0yHIOFi4N5jjQj8PL2TAJMhcUZ39qwSZ7/V7SGMBBpGtWNsGofac0bZ7q/7yoTsY3/RYg==} + '@scalar/hono-api-reference@0.5.170': + resolution: {integrity: sha512-WZsBHZutARsszArsn2jC8aPM1KrMtkyIJzt/Dhigr3KPaDMTVBZEmO/NILrYAMnLYkboAs7DedtSHt59D41dew==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1853,8 +1853,8 @@ packages: resolution: {integrity: sha512-V+KnESyVJqorJzEN0QFlu3tAImCHjnvPov6QcQvjfY7s0+CjrI3rRO3oVIRlXURTQrQGrnhxvK0SkXGAZ+dxvw==} engines: {node: '>=18'} - '@scalar/types@0.0.28': - resolution: {integrity: sha512-NRGWtxWE/YfpAiNKh/XCV5o9CaYlg8etwelux1q7VRAbZqbpti5c14a5/t2mCiFSrfoyh4ghAHuYC9n3uwnuXQ==} + '@scalar/types@0.0.29': + resolution: {integrity: sha512-Z5tnRVtKHV/Gx4hCPeyFsxM1Gx92KUqpZ/HhM4KexPh5StKJo6MSLSTeFXqdVM8dbsnfw+xFBoLF9yE0eEHK3Q==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7295,14 +7295,14 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/hono-api-reference@0.5.169(hono@4.6.19)': + '@scalar/hono-api-reference@0.5.170(hono@4.6.19)': dependencies: - '@scalar/types': 0.0.28 + '@scalar/types': 0.0.29 hono: 4.6.19 '@scalar/openapi-types@0.1.6': {} - '@scalar/types@0.0.28': + '@scalar/types@0.0.29': dependencies: '@scalar/openapi-types': 0.1.6 '@unhead/schema': 1.11.18 From 1104bbcab65403974868dbc92acdfe11874ac40e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 09:04:35 +0000 Subject: [PATCH 0026/2658] chore(deps): bump hono from 4.6.19 to 4.6.20 (#18249) Bumps [hono](https://github.com/honojs/hono) from 4.6.19 to 4.6.20. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.19...v4.6.20) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index e5fbc558a49b..285841f631c0 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "fanfou-sdk": "5.0.0", "form-data": "4.0.1", "googleapis": "144.0.0", - "hono": "4.6.19", + "hono": "4.6.20", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.8", "https-proxy-agent": "7.0.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3f23b67a0eb9..50e6a9f1a770 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,10 +23,10 @@ importers: version: 4.2.0 '@hono/node-server': specifier: 1.13.8 - version: 1.13.8(hono@4.6.19) + version: 1.13.8(hono@4.6.20) '@hono/zod-openapi': specifier: 0.18.3 - version: 0.18.3(hono@4.6.19)(zod@3.24.1) + version: 0.18.3(hono@4.6.20)(zod@3.24.1) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -59,7 +59,7 @@ importers: version: 0.0.25 '@scalar/hono-api-reference': specifier: 0.5.170 - version: 0.5.170(hono@4.6.19) + version: 0.5.170(hono@4.6.20) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -118,8 +118,8 @@ importers: specifier: 144.0.0 version: 144.0.0 hono: - specifier: 4.6.19 - version: 4.6.19 + specifier: 4.6.20 + version: 4.6.20 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3475,8 +3475,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.19: - resolution: {integrity: sha512-Xw5DwU2cewEsQ1DkDCdy6aBJkEBARl5loovoL1gL3/gw81RdaPbXrNJYp3LoQpzpJ7ECC/1OFi/vn3UZTLHFEw==} + hono@4.6.20: + resolution: {integrity: sha512-5qfNQeaIptMaJKyoJ6N/q4gIq0DBp2FCRaLNuUI3LlJKL4S37DY/rLL1uAxA4wrPB39tJ3s+f7kgI79O4ScSug==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6852,20 +6852,20 @@ snapshots: '@eslint/core': 0.10.0 levn: 0.4.1 - '@hono/node-server@1.13.8(hono@4.6.19)': + '@hono/node-server@1.13.8(hono@4.6.20)': dependencies: - hono: 4.6.19 + hono: 4.6.20 - '@hono/zod-openapi@0.18.3(hono@4.6.19)(zod@3.24.1)': + '@hono/zod-openapi@0.18.3(hono@4.6.20)(zod@3.24.1)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.24.1) - '@hono/zod-validator': 0.4.1(hono@4.6.19)(zod@3.24.1) - hono: 4.6.19 + '@hono/zod-validator': 0.4.1(hono@4.6.20)(zod@3.24.1) + hono: 4.6.20 zod: 3.24.1 - '@hono/zod-validator@0.4.1(hono@4.6.19)(zod@3.24.1)': + '@hono/zod-validator@0.4.1(hono@4.6.20)(zod@3.24.1)': dependencies: - hono: 4.6.19 + hono: 4.6.20 zod: 3.24.1 '@humanfs/core@0.19.1': {} @@ -7295,10 +7295,10 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/hono-api-reference@0.5.170(hono@4.6.19)': + '@scalar/hono-api-reference@0.5.170(hono@4.6.20)': dependencies: '@scalar/types': 0.0.29 - hono: 4.6.19 + hono: 4.6.20 '@scalar/openapi-types@0.1.6': {} @@ -9187,7 +9187,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.19: {} + hono@4.6.20: {} hookable@5.5.3: {} From 7507c4745da81afed8951a0b645c8e32516285b9 Mon Sep 17 00:00:00 2001 From: cnk Date: Fri, 31 Jan 2025 20:55:38 +0800 Subject: [PATCH 0027/2658] fix(routes/bilibili/user/collection): fix embed param not correct handle (#18252) related to https://github.com/DIYgod/RSSHub/issues/18191 --- lib/routes/bilibili/user-collection.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/bilibili/user-collection.ts b/lib/routes/bilibili/user-collection.ts index 3b66debad8bd..5dab48de714d 100644 --- a/lib/routes/bilibili/user-collection.ts +++ b/lib/routes/bilibili/user-collection.ts @@ -3,6 +3,7 @@ import got from '@/utils/got'; import cache from './cache'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; +import { queryToBoolean } from '@/utils/readable-social'; const notFoundData = { title: '此 bilibili 频道不存在', @@ -35,7 +36,7 @@ export const route: Route = { async function handler(ctx) { const uid = Number.parseInt(ctx.req.param('uid')); const sid = Number.parseInt(ctx.req.param('sid')); - const embed = !ctx.req.param('embed'); + const embed = queryToBoolean(ctx.req.param('embed') || 'true'); const sortReverse = Number.parseInt(ctx.req.param('sortReverse')) === 1; const page = ctx.req.param('page') ? Number.parseInt(ctx.req.param('page')) : 1; const limit = ctx.req.query('limit') ?? 25; From 4fa33716c103e9aa9fd5df7c74a69b5467924364 Mon Sep 17 00:00:00 2001 From: Tony Date: Fri, 31 Jan 2025 22:17:58 +0800 Subject: [PATCH 0028/2658] docs: remove indent (#18247) * docs: remove indent * docs: remove more indent * docs: remove h5 indent * docs: remove h4 indent * docs: remove details indent --- lib/routes/005/index.ts | 6 +- lib/routes/0818tuan/index.ts | 4 +- lib/routes/10jqka/realtimenews.ts | 4 +- lib/routes/12371/zxfb.ts | 4 +- lib/routes/163/exclusive.ts | 34 +- lib/routes/163/news/rank.ts | 6 +- lib/routes/163/news/special.ts | 4 +- lib/routes/163/renjian.ts | 4 +- lib/routes/18comic/blogs.ts | 6 +- lib/routes/18comic/index.ts | 22 +- lib/routes/19lou/index.ts | 22 +- lib/routes/1point3acres/blog.ts | 4 +- lib/routes/1point3acres/category.ts | 12 +- lib/routes/1point3acres/section.ts | 32 +- lib/routes/1point3acres/thread.ts | 12 +- lib/routes/2023game/index.ts | 6 +- lib/routes/2048/index.ts | 52 +- lib/routes/21caijing/channel.ts | 2 +- lib/routes/36kr/hot-list.ts | 4 +- lib/routes/36kr/index.ts | 4 +- lib/routes/3dmgame/news-center.ts | 4 +- lib/routes/3kns/index.ts | 30 +- lib/routes/423down/index.ts | 36 +- lib/routes/56kog/class.ts | 10 +- lib/routes/56kog/top.ts | 4 +- lib/routes/78dm/index.ts | 130 ++-- lib/routes/7mmtv/index.ts | 24 +- lib/routes/8264/list.ts | 74 +-- lib/routes/91porn/index.ts | 4 +- lib/routes/95mm/category.ts | 4 +- lib/routes/95mm/tab.ts | 2 +- lib/routes/a9vg/index.ts | 22 +- lib/routes/aamacau/index.ts | 4 +- lib/routes/accessbriefing/index.ts | 38 +- lib/routes/acfun/article.ts | 16 +- lib/routes/afdian/explore.ts | 12 +- lib/routes/agirls/z-index.ts | 4 +- lib/routes/agora0/index.ts | 4 +- lib/routes/agri/index.ts | 104 ++-- lib/routes/aibase/discover.ts | 148 ++--- lib/routes/aibase/topic.ts | 48 +- lib/routes/aiea/index.ts | 8 +- lib/routes/aijishu/index.ts | 8 +- lib/routes/aisixiang/thinktank.ts | 2 +- lib/routes/aisixiang/toplist.ts | 4 +- lib/routes/aliresearch/information.ts | 2 +- lib/routes/alistapart/topic.ts | 80 +-- lib/routes/aliyun/notice.ts | 12 +- lib/routes/anquanke/category.ts | 4 +- lib/routes/appleinsider/index.ts | 4 +- lib/routes/arcteryx/new-arrivals.ts | 12 +- lib/routes/arcteryx/outlet.ts | 12 +- lib/routes/atcoder/contest.ts | 24 +- lib/routes/auto-stats/index.ts | 4 +- lib/routes/baidu/tieba/search.ts | 10 +- lib/routes/baidu/top.ts | 4 +- lib/routes/bdys/index.ts | 82 +-- lib/routes/beijingprice/index.ts | 16 +- lib/routes/bendibao/news.ts | 10 +- lib/routes/bilibili/mall-new.ts | 4 +- lib/routes/bilibili/partion.ts | 114 ++-- lib/routes/bilibili/vsearch.ts | 6 +- lib/routes/bjfu/it/index.ts | 4 +- lib/routes/bjfu/jwc/index.ts | 4 +- lib/routes/bjfu/news/index.ts | 4 +- lib/routes/bjsk/keti.ts | 4 +- lib/routes/bjtu/gs.ts | 36 +- lib/routes/bjwxdxh/index.ts | 4 +- lib/routes/bjx/fd.ts | 2 +- lib/routes/bjx/types.ts | 6 +- lib/routes/blizzard/news.ts | 68 +- lib/routes/bloomberg/index.ts | 28 +- lib/routes/bnu/bs.ts | 4 +- lib/routes/bnu/mba.ts | 40 +- lib/routes/boc/whpj.ts | 4 +- lib/routes/bookfere/category.ts | 4 +- lib/routes/bossdesign/index.ts | 4 +- lib/routes/bse/index.ts | 28 +- lib/routes/btzj/index.ts | 24 +- lib/routes/buaa/news/index.ts | 4 +- lib/routes/byau/xinwen/index.ts | 4 +- lib/routes/cahkms/index.ts | 10 +- lib/routes/caixin/category.ts | 18 +- lib/routes/camchina/index.ts | 4 +- lib/routes/cankaoxiaoxi/index.ts | 40 +- lib/routes/cas/cg/index.ts | 4 +- lib/routes/casssp/news.ts | 4 +- lib/routes/cast/index.ts | 18 +- lib/routes/caus/index.ts | 4 +- lib/routes/cbpanet/index.ts | 68 +- lib/routes/ccac/news.ts | 6 +- lib/routes/cccmc/index.ts | 42 +- lib/routes/ccf/ccfcv/index.ts | 4 +- lib/routes/ccf/news.ts | 4 +- lib/routes/ccfa/index.ts | 36 +- lib/routes/cctv/category.ts | 4 +- lib/routes/cctv/lm.ts | 10 +- lib/routes/cde/index.ts | 18 +- lib/routes/cde/xxgk.ts | 4 +- lib/routes/cde/zdyz.ts | 4 +- lib/routes/cdi/index.ts | 4 +- lib/routes/cebbank/history.ts | 6 +- lib/routes/cfachina/analygarden.ts | 4 +- lib/routes/chaping/news.ts | 18 +- lib/routes/chiculture/topic.ts | 4 +- lib/routes/chikubi/navigation.ts | 4 +- lib/routes/china/finance/finance.ts | 4 +- lib/routes/china/news/highlights/news.ts | 6 +- lib/routes/chinacdc/index.ts | 2 +- lib/routes/chinadegrees/province.ts | 66 +- lib/routes/chinaisa/index.ts | 268 ++++---- lib/routes/chinamoney/notice.ts | 34 +- lib/routes/chinania/index.ts | 62 +- lib/routes/chinathinktanks/viewpoint.ts | 92 +-- lib/routes/chinaventure/index.ts | 4 +- lib/routes/chsi/kyzx.ts | 12 +- lib/routes/cib/whpj.ts | 4 +- lib/routes/ciidbnu/index.ts | 4 +- lib/routes/cisia/index.ts | 62 +- lib/routes/cjlu/yjsy/index.ts | 4 +- lib/routes/cls/depth.ts | 4 +- lib/routes/cls/telegraph.ts | 4 +- lib/routes/cma/channel.ts | 40 +- lib/routes/cna/index.ts | 4 +- lib/routes/cnbeta/category.ts | 4 +- lib/routes/cncf/index.ts | 4 +- lib/routes/cneb/yjxw.ts | 4 +- lib/routes/cngold/index.ts | 44 +- lib/routes/cntv/column.ts | 6 +- lib/routes/consumer/index.ts | 12 +- lib/routes/consumer/shopping-guide.ts | 4 +- lib/routes/coolapk/hot.ts | 10 +- lib/routes/coolapk/toutiao.ts | 4 +- lib/routes/coolapk/tuwen.ts | 4 +- lib/routes/counter-strike/news.ts | 6 +- lib/routes/cpcaauto/index.ts | 46 +- lib/routes/cpcey/index.ts | 4 +- lib/routes/cqwu/index.ts | 4 +- lib/routes/crac/index.ts | 4 +- lib/routes/cs/index.ts | 60 +- lib/routes/cs/video.ts | 2 +- lib/routes/cste/index.ts | 4 +- lib/routes/csu/cse.ts | 4 +- lib/routes/csu/mail.ts | 4 +- lib/routes/cts/news.ts | 4 +- lib/routes/cuilingmag/index.ts | 16 +- lib/routes/cw/master.ts | 28 +- lib/routes/cyzone/index.ts | 16 +- lib/routes/dahecube/index.ts | 4 +- lib/routes/dangdang/notice.ts | 8 +- lib/routes/dayanzai/index.ts | 4 +- lib/routes/dcfever/news.ts | 4 +- lib/routes/dcfever/reviews.ts | 4 +- lib/routes/dcfever/trading.ts | 6 +- lib/routes/dedao/index.ts | 4 +- lib/routes/dedao/user.ts | 4 +- lib/routes/deeplearning/the-batch.ts | 48 +- lib/routes/dehenglaw/index.ts | 6 +- lib/routes/dewu/declaration.ts | 10 +- lib/routes/dhu/jiaowu/news.ts | 4 +- lib/routes/dhu/yjs/news.ts | 4 +- lib/routes/dhu/yjs/zs.ts | 4 +- lib/routes/diandong/news.ts | 6 +- lib/routes/dlsite/new.ts | 4 +- lib/routes/dmzj/news.ts | 4 +- lib/routes/dn/news.ts | 24 +- lib/routes/docschina/weekly.ts | 4 +- lib/routes/dongqiudi/special.ts | 4 +- lib/routes/dongqiudi/top-news.ts | 4 +- lib/routes/douban/book/latest.ts | 4 +- lib/routes/douban/book/rank.ts | 4 +- lib/routes/douban/channel/subject.ts | 4 +- lib/routes/douban/channel/topic.ts | 4 +- lib/routes/douban/other/jobs.ts | 4 +- lib/routes/douban/other/latest-music.ts | 4 +- lib/routes/douban/other/list.ts | 48 +- lib/routes/douban/other/recommended.ts | 6 +- lib/routes/douban/other/weekly-best.ts | 4 +- lib/routes/douban/people/status.ts | 30 +- lib/routes/douban/people/wish.ts | 6 +- lib/routes/douyu/group.ts | 4 +- lib/routes/dtcj/datahero.ts | 4 +- lib/routes/dtcj/datainsight.ts | 4 +- lib/routes/dx2025/index.ts | 34 +- lib/routes/dytt/index.ts | 2 +- lib/routes/eagle/changelog.ts | 6 +- lib/routes/earthquake/ceic.ts | 16 +- lib/routes/eastday/24.ts | 10 +- lib/routes/eastmoney/report/index.ts | 4 +- lib/routes/ecust/jwc/notice.ts | 4 +- lib/routes/ekantipur/issue.ts | 6 +- lib/routes/eleduck/posts.ts | 34 +- lib/routes/eprice/rss.ts | 6 +- lib/routes/famitsu/category.ts | 4 +- lib/routes/fantia/search.ts | 70 +-- lib/routes/fashionnetwork/index.ts | 20 +- lib/routes/feng/forum.ts | 4 +- lib/routes/ff14/ff14-global.ts | 10 +- lib/routes/ff14/ff14-zh.ts | 4 +- lib/routes/finology/category.ts | 34 +- lib/routes/finology/tag.ts | 60 +- lib/routes/finviz/news.ts | 4 +- lib/routes/fjksbm/index.ts | 4 +- lib/routes/flyert/creditcard.ts | 40 +- lib/routes/focustaiwan/index.ts | 10 +- lib/routes/followin/index.ts | 12 +- lib/routes/fortnite/news.ts | 6 +- lib/routes/fortunechina/index.ts | 4 +- lib/routes/fx-markets/channel.ts | 4 +- lib/routes/fxiaoke/crm.ts | 4 +- lib/routes/gamer520/index.ts | 6 +- lib/routes/gamersecret/index.ts | 28 +- lib/routes/gcores/category.ts | 4 +- lib/routes/gdsrx/index.ts | 16 +- lib/routes/geekpark/index.ts | 20 +- lib/routes/gelonghui/home.ts | 4 +- lib/routes/gf-cn/news.ts | 4 +- lib/routes/github/search.ts | 10 +- lib/routes/github/topic.ts | 8 +- lib/routes/google/fonts.ts | 4 +- lib/routes/gov/ah/kjt.ts | 36 +- lib/routes/gov/caac/cjwt.ts | 2 +- lib/routes/gov/cbirc/index.ts | 82 +-- lib/routes/gov/chongqing/gzw.ts | 4 +- lib/routes/gov/csrc/csrc.ts | 202 +++--- lib/routes/gov/forestry/gjlckjdjt.ts | 14 +- lib/routes/gov/hebei/czt.ts | 4 +- lib/routes/gov/lswz/index.ts | 64 +- lib/routes/gov/maonan/maonan.ts | 4 +- lib/routes/gov/mem/sgcc.ts | 4 +- lib/routes/gov/mfa/wjdt.ts | 20 +- lib/routes/gov/moa/zdscxx.ts | 4 +- lib/routes/gov/moe/moe.ts | 4 +- lib/routes/gov/mof/bond.ts | 6 +- lib/routes/gov/moj/aac/news.ts | 4 +- lib/routes/gov/npc/index.ts | 4 +- lib/routes/gov/nrta/dsj.ts | 4 +- lib/routes/gov/nrta/news.ts | 4 +- lib/routes/gov/pbc/namespace.ts | 56 +- lib/routes/gov/samr/xgzlyhd.ts | 182 +++--- lib/routes/gov/sh/fgw/index.ts | 6 +- lib/routes/gov/shaanxi/kjt.ts | 4 +- lib/routes/gov/shenzhen/hrss/szksy/index.ts | 4 +- lib/routes/gov/shenzhen/xxgk/zfxxgj.ts | 4 +- lib/routes/gov/shenzhen/zjj/index.ts | 4 +- lib/routes/gov/shenzhen/zzb/index.ts | 4 +- .../gov/sichuan/deyang/govpublicinfo.ts | 4 +- lib/routes/gov/sichuan/deyang/mztoday.ts | 4 +- lib/routes/gov/suzhou/news.ts | 30 +- lib/routes/gov/taiyuan/rsj.ts | 4 +- lib/routes/gov/xuzhou/hrss.ts | 4 +- lib/routes/gov/zhejiang/gwy.ts | 44 +- lib/routes/gov/zhengce/govall.ts | 18 +- lib/routes/grist/topic.ts | 86 +-- lib/routes/guancha/index.ts | 4 +- lib/routes/guancha/member.ts | 4 +- lib/routes/guokr/channel.ts | 4 +- lib/routes/gzdaily/app.ts | 14 +- lib/routes/hacking8/index.ts | 4 +- lib/routes/hafu/news.ts | 4 +- lib/routes/hakkatv/type.ts | 4 +- lib/routes/hbr/topic.ts | 4 +- lib/routes/hellobtc/kepu.ts | 4 +- lib/routes/hellogithub/article.ts | 4 +- lib/routes/hellogithub/index.ts | 4 +- lib/routes/hellogithub/report.ts | 4 +- lib/routes/hfut/hf/notice.ts | 4 +- lib/routes/hfut/xc/notice.ts | 4 +- lib/routes/hinatazaka46/blog.ts | 70 +-- lib/routes/hitcon/zeroday.ts | 4 +- lib/routes/hitsz/article.ts | 4 +- lib/routes/hizu/index.ts | 50 +- lib/routes/hkej/index.ts | 4 +- lib/routes/hkepc/index.ts | 4 +- lib/routes/hket/index.ts | 6 +- lib/routes/hljucm/yjsy.ts | 4 +- lib/routes/hnrb/index.ts | 22 +- lib/routes/hongkong/dh.ts | 6 +- lib/routes/hostmonit/cloudflareyes.ts | 4 +- lib/routes/hoyolab/news.ts | 42 +- lib/routes/hrbeu/job/calendar.ts | 4 +- lib/routes/hrbeu/job/list.ts | 4 +- lib/routes/hrbeu/uae/news.ts | 4 +- lib/routes/hrbeu/ugs/news.ts | 42 +- lib/routes/hrbeu/yjsy/list.ts | 4 +- lib/routes/huanqiu/index.ts | 4 +- lib/routes/hubu/index.ts | 6 +- lib/routes/hubu/zhxy.ts | 38 +- lib/routes/hunau/gfxy/index.ts | 4 +- lib/routes/hunau/ied.ts | 6 +- lib/routes/hunau/jwc.ts | 4 +- lib/routes/hunau/xky/index.ts | 4 +- lib/routes/hupu/index.ts | 4 +- lib/routes/hust/aia/notice.ts | 4 +- lib/routes/hust/gs.ts | 62 +- lib/routes/hust/mse.ts | 132 ++-- lib/routes/huxiu/channel.ts | 16 +- lib/routes/huxiu/member.ts | 4 +- lib/routes/hypergryph/arknights/announce.ts | 12 +- lib/routes/hypergryph/arknights/news.ts | 6 +- lib/routes/ianspriggs/index.ts | 4 +- lib/routes/icbc/whpj.ts | 4 +- lib/routes/idaily/index.ts | 4 +- lib/routes/iehou/index.ts | 6 +- lib/routes/ifeng/feng.ts | 4 +- lib/routes/imdb/chart.ts | 4 +- lib/routes/indienova/column.ts | 40 +- lib/routes/inewsweek/index.ts | 6 +- lib/routes/infzm/index.ts | 6 +- lib/routes/instructables/projects.ts | 4 +- lib/routes/investor/index.ts | 32 +- lib/routes/iresearch/weekly.ts | 2 +- lib/routes/ithome/index.ts | 4 +- lib/routes/ithome/ranking.ts | 4 +- lib/routes/ithome/tw/feeds.ts | 4 +- lib/routes/javdb/actors.ts | 4 +- lib/routes/javdb/index.ts | 18 +- lib/routes/javdb/makers.ts | 4 +- lib/routes/javdb/rankings.ts | 12 +- lib/routes/javdb/search.ts | 12 +- lib/routes/javdb/series.ts | 4 +- lib/routes/javdb/tags.ts | 6 +- lib/routes/javdb/videocodes.ts | 4 +- lib/routes/javlibrary/bestrated.ts | 4 +- lib/routes/javlibrary/bestreviews.ts | 4 +- lib/routes/javlibrary/genre.ts | 4 +- lib/routes/javlibrary/maker.ts | 4 +- lib/routes/javlibrary/mostwanted.ts | 4 +- lib/routes/javlibrary/newrelease.ts | 4 +- lib/routes/javlibrary/star.ts | 4 +- lib/routes/javlibrary/user.ts | 4 +- lib/routes/jinritemai/docs.ts | 12 +- lib/routes/jinse/catalogue.ts | 10 +- lib/routes/jinse/lives.ts | 4 +- lib/routes/jinse/timeline.ts | 6 +- lib/routes/joins/chinese.ts | 30 +- lib/routes/jornada/index.ts | 26 +- lib/routes/jsu/jwc.ts | 4 +- lib/routes/juejin/pins.ts | 4 +- lib/routes/juejin/trending.ts | 34 +- lib/routes/jump/discount.ts | 28 +- lib/routes/kamen-rider-official/news.ts | 62 +- lib/routes/kanxue/topic.ts | 42 +- lib/routes/kaopu/news.ts | 4 +- lib/routes/kbs/news.ts | 4 +- lib/routes/kbs/today.ts | 4 +- lib/routes/kcna/news.ts | 26 +- lib/routes/kemono/index.ts | 6 +- lib/routes/konachan/post.ts | 4 +- lib/routes/latepost/index.ts | 4 +- lib/routes/learnblockchain/posts.ts | 34 +- lib/routes/line/today.ts | 6 +- lib/routes/linkedin/cn/index.ts | 14 +- lib/routes/linkedin/jobs.ts | 28 +- lib/routes/lofter/tag.ts | 4 +- lib/routes/logclub/report.ts | 4 +- lib/routes/loltw/news.ts | 4 +- lib/routes/lovelive-anime/news.ts | 10 +- lib/routes/lovelive-anime/topics.ts | 10 +- lib/routes/lrepacks/index.ts | 22 +- lib/routes/lsnu/jiaowc/tzgg.ts | 4 +- lib/routes/lvv2/news.ts | 10 +- lib/routes/lvv2/top.ts | 10 +- lib/routes/malaysiakini/index.ts | 16 +- lib/routes/matters/latest.ts | 4 +- lib/routes/mckinsey/cn/index.ts | 38 +- lib/routes/medsci/index.ts | 54 +- lib/routes/meishichina/index.ts | 378 +++++------ lib/routes/mihoyo/bbs/img-ranking.ts | 40 +- lib/routes/mihoyo/bbs/official.ts | 12 +- lib/routes/mihoyo/sr/news.ts | 6 +- lib/routes/mihoyo/ys/news.ts | 6 +- lib/routes/mindmeister/example.ts | 54 +- lib/routes/mittrchina/index.ts | 4 +- lib/routes/miui/firmware/index.ts | 12 +- lib/routes/mixcloud/index.ts | 4 +- lib/routes/modian/zhongchou.ts | 36 +- lib/routes/mrm/index.ts | 4 +- lib/routes/mwm/index.ts | 4 +- lib/routes/mydrivers/rank.ts | 4 +- lib/routes/myfigurecollection/activity.ts | 38 +- lib/routes/myfigurecollection/index.ts | 4 +- lib/routes/mygopen/index.ts | 2 +- lib/routes/mysql/release.ts | 2 +- lib/routes/nature/research.ts | 20 +- lib/routes/nbd/index.ts | 4 +- lib/routes/ncc-cma/cmdp.ts | 54 +- lib/routes/ncepu/master/masterinfo.ts | 4 +- lib/routes/neu/bmie.ts | 32 +- lib/routes/neu/news.ts | 32 +- lib/routes/newsmarket/index.ts | 10 +- lib/routes/nextapple/realtime.ts | 10 +- lib/routes/ngocn2/index.ts | 4 +- lib/routes/nikkei/news.ts | 4 +- lib/routes/nippon/index.ts | 4 +- lib/routes/njnu/ceai/ceai.ts | 4 +- lib/routes/njnu/jwc/jwc.ts | 4 +- lib/routes/nju/exchangesys.ts | 4 +- lib/routes/nju/jw.ts | 4 +- lib/routes/nju/rczp.ts | 4 +- lib/routes/nju/scit.ts | 4 +- lib/routes/nju/zbb.ts | 4 +- lib/routes/njupt/jwc.ts | 4 +- lib/routes/njust/cwc.ts | 4 +- lib/routes/njust/dgxg.ts | 4 +- lib/routes/njust/eo.ts | 12 +- lib/routes/njust/eoe.ts | 4 +- lib/routes/njust/gs.ts | 4 +- lib/routes/njust/jwc.ts | 4 +- lib/routes/nlc/read.ts | 6 +- lib/routes/nltimes/news.ts | 4 +- lib/routes/nodejs/blog.ts | 24 +- lib/routes/nogizaka46/blog.ts | 84 +-- lib/routes/nosec/index.ts | 16 +- lib/routes/notefolio/search.ts | 28 +- lib/routes/now/news.ts | 18 +- lib/routes/nowcoder/discuss.ts | 4 +- lib/routes/nowcoder/jobcenter.ts | 12 +- lib/routes/nua/dc.ts | 14 +- lib/routes/nua/gra.ts | 8 +- lib/routes/nua/index.ts | 6 +- lib/routes/nua/lib.ts | 10 +- lib/routes/nua/sxw.ts | 12 +- lib/routes/nuaa/college/cs.ts | 4 +- lib/routes/nuaa/jwc/jwc.ts | 4 +- lib/routes/nuaa/yjsy/yjsy.ts | 4 +- lib/routes/nudt/yjszs.ts | 4 +- lib/routes/nuist/bulletin.ts | 10 +- lib/routes/nuist/cas.ts | 4 +- lib/routes/nuist/jwc.ts | 4 +- lib/routes/nuist/scs.ts | 4 +- lib/routes/nuist/sese.ts | 4 +- lib/routes/nwafu/all.ts | 6 +- lib/routes/odaily/post.ts | 4 +- lib/routes/oncc/money18.ts | 4 +- lib/routes/oo-software/changelog.ts | 10 +- lib/routes/openai/blog.ts | 4 +- lib/routes/openrice/chart.ts | 12 +- lib/routes/openrice/offers.ts | 6 +- lib/routes/openrice/promos.ts | 6 +- lib/routes/openrice/voting.ts | 12 +- lib/routes/oreno3d/main.ts | 4 +- lib/routes/oschina/column.ts | 2 +- lib/routes/oschina/news.ts | 4 +- lib/routes/ouc/it-tx.ts | 4 +- lib/routes/ouc/it.ts | 4 +- lib/routes/panewslab/profundity.ts | 2 +- lib/routes/papers/index.ts | 14 +- lib/routes/papers/query.ts | 8 +- lib/routes/parliament.uk/petitions.ts | 2 +- lib/routes/parliament/section77.ts | 6 +- lib/routes/patagonia/new-arrivals.ts | 4 +- lib/routes/people/liuyan.ts | 4 +- lib/routes/peopo/topic.ts | 36 +- lib/routes/pingwest/tag.ts | 6 +- lib/routes/pingwest/user.ts | 6 +- lib/routes/pku/scc/recruit.ts | 4 +- lib/routes/playno1/av.ts | 6 +- lib/routes/playno1/st.ts | 4 +- lib/routes/plurk/top.ts | 10 +- lib/routes/priconne-redive/news.ts | 6 +- lib/routes/qianzhan/column.ts | 4 +- lib/routes/qianzhan/rank.ts | 4 +- lib/routes/qiche365/recall.ts | 4 +- lib/routes/qm120/news.ts | 16 +- lib/routes/qoo-app/apps/comment.ts | 4 +- lib/routes/qoo-app/news.ts | 4 +- lib/routes/qq/ac/rank.ts | 4 +- lib/routes/qq/cfhd/index.ts | 14 +- lib/routes/qq88/index.ts | 4 +- lib/routes/qqorw/index.ts | 4 +- lib/routes/questmobile/report.ts | 148 ++--- lib/routes/quicker/qa.ts | 24 +- lib/routes/quicker/share.ts | 10 +- lib/routes/quicker/user.ts | 4 +- lib/routes/radio-canada/latest.ts | 4 +- lib/routes/readhub/index.ts | 4 +- lib/routes/rodong/news.ts | 4 +- lib/routes/rsc/journal.ts | 6 +- lib/routes/rsshub/transform/html.ts | 14 +- lib/routes/rsshub/transform/json.ts | 20 +- lib/routes/sakurazaka46/blog.ts | 72 +-- lib/routes/sara/index.ts | 4 +- lib/routes/sass/gs/index.ts | 4 +- lib/routes/science/current.ts | 14 +- lib/routes/sciencenet/blog.ts | 18 +- lib/routes/sctv/programme.ts | 94 +-- lib/routes/scut/gzic/notice.ts | 4 +- lib/routes/scut/jwc/notice.ts | 4 +- lib/routes/scut/jwc/school.ts | 4 +- lib/routes/scut/smae/notice.ts | 4 +- lib/routes/sdu/cmse.ts | 4 +- lib/routes/sdu/epe.ts | 4 +- lib/routes/sdu/gjsw.ts | 4 +- lib/routes/sdu/mech.ts | 4 +- lib/routes/sdu/qd/xszxqd.ts | 4 +- lib/routes/sdu/qd/xyb.ts | 4 +- lib/routes/sdu/sc.ts | 4 +- lib/routes/sdu/wh/jwc.ts | 4 +- lib/routes/sdu/wh/news.ts | 4 +- lib/routes/sdu/ygb.ts | 4 +- lib/routes/sdust/yjsy/zhaosheng.ts | 12 +- lib/routes/seekingalpha/index.ts | 4 +- lib/routes/sehuatang/index.ts | 12 +- lib/routes/sensortower/blog.ts | 4 +- lib/routes/setn/index.ts | 14 +- lib/routes/seu/cse/index.ts | 4 +- lib/routes/seu/yzb/index.ts | 4 +- lib/routes/shiep/index.ts | 32 +- lib/routes/shisu/news.ts | 4 +- lib/routes/shu/global.ts | 4 +- lib/routes/shu/gs.ts | 4 +- lib/routes/shu/index.ts | 4 +- lib/routes/shu/jwb.ts | 4 +- lib/routes/shu/xykd.ts | 4 +- lib/routes/sicau/dky.ts | 4 +- lib/routes/sicau/yan.ts | 4 +- lib/routes/sicau/zsjy.ts | 4 +- lib/routes/simpleinfo/index.ts | 16 +- lib/routes/sina/discovery.ts | 4 +- lib/routes/sina/finance/china.ts | 4 +- lib/routes/sina/finance/stock/usstock.ts | 4 +- lib/routes/sina/rollnews.ts | 4 +- lib/routes/sjtu/gs.ts | 16 +- lib/routes/sjtu/jwc.ts | 4 +- lib/routes/sjtu/tongqu/activity.ts | 4 +- lib/routes/sjtu/yzb/zkxx.ts | 4 +- lib/routes/slowmist/slowmist.ts | 4 +- lib/routes/smashingmagazine/category.ts | 68 +- lib/routes/smzdm/haowen-fenlei.ts | 4 +- lib/routes/sobooks/index.ts | 18 +- lib/routes/sobooks/tag.ts | 14 +- lib/routes/sputniknews/index.ts | 76 +-- lib/routes/sqmc/www.ts | 4 +- lib/routes/sse/sselawsrules.ts | 54 +- lib/routes/startuplatte/index.ts | 4 +- lib/routes/stcn/index.ts | 52 +- lib/routes/storm/index.ts | 4 +- lib/routes/swjtu/xg.ts | 6 +- lib/routes/swpu/bgw.ts | 4 +- lib/routes/swpu/cjxy.ts | 4 +- lib/routes/swpu/dean.ts | 4 +- lib/routes/swpu/dxy.ts | 4 +- lib/routes/swpu/is.ts | 4 +- lib/routes/swpu/scs.ts | 4 +- lib/routes/sysu/ygafz.ts | 10 +- lib/routes/szse/inquire.ts | 10 +- lib/routes/szse/projectdynamic.ts | 42 +- lib/routes/szse/rule.ts | 140 ++--- lib/routes/szu/yz/index.ts | 4 +- lib/routes/t66y/index.ts | 24 +- lib/routes/tangshufang/index.ts | 16 +- lib/routes/taobao/zhongchou.ts | 4 +- lib/routes/taoguba/index.ts | 4 +- lib/routes/taptap/changelog-intl.ts | 6 +- lib/routes/tass/news.ts | 4 +- lib/routes/telecompaper/news.ts | 6 +- lib/routes/telecompaper/search.ts | 12 +- lib/routes/tencent/pvp/newsindex.ts | 4 +- lib/routes/tesla/cx.ts | 92 +-- lib/routes/tgbus/list.ts | 4 +- lib/routes/the/index.ts | 26 +- lib/routes/theatlantic/news.ts | 4 +- lib/routes/theblockbeats/index.ts | 10 +- lib/routes/thecover/channel.ts | 4 +- lib/routes/theinitium/channel.ts | 6 +- lib/routes/themoviedb/sheet.ts | 12 +- lib/routes/thepaper/channel.ts | 28 +- lib/routes/thepaper/list.ts | 196 +++--- lib/routes/thepetcity/index.ts | 12 +- lib/routes/theverge/index.ts | 26 +- lib/routes/thoughtco/index.ts | 586 +++++++++--------- lib/routes/timednews/news.ts | 6 +- lib/routes/tingshuitz/changsha.ts | 8 +- lib/routes/tju/cic/index.ts | 4 +- lib/routes/tju/news/index.ts | 4 +- lib/routes/tju/oaa/index.ts | 4 +- lib/routes/tju/yzb/index.ts | 4 +- lib/routes/tokeninsight/report.ts | 6 +- lib/routes/tongji/sse/notice.ts | 4 +- lib/routes/topys/index.ts | 2 +- lib/routes/tsinghua/lib/zydt.ts | 6 +- lib/routes/tvb/news.ts | 12 +- lib/routes/tvtropes/featured.ts | 4 +- lib/routes/txrjy/fornumtopic.ts | 4 +- lib/routes/ucas/index.ts | 4 +- lib/routes/udn/breaking-news.ts | 4 +- lib/routes/udn/global/index.ts | 4 +- lib/routes/udn/global/tag.ts | 2 +- lib/routes/uestc/cqe.ts | 4 +- lib/routes/uestc/gr.ts | 6 +- lib/routes/uestc/jwc.ts | 6 +- lib/routes/uestc/news.ts | 4 +- lib/routes/uestc/sise.ts | 4 +- lib/routes/ulapia/index.ts | 4 +- lib/routes/upc/jsj.ts | 4 +- lib/routes/upc/jwc.ts | 4 +- lib/routes/upc/main.ts | 4 +- lib/routes/uptimerobot/rss.ts | 4 +- lib/routes/usepanda/index.ts | 4 +- lib/routes/ustb/tj/news.ts | 4 +- lib/routes/ustb/yjsy/news.ts | 4 +- lib/routes/ustc/eeis.ts | 4 +- lib/routes/ustc/gs.ts | 4 +- lib/routes/ustc/index.ts | 4 +- lib/routes/ustc/job.ts | 4 +- lib/routes/ustc/jwc.ts | 4 +- lib/routes/ustc/math.ts | 4 +- lib/routes/ustc/scms.ts | 4 +- lib/routes/ustc/sist.ts | 4 +- lib/routes/usts/jwch.ts | 4 +- lib/routes/utgd/category.ts | 4 +- lib/routes/utgd/topic.ts | 2 +- lib/routes/uw/gix/news.ts | 4 +- lib/routes/vcb-s/category.ts | 4 +- lib/routes/vom/featured.ts | 4 +- lib/routes/wallstreetcn/live.ts | 4 +- lib/routes/wallstreetcn/news.ts | 24 +- lib/routes/wechat/tgchannel.ts | 8 +- lib/routes/wfu/news.ts | 8 +- lib/routes/whitehouse/news.ts | 4 +- lib/routes/who/news-room.ts | 12 +- lib/routes/who/news.ts | 6 +- lib/routes/who/speeches.ts | 6 +- lib/routes/whu/cs.ts | 4 +- lib/routes/whu/gs/index.ts | 4 +- lib/routes/whu/swrh.ts | 4 +- lib/routes/wmpvp/index.ts | 4 +- lib/routes/woshipm/popular.ts | 4 +- lib/routes/wsj/news.ts | 12 +- lib/routes/wsyu/news.ts | 4 +- lib/routes/wtu/index.ts | 4 +- lib/routes/wtu/job.ts | 4 +- lib/routes/wyzxwk/article.ts | 42 +- lib/routes/x6d/index.ts | 34 +- lib/routes/xaufe/jiaowu.ts | 4 +- lib/routes/xaut/index.ts | 4 +- lib/routes/xaut/jwc.ts | 6 +- lib/routes/xaut/rsc.ts | 6 +- lib/routes/xiaoheihe/discount.ts | 4 +- lib/routes/xidian/jwc.ts | 4 +- lib/routes/xinpianchang/rank.ts | 14 +- lib/routes/xjtu/2yuan/news.ts | 22 +- lib/routes/xjtu/job.ts | 6 +- lib/routes/xjtu/std.ts | 4 +- lib/routes/xkb/index.ts | 14 +- lib/routes/xmnn/epaper.ts | 4 +- lib/routes/xueqiu/stock-info.ts | 4 +- lib/routes/xueqiu/timeline.ts | 6 +- lib/routes/xueqiu/user.ts | 4 +- lib/routes/yande/post.ts | 4 +- lib/routes/ycwb/index.ts | 12 +- lib/routes/yicai/dt.ts | 78 +-- lib/routes/yicai/news.ts | 52 +- lib/routes/yicai/video.ts | 72 +-- lib/routes/ymgal/article.ts | 4 +- lib/routes/yomiuri/news.ts | 36 +- lib/routes/youtube/charts.ts | 60 +- lib/routes/youzhiyouxing/materials.ts | 4 +- lib/routes/yuque/book.ts | 4 +- lib/routes/yxdown/news.ts | 4 +- lib/routes/yxdzqb/index.ts | 4 +- lib/routes/yxrb/home.ts | 4 +- lib/routes/yyets/article.ts | 4 +- lib/routes/yystv/category.ts | 4 +- lib/routes/zaobao/realtime.ts | 4 +- lib/routes/zaobao/znews.ts | 4 +- lib/routes/zaozao/article.ts | 4 +- lib/routes/zcmu/jwc/index.ts | 4 +- lib/routes/zcmu/yxy/index.ts | 4 +- lib/routes/zcool/discover.ts | 102 +-- lib/routes/zhitongcaijing/index.ts | 30 +- lib/routes/zhonglun/index.ts | 6 +- lib/routes/zimuxia/index.ts | 4 +- lib/routes/zjol/paper.ts | 4 +- lib/routes/zju/career/index.ts | 4 +- lib/routes/zju/cst/custom.ts | 4 +- lib/routes/zju/cst/index.ts | 4 +- lib/routes/zju/grs/index.ts | 4 +- lib/routes/zju/physics/index.ts | 4 +- lib/routes/zsxq/group.ts | 4 +- lib/routes/zyw/hot.ts | 4 +- 682 files changed, 5458 insertions(+), 5458 deletions(-) diff --git a/lib/routes/005/index.ts b/lib/routes/005/index.ts index 85f9f0d4548f..af4785a5d47d 100644 --- a/lib/routes/005/index.ts +++ b/lib/routes/005/index.ts @@ -108,9 +108,9 @@ export const route: Route = { example: '/005/zx', parameters: { category: '分类,可在对应分类页 URL 中找到,默认为二次元资讯' }, description: ` - | 二次元资讯 | 慢慢说 | 道听途说 | 展会资讯 | - | ---------- | ------ | -------- | -------- | - | zx | zwh | dtts | zh | +| 二次元资讯 | 慢慢说 | 道听途说 | 展会资讯 | +| ---------- | ------ | -------- | -------- | +| zx | zwh | dtts | zh | `, categories: ['anime'], diff --git a/lib/routes/0818tuan/index.ts b/lib/routes/0818tuan/index.ts index 436d28bc786d..d39ee8927076 100644 --- a/lib/routes/0818tuan/index.ts +++ b/lib/routes/0818tuan/index.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 最新线报 | 实测活动 | 优惠券 | - | -------- | -------- | ------ | - | 1 | 2 | 3 |`, +| -------- | -------- | ------ | +| 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/10jqka/realtimenews.ts b/lib/routes/10jqka/realtimenews.ts index 2fca4ec7cf8c..48f821d30969 100644 --- a/lib/routes/10jqka/realtimenews.ts +++ b/lib/routes/10jqka/realtimenews.ts @@ -84,8 +84,8 @@ export const route: Route = { 若订阅 [7×24小时要闻直播](https://news.10jqka.com.cn/realtimenews.html) 的 \`公告\` 和 \`A股\` 标签。将 \`公告,A股\` 作为标签参数填入,此时路由为 [\`/10jqka/realtimenews/公告,A股\`](https://rsshub.app/10jqka/realtimenews/公告,A股)。 ::: - | 全部 | 重要 | A股 | 港股 | 美股 | 机会 | 异动 | 公告 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 全部 | 重要 | A股 | 港股 | 美股 | 机会 | 异动 | 公告 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | `, categories: ['finance'], diff --git a/lib/routes/12371/zxfb.ts b/lib/routes/12371/zxfb.ts index 06d1860d08d2..756779f6fd14 100644 --- a/lib/routes/12371/zxfb.ts +++ b/lib/routes/12371/zxfb.ts @@ -59,6 +59,6 @@ export const route: Route = { handler, url: 'www.12371.cn', description: `| 最新发布 | - | :------: | - | zxfb |`, +| :------: | +| zxfb |`, }; diff --git a/lib/routes/163/exclusive.ts b/lib/routes/163/exclusive.ts index 3a6a6ade0f00..715fbbf05921 100644 --- a/lib/routes/163/exclusive.ts +++ b/lib/routes/163/exclusive.ts @@ -99,23 +99,23 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 分类 | 编号 | - | -------- | ---- | - | 首页 | | - | 轻松一刻 | qsyk | - | 槽值 | cz | - | 人间 | rj | - | 大国小民 | dgxm | - | 三三有梗 | ssyg | - | 数读 | sd | - | 看客 | kk | - | 下划线 | xhx | - | 谈心社 | txs | - | 哒哒 | dd | - | 胖编怪聊 | pbgl | - | 曲一刀 | qyd | - | 今日之声 | jrzs | - | 浪潮 | lc | - | 沸点 | fd |`, +| -------- | ---- | +| 首页 | | +| 轻松一刻 | qsyk | +| 槽值 | cz | +| 人间 | rj | +| 大国小民 | dgxm | +| 三三有梗 | ssyg | +| 数读 | sd | +| 看客 | kk | +| 下划线 | xhx | +| 谈心社 | txs | +| 哒哒 | dd | +| 胖编怪聊 | pbgl | +| 曲一刀 | qyd | +| 今日之声 | jrzs | +| 浪潮 | lc | +| 沸点 | fd |`, }; async function handler(ctx) { diff --git a/lib/routes/163/news/rank.ts b/lib/routes/163/news/rank.ts index acb962191d23..e6210c9ec126 100644 --- a/lib/routes/163/news/rank.ts +++ b/lib/routes/163/news/rank.ts @@ -108,9 +108,9 @@ export const route: Route = { 新闻分类: - | 全站 | 新闻 | 娱乐 | 体育 | 财经 | 科技 | 汽车 | 女人 | 房产 | 游戏 | 旅游 | 教育 | - | ----- | ---- | ------------- | ------ | ----- | ---- | ---- | ---- | ----- | ---- | ------ | ---- | - | whole | news | entertainment | sports | money | tech | auto | lady | house | game | travel | edu |`, +| 全站 | 新闻 | 娱乐 | 体育 | 财经 | 科技 | 汽车 | 女人 | 房产 | 游戏 | 旅游 | 教育 | +| ----- | ---- | ------------- | ------ | ----- | ---- | ---- | ---- | ----- | ---- | ------ | ---- | +| whole | news | entertainment | sports | money | tech | auto | lady | house | game | travel | edu |`, }; async function handler(ctx) { diff --git a/lib/routes/163/news/special.ts b/lib/routes/163/news/special.ts index c80244353cfa..0cebb6b248b9 100644 --- a/lib/routes/163/news/special.ts +++ b/lib/routes/163/news/special.ts @@ -38,8 +38,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 轻松一刻 | 槽值 | 人间 | 大国小民 | 三三有梗 | 数读 | 看客 | 下划线 | 谈心社 | 哒哒 | 胖编怪聊 | 曲一刀 | 今日之声 | 浪潮 | 沸点 | - | -------- | ---- | ---- | -------- | -------- | ---- | ---- | ------ | ------ | ---- | -------- | ------ | -------- | ---- | ---- | - | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |`, +| -------- | ---- | ---- | -------- | -------- | ---- | ---- | ------ | ------ | ---- | -------- | ------ | -------- | ---- | ---- | +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |`, }; async function handler(ctx) { diff --git a/lib/routes/163/renjian.ts b/lib/routes/163/renjian.ts index c7bcaa17a790..21437ee8383b 100644 --- a/lib/routes/163/renjian.ts +++ b/lib/routes/163/renjian.ts @@ -36,8 +36,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 特写 | 记事 | 大写 | 好读 | 看客 | - | ----- | ----- | ----- | ----- | ----- | - | texie | jishi | daxie | haodu | kanke |`, +| ----- | ----- | ----- | ----- | ----- | +| texie | jishi | daxie | haodu | kanke |`, }; async function handler(ctx) { diff --git a/lib/routes/18comic/blogs.ts b/lib/routes/18comic/blogs.ts index 7d2814d72e94..1ccfe302ca5c 100644 --- a/lib/routes/18comic/blogs.ts +++ b/lib/routes/18comic/blogs.ts @@ -30,9 +30,9 @@ export const route: Route = { url: 'jmcomic.group/', description: `分类 - | 全部 | 紳夜食堂 | 遊戲文庫 | JG GAMES | 模型山下 | - | ---- | -------- | -------- | -------- | -------- | - | | dinner | raiders | jg | figure |`, +| 全部 | 紳夜食堂 | 遊戲文庫 | JG GAMES | 模型山下 | +| ---- | -------- | -------- | -------- | -------- | +| | dinner | raiders | jg | figure |`, }; async function handler(ctx) { diff --git a/lib/routes/18comic/index.ts b/lib/routes/18comic/index.ts index 404038b8ee0a..f26042f437ad 100644 --- a/lib/routes/18comic/index.ts +++ b/lib/routes/18comic/index.ts @@ -25,26 +25,26 @@ export const route: Route = { url: 'jmcomic.group/', description: `分类 - | 全部 | 其他漫畫 | 同人 | 韓漫 | 美漫 | 短篇 | 单本 | - | ---- | -------- | ------ | ------ | ------ | ----- | ------ | - | all | another | doujin | hanman | meiman | short | single | +| 全部 | 其他漫畫 | 同人 | 韓漫 | 美漫 | 短篇 | 单本 | +| ---- | -------- | ------ | ------ | ------ | ----- | ------ | +| all | another | doujin | hanman | meiman | short | single | 时间范围 - | 全部 | 今天 | 这周 | 本月 | - | ---- | ---- | ---- | ---- | - | a | t | w | m | +| 全部 | 今天 | 这周 | 本月 | +| ---- | ---- | ---- | ---- | +| a | t | w | m | 排列顺序 - | 最新 | 最多点阅的 | 最多图片 | 最高评分 | 最多评论 | 最多爱心 | - | ---- | ---------- | -------- | -------- | -------- | -------- | - | mr | mv | mp | tr | md | tf | +| 最新 | 最多点阅的 | 最多图片 | 最高评分 | 最多评论 | 最多爱心 | +| ---- | ---------- | -------- | -------- | -------- | -------- | +| mr | mv | mp | tr | md | tf | 关键字(供参考) - | YAOI | 女性向 | NTR | 非 H | 3D | 獵奇 | - | ---- | ------ | --- | ---- | -- | ---- |`, +| YAOI | 女性向 | NTR | 非 H | 3D | 獵奇 | +| ---- | ------ | --- | ---- | -- | ---- |`, }; async function handler(ctx) { diff --git a/lib/routes/19lou/index.ts b/lib/routes/19lou/index.ts index 25b092aca0f1..5869a5f35696 100644 --- a/lib/routes/19lou/index.ts +++ b/lib/routes/19lou/index.ts @@ -34,20 +34,20 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 杭州 | 台州 | 嘉兴 | 宁波 | 湖州 | - | ---- | ------- | ------- | ------ | ------ | - | www | taizhou | jiaxing | ningbo | huzhou | +| ---- | ------- | ------- | ------ | ------ | +| www | taizhou | jiaxing | ningbo | huzhou | - | 绍兴 | 湖州 | 温州 | 金华 | 舟山 | - | -------- | ------ | ------- | ------ | -------- | - | shaoxing | huzhou | wenzhou | jinhua | zhoushan | +| 绍兴 | 湖州 | 温州 | 金华 | 舟山 | +| -------- | ------ | ------- | ------ | -------- | +| shaoxing | huzhou | wenzhou | jinhua | zhoushan | - | 衢州 | 丽水 | 义乌 | 萧山 | 余杭 | - | ------ | ------ | ---- | -------- | ------ | - | quzhou | lishui | yiwu | xiaoshan | yuhang | +| 衢州 | 丽水 | 义乌 | 萧山 | 余杭 | +| ------ | ------ | ---- | -------- | ------ | +| quzhou | lishui | yiwu | xiaoshan | yuhang | - | 临安 | 富阳 | 桐庐 | 建德 | 淳安 | - | ----- | ------ | ------ | ------ | ------ | - | linan | fuyang | tonglu | jiande | chunan |`, +| 临安 | 富阳 | 桐庐 | 建德 | 淳安 | +| ----- | ------ | ------ | ------ | ------ | +| linan | fuyang | tonglu | jiande | chunan |`, }; async function handler(ctx) { diff --git a/lib/routes/1point3acres/blog.ts b/lib/routes/1point3acres/blog.ts index 705473222769..3e1c0f4be0d3 100644 --- a/lib/routes/1point3acres/blog.ts +++ b/lib/routes/1point3acres/blog.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 留学申请 | 找工求职 | 生活攻略 | 投资理财 | 签证移民 | 时政要闻 | - | ---------- | -------- | --------- | -------- | -------- | -------- | - | studyinusa | career | lifestyle | invest | visa | news |`, +| ---------- | -------- | --------- | -------- | -------- | -------- | +| studyinusa | career | lifestyle | invest | visa | news |`, }; async function handler(ctx) { diff --git a/lib/routes/1point3acres/category.ts b/lib/routes/1point3acres/category.ts index f6daec7b6de3..e39a5a566d98 100644 --- a/lib/routes/1point3acres/category.ts +++ b/lib/routes/1point3acres/category.ts @@ -29,15 +29,15 @@ export const route: Route = { 分类 - | 热门帖子 | 最新帖子 | - | -------- | -------- | - | hot | new | +| 热门帖子 | 最新帖子 | +| -------- | -------- | +| hot | new | 排序方式 - | 最新回复 | 最新发布 | - | -------- | -------- | - | | post |`, +| 最新回复 | 最新发布 | +| -------- | -------- | +| | post |`, }; async function handler(ctx) { diff --git a/lib/routes/1point3acres/section.ts b/lib/routes/1point3acres/section.ts index 3b06513764b7..468caafb5168 100644 --- a/lib/routes/1point3acres/section.ts +++ b/lib/routes/1point3acres/section.ts @@ -36,28 +36,28 @@ export const route: Route = { handler, description: `分区 - | 分区 | id | - | -------- | --- | - | 留学申请 | 257 | - | 世界公民 | 379 | - | 投资理财 | 400 | - | 生活干货 | 31 | - | 职场达人 | 345 | - | 人际关系 | 391 | - | 海外求职 | 38 | - | 签证移民 | 265 | +| 分区 | id | +| -------- | --- | +| 留学申请 | 257 | +| 世界公民 | 379 | +| 投资理财 | 400 | +| 生活干货 | 31 | +| 职场达人 | 345 | +| 人际关系 | 391 | +| 海外求职 | 38 | +| 签证移民 | 265 | 分类 - | 热门帖子 | 最新帖子 | - | -------- | -------- | - | hot | new | +| 热门帖子 | 最新帖子 | +| -------- | -------- | +| hot | new | 排序方式 - | 最新回复 | 最新发布 | - | -------- | -------- | - | | post |`, +| 最新回复 | 最新发布 | +| -------- | -------- | +| | post |`, }; async function handler(ctx) { diff --git a/lib/routes/1point3acres/thread.ts b/lib/routes/1point3acres/thread.ts index 48987e0373d1..3a15a5c0bc9a 100644 --- a/lib/routes/1point3acres/thread.ts +++ b/lib/routes/1point3acres/thread.ts @@ -13,15 +13,15 @@ export const route: Route = { url: 'instant.1point3acres.com/', description: `分类 - | 热门帖子 | 最新帖子 | - | -------- | -------- | - | hot | new | +| 热门帖子 | 最新帖子 | +| -------- | -------- | +| hot | new | 排序方式 - | 最新回复 | 最新发布 | - | -------- | -------- | - | | post |`, +| 最新回复 | 最新发布 | +| -------- | -------- | +| | post |`, }; async function handler(ctx) { diff --git a/lib/routes/2023game/index.ts b/lib/routes/2023game/index.ts index 55d900fd0962..c54423178af7 100644 --- a/lib/routes/2023game/index.ts +++ b/lib/routes/2023game/index.ts @@ -26,9 +26,9 @@ export const route: Route = { url: 'www.2023game.com/', description: `分类 - | PS4游戏 | switch游戏 | 3DS游戏 | PSV游戏 | Xbox360 | PS3游戏 | 世嘉MD/SS | PSP游戏 | PC周边 | 怀旧掌机 | 怀旧主机 | PS4教程 | PS4金手指 | switch金手指 | switch教程 | switch补丁 | switch主题 | switch存档 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | ps4 | sgame | 3ds | psv | jiaocheng | ps3yx | zhuji.md | zhangji.psp | pcgame | zhangji | zhuji | ps4.psjc | ps41.ps4pkg | nsaita.cundang | nsaita.pojie | nsaita.buding | nsaita.zhutie | nsaita.zhuti |`, +| PS4游戏 | switch游戏 | 3DS游戏 | PSV游戏 | Xbox360 | PS3游戏 | 世嘉MD/SS | PSP游戏 | PC周边 | 怀旧掌机 | 怀旧主机 | PS4教程 | PS4金手指 | switch金手指 | switch教程 | switch补丁 | switch主题 | switch存档 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| ps4 | sgame | 3ds | psv | jiaocheng | ps3yx | zhuji.md | zhangji.psp | pcgame | zhangji | zhuji | ps4.psjc | ps41.ps4pkg | nsaita.cundang | nsaita.pojie | nsaita.buding | nsaita.zhutie | nsaita.zhuti |`, }; async function handler(ctx: Context): Promise { diff --git a/lib/routes/2048/index.ts b/lib/routes/2048/index.ts index df17b1d8e34b..11e011b1aea5 100644 --- a/lib/routes/2048/index.ts +++ b/lib/routes/2048/index.ts @@ -27,40 +27,40 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 最新合集 | 亞洲無碼 | 日本騎兵 | 歐美新片 | 國內原創 | 中字原創 | 三級寫真 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 3 | 4 | 5 | 13 | 15 | 16 | 18 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 3 | 4 | 5 | 13 | 15 | 16 | 18 | - | 有碼.HD | 亞洲 SM.HD | 日韓 VR/3D | 歐美 VR/3D | S-cute / Mywife / G-area | - | ------- | ---------- | ---------- | ---------- | ------------------------ | - | 116 | 114 | 96 | 97 | 119 | +| 有碼.HD | 亞洲 SM.HD | 日韓 VR/3D | 歐美 VR/3D | S-cute / Mywife / G-area | +| ------- | ---------- | ---------- | ---------- | ------------------------ | +| 116 | 114 | 96 | 97 | 119 | - | 網友自拍 | 亞洲激情 | 歐美激情 | 露出偷窺 | 高跟絲襪 | 卡通漫畫 | 原創达人 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 23 | 24 | 25 | 26 | 27 | 28 | 135 | +| 網友自拍 | 亞洲激情 | 歐美激情 | 露出偷窺 | 高跟絲襪 | 卡通漫畫 | 原創达人 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 23 | 24 | 25 | 26 | 27 | 28 | 135 | - | 唯美清純 | 网络正妹 | 亞洲正妹 | 素人正妹 | COSPLAY | 女优情报 | Gif 动图 | - | -------- | -------- | -------- | -------- | ------- | -------- | -------- | - | 21 | 274 | 276 | 277 | 278 | 29 | | +| 唯美清純 | 网络正妹 | 亞洲正妹 | 素人正妹 | COSPLAY | 女优情报 | Gif 动图 | +| -------- | -------- | -------- | -------- | ------- | -------- | -------- | +| 21 | 274 | 276 | 277 | 278 | 29 | | - | 獨家拍攝 | 稀有首發 | 网络见闻 | 主播實錄 | 珍稀套圖 | 名站同步 | 实用漫画 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 213 | 94 | 283 | 111 | 88 | 131 | 180 | +| 獨家拍攝 | 稀有首發 | 网络见闻 | 主播實錄 | 珍稀套圖 | 名站同步 | 实用漫画 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 213 | 94 | 283 | 111 | 88 | 131 | 180 | - | 网盘二区 | 网盘三区 | 分享福利 | 国产精选 | 高清福利 | 高清首发 | 多挂原创 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 72 | 272 | 195 | 280 | 79 | 216 | 76 | +| 网盘二区 | 网盘三区 | 分享福利 | 国产精选 | 高清福利 | 高清首发 | 多挂原创 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 72 | 272 | 195 | 280 | 79 | 216 | 76 | - | 磁链迅雷 | 正片大片 | H-GAME | 有声小说 | 在线视频 | 在线快播影院 | - | -------- | -------- | ------ | -------- | -------- | ------------ | - | 43 | 67 | 66 | 55 | 78 | 279 | +| 磁链迅雷 | 正片大片 | H-GAME | 有声小说 | 在线视频 | 在线快播影院 | +| -------- | -------- | ------ | -------- | -------- | ------------ | +| 43 | 67 | 66 | 55 | 78 | 279 | - | 综合小说 | 人妻意淫 | 乱伦迷情 | 长篇连载 | 文学作者 | TXT 小说打包 | - | -------- | -------- | -------- | -------- | -------- | ------------ | - | 48 | 103 | 50 | 54 | 100 | 109 | +| 综合小说 | 人妻意淫 | 乱伦迷情 | 长篇连载 | 文学作者 | TXT 小说打包 | +| -------- | -------- | -------- | -------- | -------- | ------------ | +| 48 | 103 | 50 | 54 | 100 | 109 | - | 聚友客栈 | 坛友自售 | - | -------- | -------- | - | 57 | 136 |`, +| 聚友客栈 | 坛友自售 | +| -------- | -------- | +| 57 | 136 |`, }; async function handler(ctx) { diff --git a/lib/routes/21caijing/channel.ts b/lib/routes/21caijing/channel.ts index a57b1db46f43..2170c569c39f 100644 --- a/lib/routes/21caijing/channel.ts +++ b/lib/routes/21caijing/channel.ts @@ -192,7 +192,7 @@ export const route: Route = { :::
- 更多分类 +更多分类 #### [热点](https://m.21jingji.com/#/) diff --git a/lib/routes/36kr/hot-list.ts b/lib/routes/36kr/hot-list.ts index b546d4b1437c..85c537670d71 100644 --- a/lib/routes/36kr/hot-list.ts +++ b/lib/routes/36kr/hot-list.ts @@ -48,8 +48,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 24 小时热榜 | 资讯人气榜 | 资讯综合榜 | 资讯收藏榜 | - | ----------- | ---------- | ---------- | ---------- | - | 24 | renqi | zonghe | shoucang |`, +| ----------- | ---------- | ---------- | ---------- | +| 24 | renqi | zonghe | shoucang |`, }; async function handler(ctx) { diff --git a/lib/routes/36kr/index.ts b/lib/routes/36kr/index.ts index 82b64f29bb82..c4cb54b447ff 100644 --- a/lib/routes/36kr/index.ts +++ b/lib/routes/36kr/index.ts @@ -28,8 +28,8 @@ export const route: Route = { name: '资讯, 快讯, 用户文章, 主题文章, 专题文章, 搜索文章, 搜索快讯', maintainers: ['nczitzk', 'fashioncj'], description: `| 最新资讯频道 | 快讯 | 推荐资讯 | 生活 | 房产 | 职场 | 搜索文章 | 搜索快讯 | - | ------- | -------- | -------- | -------- | -------- | --------| -------- | -------- | - | news | newsflashes | recommend | life | estate | workplace | search/articles/关键词 | search/articles/关键词 |`, +| ------- | -------- | -------- | -------- | -------- | --------| -------- | -------- | +| news | newsflashes | recommend | life | estate | workplace | search/articles/关键词 | search/articles/关键词 |`, handler, }; diff --git a/lib/routes/3dmgame/news-center.ts b/lib/routes/3dmgame/news-center.ts index b8f3b66a79c5..756e10c1583b 100644 --- a/lib/routes/3dmgame/news-center.ts +++ b/lib/routes/3dmgame/news-center.ts @@ -28,8 +28,8 @@ export const route: Route = { maintainers: ['zhboner', 'lyqluis'], handler, description: `| 新闻推荐 | 游戏新闻 | 动漫影视 | 智能数码 | 时事焦点 | - | -------- | -------- | -------- | -------- | ----------- | - | | game | acg | next | news\_36\_1 |`, +| -------- | -------- | -------- | -------- | ----------- | +| | game | acg | next | news\_36\_1 |`, }; async function handler(ctx) { diff --git a/lib/routes/3kns/index.ts b/lib/routes/3kns/index.ts index 2167b3f66f63..d897afc1c8e1 100644 --- a/lib/routes/3kns/index.ts +++ b/lib/routes/3kns/index.ts @@ -30,33 +30,33 @@ export const route: Route = { url: 'www.3kns.com/', description: `游戏类型(category) - | 不限 | 角色扮演 | 动作冒险 | 策略游戏 | 模拟经营 | 即时战略 | 格斗类 | 射击游戏 | 休闲益智 | 体育运动 | 街机格斗 | 无双类 | 其他游戏 | 赛车竞速 | - | ---- | -------- | -------- | -------- | -------- | -------- | ------ | -------- | -------- | -------- | -------- | ------ | -------- | -------- | - | all | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | +| 不限 | 角色扮演 | 动作冒险 | 策略游戏 | 模拟经营 | 即时战略 | 格斗类 | 射击游戏 | 休闲益智 | 体育运动 | 街机格斗 | 无双类 | 其他游戏 | 赛车竞速 | +| ---- | -------- | -------- | -------- | -------- | -------- | ------ | -------- | -------- | -------- | -------- | ------ | -------- | -------- | +| all | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 游戏语言(language) - | 不限 | 中文 | 英语 | 日语 | 其他 | 中文汉化 | 德语 | - | ---- | ---- | ---- | ---- | ---- | -------- | ---- | - | all | 1 | 2 | 3 | 4 | 5 | 6 | +| 不限 | 中文 | 英语 | 日语 | 其他 | 中文汉化 | 德语 | +| ---- | ---- | ---- | ---- | ---- | -------- | ---- | +| all | 1 | 2 | 3 | 4 | 5 | 6 | 游戏标签(tag) - | 不限 | 热门 | 多人聚会 | 僵尸 | 体感 | 大作 | 音乐 | 三国 | RPG | 格斗 | 闯关 | 横版 | 科幻 | 棋牌 | 运输 | 无双 | 卡通动漫 | 日系 | 养成 | 恐怖 | 运动 | 乙女 | 街机 | 飞行模拟 | 解谜 | 海战 | 战争 | 跑酷 | 即时策略 | 射击 | 经营 | 益智 | 沙盒 | 模拟 | 冒险 | 竞速 | 休闲 | 动作 | 生存 | 独立 | 拼图 | 魔改 xci | 卡牌 | 塔防 | - | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ---- | --- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---- | - | all | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | +| 不限 | 热门 | 多人聚会 | 僵尸 | 体感 | 大作 | 音乐 | 三国 | RPG | 格斗 | 闯关 | 横版 | 科幻 | 棋牌 | 运输 | 无双 | 卡通动漫 | 日系 | 养成 | 恐怖 | 运动 | 乙女 | 街机 | 飞行模拟 | 解谜 | 海战 | 战争 | 跑酷 | 即时策略 | 射击 | 经营 | 益智 | 沙盒 | 模拟 | 冒险 | 竞速 | 休闲 | 动作 | 生存 | 独立 | 拼图 | 魔改 xci | 卡牌 | 塔防 | +| ---- | ---- | -------- | ---- | ---- | ---- | ---- | ---- | --- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---- | +| all | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 发售时间(pubDate) - | 不限 | 2017 年 | 2018 年 | 2019 年 | 2020 年 | 2021 年 | 2022 年 | 2023 年 | 2024 年 | - | ---- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | - | all | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | +| 不限 | 2017 年 | 2018 年 | 2019 年 | 2020 年 | 2021 年 | 2022 年 | 2023 年 | 2024 年 | +| ---- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | +| all | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 游戏集合(collection) - | 不限 | 舞力全开 | 马里奥 | 生化危机 | 炼金工房 | 最终幻想 | 塞尔达 | 宝可梦 | 勇者斗恶龙 | 模拟器 | 秋之回忆 | 第一方 | 体感健身 | 开放世界 | 儿童乐园 | - | ---- | -------- | ------ | -------- | -------- | -------- | ------ | ------ | ---------- | ------ | -------- | ------ | -------- | -------- | -------- | - | all | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |`, +| 不限 | 舞力全开 | 马里奥 | 生化危机 | 炼金工房 | 最终幻想 | 塞尔达 | 宝可梦 | 勇者斗恶龙 | 模拟器 | 秋之回忆 | 第一方 | 体感健身 | 开放世界 | 儿童乐园 | +| ---- | -------- | ------ | -------- | -------- | -------- | ------ | ------ | ---------- | ------ | -------- | ------ | -------- | -------- | -------- | +| all | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |`, }; async function handler(ctx: Context): Promise { diff --git a/lib/routes/423down/index.ts b/lib/routes/423down/index.ts index c7aa3d811018..1d18e5132227 100644 --- a/lib/routes/423down/index.ts +++ b/lib/routes/423down/index.ts @@ -130,31 +130,31 @@ export const route: Route = { 若订阅 [Android - 423Down](https://www.423down.com/apk),网址为 \`https://www.423down.com/apk\`。截取 \`https://www.423down.com/\` 到末尾的部分 \`apk\` 作为参数填入,此时路由为 [\`/423down/apk\`](https://rsshub.app/423down/apk)。 ::: - #### [安卓软件](https://www.423down.com/apk) +#### [安卓软件](https://www.423down.com/apk) - | [安卓软件](https://www.423down.com/apk) | - | --------------------------------------- | - | [apk](https://rsshub.app/423down/apk) | +| [安卓软件](https://www.423down.com/apk) | +| --------------------------------------- | +| [apk](https://rsshub.app/423down/apk) | - #### 电脑软件 +#### 电脑软件 - | [原创软件](https://www.423down.com/zd423) | [媒体播放](https://www.423down.com/multimedia) | [网页浏览](https://www.423down.com/browser) | [图形图像](https://www.423down.com/image) | [聊天软件](https://www.423down.com/im) | - | ----------------------------------------- | --------------------------------------------------- | --------------------------------------------- | ----------------------------------------- | -------------------------------------- | - | [zd423](https://rsshub.app/423down/zd423) | [multimedia](https://rsshub.app/423down/multimedia) | [browser](https://rsshub.app/423down/browser) | [image](https://rsshub.app/423down/image) | [im](https://rsshub.app/423down/im) | +| [原创软件](https://www.423down.com/zd423) | [媒体播放](https://www.423down.com/multimedia) | [网页浏览](https://www.423down.com/browser) | [图形图像](https://www.423down.com/image) | [聊天软件](https://www.423down.com/im) | +| ----------------------------------------- | --------------------------------------------------- | --------------------------------------------- | ----------------------------------------- | -------------------------------------- | +| [zd423](https://rsshub.app/423down/zd423) | [multimedia](https://rsshub.app/423down/multimedia) | [browser](https://rsshub.app/423down/browser) | [image](https://rsshub.app/423down/image) | [im](https://rsshub.app/423down/im) | - | [办公软件](https://www.423down.com/work) | [上传下载](https://www.423down.com/down) | [实用软件](https://www.423down.com/softtool) | [系统辅助](https://www.423down.com/systemsoft) | [系统必备](https://www.423down.com/systemplus) | - | ---------------------------------------- | ---------------------------------------- | ----------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | - | [work](https://rsshub.app/423down/work) | [down](https://rsshub.app/423down/down) | [softtool](https://rsshub.app/423down/softtool) | [systemsoft](https://rsshub.app/423down/systemsoft) | [systemplus](https://rsshub.app/423down/systemplus) | +| [办公软件](https://www.423down.com/work) | [上传下载](https://www.423down.com/down) | [实用软件](https://www.423down.com/softtool) | [系统辅助](https://www.423down.com/systemsoft) | [系统必备](https://www.423down.com/systemplus) | +| ---------------------------------------- | ---------------------------------------- | ----------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| [work](https://rsshub.app/423down/work) | [down](https://rsshub.app/423down/down) | [softtool](https://rsshub.app/423down/softtool) | [systemsoft](https://rsshub.app/423down/systemsoft) | [systemplus](https://rsshub.app/423down/systemplus) | - | [安全软件](https://www.423down.com/security) | [补丁相关](https://www.423down.com/patch) | [硬件相关](https://www.423down.com/hardware) | - | ----------------------------------------------- | ----------------------------------------- | ----------------------------------------------- | - | [security](https://rsshub.app/423down/security) | [patch](https://rsshub.app/423down/patch) | [hardware](https://rsshub.app/423down/hardware) | +| [安全软件](https://www.423down.com/security) | [补丁相关](https://www.423down.com/patch) | [硬件相关](https://www.423down.com/hardware) | +| ----------------------------------------------- | ----------------------------------------- | ----------------------------------------------- | +| [security](https://rsshub.app/423down/security) | [patch](https://rsshub.app/423down/patch) | [hardware](https://rsshub.app/423down/hardware) | - #### 操作系统 +#### 操作系统 - | [Windows 11](https://www.423down.com/win11) | [Windows 10](https://www.423down.com/win10) | [Windows 7](https://www.423down.com/win7) | [Windows XP](https://www.423down.com/win7/winxp) | [WinPE](https://www.423down.com/pe-system) | - | ------------------------------------------- | ------------------------------------------- | ----------------------------------------- | --------------------------------------------------- | ------------------------------------------------- | - | [win11](https://rsshub.app/423down/win11) | [win10](https://rsshub.app/423down/win10) | [win7](https://rsshub.app/423down/win7) | [win7/winxp](https://rsshub.app/423down/win7/winxp) | [pe-system](https://rsshub.app/423down/pe-system) | +| [Windows 11](https://www.423down.com/win11) | [Windows 10](https://www.423down.com/win10) | [Windows 7](https://www.423down.com/win7) | [Windows XP](https://www.423down.com/win7/winxp) | [WinPE](https://www.423down.com/pe-system) | +| ------------------------------------------- | ------------------------------------------- | ----------------------------------------- | --------------------------------------------------- | ------------------------------------------------- | +| [win11](https://rsshub.app/423down/win11) | [win10](https://rsshub.app/423down/win10) | [win7](https://rsshub.app/423down/win7) | [win7/winxp](https://rsshub.app/423down/win7/winxp) | [pe-system](https://rsshub.app/423down/pe-system) | `, categories: ['program-update'], diff --git a/lib/routes/56kog/class.ts b/lib/routes/56kog/class.ts index c0f495647181..baeacd026d5f 100644 --- a/lib/routes/56kog/class.ts +++ b/lib/routes/56kog/class.ts @@ -19,12 +19,12 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| [玄幻魔法](https://www.56kog.com/class/1_1.html) | [武侠修真](https://www.56kog.com/class/2_1.html) | [历史军事](https://www.56kog.com/class/4_1.html) | [侦探推理](https://www.56kog.com/class/5_1.html) | [网游动漫](https://www.56kog.com/class/6_1.html) | - | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | - | 1\_1 | 2\_1 | 4\_1 | 5\_1 | 6\_1 | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| 1\_1 | 2\_1 | 4\_1 | 5\_1 | 6\_1 | - | [恐怖灵异](https://www.56kog.com/class/8_1.html) | [都市言情](https://www.56kog.com/class/3_1.html) | [科幻](https://www.56kog.com/class/7_1.html) | [女生小说](https://www.56kog.com/class/9_1.html) | [其他](https://www.56kog.com/class/10_1.html) | - | ------------------------------------------------ | ------------------------------------------------ | -------------------------------------------- | ------------------------------------------------ | --------------------------------------------- | - | 8\_1 | 3\_1 | 7\_1 | 9\_1 | 10\_1 |`, +| [恐怖灵异](https://www.56kog.com/class/8_1.html) | [都市言情](https://www.56kog.com/class/3_1.html) | [科幻](https://www.56kog.com/class/7_1.html) | [女生小说](https://www.56kog.com/class/9_1.html) | [其他](https://www.56kog.com/class/10_1.html) | +| ------------------------------------------------ | ------------------------------------------------ | -------------------------------------------- | ------------------------------------------------ | --------------------------------------------- | +| 8\_1 | 3\_1 | 7\_1 | 9\_1 | 10\_1 |`, }; async function handler(ctx) { diff --git a/lib/routes/56kog/top.ts b/lib/routes/56kog/top.ts index 0f4465f931b3..f4a2b7a9273a 100644 --- a/lib/routes/56kog/top.ts +++ b/lib/routes/56kog/top.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| [周点击榜](https://www.56kog.com/top/weekvisit.html) | [总收藏榜](https://www.56kog.com/top/goodnum.html) | [最新 入库](https://www.56kog.com/top/postdate.html) | - | ---------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- | - | weekvisit | goodnum | postdate |`, +| ---------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- | +| weekvisit | goodnum | postdate |`, }; async function handler(ctx) { diff --git a/lib/routes/78dm/index.ts b/lib/routes/78dm/index.ts index 6b77121bb481..2db355d7e07b 100644 --- a/lib/routes/78dm/index.ts +++ b/lib/routes/78dm/index.ts @@ -148,71 +148,71 @@ export const route: Route = { 若订阅 [精彩评测 - 变形金刚](https://www.78dm.net/eval_list/109/0/0/1.html),网址为 \`https://www.78dm.net/eval_list/109/0/0/1.html\`。截取 \`https://www.78dm.net/\` 到末尾 \`.html\` 的部分 \`eval_list/109/0/0/1\` 作为参数填入,此时路由为 [\`/78dm/eval_list/109/0/0/1\`](https://rsshub.app/78dm/eval_list/109/0/0/1)。 ::: -
- 更多分类 - - #### [新品速递](https://www.78dm.net/news) - - | 分类 | ID | - | -------------------------------------------------------------- | ---------------------------------------------------------------------- | - | [全部](https://www.78dm.net/news/0/0/0/0/0/0/0/1.html) | [news/0/0/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/0/0/0/0/0/0/1) | - | [变形金刚](https://www.78dm.net/news/3/0/0/0/0/0/0/1.html) | [news/3/0/0/0/0/0/0/1](https://rsshub.app/78dm/news/3/0/0/0/0/0/0/1) | - | [高达](https://www.78dm.net/news/4/0/0/0/0/0/0/1.html) | [news/4/0/0/0/0/0/0/1](https://rsshub.app/78dm/news/4/0/0/0/0/0/0/1) | - | [圣斗士](https://www.78dm.net/news/2/0/0/0/0/0/0/1.html) | [news/2/0/0/0/0/0/0/1](https://rsshub.app/78dm/news/2/0/0/0/0/0/0/1) | - | [海贼王](https://www.78dm.net/news/8/0/0/0/0/0/0/1.html) | [news/8/0/0/0/0/0/0/1](https://rsshub.app/78dm/news/8/0/0/0/0/0/0/1) | - | [PVC 手办](https://www.78dm.net/news/0/5/0/0/0/0/0/1.html) | [news/0/5/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/5/0/0/0/0/0/1) | - | [拼装模型](https://www.78dm.net/news/0/1/0/0/0/0/0/1.html) | [news/0/1/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/1/0/0/0/0/0/1) | - | [机甲成品](https://www.78dm.net/news/0/2/0/0/0/0/0/1.html) | [news/0/2/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/2/0/0/0/0/0/1) | - | [特摄](https://www.78dm.net/news/0/3/0/0/0/0/0/1.html) | [news/0/3/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/3/0/0/0/0/0/1) | - | [美系](https://www.78dm.net/news/0/4/0/0/0/0/0/1.html) | [news/0/4/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/4/0/0/0/0/0/1) | - | [GK](https://www.78dm.net/news/0/6/0/0/0/0/0/1.html) | [news/0/6/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/6/0/0/0/0/0/1) | - | [扭蛋盒蛋食玩](https://www.78dm.net/news/0/7/0/0/0/0/0/1.html) | [news/0/7/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/7/0/0/0/0/0/1) | - | [其他](https://www.78dm.net/news/0/8/0/0/0/0/0/1.html) | [news/0/8/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/8/0/0/0/0/0/1) | - | [综合](https://www.78dm.net/news/0/9/0/0/0/0/0/1.html) | [news/0/9/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/9/0/0/0/0/0/1) | - | [军模](https://www.78dm.net/news/0/10/0/0/0/0/0/1.html) | [news/0/10/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/10/0/0/0/0/0/1) | - | [民用](https://www.78dm.net/news/0/11/0/0/0/0/0/1.html) | [news/0/11/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/11/0/0/0/0/0/1) | - | [配件](https://www.78dm.net/news/0/12/0/0/0/0/0/1.html) | [news/0/12/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/12/0/0/0/0/0/1) | - | [工具](https://www.78dm.net/news/0/13/0/0/0/0/0/1.html) | [news/0/13/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/13/0/0/0/0/0/1) | - - #### [精彩评测](https://www.78dm.net/eval_list) - - | 分类 | ID | - | --------------------------------------------------------- | ------------------------------------------------------------------ | - | [全部](https://www.78dm.net/eval_list/0/0/0/1.html) | [eval_list/0/0/0/1](https://rsshub.app/78dm/eval_list/0/0/0/1) | - | [变形金刚](https://www.78dm.net/eval_list/109/0/0/1.html) | [eval_list/109/0/0/1](https://rsshub.app/78dm/eval_list/109/0/0/1) | - | [高达](https://www.78dm.net/eval_list/110/0/0/1.html) | [eval_list/110/0/0/1](https://rsshub.app/78dm/eval_list/110/0/0/1) | - | [圣斗士](https://www.78dm.net/eval_list/111/0/0/1.html) | [eval_list/111/0/0/1](https://rsshub.app/78dm/eval_list/111/0/0/1) | - | [海贼王](https://www.78dm.net/eval_list/112/0/0/1.html) | [eval_list/112/0/0/1](https://rsshub.app/78dm/eval_list/112/0/0/1) | - | [PVC 手办](https://www.78dm.net/eval_list/115/0/0/1.html) | [eval_list/115/0/0/1](https://rsshub.app/78dm/eval_list/115/0/0/1) | - | [拼装模型](https://www.78dm.net/eval_list/113/0/0/1.html) | [eval_list/113/0/0/1](https://rsshub.app/78dm/eval_list/113/0/0/1) | - | [机甲成品](https://www.78dm.net/eval_list/114/0/0/1.html) | [eval_list/114/0/0/1](https://rsshub.app/78dm/eval_list/114/0/0/1) | - | [特摄](https://www.78dm.net/eval_list/116/0/0/1.html) | [eval_list/116/0/0/1](https://rsshub.app/78dm/eval_list/116/0/0/1) | - | [美系](https://www.78dm.net/eval_list/117/0/0/1.html) | [eval_list/117/0/0/1](https://rsshub.app/78dm/eval_list/117/0/0/1) | - | [GK](https://www.78dm.net/eval_list/118/0/0/1.html) | [eval_list/118/0/0/1](https://rsshub.app/78dm/eval_list/118/0/0/1) | - | [综合](https://www.78dm.net/eval_list/120/0/0/1.html) | [eval_list/120/0/0/1](https://rsshub.app/78dm/eval_list/120/0/0/1) | - - #### [好贴推荐](https://www.78dm.net/ht_list) - - | 分类 | ID | - | ------------------------------------------------------- | -------------------------------------------------------------- | - | [全部](https://www.78dm.net/ht_list/0/0/0/1.html) | [ht_list/0/0/0/1](https://rsshub.app/78dm/ht_list/0/0/0/1) | - | [变形金刚](https://www.78dm.net/ht_list/95/0/0/1.html) | [ht_list/95/0/0/1](https://rsshub.app/78dm/ht_list/95/0/0/1) | - | [高达](https://www.78dm.net/ht_list/96/0/0/1.html) | [ht_list/96/0/0/1](https://rsshub.app/78dm/ht_list/96/0/0/1) | - | [圣斗士](https://www.78dm.net/ht_list/98/0/0/1.html) | [ht_list/98/0/0/1](https://rsshub.app/78dm/ht_list/98/0/0/1) | - | [海贼王](https://www.78dm.net/ht_list/99/0/0/1.html) | [ht_list/99/0/0/1](https://rsshub.app/78dm/ht_list/99/0/0/1) | - | [PVC 手办](https://www.78dm.net/ht_list/100/0/0/1.html) | [ht_list/100/0/0/1](https://rsshub.app/78dm/ht_list/100/0/0/1) | - | [拼装模型](https://www.78dm.net/ht_list/101/0/0/1.html) | [ht_list/101/0/0/1](https://rsshub.app/78dm/ht_list/101/0/0/1) | - | [机甲成品](https://www.78dm.net/ht_list/102/0/0/1.html) | [ht_list/102/0/0/1](https://rsshub.app/78dm/ht_list/102/0/0/1) | - | [特摄](https://www.78dm.net/ht_list/103/0/0/1.html) | [ht_list/103/0/0/1](https://rsshub.app/78dm/ht_list/103/0/0/1) | - | [美系](https://www.78dm.net/ht_list/104/0/0/1.html) | [ht_list/104/0/0/1](https://rsshub.app/78dm/ht_list/104/0/0/1) | - | [GK](https://www.78dm.net/ht_list/105/0/0/1.html) | [ht_list/105/0/0/1](https://rsshub.app/78dm/ht_list/105/0/0/1) | - | [综合](https://www.78dm.net/ht_list/107/0/0/1.html) | [ht_list/107/0/0/1](https://rsshub.app/78dm/ht_list/107/0/0/1) | - | [装甲战车](https://www.78dm.net/ht_list/131/0/0/1.html) | [ht_list/131/0/0/1](https://rsshub.app/78dm/ht_list/131/0/0/1) | - | [舰船模型](https://www.78dm.net/ht_list/132/0/0/1.html) | [ht_list/132/0/0/1](https://rsshub.app/78dm/ht_list/132/0/0/1) | - | [飞机模型](https://www.78dm.net/ht_list/133/0/0/1.html) | [ht_list/133/0/0/1](https://rsshub.app/78dm/ht_list/133/0/0/1) | - | [民用模型](https://www.78dm.net/ht_list/134/0/0/1.html) | [ht_list/134/0/0/1](https://rsshub.app/78dm/ht_list/134/0/0/1) | - | [兵人模型](https://www.78dm.net/ht_list/135/0/0/1.html) | [ht_list/135/0/0/1](https://rsshub.app/78dm/ht_list/135/0/0/1) | -
+
+更多分类 + +#### [新品速递](https://www.78dm.net/news) + +| 分类 | ID | +| -------------------------------------------------------------- | ---------------------------------------------------------------------- | +| [全部](https://www.78dm.net/news/0/0/0/0/0/0/0/1.html) | [news/0/0/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/0/0/0/0/0/0/1) | +| [变形金刚](https://www.78dm.net/news/3/0/0/0/0/0/0/1.html) | [news/3/0/0/0/0/0/0/1](https://rsshub.app/78dm/news/3/0/0/0/0/0/0/1) | +| [高达](https://www.78dm.net/news/4/0/0/0/0/0/0/1.html) | [news/4/0/0/0/0/0/0/1](https://rsshub.app/78dm/news/4/0/0/0/0/0/0/1) | +| [圣斗士](https://www.78dm.net/news/2/0/0/0/0/0/0/1.html) | [news/2/0/0/0/0/0/0/1](https://rsshub.app/78dm/news/2/0/0/0/0/0/0/1) | +| [海贼王](https://www.78dm.net/news/8/0/0/0/0/0/0/1.html) | [news/8/0/0/0/0/0/0/1](https://rsshub.app/78dm/news/8/0/0/0/0/0/0/1) | +| [PVC 手办](https://www.78dm.net/news/0/5/0/0/0/0/0/1.html) | [news/0/5/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/5/0/0/0/0/0/1) | +| [拼装模型](https://www.78dm.net/news/0/1/0/0/0/0/0/1.html) | [news/0/1/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/1/0/0/0/0/0/1) | +| [机甲成品](https://www.78dm.net/news/0/2/0/0/0/0/0/1.html) | [news/0/2/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/2/0/0/0/0/0/1) | +| [特摄](https://www.78dm.net/news/0/3/0/0/0/0/0/1.html) | [news/0/3/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/3/0/0/0/0/0/1) | +| [美系](https://www.78dm.net/news/0/4/0/0/0/0/0/1.html) | [news/0/4/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/4/0/0/0/0/0/1) | +| [GK](https://www.78dm.net/news/0/6/0/0/0/0/0/1.html) | [news/0/6/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/6/0/0/0/0/0/1) | +| [扭蛋盒蛋食玩](https://www.78dm.net/news/0/7/0/0/0/0/0/1.html) | [news/0/7/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/7/0/0/0/0/0/1) | +| [其他](https://www.78dm.net/news/0/8/0/0/0/0/0/1.html) | [news/0/8/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/8/0/0/0/0/0/1) | +| [综合](https://www.78dm.net/news/0/9/0/0/0/0/0/1.html) | [news/0/9/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/9/0/0/0/0/0/1) | +| [军模](https://www.78dm.net/news/0/10/0/0/0/0/0/1.html) | [news/0/10/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/10/0/0/0/0/0/1) | +| [民用](https://www.78dm.net/news/0/11/0/0/0/0/0/1.html) | [news/0/11/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/11/0/0/0/0/0/1) | +| [配件](https://www.78dm.net/news/0/12/0/0/0/0/0/1.html) | [news/0/12/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/12/0/0/0/0/0/1) | +| [工具](https://www.78dm.net/news/0/13/0/0/0/0/0/1.html) | [news/0/13/0/0/0/0/0/1](https://rsshub.app/78dm/news/0/13/0/0/0/0/0/1) | + +#### [精彩评测](https://www.78dm.net/eval_list) + +| 分类 | ID | +| --------------------------------------------------------- | ------------------------------------------------------------------ | +| [全部](https://www.78dm.net/eval_list/0/0/0/1.html) | [eval_list/0/0/0/1](https://rsshub.app/78dm/eval_list/0/0/0/1) | +| [变形金刚](https://www.78dm.net/eval_list/109/0/0/1.html) | [eval_list/109/0/0/1](https://rsshub.app/78dm/eval_list/109/0/0/1) | +| [高达](https://www.78dm.net/eval_list/110/0/0/1.html) | [eval_list/110/0/0/1](https://rsshub.app/78dm/eval_list/110/0/0/1) | +| [圣斗士](https://www.78dm.net/eval_list/111/0/0/1.html) | [eval_list/111/0/0/1](https://rsshub.app/78dm/eval_list/111/0/0/1) | +| [海贼王](https://www.78dm.net/eval_list/112/0/0/1.html) | [eval_list/112/0/0/1](https://rsshub.app/78dm/eval_list/112/0/0/1) | +| [PVC 手办](https://www.78dm.net/eval_list/115/0/0/1.html) | [eval_list/115/0/0/1](https://rsshub.app/78dm/eval_list/115/0/0/1) | +| [拼装模型](https://www.78dm.net/eval_list/113/0/0/1.html) | [eval_list/113/0/0/1](https://rsshub.app/78dm/eval_list/113/0/0/1) | +| [机甲成品](https://www.78dm.net/eval_list/114/0/0/1.html) | [eval_list/114/0/0/1](https://rsshub.app/78dm/eval_list/114/0/0/1) | +| [特摄](https://www.78dm.net/eval_list/116/0/0/1.html) | [eval_list/116/0/0/1](https://rsshub.app/78dm/eval_list/116/0/0/1) | +| [美系](https://www.78dm.net/eval_list/117/0/0/1.html) | [eval_list/117/0/0/1](https://rsshub.app/78dm/eval_list/117/0/0/1) | +| [GK](https://www.78dm.net/eval_list/118/0/0/1.html) | [eval_list/118/0/0/1](https://rsshub.app/78dm/eval_list/118/0/0/1) | +| [综合](https://www.78dm.net/eval_list/120/0/0/1.html) | [eval_list/120/0/0/1](https://rsshub.app/78dm/eval_list/120/0/0/1) | + +#### [好贴推荐](https://www.78dm.net/ht_list) + +| 分类 | ID | +| ------------------------------------------------------- | -------------------------------------------------------------- | +| [全部](https://www.78dm.net/ht_list/0/0/0/1.html) | [ht_list/0/0/0/1](https://rsshub.app/78dm/ht_list/0/0/0/1) | +| [变形金刚](https://www.78dm.net/ht_list/95/0/0/1.html) | [ht_list/95/0/0/1](https://rsshub.app/78dm/ht_list/95/0/0/1) | +| [高达](https://www.78dm.net/ht_list/96/0/0/1.html) | [ht_list/96/0/0/1](https://rsshub.app/78dm/ht_list/96/0/0/1) | +| [圣斗士](https://www.78dm.net/ht_list/98/0/0/1.html) | [ht_list/98/0/0/1](https://rsshub.app/78dm/ht_list/98/0/0/1) | +| [海贼王](https://www.78dm.net/ht_list/99/0/0/1.html) | [ht_list/99/0/0/1](https://rsshub.app/78dm/ht_list/99/0/0/1) | +| [PVC 手办](https://www.78dm.net/ht_list/100/0/0/1.html) | [ht_list/100/0/0/1](https://rsshub.app/78dm/ht_list/100/0/0/1) | +| [拼装模型](https://www.78dm.net/ht_list/101/0/0/1.html) | [ht_list/101/0/0/1](https://rsshub.app/78dm/ht_list/101/0/0/1) | +| [机甲成品](https://www.78dm.net/ht_list/102/0/0/1.html) | [ht_list/102/0/0/1](https://rsshub.app/78dm/ht_list/102/0/0/1) | +| [特摄](https://www.78dm.net/ht_list/103/0/0/1.html) | [ht_list/103/0/0/1](https://rsshub.app/78dm/ht_list/103/0/0/1) | +| [美系](https://www.78dm.net/ht_list/104/0/0/1.html) | [ht_list/104/0/0/1](https://rsshub.app/78dm/ht_list/104/0/0/1) | +| [GK](https://www.78dm.net/ht_list/105/0/0/1.html) | [ht_list/105/0/0/1](https://rsshub.app/78dm/ht_list/105/0/0/1) | +| [综合](https://www.78dm.net/ht_list/107/0/0/1.html) | [ht_list/107/0/0/1](https://rsshub.app/78dm/ht_list/107/0/0/1) | +| [装甲战车](https://www.78dm.net/ht_list/131/0/0/1.html) | [ht_list/131/0/0/1](https://rsshub.app/78dm/ht_list/131/0/0/1) | +| [舰船模型](https://www.78dm.net/ht_list/132/0/0/1.html) | [ht_list/132/0/0/1](https://rsshub.app/78dm/ht_list/132/0/0/1) | +| [飞机模型](https://www.78dm.net/ht_list/133/0/0/1.html) | [ht_list/133/0/0/1](https://rsshub.app/78dm/ht_list/133/0/0/1) | +| [民用模型](https://www.78dm.net/ht_list/134/0/0/1.html) | [ht_list/134/0/0/1](https://rsshub.app/78dm/ht_list/134/0/0/1) | +| [兵人模型](https://www.78dm.net/ht_list/135/0/0/1.html) | [ht_list/135/0/0/1](https://rsshub.app/78dm/ht_list/135/0/0/1) | +
`, categories: ['new-media'], diff --git a/lib/routes/7mmtv/index.ts b/lib/routes/7mmtv/index.ts index c50d55e3b593..170f74f03038 100644 --- a/lib/routes/7mmtv/index.ts +++ b/lib/routes/7mmtv/index.ts @@ -27,25 +27,25 @@ export const route: Route = { handler, description: `**Language** - | English | 日本語 | 한국의 | 中文 | - | ------- | ------ | ------ | ---- | - | en | ja | ko | zh | +| English | 日本語 | 한국의 | 中文 | +| ------- | ------ | ------ | ---- | +| en | ja | ko | zh | **Category** - | Chinese subtitles AV | Censored | Amateur | Uncensored | Asian self-timer | H comics | - | -------------------- | -------------- | ---------------- | ---------------- | ---------------- | ------------ | - | chinese\_list | censored\_list | amateurjav\_list | uncensored\_list | amateur\_list | hcomic\_list | +| Chinese subtitles AV | Censored | Amateur | Uncensored | Asian self-timer | H comics | +| -------------------- | -------------- | ---------------- | ---------------- | ---------------- | ------------ | +| chinese\_list | censored\_list | amateurjav\_list | uncensored\_list | amateur\_list | hcomic\_list | - | Chinese subtitles AV random | Censored random | Amateur random | Uncensored random | Asian self-timer random | H comics random | - | --------------------------- | ---------------- | ------------------ | ------------------ | ----------------------- | --------------- | - | chinese\_random | censored\_random | amateurjav\_random | uncensored\_random | amateur\_random | hcomic\_random | +| Chinese subtitles AV random | Censored random | Amateur random | Uncensored random | Asian self-timer random | H comics random | +| --------------------------- | ---------------- | ------------------ | ------------------ | ----------------------- | --------------- | +| chinese\_random | censored\_random | amateurjav\_random | uncensored\_random | amateur\_random | hcomic\_random | **Server** - | All Server | fembed(Full DL) | streamsb(Full DL) | doodstream | streamtape(Full DL) | avgle | embedgram | videovard(Full DL) | - | ---------- | --------------- | ----------------- | ---------- | ------------------- | ----- | --------- | ------------------ | - | all | 21 | 30 | 28 | 29 | 17 | 34 | 33 |`, +| All Server | fembed(Full DL) | streamsb(Full DL) | doodstream | streamtape(Full DL) | avgle | embedgram | videovard(Full DL) | +| ---------- | --------------- | ----------------- | ---------- | ------------------- | ----- | --------- | ------------------ | +| all | 21 | 30 | 28 | 29 | 17 | 34 | 33 |`, }; async function handler(ctx) { diff --git a/lib/routes/8264/list.ts b/lib/routes/8264/list.ts index 9ac5d4883a3a..acdb6ff2bc1a 100644 --- a/lib/routes/8264/list.ts +++ b/lib/routes/8264/list.ts @@ -32,57 +32,57 @@ export const route: Route = { | 751 | 238 | 204 |
- 更多列表 +更多列表 - #### 热门推荐 +#### 热门推荐 - | 业界 | 国际 | 专访 | 图说 | 户外 | 登山 | 攀岩 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 489 | 733 | 746 | 902 | 914 | 934 | 935 | +| 业界 | 国际 | 专访 | 图说 | 户外 | 登山 | 攀岩 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 489 | 733 | 746 | 902 | 914 | 934 | 935 | - #### 户外知识 +#### 户外知识 - | 徒步 | 露营 | 安全急救 | 领队 | 登雪山 | - | ---- | ---- | -------- | ---- | ------ | - | 242 | 950 | 931 | 920 | 915 | +| 徒步 | 露营 | 安全急救 | 领队 | 登雪山 | +| ---- | ---- | -------- | ---- | ------ | +| 242 | 950 | 931 | 920 | 915 | - | 攀岩 | 骑行 | 跑步 | 滑雪 | 水上运动 | - | ---- | ---- | ---- | ---- | -------- | - | 916 | 917 | 918 | 919 | 921 | +| 攀岩 | 骑行 | 跑步 | 滑雪 | 水上运动 | +| ---- | ---- | ---- | ---- | -------- | +| 916 | 917 | 918 | 919 | 921 | - | 钓鱼 | 潜水 | 攀冰 | 冲浪 | 网球 | - | ---- | ---- | ---- | ---- | ---- | - | 951 | 952 | 953 | 966 | 967 | +| 钓鱼 | 潜水 | 攀冰 | 冲浪 | 网球 | +| ---- | ---- | ---- | ---- | ---- | +| 951 | 952 | 953 | 966 | 967 | - | 绳索知识 | 高尔夫 | 马术 | 户外摄影 | 羽毛球 | - | -------- | ------ | ---- | -------- | ------ | - | 968 | 969 | 970 | 973 | 971 | +| 绳索知识 | 高尔夫 | 马术 | 户外摄影 | 羽毛球 | +| -------- | ------ | ---- | -------- | ------ | +| 968 | 969 | 970 | 973 | 971 | - | 游泳 | 溯溪 | 健身 | 瑜伽 | - | ---- | ---- | ---- | ---- | - | 974 | 975 | 976 | 977 | +| 游泳 | 溯溪 | 健身 | 瑜伽 | +| ---- | ---- | ---- | ---- | +| 974 | 975 | 976 | 977 | - #### 户外装备 +#### 户外装备 - | 服装 | 冲锋衣 | 抓绒衣 | 皮肤衣 | 速干衣 | - | ---- | ------ | ------ | ------ | ------ | - | 209 | 923 | 924 | 925 | 926 | +| 服装 | 冲锋衣 | 抓绒衣 | 皮肤衣 | 速干衣 | +| ---- | ------ | ------ | ------ | ------ | +| 209 | 923 | 924 | 925 | 926 | - | 羽绒服 | 软壳 | 户外鞋 | 登山鞋 | 徒步鞋 | - | ------ | ---- | ------ | ------ | ------ | - | 927 | 929 | 211 | 928 | 930 | +| 羽绒服 | 软壳 | 户外鞋 | 登山鞋 | 徒步鞋 | +| ------ | ---- | ------ | ------ | ------ | +| 927 | 929 | 211 | 928 | 930 | - | 越野跑鞋 | 溯溪鞋 | 登山杖 | 帐篷 | 睡袋 | - | -------- | ------ | ------ | ---- | ---- | - | 933 | 932 | 220 | 208 | 212 | +| 越野跑鞋 | 溯溪鞋 | 登山杖 | 帐篷 | 睡袋 | +| -------- | ------ | ------ | ---- | ---- | +| 933 | 932 | 220 | 208 | 212 | - | 炉具 | 灯具 | 水具 | 面料 | 背包 | - | ---- | ---- | ---- | ---- | ---- | - | 792 | 218 | 219 | 222 | 207 | +| 炉具 | 灯具 | 水具 | 面料 | 背包 | +| ---- | ---- | ---- | ---- | ---- | +| 792 | 218 | 219 | 222 | 207 | - | 防潮垫 | 电子导航 | 冰岩绳索 | 综合装备 | - | ------ | -------- | -------- | -------- | - | 214 | 216 | 215 | 223 | +| 防潮垫 | 电子导航 | 冰岩绳索 | 综合装备 | +| ------ | -------- | -------- | -------- | +| 214 | 216 | 215 | 223 |
`, }; diff --git a/lib/routes/91porn/index.ts b/lib/routes/91porn/index.ts index e704db6ae970..43548beeb8bf 100644 --- a/lib/routes/91porn/index.ts +++ b/lib/routes/91porn/index.ts @@ -34,8 +34,8 @@ export const route: Route = { handler, url: '91porn.com/index.php', description: `| English | 简体中文 | 繁體中文 | - | ------- | -------- | -------- | - | en\_US | cn\_CN | zh\_ZH |`, +| ------- | -------- | -------- | +| en\_US | cn\_CN | zh\_ZH |`, }; async function handler(ctx) { diff --git a/lib/routes/95mm/category.ts b/lib/routes/95mm/category.ts index 13e57d6e71e7..877995e83a22 100644 --- a/lib/routes/95mm/category.ts +++ b/lib/routes/95mm/category.ts @@ -24,8 +24,8 @@ export const route: Route = { handler, url: '95mm.org/', description: `| 清纯唯美 | 摄影私房 | 明星写真 | 三次元 | 异域美景 | 性感妖姬 | 游戏主题 | 美女壁纸 | - | -------- | -------- | -------- | ------ | -------- | -------- | -------- | -------- | - | 1 | 2 | 4 | 5 | 6 | 7 | 9 | 11 |`, +| -------- | -------- | -------- | ------ | -------- | -------- | -------- | -------- | +| 1 | 2 | 4 | 5 | 6 | 7 | 9 | 11 |`, }; async function handler(ctx) { diff --git a/lib/routes/95mm/tab.ts b/lib/routes/95mm/tab.ts index e5bdb711bb3a..41b6eb18f521 100644 --- a/lib/routes/95mm/tab.ts +++ b/lib/routes/95mm/tab.ts @@ -24,7 +24,7 @@ export const route: Route = { handler, url: '95mm.org/', description: `| 最新 | 热门 | 校花 | 森系 | 清纯 | 童颜 | 嫩模 | 少女 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |`, +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |`, }; async function handler(ctx) { diff --git a/lib/routes/a9vg/index.ts b/lib/routes/a9vg/index.ts index aef81aed772b..a8921d6423c5 100644 --- a/lib/routes/a9vg/index.ts +++ b/lib/routes/a9vg/index.ts @@ -133,17 +133,17 @@ export const route: Route = { 若订阅 [PS4](http://www.a9vg.com/list/news/PS4),网址为 \`http://www.a9vg.com/list/news/PS4\`。截取 \`http://www.a9vg.com/list\` 到末尾的部分 \`news/PS4\` 作为参数填入,此时路由为 [\`/a9vg/news/PS4\`](https://rsshub.app/a9vg/news/PS4)。 ::: - | 分类 | ID | - | -------------------------------------------------- | ------------------------------------------------------ | - | [All](https://www.a9vg.com/list/news/All) | [news/All](https://rsshub.app/a9vg/news/All) | - | [PS4](https://www.a9vg.com/list/news/PS4) | [news/PS4](https://rsshub.app/a9vg/news/PS4) | - | [PS5](https://www.a9vg.com/list/news/PS5) | [news/PS5](https://rsshub.app/a9vg/news/PS5) | - | [Switch](https://www.a9vg.com/list/news/Switch) | [news/Switch](https://rsshub.app/a9vg/news/Switch) | - | [Xbox One](https://www.a9vg.com/list/news/XboxOne) | [news/XboxOne](https://rsshub.app/a9vg/news/XboxOne) | - | [XSX](https://www.a9vg.com/list/news/XSX) | [news/XSX](https://rsshub.app/a9vg/news/XSX) | - | [PC](https://www.a9vg.com/list/news/PC) | [news/PC](https://rsshub.app/a9vg/news/PC) | - | [业界](https://www.a9vg.com/list/news/Industry) | [news/Industry](https://rsshub.app/a9vg/news/Industry) | - | [厂商](https://www.a9vg.com/list/news/Factory) | [news/Factory](https://rsshub.app/a9vg/news/Factory) | +| 分类 | ID | +| -------------------------------------------------- | ------------------------------------------------------ | +| [All](https://www.a9vg.com/list/news/All) | [news/All](https://rsshub.app/a9vg/news/All) | +| [PS4](https://www.a9vg.com/list/news/PS4) | [news/PS4](https://rsshub.app/a9vg/news/PS4) | +| [PS5](https://www.a9vg.com/list/news/PS5) | [news/PS5](https://rsshub.app/a9vg/news/PS5) | +| [Switch](https://www.a9vg.com/list/news/Switch) | [news/Switch](https://rsshub.app/a9vg/news/Switch) | +| [Xbox One](https://www.a9vg.com/list/news/XboxOne) | [news/XboxOne](https://rsshub.app/a9vg/news/XboxOne) | +| [XSX](https://www.a9vg.com/list/news/XSX) | [news/XSX](https://rsshub.app/a9vg/news/XSX) | +| [PC](https://www.a9vg.com/list/news/PC) | [news/PC](https://rsshub.app/a9vg/news/PC) | +| [业界](https://www.a9vg.com/list/news/Industry) | [news/Industry](https://rsshub.app/a9vg/news/Industry) | +| [厂商](https://www.a9vg.com/list/news/Factory) | [news/Factory](https://rsshub.app/a9vg/news/Factory) | `, categories: ['game'], diff --git a/lib/routes/aamacau/index.ts b/lib/routes/aamacau/index.ts index 9932af8ff0e3..23f8821d902d 100644 --- a/lib/routes/aamacau/index.ts +++ b/lib/routes/aamacau/index.ts @@ -27,8 +27,8 @@ export const route: Route = { handler, url: 'aamacau.com/', description: `| 即時報道 | 每週專題 | 藝文爛鬼樓 | 論盡紙本 | 新聞事件 | 特別企劃 | - | ------------ | ----------- | ---------- | -------- | -------- | -------- | - | breakingnews | weeklytopic | culture | press | case | special | +| ------------ | ----------- | ---------- | -------- | -------- | -------- | +| breakingnews | weeklytopic | culture | press | case | special | ::: tip 除了直接订阅分类全部文章(如 [每週專題](https://aamacau.com/topics/weeklytopic) 的对应路由为 [/aamacau/weeklytopic](https://rsshub.app/aamacau/weeklytopic)),你也可以订阅特定的专题,如 [【9-12】2021 澳門立法會選舉](https://aamacau.com/topics/【9-12】2021澳門立法會選舉) 的对应路由为 [/【9-12】2021 澳門立法會選舉](https://rsshub.app/aamacau/【9-12】2021澳門立法會選舉)。 diff --git a/lib/routes/accessbriefing/index.ts b/lib/routes/accessbriefing/index.ts index 42b829eccabc..76ffeec9a34e 100644 --- a/lib/routes/accessbriefing/index.ts +++ b/lib/routes/accessbriefing/index.ts @@ -127,25 +127,25 @@ export const route: Route = { If you subscribe to [Latest News](https://www.accessbriefing.com/latest/news),where the URL is \`https://www.accessbriefing.com/latest/news\`, extract the part \`https://www.accessbriefing.com/\` to the end, and use it as the parameter to fill in. Therefore, the route will be [\`/accessbriefing/latest/news\`](https://rsshub.app/accessbriefing/latest/news). ::: - #### Latest - - | Category | ID | - | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | - | [News](https://www.accessbriefing.com/latest/news) | [latest/news](https://rsshub.app/target/site/latest/news) | - | [Products & Technology](https://www.accessbriefing.com/latest/products-and-technology) | [latest/products-and-technology](https://rsshub.app/target/site/latest/products-and-technology) | - | [Rental News](https://www.accessbriefing.com/latest/rental-news) | [latest/rental-news](https://rsshub.app/target/site/latest/rental-news) | - | [People](https://www.accessbriefing.com/latest/people) | [latest/people](https://rsshub.app/target/site/latest/people) | - | [Regualtions & Safety](https://www.accessbriefing.com/latest/regualtions-safety) | [latest/regualtions-safety](https://rsshub.app/target/site/latest/regualtions-safety) | - | [Finance](https://www.accessbriefing.com/latest/finance) | [latest/finance](https://rsshub.app/target/site/latest/finance) | - | [Sustainability](https://www.accessbriefing.com/latest/sustainability) | [latest/sustainability](https://rsshub.app/target/site/latest/sustainability) | - - #### Insight - - | Category | ID | - | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | - | [Interviews](https://www.accessbriefing.com/insight/interviews) | [insight/interviews](https://rsshub.app/target/site/insight/interviews) | - | [Longer reads](https://www.accessbriefing.com/insight/longer-reads) | [insight/longer-reads](https://rsshub.app/target/site/insight/longer-reads) | - | [Videos and podcasts](https://www.accessbriefing.com/insight/videos-and-podcasts) | [insight/videos-and-podcasts](https://rsshub.app/target/site/insight/videos-and-podcasts) | +#### Latest + +| Category | ID | +| -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| [News](https://www.accessbriefing.com/latest/news) | [latest/news](https://rsshub.app/target/site/latest/news) | +| [Products & Technology](https://www.accessbriefing.com/latest/products-and-technology) | [latest/products-and-technology](https://rsshub.app/target/site/latest/products-and-technology) | +| [Rental News](https://www.accessbriefing.com/latest/rental-news) | [latest/rental-news](https://rsshub.app/target/site/latest/rental-news) | +| [People](https://www.accessbriefing.com/latest/people) | [latest/people](https://rsshub.app/target/site/latest/people) | +| [Regualtions & Safety](https://www.accessbriefing.com/latest/regualtions-safety) | [latest/regualtions-safety](https://rsshub.app/target/site/latest/regualtions-safety) | +| [Finance](https://www.accessbriefing.com/latest/finance) | [latest/finance](https://rsshub.app/target/site/latest/finance) | +| [Sustainability](https://www.accessbriefing.com/latest/sustainability) | [latest/sustainability](https://rsshub.app/target/site/latest/sustainability) | + +#### Insight + +| Category | ID | +| --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| [Interviews](https://www.accessbriefing.com/insight/interviews) | [insight/interviews](https://rsshub.app/target/site/insight/interviews) | +| [Longer reads](https://www.accessbriefing.com/insight/longer-reads) | [insight/longer-reads](https://rsshub.app/target/site/insight/longer-reads) | +| [Videos and podcasts](https://www.accessbriefing.com/insight/videos-and-podcasts) | [insight/videos-and-podcasts](https://rsshub.app/target/site/insight/videos-and-podcasts) | `, categories: ['new-media'], diff --git a/lib/routes/acfun/article.ts b/lib/routes/acfun/article.ts index 597e3acefb73..f6e4de7a4041 100644 --- a/lib/routes/acfun/article.ts +++ b/lib/routes/acfun/article.ts @@ -78,16 +78,16 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 二次元画师 | 综合 | 生活情感 | 游戏 | 动漫文化 | 漫画文学 | - | ---------- | ---- | -------- | ---- | -------- | -------- | - | 184 | 110 | 73 | 164 | 74 | 75 | +| ---------- | ---- | -------- | ---- | -------- | -------- | +| 184 | 110 | 73 | 164 | 74 | 75 | - | 最新发表 | 最新动态 | 最热文章 | - | ---------- | --------------- | -------- | - | createTime | lastCommentTime | hotScore | +| 最新发表 | 最新动态 | 最热文章 | +| ---------- | --------------- | -------- | +| createTime | lastCommentTime | hotScore | - | 时间不限 | 24 小时 | 三天 | 一周 | 一个月 | - | -------- | ------- | -------- | ------- | -------- | - | all | oneDay | threeDay | oneWeek | oneMonth |`, +| 时间不限 | 24 小时 | 三天 | 一周 | 一个月 | +| -------- | ------- | -------- | ------- | -------- | +| all | oneDay | threeDay | oneWeek | oneMonth |`, }; async function handler(ctx) { diff --git a/lib/routes/afdian/explore.ts b/lib/routes/afdian/explore.ts index 1f51c1d57cd6..e212ca4066c3 100644 --- a/lib/routes/afdian/explore.ts +++ b/lib/routes/afdian/explore.ts @@ -35,15 +35,15 @@ export const route: Route = { maintainers: ['sanmmm'], description: `分类 - | 推荐 | 最热 | - | ---- | ---- | - | rec | hot | +| 推荐 | 最热 | +| ---- | ---- | +| rec | hot | 目录类型 - | 所有 | 绘画 | 视频 | 写作 | 游戏 | 音乐 | 播客 | 摄影 | 技术 | Vtuber | 舞蹈 | 体育 | 旅游 | 美食 | 时尚 | 数码 | 动画 | 其他 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 所有 | 绘画 | 视频 | 写作 | 游戏 | 音乐 | 播客 | 摄影 | 技术 | Vtuber | 舞蹈 | 体育 | 旅游 | 美食 | 时尚 | 数码 | 动画 | 其他 |`, +| 所有 | 绘画 | 视频 | 写作 | 游戏 | 音乐 | 播客 | 摄影 | 技术 | Vtuber | 舞蹈 | 体育 | 旅游 | 美食 | 时尚 | 数码 | 动画 | 其他 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 所有 | 绘画 | 视频 | 写作 | 游戏 | 音乐 | 播客 | 摄影 | 技术 | Vtuber | 舞蹈 | 体育 | 旅游 | 美食 | 时尚 | 数码 | 动画 | 其他 |`, handler, }; diff --git a/lib/routes/agirls/z-index.ts b/lib/routes/agirls/z-index.ts index 71a9d2aaeb12..55092777767d 100644 --- a/lib/routes/agirls/z-index.ts +++ b/lib/routes/agirls/z-index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| App 评测 | 手机开箱 | 笔电开箱 | 3C 周边 | 教学小技巧 | 科技情报 | - | -------- | -------- | -------- | ----------- | ---------- | -------- | - | app | phone | computer | accessories | tutorial | techlife |`, +| -------- | -------- | -------- | ----------- | ---------- | -------- | +| app | phone | computer | accessories | tutorial | techlife |`, }; async function handler(ctx) { diff --git a/lib/routes/agora0/index.ts b/lib/routes/agora0/index.ts index 63b81e780b46..dc287a6a3ffa 100644 --- a/lib/routes/agora0/index.ts +++ b/lib/routes/agora0/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| muitinⒾ | aidemnⒾ | srettaⓂ | qⓅ | sucoⓋ | - | ------- | ------- | -------- | -- | ----- | - | initium | inmedia | matters | pq | vocus |`, +| ------- | ------- | -------- | -- | ----- | +| initium | inmedia | matters | pq | vocus |`, }; async function handler(ctx) { diff --git a/lib/routes/agri/index.ts b/lib/routes/agri/index.ts index 7efa575fca3e..e77a8820aef0 100644 --- a/lib/routes/agri/index.ts +++ b/lib/routes/agri/index.ts @@ -115,58 +115,58 @@ export const route: Route = { 若订阅 [最新发布](http://www.agri.cn/zx/zxfb/),网址为 \`http://www.agri.cn/zx/zxfb/\`。截取 \`https://www.agri.cn/\` 到末尾的部分 \`zx/zxfb\` 作为参数填入,此时路由为 [\`/agri/zx/zxfb\`](https://rsshub.app/agri/zx/zxfb)。 ::: - #### [机构](http://www.agri.cn/jg/) - - | 分类 | ID | - | --------------------------------------- | ------------------------------------------ | - | [成果展示](http://www.agri.cn/jg/cgzs/) | [jg/cgzs](https://rsshub.app/agri/jg/cgzs) | - - #### [资讯](http://www.agri.cn/zx/) - - | 分类 | ID | - | ------------------------------------------- | ------------------------------------------ | - | [最新发布](http://www.agri.cn/zx/zxfb/) | [zx/zxfb](https://rsshub.app/agri/zx/zxfb) | - | [农业要闻](http://www.agri.cn/zx/nyyw/) | [zx/nyyw](https://rsshub.app/agri/zx/nyyw) | - | [中心动态](http://www.agri.cn/zx/zxdt/) | [zx/zxdt](https://rsshub.app/agri/zx/zxdt) | - | [通知公告](http://www.agri.cn/zx/hxgg/) | [zx/hxgg](https://rsshub.app/agri/zx/hxgg) | - | [全国信息联播](http://www.agri.cn/zx/xxlb/) | [zx/xxlb](https://rsshub.app/agri/zx/xxlb) | - - #### [生产](http://www.agri.cn/sc/) - - | 分类 | ID | - | --------------------------------------- | ------------------------------------------ | - | [生产动态](http://www.agri.cn/sc/scdt/) | [sc/scdt](https://rsshub.app/agri/sc/scdt) | - | [农业品种](http://www.agri.cn/sc/nypz/) | [sc/nypz](https://rsshub.app/agri/sc/nypz) | - | [农事指导](http://www.agri.cn/sc/nszd/) | [sc/nszd](https://rsshub.app/agri/sc/nszd) | - | [农业气象](http://www.agri.cn/sc/nyqx/) | [sc/nyqx](https://rsshub.app/agri/sc/nyqx) | - | [专项监测](http://www.agri.cn/sc/zxjc/) | [sc/zxjc](https://rsshub.app/agri/sc/zxjc) | - - #### [数据](http://www.agri.cn/sj/) - - | 分类 | ID | - | --------------------------------------- | ------------------------------------------ | - | [市场动态](http://www.agri.cn/sj/scdt/) | [sj/scdt](https://rsshub.app/agri/sj/scdt) | - | [供需形势](http://www.agri.cn/sj/gxxs/) | [sj/gxxs](https://rsshub.app/agri/sj/gxxs) | - | [监测预警](http://www.agri.cn/sj/jcyj/) | [sj/jcyj](https://rsshub.app/agri/sj/jcyj) | - - #### [信息化](http://www.agri.cn/xxh/) - - | 分类 | ID | - | ---------------------------------------------- | ------------------------------------------------ | - | [智慧农业](http://www.agri.cn/xxh/zhny/) | [xxh/zhny](https://rsshub.app/agri/xxh/zhny) | - | [信息化标准](http://www.agri.cn/xxh/xxhbz/) | [xxh/xxhbz](https://rsshub.app/agri/xxh/xxhbz) | - | [中国乡村资讯](http://www.agri.cn/xxh/zgxczx/) | [xxh/zgxczx](https://rsshub.app/agri/xxh/zgxczx) | - - #### [视频](http://www.agri.cn/video/) - - | 分类 | ID | - | -------------------------------------------------- | ---------------------------------------------------------------- | - | [新闻资讯](http://www.agri.cn/video/xwzx/nyxw/) | [video/xwzx/nyxw](https://rsshub.app/agri/video/xwzx/nyxw) | - | [致富天地](http://www.agri.cn/video/zftd/) | [video/zftd](https://rsshub.app/agri/video/zftd) | - | [地方农业](http://www.agri.cn/video/dfny/beijing/) | [video/dfny/beijing](https://rsshub.app/agri/video/dfny/beijing) | - | [气象农业](http://www.agri.cn/video/qxny/) | [video/qxny](https://rsshub.app/agri/video/qxny) | - | [讲座培训](http://www.agri.cn/video/jzpx/) | [video/jzpx](https://rsshub.app/agri/video/jzpx) | - | [文化生活](http://www.agri.cn/video/whsh/) | [video/whsh](https://rsshub.app/agri/video/whsh) | +#### [机构](http://www.agri.cn/jg/) + +| 分类 | ID | +| --------------------------------------- | ------------------------------------------ | +| [成果展示](http://www.agri.cn/jg/cgzs/) | [jg/cgzs](https://rsshub.app/agri/jg/cgzs) | + +#### [资讯](http://www.agri.cn/zx/) + +| 分类 | ID | +| ------------------------------------------- | ------------------------------------------ | +| [最新发布](http://www.agri.cn/zx/zxfb/) | [zx/zxfb](https://rsshub.app/agri/zx/zxfb) | +| [农业要闻](http://www.agri.cn/zx/nyyw/) | [zx/nyyw](https://rsshub.app/agri/zx/nyyw) | +| [中心动态](http://www.agri.cn/zx/zxdt/) | [zx/zxdt](https://rsshub.app/agri/zx/zxdt) | +| [通知公告](http://www.agri.cn/zx/hxgg/) | [zx/hxgg](https://rsshub.app/agri/zx/hxgg) | +| [全国信息联播](http://www.agri.cn/zx/xxlb/) | [zx/xxlb](https://rsshub.app/agri/zx/xxlb) | + +#### [生产](http://www.agri.cn/sc/) + +| 分类 | ID | +| --------------------------------------- | ------------------------------------------ | +| [生产动态](http://www.agri.cn/sc/scdt/) | [sc/scdt](https://rsshub.app/agri/sc/scdt) | +| [农业品种](http://www.agri.cn/sc/nypz/) | [sc/nypz](https://rsshub.app/agri/sc/nypz) | +| [农事指导](http://www.agri.cn/sc/nszd/) | [sc/nszd](https://rsshub.app/agri/sc/nszd) | +| [农业气象](http://www.agri.cn/sc/nyqx/) | [sc/nyqx](https://rsshub.app/agri/sc/nyqx) | +| [专项监测](http://www.agri.cn/sc/zxjc/) | [sc/zxjc](https://rsshub.app/agri/sc/zxjc) | + +#### [数据](http://www.agri.cn/sj/) + +| 分类 | ID | +| --------------------------------------- | ------------------------------------------ | +| [市场动态](http://www.agri.cn/sj/scdt/) | [sj/scdt](https://rsshub.app/agri/sj/scdt) | +| [供需形势](http://www.agri.cn/sj/gxxs/) | [sj/gxxs](https://rsshub.app/agri/sj/gxxs) | +| [监测预警](http://www.agri.cn/sj/jcyj/) | [sj/jcyj](https://rsshub.app/agri/sj/jcyj) | + +#### [信息化](http://www.agri.cn/xxh/) + +| 分类 | ID | +| ---------------------------------------------- | ------------------------------------------------ | +| [智慧农业](http://www.agri.cn/xxh/zhny/) | [xxh/zhny](https://rsshub.app/agri/xxh/zhny) | +| [信息化标准](http://www.agri.cn/xxh/xxhbz/) | [xxh/xxhbz](https://rsshub.app/agri/xxh/xxhbz) | +| [中国乡村资讯](http://www.agri.cn/xxh/zgxczx/) | [xxh/zgxczx](https://rsshub.app/agri/xxh/zgxczx) | + +#### [视频](http://www.agri.cn/video/) + +| 分类 | ID | +| -------------------------------------------------- | ---------------------------------------------------------------- | +| [新闻资讯](http://www.agri.cn/video/xwzx/nyxw/) | [video/xwzx/nyxw](https://rsshub.app/agri/video/xwzx/nyxw) | +| [致富天地](http://www.agri.cn/video/zftd/) | [video/zftd](https://rsshub.app/agri/video/zftd) | +| [地方农业](http://www.agri.cn/video/dfny/beijing/) | [video/dfny/beijing](https://rsshub.app/agri/video/dfny/beijing) | +| [气象农业](http://www.agri.cn/video/qxny/) | [video/qxny](https://rsshub.app/agri/video/qxny) | +| [讲座培训](http://www.agri.cn/video/jzpx/) | [video/jzpx](https://rsshub.app/agri/video/jzpx) | +| [文化生活](http://www.agri.cn/video/whsh/) | [video/whsh](https://rsshub.app/agri/video/whsh) | `, categories: ['new-media'], diff --git a/lib/routes/aibase/discover.ts b/lib/routes/aibase/discover.ts index 8d7a6cd1c670..09dca068ac73 100644 --- a/lib/routes/aibase/discover.ts +++ b/lib/routes/aibase/discover.ts @@ -90,104 +90,104 @@ export const route: Route = { 若订阅 [图片背景移除](https://top.aibase.com/discover/37-49),网址为 \`https://top.aibase.com/discover/37-49\`。截取 \`https://top.aibase.com/discover/\` 到末尾的部分 \`37-49\` 作为参数填入,此时路由为 [\`/aibase/discover/37-49\`](https://rsshub.app/aibase/discover/37-49)。 ::: -
- 更多分类 +
+更多分类 - #### 图像处理 +#### 图像处理 - | 分类 | ID | - | ----------------------------------------------------- | ------------------------------------------------- | - | [图片背景移除](https://top.aibase.com/discover/37-49) | [37-49](https://rsshub.app/aibase/discover/37-49) | - | [图片无损放大](https://top.aibase.com/discover/37-50) | [37-50](https://rsshub.app/aibase/discover/37-50) | - | [图片AI修复](https://top.aibase.com/discover/37-51) | [37-51](https://rsshub.app/aibase/discover/37-51) | - | [图像生成](https://top.aibase.com/discover/37-52) | [37-52](https://rsshub.app/aibase/discover/37-52) | - | [Ai图片拓展](https://top.aibase.com/discover/37-53) | [37-53](https://rsshub.app/aibase/discover/37-53) | - | [Ai漫画生成](https://top.aibase.com/discover/37-54) | [37-54](https://rsshub.app/aibase/discover/37-54) | - | [Ai生成写真](https://top.aibase.com/discover/37-55) | [37-55](https://rsshub.app/aibase/discover/37-55) | - | [电商图片制作](https://top.aibase.com/discover/37-83) | [37-83](https://rsshub.app/aibase/discover/37-83) | - | [Ai图像转视频](https://top.aibase.com/discover/37-86) | [37-86](https://rsshub.app/aibase/discover/37-86) | +| 分类 | ID | +| ----------------------------------------------------- | ------------------------------------------------- | +| [图片背景移除](https://top.aibase.com/discover/37-49) | [37-49](https://rsshub.app/aibase/discover/37-49) | +| [图片无损放大](https://top.aibase.com/discover/37-50) | [37-50](https://rsshub.app/aibase/discover/37-50) | +| [图片AI修复](https://top.aibase.com/discover/37-51) | [37-51](https://rsshub.app/aibase/discover/37-51) | +| [图像生成](https://top.aibase.com/discover/37-52) | [37-52](https://rsshub.app/aibase/discover/37-52) | +| [Ai图片拓展](https://top.aibase.com/discover/37-53) | [37-53](https://rsshub.app/aibase/discover/37-53) | +| [Ai漫画生成](https://top.aibase.com/discover/37-54) | [37-54](https://rsshub.app/aibase/discover/37-54) | +| [Ai生成写真](https://top.aibase.com/discover/37-55) | [37-55](https://rsshub.app/aibase/discover/37-55) | +| [电商图片制作](https://top.aibase.com/discover/37-83) | [37-83](https://rsshub.app/aibase/discover/37-83) | +| [Ai图像转视频](https://top.aibase.com/discover/37-86) | [37-86](https://rsshub.app/aibase/discover/37-86) | - #### 视频创作 +#### 视频创作 - | 分类 | ID | - | --------------------------------------------------- | ------------------------------------------------- | - | [视频剪辑](https://top.aibase.com/discover/38-56) | [38-56](https://rsshub.app/aibase/discover/38-56) | - | [生成视频](https://top.aibase.com/discover/38-57) | [38-57](https://rsshub.app/aibase/discover/38-57) | - | [Ai动画制作](https://top.aibase.com/discover/38-58) | [38-58](https://rsshub.app/aibase/discover/38-58) | - | [字幕生成](https://top.aibase.com/discover/38-84) | [38-84](https://rsshub.app/aibase/discover/38-84) | +| 分类 | ID | +| --------------------------------------------------- | ------------------------------------------------- | +| [视频剪辑](https://top.aibase.com/discover/38-56) | [38-56](https://rsshub.app/aibase/discover/38-56) | +| [生成视频](https://top.aibase.com/discover/38-57) | [38-57](https://rsshub.app/aibase/discover/38-57) | +| [Ai动画制作](https://top.aibase.com/discover/38-58) | [38-58](https://rsshub.app/aibase/discover/38-58) | +| [字幕生成](https://top.aibase.com/discover/38-84) | [38-84](https://rsshub.app/aibase/discover/38-84) | - #### 效率助手 +#### 效率助手 - | 分类 | ID | - | --------------------------------------------------- | ------------------------------------------------- | - | [AI文档工具](https://top.aibase.com/discover/39-59) | [39-59](https://rsshub.app/aibase/discover/39-59) | - | [PPT](https://top.aibase.com/discover/39-60) | [39-60](https://rsshub.app/aibase/discover/39-60) | - | [思维导图](https://top.aibase.com/discover/39-61) | [39-61](https://rsshub.app/aibase/discover/39-61) | - | [表格处理](https://top.aibase.com/discover/39-62) | [39-62](https://rsshub.app/aibase/discover/39-62) | - | [Ai办公助手](https://top.aibase.com/discover/39-63) | [39-63](https://rsshub.app/aibase/discover/39-63) | +| 分类 | ID | +| --------------------------------------------------- | ------------------------------------------------- | +| [AI文档工具](https://top.aibase.com/discover/39-59) | [39-59](https://rsshub.app/aibase/discover/39-59) | +| [PPT](https://top.aibase.com/discover/39-60) | [39-60](https://rsshub.app/aibase/discover/39-60) | +| [思维导图](https://top.aibase.com/discover/39-61) | [39-61](https://rsshub.app/aibase/discover/39-61) | +| [表格处理](https://top.aibase.com/discover/39-62) | [39-62](https://rsshub.app/aibase/discover/39-62) | +| [Ai办公助手](https://top.aibase.com/discover/39-63) | [39-63](https://rsshub.app/aibase/discover/39-63) | - #### 写作灵感 +#### 写作灵感 - | 分类 | ID | - | ------------------------------------------------- | ------------------------------------------------- | - | [文案写作](https://top.aibase.com/discover/40-64) | [40-64](https://rsshub.app/aibase/discover/40-64) | - | [论文写作](https://top.aibase.com/discover/40-88) | [40-88](https://rsshub.app/aibase/discover/40-88) | +| 分类 | ID | +| ------------------------------------------------- | ------------------------------------------------- | +| [文案写作](https://top.aibase.com/discover/40-64) | [40-64](https://rsshub.app/aibase/discover/40-64) | +| [论文写作](https://top.aibase.com/discover/40-88) | [40-88](https://rsshub.app/aibase/discover/40-88) | - #### 艺术灵感 +#### 艺术灵感 - | 分类 | ID | - | --------------------------------------------------- | ------------------------------------------------- | - | [音乐创作](https://top.aibase.com/discover/41-65) | [41-65](https://rsshub.app/aibase/discover/41-65) | - | [设计创作](https://top.aibase.com/discover/41-66) | [41-66](https://rsshub.app/aibase/discover/41-66) | - | [Ai图标生成](https://top.aibase.com/discover/41-67) | [41-67](https://rsshub.app/aibase/discover/41-67) | +| 分类 | ID | +| --------------------------------------------------- | ------------------------------------------------- | +| [音乐创作](https://top.aibase.com/discover/41-65) | [41-65](https://rsshub.app/aibase/discover/41-65) | +| [设计创作](https://top.aibase.com/discover/41-66) | [41-66](https://rsshub.app/aibase/discover/41-66) | +| [Ai图标生成](https://top.aibase.com/discover/41-67) | [41-67](https://rsshub.app/aibase/discover/41-67) | - #### 趣味 +#### 趣味 - | 分类 | ID | - | ----------------------------------------------------- | ------------------------------------------------- | - | [Ai名字生成器](https://top.aibase.com/discover/42-68) | [42-68](https://rsshub.app/aibase/discover/42-68) | - | [游戏娱乐](https://top.aibase.com/discover/42-71) | [42-71](https://rsshub.app/aibase/discover/42-71) | - | [其他](https://top.aibase.com/discover/42-72) | [42-72](https://rsshub.app/aibase/discover/42-72) | +| 分类 | ID | +| ----------------------------------------------------- | ------------------------------------------------- | +| [Ai名字生成器](https://top.aibase.com/discover/42-68) | [42-68](https://rsshub.app/aibase/discover/42-68) | +| [游戏娱乐](https://top.aibase.com/discover/42-71) | [42-71](https://rsshub.app/aibase/discover/42-71) | +| [其他](https://top.aibase.com/discover/42-72) | [42-72](https://rsshub.app/aibase/discover/42-72) | - #### 开发编程 +#### 开发编程 - | 分类 | ID | - | --------------------------------------------------- | ------------------------------------------------- | - | [开发编程](https://top.aibase.com/discover/43-73) | [43-73](https://rsshub.app/aibase/discover/43-73) | - | [Ai开放平台](https://top.aibase.com/discover/43-74) | [43-74](https://rsshub.app/aibase/discover/43-74) | - | [Ai算力平台](https://top.aibase.com/discover/43-75) | [43-75](https://rsshub.app/aibase/discover/43-75) | +| 分类 | ID | +| --------------------------------------------------- | ------------------------------------------------- | +| [开发编程](https://top.aibase.com/discover/43-73) | [43-73](https://rsshub.app/aibase/discover/43-73) | +| [Ai开放平台](https://top.aibase.com/discover/43-74) | [43-74](https://rsshub.app/aibase/discover/43-74) | +| [Ai算力平台](https://top.aibase.com/discover/43-75) | [43-75](https://rsshub.app/aibase/discover/43-75) | - #### 聊天机器人 +#### 聊天机器人 - | 分类 | ID | - | ------------------------------------------------- | ------------------------------------------------- | - | [智能聊天](https://top.aibase.com/discover/44-76) | [44-76](https://rsshub.app/aibase/discover/44-76) | - | [智能客服](https://top.aibase.com/discover/44-77) | [44-77](https://rsshub.app/aibase/discover/44-77) | +| 分类 | ID | +| ------------------------------------------------- | ------------------------------------------------- | +| [智能聊天](https://top.aibase.com/discover/44-76) | [44-76](https://rsshub.app/aibase/discover/44-76) | +| [智能客服](https://top.aibase.com/discover/44-77) | [44-77](https://rsshub.app/aibase/discover/44-77) | - #### 翻译 +#### 翻译 - | 分类 | ID | - | --------------------------------------------- | ------------------------------------------------- | - | [翻译](https://top.aibase.com/discover/46-79) | [46-79](https://rsshub.app/aibase/discover/46-79) | +| 分类 | ID | +| --------------------------------------------- | ------------------------------------------------- | +| [翻译](https://top.aibase.com/discover/46-79) | [46-79](https://rsshub.app/aibase/discover/46-79) | - #### 教育学习 +#### 教育学习 - | 分类 | ID | - | ------------------------------------------------- | ------------------------------------------------- | - | [教育学习](https://top.aibase.com/discover/47-80) | [47-80](https://rsshub.app/aibase/discover/47-80) | +| 分类 | ID | +| ------------------------------------------------- | ------------------------------------------------- | +| [教育学习](https://top.aibase.com/discover/47-80) | [47-80](https://rsshub.app/aibase/discover/47-80) | - #### 智能营销 +#### 智能营销 - | 分类 | ID | - | ------------------------------------------------- | ------------------------------------------------- | - | [智能营销](https://top.aibase.com/discover/48-81) | [48-81](https://rsshub.app/aibase/discover/48-81) | +| 分类 | ID | +| ------------------------------------------------- | ------------------------------------------------- | +| [智能营销](https://top.aibase.com/discover/48-81) | [48-81](https://rsshub.app/aibase/discover/48-81) | - #### 法律 +#### 法律 - | 分类 | ID | - | ----------------------------------------------- | ----------------------------------------------------- | - | [法律](https://top.aibase.com/discover/138-139) | [138-139](https://rsshub.app/aibase/discover/138-139) | -
+| 分类 | ID | +| ----------------------------------------------- | ----------------------------------------------------- | +| [法律](https://top.aibase.com/discover/138-139) | [138-139](https://rsshub.app/aibase/discover/138-139) | +
`, categories: ['new-media', 'popular'], diff --git a/lib/routes/aibase/topic.ts b/lib/routes/aibase/topic.ts index aca184ec28f0..3a9e4171791b 100644 --- a/lib/routes/aibase/topic.ts +++ b/lib/routes/aibase/topic.ts @@ -64,31 +64,31 @@ export const route: Route = { 此处查看 [全部标签](https://top.aibase.com/topic) ::: -
- 更多标签 +
+更多标签 - | [AI](https://top.aibase.com/topic/AI) | [人工智能](https://top.aibase.com/topic/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD) | [图像生成](https://top.aibase.com/topic/%E5%9B%BE%E5%83%8F%E7%94%9F%E6%88%90) | [自动化](https://top.aibase.com/topic/%E8%87%AA%E5%8A%A8%E5%8C%96) | [AI 助手](https://top.aibase.com/topic/AI%E5%8A%A9%E6%89%8B) | - | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | - | [聊天机器人](https://top.aibase.com/topic/%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA) | [个性化](https://top.aibase.com/topic/%E4%B8%AA%E6%80%A7%E5%8C%96) | [社交媒体](https://top.aibase.com/topic/%E7%A4%BE%E4%BA%A4%E5%AA%92%E4%BD%93) | [图像处理](https://top.aibase.com/topic/%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86) | [数据分析](https://top.aibase.com/topic/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90) | - | [自然语言处理](https://top.aibase.com/topic/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86) | [聊天](https://top.aibase.com/topic/%E8%81%8A%E5%A4%A9) | [机器学习](https://top.aibase.com/topic/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0) | [教育](https://top.aibase.com/topic/%E6%95%99%E8%82%B2) | [内容创作](https://top.aibase.com/topic/%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C) | - | [生产力](https://top.aibase.com/topic/%E7%94%9F%E4%BA%A7%E5%8A%9B) | [设计](https://top.aibase.com/topic/%E8%AE%BE%E8%AE%A1) | [ChatGPT](https://top.aibase.com/topic/ChatGPT) | [创意](https://top.aibase.com/topic/%E5%88%9B%E6%84%8F) | [开源](https://top.aibase.com/topic/%E5%BC%80%E6%BA%90) | - | [写作](https://top.aibase.com/topic/%E5%86%99%E4%BD%9C) | [效率助手](https://top.aibase.com/topic/%E6%95%88%E7%8E%87%E5%8A%A9%E6%89%8B) | [学习](https://top.aibase.com/topic/%E5%AD%A6%E4%B9%A0) | [插件](https://top.aibase.com/topic/%E6%8F%92%E4%BB%B6) | [翻译](https://top.aibase.com/topic/%E7%BF%BB%E8%AF%91) | - | [团队协作](https://top.aibase.com/topic/%E5%9B%A2%E9%98%9F%E5%8D%8F%E4%BD%9C) | [SEO](https://top.aibase.com/topic/SEO) | [营销](https://top.aibase.com/topic/%E8%90%A5%E9%94%80) | [内容生成](https://top.aibase.com/topic/%E5%86%85%E5%AE%B9%E7%94%9F%E6%88%90) | [AI 技术](https://top.aibase.com/topic/AI%E6%8A%80%E6%9C%AF) | - | [AI 工具](https://top.aibase.com/topic/AI%E5%B7%A5%E5%85%B7) | [智能助手](https://top.aibase.com/topic/%E6%99%BA%E8%83%BD%E5%8A%A9%E6%89%8B) | [深度学习](https://top.aibase.com/topic/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0) | [多语言支持](https://top.aibase.com/topic/%E5%A4%9A%E8%AF%AD%E8%A8%80%E6%94%AF%E6%8C%81) | [视频](https://top.aibase.com/topic/%E8%A7%86%E9%A2%91) | - | [艺术](https://top.aibase.com/topic/%E8%89%BA%E6%9C%AF) | [文本生成](https://top.aibase.com/topic/%E6%96%87%E6%9C%AC%E7%94%9F%E6%88%90) | [开发编程](https://top.aibase.com/topic/%E5%BC%80%E5%8F%91%E7%BC%96%E7%A8%8B) | [协作](https://top.aibase.com/topic/%E5%8D%8F%E4%BD%9C) | [语言模型](https://top.aibase.com/topic/%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B) | - | [工具](https://top.aibase.com/topic/%E5%B7%A5%E5%85%B7) | [销售](https://top.aibase.com/topic/%E9%94%80%E5%94%AE) | [生产力工具](https://top.aibase.com/topic/%E7%94%9F%E4%BA%A7%E5%8A%9B%E5%B7%A5%E5%85%B7) | [AI 写作](https://top.aibase.com/topic/AI%E5%86%99%E4%BD%9C) | [创作](https://top.aibase.com/topic/%E5%88%9B%E4%BD%9C) | - | [工作效率](https://top.aibase.com/topic/%E5%B7%A5%E4%BD%9C%E6%95%88%E7%8E%87) | [无代码](https://top.aibase.com/topic/%E6%97%A0%E4%BB%A3%E7%A0%81) | [隐私保护](https://top.aibase.com/topic/%E9%9A%90%E7%A7%81%E4%BF%9D%E6%8A%A4) | [视频编辑](https://top.aibase.com/topic/%E8%A7%86%E9%A2%91%E7%BC%96%E8%BE%91) | [摘要](https://top.aibase.com/topic/%E6%91%98%E8%A6%81) | - | [多语言](https://top.aibase.com/topic/%E5%A4%9A%E8%AF%AD%E8%A8%80) | [求职](https://top.aibase.com/topic/%E6%B1%82%E8%81%8C) | [GPT](https://top.aibase.com/topic/GPT) | [音乐](https://top.aibase.com/topic/%E9%9F%B3%E4%B9%90) | [视频创作](https://top.aibase.com/topic/%E8%A7%86%E9%A2%91%E5%88%9B%E4%BD%9C) | - | [设计工具](https://top.aibase.com/topic/%E8%AE%BE%E8%AE%A1%E5%B7%A5%E5%85%B7) | [搜索](https://top.aibase.com/topic/%E6%90%9C%E7%B4%A2) | [写作工具](https://top.aibase.com/topic/%E5%86%99%E4%BD%9C%E5%B7%A5%E5%85%B7) | [视频生成](https://top.aibase.com/topic/%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90) | [招聘](https://top.aibase.com/topic/%E6%8B%9B%E8%81%98) | - | [代码生成](https://top.aibase.com/topic/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90) | [大型语言模型](https://top.aibase.com/topic/%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B) | [语音识别](https://top.aibase.com/topic/%E8%AF%AD%E9%9F%B3%E8%AF%86%E5%88%AB) | [编程](https://top.aibase.com/topic/%E7%BC%96%E7%A8%8B) | [在线工具](https://top.aibase.com/topic/%E5%9C%A8%E7%BA%BF%E5%B7%A5%E5%85%B7) | - | [API](https://top.aibase.com/topic/API) | [趣味](https://top.aibase.com/topic/%E8%B6%A3%E5%91%B3) | [客户支持](https://top.aibase.com/topic/%E5%AE%A2%E6%88%B7%E6%94%AF%E6%8C%81) | [语音合成](https://top.aibase.com/topic/%E8%AF%AD%E9%9F%B3%E5%90%88%E6%88%90) | [图像](https://top.aibase.com/topic/%E5%9B%BE%E5%83%8F) | - | [电子商务](https://top.aibase.com/topic/%E7%94%B5%E5%AD%90%E5%95%86%E5%8A%A1) | [SEO 优化](https://top.aibase.com/topic/SEO%E4%BC%98%E5%8C%96) | [AI 辅助](https://top.aibase.com/topic/AI%E8%BE%85%E5%8A%A9) | [AI 生成](https://top.aibase.com/topic/AI%E7%94%9F%E6%88%90) | [创作工具](https://top.aibase.com/topic/%E5%88%9B%E4%BD%9C%E5%B7%A5%E5%85%B7) | - | [免费](https://top.aibase.com/topic/%E5%85%8D%E8%B4%B9) | [LinkedIn](https://top.aibase.com/topic/LinkedIn) | [博客](https://top.aibase.com/topic/%E5%8D%9A%E5%AE%A2) | [写作助手](https://top.aibase.com/topic/%E5%86%99%E4%BD%9C%E5%8A%A9%E6%89%8B) | [助手](https://top.aibase.com/topic/%E5%8A%A9%E6%89%8B) | - | [智能](https://top.aibase.com/topic/%E6%99%BA%E8%83%BD) | [健康](https://top.aibase.com/topic/%E5%81%A5%E5%BA%B7) | [多模态](https://top.aibase.com/topic/%E5%A4%9A%E6%A8%A1%E6%80%81) | [任务管理](https://top.aibase.com/topic/%E4%BB%BB%E5%8A%A1%E7%AE%A1%E7%90%86) | [电子邮件](https://top.aibase.com/topic/%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6) | - | [笔记](https://top.aibase.com/topic/%E7%AC%94%E8%AE%B0) | [搜索引擎](https://top.aibase.com/topic/%E6%90%9C%E7%B4%A2%E5%BC%95%E6%93%8E) | [计算机视觉](https://top.aibase.com/topic/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89) | [社区](https://top.aibase.com/topic/%E7%A4%BE%E5%8C%BA) | [效率](https://top.aibase.com/topic/%E6%95%88%E7%8E%87) | - | [知识管理](https://top.aibase.com/topic/%E7%9F%A5%E8%AF%86%E7%AE%A1%E7%90%86) | [LLM](https://top.aibase.com/topic/LLM) | [智能聊天](https://top.aibase.com/topic/%E6%99%BA%E8%83%BD%E8%81%8A%E5%A4%A9) | [社交](https://top.aibase.com/topic/%E7%A4%BE%E4%BA%A4) | [语言学习](https://top.aibase.com/topic/%E8%AF%AD%E8%A8%80%E5%AD%A6%E4%B9%A0) | - | [娱乐](https://top.aibase.com/topic/%E5%A8%B1%E4%B9%90) | [简历](https://top.aibase.com/topic/%E7%AE%80%E5%8E%86) | [OpenAI](https://top.aibase.com/topic/OpenAI) | [客户服务](https://top.aibase.com/topic/%E5%AE%A2%E6%88%B7%E6%9C%8D%E5%8A%A1) | [室内设计](https://top.aibase.com/topic/%E5%AE%A4%E5%86%85%E8%AE%BE%E8%AE%A1) | -
+| [AI](https://top.aibase.com/topic/AI) | [人工智能](https://top.aibase.com/topic/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD) | [图像生成](https://top.aibase.com/topic/%E5%9B%BE%E5%83%8F%E7%94%9F%E6%88%90) | [自动化](https://top.aibase.com/topic/%E8%87%AA%E5%8A%A8%E5%8C%96) | [AI 助手](https://top.aibase.com/topic/AI%E5%8A%A9%E6%89%8B) | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| [聊天机器人](https://top.aibase.com/topic/%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA) | [个性化](https://top.aibase.com/topic/%E4%B8%AA%E6%80%A7%E5%8C%96) | [社交媒体](https://top.aibase.com/topic/%E7%A4%BE%E4%BA%A4%E5%AA%92%E4%BD%93) | [图像处理](https://top.aibase.com/topic/%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86) | [数据分析](https://top.aibase.com/topic/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90) | +| [自然语言处理](https://top.aibase.com/topic/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86) | [聊天](https://top.aibase.com/topic/%E8%81%8A%E5%A4%A9) | [机器学习](https://top.aibase.com/topic/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0) | [教育](https://top.aibase.com/topic/%E6%95%99%E8%82%B2) | [内容创作](https://top.aibase.com/topic/%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C) | +| [生产力](https://top.aibase.com/topic/%E7%94%9F%E4%BA%A7%E5%8A%9B) | [设计](https://top.aibase.com/topic/%E8%AE%BE%E8%AE%A1) | [ChatGPT](https://top.aibase.com/topic/ChatGPT) | [创意](https://top.aibase.com/topic/%E5%88%9B%E6%84%8F) | [开源](https://top.aibase.com/topic/%E5%BC%80%E6%BA%90) | +| [写作](https://top.aibase.com/topic/%E5%86%99%E4%BD%9C) | [效率助手](https://top.aibase.com/topic/%E6%95%88%E7%8E%87%E5%8A%A9%E6%89%8B) | [学习](https://top.aibase.com/topic/%E5%AD%A6%E4%B9%A0) | [插件](https://top.aibase.com/topic/%E6%8F%92%E4%BB%B6) | [翻译](https://top.aibase.com/topic/%E7%BF%BB%E8%AF%91) | +| [团队协作](https://top.aibase.com/topic/%E5%9B%A2%E9%98%9F%E5%8D%8F%E4%BD%9C) | [SEO](https://top.aibase.com/topic/SEO) | [营销](https://top.aibase.com/topic/%E8%90%A5%E9%94%80) | [内容生成](https://top.aibase.com/topic/%E5%86%85%E5%AE%B9%E7%94%9F%E6%88%90) | [AI 技术](https://top.aibase.com/topic/AI%E6%8A%80%E6%9C%AF) | +| [AI 工具](https://top.aibase.com/topic/AI%E5%B7%A5%E5%85%B7) | [智能助手](https://top.aibase.com/topic/%E6%99%BA%E8%83%BD%E5%8A%A9%E6%89%8B) | [深度学习](https://top.aibase.com/topic/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0) | [多语言支持](https://top.aibase.com/topic/%E5%A4%9A%E8%AF%AD%E8%A8%80%E6%94%AF%E6%8C%81) | [视频](https://top.aibase.com/topic/%E8%A7%86%E9%A2%91) | +| [艺术](https://top.aibase.com/topic/%E8%89%BA%E6%9C%AF) | [文本生成](https://top.aibase.com/topic/%E6%96%87%E6%9C%AC%E7%94%9F%E6%88%90) | [开发编程](https://top.aibase.com/topic/%E5%BC%80%E5%8F%91%E7%BC%96%E7%A8%8B) | [协作](https://top.aibase.com/topic/%E5%8D%8F%E4%BD%9C) | [语言模型](https://top.aibase.com/topic/%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B) | +| [工具](https://top.aibase.com/topic/%E5%B7%A5%E5%85%B7) | [销售](https://top.aibase.com/topic/%E9%94%80%E5%94%AE) | [生产力工具](https://top.aibase.com/topic/%E7%94%9F%E4%BA%A7%E5%8A%9B%E5%B7%A5%E5%85%B7) | [AI 写作](https://top.aibase.com/topic/AI%E5%86%99%E4%BD%9C) | [创作](https://top.aibase.com/topic/%E5%88%9B%E4%BD%9C) | +| [工作效率](https://top.aibase.com/topic/%E5%B7%A5%E4%BD%9C%E6%95%88%E7%8E%87) | [无代码](https://top.aibase.com/topic/%E6%97%A0%E4%BB%A3%E7%A0%81) | [隐私保护](https://top.aibase.com/topic/%E9%9A%90%E7%A7%81%E4%BF%9D%E6%8A%A4) | [视频编辑](https://top.aibase.com/topic/%E8%A7%86%E9%A2%91%E7%BC%96%E8%BE%91) | [摘要](https://top.aibase.com/topic/%E6%91%98%E8%A6%81) | +| [多语言](https://top.aibase.com/topic/%E5%A4%9A%E8%AF%AD%E8%A8%80) | [求职](https://top.aibase.com/topic/%E6%B1%82%E8%81%8C) | [GPT](https://top.aibase.com/topic/GPT) | [音乐](https://top.aibase.com/topic/%E9%9F%B3%E4%B9%90) | [视频创作](https://top.aibase.com/topic/%E8%A7%86%E9%A2%91%E5%88%9B%E4%BD%9C) | +| [设计工具](https://top.aibase.com/topic/%E8%AE%BE%E8%AE%A1%E5%B7%A5%E5%85%B7) | [搜索](https://top.aibase.com/topic/%E6%90%9C%E7%B4%A2) | [写作工具](https://top.aibase.com/topic/%E5%86%99%E4%BD%9C%E5%B7%A5%E5%85%B7) | [视频生成](https://top.aibase.com/topic/%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90) | [招聘](https://top.aibase.com/topic/%E6%8B%9B%E8%81%98) | +| [代码生成](https://top.aibase.com/topic/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90) | [大型语言模型](https://top.aibase.com/topic/%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B) | [语音识别](https://top.aibase.com/topic/%E8%AF%AD%E9%9F%B3%E8%AF%86%E5%88%AB) | [编程](https://top.aibase.com/topic/%E7%BC%96%E7%A8%8B) | [在线工具](https://top.aibase.com/topic/%E5%9C%A8%E7%BA%BF%E5%B7%A5%E5%85%B7) | +| [API](https://top.aibase.com/topic/API) | [趣味](https://top.aibase.com/topic/%E8%B6%A3%E5%91%B3) | [客户支持](https://top.aibase.com/topic/%E5%AE%A2%E6%88%B7%E6%94%AF%E6%8C%81) | [语音合成](https://top.aibase.com/topic/%E8%AF%AD%E9%9F%B3%E5%90%88%E6%88%90) | [图像](https://top.aibase.com/topic/%E5%9B%BE%E5%83%8F) | +| [电子商务](https://top.aibase.com/topic/%E7%94%B5%E5%AD%90%E5%95%86%E5%8A%A1) | [SEO 优化](https://top.aibase.com/topic/SEO%E4%BC%98%E5%8C%96) | [AI 辅助](https://top.aibase.com/topic/AI%E8%BE%85%E5%8A%A9) | [AI 生成](https://top.aibase.com/topic/AI%E7%94%9F%E6%88%90) | [创作工具](https://top.aibase.com/topic/%E5%88%9B%E4%BD%9C%E5%B7%A5%E5%85%B7) | +| [免费](https://top.aibase.com/topic/%E5%85%8D%E8%B4%B9) | [LinkedIn](https://top.aibase.com/topic/LinkedIn) | [博客](https://top.aibase.com/topic/%E5%8D%9A%E5%AE%A2) | [写作助手](https://top.aibase.com/topic/%E5%86%99%E4%BD%9C%E5%8A%A9%E6%89%8B) | [助手](https://top.aibase.com/topic/%E5%8A%A9%E6%89%8B) | +| [智能](https://top.aibase.com/topic/%E6%99%BA%E8%83%BD) | [健康](https://top.aibase.com/topic/%E5%81%A5%E5%BA%B7) | [多模态](https://top.aibase.com/topic/%E5%A4%9A%E6%A8%A1%E6%80%81) | [任务管理](https://top.aibase.com/topic/%E4%BB%BB%E5%8A%A1%E7%AE%A1%E7%90%86) | [电子邮件](https://top.aibase.com/topic/%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6) | +| [笔记](https://top.aibase.com/topic/%E7%AC%94%E8%AE%B0) | [搜索引擎](https://top.aibase.com/topic/%E6%90%9C%E7%B4%A2%E5%BC%95%E6%93%8E) | [计算机视觉](https://top.aibase.com/topic/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89) | [社区](https://top.aibase.com/topic/%E7%A4%BE%E5%8C%BA) | [效率](https://top.aibase.com/topic/%E6%95%88%E7%8E%87) | +| [知识管理](https://top.aibase.com/topic/%E7%9F%A5%E8%AF%86%E7%AE%A1%E7%90%86) | [LLM](https://top.aibase.com/topic/LLM) | [智能聊天](https://top.aibase.com/topic/%E6%99%BA%E8%83%BD%E8%81%8A%E5%A4%A9) | [社交](https://top.aibase.com/topic/%E7%A4%BE%E4%BA%A4) | [语言学习](https://top.aibase.com/topic/%E8%AF%AD%E8%A8%80%E5%AD%A6%E4%B9%A0) | +| [娱乐](https://top.aibase.com/topic/%E5%A8%B1%E4%B9%90) | [简历](https://top.aibase.com/topic/%E7%AE%80%E5%8E%86) | [OpenAI](https://top.aibase.com/topic/OpenAI) | [客户服务](https://top.aibase.com/topic/%E5%AE%A2%E6%88%B7%E6%9C%8D%E5%8A%A1) | [室内设计](https://top.aibase.com/topic/%E5%AE%A4%E5%86%85%E8%AE%BE%E8%AE%A1) | +
`, categories: ['new-media', 'popular'], diff --git a/lib/routes/aiea/index.ts b/lib/routes/aiea/index.ts index 687c75a7e961..0d4a110969f9 100644 --- a/lib/routes/aiea/index.ts +++ b/lib/routes/aiea/index.ts @@ -18,10 +18,10 @@ export const route: Route = { maintainers: ['zxx-457'], handler, description: `| Time frame | - | ---------- | - | upcoming | - | past | - | both |`, +| ---------- | +| upcoming | +| past | +| both |`, }; async function handler(ctx) { diff --git a/lib/routes/aijishu/index.ts b/lib/routes/aijishu/index.ts index bb2f261105f2..522ad7d888e9 100644 --- a/lib/routes/aijishu/index.ts +++ b/lib/routes/aijishu/index.ts @@ -20,10 +20,10 @@ export const route: Route = { maintainers: [], handler, description: `| type | 说明 | - | ------- | ---- | - | channel | 频道 | - | blog | 专栏 | - | u | 用户 |`, +| ------- | ---- | +| channel | 频道 | +| blog | 专栏 | +| u | 用户 |`, }; async function handler(ctx) { diff --git a/lib/routes/aisixiang/thinktank.ts b/lib/routes/aisixiang/thinktank.ts index 12239370e75d..0d618a8403f5 100644 --- a/lib/routes/aisixiang/thinktank.ts +++ b/lib/routes/aisixiang/thinktank.ts @@ -23,7 +23,7 @@ export const route: Route = { maintainers: ['hoilc', 'nczitzk'], handler, description: `| 论文 | 时评 | 随笔 | 演讲 | 访谈 | 著作 | 读书 | 史论 | 译作 | 诗歌 | 书信 | 科学 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |`, +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |`, }; async function handler(ctx) { diff --git a/lib/routes/aisixiang/toplist.ts b/lib/routes/aisixiang/toplist.ts index 77b123db889a..0e9e2990e92b 100644 --- a/lib/routes/aisixiang/toplist.ts +++ b/lib/routes/aisixiang/toplist.ts @@ -12,8 +12,8 @@ export const route: Route = { maintainers: ['HenryQW', 'nczitzk'], handler, description: `| 文章点击排行 | 最近更新文章 | 文章推荐排行 | - | ------------ | ------------ | ------------ | - | 1 | 10 | 11 |`, +| ------------ | ------------ | ------------ | +| 1 | 10 | 11 |`, }; async function handler(ctx) { diff --git a/lib/routes/aliresearch/information.ts b/lib/routes/aliresearch/information.ts index a98eb99d788b..ba7654cd048a 100644 --- a/lib/routes/aliresearch/information.ts +++ b/lib/routes/aliresearch/information.ts @@ -28,7 +28,7 @@ export const route: Route = { handler, url: 'aliresearch.com/cn/information', description: `| 新闻 | 观点 | 案例 | - | ---- | ---- | ---- |`, +| ---- | ---- | ---- |`, }; async function handler(ctx) { diff --git a/lib/routes/alistapart/topic.ts b/lib/routes/alistapart/topic.ts index 13fad6b4c1bf..5dbe0d1e7dec 100644 --- a/lib/routes/alistapart/topic.ts +++ b/lib/routes/alistapart/topic.ts @@ -26,51 +26,51 @@ export const route: Route = { url: 'alistapart.com/articles/', description: `You have the option to utilize the main heading or use individual categories as topics for the path. - | **Code** | *code* | - | --------------------------- | ------------------------- | - | **Application Development** | *application-development* | - | **Browsers** | *browsers* | - | **CSS** | *css* | - | **HTML** | *html* | - | **JavaScript** | *javascript* | - | **The Server Side** | *the-server-side* | +| **Code** | *code* | +| --------------------------- | ------------------------- | +| **Application Development** | *application-development* | +| **Browsers** | *browsers* | +| **CSS** | *css* | +| **HTML** | *html* | +| **JavaScript** | *javascript* | +| **The Server Side** | *the-server-side* | - | **Content** | *content* | - | -------------------- | ------------------ | - | **Community** | *community* | - | **Content Strategy** | *content-strategy* | - | **Writing** | *writing* | +| **Content** | *content* | +| -------------------- | ------------------ | +| **Community** | *community* | +| **Content Strategy** | *content-strategy* | +| **Writing** | *writing* | - | **Design** | *design* | - | -------------------------- | ---------------------- | - | **Brand Identity** | *brand-identity* | - | **Graphic Design** | *graphic-design* | - | **Layout & Grids** | *layout-grids* | - | **Mobile/Multidevice** | *mobile-multidevice* | - | **Responsive Design** | *responsive-design* | - | **Typography & Web Fonts** | *typography-web-fonts* | +| **Design** | *design* | +| -------------------------- | ---------------------- | +| **Brand Identity** | *brand-identity* | +| **Graphic Design** | *graphic-design* | +| **Layout & Grids** | *layout-grids* | +| **Mobile/Multidevice** | *mobile-multidevice* | +| **Responsive Design** | *responsive-design* | +| **Typography & Web Fonts** | *typography-web-fonts* | - | **Industry & Business** | *industry-business* | - | ----------------------- | ------------------- | - | **Business** | *business* | - | **Career** | *career* | - | **Industry** | *industry* | - | **State of the Web** | *state-of-the-web* | +| **Industry & Business** | *industry-business* | +| ----------------------- | ------------------- | +| **Business** | *business* | +| **Career** | *career* | +| **Industry** | *industry* | +| **State of the Web** | *state-of-the-web* | - | **Process** | *process* | - | ---------------------- | -------------------- | - | **Creativity** | *creativity* | - | **Project Management** | *project-management* | - | **Web Strategy** | *web-strategy* | - | **Workflow & Tools** | *workflow-tools* | +| **Process** | *process* | +| ---------------------- | -------------------- | +| **Creativity** | *creativity* | +| **Project Management** | *project-management* | +| **Web Strategy** | *web-strategy* | +| **Workflow & Tools** | *workflow-tools* | - | **User Experience** | *user-experience* | - | ---------------------------- | -------------------------- | - | **Accessibility** | *accessibility* | - | **Information Architecture** | *information-architecture* | - | **Interaction Design** | *interaction-design* | - | **Usability** | *usability* | - | **User Research** | *user-research* |`, +| **User Experience** | *user-experience* | +| ---------------------------- | -------------------------- | +| **Accessibility** | *accessibility* | +| **Information Architecture** | *information-architecture* | +| **Interaction Design** | *interaction-design* | +| **Usability** | *usability* | +| **User Research** | *user-research* |`, }; async function handler(ctx) { diff --git a/lib/routes/aliyun/notice.ts b/lib/routes/aliyun/notice.ts index d897de5b1812..a7f62130a569 100644 --- a/lib/routes/aliyun/notice.ts +++ b/lib/routes/aliyun/notice.ts @@ -34,12 +34,12 @@ export const route: Route = { maintainers: ['muzea'], handler, description: `| 类型 | type | - | -------- | ---- | - | 全部 | | - | 升级公告 | 1 | - | 安全公告 | 2 | - | 备案公告 | 3 | - | 其他 | 4 |`, +| -------- | ---- | +| 全部 | | +| 升级公告 | 1 | +| 安全公告 | 2 | +| 备案公告 | 3 | +| 其他 | 4 |`, }; async function handler(ctx) { diff --git a/lib/routes/anquanke/category.ts b/lib/routes/anquanke/category.ts index 1554e1d82513..dbc4e5f7f4c1 100644 --- a/lib/routes/anquanke/category.ts +++ b/lib/routes/anquanke/category.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['qwertyuiop6'], handler, description: `| 360 网络安全周报 | 活动 | 知识 | 资讯 | 招聘 | 工具 | - | ---------------- | -------- | --------- | ---- | ---- | ---- | - | week | activity | knowledge | news | job | tool |`, +| ---------------- | -------- | --------- | ---- | ---- | ---- | +| week | activity | knowledge | news | job | tool |`, }; async function handler(ctx) { diff --git a/lib/routes/appleinsider/index.ts b/lib/routes/appleinsider/index.ts index bcafb0e3b69f..5fb118e3487b 100644 --- a/lib/routes/appleinsider/index.ts +++ b/lib/routes/appleinsider/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| News | Reviews | How-tos | - | ---- | ------- | ------- | - | | reviews | how-to |`, +| ---- | ------- | ------- | +| | reviews | how-to |`, }; async function handler(ctx) { diff --git a/lib/routes/arcteryx/new-arrivals.ts b/lib/routes/arcteryx/new-arrivals.ts index 9d3a74a19c15..bc7e486091a5 100644 --- a/lib/routes/arcteryx/new-arrivals.ts +++ b/lib/routes/arcteryx/new-arrivals.ts @@ -30,15 +30,15 @@ export const route: Route = { handler, description: `Country - | United States | Canada | United Kingdom | - | ------------- | ------ | -------------- | - | us | ca | gb | +| United States | Canada | United Kingdom | +| ------------- | ------ | -------------- | +| us | ca | gb | gender - | male | female | - | ---- | ------ | - | mens | womens | +| male | female | +| ---- | ------ | +| mens | womens | ::: tip Parameter \`country\` can be found within the url of \`Arcteryx\` website. diff --git a/lib/routes/arcteryx/outlet.ts b/lib/routes/arcteryx/outlet.ts index 3a4d02775c48..897cb35d4afb 100644 --- a/lib/routes/arcteryx/outlet.ts +++ b/lib/routes/arcteryx/outlet.ts @@ -30,15 +30,15 @@ export const route: Route = { handler, description: `Country - | United States | Canada | United Kingdom | - | ------------- | ------ | -------------- | - | us | ca | gb | +| United States | Canada | United Kingdom | +| ------------- | ------ | -------------- | +| us | ca | gb | gender - | male | female | - | ---- | ------ | - | mens | womens | +| male | female | +| ---- | ------ | +| mens | womens | ::: tip Parameter \`country\` can be found within the url of \`Arcteryx\` website. diff --git a/lib/routes/atcoder/contest.ts b/lib/routes/atcoder/contest.ts index ebaf26a377d8..7e29b3ff5f6c 100644 --- a/lib/routes/atcoder/contest.ts +++ b/lib/routes/atcoder/contest.ts @@ -22,23 +22,23 @@ export const route: Route = { handler, description: `Rated Range - | ABC Class (Rated for \~1999) | ARC Class (Rated for \~2799) | AGC Class (Rated for \~9999) | - | ---------------------------- | ---------------------------- | ---------------------------- | - | 1 | 2 | 3 | +| ABC Class (Rated for \~1999) | ARC Class (Rated for \~2799) | AGC Class (Rated for \~9999) | +| ---------------------------- | ---------------------------- | ---------------------------- | +| 1 | 2 | 3 | Category - | All | AtCoder Typical Contest | PAST Archive | Unofficial(unrated) | - | --- | ----------------------- | ------------ | ------------------- | - | 0 | 6 | 50 | 101 | +| All | AtCoder Typical Contest | PAST Archive | Unofficial(unrated) | +| --- | ----------------------- | ------------ | ------------------- | +| 0 | 6 | 50 | 101 | - | JOI Archive | Sponsored Tournament | Sponsored Parallel(rated) | - | ----------- | -------------------- | ------------------------- | - | 200 | 1000 | 1001 | +| JOI Archive | Sponsored Tournament | Sponsored Parallel(rated) | +| ----------- | -------------------- | ------------------------- | +| 200 | 1000 | 1001 | - | Sponsored Parallel(unrated) | Optimization Contest | - | --------------------------- | -------------------- | - | 1002 | 1200 |`, +| Sponsored Parallel(unrated) | Optimization Contest | +| --------------------------- | -------------------- | +| 1002 | 1200 |`, }; async function handler(ctx) { diff --git a/lib/routes/auto-stats/index.ts b/lib/routes/auto-stats/index.ts index 87d4089fd5a1..350de7136b7a 100644 --- a/lib/routes/auto-stats/index.ts +++ b/lib/routes/auto-stats/index.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 信息快递 | 工作动态 | 专题分析 | - | -------- | -------- | -------- | - | xxkd | gzdt | ztfx |`, +| -------- | -------- | -------- | +| xxkd | gzdt | ztfx |`, }; async function handler(ctx) { diff --git a/lib/routes/baidu/tieba/search.ts b/lib/routes/baidu/tieba/search.ts index 2b0e57c2db6c..a8fc04f9578a 100644 --- a/lib/routes/baidu/tieba/search.ts +++ b/lib/routes/baidu/tieba/search.ts @@ -27,11 +27,11 @@ export const route: Route = { maintainers: ['JimenezLi'], handler, description: `| 键 | 含义 | 接受的值 | 默认值 | - | ------------ | ---------------------------------------------------------- | ------------- | ------ | - | kw | 在名为 kw 的贴吧中搜索 | 任意名称 / 无 | 无 | - | only_thread | 只看主题帖,默认为 0 关闭 | 0/1 | 0 | - | rn | 返回条目的数量 | 1-20 | 20 | - | sm | 排序方式,0 为按时间顺序,1 为按时间倒序,2 为按相关性顺序 | 0/1/2 | 1 | +| ------------ | ---------------------------------------------------------- | ------------- | ------ | +| kw | 在名为 kw 的贴吧中搜索 | 任意名称 / 无 | 无 | +| only_thread | 只看主题帖,默认为 0 关闭 | 0/1 | 0 | +| rn | 返回条目的数量 | 1-20 | 20 | +| sm | 排序方式,0 为按时间顺序,1 为按时间倒序,2 为按相关性顺序 | 0/1/2 | 1 | 用例:\`/baidu/tieba/search/neuro/kw=neurosama&only_thread=1&sm=2\``, }; diff --git a/lib/routes/baidu/top.ts b/lib/routes/baidu/top.ts index 1da3cdc20e4c..74feafc99d2c 100644 --- a/lib/routes/baidu/top.ts +++ b/lib/routes/baidu/top.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['xyqfer'], handler, description: `| 热搜榜 | 小说榜 | 电影榜 | 电视剧榜 | 汽车榜 | 游戏榜 | - | -------- | ------ | ------ | -------- | ------ | ------ | - | realtime | novel | movie | teleplay | car | game |`, +| -------- | ------ | ------ | -------- | ------ | ------ | +| realtime | novel | movie | teleplay | car | game |`, }; async function handler(ctx) { diff --git a/lib/routes/bdys/index.ts b/lib/routes/bdys/index.ts index 5c541d877cc8..4b0aa0106bf8 100644 --- a/lib/routes/bdys/index.ts +++ b/lib/routes/bdys/index.ts @@ -40,63 +40,63 @@ export const route: Route = { handler, description: `#### 资源分类 - | 不限 | 电影 | 电视剧 | - | ---- | ---- | ------ | - | all | 0 | 1 | +| 不限 | 电影 | 电视剧 | +| ---- | ---- | ------ | +| all | 0 | 1 | - #### 影视类型 +#### 影视类型 - | 不限 | 动作 | 爱情 | 喜剧 | 科幻 | 恐怖 | - | ---- | ------- | ------ | ---- | ------ | ------ | - | all | dongzuo | aiqing | xiju | kehuan | kongbu | +| 不限 | 动作 | 爱情 | 喜剧 | 科幻 | 恐怖 | +| ---- | ------- | ------ | ---- | ------ | ------ | +| all | dongzuo | aiqing | xiju | kehuan | kongbu | - | 战争 | 武侠 | 魔幻 | 剧情 | 动画 | 惊悚 | - | --------- | ----- | ------ | ------ | ------- | -------- | - | zhanzheng | wuxia | mohuan | juqing | donghua | jingsong | +| 战争 | 武侠 | 魔幻 | 剧情 | 动画 | 惊悚 | +| --------- | ----- | ------ | ------ | ------- | -------- | +| zhanzheng | wuxia | mohuan | juqing | donghua | jingsong | - | 3D | 灾难 | 悬疑 | 警匪 | 文艺 | 青春 | - | -- | ------ | ------ | ------- | ----- | -------- | - | 3D | zainan | xuanyi | jingfei | wenyi | qingchun | +| 3D | 灾难 | 悬疑 | 警匪 | 文艺 | 青春 | +| -- | ------ | ------ | ------- | ----- | -------- | +| 3D | zainan | xuanyi | jingfei | wenyi | qingchun | - | 冒险 | 犯罪 | 纪录 | 古装 | 奇幻 | 国语 | - | ------- | ------ | ---- | -------- | ------ | ----- | - | maoxian | fanzui | jilu | guzhuang | qihuan | guoyu | +| 冒险 | 犯罪 | 纪录 | 古装 | 奇幻 | 国语 | +| ------- | ------ | ---- | -------- | ------ | ----- | +| maoxian | fanzui | jilu | guzhuang | qihuan | guoyu | - | 综艺 | 历史 | 运动 | 原创压制 | - | ------ | ----- | ------- | ---------- | - | zongyi | lishi | yundong | yuanchuang | +| 综艺 | 历史 | 运动 | 原创压制 | +| ------ | ----- | ------- | ---------- | +| zongyi | lishi | yundong | yuanchuang | - | 美剧 | 韩剧 | 国产电视剧 | 日剧 | 英剧 | 德剧 | - | ----- | ----- | ---------- | ---- | ------ | ---- | - | meiju | hanju | guoju | riju | yingju | deju | +| 美剧 | 韩剧 | 国产电视剧 | 日剧 | 英剧 | 德剧 | +| ----- | ----- | ---------- | ---- | ------ | ---- | +| meiju | hanju | guoju | riju | yingju | deju | - | 俄剧 | 巴剧 | 加剧 | 西剧 | 意大利剧 | 泰剧 | - | ---- | ---- | ----- | ------- | -------- | ----- | - | eju | baju | jiaju | spanish | yidaliju | taiju | +| 俄剧 | 巴剧 | 加剧 | 西剧 | 意大利剧 | 泰剧 | +| ---- | ---- | ----- | ------- | -------- | ----- | +| eju | baju | jiaju | spanish | yidaliju | taiju | - | 港台剧 | 法剧 | 澳剧 | - | --------- | ---- | ---- | - | gangtaiju | faju | aoju | +| 港台剧 | 法剧 | 澳剧 | +| --------- | ---- | ---- | +| gangtaiju | faju | aoju | - #### 制片地区 +#### 制片地区 - | 大陆 | 中国香港 | 中国台湾 | - | ---- | -------- | -------- | +| 大陆 | 中国香港 | 中国台湾 | +| ---- | -------- | -------- | - | 美国 | 英国 | 日本 | 韩国 | 法国 | - | ---- | ---- | ---- | ---- | ---- | +| 美国 | 英国 | 日本 | 韩国 | 法国 | +| ---- | ---- | ---- | ---- | ---- | - | 印度 | 德国 | 西班牙 | 意大利 | 澳大利亚 | - | ---- | ---- | ------ | ------ | -------- | +| 印度 | 德国 | 西班牙 | 意大利 | 澳大利亚 | +| ---- | ---- | ------ | ------ | -------- | - | 比利时 | 瑞典 | 荷兰 | 丹麦 | 加拿大 | 俄罗斯 | - | ------ | ---- | ---- | ---- | ------ | ------ | +| 比利时 | 瑞典 | 荷兰 | 丹麦 | 加拿大 | 俄罗斯 | +| ------ | ---- | ---- | ---- | ------ | ------ | - #### 影视排序 +#### 影视排序 - | 更新时间 | 豆瓣评分 | - | -------- | -------- | - | 0 | 1 |`, +| 更新时间 | 豆瓣评分 | +| -------- | -------- | +| 0 | 1 |`, }; async function handler(ctx) { diff --git a/lib/routes/beijingprice/index.ts b/lib/routes/beijingprice/index.ts index a2a147b2cd40..8004d50b567c 100644 --- a/lib/routes/beijingprice/index.ts +++ b/lib/routes/beijingprice/index.ts @@ -112,17 +112,17 @@ export const route: Route = { 若订阅 [新闻资讯](https://www.beijingprice.cn/jgzx/xwzx/),网址为 \`https://www.beijingprice.cn/jgzx/xwzx/\`。截取 \`https://beijingprice.cn/\` 到末尾 \`/\` 的部分 \`jgzx/xwzx\` 作为参数填入,此时路由为 [\`/beijingprice/jgzx/xwzx\`](https://rsshub.app/beijingprice/jgzx/xwzx)。 ::: - #### [价格资讯](https://www.beijingprice.cn/jgzx/xwzx/) +#### [价格资讯](https://www.beijingprice.cn/jgzx/xwzx/) - | [新闻资讯](https://www.beijingprice.cn/jgzx/xwzx/) | [工作动态](https://www.beijingprice.cn/jgzx/gzdt/) | [各区动态](https://www.beijingprice.cn/jgzx/gqdt/) | [通知公告](https://www.beijingprice.cn/jgzx/tzgg/) | [价格早报](https://www.beijingprice.cn/jgzx/jgzb/) | - | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | - | [jgzx/xwzx](https://rsshub.app/beijingprice/jgzx/xwzx) | [jgzx/gzdt](https://rsshub.app/beijingprice/jgzx/gzdt) | [jgzx/gqdt](https://rsshub.app/beijingprice/jgzx/gqdt) | [jgzx/tzgg](https://rsshub.app/beijingprice/jgzx/tzgg) | [jgzx/jgzb](https://rsshub.app/beijingprice/jgzx/jgzb) | +| [新闻资讯](https://www.beijingprice.cn/jgzx/xwzx/) | [工作动态](https://www.beijingprice.cn/jgzx/gzdt/) | [各区动态](https://www.beijingprice.cn/jgzx/gqdt/) | [通知公告](https://www.beijingprice.cn/jgzx/tzgg/) | [价格早报](https://www.beijingprice.cn/jgzx/jgzb/) | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| [jgzx/xwzx](https://rsshub.app/beijingprice/jgzx/xwzx) | [jgzx/gzdt](https://rsshub.app/beijingprice/jgzx/gzdt) | [jgzx/gqdt](https://rsshub.app/beijingprice/jgzx/gqdt) | [jgzx/tzgg](https://rsshub.app/beijingprice/jgzx/tzgg) | [jgzx/jgzb](https://rsshub.app/beijingprice/jgzx/jgzb) | - #### [综合信息](https://www.beijingprice.cn/zhxx/cbjs/) +#### [综合信息](https://www.beijingprice.cn/zhxx/cbjs/) - | [价格听证](https://www.beijingprice.cn/zhxx/jgtz/) | [价格监测定点单位名单](https://www.beijingprice.cn/zhxx/jgjcdddwmd/) | [部门预算决算](https://www.beijingprice.cn/bmys/) | - | ------------------------------------------------------ | -------------------------------------------------------------------- | ------------------------------------------------- | - | [zhxx/jgtz](https://rsshub.app/beijingprice/zhxx/jgtz) | [zhxx/jgjcdddwmd](https://rsshub.app/beijingprice/zhxx/jgjcdddwmd) | [bmys](https://rsshub.app/beijingprice/bmys) | +| [价格听证](https://www.beijingprice.cn/zhxx/jgtz/) | [价格监测定点单位名单](https://www.beijingprice.cn/zhxx/jgjcdddwmd/) | [部门预算决算](https://www.beijingprice.cn/bmys/) | +| ------------------------------------------------------ | -------------------------------------------------------------------- | ------------------------------------------------- | +| [zhxx/jgtz](https://rsshub.app/beijingprice/zhxx/jgtz) | [zhxx/jgjcdddwmd](https://rsshub.app/beijingprice/zhxx/jgjcdddwmd) | [bmys](https://rsshub.app/beijingprice/bmys) | `, categories: ['government'], diff --git a/lib/routes/bendibao/news.ts b/lib/routes/bendibao/news.ts index bca4a37467f2..0f5404bcf99d 100644 --- a/lib/routes/bendibao/news.ts +++ b/lib/routes/bendibao/news.ts @@ -30,11 +30,11 @@ export const route: Route = { handler, url: 'bendibao.com/', description: `| 城市名 | 缩写 | - | ------ | ---- | - | 北京 | bj | - | 上海 | sh | - | 广州 | gz | - | 深圳 | sz | +| ------ | ---- | +| 北京 | bj | +| 上海 | sh | +| 广州 | gz | +| 深圳 | sz | 更多城市请参见 [这里](http://www.bendibao.com/city.htm) diff --git a/lib/routes/bilibili/mall-new.ts b/lib/routes/bilibili/mall-new.ts index 5176e535eee5..0552e1588c37 100644 --- a/lib/routes/bilibili/mall-new.ts +++ b/lib/routes/bilibili/mall-new.ts @@ -18,8 +18,8 @@ export const route: Route = { maintainers: ['DIYgod'], handler, description: `| 全部 | 手办 | 魔力赏 | 周边 | 游戏 | - | ---- | ---- | ------ | ---- | ---- | - | 0 | 1 | 7 | 3 | 6 |`, +| ---- | ---- | ------ | ---- | ---- | +| 0 | 1 | 7 | 3 | 6 |`, }; async function handler(ctx) { diff --git a/lib/routes/bilibili/partion.ts b/lib/routes/bilibili/partion.ts index ccb37d8310ff..043d0897ac65 100644 --- a/lib/routes/bilibili/partion.ts +++ b/lib/routes/bilibili/partion.ts @@ -20,117 +20,117 @@ export const route: Route = { handler, description: `动画 - | MAD·AMV | MMD·3D | 短片・手书・配音 | 特摄 | 综合 | - | ------- | ------ | ---------------- | ---- | ---- | - | 24 | 25 | 47 | 86 | 27 | +| MAD·AMV | MMD·3D | 短片・手书・配音 | 特摄 | 综合 | +| ------- | ------ | ---------------- | ---- | ---- | +| 24 | 25 | 47 | 86 | 27 | 番剧 - | 连载动画 | 完结动画 | 资讯 | 官方延伸 | - | -------- | -------- | ---- | -------- | - | 33 | 32 | 51 | 152 | +| 连载动画 | 完结动画 | 资讯 | 官方延伸 | +| -------- | -------- | ---- | -------- | +| 33 | 32 | 51 | 152 | 国创 - | 国产动画 | 国产原创相关 | 布袋戏 | 动态漫・广播剧 | 资讯 | - | -------- | ------------ | ------ | -------------- | ---- | - | 153 | 168 | 169 | 195 | 170 | +| 国产动画 | 国产原创相关 | 布袋戏 | 动态漫・广播剧 | 资讯 | +| -------- | ------------ | ------ | -------------- | ---- | +| 153 | 168 | 169 | 195 | 170 | 音乐 - | 原创音乐 | 翻唱 | VOCALOID·UTAU | 电音 | 演奏 | MV | 音乐现场 | 音乐综合 | ~~OP/ED/OST~~ | - | -------- | ---- | ------------- | ---- | ---- | --- | -------- | -------- | ------------- | - | 28 | 31 | 30 | 194 | 59 | 193 | 29 | 130 | 54 | +| 原创音乐 | 翻唱 | VOCALOID·UTAU | 电音 | 演奏 | MV | 音乐现场 | 音乐综合 | ~~OP/ED/OST~~ | +| -------- | ---- | ------------- | ---- | ---- | --- | -------- | -------- | ------------- | +| 28 | 31 | 30 | 194 | 59 | 193 | 29 | 130 | 54 | 舞蹈 - | 宅舞 | 街舞 | 明星舞蹈 | 中国舞 | 舞蹈综合 | 舞蹈教程 | - | ---- | ---- | -------- | ------ | -------- | -------- | - | 20 | 198 | 199 | 200 | 154 | 156 | +| 宅舞 | 街舞 | 明星舞蹈 | 中国舞 | 舞蹈综合 | 舞蹈教程 | +| ---- | ---- | -------- | ------ | -------- | -------- | +| 20 | 198 | 199 | 200 | 154 | 156 | 游戏 - | 单机游戏 | 电子竞技 | 手机游戏 | 网络游戏 | 桌游棋牌 | GMV | 音游 | Mugen | - | -------- | -------- | -------- | -------- | -------- | --- | ---- | ----- | - | 17 | 171 | 172 | 65 | 173 | 121 | 136 | 19 | +| 单机游戏 | 电子竞技 | 手机游戏 | 网络游戏 | 桌游棋牌 | GMV | 音游 | Mugen | +| -------- | -------- | -------- | -------- | -------- | --- | ---- | ----- | +| 17 | 171 | 172 | 65 | 173 | 121 | 136 | 19 | 知识 - | 科学科普 | 社科人文 | 财经 | 校园学习 | 职业职场 | 野生技术协会 | - | -------- | -------- | ---- | -------- | -------- | ------------ | - | 201 | 124 | 207 | 208 | 209 | 122 | +| 科学科普 | 社科人文 | 财经 | 校园学习 | 职业职场 | 野生技术协会 | +| -------- | -------- | ---- | -------- | -------- | ------------ | +| 201 | 124 | 207 | 208 | 209 | 122 | ~~科技~~ - | ~~演讲・公开课~~ | ~~星海~~ | ~~机械~~ | ~~汽车~~ | - | ---------------- | -------- | -------- | -------- | - | 39 | 96 | 98 | 176 | +| ~~演讲・公开课~~ | ~~星海~~ | ~~机械~~ | ~~汽车~~ | +| ---------------- | -------- | -------- | -------- | +| 39 | 96 | 98 | 176 | 数码 - | 手机平板 | 电脑装机 | 摄影摄像 | 影音智能 | - | -------- | -------- | -------- | -------- | - | 95 | 189 | 190 | 191 | +| 手机平板 | 电脑装机 | 摄影摄像 | 影音智能 | +| -------- | -------- | -------- | -------- | +| 95 | 189 | 190 | 191 | 生活 - | 搞笑 | 日常 | 美食圈 | 动物圈 | 手工 | 绘画 | 运动 | 汽车 | 其他 | ~~ASMR~~ | - | ---- | ---- | ------ | ------ | ---- | ---- | ---- | ---- | ---- | -------- | - | 138 | 21 | 76 | 75 | 161 | 162 | 163 | 176 | 174 | 175 | +| 搞笑 | 日常 | 美食圈 | 动物圈 | 手工 | 绘画 | 运动 | 汽车 | 其他 | ~~ASMR~~ | +| ---- | ---- | ------ | ------ | ---- | ---- | ---- | ---- | ---- | -------- | +| 138 | 21 | 76 | 75 | 161 | 162 | 163 | 176 | 174 | 175 | 鬼畜 - | 鬼畜调教 | 音 MAD | 人力 VOCALOID | 教程演示 | - | -------- | ------ | ------------- | -------- | - | 22 | 26 | 126 | 127 | +| 鬼畜调教 | 音 MAD | 人力 VOCALOID | 教程演示 | +| -------- | ------ | ------------- | -------- | +| 22 | 26 | 126 | 127 | 时尚 - | 美妆 | 服饰 | 健身 | T 台 | 风向标 | - | ---- | ---- | ---- | ---- | ------ | - | 157 | 158 | 164 | 159 | 192 | +| 美妆 | 服饰 | 健身 | T 台 | 风向标 | +| ---- | ---- | ---- | ---- | ------ | +| 157 | 158 | 164 | 159 | 192 | ~~广告~~ - | ~~广告~~ | - | -------- | - | 166 | +| ~~广告~~ | +| -------- | +| 166 | 资讯 - | 热点 | 环球 | 社会 | 综合 | - | ---- | ---- | ---- | ---- | - | 203 | 204 | 205 | 206 | +| 热点 | 环球 | 社会 | 综合 | +| ---- | ---- | ---- | ---- | +| 203 | 204 | 205 | 206 | 娱乐 - | 综艺 | 明星 | Korea 相关 | - | ---- | ---- | ---------- | - | 71 | 137 | 131 | +| 综艺 | 明星 | Korea 相关 | +| ---- | ---- | ---------- | +| 71 | 137 | 131 | 影视 - | 影视杂谈 | 影视剪辑 | 短片 | 预告・资讯 | - | -------- | -------- | ---- | ---------- | - | 182 | 183 | 85 | 184 | +| 影视杂谈 | 影视剪辑 | 短片 | 预告・资讯 | +| -------- | -------- | ---- | ---------- | +| 182 | 183 | 85 | 184 | 纪录片 - | 全部 | 人文・历史 | 科学・探索・自然 | 军事 | 社会・美食・旅行 | - | ---- | ---------- | ---------------- | ---- | ---------------- | - | 177 | 37 | 178 | 179 | 180 | +| 全部 | 人文・历史 | 科学・探索・自然 | 军事 | 社会・美食・旅行 | +| ---- | ---------- | ---------------- | ---- | ---------------- | +| 177 | 37 | 178 | 179 | 180 | 电影 - | 全部 | 华语电影 | 欧美电影 | 日本电影 | 其他国家 | - | ---- | -------- | -------- | -------- | -------- | - | 23 | 147 | 145 | 146 | 83 | +| 全部 | 华语电影 | 欧美电影 | 日本电影 | 其他国家 | +| ---- | -------- | -------- | -------- | -------- | +| 23 | 147 | 145 | 146 | 83 | 电视剧 - | 全部 | 国产剧 | 海外剧 | - | ---- | ------ | ------ | - | 11 | 185 | 187 |`, +| 全部 | 国产剧 | 海外剧 | +| ---- | ------ | ------ | +| 11 | 185 | 187 |`, }; async function handler(ctx) { diff --git a/lib/routes/bilibili/vsearch.ts b/lib/routes/bilibili/vsearch.ts index 955f45e2fda3..401f80eb47f4 100644 --- a/lib/routes/bilibili/vsearch.ts +++ b/lib/routes/bilibili/vsearch.ts @@ -37,9 +37,9 @@ export const route: Route = { handler, description: `分区 id 的取值请参考下表: - | 全部分区 | 动画 | 番剧 | 国创 | 音乐 | 舞蹈 | 游戏 | 知识 | 科技 | 运动 | 汽车 | 生活 | 美食 | 动物圈 | 鬼畜 | 时尚 | 资讯 | 娱乐 | 影视 | 纪录片 | 电影 | 电视剧 | - | -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ------ | - | 0 | 1 | 13 | 167 | 3 | 129 | 4 | 36 | 188 | 234 | 223 | 160 | 211 | 217 | 119 | 155 | 202 | 5 | 181 | 177 | 23 | 11 |`, +| 全部分区 | 动画 | 番剧 | 国创 | 音乐 | 舞蹈 | 游戏 | 知识 | 科技 | 运动 | 汽车 | 生活 | 美食 | 动物圈 | 鬼畜 | 时尚 | 资讯 | 娱乐 | 影视 | 纪录片 | 电影 | 电视剧 | +| -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ------ | +| 0 | 1 | 13 | 167 | 3 | 129 | 4 | 36 | 188 | 234 | 223 | 160 | 211 | 217 | 119 | 155 | 202 | 5 | 181 | 177 | 23 | 11 |`, }; const getIframe = (data, embed: boolean = true) => { diff --git a/lib/routes/bjfu/it/index.ts b/lib/routes/bjfu/it/index.ts index 619540d97904..4da69a4659d9 100644 --- a/lib/routes/bjfu/it/index.ts +++ b/lib/routes/bjfu/it/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['wzc-blog'], handler, description: `| 学院新闻 | 科研动态 | 本科生培养 | 研究生培养 | - | -------- | -------- | ---------- | ---------- | - | xyxw | kydt | pydt | pydt2 |`, +| -------- | -------- | ---------- | ---------- | +| xyxw | kydt | pydt | pydt2 |`, }; async function handler(ctx) { diff --git a/lib/routes/bjfu/jwc/index.ts b/lib/routes/bjfu/jwc/index.ts index 14f01020448e..6061aa69d386 100644 --- a/lib/routes/bjfu/jwc/index.ts +++ b/lib/routes/bjfu/jwc/index.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['markmingjie'], handler, description: `| 教务快讯 | 考试信息 | 课程信息 | 教改动态 | 图片新闻 | - | -------- | -------- | -------- | -------- | -------- | - | jwkx | ksxx | kcxx | jgdt | tpxw |`, +| -------- | -------- | -------- | -------- | -------- | +| jwkx | ksxx | kcxx | jgdt | tpxw |`, }; async function handler(ctx) { diff --git a/lib/routes/bjfu/news/index.ts b/lib/routes/bjfu/news/index.ts index 588743899b1f..1e6edb77473e 100644 --- a/lib/routes/bjfu/news/index.ts +++ b/lib/routes/bjfu/news/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['markmingjie'], handler, description: `| 绿色要闻 | 校园动态 | 教学科研 | 党建思政 | 一周排行 | - | -------- | -------- | -------- | -------- | -------- | - | lsyw | xydt | jxky | djsz | yzph |`, +| -------- | -------- | -------- | -------- | -------- | +| lsyw | xydt | jxky | djsz | yzph |`, }; async function handler(ctx) { diff --git a/lib/routes/bjsk/keti.ts b/lib/routes/bjsk/keti.ts index 8139ae535cd9..fef951a68414 100644 --- a/lib/routes/bjsk/keti.ts +++ b/lib/routes/bjsk/keti.ts @@ -28,8 +28,8 @@ export const route: Route = { handler, url: 'keti.bjsk.org.cn/indexAction!to_index.action', description: `| 通知公告 | 资料下载 | - | -------------------------------- | -------------------------------- | - | 402881027cbb8c6f017cbb8e17710002 | 2c908aee818e04f401818e08645c0002 |`, +| -------------------------------- | -------------------------------- | +| 402881027cbb8c6f017cbb8e17710002 | 2c908aee818e04f401818e08645c0002 |`, }; async function handler(ctx) { diff --git a/lib/routes/bjtu/gs.ts b/lib/routes/bjtu/gs.ts index 75c3474d5f8e..e702c0b0111c 100644 --- a/lib/routes/bjtu/gs.ts +++ b/lib/routes/bjtu/gs.ts @@ -169,24 +169,24 @@ export const route: Route = { maintainers: ['E1nzbern'], handler, description: ` - | 文章来源 | 参数 | - | ----------------- | ------------ | - | 通知公告_招生 | noti_zs | - | 通知公告 | noti | - | 新闻动态 | news | - | 招生宣传 | zsxc | - | 培养 | py | - | 招生 | zs | - | 学位 | xw | - | 研工部 | ygb | - | 通知公告 - 研工部 | ygbtzgg | - | 新闻动态 - 研工部 | ygbnews | - | 新闻封面 - 研工部 | ygbnewscover | - | 文章列表 | all | - | 博士招生 - 招生专题 | bszs_zszt | - | 硕士招生 - 招生专题 | sszs_zszt | - | 招生简章 - 招生专题 | zsjz_zszt | - | 政策法规 - 招生专题 | zcfg_zszt | +| 文章来源 | 参数 | +| ----------------- | ------------ | +| 通知公告_招生 | noti_zs | +| 通知公告 | noti | +| 新闻动态 | news | +| 招生宣传 | zsxc | +| 培养 | py | +| 招生 | zs | +| 学位 | xw | +| 研工部 | ygb | +| 通知公告 - 研工部 | ygbtzgg | +| 新闻动态 - 研工部 | ygbnews | +| 新闻封面 - 研工部 | ygbnewscover | +| 文章列表 | all | +| 博士招生 - 招生专题 | bszs_zszt | +| 硕士招生 - 招生专题 | sszs_zszt | +| 招生简章 - 招生专题 | zsjz_zszt | +| 政策法规 - 招生专题 | zcfg_zszt | ::: tip 文章来源的命名均来自研究生院网站标题。 diff --git a/lib/routes/bjwxdxh/index.ts b/lib/routes/bjwxdxh/index.ts index a39b263ad787..c1c27c1989bf 100644 --- a/lib/routes/bjwxdxh/index.ts +++ b/lib/routes/bjwxdxh/index.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['Misaka13514'], handler, description: `| 协会活动 | 公告通知 | 会议情况 | 简报 | 政策法规 | 学习园地 | 业余无线电服务中心 | 经验交流 | 新技术推介 | 活动通知 | 爱好者园地 | 结果查询 | 资料下载 | 会员之家 | 会员简介 | 会员风采 | 活动报道 | - | -------- | -------- | -------- | ---- | -------- | -------- | ------------------ | -------- | ---------- | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 86 | 99 | 102 | 103 | 106 | 107 | 108 | 111 | 112 | 114 | 115 | 116 | 118 | 119 | 120 | 121 | 122 |`, +| -------- | -------- | -------- | ---- | -------- | -------- | ------------------ | -------- | ---------- | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 86 | 99 | 102 | 103 | 106 | 107 | 108 | 111 | 112 | 114 | 115 | 116 | 118 | 119 | 120 | 121 | 122 |`, }; async function handler(ctx) { diff --git a/lib/routes/bjx/fd.ts b/lib/routes/bjx/fd.ts index fb172ddbe03e..9d6c4d681386 100644 --- a/lib/routes/bjx/fd.ts +++ b/lib/routes/bjx/fd.ts @@ -21,7 +21,7 @@ export const route: Route = { maintainers: ['hualiong'], description: `\`:type\` 类型可选如下 - | 要闻 | 政策 | 数据 | 市场 | 企业 | 招标 | 技术 | 报道 | +| 要闻 | 政策 | 数据 | 市场 | 企业 | 招标 | 技术 | 报道 | | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | yw | zc | sj | sc | mq | zb | js | bd |`, handler: async (ctx) => { diff --git a/lib/routes/bjx/types.ts b/lib/routes/bjx/types.ts index 90d6a9a3b1ca..e7e36a6016ae 100644 --- a/lib/routes/bjx/types.ts +++ b/lib/routes/bjx/types.ts @@ -21,9 +21,9 @@ export const route: Route = { handler, description: `\`:type\` 类型可选如下 - | 要闻 | 政策 | 市场行情 | 企业动态 | 独家观点 | 项目工程 | 招标采购 | 财经 | 国际行情 | 价格趋势 | 技术跟踪 | - | ---- | ---- | -------- | -------- | -------- | -------- | -------- | ---- | -------- | -------- | -------- | - | yw | zc | sc | mq | dj | xm | zb | cj | gj | sj | js |`, +| 要闻 | 政策 | 市场行情 | 企业动态 | 独家观点 | 项目工程 | 招标采购 | 财经 | 国际行情 | 价格趋势 | 技术跟踪 | +| ---- | ---- | -------- | -------- | -------- | -------- | -------- | ---- | -------- | -------- | -------- | +| yw | zc | sc | mq | dj | xm | zb | cj | gj | sj | js |`, }; async function handler(ctx) { diff --git a/lib/routes/blizzard/news.ts b/lib/routes/blizzard/news.ts index 66c66a80f16e..4d083bc40189 100644 --- a/lib/routes/blizzard/news.ts +++ b/lib/routes/blizzard/news.ts @@ -21,43 +21,43 @@ export const route: Route = { handler, description: `Categories - | Category | Slug | - | ---------------------- | ------------------- | - | All News | | - | Diablo II: Resurrected | diablo2 | - | Diablo III | diablo3 | - | Diablo IV | diablo4 | - | Diablo Immortal | diablo-immortal | - | Hearthstone | hearthstone | - | Heroes of the Storm | heroes-of-the-storm | - | Overwatch 2 | overwatch | - | StarCraft: Remastered | starcraft | - | StarCraft II | starcraft2 | - | World of Warcraft | world-of-warcraft | - | Warcraft 3: Reforged | warcraft3 | - | Warcraft Rumble | warcraft-rumble | - | Battle.net | battlenet | - | BlizzCon | blizzcon | - | Inside Blizzard | blizzard | +| Category | Slug | +| ---------------------- | ------------------- | +| All News | | +| Diablo II: Resurrected | diablo2 | +| Diablo III | diablo3 | +| Diablo IV | diablo4 | +| Diablo Immortal | diablo-immortal | +| Hearthstone | hearthstone | +| Heroes of the Storm | heroes-of-the-storm | +| Overwatch 2 | overwatch | +| StarCraft: Remastered | starcraft | +| StarCraft II | starcraft2 | +| World of Warcraft | world-of-warcraft | +| Warcraft 3: Reforged | warcraft3 | +| Warcraft Rumble | warcraft-rumble | +| Battle.net | battlenet | +| BlizzCon | blizzcon | +| Inside Blizzard | blizzard | Language codes - | Language | Code | - | ------------------ | ----- | - | Deutsch | de-de | - | English (US) | en-us | - | English (EU) | en-gb | - | Español (EU) | es-es | - | Español (Latino) | es-mx | - | Français | fr-fr | - | Italiano | it-it | - | Português (Brasil) | pt-br | - | Polski | pl-pl | - | Русский | ru-ru | - | 한국어 | ko-kr | - | ภาษาไทย | th-th | - | 日本語 | ja-jp | - | 繁體中文 | zh-tw |`, +| Language | Code | +| ------------------ | ----- | +| Deutsch | de-de | +| English (US) | en-us | +| English (EU) | en-gb | +| Español (EU) | es-es | +| Español (Latino) | es-mx | +| Français | fr-fr | +| Italiano | it-it | +| Português (Brasil) | pt-br | +| Polski | pl-pl | +| Русский | ru-ru | +| 한국어 | ko-kr | +| ภาษาไทย | th-th | +| 日本語 | ja-jp | +| 繁體中文 | zh-tw |`, }; const GAME_MAP = { diff --git a/lib/routes/bloomberg/index.ts b/lib/routes/bloomberg/index.ts index 778a865fd924..46f6a7d8d7ab 100644 --- a/lib/routes/bloomberg/index.ts +++ b/lib/routes/bloomberg/index.ts @@ -37,20 +37,20 @@ export const route: Route = { name: 'Bloomberg Site', maintainers: ['bigfei'], description: ` - | Site ID | Title | - | ------------ | ------------ | - | / | News | - | bpol | Politics | - | bbiz | Business | - | markets | Markets | - | technology | Technology | - | green | Green | - | wealth | Wealth | - | pursuits | Pursuits | - | bview | Opinion | - | equality | Equality | - | businessweek | Businessweek | - | citylab | CityLab | +| Site ID | Title | +| ------------ | ------------ | +| / | News | +| bpol | Politics | +| bbiz | Business | +| markets | Markets | +| technology | Technology | +| green | Green | +| wealth | Wealth | +| pursuits | Pursuits | +| bview | Opinion | +| equality | Equality | +| businessweek | Businessweek | +| citylab | CityLab | `, handler, }; diff --git a/lib/routes/bnu/bs.ts b/lib/routes/bnu/bs.ts index 1a21e02541c9..fa2bcdc9e858 100644 --- a/lib/routes/bnu/bs.ts +++ b/lib/routes/bnu/bs.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 学院新闻 | 通知公告 | 学术成果 | 学术讲座 | 教师观点 | 人才招聘 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | xw | zytzyyg | xzcg | xzjz | xz | bshzs |`, +| -------- | -------- | -------- | -------- | -------- | -------- | +| xw | zytzyyg | xzcg | xzjz | xz | bshzs |`, }; async function handler(ctx) { diff --git a/lib/routes/bnu/mba.ts b/lib/routes/bnu/mba.ts index 8e1106cabc9a..e42435d0e300 100644 --- a/lib/routes/bnu/mba.ts +++ b/lib/routes/bnu/mba.ts @@ -88,35 +88,35 @@ export const route: Route = { 若订阅 [新闻聚焦](https://mba.bnu.edu.cn/xwdt/index.html),网址为 \`https://mba.bnu.edu.cn/xwdt/index.html\`。截取 \`https://mba.bnu.edu.cn/\` 到末尾 \`/index.html\` 的部分 \`xwdt\` 作为参数填入,此时路由为 [\`/bnu/mba/xwdt\`](https://rsshub.app/bnu/mba/xwdt)。 ::: - #### [主页](https://mba.bnu.edu.cn) +#### [主页](https://mba.bnu.edu.cn) - | [新闻聚焦](https://mba.bnu.edu.cn/xwdt/index.html) | [通知公告](https://mba.bnu.edu.cn/tzgg/index.html) | [MBA 系列讲座](https://mba.bnu.edu.cn/mbaxljz/index.html) | - | -------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------------- | - | [xwdt](https://rsshub.app/bnu/mba/xwdt) | [tzgg](https://rsshub.app/bnu/mba/tzgg) | [mbaxljz](https://rsshub.app/bnu/mba/mbaxljz) | +| [新闻聚焦](https://mba.bnu.edu.cn/xwdt/index.html) | [通知公告](https://mba.bnu.edu.cn/tzgg/index.html) | [MBA 系列讲座](https://mba.bnu.edu.cn/mbaxljz/index.html) | +| -------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------------- | +| [xwdt](https://rsshub.app/bnu/mba/xwdt) | [tzgg](https://rsshub.app/bnu/mba/tzgg) | [mbaxljz](https://rsshub.app/bnu/mba/mbaxljz) | - #### [招生动态](https://mba.bnu.edu.cn/zsdt/zsjz/index.html) +#### [招生动态](https://mba.bnu.edu.cn/zsdt/zsjz/index.html) - | [下载专区](https://mba.bnu.edu.cn/zsdt/cjwt/index.html) | - | ------------------------------------------------------- | - | [zsdt/cjwt](https://rsshub.app/bnu/mba/zsdt/cjwt) | +| [下载专区](https://mba.bnu.edu.cn/zsdt/cjwt/index.html) | +| ------------------------------------------------------- | +| [zsdt/cjwt](https://rsshub.app/bnu/mba/zsdt/cjwt) | - #### [国际视野](https://mba.bnu.edu.cn/gjhz/hwjd/index.html) +#### [国际视野](https://mba.bnu.edu.cn/gjhz/hwjd/index.html) - | [海外基地](https://mba.bnu.edu.cn/gjhz/hwjd/index.html) | [学位合作](https://mba.bnu.edu.cn/gjhz/xwhz/index.html) | [长期交换](https://mba.bnu.edu.cn/gjhz/zqjh/index.html) | [短期项目](https://mba.bnu.edu.cn/gjhz/dqxm/index.html) | - | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | - | [gjhz/hwjd](https://rsshub.app/bnu/mba/gjhz/hwjd) | [gjhz/xwhz](https://rsshub.app/bnu/mba/gjhz/xwhz) | [gjhz/zqjh](https://rsshub.app/bnu/mba/gjhz/zqjh) | [gjhz/dqxm](https://rsshub.app/bnu/mba/gjhz/dqxm) | +| [海外基地](https://mba.bnu.edu.cn/gjhz/hwjd/index.html) | [学位合作](https://mba.bnu.edu.cn/gjhz/xwhz/index.html) | [长期交换](https://mba.bnu.edu.cn/gjhz/zqjh/index.html) | [短期项目](https://mba.bnu.edu.cn/gjhz/dqxm/index.html) | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| [gjhz/hwjd](https://rsshub.app/bnu/mba/gjhz/hwjd) | [gjhz/xwhz](https://rsshub.app/bnu/mba/gjhz/xwhz) | [gjhz/zqjh](https://rsshub.app/bnu/mba/gjhz/zqjh) | [gjhz/dqxm](https://rsshub.app/bnu/mba/gjhz/dqxm) | - #### [校园生活](https://mba.bnu.edu.cn/xysh/xszz/index.html) +#### [校园生活](https://mba.bnu.edu.cn/xysh/xszz/index.html) - | [学生组织](https://mba.bnu.edu.cn/xysh/xszz/index.html) | - | ------------------------------------------------------- | - | [xysh/xszz](https://rsshub.app/bnu/mba/xysh/xszz) | +| [学生组织](https://mba.bnu.edu.cn/xysh/xszz/index.html) | +| ------------------------------------------------------- | +| [xysh/xszz](https://rsshub.app/bnu/mba/xysh/xszz) | - #### [职业发展](https://mba.bnu.edu.cn/zyfz/xwds/index.html) +#### [职业发展](https://mba.bnu.edu.cn/zyfz/xwds/index.html) - | [校外导师](https://mba.bnu.edu.cn/zyfz/xwds/index.html) | [企业实践](https://mba.bnu.edu.cn/zyfz/zycp/index.html) | [就业创业](https://mba.bnu.edu.cn/zyfz/jycy/index.html) | - | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | - | [zyfz/xwds](https://rsshub.app/bnu/mba/zyfz/xwds) | [zyfz/zycp](https://rsshub.app/bnu/mba/zyfz/zycp) | [zyfz/jycy](https://rsshub.app/bnu/mba/zyfz/jycy) | +| [校外导师](https://mba.bnu.edu.cn/zyfz/xwds/index.html) | [企业实践](https://mba.bnu.edu.cn/zyfz/zycp/index.html) | [就业创业](https://mba.bnu.edu.cn/zyfz/jycy/index.html) | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| [zyfz/xwds](https://rsshub.app/bnu/mba/zyfz/xwds) | [zyfz/zycp](https://rsshub.app/bnu/mba/zyfz/zycp) | [zyfz/jycy](https://rsshub.app/bnu/mba/zyfz/jycy) | `, categories: ['university'], diff --git a/lib/routes/boc/whpj.ts b/lib/routes/boc/whpj.ts index 8e79b1e542bc..e167d847311d 100644 --- a/lib/routes/boc/whpj.ts +++ b/lib/routes/boc/whpj.ts @@ -26,8 +26,8 @@ export const route: Route = { handler, url: 'boc.cn/sourcedb/whpj', description: `| 短格式 | 中行折算价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | - | ------ | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | - | short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc |`, +| ------ | ---------- | -------- | -------- | -------- | -------- | -------- | -------- | +| short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc |`, }; async function handler(ctx) { diff --git a/lib/routes/bookfere/category.ts b/lib/routes/bookfere/category.ts index b8e895bcf93c..db31ffbe7b08 100644 --- a/lib/routes/bookfere/category.ts +++ b/lib/routes/bookfere/category.ts @@ -32,8 +32,8 @@ export const route: Route = { maintainers: ['OdinZhang'], handler, description: `| 每周一书 | 使用技巧 | 图书推荐 | 新闻速递 | 精选短文 | - | -------- | -------- | -------- | -------- | -------- | - | weekly | skills | books | news | essay |`, +| -------- | -------- | -------- | -------- | -------- | +| weekly | skills | books | news | essay |`, }; async function handler(ctx) { diff --git a/lib/routes/bossdesign/index.ts b/lib/routes/bossdesign/index.ts index 6b82474986c2..84c3fc16f125 100644 --- a/lib/routes/bossdesign/index.ts +++ b/lib/routes/bossdesign/index.ts @@ -20,8 +20,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| Boss 笔记 | 电脑日志 | 素材资源 | 设计师神器 | 设计教程 | 设计资讯 | - | --------- | --------------- | ---------------- | --------------- | --------------- | ------------------- | - | note | computer-skills | design-resources | design-software | design-tutorial | design\_information |`, +| --------- | --------------- | ---------------- | --------------- | --------------- | ------------------- | +| note | computer-skills | design-resources | design-software | design-tutorial | design\_information |`, }; async function handler(ctx) { diff --git a/lib/routes/bse/index.ts b/lib/routes/bse/index.ts index ea7befb77b38..58c4fffcbcbf 100644 --- a/lib/routes/bse/index.ts +++ b/lib/routes/bse/index.ts @@ -143,24 +143,24 @@ export const route: Route = { handler, url: 'bse.cn/', description: `| 本所要闻 | 人才招聘 | 采购信息 | 业务通知 | - | --------------- | -------- | -------- | ---------- | - | important\_news | recruit | purchase | news\_list | +| --------------- | -------- | -------- | ---------- | +| important\_news | recruit | purchase | news\_list | - | 法律法规 | 公开征求意见 | 部门规章 | 发行融资 | - | --------- | --------------- | ---------------- | ---------- | - | law\_list | public\_opinion | regulation\_list | fxrz\_list | +| 法律法规 | 公开征求意见 | 部门规章 | 发行融资 | +| --------- | --------------- | ---------------- | ---------- | +| law\_list | public\_opinion | regulation\_list | fxrz\_list | - | 持续监管 | 交易管理 | 市场管理 | 上市委会议公告 | - | ---------- | ---------- | ---------- | --------------- | - | cxjg\_list | jygl\_list | scgl\_list | meeting\_notice | +| 持续监管 | 交易管理 | 市场管理 | 上市委会议公告 | +| ---------- | ---------- | ---------- | --------------- | +| cxjg\_list | jygl\_list | scgl\_list | meeting\_notice | - | 上市委会议结果公告 | 上市委会议变更公告 | 并购重组委会议公告 | - | ------------------ | ------------------ | ------------------ | - | meeting\_result | meeting\_change | bgcz\_notice | +| 上市委会议结果公告 | 上市委会议变更公告 | 并购重组委会议公告 | +| ------------------ | ------------------ | ------------------ | +| meeting\_result | meeting\_change | bgcz\_notice | - | 并购重组委会议结果公告 | 并购重组委会议变更公告 | 终止审核 | 注册结果 | - | ---------------------- | ---------------------- | ------------------ | ------------- | - | bgcz\_result | bgcz\_change | termination\_audit | audit\_result |`, +| 并购重组委会议结果公告 | 并购重组委会议变更公告 | 终止审核 | 注册结果 | +| ---------------------- | ---------------------- | ------------------ | ------------- | +| bgcz\_result | bgcz\_change | termination\_audit | audit\_result |`, }; async function handler(ctx) { diff --git a/lib/routes/btzj/index.ts b/lib/routes/btzj/index.ts index f7a6f01fdd09..b665838cd533 100644 --- a/lib/routes/btzj/index.ts +++ b/lib/routes/btzj/index.ts @@ -43,21 +43,21 @@ export const route: Route = { 基础分类如下: - | 交流 | 电影 | 剧集 | 高清电影 | - | ------------------- | ------------------- | ------------------- | -------------------- | - | forum-index-fid-975 | forum-index-fid-951 | forum-index-fid-950 | forum-index-fid-1183 | +| 交流 | 电影 | 剧集 | 高清电影 | +| ------------------- | ------------------- | ------------------- | -------------------- | +| forum-index-fid-975 | forum-index-fid-951 | forum-index-fid-950 | forum-index-fid-1183 | - | 音乐 | 动漫 | 游戏 | 综艺 | - | ------------------- | ------------------- | ------------------- | -------------------- | - | forum-index-fid-953 | forum-index-fid-981 | forum-index-fid-955 | forum-index-fid-1106 | +| 音乐 | 动漫 | 游戏 | 综艺 | +| ------------------- | ------------------- | ------------------- | -------------------- | +| forum-index-fid-953 | forum-index-fid-981 | forum-index-fid-955 | forum-index-fid-1106 | - | 图书 | 美图 | 站务 | 科技 | - | -------------------- | ------------------- | ----------------- | ------------------- | - | forum-index-fid-1151 | forum-index-fid-957 | forum-index-fid-2 | forum-index-fid-952 | +| 图书 | 美图 | 站务 | 科技 | +| -------------------- | ------------------- | ----------------- | ------------------- | +| forum-index-fid-1151 | forum-index-fid-957 | forum-index-fid-2 | forum-index-fid-952 | - | 求助 | 音轨字幕 | - | -------------------- | -------------------- | - | forum-index-fid-1187 | forum-index-fid-1191 | +| 求助 | 音轨字幕 | +| -------------------- | -------------------- | +| forum-index-fid-1187 | forum-index-fid-1191 | ::: tip BT 之家的域名会变更,本路由以 \`https://www.btbtt20.com\` 为默认域名,若该域名无法访问,可以通过在路由后方加上 \`?domain=<域名>\` 指定路由访问的域名。如指定域名为 \`https://www.btbtt15.com\`,则在 \`/btzj\` 后加上 \`?domain=btbtt15.com\` 即可,此时路由为 [\`/btzj?domain=btbtt15.com\`](https://rsshub.app/btzj?domain=btbtt15.com) diff --git a/lib/routes/buaa/news/index.ts b/lib/routes/buaa/news/index.ts index e6f7a4ecf439..3389d086aa14 100644 --- a/lib/routes/buaa/news/index.ts +++ b/lib/routes/buaa/news/index.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['AlanDecode'], handler, description: `| 综合新闻 | 信息公告 | 学术文化 | 校园风采 | 科教在线 | 媒体北航 | 专题新闻 | 北航人物 | - | -------- | -------- | ----------- | -------- | -------- | -------- | -------- | -------- | - | zhxw | xxgg_new | xsjwhhd_new | xyfc_new | kjzx_new | mtbh_new | ztxw | bhrw |`, +| -------- | -------- | ----------- | -------- | -------- | -------- | -------- | -------- | +| zhxw | xxgg_new | xsjwhhd_new | xyfc_new | kjzx_new | mtbh_new | ztxw | bhrw |`, }; async function handler(ctx: Context): Promise { diff --git a/lib/routes/byau/xinwen/index.ts b/lib/routes/byau/xinwen/index.ts index 4fec6eee071b..b6dc00800f9c 100644 --- a/lib/routes/byau/xinwen/index.ts +++ b/lib/routes/byau/xinwen/index.ts @@ -21,8 +21,8 @@ export const route: Route = { handler, url: 'xinwen.byau.edu.cn', description: `| 学校要闻 | 校园动态 | - | ---- | ----------- | - | 3674 | 3676 |`, +| ---- | ----------- | +| 3674 | 3676 |`, }; async function handler(ctx) { diff --git a/lib/routes/cahkms/index.ts b/lib/routes/cahkms/index.ts index 1e6f24b6a305..7f9d8f3fa307 100644 --- a/lib/routes/cahkms/index.ts +++ b/lib/routes/cahkms/index.ts @@ -46,12 +46,12 @@ export const route: Route = { handler, url: 'cahkms.org/', description: `| 关于我们 | 港澳新闻 | 重要新闻 | 顾问点评、会员观点 | 专题汇总 | - | -------- | -------- | -------- | ------------------ | -------- | - | 01 | 02 | 03 | 04 | 05 | +| -------- | -------- | -------- | ------------------ | -------- | +| 01 | 02 | 03 | 04 | 05 | - | 港澳时评 | 图片新闻 | 视频中心 | 港澳研究 | 最新书讯 | 研究资讯 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 06 | 07 | 08 | 09 | 10 | 11 |`, +| 港澳时评 | 图片新闻 | 视频中心 | 港澳研究 | 最新书讯 | 研究资讯 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| 06 | 07 | 08 | 09 | 10 | 11 |`, }; async function handler(ctx) { diff --git a/lib/routes/caixin/category.ts b/lib/routes/caixin/category.ts index 7dc456c37c11..134c9a162b3b 100644 --- a/lib/routes/caixin/category.ts +++ b/lib/routes/caixin/category.ts @@ -26,21 +26,21 @@ export const route: Route = { handler, description: `Column 列表: - | 经济 | 金融 | 政经 | 环科 | 世界 | 观点网 | 文化 | 周刊 | - | ------- | ------- | ----- | ------- | ------------- | ------- | ------- | ------ | - | economy | finance | china | science | international | opinion | culture | weekly | +| 经济 | 金融 | 政经 | 环科 | 世界 | 观点网 | 文化 | 周刊 | +| ------- | ------- | ----- | ------- | ------------- | ------- | ------- | ------ | +| economy | finance | china | science | international | opinion | culture | weekly | 以金融板块为例的 category 列表:(其余 column 以类似方式寻找) - | 监管 | 银行 | 证券基金 | 信托保险 | 投资 | 创新 | 市场 | - | ---------- | ---- | -------- | ---------------- | ---------- | ---------- | ------ | - | regulation | bank | stock | insurance\_trust | investment | innovation | market | +| 监管 | 银行 | 证券基金 | 信托保险 | 投资 | 创新 | 市场 | +| ---------- | ---- | -------- | ---------------- | ---------- | ---------- | ------ | +| regulation | bank | stock | insurance\_trust | investment | innovation | market | Category 列表: - | 封面报道 | 开卷 | 社论 | 时事 | 编辑寄语 | 经济 | 金融 | 商业 | 环境与科技 | 民生 | 副刊 | - | ---------- | ----- | --------- | ---------------- | ------------ | ------- | ------- | -------- | ----------------------- | ------- | ------ | - | coverstory | first | editorial | current\_affairs | editor\_desk | economy | finance | business | environment\_technology | cwcivil | column |`, +| 封面报道 | 开卷 | 社论 | 时事 | 编辑寄语 | 经济 | 金融 | 商业 | 环境与科技 | 民生 | 副刊 | +| ---------- | ----- | --------- | ---------------- | ------------ | ------- | ------- | -------- | ----------------------- | ------- | ------ | +| coverstory | first | editorial | current\_affairs | editor\_desk | economy | finance | business | environment\_technology | cwcivil | column |`, }; async function handler(ctx) { diff --git a/lib/routes/camchina/index.ts b/lib/routes/camchina/index.ts index ebe8624f9e36..0c7976c9b39b 100644 --- a/lib/routes/camchina/index.ts +++ b/lib/routes/camchina/index.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 新闻 | 通告栏 | - | ---- | ------ | - | 1 | 2 |`, +| ---- | ------ | +| 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/cankaoxiaoxi/index.ts b/lib/routes/cankaoxiaoxi/index.ts index 4c94ee68346d..9ed772ea6e48 100644 --- a/lib/routes/cankaoxiaoxi/index.ts +++ b/lib/routes/cankaoxiaoxi/index.ts @@ -26,26 +26,26 @@ export const route: Route = { maintainers: ['yuxinliu-alex', 'nczitzk'], handler, description: `| 栏目 | id | - | -------------- | -------- | - | 第一关注 | diyi | - | 中国 | zhongguo | - | 国际 | gj | - | 观点 | guandian | - | 锐参考 | ruick | - | 体育健康 | tiyujk | - | 科技应用 | kejiyy | - | 文化旅游 | wenhualy | - | 参考漫谈 | cankaomt | - | 研究动态 | yjdt | - | 海外智库 | hwzk | - | 业界信息・观点 | yjxx | - | 海外看中国城市 | hwkzgcs | - | 译名趣谈 | ymymqt | - | 译名发布 | ymymfb | - | 双语汇 | ymsyh | - | 参考视频 | video | - | 军事 | junshi | - | 参考人物 | cankaorw |`, +| -------------- | -------- | +| 第一关注 | diyi | +| 中国 | zhongguo | +| 国际 | gj | +| 观点 | guandian | +| 锐参考 | ruick | +| 体育健康 | tiyujk | +| 科技应用 | kejiyy | +| 文化旅游 | wenhualy | +| 参考漫谈 | cankaomt | +| 研究动态 | yjdt | +| 海外智库 | hwzk | +| 业界信息・观点 | yjxx | +| 海外看中国城市 | hwkzgcs | +| 译名趣谈 | ymymqt | +| 译名发布 | ymymfb | +| 双语汇 | ymsyh | +| 参考视频 | video | +| 军事 | junshi | +| 参考人物 | cankaorw |`, }; async function handler(ctx) { diff --git a/lib/routes/cas/cg/index.ts b/lib/routes/cas/cg/index.ts index be466bad1e86..df765efc1d17 100644 --- a/lib/routes/cas/cg/index.ts +++ b/lib/routes/cas/cg/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 工作动态 | 科技成果转移转化亮点工作 | - | -------- | ------------------------ | - | zh | cgzhld |`, +| -------- | ------------------------ | +| zh | cgzhld |`, }; async function handler(ctx) { diff --git a/lib/routes/casssp/news.ts b/lib/routes/casssp/news.ts index 8bf685857d70..8c9c5f20bc33 100644 --- a/lib/routes/casssp/news.ts +++ b/lib/routes/casssp/news.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 通知公告 | 新闻动态 | 信息公开 | 时政要闻 | - | -------- | -------- | -------- | -------- | - | 3 | 2 | 92 | 93 |`, +| -------- | -------- | -------- | -------- | +| 3 | 2 | 92 | 93 |`, }; async function handler(ctx) { diff --git a/lib/routes/cast/index.ts b/lib/routes/cast/index.ts index c4618cf24b67..dfad408465c5 100644 --- a/lib/routes/cast/index.ts +++ b/lib/routes/cast/index.ts @@ -64,15 +64,15 @@ export const route: Route = { 在路由末尾处加上 \`?limit=限制获取数目\` 来限制获取条目数量,默认值为\`10\` ::: - | 分类 | 编码 | - | -------- | ---- | - | 全景科协 | qjkx | - | 智库 | zk | - | 学术 | xs | - | 科普 | kp | - | 党建 | dj | - | 数据 | sj | - | 新闻 | xw |`, +| 分类 | 编码 | +| -------- | ---- | +| 全景科协 | qjkx | +| 智库 | zk | +| 学术 | xs | +| 科普 | kp | +| 党建 | dj | +| 数据 | sj | +| 新闻 | xw |`, }; async function handler(ctx) { diff --git a/lib/routes/caus/index.ts b/lib/routes/caus/index.ts index ad7e7dd394bb..a7a8bf1bab2a 100644 --- a/lib/routes/caus/index.ts +++ b/lib/routes/caus/index.ts @@ -46,8 +46,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 全部 | 要闻 | 商业 | 快讯 | 财富 | 生活 | - | ---- | ---- | ---- | ---- | ---- | ---- | - | 0 | 1 | 2 | 3 | 8 | 6 |`, +| ---- | ---- | ---- | ---- | ---- | ---- | +| 0 | 1 | 2 | 3 | 8 | 6 |`, }; async function handler(ctx) { diff --git a/lib/routes/cbpanet/index.ts b/lib/routes/cbpanet/index.ts index 88bb838c5d9c..c21d1d2f2069 100644 --- a/lib/routes/cbpanet/index.ts +++ b/lib/routes/cbpanet/index.ts @@ -93,56 +93,56 @@ export const route: Route = { 若订阅 [行业资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=11),网址为 \`https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=11\`。截取 \`https://www.cbpanet.com/\` 的 \`bigid\` 和 \`smallid\` 的部分作为参数填入,此时路由为 [\`/cbpanet/dzp_news/4/15\`](https://rsshub.app/cbpanet/dzp_news/4/15)。 ::: -
- 更多分类 +
+更多分类 - #### [协会](https://www.cbpanet.com/dzp_xiehui.aspx) +#### [协会](https://www.cbpanet.com/dzp_xiehui.aspx) - | [协会介绍](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=1) | [协会章程](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=2) | [理事会](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=3) | [内设机构](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=4) | [协会通知](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=5) | [协会活动](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=6) | - | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ---------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | - | [1/1](https://rsshub.app/cbpanet/dzp_news/1/1) | [1/2](https://rsshub.app/cbpanet/dzp_news/1/2) | [1/3](https://rsshub.app/cbpanet/dzp_news/1/3) | [1/4](https://rsshub.app/cbpanet/dzp_news/1/4) | [1/5](https://rsshub.app/cbpanet/dzp_news/1/5) | [1/6](https://rsshub.app/cbpanet/dzp_news/1/6) | +| [协会介绍](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=1) | [协会章程](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=2) | [理事会](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=3) | [内设机构](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=4) | [协会通知](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=5) | [协会活动](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=6) | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ---------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| [1/1](https://rsshub.app/cbpanet/dzp_news/1/1) | [1/2](https://rsshub.app/cbpanet/dzp_news/1/2) | [1/3](https://rsshub.app/cbpanet/dzp_news/1/3) | [1/4](https://rsshub.app/cbpanet/dzp_news/1/4) | [1/5](https://rsshub.app/cbpanet/dzp_news/1/5) | [1/6](https://rsshub.app/cbpanet/dzp_news/1/6) | - | [出版物](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=7) | [会员权利与义务](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=30) | - | ---------------------------------------------------------------- | ------------------------------------------------------------------------- | - | [1/7](https://rsshub.app/cbpanet/dzp_news/1/7) | [1/30](https://rsshub.app/cbpanet/dzp_news/1/30) | +| [出版物](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=7) | [会员权利与义务](https://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=30) | +| ---------------------------------------------------------------- | ------------------------------------------------------------------------- | +| [1/7](https://rsshub.app/cbpanet/dzp_news/1/7) | [1/30](https://rsshub.app/cbpanet/dzp_news/1/30) | - #### [行业资讯](https://www.cbpanet.com/dzp_news_list.aspx) +#### [行业资讯](https://www.cbpanet.com/dzp_news_list.aspx) - | [国内资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=8) | [海外资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=9) | [企业新闻](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=10) | [行业资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=11) | [热点聚焦](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=43) | [今日推荐](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=44) | - | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | - | [2/8](https://rsshub.app/cbpanet/dzp_news/2/8) | [2/9](https://rsshub.app/cbpanet/dzp_news/2/9) | [2/10](https://rsshub.app/cbpanet/dzp_news/2/10) | [2/11](https://rsshub.app/cbpanet/dzp_news/2/11) | [2/43](https://rsshub.app/cbpanet/dzp_news/2/43) | [2/44](https://rsshub.app/cbpanet/dzp_news/2/44) | +| [国内资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=8) | [海外资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=9) | [企业新闻](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=10) | [行业资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=11) | [热点聚焦](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=43) | [今日推荐](https://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=44) | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [2/8](https://rsshub.app/cbpanet/dzp_news/2/8) | [2/9](https://rsshub.app/cbpanet/dzp_news/2/9) | [2/10](https://rsshub.app/cbpanet/dzp_news/2/10) | [2/11](https://rsshub.app/cbpanet/dzp_news/2/11) | [2/43](https://rsshub.app/cbpanet/dzp_news/2/43) | [2/44](https://rsshub.app/cbpanet/dzp_news/2/44) | - #### [原料信息](https://www.cbpanet.com/dzp_yuanliao.aspx) +#### [原料信息](https://www.cbpanet.com/dzp_yuanliao.aspx) - | [价格行情](https://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=12) | [分析预测](https://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=13) | [原料信息](https://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=40) | [热点聚焦](https://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=45) | - | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | - | [3/12](https://rsshub.app/cbpanet/dzp_news/3/12) | [3/13](https://rsshub.app/cbpanet/dzp_news/3/13) | [3/40](https://rsshub.app/cbpanet/dzp_news/3/40) | [3/45](https://rsshub.app/cbpanet/dzp_news/3/45) | +| [价格行情](https://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=12) | [分析预测](https://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=13) | [原料信息](https://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=40) | [热点聚焦](https://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=45) | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [3/12](https://rsshub.app/cbpanet/dzp_news/3/12) | [3/13](https://rsshub.app/cbpanet/dzp_news/3/13) | [3/40](https://rsshub.app/cbpanet/dzp_news/3/40) | [3/45](https://rsshub.app/cbpanet/dzp_news/3/45) | - #### [法规标准](https://www.cbpanet.com/dzp_fagui.aspx) +#### [法规标准](https://www.cbpanet.com/dzp_fagui.aspx) - | [法规资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=15) | [法律法规](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=16) | [国内标准](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=14) | [国外标准](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=17) | [法规聚焦](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=46) | [今日推荐](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=47) | - | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | - | [4/15](https://rsshub.app/cbpanet/dzp_news/4/15) | [4/16](https://rsshub.app/cbpanet/dzp_news/4/16) | [4/14](https://rsshub.app/cbpanet/dzp_news/4/14) | [4/17](https://rsshub.app/cbpanet/dzp_news/4/17) | [4/46](https://rsshub.app/cbpanet/dzp_news/4/46) | [4/47](https://rsshub.app/cbpanet/dzp_news/4/47) | +| [法规资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=15) | [法律法规](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=16) | [国内标准](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=14) | [国外标准](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=17) | [法规聚焦](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=46) | [今日推荐](https://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=47) | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [4/15](https://rsshub.app/cbpanet/dzp_news/4/15) | [4/16](https://rsshub.app/cbpanet/dzp_news/4/16) | [4/14](https://rsshub.app/cbpanet/dzp_news/4/14) | [4/17](https://rsshub.app/cbpanet/dzp_news/4/17) | [4/46](https://rsshub.app/cbpanet/dzp_news/4/46) | [4/47](https://rsshub.app/cbpanet/dzp_news/4/47) | - #### [技术专区](https://www.cbpanet.com/dzp_jishu.aspx) +#### [技术专区](https://www.cbpanet.com/dzp_jishu.aspx) - | [产品介绍](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=18) | [科技成果](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=19) | [学术论文](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=20) | [资料下载](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=21) | [专家](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=50) | [民间智库](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=57) | - | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------- | - | [5/18](https://rsshub.app/cbpanet/dzp_news/5/18) | [5/19](https://rsshub.app/cbpanet/dzp_news/5/19) | [5/20](https://rsshub.app/cbpanet/dzp_news/5/20) | [5/21](https://rsshub.app/cbpanet/dzp_news/5/21) | [5/50](https://rsshub.app/cbpanet/dzp_news/5/50) | [5/57](https://rsshub.app/cbpanet/dzp_news/5/57) | +| [产品介绍](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=18) | [科技成果](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=19) | [学术论文](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=20) | [资料下载](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=21) | [专家](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=50) | [民间智库](https://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=57) | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------- | +| [5/18](https://rsshub.app/cbpanet/dzp_news/5/18) | [5/19](https://rsshub.app/cbpanet/dzp_news/5/19) | [5/20](https://rsshub.app/cbpanet/dzp_news/5/20) | [5/21](https://rsshub.app/cbpanet/dzp_news/5/21) | [5/50](https://rsshub.app/cbpanet/dzp_news/5/50) | [5/57](https://rsshub.app/cbpanet/dzp_news/5/57) | - #### [豆制品消费指南](https://www.cbpanet.com/dzp_zhinan.aspx) +#### [豆制品消费指南](https://www.cbpanet.com/dzp_zhinan.aspx) - | [膳食指南](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=22) | [营养成分](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=23) | [豆食菜谱](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=24) | [问与答](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=31) | [今日推荐](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=48) | [消费热点](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=53) | - | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | - | [6/22](https://rsshub.app/cbpanet/dzp_news/6/22) | [6/23](https://rsshub.app/cbpanet/dzp_news/6/23) | [6/24](https://rsshub.app/cbpanet/dzp_news/6/24) | [6/31](https://rsshub.app/cbpanet/dzp_news/6/31) | [6/48](https://rsshub.app/cbpanet/dzp_news/6/48) | [6/53](https://rsshub.app/cbpanet/dzp_news/6/53) | +| [膳食指南](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=22) | [营养成分](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=23) | [豆食菜谱](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=24) | [问与答](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=31) | [今日推荐](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=48) | [消费热点](https://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=53) | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [6/22](https://rsshub.app/cbpanet/dzp_news/6/22) | [6/23](https://rsshub.app/cbpanet/dzp_news/6/23) | [6/24](https://rsshub.app/cbpanet/dzp_news/6/24) | [6/31](https://rsshub.app/cbpanet/dzp_news/6/31) | [6/48](https://rsshub.app/cbpanet/dzp_news/6/48) | [6/53](https://rsshub.app/cbpanet/dzp_news/6/53) | - #### [营养与健康](https://www.cbpanet.com/dzp_yingyang.aspx) +#### [营养与健康](https://www.cbpanet.com/dzp_yingyang.aspx) - | [大豆营养概况](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=25) | [大豆食品和人类健康](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=26) | [世界豆类日,爱豆大行动](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=27) | [谣言粉碎机](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=29) | [最新资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=41) | [专家视点](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=49) | - | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | - | [7/25](https://rsshub.app/cbpanet/dzp_news/7/25) | [7/26](https://rsshub.app/cbpanet/dzp_news/7/26) | [7/27](https://rsshub.app/cbpanet/dzp_news/7/27) | [7/29](https://rsshub.app/cbpanet/dzp_news/7/29) | [7/41](https://rsshub.app/cbpanet/dzp_news/7/41) | [7/49](https://rsshub.app/cbpanet/dzp_news/7/49) | +| [大豆营养概况](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=25) | [大豆食品和人类健康](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=26) | [世界豆类日,爱豆大行动](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=27) | [谣言粉碎机](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=29) | [最新资讯](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=41) | [专家视点](https://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=49) | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [7/25](https://rsshub.app/cbpanet/dzp_news/7/25) | [7/26](https://rsshub.app/cbpanet/dzp_news/7/26) | [7/27](https://rsshub.app/cbpanet/dzp_news/7/27) | [7/29](https://rsshub.app/cbpanet/dzp_news/7/29) | [7/41](https://rsshub.app/cbpanet/dzp_news/7/41) | [7/49](https://rsshub.app/cbpanet/dzp_news/7/49) | -
+
`, categories: ['new-media'], diff --git a/lib/routes/ccac/news.ts b/lib/routes/ccac/news.ts index dcb5ad24323f..94f4cec3ae63 100644 --- a/lib/routes/ccac/news.ts +++ b/lib/routes/ccac/news.ts @@ -24,9 +24,9 @@ export const route: Route = { handler, description: `Category - | All | Detected Cases | Investigation Reports or Recommendations | Annual Reports | CCAC's Updates | - | --- | -------------- | ---------------------------------------- | -------------- | -------------- | - | all | case | Persuasion | AnnualReport | PCANews |`, +| All | Detected Cases | Investigation Reports or Recommendations | Annual Reports | CCAC's Updates | +| --- | -------------- | ---------------------------------------- | -------------- | -------------- | +| all | case | Persuasion | AnnualReport | PCANews |`, }; async function handler(ctx) { diff --git a/lib/routes/cccmc/index.ts b/lib/routes/cccmc/index.ts index 7dc4cb17a566..6670bf10195b 100644 --- a/lib/routes/cccmc/index.ts +++ b/lib/routes/cccmc/index.ts @@ -121,37 +121,37 @@ export const route: Route = { :::
- 更多分类 +更多分类 - #### [会员之家](https://www.cccmc.org.cn/hyzj) +#### [会员之家](https://www.cccmc.org.cn/hyzj) - | [会员之声](https://www.cccmc.org.cn/hyzj/hyzs/) | [会员动态](https://www.cccmc.org.cn/hyzj/hydt/) | [会员推介](https://www.cccmc.org.cn/hyzj/hytj/) | - | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | - | [hyzj/hyzs](https://rsshub.app/cccmc/hyzj/hyzs) | [hyzj/hydt](https://rsshub.app/cccmc/hyzj/hydt) | [hyzj/hytj](https://rsshub.app/cccmc/hyzj/hytj) | +| [会员之声](https://www.cccmc.org.cn/hyzj/hyzs/) | [会员动态](https://www.cccmc.org.cn/hyzj/hydt/) | [会员推介](https://www.cccmc.org.cn/hyzj/hytj/) | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| [hyzj/hyzs](https://rsshub.app/cccmc/hyzj/hyzs) | [hyzj/hydt](https://rsshub.app/cccmc/hyzj/hydt) | [hyzj/hytj](https://rsshub.app/cccmc/hyzj/hytj) | - #### [政策法规](https://www.cccmc.org.cn/zcfg) +#### [政策法规](https://www.cccmc.org.cn/zcfg) - | [综合政策](https://www.cccmc.org.cn/zcfg/zhzc/) | [国内贸易](https://www.cccmc.org.cn/zcfg/gnmy/) | [对外贸易](https://www.cccmc.org.cn/zcfg/dwmy/) | [投资合作](https://www.cccmc.org.cn/zcfg/tzhz/) | - | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | - | [zcfg/zhzc](https://rsshub.app/cccmc/zcfg/zhzc) | [zcfg/gnmy](https://rsshub.app/cccmc/zcfg/gnmy) | [zcfg/dwmy](https://rsshub.app/cccmc/zcfg/dwmy) | [zcfg/tzhz](https://rsshub.app/cccmc/zcfg/tzhz) | +| [综合政策](https://www.cccmc.org.cn/zcfg/zhzc/) | [国内贸易](https://www.cccmc.org.cn/zcfg/gnmy/) | [对外贸易](https://www.cccmc.org.cn/zcfg/dwmy/) | [投资合作](https://www.cccmc.org.cn/zcfg/tzhz/) | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| [zcfg/zhzc](https://rsshub.app/cccmc/zcfg/zhzc) | [zcfg/gnmy](https://rsshub.app/cccmc/zcfg/gnmy) | [zcfg/dwmy](https://rsshub.app/cccmc/zcfg/dwmy) | [zcfg/tzhz](https://rsshub.app/cccmc/zcfg/tzhz) | - #### [行业资讯](https://www.cccmc.org.cn/hyzx) +#### [行业资讯](https://www.cccmc.org.cn/hyzx) - | [统计分析](https://www.cccmc.org.cn/hyzx/tjfx/) | [石油化工](https://www.cccmc.org.cn/hyzx/syhg/) | [金属矿产](https://www.cccmc.org.cn/hyzx/jskc/) | [五金建材](https://www.cccmc.org.cn/hyzx/wjjc/) | - | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | - | [hyzx/tjfx](https://rsshub.app/cccmc/hyzx/tjfx) | [hyzx/syhg](https://rsshub.app/cccmc/hyzx/syhg) | [hyzx/jskc](https://rsshub.app/cccmc/hyzx/jskc) | [hyzx/wjjc](https://rsshub.app/cccmc/hyzx/wjjc) | +| [统计分析](https://www.cccmc.org.cn/hyzx/tjfx/) | [石油化工](https://www.cccmc.org.cn/hyzx/syhg/) | [金属矿产](https://www.cccmc.org.cn/hyzx/jskc/) | [五金建材](https://www.cccmc.org.cn/hyzx/wjjc/) | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| [hyzx/tjfx](https://rsshub.app/cccmc/hyzx/tjfx) | [hyzx/syhg](https://rsshub.app/cccmc/hyzx/syhg) | [hyzx/jskc](https://rsshub.app/cccmc/hyzx/jskc) | [hyzx/wjjc](https://rsshub.app/cccmc/hyzx/wjjc) | - #### [商业机会](https://www.cccmc.org.cn/syjh/)+ +#### [商业机会](https://www.cccmc.org.cn/syjh/)+ - | [供应信息](https://www.cccmc.org.cn/syjh/gyxx/) | [需求信息](https://www.cccmc.org.cn/syjh/xqxx/) | [合作信息](https://www.cccmc.org.cn/syjh/hzxx/) | - | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | - | [syjh/gyxx](https://rsshub.app/cccmc/syjh/gyxx) | [syjh/xqxx](https://rsshub.app/cccmc/syjh/xqxx) | [syjh/hzxx](https://rsshub.app/cccmc/syjh/hzxx) | +| [供应信息](https://www.cccmc.org.cn/syjh/gyxx/) | [需求信息](https://www.cccmc.org.cn/syjh/xqxx/) | [合作信息](https://www.cccmc.org.cn/syjh/hzxx/) | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| [syjh/gyxx](https://rsshub.app/cccmc/syjh/gyxx) | [syjh/xqxx](https://rsshub.app/cccmc/syjh/xqxx) | [syjh/hzxx](https://rsshub.app/cccmc/syjh/hzxx) | - #### [商会党建](https://www.cccmc.org.cn/shdj) +#### [商会党建](https://www.cccmc.org.cn/shdj) - | [党群动态](https://www.cccmc.org.cn/shdj/dqdt/) | [党内法规](https://www.cccmc.org.cn/shdj/dnfg/) | [青年工作](https://www.cccmc.org.cn/shdj/qngz/) | - | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | - | [shdj/dqdt](https://rsshub.app/cccmc/shdj/dqdt) | [shdj/dnfg](https://rsshub.app/cccmc/shdj/dnfg) | [shdj/qngz](https://rsshub.app/cccmc/shdj/qngz) | +| [党群动态](https://www.cccmc.org.cn/shdj/dqdt/) | [党内法规](https://www.cccmc.org.cn/shdj/dnfg/) | [青年工作](https://www.cccmc.org.cn/shdj/qngz/) | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| [shdj/dqdt](https://rsshub.app/cccmc/shdj/dqdt) | [shdj/dnfg](https://rsshub.app/cccmc/shdj/dnfg) | [shdj/qngz](https://rsshub.app/cccmc/shdj/qngz) |
`, categories: ['new-media'], diff --git a/lib/routes/ccf/ccfcv/index.ts b/lib/routes/ccf/ccfcv/index.ts index 38481ea07bb6..13f99d4e9150 100644 --- a/lib/routes/ccf/ccfcv/index.ts +++ b/lib/routes/ccf/ccfcv/index.ts @@ -36,8 +36,8 @@ export const route: Route = { maintainers: ['elxy'], handler, description: `| 学术前沿 | 热点征文 | 学术会议 | - | -------- | -------- | -------- | - | xsqy | rdzw | xshy |`, +| -------- | -------- | -------- | +| xsqy | rdzw | xshy |`, }; async function handler(ctx) { diff --git a/lib/routes/ccf/news.ts b/lib/routes/ccf/news.ts index 1fca4505a8a7..e3ddc11b654e 100644 --- a/lib/routes/ccf/news.ts +++ b/lib/routes/ccf/news.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| CCF 新闻 | CCF 聚焦 | ACM 信息 | - | ----------- | -------- | --------- | - | Media\_list | Focus | ACM\_News |`, +| ----------- | -------- | --------- | +| Media\_list | Focus | ACM\_News |`, }; async function handler(ctx) { diff --git a/lib/routes/ccfa/index.ts b/lib/routes/ccfa/index.ts index ff5699d5aceb..c52532a8528d 100644 --- a/lib/routes/ccfa/index.ts +++ b/lib/routes/ccfa/index.ts @@ -111,24 +111,24 @@ export const route: Route = { 若订阅 [协会动态](https://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=1),网址为 \`https://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=1\`。截取 \`https://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=\` 到末尾的部分 \`1\` 作为参数填入,此时路由为 [\`/ccfa/1\`](https://rsshub.app/ccfa/1)。 ::: - | 分类 | ID | - | ------------------------------------------------------------------------- | -------------------------------------- | - | [协会动态](http://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=1) | [1](https://rsshub.app/ccfa/1) | - | [行业动态](http://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=2) | [2](https://rsshub.app/ccfa/2) | - | [政策/报告/标准](http://www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=33) | [33](https://rsshub.app/ccfa/33) | - | [行业统计](http://www.ccfa.org.cn/portal/cn/lsbq.jsp?type=10003) | [10003](https://rsshub.app/ccfa/10003) | - | [创新案例](http://www.ccfa.org.cn/portal/cn/hybzs_list.jsp?type=10004) | [10004](https://rsshub.app/ccfa/10004) | - | [党建工作](http://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=7) | [7](https://rsshub.app/ccfa/7) | - | [新消费论坛](http://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=10005) | [10005](https://rsshub.app/ccfa/10005) | - - #### [政策/报告/标准](http://www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=33) - - | 分类 | ID | - | ------------------------------------------------------------------------------- | -------------------------------- | - | [行业报告](http://www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=33) | [33](https://rsshub.app/ccfa/33) | - | [行业标准](http://www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=34) | [34](https://rsshub.app/ccfa/34) | - | [行业政策](http://www.ccfa.org.cn/portal/cn/fangyizhuanqu_list.jsp?type=39) | [39](https://rsshub.app/ccfa/39) | - | [政策权威解读](http://www.ccfa.org.cn/portal/cn/fangyizhuanqu_list.jsp?type=40) | [40](https://rsshub.app/ccfa/40) | +| 分类 | ID | +| ------------------------------------------------------------------------- | -------------------------------------- | +| [协会动态](http://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=1) | [1](https://rsshub.app/ccfa/1) | +| [行业动态](http://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=2) | [2](https://rsshub.app/ccfa/2) | +| [政策/报告/标准](http://www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=33) | [33](https://rsshub.app/ccfa/33) | +| [行业统计](http://www.ccfa.org.cn/portal/cn/lsbq.jsp?type=10003) | [10003](https://rsshub.app/ccfa/10003) | +| [创新案例](http://www.ccfa.org.cn/portal/cn/hybzs_list.jsp?type=10004) | [10004](https://rsshub.app/ccfa/10004) | +| [党建工作](http://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=7) | [7](https://rsshub.app/ccfa/7) | +| [新消费论坛](http://www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=10005) | [10005](https://rsshub.app/ccfa/10005) | + +#### [政策/报告/标准](http://www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=33) + +| 分类 | ID | +| ------------------------------------------------------------------------------- | -------------------------------- | +| [行业报告](http://www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=33) | [33](https://rsshub.app/ccfa/33) | +| [行业标准](http://www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=34) | [34](https://rsshub.app/ccfa/34) | +| [行业政策](http://www.ccfa.org.cn/portal/cn/fangyizhuanqu_list.jsp?type=39) | [39](https://rsshub.app/ccfa/39) | +| [政策权威解读](http://www.ccfa.org.cn/portal/cn/fangyizhuanqu_list.jsp?type=40) | [40](https://rsshub.app/ccfa/40) | `, categories: ['new-media'], diff --git a/lib/routes/cctv/category.ts b/lib/routes/cctv/category.ts index 15eaebd67130..f1f854bb2864 100644 --- a/lib/routes/cctv/category.ts +++ b/lib/routes/cctv/category.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['idealclover', 'xyqfer'], handler, description: `| 新闻 | 国内 | 国际 | 社会 | 法治 | 文娱 | 科技 | 生活 | 教育 | 每周质量报告 | 新闻 1+1 | - | ---- | ----- | ----- | ------- | ---- | ---- | ---- | ---- | ---- | ------------ | --------- | - | news | china | world | society | law | ent | tech | life | edu | mzzlbg | xinwen1j1 |`, +| ---- | ----- | ----- | ------- | ---- | ---- | ---- | ---- | ---- | ------------ | --------- | +| news | china | world | society | law | ent | tech | life | edu | mzzlbg | xinwen1j1 |`, }; async function handler(ctx) { diff --git a/lib/routes/cctv/lm.ts b/lib/routes/cctv/lm.ts index 4fa78c433c9b..7294c74c01d9 100644 --- a/lib/routes/cctv/lm.ts +++ b/lib/routes/cctv/lm.ts @@ -28,12 +28,12 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 焦点访谈 | 等着我 | 今日说法 | 开讲啦 | - | -------- | ------ | -------- | ------ | - | jdft | dzw | jrsf | kjl | +| -------- | ------ | -------- | ------ | +| jdft | dzw | jrsf | kjl | - | 正大综艺 | 经济半小时 | 第一动画乐园 | - | -------- | ---------- | ------------ | - | zdzy | jjbxs | dydhly | +| 正大综艺 | 经济半小时 | 第一动画乐园 | +| -------- | ---------- | ------------ | +| zdzy | jjbxs | dydhly | ::: tip 更多栏目请看 [这里](https://tv.cctv.com/lm) diff --git a/lib/routes/cde/index.ts b/lib/routes/cde/index.ts index a3589cf491ad..f142f95f0dee 100644 --- a/lib/routes/cde/index.ts +++ b/lib/routes/cde/index.ts @@ -94,19 +94,19 @@ export const route: Route = { handler, description: `- 频道 - | 新闻中心 | 政策法规 | - | :------: | :------: | - | news | policy | +| 新闻中心 | 政策法规 | +| :------: | :------: | +| news | policy | - 类别 - | 新闻中心 | 政务新闻 | 要闻导读 | 图片新闻 | 工作动态 | - | :------: | :------: | :------: | :------: | :------: | - | | zwxw | ywdd | tpxw | gzdt | +| 新闻中心 | 政务新闻 | 要闻导读 | 图片新闻 | 工作动态 | +| :------: | :------: | :------: | :------: | :------: | +| | zwxw | ywdd | tpxw | gzdt | - | 政策法规 | 法律法规 | 中心规章 | - | :------: | :------: | :------: | - | | flfg | zxgz |`, +| 政策法规 | 法律法规 | 中心规章 | +| :------: | :------: | :------: | +| | flfg | zxgz |`, }; async function handler(ctx) { diff --git a/lib/routes/cde/xxgk.ts b/lib/routes/cde/xxgk.ts index 6504f56c9d27..75208249d4aa 100644 --- a/lib/routes/cde/xxgk.ts +++ b/lib/routes/cde/xxgk.ts @@ -67,8 +67,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 优先审评公示 | 突破性治疗公示 | 临床试验默示许可 | - | :--------------: | :--------------: | :--------------: | - | priorityApproval | breakthroughCure | cliniCal |`, +| :--------------: | :--------------: | :--------------: | +| priorityApproval | breakthroughCure | cliniCal |`, }; async function handler(ctx) { diff --git a/lib/routes/cde/zdyz.ts b/lib/routes/cde/zdyz.ts index e928bb177e46..a3166acf5780 100644 --- a/lib/routes/cde/zdyz.ts +++ b/lib/routes/cde/zdyz.ts @@ -55,8 +55,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 发布通告 | 征求意见 | - | :-----------: | :---------: | - | domesticGuide | opinionList |`, +| :-----------: | :---------: | +| domesticGuide | opinionList |`, }; async function handler(ctx) { diff --git a/lib/routes/cdi/index.ts b/lib/routes/cdi/index.ts index 9f4e082bd664..93338d72524a 100644 --- a/lib/routes/cdi/index.ts +++ b/lib/routes/cdi/index.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 樊纲观点 | 综研国策 | 综研观察 | 综研专访 | 综研视点 | 银湖新能源 | - | -------- | -------- | -------- | -------- | -------- | ---------- | - | 102 | 152 | 150 | 153 | 154 | 151 |`, +| -------- | -------- | -------- | -------- | -------- | ---------- | +| 102 | 152 | 150 | 153 | 154 | 151 |`, }; async function handler(ctx) { diff --git a/lib/routes/cebbank/history.ts b/lib/routes/cebbank/history.ts index 352814f9a10f..35666f8b836f 100644 --- a/lib/routes/cebbank/history.ts +++ b/lib/routes/cebbank/history.ts @@ -31,9 +31,9 @@ export const route: Route = { #### 历史牌价 {#zhong-guo-guang-da-yin-hang-wai-hui-pai-jia-li-shi-pai-jia} - | 美元 | 英镑 | 港币 | 瑞士法郎 | 瑞典克郎 | 丹麦克郎 | 挪威克郎 | 日元 | 加拿大元 | 澳大利亚元 | 新加坡元 | 欧元 | 澳门元 | 泰国铢 | 新西兰元 | 韩圆 | - | ---- | ---- | ---- | -------- | -------- | -------- | -------- | ---- | -------- | ---------- | -------- | ---- | ------ | ------ | -------- | ---- | - | usd | gbp | hkd | chf | sek | dkk | nok | jpy | cad | aud | sgd | eur | mop | thb | nzd | krw |`, +| 美元 | 英镑 | 港币 | 瑞士法郎 | 瑞典克郎 | 丹麦克郎 | 挪威克郎 | 日元 | 加拿大元 | 澳大利亚元 | 新加坡元 | 欧元 | 澳门元 | 泰国铢 | 新西兰元 | 韩圆 | +| ---- | ---- | ---- | -------- | -------- | -------- | -------- | ---- | -------- | ---------- | -------- | ---- | ------ | ------ | -------- | ---- | +| usd | gbp | hkd | chf | sek | dkk | nok | jpy | cad | aud | sgd | eur | mop | thb | nzd | krw |`, }; async function handler(ctx) { diff --git a/lib/routes/cfachina/analygarden.ts b/lib/routes/cfachina/analygarden.ts index c10f220c4dca..0995860ec5e9 100644 --- a/lib/routes/cfachina/analygarden.ts +++ b/lib/routes/cfachina/analygarden.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 有色金属类 | 黑色金属类 | 能源化工类 | 贵金属类 | 农产品类 | 金融类 | 指数类 | - | ---------- | ---------- | ---------- | -------- | -------- | ------ | ------ | - | ysjsl | hsjsl | nyhgl | gjsl | ncpl | jrl | zsl |`, +| ---------- | ---------- | ---------- | -------- | -------- | ------ | ------ | +| ysjsl | hsjsl | nyhgl | gjsl | ncpl | jrl | zsl |`, }; async function handler(ctx) { diff --git a/lib/routes/chaping/news.ts b/lib/routes/chaping/news.ts index 7977b387300a..b5febffac0d8 100644 --- a/lib/routes/chaping/news.ts +++ b/lib/routes/chaping/news.ts @@ -32,15 +32,15 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 编号 | 分类 | - | ---- | ---------- | - | 15 | 直播 | - | 3 | 科技新鲜事 | - | 7 | 互联网槽点 | - | 5 | 趣味科技 | - | 6 | DEBUG TIME | - | 1 | 游戏 | - | 8 | 视频 | - | 9 | 公里每小时 |`, +| ---- | ---------- | +| 15 | 直播 | +| 3 | 科技新鲜事 | +| 7 | 互联网槽点 | +| 5 | 趣味科技 | +| 6 | DEBUG TIME | +| 1 | 游戏 | +| 8 | 视频 | +| 9 | 公里每小时 |`, }; async function handler(ctx) { diff --git a/lib/routes/chiculture/topic.ts b/lib/routes/chiculture/topic.ts index 4c86dcc1d777..c992caa535a5 100644 --- a/lib/routes/chiculture/topic.ts +++ b/lib/routes/chiculture/topic.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 全部 | 現代中國 | 今日香港 | 全球化 | 一周時事通識 | - | ---- | -------- | -------- | ------ | ------------ | - | | 76 | 479 | 480 | 379 |`, +| ---- | -------- | -------- | ------ | ------------ | +| | 76 | 479 | 480 | 379 |`, }; async function handler(ctx) { diff --git a/lib/routes/chikubi/navigation.ts b/lib/routes/chikubi/navigation.ts index 09015ea56837..b512b7c8aab4 100644 --- a/lib/routes/chikubi/navigation.ts +++ b/lib/routes/chikubi/navigation.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: ['SnowAgar25'], handler, description: `| 殿堂 | 動畫 | VR | 漫畫 | 音聲 | CG・イラスト | - | ---- | ----- | -- | ----- | ----- | -- | - | best | video | vr | comic | voice | cg |`, +| ---- | ----- | -- | ----- | ----- | -- | +| best | video | vr | comic | voice | cg |`, }; const navigationItems = { diff --git a/lib/routes/china/finance/finance.ts b/lib/routes/china/finance/finance.ts index 6ccf25903f72..29e683502a09 100644 --- a/lib/routes/china/finance/finance.ts +++ b/lib/routes/china/finance/finance.ts @@ -38,8 +38,8 @@ export const route: Route = { maintainers: ['KingJem'], handler, description: `| 推荐 | TMT | 金融 | 地产 | 消费 | 医药 | 酒业 | IPO 观察 | - | ------- | --- | ------- | ------ | ------- | ----- | ---- | -------- | - | tuijian | TMT | jinrong | dichan | xiaofei | yiyao | wine | IPO | +| ------- | --- | ------- | ------ | ------- | ----- | ---- | -------- | +| tuijian | TMT | jinrong | dichan | xiaofei | yiyao | wine | IPO | > Note: The default news num is \`30\`. diff --git a/lib/routes/china/news/highlights/news.ts b/lib/routes/china/news/highlights/news.ts index 54a8349fe856..cda5def54276 100644 --- a/lib/routes/china/news/highlights/news.ts +++ b/lib/routes/china/news/highlights/news.ts @@ -33,9 +33,9 @@ export const route: Route = { handler, description: `Category of news - | China News | International News | Social News | Breaking News | - | ---------- | ------------------ | ----------- | ------------- | - | domestic | international | social | news100 |`, +| China News | International News | Social News | Breaking News | +| ---------- | ------------------ | ----------- | ------------- | +| domestic | international | social | news100 |`, }; async function handler(ctx) { diff --git a/lib/routes/chinacdc/index.ts b/lib/routes/chinacdc/index.ts index a534631b00e7..bdfcf4408eb4 100644 --- a/lib/routes/chinacdc/index.ts +++ b/lib/routes/chinacdc/index.ts @@ -148,7 +148,7 @@ export const route: Route = { | [zxyw](https://rsshub.app/chinacdc/zxyw) | [tzgg](https://rsshub.app/chinacdc/tzgg) |
- 更多分类 +更多分类 #### [党建园地](https://www.chinacdc.cn/dqgz/djgz/) diff --git a/lib/routes/chinadegrees/province.ts b/lib/routes/chinadegrees/province.ts index 418cc8596acb..df6ca73efca4 100644 --- a/lib/routes/chinadegrees/province.ts +++ b/lib/routes/chinadegrees/province.ts @@ -26,39 +26,39 @@ export const route: Route = { }, name: '各学位授予单位学位证书上网进度', description: `| 省市 | 代号 | - | ---------------- | ---- | - | 北京市 | 11 | - | 天津市 | 12 | - | 河北省 | 13 | - | 山西省 | 14 | - | 内蒙古自治区 | 15 | - | 辽宁省 | 21 | - | 吉林省 | 22 | - | 黑龙江省 | 23 | - | 上海市 | 31 | - | 江苏省 | 32 | - | 浙江省 | 33 | - | 安徽省 | 34 | - | 福建省 | 35 | - | 江西省 | 36 | - | 山东省 | 37 | - | 河南省 | 41 | - | 湖北省 | 42 | - | 湖南省 | 43 | - | 广东省 | 44 | - | 广西壮族自治区 | 45 | - | 海南省 | 46 | - | 重庆市 | 50 | - | 四川省 | 51 | - | 贵州省 | 52 | - | 云南省 | 53 | - | 西藏自治区 | 54 | - | 陕西省 | 61 | - | 甘肃省 | 62 | - | 青海省 | 63 | - | 宁夏回族自治区 | 64 | - | 新疆维吾尔自治区 | 65 | - | 台湾 | 71 |`, +| ---------------- | ---- | +| 北京市 | 11 | +| 天津市 | 12 | +| 河北省 | 13 | +| 山西省 | 14 | +| 内蒙古自治区 | 15 | +| 辽宁省 | 21 | +| 吉林省 | 22 | +| 黑龙江省 | 23 | +| 上海市 | 31 | +| 江苏省 | 32 | +| 浙江省 | 33 | +| 安徽省 | 34 | +| 福建省 | 35 | +| 江西省 | 36 | +| 山东省 | 37 | +| 河南省 | 41 | +| 湖北省 | 42 | +| 湖南省 | 43 | +| 广东省 | 44 | +| 广西壮族自治区 | 45 | +| 海南省 | 46 | +| 重庆市 | 50 | +| 四川省 | 51 | +| 贵州省 | 52 | +| 云南省 | 53 | +| 西藏自治区 | 54 | +| 陕西省 | 61 | +| 甘肃省 | 62 | +| 青海省 | 63 | +| 宁夏回族自治区 | 64 | +| 新疆维吾尔自治区 | 65 | +| 台湾 | 71 |`, maintainers: ['TonyRL'], handler, }; diff --git a/lib/routes/chinaisa/index.ts b/lib/routes/chinaisa/index.ts index 5de50965fc8b..17bc02430d8d 100644 --- a/lib/routes/chinaisa/index.ts +++ b/lib/routes/chinaisa/index.ts @@ -21,142 +21,142 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 栏目 | id | - | -------- | --------------------------------------------------------------- | - | 钢协动态 | 58af05dfb6b4300151760176d2aad0a04c275aaadbb1315039263f021f920dcd | - | 钢协要闻 | 67ea4f106bd8f0843c0538d43833c463a0cd411fc35642cbd555a5f39fcf352b | - | 会议报道 | e5070694f299a43b20d990e53b6a69dc02e755fef644ae667cf75deaff80407a | - | 领导讲话 | a873c2e67b26b4a2d8313da769f6e106abc9a1ff04b7f1a50674dfa47cf91a7b | - | 图片新闻 | 806254321b2459bddb3c2cb5590fef6332bd849079d3082daf6153d7f8d62e1e | +| -------- | --------------------------------------------------------------- | +| 钢协动态 | 58af05dfb6b4300151760176d2aad0a04c275aaadbb1315039263f021f920dcd | +| 钢协要闻 | 67ea4f106bd8f0843c0538d43833c463a0cd411fc35642cbd555a5f39fcf352b | +| 会议报道 | e5070694f299a43b20d990e53b6a69dc02e755fef644ae667cf75deaff80407a | +| 领导讲话 | a873c2e67b26b4a2d8313da769f6e106abc9a1ff04b7f1a50674dfa47cf91a7b | +| 图片新闻 | 806254321b2459bddb3c2cb5590fef6332bd849079d3082daf6153d7f8d62e1e |
- 更多栏目 - - #### 党建工作 - - | 栏目 | id | - | ---------------------------------------------------- | ---------------------------------------------------------------- | - | 党建工作 | 10e8911e0c852d91f08e173c768700da608abfb4e7b0540cb49fa5498f33522b | - | 学习贯彻习近平新时代中国特色社会主义思想主题教育专栏 | b7a7ad4b5d8ffaca4b29f3538fd289da9d07f827f89e6ea57ef07257498aacf9 | - | 党史学习教育专栏 | 4d8e7dec1b672704916331431156ea7628a598c191d751e4fc28408ccbd4e0c4 | - | 不忘初心、牢记使命 | 427f7c28c90ec9db1aab78db8156a63ff2e23f6a0cea693e3847fe6d595753db | - | 两学一做 | 5b0609fedc9052bb44f1cfe9acf5ec8c9fe960f22a07be69636f2cf1cacaa8f7 | - | 钢协党代会 | beaaa0314f0f532d4b18244cd70df614a4af97465d974401b1f5b3349d78144b | - | 创先争优 | e7ea82c886ba18691210aaf48b3582a92dca9c4f2aab912757cedafb066ff8a6 | - | 青年工作 | 2706ee3a4a4c3c23e90e13c8fdc3002855d1dba394b61626562a97b33af3dbd0 | - | 日常动态 | e21157a082fc0ab0d7062c8755e91472ee0d23de6ccc5c2a44b62e54062cf1e4 | - - #### 要闻 - - | 栏目 | id | - | ------------ | ---------------------------------------------------------------- | - | 要闻 | c42511ce3f868a515b49668dd250290c80d4dc8930c7e455d0e6e14b8033eae2 | - | 会员动态 | 268f86fdf61ac8614f09db38a2d0295253043b03e092c7ff48ab94290296125c | - | 疫情应对专栏 | a83c48faeb34065fd9b33d3c84957a152675141458aedc0ec454b760c9fcad65 | - - #### 统计发布 - - | 栏目 | id | - | -------- | ---------------------------------------------------------------- | - | 统计发布 | 2e3c87064bdfc0e43d542d87fce8bcbc8fe0463d5a3da04d7e11b4c7d692194b | - | 生产经营 | 3238889ba0fa3aabcf28f40e537d440916a361c9170a4054f9fc43517cb58c1e | - | 进出口 | 95ef75c752af3b6c8be479479d8b931de7418c00150720280d78c8f0da0a438c | - | 环保统计 | 619ce7b53a4291d47c19d0ee0765098ca435e252576fbe921280a63fba4bc712 | - - #### 行业分析 - - | 栏目 | id | - | -------- | ---------------------------------------------------------------- | - | 行业分析 | 1b4316d9238e09c735365896c8e4f677a3234e8363e5622ae6e79a5900a76f56 | - | 市场分析 | a44207e193a5caa5e64102604b6933896a0025eb85c57c583b39626f33d4dafd | - | 板带材 | 05d0e136828584d2cd6e45bdc3270372764781b98546cce122d9974489b1e2f2 | - | 社会库存 | 197422a82d9a09b9cc86188444574816e93186f2fde87474f8b028fc61472d35 | - - #### 钢材价格指数 - - | 栏目 | id | - | ------------ | ---------------------------------------------------------------- | - | 钢材价格指数 | 17b6a9a214c94ccc28e56d4d1a2dbb5acef3e73da431ddc0a849a4dcfc487d04 | - | 综合价格指数 | 63913b906a7a663f7f71961952b1ddfa845714b5982655b773a62b85dd3b064e | - | 地区价格 | fc816c75aed82b9bc25563edc9cf0a0488a2012da38cbef5258da614d6e51ba9 | - - #### 宏观经济信息 - - | 栏目 | id | - | ------------ | ---------------------------------------------------------------- | - | 宏观经济信息 | 5d77b433182404193834120ceed16fe0625860fafd5fd9e71d0800c4df227060 | - | 相关行业信息 | ae2a3c0fd4936acf75f4aab6fadd08bc6371aa65bdd50419e74b70d6f043c473 | - | 国际动态 | 1bad7c56af746a666e4a4e56e54a9508d344d7bc1498360580613590c16b6c41 | - - #### 专题报道 - - | 栏目 | id | - | -------------------- | ---------------------------------------------------------------- | - | 专题报道 | 50e7242bfd78b4395f3338df7699a0ff8847b886c4c3a55bd7c102a2cfe32fe9 | - | 钢协理事会 | 40c6404418699f0f8cb4e513013bb110ef250c782f0959852601e7c75e1afcd8 | - | 钢协新闻发布会 | 11ea370f565c6c141b1a4dac60aa00c4331bd442382a5dd476a5e73e001b773c | - | 劳模表彰 | 907e4ae217bf9c981a132051572103f9c87cccb7f00caf5a1770078829e6bcb3 | - | 钢铁行业职业技能竞赛 | 563c15270a691e3c7cb9cd9ba457c5af392eb4630fa833fc1a55c8e2afbc28a9 | - - #### 成果奖励 - - | 栏目 | id | - | ---------------------- | ---------------------------------------------------------------- | - | 成果奖励 | a6c30053b66356b4d77fbf6668bda69f7e782b2ae08a21d5db171d50a504bd40 | - | 冶金科学技术奖 | 50fe0c63f657ee48e49cb13fe7f7c5502046acdb05e2ee8a317f907af4191683 | - | 企业管理现代化创新成果 | b5607d3b73c2c3a3b069a97b9dbfd59af64aea27bafd5eb87ba44d1b07a33b66 | - | 清洁生产环境友好企业 | 4475c8e21374d063a22f95939a2909837e78fab1832dc97bf64f09fa01c0c5f7 | - | 产品开发市场开拓奖 | 169e34d7b29e3deaf4d4496da594d3bbde2eb0a40f7244b54dbfb9cc89a37296 | - | 质量金杯奖 | 68029784be6d9a7bf9cb8cace5b8a5ce5d2d871e9a0cbcbf84eeae0ea2746311 | - - #### 节能减排 - - | 栏目 | id | - | ------------------------------------------ | ---------------------------------------------------------------- | - | 节能减排 | 08895f1681c198fdf297ab38e33e1f428f6ccf2add382f3844a52e410f10e5a0 | - | 先进节能环保技术 | 6e639343a517fd08e5860fba581d41940da523753956ada973b6952fc05ef94f | - | 钢铁企业超低排放改造和评估监测进展情况公示 | 50d99531d5dee68346653ca9548f308764ad38410a091e662834a5ed66770174 | - - #### 国际交流 - - | 栏目 | id | - | -------- | ---------------------------------------------------------------- | - | 国际交流 | 4753eef81b4019369d4751413d852ab9027944b84c612b5a08614e046d169e81 | - | 外事动态 | aa590ec6f835136a9ce8c9f3d0c3b194beb6b78037466ab40bb4aacc32adfcc9 | - | 国际会展 | 05ac1f2971bc375d25c9112e399f9c3cbb237809684ebc5b0ca4a68a1fcb971c | - - #### 政策法规 - - | 栏目 | id | - | -------- | ---------------------------------------------------------------- | - | 政策法规 | 63a69eb0087f1984c0b269a1541905f19a56e117d56b3f51dfae0e6c1d436533 | - | 政策法规 | a214b2e71c3c79fa4a36ff382ee5f822b9603634626f7e320f91ed696b3666f2 | - | 贸易规则 | 5988b2380d04d3efde8cc247377d19530c17904ec0b5decdd00f9b3e026e3715 | - - #### 分会园地 - - | 栏目 | id | - | ------------ | ---------------------------------------------------------------- | - | 分会园地 | d059d6751dcaae94e31a795072267f7959c35d012eebb9858b3ede2990e82ea9 | - | 法律分会 | 96000647f18ea78fa134a3932563e7d27c68d0482de498f179b44846234567a9 | - | 设备分会 | c8e1e3f52406115c2c03928271bbe883c0875b7c9f2f67492395685a62a1a2d8 | - | 国际产能合作 | 4fb8cc4b0d6f905a969ac3375f6d17b34df4dcae69d798d2a4616daa80af020c | - | 绿化分会 | ad55a0fbc1a44e94fb60e21b98cf967aca17ecf1450bdfb3699468fe8235103b | - - #### 钢铁知识 - - | 栏目 | id | - | ------------ | ---------------------------------------------------------------- | - | 钢铁知识 | 7f7509ff045023015e0d6c1ba22c32734b673be2ec14eae730a99c08e3badb3f | - | 钢铁材料使用 | 7e319d71258ed6bb663cf59b4cf67fe97894e60aa5520f3d2cf966f82f9b89ac | - | 钢铁标准 | fae0c4dd27f8fe4759941e78c9dc1dfe0088ce30d1b684d12be4c8172d2c08e1 | - - #### 钢协刊物 - - | 栏目 | id | - | ---------- | ---------------------------------------------------------------- | - | 钢协刊物 | ed51af486f6d4b313b3aaf8fea0b32a4a2d4a89714c61992caf01942eb61831b | - | 中国钢铁业 | 6440bdfccadf87908b13d8bbd9a66bb89bbd60cc5e175c018ca1c62c7d55e61f | - | 钢铁信息 | 2b66af0b2cda9b420739e55e255a6f72f277557670ef861c9956da8fde25da05 | +更多栏目 + +#### 党建工作 + +| 栏目 | id | +| ---------------------------------------------------- | ---------------------------------------------------------------- | +| 党建工作 | 10e8911e0c852d91f08e173c768700da608abfb4e7b0540cb49fa5498f33522b | +| 学习贯彻习近平新时代中国特色社会主义思想主题教育专栏 | b7a7ad4b5d8ffaca4b29f3538fd289da9d07f827f89e6ea57ef07257498aacf9 | +| 党史学习教育专栏 | 4d8e7dec1b672704916331431156ea7628a598c191d751e4fc28408ccbd4e0c4 | +| 不忘初心、牢记使命 | 427f7c28c90ec9db1aab78db8156a63ff2e23f6a0cea693e3847fe6d595753db | +| 两学一做 | 5b0609fedc9052bb44f1cfe9acf5ec8c9fe960f22a07be69636f2cf1cacaa8f7 | +| 钢协党代会 | beaaa0314f0f532d4b18244cd70df614a4af97465d974401b1f5b3349d78144b | +| 创先争优 | e7ea82c886ba18691210aaf48b3582a92dca9c4f2aab912757cedafb066ff8a6 | +| 青年工作 | 2706ee3a4a4c3c23e90e13c8fdc3002855d1dba394b61626562a97b33af3dbd0 | +| 日常动态 | e21157a082fc0ab0d7062c8755e91472ee0d23de6ccc5c2a44b62e54062cf1e4 | + +#### 要闻 + +| 栏目 | id | +| ------------ | ---------------------------------------------------------------- | +| 要闻 | c42511ce3f868a515b49668dd250290c80d4dc8930c7e455d0e6e14b8033eae2 | +| 会员动态 | 268f86fdf61ac8614f09db38a2d0295253043b03e092c7ff48ab94290296125c | +| 疫情应对专栏 | a83c48faeb34065fd9b33d3c84957a152675141458aedc0ec454b760c9fcad65 | + +#### 统计发布 + +| 栏目 | id | +| -------- | ---------------------------------------------------------------- | +| 统计发布 | 2e3c87064bdfc0e43d542d87fce8bcbc8fe0463d5a3da04d7e11b4c7d692194b | +| 生产经营 | 3238889ba0fa3aabcf28f40e537d440916a361c9170a4054f9fc43517cb58c1e | +| 进出口 | 95ef75c752af3b6c8be479479d8b931de7418c00150720280d78c8f0da0a438c | +| 环保统计 | 619ce7b53a4291d47c19d0ee0765098ca435e252576fbe921280a63fba4bc712 | + +#### 行业分析 + +| 栏目 | id | +| -------- | ---------------------------------------------------------------- | +| 行业分析 | 1b4316d9238e09c735365896c8e4f677a3234e8363e5622ae6e79a5900a76f56 | +| 市场分析 | a44207e193a5caa5e64102604b6933896a0025eb85c57c583b39626f33d4dafd | +| 板带材 | 05d0e136828584d2cd6e45bdc3270372764781b98546cce122d9974489b1e2f2 | +| 社会库存 | 197422a82d9a09b9cc86188444574816e93186f2fde87474f8b028fc61472d35 | + +#### 钢材价格指数 + +| 栏目 | id | +| ------------ | ---------------------------------------------------------------- | +| 钢材价格指数 | 17b6a9a214c94ccc28e56d4d1a2dbb5acef3e73da431ddc0a849a4dcfc487d04 | +| 综合价格指数 | 63913b906a7a663f7f71961952b1ddfa845714b5982655b773a62b85dd3b064e | +| 地区价格 | fc816c75aed82b9bc25563edc9cf0a0488a2012da38cbef5258da614d6e51ba9 | + +#### 宏观经济信息 + +| 栏目 | id | +| ------------ | ---------------------------------------------------------------- | +| 宏观经济信息 | 5d77b433182404193834120ceed16fe0625860fafd5fd9e71d0800c4df227060 | +| 相关行业信息 | ae2a3c0fd4936acf75f4aab6fadd08bc6371aa65bdd50419e74b70d6f043c473 | +| 国际动态 | 1bad7c56af746a666e4a4e56e54a9508d344d7bc1498360580613590c16b6c41 | + +#### 专题报道 + +| 栏目 | id | +| -------------------- | ---------------------------------------------------------------- | +| 专题报道 | 50e7242bfd78b4395f3338df7699a0ff8847b886c4c3a55bd7c102a2cfe32fe9 | +| 钢协理事会 | 40c6404418699f0f8cb4e513013bb110ef250c782f0959852601e7c75e1afcd8 | +| 钢协新闻发布会 | 11ea370f565c6c141b1a4dac60aa00c4331bd442382a5dd476a5e73e001b773c | +| 劳模表彰 | 907e4ae217bf9c981a132051572103f9c87cccb7f00caf5a1770078829e6bcb3 | +| 钢铁行业职业技能竞赛 | 563c15270a691e3c7cb9cd9ba457c5af392eb4630fa833fc1a55c8e2afbc28a9 | + +#### 成果奖励 + +| 栏目 | id | +| ---------------------- | ---------------------------------------------------------------- | +| 成果奖励 | a6c30053b66356b4d77fbf6668bda69f7e782b2ae08a21d5db171d50a504bd40 | +| 冶金科学技术奖 | 50fe0c63f657ee48e49cb13fe7f7c5502046acdb05e2ee8a317f907af4191683 | +| 企业管理现代化创新成果 | b5607d3b73c2c3a3b069a97b9dbfd59af64aea27bafd5eb87ba44d1b07a33b66 | +| 清洁生产环境友好企业 | 4475c8e21374d063a22f95939a2909837e78fab1832dc97bf64f09fa01c0c5f7 | +| 产品开发市场开拓奖 | 169e34d7b29e3deaf4d4496da594d3bbde2eb0a40f7244b54dbfb9cc89a37296 | +| 质量金杯奖 | 68029784be6d9a7bf9cb8cace5b8a5ce5d2d871e9a0cbcbf84eeae0ea2746311 | + +#### 节能减排 + +| 栏目 | id | +| ------------------------------------------ | ---------------------------------------------------------------- | +| 节能减排 | 08895f1681c198fdf297ab38e33e1f428f6ccf2add382f3844a52e410f10e5a0 | +| 先进节能环保技术 | 6e639343a517fd08e5860fba581d41940da523753956ada973b6952fc05ef94f | +| 钢铁企业超低排放改造和评估监测进展情况公示 | 50d99531d5dee68346653ca9548f308764ad38410a091e662834a5ed66770174 | + +#### 国际交流 + +| 栏目 | id | +| -------- | ---------------------------------------------------------------- | +| 国际交流 | 4753eef81b4019369d4751413d852ab9027944b84c612b5a08614e046d169e81 | +| 外事动态 | aa590ec6f835136a9ce8c9f3d0c3b194beb6b78037466ab40bb4aacc32adfcc9 | +| 国际会展 | 05ac1f2971bc375d25c9112e399f9c3cbb237809684ebc5b0ca4a68a1fcb971c | + +#### 政策法规 + +| 栏目 | id | +| -------- | ---------------------------------------------------------------- | +| 政策法规 | 63a69eb0087f1984c0b269a1541905f19a56e117d56b3f51dfae0e6c1d436533 | +| 政策法规 | a214b2e71c3c79fa4a36ff382ee5f822b9603634626f7e320f91ed696b3666f2 | +| 贸易规则 | 5988b2380d04d3efde8cc247377d19530c17904ec0b5decdd00f9b3e026e3715 | + +#### 分会园地 + +| 栏目 | id | +| ------------ | ---------------------------------------------------------------- | +| 分会园地 | d059d6751dcaae94e31a795072267f7959c35d012eebb9858b3ede2990e82ea9 | +| 法律分会 | 96000647f18ea78fa134a3932563e7d27c68d0482de498f179b44846234567a9 | +| 设备分会 | c8e1e3f52406115c2c03928271bbe883c0875b7c9f2f67492395685a62a1a2d8 | +| 国际产能合作 | 4fb8cc4b0d6f905a969ac3375f6d17b34df4dcae69d798d2a4616daa80af020c | +| 绿化分会 | ad55a0fbc1a44e94fb60e21b98cf967aca17ecf1450bdfb3699468fe8235103b | + +#### 钢铁知识 + +| 栏目 | id | +| ------------ | ---------------------------------------------------------------- | +| 钢铁知识 | 7f7509ff045023015e0d6c1ba22c32734b673be2ec14eae730a99c08e3badb3f | +| 钢铁材料使用 | 7e319d71258ed6bb663cf59b4cf67fe97894e60aa5520f3d2cf966f82f9b89ac | +| 钢铁标准 | fae0c4dd27f8fe4759941e78c9dc1dfe0088ce30d1b684d12be4c8172d2c08e1 | + +#### 钢协刊物 + +| 栏目 | id | +| ---------- | ---------------------------------------------------------------- | +| 钢协刊物 | ed51af486f6d4b313b3aaf8fea0b32a4a2d4a89714c61992caf01942eb61831b | +| 中国钢铁业 | 6440bdfccadf87908b13d8bbd9a66bb89bbd60cc5e175c018ca1c62c7d55e61f | +| 钢铁信息 | 2b66af0b2cda9b420739e55e255a6f72f277557670ef861c9956da8fde25da05 |
`, }; diff --git a/lib/routes/chinamoney/notice.ts b/lib/routes/chinamoney/notice.ts index bd088724caa3..8fb5c22eee1d 100644 --- a/lib/routes/chinamoney/notice.ts +++ b/lib/routes/chinamoney/notice.ts @@ -23,36 +23,36 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `
- 市场公告 +市场公告 外汇市场公告 - | 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 | - | ---- | ------------ | ------------ | ------------ | - | 2834 | 2835 | 2836 | 2837 | +| 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 | +| ---- | ------------ | ------------ | ------------ | +| 2834 | 2835 | 2836 | 2837 | 本币市场公告 - | 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 | - | -------------- | ------------ | ------------ | ------------ | - | 2839,2840,2841 | 2839 | 2840 | 2841 | +| 最新 | 市场公告通知 | 中心会员公告 | 会员信息公告 | +| -------------- | ------------ | ------------ | ------------ | +| 2839,2840,2841 | 2839 | 2840 | 2841 | 央行业务公告 - | 最新 | 公开市场操作 | 中央国库现金管理 | - | --------- | ------------ | ---------------- | - | 2845,2846 | 2845 | 2846 | -
+| 最新 | 公开市场操作 | 中央国库现金管理 | +| --------- | ------------ | ---------------- | +| 2845,2846 | 2845 | 2846 | +
-
- 本币市场 +
+本币市场 贷款市场报价利率 - | LPR 市场公告 | - | ------------ | - | 3686 | -
`, +| LPR 市场公告 | +| ------------ | +| 3686 | +
`, }; async function handler(ctx) { diff --git a/lib/routes/chinania/index.ts b/lib/routes/chinania/index.ts index 90c137d767da..b49960a7b84f 100644 --- a/lib/routes/chinania/index.ts +++ b/lib/routes/chinania/index.ts @@ -84,52 +84,52 @@ export const route: Route = { 若订阅 [协会通知](https://www.chinania.org.cn/html/xiehuidongtai/xiehuitongzhi/),网址为 \`https://www.chinania.org.cn/html/xiehuidongtai/xiehuitongzhi/\`。截取 \`https://www.chinania.org.cn/html\` 到末尾 \`/\` 的部分 \`xiehuidongtai/xiehuitongzhi\` 作为参数填入,此时路由为 [\`/chinania/xiehuidongtai/xiehuitongzhi\`](https://rsshub.app/chinania/xiehuidongtai/xiehuitongzhi)。 ::: -
- 更多分类 +
+更多分类 - #### [协会动态](https://www.chinania.org.cn/html/xiehuidongtai/) +#### [协会动态](https://www.chinania.org.cn/html/xiehuidongtai/) - | [协会动态](https://www.chinania.org.cn/html/xiehuidongtai/xiehuidongtai/) | [协会通知](https://www.chinania.org.cn/html/xiehuidongtai/xiehuitongzhi/) | [有色企业50强](https://www.chinania.org.cn/html/xiehuidongtai/youseqiye50qiang/) | - | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | - | [xiehuidongtai/xiehuidongtai](https://rsshub.app/chinania/xiehuidongtai/xiehuidongtai) | [xiehuidongtai/xiehuitongzhi](https://rsshub.app/chinania/xiehuidongtai/xiehuitongzhi) | [xiehuidongtai/youseqiye50qiang](https://rsshub.app/chinania/xiehuidongtai/youseqiye50qiang) | +| [协会动态](https://www.chinania.org.cn/html/xiehuidongtai/xiehuidongtai/) | [协会通知](https://www.chinania.org.cn/html/xiehuidongtai/xiehuitongzhi/) | [有色企业50强](https://www.chinania.org.cn/html/xiehuidongtai/youseqiye50qiang/) | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| [xiehuidongtai/xiehuidongtai](https://rsshub.app/chinania/xiehuidongtai/xiehuidongtai) | [xiehuidongtai/xiehuitongzhi](https://rsshub.app/chinania/xiehuidongtai/xiehuitongzhi) | [xiehuidongtai/youseqiye50qiang](https://rsshub.app/chinania/xiehuidongtai/youseqiye50qiang) | - #### [党建工作](https://www.chinania.org.cn/html/djgz/) +#### [党建工作](https://www.chinania.org.cn/html/djgz/) - | [协会党建](https://www.chinania.org.cn/html/djgz/xiehuidangjian/) | [行业党建](https://www.chinania.org.cn/html/djgz/hangyedangjian/) | - | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | - | [djgz/xiehuidangjian](https://rsshub.app/chinania/djgz/xiehuidangjian) | [djgz/hangyedangjian](https://rsshub.app/chinania/djgz/hangyedangjian) | +| [协会党建](https://www.chinania.org.cn/html/djgz/xiehuidangjian/) | [行业党建](https://www.chinania.org.cn/html/djgz/hangyedangjian/) | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| [djgz/xiehuidangjian](https://rsshub.app/chinania/djgz/xiehuidangjian) | [djgz/hangyedangjian](https://rsshub.app/chinania/djgz/hangyedangjian) | - #### [行业新闻](https://www.chinania.org.cn/html/hangyexinwen/) +#### [行业新闻](https://www.chinania.org.cn/html/hangyexinwen/) - | [时政要闻](https://www.chinania.org.cn/html/hangyexinwen/shizhengyaowen/) | [要闻](https://www.chinania.org.cn/html/hangyexinwen/yaowen/) | [行业新闻](https://www.chinania.org.cn/html/hangyexinwen/guoneixinwen/) | [资讯](https://www.chinania.org.cn/html/hangyexinwen/zixun/) | - | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------- | - | [hangyexinwen/shizhengyaowen](https://rsshub.app/chinania/hangyexinwen/shizhengyaowen) | [hangyexinwen/yaowen](https://rsshub.app/chinania/hangyexinwen/yaowen) | [hangyexinwen/guoneixinwen](https://rsshub.app/chinania/hangyexinwen/guoneixinwen) | [hangyexinwen/zixun](https://rsshub.app/chinania/hangyexinwen/zixun) | +| [时政要闻](https://www.chinania.org.cn/html/hangyexinwen/shizhengyaowen/) | [要闻](https://www.chinania.org.cn/html/hangyexinwen/yaowen/) | [行业新闻](https://www.chinania.org.cn/html/hangyexinwen/guoneixinwen/) | [资讯](https://www.chinania.org.cn/html/hangyexinwen/zixun/) | +| -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------- | +| [hangyexinwen/shizhengyaowen](https://rsshub.app/chinania/hangyexinwen/shizhengyaowen) | [hangyexinwen/yaowen](https://rsshub.app/chinania/hangyexinwen/yaowen) | [hangyexinwen/guoneixinwen](https://rsshub.app/chinania/hangyexinwen/guoneixinwen) | [hangyexinwen/zixun](https://rsshub.app/chinania/hangyexinwen/zixun) | - #### [人力资源](https://www.chinania.org.cn/html/renliziyuan/) +#### [人力资源](https://www.chinania.org.cn/html/renliziyuan/) - | [相关通知](https://www.chinania.org.cn/html/renliziyuan/xiangguantongzhi/) | [人事招聘](https://www.chinania.org.cn/html/renliziyuan/renshizhaopin/) | - | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | - | [renliziyuan/xiangguantongzhi](https://rsshub.app/chinania/renliziyuan/xiangguantongzhi) | [renliziyuan/renshizhaopin](https://rsshub.app/chinania/renliziyuan/renshizhaopin) | +| [相关通知](https://www.chinania.org.cn/html/renliziyuan/xiangguantongzhi/) | [人事招聘](https://www.chinania.org.cn/html/renliziyuan/renshizhaopin/) | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| [renliziyuan/xiangguantongzhi](https://rsshub.app/chinania/renliziyuan/xiangguantongzhi) | [renliziyuan/renshizhaopin](https://rsshub.app/chinania/renliziyuan/renshizhaopin) | - #### [行业统计](https://www.chinania.org.cn/html/hangyetongji/jqzs/) +#### [行业统计](https://www.chinania.org.cn/html/hangyetongji/jqzs/) - | [行业分析](https://www.chinania.org.cn/html/hangyetongji/tongji/) | [数据统计](https://www.chinania.org.cn/html/hangyetongji/chanyeshuju/) | [景气指数](https://www.chinania.org.cn/html/hangyetongji/jqzs/) | - | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------ | - | [hangyetongji/tongji](https://rsshub.app/chinania/hangyetongji/tongji) | [hangyetongji/chanyeshuju](https://rsshub.app/chinania/hangyetongji/chanyeshuju) | [hangyetongji/jqzs](https://rsshub.app/chinania/hangyetongji/jqzs) | +| [行业分析](https://www.chinania.org.cn/html/hangyetongji/tongji/) | [数据统计](https://www.chinania.org.cn/html/hangyetongji/chanyeshuju/) | [景气指数](https://www.chinania.org.cn/html/hangyetongji/jqzs/) | +| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------ | +| [hangyetongji/tongji](https://rsshub.app/chinania/hangyetongji/tongji) | [hangyetongji/chanyeshuju](https://rsshub.app/chinania/hangyetongji/chanyeshuju) | [hangyetongji/jqzs](https://rsshub.app/chinania/hangyetongji/jqzs) | - #### [政策法规](https://www.chinania.org.cn/html/zcfg/zhengcefagui/) +#### [政策法规](https://www.chinania.org.cn/html/zcfg/zhengcefagui/) - | [政策法规](https://www.chinania.org.cn/html/zcfg/zhengcefagui/) | - | ------------------------------------------------------------------ | - | [zcfg/zhengcefagui](https://rsshub.app/chinania/zcfg/zhengcefagui) | +| [政策法规](https://www.chinania.org.cn/html/zcfg/zhengcefagui/) | +| ------------------------------------------------------------------ | +| [zcfg/zhengcefagui](https://rsshub.app/chinania/zcfg/zhengcefagui) | - #### [会议展览](https://www.chinania.org.cn/html/hyzl/huiyizhanlan/) +#### [会议展览](https://www.chinania.org.cn/html/hyzl/huiyizhanlan/) - | [会展通知](https://www.chinania.org.cn/html/hyzl/huiyizhanlan/) | [会展报道](https://www.chinania.org.cn/html/hyzl/huizhanbaodao/) | - | ------------------------------------------------------------------ | -------------------------------------------------------------------- | - | [hyzl/huiyizhanlan](https://rsshub.app/chinania/hyzl/huiyizhanlan) | [hyzl/huizhanbaodao](https://rsshub.app/chinania/hyzl/huizhanbaodao) | +| [会展通知](https://www.chinania.org.cn/html/hyzl/huiyizhanlan/) | [会展报道](https://www.chinania.org.cn/html/hyzl/huizhanbaodao/) | +| ------------------------------------------------------------------ | -------------------------------------------------------------------- | +| [hyzl/huiyizhanlan](https://rsshub.app/chinania/hyzl/huiyizhanlan) | [hyzl/huizhanbaodao](https://rsshub.app/chinania/hyzl/huizhanbaodao) | -
+
`, categories: ['new-media'], diff --git a/lib/routes/chinathinktanks/viewpoint.ts b/lib/routes/chinathinktanks/viewpoint.ts index d539702a0496..9cdd0e718ed2 100644 --- a/lib/routes/chinathinktanks/viewpoint.ts +++ b/lib/routes/chinathinktanks/viewpoint.ts @@ -26,52 +26,52 @@ export const route: Route = { maintainers: ['Aeliu'], handler, description: `| \`:id\` | 专题名称 | - | ----- | -------- | - | 2 | 党的建设 | - | 3 | 社会 | - | 4 | 生态 | - | 5 | 政治 | - | 6 | 经济 | - | 7 | 文化 | - | 9 | 热点专题 | - | 10 | 国际关系 | - | 13 | 国外智库 | - | 46 | 智库报告 | - | 57 | 智库要闻 | - | 126 | 世界经济 | - | 127 | 宏观经济 | - | 128 | 区域经济 | - | 129 | 产业企业 | - | 130 | 三农问题 | - | 131 | 财政金融 | - | 132 | 科技创新 | - | 133 | 民主 | - | 134 | 法治 | - | 135 | 行政 | - | 136 | 国家治理 | - | 137 | 社会事业 | - | 138 | 社会保障 | - | 139 | 民族宗教 | - | 140 | 人口就业 | - | 141 | 社会治理 | - | 142 | 文化产业 | - | 143 | 公共文化 | - | 144 | 文化体制 | - | 145 | 文化思想 | - | 146 | 资源 | - | 147 | 能源 | - | 148 | 环境 | - | 149 | 生态文明 | - | 150 | 思想建设 | - | 151 | 作风建设 | - | 152 | 组织建设 | - | 153 | 制度建设 | - | 154 | 反腐倡廉 | - | 155 | 中国外交 | - | 156 | 全球治理 | - | 157 | 大国关系 | - | 158 | 地区政治 | - | 181 | 执政能力 |`, +| ----- | -------- | +| 2 | 党的建设 | +| 3 | 社会 | +| 4 | 生态 | +| 5 | 政治 | +| 6 | 经济 | +| 7 | 文化 | +| 9 | 热点专题 | +| 10 | 国际关系 | +| 13 | 国外智库 | +| 46 | 智库报告 | +| 57 | 智库要闻 | +| 126 | 世界经济 | +| 127 | 宏观经济 | +| 128 | 区域经济 | +| 129 | 产业企业 | +| 130 | 三农问题 | +| 131 | 财政金融 | +| 132 | 科技创新 | +| 133 | 民主 | +| 134 | 法治 | +| 135 | 行政 | +| 136 | 国家治理 | +| 137 | 社会事业 | +| 138 | 社会保障 | +| 139 | 民族宗教 | +| 140 | 人口就业 | +| 141 | 社会治理 | +| 142 | 文化产业 | +| 143 | 公共文化 | +| 144 | 文化体制 | +| 145 | 文化思想 | +| 146 | 资源 | +| 147 | 能源 | +| 148 | 环境 | +| 149 | 生态文明 | +| 150 | 思想建设 | +| 151 | 作风建设 | +| 152 | 组织建设 | +| 153 | 制度建设 | +| 154 | 反腐倡廉 | +| 155 | 中国外交 | +| 156 | 全球治理 | +| 157 | 大国关系 | +| 158 | 地区政治 | +| 181 | 执政能力 |`, }; async function handler(ctx) { diff --git a/lib/routes/chinaventure/index.ts b/lib/routes/chinaventure/index.ts index ce56b893487b..5503dd54aeca 100644 --- a/lib/routes/chinaventure/index.ts +++ b/lib/routes/chinaventure/index.ts @@ -43,8 +43,8 @@ export const route: Route = { handler, url: 'chinaventure.com.cn/', description: `| 推荐 | 商业深度 | 资本市场 | 5G | 健康 | 教育 | 地产 | 金融 | 硬科技 | 新消费 | - | ---- | -------- | -------- | -- | ---- | ---- | ---- | ---- | ------ | ------ | - | | 78 | 80 | 83 | 111 | 110 | 112 | 113 | 114 | 116 |`, +| ---- | -------- | -------- | -- | ---- | ---- | ---- | ---- | ------ | ------ | +| | 78 | 80 | 83 | 111 | 110 | 112 | 113 | 114 | 116 |`, }; async function handler(ctx) { diff --git a/lib/routes/chsi/kyzx.ts b/lib/routes/chsi/kyzx.ts index 393a61f154c3..3955db9766ce 100644 --- a/lib/routes/chsi/kyzx.ts +++ b/lib/routes/chsi/kyzx.ts @@ -29,12 +29,12 @@ export const route: Route = { maintainers: ['yanbot-team'], handler, description: `| \`:type\` | 专题名称 | - | ------- | -------- | - | fstj | 复试调剂 | - | kydt | 考研动态 | - | zcdh | 政策导航 | - | kyrw | 考研人物 | - | jyxd | 经验心得 |`, +| ------- | -------- | +| fstj | 复试调剂 | +| kydt | 考研动态 | +| zcdh | 政策导航 | +| kyrw | 考研人物 | +| jyxd | 经验心得 |`, }; async function handler(ctx) { diff --git a/lib/routes/cib/whpj.ts b/lib/routes/cib/whpj.ts index b8dbca0b6ff5..240e462a707c 100644 --- a/lib/routes/cib/whpj.ts +++ b/lib/routes/cib/whpj.ts @@ -31,8 +31,8 @@ export const route: Route = { handler, url: 'cib.com.cn/', description: `| 短格式 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | - | ------ | -------- | -------- | -------- | -------- | -------- | -------- | - | short | xh | xc | xhmr | xhmc | xcmr | xcmc |`, +| ------ | -------- | -------- | -------- | -------- | -------- | -------- | +| short | xh | xc | xhmr | xhmc | xcmr | xcmc |`, }; async function handler(ctx) { diff --git a/lib/routes/ciidbnu/index.ts b/lib/routes/ciidbnu/index.ts index c669c9eead60..9093f42fb1bd 100644 --- a/lib/routes/ciidbnu/index.ts +++ b/lib/routes/ciidbnu/index.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 社会动态 | 院内新闻 | 学术观点 | 文献书籍 | 工作论文 | 专题讨论 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 1 | 5 | 3 | 4 | 6 | 8 |`, +| -------- | -------- | -------- | -------- | -------- | -------- | +| 1 | 5 | 3 | 4 | 6 | 8 |`, }; async function handler(ctx) { diff --git a/lib/routes/cisia/index.ts b/lib/routes/cisia/index.ts index 8c8f0db59760..49d31e88cb69 100644 --- a/lib/routes/cisia/index.ts +++ b/lib/routes/cisia/index.ts @@ -88,52 +88,52 @@ export const route: Route = { 若订阅 [市场信息](http://www.cisia.org/site/term/12.html),网址为 \`http://www.cisia.org/site/term/12.html\`。截取 \`https://www.cisia.org/site/term/\` 到末尾 \`.html\` 的部分 \`12\` 作为参数填入,此时路由为 [\`/cisia/12\`](https://rsshub.app/cisia/12)。 ::: -
- 更多分类 +
+更多分类 - #### [分支机构信息](http://www.cisia.org/site/term/14.html) +#### [分支机构信息](http://www.cisia.org/site/term/14.html) - | [企业动态](http://www.cisia.org/site/term/17.html) | [产品展示](http://www.cisia.org/site/term/18.html) | - | -------------------------------------------------- | -------------------------------------------------- | - | [17](https://rsshub.app/cisia/17) | [18](https://rsshub.app/cisia/18) | +| [企业动态](http://www.cisia.org/site/term/17.html) | [产品展示](http://www.cisia.org/site/term/18.html) | +| -------------------------------------------------- | -------------------------------------------------- | +| [17](https://rsshub.app/cisia/17) | [18](https://rsshub.app/cisia/18) | - #### [新闻中心](http://www.cisia.org/site/term/8.html) +#### [新闻中心](http://www.cisia.org/site/term/8.html) - | [协会动态](http://www.cisia.org/site/term/9.html) | [行业新闻](http://www.cisia.org/site/term/10.html) | [通知公告](http://www.cisia.org/site/term/11.html) | [市场信息](http://www.cisia.org/site/term/12.html) | - | ------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | - | [9](https://rsshub.app/cisia/9) | [10](https://rsshub.app/cisia/10) | [11](https://rsshub.app/cisia/11) | [12](https://rsshub.app/cisia/12) | +| [协会动态](http://www.cisia.org/site/term/9.html) | [行业新闻](http://www.cisia.org/site/term/10.html) | [通知公告](http://www.cisia.org/site/term/11.html) | [市场信息](http://www.cisia.org/site/term/12.html) | +| ------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| [9](https://rsshub.app/cisia/9) | [10](https://rsshub.app/cisia/10) | [11](https://rsshub.app/cisia/11) | [12](https://rsshub.app/cisia/12) | - #### [政策法规](http://www.cisia.org/site/term/19.html) +#### [政策法规](http://www.cisia.org/site/term/19.html) - | [宏观聚焦](http://www.cisia.org/site/term/20.html) | [技术园区](http://www.cisia.org/site/term/396.html) | - | -------------------------------------------------- | --------------------------------------------------- | - | [20](https://rsshub.app/cisia/20) | [396](https://rsshub.app/cisia/396) | +| [宏观聚焦](http://www.cisia.org/site/term/20.html) | [技术园区](http://www.cisia.org/site/term/396.html) | +| -------------------------------------------------- | --------------------------------------------------- | +| [20](https://rsshub.app/cisia/20) | [396](https://rsshub.app/cisia/396) | - #### [合作交流](http://www.cisia.org/site/term/22.html) +#### [合作交流](http://www.cisia.org/site/term/22.html) - | [国际交流](http://www.cisia.org/site/term/23.html) | [行业交流](http://www.cisia.org/site/term/24.html) | [企业调研](http://www.cisia.org/site/term/25.html) | [会展信息](http://www.cisia.org/site/term/84.html) | [宣传专题](http://www.cisia.org/site/term/430.html) | - | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------- | - | [23](https://rsshub.app/cisia/23) | [24](https://rsshub.app/cisia/24) | [25](https://rsshub.app/cisia/25) | [84](https://rsshub.app/cisia/84) | [430](https://rsshub.app/cisia/430) | +| [国际交流](http://www.cisia.org/site/term/23.html) | [行业交流](http://www.cisia.org/site/term/24.html) | [企业调研](http://www.cisia.org/site/term/25.html) | [会展信息](http://www.cisia.org/site/term/84.html) | [宣传专题](http://www.cisia.org/site/term/430.html) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------- | +| [23](https://rsshub.app/cisia/23) | [24](https://rsshub.app/cisia/24) | [25](https://rsshub.app/cisia/25) | [84](https://rsshub.app/cisia/84) | [430](https://rsshub.app/cisia/430) | - #### [党建工作](http://www.cisia.org/site/term/26.html) +#### [党建工作](http://www.cisia.org/site/term/26.html) - | [党委文件](http://www.cisia.org/site/term/27.html) | [学习园地](http://www.cisia.org/site/term/28.html) | [两会专题](http://www.cisia.org/site/term/443.html) | - | -------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------- | - | [27](https://rsshub.app/cisia/27) | [28](https://rsshub.app/cisia/28) | [443](https://rsshub.app/cisia/443) | +| [党委文件](http://www.cisia.org/site/term/27.html) | [学习园地](http://www.cisia.org/site/term/28.html) | [两会专题](http://www.cisia.org/site/term/443.html) | +| -------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------- | +| [27](https://rsshub.app/cisia/27) | [28](https://rsshub.app/cisia/28) | [443](https://rsshub.app/cisia/443) | - #### [网上服务平台](http://www.cisia.org/site/term/29.html) +#### [网上服务平台](http://www.cisia.org/site/term/29.html) - | [前沿科技](http://www.cisia.org/site/term/31.html) | [新材料新技术](http://www.cisia.org/site/term/133.html) | [文件共享](http://www.cisia.org/site/term/30.html) | - | -------------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------- | - | [31](https://rsshub.app/cisia/31) | [133](https://rsshub.app/cisia/133) | [30](https://rsshub.app/cisia/30) | +| [前沿科技](http://www.cisia.org/site/term/31.html) | [新材料新技术](http://www.cisia.org/site/term/133.html) | [文件共享](http://www.cisia.org/site/term/30.html) | +| -------------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------- | +| [31](https://rsshub.app/cisia/31) | [133](https://rsshub.app/cisia/133) | [30](https://rsshub.app/cisia/30) | - #### [会员社区](http://www.cisia.org/site/term/34.html) +#### [会员社区](http://www.cisia.org/site/term/34.html) - | [会员分布](http://www.cisia.org/site/term/35.html) | [会员风采](http://www.cisia.org/site/term/68.html) | - | -------------------------------------------------- | -------------------------------------------------- | - | [35](https://rsshub.app/cisia/35) | [68](https://rsshub.app/cisia/68) | +| [会员分布](http://www.cisia.org/site/term/35.html) | [会员风采](http://www.cisia.org/site/term/68.html) | +| -------------------------------------------------- | -------------------------------------------------- | +| [35](https://rsshub.app/cisia/35) | [68](https://rsshub.app/cisia/68) | -
+
`, categories: ['government'], diff --git a/lib/routes/cjlu/yjsy/index.ts b/lib/routes/cjlu/yjsy/index.ts index 1785e2dc3d6a..300e2cd5641f 100644 --- a/lib/routes/cjlu/yjsy/index.ts +++ b/lib/routes/cjlu/yjsy/index.ts @@ -44,8 +44,8 @@ export const route: Route = { maintainers: ['chrisis58'], handler, description: `| 研究生通知 | 教师通知 | - | -------- | -------- | - | yjstz | jstz |`, +| -------- | -------- | +| yjstz | jstz |`, }; async function handler(ctx) { diff --git a/lib/routes/cls/depth.ts b/lib/routes/cls/depth.ts index 3d81bb1dd2f1..9354905de80c 100644 --- a/lib/routes/cls/depth.ts +++ b/lib/routes/cls/depth.ts @@ -47,8 +47,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 头条 | 股市 | 港股 | 环球 | 公司 | 券商 | 基金 | 地产 | 金融 | 汽车 | 科创 | 创业版 | 品见 | 期货 | 投教 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | - | 1000 | 1003 | 1135 | 1007 | 1005 | 1118 | 1110 | 1006 | 1032 | 1119 | 1111 | 1127 | 1160 | 1124 | 1176 |`, +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | +| 1000 | 1003 | 1135 | 1007 | 1005 | 1118 | 1110 | 1006 | 1032 | 1119 | 1111 | 1127 | 1160 | 1124 | 1176 |`, }; async function handler(ctx) { diff --git a/lib/routes/cls/telegraph.ts b/lib/routes/cls/telegraph.ts index c5f1b2965e4c..d831d75ba5dc 100644 --- a/lib/routes/cls/telegraph.ts +++ b/lib/routes/cls/telegraph.ts @@ -44,8 +44,8 @@ export const route: Route = { handler, url: 'cls.cn/telegraph', description: `| 看盘 | 公司 | 解读 | 加红 | 推送 | 提醒 | 基金 | 港股 | - | ----- | ------------ | ------- | ---- | ----- | ------ | ---- | ---- | - | watch | announcement | explain | red | jpush | remind | fund | hk |`, +| ----- | ------------ | ------- | ---- | ----- | ------ | ---- | ---- | +| watch | announcement | explain | red | jpush | remind | fund | hk |`, }; async function handler(ctx) { diff --git a/lib/routes/cma/channel.ts b/lib/routes/cma/channel.ts index a0c5cc42d7a5..5b6aec7f372a 100644 --- a/lib/routes/cma/channel.ts +++ b/lib/routes/cma/channel.ts @@ -27,26 +27,26 @@ export const route: Route = { handler, description: `#### 天气实况 - | 频道名称 | 频道 id | - | -------- | -------------------------------- | - | 卫星云图 | d3236549863e453aab0ccc4027105bad | - | 单站雷达 | 103 | - | 降水量 | 18 | - | 气温 | 32 | - | 土壤水分 | 45 | - - #### 气象公报 - - | 频道名称 | 频道 id | - | -------------- | -------------------------------- | - | 每日天气提示 | 380 | - | 重要天气提示 | da5d55817ad5430fb9796a0780178533 | - | 天气公报 | 3780 | - | 强对流天气预报 | 383 | - | 交通气象预报 | 423 | - | 森林火险预报 | 424 | - | 海洋天气公报 | 452 | - | 环境气象公报 | 467 | +| 频道名称 | 频道 id | +| -------- | -------------------------------- | +| 卫星云图 | d3236549863e453aab0ccc4027105bad | +| 单站雷达 | 103 | +| 降水量 | 18 | +| 气温 | 32 | +| 土壤水分 | 45 | + +#### 气象公报 + +| 频道名称 | 频道 id | +| -------------- | -------------------------------- | +| 每日天气提示 | 380 | +| 重要天气提示 | da5d55817ad5430fb9796a0780178533 | +| 天气公报 | 3780 | +| 强对流天气预报 | 383 | +| 交通气象预报 | 423 | +| 森林火险预报 | 424 | +| 海洋天气公报 | 452 | +| 环境气象公报 | 467 | ::: tip 订阅更多细分频道,请前往对应上级频道页,使用下拉菜单选择项目后跳转到目标频道页,查看其 URL 找到对应频道 id diff --git a/lib/routes/cna/index.ts b/lib/routes/cna/index.ts index aa52841a9258..d5e219a9eca8 100644 --- a/lib/routes/cna/index.ts +++ b/lib/routes/cna/index.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 即時 | 政治 | 國際 | 兩岸 | 產經 | 證券 | 科技 | 生活 | 社會 | 地方 | 文化 | 運動 | 娛樂 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | aall | aipl | aopl | acn | aie | asc | ait | ahel | asoc | aloc | acul | aspt | amov |`, +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| aall | aipl | aopl | acn | aie | asc | ait | ahel | asoc | aloc | acul | aspt | amov |`, }; async function handler(ctx) { diff --git a/lib/routes/cnbeta/category.ts b/lib/routes/cnbeta/category.ts index 076f15064244..a873cb078375 100644 --- a/lib/routes/cnbeta/category.ts +++ b/lib/routes/cnbeta/category.ts @@ -18,6 +18,6 @@ export const route: Route = { handler, url: 'cnbeta.com.tw', description: `| 影视 | 音乐 | 游戏 | 动漫 | 趣闻 | 科学 | 软件 | - | ----- | ----- | ---- | ----- | ----- | ------- | ---- | - | movie | music | game | comic | funny | science | soft |`, +| ----- | ----- | ---- | ----- | ----- | ------- | ---- | +| movie | music | game | comic | funny | science | soft |`, }; diff --git a/lib/routes/cncf/index.ts b/lib/routes/cncf/index.ts index 409bfcc82061..acffbbf6cf05 100644 --- a/lib/routes/cncf/index.ts +++ b/lib/routes/cncf/index.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| Blog | News | Announcements | Reports | - | ---- | ---- | ------------- | ------- | - | blog | news | announcements | reports |`, +| ---- | ---- | ------------- | ------- | +| blog | news | announcements | reports |`, }; async function handler(ctx) { diff --git a/lib/routes/cneb/yjxw.ts b/lib/routes/cneb/yjxw.ts index d490824277af..650ad57b4dad 100644 --- a/lib/routes/cneb/yjxw.ts +++ b/lib/routes/cneb/yjxw.ts @@ -32,8 +32,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 全部 | 国内新闻 | 国际新闻 | - | ---- | -------- | -------- | - | | gnxw | gjxw |`, +| ---- | -------- | -------- | +| | gnxw | gjxw |`, }; async function handler(ctx) { diff --git a/lib/routes/cngold/index.ts b/lib/routes/cngold/index.ts index 2b1d805ca066..955fa46e0a49 100644 --- a/lib/routes/cngold/index.ts +++ b/lib/routes/cngold/index.ts @@ -83,38 +83,38 @@ export const route: Route = { 若订阅 [行业资讯](https://www.cngold.org.cn/news-325.html),网址为 \`https://www.cngold.org.cn/news-325.html\`。截取 \`https://www.cngold.org.cn/\` 到末尾 \`.html\` 的部分 \`news-325\` 作为参数填入,此时路由为 [\`/cngold/news-325\`](https://rsshub.app/cngold/news-325)。 ::: - #### 资讯中心 +#### 资讯中心 - | [图片新闻](https://www.cngold.org.cn/news-323.html) | [通知公告](https://www.cngold.org.cn/news-324.html) | [党建工作](https://www.cngold.org.cn/news-326.html) | [行业资讯](https://www.cngold.org.cn/news-325.html) | [黄金矿业](https://www.cngold.org.cn/news-327.html) | [黄金消费](https://www.cngold.org.cn/news-328.html) | - | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | - | [news-323](https://rsshub.app/cngold/news-323) | [news-324](https://rsshub.app/cngold/news-324) | [news-326](https://rsshub.app/cngold/news-326) | [news-325](https://rsshub.app/cngold/news-325) | [news-327](https://rsshub.app/cngold/news-327) | [news-328](https://rsshub.app/cngold/news-328) | +| [图片新闻](https://www.cngold.org.cn/news-323.html) | [通知公告](https://www.cngold.org.cn/news-324.html) | [党建工作](https://www.cngold.org.cn/news-326.html) | [行业资讯](https://www.cngold.org.cn/news-325.html) | [黄金矿业](https://www.cngold.org.cn/news-327.html) | [黄金消费](https://www.cngold.org.cn/news-328.html) | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| [news-323](https://rsshub.app/cngold/news-323) | [news-324](https://rsshub.app/cngold/news-324) | [news-326](https://rsshub.app/cngold/news-326) | [news-325](https://rsshub.app/cngold/news-325) | [news-327](https://rsshub.app/cngold/news-327) | [news-328](https://rsshub.app/cngold/news-328) | - | [黄金市场](https://www.cngold.org.cn/news-329.html) | [社会责任](https://www.cngold.org.cn/news-330.html) | [黄金书屋](https://www.cngold.org.cn/news-331.html) | [工作交流](https://www.cngold.org.cn/news-332.html) | [黄金统计](https://www.cngold.org.cn/news-333.html) | [协会动态](https://www.cngold.org.cn/news-334.html) | - | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | - | [news-329](https://rsshub.app/cngold/news-329) | [news-330](https://rsshub.app/cngold/news-330) | [news-331](https://rsshub.app/cngold/news-331) | [news-332](https://rsshub.app/cngold/news-332) | [news-333](https://rsshub.app/cngold/news-333) | [news-334](https://rsshub.app/cngold/news-334) | +| [黄金市场](https://www.cngold.org.cn/news-329.html) | [社会责任](https://www.cngold.org.cn/news-330.html) | [黄金书屋](https://www.cngold.org.cn/news-331.html) | [工作交流](https://www.cngold.org.cn/news-332.html) | [黄金统计](https://www.cngold.org.cn/news-333.html) | [协会动态](https://www.cngold.org.cn/news-334.html) | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| [news-329](https://rsshub.app/cngold/news-329) | [news-330](https://rsshub.app/cngold/news-330) | [news-331](https://rsshub.app/cngold/news-331) | [news-332](https://rsshub.app/cngold/news-332) | [news-333](https://rsshub.app/cngold/news-333) | [news-334](https://rsshub.app/cngold/news-334) | -
- 更多分类 +
+更多分类 - #### [政策法规](https://www.cngold.org.cn/policies.html) +#### [政策法规](https://www.cngold.org.cn/policies.html) - | [法律法规](https://www.cngold.org.cn/policies-245.html) | [产业政策](https://www.cngold.org.cn/policies-262.html) | [黄金标准](https://www.cngold.org.cn/policies-281.html) | - | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | - | [policies-245](https://rsshub.app/cngold/policies-245) | [policies-262](https://rsshub.app/cngold/policies-262) | [policies-281](https://rsshub.app/cngold/policies-281) | +| [法律法规](https://www.cngold.org.cn/policies-245.html) | [产业政策](https://www.cngold.org.cn/policies-262.html) | [黄金标准](https://www.cngold.org.cn/policies-281.html) | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| [policies-245](https://rsshub.app/cngold/policies-245) | [policies-262](https://rsshub.app/cngold/policies-262) | [policies-281](https://rsshub.app/cngold/policies-281) | - #### [行业培训](https://www.cngold.org.cn/training.html) +#### [行业培训](https://www.cngold.org.cn/training.html) - | [黄金投资分析师](https://www.cngold.org.cn/training-242.html) | [教育部1+X](https://www.cngold.org.cn/training-246.html) | [矿业权评估师](https://www.cngold.org.cn/training-338.html) | [其他培训](https://www.cngold.org.cn/training-247.html) | - | ------------------------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------- | - | [training-242](https://rsshub.app/cngold/training-242) | [training-246](https://rsshub.app/cngold/training-246) | [training-338](https://rsshub.app/cngold/training-338) | [training-247](https://rsshub.app/cngold/training-247) | +| [黄金投资分析师](https://www.cngold.org.cn/training-242.html) | [教育部1+X](https://www.cngold.org.cn/training-246.html) | [矿业权评估师](https://www.cngold.org.cn/training-338.html) | [其他培训](https://www.cngold.org.cn/training-247.html) | +| ------------------------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------- | +| [training-242](https://rsshub.app/cngold/training-242) | [training-246](https://rsshub.app/cngold/training-246) | [training-338](https://rsshub.app/cngold/training-338) | [training-247](https://rsshub.app/cngold/training-247) | - #### [黄金科技](https://www.cngold.org.cn/technology.html) +#### [黄金科技](https://www.cngold.org.cn/technology.html) - | [黄金协会科学技术奖](https://www.cngold.org.cn/technology-318.html) | [科学成果评价](https://www.cngold.org.cn/technology-319.html) | [新技术推广](https://www.cngold.org.cn/technology-320.html) | [黄金技术大会](https://www.cngold.org.cn/technology-350.html) | - | ------------------------------------------------------------------- | ------------------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------- | - | [technology-318](https://rsshub.app/cngold/technology-318) | [technology-319](https://rsshub.app/cngold/technology-319) | [technology-320](https://rsshub.app/cngold/technology-320) | [technology-350](https://rsshub.app/cngold/technology-350) | +| [黄金协会科学技术奖](https://www.cngold.org.cn/technology-318.html) | [科学成果评价](https://www.cngold.org.cn/technology-319.html) | [新技术推广](https://www.cngold.org.cn/technology-320.html) | [黄金技术大会](https://www.cngold.org.cn/technology-350.html) | +| ------------------------------------------------------------------- | ------------------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------- | +| [technology-318](https://rsshub.app/cngold/technology-318) | [technology-319](https://rsshub.app/cngold/technology-319) | [technology-320](https://rsshub.app/cngold/technology-320) | [technology-350](https://rsshub.app/cngold/technology-350) | -
+
`, categories: ['new-media'], diff --git a/lib/routes/cntv/column.ts b/lib/routes/cntv/column.ts index 40f5c2d3d39d..dcc4002b16cf 100644 --- a/lib/routes/cntv/column.ts +++ b/lib/routes/cntv/column.ts @@ -36,9 +36,9 @@ export const route: Route = { 栏目 - | 新闻联播 | 新闻周刊 | 天下足球 | - | -------------------- | -------------------- | -------------------- | - | TOPC1451528971114112 | TOPC1451559180488841 | TOPC1451551777876756 |`, +| 新闻联播 | 新闻周刊 | 天下足球 | +| -------------------- | -------------------- | -------------------- | +| TOPC1451528971114112 | TOPC1451559180488841 | TOPC1451551777876756 |`, }; async function handler(ctx) { diff --git a/lib/routes/consumer/index.ts b/lib/routes/consumer/index.ts index edc7e1be19c4..83b0e249e5ba 100644 --- a/lib/routes/consumer/index.ts +++ b/lib/routes/consumer/index.ts @@ -28,15 +28,15 @@ export const route: Route = { url: 'consumer.org.hk/', description: `分类 - | 测试及调查 | 生活资讯 | 投诉实录 | 议题评论 | - | ---------- | -------- | --------- | -------- | - | test | life | complaint | topic | +| 测试及调查 | 生活资讯 | 投诉实录 | 议题评论 | +| ---------- | -------- | --------- | -------- | +| test | life | complaint | topic | 语言 - | 简体中文 | 繁体中文 | - | -------- | -------- | - | sc | tc |`, +| 简体中文 | 繁体中文 | +| -------- | -------- | +| sc | tc |`, }; async function handler(ctx) { diff --git a/lib/routes/consumer/shopping-guide.ts b/lib/routes/consumer/shopping-guide.ts index c9352d9d696b..f0fc9b221f53 100644 --- a/lib/routes/consumer/shopping-guide.ts +++ b/lib/routes/consumer/shopping-guide.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 冷知識 | 懶人包 | 特集 | 銀髮一族 | 飲食煮意 | 科技達人 | 健康美容 | 規劃人生 | 消閒娛樂 | 家品家電 | 親子時光 | 綠色生活 | - | ------ | ------ | -------- | ------------------ | ---------------- | ---------- | ----------------- | --------------------------- | ------------------------- | --------------- | --------------- | ------------ | - | trivia | tips | features | silver-hair-market | food-and-cooking | tech-savvy | health-and-beauty | life-and-financial-planning | leisure-and-entertainment | home-appliances | family-and-kids | green-living |`, +| ------ | ------ | -------- | ------------------ | ---------------- | ---------- | ----------------- | --------------------------- | ------------------------- | --------------- | --------------- | ------------ | +| trivia | tips | features | silver-hair-market | food-and-cooking | tech-savvy | health-and-beauty | life-and-financial-planning | leisure-and-entertainment | home-appliances | family-and-kids | green-living |`, }; async function handler(ctx) { diff --git a/lib/routes/coolapk/hot.ts b/lib/routes/coolapk/hot.ts index 7b294bcbb99b..2bfeec1e3598 100644 --- a/lib/routes/coolapk/hot.ts +++ b/lib/routes/coolapk/hot.ts @@ -89,12 +89,12 @@ export const route: Route = { maintainers: ['xizeyoupan'], handler, description: `| 参数名称 | 今日热门 | 点赞榜 | 评论榜 | 收藏榜 | 酷图榜 | - | -------- | -------- | ------ | ------ | ------ | ------ | - | type | jrrm | dzb | plb | scb | ktb | +| -------- | -------- | ------ | ------ | ------ | ------ | +| type | jrrm | dzb | plb | scb | ktb | - | 参数名称 | 日榜 | 周榜 | - | -------- | ----- | ------ | - | period | daily | weekly | +| 参数名称 | 日榜 | 周榜 | +| -------- | ----- | ------ | +| period | daily | weekly | ::: tip 今日热门没有周榜,酷图榜日榜的参数会变成周榜,周榜的参数会变成月榜。 diff --git a/lib/routes/coolapk/toutiao.ts b/lib/routes/coolapk/toutiao.ts index 74da783ff1d5..bd163a88087b 100644 --- a/lib/routes/coolapk/toutiao.ts +++ b/lib/routes/coolapk/toutiao.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['xizeyoupan'], handler, description: `| 参数名称 | 历史头条 | 最新 | - | -------- | -------- | ------ | - | type | history | latest |`, +| -------- | -------- | ------ | +| type | history | latest |`, }; async function handler(ctx) { diff --git a/lib/routes/coolapk/tuwen.ts b/lib/routes/coolapk/tuwen.ts index 65a87d081caf..9c9d699cf7a0 100644 --- a/lib/routes/coolapk/tuwen.ts +++ b/lib/routes/coolapk/tuwen.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['xizeyoupan'], handler, description: `| 参数名称 | 编辑精选 | 最新 | - | -------- | -------- | ------ | - | type | hot | latest |`, +| -------- | -------- | ------ | +| type | hot | latest |`, }; async function handler(ctx) { diff --git a/lib/routes/counter-strike/news.ts b/lib/routes/counter-strike/news.ts index 5d43c16a6801..688ef3303455 100644 --- a/lib/routes/counter-strike/news.ts +++ b/lib/routes/counter-strike/news.ts @@ -126,8 +126,8 @@ export const route: Route = { If you subscribe to [Updates in English](https://www.counter-strike.net/news/updates?l=english),where the URL is \`https://www.counter-strike.net/news/updates?l=english\`, extract the \`l\`, which is \`english\`, and use it as the parameter to fill in. Therefore, the route will be [\`/counter-strike/news/updates/english\`](https://rsshub.app/counter-strike/news/updates/english). ::: -
- More languages +
+More languages | 语言代码 | 语言名称 | | ------------------------------------------------- | ---------- | @@ -160,7 +160,7 @@ export const route: Route = { | Tiếng Việt (Vietnamese) | vietnamese | | Español - Latinoamérica (Spanish - Latin America) | latam | -
+
`, categories: ['game'], diff --git a/lib/routes/cpcaauto/index.ts b/lib/routes/cpcaauto/index.ts index 9095427ab90b..c55f5e7328bc 100644 --- a/lib/routes/cpcaauto/index.ts +++ b/lib/routes/cpcaauto/index.ts @@ -85,39 +85,39 @@ export const route: Route = { 若订阅 [行业新闻 > 国内乘用车](http://cpcaauto.com/news.php?types=news&anid=10),网址为 \`http://cpcaauto.com/news.php?types=news&anid=10\`。截取 \`types\` 和 \`anid\` 的部分 \`\` 作为参数填入,此时路由为 [\`/cpcaauto/news/news/10\`](https://rsshub.app/cpcaauto/news/news/10)。 ::: - #### [行业新闻](http://cpcaauto.com/news.php?types=news) +#### [行业新闻](http://cpcaauto.com/news.php?types=news) - | [国内乘用车](http://cpcaauto.com/news.php?types=news&anid=10) | [进口及国外乘用车](http://cpcaauto.com/news.php?types=news&anid=64) | [后市场](http://cpcaauto.com/news.php?types=news&anid=44) | [商用车](http://cpcaauto.com/news.php?types=news&anid=62) | - | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | - | [news/10](https://rsshub.app/cpcaauto/news/news/10) | [news/64](https://rsshub.app/cpcaauto/news/news/64) | [news/44](https://rsshub.app/cpcaauto/news/news/44) | [news/62](https://rsshub.app/cpcaauto/news/news/62) | +| [国内乘用车](http://cpcaauto.com/news.php?types=news&anid=10) | [进口及国外乘用车](http://cpcaauto.com/news.php?types=news&anid=64) | [后市场](http://cpcaauto.com/news.php?types=news&anid=44) | [商用车](http://cpcaauto.com/news.php?types=news&anid=62) | +| ----------------------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| [news/10](https://rsshub.app/cpcaauto/news/news/10) | [news/64](https://rsshub.app/cpcaauto/news/news/64) | [news/44](https://rsshub.app/cpcaauto/news/news/44) | [news/62](https://rsshub.app/cpcaauto/news/news/62) | - #### [车市解读](http://cpcaauto.com/news.php?types=csjd) +#### [车市解读](http://cpcaauto.com/news.php?types=csjd) - | [周度](http://cpcaauto.com/news.php?types=csjd&anid=128) | [月度](http://cpcaauto.com/news.php?types=csjd&anid=129) | [指数](http://cpcaauto.com/news.php?types=csjd&anid=130) | [预测](http://cpcaauto.com/news.php?types=csjd&anid=131) | - | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | - | [csjd/128](https://rsshub.app/cpcaauto/news/csjd/128) | [csjd/129](https://rsshub.app/cpcaauto/news/csjd/129) | [csjd/130](https://rsshub.app/cpcaauto/news/csjd/130) | [csjd/131](https://rsshub.app/cpcaauto/news/csjd/131) | +| [周度](http://cpcaauto.com/news.php?types=csjd&anid=128) | [月度](http://cpcaauto.com/news.php?types=csjd&anid=129) | [指数](http://cpcaauto.com/news.php?types=csjd&anid=130) | [预测](http://cpcaauto.com/news.php?types=csjd&anid=131) | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| [csjd/128](https://rsshub.app/cpcaauto/news/csjd/128) | [csjd/129](https://rsshub.app/cpcaauto/news/csjd/129) | [csjd/130](https://rsshub.app/cpcaauto/news/csjd/130) | [csjd/131](https://rsshub.app/cpcaauto/news/csjd/131) | - #### [发布会报告](http://cpcaauto.com/news.php?types=bgzl) +#### [发布会报告](http://cpcaauto.com/news.php?types=bgzl) - | [上海市场上牌数](http://cpcaauto.com/news.php?types=bgzl&anid=119) | [京城车市](http://cpcaauto.com/news.php?types=bgzl&anid=122) | [进口车市场分析](http://cpcaauto.com/news.php?types=bgzl&anid=120) | [二手车市场分析](http://cpcaauto.com/news.php?types=bgzl&anid=121) | [价格指数](http://cpcaauto.com/news.php?types=bgzl&anid=124) | - | ---------------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------- | - | [bgzl/119](https://rsshub.app/cpcaauto/news/bgzl/119) | [bgzl/122](https://rsshub.app/cpcaauto/news/bgzl/122) | [bgzl/120](https://rsshub.app/cpcaauto/news/bgzl/120) | [bgzl/121](https://rsshub.app/cpcaauto/news/bgzl/121) | [bgzl/124](https://rsshub.app/cpcaauto/news/bgzl/124) | +| [上海市场上牌数](http://cpcaauto.com/news.php?types=bgzl&anid=119) | [京城车市](http://cpcaauto.com/news.php?types=bgzl&anid=122) | [进口车市场分析](http://cpcaauto.com/news.php?types=bgzl&anid=120) | [二手车市场分析](http://cpcaauto.com/news.php?types=bgzl&anid=121) | [价格指数](http://cpcaauto.com/news.php?types=bgzl&anid=124) | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------- | +| [bgzl/119](https://rsshub.app/cpcaauto/news/bgzl/119) | [bgzl/122](https://rsshub.app/cpcaauto/news/bgzl/122) | [bgzl/120](https://rsshub.app/cpcaauto/news/bgzl/120) | [bgzl/121](https://rsshub.app/cpcaauto/news/bgzl/121) | [bgzl/124](https://rsshub.app/cpcaauto/news/bgzl/124) | - | [热点评述](http://cpcaauto.com/news.php?types=bgzl&anid=125) | [新能源月报](http://cpcaauto.com/news.php?types=bgzl&anid=126) | [商用车月报](http://cpcaauto.com/news.php?types=bgzl&anid=127) | [政策分析](http://cpcaauto.com/news.php?types=bgzl&anid=123) | - | ---------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ---------------------------------------------------------------- | - | [bgzl/125](https://rsshub.app/cpcaauto/news/bgzl/125) | [bgzl/126](https://rsshub.app/cpcaauto/news/bgzl/126) | [bgzl/127](https://rsshub.app/cpcaauto/news/bgzl/127) | [bgzl/123](https://rsshub.app/cpcaauto/news/bgzl/123) | +| [热点评述](http://cpcaauto.com/news.php?types=bgzl&anid=125) | [新能源月报](http://cpcaauto.com/news.php?types=bgzl&anid=126) | [商用车月报](http://cpcaauto.com/news.php?types=bgzl&anid=127) | [政策分析](http://cpcaauto.com/news.php?types=bgzl&anid=123) | +| ---------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ---------------------------------------------------------------- | +| [bgzl/125](https://rsshub.app/cpcaauto/news/bgzl/125) | [bgzl/126](https://rsshub.app/cpcaauto/news/bgzl/126) | [bgzl/127](https://rsshub.app/cpcaauto/news/bgzl/127) | [bgzl/123](https://rsshub.app/cpcaauto/news/bgzl/123) | - #### [经济与政策](http://cpcaauto.com/news.php?types=meeting) +#### [经济与政策](http://cpcaauto.com/news.php?types=meeting) - | [一周经济](http://cpcaauto.com/news.php?types=meeting&anid=46) | [一周政策](http://cpcaauto.com/news.php?types=meeting&anid=47) | - | ------------------------------------------------------------------ | ------------------------------------------------------------------ | - | [meeting/46](https://rsshub.app/cpcaauto/news/meeting/46) | [meeting/47](https://rsshub.app/cpcaauto/news/meeting/47) | +| [一周经济](http://cpcaauto.com/news.php?types=meeting&anid=46) | [一周政策](http://cpcaauto.com/news.php?types=meeting&anid=47) | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| [meeting/46](https://rsshub.app/cpcaauto/news/meeting/46) | [meeting/47](https://rsshub.app/cpcaauto/news/meeting/47) | - #### [乘联会论坛](http://cpcaauto.com/news.php?types=yjsy) +#### [乘联会论坛](http://cpcaauto.com/news.php?types=yjsy) - | [论坛文章](http://cpcaauto.com/news.php?types=yjsy&anid=49) | [两会](http://cpcaauto.com/news.php?types=yjsy&anid=111) | [车展看点](http://cpcaauto.com/news.php?types=yjsy&anid=113) | - | --------------------------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------- | - | [yjsy/49](https://rsshub.app/cpcaauto/news/yjsy/49) | [yjsy/111](https://rsshub.app/cpcaauto/news/yjsy/111) | [yjsy/113](https://rsshub.app/cpcaauto/news/yjsy/113) | +| [论坛文章](http://cpcaauto.com/news.php?types=yjsy&anid=49) | [两会](http://cpcaauto.com/news.php?types=yjsy&anid=111) | [车展看点](http://cpcaauto.com/news.php?types=yjsy&anid=113) | +| --------------------------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------- | +| [yjsy/49](https://rsshub.app/cpcaauto/news/yjsy/49) | [yjsy/111](https://rsshub.app/cpcaauto/news/yjsy/111) | [yjsy/113](https://rsshub.app/cpcaauto/news/yjsy/113) | `, categories: ['new-media'], diff --git a/lib/routes/cpcey/index.ts b/lib/routes/cpcey/index.ts index f739febf1046..251fc0b5da42 100644 --- a/lib/routes/cpcey/index.ts +++ b/lib/routes/cpcey/index.ts @@ -34,8 +34,8 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| 新闻稿 | 消费资讯 | - | :----: | :------: | - | xwg | xfzx |`, +| :----: | :------: | +| xwg | xfzx |`, }; async function handler(ctx) { diff --git a/lib/routes/cqwu/index.ts b/lib/routes/cqwu/index.ts index b55048712211..9b1123fb15b4 100644 --- a/lib/routes/cqwu/index.ts +++ b/lib/routes/cqwu/index.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| 通知公告 | 学术活动公告 | - | -------- | ------------ | - | notify | academiceve |`, +| -------- | ------------ | +| notify | academiceve |`, }; async function handler(ctx) { diff --git a/lib/routes/crac/index.ts b/lib/routes/crac/index.ts index 3120f4e3c12c..444d9e30f2ba 100644 --- a/lib/routes/crac/index.ts +++ b/lib/routes/crac/index.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['Misaka13514'], handler, description: `| 新闻动态 | 通知公告 | 政策法规 | 常见问题 | 资料下载 | English | 业余中继台 | 科普专栏 | - | -------- | -------- | -------- | -------- | -------- | ------- | ---------- | -------- | - | 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 |`, +| -------- | -------- | -------- | -------- | -------- | ------- | ---------- | -------- | +| 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 |`, }; async function handler(ctx) { diff --git a/lib/routes/cs/index.ts b/lib/routes/cs/index.ts index fd8aec323a29..bcde4c99b196 100644 --- a/lib/routes/cs/index.ts +++ b/lib/routes/cs/index.ts @@ -19,51 +19,51 @@ export const route: Route = { parameters: { category: '分类,见下表,默认为首页' }, maintainers: ['nczitzk'], description: `| 要闻 | 公司 | 市场 | 基金 | - | ---- | ---- | ---- | ---- | - | xwzx | ssgs | gppd | tzjj | +| ---- | ---- | ---- | ---- | +| xwzx | ssgs | gppd | tzjj | - | 科创 | 产经 | 期货 | 海外 | - | ---- | ------ | -------- | ------ | - | 5g | cj2020 | zzqh2020 | hw2020 | +| 科创 | 产经 | 期货 | 海外 | +| ---- | ------ | -------- | ------ | +| 5g | cj2020 | zzqh2020 | hw2020 |
- 更多栏目 +更多栏目 - #### 要闻 +#### 要闻 - | 财经要闻 | 观点评论 | 民生消费 | - | -------- | -------- | --------- | - | xwzx/hg | xwzx/jr | xwzx/msxf | +| 财经要闻 | 观点评论 | 民生消费 | +| -------- | -------- | --------- | +| xwzx/hg | xwzx/jr | xwzx/msxf | - #### 公司 +#### 公司 - | 公司要闻 | 公司深度 | 公司巡礼 | - | --------- | --------- | --------- | - | ssgs/gsxw | ssgs/gssd | ssgs/gsxl | +| 公司要闻 | 公司深度 | 公司巡礼 | +| --------- | --------- | --------- | +| ssgs/gsxw | ssgs/gssd | ssgs/gsxl | - #### 市场 +#### 市场 - | A 股市场 | 港股资讯 | 债市研究 | 海外报道 | 期货报道 | - | --------- | --------- | --------- | --------- | --------- | - | gppd/gsyj | gppd/ggzx | gppd/zqxw | gppd/hwbd | gppd/qhbd | +| A 股市场 | 港股资讯 | 债市研究 | 海外报道 | 期货报道 | +| --------- | --------- | --------- | --------- | --------- | +| gppd/gsyj | gppd/ggzx | gppd/zqxw | gppd/hwbd | gppd/qhbd | - #### 基金 +#### 基金 - | 基金动态 | 基金视点 | 基金持仓 | 私募基金 | 基民学苑 | - | --------- | --------- | --------- | --------- | --------- | - | tzjj/jjdt | tzjj/jjks | tzjj/jjcs | tzjj/smjj | tzjj/tjdh | +| 基金动态 | 基金视点 | 基金持仓 | 私募基金 | 基民学苑 | +| --------- | --------- | --------- | --------- | --------- | +| tzjj/jjdt | tzjj/jjks | tzjj/jjcs | tzjj/smjj | tzjj/tjdh | - #### 机构 +#### 机构 - | 券商 | 银行 | 保险 | - | ---- | ---- | ---- | - | qs | yh | bx | +| 券商 | 银行 | 保险 | +| ---- | ---- | ---- | +| qs | yh | bx | - #### 其他 +#### 其他 - | 中证快讯 7x24 | IPO 鉴真 | 公司能见度 | - | ------------- | -------- | ---------- | - | sylm/jsbd | yc/ipojz | yc/gsnjd | +| 中证快讯 7x24 | IPO 鉴真 | 公司能见度 | +| ------------- | -------- | ---------- | +| sylm/jsbd | yc/ipojz | yc/gsnjd |
`, handler, }; diff --git a/lib/routes/cs/video.ts b/lib/routes/cs/video.ts index a84c50b6336c..090f665610a2 100644 --- a/lib/routes/cs/video.ts +++ b/lib/routes/cs/video.ts @@ -19,7 +19,7 @@ export const route: Route = { }, name: '中证视频', description: `| 今日聚焦 | 传闻求证 | 高端访谈 | 投教课堂 | 直播汇 | - | -------- | -------- | -------- | -------- | ------ |`, +| -------- | -------- | -------- | -------- | ------ |`, maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/cste/index.ts b/lib/routes/cste/index.ts index f1dc4882e977..2ba81cbb238d 100644 --- a/lib/routes/cste/index.ts +++ b/lib/routes/cste/index.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 通知公告 | 学会新闻 | 科协简讯 | 学科动态 | 往事钩沉 | - | -------- | -------- | -------- | -------- | -------- | - | 16 | 18 | 19 | 20 | 21 |`, +| -------- | -------- | -------- | -------- | -------- | +| 16 | 18 | 19 | 20 | 21 |`, }; async function handler(ctx) { diff --git a/lib/routes/csu/cse.ts b/lib/routes/csu/cse.ts index 9876514eabf6..287ff19c0618 100644 --- a/lib/routes/csu/cse.ts +++ b/lib/routes/csu/cse.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['j1g5awi'], handler, description: `| 类型 | 学院新闻 | 通知公告 | 学术信息 | 学工动态 | 科研动态 | - | ---- | -------- | -------- | -------- | -------- | -------- | - | 参数 | xyxw | tzgg | xsxx | xgdt | kydt |`, +| ---- | -------- | -------- | -------- | -------- | -------- | +| 参数 | xyxw | tzgg | xsxx | xgdt | kydt |`, }; async function handler(ctx) { diff --git a/lib/routes/csu/mail.ts b/lib/routes/csu/mail.ts index f8aeaf562857..0beb31e3296d 100644 --- a/lib/routes/csu/mail.ts +++ b/lib/routes/csu/mail.ts @@ -28,8 +28,8 @@ export const route: Route = { maintainers: ['j1g5awi'], handler, description: `| 类型 | 校长信箱 | 党委信箱 | - | ---- | -------- | -------- | - | 参数 | 01 | 02 |`, +| ---- | -------- | -------- | +| 参数 | 01 | 02 |`, }; async function handler(ctx) { diff --git a/lib/routes/cts/news.ts b/lib/routes/cts/news.ts index 55101873cb33..c06f49020335 100644 --- a/lib/routes/cts/news.ts +++ b/lib/routes/cts/news.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['miles170'], handler, description: `| 即時 | 氣象 | 政治 | 國際 | 社會 | 運動 | 生活 | 財經 | 台語 | 地方 | 產業 | 綜合 | 藝文 | 娛樂 | - | ---- | ------- | -------- | ------------- | ------- | ------ | ---- | ----- | --------- | ----- | ---- | ------- | ---- | --------- | - | real | weather | politics | international | society | sports | life | money | taiwanese | local | pr | general | arts | entertain |`, +| ---- | ------- | -------- | ------------- | ------- | ------ | ---- | ----- | --------- | ----- | ---- | ------- | ---- | --------- | +| real | weather | politics | international | society | sports | life | money | taiwanese | local | pr | general | arts | entertain |`, }; async function handler(ctx) { diff --git a/lib/routes/cuilingmag/index.ts b/lib/routes/cuilingmag/index.ts index bf75296cc0e8..301ad6bb5981 100644 --- a/lib/routes/cuilingmag/index.ts +++ b/lib/routes/cuilingmag/index.ts @@ -144,14 +144,14 @@ export const route: Route = { 若订阅 [#哲学·文明](https://www.cuilingmag.com/category/philosophy_civilization),网址为 \`https://www.cuilingmag.com/category/philosophy_civilization\`。截取 \`https://www.cuilingmag.com/category\` 到末尾的部分 \`philosophy_civilization\` 作为参数填入,此时路由为 [\`/cuilingmag/philosophy_civilization\`](https://rsshub.app/cuilingmag/philosophy_civilization)。 ::: - | 分类 | ID | - | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | - | [哲学 · 文明](https://www.cuilingmag.com/category/philosophy_civilization) | [philosophy_civilization](https://rsshub.app/cuilingmag/philosophy_civilization) | - | [艺术 · 科技](https://www.cuilingmag.com/category/art_science) | [art_science](https://rsshub.app/cuilingmag/art_science) | - | [未来 · 生命](https://www.cuilingmag.com/category/future_life) | [future_life](https://rsshub.app/cuilingmag/future_life) | - | [行星智慧](https://www.cuilingmag.com/category/planetary_wisdom) | [planetary_wisdom](https://rsshub.app/cuilingmag/planetary_wisdom) | - | [数字治理](https://www.cuilingmag.com/category/digital_governance) | [digital_governance](https://rsshub.app/cuilingmag/digital_governance) | - | [Noema精选](https://www.cuilingmag.com/category/selected_noema) | [selected_noema](https://rsshub.app/cuilingmag/selected_noema) | +| 分类 | ID | +| -------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| [哲学 · 文明](https://www.cuilingmag.com/category/philosophy_civilization) | [philosophy_civilization](https://rsshub.app/cuilingmag/philosophy_civilization) | +| [艺术 · 科技](https://www.cuilingmag.com/category/art_science) | [art_science](https://rsshub.app/cuilingmag/art_science) | +| [未来 · 生命](https://www.cuilingmag.com/category/future_life) | [future_life](https://rsshub.app/cuilingmag/future_life) | +| [行星智慧](https://www.cuilingmag.com/category/planetary_wisdom) | [planetary_wisdom](https://rsshub.app/cuilingmag/planetary_wisdom) | +| [数字治理](https://www.cuilingmag.com/category/digital_governance) | [digital_governance](https://rsshub.app/cuilingmag/digital_governance) | +| [Noema精选](https://www.cuilingmag.com/category/selected_noema) | [selected_noema](https://rsshub.app/cuilingmag/selected_noema) | `, categories: ['new-media'], diff --git a/lib/routes/cw/master.ts b/lib/routes/cw/master.ts index 3fcc3e36035e..aa34fb7b45d7 100644 --- a/lib/routes/cw/master.ts +++ b/lib/routes/cw/master.ts @@ -19,20 +19,20 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 主頻道名稱 | 主頻道 ID | - | ---------- | --------- | - | 財經 | 8 | - | 產業 | 7 | - | 國際 | 9 | - | 管理 | 10 | - | 環境 | 12 | - | 教育 | 13 | - | 人物 | 14 | - | 政治社會 | 77 | - | 調查排行 | 15 | - | 健康關係 | 79 | - | 時尚品味 | 11 | - | 運動生活 | 103 | - | 重磅外媒 | 16 |`, +| ---------- | --------- | +| 財經 | 8 | +| 產業 | 7 | +| 國際 | 9 | +| 管理 | 10 | +| 環境 | 12 | +| 教育 | 13 | +| 人物 | 14 | +| 政治社會 | 77 | +| 調查排行 | 15 | +| 健康關係 | 79 | +| 時尚品味 | 11 | +| 運動生活 | 103 | +| 重磅外媒 | 16 |`, }; async function handler(ctx) { diff --git a/lib/routes/cyzone/index.ts b/lib/routes/cyzone/index.ts index 11cf7f8bc797..92683285ae4c 100644 --- a/lib/routes/cyzone/index.ts +++ b/lib/routes/cyzone/index.ts @@ -14,16 +14,16 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 最新 | 快鲤鱼 | 创投 | 科创板 | 汽车 | - | ---- | ------ | ---- | ------ | ---- | - | news | 5 | 14 | 13 | 8 | +| ---- | ------ | ---- | ------ | ---- | +| news | 5 | 14 | 13 | 8 | - | 海外 | 消费 | 科技 | 医疗 | 文娱 | - | ---- | ---- | ---- | ---- | ---- | - | 10 | 9 | 7 | 27 | 11 | +| 海外 | 消费 | 科技 | 医疗 | 文娱 | +| ---- | ---- | ---- | ---- | ---- | +| 10 | 9 | 7 | 27 | 11 | - | 城市 | 政策 | 特写 | 干货 | 科技股 | - | ---- | ---- | ---- | ---- | ------ | - | 16 | 15 | 6 | 12 | 33 |`, +| 城市 | 政策 | 特写 | 干货 | 科技股 | +| ---- | ---- | ---- | ---- | ------ | +| 16 | 15 | 6 | 12 | 33 |`, }; async function handler(ctx) { diff --git a/lib/routes/dahecube/index.ts b/lib/routes/dahecube/index.ts index 1f3c7794e40c..16d5a8bcfe5b 100644 --- a/lib/routes/dahecube/index.ts +++ b/lib/routes/dahecube/index.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['linbuxiao'], handler, description: `| 推荐 | 党史 | 豫股 | 财经 | 投教 | 金融 | 科创 | 投融 | 专栏 | - | --------- | ------- | ----- | -------- | --------- | ------- | ------- | ------ | ------ | - | recommend | history | stock | business | education | finance | science | invest | column |`, +| --------- | ------- | ----- | -------- | --------- | ------- | ------- | ------ | ------ | +| recommend | history | stock | business | education | finance | science | invest | column |`, }; async function handler(ctx) { diff --git a/lib/routes/dangdang/notice.ts b/lib/routes/dangdang/notice.ts index f80069b1a589..d21414facdbf 100644 --- a/lib/routes/dangdang/notice.ts +++ b/lib/routes/dangdang/notice.ts @@ -31,10 +31,10 @@ export const route: Route = { maintainers: ['353325487'], handler, description: `| 类型 | type | - | -------- | ---- | - | 全部 | 0 | - | 其他 | 1 | - | 规则变更 | 2 |`, +| -------- | ---- | +| 全部 | 0 | +| 其他 | 1 | +| 规则变更 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/dayanzai/index.ts b/lib/routes/dayanzai/index.ts index 7bf7d675f6c2..7fecbc7b42d0 100644 --- a/lib/routes/dayanzai/index.ts +++ b/lib/routes/dayanzai/index.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: [], handler, description: `| 微软应用 | 安卓应用 | 教程资源 | 其他资源 | - | -------- | -------- | -------- | -------- | - | windows | android | tutorial | other |`, +| -------- | -------- | -------- | -------- | +| windows | android | tutorial | other |`, }; async function handler(ctx) { diff --git a/lib/routes/dcfever/news.ts b/lib/routes/dcfever/news.ts index ff2235fb428d..36d195609d60 100644 --- a/lib/routes/dcfever/news.ts +++ b/lib/routes/dcfever/news.ts @@ -18,8 +18,8 @@ export const route: Route = { }, ], description: `| 所有新聞 | 攝影器材 | 手機通訊 | 汽車熱話 | 攝影文化 | 影片攝錄 | 測試報告 | 生活科技 | 攝影技巧 | - | -------- | -------- | -------- | -------- | ----------- | ----------- | -------- | -------- | --------- | - | | camera | mobile | auto | photography | videography | reviews | gadget | technique |`, +| -------- | -------- | -------- | -------- | ----------- | ----------- | -------- | -------- | --------- | +| | camera | mobile | auto | photography | videography | reviews | gadget | technique |`, }; async function handler(ctx) { diff --git a/lib/routes/dcfever/reviews.ts b/lib/routes/dcfever/reviews.ts index 61e58354fb43..f5f393a01259 100644 --- a/lib/routes/dcfever/reviews.ts +++ b/lib/routes/dcfever/reviews.ts @@ -18,8 +18,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 相機及鏡頭 | 手機平板 | 試車報告 | - | ---------- | -------- | -------- | - | cameras | phones | cars |`, +| ---------- | -------- | -------- | +| cameras | phones | cars |`, }; async function handler(ctx) { diff --git a/lib/routes/dcfever/trading.ts b/lib/routes/dcfever/trading.ts index 6c994e910f50..31396540b4e1 100644 --- a/lib/routes/dcfever/trading.ts +++ b/lib/routes/dcfever/trading.ts @@ -14,9 +14,9 @@ export const route: Route = { handler, description: `[所有物品分類](https://www.dcfever.com/trading/index.php#all_cats) - | 攝影產品 | 電腦 | 手機通訊 | 影音產品 | 遊戲機、模型 | 電器傢俱 | 潮流服飾 | 手錶 | 單車及運動 | 其它 | - | -------- | ---- | -------- | -------- | ------------ | -------- | -------- | ---- | ---------- | ---- | - | 1 | 2 | 3 | 44 | 43 | 104 | 45 | 99 | 109 | 4 |`, +| 攝影產品 | 電腦 | 手機通訊 | 影音產品 | 遊戲機、模型 | 電器傢俱 | 潮流服飾 | 手錶 | 單車及運動 | 其它 | +| -------- | ---- | -------- | -------- | ------------ | -------- | -------- | ---- | ---------- | ---- | +| 1 | 2 | 3 | 44 | 43 | 104 | 45 | 99 | 109 | 4 |`, }; async function handler(ctx) { diff --git a/lib/routes/dedao/index.ts b/lib/routes/dedao/index.ts index bd713c36e018..288c98077be5 100644 --- a/lib/routes/dedao/index.ts +++ b/lib/routes/dedao/index.ts @@ -12,8 +12,8 @@ export const route: Route = { example: '/dedao', parameters: { category: '分类,见下表,默认为`news`' }, description: `| 新闻 | 人物故事 | 视频 | - | ---- | ---- | ---- | - | news | figure | video |`, +| ---- | ---- | ---- | +| news | figure | video |`, handler, }; diff --git a/lib/routes/dedao/user.ts b/lib/routes/dedao/user.ts index e679ab521431..c2b8fb4d9da2 100644 --- a/lib/routes/dedao/user.ts +++ b/lib/routes/dedao/user.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 动态 | 书评 | 视频 | - | ---- | ---- | ---- | - | 0 | 7 | 12 |`, +| ---- | ---- | ---- | +| 0 | 7 | 12 |`, }; async function handler(ctx) { diff --git a/lib/routes/deeplearning/the-batch.ts b/lib/routes/deeplearning/the-batch.ts index 04ae311a5ab4..5abe989dc12d 100644 --- a/lib/routes/deeplearning/the-batch.ts +++ b/lib/routes/deeplearning/the-batch.ts @@ -150,32 +150,32 @@ export const route: Route = { ::: - | Tag | ID | - | ---------------------------------------------------------------------- | -------------------------------------------------------------------- | - | [Weekly Issues](https://www.deeplearning.ai/the-batch/) | [*null*](https://rsshub.app/deeplearning/the-batch) | - | [Andrew's Letters](https://www.deeplearning.ai/the-batch/tag/letters/) | [letters](https://rsshub.app/deeplearning/the-batch/letters) | - | [Data Points](https://www.deeplearning.ai/the-batch/tag/data-points/) | [data-points](https://rsshub.app/deeplearning/the-batch/data-points) | - | [ML Research](https://www.deeplearning.ai/the-batch/tag/research/) | [research](https://rsshub.app/deeplearning/the-batch/research) | - | [Business](https://www.deeplearning.ai/the-batch/tag/business/) | [business](https://rsshub.app/deeplearning/the-batch/business) | - | [Science](https://www.deeplearning.ai/the-batch/tag/science/) | [science](https://rsshub.app/deeplearning/the-batch/science) | - | [AI & Society](https://www.deeplearning.ai/the-batch/tag/ai-society/) | [ai-society](https://rsshub.app/deeplearning/the-batch/ai-society) | - | [Culture](https://www.deeplearning.ai/the-batch/tag/culture/) | [culture](https://rsshub.app/deeplearning/the-batch/culture) | - | [Hardware](https://www.deeplearning.ai/the-batch/tag/hardware/) | [hardware](https://rsshub.app/deeplearning/the-batch/hardware) | - | [AI Careers](https://www.deeplearning.ai/the-batch/tag/ai-careers/) | [ai-careers](https://rsshub.app/deeplearning/the-batch/ai-careers) | +| Tag | ID | +| ---------------------------------------------------------------------- | -------------------------------------------------------------------- | +| [Weekly Issues](https://www.deeplearning.ai/the-batch/) | [*null*](https://rsshub.app/deeplearning/the-batch) | +| [Andrew's Letters](https://www.deeplearning.ai/the-batch/tag/letters/) | [letters](https://rsshub.app/deeplearning/the-batch/letters) | +| [Data Points](https://www.deeplearning.ai/the-batch/tag/data-points/) | [data-points](https://rsshub.app/deeplearning/the-batch/data-points) | +| [ML Research](https://www.deeplearning.ai/the-batch/tag/research/) | [research](https://rsshub.app/deeplearning/the-batch/research) | +| [Business](https://www.deeplearning.ai/the-batch/tag/business/) | [business](https://rsshub.app/deeplearning/the-batch/business) | +| [Science](https://www.deeplearning.ai/the-batch/tag/science/) | [science](https://rsshub.app/deeplearning/the-batch/science) | +| [AI & Society](https://www.deeplearning.ai/the-batch/tag/ai-society/) | [ai-society](https://rsshub.app/deeplearning/the-batch/ai-society) | +| [Culture](https://www.deeplearning.ai/the-batch/tag/culture/) | [culture](https://rsshub.app/deeplearning/the-batch/culture) | +| [Hardware](https://www.deeplearning.ai/the-batch/tag/hardware/) | [hardware](https://rsshub.app/deeplearning/the-batch/hardware) | +| [AI Careers](https://www.deeplearning.ai/the-batch/tag/ai-careers/) | [ai-careers](https://rsshub.app/deeplearning/the-batch/ai-careers) | - #### [Letters from Andrew Ng](https://www.deeplearning.ai/the-batch/tag/letters/) +#### [Letters from Andrew Ng](https://www.deeplearning.ai/the-batch/tag/letters/) - | Tag | ID | - | --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | - | [All](https://www.deeplearning.ai/the-batch/tag/letters/) | [letters](https://rsshub.app/deeplearning/the-batch/letters) | - | [Personal Insights](https://www.deeplearning.ai/the-batch/tag/personal-insights/) | [personal-insights](https://rsshub.app/deeplearning/the-batch/personal-insights) | - | [Technical Insights](https://www.deeplearning.ai/the-batch/tag/technical-insights/) | [technical-insights](https://rsshub.app/deeplearning/the-batch/technical-insights) | - | [Business Insights](https://www.deeplearning.ai/the-batch/tag/business-insights/) | [business-insights](https://rsshub.app/deeplearning/the-batch/business-insights) | - | [Tech & Society](https://www.deeplearning.ai/the-batch/tag/tech-society/) | [tech-society](https://rsshub.app/deeplearning/the-batch/tech-society) | - | [DeepLearning.AI News](https://www.deeplearning.ai/the-batch/tag/deeplearning-ai-news/) | [deeplearning-ai-news](https://rsshub.app/deeplearning/the-batch/deeplearning-ai-news) | - | [AI Careers](https://www.deeplearning.ai/the-batch/tag/ai-careers/) | [ai-careers](https://rsshub.app/deeplearning/the-batch/ai-careers) | - | [Just For Fun](https://www.deeplearning.ai/the-batch/tag/just-for-fun/) | [just-for-fun](https://rsshub.app/deeplearning/the-batch/just-for-fun) | - | [Learning & Education](https://www.deeplearning.ai/the-batch/tag/learning-education/) | [learning-education](https://rsshub.app/deeplearning/the-batch/learning-education) | +| Tag | ID | +| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| [All](https://www.deeplearning.ai/the-batch/tag/letters/) | [letters](https://rsshub.app/deeplearning/the-batch/letters) | +| [Personal Insights](https://www.deeplearning.ai/the-batch/tag/personal-insights/) | [personal-insights](https://rsshub.app/deeplearning/the-batch/personal-insights) | +| [Technical Insights](https://www.deeplearning.ai/the-batch/tag/technical-insights/) | [technical-insights](https://rsshub.app/deeplearning/the-batch/technical-insights) | +| [Business Insights](https://www.deeplearning.ai/the-batch/tag/business-insights/) | [business-insights](https://rsshub.app/deeplearning/the-batch/business-insights) | +| [Tech & Society](https://www.deeplearning.ai/the-batch/tag/tech-society/) | [tech-society](https://rsshub.app/deeplearning/the-batch/tech-society) | +| [DeepLearning.AI News](https://www.deeplearning.ai/the-batch/tag/deeplearning-ai-news/) | [deeplearning-ai-news](https://rsshub.app/deeplearning/the-batch/deeplearning-ai-news) | +| [AI Careers](https://www.deeplearning.ai/the-batch/tag/ai-careers/) | [ai-careers](https://rsshub.app/deeplearning/the-batch/ai-careers) | +| [Just For Fun](https://www.deeplearning.ai/the-batch/tag/just-for-fun/) | [just-for-fun](https://rsshub.app/deeplearning/the-batch/just-for-fun) | +| [Learning & Education](https://www.deeplearning.ai/the-batch/tag/learning-education/) | [learning-education](https://rsshub.app/deeplearning/the-batch/learning-education) | `, categories: ['programming'], diff --git a/lib/routes/dehenglaw/index.ts b/lib/routes/dehenglaw/index.ts index ed38751715cb..630b9012c119 100644 --- a/lib/routes/dehenglaw/index.ts +++ b/lib/routes/dehenglaw/index.ts @@ -93,9 +93,9 @@ export const route: Route = { description: `::: tip 若订阅 [专业文章](https://dehenglaw.com/),网址为 \`https://www.dehenglaw.com/CN/paper/0008/000902.aspx\`。截取 \`https://dehenglaw.com/\` 到末尾 \`/0008/000902.aspx\` 的部分 \`CN/paper\` 作为参数填入,此时路由为 [\`/dehenglaw/CN/paper\`](https://rsshub.app/dehenglaw/CN/paper)。 - | 专业文章 | 出版物 | 德恒论坛 | - | -------- | ------- | -------- | - | paper | publish | luntan | +| 专业文章 | 出版物 | 德恒论坛 | +| -------- | ------- | -------- | +| paper | publish | luntan | :::`, categories: ['new-media'], diff --git a/lib/routes/dewu/declaration.ts b/lib/routes/dewu/declaration.ts index 9a3247985f43..0e6e8f4c567d 100644 --- a/lib/routes/dewu/declaration.ts +++ b/lib/routes/dewu/declaration.ts @@ -32,11 +32,11 @@ export const route: Route = { maintainers: ['blade0910'], handler, description: `| 类型 | type | - | ---------------- | ---------- | - | 技术变更 | 1010580020 | - | 服务市场规则中心 | 1014821004 | - | 规则变更 | 1011202692 | - | 维护公告 | 1010568195 |`, +| ---------------- | ---------- | +| 技术变更 | 1010580020 | +| 服务市场规则中心 | 1014821004 | +| 规则变更 | 1011202692 | +| 维护公告 | 1010568195 |`, }; async function handler(ctx) { diff --git a/lib/routes/dhu/jiaowu/news.ts b/lib/routes/dhu/jiaowu/news.ts index 704096d5dcbb..2589b5964f7a 100644 --- a/lib/routes/dhu/jiaowu/news.ts +++ b/lib/routes/dhu/jiaowu/news.ts @@ -29,8 +29,8 @@ export const route: Route = { maintainers: ['KiraKiseki'], handler, description: `| 学生专栏 | 教师专栏 | 选课专栏(仅选课期间开放) | 辅修专业 | - | -------- | -------- | -------- | -------- | - | student | teacher | class | fxzy |`, +| -------- | -------- | -------- | -------- | +| student | teacher | class | fxzy |`, }; async function handler(ctx) { diff --git a/lib/routes/dhu/yjs/news.ts b/lib/routes/dhu/yjs/news.ts index 24146d267f53..9e8f9e0e2370 100644 --- a/lib/routes/dhu/yjs/news.ts +++ b/lib/routes/dhu/yjs/news.ts @@ -28,8 +28,8 @@ export const route: Route = { maintainers: ['fox2049'], handler, description: `| 新闻动态 | 通知公告 | 选课考试 | - | -------- | -------- | -------- | - | trend | notice | class |`, +| -------- | -------- | -------- | +| trend | notice | class |`, }; async function handler(ctx) { diff --git a/lib/routes/dhu/yjs/zs.ts b/lib/routes/dhu/yjs/zs.ts index 62b7c2ecf4d2..a098619fb078 100644 --- a/lib/routes/dhu/yjs/zs.ts +++ b/lib/routes/dhu/yjs/zs.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['fox2049'], handler, description: `| 博士招生 | 硕士招生 | - | -------- | -------- | - | doctor | master |`, +| -------- | -------- | +| doctor | master |`, }; async function handler(ctx) { diff --git a/lib/routes/diandong/news.ts b/lib/routes/diandong/news.ts index 2bbd4dde55d2..a11f449346b7 100644 --- a/lib/routes/diandong/news.ts +++ b/lib/routes/diandong/news.ts @@ -42,9 +42,9 @@ export const route: Route = { url: 'diandong.com/news', description: `分类 - | 推荐 | 新车 | 导购 | 试驾 | 用车 | 技术 | 政策 | 行业 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 0 | 29 | 61 | 30 | 75 | 22 | 24 | 23 |`, +| 推荐 | 新车 | 导购 | 试驾 | 用车 | 技术 | 政策 | 行业 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 0 | 29 | 61 | 30 | 75 | 22 | 24 | 23 |`, }; async function handler(ctx) { diff --git a/lib/routes/dlsite/new.ts b/lib/routes/dlsite/new.ts index ed26f19234da..d4914af0ffd2 100644 --- a/lib/routes/dlsite/new.ts +++ b/lib/routes/dlsite/new.ts @@ -74,8 +74,8 @@ export const route: Route = { maintainers: ['cssxsh'], handler, description: `| Doujin | Comics | PC Games | Doujin (R18) | Adult Comics | H Games | Otome | BL | - | ------ | ------ | -------- | ------------ | ------------ | ------- | ----- | -- | - | home | comic | soft | maniax | books | pro | girls | bl |`, +| ------ | ------ | -------- | ------------ | ------------ | ------- | ----- | -- | +| home | comic | soft | maniax | books | pro | girls | bl |`, }; async function handler(ctx) { diff --git a/lib/routes/dmzj/news.ts b/lib/routes/dmzj/news.ts index dc6bee568844..34e2604169b2 100644 --- a/lib/routes/dmzj/news.ts +++ b/lib/routes/dmzj/news.ts @@ -28,8 +28,8 @@ export const route: Route = { handler, url: 'news.dmzj.com/', description: `| 漫画情报 | 轻小说情报 | 动漫周边 | 声优情报 | 音乐资讯 | 游戏资讯 | 美图欣赏 | 漫展情报 | 大杂烩 | - | ------------- | ------------------- | -------------- | --------------- | ----------- | ---------- | ------------- | -------------- | ------- | - | manhuaqingbao | qingxiaoshuoqingbao | manhuazhoubian | shengyouqingbao | yinyuezixun | youxizixun | meituxinshang | manzhanqingbao | dazahui |`, +| ------------- | ------------------- | -------------- | --------------- | ----------- | ---------- | ------------- | -------------- | ------- | +| manhuaqingbao | qingxiaoshuoqingbao | manhuazhoubian | shengyouqingbao | yinyuezixun | youxizixun | meituxinshang | manzhanqingbao | dazahui |`, }; async function handler(ctx) { diff --git a/lib/routes/dn/news.ts b/lib/routes/dn/news.ts index 1f5015c6695f..ae9fdfe98f2f 100644 --- a/lib/routes/dn/news.ts +++ b/lib/routes/dn/news.ts @@ -28,18 +28,18 @@ export const route: Route = { handler, description: `#### Language - | English | 中文 | - | ------- | ----- | - | en-us | zh-cn | - - #### Category - - | English Category | 中文分类 | Category id | - | -------------------- | -------- | ----------- | - | The Latest | 最新 | | - | Industry Information | 行业资讯 | category-1 | - | Knowledge | 域名知识 | category-2 | - | Investment | 域名投资 | category-3 |`, +| English | 中文 | +| ------- | ----- | +| en-us | zh-cn | + +#### Category + +| English Category | 中文分类 | Category id | +| -------------------- | -------- | ----------- | +| The Latest | 最新 | | +| Industry Information | 行业资讯 | category-1 | +| Knowledge | 域名知识 | category-2 | +| Investment | 域名投资 | category-3 |`, }; async function handler(ctx) { diff --git a/lib/routes/docschina/weekly.ts b/lib/routes/docschina/weekly.ts index a3486580716e..421bd84fa526 100644 --- a/lib/routes/docschina/weekly.ts +++ b/lib/routes/docschina/weekly.ts @@ -18,8 +18,8 @@ export const route: Route = { maintainers: ['daijinru', 'hestudy'], handler, description: `| javascript | node | react | - | ---------- | ---- | ----- | - | js | node | react |`, +| ---------- | ---- | ----- | +| js | node | react |`, radar: [ { source: ['docschina.org/news/weekly/js/*', 'docschina.org/news/weekly/js', 'docschina.org/'], diff --git a/lib/routes/dongqiudi/special.ts b/lib/routes/dongqiudi/special.ts index 3fc0bae8d3eb..eea213981796 100644 --- a/lib/routes/dongqiudi/special.ts +++ b/lib/routes/dongqiudi/special.ts @@ -18,8 +18,8 @@ export const route: Route = { maintainers: ['dxmpalb'], handler, description: `| 新闻大爆炸 | 懂球帝十佳球 | 懂球帝本周 MVP | - | ---------- | ------------ | -------------- | - | 41 | 52 | 53 |`, +| ---------- | ------------ | -------------- | +| 41 | 52 | 53 |`, }; async function handler(ctx) { diff --git a/lib/routes/dongqiudi/top-news.ts b/lib/routes/dongqiudi/top-news.ts index 58b6f5c648dc..43d5c7b7c8a1 100644 --- a/lib/routes/dongqiudi/top-news.ts +++ b/lib/routes/dongqiudi/top-news.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['HendricksZheng'], handler, description: `| 头条 | 深度 | 闲情 | D 站 | 中超 | 国际 | 英超 | 西甲 | 意甲 | 德甲 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 1 | 55 | 37 | 219 | 56 | 120 | 3 | 5 | 4 | 6 |`, +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 1 | 55 | 37 | 219 | 56 | 120 | 3 | 5 | 4 | 6 |`, }; async function handler(ctx) { diff --git a/lib/routes/douban/book/latest.ts b/lib/routes/douban/book/latest.ts index 5dd33b905d38..e9da797841e4 100644 --- a/lib/routes/douban/book/latest.ts +++ b/lib/routes/douban/book/latest.ts @@ -21,8 +21,8 @@ export const route: Route = { name: '新书速递', maintainers: ['fengkx', 'lyqluis'], description: `| 文学 | 小说 | 历史文化 | 社会纪实 | 科学新知 | 艺术设计 | 商业经管 | 绘本漫画 | - | ------------ | ------- | -------- | --------- | -------- | -------- | -------- | -------- | - | prose_poetry | fiction | history | biography | science | art | business | comics |`, +| ------------ | ------- | -------- | --------- | -------- | -------- | -------- | -------- | +| prose_poetry | fiction | history | biography | science | art | business | comics |`, handler, }; diff --git a/lib/routes/douban/book/rank.ts b/lib/routes/douban/book/rank.ts index 8283f2a9cd84..132fd52cc7e9 100644 --- a/lib/routes/douban/book/rank.ts +++ b/lib/routes/douban/book/rank.ts @@ -18,8 +18,8 @@ export const route: Route = { maintainers: ['xyqfer', 'queensferryme'], handler, description: `| 全部 | 虚构 | 非虚构 | - | ---- | ------- | ---------- | - | | fiction | nonfiction |`, +| ---- | ------- | ---------- | +| | fiction | nonfiction |`, }; async function handler(ctx) { diff --git a/lib/routes/douban/channel/subject.ts b/lib/routes/douban/channel/subject.ts index c25556a53aa6..b90e2ac216f2 100644 --- a/lib/routes/douban/channel/subject.ts +++ b/lib/routes/douban/channel/subject.ts @@ -18,8 +18,8 @@ export const route: Route = { maintainers: ['umm233'], handler, description: `| 电影 | 电视剧 | 图书 | 唱片 | - | ---- | ------ | ---- | ---- | - | 0 | 1 | 2 | 3 |`, +| ---- | ------ | ---- | ---- | +| 0 | 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/douban/channel/topic.ts b/lib/routes/douban/channel/topic.ts index 26c8c9a24f6c..5d2734e57ae1 100644 --- a/lib/routes/douban/channel/topic.ts +++ b/lib/routes/douban/channel/topic.ts @@ -18,8 +18,8 @@ export const route: Route = { maintainers: ['umm233'], handler, description: `| 默认 | 热门 | 最新 | - | ------- | ---- | ---- | - | default | hot | new |`, +| ------- | ---- | ---- | +| default | hot | new |`, }; async function handler(ctx) { diff --git a/lib/routes/douban/other/jobs.ts b/lib/routes/douban/other/jobs.ts index cbaa6b537c78..8ba037897d4b 100644 --- a/lib/routes/douban/other/jobs.ts +++ b/lib/routes/douban/other/jobs.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| 社会招聘 | 校园招聘 | 实习生招聘 | - | :------: | :------: | :--------: | - | social | campus | intern |`, +| :------: | :------: | :--------: | +| social | campus | intern |`, }; async function handler(ctx) { diff --git a/lib/routes/douban/other/latest-music.ts b/lib/routes/douban/other/latest-music.ts index 2bd39e43a150..2715b3505323 100644 --- a/lib/routes/douban/other/latest-music.ts +++ b/lib/routes/douban/other/latest-music.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: ['fengkx', 'xyqfer'], handler, description: `| 华语 | 欧美 | 日韩 | - | ------- | ------- | ----------- | - | chinese | western | japankorean |`, +| ------- | ------- | ----------- | +| chinese | western | japankorean |`, }; async function handler(ctx) { diff --git a/lib/routes/douban/other/list.ts b/lib/routes/douban/other/list.ts index 79900b4b6d79..b4c5f237afa8 100644 --- a/lib/routes/douban/other/list.ts +++ b/lib/routes/douban/other/list.ts @@ -30,31 +30,31 @@ export const route: Route = { maintainers: ['5upernova-heng', 'honue'], handler, description: `| 榜单 / 集合 | 路由 | - | ------------------ | ----------------------------- | - | 实时热门书影音 | subject\_real\_time\_hotest | - | 影院热映 | movie\_showing | - | 实时热门电影 | movie\_real\_time\_hotest | - | 实时热门电视 | tv\_real\_time\_hotest | - | 一周口碑电影榜 | movie\_weekly\_best | - | 华语口碑剧集榜 | tv\_chinese\_best\_weekly | - | 全球口碑剧集榜 | tv\_global\_best\_weekly | - | 国内口碑综艺榜 | show\_chinese\_best\_weekly | - | 国外口碑综艺榜 | show\_global\_best\_weekly | - | 热播新剧国产剧 | tv\_domestic | - | 热播新剧欧美剧 | tv\_american | - | 热播新剧日剧 | tv\_japanese | - | 热播新剧韩剧 | tv\_korean | - | 热播新剧动画 | tv\_animation | - | 虚构类小说热门榜 | book\_fiction\_hot\_weekly | - | 非虚构类小说热门榜 | book\_nonfiction\_hot\_weekly | - | 热门单曲榜 | music\_single | - | 华语新碟榜 | music\_chinese | - | ... | ... | +| ------------------ | ----------------------------- | +| 实时热门书影音 | subject\_real\_time\_hotest | +| 影院热映 | movie\_showing | +| 实时热门电影 | movie\_real\_time\_hotest | +| 实时热门电视 | tv\_real\_time\_hotest | +| 一周口碑电影榜 | movie\_weekly\_best | +| 华语口碑剧集榜 | tv\_chinese\_best\_weekly | +| 全球口碑剧集榜 | tv\_global\_best\_weekly | +| 国内口碑综艺榜 | show\_chinese\_best\_weekly | +| 国外口碑综艺榜 | show\_global\_best\_weekly | +| 热播新剧国产剧 | tv\_domestic | +| 热播新剧欧美剧 | tv\_american | +| 热播新剧日剧 | tv\_japanese | +| 热播新剧韩剧 | tv\_korean | +| 热播新剧动画 | tv\_animation | +| 虚构类小说热门榜 | book\_fiction\_hot\_weekly | +| 非虚构类小说热门榜 | book\_nonfiction\_hot\_weekly | +| 热门单曲榜 | music\_single | +| 华语新碟榜 | music\_chinese | +| ... | ... | - | 额外参数 | 含义 | 接受的值 | 默认值 | - | -------- | ---------------------- | -------- | ------ | - | playable | 仅看有可播放片源的影片 | 0/1 | 0 | - | score | 筛选评分 | 0-10 | 0 | +| 额外参数 | 含义 | 接受的值 | 默认值 | +| -------- | ---------------------- | -------- | ------ | +| playable | 仅看有可播放片源的影片 | 0/1 | 0 | +| score | 筛选评分 | 0-10 | 0 | 用例:\`/douban/list/tv_korean/playable=1&score=8\` diff --git a/lib/routes/douban/other/recommended.ts b/lib/routes/douban/other/recommended.ts index 8d607a3672de..840ed1e9164b 100644 --- a/lib/routes/douban/other/recommended.ts +++ b/lib/routes/douban/other/recommended.ts @@ -24,9 +24,9 @@ export const route: Route = { maintainers: ['honue'], handler, description: `| 额外参数 | 含义 | 接受的值 | 默认值 | - | -------- | ---------------------- | -------- | ------ | - | playable | 仅看有可播放片源的影片 | 0/1 | 0 | - | score | 筛选评分 | 0-10 | 0 | +| -------- | ---------------------- | -------- | ------ | +| playable | 仅看有可播放片源的影片 | 0/1 | 0 | +| score | 筛选评分 | 0-10 | 0 | 用例:\`/douban/recommended/tv/playable=0&score=8\` diff --git a/lib/routes/douban/other/weekly-best.ts b/lib/routes/douban/other/weekly-best.ts index b2b35b1c5be8..fab2d55aac39 100644 --- a/lib/routes/douban/other/weekly-best.ts +++ b/lib/routes/douban/other/weekly-best.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['numm233', 'nczitzk'], handler, description: `| 一周口碑电影榜 | 华语口碑剧集榜 | - | ------------------- | ------------------------- | - | movie\_weekly\_best | tv\_chinese\_best\_weekly |`, +| ------------------- | ------------------------- | +| movie\_weekly\_best | tv\_chinese\_best\_weekly |`, }; async function handler(ctx) { diff --git a/lib/routes/douban/people/status.ts b/lib/routes/douban/people/status.ts index 1138a426b973..5f127195b3c3 100644 --- a/lib/routes/douban/people/status.ts +++ b/lib/routes/douban/people/status.ts @@ -22,21 +22,21 @@ export const route: Route = { 对于豆瓣用户广播内容,在 \`routeParams\` 参数中以 query string 格式设置如下选项可以控制输出的样式 - | 键 | 含义 | 接受的值 | 默认值 | - | -------------------------- | -------------------------------------------------------------- | -------------- | ------ | - | readable | 是否开启细节排版可读性优化 | 0/1/true/false | false | - | authorNameBold | 是否加粗作者名字 | 0/1/true/false | false | - | showAuthorInTitle | 是否在标题处显示作者 | 0/1/true/false | true | - | showAuthorInDesc | 是否在正文处显示作者 | 0/1/true/false | false | - | showAuthorAvatarInDesc | 是否在正文处显示作者头像(若阅读器会提取正文图片,不建议开启) | 0/1/true/false | false | - | showEmojiForRetweet | 显示 “🔁” 取代 “Fw”(转发) | 0/1/true/false | false | - | showRetweetTextInTitle | 在标题出显示转发评论(置为 false 则在标题只显示被转发的广播) | 0/1/true/false | false | - | addLinkForPics | 为图片添加可点击的链接 | 0/1/true/false | false | - | showTimestampInDescription | 在正文处显示广播的时间戳 | 0/1/true/false | false | - | showComments | 在正文处显示评论 | 0/1/true/false | false | - | widthOfPics | 广播配图宽(生效取决于阅读器) | 不指定 / 数字 | 不指定 | - | heightOfPics | 广播配图高(生效取决于阅读器) | 不指定 / 数字 | 不指定 | - | sizeOfAuthorAvatar | 作者头像大小 | 数字 | 48 | +| 键 | 含义 | 接受的值 | 默认值 | +| -------------------------- | -------------------------------------------------------------- | -------------- | ------ | +| readable | 是否开启细节排版可读性优化 | 0/1/true/false | false | +| authorNameBold | 是否加粗作者名字 | 0/1/true/false | false | +| showAuthorInTitle | 是否在标题处显示作者 | 0/1/true/false | true | +| showAuthorInDesc | 是否在正文处显示作者 | 0/1/true/false | false | +| showAuthorAvatarInDesc | 是否在正文处显示作者头像(若阅读器会提取正文图片,不建议开启) | 0/1/true/false | false | +| showEmojiForRetweet | 显示 “🔁” 取代 “Fw”(转发) | 0/1/true/false | false | +| showRetweetTextInTitle | 在标题出显示转发评论(置为 false 则在标题只显示被转发的广播) | 0/1/true/false | false | +| addLinkForPics | 为图片添加可点击的链接 | 0/1/true/false | false | +| showTimestampInDescription | 在正文处显示广播的时间戳 | 0/1/true/false | false | +| showComments | 在正文处显示评论 | 0/1/true/false | false | +| widthOfPics | 广播配图宽(生效取决于阅读器) | 不指定 / 数字 | 不指定 | +| heightOfPics | 广播配图高(生效取决于阅读器) | 不指定 / 数字 | 不指定 | +| sizeOfAuthorAvatar | 作者头像大小 | 数字 | 48 | 指定更多与默认值不同的参数选项可以改善 RSS 的可读性,如 diff --git a/lib/routes/douban/people/wish.ts b/lib/routes/douban/people/wish.ts index 6105dfc8e8b5..9f4cc750970e 100644 --- a/lib/routes/douban/people/wish.ts +++ b/lib/routes/douban/people/wish.ts @@ -22,9 +22,9 @@ export const route: Route = { handler, description: `对于豆瓣用户想看的内容,在 \`routeParams\` 参数中以 query string 格式设置如下选项可以控制输出的样式 - | 键 | 含义 | 接受的值 | 默认值 | - | ---------- | ---------- | -------- | ------ | - | pagesCount | 查询页面数 | | 1 |`, +| 键 | 含义 | 接受的值 | 默认值 | +| ---------- | ---------- | -------- | ------ | +| pagesCount | 查询页面数 | | 1 |`, }; async function handler(ctx) { diff --git a/lib/routes/douyu/group.ts b/lib/routes/douyu/group.ts index e46cabbc5f2e..7bd5df62989d 100644 --- a/lib/routes/douyu/group.ts +++ b/lib/routes/douyu/group.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 回复时间排序 | 发布时间排序 | - | ------------ | ------------ | - | 1 | 2 |`, +| ------------ | ------------ | +| 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/dtcj/datahero.ts b/lib/routes/dtcj/datahero.ts index 7c3f79fa5cdc..022dbc50d3c0 100644 --- a/lib/routes/dtcj/datahero.ts +++ b/lib/routes/dtcj/datahero.ts @@ -28,8 +28,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 侠创 | 纽约数据科学学院 | RS 实验所 | 阿里云天池 | - | ---- | ---------------- | --------- | ---------- | - | 5 | 6 | 9 | 10 |`, +| ---- | ---------------- | --------- | ---------- | +| 5 | 6 | 9 | 10 |`, }; async function handler(ctx) { diff --git a/lib/routes/dtcj/datainsight.ts b/lib/routes/dtcj/datainsight.ts index 903caba01823..dfe5d9ab785b 100644 --- a/lib/routes/dtcj/datainsight.ts +++ b/lib/routes/dtcj/datainsight.ts @@ -28,8 +28,8 @@ export const route: Route = { handler, url: 'dtcj.com/dtcj/datainsight', description: `| 城数 | NEXT 情报局 | 专业精选 | - | ---- | ----------- | -------- | - | 3 | 1 | 4 |`, +| ---- | ----------- | -------- | +| 3 | 1 | 4 |`, }; async function handler(ctx) { diff --git a/lib/routes/dx2025/index.ts b/lib/routes/dx2025/index.ts index 8ec00dc76bb2..ac746ef53160 100644 --- a/lib/routes/dx2025/index.ts +++ b/lib/routes/dx2025/index.ts @@ -21,26 +21,26 @@ export const route: Route = { handler, description: `内容类别 - | 产业观察 | 行业报告 | 政策 | 数据 | - | -------------------- | ---------------- | ------ | ---- | - | industry-observation | industry-reports | policy | data | +| 产业观察 | 行业报告 | 政策 | 数据 | +| -------------------- | ---------------- | ------ | ---- | +| industry-observation | industry-reports | policy | data | 行业分类 - | 行业 | 行业名称 | - | -------------------- | ----------------------------------------------------------------- | - | 新一代信息技术 | next-generation-information-technology-industry-reports | - | 高档数控机床和机器人 | high-grade-cnc-machine-tools-and-robots-industry-reports | - | 航空航天装备 | aerospace-equipment-industry-reports | - | 海工装备及高技术船舶 | marine-engineering-equipment-and-high-tech-ships-industry-reports | - | 先进轨道交通装备 | advanced-rail-transportation-equipment-industry-reports | - | 节能与新能源汽车 | energy-saving-and-new-energy-vehicles-industry-reports | - | 电力装备 | electric-equipment-industry-reports | - | 农机装备 | agricultural-machinery-equipment-industry-reports | - | 新材料 | new-material-industry-reports | - | 生物医药及医疗器械 | biomedicine-and-medical-devices-industry-reports | - | 现代服务业 | modern-service-industry-industry-reports | - | 制造业人才 | manufacturing-talent-industry-reports |`, +| 行业 | 行业名称 | +| -------------------- | ----------------------------------------------------------------- | +| 新一代信息技术 | next-generation-information-technology-industry-reports | +| 高档数控机床和机器人 | high-grade-cnc-machine-tools-and-robots-industry-reports | +| 航空航天装备 | aerospace-equipment-industry-reports | +| 海工装备及高技术船舶 | marine-engineering-equipment-and-high-tech-ships-industry-reports | +| 先进轨道交通装备 | advanced-rail-transportation-equipment-industry-reports | +| 节能与新能源汽车 | energy-saving-and-new-energy-vehicles-industry-reports | +| 电力装备 | electric-equipment-industry-reports | +| 农机装备 | agricultural-machinery-equipment-industry-reports | +| 新材料 | new-material-industry-reports | +| 生物医药及医疗器械 | biomedicine-and-medical-devices-industry-reports | +| 现代服务业 | modern-service-industry-industry-reports | +| 制造业人才 | manufacturing-talent-industry-reports |`, }; async function handler(ctx) { diff --git a/lib/routes/dytt/index.ts b/lib/routes/dytt/index.ts index 48c019d31540..9d0cc82f0353 100644 --- a/lib/routes/dytt/index.ts +++ b/lib/routes/dytt/index.ts @@ -209,7 +209,7 @@ export const route: Route = { :::
- 更多分类 +更多分类 | 分类 | ID | | ----------------------------------------------------- | ------------------------------------------------ | diff --git a/lib/routes/eagle/changelog.ts b/lib/routes/eagle/changelog.ts index 89ed91a8b542..e07cb89ae101 100644 --- a/lib/routes/eagle/changelog.ts +++ b/lib/routes/eagle/changelog.ts @@ -21,9 +21,9 @@ export const route: Route = { handler, description: `Language - | Simplified Chinese | Traditional Chinese | English | - | ------------------ | ------------------- | ------- | - | cn | tw | en |`, +| Simplified Chinese | Traditional Chinese | English | +| ------------------ | ------------------- | ------- | +| cn | tw | en |`, }; async function handler(ctx) { diff --git a/lib/routes/earthquake/ceic.ts b/lib/routes/earthquake/ceic.ts index 860db18538e4..7966962046df 100644 --- a/lib/routes/earthquake/ceic.ts +++ b/lib/routes/earthquake/ceic.ts @@ -27,14 +27,14 @@ export const route: Route = { handler, url: 'www.cea.gov.cn/cea/xwzx/zqsd/index.html', description: `| 参数 | 类型 | - | ---- | --------------------------- | - | 1 | 最近 24 小时地震信息 | - | 2 | 最近 48 小时地震信息 | - | 5 | 最近一年 3.0 级以上地震信息 | - | 7 | 最近一年 3.0 级以下地震 | - | 8 | 最近一年 4.0 级以上地震信息 | - | 9 | 最近一年 5.0 级以上地震信息 | - | 0 | 最近一年 6.0 级以上地震信息 | +| ---- | --------------------------- | +| 1 | 最近 24 小时地震信息 | +| 2 | 最近 48 小时地震信息 | +| 5 | 最近一年 3.0 级以上地震信息 | +| 7 | 最近一年 3.0 级以下地震 | +| 8 | 最近一年 4.0 级以上地震信息 | +| 9 | 最近一年 5.0 级以上地震信息 | +| 0 | 最近一年 6.0 级以上地震信息 | 可通过全局过滤参数订阅您感兴趣的地区.`, }; diff --git a/lib/routes/eastday/24.ts b/lib/routes/eastday/24.ts index 145a5e513c9a..297269e05ffe 100644 --- a/lib/routes/eastday/24.ts +++ b/lib/routes/eastday/24.ts @@ -47,13 +47,13 @@ export const route: Route = { handler, url: 'mini.eastday.com/', description: `| 推荐 | 社会 | 娱乐 | 国际 | 军事 | - | ---- | ---- | ---- | ---- | ---- | +| ---- | ---- | ---- | ---- | ---- | - | 养生 | 汽车 | 体育 | 财经 | 游戏 | - | ---- | ---- | ---- | ---- | ---- | +| 养生 | 汽车 | 体育 | 财经 | 游戏 | +| ---- | ---- | ---- | ---- | ---- | - | 科技 | 国内 | 宠物 | 情感 | 人文 | 教育 | - | ---- | ---- | ---- | ---- | ---- | ---- |`, +| 科技 | 国内 | 宠物 | 情感 | 人文 | 教育 | +| ---- | ---- | ---- | ---- | ---- | ---- |`, }; async function handler(ctx) { diff --git a/lib/routes/eastmoney/report/index.ts b/lib/routes/eastmoney/report/index.ts index 3dedde7ef6a8..a43d5c869537 100644 --- a/lib/routes/eastmoney/report/index.ts +++ b/lib/routes/eastmoney/report/index.ts @@ -44,8 +44,8 @@ export const route: Route = { maintainers: ['syzq'], handler, description: `| 策略报告 | 宏观研究 | 券商晨报 | 行业研究 | 个股研报 | - | -------------- | ----------- | ------------ | -------- | -------- | - | strategyreport | macresearch | brokerreport | industry | stock |`, +| -------------- | ----------- | ------------ | -------- | -------- | +| strategyreport | macresearch | brokerreport | industry | stock |`, }; async function handler(ctx) { diff --git a/lib/routes/ecust/jwc/notice.ts b/lib/routes/ecust/jwc/notice.ts index ea10962902e7..e92a211d040e 100644 --- a/lib/routes/ecust/jwc/notice.ts +++ b/lib/routes/ecust/jwc/notice.ts @@ -51,8 +51,8 @@ export const route: Route = { maintainers: ['lxl66566'], handler, description: `| 其他任意值 | mto | mttb | gi | mpt | fai | - | ---------- | ------------ | ------------------ | -------- | ------------ | ------------ | - | 全部订阅 | 教学运行管理 | 培养与教学建设管理 | 综合信息 | 实践教学管理 | 学院教务信息 |`, +| ---------- | ------------ | ------------------ | -------- | ------------ | ------------ | +| 全部订阅 | 教学运行管理 | 培养与教学建设管理 | 综合信息 | 实践教学管理 | 学院教务信息 |`, }; async function handler(ctx) { diff --git a/lib/routes/ekantipur/issue.ts b/lib/routes/ekantipur/issue.ts index 9cdb44fb5b5c..c6797094b0bf 100644 --- a/lib/routes/ekantipur/issue.ts +++ b/lib/routes/ekantipur/issue.ts @@ -28,9 +28,9 @@ export const route: Route = { handler, description: `Channels: - | समाचार | अर्थ / वाणिज्य | विचार | खेलकुद | उपत्यका | मनोरञ्जन | फोटोफिचर | फिचर | विश्व | ब्लग | - | ---- | -------- | ------- | ------ | -------- | ------------- | -------------- | ------- | ----- | ---- | - | news | business | opinion | sports | national | entertainment | photo\_feature | feature | world | blog |`, +| समाचार | अर्थ / वाणिज्य | विचार | खेलकुद | उपत्यका | मनोरञ्जन | फोटोफिचर | फिचर | विश्व | ब्लग | +| ---- | -------- | ------- | ------ | -------- | ------------- | -------------- | ------- | ----- | ---- | +| news | business | opinion | sports | national | entertainment | photo\_feature | feature | world | blog |`, }; async function handler(ctx) { diff --git a/lib/routes/eleduck/posts.ts b/lib/routes/eleduck/posts.ts index 9f4f36fd8353..df1d94c3c8a0 100644 --- a/lib/routes/eleduck/posts.ts +++ b/lib/routes/eleduck/posts.ts @@ -33,23 +33,23 @@ export const route: Route = { maintainers: ['running-grass'], handler, description: `| id | 分类 | - | -- | -------- | - | 0 | 全部 | - | 1 | 讨论 | - | 2 | 分享 | - | 3 | 露个脸 | - | 4 | 访谈故事 | - | 5 | 招聘 | - | 10 | 海外移民 | - | 12 | 英语 | - | 14 | 电鸭官方 | - | 15 | 独立产品 | - | 17 | 闲话开源 | - | 19 | Web3 | - | 21 | 设计 | - | 22 | 人才库 | - | 23 | Upwork | - | 24 | 经验课 |`, +| -- | -------- | +| 0 | 全部 | +| 1 | 讨论 | +| 2 | 分享 | +| 3 | 露个脸 | +| 4 | 访谈故事 | +| 5 | 招聘 | +| 10 | 海外移民 | +| 12 | 英语 | +| 14 | 电鸭官方 | +| 15 | 独立产品 | +| 17 | 闲话开源 | +| 19 | Web3 | +| 21 | 设计 | +| 22 | 人才库 | +| 23 | Upwork | +| 24 | 经验课 |`, }; async function handler(ctx) { diff --git a/lib/routes/eprice/rss.ts b/lib/routes/eprice/rss.ts index 8a540cb3af0e..8a92673ca33b 100644 --- a/lib/routes/eprice/rss.ts +++ b/lib/routes/eprice/rss.ts @@ -30,9 +30,9 @@ export const route: Route = { handler, description: `地区: - | hk | tw | - | ---- | ---- | - | 香港 | 台湾 |`, +| hk | tw | +| ---- | ---- | +| 香港 | 台湾 |`, }; async function handler(ctx) { diff --git a/lib/routes/famitsu/category.ts b/lib/routes/famitsu/category.ts index 20970ce31b23..2d16f32d4e78 100644 --- a/lib/routes/famitsu/category.ts +++ b/lib/routes/famitsu/category.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 新着 | Switch | PS5 | PS4 | PC ゲーム | ニュース | 動画 | 特集・企画記事 | インタビュー | 取材・リポート | レビュー | インディーゲーム | - | ----------- | ------ | --- | --- | --------- | -------- | ------ | --------------- | ------------ | -------------- | -------- | ---------------- | - | new-article | switch | ps5 | ps4 | pc-game | news | videos | special-article | interview | event-report | review | indie-game |`, +| ----------- | ------ | --- | --- | --------- | -------- | ------ | --------------- | ------------ | -------------- | -------- | ---------------- | +| new-article | switch | ps5 | ps4 | pc-game | news | videos | special-article | interview | event-report | review | indie-game |`, }; function getBuildId() { diff --git a/lib/routes/fantia/search.ts b/lib/routes/fantia/search.ts index 79db7f755d5d..70f49e0bc407 100644 --- a/lib/routes/fantia/search.ts +++ b/lib/routes/fantia/search.ts @@ -92,53 +92,53 @@ export const route: Route = { handler, description: `Type - | クリエイター | 投稿 | 商品 | コミッション | - | ------------ | ----- | -------- | ------------ | - | fanclubs | posts | products | commissions | +| クリエイター | 投稿 | 商品 | コミッション | +| ------------ | ----- | -------- | ------------ | +| fanclubs | posts | products | commissions | Category - | 分类 | 分类名 | - | ---------------------- | ---------- | - | イラスト | illust | - | 漫画 | comic | - | コスプレ | cosplay | - | YouTuber・配信者 | youtuber | - | Vtuber | vtuber | - | 音声作品・ASMR | voice | - | 声優・歌い手 | voiceactor | - | アイドル | idol | - | アニメ・映像・写真 | anime | - | 3D | 3d | - | ゲーム制作 | game | - | 音楽 | music | - | 小説 | novel | - | ドール | doll | - | アート・デザイン | art | - | プログラム | program | - | 創作・ハンドメイド | handmade | - | 歴史・評論・情報 | history | - | 鉄道・旅行・ミリタリー | railroad | - | ショップ | shop | - | その他 | other | +| 分类 | 分类名 | +| ---------------------- | ---------- | +| イラスト | illust | +| 漫画 | comic | +| コスプレ | cosplay | +| YouTuber・配信者 | youtuber | +| Vtuber | vtuber | +| 音声作品・ASMR | voice | +| 声優・歌い手 | voiceactor | +| アイドル | idol | +| アニメ・映像・写真 | anime | +| 3D | 3d | +| ゲーム制作 | game | +| 音楽 | music | +| 小説 | novel | +| ドール | doll | +| アート・デザイン | art | +| プログラム | program | +| 創作・ハンドメイド | handmade | +| 歴史・評論・情報 | history | +| 鉄道・旅行・ミリタリー | railroad | +| ショップ | shop | +| その他 | other | Ranking period - | デイリー | ウィークリー | マンスリー | 全期間 | - | -------- | ------------ | ---------- | ------ | - | daily | weekly | monthly | all | +| デイリー | ウィークリー | マンスリー | 全期間 | +| -------- | ------------ | ---------- | ------ | +| daily | weekly | monthly | all | Sorting - | 更新の新しい順 | 更新の古い順 | 投稿の新しい順 | 投稿の古い順 | お気に入り数順 | - | -------------- | ------------ | -------------- | ------------ | -------------- | - | updater | update\_old | newer | create\_old | popular | +| 更新の新しい順 | 更新の古い順 | 投稿の新しい順 | 投稿の古い順 | お気に入り数順 | +| -------------- | ------------ | -------------- | ------------ | -------------- | +| updater | update\_old | newer | create\_old | popular | Rating - | すべて | 一般のみ | R18 のみ | - | ------ | -------- | -------- | - | all | general | adult |`, +| すべて | 一般のみ | R18 のみ | +| ------ | -------- | -------- | +| all | general | adult |`, }; async function handler(ctx) { diff --git a/lib/routes/fashionnetwork/index.ts b/lib/routes/fashionnetwork/index.ts index 2b4c88337710..628240113fc0 100644 --- a/lib/routes/fashionnetwork/index.ts +++ b/lib/routes/fashionnetwork/index.ts @@ -117,16 +117,16 @@ export const route: Route = { 若订阅 [独家新闻](https://fashionnetwork.cn),网址为 \`https://fashionnetwork.cn/lists/13.html\`。截取 \`https://fashionnetwork.cn/\` 到末尾 \`.html\` 的部分 \`13\` 作为参数填入,此时路由为 [\`/fashionnetwork/cn/lists/13\`](https://rsshub.app/fashionnetwork/cn/lists/13)。 ::: - | 分类 | ID | - | ---------------------------------------------- | --------------------------------------------------- | - | [独家](https://fashionnetwork.cn/lists/13) | [13](https://rsshub.app/fashionnetwork/cn/lists/13) | - | [商业](https://fashionnetwork.cn/lists/1) | [1](https://rsshub.app/fashionnetwork/cn/lists/1) | - | [人物](https://fashionnetwork.cn/lists/8) | [8](https://rsshub.app/fashionnetwork/cn/lists/8) | - | [设计](https://fashionnetwork.cn/lists/3) | [3](https://rsshub.app/fashionnetwork/cn/lists/3) | - | [产业](https://fashionnetwork.cn/lists/5) | [5](https://rsshub.app/fashionnetwork/cn/lists/5) | - | [创新研究](https://fashionnetwork.cn/lists/6) | [6](https://rsshub.app/fashionnetwork/cn/lists/6) | - | [人事变动](https://fashionnetwork.cn/lists/12) | [12](https://rsshub.app/fashionnetwork/cn/lists/12) | - | [新闻资讯](https://fashionnetwork.cn/lists/11) | [11](https://rsshub.app/fashionnetwork/cn/lists/11) | +| 分类 | ID | +| ---------------------------------------------- | --------------------------------------------------- | +| [独家](https://fashionnetwork.cn/lists/13) | [13](https://rsshub.app/fashionnetwork/cn/lists/13) | +| [商业](https://fashionnetwork.cn/lists/1) | [1](https://rsshub.app/fashionnetwork/cn/lists/1) | +| [人物](https://fashionnetwork.cn/lists/8) | [8](https://rsshub.app/fashionnetwork/cn/lists/8) | +| [设计](https://fashionnetwork.cn/lists/3) | [3](https://rsshub.app/fashionnetwork/cn/lists/3) | +| [产业](https://fashionnetwork.cn/lists/5) | [5](https://rsshub.app/fashionnetwork/cn/lists/5) | +| [创新研究](https://fashionnetwork.cn/lists/6) | [6](https://rsshub.app/fashionnetwork/cn/lists/6) | +| [人事变动](https://fashionnetwork.cn/lists/12) | [12](https://rsshub.app/fashionnetwork/cn/lists/12) | +| [新闻资讯](https://fashionnetwork.cn/lists/11) | [11](https://rsshub.app/fashionnetwork/cn/lists/11) | `, categories: ['new-media'], diff --git a/lib/routes/feng/forum.ts b/lib/routes/feng/forum.ts index 946e9f0b587f..de49b4e8dc13 100644 --- a/lib/routes/feng/forum.ts +++ b/lib/routes/feng/forum.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 最新回复 | 最新发布 | 热门 | 精华 | - | -------- | -------- | ---- | ------- | - | newest | all | hot | essence |`, +| -------- | -------- | ---- | ------- | +| newest | all | hot | essence |`, }; async function handler(ctx) { diff --git a/lib/routes/ff14/ff14-global.ts b/lib/routes/ff14/ff14-global.ts index 3ffb4561ab72..d0a2122b6aa8 100644 --- a/lib/routes/ff14/ff14-global.ts +++ b/lib/routes/ff14/ff14-global.ts @@ -27,14 +27,14 @@ export const route: Route = { handler, description: `Region - | North Ameria | Europe | France | Germany | Japan | - | ------------ | ------ | ------ | ------- | ----- | - | na | eu | fr | de | jp | +| North Ameria | Europe | France | Germany | Japan | +| ------------ | ------ | ------ | ------- | ----- | +| na | eu | fr | de | jp | Category - | all | topics | notices | maintenance | updates | status | developers | - | --- | ------ | ------- | ----------- | ------- | ------ | ---------- |`, +| all | topics | notices | maintenance | updates | status | developers | +| --- | ------ | ------- | ----------- | ------- | ------ | ---------- |`, }; async function handler(ctx) { diff --git a/lib/routes/ff14/ff14-zh.ts b/lib/routes/ff14/ff14-zh.ts index d6b34786e28b..f1f29c2a8f43 100644 --- a/lib/routes/ff14/ff14-zh.ts +++ b/lib/routes/ff14/ff14-zh.ts @@ -32,8 +32,8 @@ export const route: Route = { handler, url: 'ff.web.sdo.com/web8/index.html', description: `| 新闻 | 公告 | 活动 | 广告 | 所有 | - | ---- | -------- | ------ | --------- | ---- | - | news | announce | events | advertise | all |`, +| ---- | -------- | ------ | --------- | ---- | +| news | announce | events | advertise | all |`, }; async function handler(ctx) { diff --git a/lib/routes/finology/category.ts b/lib/routes/finology/category.ts index b6f5b622bd78..5f913d244156 100644 --- a/lib/routes/finology/category.ts +++ b/lib/routes/finology/category.ts @@ -17,23 +17,23 @@ export const route: Route = { maintainers: ['Rjnishant530'], handler, description: `::: info Category - | Category | Link | - | --------------------- | ------------------ | - | **Business** | business | - | Big Shots | entrepreneurship | - | Startups | startups-india | - | Brand Games | success-stories | - | Juicy Scams | juicy-scams | - | **Finance** | finance | - | Macro Moves | economy | - | News Platter | market-news | - | Tax Club | tax | - | Your Money | your-money | - | **Invest** | investing | - | Stock Market | stock-market | - | Financial Ratios | stock-ratios | - | Investor's Psychology | behavioral-finance | - | Mutual Funds | mutual-fund | +| Category | Link | +| --------------------- | ------------------ | +| **Business** | business | +| Big Shots | entrepreneurship | +| Startups | startups-india | +| Brand Games | success-stories | +| Juicy Scams | juicy-scams | +| **Finance** | finance | +| Macro Moves | economy | +| News Platter | market-news | +| Tax Club | tax | +| Your Money | your-money | +| **Invest** | investing | +| Stock Market | stock-market | +| Financial Ratios | stock-ratios | +| Investor's Psychology | behavioral-finance | +| Mutual Funds | mutual-fund | :::`, }; diff --git a/lib/routes/finology/tag.ts b/lib/routes/finology/tag.ts index 49c23aad8816..b12859f6afc3 100644 --- a/lib/routes/finology/tag.ts +++ b/lib/routes/finology/tag.ts @@ -17,36 +17,36 @@ export const route: Route = { handler, url: 'insider.finology.in/tag', description: `:::note Topic - | Topic | Link | - | ------------------------ | ------------------------ | - | Investment Decisions | investment-decisions | - | Investing 101 | investing-101 | - | Stock Markets | stock-markets | - | business news india | business-news-india | - | Company Analysis | company-analysis | - | Business and brand tales | business-and-brand-tales | - | Featured | featured | - | Fundamental Analysis | fundamental-analysis | - | Business Story | business-story | - | All Biz | all-biz | - | Stock Analysis | stock-analysis | - | Automobile Industry | automobile-industry | - | Indian Economy | indian-economy | - | Govt's Words | govt%27s-words | - | Behavioral Finance | behavioral-finance | - | Global Economy | global-economy | - | Startups | startups | - | GST | gst | - | Product Review | product-review | - | My Pocket | my-pocket | - | Business Games | business-games | - | Business Models | business-models | - | Indian Indices | indian-indices | - | Banking System | banking-system | - | Debt | debt | - | World News | world-news | - | Technology | technology | - | Regulatory Bodies | regulatory-bodies | +| Topic | Link | +| ------------------------ | ------------------------ | +| Investment Decisions | investment-decisions | +| Investing 101 | investing-101 | +| Stock Markets | stock-markets | +| business news india | business-news-india | +| Company Analysis | company-analysis | +| Business and brand tales | business-and-brand-tales | +| Featured | featured | +| Fundamental Analysis | fundamental-analysis | +| Business Story | business-story | +| All Biz | all-biz | +| Stock Analysis | stock-analysis | +| Automobile Industry | automobile-industry | +| Indian Economy | indian-economy | +| Govt's Words | govt%27s-words | +| Behavioral Finance | behavioral-finance | +| Global Economy | global-economy | +| Startups | startups | +| GST | gst | +| Product Review | product-review | +| My Pocket | my-pocket | +| Business Games | business-games | +| Business Models | business-models | +| Indian Indices | indian-indices | +| Banking System | banking-system | +| Debt | debt | +| World News | world-news | +| Technology | technology | +| Regulatory Bodies | regulatory-bodies | :::`, }; diff --git a/lib/routes/finviz/news.ts b/lib/routes/finviz/news.ts index 1599e6eb623f..2e58563a1fa5 100644 --- a/lib/routes/finviz/news.ts +++ b/lib/routes/finviz/news.ts @@ -39,8 +39,8 @@ export const route: Route = { handler, url: 'finviz.com/news.ashx', description: `| News | Blogs | - | ---- | ---- | - | news | blogs |`, +| ---- | ---- | +| news | blogs |`, }; async function handler(ctx) { diff --git a/lib/routes/fjksbm/index.ts b/lib/routes/fjksbm/index.ts index 97656ef746f1..1ab469dfbf98 100644 --- a/lib/routes/fjksbm/index.ts +++ b/lib/routes/fjksbm/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 已发布公告 (方案),即将开始 | 网络报名进行中 | 网络报名结束等待打印准考证 | 正在打印准考证 | 考试结束,等待发布成绩 | 已发布成绩 | 新闻动态 | 政策法规 | - | --------------------------- | -------------- | -------------------------- | -------------- | ---------------------- | ---------- | -------- | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | news | policy |`, +| --------------------------- | -------------- | -------------------------- | -------------- | ---------------------- | ---------- | -------- | -------- | +| 0 | 1 | 2 | 3 | 4 | 5 | news | policy |`, }; async function handler(ctx) { diff --git a/lib/routes/flyert/creditcard.ts b/lib/routes/flyert/creditcard.ts index b558dcd2358d..57f1415f561a 100644 --- a/lib/routes/flyert/creditcard.ts +++ b/lib/routes/flyert/creditcard.ts @@ -31,26 +31,26 @@ export const route: Route = { handler, url: 'flyert.com/', description: `| 信用卡模块 | bank | - | ---------- | ------------- | - | 国内信用卡 | creditcard | - | 浦发银行 | pufa | - | 招商银行 | zhaoshang | - | 中信银行 | zhongxin | - | 交通银行 | jiaotong | - | 中国银行 | zhonghang | - | 工商银行 | gongshang | - | 广发银行 | guangfa | - | 农业银行 | nongye | - | 建设银行 | jianshe | - | 汇丰银行 | huifeng | - | 民生银行 | mingsheng | - | 兴业银行 | xingye | - | 花旗银行 | huaqi | - | 上海银行 | shanghai | - | 无卡支付 | wuka | - | 投资理财 | 137 | - | 网站权益汇 | 145 | - | 境外信用卡 | intcreditcard |`, +| ---------- | ------------- | +| 国内信用卡 | creditcard | +| 浦发银行 | pufa | +| 招商银行 | zhaoshang | +| 中信银行 | zhongxin | +| 交通银行 | jiaotong | +| 中国银行 | zhonghang | +| 工商银行 | gongshang | +| 广发银行 | guangfa | +| 农业银行 | nongye | +| 建设银行 | jianshe | +| 汇丰银行 | huifeng | +| 民生银行 | mingsheng | +| 兴业银行 | xingye | +| 花旗银行 | huaqi | +| 上海银行 | shanghai | +| 无卡支付 | wuka | +| 投资理财 | 137 | +| 网站权益汇 | 145 | +| 境外信用卡 | intcreditcard |`, }; async function handler(ctx) { diff --git a/lib/routes/focustaiwan/index.ts b/lib/routes/focustaiwan/index.ts index bd8271bfa77e..2162d09b0ce2 100644 --- a/lib/routes/focustaiwan/index.ts +++ b/lib/routes/focustaiwan/index.ts @@ -27,12 +27,12 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| Latest | Editor's Picks | Photos of the Day | - | ------ | -------------- | ----------------- | - | news | editorspicks | photos | +| ------ | -------------- | ----------------- | +| news | editorspicks | photos | - | Politics | Cross-strait | Business | Society | Science & Tech | Culture | Sports | - | -------- | ------------ | -------- | ------- | -------------- | ------- | ------ | - | politics | cross-strait | business | society | science & tech | culture | sports |`, +| Politics | Cross-strait | Business | Society | Science & Tech | Culture | Sports | +| -------- | ------------ | -------- | ------- | -------------- | ------- | ------ | +| politics | cross-strait | business | society | science & tech | culture | sports |`, }; async function handler(ctx) { diff --git a/lib/routes/followin/index.ts b/lib/routes/followin/index.ts index 6c47b8bb8928..be735a808781 100644 --- a/lib/routes/followin/index.ts +++ b/lib/routes/followin/index.ts @@ -48,15 +48,15 @@ export const route: Route = { handler, description: `Category ID - | For You | Market | Meme | BRC20 | NFT | Thread | In-depth | Tutorials | Videos | - | ------- | ------ | ---- | ----- | --- | ------ | -------- | --------- | ------ | - | 1 | 9 | 13 | 14 | 3 | 5 | 6 | 8 | 11 | +| For You | Market | Meme | BRC20 | NFT | Thread | In-depth | Tutorials | Videos | +| ------- | ------ | ---- | ----- | --- | ------ | -------- | --------- | ------ | +| 1 | 9 | 13 | 14 | 3 | 5 | 6 | 8 | 11 | Language - | English | 简体中文 | 繁體中文 | Tiếng Việt | - | ------- | -------- | -------- | ---------- | - | en | zh-Hans | zh-Hant | vi |`, +| English | 简体中文 | 繁體中文 | Tiếng Việt | +| ------- | -------- | -------- | ---------- | +| en | zh-Hans | zh-Hant | vi |`, }; async function handler(ctx) { diff --git a/lib/routes/fortnite/news.ts b/lib/routes/fortnite/news.ts index 826ff2b2f4c1..009649e660a4 100644 --- a/lib/routes/fortnite/news.ts +++ b/lib/routes/fortnite/news.ts @@ -22,9 +22,9 @@ export const route: Route = { handler, description: `- \`options.lang\`, optional, language, eg. \`/fortnite/news/lang=en-US\`, common languages are listed below, more languages are available one the [official website](https://www.fortnite.com/news) - | English (default) | Spanish | Japanese | French | Korean | Polish | - | ----------------- | ------- | -------- | ------ | ------ | ------ | - | en-US | es-ES | ja | fr | ko | pl |`, +| English (default) | Spanish | Japanese | French | Korean | Polish | +| ----------------- | ------- | -------- | ------ | ------ | ------ | +| en-US | es-ES | ja | fr | ko | pl |`, }; async function handler(ctx) { diff --git a/lib/routes/fortunechina/index.ts b/lib/routes/fortunechina/index.ts index 6bbbc011527c..3e69a1d12e8b 100644 --- a/lib/routes/fortunechina/index.ts +++ b/lib/routes/fortunechina/index.ts @@ -29,8 +29,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 商业 | 领导力 | 科技 | 研究 | - | ------- | --------- | ---- | ------ | - | shangye | lindgaoli | keji | report |`, +| ------- | --------- | ---- | ------ | +| shangye | lindgaoli | keji | report |`, }; async function handler(ctx) { diff --git a/lib/routes/fx-markets/channel.ts b/lib/routes/fx-markets/channel.ts index d583a6dfb1fe..a36c6258d966 100644 --- a/lib/routes/fx-markets/channel.ts +++ b/lib/routes/fx-markets/channel.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: [], handler, description: `| Trading | Infrastructure | Tech and Data | Regulation | - | ------- | -------------- | ------------- | ---------- | - | trading | infrastructure | tech-and-data | regulation |`, +| ------- | -------------- | ------------- | ---------- | +| trading | infrastructure | tech-and-data | regulation |`, }; async function handler(ctx) { diff --git a/lib/routes/fxiaoke/crm.ts b/lib/routes/fxiaoke/crm.ts index 6339bca0677f..66f42a450810 100644 --- a/lib/routes/fxiaoke/crm.ts +++ b/lib/routes/fxiaoke/crm.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['akynazh'], handler, description: `| 全部文章 | 文章干货 | CRM 知识 | 纷享动态 | 签约喜报 | - | -------- | -------- | -------- | --------------- | --------- | - | news | blog | articles | about-influence | customers |`, +| -------- | -------- | -------- | --------------- | --------- | +| news | blog | articles | about-influence | customers |`, }; async function handler(ctx) { diff --git a/lib/routes/gamer520/index.ts b/lib/routes/gamer520/index.ts index 36ec51d6a309..b49d5fe7e0a6 100644 --- a/lib/routes/gamer520/index.ts +++ b/lib/routes/gamer520/index.ts @@ -21,9 +21,9 @@ export const route: Route = { url: 'www.gamer520.com/', description: `分类 - | 所有 | Switch 游戏下载 | 金手指 | 3A 巨作 | switch 主题 | PC 游戏 | - | ---- | --------------- | ---------- | ------- | ----------- | ------- | - | all | switchyouxi | jinshouzhi | 3ajuzuo | zhuti | pcgame |`, +| 所有 | Switch 游戏下载 | 金手指 | 3A 巨作 | switch 主题 | PC 游戏 | +| ---- | --------------- | ---------- | ------- | ----------- | ------- | +| all | switchyouxi | jinshouzhi | 3ajuzuo | zhuti | pcgame |`, }; interface Post { diff --git a/lib/routes/gamersecret/index.ts b/lib/routes/gamersecret/index.ts index 1e132ca85f63..b871566eb671 100644 --- a/lib/routes/gamersecret/index.ts +++ b/lib/routes/gamersecret/index.ts @@ -27,26 +27,26 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| Latest News | PC | Playstation | Nintendo | Xbox | Moblie | - | ----------- | -- | ----------- | -------- | ---- | ------ | - | latest-news | pc | playstation | nintendo | xbox | moblie | +| ----------- | -- | ----------- | -------- | ---- | ------ | +| latest-news | pc | playstation | nintendo | xbox | moblie | Or - | GENERAL | GENERAL EN | MOBILE | MOBILE EN | - | ---------------- | ------------------ | --------------- | ----------------- | - | category/general | category/generalen | category/mobile | category/mobileen | +| GENERAL | GENERAL EN | MOBILE | MOBILE EN | +| ---------------- | ------------------ | --------------- | ----------------- | +| category/general | category/generalen | category/mobile | category/mobileen | - | NINTENDO | NINTENDO EN | PC | PC EN | - | ----------------- | ------------------- | ----------- | ------------- | - | category/nintendo | category/nintendoen | category/pc | category/pcen | +| NINTENDO | NINTENDO EN | PC | PC EN | +| ----------------- | ------------------- | ----------- | ------------- | +| category/nintendo | category/nintendoen | category/pc | category/pcen | - | PLAYSTATION | PLAYSTATION EN | REVIEWS | - | -------------------- | ---------------------- | ---------------- | - | category/playstation | category/playstationen | category/reviews | +| PLAYSTATION | PLAYSTATION EN | REVIEWS | +| -------------------- | ---------------------- | ---------------- | +| category/playstation | category/playstationen | category/reviews | - | XBOX | XBOX EN | - | ------------- | --------------- | - | category/xbox | category/xboxen |`, +| XBOX | XBOX EN | +| ------------- | --------------- | +| category/xbox | category/xboxen |`, }; async function handler(ctx) { diff --git a/lib/routes/gcores/category.ts b/lib/routes/gcores/category.ts index 064ae9d7f0cd..1cdd9eec5387 100644 --- a/lib/routes/gcores/category.ts +++ b/lib/routes/gcores/category.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['MoguCloud', 'StevenRCE0'], handler, description: `| 资讯 | 视频 | 电台 | 文章 | - | ---- | ------ | ------ | -------- | - | news | videos | radios | articles |`, +| ---- | ------ | ------ | -------- | +| news | videos | radios | articles |`, }; async function handler(ctx) { diff --git a/lib/routes/gdsrx/index.ts b/lib/routes/gdsrx/index.ts index 0e0d8c2f992d..abbb9e6036f8 100644 --- a/lib/routes/gdsrx/index.ts +++ b/lib/routes/gdsrx/index.ts @@ -21,14 +21,14 @@ export const route: Route = { maintainers: [], handler, description: `| 栏目名称 | 栏目 id | - | ----------------- | ------- | - | 法规文库 | 10 | - | 法规资讯 | 12 | - | 专家供稿 | 13 | - | 协会动态 会员动态 | 20 | - | 协会动态 | 37 | - | 协会通知公告 | 38 | - | 会员动态 | 39 |`, +| ----------------- | ------- | +| 法规文库 | 10 | +| 法规资讯 | 12 | +| 专家供稿 | 13 | +| 协会动态 会员动态 | 20 | +| 协会动态 | 37 | +| 协会通知公告 | 38 | +| 会员动态 | 39 |`, }; async function handler(ctx) { diff --git a/lib/routes/geekpark/index.ts b/lib/routes/geekpark/index.ts index d0807312a80e..99167d881e12 100644 --- a/lib/routes/geekpark/index.ts +++ b/lib/routes/geekpark/index.ts @@ -140,16 +140,16 @@ export const route: Route = { 若订阅 [综合报道](https://www.geekpark.net/column/179),网址为 \`https://www.geekpark.net/column/179\`。截取 \`https://www.geekpark.net/column/\` 到末尾的部分 \`179\` 作为参数填入,此时路由为 [\`/geekpark/179\`](https://rsshub.app/geekpark/179)。 ::: - | 栏目 | ID | - | ------------------------------------------------------------ | -------------------------------------- | - | [综合报道](https://www.geekpark.net/column/179) | [179](https://rsshub.app/geekpark/179) | - | [AI新浪潮观察](https://www.geekpark.net/column/304) | [304](https://rsshub.app/geekpark/304) | - | [新造车观察](https://www.geekpark.net/column/305) | [305](https://rsshub.app/geekpark/305) | - | [财报解读](https://www.geekpark.net/column/271) | [271](https://rsshub.app/geekpark/271) | - | [底稿对话CEO系列](https://www.geekpark.net/column/308) | [308](https://rsshub.app/geekpark/308) | - | [Geek Insight 特稿系列](https://www.geekpark.net/column/306) | [306](https://rsshub.app/geekpark/306) | - | [心科技](https://www.geekpark.net/column/307) | [307](https://rsshub.app/geekpark/307) | - | [行业资讯](https://www.geekpark.net/column/2) | [2](https://rsshub.app/geekpark/2) | +| 栏目 | ID | +| ------------------------------------------------------------ | -------------------------------------- | +| [综合报道](https://www.geekpark.net/column/179) | [179](https://rsshub.app/geekpark/179) | +| [AI新浪潮观察](https://www.geekpark.net/column/304) | [304](https://rsshub.app/geekpark/304) | +| [新造车观察](https://www.geekpark.net/column/305) | [305](https://rsshub.app/geekpark/305) | +| [财报解读](https://www.geekpark.net/column/271) | [271](https://rsshub.app/geekpark/271) | +| [底稿对话CEO系列](https://www.geekpark.net/column/308) | [308](https://rsshub.app/geekpark/308) | +| [Geek Insight 特稿系列](https://www.geekpark.net/column/306) | [306](https://rsshub.app/geekpark/306) | +| [心科技](https://www.geekpark.net/column/307) | [307](https://rsshub.app/geekpark/307) | +| [行业资讯](https://www.geekpark.net/column/2) | [2](https://rsshub.app/geekpark/2) | `, categories: ['new-media', 'popular'], diff --git a/lib/routes/gelonghui/home.ts b/lib/routes/gelonghui/home.ts index 3b9be27c16c4..74bdcfef99f9 100644 --- a/lib/routes/gelonghui/home.ts +++ b/lib/routes/gelonghui/home.ts @@ -33,8 +33,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 推荐 | 股票 | 基金 | 新股 | 研报 | - | --------------- | ----- | ---- | ---------- | -------- | - | web\_home\_page | stock | fund | new\_stock | research |`, +| --------------- | ----- | ---- | ---------- | -------- | +| web\_home\_page | stock | fund | new\_stock | research |`, }; async function handler(ctx) { diff --git a/lib/routes/gf-cn/news.ts b/lib/routes/gf-cn/news.ts index 179077bf15b2..1544b6030152 100644 --- a/lib/routes/gf-cn/news.ts +++ b/lib/routes/gf-cn/news.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 新闻 | 公告 | - | ---- | ---- | - | 1 | 3 |`, +| ---- | ---- | +| 1 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/github/search.ts b/lib/routes/github/search.ts index 480a6a39d0db..df3c38f3118c 100644 --- a/lib/routes/github/search.ts +++ b/lib/routes/github/search.ts @@ -21,11 +21,11 @@ export const route: Route = { maintainers: ['LogicJake'], handler, description: `| Sort options | sort | - | ---------------- | --------- | - | Best match | bestmatch | - | Most stars | stars | - | Most forks | forks | - | Recently updated | updated |`, +| ---------------- | --------- | +| Best match | bestmatch | +| Most stars | stars | +| Most forks | forks | +| Recently updated | updated |`, }; async function handler(ctx) { diff --git a/lib/routes/github/topic.ts b/lib/routes/github/topic.ts index f700684b9677..811184ee3370 100644 --- a/lib/routes/github/topic.ts +++ b/lib/routes/github/topic.ts @@ -26,10 +26,10 @@ export const route: Route = { handler, url: 'github.com/topics', description: `| Parameter | Description | Values | - | --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | - | \`l\` | Language | For instance \`php\`, which can be found in the URL of the corresponding [Topics page](https://github.com/topics/framework?l=php) | - | \`o\` | Sorting Order | \`asc\`, \`desc\` | - | \`s\` | Sorting Criteria | \`stars\`, \`forks\`, \`updated\` | +| --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| \`l\` | Language | For instance \`php\`, which can be found in the URL of the corresponding [Topics page](https://github.com/topics/framework?l=php) | +| \`o\` | Sorting Order | \`asc\`, \`desc\` | +| \`s\` | Sorting Criteria | \`stars\`, \`forks\`, \`updated\` | For instance, the \`/github/topics/framework/l=php&o=desc&s=stars\` route will generate the RSS feed corresponding to this [page](https://github.com/topics/framework?l=php\&o=desc\&s=stars).`, }; diff --git a/lib/routes/google/fonts.ts b/lib/routes/google/fonts.ts index f82554efe401..e678005fb318 100644 --- a/lib/routes/google/fonts.ts +++ b/lib/routes/google/fonts.ts @@ -39,8 +39,8 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| Newest | Trending | Most popular | Name | Number of styles | - | :----: | :------: | :----------: | :---: | :--------------: | - | date | trending | popularity | alpha | style | +| :----: | :------: | :----------: | :---: | :--------------: | +| date | trending | popularity | alpha | style | ::: warning This route requires API key, therefore it's only available when self-hosting, refer to the [Deploy Guide](https://docs.rsshub.app/deploy/config#route-specific-configurations) for route-specific configurations. diff --git a/lib/routes/gov/ah/kjt.ts b/lib/routes/gov/ah/kjt.ts index c2d3e8dcf896..625fd9f7b584 100644 --- a/lib/routes/gov/ah/kjt.ts +++ b/lib/routes/gov/ah/kjt.ts @@ -98,31 +98,31 @@ export const route: Route = { 若订阅 [通知公告](https://kjt.ah.gov.cn/kjzx/tzgg/),网址为 \`https://kjt.ah.gov.cn/kjzx/tzgg/\`。截取 \`https://kjt.ah.gov.cn/\` 到末尾 \`/\` 的部分 \`\` 作为参数填入,此时路由为 [\`/gov/ah/kjt/kjzx/tzgg\`](https://rsshub.app/gov/ah/kjt/kjzx/tzgg)。 ::: - #### [科技资讯](https://kjt.ah.gov.cn/kjzx/index.html) +#### [科技资讯](https://kjt.ah.gov.cn/kjzx/index.html) - | [通知公告](https://kjt.ah.gov.cn/kjzx/tzgg/index.html) | [工作动态](https://kjt.ah.gov.cn/kjzx/gzdt/index.html) | [基层科技](https://kjt.ah.gov.cn/kjzx/jckj/index.html) | [媒体聚焦](https://kjt.ah.gov.cn/kjzx/mtjj/index.html) | - | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | - | [kjzx/tzgg](https://rsshub.app/gov/ah/kjt/kjzx/tzgg) | [kjzx/gzdt](https://rsshub.app/gov/ah/kjt/kjzx/gzdt) | [kjzx/jckj](https://rsshub.app/gov/ah/kjt/kjzx/jckj) | [kjzx/mtjj](https://rsshub.app/gov/ah/kjt/kjzx/mtjj) | +| [通知公告](https://kjt.ah.gov.cn/kjzx/tzgg/index.html) | [工作动态](https://kjt.ah.gov.cn/kjzx/gzdt/index.html) | [基层科技](https://kjt.ah.gov.cn/kjzx/jckj/index.html) | [媒体聚焦](https://kjt.ah.gov.cn/kjzx/mtjj/index.html) | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| [kjzx/tzgg](https://rsshub.app/gov/ah/kjt/kjzx/tzgg) | [kjzx/gzdt](https://rsshub.app/gov/ah/kjt/kjzx/gzdt) | [kjzx/jckj](https://rsshub.app/gov/ah/kjt/kjzx/jckj) | [kjzx/mtjj](https://rsshub.app/gov/ah/kjt/kjzx/mtjj) | - | [重要转载](https://kjt.ah.gov.cn/kjzx/zyzz/index.html) | [图片视频](https://kjt.ah.gov.cn/kjzx/tpsp/index.html) | - | ------------------------------------------------------ | ------------------------------------------------------ | - | [kjzx/zyzz](https://rsshub.app/gov/ah/kjt/kjzx/zyzz) | [kjzx/tpsp](https://rsshub.app/gov/ah/kjt/kjzx/tpsp) | +| [重要转载](https://kjt.ah.gov.cn/kjzx/zyzz/index.html) | [图片视频](https://kjt.ah.gov.cn/kjzx/tpsp/index.html) | +| ------------------------------------------------------ | ------------------------------------------------------ | +| [kjzx/zyzz](https://rsshub.app/gov/ah/kjt/kjzx/zyzz) | [kjzx/tpsp](https://rsshub.app/gov/ah/kjt/kjzx/tpsp) | - #### [科技统计](https://kjt.ah.gov.cn/kjzy/kjtj/index.html) +#### [科技统计](https://kjt.ah.gov.cn/kjzy/kjtj/index.html) - | [技术市场交易](https://kjt.ah.gov.cn/kjzy/kjtj/jsscjy/index.html) | [科技成果公报](https://kjt.ah.gov.cn/kjzy/kjtj/kjcggb/index.html) | [孵化载体发展](https://kjt.ah.gov.cn/kjzy/kjtj/cyfhfz/index.html) | - | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | - | [kjzy/kjtj/jsscjy](https://rsshub.app/gov/ah/kjt/kjzy/kjtj/jsscjy) | [kjzy/kjtj/kjcggb](https://rsshub.app/gov/ah/kjt/kjzy/kjtj/kjcggb) | [kjzy/kjtj/cyfhfz](https://rsshub.app/gov/ah/kjt/kjzy/kjtj/cyfhfz) | +| [技术市场交易](https://kjt.ah.gov.cn/kjzy/kjtj/jsscjy/index.html) | [科技成果公报](https://kjt.ah.gov.cn/kjzy/kjtj/kjcggb/index.html) | [孵化载体发展](https://kjt.ah.gov.cn/kjzy/kjtj/cyfhfz/index.html) | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| [kjzy/kjtj/jsscjy](https://rsshub.app/gov/ah/kjt/kjzy/kjtj/jsscjy) | [kjzy/kjtj/kjcggb](https://rsshub.app/gov/ah/kjt/kjzy/kjtj/kjcggb) | [kjzy/kjtj/cyfhfz](https://rsshub.app/gov/ah/kjt/kjzy/kjtj/cyfhfz) | - #### [科技数据](https://kjt.ah.gov.cn/kjzy/kjsj/index.html) +#### [科技数据](https://kjt.ah.gov.cn/kjzy/kjsj/index.html) - | [创新企业](https://kjt.ah.gov.cn/kjzy/kjsj/cxqy/index.html) | [创新项目](https://kjt.ah.gov.cn/kjzy/kjsj/cxxm/index.html) | [创新成果](https://kjt.ah.gov.cn/kjzy/kjsj/cxcg/index.html) | [转化基金入库项目](https://kjt.ah.gov.cn/kjzy/kjsj/zhjjrkxm/index.html) | - | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------- | - | [kjzy/kjsj/cxqy](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxqy) | [kjzy/kjsj/cxxm](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxxm) | [kjzy/kjsj/cxcg](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxcg) | [kjzy/kjsj/zhjjrkxm](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/zhjjrkxm) | +| [创新企业](https://kjt.ah.gov.cn/kjzy/kjsj/cxqy/index.html) | [创新项目](https://kjt.ah.gov.cn/kjzy/kjsj/cxxm/index.html) | [创新成果](https://kjt.ah.gov.cn/kjzy/kjsj/cxcg/index.html) | [转化基金入库项目](https://kjt.ah.gov.cn/kjzy/kjsj/zhjjrkxm/index.html) | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------- | +| [kjzy/kjsj/cxqy](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxqy) | [kjzy/kjsj/cxxm](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxxm) | [kjzy/kjsj/cxcg](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxcg) | [kjzy/kjsj/zhjjrkxm](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/zhjjrkxm) | - | [创新平台](https://kjt.ah.gov.cn/kjzy/kjsj/cxpt/index.html) | [创新园区](https://kjt.ah.gov.cn/kjzy/kjsj/cxyq/index.html) | [创新许可](https://kjt.ah.gov.cn/kjzy/kjsj/cxxk/index.html) | - | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | - | [kjzy/kjsj/cxpt](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxpt) | [kjzy/kjsj/cxyq](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxyq) | [kjzy/kjsj/cxxk](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxxk) | +| [创新平台](https://kjt.ah.gov.cn/kjzy/kjsj/cxpt/index.html) | [创新园区](https://kjt.ah.gov.cn/kjzy/kjsj/cxyq/index.html) | [创新许可](https://kjt.ah.gov.cn/kjzy/kjsj/cxxk/index.html) | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| [kjzy/kjsj/cxpt](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxpt) | [kjzy/kjsj/cxyq](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxyq) | [kjzy/kjsj/cxxk](https://rsshub.app/gov/ah/kjt/kjzy/kjsj/cxxk) | `, categories: ['government'], diff --git a/lib/routes/gov/caac/cjwt.ts b/lib/routes/gov/caac/cjwt.ts index fea65988ee88..9792974708d1 100644 --- a/lib/routes/gov/caac/cjwt.ts +++ b/lib/routes/gov/caac/cjwt.ts @@ -32,7 +32,7 @@ export const route: Route = { handler, url: 'caac.gov.cn/HDJL/', description: `| 机票 | 托运 | 无人机 | 体检 | 行政审批 | 投诉 | - | ---- | ---- | ------ | ---- | -------- | ---- |`, +| ---- | ---- | ------ | ---- | -------- | ---- |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/cbirc/index.ts b/lib/routes/gov/cbirc/index.ts index a10a1768be6e..d9fe2dde7f20 100644 --- a/lib/routes/gov/cbirc/index.ts +++ b/lib/routes/gov/cbirc/index.ts @@ -111,65 +111,65 @@ export const route: Route = { 若订阅 [监管动态](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemId=915&itemUrl=ItemListRightList.html),网址为 \`https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemId=915&itemUrl=ItemListRightList.html\`。截取 \`itemId\` 的值 \`915\` 作为参数填入,此时路由为 [\`/gov/cbirc/915\`](https://rsshub.app/gov/cbirc/915)。 ::: - #### [首页](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=899&itemId=971&itemUrl=ItemListRightMore.html) +#### [首页](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=899&itemId=971&itemUrl=ItemListRightMore.html) - | [弹出公告](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=971&itemId=972&itemUrl=sss) | [法律声明](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=971&itemId=4128&itemUrl=ItemListRightArticle.html) | - | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | - | [972](https://rsshub.app/gov/cbirc/972) | [4128](https://rsshub.app/gov/cbirc/4128) | +| [弹出公告](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=971&itemId=972&itemUrl=sss) | [法律声明](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=971&itemId=4128&itemUrl=ItemListRightArticle.html) | +| --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| [972](https://rsshub.app/gov/cbirc/972) | [4128](https://rsshub.app/gov/cbirc/4128) | - #### [机构概况](https://www.cbirc.gov.cn/cn/view/pages/jigougaikuang/jigougaikuang.html) +#### [机构概况](https://www.cbirc.gov.cn/cn/view/pages/jigougaikuang/jigougaikuang.html) - | [主要职责](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=901&itemUrl=ItemListRightArticle.html) | [总局领导](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=902&itemUrl=jigougaikuang/huilingdao.html) | [内设机构](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=911&itemUrl=jigougaikuang/neishejigou.html) | [直属行政机构](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=4243&itemUrl=jigougaikuang/zhishuxingzhengjigou.html) | [派出机构](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=912&itemUrl=jigougaikuang/paichujigou.html) | - | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | - | [901](https://rsshub.app/gov/cbirc/901) | [902](https://rsshub.app/gov/cbirc/902) | [911](https://rsshub.app/gov/cbirc/911) | [4243](https://rsshub.app/gov/cbirc/4243) | [912](https://rsshub.app/gov/cbirc/912) | +| [主要职责](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=901&itemUrl=ItemListRightArticle.html) | [总局领导](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=902&itemUrl=jigougaikuang/huilingdao.html) | [内设机构](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=911&itemUrl=jigougaikuang/neishejigou.html) | [直属行政机构](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=4243&itemUrl=jigougaikuang/zhishuxingzhengjigou.html) | [派出机构](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=912&itemUrl=jigougaikuang/paichujigou.html) | +| ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| [901](https://rsshub.app/gov/cbirc/901) | [902](https://rsshub.app/gov/cbirc/902) | [911](https://rsshub.app/gov/cbirc/911) | [4243](https://rsshub.app/gov/cbirc/4243) | [912](https://rsshub.app/gov/cbirc/912) | - | [联系方式](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=913&itemUrl=jigougaikuang/lianxifangshi.html) | - | -------------------------------------------------------------------------------------------------------------------------------- | - | [913](https://rsshub.app/gov/cbirc/913) | +| [联系方式](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=913&itemUrl=jigougaikuang/lianxifangshi.html) | +| -------------------------------------------------------------------------------------------------------------------------------- | +| [913](https://rsshub.app/gov/cbirc/913) | - #### [新闻资讯](https://www.cbirc.gov.cn/cn/view/pages/xinwenzixun/xinwenzixun.html) +#### [新闻资讯](https://www.cbirc.gov.cn/cn/view/pages/xinwenzixun/xinwenzixun.html) - | [监管动态](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=915&itemUrl=ItemListRightList.html) | [政策解读](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=916&itemUrl=ItemListRightMore.html) | [领导活动及讲话](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=919&itemUrl=ItemListRightList.html) | [新闻发布会及访谈](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=920&itemUrl=xinwenzixun/xinwenfabu.html) | [新闻发言人](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=921&itemUrl=xinwenzixun/xinwenfayan.html) | - | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | - | [915](https://rsshub.app/gov/cbirc/915) | [916](https://rsshub.app/gov/cbirc/916) | [919](https://rsshub.app/gov/cbirc/919) | [920](https://rsshub.app/gov/cbirc/920) | [921](https://rsshub.app/gov/cbirc/921) | +| [监管动态](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=915&itemUrl=ItemListRightList.html) | [政策解读](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=916&itemUrl=ItemListRightMore.html) | [领导活动及讲话](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=919&itemUrl=ItemListRightList.html) | [新闻发布会及访谈](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=920&itemUrl=xinwenzixun/xinwenfabu.html) | [新闻发言人](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=921&itemUrl=xinwenzixun/xinwenfayan.html) | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| [915](https://rsshub.app/gov/cbirc/915) | [916](https://rsshub.app/gov/cbirc/916) | [919](https://rsshub.app/gov/cbirc/919) | [920](https://rsshub.app/gov/cbirc/920) | [921](https://rsshub.app/gov/cbirc/921) | - #### [政务信息](https://www.cbirc.gov.cn/cn/view/pages/zhengwuxinxi/zhengwuxinxi.html) +#### [政务信息](https://www.cbirc.gov.cn/cn/view/pages/zhengwuxinxi/zhengwuxinxi.html) - | [政府信息公开](https://www.cbirc.gov.cn/cn/view/pages/zhengwuxinxi/zhengfuxinxi.html) | [公告通知](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=925&itemUrl=ItemListRightList.html) | [政策法规](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=926&itemUrl=ItemListRightMore.html) | [行政许可](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=930&itemUrl=zhengwuxinxi/xingzhengxuke.html) | [行政处罚](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=931&itemUrl=zhengwuxinxi/xingzhengchufa.html) | - | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | - | [924](https://rsshub.app/gov/cbirc/924) | [925](https://rsshub.app/gov/cbirc/925) | [926](https://rsshub.app/gov/cbirc/926) | [930](https://rsshub.app/gov/cbirc/930) | [931](https://rsshub.app/gov/cbirc/931) | +| [政府信息公开](https://www.cbirc.gov.cn/cn/view/pages/zhengwuxinxi/zhengfuxinxi.html) | [公告通知](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=925&itemUrl=ItemListRightList.html) | [政策法规](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=926&itemUrl=ItemListRightMore.html) | [行政许可](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=930&itemUrl=zhengwuxinxi/xingzhengxuke.html) | [行政处罚](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=931&itemUrl=zhengwuxinxi/xingzhengchufa.html) | +| ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| [924](https://rsshub.app/gov/cbirc/924) | [925](https://rsshub.app/gov/cbirc/925) | [926](https://rsshub.app/gov/cbirc/926) | [930](https://rsshub.app/gov/cbirc/930) | [931](https://rsshub.app/gov/cbirc/931) | - | [行政监管措施](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=932&itemUrl=ItemListRightList.html) | [人事信息](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=933&itemUrl=ItemListRightList.html) | - | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | - | [932](https://rsshub.app/gov/cbirc/932) | [933](https://rsshub.app/gov/cbirc/933) | +| [行政监管措施](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=932&itemUrl=ItemListRightList.html) | [人事信息](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=933&itemUrl=ItemListRightList.html) | +| -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| [932](https://rsshub.app/gov/cbirc/932) | [933](https://rsshub.app/gov/cbirc/933) | - #### [在线服务](https://www.cbirc.gov.cn/cn/view/pages/zaixianfuwu/zaixianfuwu.html) +#### [在线服务](https://www.cbirc.gov.cn/cn/view/pages/zaixianfuwu/zaixianfuwu.html) - | [行政许可办事服务指南](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=937&itemId=938&itemUrl=zaixianfuwu/banshifuwu.html) | [查询服务](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=937&itemId=939&itemUrl=zaixianfuwu/chaxunfuwu.html) | - | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | - | [938](https://rsshub.app/gov/cbirc/938) | [939](https://rsshub.app/gov/cbirc/939) | +| [行政许可办事服务指南](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=937&itemId=938&itemUrl=zaixianfuwu/banshifuwu.html) | [查询服务](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=937&itemId=939&itemUrl=zaixianfuwu/chaxunfuwu.html) | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| [938](https://rsshub.app/gov/cbirc/938) | [939](https://rsshub.app/gov/cbirc/939) | - #### [互动交流](https://www.cbirc.gov.cn/cn/view/pages/hudongjiaoliu/hudongjiaoliu.html) +#### [互动交流](https://www.cbirc.gov.cn/cn/view/pages/hudongjiaoliu/hudongjiaoliu.html) - | [政务咨询](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=945&itemId=946&itemUrl=tosubmenu:hudongjiaoliu/woyaozixun.html) | [征集调查](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=945&itemId=950&itemUrl=ItemListRightMore.html) | [国务院办公厅开通“国家政务服务投诉与建议”小程序](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=945&itemId=952&itemUrl=http://www.gov.cn/xinwen/2018-09/20/content_5323786.htm) | - | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | [946](https://rsshub.app/gov/cbirc/946) | [950](https://rsshub.app/gov/cbirc/950) | [952](https://rsshub.app/gov/cbirc/952) | +| [政务咨询](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=945&itemId=946&itemUrl=tosubmenu:hudongjiaoliu/woyaozixun.html) | [征集调查](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=945&itemId=950&itemUrl=ItemListRightMore.html) | [国务院办公厅开通“国家政务服务投诉与建议”小程序](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=945&itemId=952&itemUrl=http://www.gov.cn/xinwen/2018-09/20/content_5323786.htm) | +| --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [946](https://rsshub.app/gov/cbirc/946) | [950](https://rsshub.app/gov/cbirc/950) | [952](https://rsshub.app/gov/cbirc/952) | - #### [统计数据](https://www.cbirc.gov.cn/cn/view/pages/tongjishuju/tongjishuju.html) +#### [统计数据](https://www.cbirc.gov.cn/cn/view/pages/tongjishuju/tongjishuju.html) - | [统计信息](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=953&itemId=954&itemUrl=ItemListRightList.html) | [数据图表](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=953&itemId=955&itemUrl=tosubmenu:tongjishuju/zongzichan.html) | - | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | - | [954](https://rsshub.app/gov/cbirc/954) | [955](https://rsshub.app/gov/cbirc/955) | +| [统计信息](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=953&itemId=954&itemUrl=ItemListRightList.html) | [数据图表](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=953&itemId=955&itemUrl=tosubmenu:tongjishuju/zongzichan.html) | +| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| [954](https://rsshub.app/gov/cbirc/954) | [955](https://rsshub.app/gov/cbirc/955) | - #### [专题专栏](https://www.cbirc.gov.cn/cn/view/pages/zhuantizhuanlan/zhuantizhuanlan.html) +#### [专题专栏](https://www.cbirc.gov.cn/cn/view/pages/zhuantizhuanlan/zhuantizhuanlan.html) - | [推进普惠金融高质量发展](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4234&itemUrl=ItemListRightMore.html) | [防范和处置非法集资](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=963&itemUrl=ItemListRightMore.html) | [消费者保护](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4097&itemUrl=ItemListRightMore.html) | [法治宣传](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4106&itemUrl=ItemListRightMore.html) | [政府网站年度报表](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=970&itemUrl=ItemListRightList.html) | - | ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | - | [4234](https://rsshub.app/gov/cbirc/4234) | [963](https://rsshub.app/gov/cbirc/963) | [4097](https://rsshub.app/gov/cbirc/4097) | [4106](https://rsshub.app/gov/cbirc/4106) | [970](https://rsshub.app/gov/cbirc/970) | +| [推进普惠金融高质量发展](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4234&itemUrl=ItemListRightMore.html) | [防范和处置非法集资](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=963&itemUrl=ItemListRightMore.html) | [消费者保护](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4097&itemUrl=ItemListRightMore.html) | [法治宣传](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4106&itemUrl=ItemListRightMore.html) | [政府网站年度报表](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=970&itemUrl=ItemListRightList.html) | +| ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| [4234](https://rsshub.app/gov/cbirc/4234) | [963](https://rsshub.app/gov/cbirc/963) | [4097](https://rsshub.app/gov/cbirc/4097) | [4106](https://rsshub.app/gov/cbirc/4106) | [970](https://rsshub.app/gov/cbirc/970) | - | [服务民营企业](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4171&itemUrl=ItemListRightList.html) | [服务制造业发展](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4217&itemUrl=ItemListRightList.html) | [学习贯彻习近平新时代中国特色社会主义思想主题教育](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4229&itemUrl=ItemListRightMore.html) | - | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | [4171](https://rsshub.app/gov/cbirc/4171) | [4217](https://rsshub.app/gov/cbirc/4217) | [4229](https://rsshub.app/gov/cbirc/4229) | +| [服务民营企业](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4171&itemUrl=ItemListRightList.html) | [服务制造业发展](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4217&itemUrl=ItemListRightList.html) | [学习贯彻习近平新时代中国特色社会主义思想主题教育](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4229&itemUrl=ItemListRightMore.html) | +| --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [4171](https://rsshub.app/gov/cbirc/4171) | [4217](https://rsshub.app/gov/cbirc/4217) | [4229](https://rsshub.app/gov/cbirc/4229) | `, categories: ['government'], diff --git a/lib/routes/gov/chongqing/gzw.ts b/lib/routes/gov/chongqing/gzw.ts index bb7dc2bc883d..7ab0938e8d27 100644 --- a/lib/routes/gov/chongqing/gzw.ts +++ b/lib/routes/gov/chongqing/gzw.ts @@ -21,8 +21,8 @@ export const route: Route = { }, ], description: `| 通知公告 | 国企资讯 | 国企简介 | 国企招聘 | - | --------- | -------- | -------- | -------- | - | tzgg\_191 | gqdj | gqjj | gqzp |`, +| --------- | -------- | -------- | -------- | +| tzgg\_191 | gqdj | gqjj | gqzp |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/csrc/csrc.ts b/lib/routes/gov/csrc/csrc.ts index d2b99339e546..7491a7ded8ce 100644 --- a/lib/routes/gov/csrc/csrc.ts +++ b/lib/routes/gov/csrc/csrc.ts @@ -89,118 +89,118 @@ export const route: Route = { 若订阅 [行政处罚决定](http://www.csrc.gov.cn/csrc/c101971/zfxxgk_zdgk.shtml),网址为 \`http://www.csrc.gov.cn/csrc/c101971/zfxxgk_zdgk.shtml\`。截取 \`http://www.csrc.gov.cn/csrc/\` 到末尾 \`/zfxxgk_zdgk.shtml\` 的部分 \`c101971\` 作为参数填入,此时路由为 [\`/gov/csrc/zfxxgk_zdgk/c101971\`](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101971)。 ::: - #### [主动公开目录](http://www.csrc.gov.cn/csrc/c100035/zfxxgk_zdgk.shtml) +#### [主动公开目录](http://www.csrc.gov.cn/csrc/c100035/zfxxgk_zdgk.shtml) - | 频道 | ID | - | ----------------------------------------------------------------------- | ---------------------------------------------------------- | - | [按主题查看](http://www.csrc.gov.cn/csrc/c101793/zfxxgk_zdgk.shtml) | [c101793](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101793) | - | [按体裁文种查看](http://www.csrc.gov.cn/csrc/c101951/zfxxgk_zdgk.shtml) | [c101951](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101951) | - | [按派出机构查看](http://www.csrc.gov.cn/csrc/c101985/zfxxgk_zdgk.shtml) | [c101985](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101985) | +| 频道 | ID | +| ----------------------------------------------------------------------- | ---------------------------------------------------------- | +| [按主题查看](http://www.csrc.gov.cn/csrc/c101793/zfxxgk_zdgk.shtml) | [c101793](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101793) | +| [按体裁文种查看](http://www.csrc.gov.cn/csrc/c101951/zfxxgk_zdgk.shtml) | [c101951](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101951) | +| [按派出机构查看](http://www.csrc.gov.cn/csrc/c101985/zfxxgk_zdgk.shtml) | [c101985](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101985) | -
- 更多频道 +
+更多频道 - #### [按主题查看](http://www.csrc.gov.cn/csrc/c101793/zfxxgk_zdgk.shtml) +#### [按主题查看](http://www.csrc.gov.cn/csrc/c101793/zfxxgk_zdgk.shtml) - | 频道 | ID | - | --------------------------------------------------------------------------------- | ---------------------------------------------------------- | - | [综合政务](http://www.csrc.gov.cn/csrc/c101794/zfxxgk_zdgk.shtml) | [c101794](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101794) | - | [发行监管](http://www.csrc.gov.cn/csrc/c101801/zfxxgk_zdgk.shtml) | [c101801](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101801) | - | [公众公司监管(含北交所)](http://www.csrc.gov.cn/csrc/c101828/zfxxgk_zdgk.shtml) | [c101828](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101828) | - | [证券交易监管](http://www.csrc.gov.cn/csrc/c101832/zfxxgk_zdgk.shtml) | [c101832](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101832) | - | [证券经营机构监管](http://www.csrc.gov.cn/csrc/c101837/zfxxgk_zdgk.shtml) | [c101837](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101837) | - | [上市公司监管](http://www.csrc.gov.cn/csrc/c101863/zfxxgk_zdgk.shtml) | [c101863](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101863) | - | [基金监管](http://www.csrc.gov.cn/csrc/c101876/zfxxgk_zdgk.shtml) | [c101876](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101876) | - | [私募基金监管](http://www.csrc.gov.cn/csrc/c101938/zfxxgk_zdgk.shtml) | [c101938](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101938) | - | [区域性股权市场规范发展](http://www.csrc.gov.cn/csrc/c106301/zfxxgk_zdgk.shtml) | [c106301](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c106301) | - | [期货监管](http://www.csrc.gov.cn/csrc/c101901/zfxxgk_zdgk.shtml) | [c101901](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101901) | - | [债券监管](http://www.csrc.gov.cn/csrc/c106306/zfxxgk_zdgk.shtml) | [c106306](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c106306) | - | [行政执法](http://www.csrc.gov.cn/csrc/c101925/zfxxgk_zdgk.shtml) | [c101925](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101925) | - | [行政复议](http://www.csrc.gov.cn/csrc/c105938/zfxxgk_zdgk.shtml) | [c105938](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105938) | - | [国际合作](http://www.csrc.gov.cn/csrc/c101931/zfxxgk_zdgk.shtml) | [c101931](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101931) | - | [证券服务机构监管](http://www.csrc.gov.cn/csrc/c105939/zfxxgk_zdgk.shtml) | [c105939](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105939) | - | [其他](http://www.csrc.gov.cn/csrc/c101950/zfxxgk_zdgk.shtml) | [c101950](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101950) | +| 频道 | ID | +| --------------------------------------------------------------------------------- | ---------------------------------------------------------- | +| [综合政务](http://www.csrc.gov.cn/csrc/c101794/zfxxgk_zdgk.shtml) | [c101794](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101794) | +| [发行监管](http://www.csrc.gov.cn/csrc/c101801/zfxxgk_zdgk.shtml) | [c101801](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101801) | +| [公众公司监管(含北交所)](http://www.csrc.gov.cn/csrc/c101828/zfxxgk_zdgk.shtml) | [c101828](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101828) | +| [证券交易监管](http://www.csrc.gov.cn/csrc/c101832/zfxxgk_zdgk.shtml) | [c101832](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101832) | +| [证券经营机构监管](http://www.csrc.gov.cn/csrc/c101837/zfxxgk_zdgk.shtml) | [c101837](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101837) | +| [上市公司监管](http://www.csrc.gov.cn/csrc/c101863/zfxxgk_zdgk.shtml) | [c101863](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101863) | +| [基金监管](http://www.csrc.gov.cn/csrc/c101876/zfxxgk_zdgk.shtml) | [c101876](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101876) | +| [私募基金监管](http://www.csrc.gov.cn/csrc/c101938/zfxxgk_zdgk.shtml) | [c101938](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101938) | +| [区域性股权市场规范发展](http://www.csrc.gov.cn/csrc/c106301/zfxxgk_zdgk.shtml) | [c106301](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c106301) | +| [期货监管](http://www.csrc.gov.cn/csrc/c101901/zfxxgk_zdgk.shtml) | [c101901](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101901) | +| [债券监管](http://www.csrc.gov.cn/csrc/c106306/zfxxgk_zdgk.shtml) | [c106306](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c106306) | +| [行政执法](http://www.csrc.gov.cn/csrc/c101925/zfxxgk_zdgk.shtml) | [c101925](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101925) | +| [行政复议](http://www.csrc.gov.cn/csrc/c105938/zfxxgk_zdgk.shtml) | [c105938](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105938) | +| [国际合作](http://www.csrc.gov.cn/csrc/c101931/zfxxgk_zdgk.shtml) | [c101931](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101931) | +| [证券服务机构监管](http://www.csrc.gov.cn/csrc/c105939/zfxxgk_zdgk.shtml) | [c105939](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105939) | +| [其他](http://www.csrc.gov.cn/csrc/c101950/zfxxgk_zdgk.shtml) | [c101950](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101950) | - #### [按体裁文种查看](http://www.csrc.gov.cn/csrc/c101951/zfxxgk_zdgk.shtml) +#### [按体裁文种查看](http://www.csrc.gov.cn/csrc/c101951/zfxxgk_zdgk.shtml) - | 频道 | ID | - | --------------------------------------------------------------------------- | ---------------------------------------------------------- | - | [机构职能](http://www.csrc.gov.cn/csrc/c101952/zfxxgk_zdgk.shtml) | [c101952](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101952) | - | [证监会令](http://www.csrc.gov.cn/csrc/c101953/zfxxgk_zdgk.shtml) | [c101953](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101953) | - | [证监会公告](http://www.csrc.gov.cn/csrc/c101954/zfxxgk_zdgk.shtml) | [c101954](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101954) | - | [监管规则适用指引](http://www.csrc.gov.cn/csrc/c105948/zfxxgk_zdgk.shtml) | [c105948](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105948) | - | [行政许可批复](http://www.csrc.gov.cn/csrc/c101955/zfxxgk_zdgk.shtml) | [c101955](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101955) | - | [办事指南](http://www.csrc.gov.cn/csrc/c101968/zfxxgk_zdgk.shtml) | [c101968](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101968) | - | [监管对象](http://www.csrc.gov.cn/csrc/c101969/zfxxgk_zdgk.shtml) | [c101969](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101969) | - | [统计信息](http://www.csrc.gov.cn/csrc/c101970/zfxxgk_zdgk.shtml) | [c101970](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101970) | - | [行政处罚决定](http://www.csrc.gov.cn/csrc/c101971/zfxxgk_zdgk.shtml) | [c101971](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101971) | - | [市场禁入决定](http://www.csrc.gov.cn/csrc/c101972/zfxxgk_zdgk.shtml) | [c101972](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101972) | - | [行政执法当事人承诺](http://www.csrc.gov.cn/csrc/c106416/zfxxgk_zdgk.shtml) | [c106416](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c106416) | - | [行政复议](http://www.csrc.gov.cn/csrc/c101973/zfxxgk_zdgk.shtml) | [c101973](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101973) | - | [监管措施](http://www.csrc.gov.cn/csrc/c105955/zfxxgk_zdgk.shtml) | [c105955](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105955) | - | [预先披露](http://www.csrc.gov.cn/csrc/c101974/zfxxgk_zdgk.shtml) | [c101974](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101974) | - | [发审会公告](http://www.csrc.gov.cn/csrc/c101975/zfxxgk_zdgk.shtml) | [c101975](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101975) | - | [重组委公告](http://www.csrc.gov.cn/csrc/c101976/zfxxgk_zdgk.shtml) | [c101976](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101976) | - | [规划报告](http://www.csrc.gov.cn/csrc/c101977/zfxxgk_zdgk.shtml) | [c101977](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101977) | - | [非行政许可事项](http://www.csrc.gov.cn/csrc/c101978/zfxxgk_zdgk.shtml) | [c101978](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101978) | - | [其他](http://www.csrc.gov.cn/csrc/c101979/zfxxgk_zdgk.shtml) | [c101979](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101979) | - | [备案管理](http://www.csrc.gov.cn/csrc/c106402/zfxxgk_zdgk.shtml) | [c106402](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c106402) | +| 频道 | ID | +| --------------------------------------------------------------------------- | ---------------------------------------------------------- | +| [机构职能](http://www.csrc.gov.cn/csrc/c101952/zfxxgk_zdgk.shtml) | [c101952](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101952) | +| [证监会令](http://www.csrc.gov.cn/csrc/c101953/zfxxgk_zdgk.shtml) | [c101953](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101953) | +| [证监会公告](http://www.csrc.gov.cn/csrc/c101954/zfxxgk_zdgk.shtml) | [c101954](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101954) | +| [监管规则适用指引](http://www.csrc.gov.cn/csrc/c105948/zfxxgk_zdgk.shtml) | [c105948](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105948) | +| [行政许可批复](http://www.csrc.gov.cn/csrc/c101955/zfxxgk_zdgk.shtml) | [c101955](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101955) | +| [办事指南](http://www.csrc.gov.cn/csrc/c101968/zfxxgk_zdgk.shtml) | [c101968](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101968) | +| [监管对象](http://www.csrc.gov.cn/csrc/c101969/zfxxgk_zdgk.shtml) | [c101969](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101969) | +| [统计信息](http://www.csrc.gov.cn/csrc/c101970/zfxxgk_zdgk.shtml) | [c101970](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101970) | +| [行政处罚决定](http://www.csrc.gov.cn/csrc/c101971/zfxxgk_zdgk.shtml) | [c101971](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101971) | +| [市场禁入决定](http://www.csrc.gov.cn/csrc/c101972/zfxxgk_zdgk.shtml) | [c101972](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101972) | +| [行政执法当事人承诺](http://www.csrc.gov.cn/csrc/c106416/zfxxgk_zdgk.shtml) | [c106416](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c106416) | +| [行政复议](http://www.csrc.gov.cn/csrc/c101973/zfxxgk_zdgk.shtml) | [c101973](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101973) | +| [监管措施](http://www.csrc.gov.cn/csrc/c105955/zfxxgk_zdgk.shtml) | [c105955](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105955) | +| [预先披露](http://www.csrc.gov.cn/csrc/c101974/zfxxgk_zdgk.shtml) | [c101974](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101974) | +| [发审会公告](http://www.csrc.gov.cn/csrc/c101975/zfxxgk_zdgk.shtml) | [c101975](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101975) | +| [重组委公告](http://www.csrc.gov.cn/csrc/c101976/zfxxgk_zdgk.shtml) | [c101976](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101976) | +| [规划报告](http://www.csrc.gov.cn/csrc/c101977/zfxxgk_zdgk.shtml) | [c101977](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101977) | +| [非行政许可事项](http://www.csrc.gov.cn/csrc/c101978/zfxxgk_zdgk.shtml) | [c101978](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101978) | +| [其他](http://www.csrc.gov.cn/csrc/c101979/zfxxgk_zdgk.shtml) | [c101979](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101979) | +| [备案管理](http://www.csrc.gov.cn/csrc/c106402/zfxxgk_zdgk.shtml) | [c106402](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c106402) | - #### [按派出机构查看](http://www.csrc.gov.cn/csrc/c101985/zfxxgk_zdgk.shtml) +#### [按派出机构查看](http://www.csrc.gov.cn/csrc/c101985/zfxxgk_zdgk.shtml) - | 频道 | ID | - | ------------------------------------------------------------------- | ---------------------------------------------------------- | - | [北京](http://www.csrc.gov.cn/csrc/c101986/zfxxgk_zdgk.shtml) | [c101986](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101986) | - | [天津](http://www.csrc.gov.cn/csrc/c101987/zfxxgk_zdgk.shtml) | [c101987](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101987) | - | [河北](http://www.csrc.gov.cn/csrc/c101988/zfxxgk_zdgk.shtml) | [c101988](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101988) | - | [山西](http://www.csrc.gov.cn/csrc/c101989/zfxxgk_zdgk.shtml) | [c101989](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101989) | - | [内蒙古](http://www.csrc.gov.cn/csrc/c101990/zfxxgk_zdgk.shtml) | [c101990](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101990) | - | [辽宁](http://www.csrc.gov.cn/csrc/c101991/zfxxgk_zdgk.shtml) | [c101991](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101991) | - | [吉林](http://www.csrc.gov.cn/csrc/c101992/zfxxgk_zdgk.shtml) | [c101992](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101992) | - | [黑龙江](http://www.csrc.gov.cn/csrc/c101993/zfxxgk_zdgk.shtml) | [c101993](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101993) | - | [上海](http://www.csrc.gov.cn/csrc/c101994/zfxxgk_zdgk.shtml) | [c101994](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101994) | - | [江苏](http://www.csrc.gov.cn/csrc/c101995/zfxxgk_zdgk.shtml) | [c101995](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101995) | - | [浙江](http://www.csrc.gov.cn/csrc/c101996/zfxxgk_zdgk.shtml) | [c101996](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101996) | - | [安徽](http://www.csrc.gov.cn/csrc/c101997/zfxxgk_zdgk.shtml) | [c101997](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101997) | - | [福建](http://www.csrc.gov.cn/csrc/c101998/zfxxgk_zdgk.shtml) | [c101998](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101998) | - | [江西](http://www.csrc.gov.cn/csrc/c101999/zfxxgk_zdgk.shtml) | [c101999](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101999) | - | [山东](http://www.csrc.gov.cn/csrc/c102000/zfxxgk_zdgk.shtml) | [c102000](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102000) | - | [河南](http://www.csrc.gov.cn/csrc/c102001/zfxxgk_zdgk.shtml) | [c102001](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102001) | - | [湖北](http://www.csrc.gov.cn/csrc/c102002/zfxxgk_zdgk.shtml) | [c102002](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102002) | - | [湖南](http://www.csrc.gov.cn/csrc/c102003/zfxxgk_zdgk.shtml) | [c102003](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102003) | - | [广东](http://www.csrc.gov.cn/csrc/c102004/zfxxgk_zdgk.shtml) | [c102004](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102004) | - | [广西](http://www.csrc.gov.cn/csrc/c102005/zfxxgk_zdgk.shtml) | [c102005](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102005) | - | [海南](http://www.csrc.gov.cn/csrc/c102006/zfxxgk_zdgk.shtml) | [c102006](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102006) | - | [重庆](http://www.csrc.gov.cn/csrc/c102007/zfxxgk_zdgk.shtml) | [c102007](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102007) | - | [四川](http://www.csrc.gov.cn/csrc/c102008/zfxxgk_zdgk.shtml) | [c102008](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102008) | - | [贵州](http://www.csrc.gov.cn/csrc/c102009/zfxxgk_zdgk.shtml) | [c102009](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102009) | - | [云南](http://www.csrc.gov.cn/csrc/c102010/zfxxgk_zdgk.shtml) | [c102010](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102010) | - | [西藏](http://www.csrc.gov.cn/csrc/c102011/zfxxgk_zdgk.shtml) | [c102011](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102011) | - | [陕西](http://www.csrc.gov.cn/csrc/c102012/zfxxgk_zdgk.shtml) | [c102012](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102012) | - | [甘肃](http://www.csrc.gov.cn/csrc/c102013/zfxxgk_zdgk.shtml) | [c102013](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102013) | - | [青海](http://www.csrc.gov.cn/csrc/c102014/zfxxgk_zdgk.shtml) | [c102014](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102014) | - | [宁夏](http://www.csrc.gov.cn/csrc/c102015/zfxxgk_zdgk.shtml) | [c102015](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102015) | - | [新疆](http://www.csrc.gov.cn/csrc/c102016/zfxxgk_zdgk.shtml) | [c102016](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102016) | - | [深圳](http://www.csrc.gov.cn/csrc/c102017/zfxxgk_zdgk.shtml) | [c102017](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102017) | - | [大连](http://www.csrc.gov.cn/csrc/c102018/zfxxgk_zdgk.shtml) | [c102018](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102018) | - | [宁波](http://www.csrc.gov.cn/csrc/c102019/zfxxgk_zdgk.shtml) | [c102019](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102019) | - | [厦门](http://www.csrc.gov.cn/csrc/c102020/zfxxgk_zdgk.shtml) | [c102020](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102020) | - | [青岛](http://www.csrc.gov.cn/csrc/c102021/zfxxgk_zdgk.shtml) | [c102021](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102021) | - | [上海专员办](http://www.csrc.gov.cn/csrc/c105841/zfxxgk_zdgk.shtml) | [c105841](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105841) | - | [深圳专员办](http://www.csrc.gov.cn/csrc/c105842/zfxxgk_zdgk.shtml) | [c105842](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105842) | +| 频道 | ID | +| ------------------------------------------------------------------- | ---------------------------------------------------------- | +| [北京](http://www.csrc.gov.cn/csrc/c101986/zfxxgk_zdgk.shtml) | [c101986](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101986) | +| [天津](http://www.csrc.gov.cn/csrc/c101987/zfxxgk_zdgk.shtml) | [c101987](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101987) | +| [河北](http://www.csrc.gov.cn/csrc/c101988/zfxxgk_zdgk.shtml) | [c101988](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101988) | +| [山西](http://www.csrc.gov.cn/csrc/c101989/zfxxgk_zdgk.shtml) | [c101989](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101989) | +| [内蒙古](http://www.csrc.gov.cn/csrc/c101990/zfxxgk_zdgk.shtml) | [c101990](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101990) | +| [辽宁](http://www.csrc.gov.cn/csrc/c101991/zfxxgk_zdgk.shtml) | [c101991](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101991) | +| [吉林](http://www.csrc.gov.cn/csrc/c101992/zfxxgk_zdgk.shtml) | [c101992](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101992) | +| [黑龙江](http://www.csrc.gov.cn/csrc/c101993/zfxxgk_zdgk.shtml) | [c101993](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101993) | +| [上海](http://www.csrc.gov.cn/csrc/c101994/zfxxgk_zdgk.shtml) | [c101994](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101994) | +| [江苏](http://www.csrc.gov.cn/csrc/c101995/zfxxgk_zdgk.shtml) | [c101995](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101995) | +| [浙江](http://www.csrc.gov.cn/csrc/c101996/zfxxgk_zdgk.shtml) | [c101996](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101996) | +| [安徽](http://www.csrc.gov.cn/csrc/c101997/zfxxgk_zdgk.shtml) | [c101997](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101997) | +| [福建](http://www.csrc.gov.cn/csrc/c101998/zfxxgk_zdgk.shtml) | [c101998](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101998) | +| [江西](http://www.csrc.gov.cn/csrc/c101999/zfxxgk_zdgk.shtml) | [c101999](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101999) | +| [山东](http://www.csrc.gov.cn/csrc/c102000/zfxxgk_zdgk.shtml) | [c102000](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102000) | +| [河南](http://www.csrc.gov.cn/csrc/c102001/zfxxgk_zdgk.shtml) | [c102001](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102001) | +| [湖北](http://www.csrc.gov.cn/csrc/c102002/zfxxgk_zdgk.shtml) | [c102002](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102002) | +| [湖南](http://www.csrc.gov.cn/csrc/c102003/zfxxgk_zdgk.shtml) | [c102003](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102003) | +| [广东](http://www.csrc.gov.cn/csrc/c102004/zfxxgk_zdgk.shtml) | [c102004](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102004) | +| [广西](http://www.csrc.gov.cn/csrc/c102005/zfxxgk_zdgk.shtml) | [c102005](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102005) | +| [海南](http://www.csrc.gov.cn/csrc/c102006/zfxxgk_zdgk.shtml) | [c102006](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102006) | +| [重庆](http://www.csrc.gov.cn/csrc/c102007/zfxxgk_zdgk.shtml) | [c102007](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102007) | +| [四川](http://www.csrc.gov.cn/csrc/c102008/zfxxgk_zdgk.shtml) | [c102008](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102008) | +| [贵州](http://www.csrc.gov.cn/csrc/c102009/zfxxgk_zdgk.shtml) | [c102009](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102009) | +| [云南](http://www.csrc.gov.cn/csrc/c102010/zfxxgk_zdgk.shtml) | [c102010](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102010) | +| [西藏](http://www.csrc.gov.cn/csrc/c102011/zfxxgk_zdgk.shtml) | [c102011](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102011) | +| [陕西](http://www.csrc.gov.cn/csrc/c102012/zfxxgk_zdgk.shtml) | [c102012](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102012) | +| [甘肃](http://www.csrc.gov.cn/csrc/c102013/zfxxgk_zdgk.shtml) | [c102013](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102013) | +| [青海](http://www.csrc.gov.cn/csrc/c102014/zfxxgk_zdgk.shtml) | [c102014](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102014) | +| [宁夏](http://www.csrc.gov.cn/csrc/c102015/zfxxgk_zdgk.shtml) | [c102015](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102015) | +| [新疆](http://www.csrc.gov.cn/csrc/c102016/zfxxgk_zdgk.shtml) | [c102016](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102016) | +| [深圳](http://www.csrc.gov.cn/csrc/c102017/zfxxgk_zdgk.shtml) | [c102017](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102017) | +| [大连](http://www.csrc.gov.cn/csrc/c102018/zfxxgk_zdgk.shtml) | [c102018](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102018) | +| [宁波](http://www.csrc.gov.cn/csrc/c102019/zfxxgk_zdgk.shtml) | [c102019](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102019) | +| [厦门](http://www.csrc.gov.cn/csrc/c102020/zfxxgk_zdgk.shtml) | [c102020](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102020) | +| [青岛](http://www.csrc.gov.cn/csrc/c102021/zfxxgk_zdgk.shtml) | [c102021](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c102021) | +| [上海专员办](http://www.csrc.gov.cn/csrc/c105841/zfxxgk_zdgk.shtml) | [c105841](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105841) | +| [深圳专员办](http://www.csrc.gov.cn/csrc/c105842/zfxxgk_zdgk.shtml) | [c105842](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105842) | - #### [综合政务](http://www.csrc.gov.cn/csrc/c101794/zfxxgk_zdgk.shtml) +#### [综合政务](http://www.csrc.gov.cn/csrc/c101794/zfxxgk_zdgk.shtml) - | 频道 | ID | - | --------------------------------------------------------------------------------------- | ---------------------------------------------------------- | - | [组织机构](http://www.csrc.gov.cn/csrc/c101795/zfxxgk_zdgk.shtml) | [c101795](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101795) | - | [征求意见](http://www.csrc.gov.cn/csrc/c101796/zfxxgk_zdgk.shtml) | [c101796](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101796) | - | [废止规章](http://www.csrc.gov.cn/csrc/c101797/zfxxgk_zdgk.shtml) | [c101797](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101797) | - | [财务预算管理](http://www.csrc.gov.cn/csrc/c105887/zfxxgk_zdgk.shtml) | [c105887](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105887) | - | [其他](http://www.csrc.gov.cn/csrc/c101799/zfxxgk_zdgk.shtml) | [c101799](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101799) | - | [全国人大建议和政协提案复文公开](http://www.csrc.gov.cn/csrc/c101800/zfxxgk_zdgk.shtml) | [c101800](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101800) | +| 频道 | ID | +| --------------------------------------------------------------------------------------- | ---------------------------------------------------------- | +| [组织机构](http://www.csrc.gov.cn/csrc/c101795/zfxxgk_zdgk.shtml) | [c101795](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101795) | +| [征求意见](http://www.csrc.gov.cn/csrc/c101796/zfxxgk_zdgk.shtml) | [c101796](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101796) | +| [废止规章](http://www.csrc.gov.cn/csrc/c101797/zfxxgk_zdgk.shtml) | [c101797](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101797) | +| [财务预算管理](http://www.csrc.gov.cn/csrc/c105887/zfxxgk_zdgk.shtml) | [c105887](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c105887) | +| [其他](http://www.csrc.gov.cn/csrc/c101799/zfxxgk_zdgk.shtml) | [c101799](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101799) | +| [全国人大建议和政协提案复文公开](http://www.csrc.gov.cn/csrc/c101800/zfxxgk_zdgk.shtml) | [c101800](https://rsshub.app/gov/csrc/zfxxgk_zdgk/c101800) | -
+
`, categories: ['government'], diff --git a/lib/routes/gov/forestry/gjlckjdjt.ts b/lib/routes/gov/forestry/gjlckjdjt.ts index e7cd57e61f6b..b30e2dd1c874 100644 --- a/lib/routes/gov/forestry/gjlckjdjt.ts +++ b/lib/routes/gov/forestry/gjlckjdjt.ts @@ -26,13 +26,13 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 分类 | id | - | -------- | ---- | - | 经济林 | jjl | - | 林木良种 | lmlz | - | 林下经济 | lxjj | - | 生态修复 | stxf | - | 用材林 | ycl | - | 其他 | qt |`, +| -------- | ---- | +| 经济林 | jjl | +| 林木良种 | lmlz | +| 林下经济 | lxjj | +| 生态修复 | stxf | +| 用材林 | ycl | +| 其他 | qt |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/hebei/czt.ts b/lib/routes/gov/hebei/czt.ts index e78c61bee628..ae99435210de 100644 --- a/lib/routes/gov/hebei/czt.ts +++ b/lib/routes/gov/hebei/czt.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 财政动态 | 综合新闻 | 通知公告 | - | -------- | -------- | -------- | - | gzdt | zhxw | tzgg |`, +| -------- | -------- | -------- | +| gzdt | zhxw | tzgg |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/lswz/index.ts b/lib/routes/gov/lswz/index.ts index dc1b7539fc61..69025db06213 100644 --- a/lib/routes/gov/lswz/index.ts +++ b/lib/routes/gov/lswz/index.ts @@ -87,52 +87,52 @@ export const route: Route = { 若订阅 [新闻发布](https://www.lswz.gov.cn/html/xinwen/index.shtml),网址为 \`https://www.lswz.gov.cn/html/xinwen/index.shtml\`。截取 \`https://www.lswz.gov.cn/\` 到末尾 \`.shtml\` 的部分 \`html/xinwen/index\` 作为参数填入,此时路由为 [\`/gov/lswz/html/xinwen/index\`](https://rsshub.app/gov/lswz/html/xinwen/index)。 ::: - | [新闻发布](https://www.lswz.gov.cn/html/xinwen/index.shtml) | [党建工作](https://www.lswz.gov.cn/html/djgz/index.shtml) | - | ------------------------------------------------------------------ | -------------------------------------------------------------- | - | [html/xinwen/index](https://rsshub.app/gov/lswz/html/xinwen/index) | [html/djgz/index](https://rsshub.app/gov/lswz/html/djgz/index) | +| [新闻发布](https://www.lswz.gov.cn/html/xinwen/index.shtml) | [党建工作](https://www.lswz.gov.cn/html/djgz/index.shtml) | +| ------------------------------------------------------------------ | -------------------------------------------------------------- | +| [html/xinwen/index](https://rsshub.app/gov/lswz/html/xinwen/index) | [html/djgz/index](https://rsshub.app/gov/lswz/html/djgz/index) | - | [粮食交易](https://www.lswz.gov.cn/html/zmhd/lysj/lsjy.shtml) | [粮食质量](https://www.lswz.gov.cn/html/zmhd/lysj/lszl.shtml) | - | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | - | [html/zmhd/lysj/lsjy](https://rsshub.app/gov/lswz/html/zmhd/lysj/lsjy) | [html/zmhd/lysj/lszl](https://rsshub.app/gov/lswz/html/zmhd/lysj/lszl) | +| [粮食交易](https://www.lswz.gov.cn/html/zmhd/lysj/lsjy.shtml) | [粮食质量](https://www.lswz.gov.cn/html/zmhd/lysj/lszl.shtml) | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| [html/zmhd/lysj/lsjy](https://rsshub.app/gov/lswz/html/zmhd/lysj/lsjy) | [html/zmhd/lysj/lszl](https://rsshub.app/gov/lswz/html/zmhd/lysj/lszl) | - #### [业务频道](https://www.lswz.gov.cn/html/ywpd/index.shtml) +#### [业务频道](https://www.lswz.gov.cn/html/ywpd/index.shtml) - | [粮食调控](https://www.lswz.gov.cn/html/ywpd/lstk/index.shtml) | [物资储备](https://www.lswz.gov.cn/html/ywpd/wzcb/index.shtml) | [能源储备](https://www.lswz.gov.cn/html/ywpd/nycb/index.shtml) | [安全应急](https://www.lswz.gov.cn/html/ywpd/aqyj/index.shtml) | [法规体改](https://www.lswz.gov.cn/html/ywpd/fgtg/index.shtml) | - | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | - | [html/ywpd/lstk/index](https://rsshub.app/gov/lswz/html/ywpd/lstk/index) | [html/ywpd/wzcb/index](https://rsshub.app/gov/lswz/html/ywpd/wzcb/index) | [html/ywpd/nycb/index](https://rsshub.app/gov/lswz/html/ywpd/nycb/index) | [html/ywpd/aqyj/index](https://rsshub.app/gov/lswz/html/ywpd/aqyj/index) | [html/ywpd/fgtg/index](https://rsshub.app/gov/lswz/html/ywpd/fgtg/index) | +| [粮食调控](https://www.lswz.gov.cn/html/ywpd/lstk/index.shtml) | [物资储备](https://www.lswz.gov.cn/html/ywpd/wzcb/index.shtml) | [能源储备](https://www.lswz.gov.cn/html/ywpd/nycb/index.shtml) | [安全应急](https://www.lswz.gov.cn/html/ywpd/aqyj/index.shtml) | [法规体改](https://www.lswz.gov.cn/html/ywpd/fgtg/index.shtml) | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| [html/ywpd/lstk/index](https://rsshub.app/gov/lswz/html/ywpd/lstk/index) | [html/ywpd/wzcb/index](https://rsshub.app/gov/lswz/html/ywpd/wzcb/index) | [html/ywpd/nycb/index](https://rsshub.app/gov/lswz/html/ywpd/nycb/index) | [html/ywpd/aqyj/index](https://rsshub.app/gov/lswz/html/ywpd/aqyj/index) | [html/ywpd/fgtg/index](https://rsshub.app/gov/lswz/html/ywpd/fgtg/index) | - | [规划建设](https://www.lswz.gov.cn/html/ywpd/gjks/index.shtml) | [财务审计](https://www.lswz.gov.cn/html/ywpd/cwsj/index.shtml) | [仓储科技](https://www.lswz.gov.cn/html/ywpd/cckj/index.shtml) | [执法督查](https://www.lswz.gov.cn/html/ywpd/zfdc/index.shtml) | [国际交流](https://www.lswz.gov.cn/html/ywpd/gjjl/index.shtml) | - | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | - | [html/ywpd/gjks/index](https://rsshub.app/gov/lswz/html/ywpd/gjks/index) | [html/ywpd/cwsj/index](https://rsshub.app/gov/lswz/html/ywpd/cwsj/index) | [html/ywpd/cckj/index](https://rsshub.app/gov/lswz/html/ywpd/cckj/index) | [html/ywpd/zfdc/index](https://rsshub.app/gov/lswz/html/ywpd/zfdc/index) | [html/ywpd/gjjl/index](https://rsshub.app/gov/lswz/html/ywpd/gjjl/index) | +| [规划建设](https://www.lswz.gov.cn/html/ywpd/gjks/index.shtml) | [财务审计](https://www.lswz.gov.cn/html/ywpd/cwsj/index.shtml) | [仓储科技](https://www.lswz.gov.cn/html/ywpd/cckj/index.shtml) | [执法督查](https://www.lswz.gov.cn/html/ywpd/zfdc/index.shtml) | [国际交流](https://www.lswz.gov.cn/html/ywpd/gjjl/index.shtml) | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| [html/ywpd/gjks/index](https://rsshub.app/gov/lswz/html/ywpd/gjks/index) | [html/ywpd/cwsj/index](https://rsshub.app/gov/lswz/html/ywpd/cwsj/index) | [html/ywpd/cckj/index](https://rsshub.app/gov/lswz/html/ywpd/cckj/index) | [html/ywpd/zfdc/index](https://rsshub.app/gov/lswz/html/ywpd/zfdc/index) | [html/ywpd/gjjl/index](https://rsshub.app/gov/lswz/html/ywpd/gjjl/index) | - | [人事人才](https://www.lswz.gov.cn/html/ywpd/rsrc/index.shtml) | [标准质量](https://www.lswz.gov.cn/html/ywpd/bzzl/index.shtml) | [粮食和储备研究](https://www.lswz.gov.cn/html/ywpd/lshcbyj/index.shtml) | - | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | - | [html/ywpd/rsrc/index](https://rsshub.app/gov/lswz/html/ywpd/rsrc/index) | [html/ywpd/bzzl/index](https://rsshub.app/gov/lswz/html/ywpd/bzzl/index) | [html/ywpd/lshcbyj/index](https://rsshub.app/gov/lswz/html/ywpd/lshcbyj/index) | +| [人事人才](https://www.lswz.gov.cn/html/ywpd/rsrc/index.shtml) | [标准质量](https://www.lswz.gov.cn/html/ywpd/bzzl/index.shtml) | [粮食和储备研究](https://www.lswz.gov.cn/html/ywpd/lshcbyj/index.shtml) | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| [html/ywpd/rsrc/index](https://rsshub.app/gov/lswz/html/ywpd/rsrc/index) | [html/ywpd/bzzl/index](https://rsshub.app/gov/lswz/html/ywpd/bzzl/index) | [html/ywpd/lshcbyj/index](https://rsshub.app/gov/lswz/html/ywpd/lshcbyj/index) | - #### [政策发布](https://www.lswz.gov.cn/html/zcfb/index.shtml) +#### [政策发布](https://www.lswz.gov.cn/html/zcfb/index.shtml) - | [文件](https://www.lswz.gov.cn/html/zcfb/wenjian.shtml) | [法律法规](https://www.lswz.gov.cn/html/zcfb/fggz-fg.shtml) | [规章](https://www.lswz.gov.cn/html/zcfb/fggz-gz.shtml) | - | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | - | [html/zcfb/wenjian](https://rsshub.app/gov/lswz/html/zcfb/wenjian) | [html/zcfb/fggz-fg](https://rsshub.app/gov/lswz/html/zcfb/fggz-fg) | [html/zcfb/fggz-gz](https://rsshub.app/gov/lswz/html/zcfb/fggz-gz) | +| [文件](https://www.lswz.gov.cn/html/zcfb/wenjian.shtml) | [法律法规](https://www.lswz.gov.cn/html/zcfb/fggz-fg.shtml) | [规章](https://www.lswz.gov.cn/html/zcfb/fggz-gz.shtml) | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| [html/zcfb/wenjian](https://rsshub.app/gov/lswz/html/zcfb/wenjian) | [html/zcfb/fggz-fg](https://rsshub.app/gov/lswz/html/zcfb/fggz-fg) | [html/zcfb/fggz-gz](https://rsshub.app/gov/lswz/html/zcfb/fggz-gz) | - #### [通知公告](https://www.lswz.gov.cn/html/tzgg/index.shtml) +#### [通知公告](https://www.lswz.gov.cn/html/tzgg/index.shtml) - | [行政通知](https://www.lswz.gov.cn/html/tzgg/xztz.shtml) | [公告通告](https://www.lswz.gov.cn/html/tzgg/ggtg.shtml) | - | ------------------------------------------------------------ | ------------------------------------------------------------ | - | [html/tzgg/xztz](https://rsshub.app/gov/lswz/html/tzgg/xztz) | [html/tzgg/ggtg](https://rsshub.app/gov/lswz/html/tzgg/ggtg) | +| [行政通知](https://www.lswz.gov.cn/html/tzgg/xztz.shtml) | [公告通告](https://www.lswz.gov.cn/html/tzgg/ggtg.shtml) | +| ------------------------------------------------------------ | ------------------------------------------------------------ | +| [html/tzgg/xztz](https://rsshub.app/gov/lswz/html/tzgg/xztz) | [html/tzgg/ggtg](https://rsshub.app/gov/lswz/html/tzgg/ggtg) | - #### [粮食收购](https://www.lswz.gov.cn/html/zmhd/lysj/lssg-szym.shtml) +#### [粮食收购](https://www.lswz.gov.cn/html/zmhd/lysj/lssg-szym.shtml) - | [收购数据](https://www.lswz.gov.cn/html/zmhd/lysj/lssg-szym.shtml) | [政策·解读](https://www.lswz.gov.cn/html/zmhd/lysj/lssg-gzdt.shtml) | - | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | - | [html/zmhd/lysj/lssg-szym](https://rsshub.app/gov/lswz/html/zmhd/lysj/lssg-szym) | [html/zmhd/lysj/lssg-gzdt](https://rsshub.app/gov/lswz/html/zmhd/lysj/lssg-gzdt) | +| [收购数据](https://www.lswz.gov.cn/html/zmhd/lysj/lssg-szym.shtml) | [政策·解读](https://www.lswz.gov.cn/html/zmhd/lysj/lssg-gzdt.shtml) | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| [html/zmhd/lysj/lssg-szym](https://rsshub.app/gov/lswz/html/zmhd/lysj/lssg-szym) | [html/zmhd/lysj/lssg-gzdt](https://rsshub.app/gov/lswz/html/zmhd/lysj/lssg-gzdt) | - #### [粮食价格](https://www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjc.shtml) +#### [粮食价格](https://www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjc.shtml) - | [市场监测](https://www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjc.shtml) | [市场价格](https://www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjg.shtml) | - | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | - | [html/zmhd/lysj/lsjg-scjc](https://rsshub.app/gov/lswz/html/zmhd/lysj/lsjg-scjc) | [html/zmhd/lysj/lsjg-scjg](https://rsshub.app/gov/lswz/html/zmhd/lysj/lsjg-scjg) | +| [市场监测](https://www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjc.shtml) | [市场价格](https://www.lswz.gov.cn/html/zmhd/lysj/lsjg-scjg.shtml) | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| [html/zmhd/lysj/lsjg-scjc](https://rsshub.app/gov/lswz/html/zmhd/lysj/lsjg-scjc) | [html/zmhd/lysj/lsjg-scjg](https://rsshub.app/gov/lswz/html/zmhd/lysj/lsjg-scjg) | `, categories: ['government'], diff --git a/lib/routes/gov/maonan/maonan.ts b/lib/routes/gov/maonan/maonan.ts index cda19173e7a0..581adf52de79 100644 --- a/lib/routes/gov/maonan/maonan.ts +++ b/lib/routes/gov/maonan/maonan.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['ShuiHuo'], handler, description: `| 政务公开 | 政务新闻 | 茂南动态 | 重大会议 | 公告公示 | 招录信息 | 政策解读 | - | :------: | :------: | :------: | :------: | :------: | :------: | :------: | - | zwgk | zwxw | mndt | zdhy | tzgg | zlxx | zcjd |`, +| :------: | :------: | :------: | :------: | :------: | :------: | :------: | +| zwgk | zwxw | mndt | zdhy | tzgg | zlxx | zcjd |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/mem/sgcc.ts b/lib/routes/gov/mem/sgcc.ts index 221955a56eb1..6dfcc9a9d2d7 100644 --- a/lib/routes/gov/mem/sgcc.ts +++ b/lib/routes/gov/mem/sgcc.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 挂牌督办 | 调查报告 | - | -------- | ---------- | - | sggpdbqk | tbzdsgdcbg |`, +| -------- | ---------- | +| sggpdbqk | tbzdsgdcbg |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/mfa/wjdt.ts b/lib/routes/gov/mfa/wjdt.ts index 8c82505e9759..3d15cb3ca656 100644 --- a/lib/routes/gov/mfa/wjdt.ts +++ b/lib/routes/gov/mfa/wjdt.ts @@ -23,16 +23,16 @@ export const route: Route = { maintainers: ['nicolaszf', 'nczitzk'], handler, description: `| 分类 | category | - | ---------- | -------- | - | 领导人活动 | gjldrhd | - | 外事日程 | wsrc | - | 部领导活动 | wjbxw | - | 业务动态 | sjxw | - | 发言人表态 | fyrbt | - | 吹风会 | cfhsl | - | 大使任免 | dsrm | - | 驻外报道 | zwbd | - | 政策解读 | zcjd |`, +| ---------- | -------- | +| 领导人活动 | gjldrhd | +| 外事日程 | wsrc | +| 部领导活动 | wjbxw | +| 业务动态 | sjxw | +| 发言人表态 | fyrbt | +| 吹风会 | cfhsl | +| 大使任免 | dsrm | +| 驻外报道 | zwbd | +| 政策解读 | zcjd |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/moa/zdscxx.ts b/lib/routes/gov/moa/zdscxx.ts index 2522ec47d575..8cec8e4d836a 100644 --- a/lib/routes/gov/moa/zdscxx.ts +++ b/lib/routes/gov/moa/zdscxx.ts @@ -112,8 +112,8 @@ export const route: Route = { 若订阅 \`央视网\` 报告来源 的 \`蔬菜生产\` 报告主题。此时路由为 [\`/gov/moa/zdscxx/央视网/蔬菜生产\`](https://rsshub.app/gov/moa/zdscxx/央视网/蔬菜生产)。 ::: - | 价格指数 | 供需形势 | 分析报告周报 | 分析报告日报 | 日历信息 | 蔬菜生产 | - | -------- | -------- | ------------ | ------------ | -------- | -------- | +| 价格指数 | 供需形势 | 分析报告周报 | 分析报告日报 | 日历信息 | 蔬菜生产 | +| -------- | -------- | ------------ | ------------ | -------- | -------- | `, categories: ['government'], diff --git a/lib/routes/gov/moe/moe.ts b/lib/routes/gov/moe/moe.ts index f9881f015ffc..24f8eee761dd 100644 --- a/lib/routes/gov/moe/moe.ts +++ b/lib/routes/gov/moe/moe.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['Crawler995'], handler, description: `| 政策解读 | 最新文件 | 公告公示 | 教育部简报 | 教育要闻 | - | :----------: | :----------: | :------: | :-----------------: | :--------------: | - | policy\_anal | newest\_file | notice | edu\_ministry\_news | edu\_focus\_news |`, +| :----------: | :----------: | :------: | :-----------------: | :--------------: | +| policy\_anal | newest\_file | notice | edu\_ministry\_news | edu\_focus\_news |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/mof/bond.ts b/lib/routes/gov/mof/bond.ts index 9a1422774a55..a38d34b74897 100644 --- a/lib/routes/gov/mof/bond.ts +++ b/lib/routes/gov/mof/bond.ts @@ -26,9 +26,9 @@ export const route: Route = { handler, description: `#### 政府债券管理 - | 国债管理工作动态 | 记账式国债 (含特别国债) 发行 | 储蓄国债发行 | 地方政府债券管理 | - | ---------------- | ---------------------------- | ------------ | --------------------- | - | gzfxgzdt | gzfxzjs | gzfxdzs | difangzhengfuzhaiquan |`, +| 国债管理工作动态 | 记账式国债 (含特别国债) 发行 | 储蓄国债发行 | 地方政府债券管理 | +| ---------------- | ---------------------------- | ------------ | --------------------- | +| gzfxgzdt | gzfxzjs | gzfxdzs | difangzhengfuzhaiquan |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/moj/aac/news.ts b/lib/routes/gov/moj/aac/news.ts index 96d443c43c24..7eccf2a487f3 100644 --- a/lib/routes/gov/moj/aac/news.ts +++ b/lib/routes/gov/moj/aac/news.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 全部 | 其他 | 採購公告 | 新聞稿 | 肅貪 | 預防 | 綜合 | 防疫專區 | - | ---- | ---- | -------- | ------ | ---- | ---- | ---- | -------- | - | | 02 | 01 | 06 | 05 | 04 | 03 | 99 |`, +| ---- | ---- | -------- | ------ | ---- | ---- | ---- | -------- | +| | 02 | 01 | 06 | 05 | 04 | 03 | 99 |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/npc/index.ts b/lib/routes/gov/npc/index.ts index 39a44be7a85f..94cf496766ff 100644 --- a/lib/routes/gov/npc/index.ts +++ b/lib/routes/gov/npc/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['233yeee'], handler, description: `| 立法 | 监督 | 代表 | 理论 | 权威发布 | 滚动新闻 | - | ---- | ---- | ---- | ---- | -------- | -------- | - | c183 | c184 | c185 | c189 | c12435 | c10134 |`, +| ---- | ---- | ---- | ---- | -------- | -------- | +| c183 | c184 | c185 | c189 | c12435 | c10134 |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/nrta/dsj.ts b/lib/routes/gov/nrta/dsj.ts index 1b434e6fc0a0..39ba4c4f00d0 100644 --- a/lib/routes/gov/nrta/dsj.ts +++ b/lib/routes/gov/nrta/dsj.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 备案公示 | 发行许可通告 | 重大题材立项 | 重大题材摄制 | 变更通报 | - | -------- | ------------ | ---------------- | --------------- | -------- | - | note | announce | importantLixiang | importantShezhi | changing |`, +| -------- | ------------ | ---------------- | --------------- | -------- | +| note | announce | importantLixiang | importantShezhi | changing |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/nrta/news.ts b/lib/routes/gov/nrta/news.ts index 660cf4ca9934..3519b86523ff 100644 --- a/lib/routes/gov/nrta/news.ts +++ b/lib/routes/gov/nrta/news.ts @@ -28,8 +28,8 @@ export const route: Route = { maintainers: ['yuxinliu-alex'], handler, description: `| 总局要闻 | 公告公示 | 工作动态 | 其他 | - | -------- | -------- | -------- | ---- | - | 112 | 113 | 114 | |`, +| -------- | -------- | -------- | ---- | +| 112 | 113 | 114 | |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/pbc/namespace.ts b/lib/routes/gov/pbc/namespace.ts index 581c44ad91ee..7dd9a69b79a8 100644 --- a/lib/routes/gov/pbc/namespace.ts +++ b/lib/routes/gov/pbc/namespace.ts @@ -4,42 +4,42 @@ export const namespace: Namespace = { name: '中国人民银行', url: 'pbc.gov.cn', description: `
- *业务咨询* 和 *投诉建议* 可用的站点参数 +*业务咨询* 和 *投诉建议* 可用的站点参数 - | 上海市 | 北京市 | 天津市 | 河北省 | - | -------- | ------- | ------- | ------ | - | shanghai | beijing | tianjin | hebei | +| 上海市 | 北京市 | 天津市 | 河北省 | +| -------- | ------- | ------- | ------ | +| shanghai | beijing | tianjin | hebei | - | 山西省 | 内蒙古自治区 | 辽宁省 | 吉林省 | - | ------ | ------------ | -------- | ------ | - | shanxi | neimenggu | liaoning | jilin | +| 山西省 | 内蒙古自治区 | 辽宁省 | 吉林省 | +| ------ | ------------ | -------- | ------ | +| shanxi | neimenggu | liaoning | jilin | - | 黑龙江省 | 江苏省 | 浙江省 | 安徽省 | - | ------------ | ------- | -------- | ------ | - | heilongjiang | jiangsu | zhejiang | anhui | +| 黑龙江省 | 江苏省 | 浙江省 | 安徽省 | +| ------------ | ------- | -------- | ------ | +| heilongjiang | jiangsu | zhejiang | anhui | - | 福建省 | 江西省 | 山东省 | 河南省 | - | ------ | ------- | -------- | ------ | - | fujian | jiangxi | shandong | henan | +| 福建省 | 江西省 | 山东省 | 河南省 | +| ------ | ------- | -------- | ------ | +| fujian | jiangxi | shandong | henan | - | 湖北省 | 湖南省 | 广东省 | 广西壮族自治区 | - | ------ | ------ | --------- | -------------- | - | hubei | hunan | guangdong | guangxi | +| 湖北省 | 湖南省 | 广东省 | 广西壮族自治区 | +| ------ | ------ | --------- | -------------- | +| hubei | hunan | guangdong | guangxi | - | 海南省 | 重庆市 | 四川省 | 贵州省 | - | ------ | --------- | ------- | ------- | - | hainan | chongqing | sichuan | guizhou | +| 海南省 | 重庆市 | 四川省 | 贵州省 | +| ------ | --------- | ------- | ------- | +| hainan | chongqing | sichuan | guizhou | - | 云南省 | 西藏自治区 | 陕西省 | 甘肃省 | - | ------ | ---------- | ------- | ------ | - | yunnan | xizang | shaanxi | gansu | +| 云南省 | 西藏自治区 | 陕西省 | 甘肃省 | +| ------ | ---------- | ------- | ------ | +| yunnan | xizang | shaanxi | gansu | - | 青海省 | 宁夏回族自治区 | 新疆维吾尔自治区 | 大连市 | - | ------- | -------------- | ---------------- | ------ | - | qinghai | ningxia | xinjiang | dalian | +| 青海省 | 宁夏回族自治区 | 新疆维吾尔自治区 | 大连市 | +| ------- | -------------- | ---------------- | ------ | +| qinghai | ningxia | xinjiang | dalian | - | 宁波市 | 厦门市 | 青岛市 | 深圳市 | - | ------ | ------ | ------- | -------- | - | ningbo | xiamen | qingdao | shenzhen | +| 宁波市 | 厦门市 | 青岛市 | 深圳市 | +| ------ | ------ | ------- | -------- | +| ningbo | xiamen | qingdao | shenzhen |
`, }; diff --git a/lib/routes/gov/samr/xgzlyhd.ts b/lib/routes/gov/samr/xgzlyhd.ts index 9f9f7202dd26..3eca5ea914b6 100644 --- a/lib/routes/gov/samr/xgzlyhd.ts +++ b/lib/routes/gov/samr/xgzlyhd.ts @@ -62,97 +62,97 @@ export const route: Route = { url: 'xgzlyhd.samr.gov.cn/gjjly/index', description: `#### 留言类型 - | 类型 | 类型 id | - | ------------------------------------------ | -------------------------------- | - | 反腐倡廉 | 14101a4192df48b592b5cfd77a26c0cf | - | 规划统计 | b807cf9cdf434635ae908d48757e0f39 | - | 行政执法和复议 | 8af2530e77154d7b939428667b7413f6 | - | 假冒仿冒行为 | 75374a34b95341829e08e54d4a0d8c04 | - | 走私贩私 | 84c728530e1e478e94fe3f0030171c53 | - | 登记注册 | 07fff64612dc41aca871c06587abf71d | - | 个体工商户登记 | ca8f91ba9a2347a0acd57ea5fd12a5c8 | - | 信用信息公示系统 | 1698886c3cdb495998d5ea9285a487f5 | - | 市场主体垄断 | 77bfe965843844449c47d29f2feb7999 | - | 反不正当竞争 | 2c919b1dc39440d8850c4f6c405869f8 | - | 商业贿赂 | b494e6535af149c5a51fd4197993f061 | - | 打击传销与规范直销 | 407a1404844e48558da46139f16d6232 | - | 消费环境建设 | 94c2003331dd4c5fa19b0cf88d720676 | - | 网络交易监管 | 6302aac5b87140598da53f85c1ccb8fa | - | 动产抵押登记 | 3856de5835444229943b18cac7781e9f | - | 广告监管 | d0e38171042048c2bf31b05c5e57aa68 | - | 三包 | c4dbd85692604a428b1ea7613e67beb8 | - | 缺陷产品召回 | f93c9a6b81e941d09a547406370e1c0c | - | 工业生产许可 | 2b41afaabaa24325b53a5bd7deba895b | - | 产品质量监督抽查 | 4388504cb0c04e988e2cf0c90d4a3f14 | - | 食品安全协调 | 3127b9f409c24d0eaa60b13c25f819fa | - | 食品生产监管 | beaa5555d1364e5bb2a0f0a7cc9720e5 | - | 食品销售、餐饮服务、食用农产品销售监管 | 3b6c49c6ce934e1b9505601a3b881a6a | - | 保健、特殊医学用途配方和婴幼儿配方乳粉监管 | 13b43888f8554e078b1dfa475e2aaab0 | - | 食品监督抽检、召回 | 0eb6c75581bf41ecaedc629370cb425c | - | 食品安全标准 | 399cfd9abfa34c22a5cb3bb971a43819 | - | 特种设备人员、机构管理 | e5d0e51cc7d0412790efac605008bf20 | - | 特种设备检验 | 03f22fb3d4cd4f09b632079359e9dd7d | - | 计量器具 | 90b25e22861446d5822e07c7c1f5169a | - | 计量机构和人员管理 | 76202742f06c459da7482160e0ce17ad | - | 国家标准 | 299b9672e1c246e69485a5b695f42c5b | - | 行业、地方、团体、企业标准 | cbdc804c9b2c4e259a159c32eccf4ca9 | - | 认证监督管理 | 41259262a42e4de49b5c0b7362ac3796 | - | 认可与检验检测 | cb3c9d1e3d364f2a8b1cd70efa69d1cb | - | 新闻宣传 | e3e553e4019c46ccbdc06136900138e9 | - | 科技财务 | 47367b9704964355ba52899a4c5abbb0 | - | 干部人事 | 6b978e3c127c489ea8e2d693b768887e | - | 国际合作 | dd5ce768e33e435ab4bfb769ab6e079a | - | 党群工作 | aa71052978af4304937eb382f24f9902 | - | 退休干部 | 44505fc58c81428eb5cef15706007b5e | - | 虚假宣传 | 5bb2b83ecadb4bf89a779cee414a81dd | - | 滥用行政权力 | 1215206156dc48029b98da825f26fcbc | - | 公平竞争 | 9880a23dcbb04deba2cc7b4404e13ff6 | - | 滥用市场支配地位 | fea04f0acd84486e84cf71d9c13005b0 | - | 数字经济领域反垄断执法 | 4bea424a6e4c4e2aac19fe3c73f9be23 | - | 并购行为 | 90e315647acd415ca68f97fc1b42053d | - | 经营者集中案件 | d6571d2cd5624bc18191b342a2e8defb | - | 数字经济领域反垄断审查 | 03501ef176ef44fba1c7c70da44ba8a0 | - | 综合执法 | cfbb1b5dade446299670ca38844b265e | - | 信用监管 | a9d76ea04a3a4433946bc02b0bdb77eb | - | 3C 认证 | 111decc7b14a4fdbae86fb4a3ba5c0c1 | - | 食用农产品 | 3159db51f8ca4f23a9340d87d5572d40 | - | 食品添加 | 4e4b0e0152334cbb9c62fd1b80138305 | - - #### 回复部门 - - | 部门 | 部门 id | - | ---------------------------- | -------------------------------- | - | 办公厅 | 6ed539b270634667afc4d466b67a53f7 | - | 法规司 | 8625ec7ff8d744ad80a1d1a2bf19cf19 | - | 执法稽查局 | 313a8cb1c09042dea52be52cb392c557 | - | 登记注册局 | e4553350549f45f38da5602147cf8639 | - | 信用监督管理司 | 6af98157255a4a858eac5f94ba8d98f4 | - | 竞争政策协调司 | 8d2266be4791483297822e1aa5fc0a96 | - | 综合规划司 | 958e1619159c45a7b76663a59d9052ea | - | 反垄断执法一司 | f9fb3f6225964c71ab82224a91f21b2c | - | 反垄断执法二司 | 7986c79e4f16403493d5b480aec30be4 | - | 价格监督检查和反不正当竞争局 | c5d2b1b273b545cfbc6f874f670654ab | - | 网络交易监督管理司 | 6ac05b4dbd4e41c69f4529262540459b | - | 广告监督管理司 | 96457dfe16c54840885b79b4e6e17523 | - | 质量发展局 | cb8d2b16fbb540dca296aa33a43fc573 | - | 质量监督司 | af2c4e0a54c04f76b512c29ddd075d40 | - | 食品安全协调司 | cc29962c74e84ef2b21e44336da6c6c5 | - | 食品生产安全监督管理司 | b334db85a253458285db70b30ee26b0a | - | 食品经营安全监督管理司 | 4315f0261a5d49f7bdcc5a7524e19ce3 | - | 特殊食品安全监督管理司 | 62d14f386317486ca94bc53ca7f88891 | - | 食品安全抽检监测司 | abfc910832cc460a81876ad418618159 | - | 特种设备安全监察局 | ea79f90bec5840ef9b0881c83682225a | - | 计量司 | b0556236fbcf4f45b6fdec8004dac3e4 | - | 标准技术管理司 | a558d07a51f4454fa59290e0d6e93c26 | - | 标准创新管理司 | ffb3a80984b344ed8d168f4af6508af0 | - | 认证监督管理司 | ca4987393d514debb4d1e2126f576987 | - | 认可与检验检测监督管理司 | 796bfab21b15498e88c9032fe3e3c9f1 | - | 新闻宣传司 | 884fc0ea6c184ad58dda10e2170a1eda | - | 科技和财务司 | 117355eea94c426199e2e519fd98ce07 | - | 人事司 | a341e8b7929e44769b9424b7cf69d32a | - | 国际司 | f784499ef24541f5b20de4c24cfc61e7 | - | 机关党委 | a49119c6f40045dd994f3910500cedfa | - | 离退办 | 6bf265ffd1c94fa4a3f1687b03fa908b |`, +| 类型 | 类型 id | +| ------------------------------------------ | -------------------------------- | +| 反腐倡廉 | 14101a4192df48b592b5cfd77a26c0cf | +| 规划统计 | b807cf9cdf434635ae908d48757e0f39 | +| 行政执法和复议 | 8af2530e77154d7b939428667b7413f6 | +| 假冒仿冒行为 | 75374a34b95341829e08e54d4a0d8c04 | +| 走私贩私 | 84c728530e1e478e94fe3f0030171c53 | +| 登记注册 | 07fff64612dc41aca871c06587abf71d | +| 个体工商户登记 | ca8f91ba9a2347a0acd57ea5fd12a5c8 | +| 信用信息公示系统 | 1698886c3cdb495998d5ea9285a487f5 | +| 市场主体垄断 | 77bfe965843844449c47d29f2feb7999 | +| 反不正当竞争 | 2c919b1dc39440d8850c4f6c405869f8 | +| 商业贿赂 | b494e6535af149c5a51fd4197993f061 | +| 打击传销与规范直销 | 407a1404844e48558da46139f16d6232 | +| 消费环境建设 | 94c2003331dd4c5fa19b0cf88d720676 | +| 网络交易监管 | 6302aac5b87140598da53f85c1ccb8fa | +| 动产抵押登记 | 3856de5835444229943b18cac7781e9f | +| 广告监管 | d0e38171042048c2bf31b05c5e57aa68 | +| 三包 | c4dbd85692604a428b1ea7613e67beb8 | +| 缺陷产品召回 | f93c9a6b81e941d09a547406370e1c0c | +| 工业生产许可 | 2b41afaabaa24325b53a5bd7deba895b | +| 产品质量监督抽查 | 4388504cb0c04e988e2cf0c90d4a3f14 | +| 食品安全协调 | 3127b9f409c24d0eaa60b13c25f819fa | +| 食品生产监管 | beaa5555d1364e5bb2a0f0a7cc9720e5 | +| 食品销售、餐饮服务、食用农产品销售监管 | 3b6c49c6ce934e1b9505601a3b881a6a | +| 保健、特殊医学用途配方和婴幼儿配方乳粉监管 | 13b43888f8554e078b1dfa475e2aaab0 | +| 食品监督抽检、召回 | 0eb6c75581bf41ecaedc629370cb425c | +| 食品安全标准 | 399cfd9abfa34c22a5cb3bb971a43819 | +| 特种设备人员、机构管理 | e5d0e51cc7d0412790efac605008bf20 | +| 特种设备检验 | 03f22fb3d4cd4f09b632079359e9dd7d | +| 计量器具 | 90b25e22861446d5822e07c7c1f5169a | +| 计量机构和人员管理 | 76202742f06c459da7482160e0ce17ad | +| 国家标准 | 299b9672e1c246e69485a5b695f42c5b | +| 行业、地方、团体、企业标准 | cbdc804c9b2c4e259a159c32eccf4ca9 | +| 认证监督管理 | 41259262a42e4de49b5c0b7362ac3796 | +| 认可与检验检测 | cb3c9d1e3d364f2a8b1cd70efa69d1cb | +| 新闻宣传 | e3e553e4019c46ccbdc06136900138e9 | +| 科技财务 | 47367b9704964355ba52899a4c5abbb0 | +| 干部人事 | 6b978e3c127c489ea8e2d693b768887e | +| 国际合作 | dd5ce768e33e435ab4bfb769ab6e079a | +| 党群工作 | aa71052978af4304937eb382f24f9902 | +| 退休干部 | 44505fc58c81428eb5cef15706007b5e | +| 虚假宣传 | 5bb2b83ecadb4bf89a779cee414a81dd | +| 滥用行政权力 | 1215206156dc48029b98da825f26fcbc | +| 公平竞争 | 9880a23dcbb04deba2cc7b4404e13ff6 | +| 滥用市场支配地位 | fea04f0acd84486e84cf71d9c13005b0 | +| 数字经济领域反垄断执法 | 4bea424a6e4c4e2aac19fe3c73f9be23 | +| 并购行为 | 90e315647acd415ca68f97fc1b42053d | +| 经营者集中案件 | d6571d2cd5624bc18191b342a2e8defb | +| 数字经济领域反垄断审查 | 03501ef176ef44fba1c7c70da44ba8a0 | +| 综合执法 | cfbb1b5dade446299670ca38844b265e | +| 信用监管 | a9d76ea04a3a4433946bc02b0bdb77eb | +| 3C 认证 | 111decc7b14a4fdbae86fb4a3ba5c0c1 | +| 食用农产品 | 3159db51f8ca4f23a9340d87d5572d40 | +| 食品添加 | 4e4b0e0152334cbb9c62fd1b80138305 | + +#### 回复部门 + +| 部门 | 部门 id | +| ---------------------------- | -------------------------------- | +| 办公厅 | 6ed539b270634667afc4d466b67a53f7 | +| 法规司 | 8625ec7ff8d744ad80a1d1a2bf19cf19 | +| 执法稽查局 | 313a8cb1c09042dea52be52cb392c557 | +| 登记注册局 | e4553350549f45f38da5602147cf8639 | +| 信用监督管理司 | 6af98157255a4a858eac5f94ba8d98f4 | +| 竞争政策协调司 | 8d2266be4791483297822e1aa5fc0a96 | +| 综合规划司 | 958e1619159c45a7b76663a59d9052ea | +| 反垄断执法一司 | f9fb3f6225964c71ab82224a91f21b2c | +| 反垄断执法二司 | 7986c79e4f16403493d5b480aec30be4 | +| 价格监督检查和反不正当竞争局 | c5d2b1b273b545cfbc6f874f670654ab | +| 网络交易监督管理司 | 6ac05b4dbd4e41c69f4529262540459b | +| 广告监督管理司 | 96457dfe16c54840885b79b4e6e17523 | +| 质量发展局 | cb8d2b16fbb540dca296aa33a43fc573 | +| 质量监督司 | af2c4e0a54c04f76b512c29ddd075d40 | +| 食品安全协调司 | cc29962c74e84ef2b21e44336da6c6c5 | +| 食品生产安全监督管理司 | b334db85a253458285db70b30ee26b0a | +| 食品经营安全监督管理司 | 4315f0261a5d49f7bdcc5a7524e19ce3 | +| 特殊食品安全监督管理司 | 62d14f386317486ca94bc53ca7f88891 | +| 食品安全抽检监测司 | abfc910832cc460a81876ad418618159 | +| 特种设备安全监察局 | ea79f90bec5840ef9b0881c83682225a | +| 计量司 | b0556236fbcf4f45b6fdec8004dac3e4 | +| 标准技术管理司 | a558d07a51f4454fa59290e0d6e93c26 | +| 标准创新管理司 | ffb3a80984b344ed8d168f4af6508af0 | +| 认证监督管理司 | ca4987393d514debb4d1e2126f576987 | +| 认可与检验检测监督管理司 | 796bfab21b15498e88c9032fe3e3c9f1 | +| 新闻宣传司 | 884fc0ea6c184ad58dda10e2170a1eda | +| 科技和财务司 | 117355eea94c426199e2e519fd98ce07 | +| 人事司 | a341e8b7929e44769b9424b7cf69d32a | +| 国际司 | f784499ef24541f5b20de4c24cfc61e7 | +| 机关党委 | a49119c6f40045dd994f3910500cedfa | +| 离退办 | 6bf265ffd1c94fa4a3f1687b03fa908b |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/sh/fgw/index.ts b/lib/routes/gov/sh/fgw/index.ts index 500491ffb6cc..39e168a21a84 100644 --- a/lib/routes/gov/sh/fgw/index.ts +++ b/lib/routes/gov/sh/fgw/index.ts @@ -117,9 +117,9 @@ export const route: Route = { 若订阅 [最新信息公开](https://fgw.sh.gov.cn/fgw_zxxxgk/index.html),网址为 \`https://fgw.sh.gov.cn/fgw_zxxxgk/index.html\`。截取 \`https://fgw.sh.gov.cn/\` 到末尾 \`/index.html\` 的部分 \`fgw_zxxxgk\` 作为参数填入,此时路由为 [\`/gov/sh/fgw/fgw_zxxxgk\`](https://rsshub.app/gov/sh/fgw/fgw_zxxxgk)。 ::: - | 最新信息公开 | 要闻动态 | - | ------------ | ---------- | - | fgw_zxxxgk | fgw_fzggdt | +| 最新信息公开 | 要闻动态 | +| ------------ | ---------- | +| fgw_zxxxgk | fgw_fzggdt | `, categories: ['government'], diff --git a/lib/routes/gov/shaanxi/kjt.ts b/lib/routes/gov/shaanxi/kjt.ts index 53ebdfd39c9a..c13763fa7d00 100644 --- a/lib/routes/gov/shaanxi/kjt.ts +++ b/lib/routes/gov/shaanxi/kjt.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 科技头条 | 工作动态 | 基层科技 | 科技博览 | 媒体聚焦 | 通知公告 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 1061 | 24 | 27 | 25 | 28 | 221 |`, +| -------- | -------- | -------- | -------- | -------- | -------- | +| 1061 | 24 | 27 | 25 | 28 | 221 |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/shenzhen/hrss/szksy/index.ts b/lib/routes/gov/shenzhen/hrss/szksy/index.ts index 0a985855974c..b9a4a045a406 100644 --- a/lib/routes/gov/shenzhen/hrss/szksy/index.ts +++ b/lib/routes/gov/shenzhen/hrss/szksy/index.ts @@ -29,8 +29,8 @@ export const route: Route = { handler, url: 'hrss.sz.gov.cn/*', description: `| 通知公告 | 报名信息 | 成绩信息 | 合格标准 | 合格人员公示 | 证书发放信息 | - | :------: | :------: | :------: | :------: | :----------: | :----------: | - | tzgg | bmxx | cjxx | hgbz | hgrygs | zsff |`, +| :------: | :------: | :------: | :------: | :----------: | :----------: | +| tzgg | bmxx | cjxx | hgbz | hgrygs | zsff |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/shenzhen/xxgk/zfxxgj.ts b/lib/routes/gov/shenzhen/xxgk/zfxxgj.ts index 0feb049a894e..0c129f15a61e 100644 --- a/lib/routes/gov/shenzhen/xxgk/zfxxgj.ts +++ b/lib/routes/gov/shenzhen/xxgk/zfxxgj.ts @@ -43,8 +43,8 @@ export const route: Route = { maintainers: ['laoxua'], handler, description: `| 通知公告 | 政府采购 | 资金信息 | 重大项目 | - | :------: | :------: | :------: | :------: | - | tzgg | zfcg | zjxx | zdxm |`, +| :------: | :------: | :------: | :------: | +| tzgg | zfcg | zjxx | zdxm |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/shenzhen/zjj/index.ts b/lib/routes/gov/shenzhen/zjj/index.ts index 8893e007e4c7..86c47cc67340 100644 --- a/lib/routes/gov/shenzhen/zjj/index.ts +++ b/lib/routes/gov/shenzhen/zjj/index.ts @@ -34,8 +34,8 @@ export const route: Route = { maintainers: ['lonn'], handler, description: `| 通知公告 | - | :------: | - | tzgg |`, +| :------: | +| tzgg |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/shenzhen/zzb/index.ts b/lib/routes/gov/shenzhen/zzb/index.ts index 21df8a1cc550..f4e8d06a1f80 100644 --- a/lib/routes/gov/shenzhen/zzb/index.ts +++ b/lib/routes/gov/shenzhen/zzb/index.ts @@ -29,8 +29,8 @@ export const route: Route = { handler, url: 'zzb.sz.gov.cn/*', description: `| 通知公告 | 任前公示 | 政策法规 | 工作动态 | 部门预算决算公开 | 业务表格下载 | - | :------: | :------: | :------: | :------: | :--------------: | :----------: | - | tzgg | rqgs | zcfg | gzdt | xcbd | bgxz |`, +| :------: | :------: | :------: | :------: | :--------------: | :----------: | +| tzgg | rqgs | zcfg | gzdt | xcbd | bgxz |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/sichuan/deyang/govpublicinfo.ts b/lib/routes/gov/sichuan/deyang/govpublicinfo.ts index 79501dc07728..2cce6fcfb707 100644 --- a/lib/routes/gov/sichuan/deyang/govpublicinfo.ts +++ b/lib/routes/gov/sichuan/deyang/govpublicinfo.ts @@ -93,8 +93,8 @@ export const route: Route = { maintainers: ['zytomorrow'], handler, description: `| 法定主动内容 | 公示公告 | - | :----------: | :------: | - | fdzdnr | gsgg |`, +| :----------: | :------: | +| fdzdnr | gsgg |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/sichuan/deyang/mztoday.ts b/lib/routes/gov/sichuan/deyang/mztoday.ts index 65a55dbc0445..4dd624782bff 100644 --- a/lib/routes/gov/sichuan/deyang/mztoday.ts +++ b/lib/routes/gov/sichuan/deyang/mztoday.ts @@ -144,8 +144,8 @@ export const route: Route = { handler, url: 'www.mztoday.gov.cn/*', description: `| 最新 | 推荐 | 时政 | 教育 | 民生 | 文旅 | 经济 | 文明创建 | 部门 | 镇(街道) | 健康绵竹 | 南轩讲堂 | 视频 | 文明实践 | 领航中国 | 绵竹年画 | 绵竹历史 | 绵竹旅游 | 外媒看绵竹 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---------- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | ---------- | - | zx | tj | sz | jy | ms | wl | jj | wmcj | bm | zj | jkmz | nxjt | sp | wmsj | lhzg | mznh | mzls | mzly | wmkmz |`, +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | -------- | ---- | ---------- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | ---------- | +| zx | tj | sz | jy | ms | wl | jj | wmcj | bm | zj | jkmz | nxjt | sp | wmsj | lhzg | mznh | mzls | mzly | wmkmz |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/suzhou/news.ts b/lib/routes/gov/suzhou/news.ts index 3a883b108ebd..727a06130b9b 100644 --- a/lib/routes/gov/suzhou/news.ts +++ b/lib/routes/gov/suzhou/news.ts @@ -28,22 +28,22 @@ export const route: Route = { maintainers: ['EsuRt', 'luyuhuang'], handler, description: `| 新闻栏目名 | :uid | - | :--------: | :--------------: | - | 苏州要闻 | news 或 szyw | - | 区县快讯 | district 或 qxkx | - | 部门动态 | bmdt | - | 新闻视频 | xwsp | - | 政务公告 | zwgg | - | 便民公告 | mszx | - | 民生资讯 | bmzx | +| :--------: | :--------------: | +| 苏州要闻 | news 或 szyw | +| 区县快讯 | district 或 qxkx | +| 部门动态 | bmdt | +| 新闻视频 | xwsp | +| 政务公告 | zwgg | +| 便民公告 | mszx | +| 民生资讯 | bmzx | - | 热点专题栏目名 | :uid | - | :------------: | :----: | - | 热点专题 | rdzt | - | 市本级专题 | sbjzt | - | 最新热点专题 | zxrdzt | - | 往期专题 | wqzt | - | 区县专题 | qxzt | +| 热点专题栏目名 | :uid | +| :------------: | :----: | +| 热点专题 | rdzt | +| 市本级专题 | sbjzt | +| 最新热点专题 | zxrdzt | +| 往期专题 | wqzt | +| 区县专题 | qxzt | ::: tip **热点专题**栏目包含**市本级专题**和**区县专题** diff --git a/lib/routes/gov/taiyuan/rsj.ts b/lib/routes/gov/taiyuan/rsj.ts index 413ca0172823..f28f279863e1 100644 --- a/lib/routes/gov/taiyuan/rsj.ts +++ b/lib/routes/gov/taiyuan/rsj.ts @@ -29,8 +29,8 @@ export const route: Route = { handler, url: 'rsj.taiyuan.gov.cn/*', description: `| 工作动态 | 太原新闻 | 通知公告 | 县区动态 | 国内动态 | 图片新闻 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | gzdt | tyxw | gggs | xqdt | gndt | tpxw |`, +| -------- | -------- | -------- | -------- | -------- | -------- | +| gzdt | tyxw | gggs | xqdt | gndt | tpxw |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/xuzhou/hrss.ts b/lib/routes/gov/xuzhou/hrss.ts index 030893e19996..8855ad072925 100644 --- a/lib/routes/gov/xuzhou/hrss.ts +++ b/lib/routes/gov/xuzhou/hrss.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 通知公告 | 要闻动态 | 县区动态 | 事业招聘 | 企业招聘 | 政声传递 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | | 001001 | 001002 | 001004 | 001005 | 001006 |`, +| -------- | -------- | -------- | -------- | -------- | -------- | +| | 001001 | 001002 | 001004 | 001005 | 001006 |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/zhejiang/gwy.ts b/lib/routes/gov/zhejiang/gwy.ts index e7480327a03e..e0276fb6daa2 100644 --- a/lib/routes/gov/zhejiang/gwy.ts +++ b/lib/routes/gov/zhejiang/gwy.ts @@ -28,28 +28,28 @@ export const route: Route = { handler, url: 'zjks.gov.cn/zjgwy/website/init.htm', description: `| 分类 | id | - | ------------ | -- | - | 重要通知 | 1 | - | 招考公告 | 2 | - | 招考政策 | 3 | - | 面试体检考察 | 4 | - | 录用公示专栏 | 5 | - - | 地市 | id | - | ------------ | ----- | - | 浙江省 | 133 | - | 浙江省杭州市 | 13301 | - | 浙江省宁波市 | 13302 | - | 浙江省温州市 | 13303 | - | 浙江省嘉兴市 | 13304 | - | 浙江省湖州市 | 13305 | - | 浙江省绍兴市 | 13306 | - | 浙江省金华市 | 13307 | - | 浙江省衢州市 | 13308 | - | 浙江省舟山市 | 13309 | - | 浙江省台州市 | 13310 | - | 浙江省丽水市 | 13311 | - | 省级单位 | 13317 |`, +| ------------ | -- | +| 重要通知 | 1 | +| 招考公告 | 2 | +| 招考政策 | 3 | +| 面试体检考察 | 4 | +| 录用公示专栏 | 5 | + +| 地市 | id | +| ------------ | ----- | +| 浙江省 | 133 | +| 浙江省杭州市 | 13301 | +| 浙江省宁波市 | 13302 | +| 浙江省温州市 | 13303 | +| 浙江省嘉兴市 | 13304 | +| 浙江省湖州市 | 13305 | +| 浙江省绍兴市 | 13306 | +| 浙江省金华市 | 13307 | +| 浙江省衢州市 | 13308 | +| 浙江省舟山市 | 13309 | +| 浙江省台州市 | 13310 | +| 浙江省丽水市 | 13311 | +| 省级单位 | 13317 |`, }; async function handler(ctx) { diff --git a/lib/routes/gov/zhengce/govall.ts b/lib/routes/gov/zhengce/govall.ts index 77e9a6ed4257..fe3fb7da1d5b 100644 --- a/lib/routes/gov/zhengce/govall.ts +++ b/lib/routes/gov/zhengce/govall.ts @@ -29,15 +29,15 @@ export const route: Route = { handler, url: 'www.gov.cn/', description: `| 选项 | 意义 | 备注 | - | :-----------------------------: | :----------------------------------------------: | :----------------------------: | - | orpro | 包含以下任意一个关键词。 | 用空格分隔。 | - | allpro | 包含以下全部关键词 | | - | notpro | 不包含以下关键词 | | - | inpro | 完整不拆分的关键词 | | - | searchfield | title: 搜索词在标题中;content: 搜索词在正文中。 | 默认为空,即网页的任意位置。 | - | pubmintimeYear, pubmintimeMonth | 从某年某月 | 单独使用月份参数无法只筛选月份 | - | pubmaxtimeYear, pubmaxtimeMonth | 到某年某月 | 单独使用月份参数无法只筛选月份 | - | colid | 栏目 | 比较复杂,不建议使用 |`, +| :-----------------------------: | :----------------------------------------------: | :----------------------------: | +| orpro | 包含以下任意一个关键词。 | 用空格分隔。 | +| allpro | 包含以下全部关键词 | | +| notpro | 不包含以下关键词 | | +| inpro | 完整不拆分的关键词 | | +| searchfield | title: 搜索词在标题中;content: 搜索词在正文中。 | 默认为空,即网页的任意位置。 | +| pubmintimeYear, pubmintimeMonth | 从某年某月 | 单独使用月份参数无法只筛选月份 | +| pubmaxtimeYear, pubmaxtimeMonth | 到某年某月 | 单独使用月份参数无法只筛选月份 | +| colid | 栏目 | 比较复杂,不建议使用 |`, }; async function handler(ctx) { diff --git a/lib/routes/grist/topic.ts b/lib/routes/grist/topic.ts index 59984b09f341..e4702162732b 100644 --- a/lib/routes/grist/topic.ts +++ b/lib/routes/grist/topic.ts @@ -25,49 +25,49 @@ export const route: Route = { url: 'grist.org/articles/', description: `Topics - | Topic Name | Topic Link | - | ------------------------ | ------------------ | - | Accountability | accountability | - | Agriculture | agriculture | - | Ask Umbra | ask-umbra-series | - | Buildings | buildings | - | Cities | cities | - | Climate & Energy | climate-energy | - | Climate Fiction | climate-fiction | - | Climate of Courage | climate-of-courage | - | COP26 | cop26 | - | COP27 | cop27 | - | Culture | culture | - | Economics | economics | - | Energy | energy | - | Equity | equity | - | Extreme Weather | extreme-weather | - | Fix | fix | - | Food | food | - | Grist | grist | - | Grist News | grist-news | - | Health | health | - | Housing | housing | - | Indigenous Affairs | indigenous | - | International | international | - | Labor | labor | - | Language | language | - | Migration | migration | - | Opinion | opinion | - | Politics | politics | - | Protest | protest | - | Race | race | - | Regulation | regulation | - | Science | science | - | Shift Happens Newsletter | shift-happens | - | Solutions | solutions | - | Spanish | spanish | - | Sponsored | sponsored | - | Technology | technology | - | Temperature Check | temperature-check | - | Uncategorized | article | - | Updates | updates | - | Video | video |`, +| Topic Name | Topic Link | +| ------------------------ | ------------------ | +| Accountability | accountability | +| Agriculture | agriculture | +| Ask Umbra | ask-umbra-series | +| Buildings | buildings | +| Cities | cities | +| Climate & Energy | climate-energy | +| Climate Fiction | climate-fiction | +| Climate of Courage | climate-of-courage | +| COP26 | cop26 | +| COP27 | cop27 | +| Culture | culture | +| Economics | economics | +| Energy | energy | +| Equity | equity | +| Extreme Weather | extreme-weather | +| Fix | fix | +| Food | food | +| Grist | grist | +| Grist News | grist-news | +| Health | health | +| Housing | housing | +| Indigenous Affairs | indigenous | +| International | international | +| Labor | labor | +| Language | language | +| Migration | migration | +| Opinion | opinion | +| Politics | politics | +| Protest | protest | +| Race | race | +| Regulation | regulation | +| Science | science | +| Shift Happens Newsletter | shift-happens | +| Solutions | solutions | +| Spanish | spanish | +| Sponsored | sponsored | +| Technology | technology | +| Temperature Check | temperature-check | +| Uncategorized | article | +| Updates | updates | +| Video | video |`, }; async function handler(ctx) { diff --git a/lib/routes/guancha/index.ts b/lib/routes/guancha/index.ts index 9b3fd0c9df0f..33616cbf5915 100644 --- a/lib/routes/guancha/index.ts +++ b/lib/routes/guancha/index.ts @@ -58,8 +58,8 @@ export const route: Route = { handler, url: 'guancha.cn/', description: `| 全部 | 评论 & 研究 | 要闻 | 风闻 | 热点新闻 | 滚动新闻 | - | ---- | ----------- | ----- | ------- | -------- | -------- | - | all | review | story | fengwen | redian | gundong | +| ---- | ----------- | ----- | ------- | -------- | -------- | +| all | review | story | fengwen | redian | gundong | home = 评论 & 研究 + 要闻 + 风闻 diff --git a/lib/routes/guancha/member.ts b/lib/routes/guancha/member.ts index e80fc3cd21d2..dac3eff1a6ac 100644 --- a/lib/routes/guancha/member.ts +++ b/lib/routes/guancha/member.ts @@ -34,8 +34,8 @@ export const route: Route = { handler, url: 'guancha.cn/', description: `| 精选 | 观书堂 | 在线课 | 观学院 | - | --------- | ------ | ------- | -------- | - | recommend | books | courses | huodongs |`, +| --------- | ------ | ------- | -------- | +| recommend | books | courses | huodongs |`, }; async function handler(ctx) { diff --git a/lib/routes/guokr/channel.ts b/lib/routes/guokr/channel.ts index 87e95d63cbf5..1b19a6eb30e7 100644 --- a/lib/routes/guokr/channel.ts +++ b/lib/routes/guokr/channel.ts @@ -25,8 +25,8 @@ export const route: Route = { handler, url: 'guokr.com/', description: `| 物种日历 | 吃货研究所 | 美丽也是技术活 | - | -------- | ---------- | -------------- | - | calendar | institute | beauty |`, +| -------- | ---------- | -------------- | +| calendar | institute | beauty |`, }; async function handler(ctx) { diff --git a/lib/routes/gzdaily/app.ts b/lib/routes/gzdaily/app.ts index 7b294efaa939..2dfaaf02d40c 100644 --- a/lib/routes/gzdaily/app.ts +++ b/lib/routes/gzdaily/app.ts @@ -32,13 +32,13 @@ export const route: Route = { 常用栏目 ID: - | 栏目名 | ID | - | ------ | ---- | - | 首页 | 74 | - | 时局 | 374 | - | 广州 | 371 | - | 大湾区 | 397 | - | 城区 | 2980 |`, +| 栏目名 | ID | +| ------ | ---- | +| 首页 | 74 | +| 时局 | 374 | +| 广州 | 371 | +| 大湾区 | 397 | +| 城区 | 2980 |`, }; async function handler(ctx) { diff --git a/lib/routes/hacking8/index.ts b/lib/routes/hacking8/index.ts index 18b97b197c37..70ac38a7fc19 100644 --- a/lib/routes/hacking8/index.ts +++ b/lib/routes/hacking8/index.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 推荐 | 最近更新 | 漏洞 / PoC 监控 | PDF | - | ----- | -------- | --------------- | --- | - | likes | index | vul-poc | pdf |`, +| ----- | -------- | --------------- | --- | +| likes | index | vul-poc | pdf |`, }; async function handler(ctx) { diff --git a/lib/routes/hafu/news.ts b/lib/routes/hafu/news.ts index a4f4cccfb422..cbc6533ebab4 100644 --- a/lib/routes/hafu/news.ts +++ b/lib/routes/hafu/news.ts @@ -18,8 +18,8 @@ export const route: Route = { maintainers: [], handler, description: `| 校内公告通知 | 教务处公告通知 | 招生就业处公告通知 | - | ------------ | -------------- | ------------------ | - | ggtz | jwc | zsjyc |`, +| ------------ | -------------- | ------------------ | +| ggtz | jwc | zsjyc |`, }; async function handler(ctx) { diff --git a/lib/routes/hakkatv/type.ts b/lib/routes/hakkatv/type.ts index 0309c64d9749..7644ad1263fe 100644 --- a/lib/routes/hakkatv/type.ts +++ b/lib/routes/hakkatv/type.ts @@ -32,8 +32,8 @@ export const route: Route = { handler, url: 'hakkatv.org.tw/news', description: `| 客家焦點 | 政經要聞 | 民生醫療 | 地方風采 | 國際萬象 | - | -------- | --------- | -------- | -------- | ------------- | - | hakka | political | medical | local | international |`, +| -------- | --------- | -------- | -------- | ------------- | +| hakka | political | medical | local | international |`, }; async function handler(ctx) { diff --git a/lib/routes/hbr/topic.ts b/lib/routes/hbr/topic.ts index 150527a5c529..b40c2bcd2760 100644 --- a/lib/routes/hbr/topic.ts +++ b/lib/routes/hbr/topic.ts @@ -37,8 +37,8 @@ export const route: Route = { maintainers: ['nczitzk', 'pseudoyu'], handler, description: `| POPULAR | FROM THE STORE | FOR YOU | - | ------- | -------------- | ------- | - | Popular | From the Store | For You | +| ------- | -------------- | ------- | +| Popular | From the Store | For You | ::: tip Click here to view [All Topics](https://hbr.org/topics) diff --git a/lib/routes/hellobtc/kepu.ts b/lib/routes/hellobtc/kepu.ts index 62dc96884d63..3f71ce418716 100644 --- a/lib/routes/hellobtc/kepu.ts +++ b/lib/routes/hellobtc/kepu.ts @@ -46,8 +46,8 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| latest | bitcoin | ethereum | defi | inter\_blockchain | mining | safety | satoshi\_nakomoto | public\_blockchain | - | ------ | ------- | -------- | ---- | ----------------- | ------ | ------ | ----------------- | ------------------ | - | 最新 | 比特币 | 以太坊 | DeFi | 跨链 | 挖矿 | 安全 | 中本聪 | 公链 |`, +| ------ | ------- | -------- | ---- | ----------------- | ------ | ------ | ----------------- | ------------------ | +| 最新 | 比特币 | 以太坊 | DeFi | 跨链 | 挖矿 | 安全 | 中本聪 | 公链 |`, }; async function handler(ctx) { diff --git a/lib/routes/hellogithub/article.ts b/lib/routes/hellogithub/article.ts index 7d2f09ec6efb..7e6329f6ea3d 100644 --- a/lib/routes/hellogithub/article.ts +++ b/lib/routes/hellogithub/article.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['moke8', 'nczitzk', 'CaoMeiYouRen'], handler, description: `| 热门 | 最近 | - | ---- | ---- | - | hot | last |`, +| ---- | ---- | +| hot | last |`, }; async function handler(ctx) { diff --git a/lib/routes/hellogithub/index.ts b/lib/routes/hellogithub/index.ts index 0e4790760ebc..713f38d5b9a6 100644 --- a/lib/routes/hellogithub/index.ts +++ b/lib/routes/hellogithub/index.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['moke8', 'nczitzk', 'CaoMeiYouRen'], handler, description: `| 精选 | 全部 | - | ---- | ---- | - | featured | all |`, +| ---- | ---- | +| featured | all |`, }; async function handler(ctx) { diff --git a/lib/routes/hellogithub/report.ts b/lib/routes/hellogithub/report.ts index dcf3f97eb05f..bf71a6d1faff 100644 --- a/lib/routes/hellogithub/report.ts +++ b/lib/routes/hellogithub/report.ts @@ -20,8 +20,8 @@ export const route: Route = { maintainers: ['moke8', 'nczitzk'], handler, description: `| 编程语言 | 服务器 | 数据库 | - | -------- | -------- | ---------- | - | tiobe | netcraft | db-engines |`, +| -------- | -------- | ---------- | +| tiobe | netcraft | db-engines |`, }; async function handler(ctx) { diff --git a/lib/routes/hfut/hf/notice.ts b/lib/routes/hfut/hf/notice.ts index cff0e9492b29..d39b935bd28e 100644 --- a/lib/routes/hfut/hf/notice.ts +++ b/lib/routes/hfut/hf/notice.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['batemax'], handler, description: `| 通知公告(https://news.hfut.edu.cn/tzgg2.htm) | 教学科研(https://news.hfut.edu.cn/tzgg2/jxky.htm) | 其他通知(https://news.hfut.edu.cn/tzgg2/qttz.htm) | - | ------------ | -------------- | ------------------ | - | tzgg | jxky | qttz |`, +| ------------ | -------------- | ------------------ | +| tzgg | jxky | qttz |`, }; async function handler(ctx) { diff --git a/lib/routes/hfut/xc/notice.ts b/lib/routes/hfut/xc/notice.ts index 1dc36c663c71..538867464d44 100644 --- a/lib/routes/hfut/xc/notice.ts +++ b/lib/routes/hfut/xc/notice.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['batemax'], handler, description: `| 通知公告(https://xc.hfut.edu.cn/1955/list.htm) | 院系动态-工作通知(https://xc.hfut.edu.cn/gztz/list.htm) | - | ------------ | -------------- | - | tzgg | gztz |`, +| ------------ | -------------- | +| tzgg | gztz |`, }; async function handler(ctx) { diff --git a/lib/routes/hinatazaka46/blog.ts b/lib/routes/hinatazaka46/blog.ts index 8e40c16f14ce..8439743d5e7b 100644 --- a/lib/routes/hinatazaka46/blog.ts +++ b/lib/routes/hinatazaka46/blog.ts @@ -23,41 +23,41 @@ export const route: Route = { handler, description: `Member ID - | Member ID | Name | - | --------- | ------------ | - | 2000 | 四期生リレー | - | 36 | 渡辺 莉奈 | - | 35 | 山下 葉留花 | - | 34 | 宮地 すみれ | - | 33 | 藤嶌 果歩 | - | 32 | 平岡 海月 | - | 31 | 平尾 帆夏 | - | 30 | 竹内 希来里 | - | 29 | 正源司 陽子 | - | 28 | 清水 理央 | - | 27 | 小西 夏菜実 | - | 26 | 岸 帆夏 | - | 25 | 石塚 瑶季 | - | 24 | 山口 陽世 | - | 23 | 森本 茉莉 | - | 22 | 髙橋 未来虹 | - | 21 | 上村 ひなの | - | 18 | 松田 好花 | - | 17 | 濱岸 ひより | - | 16 | 丹生 明里 | - | 15 | 富田 鈴花 | - | 14 | 小坂 菜緒 | - | 13 | 河田 陽菜 | - | 12 | 金村 美玖 | - | 11 | 東村 芽依 | - | 10 | 高本 彩花 | - | 9 | 高瀬 愛奈 | - | 8 | 佐々木 美玲 | - | 7 | 佐々木 久美 | - | 6 | 齊藤 京子 | - | 5 | 加藤 史帆 | - | 4 | 影山 優佳 | - | 2 | 潮 紗理菜 |`, +| Member ID | Name | +| --------- | ------------ | +| 2000 | 四期生リレー | +| 36 | 渡辺 莉奈 | +| 35 | 山下 葉留花 | +| 34 | 宮地 すみれ | +| 33 | 藤嶌 果歩 | +| 32 | 平岡 海月 | +| 31 | 平尾 帆夏 | +| 30 | 竹内 希来里 | +| 29 | 正源司 陽子 | +| 28 | 清水 理央 | +| 27 | 小西 夏菜実 | +| 26 | 岸 帆夏 | +| 25 | 石塚 瑶季 | +| 24 | 山口 陽世 | +| 23 | 森本 茉莉 | +| 22 | 髙橋 未来虹 | +| 21 | 上村 ひなの | +| 18 | 松田 好花 | +| 17 | 濱岸 ひより | +| 16 | 丹生 明里 | +| 15 | 富田 鈴花 | +| 14 | 小坂 菜緒 | +| 13 | 河田 陽菜 | +| 12 | 金村 美玖 | +| 11 | 東村 芽依 | +| 10 | 高本 彩花 | +| 9 | 高瀬 愛奈 | +| 8 | 佐々木 美玲 | +| 7 | 佐々木 久美 | +| 6 | 齊藤 京子 | +| 5 | 加藤 史帆 | +| 4 | 影山 優佳 | +| 2 | 潮 紗理菜 |`, }; async function handler(ctx) { diff --git a/lib/routes/hitcon/zeroday.ts b/lib/routes/hitcon/zeroday.ts index d5acb05354ff..3d8cd77eb07c 100644 --- a/lib/routes/hitcon/zeroday.ts +++ b/lib/routes/hitcon/zeroday.ts @@ -29,8 +29,8 @@ export const route: Route = { }, handler, description: `| 缺省 | all | closed | disclosed | patching | - | ------ | ---- | ------ | --------- | -------- | - | 活動中 | 全部 | 關閉 | 公開 | 修補中 |`, +| ------ | ---- | ------ | --------- | -------- | +| 活動中 | 全部 | 關閉 | 公開 | 修補中 |`, }; const baseUrl = 'https://zeroday.hitcon.org/vulnerability'; diff --git a/lib/routes/hitsz/article.ts b/lib/routes/hitsz/article.ts index 11b108a64e07..fe8731a5ed84 100644 --- a/lib/routes/hitsz/article.ts +++ b/lib/routes/hitsz/article.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['xandery-geek'], handler, description: `| 校区要闻 | 媒体报道 | 综合新闻 | 校园动态 | 讲座论坛 | 热点专题 | 招标信息 | 重要关注 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | id-116 | id-80 | id-75 | id-77 | id-78 | id-79 | id-81 | id-124 |`, +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| id-116 | id-80 | id-75 | id-77 | id-78 | id-79 | id-81 | id-124 |`, }; async function handler(ctx) { diff --git a/lib/routes/hizu/index.ts b/lib/routes/hizu/index.ts index 89b682825e1c..3a108f6d0cbe 100644 --- a/lib/routes/hizu/index.ts +++ b/lib/routes/hizu/index.ts @@ -54,31 +54,31 @@ export const route: Route = { handler, url: 'hizh.cn/', description: `| 分类 | 编号 | - | -------- | ------------------------ | - | 热点 | 5dd92265e4b0bf88dd8c1175 | - | 订阅 | 5dd921a7e4b0bf88dd8c116f | - | 学党史 | 604f1cbbe4b0cf5c2234d470 | - | 政经 | 5dd92242e4b0bf88dd8c1174 | - | 合作区 | 61259fd6e4b0d294f7f9786d | - | 名记名播 | 61dfe511e4b0248b60d1c568 | - | 大湾区 | 5dd9222ce4b0bf88dd8c1173 | - | 网评 | 617805e4e4b037abacfd4820 | - | TV 新闻 | 5dd9220de4b0bf88dd8c1172 | - | 音频 | 5e6edd50e4b02ebde0ab061e | - | 澳门 | 600e8ad4e4b02c3a6af6aaa8 | - | 政务 | 600f760fe4b0e33cf6f8e68e | - | 教育 | 5ff7c0fde4b0e2f210d05e20 | - | 深圳 | 5fc88615e4b0e3055e693e0a | - | 中山 | 600e8a93e4b02c3a6af6aa80 | - | 民生 | 5dd921ece4b0bf88dd8c1170 | - | 社区 | 61148184e4b08d3215364396 | - | 专题 | 5dd9215fe4b0bf88dd8c116b | - | 战疫 | 5e2e5107e4b0c14b5d0e3d04 | - | 横琴 | 5f88eaf2e4b0a27cd404e09e | - | 香洲 | 5f86a3f5e4b09d75f99dde7d | - | 金湾 | 5e8c42b4e4b0347c7e5836e0 | - | 斗门 | 5ee70534e4b07b8a779a1ad6 | - | 高新 | 607d37ade4b05c59ac2f3d40 |`, +| -------- | ------------------------ | +| 热点 | 5dd92265e4b0bf88dd8c1175 | +| 订阅 | 5dd921a7e4b0bf88dd8c116f | +| 学党史 | 604f1cbbe4b0cf5c2234d470 | +| 政经 | 5dd92242e4b0bf88dd8c1174 | +| 合作区 | 61259fd6e4b0d294f7f9786d | +| 名记名播 | 61dfe511e4b0248b60d1c568 | +| 大湾区 | 5dd9222ce4b0bf88dd8c1173 | +| 网评 | 617805e4e4b037abacfd4820 | +| TV 新闻 | 5dd9220de4b0bf88dd8c1172 | +| 音频 | 5e6edd50e4b02ebde0ab061e | +| 澳门 | 600e8ad4e4b02c3a6af6aaa8 | +| 政务 | 600f760fe4b0e33cf6f8e68e | +| 教育 | 5ff7c0fde4b0e2f210d05e20 | +| 深圳 | 5fc88615e4b0e3055e693e0a | +| 中山 | 600e8a93e4b02c3a6af6aa80 | +| 民生 | 5dd921ece4b0bf88dd8c1170 | +| 社区 | 61148184e4b08d3215364396 | +| 专题 | 5dd9215fe4b0bf88dd8c116b | +| 战疫 | 5e2e5107e4b0c14b5d0e3d04 | +| 横琴 | 5f88eaf2e4b0a27cd404e09e | +| 香洲 | 5f86a3f5e4b09d75f99dde7d | +| 金湾 | 5e8c42b4e4b0347c7e5836e0 | +| 斗门 | 5ee70534e4b07b8a779a1ad6 | +| 高新 | 607d37ade4b05c59ac2f3d40 |`, }; async function handler(ctx) { diff --git a/lib/routes/hkej/index.ts b/lib/routes/hkej/index.ts index 619b00172d72..08bab035e798 100644 --- a/lib/routes/hkej/index.ts +++ b/lib/routes/hkej/index.ts @@ -81,8 +81,8 @@ export const route: Route = { handler, url: 'hkej.com/', description: `| index | stock | hongkong | china | international | property | current | - | -------- | -------- | -------- | -------- | ------------- | -------- | -------- | - | 全部新闻 | 港股直击 | 香港财经 | 中国财经 | 国际财经 | 地产新闻 | 时事脉搏 |`, +| -------- | -------- | -------- | -------- | ------------- | -------- | -------- | +| 全部新闻 | 港股直击 | 香港财经 | 中国财经 | 国际财经 | 地产新闻 | 时事脉搏 |`, }; async function handler(ctx) { diff --git a/lib/routes/hkepc/index.ts b/lib/routes/hkepc/index.ts index d76e39ca409f..d479cf3a6325 100644 --- a/lib/routes/hkepc/index.ts +++ b/lib/routes/hkepc/index.ts @@ -30,8 +30,8 @@ export const route: Route = { handler, url: 'hkepc.com/', description: `| 专题报导 | 新闻中心 | 新品快递 | 超频领域 | 流动数码 | 生活娱乐 | 会员消息 | 脑场新闻 | 业界资讯 | 最新消息 | - | ---------- | -------- | -------- | -------- | -------- | ------------- | -------- | -------- | -------- | -------- | - | coverStory | news | review | ocLab | digital | entertainment | member | price | press | latest |`, +| ---------- | -------- | -------- | -------- | -------- | ------------- | -------- | -------- | -------- | -------- | +| coverStory | news | review | ocLab | digital | entertainment | member | price | press | latest |`, }; async function handler(ctx) { diff --git a/lib/routes/hket/index.ts b/lib/routes/hket/index.ts index 83d80983e5e7..7abfa3633090 100644 --- a/lib/routes/hket/index.ts +++ b/lib/routes/hket/index.ts @@ -68,8 +68,8 @@ export const route: Route = { 此路由主要补全官方 RSS 全文输出及完善分类输出。 -
- 分类 +
+分类 | sran001 | sran008 | sran010 | sran011 | sran012 | srat006 | | -------- | -------- | -------- | -------- | -------- | -------- | @@ -122,7 +122,7 @@ export const route: Route = { | sraw020 | sraw020-1 | sraw020-2 | sraw020-3 | sraw020-4 | | -------- | ------------ | --------- | --------- | --------- | | ESG 主页 | ESG 趋势政策 | ESG 投资 | ESG 企业 | ESG 社会 | -
`, +
`, }; async function handler(ctx) { diff --git a/lib/routes/hljucm/yjsy.ts b/lib/routes/hljucm/yjsy.ts index 529410542674..6873a2181051 100644 --- a/lib/routes/hljucm/yjsy.ts +++ b/lib/routes/hljucm/yjsy.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 新闻动态 | 通知公告 | - | -------- | -------- | - | xwdt | tzgg |`, +| -------- | -------- | +| xwdt | tzgg |`, }; async function handler(ctx) { diff --git a/lib/routes/hnrb/index.ts b/lib/routes/hnrb/index.ts index 1b4b5b34a9de..821969d0e7d8 100644 --- a/lib/routes/hnrb/index.ts +++ b/lib/routes/hnrb/index.ts @@ -29,17 +29,17 @@ export const route: Route = { handler, url: 'voc.com.cn/', description: `| 版 | 编号 | - | -------------------- | ---- | - | 全部 | | - | 第 01 版:头版 | 1 | - | 第 02 版:要闻 | 2 | - | 第 03 版:要闻 | 3 | - | 第 04 版:深度 | 4 | - | 第 05 版:市州 | 5 | - | 第 06 版:理论・学习 | 6 | - | 第 07 版:观察 | 7 | - | 第 08 版:时事 | 8 | - | 第 09 版:中缝 | 9 |`, +| -------------------- | ---- | +| 全部 | | +| 第 01 版:头版 | 1 | +| 第 02 版:要闻 | 2 | +| 第 03 版:要闻 | 3 | +| 第 04 版:深度 | 4 | +| 第 05 版:市州 | 5 | +| 第 06 版:理论・学习 | 6 | +| 第 07 版:观察 | 7 | +| 第 08 版:时事 | 8 | +| 第 09 版:中缝 | 9 |`, }; async function handler(ctx) { diff --git a/lib/routes/hongkong/dh.ts b/lib/routes/hongkong/dh.ts index a94374b1ef69..767e6cfed7f2 100644 --- a/lib/routes/hongkong/dh.ts +++ b/lib/routes/hongkong/dh.ts @@ -28,9 +28,9 @@ export const route: Route = { url: 'dh.gov.hk/', description: `Language - | English | 中文简体 | 中文繁體 | - | ------- | -------- | -------- | - | english | chs | tc\_chi |`, +| English | 中文简体 | 中文繁體 | +| ------- | -------- | -------- | +| english | chs | tc\_chi |`, }; async function handler(ctx) { diff --git a/lib/routes/hostmonit/cloudflareyes.ts b/lib/routes/hostmonit/cloudflareyes.ts index 7800b3383a70..df157b67d9f2 100644 --- a/lib/routes/hostmonit/cloudflareyes.ts +++ b/lib/routes/hostmonit/cloudflareyes.ts @@ -32,8 +32,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| v4 | v6 | - | -- | -- | - | | v6 |`, +| -- | -- | +| | v6 |`, }; async function handler(ctx) { diff --git a/lib/routes/hoyolab/news.ts b/lib/routes/hoyolab/news.ts index 3a7678dd7e5b..1411d678dda9 100644 --- a/lib/routes/hoyolab/news.ts +++ b/lib/routes/hoyolab/news.ts @@ -91,29 +91,29 @@ export const route: Route = { maintainers: ['ZenoTian'], handler, description: `| Language | Code | - | ---------------- | ----- | - | 简体中文 | zh-cn | - | 繁體中文 | zh-tw | - | 日本語 | ja-jp | - | 한국어 | ko-kr | - | English (US) | en-us | - | Español (EU) | es-es | - | Français | fr-fr | - | Deutsch | de-de | - | Русский | ru-ru | - | Português | pt-pt | - | Español (Latino) | es-mx | - | Indonesia | id-id | - | Tiếng Việt | vi-vn | - | ภาษาไทย | th-th | +| ---------------- | ----- | +| 简体中文 | zh-cn | +| 繁體中文 | zh-tw | +| 日本語 | ja-jp | +| 한국어 | ko-kr | +| English (US) | en-us | +| Español (EU) | es-es | +| Français | fr-fr | +| Deutsch | de-de | +| Русский | ru-ru | +| Português | pt-pt | +| Español (Latino) | es-mx | +| Indonesia | id-id | +| Tiếng Việt | vi-vn | +| ภาษาไทย | th-th | - | Honkai Impact 3rd | Genshin Impact | Tears of Themis | HoYoLAB | Honkai: Star Rail | Zenless Zone Zero | - | ----------------- | -------------- | --------------- | ------- | ----------------- | ----------------- | - | 1 | 2 | 4 | 5 | 6 | 8 | +| Honkai Impact 3rd | Genshin Impact | Tears of Themis | HoYoLAB | Honkai: Star Rail | Zenless Zone Zero | +| ----------------- | -------------- | --------------- | ------- | ----------------- | ----------------- | +| 1 | 2 | 4 | 5 | 6 | 8 | - | Notices | Events | Info | - | ------- | ------ | ---- | - | 1 | 2 | 3 |`, +| Notices | Events | Info | +| ------- | ------ | ---- | +| 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/hrbeu/job/calendar.ts b/lib/routes/hrbeu/job/calendar.ts index 8890973fce9e..fcc61d51363d 100644 --- a/lib/routes/hrbeu/job/calendar.ts +++ b/lib/routes/hrbeu/job/calendar.ts @@ -27,8 +27,8 @@ export const route: Route = { handler, url: 'job.hrbeu.edu.cn/*', description: `| 通知公告 | 热点新闻 | - | :------: | :------: | - | tzgg | rdxw | +| :------: | :------: | +| tzgg | rdxw | #### 大型招聘会 {#ha-er-bin-gong-cheng-da-xue-jiu-ye-fu-wu-ping-tai-da-xing-zhao-pin-hui} diff --git a/lib/routes/hrbeu/job/list.ts b/lib/routes/hrbeu/job/list.ts index 2134f6eb038e..e21e8c185d92 100644 --- a/lib/routes/hrbeu/job/list.ts +++ b/lib/routes/hrbeu/job/list.ts @@ -33,8 +33,8 @@ export const route: Route = { name: '就业服务平台', maintainers: ['Derekmini'], description: `| 通知公告 | 热点新闻 | - | :------: | :------: | - | tzgg | rdxw |`, +| :------: | :------: | +| tzgg | rdxw |`, handler, }; diff --git a/lib/routes/hrbeu/uae/news.ts b/lib/routes/hrbeu/uae/news.ts index 2d24e65f2ec4..413f574fca4d 100644 --- a/lib/routes/hrbeu/uae/news.ts +++ b/lib/routes/hrbeu/uae/news.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: [], handler, description: `| 新闻动态 | 通知公告 | 科学研究 / 科研动态 | - | :------: | :------: | :-----------------: | - | xwdt | tzgg | kxyj-kydt |`, +| :------: | :------: | :-----------------: | +| xwdt | tzgg | kxyj-kydt |`, }; async function handler(ctx) { diff --git a/lib/routes/hrbeu/ugs/news.ts b/lib/routes/hrbeu/ugs/news.ts index eb605ae20352..0eeca3dcb0e4 100644 --- a/lib/routes/hrbeu/ugs/news.ts +++ b/lib/routes/hrbeu/ugs/news.ts @@ -78,9 +78,9 @@ export const route: Route = { handler, description: `author 列表: - | 教务处 | 实践教学与交流处 | 教育评估处 | 专业建设处 | 国家大学生文化素质基地 | 教师教学发展中心 | 综合办公室 | 工作通知 | - | ------ | ---------------- | ---------- | ---------- | ---------------------- | ---------------- | ---------- | -------- | - | jwc | sjjxyjlzx | jypgc | zyjsc | gjdxswhszjd | jsjxfzzx | zhbgs | gztz | +| 教务处 | 实践教学与交流处 | 教育评估处 | 专业建设处 | 国家大学生文化素质基地 | 教师教学发展中心 | 综合办公室 | 工作通知 | +| ------ | ---------------- | ---------- | ---------- | ---------------------- | ---------------- | ---------- | -------- | +| jwc | sjjxyjlzx | jypgc | zyjsc | gjdxswhszjd | jsjxfzzx | zhbgs | gztz | category 列表: @@ -88,41 +88,41 @@ export const route: Route = { 教务处: - | 教学安排 | 考试管理 | 学籍管理 | 外语统考 | 成绩管理 | - | -------- | -------- | -------- | -------- | -------- | - | jxap | ksgl | xjgl | wytk | cjgl | +| 教学安排 | 考试管理 | 学籍管理 | 外语统考 | 成绩管理 | +| -------- | -------- | -------- | -------- | -------- | +| jxap | ksgl | xjgl | wytk | cjgl | 实践教学与交流处: - | 实验教学 | 实验室建设 | 校外实习 | 学位论文 | 课程设计 | 创新创业 | 校际交流 | - | -------- | ---------- | -------- | -------- | -------- | -------- | -------- | - | syjx | sysjs | xwsx | xwlw | kcsj | cxcy | xjjl | +| 实验教学 | 实验室建设 | 校外实习 | 学位论文 | 课程设计 | 创新创业 | 校际交流 | +| -------- | ---------- | -------- | -------- | -------- | -------- | -------- | +| syjx | sysjs | xwsx | xwlw | kcsj | cxcy | xjjl | 教育评估处: - | 教学研究与教学成果 | 质量监控 | - | ------------------ | -------- | - | jxyjyjxcg | zljk | +| 教学研究与教学成果 | 质量监控 | +| ------------------ | -------- | +| jxyjyjxcg | zljk | 专业建设处: - | 专业与教材建设 | 陈赓实验班 | 教学名师与优秀主讲教师 | 课程建设 | 双语教学 | - | -------------- | ---------- | ---------------------- | -------- | -------- | - | zyyjcjs | cgsyb | jxmsyyxzjjs | kcjs | syjx | +| 专业与教材建设 | 陈赓实验班 | 教学名师与优秀主讲教师 | 课程建设 | 双语教学 | +| -------------- | ---------- | ---------------------- | -------- | -------- | +| zyyjcjs | cgsyb | jxmsyyxzjjs | kcjs | syjx | 国家大学生文化素质基地:无 教师教学发展中心: - | 教师培训 | - | -------- | - | jspx | +| 教师培训 | +| -------- | +| jspx | 综合办公室: - | 联系课程 | - | -------- | - | lxkc | +| 联系课程 | +| -------- | +| lxkc | 工作通知:无`, }; diff --git a/lib/routes/hrbeu/yjsy/list.ts b/lib/routes/hrbeu/yjsy/list.ts index 041103126332..c25c806359a4 100644 --- a/lib/routes/hrbeu/yjsy/list.ts +++ b/lib/routes/hrbeu/yjsy/list.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['Derekmini'], handler, description: `| 通知公告 | 新闻动态 | 学籍注册 | 奖助学金 | 其他 | - | :------: | :------: | :------: | :------: | :--: | - | 2981 | 2980 | 3009 | 3011 | ... |`, +| :------: | :------: | :------: | :------: | :--: | +| 2981 | 2980 | 3009 | 3011 | ... |`, }; async function handler(ctx) { diff --git a/lib/routes/huanqiu/index.ts b/lib/routes/huanqiu/index.ts index 2b70b76f7f43..3f4d03a13d3f 100644 --- a/lib/routes/huanqiu/index.ts +++ b/lib/routes/huanqiu/index.ts @@ -40,8 +40,8 @@ export const route: Route = { handler, url: 'huanqiu.com/', description: `| 国内新闻 | 国际新闻 | 军事 | 台海 | 评论 | - | -------- | -------- | ---- | ------ | ------- | - | china | world | mil | taiwai | opinion |`, +| -------- | -------- | ---- | ------ | ------- | +| china | world | mil | taiwai | opinion |`, }; async function handler(ctx) { diff --git a/lib/routes/hubu/index.ts b/lib/routes/hubu/index.ts index e3170d863f8e..c8f6998a675e 100644 --- a/lib/routes/hubu/index.ts +++ b/lib/routes/hubu/index.ts @@ -94,9 +94,9 @@ export const route: Route = { 若订阅 [通知公告](https://www.hubu.edu.cn/index/tzgg.htm),网址为 \`https://www.hubu.edu.cn/index/tzgg.htm\`。截取 \`https://www.hubu.edu.cn/\` 到末尾 \`.htm\` 的部分 \`index/tzgg\` 作为参数填入,此时路由为 [\`/hubu/www/index/tzgg\`](https://rsshub.app/hubu/www/index/tzgg)。 ::: - | 通知公告 | 学术预告 | - | ---------- | ---------- | - | index/tzgg | index/xsyg | +| 通知公告 | 学术预告 | +| ---------- | ---------- | +| index/tzgg | index/xsyg | `, categories: ['university'], diff --git a/lib/routes/hubu/zhxy.ts b/lib/routes/hubu/zhxy.ts index b8fde8785ba5..b5e9801a34c5 100644 --- a/lib/routes/hubu/zhxy.ts +++ b/lib/routes/hubu/zhxy.ts @@ -94,33 +94,33 @@ export const route: Route = { 若订阅 [通知公告](https://zhxy.hubu.edu.cn/index/tzgg.htm),网址为 \`https://zhxy.hubu.edu.cn/index/tzgg.htm\`。截取 \`https://zhxy.hubu.edu.cn/\` 到末尾 \`.htm\` 的部分 \`index/tzgg\` 作为参数填入,此时路由为 [\`/hubu/zhxy/index/tzgg\`](https://rsshub.app/hubu/zhxy/index/tzgg)。 ::: - | [通知公告](https://zhxy.hubu.edu.cn/index/tzgg.htm) | [新闻动态](https://zhxy.hubu.edu.cn/index/xwdt.htm) | - | --------------------------------------------------- | --------------------------------------------------- | - | index/tzgg | index/xwdt | +| [通知公告](https://zhxy.hubu.edu.cn/index/tzgg.htm) | [新闻动态](https://zhxy.hubu.edu.cn/index/xwdt.htm) | +| --------------------------------------------------- | --------------------------------------------------- | +| index/tzgg | index/xwdt | - #### [人才培养](https://zhxy.hubu.edu.cn/rcpy.htm) +#### [人才培养](https://zhxy.hubu.edu.cn/rcpy.htm) - | [人才培养](https://zhxy.hubu.edu.cn/rcpy.htm) | [本科生教育](https://zhxy.hubu.edu.cn/rcpy/bksjy.htm) | [研究生教育](https://zhxy.hubu.edu.cn/rcpy/yjsjy.htm) | [招生与就业](https://zhxy.hubu.edu.cn/rcpy/zsyjy/zsxx.htm) | - | --------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------- | - | rcpy | rcpy/bksjy | rcpy/yjsjy | rcpy/zsyjy/zsxx | +| [人才培养](https://zhxy.hubu.edu.cn/rcpy.htm) | [本科生教育](https://zhxy.hubu.edu.cn/rcpy/bksjy.htm) | [研究生教育](https://zhxy.hubu.edu.cn/rcpy/yjsjy.htm) | [招生与就业](https://zhxy.hubu.edu.cn/rcpy/zsyjy/zsxx.htm) | +| --------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------- | +| rcpy | rcpy/bksjy | rcpy/yjsjy | rcpy/zsyjy/zsxx | - #### [学科建设](https://zhxy.hubu.edu.cn/xkjianshe/zdxk.htm) +#### [学科建设](https://zhxy.hubu.edu.cn/xkjianshe/zdxk.htm) - | [学科建设](https://zhxy.hubu.edu.cn/xkjianshe/zdxk.htm) | [重点学科](https://zhxy.hubu.edu.cn/xkjianshe/zdxk.htm) | [硕士点](https://zhxy.hubu.edu.cn/xkjianshe/ssd.htm) | [博士点](https://zhxy.hubu.edu.cn/xkjianshe/bsd.htm) | - | ------------------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | - | xkjianshe/zdxk | xkjianshe/zdxk | xkjianshe/ssd | xkjianshe/bsd | +| [学科建设](https://zhxy.hubu.edu.cn/xkjianshe/zdxk.htm) | [重点学科](https://zhxy.hubu.edu.cn/xkjianshe/zdxk.htm) | [硕士点](https://zhxy.hubu.edu.cn/xkjianshe/ssd.htm) | [博士点](https://zhxy.hubu.edu.cn/xkjianshe/bsd.htm) | +| ------------------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| xkjianshe/zdxk | xkjianshe/zdxk | xkjianshe/ssd | xkjianshe/bsd | - #### [科研服务](https://zhxy.hubu.edu.cn/kyfw.htm) +#### [科研服务](https://zhxy.hubu.edu.cn/kyfw.htm) - | [科研服务](https://zhxy.hubu.edu.cn/kyfw.htm) | [科研动态](https://zhxy.hubu.edu.cn/kyfw/kydongt.htm) | [学术交流](https://zhxy.hubu.edu.cn/kyfw/xsjl.htm) | [科研平台](https://zhxy.hubu.edu.cn/kyfw/keyapt.htm) | [社会服务](https://zhxy.hubu.edu.cn/kyfw/shfuw.htm) | - | --------------------------------------------- | ----------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- | --------------------------------------------------- | - | kyfw | kyfw/kydongt | kyfw/xsjl | kyfw/keyapt | kyfw/shfuw | +| [科研服务](https://zhxy.hubu.edu.cn/kyfw.htm) | [科研动态](https://zhxy.hubu.edu.cn/kyfw/kydongt.htm) | [学术交流](https://zhxy.hubu.edu.cn/kyfw/xsjl.htm) | [科研平台](https://zhxy.hubu.edu.cn/kyfw/keyapt.htm) | [社会服务](https://zhxy.hubu.edu.cn/kyfw/shfuw.htm) | +| --------------------------------------------- | ----------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- | --------------------------------------------------- | +| kyfw | kyfw/kydongt | kyfw/xsjl | kyfw/keyapt | kyfw/shfuw | - #### [党群工作](https://zhxy.hubu.edu.cn/dqgz.htm) +#### [党群工作](https://zhxy.hubu.edu.cn/dqgz.htm) - | [党群工作](https://zhxy.hubu.edu.cn/dqgz.htm) | [党建工作](https://zhxy.hubu.edu.cn/dqgz/djgz/jgdj.htm) | [工会工作](https://zhxy.hubu.edu.cn/dqgz/ghgon.htm) | - | --------------------------------------------- | ------------------------------------------------------- | --------------------------------------------------- | - | dqgz | dqgz/djgz/jgdj | dqgz/ghgon | +| [党群工作](https://zhxy.hubu.edu.cn/dqgz.htm) | [党建工作](https://zhxy.hubu.edu.cn/dqgz/djgz/jgdj.htm) | [工会工作](https://zhxy.hubu.edu.cn/dqgz/ghgon.htm) | +| --------------------------------------------- | ------------------------------------------------------- | --------------------------------------------------- | +| dqgz | dqgz/djgz/jgdj | dqgz/ghgon | `, categories: ['university'], diff --git a/lib/routes/hunau/gfxy/index.ts b/lib/routes/hunau/gfxy/index.ts index d65aff853e7b..035bae0f99f8 100644 --- a/lib/routes/hunau/gfxy/index.ts +++ b/lib/routes/hunau/gfxy/index.ts @@ -25,8 +25,8 @@ export const route: Route = { handler, url: 'xky.hunau.edu.cn/', description: `| 分类 | 通知公告 | 学院新闻 | 其他分类通知... | - | ---- | -------- | -------- | --------------- | - | 参数 | tzgg | xyxw | 对应 URL |`, +| ---- | -------- | -------- | --------------- | +| 参数 | tzgg | xyxw | 对应 URL |`, }; async function handler(ctx) { diff --git a/lib/routes/hunau/ied.ts b/lib/routes/hunau/ied.ts index f0887a380b60..684f033cb8b4 100644 --- a/lib/routes/hunau/ied.ts +++ b/lib/routes/hunau/ied.ts @@ -25,9 +25,9 @@ export const route: Route = { handler, url: 'xky.hunau.edu.cn/', description: `| 分类 | 公告通知 | 新闻快讯 | 其他分类... | - | -------- | -------- | -------- | ----------- | - | type | xwzx | xwzx | 对应 URL | - | category | tzgg | xwkx | 对应 URL |`, +| -------- | -------- | -------- | ----------- | +| type | xwzx | xwzx | 对应 URL | +| category | tzgg | xwkx | 对应 URL |`, }; async function handler(ctx) { diff --git a/lib/routes/hunau/jwc.ts b/lib/routes/hunau/jwc.ts index 0f01859e8292..b79a462086e2 100644 --- a/lib/routes/hunau/jwc.ts +++ b/lib/routes/hunau/jwc.ts @@ -25,8 +25,8 @@ export const route: Route = { handler, url: 'xky.hunau.edu.cn/', description: `| 分类 | 通知公告 | 教务动态 | 其他教务通知... | - | ---- | -------- | -------- | --------------- | - | 参数 | tzgg | jwds | 对应 URL |`, +| ---- | -------- | -------- | --------------- | +| 参数 | tzgg | jwds | 对应 URL |`, }; async function handler(ctx) { diff --git a/lib/routes/hunau/xky/index.ts b/lib/routes/hunau/xky/index.ts index 6ebd135f0bd4..65024f3c24c9 100644 --- a/lib/routes/hunau/xky/index.ts +++ b/lib/routes/hunau/xky/index.ts @@ -25,8 +25,8 @@ export const route: Route = { handler, url: 'xky.hunau.edu.cn/', description: `| 分类 | 通知公告 | 学院新闻 | 其他分类通知... | - | ---- | ---------- | -------- | --------------- | - | 参数 | tzgg\_8472 | xyxw | 对应 URL |`, +| ---- | ---------- | -------- | --------------- | +| 参数 | tzgg\_8472 | xyxw | 对应 URL |`, }; async function handler(ctx) { diff --git a/lib/routes/hupu/index.ts b/lib/routes/hupu/index.ts index b4b57034158f..99fa3d88d420 100644 --- a/lib/routes/hupu/index.ts +++ b/lib/routes/hupu/index.ts @@ -32,8 +32,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| NBA | CBA | 足球 | - | --- | --- | ------ | - | nba | cba | soccer | +| --- | --- | ------ | +| nba | cba | soccer | ::: tip 电竞分类参见 [游戏热帖](https://bbs.hupu.com/all-gg) 的对应路由 [\`/hupu/all/all-gg\`](https://rsshub.app/hupu/all/all-gg)。 diff --git a/lib/routes/hust/aia/notice.ts b/lib/routes/hust/aia/notice.ts index cfa165de876e..9ae3fc32d57a 100755 --- a/lib/routes/hust/aia/notice.ts +++ b/lib/routes/hust/aia/notice.ts @@ -20,8 +20,8 @@ export const route: Route = { maintainers: ['budui'], handler, description: `| 最新 | 党政 | 科研 | 本科生 | 研究生 | 学工思政 | 离退休 | - | ---- | ---- | ---- | ------ | ------ | -------- | ------ | - | | dz | ky | bk | yjs | xgsz | litui |`, +| ---- | ---- | ---- | ------ | ------ | -------- | ------ | +| | dz | ky | bk | yjs | xgsz | litui |`, }; async function handler(ctx) { diff --git a/lib/routes/hust/gs.ts b/lib/routes/hust/gs.ts index 43668181d962..6058fb8901a7 100644 --- a/lib/routes/hust/gs.ts +++ b/lib/routes/hust/gs.ts @@ -82,51 +82,51 @@ export const route: Route = { 若订阅 [新闻动态](https://gs.hust.edu.cn/xwdt.htm),网址为 \`https://gs.hust.edu.cn/xwdt.htm\`。截取 \`https://gs.hust.edu.cn/\` 到末尾 \`.htm\` 的部分 \`xwdt\` 作为参数填入,此时路由为 [\`/hust/gs/xwdt\`](https://rsshub.app/hust/gs/xwdt)。 ::: - | [新闻动态](https://gs.hust.edu.cn/xwdt.htm) | [研究生服务专区](https://gs.hust.edu.cn/yjsfwzq.htm) | [综合管理](https://gs.hust.edu.cn/gzzd/zhgl.htm) | - | ------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------- | - | [xwdt](https://rsshub.app/hust/gs/xwdt) | [yjsfwzq](https://rsshub.app/hust/gs/yjsfwzq) | [gzzd/zhgl](https://rsshub.app/hust/gs/gzzd/zhgl) | +| [新闻动态](https://gs.hust.edu.cn/xwdt.htm) | [研究生服务专区](https://gs.hust.edu.cn/yjsfwzq.htm) | [综合管理](https://gs.hust.edu.cn/gzzd/zhgl.htm) | +| ------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------- | +| [xwdt](https://rsshub.app/hust/gs/xwdt) | [yjsfwzq](https://rsshub.app/hust/gs/yjsfwzq) | [gzzd/zhgl](https://rsshub.app/hust/gs/gzzd/zhgl) | - #### [通知公告](https://gs.hust.edu.cn/tzgg/kcjksap.htm) +#### [通知公告](https://gs.hust.edu.cn/tzgg/kcjksap.htm) - | [课程及考试安排](https://gs.hust.edu.cn/tzgg/kcjksap.htm) | [国际交流](https://gs.hust.edu.cn/tzgg/gjjl.htm) | [学位工作](https://gs.hust.edu.cn/tzgg/xwgz.htm) | [同济医学院](https://gs.hust.edu.cn/tzgg/tjyxy.htm) | [其他](https://gs.hust.edu.cn/tzgg/qt.htm) | - | --------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | --------------------------------------------------- | --------------------------------------------- | - | [tzgg/kcjksap](https://rsshub.app/hust/gs/tzgg/kcjksap) | [tzgg/gjjl](https://rsshub.app/hust/gs/tzgg/gjjl) | [tzgg/xwgz](https://rsshub.app/hust/gs/tzgg/xwgz) | [tzgg/tjyxy](https://rsshub.app/hust/gs/tzgg/tjyxy) | [tzgg/qt](https://rsshub.app/hust/gs/tzgg/qt) | +| [课程及考试安排](https://gs.hust.edu.cn/tzgg/kcjksap.htm) | [国际交流](https://gs.hust.edu.cn/tzgg/gjjl.htm) | [学位工作](https://gs.hust.edu.cn/tzgg/xwgz.htm) | [同济医学院](https://gs.hust.edu.cn/tzgg/tjyxy.htm) | [其他](https://gs.hust.edu.cn/tzgg/qt.htm) | +| --------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | --------------------------------------------------- | --------------------------------------------- | +| [tzgg/kcjksap](https://rsshub.app/hust/gs/tzgg/kcjksap) | [tzgg/gjjl](https://rsshub.app/hust/gs/tzgg/gjjl) | [tzgg/xwgz](https://rsshub.app/hust/gs/tzgg/xwgz) | [tzgg/tjyxy](https://rsshub.app/hust/gs/tzgg/tjyxy) | [tzgg/qt](https://rsshub.app/hust/gs/tzgg/qt) | - #### [学籍管理](https://gs.hust.edu.cn/pygz/zbjs1/xjyd.htm) +#### [学籍管理](https://gs.hust.edu.cn/pygz/zbjs1/xjyd.htm) - | [学籍异动](https://gs.hust.edu.cn/pygz/zbjs1/xjyd.htm) | [毕业管理](https://gs.hust.edu.cn/pygz/zbjs1/bygl.htm) | - | ------------------------------------------------------------- | ------------------------------------------------------------- | - | [pygz/zbjs1/xjyd](https://rsshub.app/hust/gs/pygz/zbjs1/xjyd) | [pygz/zbjs1/bygl](https://rsshub.app/hust/gs/pygz/zbjs1/bygl) | +| [学籍异动](https://gs.hust.edu.cn/pygz/zbjs1/xjyd.htm) | [毕业管理](https://gs.hust.edu.cn/pygz/zbjs1/bygl.htm) | +| ------------------------------------------------------------- | ------------------------------------------------------------- | +| [pygz/zbjs1/xjyd](https://rsshub.app/hust/gs/pygz/zbjs1/xjyd) | [pygz/zbjs1/bygl](https://rsshub.app/hust/gs/pygz/zbjs1/bygl) | - #### [教学管理](https://gs.hust.edu.cn/pygz/zbjs13/jxyj.htm) +#### [教学管理](https://gs.hust.edu.cn/pygz/zbjs13/jxyj.htm) - | [教学研究](https://gs.hust.edu.cn/pygz/zbjs13/jxyj.htm) | [课程教材](https://gs.hust.edu.cn/pygz/zbjs13/kcjc.htm) | [教学安排](https://gs.hust.edu.cn/pygz/zbjs13/jxap.htm) | [课表查询](https://gs.hust.edu.cn/pygz/zbjs13/kbcx.htm) | - | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | - | [pygz/zbjs13/jxyj](https://rsshub.app/hust/gs/pygz/zbjs13/jxyj) | [pygz/zbjs13/kcjc](https://rsshub.app/hust/gs/pygz/zbjs13/kcjc) | [pygz/zbjs13/jxap](https://rsshub.app/hust/gs/pygz/zbjs13/jxap) | [pygz/zbjs13/kbcx](https://rsshub.app/hust/gs/pygz/zbjs13/kbcx) | +| [教学研究](https://gs.hust.edu.cn/pygz/zbjs13/jxyj.htm) | [课程教材](https://gs.hust.edu.cn/pygz/zbjs13/kcjc.htm) | [教学安排](https://gs.hust.edu.cn/pygz/zbjs13/jxap.htm) | [课表查询](https://gs.hust.edu.cn/pygz/zbjs13/kbcx.htm) | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| [pygz/zbjs13/jxyj](https://rsshub.app/hust/gs/pygz/zbjs13/jxyj) | [pygz/zbjs13/kcjc](https://rsshub.app/hust/gs/pygz/zbjs13/kcjc) | [pygz/zbjs13/jxap](https://rsshub.app/hust/gs/pygz/zbjs13/jxap) | [pygz/zbjs13/kbcx](https://rsshub.app/hust/gs/pygz/zbjs13/kbcx) | - #### [培养过程](https://gs.hust.edu.cn/pygz/pygc.htm) +#### [培养过程](https://gs.hust.edu.cn/pygz/pygc.htm) - | [培养方案](https://gs.hust.edu.cn/pygz/pygc/pyfa.htm) | [硕博连读](https://gs.hust.edu.cn/pygz/pygc/sbld.htm) | - | ----------------------------------------------------------- | ----------------------------------------------------------- | - | [pygz/pygc/pyfa](https://rsshub.app/hust/gs/pygz/pygc/pyfa) | [pygz/pygc/sbld](https://rsshub.app/hust/gs/pygz/pygc/sbld) | +| [培养方案](https://gs.hust.edu.cn/pygz/pygc/pyfa.htm) | [硕博连读](https://gs.hust.edu.cn/pygz/pygc/sbld.htm) | +| ----------------------------------------------------------- | ----------------------------------------------------------- | +| [pygz/pygc/pyfa](https://rsshub.app/hust/gs/pygz/pygc/pyfa) | [pygz/pygc/sbld](https://rsshub.app/hust/gs/pygz/pygc/sbld) | - #### [国际交流](https://gs.hust.edu.cn/pygz/zbjs11/gjgpxm.htm) +#### [国际交流](https://gs.hust.edu.cn/pygz/zbjs11/gjgpxm.htm) - | [国家公派项目](https://gs.hust.edu.cn/pygz/zbjs11/gjgpxm.htm) | [国际学术会议](https://gs.hust.edu.cn/pygz/zbjs11/gjxshy.htm) | [校际合作项目](https://gs.hust.edu.cn/pygz/zbjs11/xjhzxm.htm) | [国际交流与合作办事流程](https://gs.hust.edu.cn/pygz/zbjs11/gjjlyhzbslc.htm) | - | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------- | - | [pygz/zbjs11/gjgpxm](https://rsshub.app/hust/gs/pygz/zbjs11/gjgpxm) | [pygz/zbjs11/gjxshy](https://rsshub.app/hust/gs/pygz/zbjs11/gjxshy) | [pygz/zbjs11/xjhzxm](https://rsshub.app/hust/gs/pygz/zbjs11/xjhzxm) | [pygz/zbjs11/gjjlyhzbslc](https://rsshub.app/hust/gs/pygz/zbjs11/gjjlyhzbslc) | +| [国家公派项目](https://gs.hust.edu.cn/pygz/zbjs11/gjgpxm.htm) | [国际学术会议](https://gs.hust.edu.cn/pygz/zbjs11/gjxshy.htm) | [校际合作项目](https://gs.hust.edu.cn/pygz/zbjs11/xjhzxm.htm) | [国际交流与合作办事流程](https://gs.hust.edu.cn/pygz/zbjs11/gjjlyhzbslc.htm) | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| [pygz/zbjs11/gjgpxm](https://rsshub.app/hust/gs/pygz/zbjs11/gjgpxm) | [pygz/zbjs11/gjxshy](https://rsshub.app/hust/gs/pygz/zbjs11/gjxshy) | [pygz/zbjs11/xjhzxm](https://rsshub.app/hust/gs/pygz/zbjs11/xjhzxm) | [pygz/zbjs11/gjjlyhzbslc](https://rsshub.app/hust/gs/pygz/zbjs11/gjjlyhzbslc) | - #### [专业学位](https://gs.hust.edu.cn/pygz/zbjs111/xwsqdml.htm) +#### [专业学位](https://gs.hust.edu.cn/pygz/zbjs111/xwsqdml.htm) - | [学位授权点目录](https://gs.hust.edu.cn/pygz/zbjs111/xwsqdml.htm) | [专业学位建设](https://gs.hust.edu.cn/pygz/zbjs111/zyxwjs.htm) | [特色培养](https://gs.hust.edu.cn/pygz/zbjs111/tspy.htm) | - | ----------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------- | - | [pygz/zbjs111/xwsqdml](https://rsshub.app/hust/gs/pygz/zbjs111/xwsqdml) | [pygz/zbjs111/zyxwjs](https://rsshub.app/hust/gs/pygz/zbjs111/zyxwjs) | [pygz/zbjs111/tspy](https://rsshub.app/hust/gs/pygz/zbjs111/tspy) | +| [学位授权点目录](https://gs.hust.edu.cn/pygz/zbjs111/xwsqdml.htm) | [专业学位建设](https://gs.hust.edu.cn/pygz/zbjs111/zyxwjs.htm) | [特色培养](https://gs.hust.edu.cn/pygz/zbjs111/tspy.htm) | +| ----------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------- | +| [pygz/zbjs111/xwsqdml](https://rsshub.app/hust/gs/pygz/zbjs111/xwsqdml) | [pygz/zbjs111/zyxwjs](https://rsshub.app/hust/gs/pygz/zbjs111/zyxwjs) | [pygz/zbjs111/tspy](https://rsshub.app/hust/gs/pygz/zbjs111/tspy) | - #### [学位工作](https://gs.hust.edu.cn/xwgz/xwdjs.htm) +#### [学位工作](https://gs.hust.edu.cn/xwgz/xwdjs.htm) - | [学位点建设](https://gs.hust.edu.cn/xwgz/xwdjs.htm) | [学位授予](https://gs.hust.edu.cn/xwgz/xwsy.htm) | [导师队伍](https://gs.hust.edu.cn/xwgz/dsdw.htm) | - | --------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | - | [xwgz/xwdjs](https://rsshub.app/hust/gs/xwgz/xwdjs) | [xwgz/xwsy](https://rsshub.app/hust/gs/xwgz/xwsy) | [xwgz/dsdw](https://rsshub.app/hust/gs/xwgz/dsdw) | +| [学位点建设](https://gs.hust.edu.cn/xwgz/xwdjs.htm) | [学位授予](https://gs.hust.edu.cn/xwgz/xwsy.htm) | [导师队伍](https://gs.hust.edu.cn/xwgz/dsdw.htm) | +| --------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| [xwgz/xwdjs](https://rsshub.app/hust/gs/xwgz/xwdjs) | [xwgz/xwsy](https://rsshub.app/hust/gs/xwgz/xwsy) | [xwgz/dsdw](https://rsshub.app/hust/gs/xwgz/dsdw) | `, categories: ['university'], diff --git a/lib/routes/hust/mse.ts b/lib/routes/hust/mse.ts index 33dc38456537..df8741c6a340 100644 --- a/lib/routes/hust/mse.ts +++ b/lib/routes/hust/mse.ts @@ -102,104 +102,104 @@ export const route: Route = { 若订阅 [通知公告](https://mse.hust.edu.cn/sylm/tzgg.htm),网址为 \`https://mse.hust.edu.cn/sylm/tzgg.htm\`。截取 \`https://mse.hust.edu.cn/\` 到末尾 \`.html\` 的部分 \`sylm/tzgg\` 作为参数填入,此时路由为 [\`/hust/mse/sylm/tzgg\`](https://rsshub.app/hust/mse/sylm/tzgg)。 ::: - #### [首页栏目](https://mse.hust.edu.cn/xyxw.htm) +#### [首页栏目](https://mse.hust.edu.cn/xyxw.htm) - | [学院新闻](https://mse.hust.edu.cn/xyxw.htm) | [通知公告](https://mse.hust.edu.cn/tzgg.htm) | [招生招聘](https://mse.hust.edu.cn/zszp.htm) | [媒体聚焦](https://mse.hust.edu.cn/mtjj.htm) | - | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | - | [xyxw](https://rsshub.app/hust/mse/xyxw) | [tzgg](https://rsshub.app/hust/mse/tzgg) | [zszp](https://rsshub.app/hust/mse/zszp) | [mtjj](https://rsshub.app/hust/mse/mtjj) | +| [学院新闻](https://mse.hust.edu.cn/xyxw.htm) | [通知公告](https://mse.hust.edu.cn/tzgg.htm) | [招生招聘](https://mse.hust.edu.cn/zszp.htm) | [媒体聚焦](https://mse.hust.edu.cn/mtjj.htm) | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| [xyxw](https://rsshub.app/hust/mse/xyxw) | [tzgg](https://rsshub.app/hust/mse/tzgg) | [zszp](https://rsshub.app/hust/mse/zszp) | [mtjj](https://rsshub.app/hust/mse/mtjj) | - | [期刊动态](https://mse.hust.edu.cn/qkdt.htm) | [学术活动](https://mse.hust.edu.cn/xshd.htm) | [师生天地](https://mse.hust.edu.cn/sstd.htm) | [STAR风采](https://mse.hust.edu.cn/STARfc.htm) | - | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | ---------------------------------------------- | - | [qkdt](https://rsshub.app/hust/mse/qkdt) | [xshd](https://rsshub.app/hust/mse/xshd) | [sstd](https://rsshub.app/hust/mse/sstd) | [STARfc](https://rsshub.app/hust/mse/STARfc) | +| [期刊动态](https://mse.hust.edu.cn/qkdt.htm) | [学术活动](https://mse.hust.edu.cn/xshd.htm) | [师生天地](https://mse.hust.edu.cn/sstd.htm) | [STAR风采](https://mse.hust.edu.cn/STARfc.htm) | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | ---------------------------------------------- | +| [qkdt](https://rsshub.app/hust/mse/qkdt) | [xshd](https://rsshub.app/hust/mse/xshd) | [sstd](https://rsshub.app/hust/mse/sstd) | [STARfc](https://rsshub.app/hust/mse/STARfc) | -
- 更多分类 +
+更多分类 - #### [理论学习](https://mse.hust.edu.cn/llxx1.htm) +#### [理论学习](https://mse.hust.edu.cn/llxx1.htm) - | [党务动态](https://mse.hust.edu.cn/llxx1/dwdt/djxw.htm) | [共青团](https://mse.hust.edu.cn/llxx1/gqt/xwdt.htm) | [工会组织](https://mse.hust.edu.cn/llxx1/ghzz/xwgg.htm) | [学习参考](https://mse.hust.edu.cn/llxx1/xxck.htm) | [资料汇编](https://mse.hust.edu.cn/llxx1/zlhb.htm) | [其他群团](https://mse.hust.edu.cn/llxx1/ghzz1/lmmc.htm) | - | -------------------------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------- | - | [llxx1/dwdt/djxw](https://rsshub.app/hust/mse/llxx1/dwdt/djxw) | [llxx1/gqt/xwdt](https://rsshub.app/hust/mse/llxx1/gqt/xwdt) | [llxx1/ghzz/xwgg](https://rsshub.app/hust/mse/llxx1/ghzz/xwgg) | [llxx1/xxck](https://rsshub.app/hust/mse/llxx1/xxck) | [llxx1/zlhb](https://rsshub.app/hust/mse/llxx1/zlhb) | [llxx1/ghzz1/lmmc](https://rsshub.app/hust/mse/llxx1/ghzz1/lmmc) | +| [党务动态](https://mse.hust.edu.cn/llxx1/dwdt/djxw.htm) | [共青团](https://mse.hust.edu.cn/llxx1/gqt/xwdt.htm) | [工会组织](https://mse.hust.edu.cn/llxx1/ghzz/xwgg.htm) | [学习参考](https://mse.hust.edu.cn/llxx1/xxck.htm) | [资料汇编](https://mse.hust.edu.cn/llxx1/zlhb.htm) | [其他群团](https://mse.hust.edu.cn/llxx1/ghzz1/lmmc.htm) | +| -------------------------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------- | +| [llxx1/dwdt/djxw](https://rsshub.app/hust/mse/llxx1/dwdt/djxw) | [llxx1/gqt/xwdt](https://rsshub.app/hust/mse/llxx1/gqt/xwdt) | [llxx1/ghzz/xwgg](https://rsshub.app/hust/mse/llxx1/ghzz/xwgg) | [llxx1/xxck](https://rsshub.app/hust/mse/llxx1/xxck) | [llxx1/zlhb](https://rsshub.app/hust/mse/llxx1/zlhb) | [llxx1/ghzz1/lmmc](https://rsshub.app/hust/mse/llxx1/ghzz1/lmmc) | - #### [师资队伍](https://mse.hust.edu.cn/szdw/jsml/jsml/qb.htm) +#### [师资队伍](https://mse.hust.edu.cn/szdw/jsml/jsml/qb.htm) - | [人才招聘](https://mse.hust.edu.cn/szdw/rczp.htm) | [常用下载](https://mse.hust.edu.cn/szdw/cyxz.htm) | - | -------------------------------------------------- | -------------------------------------------------- | - | [szdw/rczp](https://rsshub.app/hust/mse/szdw/rczp) | [szdw/cyxz](https://rsshub.app/hust/mse/szdw/cyxz) | +| [人才招聘](https://mse.hust.edu.cn/szdw/rczp.htm) | [常用下载](https://mse.hust.edu.cn/szdw/cyxz.htm) | +| -------------------------------------------------- | -------------------------------------------------- | +| [szdw/rczp](https://rsshub.app/hust/mse/szdw/rczp) | [szdw/cyxz](https://rsshub.app/hust/mse/szdw/cyxz) | - #### [人才培养](https://mse.hust.edu.cn/rcpy.htm) +#### [人才培养](https://mse.hust.edu.cn/rcpy.htm) - | [本科生教育](https://mse.hust.edu.cn/rcpy/bksjy.htm) | [研究生教育](https://mse.hust.edu.cn/rcpy/yjsjy.htm) | [学生工作](https://mse.hust.edu.cn/rcpy/xsg_z.htm) | [机械创新基地](https://mse.hust.edu.cn/rcpy/jxcxjd.htm) | [常用下载](https://mse.hust.edu.cn/rcpy/cyxz.htm) | - | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------- | - | [rcpy/bksjy](https://rsshub.app/hust/mse/rcpy/bksjy) | [rcpy/yjsjy](https://rsshub.app/hust/mse/rcpy/yjsjy) | [rcpy/xsg_z](https://rsshub.app/hust/mse/rcpy/xsg_z) | [rcpy/jxcxjd](https://rsshub.app/hust/mse/rcpy/jxcxjd) | [rcpy/cyxz](https://rsshub.app/hust/mse/rcpy/cyxz) | +| [本科生教育](https://mse.hust.edu.cn/rcpy/bksjy.htm) | [研究生教育](https://mse.hust.edu.cn/rcpy/yjsjy.htm) | [学生工作](https://mse.hust.edu.cn/rcpy/xsg_z.htm) | [机械创新基地](https://mse.hust.edu.cn/rcpy/jxcxjd.htm) | [常用下载](https://mse.hust.edu.cn/rcpy/cyxz.htm) | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------- | +| [rcpy/bksjy](https://rsshub.app/hust/mse/rcpy/bksjy) | [rcpy/yjsjy](https://rsshub.app/hust/mse/rcpy/yjsjy) | [rcpy/xsg_z](https://rsshub.app/hust/mse/rcpy/xsg_z) | [rcpy/jxcxjd](https://rsshub.app/hust/mse/rcpy/jxcxjd) | [rcpy/cyxz](https://rsshub.app/hust/mse/rcpy/cyxz) | - #### [科学研究](https://mse.hust.edu.cn/kxyj.htm) +#### [科学研究](https://mse.hust.edu.cn/kxyj.htm) - | [科研动态](https://mse.hust.edu.cn/kxyj/kydt.htm) | [安全管理](https://mse.hust.edu.cn/kxyj/aqgl.htm) | [设备开放](https://mse.hust.edu.cn/kxyj/sbkf.htm) | [科研成果](https://mse.hust.edu.cn/kxyj/kycg.htm) | [常用下载](https://mse.hust.edu.cn/kxyj/cyxz.htm) | - | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | - | [kxyj/kydt](https://rsshub.app/hust/mse/kxyj/kydt) | [kxyj/aqgl](https://rsshub.app/hust/mse/kxyj/aqgl) | [kxyj/sbkf](https://rsshub.app/hust/mse/kxyj/sbkf) | [kxyj/kycg](https://rsshub.app/hust/mse/kxyj/kycg) | [kxyj/cyxz](https://rsshub.app/hust/mse/kxyj/cyxz) | +| [科研动态](https://mse.hust.edu.cn/kxyj/kydt.htm) | [安全管理](https://mse.hust.edu.cn/kxyj/aqgl.htm) | [设备开放](https://mse.hust.edu.cn/kxyj/sbkf.htm) | [科研成果](https://mse.hust.edu.cn/kxyj/kycg.htm) | [常用下载](https://mse.hust.edu.cn/kxyj/cyxz.htm) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| [kxyj/kydt](https://rsshub.app/hust/mse/kxyj/kydt) | [kxyj/aqgl](https://rsshub.app/hust/mse/kxyj/aqgl) | [kxyj/sbkf](https://rsshub.app/hust/mse/kxyj/sbkf) | [kxyj/kycg](https://rsshub.app/hust/mse/kxyj/kycg) | [kxyj/cyxz](https://rsshub.app/hust/mse/kxyj/cyxz) | - #### [社会服务](https://mse.hust.edu.cn/shfw.htm) +#### [社会服务](https://mse.hust.edu.cn/shfw.htm) - | [驻外研究院](https://mse.hust.edu.cn/shfw/zwyjy.htm) | [产业公司](https://mse.hust.edu.cn/shfw/cygs.htm) | - | ---------------------------------------------------- | -------------------------------------------------- | - | [shfw/zwyjy](https://rsshub.app/hust/mse/shfw/zwyjy) | [shfw/cygs](https://rsshub.app/hust/mse/shfw/cygs) | +| [驻外研究院](https://mse.hust.edu.cn/shfw/zwyjy.htm) | [产业公司](https://mse.hust.edu.cn/shfw/cygs.htm) | +| ---------------------------------------------------- | -------------------------------------------------- | +| [shfw/zwyjy](https://rsshub.app/hust/mse/shfw/zwyjy) | [shfw/cygs](https://rsshub.app/hust/mse/shfw/cygs) | - #### [合作交流](https://mse.hust.edu.cn/hzjl.htm) +#### [合作交流](https://mse.hust.edu.cn/hzjl.htm) - | [专家来访](https://mse.hust.edu.cn/hzjl/zjlf.htm) | [师生出访](https://mse.hust.edu.cn/hzjl/sscf.htm) | [项目合作](https://mse.hust.edu.cn/hzjl/xmhz.htm) | [国际会议](https://mse.hust.edu.cn/hzjl/gjhy.htm) | [常用下载](https://mse.hust.edu.cn/hzjl/cyxz.htm) | - | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | - | [hzjl/zjlf](https://rsshub.app/hust/mse/hzjl/zjlf) | [hzjl/sscf](https://rsshub.app/hust/mse/hzjl/sscf) | [hzjl/xmhz](https://rsshub.app/hust/mse/hzjl/xmhz) | [hzjl/gjhy](https://rsshub.app/hust/mse/hzjl/gjhy) | [hzjl/cyxz](https://rsshub.app/hust/mse/hzjl/cyxz) | +| [专家来访](https://mse.hust.edu.cn/hzjl/zjlf.htm) | [师生出访](https://mse.hust.edu.cn/hzjl/sscf.htm) | [项目合作](https://mse.hust.edu.cn/hzjl/xmhz.htm) | [国际会议](https://mse.hust.edu.cn/hzjl/gjhy.htm) | [常用下载](https://mse.hust.edu.cn/hzjl/cyxz.htm) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| [hzjl/zjlf](https://rsshub.app/hust/mse/hzjl/zjlf) | [hzjl/sscf](https://rsshub.app/hust/mse/hzjl/sscf) | [hzjl/xmhz](https://rsshub.app/hust/mse/hzjl/xmhz) | [hzjl/gjhy](https://rsshub.app/hust/mse/hzjl/gjhy) | [hzjl/cyxz](https://rsshub.app/hust/mse/hzjl/cyxz) | - #### [校友专栏](https://mse.hust.edu.cn/xyzl.htm) +#### [校友专栏](https://mse.hust.edu.cn/xyzl.htm) - | [校友动态](https://mse.hust.edu.cn/xyzl/xydt.htm) | [杰出校友](https://mse.hust.edu.cn/xyzl/jcxy.htm) | [校友名录](https://mse.hust.edu.cn/xyzl/xyml.htm) | [校友照片](https://mse.hust.edu.cn/xyzl/xyzp.htm) | [服务校友](https://mse.hust.edu.cn/xyzl/fwxy.htm) | [常用下载](https://mse.hust.edu.cn/xyzl/cyxz.htm) | - | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | - | [xyzl/xydt](https://rsshub.app/hust/mse/xyzl/xydt) | [xyzl/jcxy](https://rsshub.app/hust/mse/xyzl/jcxy) | [xyzl/xyml](https://rsshub.app/hust/mse/xyzl/xyml) | [xyzl/xyzp](https://rsshub.app/hust/mse/xyzl/xyzp) | [xyzl/fwxy](https://rsshub.app/hust/mse/xyzl/fwxy) | [xyzl/cyxz](https://rsshub.app/hust/mse/xyzl/cyxz) | +| [校友动态](https://mse.hust.edu.cn/xyzl/xydt.htm) | [杰出校友](https://mse.hust.edu.cn/xyzl/jcxy.htm) | [校友名录](https://mse.hust.edu.cn/xyzl/xyml.htm) | [校友照片](https://mse.hust.edu.cn/xyzl/xyzp.htm) | [服务校友](https://mse.hust.edu.cn/xyzl/fwxy.htm) | [常用下载](https://mse.hust.edu.cn/xyzl/cyxz.htm) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| [xyzl/xydt](https://rsshub.app/hust/mse/xyzl/xydt) | [xyzl/jcxy](https://rsshub.app/hust/mse/xyzl/jcxy) | [xyzl/xyml](https://rsshub.app/hust/mse/xyzl/xyml) | [xyzl/xyzp](https://rsshub.app/hust/mse/xyzl/xyzp) | [xyzl/fwxy](https://rsshub.app/hust/mse/xyzl/fwxy) | [xyzl/cyxz](https://rsshub.app/hust/mse/xyzl/cyxz) | - #### [理论学习](https://mse.hust.edu.cn/sylm/xyxw.htm#) +#### [理论学习](https://mse.hust.edu.cn/sylm/xyxw.htm#) - | [党务动态](https://mse.hust.edu.cn/llxx1/dwdt/djxw.htm) | [共青团](https://mse.hust.edu.cn/llxx1/gqt/xwdt.htm) | [工会组织](https://mse.hust.edu.cn/llxx1/ghzz/xwgg.htm) | [学习参考](https://mse.hust.edu.cn/llxx1/xxck.htm) | [资料汇编](https://mse.hust.edu.cn/llxx1/zlhb.htm) | [其他群团](https://mse.hust.edu.cn/llxx1/ghzz1/lmmc.htm) | - | -------------------------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------- | - | [llxx1/dwdt/djxw](https://rsshub.app/hust/mse/llxx1/dwdt/djxw) | [llxx1/gqt/xwdt](https://rsshub.app/hust/mse/llxx1/gqt/xwdt) | [llxx1/ghzz/xwgg](https://rsshub.app/hust/mse/llxx1/ghzz/xwgg) | [llxx1/xxck](https://rsshub.app/hust/mse/llxx1/xxck) | [llxx1/zlhb](https://rsshub.app/hust/mse/llxx1/zlhb) | [llxx1/ghzz1/lmmc](https://rsshub.app/hust/mse/llxx1/ghzz1/lmmc) | +| [党务动态](https://mse.hust.edu.cn/llxx1/dwdt/djxw.htm) | [共青团](https://mse.hust.edu.cn/llxx1/gqt/xwdt.htm) | [工会组织](https://mse.hust.edu.cn/llxx1/ghzz/xwgg.htm) | [学习参考](https://mse.hust.edu.cn/llxx1/xxck.htm) | [资料汇编](https://mse.hust.edu.cn/llxx1/zlhb.htm) | [其他群团](https://mse.hust.edu.cn/llxx1/ghzz1/lmmc.htm) | +| -------------------------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------- | +| [llxx1/dwdt/djxw](https://rsshub.app/hust/mse/llxx1/dwdt/djxw) | [llxx1/gqt/xwdt](https://rsshub.app/hust/mse/llxx1/gqt/xwdt) | [llxx1/ghzz/xwgg](https://rsshub.app/hust/mse/llxx1/ghzz/xwgg) | [llxx1/xxck](https://rsshub.app/hust/mse/llxx1/xxck) | [llxx1/zlhb](https://rsshub.app/hust/mse/llxx1/zlhb) | [llxx1/ghzz1/lmmc](https://rsshub.app/hust/mse/llxx1/ghzz1/lmmc) | - #### [师资队伍](https://mse.hust.edu.cn/sylm/xyxw.htm#) +#### [师资队伍](https://mse.hust.edu.cn/sylm/xyxw.htm#) - | [人才招聘](https://mse.hust.edu.cn/szdw/rczp.htm) | [常用下载](https://mse.hust.edu.cn/szdw/cyxz.htm) | - | -------------------------------------------------- | -------------------------------------------------- | - | [szdw/rczp](https://rsshub.app/hust/mse/szdw/rczp) | [szdw/cyxz](https://rsshub.app/hust/mse/szdw/cyxz) | +| [人才招聘](https://mse.hust.edu.cn/szdw/rczp.htm) | [常用下载](https://mse.hust.edu.cn/szdw/cyxz.htm) | +| -------------------------------------------------- | -------------------------------------------------- | +| [szdw/rczp](https://rsshub.app/hust/mse/szdw/rczp) | [szdw/cyxz](https://rsshub.app/hust/mse/szdw/cyxz) | - #### [人才培养](https://mse.hust.edu.cn/sylm/xyxw.htm#) +#### [人才培养](https://mse.hust.edu.cn/sylm/xyxw.htm#) - | [本科生教育](https://mse.hust.edu.cn/rcpy/bksjy.htm) | [研究生教育](https://mse.hust.edu.cn/rcpy/yjsjy.htm) | [学生工作](https://mse.hust.edu.cn/rcpy/xsg_z.htm) | [机械创新基地](https://mse.hust.edu.cn/rcpy/jxcxjd.htm) | [常用下载](https://mse.hust.edu.cn/rcpy/cyxz.htm) | - | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------- | - | [rcpy/bksjy](https://rsshub.app/hust/mse/rcpy/bksjy) | [rcpy/yjsjy](https://rsshub.app/hust/mse/rcpy/yjsjy) | [rcpy/xsg_z](https://rsshub.app/hust/mse/rcpy/xsg_z) | [rcpy/jxcxjd](https://rsshub.app/hust/mse/rcpy/jxcxjd) | [rcpy/cyxz](https://rsshub.app/hust/mse/rcpy/cyxz) | +| [本科生教育](https://mse.hust.edu.cn/rcpy/bksjy.htm) | [研究生教育](https://mse.hust.edu.cn/rcpy/yjsjy.htm) | [学生工作](https://mse.hust.edu.cn/rcpy/xsg_z.htm) | [机械创新基地](https://mse.hust.edu.cn/rcpy/jxcxjd.htm) | [常用下载](https://mse.hust.edu.cn/rcpy/cyxz.htm) | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------- | +| [rcpy/bksjy](https://rsshub.app/hust/mse/rcpy/bksjy) | [rcpy/yjsjy](https://rsshub.app/hust/mse/rcpy/yjsjy) | [rcpy/xsg_z](https://rsshub.app/hust/mse/rcpy/xsg_z) | [rcpy/jxcxjd](https://rsshub.app/hust/mse/rcpy/jxcxjd) | [rcpy/cyxz](https://rsshub.app/hust/mse/rcpy/cyxz) | - #### [科学研究](https://mse.hust.edu.cn/sylm/xyxw.htm#) +#### [科学研究](https://mse.hust.edu.cn/sylm/xyxw.htm#) - | [科研动态](https://mse.hust.edu.cn/kxyj/kydt.htm) | [安全管理](https://mse.hust.edu.cn/kxyj/aqgl.htm) | [设备开放](https://mse.hust.edu.cn/kxyj/sbkf.htm) | [科研成果](https://mse.hust.edu.cn/kxyj/kycg.htm) | [常用下载](https://mse.hust.edu.cn/kxyj/cyxz.htm) | - | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | - | [kxyj/kydt](https://rsshub.app/hust/mse/kxyj/kydt) | [kxyj/aqgl](https://rsshub.app/hust/mse/kxyj/aqgl) | [kxyj/sbkf](https://rsshub.app/hust/mse/kxyj/sbkf) | [kxyj/kycg](https://rsshub.app/hust/mse/kxyj/kycg) | [kxyj/cyxz](https://rsshub.app/hust/mse/kxyj/cyxz) | +| [科研动态](https://mse.hust.edu.cn/kxyj/kydt.htm) | [安全管理](https://mse.hust.edu.cn/kxyj/aqgl.htm) | [设备开放](https://mse.hust.edu.cn/kxyj/sbkf.htm) | [科研成果](https://mse.hust.edu.cn/kxyj/kycg.htm) | [常用下载](https://mse.hust.edu.cn/kxyj/cyxz.htm) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| [kxyj/kydt](https://rsshub.app/hust/mse/kxyj/kydt) | [kxyj/aqgl](https://rsshub.app/hust/mse/kxyj/aqgl) | [kxyj/sbkf](https://rsshub.app/hust/mse/kxyj/sbkf) | [kxyj/kycg](https://rsshub.app/hust/mse/kxyj/kycg) | [kxyj/cyxz](https://rsshub.app/hust/mse/kxyj/cyxz) | - #### [社会服务](https://mse.hust.edu.cn/sylm/xyxw.htm#) +#### [社会服务](https://mse.hust.edu.cn/sylm/xyxw.htm#) - | [驻外研究院](https://mse.hust.edu.cn/shfw/zwyjy.htm) | [产业公司](https://mse.hust.edu.cn/shfw/cygs.htm) | - | ---------------------------------------------------- | -------------------------------------------------- | - | [shfw/zwyjy](https://rsshub.app/hust/mse/shfw/zwyjy) | [shfw/cygs](https://rsshub.app/hust/mse/shfw/cygs) | +| [驻外研究院](https://mse.hust.edu.cn/shfw/zwyjy.htm) | [产业公司](https://mse.hust.edu.cn/shfw/cygs.htm) | +| ---------------------------------------------------- | -------------------------------------------------- | +| [shfw/zwyjy](https://rsshub.app/hust/mse/shfw/zwyjy) | [shfw/cygs](https://rsshub.app/hust/mse/shfw/cygs) | - #### [合作交流](https://mse.hust.edu.cn/sylm/xyxw.htm#) +#### [合作交流](https://mse.hust.edu.cn/sylm/xyxw.htm#) - | [专家来访](https://mse.hust.edu.cn/hzjl/zjlf.htm) | [师生出访](https://mse.hust.edu.cn/hzjl/sscf.htm) | [项目合作](https://mse.hust.edu.cn/hzjl/xmhz.htm) | [国际会议](https://mse.hust.edu.cn/hzjl/gjhy.htm) | [常用下载](https://mse.hust.edu.cn/hzjl/cyxz.htm) | - | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | - | [hzjl/zjlf](https://rsshub.app/hust/mse/hzjl/zjlf) | [hzjl/sscf](https://rsshub.app/hust/mse/hzjl/sscf) | [hzjl/xmhz](https://rsshub.app/hust/mse/hzjl/xmhz) | [hzjl/gjhy](https://rsshub.app/hust/mse/hzjl/gjhy) | [hzjl/cyxz](https://rsshub.app/hust/mse/hzjl/cyxz) | +| [专家来访](https://mse.hust.edu.cn/hzjl/zjlf.htm) | [师生出访](https://mse.hust.edu.cn/hzjl/sscf.htm) | [项目合作](https://mse.hust.edu.cn/hzjl/xmhz.htm) | [国际会议](https://mse.hust.edu.cn/hzjl/gjhy.htm) | [常用下载](https://mse.hust.edu.cn/hzjl/cyxz.htm) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| [hzjl/zjlf](https://rsshub.app/hust/mse/hzjl/zjlf) | [hzjl/sscf](https://rsshub.app/hust/mse/hzjl/sscf) | [hzjl/xmhz](https://rsshub.app/hust/mse/hzjl/xmhz) | [hzjl/gjhy](https://rsshub.app/hust/mse/hzjl/gjhy) | [hzjl/cyxz](https://rsshub.app/hust/mse/hzjl/cyxz) | - #### [校友专栏](https://mse.hust.edu.cn/sylm/xyxw.htm#) +#### [校友专栏](https://mse.hust.edu.cn/sylm/xyxw.htm#) - | [校友动态](https://mse.hust.edu.cn/xyzl/xydt.htm) | [杰出校友](https://mse.hust.edu.cn/xyzl/jcxy.htm) | [校友名录](https://mse.hust.edu.cn/xyzl/xyml.htm) | [校友照片](https://mse.hust.edu.cn/xyzl/xyzp.htm) | [服务校友](https://mse.hust.edu.cn/xyzl/fwxy.htm) | [常用下载](https://mse.hust.edu.cn/xyzl/cyxz.htm) | - | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | - | [xyzl/xydt](https://rsshub.app/hust/mse/xyzl/xydt) | [xyzl/jcxy](https://rsshub.app/hust/mse/xyzl/jcxy) | [xyzl/xyml](https://rsshub.app/hust/mse/xyzl/xyml) | [xyzl/xyzp](https://rsshub.app/hust/mse/xyzl/xyzp) | [xyzl/fwxy](https://rsshub.app/hust/mse/xyzl/fwxy) | [xyzl/cyxz](https://rsshub.app/hust/mse/xyzl/cyxz) | +| [校友动态](https://mse.hust.edu.cn/xyzl/xydt.htm) | [杰出校友](https://mse.hust.edu.cn/xyzl/jcxy.htm) | [校友名录](https://mse.hust.edu.cn/xyzl/xyml.htm) | [校友照片](https://mse.hust.edu.cn/xyzl/xyzp.htm) | [服务校友](https://mse.hust.edu.cn/xyzl/fwxy.htm) | [常用下载](https://mse.hust.edu.cn/xyzl/cyxz.htm) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| [xyzl/xydt](https://rsshub.app/hust/mse/xyzl/xydt) | [xyzl/jcxy](https://rsshub.app/hust/mse/xyzl/jcxy) | [xyzl/xyml](https://rsshub.app/hust/mse/xyzl/xyml) | [xyzl/xyzp](https://rsshub.app/hust/mse/xyzl/xyzp) | [xyzl/fwxy](https://rsshub.app/hust/mse/xyzl/fwxy) | [xyzl/cyxz](https://rsshub.app/hust/mse/xyzl/cyxz) | -
+
`, categories: ['university'], diff --git a/lib/routes/huxiu/channel.ts b/lib/routes/huxiu/channel.ts index 47e2415810fd..0bea4b479f46 100644 --- a/lib/routes/huxiu/channel.ts +++ b/lib/routes/huxiu/channel.ts @@ -26,16 +26,16 @@ export const route: Route = { maintainers: ['HenryQW', 'nczitzk'], handler, description: `| 视频 | 车与出行 | 年轻一代 | 十亿消费者 | 前沿科技 | - | ---- | -------- | -------- | ---------- | -------- | - | 10 | 21 | 106 | 103 | 105 | +| ---- | -------- | -------- | ---------- | -------- | +| 10 | 21 | 106 | 103 | 105 | - | 财经 | 娱乐淘金 | 医疗健康 | 文化教育 | 出海 | - | ---- | -------- | -------- | -------- | ---- | - | 115 | 22 | 111 | 113 | 114 | +| 财经 | 娱乐淘金 | 医疗健康 | 文化教育 | 出海 | +| ---- | -------- | -------- | -------- | ---- | +| 115 | 22 | 111 | 113 | 114 | - | 金融地产 | 企业服务 | 创业维艰 | 社交通讯 | 全球热点 | 生活腔调 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 102 | 110 | 2 | 112 | 107 | 4 |`, +| 金融地产 | 企业服务 | 创业维艰 | 社交通讯 | 全球热点 | 生活腔调 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| 102 | 110 | 2 | 112 | 107 | 4 |`, url: 'huxiu.com/article', }; diff --git a/lib/routes/huxiu/member.ts b/lib/routes/huxiu/member.ts index 4ef6fd42af35..244084b4a9b7 100644 --- a/lib/routes/huxiu/member.ts +++ b/lib/routes/huxiu/member.ts @@ -13,8 +13,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| TA 的文章 | TA 的 24 小时 | - | --------- | ------------- | - | article | moment |`, +| --------- | ------------- | +| article | moment |`, }; async function handler(ctx) { diff --git a/lib/routes/hypergryph/arknights/announce.ts b/lib/routes/hypergryph/arknights/announce.ts index fd42f713c3d8..f034de4353eb 100644 --- a/lib/routes/hypergryph/arknights/announce.ts +++ b/lib/routes/hypergryph/arknights/announce.ts @@ -25,15 +25,15 @@ export const route: Route = { handler, description: `平台 - | 安卓服 | iOS 服 | B 服 | - | :-----: | :----: | :------: | - | Android | IOS | Bilibili | +| 安卓服 | iOS 服 | B 服 | +| :-----: | :----: | :------: | +| Android | IOS | Bilibili | 分组 - | 全部 | 系统公告 | 活动公告 | - | :--: | :------: | :------: | - | ALL | SYSTEM | ACTIVITY |`, +| 全部 | 系统公告 | 活动公告 | +| :--: | :------: | :------: | +| ALL | SYSTEM | ACTIVITY |`, }; async function handler(ctx) { diff --git a/lib/routes/hypergryph/arknights/news.ts b/lib/routes/hypergryph/arknights/news.ts index a85ec285abde..fc5f65fb4791 100644 --- a/lib/routes/hypergryph/arknights/news.ts +++ b/lib/routes/hypergryph/arknights/news.ts @@ -68,9 +68,9 @@ export const route: Route = { handler, url: 'ak-conf.hypergryph.com/news', description: ` - | 全部 | 最新 | 公告 | 活动 | 新闻 | - | ---- | ------ | ------------ | -------- | ---- | - | ALL | LATEST | ANNOUNCEMENT | ACTIVITY | NEWS |`, +| 全部 | 最新 | 公告 | 活动 | 新闻 | +| ---- | ------ | ------------ | -------- | ---- | +| ALL | LATEST | ANNOUNCEMENT | ACTIVITY | NEWS |`, }; async function handler(ctx) { diff --git a/lib/routes/ianspriggs/index.ts b/lib/routes/ianspriggs/index.ts index d973da7f1bf2..f91b883c3c07 100644 --- a/lib/routes/ianspriggs/index.ts +++ b/lib/routes/ianspriggs/index.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 3D PORTRAITS | CHARACTERS | - | ------------ | ---------- | - | portraits | characters |`, +| ------------ | ---------- | +| portraits | characters |`, }; async function handler(ctx) { diff --git a/lib/routes/icbc/whpj.ts b/lib/routes/icbc/whpj.ts index ae3f0ef8d686..b44761535a64 100644 --- a/lib/routes/icbc/whpj.ts +++ b/lib/routes/icbc/whpj.ts @@ -25,8 +25,8 @@ export const route: Route = { handler, url: 'icbc.com.cn/column/1438058341489590354.html', description: `| 短格式 | 参考价 | 现汇买卖 | 现钞买卖 | 现汇买入 | 现汇卖出 | 现钞买入 | 现钞卖出 | - | ------ | ------ | -------- | -------- | -------- | -------- | -------- | -------- | - | short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc |`, +| ------ | ------ | -------- | -------- | -------- | -------- | -------- | -------- | +| short | zs | xh | xc | xhmr | xhmc | xcmr | xcmc |`, }; async function handler(ctx) { diff --git a/lib/routes/idaily/index.ts b/lib/routes/idaily/index.ts index f3a0d59c61fa..6ad96b2d7e7f 100644 --- a/lib/routes/idaily/index.ts +++ b/lib/routes/idaily/index.ts @@ -20,8 +20,8 @@ export const route: Route = { ], handler, description: `| 简体中文 | 繁体中文 | - | -------- | -------- | - | zh-hans | zh-hant |`, +| -------- | -------- | +| zh-hans | zh-hant |`, }; async function handler(ctx) { diff --git a/lib/routes/iehou/index.ts b/lib/routes/iehou/index.ts index b014c9d042aa..675096cfb990 100644 --- a/lib/routes/iehou/index.ts +++ b/lib/routes/iehou/index.ts @@ -90,9 +90,9 @@ export const route: Route = { 若订阅 [24小时热门线报](https://iehou.com/page-dayhot.htm),网址为 \`https://iehou.com/page-dayhot.htm\`。截取 \`https://iehou.com/page-\` 到末尾 \`.htm\` 的部分 \`dayhot\` 作为参数填入,此时路由为 [\`/iehou/dayhot\`](https://rsshub.app/iehou/dayhot)。 ::: - | [最新线报](https://iehou.com/) | [24 小时热门](https://iehou.com/page-dayhot.htm) | [一周热门](https://iehou.com/page-weekhot.htm) | - | ------------------------------ | ------------------------------------------------ | ---------------------------------------------- | - | [](https://rsshub.app/iehou) | [dayhot](https://rsshub.app/iehou/dayhot) | [weekhot](https://rsshub.app/iehou/weekhot) | +| [最新线报](https://iehou.com/) | [24 小时热门](https://iehou.com/page-dayhot.htm) | [一周热门](https://iehou.com/page-weekhot.htm) | +| ------------------------------ | ------------------------------------------------ | ---------------------------------------------- | +| [](https://rsshub.app/iehou) | [dayhot](https://rsshub.app/iehou/dayhot) | [weekhot](https://rsshub.app/iehou/weekhot) | `, categories: ['new-media'], diff --git a/lib/routes/ifeng/feng.ts b/lib/routes/ifeng/feng.ts index f076710f64a3..fc59a2f9abb2 100644 --- a/lib/routes/ifeng/feng.ts +++ b/lib/routes/ifeng/feng.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['Jamch'], handler, description: `| 文章 | 视频 | - | ---- | ----- | - | doc | video |`, +| ---- | ----- | +| doc | video |`, }; async function handler(ctx) { diff --git a/lib/routes/imdb/chart.ts b/lib/routes/imdb/chart.ts index 117454065137..4619f9a3ac65 100644 --- a/lib/routes/imdb/chart.ts +++ b/lib/routes/imdb/chart.ts @@ -37,8 +37,8 @@ export const route: Route = { handler, url: 'www.imdb.com/chart/top/', description: `| Top 250 Movies | Most Popular Movies | Top 250 TV Shows | Most Popular TV Shows | - | -------------- | ------------------- | ---------------- | --------------------- | - | top | moviemeter | toptv | tvmeter |`, +| -------------- | ------------------- | ---------------- | --------------------- | +| top | moviemeter | toptv | tvmeter |`, }; async function handler(ctx: Context) { diff --git a/lib/routes/indienova/column.ts b/lib/routes/indienova/column.ts index a0db2355c605..e0f3e1ecee17 100644 --- a/lib/routes/indienova/column.ts +++ b/lib/routes/indienova/column.ts @@ -26,44 +26,44 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `
- 专题 ID +专题 ID 游戏推荐 - | itch 一周游戏汇 | 一周值得关注的发售作品 | 诺娃速递 | 周末游戏视频集锦 | 每月媒体评分 | 年度最佳游戏 | Indie Focus 近期新游 | indienova Picks 精选 | - | --------------- | ---------------------- | -------- | ---------------- | ------------ | ------------ | -------------------- | -------------------- | - | 52 | 29 | 41 | 43 | 45 | 39 | 1 | 8 | +| itch 一周游戏汇 | 一周值得关注的发售作品 | 诺娃速递 | 周末游戏视频集锦 | 每月媒体评分 | 年度最佳游戏 | Indie Focus 近期新游 | indienova Picks 精选 | +| --------------- | ---------------------- | -------- | ---------------- | ------------ | ------------ | -------------------- | -------------------- | +| 52 | 29 | 41 | 43 | 45 | 39 | 1 | 8 | 游戏评论 - | 游必有方 Podcast | 独立游戏潮(RED) | - | ---------------- | ----------------- | - | 6 | 3 | +| 游必有方 Podcast | 独立游戏潮(RED) | +| ---------------- | ----------------- | +| 6 | 3 | 游戏开发 - | 游戏设计模式 | Roguelike 开发 | GMS 中文教程 | - | ------------ | -------------- | ------------ | - | 15 | 14 | 7 | +| 游戏设计模式 | Roguelike 开发 | GMS 中文教程 | +| ------------ | -------------- | ------------ | +| 15 | 14 | 7 | 游戏设计 - | 游戏与所有 | 让人眼前一亮的游戏设计 | 游戏音乐分析 | 游戏情感设计 | 游戏相关书籍 | 游戏设计课程笔记 | 游戏设计工具 | 游戏设计灵感 | 设计师谈设计 | 游戏研究方法 | 功能游戏 | 游戏设计专业院校 | 像素课堂 | - | ---------- | ---------------------- | ------------ | ------------ | ------------ | ---------------- | ------------ | ------------ | ------------ | ------------ | -------- | ---------------- | -------- | - | 10 | 33 | 17 | 4 | 22 | 11 | 24 | 26 | 27 | 28 | 38 | 9 | 19 | +| 游戏与所有 | 让人眼前一亮的游戏设计 | 游戏音乐分析 | 游戏情感设计 | 游戏相关书籍 | 游戏设计课程笔记 | 游戏设计工具 | 游戏设计灵感 | 设计师谈设计 | 游戏研究方法 | 功能游戏 | 游戏设计专业院校 | 像素课堂 | +| ---------- | ---------------------- | ------------ | ------------ | ------------ | ---------------- | ------------ | ------------ | ------------ | ------------ | -------- | ---------------- | -------- | +| 10 | 33 | 17 | 4 | 22 | 11 | 24 | 26 | 27 | 28 | 38 | 9 | 19 | 游戏文化 - | NOVA 海外独立游戏见闻 | 工作室访谈 | indie Figure 游戏人 | 游戏艺术家 | 独立游戏音乐欣赏 | 游戏瑰宝 | 电脑 RPG 游戏史 | ALT. CTRL. GAMING | - | --------------------- | ---------- | ------------------- | ---------- | ---------------- | -------- | --------------- | ----------------- | - | 53 | 23 | 5 | 44 | 18 | 21 | 16 | 2 | +| NOVA 海外独立游戏见闻 | 工作室访谈 | indie Figure 游戏人 | 游戏艺术家 | 独立游戏音乐欣赏 | 游戏瑰宝 | 电脑 RPG 游戏史 | ALT. CTRL. GAMING | +| --------------------- | ---------- | ------------------- | ---------- | ---------------- | -------- | --------------- | ----------------- | +| 53 | 23 | 5 | 44 | 18 | 21 | 16 | 2 | Game Jam - | Ludum Dare | Global Game Jam | - | ---------- | --------------- | - | 31 | 13 | -
`, +| Ludum Dare | Global Game Jam | +| ---------- | --------------- | +| 31 | 13 | +
`, }; async function handler(ctx) { diff --git a/lib/routes/inewsweek/index.ts b/lib/routes/inewsweek/index.ts index d2173236a9a1..f1c2b362e6e6 100644 --- a/lib/routes/inewsweek/index.ts +++ b/lib/routes/inewsweek/index.ts @@ -31,9 +31,9 @@ export const route: Route = { handler, description: `提取文章全文。 - | 封面 | 时政 | 社会 | 经济 | 国际 | 调查 | 人物 | - | ----- | -------- | ------- | ------- | ----- | ------ | ------ | - | cover | politics | society | finance | world | survey | people |`, +| 封面 | 时政 | 社会 | 经济 | 国际 | 调查 | 人物 | +| ----- | -------- | ------- | ------- | ----- | ------ | ------ | +| cover | politics | society | finance | world | survey | people |`, }; async function handler(ctx) { diff --git a/lib/routes/infzm/index.ts b/lib/routes/infzm/index.ts index 8dc23476db21..e0beedf5e2b7 100644 --- a/lib/routes/infzm/index.ts +++ b/lib/routes/infzm/index.ts @@ -19,9 +19,9 @@ export const route: Route = { handler, description: `下面给出部分参考: - | 推荐 | 新闻 | 观点 | 文化 | 人物 | 影像 | 专题 | 生活 | 视频 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 1 | 2 | 3 | 4 | 7 | 8 | 6 | 5 | 131 |`, +| 推荐 | 新闻 | 观点 | 文化 | 人物 | 影像 | 专题 | 生活 | 视频 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 1 | 2 | 3 | 4 | 7 | 8 | 6 | 5 | 131 |`, }; export const baseUrl = 'https://www.infzm.com/contents'; diff --git a/lib/routes/instructables/projects.ts b/lib/routes/instructables/projects.ts index ec1a5af0f863..00d48f9dc9cf 100644 --- a/lib/routes/instructables/projects.ts +++ b/lib/routes/instructables/projects.ts @@ -25,8 +25,8 @@ export const route: Route = { handler, url: 'instructables.com/projects', description: `| All | Circuits | Workshop | Craft | Cooking | Living | Outside | Teachers | - | --- | -------- | -------- | ----- | ------- | ------ | ------- | -------- | - | | circuits | workshop | craft | cooking | living | outside | teachers |`, +| --- | -------- | -------- | ----- | ------- | ------ | ------- | -------- | +| | circuits | workshop | craft | cooking | living | outside | teachers |`, }; async function handler(ctx) { diff --git a/lib/routes/investor/index.ts b/lib/routes/investor/index.ts index 61eacf274e5f..b4f733b011b7 100644 --- a/lib/routes/investor/index.ts +++ b/lib/routes/investor/index.ts @@ -125,29 +125,29 @@ export const route: Route = { 若订阅 [证监会发布](https://www.investor.org.cn/information_release/news_release_from_authorities/zjhfb/),网址为 \`https://www.investor.org.cn/information_release/news_release_from_authorities/zjhfb/\`。截取 \`https://www.investor.org.cn/\` 到末尾 \`/\` 的部分 \`information_release/news_release_from_authorities/zjhfb\` 作为参数填入,此时路由为 [\`/investor/information_release/news_release_from_authorities/zjhfb\`](https://rsshub.app/investor/information_release/news_release_from_authorities/zjhfb)。 ::: - #### [权威发布](https://www.investor.org.cn/information_release/news_release_from_authorities/) +#### [权威发布](https://www.investor.org.cn/information_release/news_release_from_authorities/) - | [证监会发布](https://www.investor.org.cn/information_release/news_release_from_authorities/zjhfb/) | [证券交易所发布](https://www.investor.org.cn/information_release/news_release_from_authorities/hsjysfb/) | [期货交易所发布](https://www.investor.org.cn/information_release/news_release_from_authorities/qhjysfb/) | [行业协会发布](https://www.investor.org.cn/information_release/news_release_from_authorities/hyxhfb/) | [其他](https://www.investor.org.cn/information_release/news_release_from_authorities/otner/) | - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | [/investor/information_release/news_release_from_authorities/zjhfb/](https://rsshub.app/investor/investor/information_release/news_release_from_authorities/zjhfb/) | [/investor/information_release/news_release_from_authorities/hsjysfb/](https://rsshub.app/investor/investor/information_release/news_release_from_authorities/hsjysfb/) | [/investor/information_release/news_release_from_authorities/qhjysfb/](https://rsshub.app/investor/investor/information_release/news_release_from_authorities/qhjysfb/) | [/investor/information_release/news_release_from_authorities/hyxhfb/](https://rsshub.app/investor/investor/information_release/news_release_from_authorities/hyxhfb/) | [/investor/information_release/news_release_from_authorities/otner/](https://rsshub.app/investor/investor/information_release/news_release_from_authorities/otner/) | +| [证监会发布](https://www.investor.org.cn/information_release/news_release_from_authorities/zjhfb/) | [证券交易所发布](https://www.investor.org.cn/information_release/news_release_from_authorities/hsjysfb/) | [期货交易所发布](https://www.investor.org.cn/information_release/news_release_from_authorities/qhjysfb/) | [行业协会发布](https://www.investor.org.cn/information_release/news_release_from_authorities/hyxhfb/) | [其他](https://www.investor.org.cn/information_release/news_release_from_authorities/otner/) | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [/investor/information_release/news_release_from_authorities/zjhfb/](https://rsshub.app/investor/investor/information_release/news_release_from_authorities/zjhfb/) | [/investor/information_release/news_release_from_authorities/hsjysfb/](https://rsshub.app/investor/investor/information_release/news_release_from_authorities/hsjysfb/) | [/investor/information_release/news_release_from_authorities/qhjysfb/](https://rsshub.app/investor/investor/information_release/news_release_from_authorities/qhjysfb/) | [/investor/information_release/news_release_from_authorities/hyxhfb/](https://rsshub.app/investor/investor/information_release/news_release_from_authorities/hyxhfb/) | [/investor/information_release/news_release_from_authorities/otner/](https://rsshub.app/investor/investor/information_release/news_release_from_authorities/otner/) | - #### [市场资讯](https://www.investor.org.cn/information_release/market_news/) +#### [市场资讯](https://www.investor.org.cn/information_release/market_news/) - | [市场资讯](https://www.investor.org.cn/information_release/market_news/) | - | ---------------------------------------------------------------------------------------------------------- | - | [/investor/information_release/market_news/](https://rsshub.app/investor/information_release/market_news/) | +| [市场资讯](https://www.investor.org.cn/information_release/market_news/) | +| ---------------------------------------------------------------------------------------------------------- | +| [/investor/information_release/market_news/](https://rsshub.app/investor/information_release/market_news/) | - #### [政策解读](https://www.investor.org.cn/information_release/policy_interpretation/) +#### [政策解读](https://www.investor.org.cn/information_release/policy_interpretation/) - | [政策解读](https://www.investor.org.cn/information_release/policy_interpretation/) | - | ------------------------------------------------------------------------------------------------------------------- | - | [/investorinformation_release/policy_interpretation/](https://rsshub.appinformation_release/policy_interpretation/) | +| [政策解读](https://www.investor.org.cn/information_release/policy_interpretation/) | +| ------------------------------------------------------------------------------------------------------------------- | +| [/investorinformation_release/policy_interpretation/](https://rsshub.appinformation_release/policy_interpretation/) | - #### [国际交流](https://www.investor.org.cn/information_release/international_communication/) +#### [国际交流](https://www.investor.org.cn/information_release/international_communication/) - | [国际交流](https://www.investor.org.cn/information_release/international_communication/) | - | --------------------------------------------------------------------------------------------------------------------------------- | - | [/investor/information_release/international_communication/](https://rsshub.app/information_release/international_communication/) | +| [国际交流](https://www.investor.org.cn/information_release/international_communication/) | +| --------------------------------------------------------------------------------------------------------------------------------- | +| [/investor/information_release/international_communication/](https://rsshub.app/information_release/international_communication/) | `, categories: ['finance'], diff --git a/lib/routes/iresearch/weekly.ts b/lib/routes/iresearch/weekly.ts index c267f3e6865f..d1668dde072e 100644 --- a/lib/routes/iresearch/weekly.ts +++ b/lib/routes/iresearch/weekly.ts @@ -24,7 +24,7 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 家电行业 | 服装行业 | 美妆行业 | 食品饮料行业 | - | -------- | -------- | -------- | ------------ |`, +| -------- | -------- | -------- | ------------ |`, }; async function handler(ctx) { diff --git a/lib/routes/ithome/index.ts b/lib/routes/ithome/index.ts index 840e9ab1bcd4..16968647adaf 100644 --- a/lib/routes/ithome/index.ts +++ b/lib/routes/ithome/index.ts @@ -53,8 +53,8 @@ export const route: Route = { maintainers: ['luyuhuang'], handler, description: `| it | soft | win10 | win11 | iphone | ipad | android | digi | next | - | ------- | -------- | ---------- | ---------- | ----------- | --------- | ------------ | -------- | -------- | - | IT 资讯 | 软件之家 | win10 之家 | win11 之家 | iphone 之家 | ipad 之家 | android 之家 | 数码之家 | 智能时代 |`, +| ------- | -------- | ---------- | ---------- | ----------- | --------- | ------------ | -------- | -------- | +| IT 资讯 | 软件之家 | win10 之家 | win11 之家 | iphone 之家 | ipad 之家 | android 之家 | 数码之家 | 智能时代 |`, }; async function handler(ctx) { diff --git a/lib/routes/ithome/ranking.ts b/lib/routes/ithome/ranking.ts index b95630cdceea..c35b40ebe957 100644 --- a/lib/routes/ithome/ranking.ts +++ b/lib/routes/ithome/ranking.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['immmortal', 'luyuhuang'], handler, description: `| 24h | 7days | monthly | - | ------------- | -------- | ------- | - | 24 小时阅读榜 | 7 天最热 | 月榜 |`, +| ------------- | -------- | ------- | +| 24 小时阅读榜 | 7 天最热 | 月榜 |`, }; async function handler(ctx) { diff --git a/lib/routes/ithome/tw/feeds.ts b/lib/routes/ithome/tw/feeds.ts index 0d0f381f1283..4b9efe7d4026 100644 --- a/lib/routes/ithome/tw/feeds.ts +++ b/lib/routes/ithome/tw/feeds.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['miles170'], handler, description: `| 新聞 | AI | Cloud | DevOps | 資安 | - | ---- | -------- | ----- | ------ | -------- | - | news | big-data | cloud | devops | security |`, +| ---- | -------- | ----- | ------ | -------- | +| news | big-data | cloud | devops | security |`, }; async function handler(ctx) { diff --git a/lib/routes/javdb/actors.ts b/lib/routes/javdb/actors.ts index 74e09f0f7146..782506a47c05 100644 --- a/lib/routes/javdb/actors.ts +++ b/lib/routes/javdb/actors.ts @@ -31,8 +31,8 @@ export const route: Route = { handler, url: 'javdb.com/', description: `| 全部 | 可播放 | 單體作品 | 可下載 | 含字幕 | - | ---- | ------ | -------- | ------ | ------ | - | | p | s | d | c | +| ---- | ------ | -------- | ------ | ------ | +| | p | s | d | c | 所有演员编号参见 [演員庫](https://javdb.com/actors) diff --git a/lib/routes/javdb/index.ts b/lib/routes/javdb/index.ts index 41015a489fc5..0c24e38f0dc9 100644 --- a/lib/routes/javdb/index.ts +++ b/lib/routes/javdb/index.ts @@ -16,21 +16,21 @@ export const route: Route = { url: 'javdb.com/', description: `分类 - | 有碼 | 無碼 | 歐美 | - | -------- | ---------- | ------- | - | censored | uncensored | western | +| 有碼 | 無碼 | 歐美 | +| -------- | ---------- | ------- | +| censored | uncensored | western | 排序 - | 发布日期排序 | 磁鏈更新排序 | - | ------------ | ------------ | - | 1 | 2 | +| 发布日期排序 | 磁鏈更新排序 | +| ------------ | ------------ | +| 1 | 2 | 过滤 - | 全部 | 可下载 | 含字幕 | 含短評 | - | ---- | ------ | ------ | ------ | - | 0 | 1 | 2 | 3 |`, +| 全部 | 可下载 | 含字幕 | 含短評 | +| ---- | ------ | ------ | ------ | +| 0 | 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/javdb/makers.ts b/lib/routes/javdb/makers.ts index ce61dcc5ed57..5d4dd2860b4a 100644 --- a/lib/routes/javdb/makers.ts +++ b/lib/routes/javdb/makers.ts @@ -31,8 +31,8 @@ export const route: Route = { handler, url: 'javdb.com/', description: `| 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 | - | ---- | -------- | -------- | -------- | ----- | ------- | - | | playable | single | download | cnsub | preview | +| ---- | -------- | -------- | -------- | ----- | ------- | +| | playable | single | download | cnsub | preview | 所有片商编号参见 [片商庫](https://javdb.com/makers)`, }; diff --git a/lib/routes/javdb/rankings.ts b/lib/routes/javdb/rankings.ts index 5e767ad44ec7..304c87423d2c 100644 --- a/lib/routes/javdb/rankings.ts +++ b/lib/routes/javdb/rankings.ts @@ -32,15 +32,15 @@ export const route: Route = { url: 'javdb.com/', description: `分类 - | 有碼 | 無碼 | 歐美 | - | -------- | ---------- | ------- | - | censored | uncensored | western | +| 有碼 | 無碼 | 歐美 | +| -------- | ---------- | ------- | +| censored | uncensored | western | 时间 - | 日榜 | 週榜 | 月榜 | - | ----- | ------ | ------- | - | daily | weekly | monthly |`, +| 日榜 | 週榜 | 月榜 | +| ----- | ------ | ------- | +| daily | weekly | monthly |`, }; async function handler(ctx) { diff --git a/lib/routes/javdb/search.ts b/lib/routes/javdb/search.ts index be869f49dd20..f4c67cbd1e48 100644 --- a/lib/routes/javdb/search.ts +++ b/lib/routes/javdb/search.ts @@ -32,15 +32,15 @@ export const route: Route = { url: 'javdb.com/', description: `过滤 - | 全部 | 占位 | 可播放 | 單體作品 | 演員 | 片商 | 導演 | 系列 | 番號 | 可下載 | 字幕 | 預覽圖 | - | ---- | ---- | -------- | -------- | ----- | ----- | -------- | ------ | ---- | -------- | ----- | ------- | - | | none | playable | single | actor | maker | director | series | code | download | cnsub | preview | +| 全部 | 占位 | 可播放 | 單體作品 | 演員 | 片商 | 導演 | 系列 | 番號 | 可下載 | 字幕 | 預覽圖 | +| ---- | ---- | -------- | -------- | ----- | ----- | -------- | ------ | ---- | -------- | ----- | ------- | +| | none | playable | single | actor | maker | director | series | code | download | cnsub | preview | 排序 - | 按相关度排序 | 按发布时间排序 | - | ------------ | -------------- | - | 0 | 1 |`, +| 按相关度排序 | 按发布时间排序 | +| ------------ | -------------- | +| 0 | 1 |`, }; async function handler(ctx) { diff --git a/lib/routes/javdb/series.ts b/lib/routes/javdb/series.ts index ec6dcedb9c3d..ffcb0f4dd495 100644 --- a/lib/routes/javdb/series.ts +++ b/lib/routes/javdb/series.ts @@ -31,8 +31,8 @@ export const route: Route = { handler, url: 'javdb.com/', description: `| 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 | - | ---- | -------- | -------- | -------- | ----- | ------- | - | | playable | single | download | cnsub | preview | +| ---- | -------- | -------- | -------- | ----- | ------- | +| | playable | single | download | cnsub | preview | 所有系列编号参见 [系列庫](https://javdb.com/series)`, }; diff --git a/lib/routes/javdb/tags.ts b/lib/routes/javdb/tags.ts index a51111d1238c..f9aa38426dc0 100644 --- a/lib/routes/javdb/tags.ts +++ b/lib/routes/javdb/tags.ts @@ -38,9 +38,9 @@ export const route: Route = { 分类 - | 有碼 | 無碼 | 歐美 | - | -------- | ---------- | ------- | - | censored | uncensored | western |`, +| 有碼 | 無碼 | 歐美 | +| -------- | ---------- | ------- | +| censored | uncensored | western |`, }; async function handler(ctx) { diff --git a/lib/routes/javdb/videocodes.ts b/lib/routes/javdb/videocodes.ts index f0d8e8424705..3dc9a19847df 100644 --- a/lib/routes/javdb/videocodes.ts +++ b/lib/routes/javdb/videocodes.ts @@ -31,8 +31,8 @@ export const route: Route = { handler, url: 'javdb.com/', description: `| 全部 | 可播放 | 單體作品 | 可下載 | 字幕 | 預覽圖 | - | ---- | -------- | -------- | -------- | ----- | ------- | - | | playable | single | download | cnsub | preview |`, +| ---- | -------- | -------- | -------- | ----- | ------- | +| | playable | single | download | cnsub | preview |`, }; async function handler(ctx) { diff --git a/lib/routes/javlibrary/bestrated.ts b/lib/routes/javlibrary/bestrated.ts index 770100251a16..9964bea6ebc8 100644 --- a/lib/routes/javlibrary/bestrated.ts +++ b/lib/routes/javlibrary/bestrated.ts @@ -8,8 +8,8 @@ export const route: Route = { maintainers: [], handler, description: `| Last Month | All Time | - | ---------- | -------- | - | 1 | 2 |`, +| ---------- | -------- | +| 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/javlibrary/bestreviews.ts b/lib/routes/javlibrary/bestreviews.ts index ba3507c84630..65cb7894f90e 100644 --- a/lib/routes/javlibrary/bestreviews.ts +++ b/lib/routes/javlibrary/bestreviews.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| Last Month | All Time | - | ---------- | -------- | - | 1 | 2 |`, +| ---------- | -------- | +| 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/javlibrary/genre.ts b/lib/routes/javlibrary/genre.ts index 2b9c2dd0db66..f289d82aa549 100644 --- a/lib/routes/javlibrary/genre.ts +++ b/lib/routes/javlibrary/genre.ts @@ -8,8 +8,8 @@ export const route: Route = { maintainers: [], handler, description: `| videos with comments (by date) | everything (by date) | - | ------------------------------ | -------------------- | - | 1 | 2 | +| ------------------------------ | -------------------- | +| 1 | 2 | ::: tip See [Categories](https://www.javlibrary.com/en/genres.php) to view all categories. diff --git a/lib/routes/javlibrary/maker.ts b/lib/routes/javlibrary/maker.ts index b42254003cf5..f62d80a797a9 100644 --- a/lib/routes/javlibrary/maker.ts +++ b/lib/routes/javlibrary/maker.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: [], handler, description: `| videos with comments (by date) | everything (by date) | - | ------------------------------ | -------------------- | - | 1 | 2 |`, +| ------------------------------ | -------------------- | +| 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/javlibrary/mostwanted.ts b/lib/routes/javlibrary/mostwanted.ts index 70b6ad498a14..f20cfbeb0838 100644 --- a/lib/routes/javlibrary/mostwanted.ts +++ b/lib/routes/javlibrary/mostwanted.ts @@ -8,8 +8,8 @@ export const route: Route = { maintainers: [], handler, description: `| Last Month | All Time | - | ---------- | -------- | - | 1 | 2 |`, +| ---------- | -------- | +| 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/javlibrary/newrelease.ts b/lib/routes/javlibrary/newrelease.ts index 3310f8058da1..c7f99d7228f4 100644 --- a/lib/routes/javlibrary/newrelease.ts +++ b/lib/routes/javlibrary/newrelease.ts @@ -8,8 +8,8 @@ export const route: Route = { maintainers: [], handler, description: `| videos with comments (by date) | everything (by date) | - | ------------------------------ | -------------------- | - | 1 | 2 |`, +| ------------------------------ | -------------------- | +| 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/javlibrary/star.ts b/lib/routes/javlibrary/star.ts index 1f77ce6f2a6e..ecc606ba69d0 100644 --- a/lib/routes/javlibrary/star.ts +++ b/lib/routes/javlibrary/star.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| videos with comments (by date) | everything (by date) | - | ------------------------------ | -------------------- | - | 1 | 2 | +| ------------------------------ | -------------------- | +| 1 | 2 | ::: tip See [Ranking](https://www.javlibrary.com/en/star_mostfav.php) to view stars by ranks. diff --git a/lib/routes/javlibrary/user.ts b/lib/routes/javlibrary/user.ts index 719beb5f2d2c..e85759c2ad8c 100644 --- a/lib/routes/javlibrary/user.ts +++ b/lib/routes/javlibrary/user.ts @@ -8,8 +8,8 @@ export const route: Route = { maintainers: [], handler, description: `| Wanted | Watched | Owned | - | ---------- | ----------- | --------- | - | userwanted | userwatched | userowned |`, +| ---------- | ----------- | --------- | +| userwanted | userwatched | userowned |`, }; async function handler(ctx) { diff --git a/lib/routes/jinritemai/docs.ts b/lib/routes/jinritemai/docs.ts index d50925349e79..daffd9c41863 100644 --- a/lib/routes/jinritemai/docs.ts +++ b/lib/routes/jinritemai/docs.ts @@ -32,12 +32,12 @@ export const route: Route = { maintainers: ['blade0910'], handler, description: `| 类型 | type | - | --------- | ---------- | - | 全部公告 | 5 | - | 产品发布 | 19 | - | 规则变更 | 21 | - | 维护公告 | 20 | - | 其他公告 | 22 |`, +| --------- | ---------- | +| 全部公告 | 5 | +| 产品发布 | 19 | +| 规则变更 | 21 | +| 维护公告 | 20 | +| 其他公告 | 22 |`, }; async function handler(ctx) { diff --git a/lib/routes/jinse/catalogue.ts b/lib/routes/jinse/catalogue.ts index 3fadc032736d..931dc2b8018b 100644 --- a/lib/routes/jinse/catalogue.ts +++ b/lib/routes/jinse/catalogue.ts @@ -39,12 +39,12 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 政策 | 行情 | DeFi | 矿业 | 以太坊 2.0 | - | ------- | ------------ | ---- | ----- | ---------- | - | zhengce | fenxishishuo | defi | kuang | 以太坊 2.0 | +| ------- | ------------ | ---- | ----- | ---------- | +| zhengce | fenxishishuo | defi | kuang | 以太坊 2.0 | - | 产业 | IPFS | 技术 | 百科 | 研报 | - | -------- | ---- | ---- | ----- | ------------- | - | industry | IPFS | tech | baike | capitalmarket |`, +| 产业 | IPFS | 技术 | 百科 | 研报 | +| -------- | ---- | ---- | ----- | ------------- | +| industry | IPFS | tech | baike | capitalmarket |`, }; async function handler(ctx) { diff --git a/lib/routes/jinse/lives.ts b/lib/routes/jinse/lives.ts index 11b256a378f4..13f8b72952cb 100644 --- a/lib/routes/jinse/lives.ts +++ b/lib/routes/jinse/lives.ts @@ -41,8 +41,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 全部 | 精选 | 政策 | 数据 | NFT | 项目 | - | ---- | ---- | ---- | ---- | --- | ---- | - | 0 | 1 | 2 | 3 | 4 | 5 |`, +| ---- | ---- | ---- | ---- | --- | ---- | +| 0 | 1 | 2 | 3 | 4 | 5 |`, }; async function handler(ctx) { diff --git a/lib/routes/jinse/timeline.ts b/lib/routes/jinse/timeline.ts index fb48384e0775..f3d7a41ca1d8 100644 --- a/lib/routes/jinse/timeline.ts +++ b/lib/routes/jinse/timeline.ts @@ -48,9 +48,9 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 头条 | 独家 | 铭文 | 产业 | 项目 | - | ------ | ---- | ------- | ---------- | ---- | - | 政策 | AI | Web 3.0 | 以太坊 2.0 | DeFi | - | Layer2 | NFT | DAO | 百科 | |`, +| ------ | ---- | ------- | ---------- | ---- | +| 政策 | AI | Web 3.0 | 以太坊 2.0 | DeFi | +| Layer2 | NFT | DAO | 百科 | |`, }; async function handler(ctx) { diff --git a/lib/routes/joins/chinese.ts b/lib/routes/joins/chinese.ts index 8c1b9a239499..93be06161bc1 100644 --- a/lib/routes/joins/chinese.ts +++ b/lib/routes/joins/chinese.ts @@ -112,21 +112,21 @@ export const route: Route = { 若订阅 [财经](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N1),网址为 \`https://chinese.joins.com/news/articleList.html?sc_section_code=S1N1\`。截取 \`sc_section_code\` 的值作为参数填入,此时路由为 [\`/joins/chinese/S1N1\`](https://rsshub.app/joins/chinese/S1N1)。 ::: - | 分类 | \`sc_section_code\` | - | ------------------------------------------------------------------------------------------ | ----------------------------------------------- | - | [财经](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N1) | [S1N1](https://rsshub.app/joins/chinese/S1N1) | - | [国际](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N2) | [S1N2](https://rsshub.app/joins/chinese/S1N2) | - | [北韩](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N3) | [S1N3](https://rsshub.app/joins/chinese/S1N3) | - | [政治·社会](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N4) | [S1N4](https://rsshub.app/joins/chinese/S1N4) | - | [中国观察](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N5) | [S1N5](https://rsshub.app/joins/chinese/S1N5) | - | [社论](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N26) | [S1N26](https://rsshub.app/joins/chinese/S1N26) | - | [专栏·观点](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N11) | [S1N11](https://rsshub.app/joins/chinese/S1N11) | - | [军事·科技](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N6) | [S1N6](https://rsshub.app/joins/chinese/S1N6) | - | [娱乐体育](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N7) | [S1N7](https://rsshub.app/joins/chinese/S1N7) | - | [教育](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N8) | [S1N8](https://rsshub.app/joins/chinese/S1N8) | - | [旅游美食](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N9) | [S1N9](https://rsshub.app/joins/chinese/S1N9) | - | [时尚](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N10) | [S1N10](https://rsshub.app/joins/chinese/S1N10) | - | [图集](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N12&view_type=tm) | [S1N12](https://rsshub.app/joins/chinese/S1N12) | +| 分类 | \`sc_section_code\` | +| ------------------------------------------------------------------------------------------ | ----------------------------------------------- | +| [财经](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N1) | [S1N1](https://rsshub.app/joins/chinese/S1N1) | +| [国际](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N2) | [S1N2](https://rsshub.app/joins/chinese/S1N2) | +| [北韩](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N3) | [S1N3](https://rsshub.app/joins/chinese/S1N3) | +| [政治·社会](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N4) | [S1N4](https://rsshub.app/joins/chinese/S1N4) | +| [中国观察](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N5) | [S1N5](https://rsshub.app/joins/chinese/S1N5) | +| [社论](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N26) | [S1N26](https://rsshub.app/joins/chinese/S1N26) | +| [专栏·观点](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N11) | [S1N11](https://rsshub.app/joins/chinese/S1N11) | +| [军事·科技](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N6) | [S1N6](https://rsshub.app/joins/chinese/S1N6) | +| [娱乐体育](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N7) | [S1N7](https://rsshub.app/joins/chinese/S1N7) | +| [教育](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N8) | [S1N8](https://rsshub.app/joins/chinese/S1N8) | +| [旅游美食](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N9) | [S1N9](https://rsshub.app/joins/chinese/S1N9) | +| [时尚](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N10) | [S1N10](https://rsshub.app/joins/chinese/S1N10) | +| [图集](https://chinese.joins.com/news/articleList.html?sc_section_code=S1N12&view_type=tm) | [S1N12](https://rsshub.app/joins/chinese/S1N12) | `, categories: ['traditional-media'], diff --git a/lib/routes/jornada/index.ts b/lib/routes/jornada/index.ts index 2eb382664692..f833b25faea8 100644 --- a/lib/routes/jornada/index.ts +++ b/lib/routes/jornada/index.ts @@ -42,19 +42,19 @@ export const route: Route = { handler, description: `Provides a way to get an specific rss feed by date and category over the official one. - | Category | \`:category\` | - | -------------------- | ----------- | - | Capital | capital | - | Cartones | cartones | - | Ciencia y Tecnología | ciencia | - | Cultura | cultura | - | Deportes | deportes | - | Economía | economia | - | Estados | estados | - | Mundo | mundo | - | Opinión | opinion | - | Política | politica | - | Sociedad | sociedad |`, +| Category | \`:category\` | +| -------------------- | ----------- | +| Capital | capital | +| Cartones | cartones | +| Ciencia y Tecnología | ciencia | +| Cultura | cultura | +| Deportes | deportes | +| Economía | economia | +| Estados | estados | +| Mundo | mundo | +| Opinión | opinion | +| Política | politica | +| Sociedad | sociedad |`, }; async function handler(ctx) { diff --git a/lib/routes/jsu/jwc.ts b/lib/routes/jsu/jwc.ts index 5ff7142af64a..2fad40add0ed 100644 --- a/lib/routes/jsu/jwc.ts +++ b/lib/routes/jsu/jwc.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['wenjia03'], handler, description: `| 教务通知 | 教务动态 | - | -------- | -------- | - | jwtz | jwdt |`, +| -------- | -------- | +| jwtz | jwdt |`, }; async function handler(ctx) { diff --git a/lib/routes/juejin/pins.ts b/lib/routes/juejin/pins.ts index f3c994420ece..2f19d2bc7b94 100644 --- a/lib/routes/juejin/pins.ts +++ b/lib/routes/juejin/pins.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: ['xyqfer', 'laampui'], handler, description: `| 推荐 | 热门 | 上班摸鱼 | 内推招聘 | 一图胜千言 | 今天学到了 | 每天一道算法题 | 开发工具推荐 | 树洞一下 | - | --------- | ---- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | - | recommend | hot | 6824710203301167112 | 6819970850532360206 | 6824710202487472141 | 6824710202562969614 | 6824710202378436621 | 6824710202000932877 | 6824710203112423437 |`, +| --------- | ---- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| recommend | hot | 6824710203301167112 | 6819970850532360206 | 6824710202487472141 | 6824710202562969614 | 6824710202378436621 | 6824710202000932877 | 6824710203112423437 |`, }; async function handler(ctx) { diff --git a/lib/routes/juejin/trending.ts b/lib/routes/juejin/trending.ts index de465ab8d4b6..91f2fb0fe948 100644 --- a/lib/routes/juejin/trending.ts +++ b/lib/routes/juejin/trending.ts @@ -19,24 +19,24 @@ export const route: Route = { maintainers: ['moaix'], handler, description: `| category | 标签 | - | -------- | -------- | - | android | Android | - | frontend | 前端 | - | ios | iOS | - | backend | 后端 | - | design | 设计 | - | product | 产品 | - | freebie | 工具资源 | - | article | 阅读 | - | ai | 人工智能 | - | devops | 运维 | - | all | 全部 | +| -------- | -------- | +| android | Android | +| frontend | 前端 | +| ios | iOS | +| backend | 后端 | +| design | 设计 | +| product | 产品 | +| freebie | 工具资源 | +| article | 阅读 | +| ai | 人工智能 | +| devops | 运维 | +| all | 全部 | - | type | 类型 | - | ---------- | -------- | - | weekly | 本周最热 | - | monthly | 本月最热 | - | historical | 历史最热 |`, +| type | 类型 | +| ---------- | -------- | +| weekly | 本周最热 | +| monthly | 本月最热 | +| historical | 历史最热 |`, }; async function handler(ctx) { diff --git a/lib/routes/jump/discount.ts b/lib/routes/jump/discount.ts index 301595cdf5f3..9e372cd4a749 100644 --- a/lib/routes/jump/discount.ts +++ b/lib/routes/jump/discount.ts @@ -114,20 +114,20 @@ export const route: Route = { maintainers: ['zytomorrow'], handler, description: `| switch | ps4 | ps5 | xbox | steam | epic | - | ------ | ---- | ---- | ------ | ----- | ------ | - | 可用 | 可用 | 可用 | 不可用 | 可用 | 不可用 | - - | filter | switch | ps4 | ps5 | steam | - | ------ | ------ | --- | --- | ----- | - | all | ✔ | ✔ | ✔ | ✔ | - | jx | ✔ | ✔ | ❌ | ✔ | - | sd | ✔ | ✔ | ✔ | ✔ | - | dl | ❌ | ✔ | ❌ | ✔ | - | vip | ❌ | ❌ | ✔ | ❌ | - - | 北美 | 欧洲(英语) | 法国 | 德国 | 日本 | - | ---- | ------------ | ---- | ---- | ---- | - | na | eu | fr | de | jp |`, +| ------ | ---- | ---- | ------ | ----- | ------ | +| 可用 | 可用 | 可用 | 不可用 | 可用 | 不可用 | + +| filter | switch | ps4 | ps5 | steam | +| ------ | ------ | --- | --- | ----- | +| all | ✔ | ✔ | ✔ | ✔ | +| jx | ✔ | ✔ | ❌ | ✔ | +| sd | ✔ | ✔ | ✔ | ✔ | +| dl | ❌ | ✔ | ❌ | ✔ | +| vip | ❌ | ❌ | ✔ | ❌ | + +| 北美 | 欧洲(英语) | 法国 | 德国 | 日本 | +| ---- | ------------ | ---- | ---- | ---- | +| na | eu | fr | de | jp |`, }; async function handler(ctx) { diff --git a/lib/routes/kamen-rider-official/news.ts b/lib/routes/kamen-rider-official/news.ts index 164d6add5906..e360f7f6130a 100644 --- a/lib/routes/kamen-rider-official/news.ts +++ b/lib/routes/kamen-rider-official/news.ts @@ -26,37 +26,37 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| Category | - | -------------------------------------- | - | すべて | - | テレビ | - | 映画・V シネマ等 | - | Blu-ray・DVD、配信等 | - | 20 作記念グッズ・東映 EC 商品 | - | 石ノ森章太郎生誕 80 周年記念商品 | - | 玩具・カード | - | 食品・飲料・菓子 | - | 子供生活雑貨 | - | アパレル・大人向け雑貨 | - | フィギュア・ホビー・一番くじ・プライズ | - | ゲーム・デジタル | - | 雑誌・書籍・漫画 | - | 音楽 | - | 映像 | - | イベント | - | ホテル・レストラン等 | - | キャンペーン・タイアップ等 | - | その他 | - | KAMEN RIDER STORE | - | THE 鎧武祭り | - | 鎧武外伝 | - | 仮面ライダーリバイス | - | ファイナルステージ | - | THE50 周年展 | - | 風都探偵 | - | 仮面ライダーギーツ | - | 仮面ライダーアウトサイダーズ | - | 仮面ライダーガッチャード | - | 仮面ライダー BLACK SUN |`, +| -------------------------------------- | +| すべて | +| テレビ | +| 映画・V シネマ等 | +| Blu-ray・DVD、配信等 | +| 20 作記念グッズ・東映 EC 商品 | +| 石ノ森章太郎生誕 80 周年記念商品 | +| 玩具・カード | +| 食品・飲料・菓子 | +| 子供生活雑貨 | +| アパレル・大人向け雑貨 | +| フィギュア・ホビー・一番くじ・プライズ | +| ゲーム・デジタル | +| 雑誌・書籍・漫画 | +| 音楽 | +| 映像 | +| イベント | +| ホテル・レストラン等 | +| キャンペーン・タイアップ等 | +| その他 | +| KAMEN RIDER STORE | +| THE 鎧武祭り | +| 鎧武外伝 | +| 仮面ライダーリバイス | +| ファイナルステージ | +| THE50 周年展 | +| 風都探偵 | +| 仮面ライダーギーツ | +| 仮面ライダーアウトサイダーズ | +| 仮面ライダーガッチャード | +| 仮面ライダー BLACK SUN |`, }; async function handler(ctx) { diff --git a/lib/routes/kanxue/topic.ts b/lib/routes/kanxue/topic.ts index fbe9b606a1fe..d4b3de1c85dc 100644 --- a/lib/routes/kanxue/topic.ts +++ b/lib/routes/kanxue/topic.ts @@ -32,28 +32,28 @@ export const route: Route = { maintainers: ['renzhexigua'], handler, description: `| 版块 | category | - | -------------- | --------- | - | 智能设备 | iot | - | Android 安全 | android | - | iOS 安全 | ios | - | HarmonyOS 安全 | harmonyos | - | 软件逆向 | re | - | 编程技术 | coding | - | 加壳脱壳 | unpack | - | 密码应用 | crypto | - | 二进制漏洞 | vuln | - | CTF 对抗 | ctf | - | Pwn | pwn | - | WEB 安全 | web | - | 茶余饭后 | chat | - | 极客空间 | geekzone | - | 外文翻译 | translate | - | 全站 | all | +| -------------- | --------- | +| 智能设备 | iot | +| Android 安全 | android | +| iOS 安全 | ios | +| HarmonyOS 安全 | harmonyos | +| 软件逆向 | re | +| 编程技术 | coding | +| 加壳脱壳 | unpack | +| 密码应用 | crypto | +| 二进制漏洞 | vuln | +| CTF 对抗 | ctf | +| Pwn | pwn | +| WEB 安全 | web | +| 茶余饭后 | chat | +| 极客空间 | geekzone | +| 外文翻译 | translate | +| 全站 | all | - | 类型 | type | - | -------- | ------ | - | 最新主题 | latest | - | 精华主题 | digest |`, +| 类型 | type | +| -------- | ------ | +| 最新主题 | latest | +| 精华主题 | digest |`, }; const timeDiff = 1000 * 60 * 60 * 24 * 3; diff --git a/lib/routes/kaopu/news.ts b/lib/routes/kaopu/news.ts index 5910f09d4fea..6ebd6ba0ab39 100644 --- a/lib/routes/kaopu/news.ts +++ b/lib/routes/kaopu/news.ts @@ -17,8 +17,8 @@ export const route: Route = { name: '全部', maintainers: ['fashioncj'], description: `| 简体中文 | 繁体中文 | - | ------- | -------- | - | zh-hans | zh-hant | `, +| ------- | -------- | +| zh-hans | zh-hant | `, handler, }; diff --git a/lib/routes/kbs/news.ts b/lib/routes/kbs/news.ts index 043289f79d9d..6d441fffbf76 100644 --- a/lib/routes/kbs/news.ts +++ b/lib/routes/kbs/news.ts @@ -29,8 +29,8 @@ export const route: Route = { handler, url: 'world.kbs.co.kr/', description: `| 한국어 | عربي | 中国语 | English | Français | Deutsch | Bahasa Indonesia | 日本語 | Русский | Español | Tiếng Việt | - | ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- | - | k | a | c | e | f | g | i | j | r | s | v |`, +| ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- | +| k | a | c | e | f | g | i | j | r | s | v |`, }; async function handler(ctx) { diff --git a/lib/routes/kbs/today.ts b/lib/routes/kbs/today.ts index 07b47f1de463..6998cc105570 100644 --- a/lib/routes/kbs/today.ts +++ b/lib/routes/kbs/today.ts @@ -29,8 +29,8 @@ export const route: Route = { handler, url: 'world.kbs.co.kr/', description: `| 한국어 | عربي | 中国语 | English | Français | Deutsch | Bahasa Indonesia | 日本語 | Русский | Español | Tiếng Việt | - | ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- | - | k | a | c | e | f | g | i | j | r | s | v |`, +| ------ | ---- | ------ | ------- | -------- | ------- | ---------------- | ------ | ------- | ------- | ---------- | +| k | a | c | e | f | g | i | j | r | s | v |`, }; async function handler(ctx) { diff --git a/lib/routes/kcna/news.ts b/lib/routes/kcna/news.ts index 53aa7edb78fb..f1bd2e6f2a91 100644 --- a/lib/routes/kcna/news.ts +++ b/lib/routes/kcna/news.ts @@ -36,20 +36,20 @@ export const route: Route = { maintainers: ['Rongronggg9'], handler, description: `| Language | 조선어 | English | 中国语 | Русский | Español | 日本語 | - | -------- | ------ | ------- | ------ | ------- | ------- | ------ | - | \`:lang\` | \`kp\` | \`en\` | \`cn\` | \`ru\` | \`es\` | \`jp\` | +| -------- | ------ | ------- | ------ | ------- | ------- | ------ | +| \`:lang\` | \`kp\` | \`en\` | \`cn\` | \`ru\` | \`es\` | \`jp\` | - | Category | \`:category\` | - | ---------------------------------------------------------------- | ---------------------------------- | - | WPK General Secretary **Kim Jong Un**'s Revolutionary Activities | \`54c0ca4ca013a92cc9cf95bd4004c61a\` | - | Latest News (default) | \`1ee9bdb7186944f765208f34ecfb5407\` | - | Top News | \`5394b80bdae203fadef02522cfb578c0\` | - | Home News | \`b2b3bcc1b0a4406ab0c36e45d5db58db\` | - | Documents | \`a8754921399857ebdbb97a98a1e741f5\` | - | World | \`593143484cf15d48ce85c26139582395\` | - | Society-Life | \`93102e5a735d03979bc58a3a7aefb75a\` | - | External | \`0f98b4623a3ef82aeea78df45c423fd0\` | - | News Commentary | \`12c03a49f7dbe829bceea8ac77088c21\` |`, +| Category | \`:category\` | +| ---------------------------------------------------------------- | ---------------------------------- | +| WPK General Secretary **Kim Jong Un**'s Revolutionary Activities | \`54c0ca4ca013a92cc9cf95bd4004c61a\` | +| Latest News (default) | \`1ee9bdb7186944f765208f34ecfb5407\` | +| Top News | \`5394b80bdae203fadef02522cfb578c0\` | +| Home News | \`b2b3bcc1b0a4406ab0c36e45d5db58db\` | +| Documents | \`a8754921399857ebdbb97a98a1e741f5\` | +| World | \`593143484cf15d48ce85c26139582395\` | +| Society-Life | \`93102e5a735d03979bc58a3a7aefb75a\` | +| External | \`0f98b4623a3ef82aeea78df45c423fd0\` | +| News Commentary | \`12c03a49f7dbe829bceea8ac77088c21\` |`, }; async function handler(ctx) { diff --git a/lib/routes/kemono/index.ts b/lib/routes/kemono/index.ts index 2ec741d1bd75..50a593fde14b 100644 --- a/lib/routes/kemono/index.ts +++ b/lib/routes/kemono/index.ts @@ -32,9 +32,9 @@ export const route: Route = { handler, description: `Sources - | Posts | Patreon | Pixiv Fanbox | Gumroad | SubscribeStar | DLsite | Discord | Fantia | - | ----- | ------- | ------------ | ------- | ------------- | ------ | ------- | ------ | - | posts | patreon | fanbox | gumroad | subscribestar | dlsite | discord | fantia | +| Posts | Patreon | Pixiv Fanbox | Gumroad | SubscribeStar | DLsite | Discord | Fantia | +| ----- | ------- | ------------ | ------- | ------------- | ------ | ------- | ------ | +| posts | patreon | fanbox | gumroad | subscribestar | dlsite | discord | fantia | ::: tip When \`posts\` is selected as the value of the parameter **source**, the parameter **id** does not take effect. diff --git a/lib/routes/konachan/post.ts b/lib/routes/konachan/post.ts index b05197e61af2..106146892c1f 100644 --- a/lib/routes/konachan/post.ts +++ b/lib/routes/konachan/post.ts @@ -27,8 +27,8 @@ export const route: Route = { name: 'Popular Recent Posts', maintainers: ['magic-akari', 'NekoAria'], description: `| 最近 24 小时 | 最近一周 | 最近一月 | 最近一年 | - | ------- | -------- | ------- | -------- | - | 1d | 1w | 1m | 1y |`, +| ------- | -------- | ------- | -------- | +| 1d | 1w | 1m | 1y |`, handler, }; diff --git a/lib/routes/latepost/index.ts b/lib/routes/latepost/index.ts index 4662150213a8..6eaaf3fbd4f1 100644 --- a/lib/routes/latepost/index.ts +++ b/lib/routes/latepost/index.ts @@ -39,8 +39,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 最新报道 | 晚点独家 | 人物访谈 | 晚点早知道 | 长报道 | - | -------- | -------- | -------- | ---------- | ------ | - | | 1 | 2 | 3 | 4 |`, +| -------- | -------- | -------- | ---------- | ------ | +| | 1 | 2 | 3 | 4 |`, }; async function handler(ctx) { diff --git a/lib/routes/learnblockchain/posts.ts b/lib/routes/learnblockchain/posts.ts index 6c9afb045948..7fa084761b99 100644 --- a/lib/routes/learnblockchain/posts.ts +++ b/lib/routes/learnblockchain/posts.ts @@ -20,24 +20,24 @@ export const route: Route = { maintainers: ['running-grass'], handler, description: `| id | 分类 | - | -------- | ------------ | - | all | 全部 | - | DApp | 去中心化应用 | - | chains | 公链 | - | 联盟链 | 联盟链 | - | scaling | Layer2 | - | langs | 编程语言 | - | security | 安全 | - | dst | 存储 | - | basic | 理论研究 | - | other | 其他 | +| -------- | ------------ | +| all | 全部 | +| DApp | 去中心化应用 | +| chains | 公链 | +| 联盟链 | 联盟链 | +| scaling | Layer2 | +| langs | 编程语言 | +| security | 安全 | +| dst | 存储 | +| basic | 理论研究 | +| other | 其他 | - | id | 排序方式 | - | -------- | ----------- | - | newest | 最新 | - | featured | 精选 (默认) | - | featured | 最赞 | - | hottest | 最热 |`, +| id | 排序方式 | +| -------- | ----------- | +| newest | 最新 | +| featured | 精选 (默认) | +| featured | 最赞 | +| hottest | 最热 |`, }; async function handler(ctx) { diff --git a/lib/routes/line/today.ts b/lib/routes/line/today.ts index 5cb9e88d4833..2ac75b31ace9 100644 --- a/lib/routes/line/today.ts +++ b/lib/routes/line/today.ts @@ -18,9 +18,9 @@ export const route: Route = { url: 'today.line.me/', description: `Edition - | Taiwan | Thailand | Hong Kong | - | ------ | -------- | --------- | - | tw | th | hk |`, +| Taiwan | Thailand | Hong Kong | +| ------ | -------- | --------- | +| tw | th | hk |`, }; async function handler(ctx) { diff --git a/lib/routes/linkedin/cn/index.ts b/lib/routes/linkedin/cn/index.ts index 1d5b92d81514..15916d8c2942 100644 --- a/lib/routes/linkedin/cn/index.ts +++ b/lib/routes/linkedin/cn/index.ts @@ -21,13 +21,13 @@ export const route: Route = { handler, description: `另外,可以通过添加额外的以下 query 参数来输出满足特定要求的工作职位: - | 参数 | 描述 | 举例 | 默认值 | - | ---------- | ------------------------------------------------- | ------------------------------------------------------- | ------- | - | \`geo\` | geo 编码 | 102890883(中国)、102772228(上海)、103873152(北京) | 空 | - | \`remote\` | 是否只显示远程工作 | \`true/false\` | \`false\` | - | \`location\` | 工作地点 | \`china/shanghai/beijing\` | 空 | - | \`relevant\` | 排序方式 (true: 按相关性排序,false: 按日期排序) | \`true/false\` | \`false\` | - | \`period\` | 发布时间 | \`1/7/30\` | 空 | +| 参数 | 描述 | 举例 | 默认值 | +| ---------- | ------------------------------------------------- | ------------------------------------------------------- | ------- | +| \`geo\` | geo 编码 | 102890883(中国)、102772228(上海)、103873152(北京) | 空 | +| \`remote\` | 是否只显示远程工作 | \`true/false\` | \`false\` | +| \`location\` | 工作地点 | \`china/shanghai/beijing\` | 空 | +| \`relevant\` | 排序方式 (true: 按相关性排序,false: 按日期排序) | \`true/false\` | \`false\` | +| \`period\` | 发布时间 | \`1/7/30\` | 空 | 例如: [\`/linkedin/cn/jobs/Software?location=shanghai&period=1\`](https://rsshub.app/linkedin/cn/jobs/Software?location=shanghai\&period=1): 查找所有在上海的今日发布的所有 Software 工作 diff --git a/lib/routes/linkedin/jobs.ts b/lib/routes/linkedin/jobs.ts index ea60be49be84..fca537f82e19 100644 --- a/lib/routes/linkedin/jobs.ts +++ b/lib/routes/linkedin/jobs.ts @@ -51,32 +51,32 @@ export const route: Route = { handler, description: `#### \`job_types\` list - | Full Time | Part Time | Contractor | All | - | --------- | --------- | ---------- | --- | - | F | P | C | all | +| Full Time | Part Time | Contractor | All | +| --------- | --------- | ---------- | --- | +| F | P | C | all | - #### \`exp_levels\` list +#### \`exp_levels\` list - | Intership | Entry Level | Associate | Mid-Senior Level | Director | All | - | --------- | ----------- | --------- | ---------------- | -------- | --- | - | 1 | 2 | 3 | 4 | 5 | all | +| Intership | Entry Level | Associate | Mid-Senior Level | Director | All | +| --------- | ----------- | --------- | ---------------- | -------- | --- | +| 1 | 2 | 3 | 4 | 5 | all | - #### \`routeParams\` additional query parameters +#### \`routeParams\` additional query parameters - ##### \`f_WT\` list +##### \`f_WT\` list - | Onsite | Remote | Hybrid | - | ------ | ------- | ------ | - | 1 | 2 | 3 | +| Onsite | Remote | Hybrid | +| ------ | ------- | ------ | +| 1 | 2 | 3 | - ##### \`geoId\` +##### \`geoId\` Geographic location ID. You can find this ID in the URL of a LinkedIn job search page that is filtered by location. For example: 91000012 is the ID of East Asia. - ##### \`f_TPR\` +##### \`f_TPR\` Time posted range. Here are some possible values: diff --git a/lib/routes/lofter/tag.ts b/lib/routes/lofter/tag.ts index 45759d093c7b..257452b3b3e8 100644 --- a/lib/routes/lofter/tag.ts +++ b/lib/routes/lofter/tag.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['hoilc', 'nczitzk', 'LucunJi'], handler, description: `| new | date | week | month | total | - | ---- | ---- | ---- | ----- | ----- | - | 最新 | 日榜 | 周榜 | 月榜 | 总榜 |`, +| ---- | ---- | ---- | ----- | ----- | +| 最新 | 日榜 | 周榜 | 月榜 | 总榜 |`, }; async function handler(ctx) { diff --git a/lib/routes/logclub/report.ts b/lib/routes/logclub/report.ts index 6a2e708d8280..a93d2a9c88f3 100644 --- a/lib/routes/logclub/report.ts +++ b/lib/routes/logclub/report.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 罗戈研究出品 | 物流报告 | 绿色双碳报告 | - | ------------ | -------------- | --------------------- | - | Report | IndustryReport | GreenDualCarbonReport |`, +| ------------ | -------------- | --------------------- | +| Report | IndustryReport | GreenDualCarbonReport |`, }; async function handler(ctx) { diff --git a/lib/routes/loltw/news.ts b/lib/routes/loltw/news.ts index 35e405f27864..45544dd30740 100644 --- a/lib/routes/loltw/news.ts +++ b/lib/routes/loltw/news.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['hoilc'], handler, description: `| 活动 | 资讯 | 系统 | 电竞 | 版本资讯 | 战棋资讯 | - | ----- | ---- | ------ | ------ | -------- | -------- | - | event | info | system | esport | patch | TFTpatch |`, +| ----- | ---- | ------ | ------ | -------- | -------- | +| event | info | system | esport | patch | TFTpatch |`, }; async function handler(ctx) { diff --git a/lib/routes/lovelive-anime/news.ts b/lib/routes/lovelive-anime/news.ts index 6c722839e34d..45af080bf812 100644 --- a/lib/routes/lovelive-anime/news.ts +++ b/lib/routes/lovelive-anime/news.ts @@ -40,12 +40,12 @@ export const route: Route = { handler, url: 'www.lovelive-anime.jp/', description: `| Sub-project Name | All Projects | Lovelive! | Lovelive! Sunshine!! | Lovelive! Nijigasaki High School Idol Club | Lovelive! Superstar!! | 蓮ノ空女学院 | 幻日のヨハネ | ラブライブ!スクールアイドルミュージカル | - | -------------------------------- | -------------- | ----------- | -------------------- | ------------------------------------------ | --------------------- | ------------ | ------------ | ---------------------------------------- | - | \`abbr\`parameter | *No parameter* | lovelive | sunshine | nijigasaki | superstar | hasunosora | yohane | musical | +| -------------------------------- | -------------- | ----------- | -------------------- | ------------------------------------------ | --------------------- | ------------ | ------------ | ---------------------------------------- | +| \`abbr\`parameter | *No parameter* | lovelive | sunshine | nijigasaki | superstar | hasunosora | yohane | musical | - | Category Name | 全てのニュース | 音楽商品 | アニメ映像商品 | キャスト映像商品 | 劇場 | アニメ放送 / 配信 | キャスト配信 / ラジオ | ライブ / イベント | ブック | グッズ | ゲーム | メディア | ご当地情報 | キャンペーン | その他 | - | ------------------- | --------------------- | -------- | -------------- | ---------------- | ------- | ----------------- | --------------------- | ----------------- | ------ | ------ | ------ | -------- | ---------- | ------ | ------------ | - | \`category\`parameter | *No parameter* | music | anime_movie | cast_movie | theater | onair | radio | event | books | goods | game | media | local | campaign | other |`, +| Category Name | 全てのニュース | 音楽商品 | アニメ映像商品 | キャスト映像商品 | 劇場 | アニメ放送 / 配信 | キャスト配信 / ラジオ | ライブ / イベント | ブック | グッズ | ゲーム | メディア | ご当地情報 | キャンペーン | その他 | +| ------------------- | --------------------- | -------- | -------------- | ---------------- | ------- | ----------------- | --------------------- | ----------------- | ------ | ------ | ------ | -------- | ---------- | ------ | ------------ | +| \`category\`parameter | *No parameter* | music | anime_movie | cast_movie | theater | onair | radio | event | books | goods | game | media | local | campaign | other |`, }; async function handler(ctx) { diff --git a/lib/routes/lovelive-anime/topics.ts b/lib/routes/lovelive-anime/topics.ts index efc4132da7d5..1b91f2ce194a 100644 --- a/lib/routes/lovelive-anime/topics.ts +++ b/lib/routes/lovelive-anime/topics.ts @@ -32,12 +32,12 @@ export const route: Route = { maintainers: ['axojhf'], handler, description: `| Sub-project Name (not full name) | Lovelive! | Lovelive! Sunshine!! | Lovelive! Nijigasaki High School Idol Club | Lovelive! Superstar!! | 幻日のヨハネ | ラブライブ!スクールアイドルミュージカル | - | -------------------------------- | ----------- | -------------------- | ------------------------------------------ | --------------------- | ------------ | ---------------------------------------- | - | \`abbr\`parameter | otonokizaka | uranohoshi | nijigasaki | yuigaoka | yohane | musical | +| -------------------------------- | ----------- | -------------------- | ------------------------------------------ | --------------------- | ------------ | ---------------------------------------- | +| \`abbr\`parameter | otonokizaka | uranohoshi | nijigasaki | yuigaoka | yohane | musical | - | Category Name | 全てのニュース | 音楽商品 | アニメ映像商品 | キャスト映像商品 | 劇場 | アニメ放送 / 配信 | キャスト配信 / ラジオ | ライブ / イベント | ブック | グッズ | ゲーム | メディア | ご当地情報 | その他 | キャンペーン | - | ------------------- | --------------------- | -------- | -------------- | ---------------- | ------- | ----------------- | --------------------- | ----------------- | ------ | ------ | ------ | -------- | ---------- | ------ | ------------ | - | \`category\`parameter | *No parameter* | music | anime\_movie | cast\_movie | theater | onair | radio | event | books | goods | game | media | local | other | campaign |`, +| Category Name | 全てのニュース | 音楽商品 | アニメ映像商品 | キャスト映像商品 | 劇場 | アニメ放送 / 配信 | キャスト配信 / ラジオ | ライブ / イベント | ブック | グッズ | ゲーム | メディア | ご当地情報 | その他 | キャンペーン | +| ------------------- | --------------------- | -------- | -------------- | ---------------- | ------- | ----------------- | --------------------- | ----------------- | ------ | ------ | ------ | -------- | ---------- | ------ | ------------ | +| \`category\`parameter | *No parameter* | music | anime\_movie | cast\_movie | theater | onair | radio | event | books | goods | game | media | local | other | campaign |`, }; async function handler(ctx) { diff --git a/lib/routes/lrepacks/index.ts b/lib/routes/lrepacks/index.ts index 76eac82ad87c..e31a5ddca65b 100644 --- a/lib/routes/lrepacks/index.ts +++ b/lib/routes/lrepacks/index.ts @@ -120,17 +120,17 @@ export const route: Route = { description: `::: tip If you subscribe to [Системные программы](https://lrepacks.net/repaki-sistemnyh-programm/),where the URL is \`https://lrepacks.net/repaki-sistemnyh-programm/\`, extract the part \`https://lrepacks.net/\` to the end, which is \`repaki-sistemnyh-programm\`, and use it as the parameter to fill in. Therefore, the route will be [\`/lrepacks/repaki-sistemnyh-programm\`](https://rsshub.app/lrepacks/repaki-sistemnyh-programm). - | Category | ID | - | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | - | [Новые репаки на сегодня](https://lrepacks.net/novye-repaki-elchupacabra/) | [novye-repaki-elchupacabra](https://rsshub.app/lrepacks/novye-repaki-elchupacabra) | - | [Системные программы](https://lrepacks.net/repaki-sistemnyh-programm/) | [repaki-sistemnyh-programm](https://rsshub.app/lrepacks/repaki-sistemnyh-programm) | - | [Программы для графики](https://lrepacks.net/repaki-programm-dlya-grafiki/) | [repaki-programm-dlya-grafiki](https://rsshub.app/lrepacks/repaki-programm-dlya-grafiki) | - | [Программы для интернета](https://lrepacks.net/repaki-programm-dlya-interneta/) | [repaki-programm-dlya-interneta](https://rsshub.app/lrepacks/repaki-programm-dlya-interneta) | - | [Мультимедиа программы](https://lrepacks.net/repaki-multimedia-programm/) | [repaki-multimedia-programm](https://rsshub.app/lrepacks/repaki-multimedia-programm) | - | [Программы для офиса](https://lrepacks.net/repaki-programm-dlya-ofisa/) | [repaki-programm-dlya-ofisa](https://rsshub.app/lrepacks/repaki-programm-dlya-ofisa) | - | [Разные программы](https://lrepacks.net/repaki-raznyh-programm/) | [repaki-raznyh-programm](https://rsshub.app/lrepacks/repaki-raznyh-programm) | - | [Системные библиотеки](https://lrepacks.net/sistemnye-biblioteki/) | [sistemnye-biblioteki](https://rsshub.app/lrepacks/sistemnye-biblioteki) | - | [Важная информация](https://lrepacks.net/informaciya/) | [informaciya](https://rsshub.app/lrepacks/informaciya) | +| Category | ID | +| ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| [Новые репаки на сегодня](https://lrepacks.net/novye-repaki-elchupacabra/) | [novye-repaki-elchupacabra](https://rsshub.app/lrepacks/novye-repaki-elchupacabra) | +| [Системные программы](https://lrepacks.net/repaki-sistemnyh-programm/) | [repaki-sistemnyh-programm](https://rsshub.app/lrepacks/repaki-sistemnyh-programm) | +| [Программы для графики](https://lrepacks.net/repaki-programm-dlya-grafiki/) | [repaki-programm-dlya-grafiki](https://rsshub.app/lrepacks/repaki-programm-dlya-grafiki) | +| [Программы для интернета](https://lrepacks.net/repaki-programm-dlya-interneta/) | [repaki-programm-dlya-interneta](https://rsshub.app/lrepacks/repaki-programm-dlya-interneta) | +| [Мультимедиа программы](https://lrepacks.net/repaki-multimedia-programm/) | [repaki-multimedia-programm](https://rsshub.app/lrepacks/repaki-multimedia-programm) | +| [Программы для офиса](https://lrepacks.net/repaki-programm-dlya-ofisa/) | [repaki-programm-dlya-ofisa](https://rsshub.app/lrepacks/repaki-programm-dlya-ofisa) | +| [Разные программы](https://lrepacks.net/repaki-raznyh-programm/) | [repaki-raznyh-programm](https://rsshub.app/lrepacks/repaki-raznyh-programm) | +| [Системные библиотеки](https://lrepacks.net/sistemnye-biblioteki/) | [sistemnye-biblioteki](https://rsshub.app/lrepacks/sistemnye-biblioteki) | +| [Важная информация](https://lrepacks.net/informaciya/) | [informaciya](https://rsshub.app/lrepacks/informaciya) | :::`, categories: ['program-update'], diff --git a/lib/routes/lsnu/jiaowc/tzgg.ts b/lib/routes/lsnu/jiaowc/tzgg.ts index bf618bb142ce..ed38e6bf6879 100644 --- a/lib/routes/lsnu/jiaowc/tzgg.ts +++ b/lib/routes/lsnu/jiaowc/tzgg.ts @@ -27,8 +27,8 @@ export const route: Route = { handler, url: 'lsnu.edu.cn/', description: `| 实践教学科 | 教育运行科 | 教研教改科 | 学籍管理科 | 考试科 | 教材建设管理科 | - | ---------- | ---------- | ---------- | ---------- | ------ | -------------- | - | sjjxk | jxyxk | jyjgk | xjglk | ksk | jcjsglk |`, +| ---------- | ---------- | ---------- | ---------- | ------ | -------------- | +| sjjxk | jxyxk | jyjgk | xjglk | ksk | jcjsglk |`, }; async function handler(ctx) { diff --git a/lib/routes/lvv2/news.ts b/lib/routes/lvv2/news.ts index 9328eee16b7f..ab142ade15bc 100644 --- a/lib/routes/lvv2/news.ts +++ b/lib/routes/lvv2/news.ts @@ -46,12 +46,12 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| 热门 | 最新 | 得分 | 24 小时榜 | - | :------: | :------: | :--------: | :-----------: | - | sort-hot | sort-new | sort-score | sort-realtime | +| :------: | :------: | :--------: | :-----------: | +| sort-hot | sort-new | sort-score | sort-realtime | - | 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 | - | :------: | :------: | :----: | :------: | :------: | - | | t-hour | t-day | t-week | t-month |`, +| 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 | +| :------: | :------: | :----: | :------: | :------: | +| | t-hour | t-day | t-week | t-month |`, }; async function handler(ctx) { diff --git a/lib/routes/lvv2/top.ts b/lib/routes/lvv2/top.ts index fd4225440889..647c13721f94 100644 --- a/lib/routes/lvv2/top.ts +++ b/lib/routes/lvv2/top.ts @@ -46,12 +46,12 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| 热门 | 最新 | 得分 | 24 小时榜 | - | :------: | :------: | :--------: | :-----------: | - | sort-hot | sort-new | sort-score | sort-realtime | +| :------: | :------: | :--------: | :-----------: | +| sort-hot | sort-new | sort-score | sort-realtime | - | 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 | - | :------: | :------: | :----: | :------: | :------: | - | | t-hour | t-day | t-week | t-month |`, +| 排序方式 | 一小时内 | 一天内 | 一个周内 | 一个月内 | +| :------: | :------: | :----: | :------: | :------: | +| | t-hour | t-day | t-week | t-month |`, }; async function handler(ctx) { diff --git a/lib/routes/malaysiakini/index.ts b/lib/routes/malaysiakini/index.ts index 0f781f6092f6..666de39f04f1 100644 --- a/lib/routes/malaysiakini/index.ts +++ b/lib/routes/malaysiakini/index.ts @@ -41,15 +41,15 @@ export const route: Route = { maintainers: ['quiniapiezoelectricity'], handler, description: ` - | Language | English | Bahasa Malaysia | 华文 | - | -------- | ------ | ------- | ------ | - | \`:lang\` | \`en\` | \`my\` | \`zh\` | +| Language | English | Bahasa Malaysia | 华文 | +| -------- | ------ | ------- | ------ | +| \`:lang\` | \`en\` | \`my\` | \`zh\` | - | Category | \`:category\` | - | ---------------------- | ------------- | - | News | \`news\` | - | Columns | \`columns\` | - | From Our Readers | \`letters\` |`, +| Category | \`:category\` | +| ---------------------- | ------------- | +| News | \`news\` | +| Columns | \`columns\` | +| From Our Readers | \`letters\` |`, radar: [ { source: ['malaysiakini.com/'], diff --git a/lib/routes/matters/latest.ts b/lib/routes/matters/latest.ts index dfb7c297377d..86fb4260f47e 100644 --- a/lib/routes/matters/latest.ts +++ b/lib/routes/matters/latest.ts @@ -69,6 +69,6 @@ export const route: Route = { }, ], description: `| 最新 | 热门 | 精华 | - | ------ | ---- | ------- | - | latest | heat | essence |`, +| ------ | ---- | ------- | +| latest | heat | essence |`, }; diff --git a/lib/routes/mckinsey/cn/index.ts b/lib/routes/mckinsey/cn/index.ts index a9770fb5c724..b095fb4715e3 100644 --- a/lib/routes/mckinsey/cn/index.ts +++ b/lib/routes/mckinsey/cn/index.ts @@ -30,25 +30,25 @@ export const route: Route = { maintainers: ['laampui'], handler, description: `| 分类 | 分类名 | - | ---- | ------------------ | - | 25 | 全部洞见 | - | 2 | 汽车 | - | 3 | 金融服务 | - | 4 | 消费者 | - | 5 | 医药 | - | 7 | 数字化 | - | 8 | 制造业 | - | 9 | 私募 | - | 10 | 技术,媒体与通信 | - | 12 | 城市化与可持续发展 | - | 13 | 创新 | - | 16 | 人才与领导力 | - | 18 | 宏观经济 | - | 19 | 麦肯锡全球研究院 | - | 37 | 麦肯锡季刊 | - | 41 | 资本项目和基础设施 | - | 42 | 旅游、运输和物流 | - | 45 | 全球基础材料 |`, +| ---- | ------------------ | +| 25 | 全部洞见 | +| 2 | 汽车 | +| 3 | 金融服务 | +| 4 | 消费者 | +| 5 | 医药 | +| 7 | 数字化 | +| 8 | 制造业 | +| 9 | 私募 | +| 10 | 技术,媒体与通信 | +| 12 | 城市化与可持续发展 | +| 13 | 创新 | +| 16 | 人才与领导力 | +| 18 | 宏观经济 | +| 19 | 麦肯锡全球研究院 | +| 37 | 麦肯锡季刊 | +| 41 | 资本项目和基础设施 | +| 42 | 旅游、运输和物流 | +| 45 | 全球基础材料 |`, }; async function handler(ctx) { diff --git a/lib/routes/medsci/index.ts b/lib/routes/medsci/index.ts index 2117394ffb5c..5ff9400706e5 100644 --- a/lib/routes/medsci/index.ts +++ b/lib/routes/medsci/index.ts @@ -26,41 +26,41 @@ export const route: Route = { 如 [肿瘤 - NSCLC](https://www.medsci.cn/department/details?s_id=5\&t_id=277) 的 URL 为 \`https://www.medsci.cn/department/details?s_id=5&t_id=277\`,可以看到此时 \`s_id\` 对应 \`sid\` 的值为 5, \`t_id\` 对应 \`tid\` 的值为 277,所以可以得到路由 [\`/medsci/5/277\`](https://rsshub.app/medsci/5/277) ::: - | 心血管 | 内分泌 | 消化 | 呼吸 | 神经科 | - | ------ | ------ | ---- | ---- | ------ | - | 2 | 6 | 4 | 12 | 17 | +| 心血管 | 内分泌 | 消化 | 呼吸 | 神经科 | +| ------ | ------ | ---- | ---- | ------ | +| 2 | 6 | 4 | 12 | 17 | - | 传染科 | 精神心理 | 肾内科 | 风湿免疫 | 血液科 | - | ------ | -------- | ------ | -------- | ------ | - | 9 | 13 | 14 | 15 | 21 | +| 传染科 | 精神心理 | 肾内科 | 风湿免疫 | 血液科 | +| ------ | -------- | ------ | -------- | ------ | +| 9 | 13 | 14 | 15 | 21 | - | 老年医学 | 胃肠外科 | 血管外科 | 肝胆胰外 | 骨科 | - | -------- | -------- | -------- | -------- | ---- | - | 19 | 76 | 92 | 91 | 10 | +| 老年医学 | 胃肠外科 | 血管外科 | 肝胆胰外 | 骨科 | +| -------- | -------- | -------- | -------- | ---- | +| 19 | 76 | 92 | 91 | 10 | - | 普通外科 | 胸心外科 | 神经外科 | 泌尿外科 | 烧伤科 | - | -------- | -------- | -------- | -------- | ------ | - | 23 | 24 | 25 | 26 | 27 | +| 普通外科 | 胸心外科 | 神经外科 | 泌尿外科 | 烧伤科 | +| -------- | -------- | -------- | -------- | ------ | +| 23 | 24 | 25 | 26 | 27 | - | 整形科 | 麻醉疼痛 | 罕见病 | 康复医学 | 药械 | - | ------ | -------- | ------ | -------- | ---- | - | 28 | 29 | 304 | 95 | 11 | +| 整形科 | 麻醉疼痛 | 罕见病 | 康复医学 | 药械 | +| ------ | -------- | ------ | -------- | ---- | +| 28 | 29 | 304 | 95 | 11 | - | 儿科 | 耳鼻咽喉 | 口腔科 | 眼科 | 政策人文 | - | ---- | -------- | ------ | ---- | -------- | - | 18 | 30 | 31 | 32 | 33 | +| 儿科 | 耳鼻咽喉 | 口腔科 | 眼科 | 政策人文 | +| ---- | -------- | ------ | ---- | -------- | +| 18 | 30 | 31 | 32 | 33 | - | 营养全科 | 预防公卫 | 妇产科 | 中医科 | 急重症 | - | -------- | -------- | ------ | ------ | ------ | - | 34 | 35 | 36 | 37 | 38 | +| 营养全科 | 预防公卫 | 妇产科 | 中医科 | 急重症 | +| -------- | -------- | ------ | ------ | ------ | +| 34 | 35 | 36 | 37 | 38 | - | 皮肤性病 | 影像放射 | 转化医学 | 检验病理 | 护理 | - | -------- | -------- | -------- | -------- | ---- | - | 39 | 40 | 42 | 69 | 79 | +| 皮肤性病 | 影像放射 | 转化医学 | 检验病理 | 护理 | +| -------- | -------- | -------- | -------- | ---- | +| 39 | 40 | 42 | 69 | 79 | - | 糖尿病 | 冠心病 | 肝病 | 乳腺癌 | - | ------ | ------ | ---- | ------ | - | 8 | 43 | 22 | 89 |`, +| 糖尿病 | 冠心病 | 肝病 | 乳腺癌 | +| ------ | ------ | ---- | ------ | +| 8 | 43 | 22 | 89 |`, }; async function handler(ctx) { diff --git a/lib/routes/meishichina/index.ts b/lib/routes/meishichina/index.ts index 80128257d30e..b4b24b61863c 100644 --- a/lib/routes/meishichina/index.ts +++ b/lib/routes/meishichina/index.ts @@ -177,8 +177,8 @@ export const route: Route = { 若订阅 [菜谱大全](https://home.meishichina.com/recipe.html) 中的 \`自制食材\` 分类,将 \`自制食材\` 作为参数填入,此时路由为 [\`/meishichina/recipe/自制食材/\`](https://rsshub.app/meishichina/recipe/自制食材)。 ::: - | [最新推荐](https://home.meishichina.com/recipe.html) | [最新发布](https://home.meishichina.com/recipe.html) | [热菜](https://home.meishichina.com/recipe.html) | [凉菜](https://home.meishichina.com/recipe.html) | [汤羹](https://home.meishichina.com/recipe.html) | [主食](https://home.meishichina.com/recipe.html) | [小吃](https://home.meishichina.com/recipe.html) | [西餐](https://home.meishichina.com/recipe.html) | [烘焙](https://home.meishichina.com/recipe.html) | [自制食材](https://home.meishichina.com/recipe.html) | - | ---------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ---------------------------------------------------- | +| [最新推荐](https://home.meishichina.com/recipe.html) | [最新发布](https://home.meishichina.com/recipe.html) | [热菜](https://home.meishichina.com/recipe.html) | [凉菜](https://home.meishichina.com/recipe.html) | [汤羹](https://home.meishichina.com/recipe.html) | [主食](https://home.meishichina.com/recipe.html) | [小吃](https://home.meishichina.com/recipe.html) | [西餐](https://home.meishichina.com/recipe.html) | [烘焙](https://home.meishichina.com/recipe.html) | [自制食材](https://home.meishichina.com/recipe.html) | +| ---------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ---------------------------------------------------- | ::: tip 若订阅 [全部分类](https://home.meishichina.com/recipe-type.html) 中的对应分类页,见下方说明。 @@ -190,266 +190,266 @@ export const route: Route = { 若订阅 [制作难度简单菜谱](https://home.meishichina.com/recipe-type-do-level-view-1.html),网址为 \`https://home.meishichina.com/recipe-type-do-level-view-1.html\`。截取 \`https://home.meishichina.com/\` 到末尾 \`.html\` 的部分 \`recipe-type-do-level-view-1\` 作为参数填入,此时路由为 [\`/meishichina/recipe/recipe-type-do-level-view-1/\`](https://rsshub.app/meishichina/recipe/recipe-type-do-level-view-1)。 ::: -
- 更多分类 +
+更多分类 - #### 常见菜式 +#### 常见菜式 - | [热菜](https://home.meishichina.com/recipe/recai/) | [凉菜](https://home.meishichina.com/recipe/liangcai/) | [汤羹](https://home.meishichina.com/recipe/tanggeng/) | [主食](https://home.meishichina.com/recipe/zhushi/) | [小吃](https://home.meishichina.com/recipe/xiaochi/) | [家常菜](https://home.meishichina.com/recipe/jiachang/) | - | ---------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------- | ---------------------------------------------------------- | - | [recai](https://rsshub.app/meishichina/recipe/recai) | [liangcai](https://rsshub.app/meishichina/recipe/liangcai) | [tanggeng](https://rsshub.app/meishichina/recipe/tanggeng) | [zhushi](https://rsshub.app/meishichina/recipe/zhushi) | [xiaochi](https://rsshub.app/meishichina/recipe/xiaochi) | [jiachang](https://rsshub.app/meishichina/recipe/jiachang) | +| [热菜](https://home.meishichina.com/recipe/recai/) | [凉菜](https://home.meishichina.com/recipe/liangcai/) | [汤羹](https://home.meishichina.com/recipe/tanggeng/) | [主食](https://home.meishichina.com/recipe/zhushi/) | [小吃](https://home.meishichina.com/recipe/xiaochi/) | [家常菜](https://home.meishichina.com/recipe/jiachang/) | +| ---------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------- | ---------------------------------------------------------- | +| [recai](https://rsshub.app/meishichina/recipe/recai) | [liangcai](https://rsshub.app/meishichina/recipe/liangcai) | [tanggeng](https://rsshub.app/meishichina/recipe/tanggeng) | [zhushi](https://rsshub.app/meishichina/recipe/zhushi) | [xiaochi](https://rsshub.app/meishichina/recipe/xiaochi) | [jiachang](https://rsshub.app/meishichina/recipe/jiachang) | - | [泡酱腌菜](https://home.meishichina.com/recipe/jiangpaoyancai/) | [西餐](https://home.meishichina.com/recipe/xican/) | [烘焙](https://home.meishichina.com/recipe/hongbei/) | [烤箱菜](https://home.meishichina.com/recipe/kaoxiangcai/) | [饮品](https://home.meishichina.com/recipe/yinpin/) | [零食](https://home.meishichina.com/recipe/lingshi/) | - | ---------------------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------- | - | [jiangpaoyancai](https://rsshub.app/meishichina/recipe/jiangpaoyancai) | [xican](https://rsshub.app/meishichina/recipe/xican) | [hongbei](https://rsshub.app/meishichina/recipe/hongbei) | [kaoxiangcai](https://rsshub.app/meishichina/recipe/kaoxiangcai) | [yinpin](https://rsshub.app/meishichina/recipe/yinpin) | [lingshi](https://rsshub.app/meishichina/recipe/lingshi) | +| [泡酱腌菜](https://home.meishichina.com/recipe/jiangpaoyancai/) | [西餐](https://home.meishichina.com/recipe/xican/) | [烘焙](https://home.meishichina.com/recipe/hongbei/) | [烤箱菜](https://home.meishichina.com/recipe/kaoxiangcai/) | [饮品](https://home.meishichina.com/recipe/yinpin/) | [零食](https://home.meishichina.com/recipe/lingshi/) | +| ---------------------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------- | +| [jiangpaoyancai](https://rsshub.app/meishichina/recipe/jiangpaoyancai) | [xican](https://rsshub.app/meishichina/recipe/xican) | [hongbei](https://rsshub.app/meishichina/recipe/hongbei) | [kaoxiangcai](https://rsshub.app/meishichina/recipe/kaoxiangcai) | [yinpin](https://rsshub.app/meishichina/recipe/yinpin) | [lingshi](https://rsshub.app/meishichina/recipe/lingshi) | - | [火锅](https://home.meishichina.com/recipe/huoguo/) | [自制食材](https://home.meishichina.com/recipe/zizhishicai/) | [海鲜](https://home.meishichina.com/recipe/haixian/) | [宴客菜](https://home.meishichina.com/recipe/yankecai/) | - | ------------------------------------------------------ | ---------------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------- | - | [huoguo](https://rsshub.app/meishichina/recipe/huoguo) | [zizhishicai](https://rsshub.app/meishichina/recipe/zizhishicai) | [haixian](https://rsshub.app/meishichina/recipe/haixian) | [yankecai](https://rsshub.app/meishichina/recipe/yankecai) | +| [火锅](https://home.meishichina.com/recipe/huoguo/) | [自制食材](https://home.meishichina.com/recipe/zizhishicai/) | [海鲜](https://home.meishichina.com/recipe/haixian/) | [宴客菜](https://home.meishichina.com/recipe/yankecai/) | +| ------------------------------------------------------ | ---------------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------- | +| [huoguo](https://rsshub.app/meishichina/recipe/huoguo) | [zizhishicai](https://rsshub.app/meishichina/recipe/zizhishicai) | [haixian](https://rsshub.app/meishichina/recipe/haixian) | [yankecai](https://rsshub.app/meishichina/recipe/yankecai) | - #### 主食/小吃 +#### 主食/小吃 - | [米饭](https://home.meishichina.com/recipe/mifan/) | [炒饭](https://home.meishichina.com/recipe/chaofan/) | [面食](https://home.meishichina.com/recipe/mianshi/) | [包子](https://home.meishichina.com/recipe/baozi/) | [饺子](https://home.meishichina.com/recipe/jiaozi/) | [馒头花卷](https://home.meishichina.com/recipe/mantou/) | - | ---------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------- | - | [mifan](https://rsshub.app/meishichina/recipe/mifan) | [chaofan](https://rsshub.app/meishichina/recipe/chaofan) | [mianshi](https://rsshub.app/meishichina/recipe/mianshi) | [baozi](https://rsshub.app/meishichina/recipe/baozi) | [jiaozi](https://rsshub.app/meishichina/recipe/jiaozi) | [mantou](https://rsshub.app/meishichina/recipe/mantou) | +| [米饭](https://home.meishichina.com/recipe/mifan/) | [炒饭](https://home.meishichina.com/recipe/chaofan/) | [面食](https://home.meishichina.com/recipe/mianshi/) | [包子](https://home.meishichina.com/recipe/baozi/) | [饺子](https://home.meishichina.com/recipe/jiaozi/) | [馒头花卷](https://home.meishichina.com/recipe/mantou/) | +| ---------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------- | +| [mifan](https://rsshub.app/meishichina/recipe/mifan) | [chaofan](https://rsshub.app/meishichina/recipe/chaofan) | [mianshi](https://rsshub.app/meishichina/recipe/mianshi) | [baozi](https://rsshub.app/meishichina/recipe/baozi) | [jiaozi](https://rsshub.app/meishichina/recipe/jiaozi) | [mantou](https://rsshub.app/meishichina/recipe/mantou) | - | [面条](https://home.meishichina.com/recipe/miantiao/) | [饼](https://home.meishichina.com/recipe/bing/) | [粥](https://home.meishichina.com/recipe/zhou/) | [馄饨](https://home.meishichina.com/recipe/hundun/) | [五谷杂粮](https://home.meishichina.com/recipe/wuguzaliang/) | [北京小吃](https://home.meishichina.com/recipe/beijingxiaochi/) | - | ---------------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------- | ---------------------------------------------------------------------- | - | [miantiao](https://rsshub.app/meishichina/recipe/miantiao) | [bing](https://rsshub.app/meishichina/recipe/bing) | [zhou](https://rsshub.app/meishichina/recipe/zhou) | [hundun](https://rsshub.app/meishichina/recipe/hundun) | [wuguzaliang](https://rsshub.app/meishichina/recipe/wuguzaliang) | [beijingxiaochi](https://rsshub.app/meishichina/recipe/beijingxiaochi) | +| [面条](https://home.meishichina.com/recipe/miantiao/) | [饼](https://home.meishichina.com/recipe/bing/) | [粥](https://home.meishichina.com/recipe/zhou/) | [馄饨](https://home.meishichina.com/recipe/hundun/) | [五谷杂粮](https://home.meishichina.com/recipe/wuguzaliang/) | [北京小吃](https://home.meishichina.com/recipe/beijingxiaochi/) | +| ---------------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------- | ---------------------------------------------------------------------- | +| [miantiao](https://rsshub.app/meishichina/recipe/miantiao) | [bing](https://rsshub.app/meishichina/recipe/bing) | [zhou](https://rsshub.app/meishichina/recipe/zhou) | [hundun](https://rsshub.app/meishichina/recipe/hundun) | [wuguzaliang](https://rsshub.app/meishichina/recipe/wuguzaliang) | [beijingxiaochi](https://rsshub.app/meishichina/recipe/beijingxiaochi) | - | [陕西小吃](https://home.meishichina.com/recipe/shanxixiaochi/) | [广东小吃](https://home.meishichina.com/recipe/guangdongxiaochi/) | [四川小吃](https://home.meishichina.com/recipe/sichuanxiaochi/) | [重庆小吃](https://home.meishichina.com/recipe/chongqingxiaochi/) | [天津小吃](https://home.meishichina.com/recipe/tianjinxiaochi/) | [上海小吃](https://home.meishichina.com/recipe/shanghaixiochi/) | - | -------------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | - | [shanxixiaochi](https://rsshub.app/meishichina/recipe/shanxixiaochi) | [guangdongxiaochi](https://rsshub.app/meishichina/recipe/guangdongxiaochi) | [sichuanxiaochi](https://rsshub.app/meishichina/recipe/sichuanxiaochi) | [chongqingxiaochi](https://rsshub.app/meishichina/recipe/chongqingxiaochi) | [tianjinxiaochi](https://rsshub.app/meishichina/recipe/tianjinxiaochi) | [shanghaixiochi](https://rsshub.app/meishichina/recipe/shanghaixiochi) | +| [陕西小吃](https://home.meishichina.com/recipe/shanxixiaochi/) | [广东小吃](https://home.meishichina.com/recipe/guangdongxiaochi/) | [四川小吃](https://home.meishichina.com/recipe/sichuanxiaochi/) | [重庆小吃](https://home.meishichina.com/recipe/chongqingxiaochi/) | [天津小吃](https://home.meishichina.com/recipe/tianjinxiaochi/) | [上海小吃](https://home.meishichina.com/recipe/shanghaixiochi/) | +| -------------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| [shanxixiaochi](https://rsshub.app/meishichina/recipe/shanxixiaochi) | [guangdongxiaochi](https://rsshub.app/meishichina/recipe/guangdongxiaochi) | [sichuanxiaochi](https://rsshub.app/meishichina/recipe/sichuanxiaochi) | [chongqingxiaochi](https://rsshub.app/meishichina/recipe/chongqingxiaochi) | [tianjinxiaochi](https://rsshub.app/meishichina/recipe/tianjinxiaochi) | [shanghaixiochi](https://rsshub.app/meishichina/recipe/shanghaixiochi) | - | [福建小吃](https://home.meishichina.com/recipe/fujianxiaochi/) | [湖南小吃](https://home.meishichina.com/recipe/hunanxiaochi/) | [湖北小吃](https://home.meishichina.com/recipe/hubeixiaochi/) | [江西小吃](https://home.meishichina.com/recipe/jiangxixiaochi/) | [山东小吃](https://home.meishichina.com/recipe/shandongxiaochi/) | [山西小吃](https://home.meishichina.com/recipe/jinxiaochi/) | - | -------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------ | -------------------------------------------------------------- | - | [fujianxiaochi](https://rsshub.app/meishichina/recipe/fujianxiaochi) | [hunanxiaochi](https://rsshub.app/meishichina/recipe/hunanxiaochi) | [hubeixiaochi](https://rsshub.app/meishichina/recipe/hubeixiaochi) | [jiangxixiaochi](https://rsshub.app/meishichina/recipe/jiangxixiaochi) | [shandongxiaochi](https://rsshub.app/meishichina/recipe/shandongxiaochi) | [jinxiaochi](https://rsshub.app/meishichina/recipe/jinxiaochi) | +| [福建小吃](https://home.meishichina.com/recipe/fujianxiaochi/) | [湖南小吃](https://home.meishichina.com/recipe/hunanxiaochi/) | [湖北小吃](https://home.meishichina.com/recipe/hubeixiaochi/) | [江西小吃](https://home.meishichina.com/recipe/jiangxixiaochi/) | [山东小吃](https://home.meishichina.com/recipe/shandongxiaochi/) | [山西小吃](https://home.meishichina.com/recipe/jinxiaochi/) | +| -------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------ | -------------------------------------------------------------- | +| [fujianxiaochi](https://rsshub.app/meishichina/recipe/fujianxiaochi) | [hunanxiaochi](https://rsshub.app/meishichina/recipe/hunanxiaochi) | [hubeixiaochi](https://rsshub.app/meishichina/recipe/hubeixiaochi) | [jiangxixiaochi](https://rsshub.app/meishichina/recipe/jiangxixiaochi) | [shandongxiaochi](https://rsshub.app/meishichina/recipe/shandongxiaochi) | [jinxiaochi](https://rsshub.app/meishichina/recipe/jinxiaochi) | - | [河南小吃](https://home.meishichina.com/recipe/henanxiaochi/) | [台湾小吃](https://home.meishichina.com/recipe/taiwanxiaochi/) | [江浙小吃](https://home.meishichina.com/recipe/jiangzhexiaochi/) | [云贵小吃](https://home.meishichina.com/recipe/yunguixiaochi/) | [东北小吃](https://home.meishichina.com/recipe/dongbeixiaochi/) | [西北小吃](https://home.meishichina.com/recipe/xibeixiaochi/) | - | ------------------------------------------------------------------ | -------------------------------------------------------------------- | ------------------------------------------------------------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------ | - | [henanxiaochi](https://rsshub.app/meishichina/recipe/henanxiaochi) | [taiwanxiaochi](https://rsshub.app/meishichina/recipe/taiwanxiaochi) | [jiangzhexiaochi](https://rsshub.app/meishichina/recipe/jiangzhexiaochi) | [yunguixiaochi](https://rsshub.app/meishichina/recipe/yunguixiaochi) | [dongbeixiaochi](https://rsshub.app/meishichina/recipe/dongbeixiaochi) | [xibeixiaochi](https://rsshub.app/meishichina/recipe/xibeixiaochi) | +| [河南小吃](https://home.meishichina.com/recipe/henanxiaochi/) | [台湾小吃](https://home.meishichina.com/recipe/taiwanxiaochi/) | [江浙小吃](https://home.meishichina.com/recipe/jiangzhexiaochi/) | [云贵小吃](https://home.meishichina.com/recipe/yunguixiaochi/) | [东北小吃](https://home.meishichina.com/recipe/dongbeixiaochi/) | [西北小吃](https://home.meishichina.com/recipe/xibeixiaochi/) | +| ------------------------------------------------------------------ | -------------------------------------------------------------------- | ------------------------------------------------------------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------ | +| [henanxiaochi](https://rsshub.app/meishichina/recipe/henanxiaochi) | [taiwanxiaochi](https://rsshub.app/meishichina/recipe/taiwanxiaochi) | [jiangzhexiaochi](https://rsshub.app/meishichina/recipe/jiangzhexiaochi) | [yunguixiaochi](https://rsshub.app/meishichina/recipe/yunguixiaochi) | [dongbeixiaochi](https://rsshub.app/meishichina/recipe/dongbeixiaochi) | [xibeixiaochi](https://rsshub.app/meishichina/recipe/xibeixiaochi) | - #### 甜品/饮品 +#### 甜品/饮品 - | [甜品](https://home.meishichina.com/recipe/tianpin/) | [冰品](https://home.meishichina.com/recipe/bingpin/) | [果汁](https://home.meishichina.com/recipe/guozhi/) | [糖水](https://home.meishichina.com/recipe/tangshui/) | [布丁](https://home.meishichina.com/recipe/buding/) | [果酱](https://home.meishichina.com/recipe/guojiang/) | - | -------------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------- | - | [tianpin](https://rsshub.app/meishichina/recipe/tianpin) | [bingpin](https://rsshub.app/meishichina/recipe/bingpin) | [guozhi](https://rsshub.app/meishichina/recipe/guozhi) | [tangshui](https://rsshub.app/meishichina/recipe/tangshui) | [buding](https://rsshub.app/meishichina/recipe/buding) | [guojiang](https://rsshub.app/meishichina/recipe/guojiang) | +| [甜品](https://home.meishichina.com/recipe/tianpin/) | [冰品](https://home.meishichina.com/recipe/bingpin/) | [果汁](https://home.meishichina.com/recipe/guozhi/) | [糖水](https://home.meishichina.com/recipe/tangshui/) | [布丁](https://home.meishichina.com/recipe/buding/) | [果酱](https://home.meishichina.com/recipe/guojiang/) | +| -------------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------- | +| [tianpin](https://rsshub.app/meishichina/recipe/tianpin) | [bingpin](https://rsshub.app/meishichina/recipe/bingpin) | [guozhi](https://rsshub.app/meishichina/recipe/guozhi) | [tangshui](https://rsshub.app/meishichina/recipe/tangshui) | [buding](https://rsshub.app/meishichina/recipe/buding) | [guojiang](https://rsshub.app/meishichina/recipe/guojiang) | - | [果冻](https://home.meishichina.com/recipe/guodong/) | [酸奶](https://home.meishichina.com/recipe/suannai/) | [鸡尾酒](https://home.meishichina.com/recipe/jiweijiu/) | [咖啡](https://home.meishichina.com/recipe/kafei/) | [豆浆](https://home.meishichina.com/recipe/doujiang/) | [奶昔](https://home.meishichina.com/recipe/naixi/) | - | -------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------- | - | [guodong](https://rsshub.app/meishichina/recipe/guodong) | [suannai](https://rsshub.app/meishichina/recipe/suannai) | [jiweijiu](https://rsshub.app/meishichina/recipe/jiweijiu) | [kafei](https://rsshub.app/meishichina/recipe/kafei) | [doujiang](https://rsshub.app/meishichina/recipe/doujiang) | [naixi](https://rsshub.app/meishichina/recipe/naixi) | +| [果冻](https://home.meishichina.com/recipe/guodong/) | [酸奶](https://home.meishichina.com/recipe/suannai/) | [鸡尾酒](https://home.meishichina.com/recipe/jiweijiu/) | [咖啡](https://home.meishichina.com/recipe/kafei/) | [豆浆](https://home.meishichina.com/recipe/doujiang/) | [奶昔](https://home.meishichina.com/recipe/naixi/) | +| -------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------- | +| [guodong](https://rsshub.app/meishichina/recipe/guodong) | [suannai](https://rsshub.app/meishichina/recipe/suannai) | [jiweijiu](https://rsshub.app/meishichina/recipe/jiweijiu) | [kafei](https://rsshub.app/meishichina/recipe/kafei) | [doujiang](https://rsshub.app/meishichina/recipe/doujiang) | [naixi](https://rsshub.app/meishichina/recipe/naixi) | - | [冰淇淋](https://home.meishichina.com/recipe/bingqilin/) | - | ------------------------------------------------------------ | - | [bingqilin](https://rsshub.app/meishichina/recipe/bingqilin) | +| [冰淇淋](https://home.meishichina.com/recipe/bingqilin/) | +| ------------------------------------------------------------ | +| [bingqilin](https://rsshub.app/meishichina/recipe/bingqilin) | - #### 适宜人群 +#### 适宜人群 - | [孕妇](https://home.meishichina.com/recipe/yunfu/) | [产妇](https://home.meishichina.com/recipe/chanfu/) | [婴儿](https://home.meishichina.com/recipe/yinger/) | [儿童](https://home.meishichina.com/recipe/ertong/) | [老人](https://home.meishichina.com/recipe/laoren/) | [幼儿](https://home.meishichina.com/recipe/youer/) | - | ---------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------- | - | [yunfu](https://rsshub.app/meishichina/recipe/yunfu) | [chanfu](https://rsshub.app/meishichina/recipe/chanfu) | [yinger](https://rsshub.app/meishichina/recipe/yinger) | [ertong](https://rsshub.app/meishichina/recipe/ertong) | [laoren](https://rsshub.app/meishichina/recipe/laoren) | [youer](https://rsshub.app/meishichina/recipe/youer) | +| [孕妇](https://home.meishichina.com/recipe/yunfu/) | [产妇](https://home.meishichina.com/recipe/chanfu/) | [婴儿](https://home.meishichina.com/recipe/yinger/) | [儿童](https://home.meishichina.com/recipe/ertong/) | [老人](https://home.meishichina.com/recipe/laoren/) | [幼儿](https://home.meishichina.com/recipe/youer/) | +| ---------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------- | +| [yunfu](https://rsshub.app/meishichina/recipe/yunfu) | [chanfu](https://rsshub.app/meishichina/recipe/chanfu) | [yinger](https://rsshub.app/meishichina/recipe/yinger) | [ertong](https://rsshub.app/meishichina/recipe/ertong) | [laoren](https://rsshub.app/meishichina/recipe/laoren) | [youer](https://rsshub.app/meishichina/recipe/youer) | - | [哺乳期](https://home.meishichina.com/recipe/buruqi/) | [青少年](https://home.meishichina.com/recipe/qingshaonian/) | - | ------------------------------------------------------ | ------------------------------------------------------------------ | - | [buruqi](https://rsshub.app/meishichina/recipe/buruqi) | [qingshaonian](https://rsshub.app/meishichina/recipe/qingshaonian) | +| [哺乳期](https://home.meishichina.com/recipe/buruqi/) | [青少年](https://home.meishichina.com/recipe/qingshaonian/) | +| ------------------------------------------------------ | ------------------------------------------------------------------ | +| [buruqi](https://rsshub.app/meishichina/recipe/buruqi) | [qingshaonian](https://rsshub.app/meishichina/recipe/qingshaonian) | - #### 食疗食补 +#### 食疗食补 - | [健康食谱](https://home.meishichina.com/recipe/jiankangshipu/) | [减肥瘦身](https://home.meishichina.com/recipe/shoushen/) | [贫血](https://home.meishichina.com/recipe/pinxue/) | [痛经](https://home.meishichina.com/recipe/tongjing/) | [清热祛火](https://home.meishichina.com/recipe/qingrequhuo/) | [滋阴](https://home.meishichina.com/recipe/ziyin/) | - | -------------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------- | - | [jiankangshipu](https://rsshub.app/meishichina/recipe/jiankangshipu) | [shoushen](https://rsshub.app/meishichina/recipe/shoushen) | [pinxue](https://rsshub.app/meishichina/recipe/pinxue) | [tongjing](https://rsshub.app/meishichina/recipe/tongjing) | [qingrequhuo](https://rsshub.app/meishichina/recipe/qingrequhuo) | [ziyin](https://rsshub.app/meishichina/recipe/ziyin) | +| [健康食谱](https://home.meishichina.com/recipe/jiankangshipu/) | [减肥瘦身](https://home.meishichina.com/recipe/shoushen/) | [贫血](https://home.meishichina.com/recipe/pinxue/) | [痛经](https://home.meishichina.com/recipe/tongjing/) | [清热祛火](https://home.meishichina.com/recipe/qingrequhuo/) | [滋阴](https://home.meishichina.com/recipe/ziyin/) | +| -------------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------- | +| [jiankangshipu](https://rsshub.app/meishichina/recipe/jiankangshipu) | [shoushen](https://rsshub.app/meishichina/recipe/shoushen) | [pinxue](https://rsshub.app/meishichina/recipe/pinxue) | [tongjing](https://rsshub.app/meishichina/recipe/tongjing) | [qingrequhuo](https://rsshub.app/meishichina/recipe/qingrequhuo) | [ziyin](https://rsshub.app/meishichina/recipe/ziyin) | - | [壮阳](https://home.meishichina.com/recipe/zhuangyang/) | [便秘](https://home.meishichina.com/recipe/bianmi/) | [排毒养颜](https://home.meishichina.com/recipe/paiduyangyan/) | [滋润补水](https://home.meishichina.com/recipe/ziyinbushuui/) | [健脾养胃](https://home.meishichina.com/recipe/jianbiyangwei/) | [护肝明目](https://home.meishichina.com/recipe/huganmingmu/) | - | -------------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------------- | - | [zhuangyang](https://rsshub.app/meishichina/recipe/zhuangyang) | [bianmi](https://rsshub.app/meishichina/recipe/bianmi) | [paiduyangyan](https://rsshub.app/meishichina/recipe/paiduyangyan) | [ziyinbushuui](https://rsshub.app/meishichina/recipe/ziyinbushuui) | [jianbiyangwei](https://rsshub.app/meishichina/recipe/jianbiyangwei) | [huganmingmu](https://rsshub.app/meishichina/recipe/huganmingmu) | +| [壮阳](https://home.meishichina.com/recipe/zhuangyang/) | [便秘](https://home.meishichina.com/recipe/bianmi/) | [排毒养颜](https://home.meishichina.com/recipe/paiduyangyan/) | [滋润补水](https://home.meishichina.com/recipe/ziyinbushuui/) | [健脾养胃](https://home.meishichina.com/recipe/jianbiyangwei/) | [护肝明目](https://home.meishichina.com/recipe/huganmingmu/) | +| -------------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------------- | +| [zhuangyang](https://rsshub.app/meishichina/recipe/zhuangyang) | [bianmi](https://rsshub.app/meishichina/recipe/bianmi) | [paiduyangyan](https://rsshub.app/meishichina/recipe/paiduyangyan) | [ziyinbushuui](https://rsshub.app/meishichina/recipe/ziyinbushuui) | [jianbiyangwei](https://rsshub.app/meishichina/recipe/jianbiyangwei) | [huganmingmu](https://rsshub.app/meishichina/recipe/huganmingmu) | - | [清肺止咳](https://home.meishichina.com/recipe/qingfeizhike/) | [下奶](https://home.meishichina.com/recipe/xianai/) | [补钙](https://home.meishichina.com/recipe/bugai/) | [醒酒](https://home.meishichina.com/recipe/xingjiu/) | [抗过敏](https://home.meishichina.com/recipe/kangguomin/) | [防辐射](https://home.meishichina.com/recipe/fangfushe/) | - | ------------------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------ | - | [qingfeizhike](https://rsshub.app/meishichina/recipe/qingfeizhike) | [xianai](https://rsshub.app/meishichina/recipe/xianai) | [bugai](https://rsshub.app/meishichina/recipe/bugai) | [xingjiu](https://rsshub.app/meishichina/recipe/xingjiu) | [kangguomin](https://rsshub.app/meishichina/recipe/kangguomin) | [fangfushe](https://rsshub.app/meishichina/recipe/fangfushe) | +| [清肺止咳](https://home.meishichina.com/recipe/qingfeizhike/) | [下奶](https://home.meishichina.com/recipe/xianai/) | [补钙](https://home.meishichina.com/recipe/bugai/) | [醒酒](https://home.meishichina.com/recipe/xingjiu/) | [抗过敏](https://home.meishichina.com/recipe/kangguomin/) | [防辐射](https://home.meishichina.com/recipe/fangfushe/) | +| ------------------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------ | +| [qingfeizhike](https://rsshub.app/meishichina/recipe/qingfeizhike) | [xianai](https://rsshub.app/meishichina/recipe/xianai) | [bugai](https://rsshub.app/meishichina/recipe/bugai) | [xingjiu](https://rsshub.app/meishichina/recipe/xingjiu) | [kangguomin](https://rsshub.app/meishichina/recipe/kangguomin) | [fangfushe](https://rsshub.app/meishichina/recipe/fangfushe) | - | [提高免疫力](https://home.meishichina.com/recipe/tigaomianyili/) | [流感](https://home.meishichina.com/recipe/liugan/) | [驱寒暖身](https://home.meishichina.com/recipe/quhannuanshen/) | [秋冬进补](https://home.meishichina.com/recipe/qiudongjinbu/) | [消暑解渴](https://home.meishichina.com/recipe/xiaoshujieke/) | - | -------------------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ | - | [tigaomianyili](https://rsshub.app/meishichina/recipe/tigaomianyili) | [liugan](https://rsshub.app/meishichina/recipe/liugan) | [quhannuanshen](https://rsshub.app/meishichina/recipe/quhannuanshen) | [qiudongjinbu](https://rsshub.app/meishichina/recipe/qiudongjinbu) | [xiaoshujieke](https://rsshub.app/meishichina/recipe/xiaoshujieke) | +| [提高免疫力](https://home.meishichina.com/recipe/tigaomianyili/) | [流感](https://home.meishichina.com/recipe/liugan/) | [驱寒暖身](https://home.meishichina.com/recipe/quhannuanshen/) | [秋冬进补](https://home.meishichina.com/recipe/qiudongjinbu/) | [消暑解渴](https://home.meishichina.com/recipe/xiaoshujieke/) | +| -------------------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| [tigaomianyili](https://rsshub.app/meishichina/recipe/tigaomianyili) | [liugan](https://rsshub.app/meishichina/recipe/liugan) | [quhannuanshen](https://rsshub.app/meishichina/recipe/quhannuanshen) | [qiudongjinbu](https://rsshub.app/meishichina/recipe/qiudongjinbu) | [xiaoshujieke](https://rsshub.app/meishichina/recipe/xiaoshujieke) | - #### 场景 +#### 场景 - | [早餐](https://home.meishichina.com/recipe/zaocan/) | [下午茶](https://home.meishichina.com/recipe/xiawucha/) | [二人世界](https://home.meishichina.com/recipe/erren/) | [野餐](https://home.meishichina.com/recipe/yecan/) | [开胃菜](https://home.meishichina.com/recipe/kaiweicai/) | [私房菜](https://home.meishichina.com/recipe/sifangcai/) | - | ------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | - | [zaocan](https://rsshub.app/meishichina/recipe/zaocan) | [xiawucha](https://rsshub.app/meishichina/recipe/xiawucha) | [erren](https://rsshub.app/meishichina/recipe/erren) | [yecan](https://rsshub.app/meishichina/recipe/yecan) | [kaiweicai](https://rsshub.app/meishichina/recipe/kaiweicai) | [sifangcai](https://rsshub.app/meishichina/recipe/sifangcai) | +| [早餐](https://home.meishichina.com/recipe/zaocan/) | [下午茶](https://home.meishichina.com/recipe/xiawucha/) | [二人世界](https://home.meishichina.com/recipe/erren/) | [野餐](https://home.meishichina.com/recipe/yecan/) | [开胃菜](https://home.meishichina.com/recipe/kaiweicai/) | [私房菜](https://home.meishichina.com/recipe/sifangcai/) | +| ------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| [zaocan](https://rsshub.app/meishichina/recipe/zaocan) | [xiawucha](https://rsshub.app/meishichina/recipe/xiawucha) | [erren](https://rsshub.app/meishichina/recipe/erren) | [yecan](https://rsshub.app/meishichina/recipe/yecan) | [kaiweicai](https://rsshub.app/meishichina/recipe/kaiweicai) | [sifangcai](https://rsshub.app/meishichina/recipe/sifangcai) | - | [快餐](https://home.meishichina.com/recipe/kuaican/) | [快手菜](https://home.meishichina.com/recipe/kuaishoucai/) | [宿舍时代](https://home.meishichina.com/recipe/susheshidai/) | [中式宴请](https://home.meishichina.com/recipe/zhongshiyanqing/) | [西式宴请](https://home.meishichina.com/recipe/xishiyanqing/) | - | -------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------ | - | [kuaican](https://rsshub.app/meishichina/recipe/kuaican) | [kuaishoucai](https://rsshub.app/meishichina/recipe/kuaishoucai) | [susheshidai](https://rsshub.app/meishichina/recipe/susheshidai) | [zhongshiyanqing](https://rsshub.app/meishichina/recipe/zhongshiyanqing) | [xishiyanqing](https://rsshub.app/meishichina/recipe/xishiyanqing) | +| [快餐](https://home.meishichina.com/recipe/kuaican/) | [快手菜](https://home.meishichina.com/recipe/kuaishoucai/) | [宿舍时代](https://home.meishichina.com/recipe/susheshidai/) | [中式宴请](https://home.meishichina.com/recipe/zhongshiyanqing/) | [西式宴请](https://home.meishichina.com/recipe/xishiyanqing/) | +| -------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------ | +| [kuaican](https://rsshub.app/meishichina/recipe/kuaican) | [kuaishoucai](https://rsshub.app/meishichina/recipe/kuaishoucai) | [susheshidai](https://rsshub.app/meishichina/recipe/susheshidai) | [zhongshiyanqing](https://rsshub.app/meishichina/recipe/zhongshiyanqing) | [xishiyanqing](https://rsshub.app/meishichina/recipe/xishiyanqing) | - #### 饮食方式 +#### 饮食方式 - | [素食](https://home.meishichina.com/recipe/sushi/) | [素菜](https://home.meishichina.com/recipe/sucai2/) | [清真菜](https://home.meishichina.com/recipe/qingzhencai/) | [春季食谱](https://home.meishichina.com/recipe/chunji/) | [夏季食谱](https://home.meishichina.com/recipe/xiaji/) | [秋季食谱](https://home.meishichina.com/recipe/qiuji/) | - | ---------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ | - | [sushi](https://rsshub.app/meishichina/recipe/sushi) | [sucai2](https://rsshub.app/meishichina/recipe/sucai2) | [qingzhencai](https://rsshub.app/meishichina/recipe/qingzhencai) | [chunji](https://rsshub.app/meishichina/recipe/chunji) | [xiaji](https://rsshub.app/meishichina/recipe/xiaji) | [qiuji](https://rsshub.app/meishichina/recipe/qiuji) | +| [素食](https://home.meishichina.com/recipe/sushi/) | [素菜](https://home.meishichina.com/recipe/sucai2/) | [清真菜](https://home.meishichina.com/recipe/qingzhencai/) | [春季食谱](https://home.meishichina.com/recipe/chunji/) | [夏季食谱](https://home.meishichina.com/recipe/xiaji/) | [秋季食谱](https://home.meishichina.com/recipe/qiuji/) | +| ---------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ | +| [sushi](https://rsshub.app/meishichina/recipe/sushi) | [sucai2](https://rsshub.app/meishichina/recipe/sucai2) | [qingzhencai](https://rsshub.app/meishichina/recipe/qingzhencai) | [chunji](https://rsshub.app/meishichina/recipe/chunji) | [xiaji](https://rsshub.app/meishichina/recipe/xiaji) | [qiuji](https://rsshub.app/meishichina/recipe/qiuji) | - | [冬季食谱](https://home.meishichina.com/recipe/dongji/) | [小清新](https://home.meishichina.com/recipe/xiaoqingxin/) | [高颜值](https://home.meishichina.com/recipe/gaoyanzhi/) | - | ------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------ | - | [dongji](https://rsshub.app/meishichina/recipe/dongji) | [xiaoqingxin](https://rsshub.app/meishichina/recipe/xiaoqingxin) | [gaoyanzhi](https://rsshub.app/meishichina/recipe/gaoyanzhi) | +| [冬季食谱](https://home.meishichina.com/recipe/dongji/) | [小清新](https://home.meishichina.com/recipe/xiaoqingxin/) | [高颜值](https://home.meishichina.com/recipe/gaoyanzhi/) | +| ------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------ | +| [dongji](https://rsshub.app/meishichina/recipe/dongji) | [xiaoqingxin](https://rsshub.app/meishichina/recipe/xiaoqingxin) | [gaoyanzhi](https://rsshub.app/meishichina/recipe/gaoyanzhi) | - #### 中式菜系 +#### 中式菜系 - | [川菜](https://home.meishichina.com/recipe/chuancai/) | [鲁菜](https://home.meishichina.com/recipe/lucai/) | [闽菜](https://home.meishichina.com/recipe/mincai/) | [粤菜](https://home.meishichina.com/recipe/yuecai/) | [苏菜](https://home.meishichina.com/recipe/sucai/) | [浙菜](https://home.meishichina.com/recipe/zhecai/) | - | ---------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------- | ------------------------------------------------------ | - | [chuancai](https://rsshub.app/meishichina/recipe/chuancai) | [lucai](https://rsshub.app/meishichina/recipe/lucai) | [mincai](https://rsshub.app/meishichina/recipe/mincai) | [yuecai](https://rsshub.app/meishichina/recipe/yuecai) | [sucai](https://rsshub.app/meishichina/recipe/sucai) | [zhecai](https://rsshub.app/meishichina/recipe/zhecai) | +| [川菜](https://home.meishichina.com/recipe/chuancai/) | [鲁菜](https://home.meishichina.com/recipe/lucai/) | [闽菜](https://home.meishichina.com/recipe/mincai/) | [粤菜](https://home.meishichina.com/recipe/yuecai/) | [苏菜](https://home.meishichina.com/recipe/sucai/) | [浙菜](https://home.meishichina.com/recipe/zhecai/) | +| ---------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------- | ------------------------------------------------------ | +| [chuancai](https://rsshub.app/meishichina/recipe/chuancai) | [lucai](https://rsshub.app/meishichina/recipe/lucai) | [mincai](https://rsshub.app/meishichina/recipe/mincai) | [yuecai](https://rsshub.app/meishichina/recipe/yuecai) | [sucai](https://rsshub.app/meishichina/recipe/sucai) | [zhecai](https://rsshub.app/meishichina/recipe/zhecai) | - | [湘菜](https://home.meishichina.com/recipe/xiangcai/) | [徽菜](https://home.meishichina.com/recipe/huicai/) | [淮扬菜](https://home.meishichina.com/recipe/huaiyangcai/) | [豫菜](https://home.meishichina.com/recipe/yucai/) | [晋菜](https://home.meishichina.com/recipe/jincai/) | [鄂菜](https://home.meishichina.com/recipe/ecai/) | - | ---------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------- | - | [xiangcai](https://rsshub.app/meishichina/recipe/xiangcai) | [huicai](https://rsshub.app/meishichina/recipe/huicai) | [huaiyangcai](https://rsshub.app/meishichina/recipe/huaiyangcai) | [yucai](https://rsshub.app/meishichina/recipe/yucai) | [jincai](https://rsshub.app/meishichina/recipe/jincai) | [ecai](https://rsshub.app/meishichina/recipe/ecai) | +| [湘菜](https://home.meishichina.com/recipe/xiangcai/) | [徽菜](https://home.meishichina.com/recipe/huicai/) | [淮扬菜](https://home.meishichina.com/recipe/huaiyangcai/) | [豫菜](https://home.meishichina.com/recipe/yucai/) | [晋菜](https://home.meishichina.com/recipe/jincai/) | [鄂菜](https://home.meishichina.com/recipe/ecai/) | +| ---------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------- | +| [xiangcai](https://rsshub.app/meishichina/recipe/xiangcai) | [huicai](https://rsshub.app/meishichina/recipe/huicai) | [huaiyangcai](https://rsshub.app/meishichina/recipe/huaiyangcai) | [yucai](https://rsshub.app/meishichina/recipe/yucai) | [jincai](https://rsshub.app/meishichina/recipe/jincai) | [ecai](https://rsshub.app/meishichina/recipe/ecai) | - | [云南菜](https://home.meishichina.com/recipe/yunnancai/) | [北京菜](https://home.meishichina.com/recipe/beijingcai/) | [东北菜](https://home.meishichina.com/recipe/dongbeicai/) | [西北菜](https://home.meishichina.com/recipe/xibeicai/) | [贵州菜](https://home.meishichina.com/recipe/guizhoucai/) | [上海菜](https://home.meishichina.com/recipe/shanghaicai/) | - | ------------------------------------------------------------ | -------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------- | - | [yunnancai](https://rsshub.app/meishichina/recipe/yunnancai) | [beijingcai](https://rsshub.app/meishichina/recipe/beijingcai) | [dongbeicai](https://rsshub.app/meishichina/recipe/dongbeicai) | [xibeicai](https://rsshub.app/meishichina/recipe/xibeicai) | [guizhoucai](https://rsshub.app/meishichina/recipe/guizhoucai) | [shanghaicai](https://rsshub.app/meishichina/recipe/shanghaicai) | +| [云南菜](https://home.meishichina.com/recipe/yunnancai/) | [北京菜](https://home.meishichina.com/recipe/beijingcai/) | [东北菜](https://home.meishichina.com/recipe/dongbeicai/) | [西北菜](https://home.meishichina.com/recipe/xibeicai/) | [贵州菜](https://home.meishichina.com/recipe/guizhoucai/) | [上海菜](https://home.meishichina.com/recipe/shanghaicai/) | +| ------------------------------------------------------------ | -------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------- | +| [yunnancai](https://rsshub.app/meishichina/recipe/yunnancai) | [beijingcai](https://rsshub.app/meishichina/recipe/beijingcai) | [dongbeicai](https://rsshub.app/meishichina/recipe/dongbeicai) | [xibeicai](https://rsshub.app/meishichina/recipe/xibeicai) | [guizhoucai](https://rsshub.app/meishichina/recipe/guizhoucai) | [shanghaicai](https://rsshub.app/meishichina/recipe/shanghaicai) | - | [新疆菜](https://home.meishichina.com/recipe/xinjiangcai/) | [客家菜](https://home.meishichina.com/recipe/kejiacai/) | [台湾美食](https://home.meishichina.com/recipe/taiwancai/) | [香港美食](https://home.meishichina.com/recipe/xianggangcai/) | [澳门美食](https://home.meishichina.com/recipe/aomeicai/) | [赣菜](https://home.meishichina.com/recipe/gancai/) | - | ---------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------ | - | [xinjiangcai](https://rsshub.app/meishichina/recipe/xinjiangcai) | [kejiacai](https://rsshub.app/meishichina/recipe/kejiacai) | [taiwancai](https://rsshub.app/meishichina/recipe/taiwancai) | [xianggangcai](https://rsshub.app/meishichina/recipe/xianggangcai) | [aomeicai](https://rsshub.app/meishichina/recipe/aomeicai) | [gancai](https://rsshub.app/meishichina/recipe/gancai) | +| [新疆菜](https://home.meishichina.com/recipe/xinjiangcai/) | [客家菜](https://home.meishichina.com/recipe/kejiacai/) | [台湾美食](https://home.meishichina.com/recipe/taiwancai/) | [香港美食](https://home.meishichina.com/recipe/xianggangcai/) | [澳门美食](https://home.meishichina.com/recipe/aomeicai/) | [赣菜](https://home.meishichina.com/recipe/gancai/) | +| ---------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------ | +| [xinjiangcai](https://rsshub.app/meishichina/recipe/xinjiangcai) | [kejiacai](https://rsshub.app/meishichina/recipe/kejiacai) | [taiwancai](https://rsshub.app/meishichina/recipe/taiwancai) | [xianggangcai](https://rsshub.app/meishichina/recipe/xianggangcai) | [aomeicai](https://rsshub.app/meishichina/recipe/aomeicai) | [gancai](https://rsshub.app/meishichina/recipe/gancai) | - | [中式菜系](https://home.meishichina.com/recipe/zhongshicaixi/) | - | -------------------------------------------------------------------- | - | [zhongshicaixi](https://rsshub.app/meishichina/recipe/zhongshicaixi) | +| [中式菜系](https://home.meishichina.com/recipe/zhongshicaixi/) | +| -------------------------------------------------------------------- | +| [zhongshicaixi](https://rsshub.app/meishichina/recipe/zhongshicaixi) | - #### 外国美食 +#### 外国美食 - | [日本料理](https://home.meishichina.com/recipe/ribencai/) | [韩国料理](https://home.meishichina.com/recipe/hanguocai/) | [泰国菜](https://home.meishichina.com/recipe/taiguocai/) | [印度菜](https://home.meishichina.com/recipe/yiducai/) | [法国菜](https://home.meishichina.com/recipe/faguocai/) | [意大利菜](https://home.meishichina.com/recipe/yidalicai/) | - | ---------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------ | - | [ribencai](https://rsshub.app/meishichina/recipe/ribencai) | [hanguocai](https://rsshub.app/meishichina/recipe/hanguocai) | [taiguocai](https://rsshub.app/meishichina/recipe/taiguocai) | [yiducai](https://rsshub.app/meishichina/recipe/yiducai) | [faguocai](https://rsshub.app/meishichina/recipe/faguocai) | [yidalicai](https://rsshub.app/meishichina/recipe/yidalicai) | +| [日本料理](https://home.meishichina.com/recipe/ribencai/) | [韩国料理](https://home.meishichina.com/recipe/hanguocai/) | [泰国菜](https://home.meishichina.com/recipe/taiguocai/) | [印度菜](https://home.meishichina.com/recipe/yiducai/) | [法国菜](https://home.meishichina.com/recipe/faguocai/) | [意大利菜](https://home.meishichina.com/recipe/yidalicai/) | +| ---------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------ | +| [ribencai](https://rsshub.app/meishichina/recipe/ribencai) | [hanguocai](https://rsshub.app/meishichina/recipe/hanguocai) | [taiguocai](https://rsshub.app/meishichina/recipe/taiguocai) | [yiducai](https://rsshub.app/meishichina/recipe/yiducai) | [faguocai](https://rsshub.app/meishichina/recipe/faguocai) | [yidalicai](https://rsshub.app/meishichina/recipe/yidalicai) | - | [西班牙菜](https://home.meishichina.com/recipe/xibanya/) | [英国菜](https://home.meishichina.com/recipe/yingguocai/) | [越南菜](https://home.meishichina.com/recipe/yuenancai/) | [墨西哥菜](https://home.meishichina.com/recipe/moxigecai/) | [外国美食](https://home.meishichina.com/recipe/waiguomeishi/) | - | -------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------------ | - | [xibanya](https://rsshub.app/meishichina/recipe/xibanya) | [yingguocai](https://rsshub.app/meishichina/recipe/yingguocai) | [yuenancai](https://rsshub.app/meishichina/recipe/yuenancai) | [moxigecai](https://rsshub.app/meishichina/recipe/moxigecai) | [waiguomeishi](https://rsshub.app/meishichina/recipe/waiguomeishi) | +| [西班牙菜](https://home.meishichina.com/recipe/xibanya/) | [英国菜](https://home.meishichina.com/recipe/yingguocai/) | [越南菜](https://home.meishichina.com/recipe/yuenancai/) | [墨西哥菜](https://home.meishichina.com/recipe/moxigecai/) | [外国美食](https://home.meishichina.com/recipe/waiguomeishi/) | +| -------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------------ | +| [xibanya](https://rsshub.app/meishichina/recipe/xibanya) | [yingguocai](https://rsshub.app/meishichina/recipe/yingguocai) | [yuenancai](https://rsshub.app/meishichina/recipe/yuenancai) | [moxigecai](https://rsshub.app/meishichina/recipe/moxigecai) | [waiguomeishi](https://rsshub.app/meishichina/recipe/waiguomeishi) | - #### 烘焙 +#### 烘焙 - | [蛋糕](https://home.meishichina.com/recipe/dangao/) | [面包](https://home.meishichina.com/recipe/mianbao/) | [饼干](https://home.meishichina.com/recipe/binggan/) | [派塔](https://home.meishichina.com/recipe/paita/) | [吐司](https://home.meishichina.com/recipe/tusi/) | [戚风蛋糕](https://home.meishichina.com/recipe/qifeng/) | - | ------------------------------------------------------ | -------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------- | - | [dangao](https://rsshub.app/meishichina/recipe/dangao) | [mianbao](https://rsshub.app/meishichina/recipe/mianbao) | [binggan](https://rsshub.app/meishichina/recipe/binggan) | [paita](https://rsshub.app/meishichina/recipe/paita) | [tusi](https://rsshub.app/meishichina/recipe/tusi) | [qifeng](https://rsshub.app/meishichina/recipe/qifeng) | +| [蛋糕](https://home.meishichina.com/recipe/dangao/) | [面包](https://home.meishichina.com/recipe/mianbao/) | [饼干](https://home.meishichina.com/recipe/binggan/) | [派塔](https://home.meishichina.com/recipe/paita/) | [吐司](https://home.meishichina.com/recipe/tusi/) | [戚风蛋糕](https://home.meishichina.com/recipe/qifeng/) | +| ------------------------------------------------------ | -------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------- | +| [dangao](https://rsshub.app/meishichina/recipe/dangao) | [mianbao](https://rsshub.app/meishichina/recipe/mianbao) | [binggan](https://rsshub.app/meishichina/recipe/binggan) | [paita](https://rsshub.app/meishichina/recipe/paita) | [tusi](https://rsshub.app/meishichina/recipe/tusi) | [qifeng](https://rsshub.app/meishichina/recipe/qifeng) | - | [纸杯蛋糕](https://home.meishichina.com/recipe/zhibei/) | [蛋糕卷](https://home.meishichina.com/recipe/dangaojuan/) | [玛芬蛋糕](https://home.meishichina.com/recipe/mafen/) | [乳酪蛋糕](https://home.meishichina.com/recipe/rulao/) | [芝士蛋糕](https://home.meishichina.com/recipe/zhishi/) | [奶油蛋糕](https://home.meishichina.com/recipe/naiyou/) | - | ------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------- | ------------------------------------------------------- | - | [zhibei](https://rsshub.app/meishichina/recipe/zhibei) | [dangaojuan](https://rsshub.app/meishichina/recipe/dangaojuan) | [mafen](https://rsshub.app/meishichina/recipe/mafen) | [rulao](https://rsshub.app/meishichina/recipe/rulao) | [zhishi](https://rsshub.app/meishichina/recipe/zhishi) | [naiyou](https://rsshub.app/meishichina/recipe/naiyou) | +| [纸杯蛋糕](https://home.meishichina.com/recipe/zhibei/) | [蛋糕卷](https://home.meishichina.com/recipe/dangaojuan/) | [玛芬蛋糕](https://home.meishichina.com/recipe/mafen/) | [乳酪蛋糕](https://home.meishichina.com/recipe/rulao/) | [芝士蛋糕](https://home.meishichina.com/recipe/zhishi/) | [奶油蛋糕](https://home.meishichina.com/recipe/naiyou/) | +| ------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------- | ------------------------------------------------------- | +| [zhibei](https://rsshub.app/meishichina/recipe/zhibei) | [dangaojuan](https://rsshub.app/meishichina/recipe/dangaojuan) | [mafen](https://rsshub.app/meishichina/recipe/mafen) | [rulao](https://rsshub.app/meishichina/recipe/rulao) | [zhishi](https://rsshub.app/meishichina/recipe/zhishi) | [naiyou](https://rsshub.app/meishichina/recipe/naiyou) | - | [批萨](https://home.meishichina.com/recipe/pisa/) | [慕斯](https://home.meishichina.com/recipe/musi/) | [曲奇](https://home.meishichina.com/recipe/quqi/) | [翻糖](https://home.meishichina.com/recipe/fantang/) | - | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------------- | - | [pisa](https://rsshub.app/meishichina/recipe/pisa) | [musi](https://rsshub.app/meishichina/recipe/musi) | [quqi](https://rsshub.app/meishichina/recipe/quqi) | [fantang](https://rsshub.app/meishichina/recipe/fantang) | +| [批萨](https://home.meishichina.com/recipe/pisa/) | [慕斯](https://home.meishichina.com/recipe/musi/) | [曲奇](https://home.meishichina.com/recipe/quqi/) | [翻糖](https://home.meishichina.com/recipe/fantang/) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------------- | +| [pisa](https://rsshub.app/meishichina/recipe/pisa) | [musi](https://rsshub.app/meishichina/recipe/musi) | [quqi](https://rsshub.app/meishichina/recipe/quqi) | [fantang](https://rsshub.app/meishichina/recipe/fantang) | - #### 传统美食 +#### 传统美食 - | [粽子](https://home.meishichina.com/recipe/zongzi/) | [月饼](https://home.meishichina.com/recipe/yuebing/) | [春饼](https://home.meishichina.com/recipe/chunbing/) | [元宵](https://home.meishichina.com/recipe/yuanxiao/) | [汤圆](https://home.meishichina.com/recipe/tangyuan/) | [青团](https://home.meishichina.com/recipe/qingtuan/) | - | ------------------------------------------------------ | -------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | - | [zongzi](https://rsshub.app/meishichina/recipe/zongzi) | [yuebing](https://rsshub.app/meishichina/recipe/yuebing) | [chunbing](https://rsshub.app/meishichina/recipe/chunbing) | [yuanxiao](https://rsshub.app/meishichina/recipe/yuanxiao) | [tangyuan](https://rsshub.app/meishichina/recipe/tangyuan) | [qingtuan](https://rsshub.app/meishichina/recipe/qingtuan) | +| [粽子](https://home.meishichina.com/recipe/zongzi/) | [月饼](https://home.meishichina.com/recipe/yuebing/) | [春饼](https://home.meishichina.com/recipe/chunbing/) | [元宵](https://home.meishichina.com/recipe/yuanxiao/) | [汤圆](https://home.meishichina.com/recipe/tangyuan/) | [青团](https://home.meishichina.com/recipe/qingtuan/) | +| ------------------------------------------------------ | -------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| [zongzi](https://rsshub.app/meishichina/recipe/zongzi) | [yuebing](https://rsshub.app/meishichina/recipe/yuebing) | [chunbing](https://rsshub.app/meishichina/recipe/chunbing) | [yuanxiao](https://rsshub.app/meishichina/recipe/yuanxiao) | [tangyuan](https://rsshub.app/meishichina/recipe/tangyuan) | [qingtuan](https://rsshub.app/meishichina/recipe/qingtuan) | - | [腊八粥](https://home.meishichina.com/recipe/labazhou/) | [春卷](https://home.meishichina.com/recipe/chunjuan/) | [传统美食](https://home.meishichina.com/recipe/chuantongmeishi/) | - | ---------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------ | - | [labazhou](https://rsshub.app/meishichina/recipe/labazhou) | [chunjuan](https://rsshub.app/meishichina/recipe/chunjuan) | [chuantongmeishi](https://rsshub.app/meishichina/recipe/chuantongmeishi) | +| [腊八粥](https://home.meishichina.com/recipe/labazhou/) | [春卷](https://home.meishichina.com/recipe/chunjuan/) | [传统美食](https://home.meishichina.com/recipe/chuantongmeishi/) | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------ | +| [labazhou](https://rsshub.app/meishichina/recipe/labazhou) | [chunjuan](https://rsshub.app/meishichina/recipe/chunjuan) | [chuantongmeishi](https://rsshub.app/meishichina/recipe/chuantongmeishi) | - #### 节日食俗 +#### 节日食俗 - | [立冬](https://home.meishichina.com/recipe/lidong/) | [冬至](https://home.meishichina.com/recipe/dongzhi/) | [腊八](https://home.meishichina.com/recipe/laba/) | [端午节](https://home.meishichina.com/recipe/duanwu/) | [中秋](https://home.meishichina.com/recipe/zhongqiu/) | [立春](https://home.meishichina.com/recipe/lichun/) | - | ------------------------------------------------------ | -------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------ | - | [lidong](https://rsshub.app/meishichina/recipe/lidong) | [dongzhi](https://rsshub.app/meishichina/recipe/dongzhi) | [laba](https://rsshub.app/meishichina/recipe/laba) | [duanwu](https://rsshub.app/meishichina/recipe/duanwu) | [zhongqiu](https://rsshub.app/meishichina/recipe/zhongqiu) | [lichun](https://rsshub.app/meishichina/recipe/lichun) | +| [立冬](https://home.meishichina.com/recipe/lidong/) | [冬至](https://home.meishichina.com/recipe/dongzhi/) | [腊八](https://home.meishichina.com/recipe/laba/) | [端午节](https://home.meishichina.com/recipe/duanwu/) | [中秋](https://home.meishichina.com/recipe/zhongqiu/) | [立春](https://home.meishichina.com/recipe/lichun/) | +| ------------------------------------------------------ | -------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------ | +| [lidong](https://rsshub.app/meishichina/recipe/lidong) | [dongzhi](https://rsshub.app/meishichina/recipe/dongzhi) | [laba](https://rsshub.app/meishichina/recipe/laba) | [duanwu](https://rsshub.app/meishichina/recipe/duanwu) | [zhongqiu](https://rsshub.app/meishichina/recipe/zhongqiu) | [lichun](https://rsshub.app/meishichina/recipe/lichun) | - | [元宵节](https://home.meishichina.com/recipe/yuanxiaojie/) | [贴秋膘](https://home.meishichina.com/recipe/tieqiubiao/) | [清明](https://home.meishichina.com/recipe/qingming/) | [年夜饭](https://home.meishichina.com/recipe/nianyefan/) | [圣诞节](https://home.meishichina.com/recipe/shengdanjie/) | [感恩节](https://home.meishichina.com/recipe/ganenjie/) | - | ---------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------- | ---------------------------------------------------------- | - | [yuanxiaojie](https://rsshub.app/meishichina/recipe/yuanxiaojie) | [tieqiubiao](https://rsshub.app/meishichina/recipe/tieqiubiao) | [qingming](https://rsshub.app/meishichina/recipe/qingming) | [nianyefan](https://rsshub.app/meishichina/recipe/nianyefan) | [shengdanjie](https://rsshub.app/meishichina/recipe/shengdanjie) | [ganenjie](https://rsshub.app/meishichina/recipe/ganenjie) | +| [元宵节](https://home.meishichina.com/recipe/yuanxiaojie/) | [贴秋膘](https://home.meishichina.com/recipe/tieqiubiao/) | [清明](https://home.meishichina.com/recipe/qingming/) | [年夜饭](https://home.meishichina.com/recipe/nianyefan/) | [圣诞节](https://home.meishichina.com/recipe/shengdanjie/) | [感恩节](https://home.meishichina.com/recipe/ganenjie/) | +| ---------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------- | ---------------------------------------------------------- | +| [yuanxiaojie](https://rsshub.app/meishichina/recipe/yuanxiaojie) | [tieqiubiao](https://rsshub.app/meishichina/recipe/tieqiubiao) | [qingming](https://rsshub.app/meishichina/recipe/qingming) | [nianyefan](https://rsshub.app/meishichina/recipe/nianyefan) | [shengdanjie](https://rsshub.app/meishichina/recipe/shengdanjie) | [ganenjie](https://rsshub.app/meishichina/recipe/ganenjie) | - | [万圣节](https://home.meishichina.com/recipe/wanshengjie/) | [情人节](https://home.meishichina.com/recipe/qingrenjie/) | [复活节](https://home.meishichina.com/recipe/fuhuojie/) | [雨水](https://home.meishichina.com/recipe/yushui/) | [惊蛰](https://home.meishichina.com/recipe/jingzhi/) | [春分](https://home.meishichina.com/recipe/chunfen/) | - | ---------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------- | -------------------------------------------------------- | - | [wanshengjie](https://rsshub.app/meishichina/recipe/wanshengjie) | [qingrenjie](https://rsshub.app/meishichina/recipe/qingrenjie) | [fuhuojie](https://rsshub.app/meishichina/recipe/fuhuojie) | [yushui](https://rsshub.app/meishichina/recipe/yushui) | [jingzhi](https://rsshub.app/meishichina/recipe/jingzhi) | [chunfen](https://rsshub.app/meishichina/recipe/chunfen) | +| [万圣节](https://home.meishichina.com/recipe/wanshengjie/) | [情人节](https://home.meishichina.com/recipe/qingrenjie/) | [复活节](https://home.meishichina.com/recipe/fuhuojie/) | [雨水](https://home.meishichina.com/recipe/yushui/) | [惊蛰](https://home.meishichina.com/recipe/jingzhi/) | [春分](https://home.meishichina.com/recipe/chunfen/) | +| ---------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------- | -------------------------------------------------------- | +| [wanshengjie](https://rsshub.app/meishichina/recipe/wanshengjie) | [qingrenjie](https://rsshub.app/meishichina/recipe/qingrenjie) | [fuhuojie](https://rsshub.app/meishichina/recipe/fuhuojie) | [yushui](https://rsshub.app/meishichina/recipe/yushui) | [jingzhi](https://rsshub.app/meishichina/recipe/jingzhi) | [chunfen](https://rsshub.app/meishichina/recipe/chunfen) | - | [谷雨](https://home.meishichina.com/recipe/guyu/) | [立夏](https://home.meishichina.com/recipe/lixia/) | [小满](https://home.meishichina.com/recipe/xiaoman/) | [芒种](https://home.meishichina.com/recipe/mangzhong/) | [夏至](https://home.meishichina.com/recipe/xiazhi/) | [小暑](https://home.meishichina.com/recipe/xiaoshu/) | - | -------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------ | -------------------------------------------------------- | - | [guyu](https://rsshub.app/meishichina/recipe/guyu) | [lixia](https://rsshub.app/meishichina/recipe/lixia) | [xiaoman](https://rsshub.app/meishichina/recipe/xiaoman) | [mangzhong](https://rsshub.app/meishichina/recipe/mangzhong) | [xiazhi](https://rsshub.app/meishichina/recipe/xiazhi) | [xiaoshu](https://rsshub.app/meishichina/recipe/xiaoshu) | +| [谷雨](https://home.meishichina.com/recipe/guyu/) | [立夏](https://home.meishichina.com/recipe/lixia/) | [小满](https://home.meishichina.com/recipe/xiaoman/) | [芒种](https://home.meishichina.com/recipe/mangzhong/) | [夏至](https://home.meishichina.com/recipe/xiazhi/) | [小暑](https://home.meishichina.com/recipe/xiaoshu/) | +| -------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------ | -------------------------------------------------------- | +| [guyu](https://rsshub.app/meishichina/recipe/guyu) | [lixia](https://rsshub.app/meishichina/recipe/lixia) | [xiaoman](https://rsshub.app/meishichina/recipe/xiaoman) | [mangzhong](https://rsshub.app/meishichina/recipe/mangzhong) | [xiazhi](https://rsshub.app/meishichina/recipe/xiazhi) | [xiaoshu](https://rsshub.app/meishichina/recipe/xiaoshu) | - | [大暑](https://home.meishichina.com/recipe/dashu/) | [立秋](https://home.meishichina.com/recipe/xiqiu/) | [处暑](https://home.meishichina.com/recipe/chushu/) | [白露](https://home.meishichina.com/recipe/bailu/) | [秋分](https://home.meishichina.com/recipe/qiufen/) | [寒露](https://home.meishichina.com/recipe/hanlu/) | - | ---------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------- | - | [dashu](https://rsshub.app/meishichina/recipe/dashu) | [xiqiu](https://rsshub.app/meishichina/recipe/xiqiu) | [chushu](https://rsshub.app/meishichina/recipe/chushu) | [bailu](https://rsshub.app/meishichina/recipe/bailu) | [qiufen](https://rsshub.app/meishichina/recipe/qiufen) | [hanlu](https://rsshub.app/meishichina/recipe/hanlu) | +| [大暑](https://home.meishichina.com/recipe/dashu/) | [立秋](https://home.meishichina.com/recipe/xiqiu/) | [处暑](https://home.meishichina.com/recipe/chushu/) | [白露](https://home.meishichina.com/recipe/bailu/) | [秋分](https://home.meishichina.com/recipe/qiufen/) | [寒露](https://home.meishichina.com/recipe/hanlu/) | +| ---------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------- | +| [dashu](https://rsshub.app/meishichina/recipe/dashu) | [xiqiu](https://rsshub.app/meishichina/recipe/xiqiu) | [chushu](https://rsshub.app/meishichina/recipe/chushu) | [bailu](https://rsshub.app/meishichina/recipe/bailu) | [qiufen](https://rsshub.app/meishichina/recipe/qiufen) | [hanlu](https://rsshub.app/meishichina/recipe/hanlu) | - | [霜降](https://home.meishichina.com/recipe/shuangjiang/) | [小雪](https://home.meishichina.com/recipe/xiaoxue/) | [大雪](https://home.meishichina.com/recipe/daxue/) | [小寒](https://home.meishichina.com/recipe/xiaohan/) | [大寒](https://home.meishichina.com/recipe/dahan/) | [二月二](https://home.meishichina.com/recipe/eryueer/) | - | ---------------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------------- | - | [shuangjiang](https://rsshub.app/meishichina/recipe/shuangjiang) | [xiaoxue](https://rsshub.app/meishichina/recipe/xiaoxue) | [daxue](https://rsshub.app/meishichina/recipe/daxue) | [xiaohan](https://rsshub.app/meishichina/recipe/xiaohan) | [dahan](https://rsshub.app/meishichina/recipe/dahan) | [eryueer](https://rsshub.app/meishichina/recipe/eryueer) | +| [霜降](https://home.meishichina.com/recipe/shuangjiang/) | [小雪](https://home.meishichina.com/recipe/xiaoxue/) | [大雪](https://home.meishichina.com/recipe/daxue/) | [小寒](https://home.meishichina.com/recipe/xiaohan/) | [大寒](https://home.meishichina.com/recipe/dahan/) | [二月二](https://home.meishichina.com/recipe/eryueer/) | +| ---------------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------------- | +| [shuangjiang](https://rsshub.app/meishichina/recipe/shuangjiang) | [xiaoxue](https://rsshub.app/meishichina/recipe/xiaoxue) | [daxue](https://rsshub.app/meishichina/recipe/daxue) | [xiaohan](https://rsshub.app/meishichina/recipe/xiaohan) | [dahan](https://rsshub.app/meishichina/recipe/dahan) | [eryueer](https://rsshub.app/meishichina/recipe/eryueer) | - | [母亲节](https://home.meishichina.com/recipe/muqinjie/) | [父亲节](https://home.meishichina.com/recipe/fuqinjie/) | [儿童节](https://home.meishichina.com/recipe/ertongjie/) | [七夕](https://home.meishichina.com/recipe/qixi/) | [重阳节](https://home.meishichina.com/recipe/chongyangjie/) | [节日习俗](https://home.meishichina.com/recipe/jierixisu/) | - | ---------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------ | - | [muqinjie](https://rsshub.app/meishichina/recipe/muqinjie) | [fuqinjie](https://rsshub.app/meishichina/recipe/fuqinjie) | [ertongjie](https://rsshub.app/meishichina/recipe/ertongjie) | [qixi](https://rsshub.app/meishichina/recipe/qixi) | [chongyangjie](https://rsshub.app/meishichina/recipe/chongyangjie) | [jierixisu](https://rsshub.app/meishichina/recipe/jierixisu) | +| [母亲节](https://home.meishichina.com/recipe/muqinjie/) | [父亲节](https://home.meishichina.com/recipe/fuqinjie/) | [儿童节](https://home.meishichina.com/recipe/ertongjie/) | [七夕](https://home.meishichina.com/recipe/qixi/) | [重阳节](https://home.meishichina.com/recipe/chongyangjie/) | [节日习俗](https://home.meishichina.com/recipe/jierixisu/) | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------ | +| [muqinjie](https://rsshub.app/meishichina/recipe/muqinjie) | [fuqinjie](https://rsshub.app/meishichina/recipe/fuqinjie) | [ertongjie](https://rsshub.app/meishichina/recipe/ertongjie) | [qixi](https://rsshub.app/meishichina/recipe/qixi) | [chongyangjie](https://rsshub.app/meishichina/recipe/chongyangjie) | [jierixisu](https://rsshub.app/meishichina/recipe/jierixisu) | - #### 按制作难度 +#### 按制作难度 - | [简单](https://home.meishichina.com/recipe-type-do-level-view-1.html) | [普通](https://home.meishichina.com/recipe-type-do-level-view-2.html) | [高级](https://home.meishichina.com/recipe-type-do-level-view-3.html) | [神级](https://home.meishichina.com/recipe-type-do-level-view-4.html) | - | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | - | [recipe-type-do-level-view-1](https://rsshub.app/meishichina/recipe/recipe-type-do-level-view-1) | [recipe-type-do-level-view-2](https://rsshub.app/meishichina/recipe/recipe-type-do-level-view-2) | [recipe-type-do-level-view-3](https://rsshub.app/meishichina/recipe/recipe-type-do-level-view-3) | [recipe-type-do-level-view-4](https://rsshub.app/meishichina/recipe/recipe-type-do-level-view-4) | +| [简单](https://home.meishichina.com/recipe-type-do-level-view-1.html) | [普通](https://home.meishichina.com/recipe-type-do-level-view-2.html) | [高级](https://home.meishichina.com/recipe-type-do-level-view-3.html) | [神级](https://home.meishichina.com/recipe-type-do-level-view-4.html) | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| [recipe-type-do-level-view-1](https://rsshub.app/meishichina/recipe/recipe-type-do-level-view-1) | [recipe-type-do-level-view-2](https://rsshub.app/meishichina/recipe/recipe-type-do-level-view-2) | [recipe-type-do-level-view-3](https://rsshub.app/meishichina/recipe/recipe-type-do-level-view-3) | [recipe-type-do-level-view-4](https://rsshub.app/meishichina/recipe/recipe-type-do-level-view-4) | - #### 按所需时间 +#### 按所需时间 - | [十分钟](https://home.meishichina.com/recipe-type-do-during-view-1.html) | [廿分钟](https://home.meishichina.com/recipe-type-do-during-view-2.html) | [半小时](https://home.meishichina.com/recipe-type-do-during-view-3.html) | [三刻钟](https://home.meishichina.com/recipe-type-do-during-view-4.html) | [一小时](https://home.meishichina.com/recipe-type-do-during-view-5.html) | [数小时](https://home.meishichina.com/recipe-type-do-during-view-6.html) | - | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | - | [recipe-type-do-during-view-1](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-1) | [recipe-type-do-during-view-2](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-2) | [recipe-type-do-during-view-3](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-3) | [recipe-type-do-during-view-4](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-4) | [recipe-type-do-during-view-5](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-5) | [recipe-type-do-during-view-6](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-6) | +| [十分钟](https://home.meishichina.com/recipe-type-do-during-view-1.html) | [廿分钟](https://home.meishichina.com/recipe-type-do-during-view-2.html) | [半小时](https://home.meishichina.com/recipe-type-do-during-view-3.html) | [三刻钟](https://home.meishichina.com/recipe-type-do-during-view-4.html) | [一小时](https://home.meishichina.com/recipe-type-do-during-view-5.html) | [数小时](https://home.meishichina.com/recipe-type-do-during-view-6.html) | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| [recipe-type-do-during-view-1](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-1) | [recipe-type-do-during-view-2](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-2) | [recipe-type-do-during-view-3](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-3) | [recipe-type-do-during-view-4](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-4) | [recipe-type-do-during-view-5](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-5) | [recipe-type-do-during-view-6](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-6) | - | [一天](https://home.meishichina.com/recipe-type-do-during-view-7.html) | [数天](https://home.meishichina.com/recipe-type-do-during-view-8.html) | - | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | - | [recipe-type-do-during-view-7](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-7) | [recipe-type-do-during-view-8](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-8) | +| [一天](https://home.meishichina.com/recipe-type-do-during-view-7.html) | [数天](https://home.meishichina.com/recipe-type-do-during-view-8.html) | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| [recipe-type-do-during-view-7](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-7) | [recipe-type-do-during-view-8](https://rsshub.app/meishichina/recipe/recipe-type-do-during-view-8) | - #### 按菜品口味 +#### 按菜品口味 - | [微辣](https://home.meishichina.com/recipe-type-do-cuisine-view-1.html) | [中辣](https://home.meishichina.com/recipe-type-do-cuisine-view-2.html) | [超辣](https://home.meishichina.com/recipe-type-do-cuisine-view-3.html) | [麻辣](https://home.meishichina.com/recipe-type-do-cuisine-view-4.html) | [酸辣](https://home.meishichina.com/recipe-type-do-cuisine-view-5.html) | [甜辣](https://home.meishichina.com/recipe-type-do-cuisine-view-29.html) | - | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | - | [recipe-type-do-cuisine-view-1](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-1) | [recipe-type-do-cuisine-view-2](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-2) | [recipe-type-do-cuisine-view-3](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-3) | [recipe-type-do-cuisine-view-4](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-4) | [recipe-type-do-cuisine-view-5](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-5) | [recipe-type-do-cuisine-view-29](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-29) | +| [微辣](https://home.meishichina.com/recipe-type-do-cuisine-view-1.html) | [中辣](https://home.meishichina.com/recipe-type-do-cuisine-view-2.html) | [超辣](https://home.meishichina.com/recipe-type-do-cuisine-view-3.html) | [麻辣](https://home.meishichina.com/recipe-type-do-cuisine-view-4.html) | [酸辣](https://home.meishichina.com/recipe-type-do-cuisine-view-5.html) | [甜辣](https://home.meishichina.com/recipe-type-do-cuisine-view-29.html) | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| [recipe-type-do-cuisine-view-1](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-1) | [recipe-type-do-cuisine-view-2](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-2) | [recipe-type-do-cuisine-view-3](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-3) | [recipe-type-do-cuisine-view-4](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-4) | [recipe-type-do-cuisine-view-5](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-5) | [recipe-type-do-cuisine-view-29](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-29) | - | [香辣](https://home.meishichina.com/recipe-type-do-cuisine-view-31.html) | [酸甜](https://home.meishichina.com/recipe-type-do-cuisine-view-6.html) | [酸咸](https://home.meishichina.com/recipe-type-do-cuisine-view-7.html) | [咸鲜](https://home.meishichina.com/recipe-type-do-cuisine-view-8.html) | [咸甜](https://home.meishichina.com/recipe-type-do-cuisine-view-9.html) | [甜味](https://home.meishichina.com/recipe-type-do-cuisine-view-10.html) | - | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | - | [recipe-type-do-cuisine-view-31](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-31) | [recipe-type-do-cuisine-view-6](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-6) | [recipe-type-do-cuisine-view-7](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-7) | [recipe-type-do-cuisine-view-8](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-8) | [recipe-type-do-cuisine-view-9](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-9) | [recipe-type-do-cuisine-view-10](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-10) | +| [香辣](https://home.meishichina.com/recipe-type-do-cuisine-view-31.html) | [酸甜](https://home.meishichina.com/recipe-type-do-cuisine-view-6.html) | [酸咸](https://home.meishichina.com/recipe-type-do-cuisine-view-7.html) | [咸鲜](https://home.meishichina.com/recipe-type-do-cuisine-view-8.html) | [咸甜](https://home.meishichina.com/recipe-type-do-cuisine-view-9.html) | [甜味](https://home.meishichina.com/recipe-type-do-cuisine-view-10.html) | +| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| [recipe-type-do-cuisine-view-31](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-31) | [recipe-type-do-cuisine-view-6](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-6) | [recipe-type-do-cuisine-view-7](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-7) | [recipe-type-do-cuisine-view-8](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-8) | [recipe-type-do-cuisine-view-9](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-9) | [recipe-type-do-cuisine-view-10](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-10) | - | [苦味](https://home.meishichina.com/recipe-type-do-cuisine-view-11.html) | [原味](https://home.meishichina.com/recipe-type-do-cuisine-view-12.html) | [清淡](https://home.meishichina.com/recipe-type-do-cuisine-view-13.html) | [五香](https://home.meishichina.com/recipe-type-do-cuisine-view-14.html) | [鱼香](https://home.meishichina.com/recipe-type-do-cuisine-view-15.html) | [葱香](https://home.meishichina.com/recipe-type-do-cuisine-view-16.html) | - | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | - | [recipe-type-do-cuisine-view-11](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-11) | [recipe-type-do-cuisine-view-12](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-12) | [recipe-type-do-cuisine-view-13](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-13) | [recipe-type-do-cuisine-view-14](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-14) | [recipe-type-do-cuisine-view-15](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-15) | [recipe-type-do-cuisine-view-16](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-16) | +| [苦味](https://home.meishichina.com/recipe-type-do-cuisine-view-11.html) | [原味](https://home.meishichina.com/recipe-type-do-cuisine-view-12.html) | [清淡](https://home.meishichina.com/recipe-type-do-cuisine-view-13.html) | [五香](https://home.meishichina.com/recipe-type-do-cuisine-view-14.html) | [鱼香](https://home.meishichina.com/recipe-type-do-cuisine-view-15.html) | [葱香](https://home.meishichina.com/recipe-type-do-cuisine-view-16.html) | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| [recipe-type-do-cuisine-view-11](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-11) | [recipe-type-do-cuisine-view-12](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-12) | [recipe-type-do-cuisine-view-13](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-13) | [recipe-type-do-cuisine-view-14](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-14) | [recipe-type-do-cuisine-view-15](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-15) | [recipe-type-do-cuisine-view-16](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-16) | - | [蒜香](https://home.meishichina.com/recipe-type-do-cuisine-view-17.html) | [奶香](https://home.meishichina.com/recipe-type-do-cuisine-view-18.html) | [酱香](https://home.meishichina.com/recipe-type-do-cuisine-view-19.html) | [糟香](https://home.meishichina.com/recipe-type-do-cuisine-view-20.html) | [咖喱](https://home.meishichina.com/recipe-type-do-cuisine-view-21.html) | [孜然](https://home.meishichina.com/recipe-type-do-cuisine-view-22.html) | - | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | - | [recipe-type-do-cuisine-view-17](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-17) | [recipe-type-do-cuisine-view-18](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-18) | [recipe-type-do-cuisine-view-19](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-19) | [recipe-type-do-cuisine-view-20](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-20) | [recipe-type-do-cuisine-view-21](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-21) | [recipe-type-do-cuisine-view-22](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-22) | +| [蒜香](https://home.meishichina.com/recipe-type-do-cuisine-view-17.html) | [奶香](https://home.meishichina.com/recipe-type-do-cuisine-view-18.html) | [酱香](https://home.meishichina.com/recipe-type-do-cuisine-view-19.html) | [糟香](https://home.meishichina.com/recipe-type-do-cuisine-view-20.html) | [咖喱](https://home.meishichina.com/recipe-type-do-cuisine-view-21.html) | [孜然](https://home.meishichina.com/recipe-type-do-cuisine-view-22.html) | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| [recipe-type-do-cuisine-view-17](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-17) | [recipe-type-do-cuisine-view-18](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-18) | [recipe-type-do-cuisine-view-19](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-19) | [recipe-type-do-cuisine-view-20](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-20) | [recipe-type-do-cuisine-view-21](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-21) | [recipe-type-do-cuisine-view-22](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-22) | - | [果味](https://home.meishichina.com/recipe-type-do-cuisine-view-23.html) | [香草](https://home.meishichina.com/recipe-type-do-cuisine-view-24.html) | [怪味](https://home.meishichina.com/recipe-type-do-cuisine-view-25.html) | [咸香](https://home.meishichina.com/recipe-type-do-cuisine-view-26.html) | [甜香](https://home.meishichina.com/recipe-type-do-cuisine-view-27.html) | [麻香](https://home.meishichina.com/recipe-type-do-cuisine-view-28.html) | - | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | - | [recipe-type-do-cuisine-view-23](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-23) | [recipe-type-do-cuisine-view-24](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-24) | [recipe-type-do-cuisine-view-25](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-25) | [recipe-type-do-cuisine-view-26](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-26) | [recipe-type-do-cuisine-view-27](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-27) | [recipe-type-do-cuisine-view-28](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-28) | +| [果味](https://home.meishichina.com/recipe-type-do-cuisine-view-23.html) | [香草](https://home.meishichina.com/recipe-type-do-cuisine-view-24.html) | [怪味](https://home.meishichina.com/recipe-type-do-cuisine-view-25.html) | [咸香](https://home.meishichina.com/recipe-type-do-cuisine-view-26.html) | [甜香](https://home.meishichina.com/recipe-type-do-cuisine-view-27.html) | [麻香](https://home.meishichina.com/recipe-type-do-cuisine-view-28.html) | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| [recipe-type-do-cuisine-view-23](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-23) | [recipe-type-do-cuisine-view-24](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-24) | [recipe-type-do-cuisine-view-25](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-25) | [recipe-type-do-cuisine-view-26](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-26) | [recipe-type-do-cuisine-view-27](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-27) | [recipe-type-do-cuisine-view-28](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-28) | - | [其他](https://home.meishichina.com/recipe-type-do-cuisine-view-50.html) | - | ------------------------------------------------------------------------------------------------------ | - | [recipe-type-do-cuisine-view-50](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-50) | +| [其他](https://home.meishichina.com/recipe-type-do-cuisine-view-50.html) | +| ------------------------------------------------------------------------------------------------------ | +| [recipe-type-do-cuisine-view-50](https://rsshub.app/meishichina/recipe/recipe-type-do-cuisine-view-50) | - #### 按主要工艺 +#### 按主要工艺 - | [烧](https://home.meishichina.com/recipe-type-do-technics-view-1.html) | [炒](https://home.meishichina.com/recipe-type-do-technics-view-2.html) | [爆](https://home.meishichina.com/recipe-type-do-technics-view-3.html) | [焖](https://home.meishichina.com/recipe-type-do-technics-view-4.html) | [炖](https://home.meishichina.com/recipe-type-do-technics-view-5.html) | [蒸](https://home.meishichina.com/recipe-type-do-technics-view-6.html) | - | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | - | [recipe-type-do-technics-view-1](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-1) | [recipe-type-do-technics-view-2](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-2) | [recipe-type-do-technics-view-3](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-3) | [recipe-type-do-technics-view-4](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-4) | [recipe-type-do-technics-view-5](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-5) | [recipe-type-do-technics-view-6](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-6) | +| [烧](https://home.meishichina.com/recipe-type-do-technics-view-1.html) | [炒](https://home.meishichina.com/recipe-type-do-technics-view-2.html) | [爆](https://home.meishichina.com/recipe-type-do-technics-view-3.html) | [焖](https://home.meishichina.com/recipe-type-do-technics-view-4.html) | [炖](https://home.meishichina.com/recipe-type-do-technics-view-5.html) | [蒸](https://home.meishichina.com/recipe-type-do-technics-view-6.html) | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| [recipe-type-do-technics-view-1](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-1) | [recipe-type-do-technics-view-2](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-2) | [recipe-type-do-technics-view-3](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-3) | [recipe-type-do-technics-view-4](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-4) | [recipe-type-do-technics-view-5](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-5) | [recipe-type-do-technics-view-6](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-6) | - | [煮](https://home.meishichina.com/recipe-type-do-technics-view-7.html) | [拌](https://home.meishichina.com/recipe-type-do-technics-view-8.html) | [烤](https://home.meishichina.com/recipe-type-do-technics-view-9.html) | [炸](https://home.meishichina.com/recipe-type-do-technics-view-10.html) | [烩](https://home.meishichina.com/recipe-type-do-technics-view-11.html) | [溜](https://home.meishichina.com/recipe-type-do-technics-view-12.html) | - | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | - | [recipe-type-do-technics-view-7](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-7) | [recipe-type-do-technics-view-8](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-8) | [recipe-type-do-technics-view-9](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-9) | [recipe-type-do-technics-view-10](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-10) | [recipe-type-do-technics-view-11](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-11) | [recipe-type-do-technics-view-12](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-12) | +| [煮](https://home.meishichina.com/recipe-type-do-technics-view-7.html) | [拌](https://home.meishichina.com/recipe-type-do-technics-view-8.html) | [烤](https://home.meishichina.com/recipe-type-do-technics-view-9.html) | [炸](https://home.meishichina.com/recipe-type-do-technics-view-10.html) | [烩](https://home.meishichina.com/recipe-type-do-technics-view-11.html) | [溜](https://home.meishichina.com/recipe-type-do-technics-view-12.html) | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| [recipe-type-do-technics-view-7](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-7) | [recipe-type-do-technics-view-8](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-8) | [recipe-type-do-technics-view-9](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-9) | [recipe-type-do-technics-view-10](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-10) | [recipe-type-do-technics-view-11](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-11) | [recipe-type-do-technics-view-12](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-12) | - | [氽](https://home.meishichina.com/recipe-type-do-technics-view-13.html) | [腌](https://home.meishichina.com/recipe-type-do-technics-view-14.html) | [卤](https://home.meishichina.com/recipe-type-do-technics-view-15.html) | [炝](https://home.meishichina.com/recipe-type-do-technics-view-16.html) | [煎](https://home.meishichina.com/recipe-type-do-technics-view-17.html) | [酥](https://home.meishichina.com/recipe-type-do-technics-view-18.html) | - | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | - | [recipe-type-do-technics-view-13](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-13) | [recipe-type-do-technics-view-14](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-14) | [recipe-type-do-technics-view-15](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-15) | [recipe-type-do-technics-view-16](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-16) | [recipe-type-do-technics-view-17](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-17) | [recipe-type-do-technics-view-18](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-18) | +| [氽](https://home.meishichina.com/recipe-type-do-technics-view-13.html) | [腌](https://home.meishichina.com/recipe-type-do-technics-view-14.html) | [卤](https://home.meishichina.com/recipe-type-do-technics-view-15.html) | [炝](https://home.meishichina.com/recipe-type-do-technics-view-16.html) | [煎](https://home.meishichina.com/recipe-type-do-technics-view-17.html) | [酥](https://home.meishichina.com/recipe-type-do-technics-view-18.html) | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| [recipe-type-do-technics-view-13](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-13) | [recipe-type-do-technics-view-14](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-14) | [recipe-type-do-technics-view-15](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-15) | [recipe-type-do-technics-view-16](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-16) | [recipe-type-do-technics-view-17](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-17) | [recipe-type-do-technics-view-18](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-18) | - | [扒](https://home.meishichina.com/recipe-type-do-technics-view-19.html) | [熏](https://home.meishichina.com/recipe-type-do-technics-view-20.html) | [煨](https://home.meishichina.com/recipe-type-do-technics-view-21.html) | [酱](https://home.meishichina.com/recipe-type-do-technics-view-22.html) | [煲](https://home.meishichina.com/recipe-type-do-technics-view-30.html) | [烘焙](https://home.meishichina.com/recipe-type-do-technics-view-23.html) | - | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | - | [recipe-type-do-technics-view-19](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-19) | [recipe-type-do-technics-view-20](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-20) | [recipe-type-do-technics-view-21](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-21) | [recipe-type-do-technics-view-22](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-22) | [recipe-type-do-technics-view-30](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-30) | [recipe-type-do-technics-view-23](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-23) | +| [扒](https://home.meishichina.com/recipe-type-do-technics-view-19.html) | [熏](https://home.meishichina.com/recipe-type-do-technics-view-20.html) | [煨](https://home.meishichina.com/recipe-type-do-technics-view-21.html) | [酱](https://home.meishichina.com/recipe-type-do-technics-view-22.html) | [煲](https://home.meishichina.com/recipe-type-do-technics-view-30.html) | [烘焙](https://home.meishichina.com/recipe-type-do-technics-view-23.html) | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| [recipe-type-do-technics-view-19](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-19) | [recipe-type-do-technics-view-20](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-20) | [recipe-type-do-technics-view-21](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-21) | [recipe-type-do-technics-view-22](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-22) | [recipe-type-do-technics-view-30](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-30) | [recipe-type-do-technics-view-23](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-23) | - | [火锅](https://home.meishichina.com/recipe-type-do-technics-view-24.html) | [砂锅](https://home.meishichina.com/recipe-type-do-technics-view-25.html) | [拔丝](https://home.meishichina.com/recipe-type-do-technics-view-26.html) | [生鲜](https://home.meishichina.com/recipe-type-do-technics-view-27.html) | [调味](https://home.meishichina.com/recipe-type-do-technics-view-28.html) | [技巧](https://home.meishichina.com/recipe-type-do-technics-view-29.html) | - | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | - | [recipe-type-do-technics-view-24](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-24) | [recipe-type-do-technics-view-25](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-25) | [recipe-type-do-technics-view-26](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-26) | [recipe-type-do-technics-view-27](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-27) | [recipe-type-do-technics-view-28](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-28) | [recipe-type-do-technics-view-29](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-29) | +| [火锅](https://home.meishichina.com/recipe-type-do-technics-view-24.html) | [砂锅](https://home.meishichina.com/recipe-type-do-technics-view-25.html) | [拔丝](https://home.meishichina.com/recipe-type-do-technics-view-26.html) | [生鲜](https://home.meishichina.com/recipe-type-do-technics-view-27.html) | [调味](https://home.meishichina.com/recipe-type-do-technics-view-28.html) | [技巧](https://home.meishichina.com/recipe-type-do-technics-view-29.html) | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| [recipe-type-do-technics-view-24](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-24) | [recipe-type-do-technics-view-25](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-25) | [recipe-type-do-technics-view-26](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-26) | [recipe-type-do-technics-view-27](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-27) | [recipe-type-do-technics-view-28](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-28) | [recipe-type-do-technics-view-29](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-29) | - | [烙](https://home.meishichina.com/recipe-type-do-technics-view-31.html) | [榨汁](https://home.meishichina.com/recipe-type-do-technics-view-32.html) | [冷冻](https://home.meishichina.com/recipe-type-do-technics-view-33.html) | [焗](https://home.meishichina.com/recipe-type-do-technics-view-34.html) | [焯](https://home.meishichina.com/recipe-type-do-technics-view-35.html) | [干煸](https://home.meishichina.com/recipe-type-do-technics-view-36.html) | - | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | - | [recipe-type-do-technics-view-31](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-31) | [recipe-type-do-technics-view-32](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-32) | [recipe-type-do-technics-view-33](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-33) | [recipe-type-do-technics-view-34](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-34) | [recipe-type-do-technics-view-35](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-35) | [recipe-type-do-technics-view-36](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-36) | +| [烙](https://home.meishichina.com/recipe-type-do-technics-view-31.html) | [榨汁](https://home.meishichina.com/recipe-type-do-technics-view-32.html) | [冷冻](https://home.meishichina.com/recipe-type-do-technics-view-33.html) | [焗](https://home.meishichina.com/recipe-type-do-technics-view-34.html) | [焯](https://home.meishichina.com/recipe-type-do-technics-view-35.html) | [干煸](https://home.meishichina.com/recipe-type-do-technics-view-36.html) | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| [recipe-type-do-technics-view-31](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-31) | [recipe-type-do-technics-view-32](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-32) | [recipe-type-do-technics-view-33](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-33) | [recipe-type-do-technics-view-34](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-34) | [recipe-type-do-technics-view-35](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-35) | [recipe-type-do-technics-view-36](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-36) | - | [干锅](https://home.meishichina.com/recipe-type-do-technics-view-37.html) | [铁板](https://home.meishichina.com/recipe-type-do-technics-view-38.html) | [微波](https://home.meishichina.com/recipe-type-do-technics-view-39.html) | [其他](https://home.meishichina.com/recipe-type-do-technics-view-50.html) | - | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | - | [recipe-type-do-technics-view-37](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-37) | [recipe-type-do-technics-view-38](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-38) | [recipe-type-do-technics-view-39](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-39) | [recipe-type-do-technics-view-50](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-50) | +| [干锅](https://home.meishichina.com/recipe-type-do-technics-view-37.html) | [铁板](https://home.meishichina.com/recipe-type-do-technics-view-38.html) | [微波](https://home.meishichina.com/recipe-type-do-technics-view-39.html) | [其他](https://home.meishichina.com/recipe-type-do-technics-view-50.html) | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| [recipe-type-do-technics-view-37](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-37) | [recipe-type-do-technics-view-38](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-38) | [recipe-type-do-technics-view-39](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-39) | [recipe-type-do-technics-view-50](https://rsshub.app/meishichina/recipe/recipe-type-do-technics-view-50) | -
+
`, categories: ['new-media'], diff --git a/lib/routes/mihoyo/bbs/img-ranking.ts b/lib/routes/mihoyo/bbs/img-ranking.ts index 83927cbacc2c..75bc1abc8897 100644 --- a/lib/routes/mihoyo/bbs/img-ranking.ts +++ b/lib/routes/mihoyo/bbs/img-ranking.ts @@ -62,43 +62,43 @@ export const route: Route = { maintainers: ['CaoMeiYouRen'], handler, description: `| 键 | 含义 | 接受的值 | 默认值 | - | ----------- | ------------------------------------- | -------------------------------------------------------------------- | ------------ | - | forumType | 主榜类型(仅原神、大别野有 cos 主榜) | tongren/cos | tongren | - | cateType | 子榜类型(仅崩坏三、原神有子榜) | 崩坏三:illustration/comic/cos;原神:illustration/comic/qute/manual | illustration | - | rankingType | 排行榜类型(崩坏二没有日榜) | daily/weekly/monthly | daily | - | lastId | 当前页 id(用于分页) | 数字 | 1 | +| ----------- | ------------------------------------- | -------------------------------------------------------------------- | ------------ | +| forumType | 主榜类型(仅原神、大别野有 cos 主榜) | tongren/cos | tongren | +| cateType | 子榜类型(仅崩坏三、原神有子榜) | 崩坏三:illustration/comic/cos;原神:illustration/comic/qute/manual | illustration | +| rankingType | 排行榜类型(崩坏二没有日榜) | daily/weekly/monthly | daily | +| lastId | 当前页 id(用于分页) | 数字 | 1 | 游戏缩写 - | 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 大别野 | 绝区零 | - | ------ | ---- | ------ | ---------- | -------- | ------ | ------ | - | bh3 | ys | bh2 | wd | sr | dby | zzz | +| 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 大别野 | 绝区零 | +| ------ | ---- | ------ | ---------- | -------- | ------ | ------ | +| bh3 | ys | bh2 | wd | sr | dby | zzz | 主榜类型 - | 同人榜 | COS 榜 | - | ------- | ------ | - | tongren | cos | +| 同人榜 | COS 榜 | +| ------- | ------ | +| tongren | cos | 子榜类型 崩坏三 子榜 - | 插画 | 漫画 | COS | - | ------------ | ----- | --- | - | illustration | comic | cos | +| 插画 | 漫画 | COS | +| ------------ | ----- | --- | +| illustration | comic | cos | 原神 子榜 - | 插画 | 漫画 | Q 版 | 手工 | - | ------------ | ----- | ---- | ------ | - | illustration | comic | qute | manual | +| 插画 | 漫画 | Q 版 | 手工 | +| ------------ | ----- | ---- | ------ | +| illustration | comic | qute | manual | 排行榜类型 - | 日榜 | 周榜 | 月榜 | - | ----- | ------ | ------- | - | daily | weekly | monthly |`, +| 日榜 | 周榜 | 月榜 | +| ----- | ------ | ------- | +| daily | weekly | monthly |`, }; async function handler(ctx) { diff --git a/lib/routes/mihoyo/bbs/official.ts b/lib/routes/mihoyo/bbs/official.ts index 63d5ac39a53c..a3121a2d88b9 100644 --- a/lib/routes/mihoyo/bbs/official.ts +++ b/lib/routes/mihoyo/bbs/official.ts @@ -139,15 +139,15 @@ export const route: Route = { handler, description: `游戏 id - | 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 绝区零 | - | ------ | ---- | ------ | ---------- | -------- | ------ | - | 1 | 2 | 3 | 4 | 6 | 8 | +| 崩坏三 | 原神 | 崩坏二 | 未定事件簿 | 星穹铁道 | 绝区零 | +| ------ | ---- | ------ | ---------- | -------- | ------ | +| 1 | 2 | 3 | 4 | 6 | 8 | 公告类型 - | 公告 | 活动 | 资讯 | - | ---- | ---- | ---- | - | 1 | 2 | 3 |`, +| 公告 | 活动 | 资讯 | +| ---- | ---- | ---- | +| 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/mihoyo/sr/news.ts b/lib/routes/mihoyo/sr/news.ts index 69a07c4663b5..4cba9a945025 100644 --- a/lib/routes/mihoyo/sr/news.ts +++ b/lib/routes/mihoyo/sr/news.ts @@ -68,9 +68,9 @@ export const route: Route = { url: 'sr.mihoyo.com/news', description: `#### 新闻 {#mi-ha-you-beng-huai-xing-qiong-tie-dao-xin-wen} - | 最新 | 新闻 | 公告 | 活动 | - | -------- | ---- | ------ | -------- | - | news-all | news | notice | activity |`, +| 最新 | 新闻 | 公告 | 活动 | +| -------- | ---- | ------ | -------- | +| news-all | news | notice | activity |`, }; async function handler(ctx) { diff --git a/lib/routes/mihoyo/ys/news.ts b/lib/routes/mihoyo/ys/news.ts index 4ae1226b4ca6..30fb94ccfc8b 100644 --- a/lib/routes/mihoyo/ys/news.ts +++ b/lib/routes/mihoyo/ys/news.ts @@ -104,9 +104,9 @@ export const route: Route = { handler, description: `#### 新闻 {#mi-ha-you-yuan-shen-xin-wen} - | 最新 | 新闻 | 公告 | 活动 | - | ------ | ---- | ------ | -------- | - | latest | news | notice | activity |`, +| 最新 | 新闻 | 公告 | 活动 | +| ------ | ---- | ------ | -------- | +| latest | news | notice | activity |`, }; async function handler(ctx) { diff --git a/lib/routes/mindmeister/example.ts b/lib/routes/mindmeister/example.ts index e83bbc69a25a..62a45c3f2806 100644 --- a/lib/routes/mindmeister/example.ts +++ b/lib/routes/mindmeister/example.ts @@ -25,34 +25,34 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| Categories | parameter | - | ------------- | ----------------- | - | Featured Map | mind-map-examples | - | Business | business | - | Design | design | - | Education | education | - | Entertainment | entertainment | - | Life | life | - | Marketing | marketing | - | Productivity | productivity | - | Summaries | summaries | - | Technology | technology | - | Other | other | +| ------------- | ----------------- | +| Featured Map | mind-map-examples | +| Business | business | +| Design | design | +| Education | education | +| Entertainment | entertainment | +| Life | life | +| Marketing | marketing | +| Productivity | productivity | +| Summaries | summaries | +| Technology | technology | +| Other | other | - | Languages | parameter | - | ---------- | --------- | - | English | en | - | Deutsch | de | - | Français | fr | - | Español | es | - | Português | pt | - | Nederlands | nl | - | Dansk | da | - | Русский | ru | - | 日本語 | ja | - | Italiano | it | - | 简体中文 | zh | - | 한국어 | ko | - | Other | other |`, +| Languages | parameter | +| ---------- | --------- | +| English | en | +| Deutsch | de | +| Français | fr | +| Español | es | +| Português | pt | +| Nederlands | nl | +| Dansk | da | +| Русский | ru | +| 日本語 | ja | +| Italiano | it | +| 简体中文 | zh | +| 한국어 | ko | +| Other | other |`, }; async function handler(ctx) { diff --git a/lib/routes/mittrchina/index.ts b/lib/routes/mittrchina/index.ts index ef392a47eac1..02633e047372 100644 --- a/lib/routes/mittrchina/index.ts +++ b/lib/routes/mittrchina/index.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['EsuRt', 'queensferryme'], handler, description: `| 快讯 | 本周热文 | 首页资讯 | 视频 | - | -------- | -------- | -------- | ----- | - | breaking | hot | index | video |`, +| -------- | -------- | -------- | ----- | +| breaking | hot | index | video |`, }; async function handler(ctx) { diff --git a/lib/routes/miui/firmware/index.ts b/lib/routes/miui/firmware/index.ts index 3ea80b0256b8..df911f54948e 100644 --- a/lib/routes/miui/firmware/index.ts +++ b/lib/routes/miui/firmware/index.ts @@ -10,13 +10,13 @@ export const route: Route = { name: 'New firmware', maintainers: ['Indexyz'], description: ` | stable | development | - | ------- | ----------- | - | release | dev | +| ------- | ----------- | +| release | dev | - | region | region | - | ------ | ------ | - | China | cn | - | Global | global |`, +| region | region | +| ------ | ------ | +| China | cn | +| Global | global |`, handler, }; diff --git a/lib/routes/mixcloud/index.ts b/lib/routes/mixcloud/index.ts index 59897d9e7ab7..a4204d78979f 100644 --- a/lib/routes/mixcloud/index.ts +++ b/lib/routes/mixcloud/index.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['Misaka13514'], handler, description: `| Shows | Reposts | Favorites | History | Stream | - | ------- | ------- | --------- | ------- | ------ | - | uploads | reposts | favorites | listens | stream |`, +| ------- | ------- | --------- | ------- | ------ | +| uploads | reposts | favorites | listens | stream |`, }; async function handler(ctx) { diff --git a/lib/routes/modian/zhongchou.ts b/lib/routes/modian/zhongchou.ts index 921dfa00b088..701e37ebbc5b 100644 --- a/lib/routes/modian/zhongchou.ts +++ b/lib/routes/modian/zhongchou.ts @@ -12,33 +12,33 @@ export const route: Route = { maintainers: ['nczitzk'], description: `分类 - | 全部 | 游戏 | 动漫 | 出版 | 桌游 | - | ---- | ----- | ------ | ---------- | ---------- | - | all | games | comics | publishing | tablegames | +| 全部 | 游戏 | 动漫 | 出版 | 桌游 | +| ---- | ----- | ------ | ---------- | ---------- | +| all | games | comics | publishing | tablegames | - | 卡牌 | 潮玩模型 | 影视 | 音乐 | 活动 | - | ----- | -------- | ---------- | ----- | ---------- | - | cards | toys | film-video | music | activities | +| 卡牌 | 潮玩模型 | 影视 | 音乐 | 活动 | +| ----- | -------- | ---------- | ----- | ---------- | +| cards | toys | film-video | music | activities | - | 设计 | 科技 | 食品 | 爱心通道 | 动物救助 | - | ------ | ---------- | ---- | -------- | -------- | - | design | technology | food | charity | animals | +| 设计 | 科技 | 食品 | 爱心通道 | 动物救助 | +| ------ | ---------- | ---- | -------- | -------- | +| design | technology | food | charity | animals | - | 个人愿望 | 其他 | - | -------- | ------ | - | wishes | others | +| 个人愿望 | 其他 | +| -------- | ------ | +| wishes | others | 排序 - | 最新上线 | 金额最高 | 评论最多 | - | --------- | ---------- | ------------ | - | top\_time | top\_money | top\_comment | +| 最新上线 | 金额最高 | 评论最多 | +| --------- | ---------- | ------------ | +| top\_time | top\_money | top\_comment | 状态 - | 全部 | 创意 | 预热 | 众筹中 | 众筹成功 | - | ---- | ---- | ------- | ------ | -------- | - | all | idea | preheat | going | success |`, +| 全部 | 创意 | 预热 | 众筹中 | 众筹成功 | +| ---- | ---- | ------- | ------ | -------- | +| all | idea | preheat | going | success |`, handler, radar: [ { diff --git a/lib/routes/mrm/index.ts b/lib/routes/mrm/index.ts index 22ace8e8acc7..913ae0db879c 100644 --- a/lib/routes/mrm/index.ts +++ b/lib/routes/mrm/index.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 交易通知 | 政策规定 | 业务通知 | - | ------------ | -------------------- | ----------------- | - | zonghezixun3 | zhengceguiding\_list | yewutongzhi\_list |`, +| ------------ | -------------------- | ----------------- | +| zonghezixun3 | zhengceguiding\_list | yewutongzhi\_list |`, }; async function handler(ctx) { diff --git a/lib/routes/mwm/index.ts b/lib/routes/mwm/index.ts index 9f6ed7077e50..3847b37081df 100644 --- a/lib/routes/mwm/index.ts +++ b/lib/routes/mwm/index.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 本期要目 | 网络首发 | 学术活动 | 通知公告 | - | -------- | -------- | -------- | -------- | - | bqym | wlsf | xshd | tzgg |`, +| -------- | -------- | -------- | -------- | +| bqym | wlsf | xshd | tzgg |`, }; async function handler(ctx) { diff --git a/lib/routes/mydrivers/rank.ts b/lib/routes/mydrivers/rank.ts index 8f674dc9b977..e769f6d98b4d 100644 --- a/lib/routes/mydrivers/rank.ts +++ b/lib/routes/mydrivers/rank.ts @@ -29,8 +29,8 @@ export const route: Route = { handler, url: 'm.mydrivers.com/newsclass.aspx', description: `| 24 小时最热 | 本周最热 | 本月最热 | - | ----------- | -------- | -------- | - | 0 | 1 | 2 |`, +| ----------- | -------- | -------- | +| 0 | 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/myfigurecollection/activity.ts b/lib/routes/myfigurecollection/activity.ts index 8bd33065f062..6ccad02fac88 100644 --- a/lib/routes/myfigurecollection/activity.ts +++ b/lib/routes/myfigurecollection/activity.ts @@ -43,28 +43,28 @@ export const route: Route = { url: 'zh.myfigurecollection.net/browse', description: `Category - | Figures | Goods | Media | - | ------- | ----- | ----- | - | 0 | 1 | 2 | +| Figures | Goods | Media | +| ------- | ----- | ----- | +| 0 | 1 | 2 | Language - | Id | Language | - | -- | ---------- | - | | en | - | de | Deutsch | - | es | Español | - | fi | Suomeksi | - | fr | Français | - | it | Italiano | - | ja | 日本語 | - | nl | Nederlands | - | no | Norsk | - | pl | Polski | - | pt | Português | - | ru | Русский | - | sv | Svenska | - | zh | 中文 |`, +| Id | Language | +| -- | ---------- | +| | en | +| de | Deutsch | +| es | Español | +| fi | Suomeksi | +| fr | Français | +| it | Italiano | +| ja | 日本語 | +| nl | Nederlands | +| no | Norsk | +| pl | Polski | +| pt | Português | +| ru | Русский | +| sv | Svenska | +| zh | 中文 |`, }; async function handler(ctx) { diff --git a/lib/routes/myfigurecollection/index.ts b/lib/routes/myfigurecollection/index.ts index d02016403977..5abdeaad52e1 100644 --- a/lib/routes/myfigurecollection/index.ts +++ b/lib/routes/myfigurecollection/index.ts @@ -39,8 +39,8 @@ export const route: Route = { handler, url: 'zh.myfigurecollection.net/browse', description: `| 每日圖片 | 每週圖片 | 每月圖片 | - | -------- | -------- | -------- | - | potd | potw | potm |`, +| -------- | -------- | -------- | +| potd | potw | potm |`, }; async function handler(ctx) { diff --git a/lib/routes/mygopen/index.ts b/lib/routes/mygopen/index.ts index f318c5f462b9..7a45b7eacf11 100644 --- a/lib/routes/mygopen/index.ts +++ b/lib/routes/mygopen/index.ts @@ -24,7 +24,7 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 謠言 | 詐騙 | 真實資訊 | 教學 | - | ---- | ---- | -------- | ---- |`, +| ---- | ---- | -------- | ---- |`, }; async function handler(ctx) { diff --git a/lib/routes/mysql/release.ts b/lib/routes/mysql/release.ts index b865c133f890..29bb810306b3 100644 --- a/lib/routes/mysql/release.ts +++ b/lib/routes/mysql/release.ts @@ -21,7 +21,7 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 8.0 | 5.7 | 5.6 | - | --- | --- | --- |`, +| --- | --- | --- |`, }; async function handler(ctx) { diff --git a/lib/routes/nature/research.ts b/lib/routes/nature/research.ts index 0461e5138c9b..9a7b05fe9c81 100644 --- a/lib/routes/nature/research.ts +++ b/lib/routes/nature/research.ts @@ -41,16 +41,16 @@ export const route: Route = { maintainers: ['y9c', 'TonyRL', 'pseudoyu'], handler, description: `| \`:journal\` | Full Name of the Journal | Route | - | :-----------: | :-------------------------: | ---------------------------------------------------------------------------------- | - | nature | Nature | [/nature/research/nature](https://rsshub.app/nature/research/nature) | - | nbt | Nature Biotechnology | [/nature/research/nbt](https://rsshub.app/nature/research/nbt) | - | neuro | Nature Neuroscience | [/nature/research/neuro](https://rsshub.app/nature/research/neuro) | - | ng | Nature Genetics | [/nature/research/ng](https://rsshub.app/nature/research/ng) | - | ni | Nature Immunology | [/nature/research/ni](https://rsshub.app/nature/research/ni) | - | nmeth | Nature Method | [/nature/research/nmeth](https://rsshub.app/nature/research/nmeth) | - | nchem | Nature Chemistry | [/nature/research/nchem](https://rsshub.app/nature/research/nchem) | - | nmat | Nature Materials | [/nature/research/nmat](https://rsshub.app/nature/research/nmat) | - | natmachintell | Nature Machine Intelligence | [/nature/research/natmachintell](https://rsshub.app/nature/research/natmachintell) | +| :-----------: | :-------------------------: | ---------------------------------------------------------------------------------- | +| nature | Nature | [/nature/research/nature](https://rsshub.app/nature/research/nature) | +| nbt | Nature Biotechnology | [/nature/research/nbt](https://rsshub.app/nature/research/nbt) | +| neuro | Nature Neuroscience | [/nature/research/neuro](https://rsshub.app/nature/research/neuro) | +| ng | Nature Genetics | [/nature/research/ng](https://rsshub.app/nature/research/ng) | +| ni | Nature Immunology | [/nature/research/ni](https://rsshub.app/nature/research/ni) | +| nmeth | Nature Method | [/nature/research/nmeth](https://rsshub.app/nature/research/nmeth) | +| nchem | Nature Chemistry | [/nature/research/nchem](https://rsshub.app/nature/research/nchem) | +| nmat | Nature Materials | [/nature/research/nmat](https://rsshub.app/nature/research/nmat) | +| natmachintell | Nature Machine Intelligence | [/nature/research/natmachintell](https://rsshub.app/nature/research/natmachintell) | - Using router (\`/nature/research/\` + "short name for a journal") to query latest research paper for a certain journal of Nature Publishing Group. If the \`:journal\` parameter is blank, then latest research of Nature will return. diff --git a/lib/routes/nbd/index.ts b/lib/routes/nbd/index.ts index 843fbff483b7..854ce8c4daa5 100644 --- a/lib/routes/nbd/index.ts +++ b/lib/routes/nbd/index.ts @@ -28,8 +28,8 @@ export const route: Route = { handler, url: 'nbd.com.cn/', description: `| 头条 | 要闻 | 图片新闻 | 推荐 | - | ---- | ---- | -------- | ---- | - | 2 | 3 | 4 | 5 |`, +| ---- | ---- | -------- | ---- | +| 2 | 3 | 4 | 5 |`, }; async function handler(ctx) { diff --git a/lib/routes/ncc-cma/cmdp.ts b/lib/routes/ncc-cma/cmdp.ts index 0926fa2b0933..9c0571a7d85e 100644 --- a/lib/routes/ncc-cma/cmdp.ts +++ b/lib/routes/ncc-cma/cmdp.ts @@ -111,41 +111,41 @@ export const route: Route = { 若同时订阅日平均气温距平、近5天平均气温距和近10天平均气温距平,将其 data-id \`RPJQWQYZ\`、\`ZJ5TPJQWJP\` 和 \`ZJ10TQWJP\` 作为参数填入,此时路由为 [\`/ncc-cma/cmdp/image/RPJQWQYZ/ZJ5TPJQWJP/ZJ10TQWJP\`](https://rsshub.app/ncc-cma/cmdp/image/RPJQWQYZ/ZJ5TPJQWJP/ZJ10TQWJP)。 ::: - | 日平均气温距平 | 近5天平均气温距平 | 近10天平均气温距平 | 近20天平均气温距平 | 近30天平均气温距平 | - | ----------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | - | [RPJQWQYZ](https://rsshub.app/ncc-cma/cmdp/image/RPJQWQYZ) | [ZJ5TPJQWJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ5TPJQWJP) | [ZJ10TQWJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ10TQWJP) | [ZJ20TQWJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ20TQWJP) | [ZJ30TQWJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ30TQWJP) | +| 日平均气温距平 | 近5天平均气温距平 | 近10天平均气温距平 | 近20天平均气温距平 | 近30天平均气温距平 | +| ----------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| [RPJQWQYZ](https://rsshub.app/ncc-cma/cmdp/image/RPJQWQYZ) | [ZJ5TPJQWJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ5TPJQWJP) | [ZJ10TQWJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ10TQWJP) | [ZJ20TQWJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ20TQWJP) | [ZJ30TQWJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ30TQWJP) | - | 本月以来气温距平 | 本季以来气温距平 | 本年以来气温距平 | - | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | - | [BYYLQWJP](https://rsshub.app/ncc-cma/cmdp/image/BYYLQWJP) | [BJYLQWJP](https://rsshub.app/ncc-cma/cmdp/image/BJYLQWJP) | [BNYLQWJP](https://rsshub.app/ncc-cma/cmdp/image/BNYLQWJP) | +| 本月以来气温距平 | 本季以来气温距平 | 本年以来气温距平 | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| [BYYLQWJP](https://rsshub.app/ncc-cma/cmdp/image/BYYLQWJP) | [BJYLQWJP](https://rsshub.app/ncc-cma/cmdp/image/BJYLQWJP) | [BNYLQWJP](https://rsshub.app/ncc-cma/cmdp/image/BNYLQWJP) | - | 日降水量分布 | 近5天降水量 | 近10天降水量 | 近20天降水量 | 近30天降水量 | - | ----------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | - | [QGRJSLFBT0808S](https://rsshub.app/ncc-cma/cmdp/image/QGRJSLFBT0808S) | [ZJ5TJSLFBT](https://rsshub.app/ncc-cma/cmdp/image/ZJ5TJSLFBT) | [ZJ10TJSL](https://rsshub.app/ncc-cma/cmdp/image/ZJ10TJSL) | [ZJ20TJSL](https://rsshub.app/ncc-cma/cmdp/image/ZJ20TJSL) | [ZJ30TJSL](https://rsshub.app/ncc-cma/cmdp/image/ZJ30TJSL) | +| 日降水量分布 | 近5天降水量 | 近10天降水量 | 近20天降水量 | 近30天降水量 | +| ----------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| [QGRJSLFBT0808S](https://rsshub.app/ncc-cma/cmdp/image/QGRJSLFBT0808S) | [ZJ5TJSLFBT](https://rsshub.app/ncc-cma/cmdp/image/ZJ5TJSLFBT) | [ZJ10TJSL](https://rsshub.app/ncc-cma/cmdp/image/ZJ10TJSL) | [ZJ20TJSL](https://rsshub.app/ncc-cma/cmdp/image/ZJ20TJSL) | [ZJ30TJSL](https://rsshub.app/ncc-cma/cmdp/image/ZJ30TJSL) | - | 本月以来降水量 | 本季以来降水量 | 近10天降水量距平百分率 | 近20天降水量距平百分率 | 近30天降水量距平百分率 | - | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | - | [BYYLJSL](https://rsshub.app/ncc-cma/cmdp/image/BYYLJSL) | [BJYLJSL](https://rsshub.app/ncc-cma/cmdp/image/BJYLJSL) | [ZJ10TJSLJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ10TJSLJP) | [ZJ20TJSLJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ20TJSLJP) | [ZJ30TJSLJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ30TJSLJP) | +| 本月以来降水量 | 本季以来降水量 | 近10天降水量距平百分率 | 近20天降水量距平百分率 | 近30天降水量距平百分率 | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| [BYYLJSL](https://rsshub.app/ncc-cma/cmdp/image/BYYLJSL) | [BJYLJSL](https://rsshub.app/ncc-cma/cmdp/image/BJYLJSL) | [ZJ10TJSLJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ10TJSLJP) | [ZJ20TJSLJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ20TJSLJP) | [ZJ30TJSLJP](https://rsshub.app/ncc-cma/cmdp/image/ZJ30TJSLJP) | - | 本月以来降水量距平百分率 | 本季以来降水量距平百分率 | 本年以来降水量距平百分率 | - | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------- | - | [BYYLJSLJPZYQHZ](https://rsshub.app/ncc-cma/cmdp/image/BYYLJSLJPZYQHZ) | [BJYLJSLJPZJQHZ](https://rsshub.app/ncc-cma/cmdp/image/BJYLJSLJPZJQHZ) | [BNYLJSLJP](https://rsshub.app/ncc-cma/cmdp/image/BNYLJSLJP) | +| 本月以来降水量距平百分率 | 本季以来降水量距平百分率 | 本年以来降水量距平百分率 | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------- | +| [BYYLJSLJPZYQHZ](https://rsshub.app/ncc-cma/cmdp/image/BYYLJSLJPZYQHZ) | [BJYLJSLJPZJQHZ](https://rsshub.app/ncc-cma/cmdp/image/BJYLJSLJPZJQHZ) | [BNYLJSLJP](https://rsshub.app/ncc-cma/cmdp/image/BNYLJSLJP) | - | 气温距平(最近10天) | 气温距平(最近20天) | 气温距平(最近30天) | 气温距平(最近90天) | 最低气温距平(最近30天) | - | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------ | - | [glbtmeana10\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana10_) | [glbtmeana20\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana20_) | [glbtmeana30\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana30_) | [glbtmeana90\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana90_) | [glbtmina30\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmina30_) | +| 气温距平(最近10天) | 气温距平(最近20天) | 气温距平(最近30天) | 气温距平(最近90天) | 最低气温距平(最近30天) | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------ | +| [glbtmeana10\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana10_) | [glbtmeana20\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana20_) | [glbtmeana30\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana30_) | [glbtmeana90\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmeana90_) | [glbtmina30\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmina30_) | - | 最低气温距平(最近90天) | 最高气温距平(最近30天) | 最高气温距平(最近90天) | - | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | - | [glbtmina90\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmina90_) | [glbtmaxa30\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmaxa30_) | [glbtmaxa90\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmaxa90_) | +| 最低气温距平(最近90天) | 最高气温距平(最近30天) | 最高气温距平(最近90天) | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| [glbtmina90\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmina90_) | [glbtmaxa30\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmaxa30_) | [glbtmaxa90\_](https://rsshub.app/ncc-cma/cmdp/image/glbtmaxa90_) | - | 降水量(最近10天) | 降水量(最近20天) | 降水量(最近30天) | 降水量(最近90天) | 降水距平百分率(最近10天) | - | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------ | - | [glbrain10\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain10_) | [glbrain20\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain20_) | [glbrain30\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain30_) | [glbrain90\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain90_) | [glbraina10\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina10_) | +| 降水量(最近10天) | 降水量(最近20天) | 降水量(最近30天) | 降水量(最近90天) | 降水距平百分率(最近10天) | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------ | +| [glbrain10\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain10_) | [glbrain20\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain20_) | [glbrain30\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain30_) | [glbrain90\_](https://rsshub.app/ncc-cma/cmdp/image/glbrain90_) | [glbraina10\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina10_) | - | 降水距平百分率(最近20天) | 降水距平百分率(最近30天) | 降水距平百分率(最近90天) | - | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | - | [glbraina20\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina20_) | [glbraina30\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina30_) | [glbraina90\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina90_) | +| 降水距平百分率(最近20天) | 降水距平百分率(最近30天) | 降水距平百分率(最近90天) | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| [glbraina20\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina20_) | [glbraina30\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina30_) | [glbraina90\_](https://rsshub.app/ncc-cma/cmdp/image/glbraina90_) | `, categories: ['forecast'], diff --git a/lib/routes/ncepu/master/masterinfo.ts b/lib/routes/ncepu/master/masterinfo.ts index 6d83b9508f66..bbc35f9943ac 100644 --- a/lib/routes/ncepu/master/masterinfo.ts +++ b/lib/routes/ncepu/master/masterinfo.ts @@ -38,8 +38,8 @@ export const route: Route = { maintainers: ['nilleo'], handler, description: `| 类型 | 硕士招生信息 | 通知公告 | 研究生培养信息 | - | ---- | ------------ | -------- | -------------- | - | 参数 | zsxx | tzgg | pyxx |`, +| ---- | ------------ | -------- | -------------- | +| 参数 | zsxx | tzgg | pyxx |`, }; async function handler(ctx) { diff --git a/lib/routes/neu/bmie.ts b/lib/routes/neu/bmie.ts index f6bb3212a431..0a1df43f0012 100644 --- a/lib/routes/neu/bmie.ts +++ b/lib/routes/neu/bmie.ts @@ -41,22 +41,22 @@ export const route: Route = { maintainers: ['tennousuathena'], handler, description: `| Id | 名称 | - | ----------------------- | ---------- | - | news | 学院新闻 | - | academic | 学术科研 | - | talent\_development | 人才培养 | - | international\_exchange | 国际交流 | - | announcement | 通知公告 | - | undergraduate\_dev | 本科生培养 | - | postgraduate\_dev | 研究生培养 | - | undergraduate\_recruit | 本科生招募 | - | postgraduate\_recruit | 研究生招募 | - | CPC\_build | 党的建设 | - | CPC\_work | 党委工作 | - | union\_work | 工会工作 | - | CYL\_work | 共青团工作 | - | security\_management | 安全管理 | - | alumni\_style | 校友风采 |`, +| ----------------------- | ---------- | +| news | 学院新闻 | +| academic | 学术科研 | +| talent\_development | 人才培养 | +| international\_exchange | 国际交流 | +| announcement | 通知公告 | +| undergraduate\_dev | 本科生培养 | +| postgraduate\_dev | 研究生培养 | +| undergraduate\_recruit | 本科生招募 | +| postgraduate\_recruit | 研究生招募 | +| CPC\_build | 党的建设 | +| CPC\_work | 党委工作 | +| union\_work | 工会工作 | +| CYL\_work | 共青团工作 | +| security\_management | 安全管理 | +| alumni\_style | 校友风采 |`, }; async function handler(ctx) { diff --git a/lib/routes/neu/news.ts b/lib/routes/neu/news.ts index 401ec142d5ec..9948c64d08f9 100644 --- a/lib/routes/neu/news.ts +++ b/lib/routes/neu/news.ts @@ -27,22 +27,22 @@ export const route: Route = { maintainers: ['JeasonLau'], handler, description: `| 种类名 | 参数 | - | -------- | ---- | - | 东大要闻 | ddyw | - | 媒体东大 | mtdd | - | 通知公告 | tzgg | - | 新闻纵横 | xwzh | - | 人才培养 | rcpy | - | 学术科研 | xsky | - | 英文新闻 | 217 | - | 招生就业 | zsjy | - | 考研出国 | kycg | - | 校园文学 | xywx | - | 校友风采 | xyfc | - | 时事热点 | ssrd | - | 教育前沿 | jyqy | - | 文化体育 | whty | - | 最新科技 | zxkj |`, +| -------- | ---- | +| 东大要闻 | ddyw | +| 媒体东大 | mtdd | +| 通知公告 | tzgg | +| 新闻纵横 | xwzh | +| 人才培养 | rcpy | +| 学术科研 | xsky | +| 英文新闻 | 217 | +| 招生就业 | zsjy | +| 考研出国 | kycg | +| 校园文学 | xywx | +| 校友风采 | xyfc | +| 时事热点 | ssrd | +| 教育前沿 | jyqy | +| 文化体育 | whty | +| 最新科技 | zxkj |`, }; async function handler(ctx) { diff --git a/lib/routes/newsmarket/index.ts b/lib/routes/newsmarket/index.ts index c64dd3229ddb..ddae997667f8 100644 --- a/lib/routes/newsmarket/index.ts +++ b/lib/routes/newsmarket/index.ts @@ -26,12 +26,12 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 時事。政策 | 食安 | 新知 | 愛地方 | 種好田 | 好吃。好玩 | - | ----------- | ----------- | --------- | ------------ | ------------ | ------------- | - | news-policy | food-safety | knowledge | country-life | good-farming | good-food-fun | +| ----------- | ----------- | --------- | ------------ | ------------ | ------------- | +| news-policy | food-safety | knowledge | country-life | good-farming | good-food-fun | - | 食農教育 | 人物 | 漁業。畜牧 | 綠生活。國際 | 評論 | - | -------------- | ------------------ | -------------------- | ------------------- | ------- | - | food-education | people-and-history | raising-and-breeding | living-green-travel | opinion |`, +| 食農教育 | 人物 | 漁業。畜牧 | 綠生活。國際 | 評論 | +| -------------- | ------------------ | -------------------- | ------------------- | ------- | +| food-education | people-and-history | raising-and-breeding | living-green-travel | opinion |`, }; async function handler(ctx) { diff --git a/lib/routes/nextapple/realtime.ts b/lib/routes/nextapple/realtime.ts index 27a324104a87..169267ddb6a7 100644 --- a/lib/routes/nextapple/realtime.ts +++ b/lib/routes/nextapple/realtime.ts @@ -28,12 +28,12 @@ export const route: Route = { handler, url: 'tw.nextapple.com/', description: `| 首頁 | 焦點 | 熱門 | 娛樂 | 生活 | 女神 | 社會 | - | ------ | --------- | ---- | ------------- | ---- | -------- | ----- | - | latest | recommend | hit | entertainment | life | gorgeous | local | +| ------ | --------- | ---- | ------------- | ---- | -------- | ----- | +| latest | recommend | hit | entertainment | life | gorgeous | local | - | 政治 | 國際 | 財經 | 體育 | 旅遊美食 | 3C 車市 | - | -------- | ------------- | ------- | ------ | --------- | ------- | - | politics | international | finance | sports | lifestyle | gadget |`, +| 政治 | 國際 | 財經 | 體育 | 旅遊美食 | 3C 車市 | +| -------- | ------------- | ------- | ------ | --------- | ------- | +| politics | international | finance | sports | lifestyle | gadget |`, }; async function handler(ctx) { diff --git a/lib/routes/ngocn2/index.ts b/lib/routes/ngocn2/index.ts index d95557f1ce69..ec5ed99fafef 100644 --- a/lib/routes/ngocn2/index.ts +++ b/lib/routes/ngocn2/index.ts @@ -27,8 +27,8 @@ export const route: Route = { handler, url: 'ngocn2.org/', description: `| 所有文章 | 早报 | 热点 | - | -------- | ----------- | -------- | - | article | daily-brief | trending |`, +| -------- | ----------- | -------- | +| article | daily-brief | trending |`, }; async function handler(ctx) { diff --git a/lib/routes/nikkei/news.ts b/lib/routes/nikkei/news.ts index 21bafbff3930..c9e8a6722345 100644 --- a/lib/routes/nikkei/news.ts +++ b/lib/routes/nikkei/news.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['Arracc', 'ladeng07'], handler, description: `| 総合 | オピニオン | 経済 | 政治 | 金融 | マーケット | ビジネス | マネーのまなび | テック | 国際 | スポーツ | 社会・調査 | 地域 | 文化 | ライフスタイル | - | ---- | ---------- | ------- | -------- | --------- | ---------- | -------- | -------------- | ---------- | ------------- | -------- | ---------- | ----- | ------- | -------------- | - | news | opinion | economy | politics | financial | business | 不支持 | 不支持 | technology | international | sports | society | local | culture | lifestyle |`, +| ---- | ---------- | ------- | -------- | --------- | ---------- | -------- | -------------- | ---------- | ------------- | -------- | ---------- | ----- | ------- | -------------- | +| news | opinion | economy | politics | financial | business | 不支持 | 不支持 | technology | international | sports | society | local | culture | lifestyle |`, }; async function handler(ctx) { diff --git a/lib/routes/nippon/index.ts b/lib/routes/nippon/index.ts index 8d741aa6f9a0..f66fe927f3d7 100644 --- a/lib/routes/nippon/index.ts +++ b/lib/routes/nippon/index.ts @@ -23,8 +23,8 @@ export const route: Route = { ], name: '政治外交', description: `| 政治 | 经济 | 社会 | 展览预告 | 焦点专题 | 深度报道 | 话题 | 日本信息库 | 日本一蹩 | 人物访谈 | 编辑部通告 | - | -------- | ------- | ------- | -------- | ------------------ | -------- | ------------ | ---------- | ------------- | -------- | ------------- | - | Politics | Economy | Society | Culture | Science,Technology | In-depth | japan-topics | japan-data | japan-glances | People | Announcements |`, +| -------- | ------- | ------- | -------- | ------------------ | -------- | ------------ | ---------- | ------------- | -------- | ------------- | +| Politics | Economy | Society | Culture | Science,Technology | In-depth | japan-topics | japan-data | japan-glances | People | Announcements |`, maintainers: ['laampui'], handler, }; diff --git a/lib/routes/njnu/ceai/ceai.ts b/lib/routes/njnu/ceai/ceai.ts index 8e059bb9b680..031be1dd3dea 100644 --- a/lib/routes/njnu/ceai/ceai.ts +++ b/lib/routes/njnu/ceai/ceai.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['Shujakuinkuraudo'], handler, description: `| 学院公告 | 学院新闻 | 学生资讯 | - | -------- | -------- | -------- | - | xygg | xyxw | xszx |`, +| -------- | -------- | -------- | +| xygg | xyxw | xszx |`, }; async function handler(ctx) { diff --git a/lib/routes/njnu/jwc/jwc.ts b/lib/routes/njnu/jwc/jwc.ts index e67b8aed71ef..00b65edc37a6 100644 --- a/lib/routes/njnu/jwc/jwc.ts +++ b/lib/routes/njnu/jwc/jwc.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['Shujakuinkuraudo'], handler, description: `| 教师通知 | 新闻动态 | 学生通知 | - | -------- | -------- | -------- | - | jstz | xwdt | xstz |`, +| -------- | -------- | -------- | +| jstz | xwdt | xstz |`, }; async function handler(ctx) { diff --git a/lib/routes/nju/exchangesys.ts b/lib/routes/nju/exchangesys.ts index baabbf874780..8583be71bfc8 100644 --- a/lib/routes/nju/exchangesys.ts +++ b/lib/routes/nju/exchangesys.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: [], handler, description: `| 新闻通知 | 交换生项目 | - | -------- | ---------- | - | news | proj |`, +| -------- | ---------- | +| news | proj |`, }; async function handler(ctx) { diff --git a/lib/routes/nju/jw.ts b/lib/routes/nju/jw.ts index 341ec261b133..c5f200ce28c2 100644 --- a/lib/routes/nju/jw.ts +++ b/lib/routes/nju/jw.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['cqjjjzr'], handler, description: `| 公告通知 | 教学动态 | - | -------- | -------- | - | ggtz | jxdt |`, +| -------- | -------- | +| ggtz | jxdt |`, }; async function handler(ctx) { diff --git a/lib/routes/nju/rczp.ts b/lib/routes/nju/rczp.ts index bbfe922b8faf..74f3762e5d27 100644 --- a/lib/routes/nju/rczp.ts +++ b/lib/routes/nju/rczp.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['ret-1'], handler, description: `| 信息发布 | 教研类岗位 | 管理岗位及其他 | - | -------- | ---------- | -------------- | - | xxfb | jylgw | gllgw |`, +| -------- | ---------- | -------------- | +| xxfb | jylgw | gllgw |`, }; async function handler(ctx) { diff --git a/lib/routes/nju/scit.ts b/lib/routes/nju/scit.ts index a31b97116ce6..9d944dc549c5 100644 --- a/lib/routes/nju/scit.ts +++ b/lib/routes/nju/scit.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['ret-1'], handler, description: `| 通知公告 | 科研动态 | - | -------- | -------- | - | tzgg | kydt |`, +| -------- | -------- | +| tzgg | kydt |`, }; async function handler(ctx) { diff --git a/lib/routes/nju/zbb.ts b/lib/routes/nju/zbb.ts index d8fdf49f7b87..5ed81ad745a2 100644 --- a/lib/routes/nju/zbb.ts +++ b/lib/routes/nju/zbb.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['ret-1'], handler, description: `| 采购信息 | 成交公示 | 政府采购意向公开 | - | -------- | -------- | ---------------- | - | cgxx | cjgs | zfcgyxgk |`, +| -------- | -------- | ---------------- | +| cgxx | cjgs | zfcgyxgk |`, }; async function handler(ctx) { diff --git a/lib/routes/njupt/jwc.ts b/lib/routes/njupt/jwc.ts index 73d0e7a91f57..4e9cd0329fac 100644 --- a/lib/routes/njupt/jwc.ts +++ b/lib/routes/njupt/jwc.ts @@ -28,8 +28,8 @@ export const route: Route = { maintainers: ['shaoye'], handler, description: `| 通知公告 | 教务快讯 | - | -------- | -------- | - | notice | news |`, +| -------- | -------- | +| notice | news |`, }; async function handler(ctx) { diff --git a/lib/routes/njust/cwc.ts b/lib/routes/njust/cwc.ts index 6d211c8bbf52..85f80effc1c6 100644 --- a/lib/routes/njust/cwc.ts +++ b/lib/routes/njust/cwc.ts @@ -29,8 +29,8 @@ export const route: Route = { maintainers: ['MilkShakeYoung', 'jasongzy'], handler, description: `| 通知公告 | 办事流程 | - | -------- | -------- | - | tzgg | bslc |`, +| -------- | -------- | +| tzgg | bslc |`, }; async function handler(ctx) { diff --git a/lib/routes/njust/dgxg.ts b/lib/routes/njust/dgxg.ts index c568ba9877cf..d93459b3f670 100644 --- a/lib/routes/njust/dgxg.ts +++ b/lib/routes/njust/dgxg.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['jasongzy'], handler, description: `| 公示通知 | 学术文化 | 就业指导 | - | -------- | -------- | -------- | - | gstz | xswh | jyzd |`, +| -------- | -------- | -------- | +| gstz | xswh | jyzd |`, }; async function handler(ctx) { diff --git a/lib/routes/njust/eo.ts b/lib/routes/njust/eo.ts index 3039cc441106..3cf4a5205647 100644 --- a/lib/routes/njust/eo.ts +++ b/lib/routes/njust/eo.ts @@ -38,15 +38,15 @@ export const route: Route = { handler, description: `\`grade\` 列表: - | 本科 2016 级 | 本科 2017 级 | 本科 2018 级 | 本科 2019 级 | - | ------------ | ------------ | ------------ | ------------ | - | 16 | 17 | 18 | 19 | +| 本科 2016 级 | 本科 2017 级 | 本科 2018 级 | 本科 2019 级 | +| ------------ | ------------ | ------------ | ------------ | +| 16 | 17 | 18 | 19 | \`type\` 列表: - | 年级通知(通知公告) | 每日动态(主任寄语) | - | -------------------- | -------------------- | - | tz | dt |`, +| 年级通知(通知公告) | 每日动态(主任寄语) | +| -------------------- | -------------------- | +| tz | dt |`, }; async function handler(ctx) { diff --git a/lib/routes/njust/eoe.ts b/lib/routes/njust/eoe.ts index 231f92263e84..a20455b93cb4 100644 --- a/lib/routes/njust/eoe.ts +++ b/lib/routes/njust/eoe.ts @@ -29,8 +29,8 @@ export const route: Route = { maintainers: ['jasongzy'], handler, description: `| 通知公告 | 新闻动态 | - | -------- | -------- | - | tzgg | xwdt |`, +| -------- | -------- | +| tzgg | xwdt |`, }; async function handler(ctx) { diff --git a/lib/routes/njust/gs.ts b/lib/routes/njust/gs.ts index 122657b46651..40fd55027fb5 100644 --- a/lib/routes/njust/gs.ts +++ b/lib/routes/njust/gs.ts @@ -29,8 +29,8 @@ export const route: Route = { maintainers: ['MilkShakeYoung', 'jasongzy'], handler, description: `| 首页通知公告 | 首页新闻动态 | 最新通知 | 招生信息 | 培养信息 | 学术活动 | - | ------------ | ------------ | -------- | -------- | -------- | -------- | - | sytzgg\_4568 | sytzgg | 14686 | 14687 | 14688 | xshdggl |`, +| ------------ | ------------ | -------- | -------- | -------- | -------- | +| sytzgg\_4568 | sytzgg | 14686 | 14687 | 14688 | xshdggl |`, }; async function handler(ctx) { diff --git a/lib/routes/njust/jwc.ts b/lib/routes/njust/jwc.ts index bbe175fe0631..b09650208062 100644 --- a/lib/routes/njust/jwc.ts +++ b/lib/routes/njust/jwc.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['MilkShakeYoung', 'jasongzy'], handler, description: `| 教师通知 | 学生通知 | 新闻 | 学院动态 | - | -------- | -------- | ---- | -------- | - | jstz | xstz | xw | xydt |`, +| -------- | -------- | ---- | -------- | +| jstz | xstz | xw | xydt |`, }; async function handler(ctx) { diff --git a/lib/routes/nlc/read.ts b/lib/routes/nlc/read.ts index a7430d10e8de..1e4483211dbc 100644 --- a/lib/routes/nlc/read.ts +++ b/lib/routes/nlc/read.ts @@ -21,10 +21,10 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| [电子图书](http://read.nlc.cn/outRes/outResList?type=电子图书) | [电子期刊](http://read.nlc.cn/outRes/outResList?type=电子期刊) | [电子论文](http://read.nlc.cn/outRes/outResList?type=电子论文) | [电子报纸](http://read.nlc.cn/outRes/outResList?type=电子报纸) | [音视频](http://read.nlc.cn/outRes/outResList?type=音视频) | - | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | - | [标准专利](http://read.nlc.cn/outRes/outResList?type=标准专利) | [工具书](http://read.nlc.cn/outRes/outResList?type=工具书) | [少儿资源](http://read.nlc.cn/outRes/outResList?type=少儿资源) | - | -------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- |`, +| [标准专利](http://read.nlc.cn/outRes/outResList?type=标准专利) | [工具书](http://read.nlc.cn/outRes/outResList?type=工具书) | [少儿资源](http://read.nlc.cn/outRes/outResList?type=少儿资源) | +| -------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- |`, }; async function handler(ctx) { diff --git a/lib/routes/nltimes/news.ts b/lib/routes/nltimes/news.ts index bad23e78393c..6e722a981781 100644 --- a/lib/routes/nltimes/news.ts +++ b/lib/routes/nltimes/news.ts @@ -41,8 +41,8 @@ export const route: Route = { maintainers: ['Hivol'], handler, description: `| Top Stories (default) | Health | Crime | Politics | Business | Tech | Culture | Sports | Weird | 1-1-2 | - | --------------------- | ------ | ----- | -------- | -------- | ---- | ------- | ------ | ----- | ----- | - | top-stories | health | crime | politics | business | tech | culture | sports | weird | 1-1-2 |`, +| --------------------- | ------ | ----- | -------- | -------- | ---- | ------- | ------ | ----- | ----- | +| top-stories | health | crime | politics | business | tech | culture | sports | weird | 1-1-2 |`, }; async function handler(ctx) { diff --git a/lib/routes/nodejs/blog.ts b/lib/routes/nodejs/blog.ts index e4b3da5c6ac0..54b5340d1338 100644 --- a/lib/routes/nodejs/blog.ts +++ b/lib/routes/nodejs/blog.ts @@ -27,21 +27,21 @@ export const route: Route = { handler, description: `Official RSS Source: https://nodejs.org/en/feed/blog.xml - | العربية | Catalan | Deutsch | Español | زبان فارسی | - | ------- | ------- | ------- | ------- | ---------- | - | ar | ca | de | es | fa | +| العربية | Catalan | Deutsch | Español | زبان فارسی | +| ------- | ------- | ------- | ------- | ---------- | +| ar | ca | de | es | fa | - | Français | Galego | Italiano | 日本語 | 한국어 | - | -------- | ------ | -------- | ------ | ------ | - | fr | gl | it | ja | ko | +| Français | Galego | Italiano | 日本語 | 한국어 | +| -------- | ------ | -------- | ------ | ------ | +| fr | gl | it | ja | ko | - | Português do Brasil | limba română | Русский | Türkçe | Українська | - | ------------------- | ------------ | ------- | ------ | ---------- | - | pt-br | ro | ru | tr | uk | +| Português do Brasil | limba română | Русский | Türkçe | Українська | +| ------------------- | ------------ | ------- | ------ | ---------- | +| pt-br | ro | ru | tr | uk | - | 简体中文 | 繁體中文 | - | -------- | -------- | - | zh-cn | zh-tw |`, +| 简体中文 | 繁體中文 | +| -------- | -------- | +| zh-cn | zh-tw |`, }; async function handler(ctx) { diff --git a/lib/routes/nogizaka46/blog.ts b/lib/routes/nogizaka46/blog.ts index fd320f85911a..1d42cad8c765 100644 --- a/lib/routes/nogizaka46/blog.ts +++ b/lib/routes/nogizaka46/blog.ts @@ -29,48 +29,48 @@ export const route: Route = { url: 'blog.nogizaka46.com/s/n46/diary/MEMBER', description: `Member ID - | Member ID | Name | - | --------- | --------------------- | - | 55401 | 岡本 姫奈 | - | 55400 | 川﨑 桜 | - | 55397 | 池田 瑛紗 | - | 55396 | 五百城 茉央 | - | 55395 | 中西 アルノ | - | 55394 | 奥田 いろは | - | 55393 | 冨里 奈央 | - | 55392 | 小川 彩 | - | 55391 | 菅原 咲月 | - | 55390 | 一ノ瀬 美空 | - | 55389 | 井上 和 | - | 55387 | 弓木 奈於 | - | 55386 | 松尾 美佑 | - | 55385 | 林 瑠奈 | - | 55384 | 佐藤 璃果 | - | 55383 | 黒見 明香 | - | 48014 | 清宮 レイ | - | 48012 | 北川 悠理 | - | 48010 | 金川 紗耶 | - | 48019 | 矢久保 美緒 | - | 48018 | 早川 聖来 | - | 48009 | 掛橋 沙耶香 | - | 48008 | 賀喜 遥香 | - | 48017 | 筒井 あやめ | - | 48015 | 田村 真佑 | - | 48013 | 柴田 柚菜 | - | 48006 | 遠藤 さくら | - | 36760 | 与田 祐希 | - | 36759 | 吉田 綾乃クリスティー | - | 36758 | 山下 美月 | - | 36757 | 向井 葉月 | - | 36756 | 中村 麗乃 | - | 36755 | 佐藤 楓 | - | 36754 | 阪口 珠美 | - | 36753 | 久保 史緒里 | - | 36752 | 大園 桃子 | - | 36751 | 梅澤 美波 | - | 36750 | 岩本 蓮加 | - | 36749 | 伊藤 理々杏 | - | 264 | 齋藤 飛鳥 |`, +| Member ID | Name | +| --------- | --------------------- | +| 55401 | 岡本 姫奈 | +| 55400 | 川﨑 桜 | +| 55397 | 池田 瑛紗 | +| 55396 | 五百城 茉央 | +| 55395 | 中西 アルノ | +| 55394 | 奥田 いろは | +| 55393 | 冨里 奈央 | +| 55392 | 小川 彩 | +| 55391 | 菅原 咲月 | +| 55390 | 一ノ瀬 美空 | +| 55389 | 井上 和 | +| 55387 | 弓木 奈於 | +| 55386 | 松尾 美佑 | +| 55385 | 林 瑠奈 | +| 55384 | 佐藤 璃果 | +| 55383 | 黒見 明香 | +| 48014 | 清宮 レイ | +| 48012 | 北川 悠理 | +| 48010 | 金川 紗耶 | +| 48019 | 矢久保 美緒 | +| 48018 | 早川 聖来 | +| 48009 | 掛橋 沙耶香 | +| 48008 | 賀喜 遥香 | +| 48017 | 筒井 あやめ | +| 48015 | 田村 真佑 | +| 48013 | 柴田 柚菜 | +| 48006 | 遠藤 さくら | +| 36760 | 与田 祐希 | +| 36759 | 吉田 綾乃クリスティー | +| 36758 | 山下 美月 | +| 36757 | 向井 葉月 | +| 36756 | 中村 麗乃 | +| 36755 | 佐藤 楓 | +| 36754 | 阪口 珠美 | +| 36753 | 久保 史緒里 | +| 36752 | 大園 桃子 | +| 36751 | 梅澤 美波 | +| 36750 | 岩本 蓮加 | +| 36749 | 伊藤 理々杏 | +| 264 | 齋藤 飛鳥 |`, }; async function handler(ctx) { diff --git a/lib/routes/nosec/index.ts b/lib/routes/nosec/index.ts index 543e0fb88ead..4b69098a536a 100644 --- a/lib/routes/nosec/index.ts +++ b/lib/routes/nosec/index.ts @@ -22,14 +22,14 @@ export const route: Route = { name: 'Posts', maintainers: ['hellodword'], description: `| 分类 | 标识 | - | :------- | :--------- | - | 威胁情报 | \`threaten\` | - | 安全动态 | \`security\` | - | 漏洞预警 | \`hole\` | - | 数据泄露 | \`leakage\` | - | 专题报告 | \`speech\` | - | 技术分析 | \`skill\` | - | 安全工具 | \`tool\` |`, +| :------- | :--------- | +| 威胁情报 | \`threaten\` | +| 安全动态 | \`security\` | +| 漏洞预警 | \`hole\` | +| 数据泄露 | \`leakage\` | +| 专题报告 | \`speech\` | +| 技术分析 | \`skill\` | +| 安全工具 | \`tool\` |`, handler, radar: [ { diff --git a/lib/routes/notefolio/search.ts b/lib/routes/notefolio/search.ts index 6f7df2a24480..f9bcbb70059a 100644 --- a/lib/routes/notefolio/search.ts +++ b/lib/routes/notefolio/search.ts @@ -133,20 +133,20 @@ export const route: Route = { handler, url: 'notefolio.net/search', description: `| Category | Name in Korean | Name in English | - | -------- | ------------------ | ----------------------- | - | all | 전체 | All | - | 1 | 영상/모션그래픽 | Video / Motion Graphics | - | 2 | 그래픽 디자인 | Graphic Design | - | 3 | 브랜딩/편집 | Branding / Editing | - | 4 | UI/UX | UI/UX | - | 5 | 일러스트레이션 | Illustration | - | 6 | 디지털 아트 | Digital Art | - | 7 | 캐릭터 디자인 | Character Design | - | 8 | 제품/패키지 디자인 | Product Package Design | - | 9 | 포토그래피 | Photography | - | 10 | 타이포그래피 | Typography | - | 11 | 공예 | Crafts | - | 12 | 파인아트 | Fine Art |`, +| -------- | ------------------ | ----------------------- | +| all | 전체 | All | +| 1 | 영상/모션그래픽 | Video / Motion Graphics | +| 2 | 그래픽 디자인 | Graphic Design | +| 3 | 브랜딩/편집 | Branding / Editing | +| 4 | UI/UX | UI/UX | +| 5 | 일러스트레이션 | Illustration | +| 6 | 디지털 아트 | Digital Art | +| 7 | 캐릭터 디자인 | Character Design | +| 8 | 제품/패키지 디자인 | Product Package Design | +| 9 | 포토그래피 | Photography | +| 10 | 타이포그래피 | Typography | +| 11 | 공예 | Crafts | +| 12 | 파인아트 | Fine Art |`, }; async function handler(ctx) { diff --git a/lib/routes/now/news.ts b/lib/routes/now/news.ts index 0f713132c43e..cef675f489a4 100644 --- a/lib/routes/now/news.ts +++ b/lib/routes/now/news.ts @@ -38,17 +38,17 @@ export const route: Route = { 对于 [事件追蹤](https://news.now.com/home/tracker) 中的 [塔利班奪權](https://news.now.com/home/tracker/detail?catCode=123\&topicId=1056) 话题,其网址为 \`https://news.now.com/home/tracker/detail?catCode=123&topicId=1056\`,其中 \`topicId\` 为 1056,则对应路由为 [\`/now/news/tracker/1056\`](https://rsshub.app/now/news/tracker/1056) ::: - | 首頁 | 港聞 | 兩岸國際 | 娛樂 | - | ---- | ----- | ------------- | ------------- | - | | local | international | entertainment | +| 首頁 | 港聞 | 兩岸國際 | 娛樂 | +| ---- | ----- | ------------- | ------------- | +| | local | international | entertainment | - | 生活 | 科技 | 財經 | 體育 | - | ---- | ---------- | ------- | ------ | - | life | technology | finance | sports | +| 生活 | 科技 | 財經 | 體育 | +| ---- | ---------- | ------- | ------ | +| life | technology | finance | sports | - | 事件追蹤 | 評論節目 | 新聞專題 | - | -------- | -------- | -------- | - | tracker | feature | opinion |`, +| 事件追蹤 | 評論節目 | 新聞專題 | +| -------- | -------- | -------- | +| tracker | feature | opinion |`, }; async function handler(ctx) { diff --git a/lib/routes/nowcoder/discuss.ts b/lib/routes/nowcoder/discuss.ts index 58e5bedd77cb..1e9e82040910 100644 --- a/lib/routes/nowcoder/discuss.ts +++ b/lib/routes/nowcoder/discuss.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['LogicJake'], handler, description: `| 最新回复 | 最新发表 | 最新 | 精华 | - | -------- | -------- | ---- | ---- | - | 0 | 3 | 1 | 4 |`, +| -------- | -------- | ---- | ---- | +| 0 | 3 | 1 | 4 |`, }; async function handler(ctx) { diff --git a/lib/routes/nowcoder/jobcenter.ts b/lib/routes/nowcoder/jobcenter.ts index cb66b9e23de4..9a7b953f4ec2 100644 --- a/lib/routes/nowcoder/jobcenter.ts +++ b/lib/routes/nowcoder/jobcenter.ts @@ -37,15 +37,15 @@ export const route: Route = { 职位类型代码见下表: - | 研发 | 测试 | 数据 | 算法 | 前端 | 产品 | 运营 | 其他 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 | +| 研发 | 测试 | 数据 | 算法 | 前端 | 产品 | 运营 | 其他 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 | 排序参数见下表: - | 最新发布 | 最快处理 | 处理率最高 | - | -------- | -------- | ---------- | - | 1 | 2 | 3 |`, +| 最新发布 | 最快处理 | 处理率最高 | +| -------- | -------- | ---------- | +| 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/nua/dc.ts b/lib/routes/nua/dc.ts index 37614bbc9a55..e7ab373d2228 100644 --- a/lib/routes/nua/dc.ts +++ b/lib/routes/nua/dc.ts @@ -24,13 +24,13 @@ export const route: Route = { maintainers: ['evnydd0sf'], handler, description: `| News Type | Parameters | - | ------------------------ | ---------- | - | 学院新闻 NEWS | news | - | 展览 EXHIBITION | exhibition | - | 研创 RESEARCH & CREATION | rc | - | 项目 PROJECT | project | - | 党团 PARTY | party | - | 后浪 YOUTH | youth |`, +| ------------------------ | ---------- | +| 学院新闻 NEWS | news | +| 展览 EXHIBITION | exhibition | +| 研创 RESEARCH & CREATION | rc | +| 项目 PROJECT | project | +| 党团 PARTY | party | +| 后浪 YOUTH | youth |`, }; async function handler(ctx) { diff --git a/lib/routes/nua/gra.ts b/lib/routes/nua/gra.ts index bebf29ad8525..c7e48e7cd9ca 100644 --- a/lib/routes/nua/gra.ts +++ b/lib/routes/nua/gra.ts @@ -24,10 +24,10 @@ export const route: Route = { maintainers: ['evnydd0sf'], handler, description: `| News Type | Parameters | - | --------- | ---------- | - | 招生工作 | 1959 | - | 培养工作 | 1962 | - | 学位工作 | 1958 |`, +| --------- | ---------- | +| 招生工作 | 1959 | +| 培养工作 | 1962 | +| 学位工作 | 1958 |`, }; async function handler(ctx) { diff --git a/lib/routes/nua/index.ts b/lib/routes/nua/index.ts index 22b65876d373..48fffe9c4d68 100644 --- a/lib/routes/nua/index.ts +++ b/lib/routes/nua/index.ts @@ -23,9 +23,9 @@ export const route: Route = { maintainers: ['evnydd0sf'], handler, description: `| News Type | Parameters | - | --------- | ---------- | - | 公告 | 346 | - | 南艺要闻 | 332 |`, +| --------- | ---------- | +| 公告 | 346 | +| 南艺要闻 | 332 |`, }; async function handler(ctx) { diff --git a/lib/routes/nua/lib.ts b/lib/routes/nua/lib.ts index 8c6254ff9df9..12711f07348a 100644 --- a/lib/routes/nua/lib.ts +++ b/lib/routes/nua/lib.ts @@ -25,11 +25,11 @@ export const route: Route = { maintainers: ['evnydd0sf'], handler, description: `| News Type | Parameters | - | --------- | ---------- | - | 新闻动态 | xwdt | - | 党建动态 | djdt | - | 资源动态 | zydt | - | 服务动态 | fwdt |`, +| --------- | ---------- | +| 新闻动态 | xwdt | +| 党建动态 | djdt | +| 资源动态 | zydt | +| 服务动态 | fwdt |`, }; async function handler(ctx) { diff --git a/lib/routes/nua/sxw.ts b/lib/routes/nua/sxw.ts index 5937c67cec8c..e5cf7f81a03d 100644 --- a/lib/routes/nua/sxw.ts +++ b/lib/routes/nua/sxw.ts @@ -23,12 +23,12 @@ export const route: Route = { maintainers: ['evnydd0sf'], handler, description: `| News Type | Parameters | - | --------- | ---------- | - | 校园电视 | 230 | - | 院部动态 | 232 | - | 动感校园 | 233 | - | 招就指南 | 234 | - | 南艺院报 | 236 |`, +| --------- | ---------- | +| 校园电视 | 230 | +| 院部动态 | 232 | +| 动感校园 | 233 | +| 招就指南 | 234 | +| 南艺院报 | 236 |`, }; async function handler(ctx) { diff --git a/lib/routes/nuaa/college/cs.ts b/lib/routes/nuaa/college/cs.ts index bb521288c7d0..be076db17b45 100644 --- a/lib/routes/nuaa/college/cs.ts +++ b/lib/routes/nuaa/college/cs.ts @@ -33,8 +33,8 @@ export const route: Route = { maintainers: ['LogicJake', 'Seiry', 'qrzbing', 'Xm798'], handler, description: `| 通知公告 | 热点新闻 | 学科科研 | 教学动态 | 本科生培养 | 研究生培养 | 学生工作 | - | -------- | -------- | -------- | -------- | ---------- | ---------- | -------- | - | tzgg | rdxw | xkky | jxdt | be | me | xsgz |`, +| -------- | -------- | -------- | -------- | ---------- | ---------- | -------- | +| tzgg | rdxw | xkky | jxdt | be | me | xsgz |`, }; async function handler(ctx) { diff --git a/lib/routes/nuaa/jwc/jwc.ts b/lib/routes/nuaa/jwc/jwc.ts index 459e455e8d3e..bf856cf9d911 100644 --- a/lib/routes/nuaa/jwc/jwc.ts +++ b/lib/routes/nuaa/jwc/jwc.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['arcosx', 'Seiry', 'qrzbing', 'Xm798'], handler, description: `| 通知公告 | 教学服务 | 教学建设 | 学生培养 | 教学资源 | - | -------- | -------- | -------- | -------- | -------- | - | tzgg | jxfw | jxjs | xspy | jxzy |`, +| -------- | -------- | -------- | -------- | -------- | +| tzgg | jxfw | jxjs | xspy | jxzy |`, }; async function handler(ctx) { diff --git a/lib/routes/nuaa/yjsy/yjsy.ts b/lib/routes/nuaa/yjsy/yjsy.ts index 0275aa9aff42..431f4cfe762b 100644 --- a/lib/routes/nuaa/yjsy/yjsy.ts +++ b/lib/routes/nuaa/yjsy/yjsy.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['junfengP', 'Seiry', 'Xm798'], handler, description: `| 通知公告 | 新闻动态 | 学术信息 | 师生风采 | - | -------- | -------- | -------- | -------- | - | tzgg | xwdt | xsxx | ssfc |`, +| -------- | -------- | -------- | -------- | +| tzgg | xwdt | xsxx | ssfc |`, }; async function handler(ctx) { diff --git a/lib/routes/nudt/yjszs.ts b/lib/routes/nudt/yjszs.ts index e0fdd1674f85..db2eb0ce10b2 100644 --- a/lib/routes/nudt/yjszs.ts +++ b/lib/routes/nudt/yjszs.ts @@ -52,8 +52,8 @@ export const route: Route = { handler, url: 'yjszs.nudt.edu.cn/', description: `| 通知公告 | 首页 | 招生简章 | 学校政策 | 硕士招生 | 博士招生 | 院所发文 | 数据统计 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 2 | 1 | 8 | 12 | 16 | 17 | 23 | 25 |`, +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 2 | 1 | 8 | 12 | 16 | 17 | 23 | 25 |`, }; async function handler(ctx) { diff --git a/lib/routes/nuist/bulletin.ts b/lib/routes/nuist/bulletin.ts index 5d058a5f4936..21b32605bfa9 100644 --- a/lib/routes/nuist/bulletin.ts +++ b/lib/routes/nuist/bulletin.ts @@ -45,12 +45,12 @@ export const route: Route = { maintainers: ['gylidian'], handler, description: `| 全部 | 文件公告 | 学术报告 | 招标信息 | 会议通知 | 党政事务 | 组织人事 | - | ---- | -------- | -------- | -------- | -------- | -------- | -------- | - | 791 | 792 | xsbgw | 779 | 780 | 781 | 782 | +| ---- | -------- | -------- | -------- | -------- | -------- | -------- | +| 791 | 792 | xsbgw | 779 | 780 | 781 | 782 | - | 科研信息 | 招生就业 | 教学考试 | 专题讲座 | 校园活动 | 学院动态 | 其他 | - | -------- | -------- | -------- | -------- | -------- | -------- | ---- | - | 783 | 784 | 785 | 786 | 788 | 789 | qt | +| 科研信息 | 招生就业 | 教学考试 | 专题讲座 | 校园活动 | 学院动态 | 其他 | +| -------- | -------- | -------- | -------- | -------- | -------- | ---- | +| 783 | 784 | 785 | 786 | 788 | 789 | qt | ::: warning 全文内容需使用 校园网或[VPN](http://vpn.nuist.edu.cn) 获取 diff --git a/lib/routes/nuist/cas.ts b/lib/routes/nuist/cas.ts index 835f8c74cc57..a45054916520 100644 --- a/lib/routes/nuist/cas.ts +++ b/lib/routes/nuist/cas.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['gylidian'], handler, description: `| 信息公告 | 新闻快讯 | 科学研究 | 网上公示 | 本科教育 | 研究生教育 | - | -------- | -------- | -------- | -------- | -------- | ---------- | - | xxgg | xwkx | kxyj | wsgs | bkjy | yjsjy |`, +| -------- | -------- | -------- | -------- | -------- | ---------- | +| xxgg | xwkx | kxyj | wsgs | bkjy | yjsjy |`, }; async function handler(ctx) { diff --git a/lib/routes/nuist/jwc.ts b/lib/routes/nuist/jwc.ts index be2550c62913..c0101b459212 100644 --- a/lib/routes/nuist/jwc.ts +++ b/lib/routes/nuist/jwc.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['gylidian'], handler, description: `| 教学要闻 | 学院教学 | 教务管理 | 教学研究 | 教务管理 | 教材建设 | 考试中心 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | jxyw | xyjx | jwgl | jxyj | sjjx | jcjs | kszx |`, +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| jxyw | xyjx | jwgl | jxyj | sjjx | jcjs | kszx |`, }; async function handler(ctx) { diff --git a/lib/routes/nuist/scs.ts b/lib/routes/nuist/scs.ts index f347f153cb9e..9981cfd9fb5e 100644 --- a/lib/routes/nuist/scs.ts +++ b/lib/routes/nuist/scs.ts @@ -29,8 +29,8 @@ export const route: Route = { maintainers: ['gylidian'], handler, description: `| 新闻快讯 | 通知公告 | 教务信息 | 科研动态 | 学子风采 | - | -------- | -------- | -------- | -------- | -------- | - | xwkx | tzgg | jwxx | kydt | xzfc |`, +| -------- | -------- | -------- | -------- | -------- | +| xwkx | tzgg | jwxx | kydt | xzfc |`, }; async function handler(ctx) { diff --git a/lib/routes/nuist/sese.ts b/lib/routes/nuist/sese.ts index 8915e7d93b80..b2e3956a55e3 100644 --- a/lib/routes/nuist/sese.ts +++ b/lib/routes/nuist/sese.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['gylidian'], handler, description: `| 通知公告 | 新闻快讯 | 学术动态 | 学生工作 | 研究生教育 | 本科教育 | - | -------- | -------- | -------- | -------- | ---------- | -------- | - | tzgg1 | xwkx | xsdt1 | xsgz1 | yjsjy1 | bkjy1 |`, +| -------- | -------- | -------- | -------- | ---------- | -------- | +| tzgg1 | xwkx | xsdt1 | xsgz1 | yjsjy1 | bkjy1 |`, }; async function handler(ctx) { diff --git a/lib/routes/nwafu/all.ts b/lib/routes/nwafu/all.ts index 4bf13ada0841..4c49e5db9dd4 100644 --- a/lib/routes/nwafu/all.ts +++ b/lib/routes/nwafu/all.ts @@ -23,9 +23,9 @@ export const route: Route = { handler, description: `通知类别 - | 图书馆 | 共青团团委 | 信工学院 | 后勤管理处 | 计划财务处 | 教务处 | 新闻网 | 信息化管理处 | 研究生院 | 农业科学院 | 机械与电子工程学院 | 学术活动 | 生命科学学院 | - | ------ | ---------- | -------- | ---------- | ---------- | ------ | ------ | ------------ | -------- | ---------- | ------------------ | -------- | ------------ | - | lib | youth | cie | gs | jcc | jiaowu | news | nic | yjshy | nxy | cmee | xshd | sm |`, +| 图书馆 | 共青团团委 | 信工学院 | 后勤管理处 | 计划财务处 | 教务处 | 新闻网 | 信息化管理处 | 研究生院 | 农业科学院 | 机械与电子工程学院 | 学术活动 | 生命科学学院 | +| ------ | ---------- | -------- | ---------- | ---------- | ------ | ------ | ------------ | -------- | ---------- | ------------------ | -------- | ------------ | +| lib | youth | cie | gs | jcc | jiaowu | news | nic | yjshy | nxy | cmee | xshd | sm |`, }; async function handler(ctx) { diff --git a/lib/routes/odaily/post.ts b/lib/routes/odaily/post.ts index c7c85814cc48..28e3945dd0ea 100644 --- a/lib/routes/odaily/post.ts +++ b/lib/routes/odaily/post.ts @@ -40,8 +40,8 @@ export const route: Route = { handler, url: '0daily.com/', description: `| 最新 | 新品 | DeFi | NFT | 存储 | 波卡 | 行情 | 活动 | - | ---- | ---- | ---- | --- | ---- | ---- | ---- | ---- | - | 280 | 333 | 331 | 334 | 332 | 330 | 297 | 296 |`, +| ---- | ---- | ---- | --- | ---- | ---- | ---- | ---- | +| 280 | 333 | 331 | 334 | 332 | 330 | 297 | 296 |`, }; async function handler(ctx) { diff --git a/lib/routes/oncc/money18.ts b/lib/routes/oncc/money18.ts index 134981847cfc..27537bf18f14 100644 --- a/lib/routes/oncc/money18.ts +++ b/lib/routes/oncc/money18.ts @@ -41,8 +41,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 新聞總覽 | 全日焦點 | 板塊新聞 | 國際金融 | 大行報告 | A 股新聞 | 地產新聞 | 投資理財 | 新股 IPO | 科技財情 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | - | exp | fov | industry | int | recagent | ntlgroup | pro | weainvest | ipo | tech |`, +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | +| exp | fov | industry | int | recagent | ntlgroup | pro | weainvest | ipo | tech |`, }; async function handler(ctx) { diff --git a/lib/routes/oo-software/changelog.ts b/lib/routes/oo-software/changelog.ts index 37be9504a539..44632d500081 100644 --- a/lib/routes/oo-software/changelog.ts +++ b/lib/routes/oo-software/changelog.ts @@ -20,11 +20,11 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| Software | Id | - | --------------- | ----------- | - | O\&O ShutUp10++ | shutup10 | - | O\&O AppBuster | ooappbuster | - | O\&O Lanytix | oolanytix | - | O\&O DeskInfo | oodeskinfo |`, +| --------------- | ----------- | +| O\&O ShutUp10++ | shutup10 | +| O\&O AppBuster | ooappbuster | +| O\&O Lanytix | oolanytix | +| O\&O DeskInfo | oodeskinfo |`, }; async function handler(ctx) { diff --git a/lib/routes/openai/blog.ts b/lib/routes/openai/blog.ts index 5f77ffc8d920..1b1ea68a6f4c 100644 --- a/lib/routes/openai/blog.ts +++ b/lib/routes/openai/blog.ts @@ -20,8 +20,8 @@ export const route: Route = { maintainers: ['StevenRCE0', 'nczitzk'], handler, description: `| All | Announcements | Events | Safety & Alignment | Community | Product | Culture & Careers | Milestones | Research | - | --- | ------------- | ------ | ------------------ | --------- | ------- | ------------------- | ---------- | -------- | - | | announcements | events | safety-alignment | community | product | culture-and-careers | milestones | research |`, +| --- | ------------- | ------ | ------------------ | --------- | ------- | ------------------- | ---------- | -------- | +| | announcements | events | safety-alignment | community | product | culture-and-careers | milestones | research |`, }; async function handler(ctx) { diff --git a/lib/routes/openrice/chart.ts b/lib/routes/openrice/chart.ts index 54dded34d669..30a4a9377eb0 100644 --- a/lib/routes/openrice/chart.ts +++ b/lib/routes/openrice/chart.ts @@ -16,13 +16,13 @@ export const route: Route = { parameters: { lang: '语言,缺省为 zh', category: '类别,缺省为 most-bookmarked' }, name: '香港餐廳排行榜', description: ` - | 简体 | 繁體 | EN | - | ----- | ------ | ----- | - | zh-cn | zh | en | +| 简体 | 繁體 | EN | +| ----- | ------ | ----- | +| zh-cn | zh | en | - | 最多收藏 | 每周最高评分 | 最高浏览 | 最佳甜品餐厅 | - | ----- | ------ | ----- | ----- | - | most-bookmarked | best-rating | most-popular | best-dessert | +| 最多收藏 | 每周最高评分 | 最高浏览 | 最佳甜品餐厅 | +| ----- | ------ | ----- | ----- | +| most-bookmarked | best-rating | most-popular | best-dessert | `, }; diff --git a/lib/routes/openrice/offers.ts b/lib/routes/openrice/offers.ts index abe00683aa50..4d9919849180 100644 --- a/lib/routes/openrice/offers.ts +++ b/lib/routes/openrice/offers.ts @@ -15,9 +15,9 @@ export const route: Route = { parameters: { lang: '语言,缺省为 zh' }, name: '香港餐廳精選優惠券', description: ` - | 简体 | 繁體 | EN | - | ----- | ------ | ----- | - | zh-cn | zh | en | +| 简体 | 繁體 | EN | +| ----- | ------ | ----- | +| zh-cn | zh | en | `, }; diff --git a/lib/routes/openrice/promos.ts b/lib/routes/openrice/promos.ts index abd42d63d5d0..d0d9b7b2bb47 100644 --- a/lib/routes/openrice/promos.ts +++ b/lib/routes/openrice/promos.ts @@ -16,9 +16,9 @@ export const route: Route = { parameters: { lang: '语言,缺省为 zh' }, name: '香港餐厅滋讯', description: ` - | 简体 | 繁體 | EN | - | ----- | ------ | ----- | - | zh-cn | zh | en | +| 简体 | 繁體 | EN | +| ----- | ------ | ----- | +| zh-cn | zh | en | `, }; diff --git a/lib/routes/openrice/voting.ts b/lib/routes/openrice/voting.ts index 1f3179852161..40cddfde0a1b 100644 --- a/lib/routes/openrice/voting.ts +++ b/lib/routes/openrice/voting.ts @@ -12,14 +12,14 @@ export const route: Route = { name: 'OpenRice 開飯熱店 - 年度餐廳投票', description: ` lang: 语言,见下方列表 - | 简体 | 繁體 | EN | - | ----- | ------ | ----- | - | zh-cn | zh | en | +| 简体 | 繁體 | EN | +| ----- | ------ | ----- | +| zh-cn | zh | en | categoryKey: 部分类别,见下方列表 (更多的类别可以在页面的link中对照获取) - | 中菜館 | 上海菜 | 粵菜 | 川菜 | 港式 | 粥粉麵店 | 廚師發辦 | 韓國菜 | 泰國菜 | 越南菜 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | chinese | shanghainese | guangdong | sichuan | hkstyle | congee_noodles | omakase | korean | thai | vietnamese | +| 中菜館 | 上海菜 | 粵菜 | 川菜 | 港式 | 粥粉麵店 | 廚師發辦 | 韓國菜 | 泰國菜 | 越南菜 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| chinese | shanghainese | guangdong | sichuan | hkstyle | congee_noodles | omakase | korean | thai | vietnamese | `, }; diff --git a/lib/routes/oreno3d/main.ts b/lib/routes/oreno3d/main.ts index 33ecf7aaa4b4..b43a60c8438a 100644 --- a/lib/routes/oreno3d/main.ts +++ b/lib/routes/oreno3d/main.ts @@ -56,8 +56,8 @@ export const route: Route = { maintainers: ['xueli_sherryli'], handler, description: `| favorites | hot | latest | popularity | - | --------- | --- | ------ | ---------- | - | favorites | hot | latest | popularity |`, +| --------- | --- | ------ | ---------- | +| favorites | hot | latest | popularity |`, }; async function handler(ctx) { diff --git a/lib/routes/oschina/column.ts b/lib/routes/oschina/column.ts index 2ba4a476ffe9..7a72c2881a9d 100644 --- a/lib/routes/oschina/column.ts +++ b/lib/routes/oschina/column.ts @@ -191,7 +191,7 @@ export const route: Route = { :::
- 更多专栏 +更多专栏 | 名称 | ID | | --------------- | --- | diff --git a/lib/routes/oschina/news.ts b/lib/routes/oschina/news.ts index 23783d52c089..29ad7c1548a1 100644 --- a/lib/routes/oschina/news.ts +++ b/lib/routes/oschina/news.ts @@ -58,8 +58,8 @@ export const route: Route = { maintainers: ['tgly307', 'zengxs'], handler, description: `| [综合资讯][osc_gen] | [软件更新资讯][osc_proj] | [行业资讯][osc_ind] | [编程语言资讯][osc_pl] | - | ------------------- | ------------------------ | ------------------- | ---------------------- | - | industry | project | industry-news | programming | +| ------------------- | ------------------------ | ------------------- | ---------------------- | +| industry | project | industry-news | programming | 订阅 [全部板块资讯][osc_all] 可以使用 [https://rsshub.app/oschina/news](https://rsshub.app/oschina/news) diff --git a/lib/routes/ouc/it-tx.ts b/lib/routes/ouc/it-tx.ts index 88290eec2723..c63c228b2d0b 100644 --- a/lib/routes/ouc/it-tx.ts +++ b/lib/routes/ouc/it-tx.ts @@ -28,8 +28,8 @@ export const route: Route = { handler, url: 'it.ouc.edu.cn/', description: `| 新闻动态 | 学院活动 | 奖助工作获奖情况 | - | -------- | -------- | ---------------- | - | xwdt | tzgg | 21758 |`, +| -------- | -------- | ---------------- | +| xwdt | tzgg | 21758 |`, }; async function handler(ctx) { diff --git a/lib/routes/ouc/it.ts b/lib/routes/ouc/it.ts index 507fbe06cf46..23bacb0aaeeb 100644 --- a/lib/routes/ouc/it.ts +++ b/lib/routes/ouc/it.ts @@ -28,8 +28,8 @@ export const route: Route = { handler, url: 'it.ouc.edu.cn/', description: `| 学院要闻 | 学院公告 | 学院活动 | - | -------- | -------- | -------- | - | 0 | 1 | 2 |`, +| -------- | -------- | -------- | +| 0 | 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/panewslab/profundity.ts b/lib/routes/panewslab/profundity.ts index f2cdac8c793e..98a57d57db5f 100644 --- a/lib/routes/panewslab/profundity.ts +++ b/lib/routes/panewslab/profundity.ts @@ -34,7 +34,7 @@ export const route: Route = { handler, url: 'panewslab.com/', description: `| 精选 | 链游 | 元宇宙 | NFT | DeFi | 监管 | 央行数字货币 | 波卡 | Layer 2 | DAO | 融资 | 活动 | - | ---- | ---- | ------ | --- | ---- | ---- | ------------ | ---- | ------- | --- | ---- | ---- |`, +| ---- | ---- | ------ | --- | ---- | ---- | ------------ | ---- | ------- | --- | ---- | ---- |`, }; async function handler(ctx) { diff --git a/lib/routes/papers/index.ts b/lib/routes/papers/index.ts index a8257ba358d2..83eb1112ba9b 100644 --- a/lib/routes/papers/index.ts +++ b/lib/routes/papers/index.ts @@ -87,13 +87,13 @@ export const route: Route = { If you subscribe to [arXiv Artificial Intelligence (cs.AI)](https://papers.cool/arxiv/cs.AI), where the URL is \`https://papers.cool/arxiv/cs.AI\`, extract the part \`https://papers.cool/\` to the end, and use it as the parameter to fill in. Therefore, the route will be [\`/papers/arxiv/cs.AI\`](https://rsshub.app/papers/arxiv/cs.AI). ::: - | Category | id | - | ----------------------------------------------------- | ----------- | - | arXiv Artificial Intelligence (cs.AI) | arxiv/cs.AI | - | arXiv Computation and Language (cs.CL) | arxiv/cs.CL | - | arXiv Computer Vision and Pattern Recognition (cs.CV) | arxiv/cs.CV | - | arXiv Machine Learning (cs.LG) | arxiv/cs.LG | - | arXiv Robotics (cs.RO) | arxiv/cs.RO | +| Category | id | +| ----------------------------------------------------- | ----------- | +| arXiv Artificial Intelligence (cs.AI) | arxiv/cs.AI | +| arXiv Computation and Language (cs.CL) | arxiv/cs.CL | +| arXiv Computer Vision and Pattern Recognition (cs.CV) | arxiv/cs.CV | +| arXiv Machine Learning (cs.LG) | arxiv/cs.LG | +| arXiv Robotics (cs.RO) | arxiv/cs.RO | `, categories: ['journal'], diff --git a/lib/routes/papers/query.ts b/lib/routes/papers/query.ts index ff243b4aec0e..57eb4be9c094 100644 --- a/lib/routes/papers/query.ts +++ b/lib/routes/papers/query.ts @@ -86,10 +86,10 @@ export const route: Route = { If you subscibe to [arXiv Paper queryed by Detection](https://papers.cool/arxiv/search?highlight=1&query=Detection), where the URL is \`https://papers.cool/arxiv/search?highlight=1&query=Detection\`, extract the part \`https://papers.cool/\` to the end, and use it as the parameter to fill in. Therefore, the route will be [\`/papers/query/Detection\`](https://rsshub.app/papers/query/Detection). ::: - | Category | id | - | ----------------------------------------------------- | ------------------- | - | arXiv Paper queryed by Detection | query/Detection | - | arXiv Paper queryed by Segmentation | query/Segmentation | +| Category | id | +| ----------------------------------------------------- | ------------------- | +| arXiv Paper queryed by Detection | query/Detection | +| arXiv Paper queryed by Segmentation | query/Segmentation | `, categories: ['journal'], diff --git a/lib/routes/parliament.uk/petitions.ts b/lib/routes/parliament.uk/petitions.ts index 1d89231ac39c..95eec47353c9 100644 --- a/lib/routes/parliament.uk/petitions.ts +++ b/lib/routes/parliament.uk/petitions.ts @@ -99,7 +99,7 @@ If you subscribe to [Recent petitions](https://petition.parliament.uk/petitions? :::
- More states +More states | Name | ID | | ------------------------------- | ----------------- | diff --git a/lib/routes/parliament/section77.ts b/lib/routes/parliament/section77.ts index 3e14ee208257..dcc140e279f5 100644 --- a/lib/routes/parliament/section77.ts +++ b/lib/routes/parliament/section77.ts @@ -22,9 +22,9 @@ export const route: Route = { maintainers: ['itpcc'], handler, description: `| Presented by MP \* | Presented by People \* | Hearing Ongoing | Hearing ended | Hearing result reported | Waiting for PM approval | Assigned into the session | Processed | PM Rejected | - | ------------------------ | ---------------------- | ------------------- | --------------- | ------------------------ | ----------------------- | ------------------------- | ---------- | ------------- | - | presentbymp | presentbyperson | openwsu | closewsu | reportwsu | substatus1 | substatus2 | substatus3 | closewsubypm | - | เสนอโดยสมาชิกสภาผู้แทนราษฏร | เสนอโดยประชาชน | กำลังเปิดรับฟังความคิดเห็น | ปิดรับฟังความคิดเห็น | รายงานผลการรับฟังความคิดเห็น | รอคำรับรองจากนายกรัฐมนตรี | บรรจุเข้าระเบียบวาระ | พิจารณาแล้ว | นายกฯ ไม่รับรอง | +| ------------------------ | ---------------------- | ------------------- | --------------- | ------------------------ | ----------------------- | ------------------------- | ---------- | ------------- | +| presentbymp | presentbyperson | openwsu | closewsu | reportwsu | substatus1 | substatus2 | substatus3 | closewsubypm | +| เสนอโดยสมาชิกสภาผู้แทนราษฏร | เสนอโดยประชาชน | กำลังเปิดรับฟังความคิดเห็น | ปิดรับฟังความคิดเห็น | รายงานผลการรับฟังความคิดเห็น | รอคำรับรองจากนายกรัฐมนตรี | บรรจุเข้าระเบียบวาระ | พิจารณาแล้ว | นายกฯ ไม่รับรอง | *Note:* For \`presentbymp\` and \`presentbyperson\`, it can also add: diff --git a/lib/routes/patagonia/new-arrivals.ts b/lib/routes/patagonia/new-arrivals.ts index a5768bfc1cf1..09a1b7a50065 100644 --- a/lib/routes/patagonia/new-arrivals.ts +++ b/lib/routes/patagonia/new-arrivals.ts @@ -36,8 +36,8 @@ export const route: Route = { maintainers: [], handler, description: `| Men's | Women's | Kids' & Baby | Packs & Gear | - | ----- | ------- | ------------ | ------------ | - | mens | womens | kids | luggage |`, +| ----- | ------- | ------------ | ------------ | +| mens | womens | kids | luggage |`, }; async function handler(ctx) { diff --git a/lib/routes/people/liuyan.ts b/lib/routes/people/liuyan.ts index 29ba22582f4f..ab3cbb6f72b6 100644 --- a/lib/routes/people/liuyan.ts +++ b/lib/routes/people/liuyan.ts @@ -27,8 +27,8 @@ export const route: Route = { handler, url: 'liuyan.people.com.cn/', description: `| 全部 | 待回复 | 办理中 | 已办理 | - | ---- | ------ | ------ | ------ | - | 1 | 2 | 3 | 4 |`, +| ---- | ------ | ------ | ------ | +| 1 | 2 | 3 | 4 |`, }; async function handler(ctx) { diff --git a/lib/routes/peopo/topic.ts b/lib/routes/peopo/topic.ts index 874723103274..1043ac759e6d 100644 --- a/lib/routes/peopo/topic.ts +++ b/lib/routes/peopo/topic.ts @@ -29,24 +29,24 @@ export const route: Route = { maintainers: [], handler, description: `| 分類 | ID | - | -------- | --- | - | 社會關懷 | 159 | - | 生態環保 | 113 | - | 文化古蹟 | 143 | - | 社區改造 | 160 | - | 教育學習 | 161 | - | 農業 | 163 | - | 生活休閒 | 162 | - | 媒體觀察 | 164 | - | 運動科技 | 165 | - | 政治經濟 | 166 | - | 北台灣 | 223 | - | 中台灣 | 224 | - | 南台灣 | 225 | - | 東台灣 | 226 | - | 校園中心 | 167 | - | 原住民族 | 227 | - | 天然災害 | 168 |`, +| -------- | --- | +| 社會關懷 | 159 | +| 生態環保 | 113 | +| 文化古蹟 | 143 | +| 社區改造 | 160 | +| 教育學習 | 161 | +| 農業 | 163 | +| 生活休閒 | 162 | +| 媒體觀察 | 164 | +| 運動科技 | 165 | +| 政治經濟 | 166 | +| 北台灣 | 223 | +| 中台灣 | 224 | +| 南台灣 | 225 | +| 東台灣 | 226 | +| 校園中心 | 167 | +| 原住民族 | 227 | +| 天然災害 | 168 |`, }; async function handler(ctx) { diff --git a/lib/routes/pingwest/tag.ts b/lib/routes/pingwest/tag.ts index 8f6232af134f..21630ecb523d 100644 --- a/lib/routes/pingwest/tag.ts +++ b/lib/routes/pingwest/tag.ts @@ -22,9 +22,9 @@ export const route: Route = { handler, description: `内容类型 - | 最新 | 热门 | - | ---- | ---- | - | 1 | 2 | +| 最新 | 热门 | +| ---- | ---- | +| 1 | 2 | 参数 diff --git a/lib/routes/pingwest/user.ts b/lib/routes/pingwest/user.ts index 9b815d8d2793..907b28e5a8f7 100644 --- a/lib/routes/pingwest/user.ts +++ b/lib/routes/pingwest/user.ts @@ -28,9 +28,9 @@ export const route: Route = { handler, description: `内容类型 - | 文章 | 动态 | - | ------- | ----- | - | article | state | +| 文章 | 动态 | +| ------- | ----- | +| article | state | 参数 diff --git a/lib/routes/pku/scc/recruit.ts b/lib/routes/pku/scc/recruit.ts index 9248466e7fdd..94050606740c 100644 --- a/lib/routes/pku/scc/recruit.ts +++ b/lib/routes/pku/scc/recruit.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['DylanXie123'], handler, description: `| xwrd | tzgg | zpxx | sxxx | cyxx | - | -------- | -------- | -------- | -------- | -------- | - | 新闻热点 | 通知公告 | 招聘信息 | 实习信息 | 创业信息 |`, +| -------- | -------- | -------- | -------- | -------- | +| 新闻热点 | 通知公告 | 招聘信息 | 实习信息 | 创业信息 |`, }; async function handler(ctx) { diff --git a/lib/routes/playno1/av.ts b/lib/routes/playno1/av.ts index c23706f51016..2aa82c5b9ea5 100644 --- a/lib/routes/playno1/av.ts +++ b/lib/routes/playno1/av.ts @@ -27,9 +27,9 @@ export const route: Route = { 目前观测到该博客可能禁止日本 IP 访问。建议部署在日本区以外的服务器上。 ::: - | 全部文章 | AV 新聞 | AV 導覽 | - | -------- | ------- | ------- | - | 78 | 3 | 5 |`, +| 全部文章 | AV 新聞 | AV 導覽 | +| -------- | ------- | ------- | +| 78 | 3 | 5 |`, }; async function handler(ctx) { diff --git a/lib/routes/playno1/st.ts b/lib/routes/playno1/st.ts index 5261557aafdb..bda62fa98cd3 100644 --- a/lib/routes/playno1/st.ts +++ b/lib/routes/playno1/st.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 全部文章 | 情趣體驗報告 | 情趣新聞 | 情趣研究所 | - | -------- | ------------ | -------- | ---------- | - | all | experience | news | graduate |`, +| -------- | ------------ | -------- | ---------- | +| all | experience | news | graduate |`, }; async function handler(ctx) { diff --git a/lib/routes/plurk/top.ts b/lib/routes/plurk/top.ts index 61e643b8ee6b..710ee464668d 100644 --- a/lib/routes/plurk/top.ts +++ b/lib/routes/plurk/top.ts @@ -24,12 +24,12 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| Top Replurks | Top Favorites | Top Responded | - | ------------ | ------------- | ------------- | - | topReplurks | topFavorites | topResponded | +| ------------ | ------------- | ------------- | +| topReplurks | topFavorites | topResponded | - | English | 中文(繁體) | - | ------- | ------------ | - | en | zh |`, +| English | 中文(繁體) | +| ------- | ------------ | +| en | zh |`, }; async function handler(ctx) { diff --git a/lib/routes/priconne-redive/news.ts b/lib/routes/priconne-redive/news.ts index 278885b82314..1c6b57779183 100644 --- a/lib/routes/priconne-redive/news.ts +++ b/lib/routes/priconne-redive/news.ts @@ -37,9 +37,9 @@ export const route: Route = { url: 'priconne-redive.jp/news', description: `服务器 - | 国服 | 台服 | 日服 | - | ----- | ----- | ---- | - | zh-cn | zh-tw | jp |`, +| 国服 | 台服 | 日服 | +| ----- | ----- | ---- | +| zh-cn | zh-tw | jp |`, }; async function handler(ctx) { diff --git a/lib/routes/qianzhan/column.ts b/lib/routes/qianzhan/column.ts index c72318da966b..e6acc15c0844 100644 --- a/lib/routes/qianzhan/column.ts +++ b/lib/routes/qianzhan/column.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['moke8'], handler, description: `| 全部 | 研究员专栏 | 规划师专栏 | 观察家专栏 | - | ---- | ---------- | ---------- | ---------- | - | all | 220 | 627 | 329 |`, +| ---- | ---------- | ---------- | ---------- | +| all | 220 | 627 | 329 |`, }; async function handler(ctx) { diff --git a/lib/routes/qianzhan/rank.ts b/lib/routes/qianzhan/rank.ts index f8500a53c96e..d3099afc045b 100644 --- a/lib/routes/qianzhan/rank.ts +++ b/lib/routes/qianzhan/rank.ts @@ -29,8 +29,8 @@ export const route: Route = { handler, url: 'qianzhan.com/analyst', description: `| 周排行 | 月排行 | - | ------ | ------ | - | week | month |`, +| ------ | ------ | +| week | month |`, }; async function handler(ctx) { diff --git a/lib/routes/qiche365/recall.ts b/lib/routes/qiche365/recall.ts index eda92e94b514..882a93019f6d 100644 --- a/lib/routes/qiche365/recall.ts +++ b/lib/routes/qiche365/recall.ts @@ -12,8 +12,8 @@ export const route: Route = { example: '/qiche365/recall/1', parameters: { channel: '频道,见下表' }, description: `| 国内召回新闻 | 国内召回公告 | 国外召回新闻 | 国外召回公告 | - | ------------ | ------------ | ------------ | ------------ | - | 1 | 2 | 3 | 4 |`, +| ------------ | ------------ | ------------ | ------------ | +| 1 | 2 | 3 | 4 |`, categories: ['government'], maintainers: ['huanfe1'], handler, diff --git a/lib/routes/qm120/news.ts b/lib/routes/qm120/news.ts index 9660a8a74f88..5be2a794d5de 100644 --- a/lib/routes/qm120/news.ts +++ b/lib/routes/qm120/news.ts @@ -28,16 +28,16 @@ export const route: Route = { handler, url: 'qm120.com/', description: `| 健康焦点 | 行业动态 | 医学前沿 | 法规动态 | - | -------- | -------- | -------- | -------- | - | jdxw | hydt | yxqy | fgdt | +| -------- | -------- | -------- | -------- | +| jdxw | hydt | yxqy | fgdt | - | 食品安全 | 医疗事故 | 医药会展 | 医药信息 | - | -------- | -------- | -------- | -------- | - | spaq | ylsg | yyhz | yyxx | +| 食品安全 | 医疗事故 | 医药会展 | 医药信息 | +| -------- | -------- | -------- | -------- | +| spaq | ylsg | yyhz | yyxx | - | 新闻专题 | 行业新闻 | - | -------- | -------- | - | zhuanti | xyxw |`, +| 新闻专题 | 行业新闻 | +| -------- | -------- | +| zhuanti | xyxw |`, }; async function handler(ctx) { diff --git a/lib/routes/qoo-app/apps/comment.ts b/lib/routes/qoo-app/apps/comment.ts index 9ca645da860f..a90d74956b59 100644 --- a/lib/routes/qoo-app/apps/comment.ts +++ b/lib/routes/qoo-app/apps/comment.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 中文 | English | 한국어 | Español | 日本語 | ไทย | Tiếng Việt | - | ---- | ------- | ------ | ------- | ------ | --- | ---------- | - | | en | ko | es | ja | th | vi |`, +| ---- | ------- | ------ | ------- | ------ | --- | ---------- | +| | en | ko | es | ja | th | vi |`, }; async function handler(ctx) { diff --git a/lib/routes/qoo-app/news.ts b/lib/routes/qoo-app/news.ts index 068a8e102f8c..6c39b1626b1d 100644 --- a/lib/routes/qoo-app/news.ts +++ b/lib/routes/qoo-app/news.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 中文 | English | - | ---- | ------- | - | | en |`, +| ---- | ------- | +| | en |`, }; async function handler(ctx) { diff --git a/lib/routes/qq/ac/rank.ts b/lib/routes/qq/ac/rank.ts index ceba72396b32..4e21a3fdd458 100644 --- a/lib/routes/qq/ac/rank.ts +++ b/lib/routes/qq/ac/rank.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 月票榜 | 飙升榜 | 新作榜 | 畅销榜 | TOP100 | 男生榜 | 女生榜 | - | ------ | ------ | ------ | ------ | ------ | ------ | ------ | - | mt | rise | new | pay | top | male | female | +| ------ | ------ | ------ | ------ | ------ | ------ | ------ | +| mt | rise | new | pay | top | male | female | ::: tip \`time\` 参数仅在 \`type\` 参数选为 **月票榜** 的时候生效。 diff --git a/lib/routes/qq/cfhd/index.ts b/lib/routes/qq/cfhd/index.ts index 7ee969c57607..826ec9a951d4 100644 --- a/lib/routes/qq/cfhd/index.ts +++ b/lib/routes/qq/cfhd/index.ts @@ -91,13 +91,13 @@ export const route: Route = { 若订阅 [穿越火线 CFHD 专区资讯中心 - 最新](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/60847/m22510/list_1.shtml),网址为 \`https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/60847/m22510/list_1.shtml\`。截取 \`https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/\` 到末尾 \`/m22510/list_1.shtml\` 的部分 \`60847\` 作为参数填入,此时路由为 [\`/qq/cfhd/news/60847\`](https://rsshub.app/qq/cfhd/news/60847)。 ::: - | 分类 | ID | - | ----------------------------------------------------------------------------------------------------- | --------------------------------------------- | - | [最新](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/60847/m22510/list_1.shtml) | [60847](https://rsshub.app/qq/cfhd/news/60847) | - | [公告](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/59625/m22510/list_1.shtml) | [59625](https://rsshub.app/qq/cfhd/news/59625) | - | [版本](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/60850/m22510/list_1.shtml) | [60850](https://rsshub.app/qq/cfhd/news/60850) | - | [赛事](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/59626/m22510/list_1.shtml) | [59626](https://rsshub.app/qq/cfhd/news/59626) | - | [杂谈](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/59624/m22510/list_1.shtml) | [59624](https://rsshub.app/qq/cfhd/news/59624) | +| 分类 | ID | +| ----------------------------------------------------------------------------------------------------- | --------------------------------------------- | +| [最新](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/60847/m22510/list_1.shtml) | [60847](https://rsshub.app/qq/cfhd/news/60847) | +| [公告](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/59625/m22510/list_1.shtml) | [59625](https://rsshub.app/qq/cfhd/news/59625) | +| [版本](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/60850/m22510/list_1.shtml) | [60850](https://rsshub.app/qq/cfhd/news/60850) | +| [赛事](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/59626/m22510/list_1.shtml) | [59626](https://rsshub.app/qq/cfhd/news/59626) | +| [杂谈](https://cfhd.cf.qq.com/webplat/info/news_version3/37427/59139/59140/59624/m22510/list_1.shtml) | [59624](https://rsshub.app/qq/cfhd/news/59624) | `, categories: ['game'], diff --git a/lib/routes/qq88/index.ts b/lib/routes/qq88/index.ts index 72d352f3ac92..e02e1e48ff3f 100644 --- a/lib/routes/qq88/index.ts +++ b/lib/routes/qq88/index.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 首页 | オトナの土ドラ | 日剧 | 日剧 SP | - | ---- | -------------- | ---- | ------- | - | | 10 | 5 | 11 |`, +| ---- | -------------- | ---- | ------- | +| | 10 | 5 | 11 |`, }; async function handler(ctx) { diff --git a/lib/routes/qqorw/index.ts b/lib/routes/qqorw/index.ts index 9438026d0c6c..b485e7ff0b15 100644 --- a/lib/routes/qqorw/index.ts +++ b/lib/routes/qqorw/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 首页 | 每日早报 | 国际早报 | 生活冷知识 | - | ---- | -------- | -------- | ---------- | - | | mrzb | zbapp | zbzzd |`, +| ---- | -------- | -------- | ---------- | +| | mrzb | zbapp | zbzzd |`, }; async function handler(ctx) { diff --git a/lib/routes/questmobile/report.ts b/lib/routes/questmobile/report.ts index 1b3d03bfd518..176d36595b26 100644 --- a/lib/routes/questmobile/report.ts +++ b/lib/routes/questmobile/report.ts @@ -56,105 +56,105 @@ export const route: Route = { 参数 industry 为 \`品牌领域\` 或 \`2\`,参数 label 为 \`互联网经济\` 或 \`1\`,此时路由为 [\`/questmobile/report/品牌领域/互联网经济\`](https://rsshub.app/questmobile/report/品牌领域/互联网经济) 或 [\`/questmobile/report/2/1\`](https://rsshub.app/questmobile/report/2/1),甚至 [\`/questmobile/report/品牌领域/1\`](https://rsshub.app/questmobile/report/品牌领域/1)。 ::: -
- 全部行业和标签 +
+全部行业和标签 - #### 行业 +#### 行业 - | 互联网行业 | 移动社交 | 移动视频 | 移动购物 | 系统工具 | - | ---------- | -------- | -------- | -------- | -------- | - | 1 | 1001 | 1002 | 1003 | 1004 | +| 互联网行业 | 移动社交 | 移动视频 | 移动购物 | 系统工具 | +| ---------- | -------- | -------- | -------- | -------- | +| 1 | 1001 | 1002 | 1003 | 1004 | - | 出行服务 | 金融理财 | 生活服务 | 移动音乐 | 新闻资讯 | - | -------- | -------- | -------- | -------- | -------- | - | 1005 | 1006 | 1007 | 1008 | 1009 | +| 出行服务 | 金融理财 | 生活服务 | 移动音乐 | 新闻资讯 | +| -------- | -------- | -------- | -------- | -------- | +| 1005 | 1006 | 1007 | 1008 | 1009 | - | 办公商务 | 手机游戏 | 实用工具 | 数字阅读 | 教育学习 | - | -------- | -------- | -------- | -------- | -------- | - | 1010 | 1011 | 1012 | 1013 | 1014 | +| 办公商务 | 手机游戏 | 实用工具 | 数字阅读 | 教育学习 | +| -------- | -------- | -------- | -------- | -------- | +| 1010 | 1011 | 1012 | 1013 | 1014 | - | 汽车服务 | 拍摄美化 | 智能设备 | 旅游服务 | 健康美容 | - | -------- | -------- | -------- | -------- | -------- | - | 1015 | 1016 | 1017 | 1018 | 1020 | +| 汽车服务 | 拍摄美化 | 智能设备 | 旅游服务 | 健康美容 | +| -------- | -------- | -------- | -------- | -------- | +| 1015 | 1016 | 1017 | 1018 | 1020 | - | 育儿母婴 | 主题美化 | 医疗服务 | 品牌领域 | 美妆品牌 | - | -------- | -------- | -------- | -------- | -------- | - | 1022 | 1023 | 1024 | 2 | 2001 | +| 育儿母婴 | 主题美化 | 医疗服务 | 品牌领域 | 美妆品牌 | +| -------- | -------- | -------- | -------- | -------- | +| 1022 | 1023 | 1024 | 2 | 2001 | - | 母婴品牌 | 家电品牌 | 食品饮料品牌 | 汽车品牌 | 服饰箱包品牌 | - | -------- | -------- | ------------ | -------- | ------------ | - | 2002 | 2003 | 2004 | 2005 | 2006 | +| 母婴品牌 | 家电品牌 | 食品饮料品牌 | 汽车品牌 | 服饰箱包品牌 | +| -------- | -------- | ------------ | -------- | ------------ | +| 2002 | 2003 | 2004 | 2005 | 2006 | - #### 标签 +#### 标签 - | 互联网经济 | 圈层经济 | 粉丝经济 | 银发经济 | 儿童经济 | - | ---------- | -------- | -------- | -------- | -------- | - | 1 | 1001 | 1002 | 1004 | 1005 | +| 互联网经济 | 圈层经济 | 粉丝经济 | 银发经济 | 儿童经济 | +| ---------- | -------- | -------- | -------- | -------- | +| 1 | 1001 | 1002 | 1004 | 1005 | - | 萌宠经济 | 她经济 | 他经济 | 泛娱乐经济 | 下沉市场经济 | - | -------- | ------ | ------ | ---------- | ------------ | - | 1007 | 1009 | 1010 | 1011 | 1012 | +| 萌宠经济 | 她经济 | 他经济 | 泛娱乐经济 | 下沉市场经济 | +| -------- | ------ | ------ | ---------- | ------------ | +| 1007 | 1009 | 1010 | 1011 | 1012 | - | 内容经济 | 订阅经济 | 会员经济 | 居家经济 | 到家经济 | - | -------- | -------- | -------- | -------- | -------- | - | 1013 | 1014 | 1015 | 1016 | 1017 | +| 内容经济 | 订阅经济 | 会员经济 | 居家经济 | 到家经济 | +| -------- | -------- | -------- | -------- | -------- | +| 1013 | 1014 | 1015 | 1016 | 1017 | - | 颜值经济 | 闲置经济 | 旅游经济 | 人群洞察 | 00 后 | - | -------- | -------- | ------------------- | -------- | ----- | - | 1018 | 1020 | 1622842051677753346 | 2 | 2002 | +| 颜值经济 | 闲置经济 | 旅游经济 | 人群洞察 | 00 后 | +| -------- | -------- | ------------------- | -------- | ----- | +| 1018 | 1020 | 1622842051677753346 | 2 | 2002 | - | Z 世代 | 银发族 | 宝妈宝爸 | 萌宠人群 | 运动达人 | - | ------ | ------ | -------- | -------- | -------- | - | 2003 | 2004 | 2005 | 2007 | 2008 | +| Z 世代 | 银发族 | 宝妈宝爸 | 萌宠人群 | 运动达人 | +| ------ | ------ | -------- | -------- | -------- | +| 2003 | 2004 | 2005 | 2007 | 2008 | - | 女性消费 | 男性消费 | 游戏人群 | 二次元 | 新中产 | - | -------- | -------- | -------- | ------ | ------ | - | 2009 | 2010 | 2012 | 2013 | 2014 | +| 女性消费 | 男性消费 | 游戏人群 | 二次元 | 新中产 | +| -------- | -------- | -------- | ------ | ------ | +| 2009 | 2010 | 2012 | 2013 | 2014 | - | 下沉市场用户 | 大学生 | 数字化营销 | 广告效果 | 品牌营销 | - | ------------ | ------ | ---------- | -------- | -------- | - | 2018 | 2022 | 3 | 3001 | 3002 | +| 下沉市场用户 | 大学生 | 数字化营销 | 广告效果 | 品牌营销 | +| ------------ | ------ | ---------- | -------- | -------- | +| 2018 | 2022 | 3 | 3001 | 3002 | - | 全域营销 | 私域流量 | 新媒体营销 | KOL 生态 | 内容营销 | - | -------- | -------- | ---------- | -------- | -------- | - | 3003 | 3004 | 3005 | 3006 | 3008 | +| 全域营销 | 私域流量 | 新媒体营销 | KOL 生态 | 内容营销 | +| -------- | -------- | ---------- | -------- | -------- | +| 3003 | 3004 | 3005 | 3006 | 3008 | - | 直播电商 | 短视频带货 | 娱乐营销 | 营销热点 | 双 11 电商大促 | - | -------- | ---------- | ------------------- | -------- | -------------- | - | 3009 | 3010 | 1630464311158738945 | 4 | 4001 | +| 直播电商 | 短视频带货 | 娱乐营销 | 营销热点 | 双 11 电商大促 | +| -------- | ---------- | ------------------- | -------- | -------------- | +| 3009 | 3010 | 1630464311158738945 | 4 | 4001 | - | 618 电商大促 | 春节营销 | 五一假期营销 | 热点事件盘点 | 消费热点 | - | ------------ | -------- | ------------ | ------------ | -------- | - | 4002 | 4003 | 4004 | 4007 | 5 | +| 618 电商大促 | 春节营销 | 五一假期营销 | 热点事件盘点 | 消费热点 | +| ------------ | -------- | ------------ | ------------ | -------- | +| 4002 | 4003 | 4004 | 4007 | 5 | - | 时尚品牌 | 连锁餐饮 | 新式茶饮 | 智能家电 | 国潮品牌 | - | -------- | -------- | -------- | -------- | -------- | - | 5001 | 5002 | 5003 | 5004 | 5007 | +| 时尚品牌 | 连锁餐饮 | 新式茶饮 | 智能家电 | 国潮品牌 | +| -------- | -------- | -------- | -------- | -------- | +| 5001 | 5002 | 5003 | 5004 | 5007 | - | 白酒品牌 | 精益运营 | 媒介策略 | 用户争夺 | 精细化运营 | - | ------------------- | -------- | -------- | -------- | ---------- | - | 1622841828310093825 | 6 | 6001 | 6002 | 6003 | +| 白酒品牌 | 精益运营 | 媒介策略 | 用户争夺 | 精细化运营 | +| ------------------- | -------- | -------- | -------- | ---------- | +| 1622841828310093825 | 6 | 6001 | 6002 | 6003 | - | 用户分层 | 增长黑马 | 社交裂变 | 新兴领域 | 新能源汽车 | - | -------- | -------- | -------- | -------- | ---------- | - | 6004 | 6005 | 6007 | 7 | 7001 | +| 用户分层 | 增长黑马 | 社交裂变 | 新兴领域 | 新能源汽车 | +| -------- | -------- | -------- | -------- | ---------- | +| 6004 | 6005 | 6007 | 7 | 7001 | - | 智能汽车 | 新消费 | AIoT | 产业互联网 | AIGC | - | -------- | ------ | ---- | ---------- | ------------------- | - | 7002 | 7003 | 7004 | 7005 | 1645677998450511873 | +| 智能汽车 | 新消费 | AIoT | 产业互联网 | AIGC | +| -------- | ------ | ---- | ---------- | ------------------- | +| 7002 | 7003 | 7004 | 7005 | 1645677998450511873 | - | OTT 应用 | 智能电视 | 全景数据 | 全景生态 | 微信小程序 | - | ------------------- | ------------------- | -------- | -------- | ---------- | - | 1676063510499528705 | 1676063630293045249 | 8 | 8001 | 8002 | +| OTT 应用 | 智能电视 | 全景数据 | 全景生态 | 微信小程序 | +| ------------------- | ------------------- | -------- | -------- | ---------- | +| 1676063510499528705 | 1676063630293045249 | 8 | 8001 | 8002 | - | 支付宝小程序 | 百度智能小程序 | 企业流量 | 抖音小程序 | 手机终端 | - | ------------ | -------------- | ------------------- | ------------------- | -------- | - | 8003 | 8004 | 1671052842096496642 | 1676063017220018177 | 9 | +| 支付宝小程序 | 百度智能小程序 | 企业流量 | 抖音小程序 | 手机终端 | +| ------------ | -------------- | ------------------- | ------------------- | -------- | +| 8003 | 8004 | 1671052842096496642 | 1676063017220018177 | 9 | - | 智能终端 | 国产终端 | 5G 手机 | 盘点 | 季度报告 | - | -------- | -------- | ------- | ---- | -------- | - | 9001 | 9002 | 9003 | 10 | 10001 | -
`, +| 智能终端 | 国产终端 | 5G 手机 | 盘点 | 季度报告 | +| -------- | -------- | ------- | ---- | -------- | +| 9001 | 9002 | 9003 | 10 | 10001 | +
`, }; async function handler(ctx) { diff --git a/lib/routes/quicker/qa.ts b/lib/routes/quicker/qa.ts index c99584e65370..4f1b418d1810 100644 --- a/lib/routes/quicker/qa.ts +++ b/lib/routes/quicker/qa.ts @@ -23,23 +23,23 @@ export const route: Route = { handler, description: `分类 - | 使用问题 | 动作开发 | BUG 反馈 | 功能建议 | - | -------- | -------- | -------- | -------- | - | 1 | 9 | 3 | 4 | +| 使用问题 | 动作开发 | BUG 反馈 | 功能建议 | +| -------- | -------- | -------- | -------- | +| 1 | 9 | 3 | 4 | - | 动作需求 | 经验创意 | 动作推荐 | 信息发布 | - | -------- | -------- | -------- | -------- | - | 6 | 2 | 7 | 5 | +| 动作需求 | 经验创意 | 动作推荐 | 信息发布 | +| -------- | -------- | -------- | -------- | +| 6 | 2 | 7 | 5 | - | 随便聊聊 | 异常报告 | 全部 | - | -------- | -------- | ---- | - | 8 | 10 | all | +| 随便聊聊 | 异常报告 | 全部 | +| -------- | -------- | ---- | +| 8 | 10 | all | 状态 - | 全部 | 精华 | 已归档 | - | ---- | ------ | ------- | - | | digest | achived |`, +| 全部 | 精华 | 已归档 | +| ---- | ------ | ------- | +| | digest | achived |`, }; async function handler(ctx) { diff --git a/lib/routes/quicker/share.ts b/lib/routes/quicker/share.ts index 15fa089921b1..f8a73ddef648 100644 --- a/lib/routes/quicker/share.ts +++ b/lib/routes/quicker/share.ts @@ -27,12 +27,12 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 动作库最新更新 | 动作库最多赞 | 动作库新动作 | 动作库最近赞 | - | -------------- | ------------ | ------------ | ------------ | - | Recent | Recommended | NewActions | RecentLiked | +| -------------- | ------------ | ------------ | ------------ | +| Recent | Recommended | NewActions | RecentLiked | - | 子程序 | 扩展热键 | 文本指令 | - | ----------- | --------- | ------------ | - | SubPrograms | PowerKeys | TextCommands |`, +| 子程序 | 扩展热键 | 文本指令 | +| ----------- | --------- | ------------ | +| SubPrograms | PowerKeys | TextCommands |`, }; async function handler(ctx) { diff --git a/lib/routes/quicker/user.ts b/lib/routes/quicker/user.ts index ee987652bfa0..25a6a526f4fe 100644 --- a/lib/routes/quicker/user.ts +++ b/lib/routes/quicker/user.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['Cesaryuan', 'nczitzk'], handler, description: `| 动作 | 子程序 | 动作单 | - | ------- | ----------- | ----------- | - | Actions | SubPrograms | ActionLists |`, +| ------- | ----------- | ----------- | +| Actions | SubPrograms | ActionLists |`, }; async function handler(ctx) { diff --git a/lib/routes/radio-canada/latest.ts b/lib/routes/radio-canada/latest.ts index d8d99bde3a3c..7c44933f56f7 100644 --- a/lib/routes/radio-canada/latest.ts +++ b/lib/routes/radio-canada/latest.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| Français | English | Español | 简体中文 | 繁體中文 | العربية | ਪੰਜਾਬੀ | Tagalog | - | -------- | ------- | ------- | -------- | -------- | ------- | --- | ------- | - | fr | en | es | zh-hans | zh-hant | ar | pa | tl |`, +| -------- | ------- | ------- | -------- | -------- | ------- | --- | ------- | +| fr | en | es | zh-hans | zh-hant | ar | pa | tl |`, }; async function handler(ctx) { diff --git a/lib/routes/readhub/index.ts b/lib/routes/readhub/index.ts index 4016532f8008..b6a0c257c3df 100644 --- a/lib/routes/readhub/index.ts +++ b/lib/routes/readhub/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['WhiteWorld', 'nczitzk', 'Fatpandac'], handler, description: `| 热门话题 | 科技动态 | 医疗产业 | 财经快讯 | - | -------- | -------- | -------- | ------------------ | - | | news | medical | financial\_express |`, +| -------- | -------- | -------- | ------------------ | +| | news | medical | financial\_express |`, }; async function handler(ctx) { diff --git a/lib/routes/rodong/news.ts b/lib/routes/rodong/news.ts index eb7856417581..07258ceef144 100644 --- a/lib/routes/rodong/news.ts +++ b/lib/routes/rodong/news.ts @@ -30,8 +30,8 @@ export const route: Route = { handler, url: 'rodong.rep.kp/cn/index.php', description: `| 조선어 | English | 中文 | - | ------ | ------- | ---- | - | ko | en | cn |`, +| ------ | ------- | ---- | +| ko | en | cn |`, }; async function handler(ctx) { diff --git a/lib/routes/rsc/journal.ts b/lib/routes/rsc/journal.ts index e479118a7afe..7354846d374d 100644 --- a/lib/routes/rsc/journal.ts +++ b/lib/routes/rsc/journal.ts @@ -30,9 +30,9 @@ export const route: Route = { All journals at [Current journals](https://pubs.rsc.org/en/journals) ::: - | All Recent Articles | Advance Articles | - | ------------------- | ---------------- | - | allrecentarticles | advancearticles |`, +| All Recent Articles | Advance Articles | +| ------------------- | ---------------- | +| allrecentarticles | advancearticles |`, }; async function handler(ctx) { diff --git a/lib/routes/rsshub/transform/html.ts b/lib/routes/rsshub/transform/html.ts index 96e463d65b25..af1d6471bab6 100644 --- a/lib/routes/rsshub/transform/html.ts +++ b/lib/routes/rsshub/transform/html.ts @@ -47,16 +47,16 @@ Specify options (in the format of query string) in parameter \`routeParams\` par Parameters parsing in the above example: - | Parameter | Value | - | ------------- | ----------------------------------------- | - | \`url\` | \`https://wechat2rss.xlab.app/posts/list/\` | - | \`routeParams\` | \`item=div[class='post-content'] p a\` | +| Parameter | Value | +| ------------- | ----------------------------------------- | +| \`url\` | \`https://wechat2rss.xlab.app/posts/list/\` | +| \`routeParams\` | \`item=div[class='post-content'] p a\` | Parsing of \`routeParams\` parameter: - | Parameter | Value | - | --------- | ------------------------------- | - | \`item\` | \`div[class='post-content'] p a\` |`, +| Parameter | Value | +| --------- | ------------------------------- | +| \`item\` | \`div[class='post-content'] p a\` |`, handler: async (ctx) => { if (!config.feature.allow_user_supply_unsafe_domain) { throw new ConfigNotFoundError(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`); diff --git a/lib/routes/rsshub/transform/json.ts b/lib/routes/rsshub/transform/json.ts index 6ce4b6cce676..09d1af6019ed 100644 --- a/lib/routes/rsshub/transform/json.ts +++ b/lib/routes/rsshub/transform/json.ts @@ -55,19 +55,19 @@ JSON Path only supports format like \`a.b.c\`. if you need to access arrays, lik Parameters parsing in the above example: - | Parameter | Value | - | ------------- | ------------------------------------------------------------------------ | - | \`url\` | \`https://api.github.com/repos/ginuerzh/gost/releases\` | - | \`routeParams\` | \`title=Gost releases&itemTitle=tag_name&itemLink=html_url&itemDesc=body\` | +| Parameter | Value | +| ------------- | ------------------------------------------------------------------------ | +| \`url\` | \`https://api.github.com/repos/ginuerzh/gost/releases\` | +| \`routeParams\` | \`title=Gost releases&itemTitle=tag_name&itemLink=html_url&itemDesc=body\` | Parsing of \`routeParams\` parameter: - | Parameter | Value | - | ----------- | --------------- | - | \`title\` | \`Gost releases\` | - | \`itemTitle\` | \`tag_name\` | - | \`itemLink\` | \`html_url\` | - | \`itemDesc\` | \`body\` |`, +| Parameter | Value | +| ----------- | --------------- | +| \`title\` | \`Gost releases\` | +| \`itemTitle\` | \`tag_name\` | +| \`itemLink\` | \`html_url\` | +| \`itemDesc\` | \`body\` |`, }; async function handler(ctx) { diff --git a/lib/routes/sakurazaka46/blog.ts b/lib/routes/sakurazaka46/blog.ts index f3c3061c96aa..2bc756d95bac 100644 --- a/lib/routes/sakurazaka46/blog.ts +++ b/lib/routes/sakurazaka46/blog.ts @@ -23,42 +23,42 @@ export const route: Route = { handler, description: `Member ID - | Member ID | Name | - | --------- | ------------ | - | 2000 | 三期生リレー | - | 69 | 山下 瞳月 | - | 68 | 村山 美羽 | - | 67 | 村井 優 | - | 66 | 向井 純葉 | - | 65 | 的野 美青 | - | 64 | 中嶋 優月 | - | 63 | 谷口 愛季 | - | 62 | 小島 凪紗 | - | 61 | 小田倉 麗奈 | - | 60 | 遠藤 理子 | - | 59 | 石森 璃花 | - | 58 | 守屋 麗奈 | - | 57 | 増本 綺良 | - | 56 | 幸阪 茉里乃 | - | 55 | 大沼 晶保 | - | 54 | 大園 玲 | - | 53 | 遠藤 光莉 | - | 51 | 山﨑 天 | - | 50 | 森田 ひかる | - | 48 | 松田 里奈 | - | 47 | 藤吉 夏鈴 | - | 46 | 田村 保乃 | - | 45 | 武元 唯衣 | - | 44 | 関 有美子 | - | 43 | 井上 梨名 | - | 15 | 原田 葵 | - | 14 | 土生 瑞穂 | - | 11 | 菅井 友香 | - | 08 | 齋藤 冬優花 | - | 07 | 小林 由依 | - | 06 | 小池 美波 | - | 04 | 尾関 梨香 | - | 03 | 上村 莉菜 |`, +| Member ID | Name | +| --------- | ------------ | +| 2000 | 三期生リレー | +| 69 | 山下 瞳月 | +| 68 | 村山 美羽 | +| 67 | 村井 優 | +| 66 | 向井 純葉 | +| 65 | 的野 美青 | +| 64 | 中嶋 優月 | +| 63 | 谷口 愛季 | +| 62 | 小島 凪紗 | +| 61 | 小田倉 麗奈 | +| 60 | 遠藤 理子 | +| 59 | 石森 璃花 | +| 58 | 守屋 麗奈 | +| 57 | 増本 綺良 | +| 56 | 幸阪 茉里乃 | +| 55 | 大沼 晶保 | +| 54 | 大園 玲 | +| 53 | 遠藤 光莉 | +| 51 | 山﨑 天 | +| 50 | 森田 ひかる | +| 48 | 松田 里奈 | +| 47 | 藤吉 夏鈴 | +| 46 | 田村 保乃 | +| 45 | 武元 唯衣 | +| 44 | 関 有美子 | +| 43 | 井上 梨名 | +| 15 | 原田 葵 | +| 14 | 土生 瑞穂 | +| 11 | 菅井 友香 | +| 08 | 齋藤 冬優花 | +| 07 | 小林 由依 | +| 06 | 小池 美波 | +| 04 | 尾関 梨香 | +| 03 | 上村 莉菜 |`, }; async function handler(ctx) { diff --git a/lib/routes/sara/index.ts b/lib/routes/sara/index.ts index 055a5e2a86ba..53ad1de1812c 100644 --- a/lib/routes/sara/index.ts +++ b/lib/routes/sara/index.ts @@ -23,8 +23,8 @@ export const route: Route = { supportScihub: false, }, description: `| 协会动态 | 通知公告 |行业动态 | - | -------- | ------------ | -------- | - | dynamic | announcement | industry |`, +| -------- | ------------ | -------- | +| dynamic | announcement | industry |`, name: '新闻资讯', maintainers: ['HChenZi'], diff --git a/lib/routes/sass/gs/index.ts b/lib/routes/sass/gs/index.ts index 507ba1181e94..6400849adcf2 100644 --- a/lib/routes/sass/gs/index.ts +++ b/lib/routes/sass/gs/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['yanbot-team'], handler, description: `| 硕士统考招生 | 硕士推免招生 | - | ------------ | ------------ | - | 1793 | sstmzs |`, +| ------------ | ------------ | +| 1793 | sstmzs |`, }; async function handler(ctx) { diff --git a/lib/routes/science/current.ts b/lib/routes/science/current.ts index 6d74a64d9c4b..759421fc4851 100644 --- a/lib/routes/science/current.ts +++ b/lib/routes/science/current.ts @@ -37,13 +37,13 @@ export const route: Route = { maintainers: ['y9c', 'TonyRL'], handler, description: `| Short name | Full name of the journal | Route | - | :---------: | :----------------------------: | ------------------------------------------------------------------------------ | - | science | Science | [/science/current/science](https://rsshub.app/science/current/science) | - | sciadv | Science Advances | [/science/current/sciadv](https://rsshub.app/science/current/sciadv) | - | sciimmunol | Science Immunology | [/science/current/sciimmunol](https://rsshub.app/science/current/sciimmunol) | - | scirobotics | Science Robotics | [/science/current/scirobotics](https://rsshub.app/science/current/scirobotics) | - | signaling | Science Signaling | [/science/current/signaling](https://rsshub.app/science/current/signaling) | - | stm | Science Translational Medicine | [/science/current/stm](https://rsshub.app/science/current/stm) | +| :---------: | :----------------------------: | ------------------------------------------------------------------------------ | +| science | Science | [/science/current/science](https://rsshub.app/science/current/science) | +| sciadv | Science Advances | [/science/current/sciadv](https://rsshub.app/science/current/sciadv) | +| sciimmunol | Science Immunology | [/science/current/sciimmunol](https://rsshub.app/science/current/sciimmunol) | +| scirobotics | Science Robotics | [/science/current/scirobotics](https://rsshub.app/science/current/scirobotics) | +| signaling | Science Signaling | [/science/current/signaling](https://rsshub.app/science/current/signaling) | +| stm | Science Translational Medicine | [/science/current/stm](https://rsshub.app/science/current/stm) | - Using route (\`/science/current/\` + "short name for a journal") to get current issue of a journal from AAAS. - Leaving it empty (\`/science/current\`) to get update from Science.`, diff --git a/lib/routes/sciencenet/blog.ts b/lib/routes/sciencenet/blog.ts index c6d43419d5d9..af867f18aab9 100644 --- a/lib/routes/sciencenet/blog.ts +++ b/lib/routes/sciencenet/blog.ts @@ -24,21 +24,21 @@ export const route: Route = { handler, description: `类型 - | 精选 | 最新 | 热门 | - | --------- | ---- | ---- | - | recommend | new | hot | +| 精选 | 最新 | 热门 | +| --------- | ---- | ---- | +| recommend | new | hot | 时间 - | 36 小时内精选博文 | 一周内精选博文 | 一月内精选博文 | 半年内精选博文 | 所有时间精选博文 | - | ----------------- | -------------- | -------------- | -------------- | ---------------- | - | 1 | 2 | 3 | 4 | 5 | +| 36 小时内精选博文 | 一周内精选博文 | 一月内精选博文 | 半年内精选博文 | 所有时间精选博文 | +| ----------------- | -------------- | -------------- | -------------- | ---------------- | +| 1 | 2 | 3 | 4 | 5 | 排序 - | 按发表时间排序 | 按评论数排序 | 按点击数排序 | - | -------------- | ------------ | ------------ | - | 1 | 2 | 3 |`, +| 按发表时间排序 | 按评论数排序 | 按点击数排序 | +| -------------- | ------------ | ------------ | +| 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/sctv/programme.ts b/lib/routes/sctv/programme.ts index 9e3bc21f4eb7..4115037f9d6f 100644 --- a/lib/routes/sctv/programme.ts +++ b/lib/routes/sctv/programme.ts @@ -31,53 +31,53 @@ export const route: Route = { 查看更多电视节目请前往 [电视回放](https://www.sctv.com/column/list) ::: - | 节目 | id | - | ---------------------- | ------- | - | 四川新闻联播 | 1 | - | 早安四川 | 2 | - | 今日视点 | 3 | - | 龙门阵摆四川 | 10523 | - | 非常话题 | 1014756 | - | 新闻现场 | 8385 | - | 黄金三十分 | 8386 | - | 全媒直播间 | 8434 | - | 晚报十点半 | 8435 | - | 现场快报 | 8436 | - | 四川乡村新闻 | 3673 | - | 四川文旅报道 | 8174 | - | 乡村会客厅 | 3674 | - | 金字招牌 | 3675 | - | 问您所 “?” | 3677 | - | 蜀你最能 | 3679 | - | 美丽乡村印象 | 3678 | - | 美丽乡村 | 3676 | - | 乡村大篷车 | 3680 | - | 华西论健 | 3681 | - | 乡村聚乐部 | 3682 | - | 医保近距离 | 6403 | - | 音你而来 | 7263 | - | 吃八方 | 7343 | - | 世界那么大 | 7344 | - | 风云川商 | 7345 | - | 麻辣烫 | 7346 | - | 财经快报 | 7473 | - | 医生来了 | 7873 | - | 安逸的旅途 | 8383 | - | 运动 + | 8433 | - | 好戏连台 | 9733 | - | 防癌大讲堂 | 1018673 | - | 消费新观察 | 1017153 | - | 天天耍大牌 | 1014753 | - | 廉洁四川 | 1014754 | - | 看世界 | 1014755 | - | 金熊猫说教育(资讯版) | 1014757 | - | 她说 | 1014759 | - | 嗨宝贝 | 1014762 | - | 萌眼看世界 | 1014764 | - | 乡村大讲堂 | 1014765 | - | 四川党建 | 1014766 | - | 健康四川 | 1014767 | - | 技能四川 | 12023 |`, +| 节目 | id | +| ---------------------- | ------- | +| 四川新闻联播 | 1 | +| 早安四川 | 2 | +| 今日视点 | 3 | +| 龙门阵摆四川 | 10523 | +| 非常话题 | 1014756 | +| 新闻现场 | 8385 | +| 黄金三十分 | 8386 | +| 全媒直播间 | 8434 | +| 晚报十点半 | 8435 | +| 现场快报 | 8436 | +| 四川乡村新闻 | 3673 | +| 四川文旅报道 | 8174 | +| 乡村会客厅 | 3674 | +| 金字招牌 | 3675 | +| 问您所 “?” | 3677 | +| 蜀你最能 | 3679 | +| 美丽乡村印象 | 3678 | +| 美丽乡村 | 3676 | +| 乡村大篷车 | 3680 | +| 华西论健 | 3681 | +| 乡村聚乐部 | 3682 | +| 医保近距离 | 6403 | +| 音你而来 | 7263 | +| 吃八方 | 7343 | +| 世界那么大 | 7344 | +| 风云川商 | 7345 | +| 麻辣烫 | 7346 | +| 财经快报 | 7473 | +| 医生来了 | 7873 | +| 安逸的旅途 | 8383 | +| 运动 + | 8433 | +| 好戏连台 | 9733 | +| 防癌大讲堂 | 1018673 | +| 消费新观察 | 1017153 | +| 天天耍大牌 | 1014753 | +| 廉洁四川 | 1014754 | +| 看世界 | 1014755 | +| 金熊猫说教育(资讯版) | 1014757 | +| 她说 | 1014759 | +| 嗨宝贝 | 1014762 | +| 萌眼看世界 | 1014764 | +| 乡村大讲堂 | 1014765 | +| 四川党建 | 1014766 | +| 健康四川 | 1014767 | +| 技能四川 | 12023 |`, }; async function handler(ctx) { diff --git a/lib/routes/scut/gzic/notice.ts b/lib/routes/scut/gzic/notice.ts index 994926090547..ce55a124f4ce 100644 --- a/lib/routes/scut/gzic/notice.ts +++ b/lib/routes/scut/gzic/notice.ts @@ -29,8 +29,8 @@ export const route: Route = { maintainers: ['gdzhht'], handler, description: `| 学术预告 | 教研通知 | 海外学习 | 事务通知 | - | -------- | -------- | -------- | -------- | - | xsyg | jytz | hwxx | swtz | +| -------- | -------- | -------- | -------- | +| xsyg | jytz | hwxx | swtz | ::: warning 由于学校网站对非大陆 IP 的访问存在限制,可能需自行部署。 diff --git a/lib/routes/scut/jwc/notice.ts b/lib/routes/scut/jwc/notice.ts index 3be1efc2d366..0dd85213c7d3 100644 --- a/lib/routes/scut/jwc/notice.ts +++ b/lib/routes/scut/jwc/notice.ts @@ -72,8 +72,8 @@ export const route: Route = { maintainers: ['imkero'], handler, description: `| 全部 | 选课 | 考试 | 实践 | 交流 | 教师 | 信息 | - | ---- | ------ | ---- | -------- | ------------- | ------- | ---- | - | all | course | exam | practice | communication | teacher | info |`, +| ---- | ------ | ---- | -------- | ------------- | ------- | ---- | +| all | course | exam | practice | communication | teacher | info |`, }; async function handler(ctx) { diff --git a/lib/routes/scut/jwc/school.ts b/lib/routes/scut/jwc/school.ts index 3fc24a533afd..8e2c46200586 100644 --- a/lib/routes/scut/jwc/school.ts +++ b/lib/routes/scut/jwc/school.ts @@ -69,8 +69,8 @@ export const route: Route = { maintainers: ['imkero', 'Rongronggg9'], handler, description: `| 全部 | 选课 | 考试 | 信息 | - | ---- | ------ | ---- | ---- | - | all | course | exam | info |`, +| ---- | ------ | ---- | ---- | +| all | course | exam | info |`, }; async function handler(ctx) { diff --git a/lib/routes/scut/smae/notice.ts b/lib/routes/scut/smae/notice.ts index e534261cce7c..206ca57ce861 100644 --- a/lib/routes/scut/smae/notice.ts +++ b/lib/routes/scut/smae/notice.ts @@ -32,8 +32,8 @@ export const route: Route = { maintainers: ['Ermaotie'], handler, description: `| 公务信息 | 党建工作 | 人事工作 | 学生工作 | 科研实验室 | 本科生教务 | 研究生教务 | - | -------- | -------- | -------- | -------- | ---------- | ---------- | ---------- | - | gwxx | djgz | rsgz | xsgz | kysys | bksjw | yjsjw |`, +| -------- | -------- | -------- | -------- | ---------- | ---------- | ---------- | +| gwxx | djgz | rsgz | xsgz | kysys | bksjw | yjsjw |`, }; async function handler(ctx) { diff --git a/lib/routes/sdu/cmse.ts b/lib/routes/sdu/cmse.ts index 6cdc04292c2a..b057db57fb77 100644 --- a/lib/routes/sdu/cmse.ts +++ b/lib/routes/sdu/cmse.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['Ji4n1ng'], handler, description: `| 通知公告 | 学院新闻 | 本科生教育 | 研究生教育 | 学术动态 | - | -------- | -------- | ---------- | ---------- | -------- | - | 0 | 1 | 2 | 3 | 4 |`, +| -------- | -------- | ---------- | ---------- | -------- | +| 0 | 1 | 2 | 3 | 4 |`, }; async function handler(ctx) { diff --git a/lib/routes/sdu/epe.ts b/lib/routes/sdu/epe.ts index 82ee1992d91b..d52e5e5001a6 100644 --- a/lib/routes/sdu/epe.ts +++ b/lib/routes/sdu/epe.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['Ji4n1ng'], handler, description: `| 学院动态 | 通知公告 | 学术论坛 | - | -------- | -------- | -------- | - | 0 | 1 | 2 |`, +| -------- | -------- | -------- | +| 0 | 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/sdu/gjsw.ts b/lib/routes/sdu/gjsw.ts index 3aaaa82ebcac..27d2ef4f685e 100644 --- a/lib/routes/sdu/gjsw.ts +++ b/lib/routes/sdu/gjsw.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['kukeya'], handler, description: `| 通知公告 | - | -------- | - | tzgg | `, +| -------- | +| tzgg | `, }; async function handler(ctx) { diff --git a/lib/routes/sdu/mech.ts b/lib/routes/sdu/mech.ts index 02b37de813ca..e4be28000ecc 100644 --- a/lib/routes/sdu/mech.ts +++ b/lib/routes/sdu/mech.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['Ji4n1ng'], handler, description: `| 通知公告 | 院所新闻 | 教学信息 | 学术动态 | 学院简报 | - | -------- | -------- | -------- | -------- | -------- | - | 0 | 1 | 2 | 3 | 4 |`, +| -------- | -------- | -------- | -------- | -------- | +| 0 | 1 | 2 | 3 | 4 |`, }; async function handler(ctx) { diff --git a/lib/routes/sdu/qd/xszxqd.ts b/lib/routes/sdu/qd/xszxqd.ts index 347479fa212d..8c75a0ea255a 100644 --- a/lib/routes/sdu/qd/xszxqd.ts +++ b/lib/routes/sdu/qd/xszxqd.ts @@ -47,8 +47,8 @@ export const route: Route = { maintainers: ['kukeya'], handler, description: `| 学团通知-研究生 | 学团通知-本科生 | 学团通知-团学 | 学团通知-心理 | 学团要闻 - | -------- | -------- |-------- |-------- |-------- | - | xttz-yjs | xttz-bks | xttz-tx | xttz-xl | xtyw |`, +| -------- | -------- |-------- |-------- |-------- | +| xttz-yjs | xttz-bks | xttz-tx | xttz-xl | xtyw |`, }; async function handler(ctx) { diff --git a/lib/routes/sdu/qd/xyb.ts b/lib/routes/sdu/qd/xyb.ts index 5128e86817c4..905ebac4b9c0 100644 --- a/lib/routes/sdu/qd/xyb.ts +++ b/lib/routes/sdu/qd/xyb.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['kukeya'], handler, description: `| 工作通知 | - | -------- | - | gztz | `, +| -------- | +| gztz | `, }; async function handler(ctx) { diff --git a/lib/routes/sdu/sc.ts b/lib/routes/sdu/sc.ts index 98ed037dd684..dee998626daa 100644 --- a/lib/routes/sdu/sc.ts +++ b/lib/routes/sdu/sc.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['Ji4n1ng'], handler, description: `| 通知公告 | 学术动态 | 本科教育 | 研究生教育 | - | -------- | -------- | -------- | ---------- | - | 0 | 1 | 2 | 3 |`, +| -------- | -------- | -------- | ---------- | +| 0 | 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/sdu/wh/jwc.ts b/lib/routes/sdu/wh/jwc.ts index 645398d70de6..e33de99dfeb7 100644 --- a/lib/routes/sdu/wh/jwc.ts +++ b/lib/routes/sdu/wh/jwc.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['kxxt'], handler, description: `| 规章制度 | 专业建设 | 实践教学 | 支部风采 | 服务指南 | 教务要闻 | 工作通知 | 教务简报 | 常用下载 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | gzzd | zyjs | sjjx | zbfc | fwzn | jwyw | gztz | jwjb | cyxz |`, +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| gzzd | zyjs | sjjx | zbfc | fwzn | jwyw | gztz | jwjb | cyxz |`, }; async function handler(ctx) { diff --git a/lib/routes/sdu/wh/news.ts b/lib/routes/sdu/wh/news.ts index 94e2fe66cfc9..42b8d7dae2a1 100644 --- a/lib/routes/sdu/wh/news.ts +++ b/lib/routes/sdu/wh/news.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['kxxt'], handler, description: `| 校园要闻 | 学生动态 | 综合新闻 | 山大视点 | 菁菁校园 | 校园简讯 | 玛珈之窗 | 热点专题 | 媒体视角 | 高教视野 | 理论学习 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | xyyw | xsdt | zhxw | sdsd | jjxy | xyjx | mjzc | rdzt | mtsj | gjsy | llxx |`, +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| xyyw | xsdt | zhxw | sdsd | jjxy | xyjx | mjzc | rdzt | mtsj | gjsy | llxx |`, }; async function handler(ctx) { diff --git a/lib/routes/sdu/ygb.ts b/lib/routes/sdu/ygb.ts index 3a64226b70d0..56e99782e6da 100644 --- a/lib/routes/sdu/ygb.ts +++ b/lib/routes/sdu/ygb.ts @@ -39,8 +39,8 @@ export const route: Route = { maintainers: ['kukeya'], handler, description: `| 重要通知 | 管理服务 | 创新实践 | - | -------- | -------- |-------- | - | zytz | glfw | cxsj | `, +| -------- | -------- |-------- | +| zytz | glfw | cxsj | `, }; async function handler(ctx) { diff --git a/lib/routes/sdust/yjsy/zhaosheng.ts b/lib/routes/sdust/yjsy/zhaosheng.ts index dae4baa9996a..c033d6ca7a60 100644 --- a/lib/routes/sdust/yjsy/zhaosheng.ts +++ b/lib/routes/sdust/yjsy/zhaosheng.ts @@ -22,13 +22,13 @@ export const route: Route = { handler, description: `栏目 - | 招生简章 | 专业目录 | 往届录取 | 管理规定 | 资料下载 | - | -------- | -------- | -------- | -------- | -------- | - | zsjz | zyml | wjlq | glgd | zlxz | +| 招生简章 | 专业目录 | 往届录取 | 管理规定 | 资料下载 | +| -------- | -------- | -------- | -------- | -------- | +| zsjz | zyml | wjlq | glgd | zlxz | - | 通知公告 | 博士招生 | 硕士招生 | 推免生招生 | 招生宣传 | - | -------- | -------- | -------- | ---------- | -------- | - | tzgg | bszs | sszs | tms | zsxc |`, +| 通知公告 | 博士招生 | 硕士招生 | 推免生招生 | 招生宣传 | +| -------- | -------- | -------- | ---------- | -------- | +| tzgg | bszs | sszs | tms | zsxc |`, }; async function handler(ctx) { diff --git a/lib/routes/seekingalpha/index.ts b/lib/routes/seekingalpha/index.ts index e1f2fad9168b..51b11d4efa36 100644 --- a/lib/routes/seekingalpha/index.ts +++ b/lib/routes/seekingalpha/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| Analysis | News | Transcripts | Press Releases | Related Analysis | - | -------- | ---- | ----------- | -------------- | ---------------- | - | analysis | news | transcripts | press-releases | related-analysis |`, +| -------- | ---- | ----------- | -------------- | ---------------- | +| analysis | news | transcripts | press-releases | related-analysis |`, }; const getMachineCookie = () => diff --git a/lib/routes/sehuatang/index.ts b/lib/routes/sehuatang/index.ts index fa5cdea75463..17467d694d4d 100644 --- a/lib/routes/sehuatang/index.ts +++ b/lib/routes/sehuatang/index.ts @@ -48,15 +48,15 @@ export const route: Route = { handler, description: `**原创 BT 电影** - | 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 | - | -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- | - | gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl | +| 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | VR 视频 | 素人有码 | 欧美无码 | 韩国主播 | 动漫原创 | 综合讨论 | +| -------- | ------------ | ------------ | ------------ | -------- | ------- | -------- | -------- | -------- | -------- | -------- | +| gcyc | yzwmyc | yzymyc | gqzwzm | sjxz | vr | srym | omwm | hgzb | dmyc | zhtl | **色花图片** - | 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz |`, +| 原创自拍 | 转贴自拍 | 华人街拍 | 亚洲性爱 | 欧美性爱 | 卡通动漫 | 套图下载 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| yczp | ztzp | hrjp | yzxa | omxa | ktdm | ttxz |`, }; async function handler(ctx) { diff --git a/lib/routes/sensortower/blog.ts b/lib/routes/sensortower/blog.ts index 7bc1a161270b..bec9f9c2c1a5 100644 --- a/lib/routes/sensortower/blog.ts +++ b/lib/routes/sensortower/blog.ts @@ -33,8 +33,8 @@ export const route: Route = { handler, url: 'sensortower.com/blog', description: `| English | Chinese | Japanese | Korean | - | ------- | ------- | -------- | ------ | - | | zh-CN | ja | ko |`, +| ------- | ------- | -------- | ------ | +| | zh-CN | ja | ko |`, }; async function handler(ctx) { diff --git a/lib/routes/setn/index.ts b/lib/routes/setn/index.ts index 6b30d1b9faad..63ab5dc92ea2 100644 --- a/lib/routes/setn/index.ts +++ b/lib/routes/setn/index.ts @@ -67,16 +67,16 @@ export const route: Route = { handler, url: 'setn.com/ViewAll.aspx', description: `| 即時 | 熱門 | 娛樂 | 政治 | 社會 | - | ---- | ---- | ---- | ---- | ---- | +| ---- | ---- | ---- | ---- | ---- | - | 國際 | 兩岸 | 生活 | 健康 | 旅遊 | - | ---- | ---- | ---- | ---- | ---- | +| 國際 | 兩岸 | 生活 | 健康 | 旅遊 | +| ---- | ---- | ---- | ---- | ---- | - | 運動 | 地方 | 財經 | 富房網 | 名家 | - | ---- | ---- | ---- | ------ | ---- | +| 運動 | 地方 | 財經 | 富房網 | 名家 | +| ---- | ---- | ---- | ------ | ---- | - | 新奇 | 科技 | 汽車 | 寵物 | 女孩 | HOT 焦點 | - | ---- | ---- | ---- | ---- | ---- | -------- |`, +| 新奇 | 科技 | 汽車 | 寵物 | 女孩 | HOT 焦點 | +| ---- | ---- | ---- | ---- | ---- | -------- |`, }; async function handler(ctx) { diff --git a/lib/routes/seu/cse/index.ts b/lib/routes/seu/cse/index.ts index 35524343a791..27925e2c69cf 100644 --- a/lib/routes/seu/cse/index.ts +++ b/lib/routes/seu/cse/index.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['LogicJake'], handler, description: `| 学院新闻 | 通知公告 | 教务信息 | 就业信息 | 学工事务 | - | -------- | -------- | -------- | -------- | -------- | - | xyxw | tzgg | jwxx | jyxx | xgsw |`, +| -------- | -------- | -------- | -------- | -------- | +| xyxw | tzgg | jwxx | jyxx | xgsw |`, }; async function handler(ctx) { diff --git a/lib/routes/seu/yzb/index.ts b/lib/routes/seu/yzb/index.ts index 44578a06e93b..57aed72cbb4f 100644 --- a/lib/routes/seu/yzb/index.ts +++ b/lib/routes/seu/yzb/index.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['fuzy112'], handler, description: `| 硕士招生 | 博士招生 | 港澳台及中外合作办学 | - | -------- | -------- | -------------------- | - | 6676 | 6677 | 6679 |`, +| -------- | -------- | -------------------- | +| 6676 | 6677 | 6679 |`, }; async function handler(ctx) { diff --git a/lib/routes/shiep/index.ts b/lib/routes/shiep/index.ts index 90f4cb467a83..a962a7c6522d 100644 --- a/lib/routes/shiep/index.ts +++ b/lib/routes/shiep/index.ts @@ -26,31 +26,31 @@ export const route: Route = { 学院一览: - | 能源与机械工程学院 | 环境与化学工程学院 | 电气工程学院 | 自动化工程学院 | 计算机科学与技术学院 | 电子与信息工程学院 | 经济与管理学院 | 数理学院 | 外国语学院 | 体育学院 | 马克思主义学院 | 人文艺术学院 | 继续教育学院(国际教育学院) | 海上风电研究院 | - | ------------------ | ------------------ | ------------ | -------------- | -------------------- | ------------------ | -------------- | -------- | ---------- | -------- | -------------- | ------------ | ---------------------------- | -------------- | - | energy | hhxy | dqxy | zdhxy | jsjxy | dxxy | jgxy | slxy | wgyxy | tyb | skb | rwysxy | jjxy | hsfdyjy | - | 892 | 5559 | 2462 | 2002 | xygg | tzgg | 3633 | 2063 | tzgg | 2891 | 1736 | 3089 | 2582 | 5748 | +| 能源与机械工程学院 | 环境与化学工程学院 | 电气工程学院 | 自动化工程学院 | 计算机科学与技术学院 | 电子与信息工程学院 | 经济与管理学院 | 数理学院 | 外国语学院 | 体育学院 | 马克思主义学院 | 人文艺术学院 | 继续教育学院(国际教育学院) | 海上风电研究院 | +| ------------------ | ------------------ | ------------ | -------------- | -------------------- | ------------------ | -------------- | -------- | ---------- | -------- | -------------- | ------------ | ---------------------------- | -------------- | +| energy | hhxy | dqxy | zdhxy | jsjxy | dxxy | jgxy | slxy | wgyxy | tyb | skb | rwysxy | jjxy | hsfdyjy | +| 892 | 5559 | 2462 | 2002 | xygg | tzgg | 3633 | 2063 | tzgg | 2891 | 1736 | 3089 | 2582 | 5748 | 党群部门: - | 党委办公室 | 组织部(老干部处、党校) | 党建服务中心 / 党建督查室 | 宣传部(文明办、融媒体中心) | 统战部 | 机关党委 | 纪委(监察专员办公室) | 巡查办 | 武装部 | 学生工作部 | 团委 | 工会(妇工委) | 教师工作部 | 离退休党委 | 研究生工作部 | - | ---------- | ------------------------ | ------------------------- | ---------------------------- | ------ | -------- | ---------------------- | --------- | ------ | ---------- | ---- | -------------- | ---------- | ---------- | ------------ | - | dangban | zzb | djfwzxdcs | xcb | tzb | jgdw | jijian | xunchaban | bwc | xsc | tw | gonghui | rsc | tgb | yjsc | - | 4013 | 1534 | tzgg | 2925 | 3858 | 3205 | 59 | 5044 | tzgg | 3482 | 2092 | 1806 | 1695 | notice | 1161 | +| 党委办公室 | 组织部(老干部处、党校) | 党建服务中心 / 党建督查室 | 宣传部(文明办、融媒体中心) | 统战部 | 机关党委 | 纪委(监察专员办公室) | 巡查办 | 武装部 | 学生工作部 | 团委 | 工会(妇工委) | 教师工作部 | 离退休党委 | 研究生工作部 | +| ---------- | ------------------------ | ------------------------- | ---------------------------- | ------ | -------- | ---------------------- | --------- | ------ | ---------- | ---- | -------------- | ---------- | ---------- | ------------ | +| dangban | zzb | djfwzxdcs | xcb | tzb | jgdw | jijian | xunchaban | bwc | xsc | tw | gonghui | rsc | tgb | yjsc | +| 4013 | 1534 | tzgg | 2925 | 3858 | 3205 | 59 | 5044 | tzgg | 3482 | 2092 | 1806 | 1695 | notice | 1161 | 行政部门: - | 校长办公室(档案馆) | 对外联络处 | 发展规划处 | 审计处 | 保卫处 | 学生处 | 人事处 | 退管办 | 国际交流与合作处(港澳台办公室) | 科研处 / 融合办 | 教务处 | 研究生院 | 后勤管理处(后勤服务中心) | 实验室与资产管理处 | 基建处 | 临港新校区建设综合办公室 | 图书馆 | 现代教育技术中心 / 信息办 | 创新创业工程训练中心 | 资产经营公司 / 产业办 | 能源电力科创中心 | 技术转移中心 | - | -------------------- | ---------- | ---------- | ------ | ------ | ------ | ------ | ------ | -------------------------------- | --------------- | ------ | -------- | -------------------------- | ------------------ | ------ | ------------------------ | ------- | ------------------------- | -------------------- | --------------------- | ---------------- | ------------ | - | office | dwllc | fzghc | sjc | bwc | xsc | rsc | tgb | fao | kyc | jwc | yjsc | hqglc | sysyzcglc | jjc | lgxq | library | metc | ieetc | cyb | kczx | jszyzx | - | 389 | 2649 | 291 | 199 | tzgg | 3482 | 1695 | notice | tzgg | 834 | 227 | 1161 | 1616 | 312 | 327 | 377 | 4866 | tzgg | cxcy | 367 | 3946 | 4247 | +| 校长办公室(档案馆) | 对外联络处 | 发展规划处 | 审计处 | 保卫处 | 学生处 | 人事处 | 退管办 | 国际交流与合作处(港澳台办公室) | 科研处 / 融合办 | 教务处 | 研究生院 | 后勤管理处(后勤服务中心) | 实验室与资产管理处 | 基建处 | 临港新校区建设综合办公室 | 图书馆 | 现代教育技术中心 / 信息办 | 创新创业工程训练中心 | 资产经营公司 / 产业办 | 能源电力科创中心 | 技术转移中心 | +| -------------------- | ---------- | ---------- | ------ | ------ | ------ | ------ | ------ | -------------------------------- | --------------- | ------ | -------- | -------------------------- | ------------------ | ------ | ------------------------ | ------- | ------------------------- | -------------------- | --------------------- | ---------------- | ------------ | +| office | dwllc | fzghc | sjc | bwc | xsc | rsc | tgb | fao | kyc | jwc | yjsc | hqglc | sysyzcglc | jjc | lgxq | library | metc | ieetc | cyb | kczx | jszyzx | +| 389 | 2649 | 291 | 199 | tzgg | 3482 | 1695 | notice | tzgg | 834 | 227 | 1161 | 1616 | 312 | 327 | 377 | 4866 | tzgg | cxcy | 367 | 3946 | 4247 | 其它: - | 新闻网 | 信息公开网 | 本科招生网 | 本科就业信息网 | 文明办 | 学习路上 | “学条例 守党纪”专题网 | 上海新能源人才技术教育交流中心 | 上海绿色能源并网技术研究中心 | 能源电力智库 | 智能发电实验教学中心 | - | ------ | ---------- | ---------- | -------------- | ------- | -------- | --------------------- | ------------------------------ | ---------------------------- | ------------ | -------------------- | - | news | xxgk | zs | career | wenming | ztjy | xxjy | gec | green-energy | nydlzk | spgc | - | notice | zxgkxx | zxxx | tzgg | 2202 | 5575 | 5973 | 1959 | 118 | tzgg | 4449 | +| 新闻网 | 信息公开网 | 本科招生网 | 本科就业信息网 | 文明办 | 学习路上 | “学条例 守党纪”专题网 | 上海新能源人才技术教育交流中心 | 上海绿色能源并网技术研究中心 | 能源电力智库 | 智能发电实验教学中心 | +| ------ | ---------- | ---------- | -------------- | ------- | -------- | --------------------- | ------------------------------ | ---------------------------- | ------------ | -------------------- | +| news | xxgk | zs | career | wenming | ztjy | xxjy | gec | green-energy | nydlzk | spgc | +| notice | zxgkxx | zxxx | tzgg | 2202 | 5575 | 5973 | 1959 | 118 | tzgg | 4449 | 参数与来源页面对应规则为:\`https://\${type}.shiep.edu.cn/\${id}/list.htm\``, }; diff --git a/lib/routes/shisu/news.ts b/lib/routes/shisu/news.ts index 8dcfe9991abb..79b983b9c675 100644 --- a/lib/routes/shisu/news.ts +++ b/lib/routes/shisu/news.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['Duuckjing'], handler, description: `| 首页 | 特稿 | 学术 | 教学 | 国际 | 校园 | 人物 | 视讯 | 公告 | - | ---- | ------- | --------- | ---------- | ------------- | ------ | ------ | ---------- | ------ | - | news | gazette | research- | academics- | international | campus | people | multimedia | notice |`, +| ---- | ------- | --------- | ---------- | ------------- | ------ | ------ | ---------- | ------ | +| news | gazette | research- | academics- | international | campus | people | multimedia | notice |`, }; async function handler(ctx) { diff --git a/lib/routes/shu/global.ts b/lib/routes/shu/global.ts index 88b141a3ea53..553df6619007 100644 --- a/lib/routes/shu/global.ts +++ b/lib/routes/shu/global.ts @@ -33,8 +33,8 @@ export const route: Route = { handler, url: 'global.shu.edu.cn/', description: `| 通知公告 | - | -------- | - | tzgg |`, +| -------- | +| tzgg |`, }; async function handler(ctx) { diff --git a/lib/routes/shu/gs.ts b/lib/routes/shu/gs.ts index a2275fff7c61..9b693ae89c07 100644 --- a/lib/routes/shu/gs.ts +++ b/lib/routes/shu/gs.ts @@ -35,8 +35,8 @@ export const route: Route = { handler, url: 'gs.shu.edu.cn/', description: `| 综合新闻 | 培养管理 | 国际交流 | - | -------- | --------- | --------- | - | zhxw | pygl | gjjl |`, +| -------- | --------- | --------- | +| zhxw | pygl | gjjl |`, }; async function handler(ctx) { diff --git a/lib/routes/shu/index.ts b/lib/routes/shu/index.ts index 4bc6613cd070..abdf79a0b1f2 100644 --- a/lib/routes/shu/index.ts +++ b/lib/routes/shu/index.ts @@ -34,8 +34,8 @@ export const route: Route = { handler, url: 'www.shu.edu.cn/', description: `| 通知公告 | 重要新闻 | - | -------- | --------- | - | tzgg | zyxw |`, +| -------- | --------- | +| tzgg | zyxw |`, }; async function handler(ctx) { diff --git a/lib/routes/shu/jwb.ts b/lib/routes/shu/jwb.ts index 5ea652187e97..61d908777f64 100644 --- a/lib/routes/shu/jwb.ts +++ b/lib/routes/shu/jwb.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['tuxinghuan', 'GhhG123'], handler, description: `| 通知通告 | 新闻 | 政策文件(bug) | - | -------- | ---- | -------- | - | notice | news | policy |`, +| -------- | ---- | -------- | +| notice | news | policy |`, }; async function handler(ctx) { diff --git a/lib/routes/shu/xykd.ts b/lib/routes/shu/xykd.ts index 9c0696c0efd4..15a3cef593ec 100644 --- a/lib/routes/shu/xykd.ts +++ b/lib/routes/shu/xykd.ts @@ -34,8 +34,8 @@ export const route: Route = { handler, url: 'www.shu.edu.cn/', description: `| 文化信息 | 学术报告 | - | -------- | --------- | - | whxx | xsbg |`, +| -------- | --------- | +| whxx | xsbg |`, }; async function handler(ctx) { diff --git a/lib/routes/sicau/dky.ts b/lib/routes/sicau/dky.ts index 8e6d7e739e4b..9c9f7bf02d7b 100644 --- a/lib/routes/sicau/dky.ts +++ b/lib/routes/sicau/dky.ts @@ -28,8 +28,8 @@ export const route: Route = { handler, url: 'dky.sicau.edu.cn/', description: `| 通知公告 | 学院动态 | 教学管理 | 动科大讲堂 | 就业信息 | - | -------- | -------- | -------- | ---------- | -------- | - | tzgg | xydt | jxgl | dkdjt | zpxx |`, +| -------- | -------- | -------- | ---------- | -------- | +| tzgg | xydt | jxgl | dkdjt | zpxx |`, }; async function handler(ctx) { diff --git a/lib/routes/sicau/yan.ts b/lib/routes/sicau/yan.ts index 4b9f75a04e59..07fd45b48e63 100644 --- a/lib/routes/sicau/yan.ts +++ b/lib/routes/sicau/yan.ts @@ -28,8 +28,8 @@ export const route: Route = { handler, url: 'yan.sicau.edu.cn/', description: `| 新闻公告 | 学术报告 | - | -------- | -------- | - | xwgg | xsbg |`, +| -------- | -------- | +| xwgg | xsbg |`, }; async function handler(ctx) { diff --git a/lib/routes/sicau/zsjy.ts b/lib/routes/sicau/zsjy.ts index 131cf6d4c960..1e9db002c835 100644 --- a/lib/routes/sicau/zsjy.ts +++ b/lib/routes/sicau/zsjy.ts @@ -27,8 +27,8 @@ export const route: Route = { handler, url: 'dky.sicau.edu.cn/', description: `| 本科生招生 | 研究生招生 | 毕业生选录指南 | - | ---------- | ---------- | -------------- | - | bkszs | yjszs | bysxlzn |`, +| ---------- | ---------- | -------------- | +| bkszs | yjszs | bysxlzn |`, }; async function handler(ctx) { diff --git a/lib/routes/simpleinfo/index.ts b/lib/routes/simpleinfo/index.ts index 12ee8fd7d050..f091999e41df 100644 --- a/lib/routes/simpleinfo/index.ts +++ b/lib/routes/simpleinfo/index.ts @@ -33,16 +33,16 @@ export const route: Route = { maintainers: ['haukeng'], handler, description: `| 夥伴聊聊 | 專案設計 | - | -------- | -------- | - | work | talk | +| -------- | -------- | +| work | talk | - | 國內外新聞 | 政治百分百 | 社會觀察家 | 心理與哲學 | - | ---------- | ---------- | ---------- | --------------------- | - | news | politics | society | psychology-philosophy | +| 國內外新聞 | 政治百分百 | 社會觀察家 | 心理與哲學 | +| ---------- | ---------- | ---------- | --------------------- | +| news | politics | society | psychology-philosophy | - | 科學大探索 | 環境與健康 | ACG 快樂聊 | 好書籍分享 | 其它主題 | - | ---------- | ------------------ | ---------- | ------------ | ------------ | - | science | environment-health | acg | book-sharing | other-topics |`, +| 科學大探索 | 環境與健康 | ACG 快樂聊 | 好書籍分享 | 其它主題 | +| ---------- | ------------------ | ---------- | ------------ | ------------ | +| science | environment-health | acg | book-sharing | other-topics |`, }; async function handler(ctx) { diff --git a/lib/routes/sina/discovery.ts b/lib/routes/sina/discovery.ts index 6af21973ca41..aa63a2a98941 100644 --- a/lib/routes/sina/discovery.ts +++ b/lib/routes/sina/discovery.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['LogicJake'], handler, description: `| 最新 | 天文航空 | 动物植物 | 自然地理 | 历史考古 | 生命医学 | 生活百科 | 科技前沿 | - | ---- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | zx | twhk | dwzw | zrdl | lskg | smyx | shbk | kjqy |`, +| ---- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| zx | twhk | dwzw | zrdl | lskg | smyx | shbk | kjqy |`, }; async function handler(ctx) { diff --git a/lib/routes/sina/finance/china.ts b/lib/routes/sina/finance/china.ts index 975fb13793b1..6b88d0433df4 100644 --- a/lib/routes/sina/finance/china.ts +++ b/lib/routes/sina/finance/china.ts @@ -26,8 +26,8 @@ export const route: Route = { handler, url: 'finance.sina.com.cn/china', description: `| 国内滚动 | 宏观经济 | 金融新闻 | 地方经济 | 部委动态 | 今日财经 TOP10 | - | -------- | -------- | -------- | -------- | -------- | -------------- | - | 1686 | 1687 | 1690 | 1688 | 1689 | 3231 |`, +| -------- | -------- | -------- | -------- | -------- | -------------- | +| 1686 | 1687 | 1690 | 1688 | 1689 | 3231 |`, }; async function handler(ctx) { diff --git a/lib/routes/sina/finance/stock/usstock.ts b/lib/routes/sina/finance/stock/usstock.ts index ddeed513b00b..251b107ad23f 100644 --- a/lib/routes/sina/finance/stock/usstock.ts +++ b/lib/routes/sina/finance/stock/usstock.ts @@ -28,8 +28,8 @@ export const route: Route = { handler, url: 'finance.sina.com.cn/stock/usstock', description: `| 最新报道 | 中概股 | 国际财经 | 互联网 | - | -------- | ------ | -------- | ------ | - | 57045 | 57046 | 56409 | 40811 |`, +| -------- | ------ | -------- | ------ | +| 57045 | 57046 | 56409 | 40811 |`, }; async function handler(ctx) { diff --git a/lib/routes/sina/rollnews.ts b/lib/routes/sina/rollnews.ts index c0a89efb2ea1..e6af3fa09c59 100644 --- a/lib/routes/sina/rollnews.ts +++ b/lib/routes/sina/rollnews.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: ['xyqfer'], handler, description: `| 全部 | 国内 | 国际 | 社会 | 体育 | 娱乐 | 军事 | 科技 | 财经 | 股市 | 美股 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 2509 | 2510 | 2511 | 2669 | 2512 | 2513 | 2514 | 2515 | 2516 | 2517 | 2518 |`, +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 2509 | 2510 | 2511 | 2669 | 2512 | 2513 | 2514 | 2515 | 2516 | 2517 | 2518 |`, }; async function handler(ctx) { diff --git a/lib/routes/sjtu/gs.ts b/lib/routes/sjtu/gs.ts index bf6c9390375e..4030d2552096 100644 --- a/lib/routes/sjtu/gs.ts +++ b/lib/routes/sjtu/gs.ts @@ -29,20 +29,20 @@ export const route: Route = { maintainers: ['dzx-dzx'], handler, description: `| 工作信息 | 招生信息 | 培养信息 | 学位学科 | 国际交流 | 创新工程 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | work | enroll | train | degree | exchange | xsjy | +| -------- | -------- | -------- | -------- | -------- | -------- | +| work | enroll | train | degree | exchange | xsjy | 当\`type\`为\`enroll\`, \`num\`可选字段: - | 58 | 59 | 60 | 61 | 62 | - | -------- | -------- | ---------- | -------- | -------- | - | 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 | +| 58 | 59 | 60 | 61 | 62 | +| -------- | -------- | ---------- | -------- | -------- | +| 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 | 当\`type\`为\`exchange\`, \`num\`可选字段: - | 67 | 68 | 69 | 70 | 71 | - | -------------- | -------------- | -------------- | -------------- | -------------- | - | 国家公派研究生 | 国际化培养资助 | 校际交换与联培 | 交流与合作项目 | 项目招募与宣讲 |`, +| 67 | 68 | 69 | 70 | 71 | +| -------------- | -------------- | -------------- | -------------- | -------------- | +| 国家公派研究生 | 国际化培养资助 | 校际交换与联培 | 交流与合作项目 | 项目招募与宣讲 |`, }; async function handler(ctx) { diff --git a/lib/routes/sjtu/jwc.ts b/lib/routes/sjtu/jwc.ts index 8b5ab8691279..b320980eb2d1 100644 --- a/lib/routes/sjtu/jwc.ts +++ b/lib/routes/sjtu/jwc.ts @@ -47,8 +47,8 @@ export const route: Route = { maintainers: ['SeanChao'], handler, description: `| 新闻中心 | 通知通告 | 教学运行 | 注册学务 | 研究办 | 教改办 | 综合办 | 语言文字 | 工会与支部 | 通识教育 | 面向学生的通知 | - | -------- | -------- | --------- | -------- | ------ | ------ | ------ | -------- | ---------- | -------- | - | news | notice | operation | affairs | yjb | jgb | zhb | language | party | ge | students |`, +| -------- | -------- | --------- | -------- | ------ | ------ | ------ | -------- | ---------- | -------- | +| news | notice | operation | affairs | yjb | jgb | zhb | language | party | ge | students |`, }; async function handler(ctx) { diff --git a/lib/routes/sjtu/tongqu/activity.ts b/lib/routes/sjtu/tongqu/activity.ts index e730610683cc..890ffbac93d8 100644 --- a/lib/routes/sjtu/tongqu/activity.ts +++ b/lib/routes/sjtu/tongqu/activity.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['SeanChao'], handler, description: `| 全部 | 最新 | 招新 | 讲座 | 户外 | 招聘 | 游学 | 比赛 | 公益 | 主题党日 | 学生事务 | 广告 | 其他 | - | ---- | ------ | ----------- | ------- | --------- | ---- | ---------- | ------------ | -------------- | -------- | -------------- | ---- | ------ | - | all | newest | recruitment | lecture | outdoords | jobs | studyTours | competitions | publicWarefare | partyDay | studentAffairs | ads | others |`, +| ---- | ------ | ----------- | ------- | --------- | ---- | ---------- | ------------ | -------------- | -------- | -------------- | ---- | ------ | +| all | newest | recruitment | lecture | outdoords | jobs | studyTours | competitions | publicWarefare | partyDay | studentAffairs | ads | others |`, }; async function handler(ctx) { diff --git a/lib/routes/sjtu/yzb/zkxx.ts b/lib/routes/sjtu/yzb/zkxx.ts index 0ff8e53ef6ee..ab2ce285e1d4 100644 --- a/lib/routes/sjtu/yzb/zkxx.ts +++ b/lib/routes/sjtu/yzb/zkxx.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['stdrc'], handler, description: `| 博士招生 | 硕士招生 | 港澳台招生 | 考点信息 | 院系动态 | - | -------- | -------- | ---------- | -------- | -------- | - | bszs | sszs | gatzs | kdxx | yxdt |`, +| -------- | -------- | ---------- | -------- | -------- | +| bszs | sszs | gatzs | kdxx | yxdt |`, }; async function handler(ctx) { diff --git a/lib/routes/slowmist/slowmist.ts b/lib/routes/slowmist/slowmist.ts index 86275a8c27ca..eccfb4babe9c 100644 --- a/lib/routes/slowmist/slowmist.ts +++ b/lib/routes/slowmist/slowmist.ts @@ -27,8 +27,8 @@ export const route: Route = { handler, url: 'slowmist.com/zh/news.html', description: `| 公司新闻 | 漏洞披露 | 技术研究 | - | -------- | -------- | -------- | - | news | vul | research |`, +| -------- | -------- | -------- | +| news | vul | research |`, }; async function handler(ctx) { diff --git a/lib/routes/smashingmagazine/category.ts b/lib/routes/smashingmagazine/category.ts index 3137dc8ddbf9..ebf06eb14f66 100644 --- a/lib/routes/smashingmagazine/category.ts +++ b/lib/routes/smashingmagazine/category.ts @@ -28,40 +28,40 @@ export const route: Route = { handler, url: 'smashingmagazine.com/articles/', description: `| **Category** | | - | ------------------ | ------------------ | - | Accessibility | accessibility | - | Best practices | best-practices | - | Business | business | - | Career | career | - | Checklists | checklists | - | CSS | css | - | Data Visualization | data-visualization | - | Design | design | - | Design Patterns | design-patterns | - | Design Systems | design-systems | - | E-Commerce | e-commerce | - | Figma | figma | - | Freebies | freebies | - | HTML | html | - | Illustrator | illustrator | - | Inspiration | inspiration | - | JavaScript | javascript | - | Mobile | mobile | - | Performance | performance | - | Privacy | privacy | - | React | react | - | Responsive Design | responsive-design | - | Round-Ups | round-ups | - | SEO | seo | - | Typography | typography | - | Tools | tools | - | UI | ui | - | Usability | usability | - | UX | ux | - | Vue | vue | - | Wallpapers | wallpapers | - | Web Design | web-design | - | Workflow | workflow |`, +| ------------------ | ------------------ | +| Accessibility | accessibility | +| Best practices | best-practices | +| Business | business | +| Career | career | +| Checklists | checklists | +| CSS | css | +| Data Visualization | data-visualization | +| Design | design | +| Design Patterns | design-patterns | +| Design Systems | design-systems | +| E-Commerce | e-commerce | +| Figma | figma | +| Freebies | freebies | +| HTML | html | +| Illustrator | illustrator | +| Inspiration | inspiration | +| JavaScript | javascript | +| Mobile | mobile | +| Performance | performance | +| Privacy | privacy | +| React | react | +| Responsive Design | responsive-design | +| Round-Ups | round-ups | +| SEO | seo | +| Typography | typography | +| Tools | tools | +| UI | ui | +| Usability | usability | +| UX | ux | +| Vue | vue | +| Wallpapers | wallpapers | +| Web Design | web-design | +| Workflow | workflow |`, }; async function handler(ctx) { diff --git a/lib/routes/smzdm/haowen-fenlei.ts b/lib/routes/smzdm/haowen-fenlei.ts index bfd0a5f7f01b..3d7c9dc45e66 100644 --- a/lib/routes/smzdm/haowen-fenlei.ts +++ b/lib/routes/smzdm/haowen-fenlei.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['LogicJake'], handler, description: `| 最新 | 周排行 | 月排行 | - | ---- | ------ | ------ | - | 0 | 7 | 30 |`, +| ---- | ------ | ------ | +| 0 | 7 | 30 |`, }; async function handler(ctx) { diff --git a/lib/routes/sobooks/index.ts b/lib/routes/sobooks/index.ts index 4e724d49208b..3d53bbdfab49 100644 --- a/lib/routes/sobooks/index.ts +++ b/lib/routes/sobooks/index.ts @@ -24,15 +24,15 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 分类 | 分类名 | - | -------- | ---------------- | - | 小说文学 | xiaoshuowenxue | - | 历史传记 | lishizhuanji | - | 人文社科 | renwensheke | - | 励志成功 | lizhichenggong | - | 经济管理 | jingjiguanli | - | 学习教育 | xuexijiaoyu | - | 生活时尚 | shenghuoshishang | - | 英文原版 | yingwenyuanban |`, +| -------- | ---------------- | +| 小说文学 | xiaoshuowenxue | +| 历史传记 | lishizhuanji | +| 人文社科 | renwensheke | +| 励志成功 | lizhichenggong | +| 经济管理 | jingjiguanli | +| 学习教育 | xuexijiaoyu | +| 生活时尚 | shenghuoshishang | +| 英文原版 | yingwenyuanban |`, }; async function handler(ctx) { diff --git a/lib/routes/sobooks/tag.ts b/lib/routes/sobooks/tag.ts index 9f542e93692e..9fe0ddb3195e 100644 --- a/lib/routes/sobooks/tag.ts +++ b/lib/routes/sobooks/tag.ts @@ -25,13 +25,13 @@ export const route: Route = { handler, description: `热门标签 - | 小说 | 文学 | 历史 | 日本 | 科普 | 管理 | 推理 | 社会 | 经济 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | - | 传记 | 美国 | 悬疑 | 哲学 | 心理 | 商业 | 金融 | 思维 | 经典 | - | 随笔 | 投资 | 文化 | 励志 | 科幻 | 成长 | 中国 | 英国 | 政治 | - | 漫画 | 纪实 | 艺术 | 科学 | 生活 | 职场 | 散文 | 法国 | 互联网 | - | 营销 | 奇幻 | 二战 | 股票 | 女性 | 德国 | 学习 | 战争 | 创业 | - | 绘本 | 名著 | 爱情 | 军事 | 理财 | 教育 | 世界 | 人物 | 沟通 |`, +| 小说 | 文学 | 历史 | 日本 | 科普 | 管理 | 推理 | 社会 | 经济 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | +| 传记 | 美国 | 悬疑 | 哲学 | 心理 | 商业 | 金融 | 思维 | 经典 | +| 随笔 | 投资 | 文化 | 励志 | 科幻 | 成长 | 中国 | 英国 | 政治 | +| 漫画 | 纪实 | 艺术 | 科学 | 生活 | 职场 | 散文 | 法国 | 互联网 | +| 营销 | 奇幻 | 二战 | 股票 | 女性 | 德国 | 学习 | 战争 | 创业 | +| 绘本 | 名著 | 爱情 | 军事 | 理财 | 教育 | 世界 | 人物 | 沟通 |`, }; async function handler(ctx) { diff --git a/lib/routes/sputniknews/index.ts b/lib/routes/sputniknews/index.ts index 0e0f1e41d9f1..af31a4996220 100644 --- a/lib/routes/sputniknews/index.ts +++ b/lib/routes/sputniknews/index.ts @@ -55,50 +55,50 @@ export const route: Route = { handler, description: `Categories for International site: - | WORLD | COVID-19 | BUSINESS | SPORT | TECH | OPINION | - | ----- | -------- | -------- | ----- | ---- | ------- | - | world | covid-19 | business | sport | tech | opinion | +| WORLD | COVID-19 | BUSINESS | SPORT | TECH | OPINION | +| ----- | -------- | -------- | ----- | ---- | ------- | +| world | covid-19 | business | sport | tech | opinion | Categories for Chinese site: - | 新闻 | 中国 | 俄罗斯 | 国际 | 俄中关系 | 评论 | - | ---- | ----- | ------ | --------------- | ------------------------ | ------- | - | news | china | russia | category\_guoji | russia\_china\_relations | opinion | +| 新闻 | 中国 | 俄罗斯 | 国际 | 俄中关系 | 评论 | +| ---- | ----- | ------ | --------------- | ------------------------ | ------- | +| news | china | russia | category\_guoji | russia\_china\_relations | opinion | Language - | Language | Id | - | ----------- | ----------- | - | English | english | - | Spanish | spanish | - | German | german | - | French | french | - | Greek | greek | - | Italian | italian | - | Czech | czech | - | Polish | polish | - | Serbian | serbian | - | Latvian | latvian | - | Lithuanian | lithuanian | - | Moldavian | moldavian | - | Belarusian | belarusian | - | Armenian | armenian | - | Abkhaz | abkhaz | - | Ssetian | ssetian | - | Georgian | georgian | - | Azerbaijani | azerbaijani | - | Arabic | arabic | - | Turkish | turkish | - | Persian | persian | - | Dari | dari | - | Kazakh | kazakh | - | Kyrgyz | kyrgyz | - | Uzbek | uzbek | - | Tajik | tajik | - | Vietnamese | vietnamese | - | Japanese | japanese | - | Chinese | chinese | - | Portuguese | portuguese |`, +| Language | Id | +| ----------- | ----------- | +| English | english | +| Spanish | spanish | +| German | german | +| French | french | +| Greek | greek | +| Italian | italian | +| Czech | czech | +| Polish | polish | +| Serbian | serbian | +| Latvian | latvian | +| Lithuanian | lithuanian | +| Moldavian | moldavian | +| Belarusian | belarusian | +| Armenian | armenian | +| Abkhaz | abkhaz | +| Ssetian | ssetian | +| Georgian | georgian | +| Azerbaijani | azerbaijani | +| Arabic | arabic | +| Turkish | turkish | +| Persian | persian | +| Dari | dari | +| Kazakh | kazakh | +| Kyrgyz | kyrgyz | +| Uzbek | uzbek | +| Tajik | tajik | +| Vietnamese | vietnamese | +| Japanese | japanese | +| Chinese | chinese | +| Portuguese | portuguese |`, }; async function handler(ctx) { diff --git a/lib/routes/sqmc/www.ts b/lib/routes/sqmc/www.ts index 5d695ebdac3b..26cc58539fd4 100644 --- a/lib/routes/sqmc/www.ts +++ b/lib/routes/sqmc/www.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nyaShine'], handler, description: `| 学校要闻 | 通知 | 学术讲座 | 基层风采书院 | 基层风采院系 | 外媒报道 | 三全学院报 | - | -------- | ---- | -------- | ------------ | ------------ | -------- | ---------- | - | 3157 | 3187 | 3188 | 3185 | 3186 | 3199 | 3200 |`, +| -------- | ---- | -------- | ------------ | ------------ | -------- | ---------- | +| 3157 | 3187 | 3188 | 3185 | 3186 | 3199 | 3200 |`, }; async function handler(ctx) { diff --git a/lib/routes/sse/sselawsrules.ts b/lib/routes/sse/sselawsrules.ts index fd7e85d6c399..a33e3989eed7 100644 --- a/lib/routes/sse/sselawsrules.ts +++ b/lib/routes/sse/sselawsrules.ts @@ -90,41 +90,41 @@ export const route: Route = { 若订阅 [最新规则](https://www.sse.com.cn/lawandrules/sselawsrules/latest/),网址为 \`https://www.sse.com.cn/lawandrules/sselawsrules/latest/\`。截取 \`https://www.sse.com.cn/lawandrules/sselawsrules/\` 到末尾 \`/\` 的部分 \`latest\` 作为参数填入,此时路由为 [\`/sse/sselawsrules/latest\`](https://rsshub.app/sse/sselawsrules/latest)。 ::: - | [最新规则](https://www.sse.com.cn/lawandrules/sselawsrules/latest/) | [章程](https://www.sse.com.cn/lawandrules/sselawsrules/article/) | [首发](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/review/firstepisode/) | [再融资](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/review/refinancing/) | [重组](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/review/recombination/) | - | ------------------------------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | - | [latest](https://rsshub.app/sse/sselawsrules/latest) | [article](https://rsshub.app/sse/sselawsrules/article) | [stocks/review/firstepisode](https://rsshub.app/sse/sselawsrules/stocks/review/firstepisode) | [stocks/review/refinancing](https://rsshub.app/sse/sselawsrules/stocks/review/refinancing) | [stocks/review/recombination](https://rsshub.app/sse/sselawsrules/stocks/review/recombination) | +| [最新规则](https://www.sse.com.cn/lawandrules/sselawsrules/latest/) | [章程](https://www.sse.com.cn/lawandrules/sselawsrules/article/) | [首发](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/review/firstepisode/) | [再融资](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/review/refinancing/) | [重组](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/review/recombination/) | +| ------------------------------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | +| [latest](https://rsshub.app/sse/sselawsrules/latest) | [article](https://rsshub.app/sse/sselawsrules/article) | [stocks/review/firstepisode](https://rsshub.app/sse/sselawsrules/stocks/review/firstepisode) | [stocks/review/refinancing](https://rsshub.app/sse/sselawsrules/stocks/review/refinancing) | [stocks/review/recombination](https://rsshub.app/sse/sselawsrules/stocks/review/recombination) | - | [转板](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/review/flap/) | [发行承销](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/issue/) | [主板上市(挂牌)](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/mainipo/) | [科创板上市(挂牌)](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/staripo/) | [股票交易](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/exchange/) | - | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | - | [stocks/review/flap](https://rsshub.app/sse/sselawsrules/stocks/review/flap) | [stocks/issue](https://rsshub.app/sse/sselawsrules/stocks/issue) | [stocks/mainipo](https://rsshub.app/sse/sselawsrules/stocks/mainipo) | [stocks/staripo](https://rsshub.app/sse/sselawsrules/stocks/staripo) | [stocks/exchange](https://rsshub.app/sse/sselawsrules/stocks/exchange) | +| [转板](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/review/flap/) | [发行承销](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/issue/) | [主板上市(挂牌)](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/mainipo/) | [科创板上市(挂牌)](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/staripo/) | [股票交易](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/exchange/) | +| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| [stocks/review/flap](https://rsshub.app/sse/sselawsrules/stocks/review/flap) | [stocks/issue](https://rsshub.app/sse/sselawsrules/stocks/issue) | [stocks/mainipo](https://rsshub.app/sse/sselawsrules/stocks/mainipo) | [stocks/staripo](https://rsshub.app/sse/sselawsrules/stocks/staripo) | [stocks/exchange](https://rsshub.app/sse/sselawsrules/stocks/exchange) | - | [试点创新企业](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/innovative/) | [股权分置改革](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/reform/) | [发行上市审核](https://www.sse.com.cn/lawandrules/sselawsrules/bond/review/) | [发行承销](https://www.sse.com.cn/lawandrules/sselawsrules/bond/issue/) | [公司债券上市(挂牌)](https://www.sse.com.cn/lawandrules/sselawsrules/bond/listing/corporatebond/) | - | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | - | [stocks/innovative](https://rsshub.app/sse/sselawsrules/stocks/innovative) | [stocks/reform](https://rsshub.app/sse/sselawsrules/stocks/reform) | [bond/review](https://rsshub.app/sse/sselawsrules/bond/review) | [bond/issue](https://rsshub.app/sse/sselawsrules/bond/issue) | [bond/listing/corporatebond](https://rsshub.app/sse/sselawsrules/bond/listing/corporatebond) | +| [试点创新企业](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/innovative/) | [股权分置改革](https://www.sse.com.cn/lawandrules/sselawsrules/stocks/reform/) | [发行上市审核](https://www.sse.com.cn/lawandrules/sselawsrules/bond/review/) | [发行承销](https://www.sse.com.cn/lawandrules/sselawsrules/bond/issue/) | [公司债券上市(挂牌)](https://www.sse.com.cn/lawandrules/sselawsrules/bond/listing/corporatebond/) | +| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| [stocks/innovative](https://rsshub.app/sse/sselawsrules/stocks/innovative) | [stocks/reform](https://rsshub.app/sse/sselawsrules/stocks/reform) | [bond/review](https://rsshub.app/sse/sselawsrules/bond/review) | [bond/issue](https://rsshub.app/sse/sselawsrules/bond/issue) | [bond/listing/corporatebond](https://rsshub.app/sse/sselawsrules/bond/listing/corporatebond) | - | [资产支持证券上市(挂牌)](https://www.sse.com.cn/lawandrules/sselawsrules/bond/listing/assets/) | [债券交易通用](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/currency/) | [国债预发行](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/tbondp/) | [债券质押式三方回购](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/tripartyrepo/) | [债券质押式协议回购](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/repurchase/) | - | ------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | - | [bond/listing/assets](https://rsshub.app/sse/sselawsrules/bond/listing/assets) | [bond/trading/currency](https://rsshub.app/sse/sselawsrules/bond/trading/currency) | [bond/trading/tbondp](https://rsshub.app/sse/sselawsrules/bond/trading/tbondp) | [bond/trading/tripartyrepo](https://rsshub.app/sse/sselawsrules/bond/trading/tripartyrepo) | [bond/trading/repurchase](https://rsshub.app/sse/sselawsrules/bond/trading/repurchase) | +| [资产支持证券上市(挂牌)](https://www.sse.com.cn/lawandrules/sselawsrules/bond/listing/assets/) | [债券交易通用](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/currency/) | [国债预发行](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/tbondp/) | [债券质押式三方回购](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/tripartyrepo/) | [债券质押式协议回购](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/repurchase/) | +| ------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | +| [bond/listing/assets](https://rsshub.app/sse/sselawsrules/bond/listing/assets) | [bond/trading/currency](https://rsshub.app/sse/sselawsrules/bond/trading/currency) | [bond/trading/tbondp](https://rsshub.app/sse/sselawsrules/bond/trading/tbondp) | [bond/trading/tripartyrepo](https://rsshub.app/sse/sselawsrules/bond/trading/tripartyrepo) | [bond/trading/repurchase](https://rsshub.app/sse/sselawsrules/bond/trading/repurchase) | - | [国债买断式回购交易](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/outrightrepo/) | [信用保护工具](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/cdx/) | [上市公司可转债](https://www.sse.com.cn/lawandrules/sselawsrules/bond/convertible/) | [基金上市](https://www.sse.com.cn/lawandrules/sselawsrules/fund/listing/) | [基金交易](https://www.sse.com.cn/lawandrules/sselawsrules/fund/trading/) | - | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | - | [bond/trading/outrightrepo](https://rsshub.app/sse/sselawsrules/bond/trading/outrightrepo) | [bond/trading/cdx](https://rsshub.app/sse/sselawsrules/bond/trading/cdx) | [bond/convertible](https://rsshub.app/sse/sselawsrules/bond/convertible) | [fund/listing](https://rsshub.app/sse/sselawsrules/fund/listing) | [fund/trading](https://rsshub.app/sse/sselawsrules/fund/trading) | +| [国债买断式回购交易](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/outrightrepo/) | [信用保护工具](https://www.sse.com.cn/lawandrules/sselawsrules/bond/trading/cdx/) | [上市公司可转债](https://www.sse.com.cn/lawandrules/sselawsrules/bond/convertible/) | [基金上市](https://www.sse.com.cn/lawandrules/sselawsrules/fund/listing/) | [基金交易](https://www.sse.com.cn/lawandrules/sselawsrules/fund/trading/) | +| ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| [bond/trading/outrightrepo](https://rsshub.app/sse/sselawsrules/bond/trading/outrightrepo) | [bond/trading/cdx](https://rsshub.app/sse/sselawsrules/bond/trading/cdx) | [bond/convertible](https://rsshub.app/sse/sselawsrules/bond/convertible) | [fund/listing](https://rsshub.app/sse/sselawsrules/fund/listing) | [fund/trading](https://rsshub.app/sse/sselawsrules/fund/trading) | - | [基础设施公募REITs](https://www.sse.com.cn/lawandrules/sselawsrules/reits/) | [期权](https://www.sse.com.cn/lawandrules/sselawsrules/option/) | [通用类](https://www.sse.com.cn/lawandrules/sselawsrules/trade/universal/) | [融资融券](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/margin/) | [转融通](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/refinancing/) | - | --------------------------------------------------------------------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | - | [reits](https://rsshub.app/sse/sselawsrules/reits) | [option](https://rsshub.app/sse/sselawsrules/option) | [trade/universal](https://rsshub.app/sse/sselawsrules/trade/universal) | [trade/specific/margin](https://rsshub.app/sse/sselawsrules/trade/specific/margin) | [trade/specific/refinancing](https://rsshub.app/sse/sselawsrules/trade/specific/refinancing) | +| [基础设施公募REITs](https://www.sse.com.cn/lawandrules/sselawsrules/reits/) | [期权](https://www.sse.com.cn/lawandrules/sselawsrules/option/) | [通用类](https://www.sse.com.cn/lawandrules/sselawsrules/trade/universal/) | [融资融券](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/margin/) | [转融通](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/refinancing/) | +| --------------------------------------------------------------------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| [reits](https://rsshub.app/sse/sselawsrules/reits) | [option](https://rsshub.app/sse/sselawsrules/option) | [trade/universal](https://rsshub.app/sse/sselawsrules/trade/universal) | [trade/specific/margin](https://rsshub.app/sse/sselawsrules/trade/specific/margin) | [trade/specific/refinancing](https://rsshub.app/sse/sselawsrules/trade/specific/refinancing) | - | [质押式回购](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/repo/) | [质押式报价回购](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/pricerepo/) | [约定购回](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/promise/) | [协议转让](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/xyzr/) | [其他](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/others/) | - | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | - | [trade/specific/repo](https://rsshub.app/sse/sselawsrules/trade/specific/repo) | [trade/specific/pricerepo](https://rsshub.app/sse/sselawsrules/trade/specific/pricerepo) | [trade/specific/promise](https://rsshub.app/sse/sselawsrules/trade/specific/promise) | [trade/specific/xyzr](https://rsshub.app/sse/sselawsrules/trade/specific/xyzr) | [trade/specific/others](https://rsshub.app/sse/sselawsrules/trade/specific/others) | +| [质押式回购](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/repo/) | [质押式报价回购](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/pricerepo/) | [约定购回](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/promise/) | [协议转让](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/xyzr/) | [其他](https://www.sse.com.cn/lawandrules/sselawsrules/trade/specific/others/) | +| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| [trade/specific/repo](https://rsshub.app/sse/sselawsrules/trade/specific/repo) | [trade/specific/pricerepo](https://rsshub.app/sse/sselawsrules/trade/specific/pricerepo) | [trade/specific/promise](https://rsshub.app/sse/sselawsrules/trade/specific/promise) | [trade/specific/xyzr](https://rsshub.app/sse/sselawsrules/trade/specific/xyzr) | [trade/specific/others](https://rsshub.app/sse/sselawsrules/trade/specific/others) | - | [沪港通](https://www.sse.com.cn/lawandrules/sselawsrules/global/hkexsc/) | [互联互通存托凭证](https://www.sse.com.cn/lawandrules/sselawsrules/global/slsc/) | [会员管理](https://www.sse.com.cn/lawandrules/sselawsrules/member/personnel/) | [适当性管理](https://www.sse.com.cn/lawandrules/sselawsrules/member/adequacy/) | [纪律处分与复核](https://www.sse.com.cn/lawandrules/sselawsrules/disciplinary/) | - | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | - | [global/hkexsc](https://rsshub.app/sse/sselawsrules/global/hkexsc) | [global/slsc](https://rsshub.app/sse/sselawsrules/global/slsc) | [member/personnel](https://rsshub.app/sse/sselawsrules/member/personnel) | [member/adequacy](https://rsshub.app/sse/sselawsrules/member/adequacy) | [disciplinary](https://rsshub.app/sse/sselawsrules/disciplinary) | +| [沪港通](https://www.sse.com.cn/lawandrules/sselawsrules/global/hkexsc/) | [互联互通存托凭证](https://www.sse.com.cn/lawandrules/sselawsrules/global/slsc/) | [会员管理](https://www.sse.com.cn/lawandrules/sselawsrules/member/personnel/) | [适当性管理](https://www.sse.com.cn/lawandrules/sselawsrules/member/adequacy/) | [纪律处分与复核](https://www.sse.com.cn/lawandrules/sselawsrules/disciplinary/) | +| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | +| [global/hkexsc](https://rsshub.app/sse/sselawsrules/global/hkexsc) | [global/slsc](https://rsshub.app/sse/sselawsrules/global/slsc) | [member/personnel](https://rsshub.app/sse/sselawsrules/member/personnel) | [member/adequacy](https://rsshub.app/sse/sselawsrules/member/adequacy) | [disciplinary](https://rsshub.app/sse/sselawsrules/disciplinary) | - | [交易收费](https://www.sse.com.cn/lawandrules/sselawsrules/charge/) | [其他业务规则](https://www.sse.com.cn/lawandrules/sselawsrules/other/) | [业务规则废止公告](https://www.sse.com.cn/lawandrules/sserules/repeal/announcement/) | [已废止规则文本](https://www.sse.com.cn/lawandrules/sselawsrules/repeal/rules/) | - | ------------------------------------------------------------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | - | [charge](https://rsshub.app/sse/sselawsrules/charge) | [other](https://rsshub.app/sse/sselawsrules/other) | [/lawandrules/sserules/repeal/announcement](https://rsshub.app/sse/sselawsrules//lawandrules/sserules/repeal/announcement) | [repeal/rules](https://rsshub.app/sse/sselawsrules/repeal/rules) | +| [交易收费](https://www.sse.com.cn/lawandrules/sselawsrules/charge/) | [其他业务规则](https://www.sse.com.cn/lawandrules/sselawsrules/other/) | [业务规则废止公告](https://www.sse.com.cn/lawandrules/sserules/repeal/announcement/) | [已废止规则文本](https://www.sse.com.cn/lawandrules/sselawsrules/repeal/rules/) | +| ------------------------------------------------------------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| [charge](https://rsshub.app/sse/sselawsrules/charge) | [other](https://rsshub.app/sse/sselawsrules/other) | [/lawandrules/sserules/repeal/announcement](https://rsshub.app/sse/sselawsrules//lawandrules/sserules/repeal/announcement) | [repeal/rules](https://rsshub.app/sse/sselawsrules/repeal/rules) | `, categories: ['finance'], diff --git a/lib/routes/startuplatte/index.ts b/lib/routes/startuplatte/index.ts index 3fac1cb4508e..23712e79b182 100644 --- a/lib/routes/startuplatte/index.ts +++ b/lib/routes/startuplatte/index.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 首頁 | 大師智慧 | 深度分析 | 新知介紹 | - | ---- | -------- | -------- | -------- | - | | quote | analysis | trend |`, +| ---- | -------- | -------- | -------- | +| | quote | analysis | trend |`, }; async function handler(ctx) { diff --git a/lib/routes/stcn/index.ts b/lib/routes/stcn/index.ts index 9afab1df5327..ab80116a59fa 100644 --- a/lib/routes/stcn/index.ts +++ b/lib/routes/stcn/index.ts @@ -62,40 +62,40 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 快讯 | 要闻 | 股市 | 公司 | 数据 | - | ---- | ---- | ---- | ------- | ---- | - | kx | yw | gs | company | data | +| ---- | ---- | ---- | ------- | ---- | +| kx | yw | gs | company | data | - | 基金 | 金融 | 评论 | 产经 | 创投 | - | ---- | ------- | ------- | ---- | ---- | - | fund | finance | comment | cj | ct | +| 基金 | 金融 | 评论 | 产经 | 创投 | +| ---- | ------- | ------- | ---- | ---- | +| fund | finance | comment | cj | ct | - | 科创板 | 新三板 | 投教 | ESG | 滚动 | - | ------ | ------ | ---- | --- | ---- | - | kcb | xsb | tj | zk | gd | +| 科创板 | 新三板 | 投教 | ESG | 滚动 | +| ------ | ------ | ---- | --- | ---- | +| kcb | xsb | tj | zk | gd | - | 股市一览 | 独家解读 | - | -------- | -------- | - | gsyl | djjd | +| 股市一览 | 独家解读 | +| -------- | -------- | +| gsyl | djjd | - | 公司新闻 | 公司动态 | - | -------- | -------- | - | gsxw | gsdt | +| 公司新闻 | 公司动态 | +| -------- | -------- | +| gsxw | gsdt | - | 独家数据 | 看点数据 | 资金流向 | 科创板 | 行情总貌 | - | -------- | -------- | -------- | ------- | -------- | - | djsj | kd | zj | sj\_kcb | hq | +| 独家数据 | 看点数据 | 资金流向 | 科创板 | 行情总貌 | +| -------- | -------- | -------- | ------- | -------- | +| djsj | kd | zj | sj\_kcb | hq | - | 专栏 | 作者 | - | ---- | ------ | - | zl | author | +| 专栏 | 作者 | +| ---- | ------ | +| zl | author | - | 行业 | 汽车 | - | ---- | ---- | - | cjhy | cjqc | +| 行业 | 汽车 | +| ---- | ---- | +| cjhy | cjqc | - | 投教课堂 | 政策知识 | 投教动态 | 专题活动 | - | -------- | -------- | -------- | -------- | - | tjkt | zczs | tjdt | zthd |`, +| 投教课堂 | 政策知识 | 投教动态 | 专题活动 | +| -------- | -------- | -------- | -------- | +| tjkt | zczs | tjdt | zthd |`, }; async function handler(ctx) { diff --git a/lib/routes/storm/index.ts b/lib/routes/storm/index.ts index 9909e7b5727d..7539331b8bd4 100644 --- a/lib/routes/storm/index.ts +++ b/lib/routes/storm/index.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 新聞總覽 | 地方新聞 | 歷史頻道 | 評論總覽 | - | -------- | ------------- | -------- | ----------- | - | articles | localarticles | history | all-comment | +| -------- | ------------- | -------- | ----------- | +| articles | localarticles | history | all-comment | ::: tip 支持形如 \`https://www.storm.mg/category/118\` 的路由,即 [\`/storm/category/118\`](https://rsshub.app/storm/category/118) diff --git a/lib/routes/swjtu/xg.ts b/lib/routes/swjtu/xg.ts index 06e734110d67..2556b8a52cff 100644 --- a/lib/routes/swjtu/xg.ts +++ b/lib/routes/swjtu/xg.ts @@ -75,9 +75,9 @@ export const route: Route = { url: 'xg.swjtu.edu.cn/web/Home/PushNewsList', description: `栏目列表: - | 通知公告 | 扬华新闻 | 多彩学院 | 学工之家 | - | -------- | -------- | -------- | -------- | - | tzgg | yhxw | dcxy | xgzj |`, +| 通知公告 | 扬华新闻 | 多彩学院 | 学工之家 | +| -------- | -------- | -------- | -------- | +| tzgg | yhxw | dcxy | xgzj |`, }; async function handler(ctx) { diff --git a/lib/routes/swpu/bgw.ts b/lib/routes/swpu/bgw.ts index 6873d4c263b7..48800ee6c0af 100644 --- a/lib/routes/swpu/bgw.ts +++ b/lib/routes/swpu/bgw.ts @@ -30,8 +30,8 @@ export const route: Route = { handler, url: 'swpu.edu.cn/', description: `| 栏目 | 重要通知公告 | 部门通知公告 | 本周活动 | - | ---- | ------------ | ------------ | -------- | - | 代码 | zytzgg | bmtzgg | bzhd |`, +| ---- | ------------ | ------------ | -------- | +| 代码 | zytzgg | bmtzgg | bzhd |`, }; async function handler(ctx): Promise { diff --git a/lib/routes/swpu/cjxy.ts b/lib/routes/swpu/cjxy.ts index ef36972d4a1c..e12ddcbc62ae 100644 --- a/lib/routes/swpu/cjxy.ts +++ b/lib/routes/swpu/cjxy.ts @@ -29,8 +29,8 @@ export const route: Route = { handler, url: 'swpu.edu.cn/', description: `| 栏目 | 学院新闻 | 学院通知 | - | ---- | -------- | -------- | - | 代码 | xyxw | xytz |`, +| ---- | -------- | -------- | +| 代码 | xyxw | xytz |`, }; async function handler(ctx) { diff --git a/lib/routes/swpu/dean.ts b/lib/routes/swpu/dean.ts index 596fef9641b3..3d4ad7c27602 100644 --- a/lib/routes/swpu/dean.ts +++ b/lib/routes/swpu/dean.ts @@ -30,8 +30,8 @@ export const route: Route = { handler, url: 'swpu.edu.cn/', description: `| 栏目 | 通知公告 | 新闻报道 | 视点声音 | - | ---- | -------- | -------- | -------- | - | 代码 | tzgg | xwbd | sdsy |`, +| ---- | -------- | -------- | -------- | +| 代码 | tzgg | xwbd | sdsy |`, }; async function handler(ctx): Promise { diff --git a/lib/routes/swpu/dxy.ts b/lib/routes/swpu/dxy.ts index 7d168ec1a355..b446be8d6de1 100644 --- a/lib/routes/swpu/dxy.ts +++ b/lib/routes/swpu/dxy.ts @@ -30,8 +30,8 @@ export const route: Route = { handler, url: 'swpu.edu.cn/', description: `| 栏目 | 学院新闻 | 学院通知 | - | ---- | -------- | -------- | - | 代码 | 1122 | 1156 |`, +| ---- | -------- | -------- | +| 代码 | 1122 | 1156 |`, }; async function handler(ctx): Promise { diff --git a/lib/routes/swpu/is.ts b/lib/routes/swpu/is.ts index 0a9307543de5..71fba7a77f30 100644 --- a/lib/routes/swpu/is.ts +++ b/lib/routes/swpu/is.ts @@ -29,8 +29,8 @@ export const route: Route = { handler, url: 'swpu.edu.cn/', description: `| 栏目 | 学院新闻 | 通知公告 | 教育教学 | 学生工作 | 招生就业 | - | ---- | -------- | -------- | -------- | -------- | -------- | - | 代码 | xyxw | tzgg | jyjx | xsgz | zsjy |`, +| ---- | -------- | -------- | -------- | -------- | -------- | +| 代码 | xyxw | tzgg | jyjx | xsgz | zsjy |`, }; async function handler(ctx) { diff --git a/lib/routes/swpu/scs.ts b/lib/routes/swpu/scs.ts index 6a5dac9af008..0a39d6e723a9 100644 --- a/lib/routes/swpu/scs.ts +++ b/lib/routes/swpu/scs.ts @@ -30,8 +30,8 @@ export const route: Route = { handler, url: 'swpu.edu.cn/', description: `| 栏目 | 通知公告 | 新闻速递 | - | ---- | -------- | -------- | - | 代码 | tzgg | xwsd |`, +| ---- | -------- | -------- | +| 代码 | tzgg | xwsd |`, }; async function handler(ctx): Promise { diff --git a/lib/routes/sysu/ygafz.ts b/lib/routes/sysu/ygafz.ts index b4968de1a98c..dfc74a5fba75 100644 --- a/lib/routes/sysu/ygafz.ts +++ b/lib/routes/sysu/ygafz.ts @@ -27,12 +27,12 @@ export const route: Route = { ], name: '粤港澳发展研究院', description: `| 人才招聘 | 人才培养 | 新闻动态 | 通知公告 | 专家观点 | - | ---------- | ------------- | -------- | -------- | -------- | - | jobopening | personnelplan | news | notice | opinion | +| ---------- | ------------- | -------- | -------- | -------- | +| jobopening | personnelplan | news | notice | opinion | - | 研究成果 | 研究论文 | 学术著作 | 形势政策 | - | -------- | -------- | -------- | -------- | - | results | papers | writings | policy |`, +| 研究成果 | 研究论文 | 学术著作 | 形势政策 | +| -------- | -------- | -------- | -------- | +| results | papers | writings | policy |`, maintainers: ['TonyRL'], handler, }; diff --git a/lib/routes/szse/inquire.ts b/lib/routes/szse/inquire.ts index 7d105d467a61..f45fe99d126b 100644 --- a/lib/routes/szse/inquire.ts +++ b/lib/routes/szse/inquire.ts @@ -32,14 +32,14 @@ export const route: Route = { url: 'szse.cn/disclosure/supervision/inquire/index.html', description: `类型 - | 主板 | 创业板 | - | ---- | ------ | - | 0 | 1 | +| 主板 | 创业板 | +| ---- | ------ | +| 0 | 1 | 函件类别 - | 全部函件类别 | 非许可类重组问询函 | 问询函 | 违法违规线索分析报告 | 许可类重组问询函 | 监管函(会计师事务所模板) | 提请关注函(会计师事务所模板) | 年报问询函 | 向中介机构发函 | 半年报问询函 | 关注函 | 公司部函 | 三季报问询函 | - | ------------ | ------------------ | ------ | -------------------- | ---------------- | -------------------------- | ------------------------------ | ---------- | -------------- | ------------ | ------ | -------- | ------------ |`, +| 全部函件类别 | 非许可类重组问询函 | 问询函 | 违法违规线索分析报告 | 许可类重组问询函 | 监管函(会计师事务所模板) | 提请关注函(会计师事务所模板) | 年报问询函 | 向中介机构发函 | 半年报问询函 | 关注函 | 公司部函 | 三季报问询函 | +| ------------ | ------------------ | ------ | -------------------- | ---------------- | -------------------------- | ------------------------------ | ---------- | -------------- | ------------ | ------ | -------- | ------------ |`, }; async function handler(ctx) { diff --git a/lib/routes/szse/projectdynamic.ts b/lib/routes/szse/projectdynamic.ts index 116db6a196d7..3ad17deab2b9 100644 --- a/lib/routes/szse/projectdynamic.ts +++ b/lib/routes/szse/projectdynamic.ts @@ -33,37 +33,37 @@ export const route: Route = { url: 'listing.szse.cn/projectdynamic/1/index.html', description: `类型 - | IPO | 再融资 | 重大资产重组 | - | --- | ------ | ------------ | - | 1 | 2 | 3 | +| IPO | 再融资 | 重大资产重组 | +| --- | ------ | ------------ | +| 1 | 2 | 3 | 阶段 - | 全部 | 受理 | 问询 | 上市委会议 | - | ---- | ---- | ---- | ---------- | - | 0 | 10 | 20 | 30 | +| 全部 | 受理 | 问询 | 上市委会议 | +| ---- | ---- | ---- | ---------- | +| 0 | 10 | 20 | 30 | - | 提交注册 | 注册结果 | 中止 | 终止 | - | -------- | -------- | ---- | ---- | - | 35 | 40 | 50 | 60 | +| 提交注册 | 注册结果 | 中止 | 终止 | +| -------- | -------- | ---- | ---- | +| 35 | 40 | 50 | 60 | 状态 - | 全部 | 新受理 | 已问询 | 通过 | 未通过 | - | ---- | ------ | ------ | ---- | ------ | - | 0 | 20 | 30 | 45 | 44 | +| 全部 | 新受理 | 已问询 | 通过 | 未通过 | +| ---- | ------ | ------ | ---- | ------ | +| 0 | 20 | 30 | 45 | 44 | - | 暂缓审议 | 复审通过 | 复审不通过 | 提交注册 | - | -------- | -------- | ---------- | -------- | - | 46 | 56 | 54 | 60 | +| 暂缓审议 | 复审通过 | 复审不通过 | 提交注册 | +| -------- | -------- | ---------- | -------- | +| 46 | 56 | 54 | 60 | - | 注册生效 | 不予注册 | 补充审核 | 终止注册 | - | -------- | -------- | -------- | -------- | - | 70 | 74 | 78 | 76 | +| 注册生效 | 不予注册 | 补充审核 | 终止注册 | +| -------- | -------- | -------- | -------- | +| 70 | 74 | 78 | 76 | - | 中止 | 审核不通过 | 撤回 | - | ---- | ---------- | ---- | - | 80 | 90 | 95 |`, +| 中止 | 审核不通过 | 撤回 | +| ---- | ---------- | ---- | +| 80 | 90 | 95 |`, }; async function handler(ctx) { diff --git a/lib/routes/szse/rule.ts b/lib/routes/szse/rule.ts index fb977fbee103..cbb7f9674e32 100644 --- a/lib/routes/szse/rule.ts +++ b/lib/routes/szse/rule.ts @@ -90,76 +90,76 @@ export const route: Route = { 若订阅 [综合类](https://www.szse.cn/www/lawrules/rule/all/index.html),网址为 \`https://www.szse.cn/www/lawrules/rule/all/index.html\`。截取 \`https://www.szse.cn/www/lawrules/rule/\` 到末尾 \`/index.html\` 的部分 \`all\` 作为参数填入,此时路由为 [\`/szse/rule/all\`](https://rsshub.app/szse/rule/all)。 ::: - | 频道 | ID | - | --------------------------------------------------------------------------- | ----------------------------------------------------- | - | [综合类](https://www.szse.cn/www/lawrules/rule/all/index.html) | [all](https://rsshub.app/szes/rule/all) | - | [基础设施REITs类](https://www.szse.cn/www/lawrules/rule/reits/index.html) | [reits](https://rsshub.app/szes/rule/reits) | - | [衍生品类](https://www.szse.cn/www/lawrules/rule/derivative/index.html) | [derivative](https://rsshub.app/szes/rule/derivative) | - | [会员管理类](https://www.szse.cn/www/lawrules/rule/memberty/index.html) | [memberty](https://rsshub.app/szes/rule/memberty) | - | [纪律处分与内部救济类](https://www.szse.cn/www/lawrules/rule/pr/index.html) | [pr](https://rsshub.app/szes/rule/pr) | - - #### 股票类 - - | 频道 | ID | - | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | - | [发行上市审核](https://www.szse.cn/www/lawrules/rule/stock/audit/index.html) | [stock/audit](https://rsshub.app/szes/rule/stock/audit) | - | [发行承销](https://www.szse.cn/www/lawrules/rule/stock/issue/index.html) | [stock/issue](https://rsshub.app/szes/rule/stock/issue) | - | [通用](https://www.szse.cn/www/lawrules/rule/stock/supervision/currency/index.html) | [stock/supervision/currency](https://rsshub.app/szes/rule/stock/supervision/currency) | - | [主板专用](https://www.szse.cn/www/lawrules/rule/stock/supervision/mb/index.html) | [stock/supervision/mb](https://rsshub.app/szes/rule/stock/supervision/mb) | - | [创业板专用](https://www.szse.cn/www/lawrules/rule/stock/supervision/chinext/index.html) | [stock/supervision/chinext](https://rsshub.app/szes/rule/stock/supervision/chinext) | - | [交易](https://www.szse.cn/www/lawrules/rule/stock/trade/index.html) | [stock/trade](https://rsshub.app/szes/rule/stock/trade) | - - #### 固收类 - - | 频道 | ID | - | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------- | - | [发行上市(挂牌)](https://www.szse.cn/www/lawrules/rule/bond/bonds/list/index.html) | [bond/bonds/list](https://rsshub.app/szes/rule/bond/bonds/list) | - | [持续监管](https://www.szse.cn/www/lawrules/rule/bond/bonds/supervision/index.html) | [bond/bonds/supervision](https://rsshub.app/szes/rule/bond/bonds/supervision) | - | [交易](https://www.szse.cn/www/lawrules/rule/bond/bonds/trade/index.html) | [bond/bonds/trade](https://rsshub.app/szes/rule/bond/bonds/trade) | - | [资产支持证券](https://www.szse.cn/www/lawrules/rule/bond/abs/index.html) | [bond/abs](https://rsshub.app/szes/rule/bond/abs) | - - #### 基金类 - - | 频道 | ID | - | ------------------------------------------------------------------- | ----------------------------------------------------- | - | [上市](https://www.szse.cn/www/lawrules/rule/fund/list/index.html) | [fund/list](https://rsshub.app/szes/rule/fund/list) | - | [交易](https://www.szse.cn/www/lawrules/rule/fund/trade/index.html) | [fund/trade](https://rsshub.app/szes/rule/fund/trade) | - - #### 交易类 - - | 频道 | ID | - | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | - | [通用](https://www.szse.cn/www/lawrules/rule/trade/current/index.html) | [trade/current](https://rsshub.app/szes/rule/trade/current) | - | [融资融券](https://www.szse.cn/www/lawrules/rule/trade/business/margin/index.html) | [trade/business/margin](https://rsshub.app/szes/rule/trade/business/margin) | - | [转融通](https://www.szse.cn/www/lawrules/rule/trade/business/refinancing/index.html) | [trade/business/refinancing](https://rsshub.app/szes/rule/trade/business/refinancing) | - | [股票质押式回购](https://www.szse.cn/www/lawrules/rule/trade/business/pledge/index.html) | [trade/business/pledge](https://rsshub.app/szes/rule/trade/business/pledge) | - | [质押式报价回购](https://www.szse.cn/www/lawrules/rule/trade/business/price/index.html) | [trade/business/price](https://rsshub.app/szes/rule/trade/business/price) | - | [约定购回](https://www.szse.cn/www/lawrules/rule/trade/business/promise/index.html) | [trade/business/promise](https://rsshub.app/szes/rule/trade/business/promise) | - | [协议转让](https://www.szse.cn/www/lawrules/rule/trade/business/transfer/index.html) | [trade/business/transfer](https://rsshub.app/szes/rule/trade/business/transfer) | - | [其他](https://www.szse.cn/www/lawrules/rule/trade/business/oth/index.html) | [trade/business/oth](https://rsshub.app/szes/rule/trade/business/oth) | - - #### 跨境创新类 - - | 频道 | ID | - | ----------------------------------------------------------------------------- | ----------------------------------------------------- | - | [深港通](https://www.szse.cn/www/lawrules/rule/inno/szhk/index.html) | [inno/szhk](https://rsshub.app/szes/rule/inno/szhk) | - | [试点创新企业](https://www.szse.cn/www/lawrules/rule/inno/pilot/index.html) | [inno/pilot](https://rsshub.app/szes/rule/inno/pilot) | - | [H股全流通](https://www.szse.cn/www/lawrules/rule/inno/hc/index.html) | [inno/hc](https://rsshub.app/szes/rule/inno/hc) | - | [互联互通存托凭证](https://www.szse.cn/www/lawrules/rule/inno/gdr/index.html) | [inno/gdr](https://rsshub.app/szes/rule/inno/gdr) | - - #### 全部规则 - - | 频道 | ID | - | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------- | - | [全部业务规则](https://www.szse.cn/www/lawrules/rule/allrules/bussiness/index.html) | [allrules/bussiness](https://rsshub.app/szes/rule/allrules/bussiness) | - | [规则汇编下载](https://www.szse.cn/www/lawrules/rule/allrules/rulejoin/index.html) | [allrules/rulejoin](https://rsshub.app/szes/rule/allrules/rulejoin) | - - #### 已废止规则 - - | 频道 | ID | - | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- | - | [规则废止公告](https://www.szse.cn/www/lawrules/rule/repeal/announcement/index.html) | [repeal/announcement](https://rsshub.app/szes/rule/repeal/announcement) | - | [已废止规则文本](https://www.szse.cn/www/lawrules/rule/repeal/rules/index.html) | [repeal/rules](https://rsshub.app/szes/rule/repeal/rules) | +| 频道 | ID | +| --------------------------------------------------------------------------- | ----------------------------------------------------- | +| [综合类](https://www.szse.cn/www/lawrules/rule/all/index.html) | [all](https://rsshub.app/szes/rule/all) | +| [基础设施REITs类](https://www.szse.cn/www/lawrules/rule/reits/index.html) | [reits](https://rsshub.app/szes/rule/reits) | +| [衍生品类](https://www.szse.cn/www/lawrules/rule/derivative/index.html) | [derivative](https://rsshub.app/szes/rule/derivative) | +| [会员管理类](https://www.szse.cn/www/lawrules/rule/memberty/index.html) | [memberty](https://rsshub.app/szes/rule/memberty) | +| [纪律处分与内部救济类](https://www.szse.cn/www/lawrules/rule/pr/index.html) | [pr](https://rsshub.app/szes/rule/pr) | + +#### 股票类 + +| 频道 | ID | +| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| [发行上市审核](https://www.szse.cn/www/lawrules/rule/stock/audit/index.html) | [stock/audit](https://rsshub.app/szes/rule/stock/audit) | +| [发行承销](https://www.szse.cn/www/lawrules/rule/stock/issue/index.html) | [stock/issue](https://rsshub.app/szes/rule/stock/issue) | +| [通用](https://www.szse.cn/www/lawrules/rule/stock/supervision/currency/index.html) | [stock/supervision/currency](https://rsshub.app/szes/rule/stock/supervision/currency) | +| [主板专用](https://www.szse.cn/www/lawrules/rule/stock/supervision/mb/index.html) | [stock/supervision/mb](https://rsshub.app/szes/rule/stock/supervision/mb) | +| [创业板专用](https://www.szse.cn/www/lawrules/rule/stock/supervision/chinext/index.html) | [stock/supervision/chinext](https://rsshub.app/szes/rule/stock/supervision/chinext) | +| [交易](https://www.szse.cn/www/lawrules/rule/stock/trade/index.html) | [stock/trade](https://rsshub.app/szes/rule/stock/trade) | + +#### 固收类 + +| 频道 | ID | +| ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------- | +| [发行上市(挂牌)](https://www.szse.cn/www/lawrules/rule/bond/bonds/list/index.html) | [bond/bonds/list](https://rsshub.app/szes/rule/bond/bonds/list) | +| [持续监管](https://www.szse.cn/www/lawrules/rule/bond/bonds/supervision/index.html) | [bond/bonds/supervision](https://rsshub.app/szes/rule/bond/bonds/supervision) | +| [交易](https://www.szse.cn/www/lawrules/rule/bond/bonds/trade/index.html) | [bond/bonds/trade](https://rsshub.app/szes/rule/bond/bonds/trade) | +| [资产支持证券](https://www.szse.cn/www/lawrules/rule/bond/abs/index.html) | [bond/abs](https://rsshub.app/szes/rule/bond/abs) | + +#### 基金类 + +| 频道 | ID | +| ------------------------------------------------------------------- | ----------------------------------------------------- | +| [上市](https://www.szse.cn/www/lawrules/rule/fund/list/index.html) | [fund/list](https://rsshub.app/szes/rule/fund/list) | +| [交易](https://www.szse.cn/www/lawrules/rule/fund/trade/index.html) | [fund/trade](https://rsshub.app/szes/rule/fund/trade) | + +#### 交易类 + +| 频道 | ID | +| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| [通用](https://www.szse.cn/www/lawrules/rule/trade/current/index.html) | [trade/current](https://rsshub.app/szes/rule/trade/current) | +| [融资融券](https://www.szse.cn/www/lawrules/rule/trade/business/margin/index.html) | [trade/business/margin](https://rsshub.app/szes/rule/trade/business/margin) | +| [转融通](https://www.szse.cn/www/lawrules/rule/trade/business/refinancing/index.html) | [trade/business/refinancing](https://rsshub.app/szes/rule/trade/business/refinancing) | +| [股票质押式回购](https://www.szse.cn/www/lawrules/rule/trade/business/pledge/index.html) | [trade/business/pledge](https://rsshub.app/szes/rule/trade/business/pledge) | +| [质押式报价回购](https://www.szse.cn/www/lawrules/rule/trade/business/price/index.html) | [trade/business/price](https://rsshub.app/szes/rule/trade/business/price) | +| [约定购回](https://www.szse.cn/www/lawrules/rule/trade/business/promise/index.html) | [trade/business/promise](https://rsshub.app/szes/rule/trade/business/promise) | +| [协议转让](https://www.szse.cn/www/lawrules/rule/trade/business/transfer/index.html) | [trade/business/transfer](https://rsshub.app/szes/rule/trade/business/transfer) | +| [其他](https://www.szse.cn/www/lawrules/rule/trade/business/oth/index.html) | [trade/business/oth](https://rsshub.app/szes/rule/trade/business/oth) | + +#### 跨境创新类 + +| 频道 | ID | +| ----------------------------------------------------------------------------- | ----------------------------------------------------- | +| [深港通](https://www.szse.cn/www/lawrules/rule/inno/szhk/index.html) | [inno/szhk](https://rsshub.app/szes/rule/inno/szhk) | +| [试点创新企业](https://www.szse.cn/www/lawrules/rule/inno/pilot/index.html) | [inno/pilot](https://rsshub.app/szes/rule/inno/pilot) | +| [H股全流通](https://www.szse.cn/www/lawrules/rule/inno/hc/index.html) | [inno/hc](https://rsshub.app/szes/rule/inno/hc) | +| [互联互通存托凭证](https://www.szse.cn/www/lawrules/rule/inno/gdr/index.html) | [inno/gdr](https://rsshub.app/szes/rule/inno/gdr) | + +#### 全部规则 + +| 频道 | ID | +| ----------------------------------------------------------------------------------- | --------------------------------------------------------------------- | +| [全部业务规则](https://www.szse.cn/www/lawrules/rule/allrules/bussiness/index.html) | [allrules/bussiness](https://rsshub.app/szes/rule/allrules/bussiness) | +| [规则汇编下载](https://www.szse.cn/www/lawrules/rule/allrules/rulejoin/index.html) | [allrules/rulejoin](https://rsshub.app/szes/rule/allrules/rulejoin) | + +#### 已废止规则 + +| 频道 | ID | +| ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- | +| [规则废止公告](https://www.szse.cn/www/lawrules/rule/repeal/announcement/index.html) | [repeal/announcement](https://rsshub.app/szes/rule/repeal/announcement) | +| [已废止规则文本](https://www.szse.cn/www/lawrules/rule/repeal/rules/index.html) | [repeal/rules](https://rsshub.app/szes/rule/repeal/rules) | `, categories: ['finance'], diff --git a/lib/routes/szu/yz/index.ts b/lib/routes/szu/yz/index.ts index bbd038b1e2c5..37a921b24c0d 100644 --- a/lib/routes/szu/yz/index.ts +++ b/lib/routes/szu/yz/index.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['NagaruZ'], handler, description: `| 研究生 | 博士生 | - | ------ | ------ | - | 1 | 2 |`, +| ------ | ------ | +| 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/t66y/index.ts b/lib/routes/t66y/index.ts index e4e779a30a19..f8cc4825f09c 100644 --- a/lib/routes/t66y/index.ts +++ b/lib/routes/t66y/index.ts @@ -23,25 +23,25 @@ export const route: Route = { handler, description: `> 注意:并非所有的分区都有子类型,可以参考成人文学交流区的 \`古典武侠\` 这一子类型。 - | 亚洲无码原创区 | 亚洲有码原创区 | 欧美原创区 | 动漫原创区 | 国产原创区 | - | -------------- | -------------- | ---------- | ---------- | ---------- | - | 2 | 15 | 4 | 5 | 25 | +| 亚洲无码原创区 | 亚洲有码原创区 | 欧美原创区 | 动漫原创区 | 国产原创区 | +| -------------- | -------------- | ---------- | ---------- | ---------- | +| 2 | 15 | 4 | 5 | 25 | - | 中字原创区 | 转帖交流区 | HTTP 下载区 | 在线成人区 | - | ---------- | ---------- | ----------- | ---------- | - | 26 | 27 | 21 | 22 | +| 中字原创区 | 转帖交流区 | HTTP 下载区 | 在线成人区 | +| ---------- | ---------- | ----------- | ---------- | +| 26 | 27 | 21 | 22 | - | 技术讨论区 | 新时代的我们 | 达盖尔的旗帜 | 成人文学交流 | - | ---------- | ------------ | ------------ | ------------ | - | 7 | 8 | 16 | 20 | +| 技术讨论区 | 新时代的我们 | 达盖尔的旗帜 | 成人文学交流 | +| ---------- | ------------ | ------------ | ------------ | +| 7 | 8 | 16 | 20 | **主题过滤** > 因为该类型无法搭配子类型使用,所以使用时 \`type\` 子类型需使用 \`-999\` 占位 - | 今日主题 | 热门主题 | 精华主题 | 原创主题 | 今日新作 | - | ------- | ------- | ------- | ------- | ------ | - | today | hot | digest | 1 | 2 |`, +| 今日主题 | 热门主题 | 精华主题 | 原创主题 | 今日新作 | +| ------- | ------- | ------- | ------- | ------ | +| today | hot | digest | 1 | 2 |`, }; const SEARCH_NAMES = { diff --git a/lib/routes/tangshufang/index.ts b/lib/routes/tangshufang/index.ts index 8195f72c9e85..913777196f5d 100644 --- a/lib/routes/tangshufang/index.ts +++ b/lib/routes/tangshufang/index.ts @@ -26,16 +26,16 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 首页 | 老唐实盘 | 书房拾遗 | 理念 & 估值 | 经典陪读 | 财务套利 | - | ---- | -------- | -------- | ----------- | -------- | -------- | - | | shipan | wenda | linian | peidu | taoli | +| ---- | -------- | -------- | ----------- | -------- | -------- | +| | shipan | wenda | linian | peidu | taoli | - | 企业分析 | 白酒企业 | 腾讯控股 | 分众传媒 | 海康威视 | 其他企业 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | qiye | baijiu | tengxun | fenzhong | haikang | qita | +| 企业分析 | 白酒企业 | 腾讯控股 | 分众传媒 | 海康威视 | 其他企业 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| qiye | baijiu | tengxun | fenzhong | haikang | qita | - | 核心五篇 | 读者投稿 | 读书随笔 | 财报浅析 | 出行游记 | 巴芒连载 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | hexin | tougao | suibi | caibao | youji | bamang |`, +| 核心五篇 | 读者投稿 | 读书随笔 | 财报浅析 | 出行游记 | 巴芒连载 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| hexin | tougao | suibi | caibao | youji | bamang |`, }; async function handler(ctx) { diff --git a/lib/routes/taobao/zhongchou.ts b/lib/routes/taobao/zhongchou.ts index 2e92886bf0ec..2573c34d9f7b 100644 --- a/lib/routes/taobao/zhongchou.ts +++ b/lib/routes/taobao/zhongchou.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['xyqfer', 'Fatpandac'], handler, description: `| 全部 | 科技 | 食品 | 动漫 | 设计 | 公益 | 娱乐 | 影音 | 书籍 | 游戏 | 其他 | - | ---- | ---- | ----------- | ---- | ------ | ---- | ---- | ----- | ---- | ---- | ----- | - | all | tech | agriculture | acg | design | love | tele | music | book | game | other |`, +| ---- | ---- | ----------- | ---- | ------ | ---- | ---- | ----- | ---- | ---- | ----- | +| all | tech | agriculture | acg | design | love | tele | music | book | game | other |`, }; async function handler(ctx) { diff --git a/lib/routes/taoguba/index.ts b/lib/routes/taoguba/index.ts index 8d475dfd2dcc..b062740e0148 100644 --- a/lib/routes/taoguba/index.ts +++ b/lib/routes/taoguba/index.ts @@ -12,8 +12,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 淘股论坛 | 社区总版 | 精华加油 | 网友点赞 | - | -------- | -------- | -------- | -------- | - | bbs | zongban | jinghua | dianzan |`, +| -------- | -------- | -------- | -------- | +| bbs | zongban | jinghua | dianzan |`, }; async function handler(ctx) { diff --git a/lib/routes/taptap/changelog-intl.ts b/lib/routes/taptap/changelog-intl.ts index e16f5fefa89b..11163c18154c 100644 --- a/lib/routes/taptap/changelog-intl.ts +++ b/lib/routes/taptap/changelog-intl.ts @@ -28,7 +28,7 @@ export const route: Route = { handler, description: `Language Code - | English (US) | 繁體中文 | 한국어 | 日本語 | - | ------------ | -------- | ------ | ------ | - | en_US | zh_TW | ko_KR | ja_JP |`, +| English (US) | 繁體中文 | 한국어 | 日本語 | +| ------------ | -------- | ------ | ------ | +| en_US | zh_TW | ko_KR | ja_JP |`, }; diff --git a/lib/routes/tass/news.ts b/lib/routes/tass/news.ts index fd5f6088e894..c9f472ead76e 100644 --- a/lib/routes/tass/news.ts +++ b/lib/routes/tass/news.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| Russian Politics & Diplomacy | World | Business & Economy | Military & Defense | Science & Space | Emergencies | Society & Culture | Press Review | Sports | - | ---------------------------- | ----- | ------------------ | ------------------ | --------------- | ----------- | ----------------- | ------------ | ------ | - | politics | world | economy | defense | science | emergencies | society | pressreview | sports |`, +| ---------------------------- | ----- | ------------------ | ------------------ | --------------- | ----------- | ----------------- | ------------ | ------ | +| politics | world | economy | defense | science | emergencies | society | pressreview | sports |`, }; async function handler(ctx) { diff --git a/lib/routes/telecompaper/news.ts b/lib/routes/telecompaper/news.ts index 47ef06d5b312..6a78f622d3ab 100644 --- a/lib/routes/telecompaper/news.ts +++ b/lib/routes/telecompaper/news.ts @@ -29,9 +29,9 @@ export const route: Route = { handler, description: `Category - | WIRELESS | BROADBAND | VIDEO | GENERAL | IT | INDUSTRY RESOURCES | - | -------- | --------- | --------- | ------- | -- | ------------------ | - | mobile | internet | boardcast | general | it | industry-resources | +| WIRELESS | BROADBAND | VIDEO | GENERAL | IT | INDUSTRY RESOURCES | +| -------- | --------- | --------- | ------- | -- | ------------------ | +| mobile | internet | boardcast | general | it | industry-resources | ::: tip If \`country\` or \`type\` includes empty space, use \`-\` instead. For example, \`United States\` needs to be replaced with \`United-States\`, \`White paper\` needs to be replaced with \`White-paper\` diff --git a/lib/routes/telecompaper/search.ts b/lib/routes/telecompaper/search.ts index 605ac8ebbff6..54a49caaab49 100644 --- a/lib/routes/telecompaper/search.ts +++ b/lib/routes/telecompaper/search.ts @@ -21,15 +21,15 @@ export const route: Route = { handler, description: `Sorting - | Date Ascending | Date Descending | - | -------------- | --------------- | - | 1 | 2 | +| Date Ascending | Date Descending | +| -------------- | --------------- | +| 1 | 2 | Date selection - | 1 month | 3 months | 6 months | 12 months | 24 months | - | ------- | -------- | -------- | --------- | --------- | - | 1 | 3 | 6 | 12 | 24 |`, +| 1 month | 3 months | 6 months | 12 months | 24 months | +| ------- | -------- | -------- | --------- | --------- | +| 1 | 3 | 6 | 12 | 24 |`, }; async function handler(ctx) { diff --git a/lib/routes/tencent/pvp/newsindex.ts b/lib/routes/tencent/pvp/newsindex.ts index 41064e33b824..37870b2fb508 100644 --- a/lib/routes/tencent/pvp/newsindex.ts +++ b/lib/routes/tencent/pvp/newsindex.ts @@ -54,8 +54,8 @@ export const route: Route = { maintainers: ['Jeason0228', 'HenryQW'], handler, description: `| 全部 | 热门 | 新闻 | 公告 | 活动 | 赛事 | 优化 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | all | rm | xw | gg | hd | ss | yh |`, +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| all | rm | xw | gg | hd | ss | yh |`, }; async function handler(ctx) { diff --git a/lib/routes/tesla/cx.ts b/lib/routes/tesla/cx.ts index 47ec916acf66..a82211520a5f 100644 --- a/lib/routes/tesla/cx.ts +++ b/lib/routes/tesla/cx.ts @@ -26,80 +26,80 @@ export const route: Route = { maintainers: ['simonsmh', 'nczitzk'], handler, description: `| 充电免停 | 酒店 | 美食 | 生活方式 | - | -------- | ---- | ---- | -------- | +| -------- | ---- | ---- | -------- | ::: tip 分类为 **充电免停** 时,城市参数不起作用 :::
- 可选城市 +可选城市 - | 成都 | 深圳 | 洛阳 | 北京 | 南京 | 绍兴 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 成都 | 深圳 | 洛阳 | 北京 | 南京 | 绍兴 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 西安 | 上海 | 阿坝藏族羌族自治州 | 重庆 | 郑州 | 天津 | - | ---- | ---- | ------------------ | ---- | ---- | ---- | +| 西安 | 上海 | 阿坝藏族羌族自治州 | 重庆 | 郑州 | 天津 | +| ---- | ---- | ------------------ | ---- | ---- | ---- | - | 晋中 | 三亚 | 湖州 | 苏州 | 扬州 | 秦皇岛 | - | ---- | ---- | ---- | ---- | ---- | ------ | +| 晋中 | 三亚 | 湖州 | 苏州 | 扬州 | 秦皇岛 | +| ---- | ---- | ---- | ---- | ---- | ------ | - | 长沙 | 武汉 | 安阳 | 温州 | 瑞安 | 石家庄 | - | ---- | ---- | ---- | ---- | ---- | ------ | +| 长沙 | 武汉 | 安阳 | 温州 | 瑞安 | 石家庄 | +| ---- | ---- | ---- | ---- | ---- | ------ | - | 佛山 | 广州 | 杭州 | 烟台 | 沧州 | 张家港 | - | ---- | ---- | ---- | ---- | ---- | ------ | +| 佛山 | 广州 | 杭州 | 烟台 | 沧州 | 张家港 | +| ---- | ---- | ---- | ---- | ---- | ------ | - | 金华 | 临沧 | 大理 | 南昌 | 贵阳 | 信阳 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 金华 | 临沧 | 大理 | 南昌 | 贵阳 | 信阳 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 张家口 | 铜仁 | 沈阳 | 合肥 | 黔东 | 高邮 | - | ------ | ---- | ---- | ---- | ---- | ---- | +| 张家口 | 铜仁 | 沈阳 | 合肥 | 黔东 | 高邮 | +| ------ | ---- | ---- | ---- | ---- | ---- | - | 三河 | 安顺 | 莆田 | 阳江 | 南宁 | 台州 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 三河 | 安顺 | 莆田 | 阳江 | 南宁 | 台州 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 余姚 | 淄博 | 三明 | 中山 | 宁波 | 厦门 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 余姚 | 淄博 | 三明 | 中山 | 宁波 | 厦门 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 永康 | 慈溪 | 台山 | 福州 | 无锡 | 宜昌 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 永康 | 慈溪 | 台山 | 福州 | 无锡 | 宜昌 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 泉州 | 肇庆 | 太仓 | 珠海 | 邢台 | 衡水 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 泉州 | 肇庆 | 太仓 | 珠海 | 邢台 | 衡水 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 温岭 | 宜兴 | 东莞 | 威海 | 南通 | 舟山 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 温岭 | 宜兴 | 东莞 | 威海 | 南通 | 舟山 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 都匀 | 长治 | 江阴 | 云浮 | 常州 | 唐山 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 都匀 | 长治 | 江阴 | 云浮 | 常州 | 唐山 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 平湖 | 商丘 | 保定 | 泰州 | 青岛 | 龙口 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 平湖 | 商丘 | 保定 | 泰州 | 青岛 | 龙口 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 泰安 | 岳阳 | 惠州 | 徐州 | 哈尔滨 | 潍坊 | - | ---- | ---- | ---- | ---- | ------ | ---- | +| 泰安 | 岳阳 | 惠州 | 徐州 | 哈尔滨 | 潍坊 | +| ---- | ---- | ---- | ---- | ------ | ---- | - | 大同 | 嘉兴 | 毕节 | 临汾 | 江门 | 诸暨 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 大同 | 嘉兴 | 毕节 | 临汾 | 江门 | 诸暨 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 儋州 | 衢州 | 大连 | 昆山 | 靖江 | 常熟 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 儋州 | 衢州 | 大连 | 昆山 | 靖江 | 常熟 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 罗定 | 丽江 | 晋江 | 乐清 | 茂名 | 福清 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 罗定 | 丽江 | 晋江 | 乐清 | 茂名 | 福清 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 廊坊 | 兰溪 | 汕尾 | 滨州 | 昆明 | 玉环 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 廊坊 | 兰溪 | 汕尾 | 滨州 | 昆明 | 玉环 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 绵阳 | 漳州 | 德州 | 聊城 | 龙岩 | 临沂 | - | ---- | ---- | ---- | ---- | ---- | ---- | +| 绵阳 | 漳州 | 德州 | 聊城 | 龙岩 | 临沂 | +| ---- | ---- | ---- | ---- | ---- | ---- | - | 新沂 | 桐乡 | 迪庆藏族自治州 | 汕头 | 潮州 | 驻马店 | - | ---- | ---- | -------------- | ---- | ---- | ------ | +| 新沂 | 桐乡 | 迪庆藏族自治州 | 汕头 | 潮州 | 驻马店 | +| ---- | ---- | -------------- | ---- | ---- | ------ | - | 曲阜 | 郴州 | 济源 | 兴义 | - | ---- | ---- | ---- | ---- | +| 曲阜 | 郴州 | 济源 | 兴义 | +| ---- | ---- | ---- | ---- |
`, }; diff --git a/lib/routes/tgbus/list.ts b/lib/routes/tgbus/list.ts index 79e1aac0af8f..4b26806493a3 100644 --- a/lib/routes/tgbus/list.ts +++ b/lib/routes/tgbus/list.ts @@ -33,8 +33,8 @@ export const route: Route = { maintainers: ['Xzonn'], handler, description: `| 最新资讯 | 游戏评测 | 游戏视频 | 巴士首页特稿 | 硬件资讯 | - | -------- | -------- | -------- | ------------ | -------- | - | news | review | video | special | hardware |`, +| -------- | -------- | -------- | ------------ | -------- | +| news | review | video | special | hardware |`, }; async function handler(ctx) { diff --git a/lib/routes/the/index.ts b/lib/routes/the/index.ts index f66a2e6c5bf7..f7747887575c 100644 --- a/lib/routes/the/index.ts +++ b/lib/routes/the/index.ts @@ -121,19 +121,19 @@ export const route: Route = { 你还可以搜索关键字。\`/search/中国\` 搜索关键字 [中国](https://the.bi/s/?s=中国)。在这种情况下,路径是 [\`/the/search/中国\`](https://rsshub.app/the/search/中国). ::: - | 分类 | ID | - | ---------------------------------------------- | ---------------------------------------------------------------- | - | [时局图](https://the.bi/s/rawj7o4ypewv94) | [rawj7o4ypewv94](https://rsshub.app/the/category/rawj7o4ypewv94) | - | [剩余价值](https://the.bi/s/rawmw7dsta2jew) | [rawmw7dsta2jew](https://rsshub.app/the/category/rawmw7dsta2jew) | - | [打江山](https://the.bi/s/rawbcvxkktdkq8) | [rawbcvxkktdkq8](https://rsshub.app/the/category/rawbcvxkktdkq8) | - | [中国经济](https://the.bi/s/raw4krvx85dh27) | [raw4krvx85dh27](https://rsshub.app/the/category/raw4krvx85dh27) | - | [水深火热](https://the.bi/s/rawtn8jpsc6uvv) | [rawtn8jpsc6uvv](https://rsshub.app/the/category/rawtn8jpsc6uvv) | - | [东升西降](https://the.bi/s/rawai5kd4z15il) | [rawai5kd4z15il](https://rsshub.app/the/category/rawai5kd4z15il) | - | [大局 & 大棋](https://the.bi/s/raw2efkzejrsx8) | [raw2efkzejrsx8](https://rsshub.app/the/category/raw2efkzejrsx8) | - | [境外势力](https://the.bi/s/rawmpalhnlphuc) | [rawmpalhnlphuc](https://rsshub.app/the/category/rawmpalhnlphuc) | - | [副刊](https://the.bi/s/rawxght2jr2u5z) | [rawxght2jr2u5z](https://rsshub.app/the/category/rawxght2jr2u5z) | - | [天高地厚](https://the.bi/s/rawrsnh9zakqdx) | [rawrsnh9zakqdx](https://rsshub.app/the/category/rawrsnh9zakqdx) | - | [Oyster](https://the.bi/s/rawdhl9hugdfn9) | [rawdhl9hugdfn9](https://rsshub.app/the/category/rawdhl9hugdfn9) | +| 分类 | ID | +| ---------------------------------------------- | ---------------------------------------------------------------- | +| [时局图](https://the.bi/s/rawj7o4ypewv94) | [rawj7o4ypewv94](https://rsshub.app/the/category/rawj7o4ypewv94) | +| [剩余价值](https://the.bi/s/rawmw7dsta2jew) | [rawmw7dsta2jew](https://rsshub.app/the/category/rawmw7dsta2jew) | +| [打江山](https://the.bi/s/rawbcvxkktdkq8) | [rawbcvxkktdkq8](https://rsshub.app/the/category/rawbcvxkktdkq8) | +| [中国经济](https://the.bi/s/raw4krvx85dh27) | [raw4krvx85dh27](https://rsshub.app/the/category/raw4krvx85dh27) | +| [水深火热](https://the.bi/s/rawtn8jpsc6uvv) | [rawtn8jpsc6uvv](https://rsshub.app/the/category/rawtn8jpsc6uvv) | +| [东升西降](https://the.bi/s/rawai5kd4z15il) | [rawai5kd4z15il](https://rsshub.app/the/category/rawai5kd4z15il) | +| [大局 & 大棋](https://the.bi/s/raw2efkzejrsx8) | [raw2efkzejrsx8](https://rsshub.app/the/category/raw2efkzejrsx8) | +| [境外势力](https://the.bi/s/rawmpalhnlphuc) | [rawmpalhnlphuc](https://rsshub.app/the/category/rawmpalhnlphuc) | +| [副刊](https://the.bi/s/rawxght2jr2u5z) | [rawxght2jr2u5z](https://rsshub.app/the/category/rawxght2jr2u5z) | +| [天高地厚](https://the.bi/s/rawrsnh9zakqdx) | [rawrsnh9zakqdx](https://rsshub.app/the/category/rawrsnh9zakqdx) | +| [Oyster](https://the.bi/s/rawdhl9hugdfn9) | [rawdhl9hugdfn9](https://rsshub.app/the/category/rawdhl9hugdfn9) | `, categories: ['new-media'], diff --git a/lib/routes/theatlantic/news.ts b/lib/routes/theatlantic/news.ts index d6b056d81745..8052363a5ca6 100644 --- a/lib/routes/theatlantic/news.ts +++ b/lib/routes/theatlantic/news.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['EthanWng97', 'pseudoyu'], handler, description: `| Popular | Latest | Politics | Technology | Business | - | ------------ | ------ | -------- | ---------- | -------- | - | most-popular | latest | politics | technology | business | +| ------------ | ------ | -------- | ---------- | -------- | +| most-popular | latest | politics | technology | business | More categories (except photo) can be found within the navigation bar at [https://www.theatlantic.com](https://www.theatlantic.com)`, }; diff --git a/lib/routes/theblockbeats/index.ts b/lib/routes/theblockbeats/index.ts index a61a6fc9f9d1..ad8a0a69969c 100644 --- a/lib/routes/theblockbeats/index.ts +++ b/lib/routes/theblockbeats/index.ts @@ -80,12 +80,12 @@ export const route: Route = { }, ], description: `| 快讯 | 文章 | - | :-------: | :-----: | - | newsflash | article | +| :-------: | :-----: | +| newsflash | article | - | 全部 | 深度 | 精选 | 热点追踪 | - | :--: | :--: | :--: | :---: | - | | -2 | 1 | 2 |`, +| 全部 | 深度 | 精选 | 热点追踪 | +| :--: | :--: | :--: | :---: | +| | -2 | 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/thecover/channel.ts b/lib/routes/thecover/channel.ts index 162338c0c770..210b3ddfee9b 100644 --- a/lib/routes/thecover/channel.ts +++ b/lib/routes/thecover/channel.ts @@ -41,8 +41,8 @@ export const route: Route = { maintainers: ['yuxinliu-alex'], handler, description: `| 天下 | 四川 | 辟谣 | 国际 | 云招考 | 30 秒 | 拍客 | 体育 | 国内 | 帮扶铁军 | 文娱 | 宽窄 | 商业 | 千面 | 封面号 | - | ---- | ---- | ---- | ---- | ------ | ----- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ------ | - | 3892 | 3560 | 3909 | 3686 | 11 | 3902 | 3889 | 3689 | 1 | 4002 | 12 | 46 | 4 | 21 | 17 |`, +| ---- | ---- | ---- | ---- | ------ | ----- | ---- | ---- | ---- | -------- | ---- | ---- | ---- | ---- | ------ | +| 3892 | 3560 | 3909 | 3686 | 11 | 3902 | 3889 | 3689 | 1 | 4002 | 12 | 46 | 4 | 21 | 17 |`, }; async function handler(ctx) { diff --git a/lib/routes/theinitium/channel.ts b/lib/routes/theinitium/channel.ts index 1d51f1ab9c5b..d87c3d0b05da 100644 --- a/lib/routes/theinitium/channel.ts +++ b/lib/routes/theinitium/channel.ts @@ -22,7 +22,7 @@ export const route: Route = { categories: ['new-media', 'popular'], description: `Type 栏目: - | 最新 | 深度 | What’s New | 广场 | 科技 | 风物 | 特约 | ... | - | ------ | ------- | ---------- | ----------------- | ---------- | ------- | -------- | --- | - | latest | feature | news-brief | notes-and-letters | technology | culture | pick_up | ... |`, +| 最新 | 深度 | What’s New | 广场 | 科技 | 风物 | 特约 | ... | +| ------ | ------- | ---------- | ----------------- | ---------- | ------- | -------- | --- | +| latest | feature | news-brief | notes-and-letters | technology | culture | pick_up | ... |`, }; diff --git a/lib/routes/themoviedb/sheet.ts b/lib/routes/themoviedb/sheet.ts index 032df08bcb6c..9f30be13b6f1 100644 --- a/lib/routes/themoviedb/sheet.ts +++ b/lib/routes/themoviedb/sheet.ts @@ -47,15 +47,15 @@ export const route: Route = { handler, description: `When \`mediaType\` is \`tv\`, \`sheet\` should be: - | Airing Today | On TV | Top Rated | - | ------------ | ---------- | --------- | - | airing-today | on-the-air | top-rated | +| Airing Today | On TV | Top Rated | +| ------------ | ---------- | --------- | +| airing-today | on-the-air | top-rated | When \`mediaType\` is \`movie\`, \`sheet\` should be: - | Now Playing | Upcoming | Top Rated | - | ----------- | -------- | --------- | - | now-playing | upcoming | top-rated |`, +| Now Playing | Upcoming | Top Rated | +| ----------- | -------- | --------- | +| now-playing | upcoming | top-rated |`, }; async function handler(ctx) { diff --git a/lib/routes/thepaper/channel.ts b/lib/routes/thepaper/channel.ts index e723146afa22..84ff03e9c1c6 100644 --- a/lib/routes/thepaper/channel.ts +++ b/lib/routes/thepaper/channel.ts @@ -20,20 +20,20 @@ export const route: Route = { maintainers: ['xyqfer', 'nczitzk', 'bigfei'], handler, description: `| 频道 ID | 频道名 | - | ------- | ------ | - | 26916 | 视频 | - | 108856 | 战疫 | - | 25950 | 时事 | - | 25951 | 财经 | - | 36079 | 澎湃号 | - | 119908 | 科技 | - | 25952 | 思想 | - | 119489 | 智库 | - | 25953 | 生活 | - | 26161 | 问吧 | - | 122908 | 国际 | - | -21 | 体育 | - | -24 | 评论 |`, +| ------- | ------ | +| 26916 | 视频 | +| 108856 | 战疫 | +| 25950 | 时事 | +| 25951 | 财经 | +| 36079 | 澎湃号 | +| 119908 | 科技 | +| 25952 | 思想 | +| 119489 | 智库 | +| 25953 | 生活 | +| 26161 | 问吧 | +| 122908 | 国际 | +| -21 | 体育 | +| -24 | 评论 |`, }; async function handler(ctx) { diff --git a/lib/routes/thepaper/list.ts b/lib/routes/thepaper/list.ts index e8d1dc1f66d2..9bcf0ddeb523 100644 --- a/lib/routes/thepaper/list.ts +++ b/lib/routes/thepaper/list.ts @@ -20,104 +20,104 @@ export const route: Route = { maintainers: ['nczitzk', 'bigfei'], handler, description: `| 栏目 ID | 栏目名 | - | ------- | ------------ | - | 26912 | 上直播 | - | 26913 | 七环视频 | - | 26965 | 温度计 | - | 26908 | 一级视场 | - | 27260 | World 湃 | - | 26907 | 湃客科技 | - | 33168 | 纪录湃 | - | 26911 | 围观 | - | 26918 | @所有人 | - | 26906 | 大都会 | - | 26909 | 追光灯 | - | 26910 | 运动装 | - | 26914 | 健寻记 | - | 82188 | AI 播报 | - | 89035 | 眼界 | - | 92278 | 关键帧 | - | 90069 | 战疫 | - | 25462 | 中国政库 | - | 25488 | 中南海 | - | 97924 | 初心之路 | - | 25489 | 舆论场 | - | 25490 | 打虎记 | - | 25423 | 人事风向 | - | 25426 | 法治中国 | - | 25424 | 一号专案 | - | 25463 | 港台来信 | - | 25491 | 长三角政商 | - | 25428 | 直击现场 | - | 68750 | 公益湃 | - | 27604 | 暖闻 | - | 25464 | 澎湃质量报告 | - | 25425 | 绿政公署 | - | 25429 | 澎湃国际 | - | 25481 | 外交学人 | - | 25430 | 澎湃防务 | - | 25678 | 唐人街 | - | 25427 | 澎湃人物 | - | 25422 | 浦江头条 | - | 25487 | 教育家 | - | 25634 | 全景现场 | - | 25635 | 美数课 | - | 25600 | 快看 | - | 25434 | 10% 公司 | - | 25436 | 能见度 | - | 25433 | 地产界 | - | 25438 | 财经上下游 | - | 25435 | 金改实验室 | - | 25437 | 牛市点线面 | - | 119963 | IPO 最前线 | - | 25485 | 澎湃商学院 | - | 25432 | 自贸区连线 | - | 37978 | 进博会在线 | - | 36079 | 湃客 | - | 27392 | 政务 | - | 77286 | 媒体 | - | 27234 | 科学湃 | - | 119445 | 生命科学 | - | 119447 | 未来 2% | - | 119446 | 元宇宙观察 | - | 119448 | 科创 101 | - | 119449 | 科学城邦 | - | 25444 | 社论 | - | 27224 | 澎湃评论 | - | 26525 | 思想湃 | - | 26878 | 上海书评 | - | 25483 | 思想市场 | - | 25457 | 私家历史 | - | 25574 | 翻书党 | - | 25455 | 艺术评论 | - | 26937 | 古代艺术 | - | 25450 | 文化课 | - | 25482 | 逝者 | - | 25536 | 专栏 | - | 26506 | 异次元 | - | 97313 | 海平面 | - | 103076 | 一问三知 | - | 25445 | 澎湃研究所 | - | 25446 | 全球智库 | - | 26915 | 城市漫步 | - | 25456 | 市政厅 | - | 104191 | 世界会客厅 | - | 25448 | 有戏 | - | 26609 | 文艺范 | - | 25942 | 身体 | - | 26015 | 私・奔 | - | 25599 | 运动家 | - | 25842 | 私家地理 | - | 80623 | 非常品 | - | 26862 | 楼市 | - | 25769 | 生活方式 | - | 25990 | 澎湃联播 | - | 26173 | 视界 | - | 26202 | 亲子学堂 | - | 26404 | 赢家 | - | 26490 | 汽车圈 | - | 115327 | IP SH | - | 117340 | 酒业 |`, +| ------- | ------------ | +| 26912 | 上直播 | +| 26913 | 七环视频 | +| 26965 | 温度计 | +| 26908 | 一级视场 | +| 27260 | World 湃 | +| 26907 | 湃客科技 | +| 33168 | 纪录湃 | +| 26911 | 围观 | +| 26918 | @所有人 | +| 26906 | 大都会 | +| 26909 | 追光灯 | +| 26910 | 运动装 | +| 26914 | 健寻记 | +| 82188 | AI 播报 | +| 89035 | 眼界 | +| 92278 | 关键帧 | +| 90069 | 战疫 | +| 25462 | 中国政库 | +| 25488 | 中南海 | +| 97924 | 初心之路 | +| 25489 | 舆论场 | +| 25490 | 打虎记 | +| 25423 | 人事风向 | +| 25426 | 法治中国 | +| 25424 | 一号专案 | +| 25463 | 港台来信 | +| 25491 | 长三角政商 | +| 25428 | 直击现场 | +| 68750 | 公益湃 | +| 27604 | 暖闻 | +| 25464 | 澎湃质量报告 | +| 25425 | 绿政公署 | +| 25429 | 澎湃国际 | +| 25481 | 外交学人 | +| 25430 | 澎湃防务 | +| 25678 | 唐人街 | +| 25427 | 澎湃人物 | +| 25422 | 浦江头条 | +| 25487 | 教育家 | +| 25634 | 全景现场 | +| 25635 | 美数课 | +| 25600 | 快看 | +| 25434 | 10% 公司 | +| 25436 | 能见度 | +| 25433 | 地产界 | +| 25438 | 财经上下游 | +| 25435 | 金改实验室 | +| 25437 | 牛市点线面 | +| 119963 | IPO 最前线 | +| 25485 | 澎湃商学院 | +| 25432 | 自贸区连线 | +| 37978 | 进博会在线 | +| 36079 | 湃客 | +| 27392 | 政务 | +| 77286 | 媒体 | +| 27234 | 科学湃 | +| 119445 | 生命科学 | +| 119447 | 未来 2% | +| 119446 | 元宇宙观察 | +| 119448 | 科创 101 | +| 119449 | 科学城邦 | +| 25444 | 社论 | +| 27224 | 澎湃评论 | +| 26525 | 思想湃 | +| 26878 | 上海书评 | +| 25483 | 思想市场 | +| 25457 | 私家历史 | +| 25574 | 翻书党 | +| 25455 | 艺术评论 | +| 26937 | 古代艺术 | +| 25450 | 文化课 | +| 25482 | 逝者 | +| 25536 | 专栏 | +| 26506 | 异次元 | +| 97313 | 海平面 | +| 103076 | 一问三知 | +| 25445 | 澎湃研究所 | +| 25446 | 全球智库 | +| 26915 | 城市漫步 | +| 25456 | 市政厅 | +| 104191 | 世界会客厅 | +| 25448 | 有戏 | +| 26609 | 文艺范 | +| 25942 | 身体 | +| 26015 | 私・奔 | +| 25599 | 运动家 | +| 25842 | 私家地理 | +| 80623 | 非常品 | +| 26862 | 楼市 | +| 25769 | 生活方式 | +| 25990 | 澎湃联播 | +| 26173 | 视界 | +| 26202 | 亲子学堂 | +| 26404 | 赢家 | +| 26490 | 汽车圈 | +| 115327 | IP SH | +| 117340 | 酒业 |`, }; async function handler(ctx) { diff --git a/lib/routes/thepetcity/index.ts b/lib/routes/thepetcity/index.ts index 3783102579b7..c191140c60d7 100644 --- a/lib/routes/thepetcity/index.ts +++ b/lib/routes/thepetcity/index.ts @@ -21,12 +21,12 @@ export const route: Route = { handler, url: 'thepetcity.co/', description: `| Column Name | TermID | - | -------------------- | ------ | - | Knowledge飼養大全 | 3 | - | Funny News毛孩趣聞 | 2 | - | Raise Pets 養寵物新手 | 5 | - | Hot Spot 毛孩打卡點 | 4 | - | Pet Staff 毛孩好物 | 1 |`, +| -------------------- | ------ | +| Knowledge飼養大全 | 3 | +| Funny News毛孩趣聞 | 2 | +| Raise Pets 養寵物新手 | 5 | +| Hot Spot 毛孩打卡點 | 4 | +| Pet Staff 毛孩好物 | 1 |`, }; async function handler(ctx) { diff --git a/lib/routes/theverge/index.ts b/lib/routes/theverge/index.ts index 18c66c70a168..607949f7fe47 100644 --- a/lib/routes/theverge/index.ts +++ b/lib/routes/theverge/index.ts @@ -26,19 +26,19 @@ export const route: Route = { maintainers: ['HenryQW', 'vbali'], handler, description: `| Hub | Hub name | - | ----------- | ------------------- | - | | All Posts | - | android | Android | - | apple | Apple | - | apps | Apps & Software | - | blackberry | BlackBerry | - | culture | Culture | - | gaming | Gaming | - | hd | HD & Home | - | microsoft | Microsoft | - | photography | Photography & Video | - | policy | Policy & Law | - | web | Web & Social | +| ----------- | ------------------- | +| | All Posts | +| android | Android | +| apple | Apple | +| apps | Apps & Software | +| blackberry | BlackBerry | +| culture | Culture | +| gaming | Gaming | +| hd | HD & Home | +| microsoft | Microsoft | +| photography | Photography & Video | +| policy | Policy & Law | +| web | Web & Social | Provides a better reading experience (full text articles) over the official one.`, }; diff --git a/lib/routes/thoughtco/index.ts b/lib/routes/thoughtco/index.ts index bea5e6cc57ca..39dc18e40970 100644 --- a/lib/routes/thoughtco/index.ts +++ b/lib/routes/thoughtco/index.ts @@ -27,299 +27,299 @@ export const route: Route = { handler, description: `#### Science, Tech, Math - | category | id | - | ---------------- | -------------------------- | - | Science | science-4132464 | - | Math | math-4133545 | - | Social Sciences | social-sciences-4133522 | - | Computer Science | computer-science-4133486 | - | Animals & Nature | animals-and-nature-4133421 | - - #### Humanities - - | category | id | - | ----------------- | --------------------------- | - | History & Culture | history-and-culture-4133356 | - | Visual Arts | visual-arts-4132957 | - | Literature | literature-4133251 | - | English | english-4688281 | - | Geography | geography-4133035 | - | Philosophy | philosophy-4133025 | - | Issues | issues-4133022 | - - #### Languages - - | category | id | - | ---------------------------- | ---------------- | - | English as a Second Language | esl-4133095 | - | Spanish | spanish-4133085 | - | French | french-4133079 | - | German | german-4133073 | - | Italian | italian-4133069 | - | Japanese | japanese-4133062 | - | Mandarin | mandarin-4133057 | - | Russian | russian-4175265 | - - #### Resources - - | category | id | - | ---------------------- | ---------------------------- | - | For Students & Parents | for-students-parents-4132588 | - | For Educators | for-educators-4132509 | - | For Adult Learners | for-adult-learners-4132469 | - -
- More categories - - #### Science - - | category | id | - | ----------------- | --------------------------- | - | Chemistry | chemistry-4133594 | - | Biology | biology-4133580 | - | Physics | physics-4133571 | - | Geology | geology-4133564 | - | Astronomy | astronomy-4133558 | - | Weather & Climate | weather-and-climate-4133550 | - - #### Math - - | category | id | - | --------------------- | ------------------------------- | - | Math Tutorials | math-tutorials-4133543 | - | Geometry | geometry-4133540 | - | Arithmetic | arithmetic-4133542 | - | Pre Algebra & Algebra | pre-algebra-and-algebra-4133541 | - | Statistics | statistics-4133539 | - | Exponential Decay | exponential-decay-4133528 | - | Worksheets By Grade | worksheets-by-grade-4133526 | - | Resources | math-resources-4133523 | - - #### Social Sciences - - | category | id | - | ----------- | ------------------- | - | Psychology | psychology-4160512 | - | Sociology | sociology-4133515 | - | Archaeology | archaeology-4133504 | - | Economics | economics-4133521 | - | Ergonomics | ergonomics-4133492 | - - #### Computer Science - - | category | id | - | ---------------------- | -------------------------------- | - | PHP Programming | php-4133485 | - | Perl | perl-4133481 | - | Python | python-4133477 | - | Java Programming | java-programming-4133478 | - | Javascript Programming | javascript-programming-4133476 | - | Delphi Programming | delphi-programming-4133475 | - | C & C++ Programming | c-and-c-plus-programming-4133470 | - | Ruby Programming | ruby-programming-4133469 | - | Visual Basic | visual-basic-4133468 | - - #### Animals and Nature - - | category | id | - | ---------------- | ------------------------ | - | Amphibians | amphibians-4133418 | - | Birds | birds-4133416 | - | Habitat Profiles | habitat-profiles-4133412 | - | Mammals | mammals-4133411 | - | Reptiles | reptiles-4133408 | - | Insects | insects-4133406 | - | Marine Life | marine-life-4133393 | - | Forestry | forestry-4133386 | - | Dinosaurs | dinosaurs-4133376 | - | Evolution | evolution-4133366 | - - #### History and Culture - - | category | id | - | ------------------------------ | ---------------------------------------- | - | American History | american-history-4133354 | - | African American History | african-american-history-4133344 | - | African History | african-history-4133338 | - | Ancient History and Culture | ancient-history-4133336 | - | Asian History | asian-history-4133325 | - | European History | european-history-4133316 | - | Genealogy | genealogy-4133308 | - | Inventions | inventions-4133303 | - | Latin American History | latin-american-history-4133296 | - | Medieval & Renaissance History | medieval-and-renaissance-history-4133289 | - | Military History | military-history-4133285 | - | The 20th Century | 20th-century-4133273 | - | Women's History | womens-history-4133260 | - - #### Visual Arts - - | category | id | - | ------------- | -------------------- | - | Art & Artists | art-4132956 | - | Architecture | architecture-4132953 | - - #### Literature - - | category | id | - | ------------------ | -------------------------- | - | Best Sellers | best-sellers-4133250 | - | Classic Literature | classic-literature-4133245 | - | Plays & Drama | plays-and-drama-4133239 | - | Poetry | poetry-4133232 | - | Quotations | quotations-4133229 | - | Shakespeare | shakespeare-4133223 | - | Short Stories | short-stories-4133217 | - | Children's Books | childrens-books-4133216 | - - #### English - - | category | id | - | --------------- | ----------------------- | - | English Grammar | english-grammar-4133049 | - | Writing | writing-4133048 | - - #### Geography - - | category | id | - | ------------------------ | ---------------------------------- | - | Basics | geography-basics-4133034 | - | Physical Geography | physical-geography-4133032 | - | Political Geography | political-geography-4133033 | - | Population | population-4133031 | - | Country Information | country-information-4133030 | - | Key Figures & Milestones | key-figures-and-milestones-4133029 | - | Maps | maps-4133027 | - | Urban Geography | urban-geography-4133026 | - - #### Philosophy - - | category | id | - | ------------------------------ | ---------------------------------------- | - | Philosophical Theories & Ideas | philosophical-theories-and-ideas-4133024 | - | Major Philosophers | major-philosophers-4133023 | - - #### Issues - - | category | id | - | --------------------------------- | -------------------------------- | - | The U. S. Government | us-government-4133021 | - | U.S. Foreign Policy | us-foreign-policy-4133010 | - | U.S. Liberal Politics | us-liberal-politics-4133009 | - | U.S. Conservative Politics | us-conservative-politics-4133006 | - | Women's Issues | womens-issues-4133002 | - | Civil Liberties | civil-liberties-4132996 | - | The Middle East | middle-east-4132989 | - | Race Relations | race-relations-4132982 | - | Immigration | immigration-4132977 | - | Crime & Punishment | crime-and-punishment-4132972 | - | Canadian Government | canadian-government-4132959 | - | Understanding Types of Government | types-of-government-5179107 | - - #### English as a Second Language - - | category | id | - | ---------------------------- | ------------------------------------------ | - | Pronunciation & Conversation | esl-pronunciation-and-conversation-4133093 | - | Vocabulary | esl-vocabulary-4133092 | - | Writing Skills | esl-writing-skills-4133091 | - | Reading Comprehension | esl-reading-comprehension-4133090 | - | Grammar | esl-grammar-4133089 | - | Business English | esl-business-english-4133088 | - | Resources for Teachers | resources-for-esl-teachers-4133087 | - - #### Spanish - - | category | id | - | ----------------- | ----------------------------------- | - | History & Culture | spanish-history-and-culture-4133084 | - | Pronunciation | spanish-pronunciation-4133083 | - | Vocabulary | spanish-vocabulary-4133082 | - | Writing Skills | spanish-writing-skills-4133081 | - | Grammar | spanish-grammar-4133080 | - - #### French - - | category | id | - | ---------------------------- | -------------------------------------------- | - | Pronunciation & Conversation | french-pronunciation-4133075 | - | Vocabulary | french-vocabulary-4133076 | - | Grammar | french-grammar-4133074 | - | Resources For Teachers | french-resources-for-french-teachers-4133077 | - - #### German - - | category | id | - | ---------------------------- | ---------------------------------- | - | History & Culture | german-history-and-culture-4133071 | - | Pronunciation & Conversation | german-pronunciation-4133070 | - | Vocabulary | german-vocabulary-4133068 | - | Grammar | german-grammar-4133067 | - - #### Italian - - | category | id | - | ----------------- | ----------------------------------- | - | History & Culture | italian-history-and-culture-4133065 | - | Vocabulary | italian-vocabulary-4133061 | - | Grammar | italian-grammar-4133063 | - - #### Japanese - - | category | id | - | ----------------------------- | ------------------------------------ | - | History & Culture | japanese-history-and-culture-4133058 | - | Essential Japanese Vocabulary | japanese-vocabulary-4133060 | - | Japanese Grammar | japanese-grammar-4133056 | - - #### Mandarin - - | category | id | - | -------------------------------- | ---------------------------------------- | - | Mandarin History and Culture | mandarin-history-and-culture-4133054 | - | Pronunciation | mandarin-pronunciation-4133053 | - | Vocabulary | mandarin-vocabulary-4133052 | - | Understanding Chinese Characters | understanding-chinese-characters-4133051 | - - #### Russian - - | category | id | - | -------- | --------------- | - | Russian | russian-4175265 | - - #### For Students & Parents - - | category | id | - | ------------------ | -------------------------- | - | Homework Help | homework-help-4132587 | - | Private School | private-school-4132514 | - | Test Prep | test-prep-4132578 | - | College Admissions | college-admissions-4132565 | - | College Life | college-life-4132553 | - | Graduate School | graduate-school-4132543 | - | Business School | business-school-4132536 | - | Law School | law-school-4132527 | - | Distance Learning | distance-learning-4132521 | - - #### For Educators - - | category | id | - | -------------------- | ----------------------------- | - | Becoming A Teacher | becoming-a-teacher-4132510 | - | Assessments & Tests | assessments-and-tests-4132508 | - | Elementary Education | elementary-education-4132507 | - | Secondary Education | secondary-education-4132504 | - | Special Education | special-education-4132499 | - | Teaching | teaching-4132488 | - | Homeschooling | homeschooling-4132480 | - - #### For Adult Learners - - | category | id | - | ----------------------- | ------------------------------- | - | Tips For Adult Students | tips-for-adult-students-4132468 | - | Getting Your Ged | getting-your-ged-4132466 | -
`, +| category | id | +| ---------------- | -------------------------- | +| Science | science-4132464 | +| Math | math-4133545 | +| Social Sciences | social-sciences-4133522 | +| Computer Science | computer-science-4133486 | +| Animals & Nature | animals-and-nature-4133421 | + +#### Humanities + +| category | id | +| ----------------- | --------------------------- | +| History & Culture | history-and-culture-4133356 | +| Visual Arts | visual-arts-4132957 | +| Literature | literature-4133251 | +| English | english-4688281 | +| Geography | geography-4133035 | +| Philosophy | philosophy-4133025 | +| Issues | issues-4133022 | + +#### Languages + +| category | id | +| ---------------------------- | ---------------- | +| English as a Second Language | esl-4133095 | +| Spanish | spanish-4133085 | +| French | french-4133079 | +| German | german-4133073 | +| Italian | italian-4133069 | +| Japanese | japanese-4133062 | +| Mandarin | mandarin-4133057 | +| Russian | russian-4175265 | + +#### Resources + +| category | id | +| ---------------------- | ---------------------------- | +| For Students & Parents | for-students-parents-4132588 | +| For Educators | for-educators-4132509 | +| For Adult Learners | for-adult-learners-4132469 | + +
+More categories + +#### Science + +| category | id | +| ----------------- | --------------------------- | +| Chemistry | chemistry-4133594 | +| Biology | biology-4133580 | +| Physics | physics-4133571 | +| Geology | geology-4133564 | +| Astronomy | astronomy-4133558 | +| Weather & Climate | weather-and-climate-4133550 | + +#### Math + +| category | id | +| --------------------- | ------------------------------- | +| Math Tutorials | math-tutorials-4133543 | +| Geometry | geometry-4133540 | +| Arithmetic | arithmetic-4133542 | +| Pre Algebra & Algebra | pre-algebra-and-algebra-4133541 | +| Statistics | statistics-4133539 | +| Exponential Decay | exponential-decay-4133528 | +| Worksheets By Grade | worksheets-by-grade-4133526 | +| Resources | math-resources-4133523 | + +#### Social Sciences + +| category | id | +| ----------- | ------------------- | +| Psychology | psychology-4160512 | +| Sociology | sociology-4133515 | +| Archaeology | archaeology-4133504 | +| Economics | economics-4133521 | +| Ergonomics | ergonomics-4133492 | + +#### Computer Science + +| category | id | +| ---------------------- | -------------------------------- | +| PHP Programming | php-4133485 | +| Perl | perl-4133481 | +| Python | python-4133477 | +| Java Programming | java-programming-4133478 | +| Javascript Programming | javascript-programming-4133476 | +| Delphi Programming | delphi-programming-4133475 | +| C & C++ Programming | c-and-c-plus-programming-4133470 | +| Ruby Programming | ruby-programming-4133469 | +| Visual Basic | visual-basic-4133468 | + +#### Animals and Nature + +| category | id | +| ---------------- | ------------------------ | +| Amphibians | amphibians-4133418 | +| Birds | birds-4133416 | +| Habitat Profiles | habitat-profiles-4133412 | +| Mammals | mammals-4133411 | +| Reptiles | reptiles-4133408 | +| Insects | insects-4133406 | +| Marine Life | marine-life-4133393 | +| Forestry | forestry-4133386 | +| Dinosaurs | dinosaurs-4133376 | +| Evolution | evolution-4133366 | + +#### History and Culture + +| category | id | +| ------------------------------ | ---------------------------------------- | +| American History | american-history-4133354 | +| African American History | african-american-history-4133344 | +| African History | african-history-4133338 | +| Ancient History and Culture | ancient-history-4133336 | +| Asian History | asian-history-4133325 | +| European History | european-history-4133316 | +| Genealogy | genealogy-4133308 | +| Inventions | inventions-4133303 | +| Latin American History | latin-american-history-4133296 | +| Medieval & Renaissance History | medieval-and-renaissance-history-4133289 | +| Military History | military-history-4133285 | +| The 20th Century | 20th-century-4133273 | +| Women's History | womens-history-4133260 | + +#### Visual Arts + +| category | id | +| ------------- | -------------------- | +| Art & Artists | art-4132956 | +| Architecture | architecture-4132953 | + +#### Literature + +| category | id | +| ------------------ | -------------------------- | +| Best Sellers | best-sellers-4133250 | +| Classic Literature | classic-literature-4133245 | +| Plays & Drama | plays-and-drama-4133239 | +| Poetry | poetry-4133232 | +| Quotations | quotations-4133229 | +| Shakespeare | shakespeare-4133223 | +| Short Stories | short-stories-4133217 | +| Children's Books | childrens-books-4133216 | + +#### English + +| category | id | +| --------------- | ----------------------- | +| English Grammar | english-grammar-4133049 | +| Writing | writing-4133048 | + +#### Geography + +| category | id | +| ------------------------ | ---------------------------------- | +| Basics | geography-basics-4133034 | +| Physical Geography | physical-geography-4133032 | +| Political Geography | political-geography-4133033 | +| Population | population-4133031 | +| Country Information | country-information-4133030 | +| Key Figures & Milestones | key-figures-and-milestones-4133029 | +| Maps | maps-4133027 | +| Urban Geography | urban-geography-4133026 | + +#### Philosophy + +| category | id | +| ------------------------------ | ---------------------------------------- | +| Philosophical Theories & Ideas | philosophical-theories-and-ideas-4133024 | +| Major Philosophers | major-philosophers-4133023 | + +#### Issues + +| category | id | +| --------------------------------- | -------------------------------- | +| The U. S. Government | us-government-4133021 | +| U.S. Foreign Policy | us-foreign-policy-4133010 | +| U.S. Liberal Politics | us-liberal-politics-4133009 | +| U.S. Conservative Politics | us-conservative-politics-4133006 | +| Women's Issues | womens-issues-4133002 | +| Civil Liberties | civil-liberties-4132996 | +| The Middle East | middle-east-4132989 | +| Race Relations | race-relations-4132982 | +| Immigration | immigration-4132977 | +| Crime & Punishment | crime-and-punishment-4132972 | +| Canadian Government | canadian-government-4132959 | +| Understanding Types of Government | types-of-government-5179107 | + +#### English as a Second Language + +| category | id | +| ---------------------------- | ------------------------------------------ | +| Pronunciation & Conversation | esl-pronunciation-and-conversation-4133093 | +| Vocabulary | esl-vocabulary-4133092 | +| Writing Skills | esl-writing-skills-4133091 | +| Reading Comprehension | esl-reading-comprehension-4133090 | +| Grammar | esl-grammar-4133089 | +| Business English | esl-business-english-4133088 | +| Resources for Teachers | resources-for-esl-teachers-4133087 | + +#### Spanish + +| category | id | +| ----------------- | ----------------------------------- | +| History & Culture | spanish-history-and-culture-4133084 | +| Pronunciation | spanish-pronunciation-4133083 | +| Vocabulary | spanish-vocabulary-4133082 | +| Writing Skills | spanish-writing-skills-4133081 | +| Grammar | spanish-grammar-4133080 | + +#### French + +| category | id | +| ---------------------------- | -------------------------------------------- | +| Pronunciation & Conversation | french-pronunciation-4133075 | +| Vocabulary | french-vocabulary-4133076 | +| Grammar | french-grammar-4133074 | +| Resources For Teachers | french-resources-for-french-teachers-4133077 | + +#### German + +| category | id | +| ---------------------------- | ---------------------------------- | +| History & Culture | german-history-and-culture-4133071 | +| Pronunciation & Conversation | german-pronunciation-4133070 | +| Vocabulary | german-vocabulary-4133068 | +| Grammar | german-grammar-4133067 | + +#### Italian + +| category | id | +| ----------------- | ----------------------------------- | +| History & Culture | italian-history-and-culture-4133065 | +| Vocabulary | italian-vocabulary-4133061 | +| Grammar | italian-grammar-4133063 | + +#### Japanese + +| category | id | +| ----------------------------- | ------------------------------------ | +| History & Culture | japanese-history-and-culture-4133058 | +| Essential Japanese Vocabulary | japanese-vocabulary-4133060 | +| Japanese Grammar | japanese-grammar-4133056 | + +#### Mandarin + +| category | id | +| -------------------------------- | ---------------------------------------- | +| Mandarin History and Culture | mandarin-history-and-culture-4133054 | +| Pronunciation | mandarin-pronunciation-4133053 | +| Vocabulary | mandarin-vocabulary-4133052 | +| Understanding Chinese Characters | understanding-chinese-characters-4133051 | + +#### Russian + +| category | id | +| -------- | --------------- | +| Russian | russian-4175265 | + +#### For Students & Parents + +| category | id | +| ------------------ | -------------------------- | +| Homework Help | homework-help-4132587 | +| Private School | private-school-4132514 | +| Test Prep | test-prep-4132578 | +| College Admissions | college-admissions-4132565 | +| College Life | college-life-4132553 | +| Graduate School | graduate-school-4132543 | +| Business School | business-school-4132536 | +| Law School | law-school-4132527 | +| Distance Learning | distance-learning-4132521 | + +#### For Educators + +| category | id | +| -------------------- | ----------------------------- | +| Becoming A Teacher | becoming-a-teacher-4132510 | +| Assessments & Tests | assessments-and-tests-4132508 | +| Elementary Education | elementary-education-4132507 | +| Secondary Education | secondary-education-4132504 | +| Special Education | special-education-4132499 | +| Teaching | teaching-4132488 | +| Homeschooling | homeschooling-4132480 | + +#### For Adult Learners + +| category | id | +| ----------------------- | ------------------------------- | +| Tips For Adult Students | tips-for-adult-students-4132468 | +| Getting Your Ged | getting-your-ged-4132466 | +
`, }; async function handler(ctx) { diff --git a/lib/routes/timednews/news.ts b/lib/routes/timednews/news.ts index 33c7b86a064d..da5f2febbbcd 100644 --- a/lib/routes/timednews/news.ts +++ b/lib/routes/timednews/news.ts @@ -71,9 +71,9 @@ export const route: Route = { handler, description: `子分类 - | 全部 | 时政 | 财经 | 科技 | 社会 | 体娱 | 国际 | 美国 | 中国 | 欧洲 | 评论 | - | ---- | -------------- | ------- | ---------- | ------ | ------ | ------------- | ---- | ---- | ------ | -------- | - | all | currentAffairs | finance | technology | social | sports | international | usa | cn | europe | comments |`, +| 全部 | 时政 | 财经 | 科技 | 社会 | 体娱 | 国际 | 美国 | 中国 | 欧洲 | 评论 | +| ---- | -------------- | ------- | ---------- | ------ | ------ | ------------- | ---- | ---- | ------ | -------- | +| all | currentAffairs | finance | technology | social | sports | international | usa | cn | europe | comments |`, }; async function handler(ctx) { diff --git a/lib/routes/tingshuitz/changsha.ts b/lib/routes/tingshuitz/changsha.ts index aa4fa2ab198f..98ed6d5b9b6d 100644 --- a/lib/routes/tingshuitz/changsha.ts +++ b/lib/routes/tingshuitz/changsha.ts @@ -22,10 +22,10 @@ export const route: Route = { handler, description: `可能仅限于中国大陆服务器访问,以实际情况为准。 - | channelId | 分类 | - | --------- | -------- | - | 78 | 计划停水 | - | 157 | 抢修停水 |`, +| channelId | 分类 | +| --------- | -------- | +| 78 | 计划停水 | +| 157 | 抢修停水 |`, }; async function handler(ctx) { diff --git a/lib/routes/tju/cic/index.ts b/lib/routes/tju/cic/index.ts index 541b00c31327..a96297fa6e3d 100644 --- a/lib/routes/tju/cic/index.ts +++ b/lib/routes/tju/cic/index.ts @@ -33,8 +33,8 @@ export const route: Route = { maintainers: ['AlanZeng423', 'SuperPung'], handler, description: `| College News | Notification | TJU Forum for CIC | - | :----------: | :----------: | :---------------: | - | news | notification | forum |`, +| :----------: | :----------: | :---------------: | +| news | notification | forum |`, }; async function handler(ctx) { diff --git a/lib/routes/tju/news/index.ts b/lib/routes/tju/news/index.ts index 2f0047b8448a..eb4d5c1efa8b 100644 --- a/lib/routes/tju/news/index.ts +++ b/lib/routes/tju/news/index.ts @@ -35,8 +35,8 @@ export const route: Route = { maintainers: ['AlanZeng423', 'SuperPung'], handler, description: `| Focus on TJU | General News | Internal News | Media Report | Pictures of TJU | - | :----------: | :----------: | :-----------: | :----------: | :-------------: | - | focus | general | internal | media | picture |`, +| :----------: | :----------: | :-----------: | :----------: | :-------------: | +| focus | general | internal | media | picture |`, }; async function handler(ctx) { diff --git a/lib/routes/tju/oaa/index.ts b/lib/routes/tju/oaa/index.ts index 3ed6212b900b..21dc91093cad 100644 --- a/lib/routes/tju/oaa/index.ts +++ b/lib/routes/tju/oaa/index.ts @@ -40,8 +40,8 @@ export const route: Route = { maintainers: ['AlanZeng423', 'AmosChenYQ', 'SuperPung'], handler, description: `| News | Notification | - | :--: | :----------: | - | news | notification |`, +| :--: | :----------: | +| news | notification |`, }; async function handler(ctx) { diff --git a/lib/routes/tju/yzb/index.ts b/lib/routes/tju/yzb/index.ts index 013fdc0d1773..09e4abadc193 100644 --- a/lib/routes/tju/yzb/index.ts +++ b/lib/routes/tju/yzb/index.ts @@ -36,8 +36,8 @@ export const route: Route = { maintainers: ['SuperPung'], handler, description: `| School-level Notice | Master | Doctor | On-the-job Degree | - | :-----------------: | :----: | :----: | :---------------: | - | notice | master | doctor | job |`, +| :-----------------: | :----: | :----: | :---------------: | +| notice | master | doctor | job |`, }; async function handler(ctx) { diff --git a/lib/routes/tokeninsight/report.ts b/lib/routes/tokeninsight/report.ts index e4182e4c7257..68eee16f9bd1 100644 --- a/lib/routes/tokeninsight/report.ts +++ b/lib/routes/tokeninsight/report.ts @@ -31,9 +31,9 @@ export const route: Route = { handler, description: `Language: - | Chinese | English | - | ------- | ------- | - | zh | en |`, +| Chinese | English | +| ------- | ------- | +| zh | en |`, }; async function handler(ctx) { diff --git a/lib/routes/tongji/sse/notice.ts b/lib/routes/tongji/sse/notice.ts index 920441bba539..87beaf7b79b8 100644 --- a/lib/routes/tongji/sse/notice.ts +++ b/lib/routes/tongji/sse/notice.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['sgqy'], handler, description: `| 本科生通知 | 研究生通知 | 教工通知 | 全体通知 | 学院通知 | 学院新闻 | 学院活动 | - | ---------- | ---------- | -------- | -------- | -------- | -------- | -------- | - | bkstz | yjstz | jgtz | qttz | xytz | xyxw | xyhd | +| ---------- | ---------- | -------- | -------- | -------- | -------- | -------- | +| bkstz | yjstz | jgtz | qttz | xytz | xyxw | xyhd | 注意: \`qttz\` 与 \`xytz\` 在原网站等价.`, }; diff --git a/lib/routes/topys/index.ts b/lib/routes/topys/index.ts index 2fb933d31bc4..1428fb3d91e1 100644 --- a/lib/routes/topys/index.ts +++ b/lib/routes/topys/index.ts @@ -26,7 +26,7 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 创意 | 设计 | 商业 | 艺术 | 文化 | 科技 | - | ---- | ---- | ---- | ---- | ---- | ---- |`, +| ---- | ---- | ---- | ---- | ---- | ---- |`, }; async function handler(ctx) { diff --git a/lib/routes/tsinghua/lib/zydt.ts b/lib/routes/tsinghua/lib/zydt.ts index 29c6806aa49e..6083c27f2afb 100644 --- a/lib/routes/tsinghua/lib/zydt.ts +++ b/lib/routes/tsinghua/lib/zydt.ts @@ -86,9 +86,9 @@ export const route: Route = { 若订阅 [清华大学图书馆已购资源动态](https://lib.tsinghua.edu.cn/zydt/yg.htm),网址为 \`https://lib.tsinghua.edu.cn/zydt/yg.htm\`。截取 \`https://lib.tsinghua.edu.cn/zydt\` 到末尾 \`.htm\` 的部分 \`yg\` 作为参数填入,此时路由为 [\`/tsinghua/lib/zydt/yg\`](https://rsshub.app/tsinghua/lib/zydt/yg)。 ::: - | 已购 | 试用 | - | ---- | ---- | - | yg | sy | +| 已购 | 试用 | +| ---- | ---- | +| yg | sy | `, categories: ['university'], diff --git a/lib/routes/tvb/news.ts b/lib/routes/tvb/news.ts index d0171155d8af..6222fd42a79e 100644 --- a/lib/routes/tvb/news.ts +++ b/lib/routes/tvb/news.ts @@ -69,15 +69,15 @@ export const route: Route = { handler, description: `分类 - | 要聞 | 快訊 | 港澳 | 兩岸 | 國際 | 財經 | 體育 | 法庭 | 天氣 | - | ----- | ------- | ----- | ------------ | ----- | ------- | ------ | ---------- | ------- | - | focus | instant | local | greaterchina | world | finance | sports | parliament | weather | +| 要聞 | 快訊 | 港澳 | 兩岸 | 國際 | 財經 | 體育 | 法庭 | 天氣 | +| ----- | ------- | ----- | ------------ | ----- | ------- | ------ | ---------- | ------- | +| focus | instant | local | greaterchina | world | finance | sports | parliament | weather | 语言 - | 繁 | 简 | - | -- | -- | - | tc | sc |`, +| 繁 | 简 | +| -- | -- | +| tc | sc |`, }; async function handler(ctx) { diff --git a/lib/routes/tvtropes/featured.ts b/lib/routes/tvtropes/featured.ts index 69586bb9abf3..2b30e1343a00 100644 --- a/lib/routes/tvtropes/featured.ts +++ b/lib/routes/tvtropes/featured.ts @@ -29,8 +29,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| Today's Featured Trope | Newest Trope | - | ---------------------- | ------------ | - | today | newest |`, +| ---------------------- | ------------ | +| today | newest |`, }; async function handler(ctx) { diff --git a/lib/routes/txrjy/fornumtopic.ts b/lib/routes/txrjy/fornumtopic.ts index f384ff1842f5..e4e186930d2a 100644 --- a/lib/routes/txrjy/fornumtopic.ts +++ b/lib/routes/txrjy/fornumtopic.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| 最新 500 个主题帖 | 最新 500 个回复帖 | 最新精华帖 | 最新精华帖 | 一周热帖 | 本月热帖 | - | :---------------: | :---------------: | :--------: | :--------: | :------: | :------: | - | 1 | 2 | 3 | 4 | 5 | 6 |`, +| :---------------: | :---------------: | :--------: | :--------: | :------: | :------: | +| 1 | 2 | 3 | 4 | 5 | 6 |`, }; async function handler(ctx) { diff --git a/lib/routes/ucas/index.ts b/lib/routes/ucas/index.ts index 96ee2e13a665..38556a613e5b 100644 --- a/lib/routes/ucas/index.ts +++ b/lib/routes/ucas/index.ts @@ -37,8 +37,8 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| 招聘类型 | 博士后 | 课题项目聘用 | 管理支撑人才 | 教学科研人才 | - | :------: | :----: | :----------: | :----------: | :----------: | - | 参数 | bsh | ktxmpy | glzcrc | jxkyrc |`, +| :------: | :----: | :----------: | :----------: | :----------: | +| 参数 | bsh | ktxmpy | glzcrc | jxkyrc |`, }; async function handler(ctx) { diff --git a/lib/routes/udn/breaking-news.ts b/lib/routes/udn/breaking-news.ts index 8653402d0341..04a007e5f5b9 100644 --- a/lib/routes/udn/breaking-news.ts +++ b/lib/routes/udn/breaking-news.ts @@ -32,8 +32,8 @@ export const route: Route = { maintainers: ['miles170'], handler, description: `| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 99 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | - | 精選 | 要聞 | 社會 | 地方 | 兩岸 | 國際 | 財經 | 運動 | 娛樂 | 生活 | 股市 | 文教 | 數位 | 不分類 |`, +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | +| 精選 | 要聞 | 社會 | 地方 | 兩岸 | 國際 | 財經 | 運動 | 娛樂 | 生活 | 股市 | 文教 | 數位 | 不分類 |`, }; async function handler(ctx) { diff --git a/lib/routes/udn/global/index.ts b/lib/routes/udn/global/index.ts index 436a2e27d03a..48401f8b9aad 100644 --- a/lib/routes/udn/global/index.ts +++ b/lib/routes/udn/global/index.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 首頁 | 最新文章 | 熱門文章 | - | ---- | -------- | -------- | - | | new | hot |`, +| ---- | -------- | -------- | +| | new | hot |`, }; async function handler(ctx) { diff --git a/lib/routes/udn/global/tag.ts b/lib/routes/udn/global/tag.ts index 679a59ef5d5d..31de80e4a125 100644 --- a/lib/routes/udn/global/tag.ts +++ b/lib/routes/udn/global/tag.ts @@ -26,7 +26,7 @@ export const route: Route = { maintainers: ['emdoe', 'nczitzk'], handler, description: `| 過去 24 小時 | 鏡頭背後 | 深度專欄 | 重磅廣播 | - | ------------ | -------- | -------- | -------- |`, +| ------------ | -------- | -------- | -------- |`, }; async function handler(ctx) { diff --git a/lib/routes/uestc/cqe.ts b/lib/routes/uestc/cqe.ts index 9d3db276117b..adb9265e95bb 100644 --- a/lib/routes/uestc/cqe.ts +++ b/lib/routes/uestc/cqe.ts @@ -40,8 +40,8 @@ export const route: Route = { handler, url: 'cqe.uestc.edu.cn/', description: `| 活动预告 | 通知公告 | - | -------- | -------- | - | hdyg | tzgg |`, +| -------- | -------- | +| hdyg | tzgg |`, }; async function handler(ctx) { diff --git a/lib/routes/uestc/gr.ts b/lib/routes/uestc/gr.ts index 36e39cecdc91..8ebe51475ac6 100644 --- a/lib/routes/uestc/gr.ts +++ b/lib/routes/uestc/gr.ts @@ -51,9 +51,9 @@ export const route: Route = { handler, url: 'gr.uestc.edu.cn/', description: `\ - | 重要公告 | 教学管理 | 学位管理 | 学生管理 | 就业实践 | - | --------- | -------- | -------- | -------- | -------- | - | important | teaching | degree | student | practice |`, +| 重要公告 | 教学管理 | 学位管理 | 学生管理 | 就业实践 | +| --------- | -------- | -------- | -------- | -------- | +| important | teaching | degree | student | practice |`, }; async function handler(ctx: Context): Promise { diff --git a/lib/routes/uestc/jwc.ts b/lib/routes/uestc/jwc.ts index f310aa15f4cd..301a1e2573e5 100644 --- a/lib/routes/uestc/jwc.ts +++ b/lib/routes/uestc/jwc.ts @@ -52,9 +52,9 @@ export const route: Route = { handler, url: 'www.jwc.uestc.edu.cn/', description: `\ - | 重要公告 | 学生事务公告 | 教师事务公告 | 教学新闻 | 办公室 | - | --------- | ------------ | ------------ | -------- | ------ | - | important | student | teacher | teaching | office |`, +| 重要公告 | 学生事务公告 | 教师事务公告 | 教学新闻 | 办公室 | +| --------- | ------------ | ------------ | -------- | ------ | +| important | student | teacher | teaching | office |`, }; async function handler(ctx: Context): Promise { diff --git a/lib/routes/uestc/news.ts b/lib/routes/uestc/news.ts index a602a1b1409f..472c3cc1ab56 100644 --- a/lib/routes/uestc/news.ts +++ b/lib/routes/uestc/news.ts @@ -38,8 +38,8 @@ export const route: Route = { handler, url: 'news.uestc.edu.cn/', description: `| 学术 | 文化 | 公告 | 校内通知 | - | ------- | ------- | ------------ | ------------ | - | academy | culture | announcement | notification |`, +| ------- | ------- | ------------ | ------------ | +| academy | culture | announcement | notification |`, }; async function handler(ctx) { diff --git a/lib/routes/uestc/sise.ts b/lib/routes/uestc/sise.ts index de987645646b..f20454edfb6b 100644 --- a/lib/routes/uestc/sise.ts +++ b/lib/routes/uestc/sise.ts @@ -55,8 +55,8 @@ export const route: Route = { handler, url: 'sise.uestc.edu.cn/', description: `| 最新 | 院办 | 学生科 | 教务科 | 研管科 | 组织 | 人事 | 实践教育中心 | Int'I | - | ---- | ---- | ------ | ------ | ------ | ---- | ---- | ------------ | ----- | - | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |`, +| ---- | ---- | ------ | ------ | ------ | ---- | ---- | ------------ | ----- | +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |`, }; async function handler(ctx) { diff --git a/lib/routes/ulapia/index.ts b/lib/routes/ulapia/index.ts index 0182e6af6d0f..b41165a0e346 100644 --- a/lib/routes/ulapia/index.ts +++ b/lib/routes/ulapia/index.ts @@ -40,8 +40,8 @@ export const route: Route = { maintainers: ['Fatpandac'], handler, description: `| 个股研报 | 行业研报 | 策略研报 | 宏观研报 | 新股研报 | 券商晨报(今日晨报) | - | :-------------: | :----------------: | :----------------: | :-------------: | :-----------: | :------------------: | - | stock\_research | industry\_research | strategy\_research | macro\_research | ipo\_research | brokerage\_news |`, +| :-------------: | :----------------: | :----------------: | :-------------: | :-----------: | :------------------: | +| stock\_research | industry\_research | strategy\_research | macro\_research | ipo\_research | brokerage\_news |`, }; async function handler(ctx) { diff --git a/lib/routes/upc/jsj.ts b/lib/routes/upc/jsj.ts index 44ea81ee06dc..4092d3732363 100644 --- a/lib/routes/upc/jsj.ts +++ b/lib/routes/upc/jsj.ts @@ -43,8 +43,8 @@ export const route: Route = { maintainers: ['Veagau'], handler, description: `| 学院新闻 | 学术关注 | 学工动态 | 通知公告 | - | -------- | -------- | -------- | -------- | - | news | scholar | states | notice |`, +| -------- | -------- | -------- | -------- | +| news | scholar | states | notice |`, }; async function handler(ctx) { diff --git a/lib/routes/upc/jwc.ts b/lib/routes/upc/jwc.ts index e96772d2551a..65f35b6090af 100644 --- a/lib/routes/upc/jwc.ts +++ b/lib/routes/upc/jwc.ts @@ -114,8 +114,8 @@ export const route: Route = { name: '教务处通知公告', maintainers: ['sddzhyc'], description: `| 所有通知 | 教学·运行 | 学业·学籍 | 教学·研究 | 课程·教材 | 实践·教学 | 创新·创业 | 语言·文字 | 继续·教育 | 本科·招生 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | tzgg | 18519 | 18520 | 18521 | 18522 | 18523 | 18524 | yywwz | jxwjy | bkwzs |`, +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| tzgg | 18519 | 18520 | 18521 | 18522 | 18523 | 18524 | yywwz | jxwjy | bkwzs |`, url: 'jwc.upc.edu.cn/tzgg/list.htm', handler, }; diff --git a/lib/routes/upc/main.ts b/lib/routes/upc/main.ts index 8e5d387d1904..b308fee8d284 100644 --- a/lib/routes/upc/main.ts +++ b/lib/routes/upc/main.ts @@ -34,8 +34,8 @@ export const route: Route = { maintainers: ['Veagau'], handler, description: `| 通知公告 | 学术动态 | - | -------- | -------- | - | notice | scholar |`, +| -------- | -------- | +| notice | scholar |`, }; async function handler(ctx) { diff --git a/lib/routes/uptimerobot/rss.ts b/lib/routes/uptimerobot/rss.ts index 46f174f5d74b..65bd97d94dd0 100644 --- a/lib/routes/uptimerobot/rss.ts +++ b/lib/routes/uptimerobot/rss.ts @@ -81,8 +81,8 @@ export const route: Route = { maintainers: ['Rongronggg9'], handler, description: `| Key | Description | Accepts | Defaults to | - | ------ | ------------------------------------------------------------------------ | -------------- | ----------- | - | showID | Show monitor ID (disabling it will also disable link for each RSS entry) | 0/1/true/false | true |`, +| ------ | ------------------------------------------------------------------------ | -------------- | ----------- | +| showID | Show monitor ID (disabling it will also disable link for each RSS entry) | 0/1/true/false | true |`, }; async function handler(ctx) { diff --git a/lib/routes/usepanda/index.ts b/lib/routes/usepanda/index.ts index aad60e226f0a..3ef3a4a132e3 100644 --- a/lib/routes/usepanda/index.ts +++ b/lib/routes/usepanda/index.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: ['lyrl'], handler, description: `| Channel | feedId | - | ------- | ------------------------ | - | Github | 5718e53e7a84fb1901e059cc |`, +| ------- | ------------------------ | +| Github | 5718e53e7a84fb1901e059cc |`, }; async function handler(ctx) { diff --git a/lib/routes/ustb/tj/news.ts b/lib/routes/ustb/tj/news.ts index c71ef2e08711..294239e35898 100644 --- a/lib/routes/ustb/tj/news.ts +++ b/lib/routes/ustb/tj/news.ts @@ -48,8 +48,8 @@ export const route: Route = { maintainers: ['henbf'], handler, description: `| 全部 | 学院新闻 | 学术活动 | 城市建设学院 | 信息工程学院 | 经济学院 | 管理学院 | 材料系 | 机械工程系 | 护理系 | 法律系 | 外语系 | 艺术系 | - | ---- | -------- | -------- | ------------ | ------------ | -------- | -------- | ------ | ---------- | ------ | ------ | ------ | ------ | - | all | xyxw | xshhd | csjsxy | xxgcxy | jjx | glxy | clx | jxgcx | hlx | flx | wyx | ysx |`, +| ---- | -------- | -------- | ------------ | ------------ | -------- | -------- | ------ | ---------- | ------ | ------ | ------ | ------ | +| all | xyxw | xshhd | csjsxy | xxgcxy | jjx | glxy | clx | jxgcx | hlx | flx | wyx | ysx |`, }; async function handler(ctx) { diff --git a/lib/routes/ustb/yjsy/news.ts b/lib/routes/ustb/yjsy/news.ts index 9968f1645ace..22e3a2aff518 100644 --- a/lib/routes/ustb/yjsy/news.ts +++ b/lib/routes/ustb/yjsy/news.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['DA1Y1'], handler, description: `| 北京科技大学研究生院 | 土木与资源工程学院 | 能源与环境工程学院 | 冶金与生态工程学院 | 材料科学与工程学院 | 机械工程学院 | 自动化学院 | 计算机与通信工程学院 | 数理学院 | 化学与生物工程学院 | 经济管理学院 | 文法学院 | 马克思主义学院 | 外国语学院 | 国家材料服役安全科学中心 | 新金属材料国家重点实验室 | 工程技术研究院 | 钢铁共性技术协同创新中心 | 钢铁冶金新技术国家重点实验室 | 新材料技术研究院 | 科技史与文化遗产研究院 | 顺德研究生院 | - | -------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------ | ---------- | -------------------- | -------- | ------------------ | ------------ | -------- | -------------- | ---------- | ------------------------ | ------------------------ | -------------- | ------------------------ | ---------------------------- | ---------------- | ---------------------- | ------------ | - | all | cres | seee | metall | mse | me | saee | scce | shuli | huasheng | sem | wenfa | marx | sfs | ncms | skl | iet | cicst | slam | adma | ihmm | sd |`, +| -------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------ | ---------- | -------------------- | -------- | ------------------ | ------------ | -------- | -------------- | ---------- | ------------------------ | ------------------------ | -------------- | ------------------------ | ---------------------------- | ---------------- | ---------------------- | ------------ | +| all | cres | seee | metall | mse | me | saee | scce | shuli | huasheng | sem | wenfa | marx | sfs | ncms | skl | iet | cicst | slam | adma | ihmm | sd |`, }; async function handler(ctx) { diff --git a/lib/routes/ustc/eeis.ts b/lib/routes/ustc/eeis.ts index 85d532d5ba70..e155d0a6f849 100644 --- a/lib/routes/ustc/eeis.ts +++ b/lib/routes/ustc/eeis.ts @@ -37,8 +37,8 @@ export const route: Route = { handler, url: 'eeis.ustc.edu.cn/', description: `| 通知公告 | 新闻信息 | - | -------- | -------- | - | tzgg | xwxx |`, +| -------- | -------- | +| tzgg | xwxx |`, }; async function handler(ctx) { diff --git a/lib/routes/ustc/gs.ts b/lib/routes/ustc/gs.ts index b5cfb55b0200..8dbd4e08c554 100644 --- a/lib/routes/ustc/gs.ts +++ b/lib/routes/ustc/gs.ts @@ -37,8 +37,8 @@ export const route: Route = { handler, url: 'gradschool.ustc.edu.cn/', description: `| 通知公告 | 新闻动态 | - | -------- | -------- | - | tzgg | xwdt |`, +| -------- | -------- | +| tzgg | xwdt |`, }; async function handler(ctx) { diff --git a/lib/routes/ustc/index.ts b/lib/routes/ustc/index.ts index 07bba24d8419..dc9557552639 100644 --- a/lib/routes/ustc/index.ts +++ b/lib/routes/ustc/index.ts @@ -51,8 +51,8 @@ export const route: Route = { handler, url: 'ustc.edu.cn/', description: `| 教学类 | 科研类 | 管理类 | 服务类 | - | ------ | ------ | ------ | ------ | - | jx | ky | gl | fw |`, +| ------ | ------ | ------ | ------ | +| jx | ky | gl | fw |`, }; async function handler(ctx) { diff --git a/lib/routes/ustc/job.ts b/lib/routes/ustc/job.ts index ea0e27adeb22..0e0b0d546a71 100644 --- a/lib/routes/ustc/job.ts +++ b/lib/routes/ustc/job.ts @@ -34,8 +34,8 @@ export const route: Route = { handler, url: 'job.ustc.edu.cn/', description: `| 专场招聘会 | 校园双选会 | 空中宣讲 | 招聘公告 | - | ----------- | ------------ | --------- | -------- | - | RecruitList | Doublechoice | Broadcast | joblist2 |`, +| ----------- | ------------ | --------- | -------- | +| RecruitList | Doublechoice | Broadcast | joblist2 |`, }; async function handler(ctx) { diff --git a/lib/routes/ustc/jwc.ts b/lib/routes/ustc/jwc.ts index 414ebdf6346e..76c9f0ba03de 100644 --- a/lib/routes/ustc/jwc.ts +++ b/lib/routes/ustc/jwc.ts @@ -31,8 +31,8 @@ export const route: Route = { handler, url: 'www.teach.ustc.edu.cn/', description: `| 信息 | 教学 | 考试 | 交流 | - | ---- | -------- | ---- | -------- | - | info | teaching | exam | exchange |`, +| ---- | -------- | ---- | -------- | +| info | teaching | exam | exchange |`, }; async function handler(ctx) { diff --git a/lib/routes/ustc/math.ts b/lib/routes/ustc/math.ts index cccdd7e24505..212b6e6e4cee 100644 --- a/lib/routes/ustc/math.ts +++ b/lib/routes/ustc/math.ts @@ -39,8 +39,8 @@ export const route: Route = { handler, url: 'math.ustc.edu.cn/', description: `| 学院新闻 | 通知公告 | 学术交流 | 学术报告 | - | -------- | -------- | -------- | -------- | - | xyxw | tzgg | xsjl | xsbg |`, +| -------- | -------- | -------- | -------- | +| xyxw | tzgg | xsjl | xsbg |`, }; async function handler(ctx) { diff --git a/lib/routes/ustc/scms.ts b/lib/routes/ustc/scms.ts index a8860b280b16..5ae9e447d7b1 100644 --- a/lib/routes/ustc/scms.ts +++ b/lib/routes/ustc/scms.ts @@ -39,8 +39,8 @@ export const route: Route = { handler, url: 'scms.ustc.edu.cn/', description: `| 院内新闻 | 通知公告 | 科研动态 | 学术活动 | 其他 | - | -------- | -------- | -------- | -------- | -------- | - | ynxw | tzgg | kydt | xshd | 自定义id |`, +| -------- | -------- | -------- | -------- | -------- | +| ynxw | tzgg | kydt | xshd | 自定义id |`, }; async function handler(ctx) { diff --git a/lib/routes/ustc/sist.ts b/lib/routes/ustc/sist.ts index 3b0a2953929a..44d0ba3dc9e9 100644 --- a/lib/routes/ustc/sist.ts +++ b/lib/routes/ustc/sist.ts @@ -37,8 +37,8 @@ export const route: Route = { handler, url: 'sist.ustc.edu.cn/', description: `| 通知公告 | 招生工作 | - | -------- | -------- | - | tzgg | zsgz |`, +| -------- | -------- | +| tzgg | zsgz |`, }; async function handler(ctx) { diff --git a/lib/routes/usts/jwch.ts b/lib/routes/usts/jwch.ts index e9bf36669f08..863e16f16ed8 100644 --- a/lib/routes/usts/jwch.ts +++ b/lib/routes/usts/jwch.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: [], handler, description: `| 类型 | 教务动态 | 公告在线 | 选课通知 | - | ---- | -------- | -------- | -------- | - | | jwdt | ggzx | xktz |`, +| ---- | -------- | -------- | -------- | +| | jwdt | ggzx | xktz |`, }; async function handler(ctx) { diff --git a/lib/routes/utgd/category.ts b/lib/routes/utgd/category.ts index 8229bbcf3b74..322903d2939d 100644 --- a/lib/routes/utgd/category.ts +++ b/lib/routes/utgd/category.ts @@ -26,8 +26,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 方法 | 观点 | - | ------ | ------- | - | method | opinion |`, +| ------ | ------- | +| method | opinion |`, }; async function handler(ctx) { diff --git a/lib/routes/utgd/topic.ts b/lib/routes/utgd/topic.ts index ff97c9b9a225..10fa04a7d2c8 100644 --- a/lib/routes/utgd/topic.ts +++ b/lib/routes/utgd/topic.ts @@ -28,7 +28,7 @@ export const route: Route = { handler, url: 'utgd.net/topic', description: `| 在线阅读专栏 | 卡片笔记专题 | - | ------------ | ------------ | +| ------------ | ------------ | 更多专栏请见 [专题广场](https://utgd.net/topic)`, }; diff --git a/lib/routes/uw/gix/news.ts b/lib/routes/uw/gix/news.ts index b48d42766c89..d55cd103abcb 100644 --- a/lib/routes/uw/gix/news.ts +++ b/lib/routes/uw/gix/news.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['dykderrick'], handler, description: `| Blog | In The News | - | ---- | ----------- | - | blog | inthenews |`, +| ---- | ----------- | +| blog | inthenews |`, }; async function handler(ctx) { diff --git a/lib/routes/vcb-s/category.ts b/lib/routes/vcb-s/category.ts index 2ab017c39270..c2c84636268d 100644 --- a/lib/routes/vcb-s/category.ts +++ b/lib/routes/vcb-s/category.ts @@ -35,8 +35,8 @@ export const route: Route = { handler, url: 'vcb-s.com/', description: `| 作品项目 | 科普系列 | 计划与日志 | - | -------- | -------- | ---------- | - | works | kb | planlog |`, +| -------- | -------- | ---------- | +| works | kb | planlog |`, }; async function handler(ctx) { diff --git a/lib/routes/vom/featured.ts b/lib/routes/vom/featured.ts index 21230d588c21..eab557c80713 100644 --- a/lib/routes/vom/featured.ts +++ b/lib/routes/vom/featured.ts @@ -28,8 +28,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| English | 日本語 | Монгол | Русский | 简体中文 | - | ------- | ------ | ------ | ------- | -------- | - | en | ja | mn | ru | zh |`, +| ------- | ------ | ------ | ------- | -------- | +| en | ja | mn | ru | zh |`, }; async function handler(ctx) { diff --git a/lib/routes/wallstreetcn/live.ts b/lib/routes/wallstreetcn/live.ts index 71f16baa2f17..6044d8f93bf9 100644 --- a/lib/routes/wallstreetcn/live.ts +++ b/lib/routes/wallstreetcn/live.ts @@ -40,8 +40,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 要闻 | A 股 | 美股 | 港股 | 外汇 | 商品 | 理财 | - | ------ | ------- | -------- | -------- | ----- | --------- | --------- | - | global | a-stock | us-stock | hk-stock | forex | commodity | financing |`, +| ------ | ------- | -------- | -------- | ----- | --------- | --------- | +| global | a-stock | us-stock | hk-stock | forex | commodity | financing |`, }; async function handler(ctx) { diff --git a/lib/routes/wallstreetcn/news.ts b/lib/routes/wallstreetcn/news.ts index 84320dc8ff78..7f7893e313e0 100644 --- a/lib/routes/wallstreetcn/news.ts +++ b/lib/routes/wallstreetcn/news.ts @@ -30,18 +30,18 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| id | 分类 | - | ------------ | ---- | - | global | 最新 | - | shares | 股市 | - | bonds | 债市 | - | commodities | 商品 | - | forex | 外汇 | - | enterprise | 公司 | - | asset-manage | 资管 | - | tmt | 科技 | - | estate | 地产 | - | car | 汽车 | - | medicine | 医药 |`, +| ------------ | ---- | +| global | 最新 | +| shares | 股市 | +| bonds | 债市 | +| commodities | 商品 | +| forex | 外汇 | +| enterprise | 公司 | +| asset-manage | 资管 | +| tmt | 科技 | +| estate | 地产 | +| car | 汽车 | +| medicine | 医药 |`, }; async function handler(ctx) { diff --git a/lib/routes/wechat/tgchannel.ts b/lib/routes/wechat/tgchannel.ts index 3857970f930b..f15f8840835f 100644 --- a/lib/routes/wechat/tgchannel.ts +++ b/lib/routes/wechat/tgchannel.ts @@ -20,10 +20,10 @@ export const route: Route = { maintainers: ['LogicJake', 'Rongronggg9'], handler, description: `| 搜索查询类型 | 将使用的搜索关键字 | 适用于 | - | :----------: | :----------------: | :-------------------------: | - | \`0\` | (禁用搜索) | 所有情况 (默认) | - | \`1\` | 公众号全名 | 未启用 efb-patch-middleware | - | \`2\` | #公众号全名 | 已启用 efb-patch-middleware | +| :----------: | :----------------: | :-------------------------: | +| \`0\` | (禁用搜索) | 所有情况 (默认) | +| \`1\` | 公众号全名 | 未启用 efb-patch-middleware | +| \`2\` | #公众号全名 | 已启用 efb-patch-middleware | ::: tip 启用搜索有助于在订阅了过多公众号的频道里有效筛选,不易因为大量公众号同时推送导致一些公众号消息被遗漏,但必须正确选择搜索查询类型,否则会搜索失败。 diff --git a/lib/routes/wfu/news.ts b/lib/routes/wfu/news.ts index 1b843dbde278..d90b35bc20d9 100644 --- a/lib/routes/wfu/news.ts +++ b/lib/routes/wfu/news.ts @@ -70,10 +70,10 @@ export const route: Route = { handler, url: 'news.wfu.edu.cn/', description: `| **内容** | **参数** | - | :------: | :------: | - | 潍院要闻 | wyyw | - | 综合新闻 | zhxw | - | 学术纵横 | xszh |`, +| :------: | :------: | +| 潍院要闻 | wyyw | +| 综合新闻 | zhxw | +| 学术纵横 | xszh |`, }; async function handler(ctx) { diff --git a/lib/routes/whitehouse/news.ts b/lib/routes/whitehouse/news.ts index 97b1690ba7fd..9e347a296056 100644 --- a/lib/routes/whitehouse/news.ts +++ b/lib/routes/whitehouse/news.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk', 'hkamran80'], handler, description: `| All | Articles | Briefings and Statements | Presidential Actions | Remarks | - | --- | -------- | ------------------------ | -------------------- | ------- | - | | articles | briefings-statements | presidential-actions | remarks |`, +| --- | -------- | ------------------------ | -------------------- | ------- | +| | articles | briefings-statements | presidential-actions | remarks |`, }; async function handler(ctx) { diff --git a/lib/routes/who/news-room.ts b/lib/routes/who/news-room.ts index d26b832f575d..bf4575fe805b 100644 --- a/lib/routes/who/news-room.ts +++ b/lib/routes/who/news-room.ts @@ -29,15 +29,15 @@ export const route: Route = { url: 'who.int/news', description: `Category - | Feature stories | Commentaries | - | --------------- | ------------ | - | feature-stories | commentaries | +| Feature stories | Commentaries | +| --------------- | ------------ | +| feature-stories | commentaries | Language - | English | العربية | 中文 | Français | Русский | Español | Português | - | ------- | ------- | ---- | -------- | ------- | ------- | --------- | - | en | ar | zh | fr | ru | es | pt |`, +| English | العربية | 中文 | Français | Русский | Español | Português | +| ------- | ------- | ---- | -------- | ------- | ------- | --------- | +| en | ar | zh | fr | ru | es | pt |`, }; async function handler(ctx) { diff --git a/lib/routes/who/news.ts b/lib/routes/who/news.ts index eb12506ba21a..05bfc2451dae 100644 --- a/lib/routes/who/news.ts +++ b/lib/routes/who/news.ts @@ -28,9 +28,9 @@ export const route: Route = { url: 'who.int/news', description: `Language - | English | العربية | 中文 | Français | Русский | Español | Português | - | ------- | ------- | ---- | -------- | ------- | ------- | --------- | - | en | ar | zh | fr | ru | es | pt |`, +| English | العربية | 中文 | Français | Русский | Español | Português | +| ------- | ------- | ---- | -------- | ------- | ------- | --------- | +| en | ar | zh | fr | ru | es | pt |`, }; async function handler(ctx) { diff --git a/lib/routes/who/speeches.ts b/lib/routes/who/speeches.ts index 0a4cd246dc93..6855b2795c05 100644 --- a/lib/routes/who/speeches.ts +++ b/lib/routes/who/speeches.ts @@ -29,9 +29,9 @@ export const route: Route = { url: 'who.int/director-general/speeches', description: `Language - | English | العربية | 中文 | Français | Русский | Español | Português | - | ------- | ------- | ---- | -------- | ------- | ------- | --------- | - | en | ar | zh | fr | ru | es | pt |`, +| English | العربية | 中文 | Français | Русский | Español | Português | +| ------- | ------- | ---- | -------- | ------- | ------- | --------- | +| en | ar | zh | fr | ru | es | pt |`, }; async function handler(ctx) { diff --git a/lib/routes/whu/cs.ts b/lib/routes/whu/cs.ts index c7c8dabd8125..6cc609273001 100644 --- a/lib/routes/whu/cs.ts +++ b/lib/routes/whu/cs.ts @@ -24,8 +24,8 @@ export const route: Route = { maintainers: ['ttyfly'], handler, description: `| 公告类型 | 学院新闻 | 学术交流 | 通知公告 | 科研进展 | - | -------- | -------- | -------- | -------- | -------- | - | 参数 | 0 | 1 | 2 | 3 |`, +| -------- | -------- | -------- | -------- | -------- | +| 参数 | 0 | 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/whu/gs/index.ts b/lib/routes/whu/gs/index.ts index a48e69681837..63b130919b2c 100644 --- a/lib/routes/whu/gs/index.ts +++ b/lib/routes/whu/gs/index.ts @@ -40,8 +40,8 @@ export const route: Route = { handler, url: 'gs.whu.edu.cn/index.htm', description: `| 公告类型 | 新闻动态 | 学术探索 | 院系风采 | 通知 (全部) | 通知 (招生) | 通知 (培养) | 通知 (学位) | 通知 (质量与专业学位) | 通知 (综合) | - | -------- | -------- | -------- | -------- | ----------- | ----------- | ----------- | ----------- | --------------------- | ----------- | - | 参数 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |`, +| -------- | -------- | -------- | -------- | ----------- | ----------- | ----------- | ----------- | --------------------- | ----------- | +| 参数 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |`, }; async function handler(ctx) { diff --git a/lib/routes/whu/swrh.ts b/lib/routes/whu/swrh.ts index 636d9735ac13..7af1dc1db632 100644 --- a/lib/routes/whu/swrh.ts +++ b/lib/routes/whu/swrh.ts @@ -32,8 +32,8 @@ export const route: Route = { maintainers: ['FanofZY'], handler, description: `| 公告类型 | 学院新闻 | 学术科研 | 通知公告 | - | -------- | -------- | -------- | -------- | - | 参数 | 0 | 1 | 2 |`, +| -------- | -------- | -------- | -------- | +| 参数 | 0 | 1 | 2 |`, }; async function handler(ctx) { diff --git a/lib/routes/wmpvp/index.ts b/lib/routes/wmpvp/index.ts index 855638085dd3..52adb09734d8 100644 --- a/lib/routes/wmpvp/index.ts +++ b/lib/routes/wmpvp/index.ts @@ -20,8 +20,8 @@ export const route: Route = { maintainers: ['tssujt'], handler, description: `| DOTA2 | CS2 | - | ----- | --- | - | 1 | 2 |`, +| ----- | --- | +| 1 | 2 |`, }; const TYPE_MAP = { diff --git a/lib/routes/woshipm/popular.ts b/lib/routes/woshipm/popular.ts index 49d43fdf7174..99ab658ecef5 100644 --- a/lib/routes/woshipm/popular.ts +++ b/lib/routes/woshipm/popular.ts @@ -34,8 +34,8 @@ export const route: Route = { handler, url: 'woshipm.com/', description: `| 日榜 | 周榜 | 月榜 | - | ----- | ------ | ------- | - | daily | weekly | monthly |`, +| ----- | ------ | ------- | +| daily | weekly | monthly |`, }; async function handler(ctx) { diff --git a/lib/routes/wsj/news.ts b/lib/routes/wsj/news.ts index 9e0d86e35f39..801ccadf43c6 100644 --- a/lib/routes/wsj/news.ts +++ b/lib/routes/wsj/news.ts @@ -25,15 +25,15 @@ export const route: Route = { handler, description: `en\_us - | World | U.S. | Politics | Economy | Business | Tech | Markets | Opinion | Books & Arts | Real Estate | Life & Work | Sytle | Sports | - | ----- | ---- | -------- | ------- | -------- | ---------- | ------- | ------- | ------------ | ----------- | ----------- | ------------------- | ------ | - | world | us | politics | economy | business | technology | markets | opinion | books-arts | realestate | life-work | style-entertainment | sports | +| World | U.S. | Politics | Economy | Business | Tech | Markets | Opinion | Books & Arts | Real Estate | Life & Work | Sytle | Sports | +| ----- | ---- | -------- | ------- | -------- | ---------- | ------- | ------- | ------------ | ----------- | ----------- | ------------------- | ------ | +| world | us | politics | economy | business | technology | markets | opinion | books-arts | realestate | life-work | style-entertainment | sports | zh-cn / zh-tw - | 国际 | 中国 | 金融市场 | 经济 | 商业 | 科技 | 派 | 专栏与观点 | - | ----- | ----- | -------- | ------- | -------- | ---------- | --------- | ---------- | - | world | china | markets | economy | business | technology | life-arts | opinion | +| 国际 | 中国 | 金融市场 | 经济 | 商业 | 科技 | 派 | 专栏与观点 | +| ----- | ----- | -------- | ------- | -------- | ---------- | --------- | ---------- | +| world | china | markets | economy | business | technology | life-arts | opinion | Provide full article RSS for WSJ topics.`, }; diff --git a/lib/routes/wsyu/news.ts b/lib/routes/wsyu/news.ts index 0aa8aa0503e5..7ef45144188c 100644 --- a/lib/routes/wsyu/news.ts +++ b/lib/routes/wsyu/news.ts @@ -38,8 +38,8 @@ export const route: Route = { maintainers: ['Derekmini'], handler, description: `| 学校要闻 | 综合新闻 | 媒体聚焦 | - | -------- | -------- | -------- | - | xxyw | zhxw | mtjj |`, +| -------- | -------- | -------- | +| xxyw | zhxw | mtjj |`, }; async function handler(ctx) { diff --git a/lib/routes/wtu/index.ts b/lib/routes/wtu/index.ts index b6e8ad518969..216fbcb12c5e 100644 --- a/lib/routes/wtu/index.ts +++ b/lib/routes/wtu/index.ts @@ -20,8 +20,8 @@ export const route: Route = { maintainers: ['loyio'], handler, description: `| 公告类型 | 通知公告 | 教务信息 | 科研动态 | - | -------- | -------- | -------- | -------- | - | 参数 | 1 | 2 | 3 |`, +| -------- | -------- | -------- | -------- | +| 参数 | 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/wtu/job.ts b/lib/routes/wtu/job.ts index a49071b9cd25..1b25025af00a 100644 --- a/lib/routes/wtu/job.ts +++ b/lib/routes/wtu/job.ts @@ -57,8 +57,8 @@ export const route: Route = { maintainers: ['ticks-tan'], handler, description: `| 信息类型 | 消息通知 | 通知公告 | 新闻快递 | - | -------- | -------- | -------- | -------- | - | 参数 | xxtz | tzgg | xwkd |`, +| -------- | -------- | -------- | -------- | +| 参数 | xxtz | tzgg | xwkd |`, }; async function handler(ctx) { diff --git a/lib/routes/wyzxwk/article.ts b/lib/routes/wyzxwk/article.ts index 8dd4e8d990bb..33f0a8de4c9f 100644 --- a/lib/routes/wyzxwk/article.ts +++ b/lib/routes/wyzxwk/article.ts @@ -27,45 +27,45 @@ export const route: Route = { handler, description: `时政 - | 时代观察 | 舆论战争 | - | -------- | -------- | - | shidai | yulun | +| 时代观察 | 舆论战争 | +| -------- | -------- | +| shidai | yulun | 经济 - | 经济视点 | 社会民生 | 三农关注 | 产业研究 | - | -------- | -------- | -------- | -------- | - | jingji | shehui | sannong | chanye | +| 经济视点 | 社会民生 | 三农关注 | 产业研究 | +| -------- | -------- | -------- | -------- | +| jingji | shehui | sannong | chanye | 国际 - | 国际纵横 | 国防外交 | - | -------- | -------- | - | guoji | guofang | +| 国际纵横 | 国防外交 | +| -------- | -------- | +| guoji | guofang | 思潮 - | 理想之旅 | 思潮碰撞 | 文艺新生 | 读书交流 | - | -------- | -------- | -------- | -------- | - | lixiang | sichao | wenyi | shushe | +| 理想之旅 | 思潮碰撞 | 文艺新生 | 读书交流 | +| -------- | -------- | -------- | -------- | +| lixiang | sichao | wenyi | shushe | 历史 - | 历史视野 | 中华文化 | 中华医药 | 共产党人 | - | -------- | -------- | -------- | -------- | - | lishi | zhonghua | zhongyi | cpers | +| 历史视野 | 中华文化 | 中华医药 | 共产党人 | +| -------- | -------- | -------- | -------- | +| lishi | zhonghua | zhongyi | cpers | 争鸣 - | 风华正茂 | 工农之声 | 网友杂谈 | 网友时评 | - | -------- | -------- | -------- | -------- | - | qingnian | gongnong | zatan | shiping | +| 风华正茂 | 工农之声 | 网友杂谈 | 网友时评 | +| -------- | -------- | -------- | -------- | +| qingnian | gongnong | zatan | shiping | 活动 - | 乌有公告 | 红色旅游 | 乌有讲堂 | 书画欣赏 | - | -------- | -------- | --------- | -------- | - | gonggao | lvyou | jiangtang | shuhua |`, +| 乌有公告 | 红色旅游 | 乌有讲堂 | 书画欣赏 | +| -------- | -------- | --------- | -------- | +| gonggao | lvyou | jiangtang | shuhua |`, }; async function handler(ctx) { diff --git a/lib/routes/x6d/index.ts b/lib/routes/x6d/index.ts index 6320c7428362..180210f4ce42 100644 --- a/lib/routes/x6d/index.ts +++ b/lib/routes/x6d/index.ts @@ -15,28 +15,28 @@ export const route: Route = { example: '/x6d/34', parameters: { id: '分类 id,可在对应分类页面的 URL 中找到,默认为首页最近更新' }, description: `| 技巧分享 | QQ 技巧 | 微信技巧 | 其他教程 | 其他分享 | - | -------- | ------- | -------- | -------- | -------- | - | 31 | 55 | 112 | 33 | 88 | +| -------- | ------- | -------- | -------- | -------- | +| 31 | 55 | 112 | 33 | 88 | - | 宅家自学 | 健身养生 | 摄影剪辑 | 长点知识 | 自我提升 | 两性相关 | 编程办公 | 职场关系 | 新媒体运营 | 其他教程 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- | -------- | - | 18 | 98 | 94 | 93 | 99 | 100 | 21 | 22 | 19 | 44 | +| 宅家自学 | 健身养生 | 摄影剪辑 | 长点知识 | 自我提升 | 两性相关 | 编程办公 | 职场关系 | 新媒体运营 | 其他教程 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- | -------- | +| 18 | 98 | 94 | 93 | 99 | 100 | 21 | 22 | 19 | 44 | - | 活动线报 | 流量话费 | 免费会员 | 实物活动 | 游戏活动 | 红包活动 | 空间域名 | 其他活动 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 34 | 35 | 91 | 92 | 39 | 38 | 37 | 36 | +| 活动线报 | 流量话费 | 免费会员 | 实物活动 | 游戏活动 | 红包活动 | 空间域名 | 其他活动 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 34 | 35 | 91 | 92 | 39 | 38 | 37 | 36 | - | 值得一看 | 找点乐子 | 热门事件 | 节目推荐 | - | -------- | -------- | -------- | -------- | - | 65 | 50 | 77 | 101 | +| 值得一看 | 找点乐子 | 热门事件 | 节目推荐 | +| -------- | -------- | -------- | -------- | +| 65 | 50 | 77 | 101 | - | 值得一听 | 每日一听 | 歌单推荐 | - | -------- | -------- | -------- | - | 71 | 87 | 79 | +| 值得一听 | 每日一听 | 歌单推荐 | +| -------- | -------- | -------- | +| 71 | 87 | 79 | - | 资源宝库 | 书籍资料 | 设计资源 | 剪辑资源 | 办公资源 | 壁纸资源 | 编程资源 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 106 | 107 | 108 | 109 | 110 | 111 | 113 |`, +| 资源宝库 | 书籍资料 | 设计资源 | 剪辑资源 | 办公资源 | 壁纸资源 | 编程资源 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 106 | 107 | 108 | 109 | 110 | 111 | 113 |`, categories: ['new-media'], features: { diff --git a/lib/routes/xaufe/jiaowu.ts b/lib/routes/xaufe/jiaowu.ts index 8da10d9a4a80..d478b7d8899a 100644 --- a/lib/routes/xaufe/jiaowu.ts +++ b/lib/routes/xaufe/jiaowu.ts @@ -34,8 +34,8 @@ export const route: Route = { maintainers: ['shaokeyibb'], handler, description: `| 通知公告 | - | :------: | - | tzgg |`, +| :------: | +| tzgg |`, }; async function handler(ctx) { diff --git a/lib/routes/xaut/index.ts b/lib/routes/xaut/index.ts index 19f7bf187ac3..298ece3e57ab 100644 --- a/lib/routes/xaut/index.ts +++ b/lib/routes/xaut/index.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['mocusez'], handler, description: `| 学校新闻 | 砥志研思 | 立德树人 | 传道授业 | 校闻周知 | - | :------: | :------: | :------: | :------: | :------: | - | xxxw | dzys | ldsr | cdsy | xwzz |`, +| :------: | :------: | :------: | :------: | :------: | +| xxxw | dzys | ldsr | cdsy | xwzz |`, }; async function handler(ctx) { diff --git a/lib/routes/xaut/jwc.ts b/lib/routes/xaut/jwc.ts index 6f979f46093b..80e1a81efd7c 100644 --- a/lib/routes/xaut/jwc.ts +++ b/lib/routes/xaut/jwc.ts @@ -24,9 +24,9 @@ export const route: Route = { 有些内容需使用校园网或 VPN 访问知行网获取 ::: - | 通知公告 | 新闻动态 | 规章制度 | 竞赛结果公示 | 竞赛获奖通知 | 竞赛信息 | 公开公示 | - | :------: | :------: | :------: | :----------: | :----------: | :------: | :------: | - | tzgg | xwdt | gzzd | jggs | jsjg | jsxx | gkgs |`, +| 通知公告 | 新闻动态 | 规章制度 | 竞赛结果公示 | 竞赛获奖通知 | 竞赛信息 | 公开公示 | +| :------: | :------: | :------: | :----------: | :----------: | :------: | :------: | +| tzgg | xwdt | gzzd | jggs | jsjg | jsxx | gkgs |`, }; async function handler(ctx) { diff --git a/lib/routes/xaut/rsc.ts b/lib/routes/xaut/rsc.ts index d419c22f3397..b69894b6a0e0 100644 --- a/lib/routes/xaut/rsc.ts +++ b/lib/routes/xaut/rsc.ts @@ -24,9 +24,9 @@ export const route: Route = { 有些内容指向外部链接,目前只提供这些链接,不提供具体内容,去除 jwc 和 index 的修改 ::: - | 通知公告 | 工作动态 | - | :------: | :------: | - | tzgg | gzdt |`, +| 通知公告 | 工作动态 | +| :------: | :------: | +| tzgg | gzdt |`, }; async function handler(ctx) { diff --git a/lib/routes/xiaoheihe/discount.ts b/lib/routes/xiaoheihe/discount.ts index 82a269ee463e..82ff45b02811 100644 --- a/lib/routes/xiaoheihe/discount.ts +++ b/lib/routes/xiaoheihe/discount.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: ['tssujt'], handler, description: `| PC | Switch | PSN | Xbox | - | ----- | ------ | ----- | ----- | - | pc | switch | psn | xbox |`, +| ----- | ------ | ----- | ----- | +| pc | switch | psn | xbox |`, }; const PLATFORM_MAP = { diff --git a/lib/routes/xidian/jwc.ts b/lib/routes/xidian/jwc.ts index f780abb42786..60b41068495b 100644 --- a/lib/routes/xidian/jwc.ts +++ b/lib/routes/xidian/jwc.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['ShadowySpirits'], handler, description: `| 教学信息 | 教学研究 | 实践教学 | 质量监控 | 通知公告 | - | :------: | :------: | :------: | :------: | :------: | - | jxxx | jxyj | sjjx | zljk | tzgg |`, +| :------: | :------: | :------: | :------: | :------: | +| jxxx | jxyj | sjjx | zljk | tzgg |`, }; async function handler(ctx) { diff --git a/lib/routes/xinpianchang/rank.ts b/lib/routes/xinpianchang/rank.ts index 4025e06b961b..58ab8ad7d93a 100644 --- a/lib/routes/xinpianchang/rank.ts +++ b/lib/routes/xinpianchang/rank.ts @@ -21,13 +21,13 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 分类 | id | - | -------- | ---------- | - | 总榜 | all | - | 精选榜 | staffPicks | - | 广告 | ad | - | 宣传片 | publicity | - | 创意 | creative | - | 干货教程 | backstage |`, +| -------- | ---------- | +| 总榜 | all | +| 精选榜 | staffPicks | +| 广告 | ad | +| 宣传片 | publicity | +| 创意 | creative | +| 干货教程 | backstage |`, }; async function handler(ctx) { diff --git a/lib/routes/xjtu/2yuan/news.ts b/lib/routes/xjtu/2yuan/news.ts index 8305594049d4..f97e56dd8b72 100644 --- a/lib/routes/xjtu/2yuan/news.ts +++ b/lib/routes/xjtu/2yuan/news.ts @@ -22,17 +22,17 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 分类 | 编号 | - | -------- | ---- | - | 通知公告 | 110 | - | 综合新闻 | 6 | - | 科室动态 | 8 | - | 教学动态 | 45 | - | 科研动态 | 51 | - | 护理动态 | 57 | - | 党群活动 | 63 | - | 外事活动 | 13 | - | 媒体二院 | 14 | - | 理论政策 | 16 |`, +| -------- | ---- | +| 通知公告 | 110 | +| 综合新闻 | 6 | +| 科室动态 | 8 | +| 教学动态 | 45 | +| 科研动态 | 51 | +| 护理动态 | 57 | +| 党群活动 | 63 | +| 外事活动 | 13 | +| 媒体二院 | 14 | +| 理论政策 | 16 |`, }; async function handler(ctx) { diff --git a/lib/routes/xjtu/job.ts b/lib/routes/xjtu/job.ts index 2feec0c217e5..db1b3461e6e2 100644 --- a/lib/routes/xjtu/job.ts +++ b/lib/routes/xjtu/job.ts @@ -37,9 +37,9 @@ export const route: Route = { handler, description: `栏目类型 - | 中心公告 | 选调生 | 重点单位 | 国际组织 | 创新创业 | 就业实习 | - | -------- | ------ | -------- | -------- | -------- | -------- | - | zxgg | xds | zddw | gjzz | cxcy | jysx |`, +| 中心公告 | 选调生 | 重点单位 | 国际组织 | 创新创业 | 就业实习 | +| -------- | ------ | -------- | -------- | -------- | -------- | +| zxgg | xds | zddw | gjzz | cxcy | jysx |`, }; async function handler(ctx) { diff --git a/lib/routes/xjtu/std.ts b/lib/routes/xjtu/std.ts index bf9e5909c88e..780277af3be6 100644 --- a/lib/routes/xjtu/std.ts +++ b/lib/routes/xjtu/std.ts @@ -27,8 +27,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 通知公告 | 重要通知 | 项目申报 | 成果申报 | 信息快讯 | - | -------- | -------- | -------- | -------- | -------- | - | | zytz | xmsb | cgsb | xxkx |`, +| -------- | -------- | -------- | -------- | -------- | +| | zytz | xmsb | cgsb | xxkx |`, }; async function handler(ctx) { diff --git a/lib/routes/xkb/index.ts b/lib/routes/xkb/index.ts index e5cd7a32ea5a..5ec55ea07194 100644 --- a/lib/routes/xkb/index.ts +++ b/lib/routes/xkb/index.ts @@ -27,13 +27,13 @@ export const route: Route = { handler, description: `常用栏目 ID: - | 栏目名 | ID | - | ------ | --- | - | 首页 | 350 | - | 重点 | 359 | - | 广州 | 353 | - | 湾区 | 360 | - | 天下 | 355 |`, +| 栏目名 | ID | +| ------ | --- | +| 首页 | 350 | +| 重点 | 359 | +| 广州 | 353 | +| 湾区 | 360 | +| 天下 | 355 |`, }; async function handler(ctx) { diff --git a/lib/routes/xmnn/epaper.ts b/lib/routes/xmnn/epaper.ts index 62af3aebe29e..47125f0db7ab 100644 --- a/lib/routes/xmnn/epaper.ts +++ b/lib/routes/xmnn/epaper.ts @@ -28,8 +28,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 厦门日报 | 厦门晚报 | 海西晨报 | 城市捷报 | - | -------- | -------- | -------- | -------- | - | xmrb | xmwb | hxcb | csjb |`, +| -------- | -------- | -------- | -------- | +| xmrb | xmwb | hxcb | csjb |`, }; async function handler(ctx) { diff --git a/lib/routes/xueqiu/stock-info.ts b/lib/routes/xueqiu/stock-info.ts index d595ec01d18d..cc3ec8032c03 100644 --- a/lib/routes/xueqiu/stock-info.ts +++ b/lib/routes/xueqiu/stock-info.ts @@ -29,8 +29,8 @@ export const route: Route = { maintainers: ['YuYang'], handler, description: `| 公告 | 新闻 | 研报 | - | ------------ | ---- | -------- | - | announcement | news | research |`, +| ------------ | ---- | -------- | +| announcement | news | research |`, }; async function handler(ctx) { diff --git a/lib/routes/xueqiu/timeline.ts b/lib/routes/xueqiu/timeline.ts index 10698b5f81fa..37c97b08d3e1 100644 --- a/lib/routes/xueqiu/timeline.ts +++ b/lib/routes/xueqiu/timeline.ts @@ -30,9 +30,9 @@ export const route: Route = { 用户关注动态需要登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 ::: - | -1 | -2 | 1 | - | ---- | -------- | ------------- | - | 全部 | 关注精选 | 自定义第 1 组 |`, +| -1 | -2 | 1 | +| ---- | -------- | ------------- | +| 全部 | 关注精选 | 自定义第 1 组 |`, }; async function handler(ctx) { diff --git a/lib/routes/xueqiu/user.ts b/lib/routes/xueqiu/user.ts index 4e8f89f63d03..c696060fa13d 100644 --- a/lib/routes/xueqiu/user.ts +++ b/lib/routes/xueqiu/user.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['imlonghao'], handler, description: `| 原发布 | 长文 | 问答 | 热门 | 交易 | - | ------ | ---- | ---- | ---- | ---- | - | 0 | 2 | 4 | 9 | 11 |`, +| ------ | ---- | ---- | ---- | ---- | +| 0 | 2 | 4 | 9 | 11 |`, }; async function handler(ctx) { diff --git a/lib/routes/yande/post.ts b/lib/routes/yande/post.ts index 07d78aa99022..e3bf59c3f608 100644 --- a/lib/routes/yande/post.ts +++ b/lib/routes/yande/post.ts @@ -27,8 +27,8 @@ export const route: Route = { name: 'Popular Recent Posts', maintainers: ['magic-akari', 'SettingDust', 'fashioncj', 'NekoAria'], description: `| 最近 24 小时 | 最近一周 | 最近一月 | 最近一年 | - | ------- | -------- | ------- | -------- | - | 1d | 1w | 1m | 1y |`, +| ------- | -------- | ------- | -------- | +| 1d | 1w | 1m | 1y |`, handler, }; diff --git a/lib/routes/ycwb/index.ts b/lib/routes/ycwb/index.ts index 37b3987fb842..d0d639fa2d55 100644 --- a/lib/routes/ycwb/index.ts +++ b/lib/routes/ycwb/index.ts @@ -30,13 +30,13 @@ export const route: Route = { 常用栏目节点: - | 首页 | 中国 | 国际 | 体育 | 要闻 | 珠江评论 | 民生观察 | 房产 | 金羊教育 | 金羊财富 | 金羊文化 | 金羊健康 | 金羊汽车 | - | ---- | ---- | ---- | ---- | ---- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | - | 1 | 14 | 15 | 16 | 22 | 1875 | 21773 | 222 | 5725 | 633 | 5281 | 21692 | 223 | +| 首页 | 中国 | 国际 | 体育 | 要闻 | 珠江评论 | 民生观察 | 房产 | 金羊教育 | 金羊财富 | 金羊文化 | 金羊健康 | 金羊汽车 | +| ---- | ---- | ---- | ---- | ---- | -------- | -------- | ---- | -------- | -------- | -------- | -------- | -------- | +| 1 | 14 | 15 | 16 | 22 | 1875 | 21773 | 222 | 5725 | 633 | 5281 | 21692 | 223 | - | 广州 | 广州 - 广州要闻 | 广州 - 社会百态 | 广州 - 深读广州 | 广州 - 生活服务 | 今日大湾区 | 广东 - 政经热闻 | 广东 - 民生视点 | 广东 - 滚动新闻 | - | ---- | --------------- | --------------- | --------------- | --------------- | ---------- | --------------- | --------------- | --------------- | - | 18 | 5261 | 6030 | 13352 | 83422 | 100418 | 13074 | 12252 | 12212 |`, +| 广州 | 广州 - 广州要闻 | 广州 - 社会百态 | 广州 - 深读广州 | 广州 - 生活服务 | 今日大湾区 | 广东 - 政经热闻 | 广东 - 民生视点 | 广东 - 滚动新闻 | +| ---- | --------------- | --------------- | --------------- | --------------- | ---------- | --------------- | --------------- | --------------- | +| 18 | 5261 | 6030 | 13352 | 83422 | 100418 | 13074 | 12252 | 12212 |`, }; async function handler(ctx) { diff --git a/lib/routes/yicai/dt.ts b/lib/routes/yicai/dt.ts index c978059cb3ba..a43e189df84d 100644 --- a/lib/routes/yicai/dt.ts +++ b/lib/routes/yicai/dt.ts @@ -33,45 +33,45 @@ export const route: Route = { handler, description: `#### [文章](https://dt.yicai.com/article) - | 分类 | ID | - | -------- | ---------- | - | 全部 | article/0 | - | 新流行 | article/31 | - | 新趋势 | article/32 | - | 商业黑马 | article/33 | - | 新品 | article/34 | - | 营销 | article/35 | - | 大公司 | article/36 | - | 城市生活 | article/38 | - - #### [报告](https://dt.yicai.com/report) - - | 分类 | ID | - | ---------- | --------- | - | 全部 | report/0 | - | 人群观念 | report/9 | - | 人群行为 | report/22 | - | 美妆个护 | report/23 | - | 3C 数码 | report/24 | - | 营销趋势 | report/25 | - | 服饰鞋包 | report/27 | - | 互联网 | report/28 | - | 城市与居住 | report/29 | - | 消费趋势 | report/30 | - | 生活趋势 | report/37 | - - #### [可视化](https://dt.yicai.com/visualization) - - | 分类 | ID | - | -------- | ---------------- | - | 全部 | visualization/0 | - | 新流行 | visualization/39 | - | 新趋势 | visualization/40 | - | 商业黑马 | visualization/41 | - | 新品 | visualization/42 | - | 营销 | visualization/43 | - | 大公司 | visualization/44 | - | 城市生活 | visualization/45 |`, +| 分类 | ID | +| -------- | ---------- | +| 全部 | article/0 | +| 新流行 | article/31 | +| 新趋势 | article/32 | +| 商业黑马 | article/33 | +| 新品 | article/34 | +| 营销 | article/35 | +| 大公司 | article/36 | +| 城市生活 | article/38 | + +#### [报告](https://dt.yicai.com/report) + +| 分类 | ID | +| ---------- | --------- | +| 全部 | report/0 | +| 人群观念 | report/9 | +| 人群行为 | report/22 | +| 美妆个护 | report/23 | +| 3C 数码 | report/24 | +| 营销趋势 | report/25 | +| 服饰鞋包 | report/27 | +| 互联网 | report/28 | +| 城市与居住 | report/29 | +| 消费趋势 | report/30 | +| 生活趋势 | report/37 | + +#### [可视化](https://dt.yicai.com/visualization) + +| 分类 | ID | +| -------- | ---------------- | +| 全部 | visualization/0 | +| 新流行 | visualization/39 | +| 新趋势 | visualization/40 | +| 商业黑马 | visualization/41 | +| 新品 | visualization/42 | +| 营销 | visualization/43 | +| 大公司 | visualization/44 | +| 城市生活 | visualization/45 |`, }; async function handler(ctx) { diff --git a/lib/routes/yicai/news.ts b/lib/routes/yicai/news.ts index d116ad451dde..037a507f1282 100644 --- a/lib/routes/yicai/news.ts +++ b/lib/routes/yicai/news.ts @@ -27,32 +27,32 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| Id | 名称 | - | ------------------------ | ---------- | - | gushi | A 股 | - | kechuangban | 科创板 | - | hongguan | 大政 | - | jinrong | 金融 | - | quanqiushichang | 海外市场 | - | gongsi | 产经 | - | shijie | 全球 | - | kechuang | 科技 | - | quyu | 区域 | - | comment | 评论 | - | dafengwenhua | 商业人文 | - | books | 阅读周刊 | - | loushi | 地产 | - | automobile | 汽车 | - | china\_financial\_herald | 对话陆家嘴 | - | fashion | 时尚 | - | ad | 商业资讯 | - | info | 资讯 | - | jzfxb | 价值风向标 | - | shuducaijing | 数读财经 | - | shujujiepan | 数据解盘 | - | shudushenghuo | 数读生活 | - | cbndata | CBNData | - | dtcj | DT 财经 | - | xfsz | 消费数知 |`, +| ------------------------ | ---------- | +| gushi | A 股 | +| kechuangban | 科创板 | +| hongguan | 大政 | +| jinrong | 金融 | +| quanqiushichang | 海外市场 | +| gongsi | 产经 | +| shijie | 全球 | +| kechuang | 科技 | +| quyu | 区域 | +| comment | 评论 | +| dafengwenhua | 商业人文 | +| books | 阅读周刊 | +| loushi | 地产 | +| automobile | 汽车 | +| china\_financial\_herald | 对话陆家嘴 | +| fashion | 时尚 | +| ad | 商业资讯 | +| info | 资讯 | +| jzfxb | 价值风向标 | +| shuducaijing | 数读财经 | +| shujujiepan | 数据解盘 | +| shudushenghuo | 数读生活 | +| cbndata | CBNData | +| dtcj | DT 财经 | +| xfsz | 消费数知 |`, }; async function handler(ctx) { diff --git a/lib/routes/yicai/video.ts b/lib/routes/yicai/video.ts index 8984651e6a79..1fb9749f1eb2 100644 --- a/lib/routes/yicai/video.ts +++ b/lib/routes/yicai/video.ts @@ -27,42 +27,42 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| Id | 名称 | - | -------------------- | ---------------------------- | - | youliao | 有料 | - | appshipin | 此刻 | - | yicaisudi | 速递 | - | caishang | 财商 | - | shiji | 史记 | - | jinrigushi | 今日股市 | - | tangulunjin | 谈股论金 | - | gongsiyuhangye | 公司与行业 | - | cjyxx | 财经夜行线 | - | 6thtradingday | 第六交易日 | - | cjfw | 财经风味 | - | chuangshidai | 创时代 | - | weilaiyaoqinghan | 未来邀请函 | - | tounaofengbao | 头脑风暴 | - | zhongguojingyingzhe | 中国经营者 | - | shichanglingjuli | 市场零距离 | - | huanqiucaijing | 环球财经视界 | - | zgjcqyjglsxftl | 中国杰出企业家管理思想访谈录 | - | jiemacaishang | 解码财商 | - | sxpl | 首席评论 | - | zhongguojingjiluntan | 中国经济论坛 | - | opinionleader | 意见领袖 | - | xinjinrong | 解码新金融 | - | diyidichan | 第一地产 | - | zhichedaren | 智车达人 | - | chuangtoufengyun | 创投风云 | - | chunxiangrensheng | 醇享人生 | - | diyishengyin | 第一声音 | - | sanliangboqianjin | 财智双全 | - | weilaiyaoqinghan | 未来邀请函 | - | zjdy | 主角 ▪ 大医 | - | leye | 乐业之城 | - | sanrenxing | 价值三人行 | - | yuandongli | 中国源动力 | - | pioneerzone | 直击引领区 |`, +| -------------------- | ---------------------------- | +| youliao | 有料 | +| appshipin | 此刻 | +| yicaisudi | 速递 | +| caishang | 财商 | +| shiji | 史记 | +| jinrigushi | 今日股市 | +| tangulunjin | 谈股论金 | +| gongsiyuhangye | 公司与行业 | +| cjyxx | 财经夜行线 | +| 6thtradingday | 第六交易日 | +| cjfw | 财经风味 | +| chuangshidai | 创时代 | +| weilaiyaoqinghan | 未来邀请函 | +| tounaofengbao | 头脑风暴 | +| zhongguojingyingzhe | 中国经营者 | +| shichanglingjuli | 市场零距离 | +| huanqiucaijing | 环球财经视界 | +| zgjcqyjglsxftl | 中国杰出企业家管理思想访谈录 | +| jiemacaishang | 解码财商 | +| sxpl | 首席评论 | +| zhongguojingjiluntan | 中国经济论坛 | +| opinionleader | 意见领袖 | +| xinjinrong | 解码新金融 | +| diyidichan | 第一地产 | +| zhichedaren | 智车达人 | +| chuangtoufengyun | 创投风云 | +| chunxiangrensheng | 醇享人生 | +| diyishengyin | 第一声音 | +| sanliangboqianjin | 财智双全 | +| weilaiyaoqinghan | 未来邀请函 | +| zjdy | 主角 ▪ 大医 | +| leye | 乐业之城 | +| sanrenxing | 价值三人行 | +| yuandongli | 中国源动力 | +| pioneerzone | 直击引领区 |`, }; async function handler(ctx) { diff --git a/lib/routes/ymgal/article.ts b/lib/routes/ymgal/article.ts index fecff7306ad2..d8a21ab37d9f 100644 --- a/lib/routes/ymgal/article.ts +++ b/lib/routes/ymgal/article.ts @@ -29,8 +29,8 @@ export const route: Route = { maintainers: ['SunBK201'], handler, description: `| 全部文章 | 资讯 | 专栏 | - | -------- | ---- | ------ | - | all | news | column |`, +| -------- | ---- | ------ | +| all | news | column |`, }; async function handler(ctx) { diff --git a/lib/routes/yomiuri/news.ts b/lib/routes/yomiuri/news.ts index 678789f1c692..57d3253b5a60 100644 --- a/lib/routes/yomiuri/news.ts +++ b/lib/routes/yomiuri/news.ts @@ -28,24 +28,24 @@ export const route: Route = { handler, description: `Free articles only. - | Category | Parameter | - | -------------- | --------- | - | 新着・速報 | news | - | 社会 | national | - | 政治 | politics | - | 経済 | economy | - | スポーツ | sports | - | 国際 | world | - | 地域 | local | - | 科学・IT | science | - | エンタメ・文化 | culture | - | ライフ | life | - | 医療・健康 | medical | - | 教育・就活 | kyoiku | - | 選挙・世論調査 | election | - | 囲碁・将棋 | igoshougi | - | 社説 | editorial | - | 皇室 | koushitsu |`, +| Category | Parameter | +| -------------- | --------- | +| 新着・速報 | news | +| 社会 | national | +| 政治 | politics | +| 経済 | economy | +| スポーツ | sports | +| 国際 | world | +| 地域 | local | +| 科学・IT | science | +| エンタメ・文化 | culture | +| ライフ | life | +| 医療・健康 | medical | +| 教育・就活 | kyoiku | +| 選挙・世論調査 | election | +| 囲碁・将棋 | igoshougi | +| 社説 | editorial | +| 皇室 | koushitsu |`, }; async function handler(ctx) { diff --git a/lib/routes/youtube/charts.ts b/lib/routes/youtube/charts.ts index 0bfa8d4f9fed..aac74d1c1fb3 100644 --- a/lib/routes/youtube/charts.ts +++ b/lib/routes/youtube/charts.ts @@ -14,47 +14,47 @@ export const route: Route = { handler, description: `Chart - | Top artists | Top songs | Top music videos | Trending | - | ----------- | --------- | ---------------- | -------------- | - | TopArtists | TopSongs | TopVideos | TrendingVideos | +| Top artists | Top songs | Top music videos | Trending | +| ----------- | --------- | ---------------- | -------------- | +| TopArtists | TopSongs | TopVideos | TrendingVideos | Country Code - | Argentina | Australia | Austria | Belgium | Bolivia | Brazil | Canada | - | --------- | --------- | ------- | ------- | ------- | ------ | ------ | - | ar | au | at | be | bo | br | ca | +| Argentina | Australia | Austria | Belgium | Bolivia | Brazil | Canada | +| --------- | --------- | ------- | ------- | ------- | ------ | ------ | +| ar | au | at | be | bo | br | ca | - | Chile | Colombia | Costa Rica | Czechia | Denmark | Dominican Republic | Ecuador | - | ----- | -------- | ---------- | ------- | ------- | ------------------ | ------- | - | cl | co | cr | cz | dk | do | ec | +| Chile | Colombia | Costa Rica | Czechia | Denmark | Dominican Republic | Ecuador | +| ----- | -------- | ---------- | ------- | ------- | ------------------ | ------- | +| cl | co | cr | cz | dk | do | ec | - | Egypt | El Salvador | Estonia | Finland | France | Germany | Guatemala | - | ----- | ----------- | ------- | ------- | ------ | ------- | --------- | - | eg | sv | ee | fi | fr | de | gt | +| Egypt | El Salvador | Estonia | Finland | France | Germany | Guatemala | +| ----- | ----------- | ------- | ------- | ------ | ------- | --------- | +| eg | sv | ee | fi | fr | de | gt | - | Honduras | Hungary | Iceland | India | Indonesia | Ireland | Israel | Italy | - | -------- | ------- | ------- | ----- | --------- | ------- | ------ | ----- | - | hn | hu | is | in | id | ie | il | it | +| Honduras | Hungary | Iceland | India | Indonesia | Ireland | Israel | Italy | +| -------- | ------- | ------- | ----- | --------- | ------- | ------ | ----- | +| hn | hu | is | in | id | ie | il | it | - | Japan | Kenya | Luxembourg | Mexico | Netherlands | New Zealand | Nicaragua | - | ----- | ----- | ---------- | ------ | ----------- | ----------- | --------- | - | jp | ke | lu | mx | nl | nz | ni | +| Japan | Kenya | Luxembourg | Mexico | Netherlands | New Zealand | Nicaragua | +| ----- | ----- | ---------- | ------ | ----------- | ----------- | --------- | +| jp | ke | lu | mx | nl | nz | ni | - | Nigeria | Norway | Panama | Paraguay | Peru | Poland | Portugal | Romania | - | ------- | ------ | ------ | -------- | ---- | ------ | -------- | ------- | - | ng | no | pa | py | pe | pl | pt | ro | +| Nigeria | Norway | Panama | Paraguay | Peru | Poland | Portugal | Romania | +| ------- | ------ | ------ | -------- | ---- | ------ | -------- | ------- | +| ng | no | pa | py | pe | pl | pt | ro | - | Russia | Saudi Arabia | Serbia | South Africa | South Korea | Spain | Sweden | Switzerland | - | ------ | ------------ | ------ | ------------ | ----------- | ----- | ------ | ----------- | - | ru | sa | rs | za | kr | es | se | ch | +| Russia | Saudi Arabia | Serbia | South Africa | South Korea | Spain | Sweden | Switzerland | +| ------ | ------------ | ------ | ------------ | ----------- | ----- | ------ | ----------- | +| ru | sa | rs | za | kr | es | se | ch | - | Tanzania | Turkey | Uganda | Ukraine | United Arab Emirates | United Kingdom | United States | - | -------- | ------ | ------ | ------- | -------------------- | -------------- | ------------- | - | tz | tr | ug | ua | ae | gb | us | +| Tanzania | Turkey | Uganda | Ukraine | United Arab Emirates | United Kingdom | United States | +| -------- | ------ | ------ | ------- | -------------------- | -------------- | ------------- | +| tz | tr | ug | ua | ae | gb | us | - | Uruguay | Zimbabwe | - | ------- | -------- | - | uy | zw |`, +| Uruguay | Zimbabwe | +| ------- | -------- | +| uy | zw |`, }; async function handler(ctx) { diff --git a/lib/routes/youzhiyouxing/materials.ts b/lib/routes/youzhiyouxing/materials.ts index 879714186052..12428a7c8fc4 100644 --- a/lib/routes/youzhiyouxing/materials.ts +++ b/lib/routes/youzhiyouxing/materials.ts @@ -43,8 +43,8 @@ export const route: Route = { handler, url: 'youzhiyouxing.cn/materials', description: `| 全部 | 知行小酒馆 | 知行黑板报 | 无人知晓 | 孟岩专栏 | 知行读书会 | 你好,同路人 | - | :--: | :--------: | :--------: | :------: | :------: | :--------: | :----------: | - | 0 | 4 | 2 | 10 | 1 | 3 | 11 |`, +| :--: | :--------: | :--------: | :------: | :------: | :--------: | :----------: | +| 0 | 4 | 2 | 10 | 1 | 3 | 11 |`, }; async function handler(ctx) { diff --git a/lib/routes/yuque/book.ts b/lib/routes/yuque/book.ts index 883a54db8c55..408b8e12834f 100644 --- a/lib/routes/yuque/book.ts +++ b/lib/routes/yuque/book.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['aha2mao', 'ltaoo'], handler, description: `| Node.js 专栏 | 阮一峰每周分享 | 语雀使用手册 | - | -------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------- | - | [/yuque/egg/nodejs](https://rsshub.app/yuque/egg/nodejs) | [/yuque/ruanyf/weekly](https://rsshub.app/yuque/ruanyf/weekly) | [/yuque/yuque/help](https://rsshub.app/yuque/yuque/help) |`, +| -------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------- | +| [/yuque/egg/nodejs](https://rsshub.app/yuque/egg/nodejs) | [/yuque/ruanyf/weekly](https://rsshub.app/yuque/ruanyf/weekly) | [/yuque/yuque/help](https://rsshub.app/yuque/yuque/help) |`, }; async function handler(ctx) { diff --git a/lib/routes/yxdown/news.ts b/lib/routes/yxdown/news.ts index 20f34bee00db..b88acf0785a1 100644 --- a/lib/routes/yxdown/news.ts +++ b/lib/routes/yxdown/news.ts @@ -23,8 +23,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 资讯首页 | 业界动态 | 视频预告 | 新作发布 | 游戏资讯 | 游戏评测 | 网络游戏 | 手机游戏 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | | dongtai | yugao | xinzuo | zixun | pingce | wangluo | shouyou |`, +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| | dongtai | yugao | xinzuo | zixun | pingce | wangluo | shouyou |`, }; async function handler(ctx) { diff --git a/lib/routes/yxdzqb/index.ts b/lib/routes/yxdzqb/index.ts index f7ddd01463f4..42bdbacfde38 100644 --- a/lib/routes/yxdzqb/index.ts +++ b/lib/routes/yxdzqb/index.ts @@ -40,8 +40,8 @@ export const route: Route = { handler, url: 'yxdzqb.com/', description: `| Steam 最新折扣 | Steam 热门游戏折扣 | Steam 热门中文游戏折扣 | Steam 历史低价 | Steam 中文游戏历史低价 | - | -------------- | ------------------ | ---------------------- | -------------- | ---------------------- | - | discount | popular | popular\_cn | low | low\_cn |`, +| -------------- | ------------------ | ---------------------- | -------------- | ---------------------- | +| discount | popular | popular\_cn | low | low\_cn |`, }; async function handler(ctx) { diff --git a/lib/routes/yxrb/home.ts b/lib/routes/yxrb/home.ts index d8e59cea0851..c66c05fd2708 100644 --- a/lib/routes/yxrb/home.ts +++ b/lib/routes/yxrb/home.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['TonyRL'], handler, description: `| 资讯 | 访谈 | 服务 | 游理游据 | - | ---- | ------- | ------- | -------- | - | info | talking | service | comments |`, +| ---- | ------- | ------- | -------- | +| info | talking | service | comments |`, }; async function handler(ctx) { diff --git a/lib/routes/yyets/article.ts b/lib/routes/yyets/article.ts index 716fb863781f..1a964fb00528 100644 --- a/lib/routes/yyets/article.ts +++ b/lib/routes/yyets/article.ts @@ -39,8 +39,8 @@ export const route: Route = { maintainers: ['wb121017405'], handler, description: `| 全部 | 影视资讯 | 收视快报 | 人人影评 | 人人剧评 | 新剧评测 | 片单推荐 | - | ---- | -------- | -------- | --------- | --------- | ----------- | -------- | - | | news | report | m\_review | t\_review | new\_review | recom |`, +| ---- | -------- | -------- | --------- | --------- | ----------- | -------- | +| | news | report | m\_review | t\_review | new\_review | recom |`, }; async function handler(ctx) { diff --git a/lib/routes/yystv/category.ts b/lib/routes/yystv/category.ts index 0bfafa04510d..ba92ad6a842c 100644 --- a/lib/routes/yystv/category.ts +++ b/lib/routes/yystv/category.ts @@ -21,8 +21,8 @@ export const route: Route = { maintainers: ['LightStrawberry'], handler, description: `| 推游 | 游戏史 | 大事件 | 文化 | 趣闻 | 经典回顾 | - | --------- | ------- | ------ | ------- | ---- | -------- | - | recommend | history | big | culture | news | retro |`, +| --------- | ------- | ------ | ------- | ---- | -------- | +| recommend | history | big | culture | news | retro |`, }; async function handler(ctx) { diff --git a/lib/routes/zaobao/realtime.ts b/lib/routes/zaobao/realtime.ts index ef108de7bacf..9c3761ed5d83 100644 --- a/lib/routes/zaobao/realtime.ts +++ b/lib/routes/zaobao/realtime.ts @@ -11,8 +11,8 @@ export const route: Route = { maintainers: ['shunf4'], handler, description: `| 中国 | 新加坡 | 国际 | 财经 | - | ----- | --------- | ----- | -------- | - | china | singapore | world | zfinance |`, +| ----- | --------- | ----- | -------- | +| china | singapore | world | zfinance |`, }; async function handler(ctx) { diff --git a/lib/routes/zaobao/znews.ts b/lib/routes/zaobao/znews.ts index 71492e4a7015..7aa4daa09c9c 100644 --- a/lib/routes/zaobao/znews.ts +++ b/lib/routes/zaobao/znews.ts @@ -19,8 +19,8 @@ export const route: Route = { maintainers: ['shunf4'], handler, description: `| 中国 | 新加坡 | 东南亚 | 国际 | 体育 | - | ----- | --------- | ------ | ----- | ------ | - | china | singapore | sea | world | sports |`, +| ----- | --------- | ------ | ----- | ------ | +| china | singapore | sea | world | sports |`, }; async function handler(ctx) { diff --git a/lib/routes/zaozao/article.ts b/lib/routes/zaozao/article.ts index dd778ed23365..2d7458354bbb 100644 --- a/lib/routes/zaozao/article.ts +++ b/lib/routes/zaozao/article.ts @@ -25,8 +25,8 @@ export const route: Route = { maintainers: ['shaomingbo'], handler, description: `| 精品推荐 | 技术干货 | 职场成长 | 社区动态 | 组件物料 | 行业动态 | - | --------- | -------- | -------- | --------- | -------- | -------- | - | recommend | quality | growth | community | material | industry |`, +| --------- | -------- | -------- | --------- | -------- | -------- | +| recommend | quality | growth | community | material | industry |`, }; async function handler(ctx) { diff --git a/lib/routes/zcmu/jwc/index.ts b/lib/routes/zcmu/jwc/index.ts index 160b28d35b19..3c15935b9e0a 100644 --- a/lib/routes/zcmu/jwc/index.ts +++ b/lib/routes/zcmu/jwc/index.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['CCraftY'], handler, description: `| 教务管理 | 成绩管理 | 学籍管理 | 考试管理 | 选课管理 | 排课管理 | - | -------- | -------- | -------- | -------- | -------- | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 |`, +| -------- | -------- | -------- | -------- | -------- | -------- | +| 0 | 1 | 2 | 3 | 4 | 5 |`, }; async function handler(ctx) { diff --git a/lib/routes/zcmu/yxy/index.ts b/lib/routes/zcmu/yxy/index.ts index dee075d84419..502649dbdad9 100644 --- a/lib/routes/zcmu/yxy/index.ts +++ b/lib/routes/zcmu/yxy/index.ts @@ -32,8 +32,8 @@ export const route: Route = { maintainers: ['CCraftY'], handler, description: `| 通知公告 | 评优评奖 | 文明规范 | 创新创业 | 校园文化 | 心理驿站 | 日常通知 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 |`, +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 |`, }; async function handler(ctx) { diff --git a/lib/routes/zcool/discover.ts b/lib/routes/zcool/discover.ts index 33130a1f0068..6e4c653a306c 100644 --- a/lib/routes/zcool/discover.ts +++ b/lib/routes/zcool/discover.ts @@ -48,107 +48,107 @@ export const route: Route = { 分类 cate - | 精选 | 平面 | 插画 | UI | 网页 | 摄影 | 三维 | 影视 | 空间 | 工业 / 产品 | 动漫 | 纯艺术 | 手工艺 | 服装 | 其他 | - | ---- | ---- | ---- | -- | ---- | ---- | ---- | ---- | ---- | ----------- | ---- | ------ | ------ | ---- | ---- | - | 0 | 8 | 1 | 17 | 607 | 33 | 24 | 610 | 609 | 499 | 608 | 612 | 611 | 613 | 44 | +| 精选 | 平面 | 插画 | UI | 网页 | 摄影 | 三维 | 影视 | 空间 | 工业 / 产品 | 动漫 | 纯艺术 | 手工艺 | 服装 | 其他 | +| ---- | ---- | ---- | -- | ---- | ---- | ---- | ---- | ---- | ----------- | ---- | ------ | ------ | ---- | ---- | +| 0 | 8 | 1 | 17 | 607 | 33 | 24 | 610 | 609 | 499 | 608 | 612 | 611 | 613 | 44 | 子分类 subCate 精选 0 - | 运营设计 | 包装 | 动画 / 影视 | 人像摄影 | 商业插画 | 电商 | APP 界面 | 艺术插画 | 家装设计 | 海报 | 文章 | - | -------- | ---- | ----------- | -------- | -------- | ---- | -------- | -------- | -------- | ---- | ------ | - | 617 | 9 | 30 | 34 | 2 | 616 | 757 | 292 | 637 | 10 | 809824 | +| 运营设计 | 包装 | 动画 / 影视 | 人像摄影 | 商业插画 | 电商 | APP 界面 | 艺术插画 | 家装设计 | 海报 | 文章 | +| -------- | ---- | ----------- | -------- | -------- | ---- | -------- | -------- | -------- | ---- | ------ | +| 617 | 9 | 30 | 34 | 2 | 616 | 757 | 292 | 637 | 10 | 809824 | 平面 8 - | 包装 | 海报 | 品牌 | IP 形象 | 字体 / 字形 | Logo | 书籍 / 画册 | 宣传物料 | 图案 | 信息图表 | PPT/Keynote | 其他平面 | 文章 | - | ---- | ---- | ---- | ------- | ----------- | ---- | ----------- | -------- | ---- | -------- | ----------- | -------- | ---- | - | 9 | 10 | 15 | 779 | 14 | 13 | 12 | 534 | 624 | 625 | 626 | 11 | 809 | +| 包装 | 海报 | 品牌 | IP 形象 | 字体 / 字形 | Logo | 书籍 / 画册 | 宣传物料 | 图案 | 信息图表 | PPT/Keynote | 其他平面 | 文章 | +| ---- | ---- | ---- | ------- | ----------- | ---- | ----------- | -------- | ---- | -------- | ----------- | -------- | ---- | +| 9 | 10 | 15 | 779 | 14 | 13 | 12 | 534 | 624 | 625 | 626 | 11 | 809 | 插画 1 - | 商业插画 | 概念设定 | 游戏原画 | 绘本 | 儿童插画 | 艺术插画 | 创作习作 | 新锐潮流插画 | 像素画 | 文章 | - | -------- | -------- | -------- | ---- | -------- | -------- | -------- | ------------ | ------ | ---- | - | 2 | 5 | 685 | 631 | 684 | 292 | 7 | 3 | 4 | 819 | +| 商业插画 | 概念设定 | 游戏原画 | 绘本 | 儿童插画 | 艺术插画 | 创作习作 | 新锐潮流插画 | 像素画 | 文章 | +| -------- | -------- | -------- | ---- | -------- | -------- | -------- | ------------ | ------ | ---- | +| 2 | 5 | 685 | 631 | 684 | 292 | 7 | 3 | 4 | 819 | UI 17 - | APP 界面 | 游戏 UI | 软件界面 | 图标 | 主题 / 皮肤 | 交互 / UE | 动效设计 | 闪屏 / 壁纸 | 其他 UI | 文章 | - | -------- | ------- | -------- | ---- | ----------- | --------- | -------- | ----------- | ------- | ---- | - | 757 | 692 | 621 | 20 | 19 | 623 | 797 | 21 | 23 | 822 | +| APP 界面 | 游戏 UI | 软件界面 | 图标 | 主题 / 皮肤 | 交互 / UE | 动效设计 | 闪屏 / 壁纸 | 其他 UI | 文章 | +| -------- | ------- | -------- | ---- | ----------- | --------- | -------- | ----------- | ------- | ---- | +| 757 | 692 | 621 | 20 | 19 | 623 | 797 | 21 | 23 | 822 | 网页 607 - | 电商 | 企业官网 | 游戏 / 娱乐 | 运营设计 | 移动端网页 | 门户网站 | 个人网站 | 其他网页 | 文章 | - | ---- | -------- | ----------- | -------- | ---------- | -------- | -------- | -------- | ---- | - | 616 | 614 | 693 | 617 | 777 | 615 | 618 | 620 | 823 | +| 电商 | 企业官网 | 游戏 / 娱乐 | 运营设计 | 移动端网页 | 门户网站 | 个人网站 | 其他网页 | 文章 | +| ---- | -------- | ----------- | -------- | ---------- | -------- | -------- | -------- | ---- | +| 616 | 614 | 693 | 617 | 777 | 615 | 618 | 620 | 823 | 摄影 33 - | 人像摄影 | 风光摄影 | 人文 / 纪实摄影 | 美食摄影 | 产品摄影 | 环境 / 建筑摄影 | 时尚 / 艺术摄影 | 修图 / 后期 | 宠物摄影 | 婚礼摄影 | 其他摄影 | 文章 | - | -------- | -------- | --------------- | -------- | -------- | --------------- | --------------- | ----------- | -------- | -------- | -------- | ---- | - | 34 | 35 | 36 | 825 | 686 | 38 | 800 | 687 | 40 | 808 | 43 | 810 | +| 人像摄影 | 风光摄影 | 人文 / 纪实摄影 | 美食摄影 | 产品摄影 | 环境 / 建筑摄影 | 时尚 / 艺术摄影 | 修图 / 后期 | 宠物摄影 | 婚礼摄影 | 其他摄影 | 文章 | +| -------- | -------- | --------------- | -------- | -------- | --------------- | --------------- | ----------- | -------- | -------- | -------- | ---- | +| 34 | 35 | 36 | 825 | 686 | 38 | 800 | 687 | 40 | 808 | 43 | 810 | 三维 24 - | 动画 / 影视 | 机械 / 交通 | 人物 / 生物 | 产品 | 场景 | 建筑 / 空间 | 其他三维 | 文章 | - | ----------- | ----------- | ----------- | ---- | ---- | ----------- | -------- | ---- | - | 30 | 25 | 27 | 807 | 26 | 29 | 32 | 818 | +| 动画 / 影视 | 机械 / 交通 | 人物 / 生物 | 产品 | 场景 | 建筑 / 空间 | 其他三维 | 文章 | +| ----------- | ----------- | ----------- | ---- | ---- | ----------- | -------- | ---- | +| 30 | 25 | 27 | 807 | 26 | 29 | 32 | 818 | 影视 610 - | 短片 | Motion Graphic | 宣传片 | 影视后期 | 栏目片头 | MV | 设定 / 分镜 | 其他影视 | 文章 | - | ---- | -------------- | ------ | -------- | -------- | --- | ----------- | -------- | ---- | - | 645 | 649 | 804 | 646 | 647 | 644 | 650 | 651 | 817 | +| 短片 | Motion Graphic | 宣传片 | 影视后期 | 栏目片头 | MV | 设定 / 分镜 | 其他影视 | 文章 | +| ---- | -------------- | ------ | -------- | -------- | --- | ----------- | -------- | ---- | +| 645 | 649 | 804 | 646 | 647 | 644 | 650 | 651 | 817 | 空间 609 - | 家装设计 | 酒店餐饮设计 | 商业空间设计 | 建筑设计 | 舞台美术 | 展陈设计 | 景观设计 | 其他空间 | 文章 | - | -------- | ------------ | ------------ | -------- | -------- | -------- | -------- | -------- | ---- | - | 637 | 811 | 641 | 636 | 638 | 639 | 640 | 642 | 812 | +| 家装设计 | 酒店餐饮设计 | 商业空间设计 | 建筑设计 | 舞台美术 | 展陈设计 | 景观设计 | 其他空间 | 文章 | +| -------- | ------------ | ------------ | -------- | -------- | -------- | -------- | -------- | ---- | +| 637 | 811 | 641 | 636 | 638 | 639 | 640 | 642 | 812 | 工业 / 产品 499 - | 生活用品 | 电子产品 | 交通工具 | 工业用品 / 机械 | 人机交互 | 玩具 | 其他工业 / 产品 | 文章 | - | -------- | -------- | -------- | --------------- | -------- | ---- | --------------- | ---- | - | 508 | 506 | 509 | 511 | 510 | 689 | 514 | 813 | +| 生活用品 | 电子产品 | 交通工具 | 工业用品 / 机械 | 人机交互 | 玩具 | 其他工业 / 产品 | 文章 | +| -------- | -------- | -------- | --------------- | -------- | ---- | --------------- | ---- | +| 508 | 506 | 509 | 511 | 510 | 689 | 514 | 813 | 动漫 608 - | 短篇 / 格漫 | 中 / 长篇漫画 | 网络表情 | 单幅漫画 | 动画片 | 其他动漫 | 文章 | - | ----------- | ------------- | -------- | -------- | ------ | -------- | ---- | - | 628 | 629 | 632 | 627 | 633 | 635 | 820 | +| 短篇 / 格漫 | 中 / 长篇漫画 | 网络表情 | 单幅漫画 | 动画片 | 其他动漫 | 文章 | +| ----------- | ------------- | -------- | -------- | ------ | -------- | ---- | +| 628 | 629 | 632 | 627 | 633 | 635 | 820 | 纯艺术 612 - | 绘画 | 雕塑 | 书法 | 实验艺术 | 文章 | - | ---- | ---- | ---- | -------- | ---- | - | 659 | 662 | 668 | 657 | 821 | +| 绘画 | 雕塑 | 书法 | 实验艺术 | 文章 | +| ---- | ---- | ---- | -------- | ---- | +| 659 | 662 | 668 | 657 | 821 | 手工艺 611 - | 工艺品设计 | 手办 / 模玩 | 首饰设计 | 其他手工艺 | 文章 | - | ---------- | ----------- | -------- | ---------- | ---- | - | 654 | 656 | 756 | 658 | 816 | +| 工艺品设计 | 手办 / 模玩 | 首饰设计 | 其他手工艺 | 文章 | +| ---------- | ----------- | -------- | ---------- | ---- | +| 654 | 656 | 756 | 658 | 816 | 服装 613 - | 休闲 / 流行服饰 | 正装 / 礼服 | 传统 / 民族服饰 | 配饰 | 鞋履设计 | 儿童服饰 | 其他服装 | 文章 | - | --------------- | ----------- | --------------- | ---- | -------- | -------- | -------- | ---- | - | 672 | 671 | 814 | 677 | 676 | 673 | 680 | 815 | +| 休闲 / 流行服饰 | 正装 / 礼服 | 传统 / 民族服饰 | 配饰 | 鞋履设计 | 儿童服饰 | 其他服装 | 文章 | +| --------------- | ----------- | --------------- | ---- | -------- | -------- | -------- | ---- | +| 672 | 671 | 814 | 677 | 676 | 673 | 680 | 815 | 其他 44 - | 文案 / 策划 | VR 设计 | 独立游戏 | 其他 | 文章 | - | ----------- | ------- | -------- | ---- | ---- | - | 417 | 798 | 683 | 45 | 824 | +| 文案 / 策划 | VR 设计 | 独立游戏 | 其他 | 文章 | +| ----------- | ------- | -------- | ---- | ---- | +| 417 | 798 | 683 | 45 | 824 | 推荐等级 recommendLevel - | 全部 | 编辑精选 | 首页推荐 | 全部推荐 | - | ---- | -------- | -------- | -------- | - | 0 | 2 | 3 | 1 |`, +| 全部 | 编辑精选 | 首页推荐 | 全部推荐 | +| ---- | -------- | -------- | -------- | +| 0 | 2 | 3 | 1 |`, }; async function handler(ctx) { diff --git a/lib/routes/zhitongcaijing/index.ts b/lib/routes/zhitongcaijing/index.ts index 576698c0405b..b9d0e30d8173 100644 --- a/lib/routes/zhitongcaijing/index.ts +++ b/lib/routes/zhitongcaijing/index.ts @@ -86,21 +86,21 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| id | 栏目 | - | ------------ | ---- | - | recommend | 推荐 | - | hkstock | 港股 | - | meigu | 美股 | - | agu | 沪深 | - | ct | 创投 | - | esg | ESG | - | aqs | 券商 | - | ajj | 基金 | - | focus | 要闻 | - | announcement | 公告 | - | research | 研究 | - | shares | 新股 | - | bazaar | 市场 | - | company | 公司 |`, +| ------------ | ---- | +| recommend | 推荐 | +| hkstock | 港股 | +| meigu | 美股 | +| agu | 沪深 | +| ct | 创投 | +| esg | ESG | +| aqs | 券商 | +| ajj | 基金 | +| focus | 要闻 | +| announcement | 公告 | +| research | 研究 | +| shares | 新股 | +| bazaar | 市场 | +| company | 公司 |`, }; async function handler(ctx) { diff --git a/lib/routes/zhonglun/index.ts b/lib/routes/zhonglun/index.ts index 8f5a6d05cda2..5e62a39e5005 100644 --- a/lib/routes/zhonglun/index.ts +++ b/lib/routes/zhonglun/index.ts @@ -94,9 +94,9 @@ export const route: Route = { example: '/zhonglun/research/article/zh', parameters: { category: '语言,默认为 zh,即简体中文,可在对应分类页 URL 中找到' }, description: ` - | ENG | 简体中文 | 日本語 | 한국어 | - | --- | -------- | ------ | ------ | - | en | zh | ja | kr | +| ENG | 简体中文 | 日本語 | 한국어 | +| --- | -------- | ------ | ------ | +| en | zh | ja | kr | `, categories: ['new-media'], diff --git a/lib/routes/zimuxia/index.ts b/lib/routes/zimuxia/index.ts index 66e0908ad6f1..7939ba9f66aa 100644 --- a/lib/routes/zimuxia/index.ts +++ b/lib/routes/zimuxia/index.ts @@ -20,8 +20,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| ALL | FIX 德语社 | 欧美剧集 | 欧美电影 | 综艺 & 纪录 | FIX 日语社 | FIX 韩语社 | FIX 法语社 | - | --- | ---------- | -------- | -------- | ----------- | ---------- | ---------- | ---------- | - | | 昆仑德语社 | 欧美剧集 | 欧美电影 | 综艺纪录 | fix 日语社 | fix 韩语社 | fix 法语社 |`, +| --- | ---------- | -------- | -------- | ----------- | ---------- | ---------- | ---------- | +| | 昆仑德语社 | 欧美剧集 | 欧美电影 | 综艺纪录 | fix 日语社 | fix 韩语社 | fix 法语社 |`, }; async function handler(ctx) { diff --git a/lib/routes/zjol/paper.ts b/lib/routes/zjol/paper.ts index d1d988312eb8..3462674a2679 100644 --- a/lib/routes/zjol/paper.ts +++ b/lib/routes/zjol/paper.ts @@ -22,8 +22,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 浙江日报 | 钱江晚报 | 美术报 | 浙江老年报 | 浙江法制报 | 江南游报 | - | -------- | -------- | ------ | ---------- | ---------- | -------- | - | zjrb | qjwb | msb | zjlnb | zjfzb | jnyb |`, +| -------- | -------- | ------ | ---------- | ---------- | -------- | +| zjrb | qjwb | msb | zjlnb | zjfzb | jnyb |`, }; async function handler(ctx) { diff --git a/lib/routes/zju/career/index.ts b/lib/routes/zju/career/index.ts index f934986a7d9c..ce1a06bc60d5 100644 --- a/lib/routes/zju/career/index.ts +++ b/lib/routes/zju/career/index.ts @@ -30,8 +30,8 @@ export const route: Route = { maintainers: ['Caicailiushui'], handler, description: `| 新闻动态 | 活动通知 | 学院通知 | 告示通知 | - | -------- | -------- | -------- | -------- | - | 1 | 2 | 3 | 4 |`, +| -------- | -------- | -------- | -------- | +| 1 | 2 | 3 | 4 |`, }; async function handler(ctx) { diff --git a/lib/routes/zju/cst/custom.ts b/lib/routes/zju/cst/custom.ts index 26c0bc5ecd7a..c2b329e00ae7 100644 --- a/lib/routes/zju/cst/custom.ts +++ b/lib/routes/zju/cst/custom.ts @@ -48,8 +48,8 @@ export const route: Route = { maintainers: ['zwithz'], handler, description: `| 全部通知 | 招生信息 | 教务管理 | 论文管理 | 思政工作 | 评奖评优 | 实习就业 | 国际实习 | 国内合作科研 | 国际合作科研 | 校园服务 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------------ | ------------ | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------------ | ------------ | -------- | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | #### 自定义聚合通知 {#zhe-jiang-da-xue-ruan-jian-xue-yuan-zi-ding-yi-ju-he-tong-zhi}`, }; diff --git a/lib/routes/zju/cst/index.ts b/lib/routes/zju/cst/index.ts index e844348773d7..6d117693e28e 100644 --- a/lib/routes/zju/cst/index.ts +++ b/lib/routes/zju/cst/index.ts @@ -59,8 +59,8 @@ export const route: Route = { }, name: '软件学院', description: `| 全部通知 | 招生信息 | 教务管理 | 论文管理 | 思政工作 | 评奖评优 | 实习就业 | 国际实习 | 国内合作科研 | 国际合作科研 | 校园服务 | - | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------------ | ------------ | -------- | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |`, +| -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------------ | ------------ | -------- | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |`, maintainers: ['yonvenne', 'zwithz'], handler, }; diff --git a/lib/routes/zju/grs/index.ts b/lib/routes/zju/grs/index.ts index afe65543bee3..3be7ba620068 100644 --- a/lib/routes/zju/grs/index.ts +++ b/lib/routes/zju/grs/index.ts @@ -31,8 +31,8 @@ export const route: Route = { maintainers: ['Caicailiushui'], handler, description: `| 全部公告 | 教学管理 | 各类资助 | 学科建设 | 海外交流 | - | -------- | -------- | -------- | -------- | -------- | - | 1 | 2 | 3 | 4 | 5 |`, +| -------- | -------- | -------- | -------- | -------- | +| 1 | 2 | 3 | 4 | 5 |`, }; async function handler(ctx) { diff --git a/lib/routes/zju/physics/index.ts b/lib/routes/zju/physics/index.ts index 88110e0061dd..a31aef62e30d 100644 --- a/lib/routes/zju/physics/index.ts +++ b/lib/routes/zju/physics/index.ts @@ -40,8 +40,8 @@ export const route: Route = { maintainers: ['Caicailiushui'], handler, description: `| 本院动态 | 科研进展 | 研究生教育最新消息 | - | -------- | -------- | ------------------ | - | 1 | 2 | 3 |`, +| -------- | -------- | ------------------ | +| 1 | 2 | 3 |`, }; async function handler(ctx) { diff --git a/lib/routes/zsxq/group.ts b/lib/routes/zsxq/group.ts index 60ae887d6609..6b743266b748 100644 --- a/lib/routes/zsxq/group.ts +++ b/lib/routes/zsxq/group.ts @@ -31,8 +31,8 @@ export const route: Route = { }, handler, description: `| all | digests | by_owner | questions | tasks | - | ---- | ------ | --------- | -------- | ------ | - | 最新 | 精华 | 只看星主 | 问答 | 作业 |`, +| ---- | ------ | --------- | -------- | ------ | +| 最新 | 精华 | 只看星主 | 问答 | 作业 |`, }; async function handler(ctx: Context): Promise { diff --git a/lib/routes/zyw/hot.ts b/lib/routes/zyw/hot.ts index 8b24e3ce258d..e7a0da314f3a 100644 --- a/lib/routes/zyw/hot.ts +++ b/lib/routes/zyw/hot.ts @@ -21,8 +21,8 @@ export const route: Route = { 全部站点请见 [此处](https://hot.zyw.asia/#/list) ::: - | 哔哩哔哩 | 微博 | 知乎 | 36 氪 | 百度 | 少数派 | IT 之家 | 澎湃新闻 | 今日头条 | 百度贴吧 | 稀土掘金 | 腾讯新闻 | - | -------- | ---- | ---- | ----- | ---- | ------ | ------- | -------- | -------- | -------- | -------- | -------- |`, +| 哔哩哔哩 | 微博 | 知乎 | 36 氪 | 百度 | 少数派 | IT 之家 | 澎湃新闻 | 今日头条 | 百度贴吧 | 稀土掘金 | 腾讯新闻 | +| -------- | ---- | ---- | ----- | ---- | ------ | ------- | -------- | -------- | -------- | -------- | -------- |`, }; async function handler(ctx) { From 3a2ca7e21669797dca5bee89a6b8c019e93fbbd9 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Sun, 2 Feb 2025 23:15:08 +0800 Subject: [PATCH 0029/2658] fix(gcores): correct rendering of entities and optimize parsing logic (#18257) --- lib/routes/gcores/parser.ts | 201 ++++++++++++++++++++++-------------- 1 file changed, 122 insertions(+), 79 deletions(-) diff --git a/lib/routes/gcores/parser.ts b/lib/routes/gcores/parser.ts index c307154621cc..815ba9bb02de 100644 --- a/lib/routes/gcores/parser.ts +++ b/lib/routes/gcores/parser.ts @@ -3,14 +3,14 @@ import { getCurrentPath } from '@/utils/helpers'; import path from 'node:path'; -export const __dirname = getCurrentPath(import.meta.url); +const __dirname = getCurrentPath(import.meta.url); interface Style { [key: string]: string; } interface BlockType { - element: string; + element: string | undefined; parentElement?: string; aliasedElements?: string[]; } @@ -68,59 +68,31 @@ const BLOCK_TYPES: Readonly> = { 'unordered-list-item': { element: 'li', parentElement: 'ul' }, 'ordered-list-item': { element: 'li', parentElement: 'ol' }, blockquote: { element: 'blockquote' }, - atomic: { element: 'figure' }, + atomic: { element: undefined }, 'code-block': { element: 'pre' }, - unstyled: { element: 'div', aliasedElements: ['p'] }, + unstyled: { element: 'p' }, }; /** * Creates a styled HTML fragment for a given text and style object. - * @param text The text content of the fragment. - * @param style An object containing CSS styles (key-value pairs). - * @returns An HTML string representing the styled fragment. + * @param text - The text content. + * @param style - CSS styles as key-value pairs. + * @returns HTML string with applied styles. */ -const createStyledFragment = (text: string, style: Record): string => - `${text}`; - -/** - * Applies inline styles to a text string. - * @param text The text to style. - * @param inlineStyleRanges An array of inline style ranges. - * @returns The styled text. - */ -const applyStyles = (text: string, inlineStyleRanges: readonly InlineStyleRange[]): string => { - if (!inlineStyleRanges || inlineStyleRanges.length === 0) { - return text; - } - - const sortedRanges = [...inlineStyleRanges].sort((a, b) => a.offset - b.offset); - - let lastOffset = 0; - const styledFragments = sortedRanges.map((range) => { - const style = STYLES[range.style]; - if (!style) { - return text.substring(lastOffset, range.offset); - } - - const styledText = createStyledFragment(text.substring(range.offset, range.offset + range.length), style); - const preText = text.substring(lastOffset, range.offset); - lastOffset = range.offset + range.length; - return preText + styledText; - }); - let result = styledFragments.join(''); - result += text.substring(lastOffset); - return result; +const createStyledFragment = (text: string, style: Readonly +
+ {{@ content }} +
+ \ No newline at end of file From a7bcf3e5f711a9e6b4a2e1482891acd90311bf92 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Sun, 30 Mar 2025 23:25:58 +0800 Subject: [PATCH 0358/2658] feat(route/cw): add `waitForSelector` (#18735) --- lib/routes/cw/utils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/routes/cw/utils.ts b/lib/routes/cw/utils.ts index 687ac4bbb98f..04b42d898f83 100644 --- a/lib/routes/cw/utils.ts +++ b/lib/routes/cw/utils.ts @@ -61,6 +61,7 @@ const parsePage = async (path, browser, ctx) => { waitUntil: 'domcontentloaded', }); + await page.waitForSelector('.caption'); const response = await page.evaluate(() => document.documentElement.innerHTML); await page.close(); const $ = load(response); @@ -98,6 +99,7 @@ const parseItems = (list, browser, tryGet) => await page.goto(item.link, { waitUntil: 'domcontentloaded', }); + await page.waitForSelector('.article__head .container'); const response = await page.evaluate(() => document.documentElement.innerHTML); await page.close(); From d7501474b1f68f0bfe4d19149fcc3d027aaafc94 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 09:04:10 +0000 Subject: [PATCH 0359/2658] chore(deps): bump @scalar/hono-api-reference from 0.7.3 to 0.7.4 (#18742) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.7.3 to 0.7.4. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 35 ++++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 4216873902c0..6e8c0bd3725f 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.30.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.7.3", + "@scalar/hono-api-reference": "0.7.4", "@sentry/node": "9.10.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41c3a66327be..a53f3c178d55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.7.3 - version: 0.7.3(hono@4.7.5) + specifier: 0.7.4 + version: 0.7.4(hono@4.7.5) '@sentry/node': specifier: 9.10.0 version: 9.10.0 @@ -2034,12 +2034,12 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/core@0.2.3': - resolution: {integrity: sha512-o13vK5ThCZzkRp7fzFDzCcvzLJQz5d7Q2xLQbZ2FpeN/9L3uOFFkWabE2vO1kwz9q7baFq5lZKB0q4DPF+UW4Q==} + '@scalar/core@0.2.4': + resolution: {integrity: sha512-XGrg2P+FrvtzLsDm6TVl1oZv4DYmkFqJ3sI/SS2mjRlfOcblHv2CcrhYTz0+y1nG3cyHlE5esHAK0+BEI032dA==} engines: {node: '>=18'} - '@scalar/hono-api-reference@0.7.3': - resolution: {integrity: sha512-E7ArxL2YyA+yGzOuo794dsVfBLDpKycqUuJAV+V9BFXv1DCeT2dSjF8L7IhBgwMM/cx31O36juWVq2bcIJ4k7Q==} + '@scalar/hono-api-reference@0.7.4': + resolution: {integrity: sha512-Uo2TpPdQbhnDkmTnVeTIXEXL30YY0GvBRgOo6mv1pIzZrYbTSJqxfg9um1/5wXZ6fh6w6GI3Y/tdu0GcMg5fJw==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -2048,8 +2048,8 @@ packages: resolution: {integrity: sha512-HQQudOSQBU7ewzfnBW9LhDmBE2XOJgSfwrh5PlUB7zJup/kaRkBGNgV2wMjNz9Af/uztiU/xNrO179FysmUT+g==} engines: {node: '>=18'} - '@scalar/types@0.1.3': - resolution: {integrity: sha512-Fxtgjp5wHhTzXiyODYWIoTsTy3oFC70vme+0I7MNwd8i6D8qplFNnpURueqBuP4MglBM2ZhFv3hPLw4D69anDA==} + '@scalar/types@0.1.4': + resolution: {integrity: sha512-IAxpfrfdYfliLJR6WbuC8hxUwBUOeVsGuZxQE+zP8JDtdoHmgT6aNxCqMnGZ1ft6dvJ4jvzVR6qCWrq6Kg25oA==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -4517,6 +4517,11 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + nanoid@5.1.5: + resolution: {integrity: sha512-Ir/+ZpE9fDsNH0hQ3C68uyThDXzYcim2EqcZ8zn8Chtt1iylPT9xXJB0kPCnqzgcEGikO9RxSrh63MsmVCU7Fw==} + engines: {node: ^18 || >=20} + hasBin: true + narou@1.1.0: resolution: {integrity: sha512-UwYk9x+5cidHwqiKiklEdsQy4tID0pn6HYYweah+7bamze2hDE7gnFdjaqRCrp2INzptdp3mCiauKV49trTVFg==} engines: {node: '>=16.0.0', pnpm: '>=8'} @@ -7744,21 +7749,23 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/core@0.2.3': + '@scalar/core@0.2.4': dependencies: - '@scalar/types': 0.1.3 + '@scalar/types': 0.1.4 - '@scalar/hono-api-reference@0.7.3(hono@4.7.5)': + '@scalar/hono-api-reference@0.7.4(hono@4.7.5)': dependencies: - '@scalar/core': 0.2.3 + '@scalar/core': 0.2.4 hono: 4.7.5 '@scalar/openapi-types@0.1.9': {} - '@scalar/types@0.1.3': + '@scalar/types@0.1.4': dependencies: '@scalar/openapi-types': 0.1.9 '@unhead/schema': 1.11.20 + nanoid: 5.1.5 + type-fest: 4.38.0 zod: 3.24.2 '@sec-ant/readable-stream@0.4.1': {} @@ -10617,6 +10624,8 @@ snapshots: nanoid@3.3.11: {} + nanoid@5.1.5: {} + narou@1.1.0: dependencies: date-fns: 4.1.0 From 3cf23e197956a0dd848cea16a5f598e8aa83bf95 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 09:09:13 +0000 Subject: [PATCH 0360/2658] chore(deps): bump proxy-chain from 2.5.7 to 2.5.8 (#18744) Bumps [proxy-chain](https://github.com/apify/proxy-chain) from 2.5.7 to 2.5.8. - [Release notes](https://github.com/apify/proxy-chain/releases) - [Changelog](https://github.com/apify/proxy-chain/blob/master/CHANGELOG.md) - [Commits](https://github.com/apify/proxy-chain/compare/v2.5.7...v2.5.8) --- updated-dependencies: - dependency-name: proxy-chain dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6e8c0bd3725f..907a705b9bf5 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "ofetch": "1.4.1", "otplib": "12.0.1", "pac-proxy-agent": "7.2.0", - "proxy-chain": "2.5.7", + "proxy-chain": "2.5.8", "puppeteer": "22.6.2", "puppeteer-extra": "3.3.6", "puppeteer-extra-plugin-stealth": "2.11.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a53f3c178d55..4987f977bdea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -192,8 +192,8 @@ importers: specifier: 7.2.0 version: 7.2.0 proxy-chain: - specifier: 2.5.7 - version: 2.5.7 + specifier: 2.5.8 + version: 2.5.8 puppeteer: specifier: 22.6.2 version: 22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10) @@ -4881,8 +4881,8 @@ packages: resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==} engines: {node: '>= 14'} - proxy-chain@2.5.7: - resolution: {integrity: sha512-Tin+2iGrp/+gZGJymSeC+PVUFxWis2V2k66dpcKjXWGowPIB5X/Mt3ch86/PQZ8h3BdsgNL1vdbNusNgQ99OMw==} + proxy-chain@2.5.8: + resolution: {integrity: sha512-TqKOYRD/1Gga/JhiwmdYHJoj0zMJkKGofQ9bHQuSm+vexczatt81fkUHTVMyci+2mWczXiTNv1Eom+2v3Da5og==} engines: {node: '>=14'} proxy-from-env@1.1.0: @@ -11021,7 +11021,7 @@ snapshots: transitivePeerDependencies: - supports-color - proxy-chain@2.5.7: + proxy-chain@2.5.8: dependencies: socks: 2.8.4 socks-proxy-agent: 8.0.5 From 73f21751790a26fd1163e1c33ce551861dcebe89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 09:10:27 +0000 Subject: [PATCH 0361/2658] chore(deps): bump chrono-node from 2.7.8 to 2.7.9 (#18745) Bumps [chrono-node](https://github.com/wanasit/chrono) from 2.7.8 to 2.7.9. - [Release notes](https://github.com/wanasit/chrono/releases) - [Commits](https://github.com/wanasit/chrono/compare/v2.7.8...v2.7.9) --- updated-dependencies: - dependency-name: chrono-node dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 907a705b9bf5..089ba0b0833f 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "aes-js": "3.1.2", "art-template": "4.13.2", "cheerio": "1.0.0", - "chrono-node": "2.7.8", + "chrono-node": "2.7.9", "city-timezones": "1.3.0", "cross-env": "7.0.3", "crypto-js": "4.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4987f977bdea..90351298d792 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -78,8 +78,8 @@ importers: specifier: 1.0.0 version: 1.0.0 chrono-node: - specifier: 2.7.8 - version: 2.7.8 + specifier: 2.7.9 + version: 2.7.9 city-timezones: specifier: 1.3.0 version: 1.3.0 @@ -2706,8 +2706,8 @@ packages: peerDependencies: devtools-protocol: '*' - chrono-node@2.7.8: - resolution: {integrity: sha512-pzxemrTKu6jFVyAfkNxUckp9nlrmRFtr5lGrEJcVKyeKV9WSeGT78Oysazlzd/H0BdMv7EzACtJrw0pi2KODBQ==} + chrono-node@2.7.9: + resolution: {integrity: sha512-PW3tzuztH7OFbwdCCwv1k8F6ALFs5Yet1Neh5JJBL1GGj8zsLj3ZgZU6StUyM6gSsVRMv8EE6LqpTjM52Mshrw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} ci-info@4.2.0: @@ -8551,7 +8551,7 @@ snapshots: urlpattern-polyfill: 10.0.0 zod: 3.22.4 - chrono-node@2.7.8: + chrono-node@2.7.9: dependencies: dayjs: 1.11.8 From 30a455035da77247958ccabeaa45310b0c39f41e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 09:13:14 +0000 Subject: [PATCH 0362/2658] chore(deps): bump @sentry/node from 9.10.0 to 9.10.1 (#18743) Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 9.10.0 to 9.10.1. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/9.10.0...9.10.1) --- updated-dependencies: - dependency-name: "@sentry/node" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 089ba0b0833f..3df03ef00c84 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", "@scalar/hono-api-reference": "0.7.4", - "@sentry/node": "9.10.0", + "@sentry/node": "9.10.1", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", "art-template": "4.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 90351298d792..d9223cf49b54 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,8 +63,8 @@ importers: specifier: 0.7.4 version: 0.7.4(hono@4.7.5) '@sentry/node': - specifier: 9.10.0 - version: 9.10.0 + specifier: 9.10.1 + version: 9.10.1 '@tonyrl/rand-user-agent': specifier: 2.0.83 version: 2.0.83 @@ -2058,16 +2058,16 @@ packages: '@selderee/plugin-htmlparser2@0.11.0': resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==} - '@sentry/core@9.10.0': - resolution: {integrity: sha512-l3U/dOj9R2jcSLrSfPVkU7v6EUaEH7jgPYYyR+ug61oeSZ1/i/mgD2BpGk5FJd1e5mXCuNVmeFxirwCUZF3+ZA==} + '@sentry/core@9.10.1': + resolution: {integrity: sha512-TE2zZV3Od4131mZNgFo2Mv4aKU8FXxL0s96yqRvmV+8AU57mJoycMXBnmNSYfWuDICbPJTVAp+3bYMXwX7N5YA==} engines: {node: '>=18'} - '@sentry/node@9.10.0': - resolution: {integrity: sha512-Q4ihgygBaCVnheJxnJN6puU9QjZoezRr98C9vIJvjtlO1M21dVGGvEw6WzdA2IlKHX/ayga8LhNioo9bOJ2A8A==} + '@sentry/node@9.10.1': + resolution: {integrity: sha512-salNc4R0GiZZNNScNpdAB3OI3kz+clmgXL1rl5O2Kh1IW5vftf5I69n+qqZLJ3kaUp0Sm6V+deCHyUOnw9GozA==} engines: {node: '>=18'} - '@sentry/opentelemetry@9.10.0': - resolution: {integrity: sha512-MRskt+ZoklLXo+ONl6dFpvJyT3/RqNgq26pw7eLdCsxqFKkmCgjjf8US/UZlbg5dahwiZRvkE1wSgDgIKzb/6g==} + '@sentry/opentelemetry@9.10.1': + resolution: {integrity: sha512-qqcsbIyoOPI91Tm6w0oFzsx/mlu+lywRGSVbPRFhk4zCXBOhCCp4Mg7nwKK0wGJ7AZRl6qtELrRSGClAthC55g==} engines: {node: '>=18'} peerDependencies: '@opentelemetry/api': ^1.9.0 @@ -7775,9 +7775,9 @@ snapshots: domhandler: 5.0.3 selderee: 0.11.0 - '@sentry/core@9.10.0': {} + '@sentry/core@9.10.1': {} - '@sentry/node@9.10.0': + '@sentry/node@9.10.1': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -7810,13 +7810,13 @@ snapshots: '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.30.0 '@prisma/instrumentation': 6.5.0(@opentelemetry/api@1.9.0) - '@sentry/core': 9.10.0 - '@sentry/opentelemetry': 9.10.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0) + '@sentry/core': 9.10.1 + '@sentry/opentelemetry': 9.10.1(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0) import-in-the-middle: 1.13.1 transitivePeerDependencies: - supports-color - '@sentry/opentelemetry@9.10.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0)': + '@sentry/opentelemetry@9.10.1(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -7824,7 +7824,7 @@ snapshots: '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.30.0 - '@sentry/core': 9.10.0 + '@sentry/core': 9.10.1 '@sindresorhus/is@5.6.0': {} From 6cbc91adcbac7ada2f800d8ed984f54d635132d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 18:46:23 +0800 Subject: [PATCH 0363/2658] chore(deps-dev): bump @types/sanitize-html from 2.13.0 to 2.15.0 (#18741) Bumps [@types/sanitize-html](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sanitize-html) from 2.13.0 to 2.15.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sanitize-html) --- updated-dependencies: - dependency-name: "@types/sanitize-html" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3df03ef00c84..fc7f620e0746 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", "@types/node": "22.13.14", - "@types/sanitize-html": "2.13.0", + "@types/sanitize-html": "2.15.0", "@types/supertest": "6.0.3", "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9223cf49b54..dc0a78803c08 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -352,8 +352,8 @@ importers: specifier: 22.13.14 version: 22.13.14 '@types/sanitize-html': - specifier: 2.13.0 - version: 2.13.0 + specifier: 2.15.0 + version: 2.15.0 '@types/supertest': specifier: 6.0.3 version: 6.0.3 @@ -2228,8 +2228,8 @@ packages: '@types/request@2.48.12': resolution: {integrity: sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==} - '@types/sanitize-html@2.13.0': - resolution: {integrity: sha512-X31WxbvW9TjIhZZNyNBZ/p5ax4ti7qsNDBDEnH4zAgmEh35YnFD1UiS6z9Cd34kKm0LslFW0KPmTQzu/oGtsqQ==} + '@types/sanitize-html@2.15.0': + resolution: {integrity: sha512-71Z6PbYsVKfp4i6Jvr37s5ql6if1Q/iJQT80NbaSi7uGaG8CqBMXP0pk/EsURAOuGdk5IJCd/vnzKrR7S3Txsw==} '@types/shimmer@1.2.0': resolution: {integrity: sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg==} @@ -7985,7 +7985,7 @@ snapshots: '@types/tough-cookie': 4.0.5 form-data: 2.5.3 - '@types/sanitize-html@2.13.0': + '@types/sanitize-html@2.15.0': dependencies: htmlparser2: 8.0.2 From 161ec1614d4e3dcc31902b8b18657bcb88cb7039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=86=E4=B8=BA=E5=90=9B=E6=95=85?= Date: Mon, 31 Mar 2025 19:36:14 +0800 Subject: [PATCH 0364/2658] =?UTF-8?q?fix(route):=20=E8=BD=AF=E8=80=83?= =?UTF-8?q?=EF=BC=8C=E9=80=9A=E4=BF=A1=E8=80=83=E8=AF=95=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E9=94=99=E8=AF=AF.=20(#18740)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/ruankao/news.ts | 2 +- lib/routes/txks/news.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/ruankao/news.ts b/lib/routes/ruankao/news.ts index 720a1ada4530..1d0cff612ccd 100644 --- a/lib/routes/ruankao/news.ts +++ b/lib/routes/ruankao/news.ts @@ -3,7 +3,7 @@ import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; -const BASE_URL = 'https://www.ruankao.org.cn/index/work'; +const BASE_URL = 'https://www.ruankao.org.cn/index/work.html'; const removeFontPresetting = (html: string = ''): string => { const $ = load(html); diff --git a/lib/routes/txks/news.ts b/lib/routes/txks/news.ts index 455fe249cdb7..f267d4a77331 100644 --- a/lib/routes/txks/news.ts +++ b/lib/routes/txks/news.ts @@ -4,7 +4,7 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; -const BASE_URL = 'https://www.txks.org.cn/index/work'; +const BASE_URL = 'https://www.txks.org.cn/index/work.html'; const removeFontPresetting = (html: string = ''): string => { const $ = load(html); From bfd239111920bc53dc5814661535b896eb72ea57 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Mon, 31 Mar 2025 23:10:25 +0800 Subject: [PATCH 0365/2658] feat(route): add BullionVault Gold News (#18736) --- lib/routes/bullionvault/gold-news.ts | 231 +++++++++++++++++++++++++++ lib/routes/bullionvault/namespace.ts | 9 ++ 2 files changed, 240 insertions(+) create mode 100644 lib/routes/bullionvault/gold-news.ts create mode 100644 lib/routes/bullionvault/namespace.ts diff --git a/lib/routes/bullionvault/gold-news.ts b/lib/routes/bullionvault/gold-news.ts new file mode 100644 index 000000000000..c71686a4bbcd --- /dev/null +++ b/lib/routes/bullionvault/gold-news.ts @@ -0,0 +1,231 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; + +export const handler = async (ctx: Context): Promise => { + const { category } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const baseUrl: string = 'https://bullionvault.com'; + const targetUrl: string = new URL(`gold-news${category ? `/${category}` : ''}`, baseUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language = $('html').attr('lang') ?? 'en'; + + let items: DataItem[] = []; + + items = $('div.gold-news-content div.view-content table.views-table tbody tr') + .slice(0, limit) + .toArray() + .map((el): Element => { + const $el: Cheerio = $(el); + const $aEl: Cheerio = $el.find('td.views-field-title a').first(); + + const title: string = $aEl.text(); + const pubDateStr: string | undefined = $el.find('td.views-field-created').text().trim(); + const linkUrl: string | undefined = $aEl.attr('href'); + const authorEls: Element[] = $el.find('a.username').toArray(); + const authors: DataItem['author'] = authorEls.map((authorEl) => { + const $authorEl: Cheerio = $(authorEl); + + return { + name: $authorEl.text(), + url: $authorEl.attr('href'), + avatar: undefined, + }; + }); + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + pubDate: pubDateStr ? parseDate(pubDateStr) : undefined, + link: linkUrl, + author: authors, + updated: upDatedStr ? parseDate(upDatedStr) : undefined, + language, + }; + + return processedItem; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async (): Promise => { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('header h1').text(); + const description: string | undefined = $$('div[property="content:encoded"]').html() ?? ''; + const pubDateStr: string | undefined = $$('div.submitted').text().split(/,/).pop(); + const categories: string[] = $$('meta[name="news_keywords"]').attr('content')?.split(/,/) ?? []; + const authorEls: Element[] = $$('div.view-author-bio').toArray(); + const authors: DataItem['author'] = authorEls.map((authorEl) => { + const $$authorEl: Cheerio = $$(authorEl); + + return { + name: $$authorEl.find('h1').text(), + url: undefined, + avatar: $$authorEl.find('img').attr('src'), + }; + }); + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? parseDate(pubDateStr) : item.pubDate, + category: categories, + author: authors, + content: { + html: description, + text: description, + }, + updated: upDatedStr ? parseDate(upDatedStr) : item.updated, + language, + }; + + return { + ...item, + ...processedItem, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + return { + title: $('title').text(), + description: $('meta[property="og:description"]').attr('content'), + link: targetUrl, + item: items, + allowEmpty: true, + image: $('meta[property="og:image"]').attr('content'), + author: $('meta[property="og:title"]').attr('content')?.split(/\|/).pop(), + language, + id: $('meta[property="og:url"]').attr('content'), + }; +}; + +export const route: Route = { + path: '/gold-news/:category?', + name: 'Gold News', + url: 'bullionvault.com', + maintainers: ['nczitzk'], + handler, + example: '/bullionvault/gold-news', + parameters: { + category: { + description: 'Category', + options: [ + { + label: 'Gold market analysis & gold investment research', + value: '', + }, + { + label: 'Opinion & Analysis', + value: 'opinion-analysis', + }, + { + label: 'Gold Price News', + value: 'gold-price-news', + }, + { + label: 'Investment News', + value: 'news', + }, + { + label: 'Gold Investor Index', + value: 'gold-investor-index', + }, + { + label: 'Gold Infographics', + value: 'infographics', + }, + { + label: 'Market Fundamentals', + value: 'market-fundamentals', + }, + ], + }, + }, + description: `:::tip +If you subscribe to [Gold Price News](https://www.bullionvault.com/gold-news/gold-price-news),where the URL is \`https://www.bullionvault.com/gold-news/gold-price-news\`, extract the part \`https://www.bullionvault.com/gold-news/\` to the end, and use it as the parameter to fill in. Therefore, the route will be [\`/bullionvault/gold-news/gold-price-news\`](https://rsshub.app/bullionvault/gold-news/gold-price-news). +::: + +| Category | ID | +| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | +| [Opinion & Analysis](https://www.bullionvault.com/gold-news/opinion-analysis) | [opinion-analysis](https://rsshub.app/bullionvault/gold-news/opinion-analysis) | +| [Gold Price News](https://www.bullionvault.com/gold-news/gold-price-news) | [gold-price-news](https://rsshub.app/bullionvault/gold-news/gold-price-news) | +| [Investment News](https://www.bullionvault.com/gold-news/news) | [news](https://rsshub.app/bullionvault/gold-news/news) | +| [Gold Investor Index](https://www.bullionvault.com/gold-news/gold-investor-index) | [gold-investor-index](https://rsshub.app/bullionvault/gold-news/gold-investor-index) | +| [Gold Infographics](https://www.bullionvault.com/gold-news/infographics) | [infographics](https://rsshub.app/bullionvault/gold-news/infographics) | +| [Market Fundamentals](https://www.bullionvault.com/gold-news/market-fundamentals) | [market-fundamentals](https://rsshub.app/bullionvault/gold-news/market-fundamentals) | +`, + categories: ['finance'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['bullionvault.com/gold-news/:category'], + target: (params) => { + const category: string = params.category; + + return `/bullionvault/gold-news${category ? `/${category}` : ''}`; + }, + }, + { + title: 'Gold market analysis & gold investment research', + source: ['bullionvault.com/gold-news'], + target: '/gold-news', + }, + { + title: 'Opinion & Analysis', + source: ['bullionvault.com/gold-news/opinion-analysis'], + target: '/gold-news/opinion-analysis', + }, + { + title: 'Gold Price News', + source: ['bullionvault.com/gold-news/gold-price-news'], + target: '/gold-news/gold-price-news', + }, + { + title: 'Investment News', + source: ['bullionvault.com/gold-news/news'], + target: '/gold-news/news', + }, + { + title: 'Gold Investor Index', + source: ['bullionvault.com/gold-news/gold-investor-index'], + target: '/gold-news/gold-investor-index', + }, + { + title: 'Gold Infographics', + source: ['bullionvault.com/gold-news/infographics'], + target: '/gold-news/infographics', + }, + { + title: 'Market Fundamentals', + source: ['bullionvault.com/gold-news/market-fundamentals'], + target: '/gold-news/market-fundamentals', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/bullionvault/namespace.ts b/lib/routes/bullionvault/namespace.ts new file mode 100644 index 000000000000..2dd9d86b52b0 --- /dev/null +++ b/lib/routes/bullionvault/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'BullionVault', + url: 'bullionvault.com', + categories: ['finance'], + description: '', + lang: 'en', +}; From 92312865411c3286e5cf603663251031937db87f Mon Sep 17 00:00:00 2001 From: Gexi0619 Date: Mon, 31 Mar 2025 20:10:00 +0200 Subject: [PATCH 0366/2658] feat(route): add /unipd/ilbolive/news (#18720) * get date from article * fix(route): apply review suggestions for ilbolive news route * fix(route): remove YouTube iframe handling for /ilbolive/news to resolve CodeQL alert * fix(route) --- lib/routes/unipd/ilbolive/news.ts | 104 ++++++++++++++++++++++++++++++ lib/routes/unipd/namespace.ts | 7 ++ 2 files changed, 111 insertions(+) create mode 100644 lib/routes/unipd/ilbolive/news.ts create mode 100644 lib/routes/unipd/namespace.ts diff --git a/lib/routes/unipd/ilbolive/news.ts b/lib/routes/unipd/ilbolive/news.ts new file mode 100644 index 000000000000..32fd5ed3313f --- /dev/null +++ b/lib/routes/unipd/ilbolive/news.ts @@ -0,0 +1,104 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import cache from '@/utils/cache'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +export const route: Route = { + path: '/ilbolive/news', + name: 'Il Bo Live - News', + url: 'ilbolive.unipd.it/it/news', + maintainers: ['Gexi0619'], + example: '/unipd/ilbolive/news', + parameters: {}, + description: 'Il Bo Live - News', + categories: ['university'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['ilbolive.unipd.it/it/news'], + target: '/ilbolive/news', + }, + ], + handler, +}; + +async function handler() { + const baseUrl = 'https://ilbolive.unipd.it'; + const homeUrl = `${baseUrl}/it/news`; + + const response = await got(homeUrl); + const $ = load(response.data); + + const items = $('#list-nodes .col.-s-6') + .toArray() + .map((el) => { + const item = $(el); + const title = item.find('.title a').text().trim(); + const href = item.find('.title a').attr('href'); + const link = baseUrl + href; + const category = item.find('.category').text().trim(); + const image = item.find('.photo img').attr('src'); + const imageUrl = baseUrl + image; + + return { + title, + link, + category, + enclosure_url: imageUrl, + enclosure_type: 'image/jpeg', + }; + }); + + const finalItems = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const detailResponse = await got(item.link); + const $ = load(detailResponse.data); + + const article = $('article.post-generic'); + + // Picture + article.find('img').each((_, el) => { + const img = $(el); + const src = img.attr('src'); + if (src && src.startsWith('/')) { + img.attr('src', baseUrl + src); + } + img.attr('style', 'max-width: 100%; height: auto;'); + }); + + const datetime = article.find('time.date').attr('datetime'); + const pubDate = datetime ? timezone(parseDate(datetime), 0) : undefined; + + const author = article.find('.author a').text().trim(); + + // Delete header + article.find('.header').remove(); + + return { + ...item, + description: article.html() ?? '', + pubDate, + author, + }; + }) + ) + ); + + return { + title: 'Il Bo Live - News', + link: homeUrl, + item: finalItems, + language: 'it', + }; +} diff --git a/lib/routes/unipd/namespace.ts b/lib/routes/unipd/namespace.ts new file mode 100644 index 000000000000..51251e3efa08 --- /dev/null +++ b/lib/routes/unipd/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Università di Padova', + url: 'unipd.it', + lang: 'it', +}; From 4a7a50b8ff3790b1ead91f80e14fa926f43aac14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 08:39:18 +0000 Subject: [PATCH 0367/2658] chore(deps): bump peter-evans/dockerhub-description from 4.0.0 to 4.0.1 (#18749) Bumps [peter-evans/dockerhub-description](https://github.com/peter-evans/dockerhub-description) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/peter-evans/dockerhub-description/releases) - [Commits](https://github.com/peter-evans/dockerhub-description/compare/e98e4d1628a5f3be2be7c231e50981aee98723ae...0505d8b04853a30189aee66f5bb7fd1511bbac71) --- updated-dependencies: - dependency-name: peter-evans/dockerhub-description dependency-version: 4.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 2c3b3174275a..1cbb2a68c48e 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -133,7 +133,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Docker Hub Description - uses: peter-evans/dockerhub-description@e98e4d1628a5f3be2be7c231e50981aee98723ae # v4.0.0 + uses: peter-evans/dockerhub-description@0505d8b04853a30189aee66f5bb7fd1511bbac71 # v4.0.1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} From b62492b2ed7183db93fb5f8f882f21c46838be78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 09:01:46 +0000 Subject: [PATCH 0368/2658] chore(deps-dev): bump @types/node from 22.13.14 to 22.13.15 (#18751) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.14 to 22.13.15. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.13.15 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 80 +++++++++++++++++++++++++------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index fc7f620e0746..573ccc9cd6e0 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.13.14", + "@types/node": "22.13.15", "@types/sanitize-html": "2.15.0", "@types/supertest": "6.0.3", "@types/tiny-async-pool": "2.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dc0a78803c08..c00f9fb4f0f6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -349,8 +349,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.13.14 - version: 22.13.14 + specifier: 22.13.15 + version: 22.13.15 '@types/sanitize-html': specifier: 2.15.0 version: 2.15.0 @@ -377,7 +377,7 @@ importers: version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.13.14)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2))) + version: 2.1.9(vitest@2.1.9(@types/node@22.13.15)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2))) discord-api-types: specifier: 0.37.119 version: 0.37.119 @@ -446,10 +446,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.13.14)) + version: 5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.13.15)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.13.14)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) + version: 2.1.9(@types/node@22.13.15)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -2210,8 +2210,8 @@ packages: '@types/node-fetch@2.6.12': resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} - '@types/node@22.13.14': - resolution: {integrity: sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==} + '@types/node@22.13.15': + resolution: {integrity: sha512-imAbQEEbVni6i6h6Bd5xkCRwLqFc8hihCsi2GbtDoAtUcAFQ6Zs4pFXTZUUbroTkXdImczWM9AI8eZUuybXE3w==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -7095,7 +7095,7 @@ snapshots: '@inquirer/figures': 1.0.11 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7862,7 +7862,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/cookie@0.6.0': {} @@ -7885,12 +7885,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/html-to-text@9.0.4': {} @@ -7898,13 +7898,13 @@ snapshots: '@types/imapflow@1.0.20': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7914,7 +7914,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/jsrsasign@10.5.13': {} @@ -7924,7 +7924,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7946,18 +7946,18 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/mysql@2.15.26': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/node-fetch@2.6.12': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 form-data: 4.0.2 - '@types/node@22.13.14': + '@types/node@22.13.15': dependencies: undici-types: 6.20.0 @@ -7969,7 +7969,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 pg-protocol: 1.8.0 pg-types: 2.2.0 @@ -7981,7 +7981,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/tough-cookie': 4.0.5 form-data: 2.5.3 @@ -7997,7 +7997,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.13.14 + '@types/node': 22.13.15 form-data: 4.0.2 '@types/supertest@6.0.3': @@ -8007,7 +8007,7 @@ snapshots: '@types/tedious@4.0.14': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 '@types/tiny-async-pool@2.0.3': {} @@ -8025,7 +8025,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 optional: true '@typescript-eslint/eslint-plugin@8.28.0(@typescript-eslint/parser@8.28.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2)': @@ -8131,7 +8131,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.13.14)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.13.15)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8145,7 +8145,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.13.14)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) + vitest: 2.1.9(@types/node@22.13.15)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) transitivePeerDependencies: - supports-color @@ -8156,14 +8156,14 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.13.14))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.13.15))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.3(typescript@5.8.2) - vite: 5.4.15(@types/node@22.13.14) + vite: 5.4.15(@types/node@22.13.15) '@vitest/pretty-format@2.1.9': dependencies: @@ -11005,7 +11005,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.13.14 + '@types/node': 22.13.15 long: 5.3.1 proxy-agent@6.4.0: @@ -11941,13 +11941,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.9(@types/node@22.13.14): + vite-node@2.1.9(@types/node@22.13.15): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.15(@types/node@22.13.14) + vite: 5.4.15(@types/node@22.13.15) transitivePeerDependencies: - '@types/node' - less @@ -11959,30 +11959,30 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.13.14)): + vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.13.15)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.2) optionalDependencies: - vite: 5.4.15(@types/node@22.13.14) + vite: 5.4.15(@types/node@22.13.15) transitivePeerDependencies: - supports-color - typescript - vite@5.4.15(@types/node@22.13.14): + vite@5.4.15(@types/node@22.13.15): dependencies: esbuild: 0.21.5 postcss: 8.5.3 rollup: 4.37.0 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 fsevents: 2.3.3 - vitest@2.1.9(@types/node@22.13.14)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)): + vitest@2.1.9(@types/node@22.13.15)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.13.14)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.13.15)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -11998,11 +11998,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.15(@types/node@22.13.14) - vite-node: 2.1.9(@types/node@22.13.14) + vite: 5.4.15(@types/node@22.13.15) + vite-node: 2.1.9(@types/node@22.13.15) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.13.14 + '@types/node': 22.13.15 jsdom: 26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From c1a7cd019e6f18be1b5c75d9fe9be5cf563ede11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 09:03:01 +0000 Subject: [PATCH 0369/2658] chore(deps-dev): bump got from 14.4.6 to 14.4.7 (#18752) Bumps [got](https://github.com/sindresorhus/got) from 14.4.6 to 14.4.7. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v14.4.6...v14.4.7) --- updated-dependencies: - dependency-name: got dependency-version: 14.4.7 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 573ccc9cd6e0..6435ae99ac0a 100644 --- a/package.json +++ b/package.json @@ -182,7 +182,7 @@ "eslint-plugin-yml": "1.17.0", "fs-extra": "11.3.0", "globals": "16.0.0", - "got": "14.4.6", + "got": "14.4.7", "husky": "9.1.7", "js-beautify": "1.15.4", "lint-staged": "15.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c00f9fb4f0f6..8e8030b67425 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -409,8 +409,8 @@ importers: specifier: 16.0.0 version: 16.0.0 got: - specifier: 14.4.6 - version: 14.4.6 + specifier: 14.4.7 + version: 14.4.7 husky: specifier: 9.1.7 version: 9.1.7 @@ -3638,8 +3638,8 @@ packages: resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==} engines: {node: '>=14.16'} - got@14.4.6: - resolution: {integrity: sha512-rnhwfM/PhMNJ1i17k3DuDqgj0cKx3IHxBKVv/WX1uDKqrhi2Gv3l7rhPThR/Cc6uU++dD97W9c8Y0qyw9x0jag==} + got@14.4.7: + resolution: {integrity: sha512-DI8zV1231tqiGzOiOzQWDhsBmncFW7oQDH6Zgy6pDPrqJuVZMtoSgPLLsBZQj8Jg4JFfwoOsDA8NGtLQLnIx2g==} engines: {node: '>=20'} graceful-fs@4.2.11: @@ -9635,7 +9635,7 @@ snapshots: p-cancelable: 3.0.0 responselike: 3.0.0 - got@14.4.6: + got@14.4.7: dependencies: '@sindresorhus/is': 7.0.1 '@szmarczak/http-timer': 5.0.1 From 82e91a45d8cb644cd773e31eb35f0bae7960094e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 17:10:08 +0800 Subject: [PATCH 0370/2658] chore(deps-dev): bump the typescript-eslint group with 2 updates (#18750) Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.28.0 to 8.29.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.29.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.28.0 to 8.29.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.29.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.29.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-version: 8.29.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 110 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 88 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 6435ae99ac0a..8e42f5b3a7e1 100644 --- a/package.json +++ b/package.json @@ -168,8 +168,8 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.28.0", - "@typescript-eslint/parser": "8.28.0", + "@typescript-eslint/eslint-plugin": "8.29.0", + "@typescript-eslint/parser": "8.29.0", "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.37.119", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8e8030b67425..33fb22f0f4af 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -367,11 +367,11 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.28.0 - version: 8.28.0(@typescript-eslint/parser@8.28.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2) + specifier: 8.29.0 + version: 8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2) '@typescript-eslint/parser': - specifier: 8.28.0 - version: 8.28.0(eslint@9.23.0)(typescript@5.8.2) + specifier: 8.29.0 + version: 8.29.0(eslint@9.23.0)(typescript@5.8.2) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -2270,16 +2270,16 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.28.0': - resolution: {integrity: sha512-lvFK3TCGAHsItNdWZ/1FkvpzCxTHUVuFrdnOGLMa0GGCFIbCgQWVk3CzCGdA7kM3qGVc+dfW9tr0Z/sHnGDFyg==} + '@typescript-eslint/eslint-plugin@8.29.0': + resolution: {integrity: sha512-PAIpk/U7NIS6H7TEtN45SPGLQaHNgB7wSjsQV/8+KYokAb2T/gloOA/Bee2yd4/yKVhPKe5LlaUGhAZk5zmSaQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@8.28.0': - resolution: {integrity: sha512-LPcw1yHD3ToaDEoljFEfQ9j2xShY367h7FZ1sq5NJT9I3yj4LHer1Xd1yRSOdYy9BpsrxU7R+eoDokChYM53lQ==} + '@typescript-eslint/parser@8.29.0': + resolution: {integrity: sha512-8C0+jlNJOwQso2GapCVWWfW/rzaq7Lbme+vGUFKE31djwNncIpgXD7Cd4weEsDdkoZDjH0lwwr3QDQFuyrMg9g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2289,8 +2289,12 @@ packages: resolution: {integrity: sha512-u2oITX3BJwzWCapoZ/pXw6BCOl8rJP4Ij/3wPoGvY8XwvXflOzd1kLrDUUUAIEdJSFh+ASwdTHqtan9xSg8buw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.28.0': - resolution: {integrity: sha512-oRoXu2v0Rsy/VoOGhtWrOKDiIehvI+YNrDk5Oqj40Mwm0Yt01FC/Q7nFqg088d3yAsR1ZcZFVfPCTTFCe/KPwg==} + '@typescript-eslint/scope-manager@8.29.0': + resolution: {integrity: sha512-aO1PVsq7Gm+tcghabUpzEnVSFMCU4/nYIgC2GOatJcllvWfnhrgW0ZEbnTxm36QsikmCN1K/6ZgM7fok2I7xNw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.29.0': + resolution: {integrity: sha512-ahaWQ42JAOx+NKEf5++WC/ua17q5l+j1GFrbbpVKzFL/tKVc0aYY8rVSYUpUvt2hUP1YBr7mwXzx+E/DfUWI9Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2300,12 +2304,22 @@ packages: resolution: {integrity: sha512-bn4WS1bkKEjx7HqiwG2JNB3YJdC1q6Ue7GyGlwPHyt0TnVq6TtD/hiOdTZt71sq0s7UzqBFXD8t8o2e63tXgwA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.29.0': + resolution: {integrity: sha512-wcJL/+cOXV+RE3gjCyl/V2G877+2faqvlgtso/ZRbTCnZazh0gXhe+7gbAnfubzN2bNsBtZjDvlh7ero8uIbzg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.28.0': resolution: {integrity: sha512-H74nHEeBGeklctAVUvmDkxB1mk+PAZ9FiOMPFncdqeRBXxk1lWSYraHw8V12b7aa6Sg9HOBNbGdSHobBPuQSuA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/typescript-estree@8.29.0': + resolution: {integrity: sha512-yOfen3jE9ISZR/hHpU/bmNvTtBW1NjRbkSFdZOksL1N+ybPEE7UVGMwqvS6CP022Rp00Sb0tdiIkhSCe6NI8ow==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/utils@8.28.0': resolution: {integrity: sha512-OELa9hbTYciYITqgurT1u/SzpQVtDLmQMFzy/N8pQE+tefOyCWT79jHsav294aTqV1q1u+VzqDGbuujvRYaeSQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2313,10 +2327,21 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/utils@8.29.0': + resolution: {integrity: sha512-gX/A0Mz9Bskm8avSWFcK0gP7cZpbY4AIo6B0hWYFCaIsz750oaiWR4Jr2CI+PQhfW1CpcQr9OlfPS+kMFegjXA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/visitor-keys@8.28.0': resolution: {integrity: sha512-hbn8SZ8w4u2pRwgQ1GlUrPKE+t2XvcCW5tTRF7j6SMYIuYG37XuzIW44JCZPa36evi0Oy2SnM664BlIaAuQcvg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.29.0': + resolution: {integrity: sha512-Sne/pVz8ryR03NFK21VpN88dZ2FdQXOlq3VIklbrTYEt8yXtRFr9tvUhqvCeKjqYk5FSim37sHbooT6vzBTZcg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} @@ -8028,14 +8053,14 @@ snapshots: '@types/node': 22.13.15 optional: true - '@typescript-eslint/eslint-plugin@8.28.0(@typescript-eslint/parser@8.28.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2)': + '@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.28.0(eslint@9.23.0)(typescript@5.8.2) - '@typescript-eslint/scope-manager': 8.28.0 - '@typescript-eslint/type-utils': 8.28.0(eslint@9.23.0)(typescript@5.8.2) - '@typescript-eslint/utils': 8.28.0(eslint@9.23.0)(typescript@5.8.2) - '@typescript-eslint/visitor-keys': 8.28.0 + '@typescript-eslint/parser': 8.29.0(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/scope-manager': 8.29.0 + '@typescript-eslint/type-utils': 8.29.0(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/visitor-keys': 8.29.0 eslint: 9.23.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -8045,12 +8070,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.28.0(eslint@9.23.0)(typescript@5.8.2)': + '@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2)': dependencies: - '@typescript-eslint/scope-manager': 8.28.0 - '@typescript-eslint/types': 8.28.0 - '@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.2) - '@typescript-eslint/visitor-keys': 8.28.0 + '@typescript-eslint/scope-manager': 8.29.0 + '@typescript-eslint/types': 8.29.0 + '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2) + '@typescript-eslint/visitor-keys': 8.29.0 debug: 4.4.0 eslint: 9.23.0 typescript: 5.8.2 @@ -8062,10 +8087,15 @@ snapshots: '@typescript-eslint/types': 8.28.0 '@typescript-eslint/visitor-keys': 8.28.0 - '@typescript-eslint/type-utils@8.28.0(eslint@9.23.0)(typescript@5.8.2)': + '@typescript-eslint/scope-manager@8.29.0': dependencies: - '@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.2) - '@typescript-eslint/utils': 8.28.0(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/types': 8.29.0 + '@typescript-eslint/visitor-keys': 8.29.0 + + '@typescript-eslint/type-utils@8.29.0(eslint@9.23.0)(typescript@5.8.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2) + '@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.2) debug: 4.4.0 eslint: 9.23.0 ts-api-utils: 2.1.0(typescript@5.8.2) @@ -8075,6 +8105,8 @@ snapshots: '@typescript-eslint/types@8.28.0': {} + '@typescript-eslint/types@8.29.0': {} + '@typescript-eslint/typescript-estree@8.28.0(typescript@5.8.2)': dependencies: '@typescript-eslint/types': 8.28.0 @@ -8089,6 +8121,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.29.0(typescript@5.8.2)': + dependencies: + '@typescript-eslint/types': 8.29.0 + '@typescript-eslint/visitor-keys': 8.29.0 + debug: 4.4.0 + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.1 + ts-api-utils: 2.1.0(typescript@5.8.2) + typescript: 5.8.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.28.0(eslint@9.23.0)(typescript@5.8.2)': dependencies: '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0) @@ -8100,11 +8146,27 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@8.29.0(eslint@9.23.0)(typescript@5.8.2)': + dependencies: + '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0) + '@typescript-eslint/scope-manager': 8.29.0 + '@typescript-eslint/types': 8.29.0 + '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2) + eslint: 9.23.0 + typescript: 5.8.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/visitor-keys@8.28.0': dependencies: '@typescript-eslint/types': 8.28.0 eslint-visitor-keys: 4.2.0 + '@typescript-eslint/visitor-keys@8.29.0': + dependencies: + '@typescript-eslint/types': 8.29.0 + eslint-visitor-keys: 4.2.0 + '@ungap/structured-clone@1.3.0': {} '@unhead/schema@1.11.20': From fd5cc6868fe40da90fca63954e8ca227b023fa16 Mon Sep 17 00:00:00 2001 From: "F.Rushmore.Coglan" <61170850+Fgju@users.noreply.github.com> Date: Tue, 1 Apr 2025 18:28:09 +0800 Subject: [PATCH 0371/2658] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD?= =?UTF-8?q?=E5=9B=BD=E6=94=BF=E6=B3=95=E5=A4=A7=E5=AD=A6=20(#18748)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): 添加中国政法大学教务处通知公告路由 * fix(route): 修改中国政法大学教务处路由名称为“教务处通知公告” --- lib/routes/cupl/jwc.ts | 69 ++++++++++++++++++++++++++++++++++++ lib/routes/cupl/namespace.ts | 20 +++++++++++ 2 files changed, 89 insertions(+) create mode 100644 lib/routes/cupl/jwc.ts create mode 100644 lib/routes/cupl/namespace.ts diff --git a/lib/routes/cupl/jwc.ts b/lib/routes/cupl/jwc.ts new file mode 100644 index 000000000000..45dc33cb9799 --- /dev/null +++ b/lib/routes/cupl/jwc.ts @@ -0,0 +1,69 @@ +import { Route } from '@/types'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import ofetch from '@/utils/ofetch'; +// import cache from '@/utils/cache'; + +export const route: Route = { + path: '/jwc', + url: 'jwc.cupl.edu.cn/index/tzgg.htm', + categories: ['university'], + example: '/cupl/jwc', + description: '中国政法大学教务处通知公告', + name: '教务处通知公告', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['jwc.cupl.edu.cn/index/tzgg.htm', 'jwc.cupl.edu.cn/'], + target: '/jwc', + }, + ], + maintainers: ['Fgju'], + handler: async (/* ctx*/) => { + const host = 'https://jwc.cupl.edu.cn/'; + const response = await ofetch(host + 'index/tzgg.htm'); + const $ = load(response); + + const list = $('li[id^=line_u8_]') + .toArray() + .map((elem) => { + const elem_ = $(elem); + const a = elem_.find('a'); + return { + link: a[1].attribs.href, + title: $(a[1]).text(), + pubDate: parseDate(elem_.find('span').text(), 'YYYY-MM-DD'), + category: $(a[0]).text().slice(0, -1), + description: '', + }; + }); + /* + const items = await Promise.all( + list.map((item) => { + cache.tryGet(item.link, async () => { + const response = await ofetch(host + item.link.slice(3)); + const $ = load(response); + const content = $('.form[name=_newscontent_fromname]').html(); + item.description = content ?? ''; + return item; + } + ) + }) + ); + */ + return { + title: '通知公告', + link: 'https://jwc.cupl.edu.cn/index/tzgg.htm', + description: '中国政法大学教务处通知公告', + language: 'zh-CN', + item: list, + }; + }, +}; diff --git a/lib/routes/cupl/namespace.ts b/lib/routes/cupl/namespace.ts new file mode 100644 index 000000000000..be4aa27fbe6d --- /dev/null +++ b/lib/routes/cupl/namespace.ts @@ -0,0 +1,20 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'CUPL', + url: 'jwc.cupl.edu.cn/index/tzgg.htm', + description: 'China University of Political Science and Law Academic Affairs Office Notices', + + zh: { + name: '中国政法大学', + description: '中国政法大学教务处通知公告', + }, + 'zh-TW': { + name: '中國政法大學', + description: '中國政法大學教務處通知公告', + }, + ja: { + name: '中国政法大学', + description: '中国政法大学教務処通知公告', + }, +}; From a4935ea1acde1b0dc57ff05098fe160ec4819460 Mon Sep 17 00:00:00 2001 From: Majimay Date: Tue, 1 Apr 2025 19:09:46 +0800 Subject: [PATCH 0372/2658] =?UTF-8?q?feat(route):=20add=20=E6=9D=AD?= =?UTF-8?q?=E5=B7=9E=E5=B8=82=E4=BA=BA=E6=B0=91=E6=94=BF=E5=BA=9C=20(#1820?= =?UTF-8?q?8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 杭州市人民政府 * change maintainer username * perf: drop unnecessary requests * feat: use art-template to format content from 浙江政务服务网 * fix: remove custom UA * fix: puppeteer timeout due to unnecessary page request, turn off page interception * perf: reduce loading time & fix(puppeteer): exceed waitForSelector timeout --- lib/routes/gov/hangzhou/namespace.ts | 9 ++ lib/routes/gov/hangzhou/templates/jbxx.art | 173 +++++++++++++++++++++ lib/routes/gov/hangzhou/zjzwfw.ts | 89 +++++++++++ lib/routes/gov/hangzhou/zwfw.ts | 112 +++++++++++++ 4 files changed, 383 insertions(+) create mode 100644 lib/routes/gov/hangzhou/namespace.ts create mode 100644 lib/routes/gov/hangzhou/templates/jbxx.art create mode 100644 lib/routes/gov/hangzhou/zjzwfw.ts create mode 100644 lib/routes/gov/hangzhou/zwfw.ts diff --git a/lib/routes/gov/hangzhou/namespace.ts b/lib/routes/gov/hangzhou/namespace.ts new file mode 100644 index 000000000000..97b73cff094e --- /dev/null +++ b/lib/routes/gov/hangzhou/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: "Hangzhou People's Government", + url: 'hangzhou.gov.cn', + zh: { + name: '杭州市人民政府', + }, +}; diff --git a/lib/routes/gov/hangzhou/templates/jbxx.art b/lib/routes/gov/hangzhou/templates/jbxx.art new file mode 100644 index 000000000000..552356d597e2 --- /dev/null +++ b/lib/routes/gov/hangzhou/templates/jbxx.art @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ if otherInfo.legalPersonThemeClassification}} + + + + + {{ /if }} + {{ if !otherInfo.legalPersonThemeClassification }} + + + {{ /if }} + + + + + + + + + + + + + + +
办事信息
服务对象{{serviceInfo.serviceTarget}}办理形式{{serviceInfo.processingMethods}}
办理地点{{serviceInfo.processingLocation}}
办理时间{{serviceInfo.processingTime}}
申请信息
受理条件{{applicationInfo.acceptanceConditions}}
禁止性要求{{applicationInfo.prohibitedRequirements}}
数量限制{{applicationInfo.quantityRestrictions}}
结果信息
审批结果名称{{resultInfo.approvalResult}}
审批结果样本{{@ resultInfo.approvalSample }}审批结果类型{{resultInfo.approvalResultType}}
收费信息
是否收费{{feeInfo.isThereAFee}}是否支持网上支付{{feeInfo.isOnlinePaymentSupported}}
审批信息
权力来源{{approvalInfo.authoritySource}}
行使层级{{approvalInfo.exerciseLevel}}实施主体性质{{approvalInfo.implementingEntity}}
送达信息
是否支持物流快递{{deliveryInfo.isLogisticsSupported}}送达时限{{deliveryInfo.deliveryTimeframe}}
送达方式{{deliveryInfo.deliveryMethods}}
中介服务信息
中介服务事项名称{{agentService}}
其他信息
部门名称{{otherInfo.departmentName}}事项类型{{otherInfo.matterType}}
受理机构{{otherInfo.acceptingInstitution}}
基本编码{{otherInfo.basicCode}}实施编码{{otherInfo.implementationCode}}
通办范围{{otherInfo.scopeOfGeneralHandling}}办件类型{{otherInfo.documentType}}
决定机构{{otherInfo.decisionMakingAuthority}}委托部门{{otherInfo.delegatedDepartment}}
网上办理深度{{otherInfo.onlineProcessingDepth}}事项审查类型{{otherInfo.reviewType}}
是否进驻政务大厅{{otherInfo.isItAvailableInTheGovernmentServiceHall}}是否支持自助终端办理{{otherInfo.isSelfServiceTerminalProcessingSupported}}
是否实行告知承诺{{otherInfo.isACommitmentSystemImplemented}}权力属性{{otherInfo.authorityAttribute}}
是否支持预约办理{{otherInfo.isAppointmentBookingSupported}}是否网办{{otherInfo.isOnlineProcessingAvailable}}
自然人主题分类{{otherInfo.naturalPersonThemeClassification}}法人主题分类{{otherInfo.legalPersonThemeClassification}}法人主题分类{{otherInfo.naturalPersonThemeClassification}}
行政相对人权利和义务 + {{otherInfo.rightsAndObligationsOfAdministrativeCounterparties}} +
适用对象说明{{otherInfo.applicableObjectDescription}}
涉及的内容{{otherInfo.contentInvolved}}
diff --git a/lib/routes/gov/hangzhou/zjzwfw.ts b/lib/routes/gov/hangzhou/zjzwfw.ts new file mode 100644 index 000000000000..24a01b5c0725 --- /dev/null +++ b/lib/routes/gov/hangzhou/zjzwfw.ts @@ -0,0 +1,89 @@ +import logger from '@/utils/logger'; + +export async function crawler(item: any, browser: any): Promise { + try { + let response = ''; + const page = await browser.newPage(); + await page.setRequestInterception(true); + page.on('request', (request) => { + const resourceType = request.resourceType(); + if (['document', 'script', 'stylesheet', 'xhr'].includes(resourceType)) { + request.continue(); + } else { + request.abort(); + } + }); + await page.goto(item.link, { + waitUntil: 'networkidle0', + timeout: 29000, + }); + const selector = '.item-left .item .title .button'; + await page.evaluate((selector) => document.querySelector(selector).click(), selector); + await page.waitForSelector('.item-left .item .bg_box div:nth-child(16)', { timeout: 5000 }); + response = await page.content(); + return response || ''; + } catch (error) { + logger.error('Error when visiting /gov/hangzhou/zwfw:', error); + return ''; + } +} + +export function analyzer(box: any): object { + return { + serviceInfo: { + serviceTarget: box.find('.row:nth(1)>div:nth(1)').find('.inner').children().first().attr('content'), + processingMethods: box.find('.row:nth(1)>div:nth(3)').find('.inner').text(), + processingLocation: box.find('.row:nth(2)>div:nth(1)').find('.inner').text(), + processingTime: box.find('.row:nth(3)>div:nth(1)').find('.inner').text(), + }, + applicationInfo: { + acceptanceConditions: box.find('.row:nth(5)>div:nth(1)').find('.inner').text(), + prohibitedRequirements: box.find('.row:nth(6)>div:nth(1)').find('.inner').text(), + quantityRestrictions: box.find('.row:nth(7)>div:nth(1)').find('.inner').text(), + }, + resultInfo: { + approvalResult: box.find('.row:nth(9)>div:nth(1)').find('.inner').text(), + approvalSample: box.find('.row:nth(10)>div:nth(1)').find('.inner').html(), + approvalResultType: box.find('.row:nth(10)>div:nth(3)').find('.inner').text(), + }, + feeInfo: { + isThereAFee: box.find('.row:nth(12)>div:nth(1)').find('.inner').text(), + isOnlinePaymentSupported: box.find('.row:nth(12)>div:nth(3)').find('.inner').text(), + }, + approvalInfo: { + authoritySource: box.find('.row:nth(14)>div:nth(1)').find('.inner').text(), + exerciseLevel: box.find('.row:nth(15)>div:nth(1)').find('.inner').text(), + implementingEntity: box.find('.row:nth(15)>div:nth(3)').find('.inner').text(), + }, + deliveryInfo: { + isLogisticsSupported: box.find('.row:nth(17)>div:nth(1)').find('.inner').text(), + deliveryTimeframe: box.find('.row:nth(17)>div:nth(3)').find('.inner').text(), + deliveryMethods: box.find('.row:nth(18)>div:nth(1)').find('.inner').text(), + }, + agentService: box.find('.row:nth(20)>div:nth(1)').find('.inner').text(), + otherInfo: { + departmentName: box.find('.row:nth(22)>div:nth(1)').find('.inner').text(), + matterType: box.find('.row:nth(22)>div:nth(3)').find('.inner').text(), + acceptingInstitution: box.find('.row:nth(23)>div:nth(1)').find('.inner').text(), + basicCode: box.find('.row:nth(24)>div:nth(1)').find('.inner').text(), + implementationCode: box.find('.row:nth(24)>div:nth(3)').find('.inner').text(), + scopeOfGeneralHandling: box.find('.row:nth(25)>div:nth(1)').find('.inner').text(), + documentType: box.find('.row:nth(25)>div:nth(3)').find('.inner').text(), + decisionMakingAuthority: box.find('.row:nth(26)>div:nth(1)').find('.inner').text(), + delegatedDepartment: box.find('.row:nth(26)>div:nth(3)').find('.inner').text(), + onlineProcessingDepth: box.find('.row:nth(27)>div:nth(1)').find('.inner').text(), + reviewType: box.find('.row:nth(27)>div:nth(3)').find('.inner').text(), + isItAvailableInTheGovernmentServiceHall: box.find('.row:nth(28)>div:nth(1)').find('.inner').text(), + isSelfServiceTerminalProcessingSupported: box.find('.row:nth(28)>div:nth(3)').find('.inner').text(), + isACommitmentSystemImplemented: box.find('.row:nth(29)>div:nth(1)').find('.inner').text(), + authorityAttribute: box.find('.row:nth(29)>div:nth(3)').find('.inner').text(), + isAppointmentBookingSupported: box.find('.row:nth(30)>div:nth(1)').find('.inner').text(), + isOnlineProcessingAvailable: box.find('.row:nth(30)>div:nth(3)').find('.inner').text(), + naturalPersonThemeClassification: box.find('.row:nth(31)>div:nth(1)').find('.inner').text(), + legalPersonThemeClassification: box.find('.row:nth(31)>div:nth(3)').find('.inner').text(), + rightsAndObligationsOfAdministrativeCounterparties: box.find('.row:nth(32)>div:nth(1)').find('.inner').text(), + applicableObjectDescription: box.find('.row:nth(33)>div:nth(1)').find('.inner').text(), + contentInvolved: box.find('.row:nth(34)>div:nth(1)').find('.inner').text(), + }, + }; +} diff --git a/lib/routes/gov/hangzhou/zwfw.ts b/lib/routes/gov/hangzhou/zwfw.ts new file mode 100644 index 000000000000..9c2c24eb6d6f --- /dev/null +++ b/lib/routes/gov/hangzhou/zwfw.ts @@ -0,0 +1,112 @@ +import { Route } from '@/types'; +import { load } from 'cheerio'; +const __dirname = getCurrentPath(import.meta.url); + +import puppeteer from '@/utils/puppeteer'; +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import { crawler, analyzer } from './zjzwfw'; +import timezone from '@/utils/timezone'; +import path from 'node:path'; +import { art } from '@/utils/render'; +import { getCurrentPath } from '@/utils/helpers'; + +export const route: Route = { + path: '/hangzhou/zwfw', + categories: ['government'], + example: '/gov/hangzhou/zwfw', + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['hangzhou.gov.cn/col/col1256349/index.html'], + }, + ], + name: '政务服务公开', + maintainers: ['flynncao'], + handler, + url: 'hangzhou.gov.cn/col/col1256349/index.html', +}; + +async function handler() { + const host = 'https://www.hangzhou.gov.cn/col/col1256349/index.html'; + const response = await ofetch(host); + + const browser = await puppeteer({ stealth: true }); + const link = host; + const formatted = response + .replace('', '') + .replaceAll('', '') + .replaceAll('', '') + .replaceAll('', '') + .replaceAll('', '') + .replaceAll('', ''); + const $ = load(formatted); + + const list = $('li.clearfix') + .toArray() + .map((item: any) => { + item = $(item); + const title = item.find('a').first().text(); + const time = timezone(parseDate(item.find('span').first().text(), 'YYYY-MM-DD'), 8); + const a = item.find('a').first().attr('href'); + const fullUrl = new URL(a, host).href; + + return { + title, + link: fullUrl, + pubDate: time, + }; + }) + .filter((item) => !item.title.includes('置顶')); + const items: any = await Promise.all( + list.map((item: any) => + cache.tryGet(item.link, async () => { + const host = new URL(item.link).hostname; + if (host === 'www.zjzwfw.gov.cn') { + // 来源为浙江政务服务网 + const content = await crawler(item, browser); + const $ = load(content); + item.description = art(path.resolve(__dirname, 'templates/jbxx.art'), analyzer($('.item-left .item .bg_box'))); + item.author = '浙江政务服务网'; + item.category = $('meta[name="ColumnType"]').attr('content'); + } else { + // 其他正常抓取 + const response = await got(item.link); + const $ = load(response.data); + if (host === 'police.hangzhou.gov.cn') { + // 来源为杭州市公安局 + item.description = $('.art-content .wz_con_content').html(); + item.author = $('meta[name="ContentSource"]').attr('content'); + item.category = $('meta[name="ColumnType"]').attr('content'); + } else { + // 缺省:来源为杭州市政府网 + item.description = $('.article').html(); + item.author = $('meta[name="ContentSource"]').attr('content'); + item.category = $('meta[name="ColumnType"]').attr('content'); + } + } + item.pubDate = $('meta[name="PubDate"]').length ? timezone(parseDate($('meta[name="PubDate"]').attr('content') as string, 'YYYY-MM-DD HH:mm'), 8) : item.pubDate; + return item; + }) + ) + ); + + await browser.close(); + return { + allowEmpty: true, + title: '杭州市人民政府-政务服务公开', + link, + item: items, + }; +} From b9a71029f3d873b8b0a91c36c9c834e2b45e449b Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 2 Apr 2025 00:49:19 +0800 Subject: [PATCH 0373/2658] fix(route/bullionvault): missing latest articles (#18754) --- lib/routes/bullionvault/gold-news.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/bullionvault/gold-news.ts b/lib/routes/bullionvault/gold-news.ts index c71686a4bbcd..ecef8a97ab6f 100644 --- a/lib/routes/bullionvault/gold-news.ts +++ b/lib/routes/bullionvault/gold-news.ts @@ -20,15 +20,15 @@ export const handler = async (ctx: Context): Promise => { let items: DataItem[] = []; - items = $('div.gold-news-content div.view-content table.views-table tbody tr') + items = $('section#block-views-latest-articles-block div.media, section#block-system-main table.views-table tr') .slice(0, limit) .toArray() .map((el): Element => { const $el: Cheerio = $(el); - const $aEl: Cheerio = $el.find('td.views-field-title a').first(); + const $aEl: Cheerio = $el.find('td.views-field-title a, div.views-field-title a').first(); const title: string = $aEl.text(); - const pubDateStr: string | undefined = $el.find('td.views-field-created').text().trim(); + const pubDateStr: string | undefined = $el.find('td.views-field-created, div.views-field-created').text().trim(); const linkUrl: string | undefined = $aEl.attr('href'); const authorEls: Element[] = $el.find('a.username').toArray(); const authors: DataItem['author'] = authorEls.map((authorEl) => { From 8c16cf41a7a4fa49769426e90d2ea79972cef3a3 Mon Sep 17 00:00:00 2001 From: Jiahao Lee Date: Wed, 2 Apr 2025 03:10:56 +0800 Subject: [PATCH 0374/2658] fix(route/yystv): fix cache collisions (#18739) * fix(route/yystv): fix cache collisions induced by these two implementations * chore(route/yystv): prefer existing types over new types * fix(route/yystv): prefer caching processed items over raw web pages * docs: fix maintainer github id --------- --- lib/routes/yystv/category.ts | 100 +++++++++++++++++------------------ lib/routes/yystv/docs.ts | 16 +++--- lib/routes/yystv/fetcher.ts | 10 ++++ 3 files changed, 66 insertions(+), 60 deletions(-) create mode 100644 lib/routes/yystv/fetcher.ts diff --git a/lib/routes/yystv/category.ts b/lib/routes/yystv/category.ts index ba92ad6a842c..6f4207b29ef3 100644 --- a/lib/routes/yystv/category.ts +++ b/lib/routes/yystv/category.ts @@ -1,6 +1,6 @@ -import { Route } from '@/types'; -import cache from '@/utils/cache'; -import got from '@/utils/got'; +import { DataItem, Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { fetchDataItemCached } from './fetcher'; import { load } from 'cheerio'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; @@ -18,67 +18,65 @@ export const route: Route = { supportScihub: false, }, name: '游研社 - 分类文章', - maintainers: ['LightStrawberry'], + maintainers: ['betta-cyber', 'dousha'], handler, - description: `| 推游 | 游戏史 | 大事件 | 文化 | 趣闻 | 经典回顾 | -| --------- | ------- | ------ | ------- | ---- | -------- | -| recommend | history | big | culture | news | retro |`, + description: `| 推游 | 游戏史 | 大事件 | 文化 | 趣闻 | 经典回顾 | 业界 | +| --------- | ------- | ------ | ------- | ---- | -------- | -------- | +| recommend | history | big | culture | news | retro | industry |`, }; +type ArticleEntry = DataItem & { link: string }; + +function getDescription(items: ArticleEntry[]): Promise { + return Promise.all( + items.map((item) => + fetchDataItemCached(item.link, (pageContent) => { + const $ = load(pageContent); + const articleContent = $('.doc-content.rel').html() || ''; + + const assembledItem: DataItem = { ...item, description: articleContent }; + return assembledItem; + }) + ) + ); +} + async function handler(ctx) { const category = ctx.req.param('category'); const url = `https://www.yystv.cn/b/${category}`; - const response = await got({ - method: 'get', - url, - }); - - const data = response.data; - const $ = load(data); + const response = await ofetch(url); + const $ = load(response); - const first_part = $('.b-list-main-item') - .slice(0, 2) - .map(function () { - const info = { - title: $(this).find('.b-main-info-title').text(), - link: 'https://www.yystv.cn' + $(this).find('.b-main-info-title a').attr('href'), - pubDate: parseRelativeDate($(this).find('.b-main-createtime').text()), - author: $(this).find('.b-author').text(), + const firstPart = $('.b-list-main-item') + .toArray() + .map((element) => { + const s = $(element); + const info: ArticleEntry = { + title: s.find('.b-main-info-title').text(), + link: 'https://www.yystv.cn' + s.find('.b-main-info-title a').attr('href'), + pubDate: parseRelativeDate(s.find('.b-main-createtime').text()), + author: s.find('.b-author').text(), }; return info; - }) - .get(); + }); - const second_part = $('.list-container li') - .slice(0, 18) - .map(function () { - const info = { - title: $('.list-article-title', this).text(), - link: 'https://www.yystv.cn' + $('a', this).attr('href'), - pubDate: $('.c-999', this).text().includes('-') ? parseDate($('.c-999', this).text()) : parseRelativeDate($('.c-999', this).text()), - author: $('.handler-author-link', this).text(), + const secondPart = $('.list-container li') + .toArray() + .map((element) => { + const s = $(element); + const articleDate = s.find('.c-999').text(); + const info: ArticleEntry = { + title: s.find('.list-article-title').text(), + link: 'https://www.yystv.cn' + s.find('a').attr('href'), + pubDate: articleDate.includes('-') ? parseDate(articleDate) : parseRelativeDate(articleDate), + author: s.find('.handler-author-link').text(), }; return info; - }) - .get(); + }); - const items = [...first_part, ...second_part]; - function getDescription(items) { - return Promise.all( - items.map(async (currentValue) => { - currentValue.description = await cache.tryGet(currentValue.link, async () => { - const r = await got({ - url: currentValue.link, - method: 'get', - }); - const $ = load(r.data); - return $('.doc-content.rel').html(); - }); - return currentValue; - }) - ); - } - await getDescription(items).then(() => ({ + const entries = [...firstPart, ...secondPart]; + + return await getDescription(entries).then((items) => ({ title: '游研社-' + $('title').text(), link: `https://www.yystv.cn/b/${category}`, item: items, diff --git a/lib/routes/yystv/docs.ts b/lib/routes/yystv/docs.ts index 350a99cadea8..eefb2d9fde56 100644 --- a/lib/routes/yystv/docs.ts +++ b/lib/routes/yystv/docs.ts @@ -2,7 +2,7 @@ import type { Route, DataItem } from '@/types'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; -import cache from '@/utils/cache'; +import { fetchDataItemCached } from './fetcher'; export const route: Route = { path: '/docs', @@ -49,14 +49,12 @@ async function handler() { }) satisfies DataItem[]; const items = (await Promise.all( - itemList.map( - (item) => - cache.tryGet(item.link, async () => { - const resp = await ofetch(item.link); - const $ = load(resp); - item.description = $('#main section.article-section .doc-content > div').html() || item.description; - return item; - }) as Promise + itemList.map((item) => + fetchDataItemCached(item.link, (articleContent) => { + const $ = load(articleContent); + item.description = $('#main section.article-section .doc-content > div').html() || item.description; + return item; + }) ) )) satisfies DataItem[]; diff --git a/lib/routes/yystv/fetcher.ts b/lib/routes/yystv/fetcher.ts new file mode 100644 index 000000000000..18bb15c0117f --- /dev/null +++ b/lib/routes/yystv/fetcher.ts @@ -0,0 +1,10 @@ +import { DataItem } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; + +export function fetchDataItemCached(link: string, processor: (articleContent: string) => DataItem): Promise { + return cache.tryGet(link, async () => { + const page = await ofetch(link); + return processor(page); + }) as Promise; +} From 46a4fce35ca5cb17987cb7a31a10c477a84d7a07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Apr 2025 08:44:03 +0000 Subject: [PATCH 0375/2658] chore(deps-dev): bump @types/node from 22.13.15 to 22.13.17 (#18757) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.15 to 22.13.17. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 80 +++++++++++++++++++++++++------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 8e42f5b3a7e1..911f6fe780b2 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.13.15", + "@types/node": "22.13.17", "@types/sanitize-html": "2.15.0", "@types/supertest": "6.0.3", "@types/tiny-async-pool": "2.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 33fb22f0f4af..6798b8465948 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -349,8 +349,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.13.15 - version: 22.13.15 + specifier: 22.13.17 + version: 22.13.17 '@types/sanitize-html': specifier: 2.15.0 version: 2.15.0 @@ -377,7 +377,7 @@ importers: version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.13.15)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2))) + version: 2.1.9(vitest@2.1.9(@types/node@22.13.17)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2))) discord-api-types: specifier: 0.37.119 version: 0.37.119 @@ -446,10 +446,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.13.15)) + version: 5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.13.17)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.13.15)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) + version: 2.1.9(@types/node@22.13.17)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -2210,8 +2210,8 @@ packages: '@types/node-fetch@2.6.12': resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} - '@types/node@22.13.15': - resolution: {integrity: sha512-imAbQEEbVni6i6h6Bd5xkCRwLqFc8hihCsi2GbtDoAtUcAFQ6Zs4pFXTZUUbroTkXdImczWM9AI8eZUuybXE3w==} + '@types/node@22.13.17': + resolution: {integrity: sha512-nAJuQXoyPj04uLgu+obZcSmsfOenUg6DxPKogeUy6yNCFwWaj5sBF8/G/pNo8EtBJjAfSVgfIlugR/BCOleO+g==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -7120,7 +7120,7 @@ snapshots: '@inquirer/figures': 1.0.11 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7887,7 +7887,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/cookie@0.6.0': {} @@ -7910,12 +7910,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/html-to-text@9.0.4': {} @@ -7923,13 +7923,13 @@ snapshots: '@types/imapflow@1.0.20': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7939,7 +7939,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/jsrsasign@10.5.13': {} @@ -7949,7 +7949,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7971,18 +7971,18 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/mysql@2.15.26': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/node-fetch@2.6.12': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 form-data: 4.0.2 - '@types/node@22.13.15': + '@types/node@22.13.17': dependencies: undici-types: 6.20.0 @@ -7994,7 +7994,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 pg-protocol: 1.8.0 pg-types: 2.2.0 @@ -8006,7 +8006,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/tough-cookie': 4.0.5 form-data: 2.5.3 @@ -8022,7 +8022,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.13.15 + '@types/node': 22.13.17 form-data: 4.0.2 '@types/supertest@6.0.3': @@ -8032,7 +8032,7 @@ snapshots: '@types/tedious@4.0.14': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 '@types/tiny-async-pool@2.0.3': {} @@ -8050,7 +8050,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 optional: true '@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2)': @@ -8193,7 +8193,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.13.15)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.13.17)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8207,7 +8207,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.13.15)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) + vitest: 2.1.9(@types/node@22.13.17)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) transitivePeerDependencies: - supports-color @@ -8218,14 +8218,14 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.13.15))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.13.17))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.3(typescript@5.8.2) - vite: 5.4.15(@types/node@22.13.15) + vite: 5.4.15(@types/node@22.13.17) '@vitest/pretty-format@2.1.9': dependencies: @@ -11067,7 +11067,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.13.15 + '@types/node': 22.13.17 long: 5.3.1 proxy-agent@6.4.0: @@ -12003,13 +12003,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.9(@types/node@22.13.15): + vite-node@2.1.9(@types/node@22.13.17): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.15(@types/node@22.13.15) + vite: 5.4.15(@types/node@22.13.17) transitivePeerDependencies: - '@types/node' - less @@ -12021,30 +12021,30 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.13.15)): + vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.13.17)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.2) optionalDependencies: - vite: 5.4.15(@types/node@22.13.15) + vite: 5.4.15(@types/node@22.13.17) transitivePeerDependencies: - supports-color - typescript - vite@5.4.15(@types/node@22.13.15): + vite@5.4.15(@types/node@22.13.17): dependencies: esbuild: 0.21.5 postcss: 8.5.3 rollup: 4.37.0 optionalDependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 fsevents: 2.3.3 - vitest@2.1.9(@types/node@22.13.15)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)): + vitest@2.1.9(@types/node@22.13.17)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.13.15)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.13.17)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -12060,11 +12060,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.15(@types/node@22.13.15) - vite-node: 2.1.9(@types/node@22.13.15) + vite: 5.4.15(@types/node@22.13.17) + vite-node: 2.1.9(@types/node@22.13.17) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.13.15 + '@types/node': 22.13.17 jsdom: 26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 32b4c1a51da1650ca4ff44019fa9e96d22912f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=AA=E6=9C=88?= <45122329+cokemine@users.noreply.github.com> Date: Wed, 2 Apr 2025 19:47:24 +0900 Subject: [PATCH 0376/2658] feat: add melonbooks (#18753) * feat: add melonbooks * refactor: extend description content * fix: fix cache path * fix: update * Update lib/routes/melonbooks/search.ts Co-authored-by: Tony * refactor: add whole item page into description --------- --- lib/routes/melonbooks/namespace.ts | 9 ++++++ lib/routes/melonbooks/parser.ts | 39 ++++++++++++++++++++++++++ lib/routes/melonbooks/search.ts | 44 ++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 lib/routes/melonbooks/namespace.ts create mode 100644 lib/routes/melonbooks/parser.ts create mode 100644 lib/routes/melonbooks/search.ts diff --git a/lib/routes/melonbooks/namespace.ts b/lib/routes/melonbooks/namespace.ts new file mode 100644 index 000000000000..803396e9481e --- /dev/null +++ b/lib/routes/melonbooks/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'メロンブックス', + url: 'www.melonbooks.co.jp', + description: 'サイン本の同人誌、同人ゲーム、同人音楽、同人グッズの通販は国内最大級、業界最速の萌えいっぱいの総合書店メロンブックスで。同人作品、同人委託の特典付商品も多数あり。直営店舗数も同人業界で最大級。', + lang: 'ja', + categories: ['anime'], +}; diff --git a/lib/routes/melonbooks/parser.ts b/lib/routes/melonbooks/parser.ts new file mode 100644 index 000000000000..9cad45a2fc73 --- /dev/null +++ b/lib/routes/melonbooks/parser.ts @@ -0,0 +1,39 @@ +import { type DataItem } from '@/types'; +import { CheerioAPI, load } from 'cheerio'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; + +export function parseItems($: CheerioAPI, baseUrl: string, fetchRestrictedContent: boolean): Promise { + const list = $('div.item-list ul li') + .toArray() + .map((el) => { + const $el = $(el); + const a = $el.find('a').first(); + const title = a.attr('title')!; + const link = fetchRestrictedContent ? `${a.attr('href')}&adult_view=1` : a.attr('href'); + // const author = $el.find('p.search-item-author-author a').text(); + const category = [$el.find('p.item-state').text()]; + const image = $el.find('div.item-image img').attr('data-src'); + return { + title, + link, + category, + image, + banner: image, + }; + }); + + return Promise.all( + list.map((item) => + cache.tryGet(`${baseUrl}${item.link}`, async () => { + const res = await ofetch(`${baseUrl}${item.link}`); + const $ = load(res); + const description = $.html('div.item-page'); + return { + ...item, + description, + }; + }) + ) + ) as unknown as Promise; +} diff --git a/lib/routes/melonbooks/search.ts b/lib/routes/melonbooks/search.ts new file mode 100644 index 000000000000..993683588642 --- /dev/null +++ b/lib/routes/melonbooks/search.ts @@ -0,0 +1,44 @@ +import { Data, Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { parseItems } from './parser'; +import { Context } from 'hono'; +import querystring from 'querystring'; + +export const handler = async (ctx: Context): Promise => { + const baseUrl = 'https://www.melonbooks.co.jp'; + const query = ctx.req.param('query') ?? ''; + const url = `${baseUrl}/search/search.php?${query}`; + const fetchRestrictedContent = querystring.parse(query).adult_view === '1'; + + const res = await ofetch(url); + const $ = load(res); + const items = await parseItems($, baseUrl, fetchRestrictedContent); + + return { + title: '搜索结果', + link: url, + item: items, + }; +}; + +export const route: Route = { + path: '/search/:query?', + categories: ['anime'], + example: '/melonbooks/search/name=けいおん', + parameters: { category: '链接参数,对应网址问号后的内容,不携带问号' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '搜索结果', + maintainers: ['cokemine'], + description: `::: tip +如果你期望获取限制级内容,可以添加\`&adult_view=1\`参数 +:::`, + handler, +}; From a77c5f43b95b6029cab8944923519dd5589e4337 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 2 Apr 2025 11:41:19 -0700 Subject: [PATCH 0377/2658] feat(route): recover psnine (#18760) * feat: recover psnine * fix: update path --- lib/router.js | 12 ---- lib/routes-deprecated/psnine/game.js | 32 ----------- lib/routes-deprecated/psnine/index.js | 33 ----------- lib/routes-deprecated/psnine/news.js | 53 ----------------- lib/routes-deprecated/psnine/node.js | 54 ----------------- lib/routes-deprecated/psnine/shuzhe.js | 33 ----------- lib/routes-deprecated/psnine/trade.js | 39 ------------- lib/routes/psnine/game.ts | 42 ++++++++++++++ lib/routes/psnine/index.ts | 58 +++++++++++++++++++ lib/routes/psnine/namespace.ts | 8 +++ lib/routes/psnine/node.ts | 80 ++++++++++++++++++++++++++ lib/routes/psnine/shuzhe.ts | 43 ++++++++++++++ lib/routes/psnine/trade.ts | 58 +++++++++++++++++++ 13 files changed, 289 insertions(+), 256 deletions(-) delete mode 100644 lib/routes-deprecated/psnine/game.js delete mode 100644 lib/routes-deprecated/psnine/index.js delete mode 100644 lib/routes-deprecated/psnine/news.js delete mode 100644 lib/routes-deprecated/psnine/node.js delete mode 100644 lib/routes-deprecated/psnine/shuzhe.js delete mode 100644 lib/routes-deprecated/psnine/trade.js create mode 100644 lib/routes/psnine/game.ts create mode 100644 lib/routes/psnine/index.ts create mode 100644 lib/routes/psnine/namespace.ts create mode 100644 lib/routes/psnine/node.ts create mode 100644 lib/routes/psnine/shuzhe.ts create mode 100644 lib/routes/psnine/trade.ts diff --git a/lib/router.js b/lib/router.js index 9ab78428ede7..708cadd58b9c 100644 --- a/lib/router.js +++ b/lib/router.js @@ -564,18 +564,6 @@ router.get('/zjgsu/xszq', lazyloadRouteHandler('./routes/universities/zjgsu/xszq router.get('/banyuetan/byt/:time?', lazyloadRouteHandler('./routes/banyuetan/byt')); router.get('/banyuetan/:name', lazyloadRouteHandler('./routes/banyuetan')); -// gamersky -router.get('/gamersky/news', lazyloadRouteHandler('./routes/gamersky/news')); -router.get('/gamersky/ent/:category', lazyloadRouteHandler('./routes/gamersky/ent')); - -// psnine -router.get('/psnine/index', lazyloadRouteHandler('./routes/psnine/index')); -router.get('/psnine/shuzhe', lazyloadRouteHandler('./routes/psnine/shuzhe')); -router.get('/psnine/trade', lazyloadRouteHandler('./routes/psnine/trade')); -router.get('/psnine/game', lazyloadRouteHandler('./routes/psnine/game')); -router.get('/psnine/news/:order?', lazyloadRouteHandler('./routes/psnine/news')); -router.get('/psnine/node/:id?/:order?', lazyloadRouteHandler('./routes/psnine/node')); - // 浙江大学城市学院 router.get('/zucc/news/latest', lazyloadRouteHandler('./routes/universities/zucc/news')); router.get('/zucc/cssearch/latest/:webVpn/:key', lazyloadRouteHandler('./routes/universities/zucc/cssearch')); diff --git a/lib/routes-deprecated/psnine/game.js b/lib/routes-deprecated/psnine/game.js deleted file mode 100644 index 18a817c14d44..000000000000 --- a/lib/routes-deprecated/psnine/game.js +++ /dev/null @@ -1,32 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { parseRelativeDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const url = 'https://www.psnine.com/psngame'; - const response = await got({ - method: 'get', - url, - }); - - const data = response.data; - const $ = cheerio.load(data); - - const out = $('table tr') - .map(function () { - const info = { - title: $(this).find('.title a').text(), - link: $(this).find('.title a').attr('href'), - pubDate: parseRelativeDate($(this).find('.meta').text()), - description: $(this).find('.title span').text() + ' ' + $(this).find('.twoge').text(), - }; - return info; - }) - .get(); - - ctx.state.data = { - title: 'psnine-' + $('title').text(), - link: 'https://www.psnine.com/', - item: out, - }; -}; diff --git a/lib/routes-deprecated/psnine/index.js b/lib/routes-deprecated/psnine/index.js deleted file mode 100644 index 4e6cf7239366..000000000000 --- a/lib/routes-deprecated/psnine/index.js +++ /dev/null @@ -1,33 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { parseRelativeDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const url = 'https://www.psnine.com/'; - const response = await got({ - method: 'get', - url, - }); - - const data = response.data; - const $ = cheerio.load(data); - - const out = $('.list li') - .slice(0, 20) - .map(function () { - const info = { - title: $(this).find('.title').text(), - link: $(this).find('.title a').attr('href'), - pubDate: parseRelativeDate($(this).find('.meta').text()), - author: $(this).find('.meta a').text(), - }; - return info; - }) - .get(); - - ctx.state.data = { - title: 'psnine-' + $('title').text(), - link: 'https://www.psnine.com/', - item: out, - }; -}; diff --git a/lib/routes-deprecated/psnine/news.js b/lib/routes-deprecated/psnine/news.js deleted file mode 100644 index 1e5b9ee1dc5c..000000000000 --- a/lib/routes-deprecated/psnine/news.js +++ /dev/null @@ -1,53 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - const order = ctx.params.order || 'obdate'; - - const rootUrl = 'https://www.psnine.com'; - const currentUrl = `${rootUrl}/node/news?ob=${order}`; - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - $('.psnnode, .node').remove(); - - const list = $('.title a') - .map((_, item) => { - item = $(item); - const date = item.parent().next().text().trim(); - - return { - title: item.text(), - link: item.attr('href'), - pubDate: new Date(date.length === 11 ? `${new Date().getFullYear()}-${date}` : date).toUTCString(), - }; - }) - .get(); - - const items = await Promise.all( - list.map((item) => - ctx.cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - const content = cheerio.load(detailResponse.data); - - item.author = content('a[itemprop="author"]').eq(0).text(); - item.description = content('div[itemprop="articleBody"]').html(); - - return item; - }) - ) - ); - - ctx.state.data = { - title: `${$('title').text()} - PSN中文站`, - link: currentUrl, - item: items, - }; -}; diff --git a/lib/routes-deprecated/psnine/node.js b/lib/routes-deprecated/psnine/node.js deleted file mode 100644 index 02b0625a3dc6..000000000000 --- a/lib/routes-deprecated/psnine/node.js +++ /dev/null @@ -1,54 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - const id = ctx.params.id || 'news'; - const order = ctx.params.order || 'obdate'; - - const rootUrl = 'https://www.psnine.com'; - const currentUrl = `${rootUrl}/node/${id}?ob=${order}`; - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - $('.psnnode, .node').remove(); - - const list = $('.title a') - .map((_, item) => { - item = $(item); - const date = item.parent().next().text().trim(); - - return { - title: item.text(), - link: item.attr('href'), - pubDate: new Date(date.length === 11 ? `${new Date().getFullYear()}-${date}` : date).toUTCString(), - }; - }) - .get(); - - const items = await Promise.all( - list.map((item) => - ctx.cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - const content = cheerio.load(detailResponse.data); - - item.author = content('a[itemprop="author"]').eq(0).text(); - item.description = content('div[itemprop="articleBody"]').html(); - - return item; - }) - ) - ); - - ctx.state.data = { - title: `${$('title').text()} - PSN中文站`, - link: currentUrl, - item: items, - }; -}; diff --git a/lib/routes-deprecated/psnine/shuzhe.js b/lib/routes-deprecated/psnine/shuzhe.js deleted file mode 100644 index 671911101fe3..000000000000 --- a/lib/routes-deprecated/psnine/shuzhe.js +++ /dev/null @@ -1,33 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { parseRelativeDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const url = 'https://www.psnine.com/dd'; - const response = await got({ - method: 'get', - url, - }); - - const data = response.data; - const $ = cheerio.load(data); - - const out = $('.dd_ul li') - .map(function () { - const info = { - title: $(this).find('.dd_title').text(), - link: $(this).find('.dd_title a').attr('href'), - description: $(this).find('.dd_status').text(), - pubDate: parseRelativeDate($(this).find('.meta').text()), - author: $(this).find('.meta a').text(), - }; - return info; - }) - .get(); - - ctx.state.data = { - title: 'psnine-' + $('title').text(), - link: 'https://www.psnine.com/', - item: out, - }; -}; diff --git a/lib/routes-deprecated/psnine/trade.js b/lib/routes-deprecated/psnine/trade.js deleted file mode 100644 index 5de4784d9dac..000000000000 --- a/lib/routes-deprecated/psnine/trade.js +++ /dev/null @@ -1,39 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { parseRelativeDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const url = 'https://www.psnine.com/trade'; - const response = await got({ - method: 'get', - url, - }); - - const data = response.data; - const $ = cheerio.load(data); - - const out = $('.list li') - .map(function () { - const desc = []; - $(this) - .find('.meta a') - .each(function (i) { - desc[i] = $(this).text(); - }); - const info = { - title: $(this).find('.content').text(), - link: $(this).find('.touch').attr('href'), - description: desc.join(' '), - pubDate: parseRelativeDate($(this).find('.meta').text()), - author: $(this).find('.psnnode').text(), - }; - return info; - }) - .get(); - - ctx.state.data = { - title: 'psnine-' + $('title').text(), - link: 'https://www.psnine.com/', - item: out, - }; -}; diff --git a/lib/routes/psnine/game.ts b/lib/routes/psnine/game.ts new file mode 100644 index 000000000000..a9960ab2d758 --- /dev/null +++ b/lib/routes/psnine/game.ts @@ -0,0 +1,42 @@ +import type { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; + +const handler = async () => { + const url = 'https://www.psnine.com/psngame'; + const response = await ofetch(url); + + const $ = cheerio.load(response); + + const out = $('table tr') + .toArray() + .map((item) => { + const $item = $(item); + return { + title: $item.find('.title a').text(), + link: $item.find('.title a').attr('href'), + description: $item.find('.title span').text() + ' ' + $item.find('.twoge').text(), + }; + }); + + return { + title: $('head title').text(), + link: url, + item: out, + }; +}; + +export const route: Route = { + path: '/game', + categories: ['game'], + example: '/psnine/game', + name: '游戏', + maintainers: ['betta-cyber'], + handler, + radar: [ + { + source: ['psnine.com/psngame', 'psnine.com'], + }, + ], +}; diff --git a/lib/routes/psnine/index.ts b/lib/routes/psnine/index.ts new file mode 100644 index 000000000000..095a9b30f04b --- /dev/null +++ b/lib/routes/psnine/index.ts @@ -0,0 +1,58 @@ +import type { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; +import { parseRelativeDate } from '@/utils/parse-date'; + +const handler = async () => { + const url = 'https://www.psnine.com/'; + const response = await ofetch(url); + + const $ = cheerio.load(response); + + const out = $('.list li') + .toArray() + .map((item) => { + const $item = $(item); + return { + title: $item.find('.title').text(), + link: $item.find('.title a').attr('href'), + pubDate: parseRelativeDate( + $item + .find('.meta') + .contents() + .filter((_, i) => i.nodeType === 3) + .text() + .trim() + .split(/\s{2,}/)[0] + ), + author: $item.find('.meta a.psnnode').text(), + category: $item + .find('.meta a.node') + .toArray() + .map((a) => $(a).text()), + }; + }); + + return { + title: $('head title').text(), + description: $('head meta[name="description"]').attr('content'), + image: `${url}/View/aimage/p9.png`, + link: url, + item: out, + }; +}; + +export const route: Route = { + path: '/', + categories: ['game'], + example: '/psnine', + name: '首页', + maintainers: ['betta-cyber'], + handler, + radar: [ + { + source: ['psnine.com'], + }, + ], +}; diff --git a/lib/routes/psnine/namespace.ts b/lib/routes/psnine/namespace.ts new file mode 100644 index 000000000000..85580220c0da --- /dev/null +++ b/lib/routes/psnine/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'PSN 中文站', + url: 'psnine.com', + lang: 'zh-CN', + categories: ['game'], +}; diff --git a/lib/routes/psnine/node.ts b/lib/routes/psnine/node.ts new file mode 100644 index 000000000000..47823c7efc1e --- /dev/null +++ b/lib/routes/psnine/node.ts @@ -0,0 +1,80 @@ +import type { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; +import cache from '@/utils/cache'; + +const handler = async (ctx) => { + const { id = 'news', order = 'obdate' } = ctx.req.param(); + + const rootUrl = 'https://www.psnine.com'; + const currentUrl = `${rootUrl}/node/${id}?ob=${order}`; + const response = await ofetch(currentUrl); + + const $ = cheerio.load(response); + + $('.psnnode, .node').remove(); + + const list = $('.title a') + .toArray() + .map((item) => { + const $item = $(item); + const meta = $item.parent().next(); + return { + title: $item.text(), + link: $item.attr('href'), + pubDate: timezone( + parseDate( + meta + .contents() + .filter((_, i) => i.nodeType === 3) + .text() + .trim() + .split(/\s{2,}/)[0], + ['YYYY-MM-DD HH:mm', 'MM-DD HH:mm'] + ), + 8 + ), + }; + }); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const detailResponse = await ofetch(item.link); + const $ = cheerio.load(detailResponse); + + item.author = $('a[itemprop="author"]').eq(0).text(); + item.description = $('div[itemprop="articleBody"]').html(); + + return item; + }) + ) + ); + + return { + title: `${$('title').text()} - PSN中文站`, + link: currentUrl, + item: items, + }; +}; + +export const route: Route = { + path: '/node/:id?/:order?', + parameters: { + id: '节点 id,见下表,默认为 news', + order: '排序,`date` 即最新,默认为 `obdate` 即综合排序', + }, + categories: ['game'], + example: '/psnine/node/news', + name: '节点', + maintainers: ['betta-cyber', 'nczitzk'], + handler, + radar: [ + { + source: ['psnine.com/node/:id'], + }, + ], +}; diff --git a/lib/routes/psnine/shuzhe.ts b/lib/routes/psnine/shuzhe.ts new file mode 100644 index 000000000000..312dd8022a18 --- /dev/null +++ b/lib/routes/psnine/shuzhe.ts @@ -0,0 +1,43 @@ +import type { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; + +const handler = async () => { + const url = 'https://www.psnine.com/dd'; + const response = await ofetch(url); + + const $ = cheerio.load(response); + + const out = $('.dd_ul li') + .toArray() + .map((item) => { + const $item = $(item); + return { + title: $item.find('.dd_title').text(), + link: $item.find('.dd_title a').attr('href'), + description: $item.find('.dd_status').text(), + author: $item.find('.meta a').text(), + }; + }); + + return { + title: $('head title').text(), + link: 'https://www.psnine.com/', + item: out, + }; +}; + +export const route: Route = { + path: '/shuzhe', + categories: ['game'], + example: '/psnine/shuzhe', + name: '数折', + maintainers: ['betta-cyber'], + handler, + radar: [ + { + source: ['psnine.com/dd', 'psnine.com'], + }, + ], +}; diff --git a/lib/routes/psnine/trade.ts b/lib/routes/psnine/trade.ts new file mode 100644 index 000000000000..9a926c8e1a5b --- /dev/null +++ b/lib/routes/psnine/trade.ts @@ -0,0 +1,58 @@ +import type { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; +import { parseRelativeDate } from '@/utils/parse-date'; + +const handler = async () => { + const url = 'https://www.psnine.com/trade'; + const response = await ofetch(url); + + const $ = cheerio.load(response); + + const out = $('.list li') + .toArray() + .map((item) => { + const $item = $(item); + const touch = $item.find('.touch'); + return { + title: $item.find('.content').text(), + link: touch.attr('href'), + description: $item.find('.r').text() + touch.html(), + pubDate: parseRelativeDate( + $item + .find('div.meta') + .contents() + .filter((_, i) => i.nodeType === 3) + .text() + .trim() + .split(/\s{2,}/)[0] + ), + author: $item.find('.psnnode').text(), + category: $item + .find('.node') + .toArray() + .map((a) => $(a).text()), + }; + }); + + return { + title: $('head title').text(), + link: url, + item: out, + }; +}; + +export const route: Route = { + path: '/trade', + categories: ['game'], + example: '/psnine/trade', + name: '闲游', + maintainers: ['betta-cyber'], + handler, + radar: [ + { + source: ['psnine.com/trade', 'psnine.com'], + }, + ], +}; From 8cbec3111422cb247023fdb420b913c7d0eff57f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 08:07:29 +0000 Subject: [PATCH 0378/2658] chore(deps): bump @scalar/hono-api-reference from 0.7.4 to 0.7.5 (#18766) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.7.4 to 0.7.5. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-version: 0.7.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 44 ++++++++++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 911f6fe780b2..51447b26097e 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.30.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.7.4", + "@scalar/hono-api-reference": "0.7.5", "@sentry/node": "9.10.1", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6798b8465948..878f55a5f540 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.7.4 - version: 0.7.4(hono@4.7.5) + specifier: 0.7.5 + version: 0.7.5(hono@4.7.5) '@sentry/node': specifier: 9.10.1 version: 9.10.1 @@ -2034,22 +2034,22 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/core@0.2.4': - resolution: {integrity: sha512-XGrg2P+FrvtzLsDm6TVl1oZv4DYmkFqJ3sI/SS2mjRlfOcblHv2CcrhYTz0+y1nG3cyHlE5esHAK0+BEI032dA==} + '@scalar/core@0.2.5': + resolution: {integrity: sha512-fxlHO2loobkII66M8dzLMBdBO66IZkywFzXXbOErn2jKDrNCS7LiNiUeuW4W1i1weXIM+VmYYMS9ObRVil3HPw==} engines: {node: '>=18'} - '@scalar/hono-api-reference@0.7.4': - resolution: {integrity: sha512-Uo2TpPdQbhnDkmTnVeTIXEXL30YY0GvBRgOo6mv1pIzZrYbTSJqxfg9um1/5wXZ6fh6w6GI3Y/tdu0GcMg5fJw==} + '@scalar/hono-api-reference@0.7.5': + resolution: {integrity: sha512-2ZgGStAqi6+ZhoCNIyYfKljKquV3DMrlHPofXXC/SXQFRsmMXGMcfTV67UaJ1eZjW4R+4ld5+Tv86u1hZAYnyg==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 - '@scalar/openapi-types@0.1.9': - resolution: {integrity: sha512-HQQudOSQBU7ewzfnBW9LhDmBE2XOJgSfwrh5PlUB7zJup/kaRkBGNgV2wMjNz9Af/uztiU/xNrO179FysmUT+g==} + '@scalar/openapi-types@0.2.0': + resolution: {integrity: sha512-waiKk12cRCqyUCWTOX0K1WEVX46+hVUK+zRPzAahDJ7G0TApvbNkuy5wx7aoUyEk++HHde0XuQnshXnt8jsddA==} engines: {node: '>=18'} - '@scalar/types@0.1.4': - resolution: {integrity: sha512-IAxpfrfdYfliLJR6WbuC8hxUwBUOeVsGuZxQE+zP8JDtdoHmgT6aNxCqMnGZ1ft6dvJ4jvzVR6qCWrq6Kg25oA==} + '@scalar/types@0.1.5': + resolution: {integrity: sha512-xlzatZ703JuxZOiU8eudaz/PbcgRqtBBmpIjpd2fjU50riuu1G4jbQEEMkQajaz11LhGpb4bgrNI0YvE6+Cx4g==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -5674,6 +5674,10 @@ packages: resolution: {integrity: sha512-2dBz5D5ycHIoliLYLi0Q2V7KRaDlH0uWIvmk7TYlAg5slqwiPv1ezJdZm1QEM0xgk29oYWMCbIG7E6gHpvChlg==} engines: {node: '>=16'} + type-fest@4.39.1: + resolution: {integrity: sha512-uW9qzd66uyHYxwyVBYiwS4Oi0qZyUqwjU+Oevr6ZogYiXt99EOYtwvzMSLw1c3lYo2HzJsep/NB23iEVEgjG/w==} + engines: {node: '>=16'} + type@2.7.3: resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} @@ -7774,23 +7778,25 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/core@0.2.4': + '@scalar/core@0.2.5': dependencies: - '@scalar/types': 0.1.4 + '@scalar/types': 0.1.5 - '@scalar/hono-api-reference@0.7.4(hono@4.7.5)': + '@scalar/hono-api-reference@0.7.5(hono@4.7.5)': dependencies: - '@scalar/core': 0.2.4 + '@scalar/core': 0.2.5 hono: 4.7.5 - '@scalar/openapi-types@0.1.9': {} + '@scalar/openapi-types@0.2.0': + dependencies: + zod: 3.24.2 - '@scalar/types@0.1.4': + '@scalar/types@0.1.5': dependencies: - '@scalar/openapi-types': 0.1.9 + '@scalar/openapi-types': 0.2.0 '@unhead/schema': 1.11.20 nanoid: 5.1.5 - type-fest: 4.38.0 + type-fest: 4.39.1 zod: 3.24.2 '@sec-ant/readable-stream@0.4.1': {} @@ -11882,6 +11888,8 @@ snapshots: type-fest@4.38.0: {} + type-fest@4.39.1: {} + type@2.7.3: {} typedarray-to-buffer@3.1.5: From e2e7dd13eb023b7e8a3dc6bdab348202ad78ee94 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 08:10:30 +0000 Subject: [PATCH 0379/2658] chore(deps-dev): bump eslint-plugin-prettier from 5.2.5 to 5.2.6 (#18767) Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.2.5 to 5.2.6. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.2.5...v5.2.6) --- updated-dependencies: - dependency-name: eslint-plugin-prettier dependency-version: 5.2.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 51447b26097e..aaa5c45b373d 100644 --- a/package.json +++ b/package.json @@ -177,7 +177,7 @@ "eslint-config-prettier": "10.1.1", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.17.0", - "eslint-plugin-prettier": "5.2.5", + "eslint-plugin-prettier": "5.2.6", "eslint-plugin-unicorn": "58.0.0", "eslint-plugin-yml": "1.17.0", "fs-extra": "11.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 878f55a5f540..462cb6aaf07c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -394,8 +394,8 @@ importers: specifier: 17.17.0 version: 17.17.0(eslint@9.23.0) eslint-plugin-prettier: - specifier: 5.2.5 - version: 5.2.5(@types/eslint@9.6.1)(eslint-config-prettier@10.1.1(eslint@9.23.0))(eslint@9.23.0)(prettier@3.5.3) + specifier: 5.2.6 + version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.1(eslint@9.23.0))(eslint@9.23.0)(prettier@3.5.3) eslint-plugin-unicorn: specifier: 58.0.0 version: 58.0.0(eslint@9.23.0) @@ -3267,8 +3267,8 @@ packages: peerDependencies: eslint: '>=8.23.0' - eslint-plugin-prettier@5.2.5: - resolution: {integrity: sha512-IKKP8R87pJyMl7WWamLgPkloB16dagPIdd2FjBDbyRYPKo93wS/NbCOPh6gH+ieNLC+XZrhJt/kWj0PS/DFdmg==} + eslint-plugin-prettier@5.2.6: + resolution: {integrity: sha512-mUcf7QG2Tjk7H055Jk0lGBjbgDnfrvqjhXh9t2xLMSCjZVcw9Rb1V6sVNXO0th3jgeO7zllWPTNRil3JW94TnQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: '@types/eslint': '>=8.0.0' @@ -5461,8 +5461,8 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - synckit@0.10.3: - resolution: {integrity: sha512-R1urvuyiTaWfeCggqEvpDJwAlDVdsT9NM+IP//Tk2x7qHCkSvBk/fwFgw/TLAHzZlrAnnazMcRw0ZD8HlYFTEQ==} + synckit@0.11.1: + resolution: {integrity: sha512-fWZqNBZNNFp/7mTUy1fSsydhKsAKJ+u90Nk7kOK5Gcq9vObaqLBLjWFDBkyVU9Vvc6Y71VbOevMuGhqv02bT+Q==} engines: {node: ^14.18.0 || >=16.0.0} system-architecture@0.1.0: @@ -9176,12 +9176,12 @@ snapshots: minimatch: 9.0.5 semver: 7.7.1 - eslint-plugin-prettier@5.2.5(@types/eslint@9.6.1)(eslint-config-prettier@10.1.1(eslint@9.23.0))(eslint@9.23.0)(prettier@3.5.3): + eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.1(eslint@9.23.0))(eslint@9.23.0)(prettier@3.5.3): dependencies: eslint: 9.23.0 prettier: 3.5.3 prettier-linter-helpers: 1.0.0 - synckit: 0.10.3 + synckit: 0.11.1 optionalDependencies: '@types/eslint': 9.6.1 eslint-config-prettier: 10.1.1(eslint@9.23.0) @@ -11681,7 +11681,7 @@ snapshots: symbol-tree@3.2.4: {} - synckit@0.10.3: + synckit@0.11.1: dependencies: '@pkgr/core': 0.2.0 tslib: 2.8.1 From a8c11a505f8924bb625265f96b929220a77d3299 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 08:14:36 +0000 Subject: [PATCH 0380/2658] chore(deps): bump peter-evans/dockerhub-description from 4.0.1 to 4.0.2 (#18769) Bumps [peter-evans/dockerhub-description](https://github.com/peter-evans/dockerhub-description) from 4.0.1 to 4.0.2. - [Release notes](https://github.com/peter-evans/dockerhub-description/releases) - [Commits](https://github.com/peter-evans/dockerhub-description/compare/0505d8b04853a30189aee66f5bb7fd1511bbac71...432a30c9e07499fd01da9f8a49f0faf9e0ca5b77) --- updated-dependencies: - dependency-name: peter-evans/dockerhub-description dependency-version: 4.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 1cbb2a68c48e..9e9fbecc854b 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -133,7 +133,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Docker Hub Description - uses: peter-evans/dockerhub-description@0505d8b04853a30189aee66f5bb7fd1511bbac71 # v4.0.1 + uses: peter-evans/dockerhub-description@432a30c9e07499fd01da9f8a49f0faf9e0ca5b77 # v4.0.2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} From a2599f8df5cac796e998cb71e551eca663c59133 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 01:30:08 -0700 Subject: [PATCH 0381/2658] chore(deps-dev): bump @types/node from 22.13.17 to 22.14.0 (#18768) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.17 to 22.14.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.14.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 88 +++++++++++++++++++++++++------------------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index aaa5c45b373d..9137d3afb52d 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.13.17", + "@types/node": "22.14.0", "@types/sanitize-html": "2.15.0", "@types/supertest": "6.0.3", "@types/tiny-async-pool": "2.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 462cb6aaf07c..ae00829d9d22 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -349,8 +349,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.13.17 - version: 22.13.17 + specifier: 22.14.0 + version: 22.14.0 '@types/sanitize-html': specifier: 2.15.0 version: 2.15.0 @@ -377,7 +377,7 @@ importers: version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.13.17)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2))) + version: 2.1.9(vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2))) discord-api-types: specifier: 0.37.119 version: 0.37.119 @@ -446,10 +446,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.13.17)) + version: 5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.14.0)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.13.17)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) + version: 2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -2210,8 +2210,8 @@ packages: '@types/node-fetch@2.6.12': resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} - '@types/node@22.13.17': - resolution: {integrity: sha512-nAJuQXoyPj04uLgu+obZcSmsfOenUg6DxPKogeUy6yNCFwWaj5sBF8/G/pNo8EtBJjAfSVgfIlugR/BCOleO+g==} + '@types/node@22.14.0': + resolution: {integrity: sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -5703,8 +5703,8 @@ packages: unbzip2-stream@1.4.3: resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} - undici-types@6.20.0: - resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} undici@6.21.2: resolution: {integrity: sha512-uROZWze0R0itiAKVPsYhFov9LxrPMHLMEQFszeI2gCN6bnIIZ8twzBCJcN2LJrBBLfrP0t1FW0g+JmKVl8Vk1g==} @@ -7124,7 +7124,7 @@ snapshots: '@inquirer/figures': 1.0.11 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7893,7 +7893,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/cookie@0.6.0': {} @@ -7916,12 +7916,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/html-to-text@9.0.4': {} @@ -7929,13 +7929,13 @@ snapshots: '@types/imapflow@1.0.20': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7945,7 +7945,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/jsrsasign@10.5.13': {} @@ -7955,7 +7955,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7977,20 +7977,20 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/mysql@2.15.26': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/node-fetch@2.6.12': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 form-data: 4.0.2 - '@types/node@22.13.17': + '@types/node@22.14.0': dependencies: - undici-types: 6.20.0 + undici-types: 6.21.0 '@types/normalize-package-data@2.4.4': {} @@ -8000,7 +8000,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 pg-protocol: 1.8.0 pg-types: 2.2.0 @@ -8012,7 +8012,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/tough-cookie': 4.0.5 form-data: 2.5.3 @@ -8028,7 +8028,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.13.17 + '@types/node': 22.14.0 form-data: 4.0.2 '@types/supertest@6.0.3': @@ -8038,7 +8038,7 @@ snapshots: '@types/tedious@4.0.14': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 '@types/tiny-async-pool@2.0.3': {} @@ -8056,7 +8056,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 optional: true '@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2)': @@ -8199,7 +8199,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.13.17)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8213,7 +8213,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.13.17)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) + vitest: 2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) transitivePeerDependencies: - supports-color @@ -8224,14 +8224,14 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.13.17))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.14.0))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.3(typescript@5.8.2) - vite: 5.4.15(@types/node@22.13.17) + vite: 5.4.15(@types/node@22.14.0) '@vitest/pretty-format@2.1.9': dependencies: @@ -11073,7 +11073,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.13.17 + '@types/node': 22.14.0 long: 5.3.1 proxy-agent@6.4.0: @@ -11909,7 +11909,7 @@ snapshots: buffer: 5.7.1 through: 2.3.8 - undici-types@6.20.0: {} + undici-types@6.21.0: {} undici@6.21.2: {} @@ -12011,13 +12011,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.9(@types/node@22.13.17): + vite-node@2.1.9(@types/node@22.14.0): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.15(@types/node@22.13.17) + vite: 5.4.15(@types/node@22.14.0) transitivePeerDependencies: - '@types/node' - less @@ -12029,30 +12029,30 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.13.17)): + vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.14.0)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.2) optionalDependencies: - vite: 5.4.15(@types/node@22.13.17) + vite: 5.4.15(@types/node@22.14.0) transitivePeerDependencies: - supports-color - typescript - vite@5.4.15(@types/node@22.13.17): + vite@5.4.15(@types/node@22.14.0): dependencies: esbuild: 0.21.5 postcss: 8.5.3 rollup: 4.37.0 optionalDependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 fsevents: 2.3.3 - vitest@2.1.9(@types/node@22.13.17)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)): + vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.13.17)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.14.0)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -12068,11 +12068,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.15(@types/node@22.13.17) - vite-node: 2.1.9(@types/node@22.13.17) + vite: 5.4.15(@types/node@22.14.0) + vite-node: 2.1.9(@types/node@22.14.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.13.17 + '@types/node': 22.14.0 jsdom: 26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 517ba99ba7c9caabb37e0c08a23b3fb1cc2501a5 Mon Sep 17 00:00:00 2001 From: AiraNadih <128119996+AiraNadih@users.noreply.github.com> Date: Fri, 4 Apr 2025 07:12:35 +0800 Subject: [PATCH 0382/2658] fix(route/4khd): update image URL processing logic (#18761) * fix(route/4khd): update image URL processing logic * fix(route/4khd): update image URL processing logic --- lib/routes/4khd/article.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/4khd/article.ts b/lib/routes/4khd/article.ts index c600a581ae7b..9b9d894e78e5 100644 --- a/lib/routes/4khd/article.ts +++ b/lib/routes/4khd/article.ts @@ -5,7 +5,7 @@ import { WPPost } from './types'; const processImages = ($) => { $('a').each((_, elem) => { const $elem = $(elem); - const largePhotoUrl = $elem.attr('href').replace('i0.wp.com/pic', 'img'); + const largePhotoUrl = $elem.attr('href')?.replace('i0.wp.com', '').replace('pic.4khd.com', 'yt4.googleusercontent.com').replace('AsHYQ', 'AsYHQ').replace('l/AAA', 'I/AAA'); if (largePhotoUrl) { $elem.attr('href', largePhotoUrl); $elem.find('img').attr('src', largePhotoUrl); From b0c911a78dd78d727b57ad97dbfc9706e873139c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 08:20:53 +0000 Subject: [PATCH 0383/2658] chore(deps): bump destr from 2.0.3 to 2.0.5 (#18776) Bumps [destr](https://github.com/unjs/destr) from 2.0.3 to 2.0.5. - [Release notes](https://github.com/unjs/destr/releases) - [Changelog](https://github.com/unjs/destr/blob/main/CHANGELOG.md) - [Commits](https://github.com/unjs/destr/compare/v2.0.3...v2.0.5) --- updated-dependencies: - dependency-name: destr dependency-version: 2.0.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 9137d3afb52d..135ebf86162f 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "crypto-js": "4.2.0", "currency-symbol-map": "5.1.0", "dayjs": "1.11.8", - "destr": "2.0.3", + "destr": "2.0.5", "directory-import": "3.3.2", "dotenv": "16.4.7", "entities": "6.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ae00829d9d22..0d4926486cfd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,8 +96,8 @@ importers: specifier: 1.11.8 version: 1.11.8 destr: - specifier: 2.0.3 - version: 2.0.3 + specifier: 2.0.5 + version: 2.0.5 directory-import: specifier: 3.3.2 version: 3.3.2 @@ -3026,8 +3026,8 @@ packages: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} - destr@2.0.3: - resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==} + destr@2.0.5: + resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} detect-libc@2.0.3: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} @@ -8874,7 +8874,7 @@ snapshots: dequal@2.0.3: {} - destr@2.0.3: {} + destr@2.0.5: {} detect-libc@2.0.3: {} @@ -10779,7 +10779,7 @@ snapshots: ofetch@1.4.1: dependencies: - destr: 2.0.3 + destr: 2.0.5 node-fetch-native: 1.6.6 ufo: 1.5.4 From 605822d52d5fd146c5d9bff3b777cd07534afe7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 01:22:25 -0700 Subject: [PATCH 0384/2658] chore(deps): bump @sentry/node from 9.10.1 to 9.11.0 (#18775) Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 9.10.1 to 9.11.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/9.10.1...9.11.0) --- updated-dependencies: - dependency-name: "@sentry/node" dependency-version: 9.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 135ebf86162f..f482260a3246 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", "@scalar/hono-api-reference": "0.7.5", - "@sentry/node": "9.10.1", + "@sentry/node": "9.11.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", "art-template": "4.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0d4926486cfd..8d093fc66c1c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,8 +63,8 @@ importers: specifier: 0.7.5 version: 0.7.5(hono@4.7.5) '@sentry/node': - specifier: 9.10.1 - version: 9.10.1 + specifier: 9.11.0 + version: 9.11.0 '@tonyrl/rand-user-agent': specifier: 2.0.83 version: 2.0.83 @@ -2058,16 +2058,16 @@ packages: '@selderee/plugin-htmlparser2@0.11.0': resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==} - '@sentry/core@9.10.1': - resolution: {integrity: sha512-TE2zZV3Od4131mZNgFo2Mv4aKU8FXxL0s96yqRvmV+8AU57mJoycMXBnmNSYfWuDICbPJTVAp+3bYMXwX7N5YA==} + '@sentry/core@9.11.0': + resolution: {integrity: sha512-qfb4ahGZubbrNh1MnbEqyHFp87rIwQIZapyQLCaYpudXrP1biEpLOV3mMDvDJWCdX460hoOwQ3SkwipV3We/7w==} engines: {node: '>=18'} - '@sentry/node@9.10.1': - resolution: {integrity: sha512-salNc4R0GiZZNNScNpdAB3OI3kz+clmgXL1rl5O2Kh1IW5vftf5I69n+qqZLJ3kaUp0Sm6V+deCHyUOnw9GozA==} + '@sentry/node@9.11.0': + resolution: {integrity: sha512-luDsNDHsHkoXbL2Rf1cEKijh6hBfjzGQe09iP6kdZr+HB0bO+qoLe+nZLzSIQTWgWSt2XYNQyiLAsaMlbJZhJg==} engines: {node: '>=18'} - '@sentry/opentelemetry@9.10.1': - resolution: {integrity: sha512-qqcsbIyoOPI91Tm6w0oFzsx/mlu+lywRGSVbPRFhk4zCXBOhCCp4Mg7nwKK0wGJ7AZRl6qtELrRSGClAthC55g==} + '@sentry/opentelemetry@9.11.0': + resolution: {integrity: sha512-B6RumUFGb1+Q4MymY7IZbdl1Ayz2srqf46itFr1ohE/IpwY7OWKMntop8fxyccUW3ptmPp9cPkBJOaa9UdJhSg==} engines: {node: '>=18'} peerDependencies: '@opentelemetry/api': ^1.9.0 @@ -7806,9 +7806,9 @@ snapshots: domhandler: 5.0.3 selderee: 0.11.0 - '@sentry/core@9.10.1': {} + '@sentry/core@9.11.0': {} - '@sentry/node@9.10.1': + '@sentry/node@9.11.0': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -7841,13 +7841,13 @@ snapshots: '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.30.0 '@prisma/instrumentation': 6.5.0(@opentelemetry/api@1.9.0) - '@sentry/core': 9.10.1 - '@sentry/opentelemetry': 9.10.1(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0) + '@sentry/core': 9.11.0 + '@sentry/opentelemetry': 9.11.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0) import-in-the-middle: 1.13.1 transitivePeerDependencies: - supports-color - '@sentry/opentelemetry@9.10.1(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0)': + '@sentry/opentelemetry@9.11.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -7855,7 +7855,7 @@ snapshots: '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.30.0 - '@sentry/core': 9.10.1 + '@sentry/core': 9.11.0 '@sindresorhus/is@5.6.0': {} From 7dbb6ccfd7e6ffd41c1da77431e200a8e6b7d5b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=86=E4=B8=BA=E5=90=9B=E6=95=85?= Date: Fri, 4 Apr 2025 17:33:14 +0800 Subject: [PATCH 0385/2658] feat(route): add Northwest Normal University. (#18763) * feat(route): add nwnu. * fix: process embed PDF. * chore: support 2738 param. * fix: code styles, radars. * feat: add academic affairs route. * typo: fix. * typo: fix --- lib/routes/nwnu/namespace.ts | 7 + lib/routes/nwnu/routes/college/csse.ts | 133 +++++++++++++++++ .../routes/department/academic-affairs.ts | 115 +++++++++++++++ .../nwnu/routes/department/postgraduate.ts | 139 ++++++++++++++++++ lib/routes/nwnu/routes/lib/embed-resource.ts | 14 ++ 5 files changed, 408 insertions(+) create mode 100644 lib/routes/nwnu/namespace.ts create mode 100644 lib/routes/nwnu/routes/college/csse.ts create mode 100644 lib/routes/nwnu/routes/department/academic-affairs.ts create mode 100644 lib/routes/nwnu/routes/department/postgraduate.ts create mode 100644 lib/routes/nwnu/routes/lib/embed-resource.ts diff --git a/lib/routes/nwnu/namespace.ts b/lib/routes/nwnu/namespace.ts new file mode 100644 index 000000000000..5706adc2b17f --- /dev/null +++ b/lib/routes/nwnu/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '西北师范大学', + url: 'www.nwnu.edu.cn', + lang: 'zh-CN', +}; diff --git a/lib/routes/nwnu/routes/college/csse.ts b/lib/routes/nwnu/routes/college/csse.ts new file mode 100644 index 000000000000..4822aa5ef76d --- /dev/null +++ b/lib/routes/nwnu/routes/college/csse.ts @@ -0,0 +1,133 @@ +import NotFoundError from '@/errors/types/not-found'; +import { DataItem, Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import { processEmbedPDF } from '../lib/embed-resource'; + +const WEBSITE_LOGO = 'https://jsj.nwnu.edu.cn/_upload/tpl/02/2e/558/template558/favicon.ico'; +const BASE_URL = 'https://jsj.nwnu.edu.cn/'; + +const COLUMNS: Record = { + '2435': { + title: '学院新闻', + description: '计算机科学与工程 学院新闻', + }, + '2436': { + title: '通知公告', + description: '计算机科学与工程 通知公告', + }, + '2437': { + title: '学术动态', + description: '计算机科学与工程 学术动态', + }, + '2446': { + title: '研究生招生', + description: '计算机科学与工程学院 研究生招生动态及相关新闻', + }, + '8411': { + title: '评估动态', + description: '计算机科学与工程学院 院系学科评估动态', + }, +}; + +const handler: Route['handler'] = async (ctx) => { + const columnParam = ctx.req.param('column'); + if (COLUMNS[columnParam] === undefined) { + throw new NotFoundError(`The column ${columnParam} does not exist`); + } + const columnTitle = COLUMNS[columnParam].title; + const columnDescription = COLUMNS[columnParam].description; + const columnPageUrl = `https://jsj.nwnu.edu.cn/${columnParam}/list.htm`; + + // Fetch the list page + const { data: listResponse } = await got(columnPageUrl); + const $ = load(listResponse); + + // Select all list items containing academic information + const ITEM_SELECTOR = 'ul > li.clearfix'; + const listItems = $(ITEM_SELECTOR); + + // Map through each list item to extract details + const itemLinks = listItems.toArray().map((element) => { + const title = $(element).find('div.right_list_text > p.p1 > a').text()!; + const imgRelativeLink = $(element).find('div.right_list_img > a > img').attr('src') || WEBSITE_LOGO; + const img = new URL(imgRelativeLink, BASE_URL).href; + const relativeHref = $(element).find('div.right_list_text > p.p1 > a').attr('href')!; + const link = new URL(relativeHref, BASE_URL).href; + return { + title, + img, + link, + }; + }); + + return { + title: columnTitle, + description: columnDescription, + link: columnPageUrl, + image: WEBSITE_LOGO, + item: (await Promise.all( + itemLinks.map((item) => + cache.tryGet(item.link, async () => { + const DATE_SELECTOR = 'div.sp2 > div > span:nth-child(1)'; + const CONTENT_SELECTOR = 'div.artInfo'; + const { data: contentResponse } = await got(item.link); + const contentPage = load(contentResponse); + const dateString = contentPage(DATE_SELECTOR).text(); + const date = parseDate(dateString.replace('年', '-').replace('月', '-').replace('日', '')); + const content = processEmbedPDF(BASE_URL, contentPage(CONTENT_SELECTOR).html() || ''); + return { + title: item.title, + pubDate: date, + link: item.link, + description: content, + category: ['university'], + guid: item.link, + id: item.link, + image: item.img, + content, + updated: date, + language: 'zh-CN', + }; + }) + ) + )) as DataItem[], + allowEmpty: true, + language: 'zh-CN', + feedLink: `https://rsshub.app/nwnu/college/csse/${columnParam}`, + id: `https://rsshub.app/nwnu/college/csse/${columnParam}`, + }; +}; + +export const route: Route = { + path: '/college/csse/:column', + name: '计算机科学与工程学院', + maintainers: ['PrinOrange'], + handler, + categories: ['university'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + example: '/college/csse/2435', + radar: [ + { + source: ['jsj.nwnu.edu.cn/:column/list'], + target: '/college/csse/:column', + }, + ], + description: ` +| column | 标题 | 描述 | +| ------ | ---------- | --------------------------------------------- | +| 2435 | 学院新闻 | 计算机科学与工程 学院新闻 | +| 2436 | 通知公告 | 计算机科学与工程 通知公告 | +| 2437 | 学术动态 | 计算机科学与工程 学术动态 | +| 2446 | 研究生招生 | 计算机科学与工程学院 研究生招生动态及相关新闻 | +| 8411 | 评估动态 | 计算机科学与工程学院 院系学科评估动态 |`, +}; diff --git a/lib/routes/nwnu/routes/department/academic-affairs.ts b/lib/routes/nwnu/routes/department/academic-affairs.ts new file mode 100644 index 000000000000..30a75b9d29f4 --- /dev/null +++ b/lib/routes/nwnu/routes/department/academic-affairs.ts @@ -0,0 +1,115 @@ +import NotFoundError from '@/errors/types/not-found'; +import { DataItem, Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import { processEmbedPDF } from '../lib/embed-resource'; + +const WEBSITE_LOGO = 'https://www.nwnu.edu.cn/_upload/tpl/02/d9/729/template729/favicon.ico'; +const BASE_URL = 'https://jwc.nwnu.edu.cn/'; + +const COLUMNS: Record = { + tzgg: { + title: '通知公告', + description: '西北师范大学教务处通知公告', + }, + jwkx: { + title: '教务快讯', + description: '西北师范大学教务快讯', + }, +}; + +const handler: Route['handler'] = async (ctx) => { + const columnParam = ctx.req.param('column'); + if (COLUMNS[columnParam] === undefined) { + throw new NotFoundError(`The column ${columnParam} does not exist`); + } + const columnTitle = COLUMNS[columnParam].title; + const columnDescription = COLUMNS[columnParam].description; + const columnPageUrl = `https://jwc.nwnu.edu.cn/${columnParam}/list.htm`; + + // Fetch the list page + const { data: listResponse } = await got(columnPageUrl); + const $ = load(listResponse); + + // Select all list items containing academic information + const ITEM_SELECTOR = 'div.list_index > ul > li'; + const listItems = $(ITEM_SELECTOR); + + // Map through each list item to extract details + const itemLinks = listItems.toArray().map((element) => { + const title = $(element).find('span.f > a').text()!; + const date = parseDate($(element).find('span.r').text()!); + const relativeLink = $(element).find('span.f > a').attr('href')!; + const link = new URL(relativeLink, BASE_URL).href; + return { + title, + date, + link, + }; + }); + + return { + title: columnTitle, + description: columnDescription, + link: columnPageUrl, + image: WEBSITE_LOGO, + item: (await Promise.all( + itemLinks.map((item) => + cache.tryGet(item.link, async () => { + const CONTENT_SELECTOR = 'div.wp_articlecontent'; + const { data: contentResponse } = await got(item.link); + const contentPage = load(contentResponse); + const content = processEmbedPDF(BASE_URL, contentPage(CONTENT_SELECTOR).html() || ''); + return { + title: item.title, + pubDate: item.date, + link: item.link, + description: content, + category: ['university'], + guid: item.link, + id: item.link, + image: WEBSITE_LOGO, + content, + updated: item.date, + language: 'zh-CN', + }; + }) + ) + )) as DataItem[], + allowEmpty: true, + language: 'zh-CN', + feedLink: `https://rsshub.app/nwnu/department/academic-affairs/${columnParam}`, + id: `https://rsshub.app/nwnu/department/academic-affairs/${columnParam}`, + }; +}; + +export const route: Route = { + path: '/department/academic-affairs/:column', + name: '教务处', + maintainers: ['PrinOrange'], + handler, + categories: ['university'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportRadar: true, + supportPodcast: false, + supportScihub: false, + }, + example: '/department/academic-affairs/tzgg', + radar: [ + { + source: ['jwc.nwnu.edu.cn/:column/list.htm'], + target: '/department/academic-affairs/:column', + }, + ], + description: ` +| column | 标题 | 描述 | +| ------ | -------- | ------------------------ | +| tzgg | 通知公告 | 西北师范大学教务通知公告 | +| jwkx | 教务快讯 | 西北师范大学教务快讯 |`, +}; diff --git a/lib/routes/nwnu/routes/department/postgraduate.ts b/lib/routes/nwnu/routes/department/postgraduate.ts new file mode 100644 index 000000000000..25fae3bc4e86 --- /dev/null +++ b/lib/routes/nwnu/routes/department/postgraduate.ts @@ -0,0 +1,139 @@ +import NotFoundError from '@/errors/types/not-found'; +import { DataItem, Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import { processEmbedPDF } from '../lib/embed-resource'; + +const WEBSITE_LOGO = 'https://www.nwnu.edu.cn/_upload/tpl/02/d9/729/template729/favicon.ico'; +const BASE_URL = 'https://yjsy.nwnu.edu.cn/'; + +const COLUMNS: Record = { + '2701': { + title: '招生工作(包括硕士、博士招生)', + description: '研究生院招生信息(包含硕士招生和博士招生两个栏目)', + }, + '2738': { + title: '工作动态', + description: '研究生院工作动态', + }, + '2712': { + title: '博士招生', + description: '研究生院博士研究生招生信息', + }, + '2713': { + title: '硕士招生', + description: '研究生院硕士研究生招生信息', + }, + '2702': { + title: '培养工作', + description: '培养工作栏目信息汇总', + }, + '2703': { + title: '学科建设', + description: '研究生院学科建设信息汇总', + }, + '2704': { + title: '学位工作', + description: '研究生院学位工作栏目信息汇总', + }, +}; + +const handler: Route['handler'] = async (ctx) => { + const columnParam = ctx.req.param('column'); + if (COLUMNS[columnParam] === undefined) { + throw new NotFoundError(`The column ${columnParam} does not exist`); + } + const columnTitle = COLUMNS[columnParam].title; + const columnDescription = COLUMNS[columnParam].description; + const columnPageUrl = `https://yjsy.nwnu.edu.cn/${columnParam}/list.htm`; + + // Fetch the list page + const { data: listResponse } = await got(columnPageUrl); + const $ = load(listResponse); + + // Select all list items containing academic information + const ITEM_SELECTOR = '#AjaxList > ul > li.a-list'; + const listItems = $(ITEM_SELECTOR); + + // Map through each list item to extract details + const itemLinks = listItems.toArray().map((element) => { + const title = $(element).find('a:nth-child(2)').attr('title')!; + const date = parseDate($(element).find('span.pdate').text()!); + const relativeLink = $(element).find('a:nth-child(2)').attr('href')!; + const link = new URL(relativeLink, BASE_URL).href; + return { + title, + date, + link, + }; + }); + + return { + title: columnTitle, + description: columnDescription, + link: columnPageUrl, + image: WEBSITE_LOGO, + item: (await Promise.all( + itemLinks.map((item) => + cache.tryGet(item.link, async () => { + const CONTENT_SELECTOR = 'div.content_div'; + const { data: contentResponse } = await got(item.link); + const contentPage = load(contentResponse); + const content = processEmbedPDF(BASE_URL, contentPage(CONTENT_SELECTOR).html() || ''); + return { + title: item.title, + pubDate: item.date, + link: item.link, + description: content, + category: ['university'], + guid: item.link, + id: item.link, + image: WEBSITE_LOGO, + content, + updated: item.date, + language: 'zh-CN', + }; + }) + ) + )) as DataItem[], + allowEmpty: true, + language: 'zh-CN', + feedLink: `https://rsshub.app/nwnu/department/postgraduate/${columnParam}`, + id: `https://rsshub.app/nwnu/department/postgraduate/${columnParam}`, + }; +}; + +export const route: Route = { + path: '/department/postgraduate/:column', + name: '研究生院', + maintainers: ['PrinOrange'], + handler, + categories: ['university'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportRadar: true, + supportPodcast: false, + supportScihub: false, + }, + example: '/department/postgraduate/2701', + radar: [ + { + source: ['yjsy.nwnu.edu.cn/:column/list.htm'], + target: '/department/postgraduate/:column', + }, + ], + description: ` +| column | 标题 | 描述 | +| ------ | ------------------------------ | -------------------------------------------------- | +| 2701 | 招生工作(包括硕士、博士招生) | 研究生院招生信息(包含硕士招生和博士招生两个栏目) | +| 2712 | 博士招生 | 研究生院博士研究生招生信息 | +| 2713 | 硕士招生 | 研究生院硕士研究生招生信息 | +| 2702 | 培养工作 | 培养工作栏目信息汇总 | +| 2703 | 学科建设 | 研究生院学科建设信息汇总 | +| 2704 | 学位工作 | 研究生院学位工作栏目信息汇总 |`, +}; diff --git a/lib/routes/nwnu/routes/lib/embed-resource.ts b/lib/routes/nwnu/routes/lib/embed-resource.ts new file mode 100644 index 000000000000..de002b3630b1 --- /dev/null +++ b/lib/routes/nwnu/routes/lib/embed-resource.ts @@ -0,0 +1,14 @@ +import { load } from 'cheerio'; + +export function processEmbedPDF(baseurl: string, html: string) { + const $ = load(html); + + $('div.wp_pdf_player').each(function () { + const $div = $(this); + const pdfsrc = $div.attr('pdfsrc') || ''; + const downloadUrl = new URL(pdfsrc, baseurl).href; + const newDiv = `

点击下载 PDF 文件资源

`; + $div.replaceWith(newDiv); + }); + return $.html(); +} From d75bedb50bf388e375651994abc96c21de7370fa Mon Sep 17 00:00:00 2001 From: AiraNadih <128119996+AiraNadih@users.noreply.github.com> Date: Fri, 4 Apr 2025 18:44:05 +0800 Subject: [PATCH 0386/2658] feat(route): add route "BaoBua" (#18762) * feat(route): add route "BaoBua" * perf(route/baobua): cache paginated content to reduce API requests * Revert "perf(route/baobua): cache paginated content to reduce API requests" This reverts commit 200616c15ae173ef4882da92fd7aec48dcffefda. * feat(route): add route "BaoBua" --- lib/routes/baobua/article.ts | 51 +++++++++++++++++++++++++++++ lib/routes/baobua/category.ts | 60 ++++++++++++++++++++++++++++++++++ lib/routes/baobua/const.ts | 4 +++ lib/routes/baobua/latest.ts | 57 ++++++++++++++++++++++++++++++++ lib/routes/baobua/namespace.ts | 8 +++++ lib/routes/baobua/search.ts | 60 ++++++++++++++++++++++++++++++++++ 6 files changed, 240 insertions(+) create mode 100644 lib/routes/baobua/article.ts create mode 100644 lib/routes/baobua/category.ts create mode 100644 lib/routes/baobua/const.ts create mode 100644 lib/routes/baobua/latest.ts create mode 100644 lib/routes/baobua/namespace.ts create mode 100644 lib/routes/baobua/search.ts diff --git a/lib/routes/baobua/article.ts b/lib/routes/baobua/article.ts new file mode 100644 index 000000000000..7b40702fdfdd --- /dev/null +++ b/lib/routes/baobua/article.ts @@ -0,0 +1,51 @@ +import { load } from 'cheerio'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; + +async function loadArticle(link) { + const resp = await got(link); + const article = load(resp.body); + + const title = article('title') + .text() + .replace('BaoBua.Com:', '') + .replace(/\| Page \d+\/\d+/, '') + .trim(); + const totalPagesRegex = /Page \d+\/(\d+)/; + const totalPagesMatch = totalPagesRegex.exec(article('title').text()); + const totalPages = totalPagesMatch ? Number.parseInt(totalPagesMatch[1]) : 1; + + let pubDate; + const blogPostingScript = article('script:contains("BlogPosting")').first(); + if (blogPostingScript) { + const jsonData = JSON.parse(blogPostingScript.text()); + pubDate = parseDate(jsonData.datePublished); + } + + const contentDiv = article('.contentme2'); + let description = contentDiv.html() ?? ''; + + if (totalPages > 1) { + const additionalContents = await Promise.all( + Array.from({ length: totalPages - 1 }, async (_, i) => { + try { + const response = await got(`${link}?page=${i + 2}`); + const pageDom = load(response.body); + return pageDom('.contentme2').html() ?? ''; + } catch { + return ''; + } + }) + ); + description += additionalContents.join(''); + } + + return { + title, + description, + pubDate, + link, + }; +} + +export default loadArticle; diff --git a/lib/routes/baobua/category.ts b/lib/routes/baobua/category.ts new file mode 100644 index 000000000000..54cad3a70359 --- /dev/null +++ b/lib/routes/baobua/category.ts @@ -0,0 +1,60 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; + +export const route: Route = { + path: '/category/:category', + categories: ['picture'], + example: '/baobua/category/network', + parameters: { category: 'Category' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['baobua.com/cat/:category'], + target: '/category/:category', + }, + ], + name: 'Category', + maintainers: ['AiraNadih'], + handler, + url: 'baobua.com/', +}; + +async function handler(ctx) { + const category = ctx.req.param('category'); + const url = `${SUB_URL}cat/${category}/`; + + const response = await got(url); + const $ = load(response.body); + const itemRaw = $('.thcovering-video').toArray(); + + return { + title: `${SUB_NAME_PREFIX} - Category: ${category}`, + link: url, + item: await Promise.all( + itemRaw + .map((e) => { + const item = $(e); + let link = item.find('a').attr('href'); + if (!link) { + return null; + } + if (link.startsWith('/')) { + link = new URL(link, SUB_URL).href; + } + return cache.tryGet(link, () => loadArticle(link)); + }) + .filter(Boolean) + ), + }; +} diff --git a/lib/routes/baobua/const.ts b/lib/routes/baobua/const.ts new file mode 100644 index 000000000000..c135b83736f4 --- /dev/null +++ b/lib/routes/baobua/const.ts @@ -0,0 +1,4 @@ +const SUB_NAME_PREFIX = 'BaoBua'; +const SUB_URL = 'https://baobua.com/'; + +export { SUB_NAME_PREFIX, SUB_URL }; diff --git a/lib/routes/baobua/latest.ts b/lib/routes/baobua/latest.ts new file mode 100644 index 000000000000..664f95c762e4 --- /dev/null +++ b/lib/routes/baobua/latest.ts @@ -0,0 +1,57 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; + +export const route: Route = { + path: '/', + categories: ['picture'], + example: '/baobua', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['baobua.com/'], + target: '', + }, + ], + name: 'Latest', + maintainers: ['AiraNadih'], + handler, + url: 'baobua.com/', +}; + +async function handler() { + const response = await got(SUB_URL); + const $ = load(response.body); + const itemRaw = $('.thcovering-video').toArray(); + + return { + title: `${SUB_NAME_PREFIX} - Latest`, + link: SUB_URL, + item: await Promise.all( + itemRaw + .map((e) => { + const item = $(e); + let link = item.find('a').attr('href'); + if (!link) { + return null; + } + if (link.startsWith('/')) { + link = new URL(link, SUB_URL).href; + } + return cache.tryGet(link, () => loadArticle(link)); + }) + .filter(Boolean) + ), + }; +} diff --git a/lib/routes/baobua/namespace.ts b/lib/routes/baobua/namespace.ts new file mode 100644 index 000000000000..0d55833957bc --- /dev/null +++ b/lib/routes/baobua/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'BaoBua', + url: 'baobua.com', + description: 'BaoBua.Com - Hot beauty girl pics, girls photos, free watch online hd photo sets', + lang: 'en', +}; diff --git a/lib/routes/baobua/search.ts b/lib/routes/baobua/search.ts new file mode 100644 index 000000000000..804a61ea5fbf --- /dev/null +++ b/lib/routes/baobua/search.ts @@ -0,0 +1,60 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { SUB_NAME_PREFIX, SUB_URL } from './const'; +import loadArticle from './article'; + +export const route: Route = { + path: '/search/:keyword', + categories: ['picture'], + example: '/baobua/search/cos', + parameters: { keyword: 'Keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['baobua.com/search'], + target: '/search/:keyword', + }, + ], + name: 'Search', + maintainers: ['AiraNadih'], + handler, + url: 'baobua.com/', +}; + +async function handler(ctx) { + const keyword = ctx.req.param('keyword'); + const url = `${SUB_URL}search?q=${keyword}`; + + const response = await got(url); + const $ = load(response.body); + const itemRaw = $('.thcovering-video').toArray(); + + return { + title: `${SUB_NAME_PREFIX} - Search: ${keyword}`, + link: url, + item: await Promise.all( + itemRaw + .map((e) => { + const item = $(e); + let link = item.find('a').attr('href'); + if (!link) { + return null; + } + if (link.startsWith('/')) { + link = new URL(link, SUB_URL).href; + } + return cache.tryGet(link, () => loadArticle(link)); + }) + .filter(Boolean) + ), + }; +} From 8e268d1af813777dbc4527e40a4008996fef3820 Mon Sep 17 00:00:00 2001 From: Neko Aria <23137034+NekoAria@users.noreply.github.com> Date: Fri, 4 Apr 2025 22:57:43 +0800 Subject: [PATCH 0387/2658] fix(route/weibo): handle abnormal `mblog` with empty `bid` (#18770) --- lib/routes/weibo/user.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/routes/weibo/user.ts b/lib/routes/weibo/user.ts index 0c4ad18976fd..7a1f68ec1969 100644 --- a/lib/routes/weibo/user.ts +++ b/lib/routes/weibo/user.ts @@ -128,8 +128,14 @@ async function handler(ctx) { // Need more investigation, pending for now since the current version works fine. // TODO: getShowData() on demand? The API seems to return most things we need since 2022/05/21. // Need more investigation, pending for now since the current version works fine. - const key = 'weibo:user:' + item.mblog.bid; - const data = await cache.tryGet(key, () => weiboUtils.getShowData(uid, item.mblog.bid)); + let { bid } = item.mblog; + if (bid === '') { + const url = new URL(item.scheme); + bid = url.searchParams.get('mblogid'); + item.mblog.bid = bid; + } + const key = `weibo:user:${bid}`; + const data = await cache.tryGet(key, () => weiboUtils.getShowData(uid, bid)); if (data && data.text) { item.mblog.text = data.text; From 6290710c9327ab4174999470344ad9e8abbdd356 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Sat, 5 Apr 2025 00:43:20 +0800 Subject: [PATCH 0388/2658] =?UTF-8?q?feat(route):=20add=20Diario=20Frut?= =?UTF-8?q?=C3=ADcola=20Filtro=20(#18780)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/diariofruticola/filtro.ts | 129 ++++++++++++++++++++++++ lib/routes/diariofruticola/namespace.ts | 9 ++ 2 files changed, 138 insertions(+) create mode 100644 lib/routes/diariofruticola/filtro.ts create mode 100644 lib/routes/diariofruticola/namespace.ts diff --git a/lib/routes/diariofruticola/filtro.ts b/lib/routes/diariofruticola/filtro.ts new file mode 100644 index 000000000000..8fe19bc253e3 --- /dev/null +++ b/lib/routes/diariofruticola/filtro.ts @@ -0,0 +1,129 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; + +export const handler = async (ctx: Context): Promise => { + const { filter } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const baseUrl: string = 'https://diariofruticola.cl'; + const targetUrl: string = new URL(`filtro/${filter}`, baseUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language = $('html').attr('lang') ?? 'es'; + + let items: DataItem[] = []; + + items = $('div#printableArea a.text-dark') + .slice(0, limit) + .toArray() + .map((el): Element => { + const $el: Cheerio = $(el); + + const title: string = $el.text(); + const linkUrl: string | undefined = $el.attr('href'); + + const processedItem: DataItem = { + title, + link: linkUrl ? new URL(linkUrl, baseUrl).href : undefined, + language, + }; + + return processedItem; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async (): Promise => { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('h1.my-2').text(); + const description: string | undefined = $$('div.ck-content').html() ?? ''; + const pubDateStr: string | undefined = detailResponse.match(/"datePublished":\s"(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})"/)?.[1] ?? undefined; + const upDatedStr: string | undefined = detailResponse.match(/"dateModified":\s"(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})"/)?.[1] ?? undefined; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? timezone(parseDate(pubDateStr), -3) : item.pubDate, + content: { + html: description, + text: description, + }, + updated: upDatedStr ? timezone(parseDate(upDatedStr), -3) : item.updated, + language, + }; + + return { + ...item, + ...processedItem, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + return { + title: $('title').text(), + description: $('meta[property="og:description"]').attr('content'), + link: targetUrl, + item: items, + allowEmpty: true, + image: $('img#logo').attr('src'), + author: $('meta[name="keywords"]').attr('content'), + language, + id: $('meta[property="og:url"]').attr('content'), + }; +}; + +export const route: Route = { + path: '/filtro/:filter{.+}', + name: 'Filtro', + url: 'diariofruticola.cl', + maintainers: ['nczitzk'], + handler, + example: '/diariofruticola/filtro/cerezas/71', + parameters: { + filter: { + description: 'Filter', + }, + }, + description: `:::tip +If you subscribe to [Cerezas](https://www.diariofruticola.cl/filtro/cerezas/71/),where the URL is \`https://www.diariofruticola.cl/filtro/cerezas/71/\`, extract the part \`https://diariofruticola.cl/filtro\` to the end, which is \`/\`, and use it as the parameter to fill in. Therefore, the route will be [\`/diariofruticola/filtro/cerezas/71\`](https://rsshub.app/diariofruticola/filtro/cerezas/71). +::: +`, + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['diariofruticola.cl/filtro/:filter'], + target: (params) => { + const filter: string = params.filter; + + return `/diariofruticola/filtro${filter ? `/${filter}` : ''}`; + }, + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/diariofruticola/namespace.ts b/lib/routes/diariofruticola/namespace.ts new file mode 100644 index 000000000000..d642c07d6f47 --- /dev/null +++ b/lib/routes/diariofruticola/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Diario Frutícola', + url: 'diariofruticola.cl', + categories: ['new-media'], + description: '', + lang: 'es', +}; From aa38e959e7ff0f116cdcdb294681b939e7816c57 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Sat, 5 Apr 2025 01:14:45 +0800 Subject: [PATCH 0389/2658] fix(route/zhihu): Allow to set `__zse_ck` in signedHeader (#18774) --- lib/routes/zhihu/utils.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/routes/zhihu/utils.ts b/lib/routes/zhihu/utils.ts index 0800c7fbbff3..443afafca78e 100644 --- a/lib/routes/zhihu/utils.ts +++ b/lib/routes/zhihu/utils.ts @@ -69,9 +69,9 @@ export const getSignedHeader = async (url: string, apiPath: string) => { // require users to set the cookie in environmental variables anymore. // fisrt: get cookie(dc_0) from zhihu.com - const dc0 = await cache.tryGet('zhihu:cookies:d_c0', async () => { - if (getCookieValueByKey('d_c0')) { - return getCookieValueByKey('d_c0'); + const { dc0, zseCk } = await cache.tryGet('zhihu:cookies:d_c0', async () => { + if (getCookieValueByKey('d_c0') && getCookieValueByKey('__zse_ck')) { + return { dc0: getCookieValueByKey('d_c0'), zseCk: getCookieValueByKey('__zse_ck') }; } const response1 = await ofetch.raw('https://static.zhihu.com/zse-ck/v3.js'); const script = await response1._data.text(); @@ -95,7 +95,7 @@ export const getSignedHeader = async (url: string, apiPath: string) => { .trim() .slice('d_c0='.length) || ''; - return dc0; + return { dc0, zseCk }; }); // calculate x-zse-96, refer to https://github.com/srx-2000/spider_collection/issues/18 @@ -106,7 +106,7 @@ export const getSignedHeader = async (url: string, apiPath: string) => { const zc0 = getCookieValueByKey('z_c0'); return { - cookie: `d_c0=${dc0}${zc0 ? `;z_c0=${zc0}` : ''}`, + cookie: `__zse_ck=${zseCk}; d_c0=${dc0}${zc0 ? `;z_c0=${zc0}` : ''}`, 'x-zse-96': xzse96, 'x-app-za': 'OS=Web', 'x-zse-93': xzse93, From 0f43236cae97b7a534170d46b9c9ad31cd3a7bc1 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen <1937689+yan12125@users.noreply.github.com> Date: Sat, 5 Apr 2025 03:07:02 +0800 Subject: [PATCH 0390/2658] fix(route/bilibili): fix manga updates (#18300) * fix(route/bilibili): fix manga updates Closes https://github.com/DIYgod/RSSHub/issues/18246 * Update As suggested in https://github.com/SocialSisterYi/bilibili-API-collect/issues/1168#issuecomment-2643690149 * Cache the wasm binary * Download and generate wasm-exec.js on the fly * Fix `pnpm build` from scratch * Use camelCase for variables * Download and commit upstream wasm_exec.js Source: https://github.com/golang/go/raw/refs/tags/go1.24.0/lib/wasm/wasm_exec.js * Export Go As suggested in https://github.com/SocialSisterYi/bilibili-API-collect/issues/1168#issuecomment-2643690149 * eslint --fix * Make eslint happier * prettier --write * The last auto fix * fix: use ts extension --------- --- lib/routes/bilibili/manga-update.ts | 41 +- lib/routes/bilibili/wasm-exec.ts | 649 ++++++++++++++++++++++++++++ 2 files changed, 686 insertions(+), 4 deletions(-) create mode 100644 lib/routes/bilibili/wasm-exec.ts diff --git a/lib/routes/bilibili/manga-update.ts b/lib/routes/bilibili/manga-update.ts index 183f56ec7214..4cf7f182a8bd 100644 --- a/lib/routes/bilibili/manga-update.ts +++ b/lib/routes/bilibili/manga-update.ts @@ -1,4 +1,5 @@ import { Route } from '@/types'; +import cache from '@/utils/cache'; import got from '@/utils/got'; export const route: Route = { @@ -24,18 +25,50 @@ export const route: Route = { handler, }; +// Based on https://github.com/SocialSisterYi/bilibili-API-collect/issues/1168#issuecomment-2620749895 +async function genReqSign(query, body) { + // Don't import on top-level to avoid a cyclic dependency - wasm-exec.js generated via `pnpm build`, which in turn needs wasm-exec.js to import routes correctly + const { Go } = await import('./wasm-exec'); + + // Cache the wasm binary as it's quite large (~2MB) + // Here the binary is saved as base64 as the cache stores strings + const wasmBufferBase64 = await cache.tryGet('bilibili-manga-wasm-20250208', async () => { + const wasmResp = await got('https://s1.hdslb.com/bfs/manga-static/manga-pc/6732b1bf426cfc634293.wasm', { + responseType: 'arrayBuffer', + }); + return Buffer.from(wasmResp.data).toString('base64'); + }); + const wasmBuffer = Buffer.from(wasmBufferBase64, 'base64'); + + const go = new Go(); + const { instance } = await WebAssembly.instantiate(wasmBuffer, go.importObject); + go.run(instance); + if (void 0 === globalThis.genReqSign) { + throw new Error('WASM function not available'); + } + + const signature = globalThis.genReqSign(query, body, Date.now()); + + return signature.sign; +} + async function handler(ctx) { const comic_id = ctx.req.param('comicid').startsWith('mc') ? ctx.req.param('comicid').replace('mc', '') : ctx.req.param('comicid'); const link = `https://manga.bilibili.com/detail/mc${comic_id}`; const spi_response = await got('https://api.bilibili.com/x/frontend/finger/spi'); + const query = 'device=pc&platform=web&nov=25'; + const body = JSON.stringify({ + comic_id: Number(comic_id), + }); + + const ultraSign = await genReqSign(query, body); + const response = await got({ method: 'POST', - url: `https://manga.bilibili.com/twirp/comic.v2.Comic/ComicDetail?device=pc&platform=web`, - json: { - comic_id: Number(comic_id), - }, + url: `https://manga.bilibili.com/twirp/comic.v2.Comic/ComicDetail?${query}&ultra_sign=${ultraSign}`, + body, headers: { Referer: link, Cookie: `buvid3=${spi_response.data.data.b_3}; buvid4=${spi_response.data.data.b_4}`, diff --git a/lib/routes/bilibili/wasm-exec.ts b/lib/routes/bilibili/wasm-exec.ts new file mode 100644 index 000000000000..6081d555ad29 --- /dev/null +++ b/lib/routes/bilibili/wasm-exec.ts @@ -0,0 +1,649 @@ +/* eslint-disable prefer-rest-params */ +/* eslint-disable default-case */ +/* eslint-disable unicorn/consistent-function-scoping */ +/* eslint-disable no-console */ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +'use strict'; + +(() => { + const enosys = () => { + const err = new Error('not implemented'); + err.code = 'ENOSYS'; + return err; + }; + + if (!globalThis.fs) { + let outputBuf = ''; + globalThis.fs = { + constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1, O_DIRECTORY: -1 }, // unused + writeSync(fd, buf) { + outputBuf += decoder.decode(buf); + const nl = outputBuf.lastIndexOf('\n'); + if (nl !== -1) { + console.log(outputBuf.substring(0, nl)); + outputBuf = outputBuf.substring(nl + 1); + } + return buf.length; + }, + write(fd, buf, offset, length, position, callback) { + if (offset !== 0 || length !== buf.length || position !== null) { + callback(enosys()); + return; + } + const n = this.writeSync(fd, buf); + callback(null, n); + }, + chmod(path, mode, callback) { + callback(enosys()); + }, + chown(path, uid, gid, callback) { + callback(enosys()); + }, + close(fd, callback) { + callback(enosys()); + }, + fchmod(fd, mode, callback) { + callback(enosys()); + }, + fchown(fd, uid, gid, callback) { + callback(enosys()); + }, + fstat(fd, callback) { + callback(enosys()); + }, + fsync(fd, callback) { + callback(null); + }, + ftruncate(fd, length, callback) { + callback(enosys()); + }, + lchown(path, uid, gid, callback) { + callback(enosys()); + }, + link(path, link, callback) { + callback(enosys()); + }, + lstat(path, callback) { + callback(enosys()); + }, + mkdir(path, perm, callback) { + callback(enosys()); + }, + open(path, flags, mode, callback) { + callback(enosys()); + }, + read(fd, buffer, offset, length, position, callback) { + callback(enosys()); + }, + readdir(path, callback) { + callback(enosys()); + }, + readlink(path, callback) { + callback(enosys()); + }, + rename(from, to, callback) { + callback(enosys()); + }, + rmdir(path, callback) { + callback(enosys()); + }, + stat(path, callback) { + callback(enosys()); + }, + symlink(path, link, callback) { + callback(enosys()); + }, + truncate(path, length, callback) { + callback(enosys()); + }, + unlink(path, callback) { + callback(enosys()); + }, + utimes(path, atime, mtime, callback) { + callback(enosys()); + }, + }; + } + + if (!globalThis.process) { + globalThis.process = { + getuid() { + return -1; + }, + getgid() { + return -1; + }, + geteuid() { + return -1; + }, + getegid() { + return -1; + }, + getgroups() { + throw enosys(); + }, + pid: -1, + ppid: -1, + umask() { + throw enosys(); + }, + cwd() { + throw enosys(); + }, + chdir() { + throw enosys(); + }, + }; + } + + if (!globalThis.path) { + globalThis.path = { + resolve(...pathSegments) { + return pathSegments.join('/'); + }, + }; + } + + // eslint-disable-next-line n/no-unsupported-features/node-builtins + if (!globalThis.crypto) { + throw new Error('globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)'); + } + + if (!globalThis.performance) { + throw new Error('globalThis.performance is not available, polyfill required (performance.now only)'); + } + + if (!globalThis.TextEncoder) { + throw new Error('globalThis.TextEncoder is not available, polyfill required'); + } + + if (!globalThis.TextDecoder) { + throw new Error('globalThis.TextDecoder is not available, polyfill required'); + } + + const encoder = new TextEncoder('utf-8'); + const decoder = new TextDecoder('utf-8'); + + globalThis.Go = class { + constructor() { + this.argv = ['js']; + this.env = {}; + this.exit = (code) => { + if (code !== 0) { + console.warn('exit code:', code); + } + }; + this._exitPromise = new Promise((resolve) => { + this._resolveExitPromise = resolve; + }); + this._pendingEvent = null; + this._scheduledTimeouts = new Map(); + this._nextCallbackTimeoutID = 1; + + const setInt64 = (addr, v) => { + this.mem.setUint32(addr + 0, v, true); + this.mem.setUint32(addr + 4, Math.floor(v / 4_294_967_296), true); + }; + + const getInt64 = (addr) => { + const low = this.mem.getUint32(addr + 0, true); + const high = this.mem.getInt32(addr + 4, true); + return low + high * 4_294_967_296; + }; + + const loadValue = (addr) => { + const f = this.mem.getFloat64(addr, true); + if (f === 0) { + return; + } + if (!Number.isNaN(f)) { + return f; + } + + const id = this.mem.getUint32(addr, true); + return this._values[id]; + }; + + const storeValue = (addr, v) => { + const nanHead = 0x7F_F8_00_00; + + if (typeof v === 'number' && v !== 0) { + if (Number.isNaN(v)) { + this.mem.setUint32(addr + 4, nanHead, true); + this.mem.setUint32(addr, 0, true); + return; + } + this.mem.setFloat64(addr, v, true); + return; + } + + if (v === undefined) { + this.mem.setFloat64(addr, 0, true); + return; + } + + let id = this._ids.get(v); + if (id === undefined) { + id = this._idPool.pop(); + if (id === undefined) { + id = this._values.length; + } + this._values[id] = v; + this._goRefCounts[id] = 0; + this._ids.set(v, id); + } + this._goRefCounts[id]++; + let typeFlag = 0; + switch (typeof v) { + case 'object': + if (v !== null) { + typeFlag = 1; + } + break; + case 'string': + typeFlag = 2; + break; + case 'symbol': + typeFlag = 3; + break; + case 'function': + typeFlag = 4; + break; + } + this.mem.setUint32(addr + 4, nanHead | typeFlag, true); + this.mem.setUint32(addr, id, true); + }; + + const loadSlice = (addr) => { + const array = getInt64(addr + 0); + const len = getInt64(addr + 8); + return new Uint8Array(this._inst.exports.mem.buffer, array, len); + }; + + const loadSliceOfValues = (addr) => { + const array = getInt64(addr + 0); + const len = getInt64(addr + 8); + const a = Array.from({ length: len }); + for (let i = 0; i < len; i++) { + a[i] = loadValue(array + i * 8); + } + return a; + }; + + const loadString = (addr) => { + const saddr = getInt64(addr + 0); + const len = getInt64(addr + 8); + return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len)); + }; + + const testCallExport = (a, b) => { + this._inst.exports.testExport0(); + return this._inst.exports.testExport(a, b); + }; + + const timeOrigin = Date.now() - performance.now(); + this.importObject = { + _gotest: { + add: (a, b) => a + b, + callExport: testCallExport, + }, + gojs: { + // Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters) + // may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported + // function. A goroutine can switch to a new stack if the current stack is too small (see morestack function). + // This changes the SP, thus we have to update the SP used by the imported function. + + // func wasmExit(code int32) + 'runtime.wasmExit': (sp) => { + sp >>>= 0; + const code = this.mem.getInt32(sp + 8, true); + this.exited = true; + delete this._inst; + delete this._values; + delete this._goRefCounts; + delete this._ids; + delete this._idPool; + this.exit(code); + }, + + // func wasmWrite(fd uintptr, p unsafe.Pointer, n int32) + 'runtime.wasmWrite': (sp) => { + sp >>>= 0; + const fd = getInt64(sp + 8); + const p = getInt64(sp + 16); + const n = this.mem.getInt32(sp + 24, true); + globalThis.fs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n)); + }, + + // func resetMemoryDataView() + 'runtime.resetMemoryDataView': (sp) => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + sp >>>= 0; + this.mem = new DataView(this._inst.exports.mem.buffer); + }, + + // func nanotime1() int64 + 'runtime.nanotime1': (sp) => { + sp >>>= 0; + setInt64(sp + 8, (timeOrigin + performance.now()) * 1_000_000); + }, + + // func walltime() (sec int64, nsec int32) + 'runtime.walltime': (sp) => { + sp >>>= 0; + const msec = Date.now(); + setInt64(sp + 8, msec / 1000); + this.mem.setInt32(sp + 16, (msec % 1000) * 1_000_000, true); + }, + + // func scheduleTimeoutEvent(delay int64) int32 + 'runtime.scheduleTimeoutEvent': (sp) => { + sp >>>= 0; + const id = this._nextCallbackTimeoutID; + this._nextCallbackTimeoutID++; + this._scheduledTimeouts.set( + id, + setTimeout( + () => { + this._resume(); + while (this._scheduledTimeouts.has(id)) { + // for some reason Go failed to register the timeout event, log and try again + // (temporary workaround for https://github.com/golang/go/issues/28975) + console.warn('scheduleTimeoutEvent: missed timeout event'); + this._resume(); + } + }, + getInt64(sp + 8) + ) + ); + this.mem.setInt32(sp + 16, id, true); + }, + + // func clearTimeoutEvent(id int32) + 'runtime.clearTimeoutEvent': (sp) => { + sp >>>= 0; + const id = this.mem.getInt32(sp + 8, true); + clearTimeout(this._scheduledTimeouts.get(id)); + this._scheduledTimeouts.delete(id); + }, + + // func getRandomData(r []byte) + 'runtime.getRandomData': (sp) => { + sp >>>= 0; + // eslint-disable-next-line n/no-unsupported-features/node-builtins + crypto.getRandomValues(loadSlice(sp + 8)); + }, + + // func finalizeRef(v ref) + 'syscall/js.finalizeRef': (sp) => { + sp >>>= 0; + const id = this.mem.getUint32(sp + 8, true); + this._goRefCounts[id]--; + if (this._goRefCounts[id] === 0) { + const v = this._values[id]; + this._values[id] = null; + this._ids.delete(v); + this._idPool.push(id); + } + }, + + // func stringVal(value string) ref + 'syscall/js.stringVal': (sp) => { + sp >>>= 0; + storeValue(sp + 24, loadString(sp + 8)); + }, + + // func valueGet(v ref, p string) ref + 'syscall/js.valueGet': (sp) => { + sp >>>= 0; + const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16)); + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 32, result); + }, + + // func valueSet(v ref, p string, x ref) + 'syscall/js.valueSet': (sp) => { + sp >>>= 0; + Reflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32)); + }, + + // func valueDelete(v ref, p string) + 'syscall/js.valueDelete': (sp) => { + sp >>>= 0; + Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16)); + }, + + // func valueIndex(v ref, i int) ref + 'syscall/js.valueIndex': (sp) => { + sp >>>= 0; + storeValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16))); + }, + + // valueSetIndex(v ref, i int, x ref) + 'syscall/js.valueSetIndex': (sp) => { + sp >>>= 0; + Reflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24)); + }, + + // func valueCall(v ref, m string, args []ref) (ref, bool) + 'syscall/js.valueCall': (sp) => { + sp >>>= 0; + try { + const v = loadValue(sp + 8); + const m = Reflect.get(v, loadString(sp + 16)); + const args = loadSliceOfValues(sp + 32); + const result = Reflect.apply(m, v, args); + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 56, result); + this.mem.setUint8(sp + 64, 1); + } catch (error) { + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 56, error); + this.mem.setUint8(sp + 64, 0); + } + }, + + // func valueInvoke(v ref, args []ref) (ref, bool) + 'syscall/js.valueInvoke': (sp) => { + sp >>>= 0; + try { + const v = loadValue(sp + 8); + const args = loadSliceOfValues(sp + 16); + const result = Reflect.apply(v, undefined, args); + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 40, result); + this.mem.setUint8(sp + 48, 1); + } catch (error) { + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 40, error); + this.mem.setUint8(sp + 48, 0); + } + }, + + // func valueNew(v ref, args []ref) (ref, bool) + 'syscall/js.valueNew': (sp) => { + sp >>>= 0; + try { + const v = loadValue(sp + 8); + const args = loadSliceOfValues(sp + 16); + const result = Reflect.construct(v, args); + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 40, result); + this.mem.setUint8(sp + 48, 1); + } catch (error) { + sp = this._inst.exports.getsp() >>> 0; // see comment above + storeValue(sp + 40, error); + this.mem.setUint8(sp + 48, 0); + } + }, + + // func valueLength(v ref) int + 'syscall/js.valueLength': (sp) => { + sp >>>= 0; + setInt64(sp + 16, Number.parseInt(loadValue(sp + 8).length)); + }, + + // valuePrepareString(v ref) (ref, int) + 'syscall/js.valuePrepareString': (sp) => { + sp >>>= 0; + const str = encoder.encode(String(loadValue(sp + 8))); + storeValue(sp + 16, str); + setInt64(sp + 24, str.length); + }, + + // valueLoadString(v ref, b []byte) + 'syscall/js.valueLoadString': (sp) => { + sp >>>= 0; + const str = loadValue(sp + 8); + loadSlice(sp + 16).set(str); + }, + + // func valueInstanceOf(v ref, t ref) bool + 'syscall/js.valueInstanceOf': (sp) => { + sp >>>= 0; + this.mem.setUint8(sp + 24, loadValue(sp + 8) instanceof loadValue(sp + 16) ? 1 : 0); + }, + + // func copyBytesToGo(dst []byte, src ref) (int, bool) + 'syscall/js.copyBytesToGo': (sp) => { + sp >>>= 0; + const dst = loadSlice(sp + 8); + const src = loadValue(sp + 32); + if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) { + this.mem.setUint8(sp + 48, 0); + return; + } + const toCopy = src.subarray(0, dst.length); + dst.set(toCopy); + setInt64(sp + 40, toCopy.length); + this.mem.setUint8(sp + 48, 1); + }, + + // func copyBytesToJS(dst ref, src []byte) (int, bool) + 'syscall/js.copyBytesToJS': (sp) => { + sp >>>= 0; + const dst = loadValue(sp + 8); + const src = loadSlice(sp + 16); + if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) { + this.mem.setUint8(sp + 48, 0); + return; + } + const toCopy = src.subarray(0, dst.length); + dst.set(toCopy); + setInt64(sp + 40, toCopy.length); + this.mem.setUint8(sp + 48, 1); + }, + + debug: (value) => { + console.log(value); + }, + }, + }; + } + + async run(instance) { + if (!(instance instanceof WebAssembly.Instance)) { + throw new TypeError('Go.run: WebAssembly.Instance expected'); + } + this._inst = instance; + this.mem = new DataView(this._inst.exports.mem.buffer); + this._values = [ + // JS values that Go currently has references to, indexed by reference id + Number.NaN, + 0, + null, + true, + false, + globalThis, + this, + ]; + this._goRefCounts = Array.from({ length: this._values.length }).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id + this._ids = new Map([ + // mapping from JS values to reference ids + [0, 1], + [null, 2], + [true, 3], + [false, 4], + [globalThis, 5], + [this, 6], + ]); + this._idPool = []; // unused ids that have been garbage collected + this.exited = false; // whether the Go program has exited + + // Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory. + let offset = 4096; + + const strPtr = (str) => { + const ptr = offset; + const bytes = encoder.encode(str + '\0'); + new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes); + offset += bytes.length; + if (offset % 8 !== 0) { + offset += 8 - (offset % 8); + } + return ptr; + }; + + const argc = this.argv.length; + + const argvPtrs = []; + for (const arg of this.argv) { + argvPtrs.push(strPtr(arg)); + } + argvPtrs.push(0); + + const keys = Object.keys(this.env).sort(); + for (const key of keys) { + argvPtrs.push(strPtr(`${key}=${this.env[key]}`)); + } + argvPtrs.push(0); + + const argv = offset; + for (const ptr of argvPtrs) { + this.mem.setUint32(offset, ptr, true); + this.mem.setUint32(offset + 4, 0, true); + offset += 8; + } + + // The linker guarantees global data starts from at least wasmMinDataAddr. + // Keep in sync with cmd/link/internal/ld/data.go:wasmMinDataAddr. + const wasmMinDataAddr = 4096 + 8192; + if (offset >= wasmMinDataAddr) { + throw new Error('total length of command line and environment variables exceeds limit'); + } + + this._inst.exports.run(argc, argv); + if (this.exited) { + this._resolveExitPromise(); + } + await this._exitPromise; + } + + _resume() { + if (this.exited) { + throw new Error('Go program has already exited'); + } + this._inst.exports.resume(); + if (this.exited) { + this._resolveExitPromise(); + } + } + + _makeFuncWrapper(id) { + // somehow avoiding aliasing this with an arrow function doesn't work + // eslint-disable-next-line unicorn/no-this-assignment, @typescript-eslint/no-this-alias + const go = this; + return function () { + const event = { id, this: this, args: arguments }; + go._pendingEvent = event; + go._resume(); + return event.result; + }; + } + }; +})(); + +export const Go = globalThis.Go; From 64a9bfe47f84e4c1e6fce1c2b9af0d36d0b5d5d0 Mon Sep 17 00:00:00 2001 From: Mervyn Zhan <6359152+reply2future@users.noreply.github.com> Date: Sun, 6 Apr 2025 00:21:55 +0800 Subject: [PATCH 0391/2658] fix: #18771 gov stats description error (#18773) * fix(route/gov/stats): corrected the `description` and `author` fix #18771 * docs(route/gov/stats): correct the example path * refactor(route/gov/stats): fetch the item.author directly * refactor(route/gov/stats): remove the always false condition --- lib/routes/gov/stats/index.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/routes/gov/stats/index.ts b/lib/routes/gov/stats/index.ts index 237f9e07e0d9..b03d1b4a87a3 100644 --- a/lib/routes/gov/stats/index.ts +++ b/lib/routes/gov/stats/index.ts @@ -16,8 +16,8 @@ export const route: Route = { name: '国家统计局 通用', url: 'www.stats.gov.cn', categories: ['government'], - maintainers: ['bigfei', 'nczitzk'], - example: '/stats/sj/zxfb', + maintainers: ['bigfei', 'nczitzk', 'reply2future'], + example: '/gov/stats/sj/zxfb', handler, radar: [ { @@ -108,18 +108,14 @@ async function handler(ctx) { return item; } - try { - item.author = detailResponse.data.match(/来源:(.*?) { From cf8766a74ab51977af7a03a633c6c68cdf20e58f Mon Sep 17 00:00:00 2001 From: Raspberry <25424627+yana9i@users.noreply.github.com> Date: Sun, 6 Apr 2025 01:31:44 +0800 Subject: [PATCH 0392/2658] fix(route/zsxq): fix excess text when parsing link text (#18785) --- lib/routes/zsxq/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/zsxq/utils.ts b/lib/routes/zsxq/utils.ts index 82e21abcb9cd..31258346e183 100644 --- a/lib/routes/zsxq/utils.ts +++ b/lib/routes/zsxq/utils.ts @@ -25,7 +25,7 @@ export async function customFetch>(path: s function parseTopicContent(text: string = '', images: TopicImage[] = []) { let result = text.replaceAll('\n', '
'); - result = result.replaceAll(//g, (_, p1, p2) => `${decodeURIComponent(p2)}`); + result = result.replaceAll(//g, (_, p1, p2) => `${decodeURIComponent(p2)}`); result = result.replaceAll(//g, (_, p1) => { const title = decodeURIComponent(p1); return `${title}`; From 74f6f784bf94839a481719527bae4749d0460b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=81=E8=87=B4?= <24365406+JiZhi-Error@users.noreply.github.com> Date: Sun, 6 Apr 2025 18:45:26 +0800 Subject: [PATCH 0393/2658] feat(route): add GitCode (#18778) * feat(route): add GitCode * Update lib/routes/gitcode/repos/commits.ts Co-authored-by: Tony * Update lib/routes/gitcode/repos/commits.ts Co-authored-by: Tony * Update lib/routes/gitcode/repos/commits.ts Co-authored-by: Tony * Update lib/routes/gitcode/repos/commits.ts Co-authored-by: Tony * Update commits.ts * Update commits.ts --------- Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com> --- lib/routes/gitcode/namespace.ts | 7 +++ lib/routes/gitcode/repos/commits.ts | 67 +++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 lib/routes/gitcode/namespace.ts create mode 100644 lib/routes/gitcode/repos/commits.ts diff --git a/lib/routes/gitcode/namespace.ts b/lib/routes/gitcode/namespace.ts new file mode 100644 index 000000000000..405dff663884 --- /dev/null +++ b/lib/routes/gitcode/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'GitCode', + url: 'gitcode.com', + lang: 'zh-CN', +}; diff --git a/lib/routes/gitcode/repos/commits.ts b/lib/routes/gitcode/repos/commits.ts new file mode 100644 index 000000000000..ceb583b00816 --- /dev/null +++ b/lib/routes/gitcode/repos/commits.ts @@ -0,0 +1,67 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import MarkdownIt from 'markdown-it'; + +const md = MarkdownIt({ + html: true, +}); + +export const route: Route = { + path: '/commits/:owner/:repo/:branch?', + categories: ['programming'], + example: '/gitcode/commits-api/openharmony-sig/flutter_flutter', + parameters: { owner: '用户名/组织名', repo: '仓库名', branch: '分支名,可选,默认为主分支' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['gitcode.com/:owner/:repo/commits', 'gitcode.com/:owner/:repo/commits/:branch'], + target: (params) => `/gitcode/commits/${params.owner}/${params.repo}${params.branch ? `/${params.branch}` : ''}`, + }, + ], + name: '仓库提交', + maintainers: ['JiZhi-Error'], + handler, +}; + +async function handler(ctx) { + const { owner, repo, branch } = ctx.req.param(); + // API路径 + const apiUrl = `https://web-api.gitcode.com/api/v2/projects/${encodeURIComponent(`${owner}/${repo}`)}/repository/commits`; + + const searchParams: Record = { + per_page: ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 100, + ref_name: branch, + }; + + const { data: response } = await got(apiUrl, { + searchParams, + }); + + if (!response || !response.content) { + throw new Error('无法获取提交数据'); + } + + const items = response.content.map((item) => ({ + title: md.renderInline(item.title), + description: md.render(item.message), + author: item.author_name, + pubDate: parseDate(item.committed_date), + guid: item.id, + link: `https://gitcode.com/${owner}/${repo}/commit/${item.id}`, + })); + + const branchText = branch ? ` (${branch})` : ''; + return { + title: `${owner}/${repo}/${branchText} - 提交记录`, + link: `https://gitcode.com/${owner}/${repo}/commits/${branch || ''}`, + item: items, + }; +} From 81a5807bf4b2a9dce824889befb33f82e687fb6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=81=E8=87=B4?= <24365406+JiZhi-Error@users.noreply.github.com> Date: Sun, 6 Apr 2025 21:51:36 +0800 Subject: [PATCH 0394/2658] fix(route): adjusted route sample (#18787) --- lib/routes/gitcode/repos/commits.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/gitcode/repos/commits.ts b/lib/routes/gitcode/repos/commits.ts index ceb583b00816..13f2e9a90329 100644 --- a/lib/routes/gitcode/repos/commits.ts +++ b/lib/routes/gitcode/repos/commits.ts @@ -10,7 +10,7 @@ const md = MarkdownIt({ export const route: Route = { path: '/commits/:owner/:repo/:branch?', categories: ['programming'], - example: '/gitcode/commits-api/openharmony-sig/flutter_flutter', + example: '/gitcode/commits/openharmony-sig/flutter_flutter', parameters: { owner: '用户名/组织名', repo: '仓库名', branch: '分支名,可选,默认为主分支' }, features: { requireConfig: false, From 20d171f379ac56dd075aa7ee04ac243afdeed533 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 09:26:30 +0000 Subject: [PATCH 0395/2658] chore(deps-dev): bump typescript from 5.8.2 to 5.8.3 (#18792) Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.8.2 to 5.8.3. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml) - [Commits](https://github.com/microsoft/TypeScript/commits) --- updated-dependencies: - dependency-name: typescript dependency-version: 5.8.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 156 ++++++++++++++++++++++++------------------------- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/package.json b/package.json index f482260a3246..687564d9a96f 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "prettier": "3.5.3", "remark-parse": "11.0.0", "supertest": "7.1.0", - "typescript": "5.8.2", + "typescript": "5.8.3", "unified": "11.0.5", "vite-tsconfig-paths": "5.1.4", "vitest": "2.1.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d093fc66c1c..5f9202e952e4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -196,19 +196,19 @@ importers: version: 2.5.8 puppeteer: specifier: 22.6.2 - version: 22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10) + version: 22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) puppeteer-extra: specifier: 3.3.6 - version: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)) + version: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)) puppeteer-extra-plugin-stealth: specifier: 2.11.2 - version: 2.11.2(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))) + version: 2.11.2(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))) puppeteer-extra-plugin-user-data-dir: specifier: 2.4.1 - version: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))) + version: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))) puppeteer-extra-plugin-user-preferences: specifier: 2.4.1 - version: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))) + version: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))) query-string: specifier: 9.1.1 version: 9.1.1 @@ -299,7 +299,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 4.2.0 - version: 4.2.0(eslint@9.23.0)(typescript@5.8.2) + version: 4.2.0(eslint@9.23.0)(typescript@5.8.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -368,16 +368,16 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.29.0 - version: 8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2) + version: 8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.3))(eslint@9.23.0)(typescript@5.8.3) '@typescript-eslint/parser': specifier: 8.29.0 - version: 8.29.0(eslint@9.23.0)(typescript@5.8.2) + version: 8.29.0(eslint@9.23.0)(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2))) + version: 2.1.9(vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) discord-api-types: specifier: 0.37.119 version: 0.37.119 @@ -425,7 +425,7 @@ importers: version: 3.0.5 msw: specifier: 2.4.3 - version: 2.4.3(typescript@5.8.2) + version: 2.4.3(typescript@5.8.3) node-network-devtools: specifier: 1.0.25 version: 1.0.25(bufferutil@4.0.9)(undici@6.21.2)(utf-8-validate@5.0.10) @@ -439,17 +439,17 @@ importers: specifier: 7.1.0 version: 7.1.0 typescript: - specifier: 5.8.2 - version: 5.8.2 + specifier: 5.8.3 + version: 5.8.3 unified: specifier: 11.0.5 version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.14.0)) + version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.14.0)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) + version: 2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -5684,8 +5684,8 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typescript@5.8.2: - resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==} + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} engines: {node: '>=14.17'} hasBin: true @@ -7861,9 +7861,9 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@4.2.0(eslint@9.23.0)(typescript@5.8.2)': + '@stylistic/eslint-plugin@4.2.0(eslint@9.23.0)(typescript@5.8.3)': dependencies: - '@typescript-eslint/utils': 8.28.0(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/utils': 8.28.0(eslint@9.23.0)(typescript@5.8.3) eslint: 9.23.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 @@ -8059,32 +8059,32 @@ snapshots: '@types/node': 22.14.0 optional: true - '@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2)': + '@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.3))(eslint@9.23.0)(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.29.0(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/parser': 8.29.0(eslint@9.23.0)(typescript@5.8.3) '@typescript-eslint/scope-manager': 8.29.0 - '@typescript-eslint/type-utils': 8.29.0(eslint@9.23.0)(typescript@5.8.2) - '@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/type-utils': 8.29.0(eslint@9.23.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.29.0 eslint: 9.23.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.8.2) - typescript: 5.8.2 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2)': + '@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.3)': dependencies: '@typescript-eslint/scope-manager': 8.29.0 '@typescript-eslint/types': 8.29.0 - '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2) + '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.29.0 debug: 4.4.0 eslint: 9.23.0 - typescript: 5.8.2 + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -8098,14 +8098,14 @@ snapshots: '@typescript-eslint/types': 8.29.0 '@typescript-eslint/visitor-keys': 8.29.0 - '@typescript-eslint/type-utils@8.29.0(eslint@9.23.0)(typescript@5.8.2)': + '@typescript-eslint/type-utils@8.29.0(eslint@9.23.0)(typescript@5.8.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2) - '@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.2) + '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3) + '@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.3) debug: 4.4.0 eslint: 9.23.0 - ts-api-utils: 2.1.0(typescript@5.8.2) - typescript: 5.8.2 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -8113,7 +8113,7 @@ snapshots: '@typescript-eslint/types@8.29.0': {} - '@typescript-eslint/typescript-estree@8.28.0(typescript@5.8.2)': + '@typescript-eslint/typescript-estree@8.28.0(typescript@5.8.3)': dependencies: '@typescript-eslint/types': 8.28.0 '@typescript-eslint/visitor-keys': 8.28.0 @@ -8122,12 +8122,12 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.7.1 - ts-api-utils: 2.1.0(typescript@5.8.2) - typescript: 5.8.2 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.29.0(typescript@5.8.2)': + '@typescript-eslint/typescript-estree@8.29.0(typescript@5.8.3)': dependencies: '@typescript-eslint/types': 8.29.0 '@typescript-eslint/visitor-keys': 8.29.0 @@ -8136,30 +8136,30 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.7.1 - ts-api-utils: 2.1.0(typescript@5.8.2) - typescript: 5.8.2 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.28.0(eslint@9.23.0)(typescript@5.8.2)': + '@typescript-eslint/utils@8.28.0(eslint@9.23.0)(typescript@5.8.3)': dependencies: '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0) '@typescript-eslint/scope-manager': 8.28.0 '@typescript-eslint/types': 8.28.0 - '@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.2) + '@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.3) eslint: 9.23.0 - typescript: 5.8.2 + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.29.0(eslint@9.23.0)(typescript@5.8.2)': + '@typescript-eslint/utils@8.29.0(eslint@9.23.0)(typescript@5.8.3)': dependencies: '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0) '@typescript-eslint/scope-manager': 8.29.0 '@typescript-eslint/types': 8.29.0 - '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2) + '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3) eslint: 9.23.0 - typescript: 5.8.2 + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -8199,7 +8199,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8213,7 +8213,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)) + vitest: 2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) transitivePeerDependencies: - supports-color @@ -8224,13 +8224,13 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.14.0))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.14.0))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - msw: 2.4.3(typescript@5.8.2) + msw: 2.4.3(typescript@5.8.3) vite: 5.4.15(@types/node@22.14.0) '@vitest/pretty-format@2.1.9': @@ -8748,14 +8748,14 @@ snapshots: core-util-is@1.0.2: {} - cosmiconfig@9.0.0(typescript@5.8.2): + cosmiconfig@9.0.0(typescript@5.8.3): dependencies: env-paths: 2.2.1 import-fresh: 3.3.1 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.8.2 + typescript: 5.8.3 cross-env@7.0.3: dependencies: @@ -10664,7 +10664,7 @@ snapshots: ms@2.1.3: {} - msw@2.4.3(typescript@5.8.2): + msw@2.4.3(typescript@5.8.3): dependencies: '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 @@ -10684,7 +10684,7 @@ snapshots: type-fest: 4.38.0 yargs: 17.7.2 optionalDependencies: - typescript: 5.8.2 + typescript: 5.8.3 mute-stream@0.0.8: {} @@ -11125,63 +11125,63 @@ snapshots: - supports-color - utf-8-validate - puppeteer-extra-plugin-stealth@2.11.2(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))): + puppeteer-extra-plugin-stealth@2.11.2(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))): dependencies: debug: 4.4.0 - puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))) - puppeteer-extra-plugin-user-preferences: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))) + puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))) + puppeteer-extra-plugin-user-preferences: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))) optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color - puppeteer-extra-plugin-user-data-dir@2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))): + puppeteer-extra-plugin-user-data-dir@2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))): dependencies: debug: 4.4.0 fs-extra: 10.1.0 - puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))) + puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))) rimraf: 3.0.2 optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color - puppeteer-extra-plugin-user-preferences@2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))): + puppeteer-extra-plugin-user-preferences@2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))): dependencies: debug: 4.4.0 deepmerge: 4.3.1 - puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))) - puppeteer-extra-plugin-user-data-dir: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))) + puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))) + puppeteer-extra-plugin-user-data-dir: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))) optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color - puppeteer-extra-plugin@3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10))): + puppeteer-extra-plugin@3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))): dependencies: '@types/debug': 4.1.12 debug: 4.4.0 merge-deep: 3.0.3 optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color - puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)): + puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)): dependencies: '@types/debug': 4.1.12 debug: 4.4.0 deepmerge: 4.3.1 optionalDependencies: - puppeteer: 22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10) + puppeteer: 22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) puppeteer-core: 22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - supports-color - puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10): + puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10): dependencies: '@puppeteer/browsers': 2.2.0 - cosmiconfig: 9.0.0(typescript@5.8.2) + cosmiconfig: 9.0.0(typescript@5.8.3) devtools-protocol: 0.0.1262051 puppeteer-core: 22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -11833,9 +11833,9 @@ snapshots: trough@2.2.0: {} - ts-api-utils@2.1.0(typescript@5.8.2): + ts-api-utils@2.1.0(typescript@5.8.3): dependencies: - typescript: 5.8.2 + typescript: 5.8.3 ts-case-convert@2.1.0: {} @@ -11845,9 +11845,9 @@ snapshots: ts-xor@1.3.0: {} - tsconfck@3.1.5(typescript@5.8.2): + tsconfck@3.1.5(typescript@5.8.3): optionalDependencies: - typescript: 5.8.2 + typescript: 5.8.3 tslib@1.14.1: {} @@ -11896,7 +11896,7 @@ snapshots: dependencies: is-typedarray: 1.0.0 - typescript@5.8.2: {} + typescript@5.8.3: {} uc.micro@2.1.0: {} @@ -12029,11 +12029,11 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@5.4.15(@types/node@22.14.0)): + vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.14.0)): dependencies: debug: 4.4.0 globrex: 0.1.2 - tsconfck: 3.1.5(typescript@5.8.2) + tsconfck: 3.1.5(typescript@5.8.3) optionalDependencies: vite: 5.4.15(@types/node@22.14.0) transitivePeerDependencies: @@ -12049,10 +12049,10 @@ snapshots: '@types/node': 22.14.0 fsevents: 2.3.3 - vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.2)): + vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.2))(vite@5.4.15(@types/node@22.14.0)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.14.0)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 From 106e6c5a1be9eb8165e292f11372c5615f823565 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 02:45:16 -0700 Subject: [PATCH 0396/2658] chore(deps): bump chrono-node from 2.7.9 to 2.8.0 (#18793) Bumps [chrono-node](https://github.com/wanasit/chrono) from 2.7.9 to 2.8.0. - [Release notes](https://github.com/wanasit/chrono/releases) - [Commits](https://github.com/wanasit/chrono/compare/v2.7.9...v2.8.0) --- updated-dependencies: - dependency-name: chrono-node dependency-version: 2.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 687564d9a96f..e59124f1c5ba 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "aes-js": "3.1.2", "art-template": "4.13.2", "cheerio": "1.0.0", - "chrono-node": "2.7.9", + "chrono-node": "2.8.0", "city-timezones": "1.3.0", "cross-env": "7.0.3", "crypto-js": "4.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f9202e952e4..10b368e156cb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -78,8 +78,8 @@ importers: specifier: 1.0.0 version: 1.0.0 chrono-node: - specifier: 2.7.9 - version: 2.7.9 + specifier: 2.8.0 + version: 2.8.0 city-timezones: specifier: 1.3.0 version: 1.3.0 @@ -2731,8 +2731,8 @@ packages: peerDependencies: devtools-protocol: '*' - chrono-node@2.7.9: - resolution: {integrity: sha512-PW3tzuztH7OFbwdCCwv1k8F6ALFs5Yet1Neh5JJBL1GGj8zsLj3ZgZU6StUyM6gSsVRMv8EE6LqpTjM52Mshrw==} + chrono-node@2.8.0: + resolution: {integrity: sha512-//a/HhnCQ4zFHxRfi1m+jQwr8o0Gxsg0GUjZ39O6ud9lkhrnuLGX1oOKjGsivm9AVMS79cn0PmTa6JCRlzgfWA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} ci-info@4.2.0: @@ -8619,7 +8619,7 @@ snapshots: urlpattern-polyfill: 10.0.0 zod: 3.22.4 - chrono-node@2.7.9: + chrono-node@2.8.0: dependencies: dayjs: 1.11.8 From cc547a6e0ed504aee66a4740020bbab73c52debf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 02:46:03 -0700 Subject: [PATCH 0397/2658] chore(deps-dev): bump the eslint group with 2 updates (#18789) Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint). Updates `@eslint/js` from 9.23.0 to 9.24.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.24.0/packages/js) Updates `eslint` from 9.23.0 to 9.24.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.23.0...v9.24.0) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-version: 9.24.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint - dependency-name: eslint dependency-version: 9.24.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 175 +++++++++++++++++++++++++++---------------------- 2 files changed, 98 insertions(+), 81 deletions(-) diff --git a/package.json b/package.json index e59124f1c5ba..44b0e065883a 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "@babel/preset-typescript": "7.27.0", "@bbob/types": "4.2.0", "@eslint/eslintrc": "3.3.1", - "@eslint/js": "9.23.0", + "@eslint/js": "9.24.0", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "4.2.0", "@types/aes-js": "3.1.4", @@ -173,7 +173,7 @@ "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.37.119", - "eslint": "9.23.0", + "eslint": "9.24.0", "eslint-config-prettier": "10.1.1", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.17.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 10b368e156cb..600314e7f1c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -292,14 +292,14 @@ importers: specifier: 3.3.1 version: 3.3.1 '@eslint/js': - specifier: 9.23.0 - version: 9.23.0 + specifier: 9.24.0 + version: 9.24.0 '@microsoft/eslint-formatter-sarif': specifier: 3.1.0 version: 3.1.0 '@stylistic/eslint-plugin': specifier: 4.2.0 - version: 4.2.0(eslint@9.23.0)(typescript@5.8.3) + version: 4.2.0(eslint@9.24.0)(typescript@5.8.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -368,10 +368,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.29.0 - version: 8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.3))(eslint@9.23.0)(typescript@5.8.3) + version: 8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3) '@typescript-eslint/parser': specifier: 8.29.0 - version: 8.29.0(eslint@9.23.0)(typescript@5.8.3) + version: 8.29.0(eslint@9.24.0)(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -382,26 +382,26 @@ importers: specifier: 0.37.119 version: 0.37.119 eslint: - specifier: 9.23.0 - version: 9.23.0 + specifier: 9.24.0 + version: 9.24.0 eslint-config-prettier: specifier: 10.1.1 - version: 10.1.1(eslint@9.23.0) + version: 10.1.1(eslint@9.24.0) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.23.0) + version: 8.1.0(eslint@9.24.0) eslint-plugin-n: specifier: 17.17.0 - version: 17.17.0(eslint@9.23.0) + version: 17.17.0(eslint@9.24.0) eslint-plugin-prettier: specifier: 5.2.6 - version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.1(eslint@9.23.0))(eslint@9.23.0)(prettier@3.5.3) + version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.1(eslint@9.24.0))(eslint@9.24.0)(prettier@3.5.3) eslint-plugin-unicorn: specifier: 58.0.0 - version: 58.0.0(eslint@9.23.0) + version: 58.0.0(eslint@9.24.0) eslint-plugin-yml: specifier: 1.17.0 - version: 1.17.0(eslint@9.23.0) + version: 1.17.0(eslint@9.24.0) fs-extra: specifier: 11.3.0 version: 11.3.0 @@ -1357,18 +1357,22 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.19.2': - resolution: {integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==} + '@eslint/config-array@0.20.0': + resolution: {integrity: sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/config-helpers@0.2.0': - resolution: {integrity: sha512-yJLLmLexii32mGrhW29qvU3QBVTu0GUmEf/J4XsBtVhp4JkIUFN/BjWqTF63yRvGApIDpZm5fa97LtYtINmfeQ==} + '@eslint/config-helpers@0.2.1': + resolution: {integrity: sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/core@0.12.0': resolution: {integrity: sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@0.13.0': + resolution: {integrity: sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1381,8 +1385,8 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.23.0': - resolution: {integrity: sha512-35MJ8vCPU0ZMxo7zfev2pypqTwWTofFZO6m4KAtdoFhRpLJUpHTZZ+KB3C7Hb1d7bULYwO4lJXGCi5Se+8OMbw==} + '@eslint/js@9.24.0': + resolution: {integrity: sha512-uIY/y3z0uvOGX8cp1C2fiC4+ZmBhp6yZWkojtHL1YEMnRt1Y63HB9TM17proGEmeG7HeUY+UP36F0aknKYTpYA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.6': @@ -1393,6 +1397,10 @@ packages: resolution: {integrity: sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/plugin-kit@0.2.8': + resolution: {integrity: sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@hono/node-server@1.14.0': resolution: {integrity: sha512-YUCxJwgHRKSqjrdTk9e4VMGKN27MK5r4+MGPyZTgKH+IYbK+KtYbHeOcPGJ91KGGD6RIQiz2dAHxvjauNhOS8g==} engines: {node: '>=18.14.1'} @@ -3319,8 +3327,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.23.0: - resolution: {integrity: sha512-jV7AbNoFPAY1EkFYpLq5bslU9NLNO8xnEeQXwErNibVryjk67wHVmddTBilc5srIttJDBrB0eMHKZBFbSIABCw==} + eslint@9.24.0: + resolution: {integrity: sha512-eh/jxIEJyZrvbWRe4XuVclLPDYSYYYgLy5zXGGxD6j8zjSAxFEzI2fL/8xNq6O2yKqVt+eF2YhV+hxjV6UKXwQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -7010,14 +7018,14 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.5.1(eslint@9.23.0)': + '@eslint-community/eslint-utils@4.5.1(eslint@9.24.0)': dependencies: - eslint: 9.23.0 + eslint: 9.24.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.19.2': + '@eslint/config-array@0.20.0': dependencies: '@eslint/object-schema': 2.1.6 debug: 4.4.0 @@ -7025,12 +7033,16 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.2.0': {} + '@eslint/config-helpers@0.2.1': {} '@eslint/core@0.12.0': dependencies: '@types/json-schema': 7.0.15 + '@eslint/core@0.13.0': + dependencies: + '@types/json-schema': 7.0.15 + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 @@ -7061,7 +7073,7 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.23.0': {} + '@eslint/js@9.24.0': {} '@eslint/object-schema@2.1.6': {} @@ -7070,6 +7082,11 @@ snapshots: '@eslint/core': 0.12.0 levn: 0.4.1 + '@eslint/plugin-kit@0.2.8': + dependencies: + '@eslint/core': 0.13.0 + levn: 0.4.1 + '@hono/node-server@1.14.0(hono@4.7.5)': dependencies: hono: 4.7.5 @@ -7861,10 +7878,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@4.2.0(eslint@9.23.0)(typescript@5.8.3)': + '@stylistic/eslint-plugin@4.2.0(eslint@9.24.0)(typescript@5.8.3)': dependencies: - '@typescript-eslint/utils': 8.28.0(eslint@9.23.0)(typescript@5.8.3) - eslint: 9.23.0 + '@typescript-eslint/utils': 8.28.0(eslint@9.24.0)(typescript@5.8.3) + eslint: 9.24.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -8059,15 +8076,15 @@ snapshots: '@types/node': 22.14.0 optional: true - '@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.3))(eslint@9.23.0)(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.29.0(eslint@9.23.0)(typescript@5.8.3) + '@typescript-eslint/parser': 8.29.0(eslint@9.24.0)(typescript@5.8.3) '@typescript-eslint/scope-manager': 8.29.0 - '@typescript-eslint/type-utils': 8.29.0(eslint@9.23.0)(typescript@5.8.3) - '@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.3) + '@typescript-eslint/type-utils': 8.29.0(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.29.0(eslint@9.24.0)(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.29.0 - eslint: 9.23.0 + eslint: 9.24.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -8076,14 +8093,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.3)': + '@typescript-eslint/parser@8.29.0(eslint@9.24.0)(typescript@5.8.3)': dependencies: '@typescript-eslint/scope-manager': 8.29.0 '@typescript-eslint/types': 8.29.0 '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.29.0 debug: 4.4.0 - eslint: 9.23.0 + eslint: 9.24.0 typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -8098,12 +8115,12 @@ snapshots: '@typescript-eslint/types': 8.29.0 '@typescript-eslint/visitor-keys': 8.29.0 - '@typescript-eslint/type-utils@8.29.0(eslint@9.23.0)(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.29.0(eslint@9.24.0)(typescript@5.8.3)': dependencies: '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.29.0(eslint@9.24.0)(typescript@5.8.3) debug: 4.4.0 - eslint: 9.23.0 + eslint: 9.24.0 ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: @@ -8141,24 +8158,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.28.0(eslint@9.23.0)(typescript@5.8.3)': + '@typescript-eslint/utils@8.28.0(eslint@9.24.0)(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) '@typescript-eslint/scope-manager': 8.28.0 '@typescript-eslint/types': 8.28.0 '@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.3) - eslint: 9.23.0 + eslint: 9.24.0 typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.29.0(eslint@9.23.0)(typescript@5.8.3)': + '@typescript-eslint/utils@8.29.0(eslint@9.24.0)(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) '@typescript-eslint/scope-manager': 8.29.0 '@typescript-eslint/types': 8.29.0 '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3) - eslint: 9.23.0 + eslint: 9.24.0 typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -9119,23 +9136,23 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.23.0): + eslint-compat-utils@0.5.1(eslint@9.24.0): dependencies: - eslint: 9.23.0 + eslint: 9.24.0 semver: 7.7.1 - eslint-compat-utils@0.6.4(eslint@9.23.0): + eslint-compat-utils@0.6.4(eslint@9.24.0): dependencies: - eslint: 9.23.0 + eslint: 9.24.0 semver: 7.7.1 - eslint-config-prettier@10.1.1(eslint@9.23.0): + eslint-config-prettier@10.1.1(eslint@9.24.0): dependencies: - eslint: 9.23.0 + eslint: 9.24.0 - eslint-filtered-fix@0.3.0(eslint@9.23.0): + eslint-filtered-fix@0.3.0(eslint@9.24.0): dependencies: - eslint: 9.23.0 + eslint: 9.24.0 optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -9146,55 +9163,55 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.23.0): + eslint-nibble@8.1.0(eslint@9.24.0): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.23.0 - eslint-filtered-fix: 0.3.0(eslint@9.23.0) + eslint: 9.24.0 + eslint-filtered-fix: 0.3.0(eslint@9.24.0) eslint-formatter-friendly: 7.0.0 eslint-summary: 1.0.0 inquirer: 8.2.6 optionator: 0.9.4 - eslint-plugin-es-x@7.8.0(eslint@9.23.0): + eslint-plugin-es-x@7.8.0(eslint@9.24.0): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) '@eslint-community/regexpp': 4.12.1 - eslint: 9.23.0 - eslint-compat-utils: 0.5.1(eslint@9.23.0) + eslint: 9.24.0 + eslint-compat-utils: 0.5.1(eslint@9.24.0) - eslint-plugin-n@17.17.0(eslint@9.23.0): + eslint-plugin-n@17.17.0(eslint@9.24.0): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) enhanced-resolve: 5.18.1 - eslint: 9.23.0 - eslint-plugin-es-x: 7.8.0(eslint@9.23.0) + eslint: 9.24.0 + eslint-plugin-es-x: 7.8.0(eslint@9.24.0) get-tsconfig: 4.10.0 globals: 15.15.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.7.1 - eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.1(eslint@9.23.0))(eslint@9.23.0)(prettier@3.5.3): + eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.1(eslint@9.24.0))(eslint@9.24.0)(prettier@3.5.3): dependencies: - eslint: 9.23.0 + eslint: 9.24.0 prettier: 3.5.3 prettier-linter-helpers: 1.0.0 synckit: 0.11.1 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.1(eslint@9.23.0) + eslint-config-prettier: 10.1.1(eslint@9.24.0) - eslint-plugin-unicorn@58.0.0(eslint@9.23.0): + eslint-plugin-unicorn@58.0.0(eslint@9.24.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) '@eslint/plugin-kit': 0.2.7 ci-info: 4.2.0 clean-regexp: 1.0.0 core-js-compat: 3.41.0 - eslint: 9.23.0 + eslint: 9.24.0 esquery: 1.6.0 globals: 16.0.0 indent-string: 5.0.0 @@ -9207,12 +9224,12 @@ snapshots: semver: 7.7.1 strip-indent: 4.0.0 - eslint-plugin-yml@1.17.0(eslint@9.23.0): + eslint-plugin-yml@1.17.0(eslint@9.24.0): dependencies: debug: 4.4.0 escape-string-regexp: 4.0.0 - eslint: 9.23.0 - eslint-compat-utils: 0.6.4(eslint@9.23.0) + eslint: 9.24.0 + eslint-compat-utils: 0.6.4(eslint@9.24.0) natural-compare: 1.4.0 yaml-eslint-parser: 1.3.0 transitivePeerDependencies: @@ -9280,16 +9297,16 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.23.0: + eslint@9.24.0: dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.19.2 - '@eslint/config-helpers': 0.2.0 + '@eslint/config-array': 0.20.0 + '@eslint/config-helpers': 0.2.1 '@eslint/core': 0.12.0 '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.23.0 - '@eslint/plugin-kit': 0.2.7 + '@eslint/js': 9.24.0 + '@eslint/plugin-kit': 0.2.8 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.2 From 5de09288d95e14ee6a4545a41b6766334cf9ed70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 22:28:50 +0800 Subject: [PATCH 0398/2658] chore(deps): bump @scalar/hono-api-reference from 0.7.5 to 0.8.0 (#18790) * chore(deps): bump @scalar/hono-api-reference from 0.7.5 to 0.8.0 Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.7.5 to 0.8.0. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-version: 0.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * fix: update export name https://github.com/scalar/scalar/commit/81dddd3571d964f17820f503b48707db365d9cb3 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/api/index.ts | 4 ++-- package.json | 2 +- pnpm-lock.yaml | 26 +++++++++++++------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/api/index.ts b/lib/api/index.ts index a6eb4629589c..6286a455b9a0 100644 --- a/lib/api/index.ts +++ b/lib/api/index.ts @@ -6,7 +6,7 @@ import { route as radarRulesOneRoute, handler as radarRulesOneHandler } from '@/ import { route as categoryOneRoute, handler as categoryOneHandler } from '@/api/category/one'; import { route as followConfigRoute, handler as followConfigHandler } from '@/api/follow/config'; import { OpenAPIHono } from '@hono/zod-openapi'; -import { apiReference } from '@scalar/hono-api-reference'; +import { Scalar } from '@scalar/hono-api-reference'; const app = new OpenAPIHono(); @@ -29,6 +29,6 @@ for (const path in docs.paths) { delete docs.paths[path]; } app.get('/openapi.json', (ctx) => ctx.json(docs)); -app.get('/reference', apiReference({ content: docs })); +app.get('/reference', Scalar({ content: docs })); export default app; diff --git a/package.json b/package.json index 44b0e065883a..2fb6ff93166c 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.30.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.7.5", + "@scalar/hono-api-reference": "0.8.0", "@sentry/node": "9.11.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 600314e7f1c3..527fc5a37040 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.7.5 - version: 0.7.5(hono@4.7.5) + specifier: 0.8.0 + version: 0.8.0(hono@4.7.5) '@sentry/node': specifier: 9.11.0 version: 9.11.0 @@ -2042,12 +2042,12 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/core@0.2.5': - resolution: {integrity: sha512-fxlHO2loobkII66M8dzLMBdBO66IZkywFzXXbOErn2jKDrNCS7LiNiUeuW4W1i1weXIM+VmYYMS9ObRVil3HPw==} + '@scalar/core@0.2.6': + resolution: {integrity: sha512-if8qr0McLFijNvKl3Vtv9CPrMsjijbxbDSlgXErr6Y45h8KsM2kVaVf0pzirh3daBD3y+Yl0sqtTVkpAelsoSw==} engines: {node: '>=18'} - '@scalar/hono-api-reference@0.7.5': - resolution: {integrity: sha512-2ZgGStAqi6+ZhoCNIyYfKljKquV3DMrlHPofXXC/SXQFRsmMXGMcfTV67UaJ1eZjW4R+4ld5+Tv86u1hZAYnyg==} + '@scalar/hono-api-reference@0.8.0': + resolution: {integrity: sha512-qpDeEj4YeB6+CJHt/ddj1KzDAYZfOmiD3QxOg0/t8IeWB1t4QImYySaWWzxIk9IoZpnOmaH2kq43GA/cfJ2Wfg==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -2056,8 +2056,8 @@ packages: resolution: {integrity: sha512-waiKk12cRCqyUCWTOX0K1WEVX46+hVUK+zRPzAahDJ7G0TApvbNkuy5wx7aoUyEk++HHde0XuQnshXnt8jsddA==} engines: {node: '>=18'} - '@scalar/types@0.1.5': - resolution: {integrity: sha512-xlzatZ703JuxZOiU8eudaz/PbcgRqtBBmpIjpd2fjU50riuu1G4jbQEEMkQajaz11LhGpb4bgrNI0YvE6+Cx4g==} + '@scalar/types@0.1.6': + resolution: {integrity: sha512-4GQ9VwyZm5WiOsinCIioGfByQWI+K8cY/jce9EoaJ906mXOyHfwp6lQF/ddnEJ4ptkflKkGdEQ6jm+6PnwlB5w==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7795,20 +7795,20 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/core@0.2.5': + '@scalar/core@0.2.6': dependencies: - '@scalar/types': 0.1.5 + '@scalar/types': 0.1.6 - '@scalar/hono-api-reference@0.7.5(hono@4.7.5)': + '@scalar/hono-api-reference@0.8.0(hono@4.7.5)': dependencies: - '@scalar/core': 0.2.5 + '@scalar/core': 0.2.6 hono: 4.7.5 '@scalar/openapi-types@0.2.0': dependencies: zod: 3.24.2 - '@scalar/types@0.1.5': + '@scalar/types@0.1.6': dependencies: '@scalar/openapi-types': 0.2.0 '@unhead/schema': 1.11.20 From 75c74aff948f964da82b55b1df412b3467d2129a Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Tue, 8 Apr 2025 00:14:21 +0800 Subject: [PATCH 0399/2658] feat(route): add 199IT (#18788) * feat(route): add 199IT * update lib/routes/199it/index.ts Co-authored-by: Tony --------- --- lib/routes/199it/index.ts | 334 +++++++++++++++++++++ lib/routes/199it/templates/description.art | 20 ++ 2 files changed, 354 insertions(+) create mode 100644 lib/routes/199it/index.ts create mode 100644 lib/routes/199it/templates/description.art diff --git a/lib/routes/199it/index.ts b/lib/routes/199it/index.ts new file mode 100644 index 000000000000..be2d8c42496d --- /dev/null +++ b/lib/routes/199it/index.ts @@ -0,0 +1,334 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import { art } from '@/utils/render'; +import cache from '@/utils/cache'; +import { getCurrentPath } from '@/utils/helpers'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; +import path from 'node:path'; + +const __dirname = getCurrentPath(import.meta.url); + +export const handler = async (ctx: Context): Promise => { + const { category = 'newly' } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const baseUrl: string = 'https://www.199it.com'; + const targetUrl: string = new URL(category, baseUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language = $('html').attr('lang') ?? 'zh-CN'; + + let items: DataItem[] = []; + + items = $('article.newsplus') + .slice(0, limit) + .toArray() + .map((el): Element => { + const $el: Cheerio = $(el); + + const title: string = $el.find('h2.entry-title').text(); + const pubDateStr: string | undefined = $el.find('time.entry-date').attr('datetime'); + const linkUrl: string | undefined = $el.find('h2.entry-title a').attr('href'); + const categoryEls: Element[] = $el.find('ul.post-categories li:not(submenu-parent)').toArray(); + const categories: string[] = [...new Set(categoryEls.map((el) => $(el).text()).filter(Boolean))]; + const image: string | undefined = $el.find('img.attachment-post-thumbnail').attr('src'); + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + pubDate: pubDateStr ? parseDate(pubDateStr) : undefined, + link: linkUrl ? new URL(linkUrl, baseUrl).href : undefined, + category: categories, + image, + banner: image, + updated: upDatedStr ? parseDate(upDatedStr) : undefined, + language, + }; + + return processedItem; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async (): Promise => { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + $$('div.entry-content img.alignnone').each((_, el) => { + const $el: Cheerio = $$(el); + + $el.replaceWith( + art(path.join(__dirname, 'templates/description.art'), { + images: $el.attr('src') + ? [ + { + src: $el.attr('src'), + width: $el.attr('width'), + height: $el.attr('height'), + }, + ] + : undefined, + }) + ); + }); + + const title: string = $$('h1.entry-title').text(); + const pubDateStr: string | undefined = $$('time.entry-date').attr('datetime'); + const categoryEls: Element[] = $$('ul.post-categories li').toArray(); + const categories: string[] = [...new Set(categoryEls.map((el) => $$(el).text()).filter(Boolean))]; + const upDatedStr: string | undefined = pubDateStr; + + let processedItem: DataItem = { + title, + pubDate: pubDateStr ? parseDate(pubDateStr) : item.pubDate, + category: categories, + updated: upDatedStr ? parseDate(upDatedStr) : item.updated, + language, + }; + + const extraLinkEls: Element[] = $$('ul.related_post li a').toArray(); + const extraLinks = extraLinkEls + .map((extraLinkEl) => { + const $$extraLinkEl: Cheerio = $$(extraLinkEl); + + return { + url: $$extraLinkEl.attr('href'), + type: 'related', + content_html: $$extraLinkEl.text(), + }; + }) + .filter((_): _ is { url: string; type: string; content_html: string } => true); + + if (extraLinks) { + processedItem = { + ...processedItem, + _extra: { + links: extraLinks, + }, + }; + } + + $$('ul.related_post').parent().remove(); + + const description: string | undefined = $$('div.entry-content').html(); + + processedItem = { + ...processedItem, + description, + content: { + html: description, + text: description, + }, + }; + + return { + ...item, + ...processedItem, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + const title: string = $('title').text(); + + return { + title, + description: $('meta[name="description"]').attr('content'), + link: targetUrl, + item: items, + allowEmpty: true, + image: $('h3.site-title img').attr('src'), + author: title.split(/-/).pop()?.trim(), + language, + id: targetUrl, + }; +}; + +export const route: Route = { + path: '/:category{.+}?', + name: '资讯', + url: '199it.com', + maintainers: ['nczitzk'], + handler, + example: '/199it/newly', + parameters: { + category: { + description: '分类,默认为 `newly`,即最新,可在对应分类页 URL 中找到', + options: [ + { + label: '最新', + value: 'newly', + }, + { + label: '报告', + value: 'archives/category/report', + }, + { + label: '新兴产业', + value: 'archives/category/emerging', + }, + { + label: '金融科技', + value: 'archives/category/fintech', + }, + { + label: '共享经济', + value: 'archives/category/sharingeconomy', + }, + { + label: '移动互联网', + value: 'archives/category/mobile-internet', + }, + { + label: '电子商务', + value: 'archives/category/electronic-commerce', + }, + { + label: '社交网络', + value: 'archives/category/social-network', + }, + { + label: '网络广告', + value: 'archives/category/advertising', + }, + { + label: '投资&经济,互联网金融', + value: 'archives/category/economic-data', + }, + { + label: '服务', + value: 'archives/category/service', + }, + { + label: '网络服务行业', + value: 'archives/category/dataindustry', + }, + { + label: '用户研究', + value: 'archives/category/internet-users', + }, + ], + }, + }, + description: `:::tip +若订阅 [研究报告](https://www.199it.com/archives/category/report),网址为 \`https://www.199it.com/archives/category/report\`,请截取 \`https://www.199it.com/archives/category/report\` 到末尾的部分 \`archives/category/report\` 作为 \`category\` 参数填入,此时目标路由为 [\`/199it/archives/category/report\`](https://rsshub.app/199it/archives/category/report)。 +::: + +
+ 更多分类 + +| 分类 | ID | +| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| [报告](http://www.199it.com/archives/category/report) | [archives/category/report](https://rsshub.app/199it/archives/category/report) | +| [新兴产业](http://www.199it.com/archives/category/emerging) | [archives/category/emerging](https://rsshub.app/199it/archives/category/emerging) | +| [金融科技](http://www.199it.com/archives/category/fintech) | [archives/category/fintech](https://rsshub.app/199it/archives/category/fintech) | +| [共享经济](http://www.199it.com/archives/category/sharingeconomy) | [archives/category/sharingeconomy](https://rsshub.app/199it/archives/category/sharingeconomy) | +| [移动互联网](http://www.199it.com/archives/category/mobile-internet) | [archives/category/mobile-internet](https://rsshub.app/199it/archives/category/mobile-internet) | +| [电子商务](http://www.199it.com/archives/category/electronic-commerce) | [archives/category/electronic-commerce](https://rsshub.app/199it/archives/category/electronic-commerce) | +| [社交网络](http://www.199it.com/archives/category/social-network) | [archives/category/social-network](https://rsshub.app/199it/archives/category/social-network) | +| [网络广告](http://www.199it.com/archives/category/advertising) | [archives/category/advertising](https://rsshub.app/199it/archives/category/advertising) | +| [投资&经济,互联网金融](http://www.199it.com/archives/category/economic-data) | [archives/category/economic-data](https://rsshub.app/199it/archives/category/economic-data) | +| [服务](http://www.199it.com/archives/category/service) | [archives/category/service](https://rsshub.app/199it/archives/category/service) | +| [网络服务行业](http://www.199it.com/archives/category/dataindustry) | [archives/category/dataindustry](https://rsshub.app/199it/archives/category/dataindustry) | +| [用户研究](http://www.199it.com/archives/category/internet-users) | [archives/category/internet-users](https://rsshub.app/199it/archives/category/internet-users) | + +
+`, + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.199it.com/:category'], + target: (params) => { + const category: string = params.category; + + return `/199it${category ? `/${category}` : ''}`; + }, + }, + { + title: '最新', + source: ['www.199it.com/newly'], + target: '/newly', + }, + { + title: '报告', + source: ['www.199it.com/archives/category/report'], + target: '/archives/category/report', + }, + { + title: '新兴产业', + source: ['www.199it.com/archives/category/emerging'], + target: '/archives/category/emerging', + }, + { + title: '金融科技', + source: ['www.199it.com/archives/category/fintech'], + target: '/archives/category/fintech', + }, + { + title: '共享经济', + source: ['www.199it.com/archives/category/sharingeconomy'], + target: '/archives/category/sharingeconomy', + }, + { + title: '移动互联网', + source: ['www.199it.com/archives/category/mobile-internet'], + target: '/archives/category/mobile-internet', + }, + { + title: '电子商务', + source: ['www.199it.com/archives/category/electronic-commerce'], + target: '/archives/category/electronic-commerce', + }, + { + title: '社交网络', + source: ['www.199it.com/archives/category/social-network'], + target: '/archives/category/social-network', + }, + { + title: '网络广告', + source: ['www.199it.com/archives/category/advertising'], + target: '/archives/category/advertising', + }, + { + title: '投资&经济,互联网金融', + source: ['www.199it.com/archives/category/economic-data'], + target: '/archives/category/economic-data', + }, + { + title: '服务', + source: ['www.199it.com/archives/category/service'], + target: '/archives/category/service', + }, + { + title: '网络服务行业', + source: ['www.199it.com/archives/category/dataindustry'], + target: '/archives/category/dataindustry', + }, + { + title: '用户研究', + source: ['www.199it.com/archives/category/internet-users'], + target: '/archives/category/internet-users', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/199it/templates/description.art b/lib/routes/199it/templates/description.art new file mode 100644 index 000000000000..f1aec25c545f --- /dev/null +++ b/lib/routes/199it/templates/description.art @@ -0,0 +1,20 @@ +{{ if images }} + {{ each images image }} + {{ if image?.src }} +
+ +
+ {{ /if }} + {{ /each }} +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From 6dd5106441d3d56c0f49f4efdb9376f81c52ef99 Mon Sep 17 00:00:00 2001 From: uuwor <155626094+uuwor@users.noreply.github.com> Date: Tue, 8 Apr 2025 01:13:46 +0800 Subject: [PATCH 0400/2658] feat(route): A new routing (cdrw.ts) has been created (#18786) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 为jwgg.ts添加了部分注释;新建了路由tzggcdunews.ts * Update jwgg.ts Indentation has been added after the comments '//' or '/*' * Update tzggcdunews.ts Indentation has been added after the comments '//' or '/*' * Update jwgg.ts Adjusted Code format * Update jwgg.ts 完整的 URL:在 url 字段中添加了协议部分(https://)。 选择器修正:直接在 title 中查找 标签而不是 tr.odd a,这减少了选择器的复杂度。 日期匹配检查:加入了对 dateMatch 的检查,以防止运行时错误。 使用模板字符串:在构建 link 时使用模板字符串,使代码更易读。 过滤无发布日期的项目:在返回结果时,过滤掉那些没有发布日期的项,以确保输出的数据质量。 * 重写tzggcdunews.ts;还原jwgg.ts * Update lib/routes/cdu/tzggcdunews.ts * Create news.ts 成大新闻 * Update news.ts 主要修复点 列表项选择器修正: 原代码使用$('a[title]')选择器不够精确 改为使用$('ul.ul-mzw-litpic-a2 li a.con')更精确地定位新闻条目 日期解析改进: 保持原有的两种日期格式处理逻辑 确保日期解析正确并转换为UTC+8时区 链接处理: 正确处理相对路径链接,使用new URL(link, rootUrl).href构建完整URL 标题提取: 从.tit元素中提取标题,而不是依赖title属性 详情页内容提取: 使用.v_news_content选择器获取正文内容 移除页脚等无关元素 RSS标题生成: 从页面标题和分类标题组合生成更有意义的RSS标题 错误处理: 添加了适当的错误处理逻辑,确保在元素不存在时不会报错 * Update news.ts 路由索引 * Create cdrw.ts 增添成大人物订阅 * Delete lib/routes/cdu/news.ts DELETE NEWS.TS --- lib/routes/cdu/cdrw.ts | 80 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 lib/routes/cdu/cdrw.ts diff --git a/lib/routes/cdu/cdrw.ts b/lib/routes/cdu/cdrw.ts new file mode 100644 index 000000000000..912a746b66be --- /dev/null +++ b/lib/routes/cdu/cdrw.ts @@ -0,0 +1,80 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +export const route: Route = { + path: '/cdrw', + categories: ['university'], + example: '/cdu/cdrw', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['news.cdu.edu.cn/'], + }, + ], + name: '成大人物', + maintainers: ['uuwor'], + handler, + url: 'news.cdu.edu.cn/', +}; + +async function handler() { + const baseUrl = 'https://news.cdu.edu.cn'; + const url = `${baseUrl}/cdrw.htm`; + const response = await got.get(url); + const $ = load(response.data); + + const list = $('.row-f1 ul.ul-mzw-news-a2 li a.con') + .slice(0, 10) + .toArray() + .map((item) => { + const element = $(item); + // 优先使用title属性内容,避免内容被截断 + const title = element.attr('title') || element.find('.tit').text().trim(); + const link = element.attr('href'); + const dateText = element.find('.date').text().trim(); + const pubDate = timezone(parseDate(dateText), 8); + + return { + title, + // 处理相对路径链接 + link: link.startsWith('http') ? link : new URL(link, baseUrl).href, + pubDate, + author: '成都大学新闻网', + }; + }); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const response = await got.get(item.link); + const $ = load(response.data); + + // 清理无关内容并提取正文 + const content = $('.v_news_content'); + // 移除版权声明等无关元素 + content.find('*[style*="text-align: right"]').remove(); + + item.description = content.html(); + return item; + }) + ) + ); + + return { + title: '人物', + link: url, + item: items, + }; +} From cae077a0e43c23562362fdf31bf110bb44b35896 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 01:37:22 +0800 Subject: [PATCH 0401/2658] chore(deps): bump rate-limiter-flexible from 6.2.1 to 7.0.0 (#18791) Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 6.2.1 to 7.0.0. - [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases) - [Commits](https://github.com/animir/node-rate-limiter-flexible/compare/v6.2.1...v7.0.0) --- updated-dependencies: - dependency-name: rate-limiter-flexible dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2fb6ff93166c..c88fa9e1314c 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "puppeteer-extra-plugin-user-data-dir": "2.4.1", "puppeteer-extra-plugin-user-preferences": "2.4.1", "query-string": "9.1.1", - "rate-limiter-flexible": "6.2.1", + "rate-limiter-flexible": "7.0.0", "re2js": "1.1.0", "rfc4648": "1.5.4", "rss-parser": "3.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 527fc5a37040..56211d894e49 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -213,8 +213,8 @@ importers: specifier: 9.1.1 version: 9.1.1 rate-limiter-flexible: - specifier: 6.2.1 - version: 6.2.1 + specifier: 7.0.0 + version: 7.0.0 re2js: specifier: 1.1.0 version: 1.1.0 @@ -5037,8 +5037,8 @@ packages: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} - rate-limiter-flexible@6.2.1: - resolution: {integrity: sha512-d9AN+d/wwKW3/yHAL0G3zKpWZQFe55VjRGIFK9VG1w3CSOkcRqRqh0NhCiIXvgKhihNZPjGfISuN3it07NjPbw==} + rate-limiter-flexible@7.0.0: + resolution: {integrity: sha512-K1Y7WTh6m/MpgifDkBzexI0PfPYd+LaXRl+Aqq+LkKKIb68KLJxd/cp+Fw3iU1T0h3oQ9TwbR0m2/ksU70ML+g==} re2js@1.1.0: resolution: {integrity: sha512-ovDCIb2ZQR7Do3NzH2XEuXOzqd1q8srvkeaOVMf+EZNt1Z4JoUVvNKCR9qf8EbqoPhvLknkoyiiBzoQtmuzIbQ==} @@ -11235,7 +11235,7 @@ snapshots: quick-lru@5.1.1: {} - rate-limiter-flexible@6.2.1: {} + rate-limiter-flexible@7.0.0: {} re2js@1.1.0: {} From 3bf59cfd667fff38e73c81705718a2369c9221f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 09:03:35 +0000 Subject: [PATCH 0402/2658] chore(deps-dev): bump the typescript-eslint group with 2 updates (#18796) Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.29.0 to 8.29.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.29.1/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.29.0 to 8.29.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.29.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.29.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-version: 8.29.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +-- pnpm-lock.yaml | 94 +++++++++++++++++++++++++------------------------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index c88fa9e1314c..8c3befca7b7c 100644 --- a/package.json +++ b/package.json @@ -168,8 +168,8 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.29.0", - "@typescript-eslint/parser": "8.29.0", + "@typescript-eslint/eslint-plugin": "8.29.1", + "@typescript-eslint/parser": "8.29.1", "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.37.119", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 56211d894e49..119725db0e33 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -367,11 +367,11 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.29.0 - version: 8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3) + specifier: 8.29.1 + version: 8.29.1(@typescript-eslint/parser@8.29.1(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3) '@typescript-eslint/parser': - specifier: 8.29.0 - version: 8.29.0(eslint@9.24.0)(typescript@5.8.3) + specifier: 8.29.1 + version: 8.29.1(eslint@9.24.0)(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -2278,16 +2278,16 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.29.0': - resolution: {integrity: sha512-PAIpk/U7NIS6H7TEtN45SPGLQaHNgB7wSjsQV/8+KYokAb2T/gloOA/Bee2yd4/yKVhPKe5LlaUGhAZk5zmSaQ==} + '@typescript-eslint/eslint-plugin@8.29.1': + resolution: {integrity: sha512-ba0rr4Wfvg23vERs3eB+P3lfj2E+2g3lhWcCVukUuhtcdUx5lSIFZlGFEBHKr+3zizDa/TvZTptdNHVZWAkSBg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@8.29.0': - resolution: {integrity: sha512-8C0+jlNJOwQso2GapCVWWfW/rzaq7Lbme+vGUFKE31djwNncIpgXD7Cd4weEsDdkoZDjH0lwwr3QDQFuyrMg9g==} + '@typescript-eslint/parser@8.29.1': + resolution: {integrity: sha512-zczrHVEqEaTwh12gWBIJWj8nx+ayDcCJs06yoNMY0kwjMWDM6+kppljY+BxWI06d2Ja+h4+WdufDcwMnnMEWmg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2297,12 +2297,12 @@ packages: resolution: {integrity: sha512-u2oITX3BJwzWCapoZ/pXw6BCOl8rJP4Ij/3wPoGvY8XwvXflOzd1kLrDUUUAIEdJSFh+ASwdTHqtan9xSg8buw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.29.0': - resolution: {integrity: sha512-aO1PVsq7Gm+tcghabUpzEnVSFMCU4/nYIgC2GOatJcllvWfnhrgW0ZEbnTxm36QsikmCN1K/6ZgM7fok2I7xNw==} + '@typescript-eslint/scope-manager@8.29.1': + resolution: {integrity: sha512-2nggXGX5F3YrsGN08pw4XpMLO1Rgtnn4AzTegC2MDesv6q3QaTU5yU7IbS1tf1IwCR0Hv/1EFygLn9ms6LIpDA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.29.0': - resolution: {integrity: sha512-ahaWQ42JAOx+NKEf5++WC/ua17q5l+j1GFrbbpVKzFL/tKVc0aYY8rVSYUpUvt2hUP1YBr7mwXzx+E/DfUWI9Q==} + '@typescript-eslint/type-utils@8.29.1': + resolution: {integrity: sha512-DkDUSDwZVCYN71xA4wzySqqcZsHKic53A4BLqmrWFFpOpNSoxX233lwGu/2135ymTCR04PoKiEEEvN1gFYg4Tw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2312,8 +2312,8 @@ packages: resolution: {integrity: sha512-bn4WS1bkKEjx7HqiwG2JNB3YJdC1q6Ue7GyGlwPHyt0TnVq6TtD/hiOdTZt71sq0s7UzqBFXD8t8o2e63tXgwA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.29.0': - resolution: {integrity: sha512-wcJL/+cOXV+RE3gjCyl/V2G877+2faqvlgtso/ZRbTCnZazh0gXhe+7gbAnfubzN2bNsBtZjDvlh7ero8uIbzg==} + '@typescript-eslint/types@8.29.1': + resolution: {integrity: sha512-VT7T1PuJF1hpYC3AGm2rCgJBjHL3nc+A/bhOp9sGMKfi5v0WufsX/sHCFBfNTx2F+zA6qBc/PD0/kLRLjdt8mQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@8.28.0': @@ -2322,8 +2322,8 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/typescript-estree@8.29.0': - resolution: {integrity: sha512-yOfen3jE9ISZR/hHpU/bmNvTtBW1NjRbkSFdZOksL1N+ybPEE7UVGMwqvS6CP022Rp00Sb0tdiIkhSCe6NI8ow==} + '@typescript-eslint/typescript-estree@8.29.1': + resolution: {integrity: sha512-l1enRoSaUkQxOQnbi0KPUtqeZkSiFlqrx9/3ns2rEDhGKfTa+88RmXqedC1zmVTOWrLc2e6DEJrTA51C9iLH5g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' @@ -2335,8 +2335,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.29.0': - resolution: {integrity: sha512-gX/A0Mz9Bskm8avSWFcK0gP7cZpbY4AIo6B0hWYFCaIsz750oaiWR4Jr2CI+PQhfW1CpcQr9OlfPS+kMFegjXA==} + '@typescript-eslint/utils@8.29.1': + resolution: {integrity: sha512-QAkFEbytSaB8wnmB+DflhUPz6CLbFWE2SnSCrRMEa+KnXIzDYbpsn++1HGvnfAsUY44doDXmvRkO5shlM/3UfA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2346,8 +2346,8 @@ packages: resolution: {integrity: sha512-hbn8SZ8w4u2pRwgQ1GlUrPKE+t2XvcCW5tTRF7j6SMYIuYG37XuzIW44JCZPa36evi0Oy2SnM664BlIaAuQcvg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.29.0': - resolution: {integrity: sha512-Sne/pVz8ryR03NFK21VpN88dZ2FdQXOlq3VIklbrTYEt8yXtRFr9tvUhqvCeKjqYk5FSim37sHbooT6vzBTZcg==} + '@typescript-eslint/visitor-keys@8.29.1': + resolution: {integrity: sha512-RGLh5CRaUEf02viP5c1Vh1cMGffQscyHe7HPAzGpfmfflFg1wUz2rYxd+OZqwpeypYvZ8UxSxuIpF++fmOzEcg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.3.0': @@ -8076,14 +8076,14 @@ snapshots: '@types/node': 22.14.0 optional: true - '@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.29.1(@typescript-eslint/parser@8.29.1(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.29.0(eslint@9.24.0)(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.29.0 - '@typescript-eslint/type-utils': 8.29.0(eslint@9.24.0)(typescript@5.8.3) - '@typescript-eslint/utils': 8.29.0(eslint@9.24.0)(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.29.0 + '@typescript-eslint/parser': 8.29.1(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.29.1 + '@typescript-eslint/type-utils': 8.29.1(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.29.1(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.29.1 eslint: 9.24.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -8093,12 +8093,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.29.0(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/parser@8.29.1(eslint@9.24.0)(typescript@5.8.3)': dependencies: - '@typescript-eslint/scope-manager': 8.29.0 - '@typescript-eslint/types': 8.29.0 - '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.29.0 + '@typescript-eslint/scope-manager': 8.29.1 + '@typescript-eslint/types': 8.29.1 + '@typescript-eslint/typescript-estree': 8.29.1(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.29.1 debug: 4.4.0 eslint: 9.24.0 typescript: 5.8.3 @@ -8110,15 +8110,15 @@ snapshots: '@typescript-eslint/types': 8.28.0 '@typescript-eslint/visitor-keys': 8.28.0 - '@typescript-eslint/scope-manager@8.29.0': + '@typescript-eslint/scope-manager@8.29.1': dependencies: - '@typescript-eslint/types': 8.29.0 - '@typescript-eslint/visitor-keys': 8.29.0 + '@typescript-eslint/types': 8.29.1 + '@typescript-eslint/visitor-keys': 8.29.1 - '@typescript-eslint/type-utils@8.29.0(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.29.1(eslint@9.24.0)(typescript@5.8.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.29.0(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.29.1(typescript@5.8.3) + '@typescript-eslint/utils': 8.29.1(eslint@9.24.0)(typescript@5.8.3) debug: 4.4.0 eslint: 9.24.0 ts-api-utils: 2.1.0(typescript@5.8.3) @@ -8128,7 +8128,7 @@ snapshots: '@typescript-eslint/types@8.28.0': {} - '@typescript-eslint/types@8.29.0': {} + '@typescript-eslint/types@8.29.1': {} '@typescript-eslint/typescript-estree@8.28.0(typescript@5.8.3)': dependencies: @@ -8144,10 +8144,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.29.0(typescript@5.8.3)': + '@typescript-eslint/typescript-estree@8.29.1(typescript@5.8.3)': dependencies: - '@typescript-eslint/types': 8.29.0 - '@typescript-eslint/visitor-keys': 8.29.0 + '@typescript-eslint/types': 8.29.1 + '@typescript-eslint/visitor-keys': 8.29.1 debug: 4.4.0 fast-glob: 3.3.3 is-glob: 4.0.3 @@ -8169,12 +8169,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.29.0(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/utils@8.29.1(eslint@9.24.0)(typescript@5.8.3)': dependencies: '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) - '@typescript-eslint/scope-manager': 8.29.0 - '@typescript-eslint/types': 8.29.0 - '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.29.1 + '@typescript-eslint/types': 8.29.1 + '@typescript-eslint/typescript-estree': 8.29.1(typescript@5.8.3) eslint: 9.24.0 typescript: 5.8.3 transitivePeerDependencies: @@ -8185,9 +8185,9 @@ snapshots: '@typescript-eslint/types': 8.28.0 eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.29.0': + '@typescript-eslint/visitor-keys@8.29.1': dependencies: - '@typescript-eslint/types': 8.29.0 + '@typescript-eslint/types': 8.29.1 eslint-visitor-keys: 4.2.0 '@ungap/structured-clone@1.3.0': {} From ee3b956d33854dcab5ae0fb2e8a0a4551f453343 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 09:06:50 +0000 Subject: [PATCH 0403/2658] chore(deps): bump hono from 4.7.5 to 4.7.6 (#18798) Bumps [hono](https://github.com/honojs/hono) from 4.7.5 to 4.7.6. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.7.5...v4.7.6) --- updated-dependencies: - dependency-name: hono dependency-version: 4.7.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 8c3befca7b7c..320fac6b9ea1 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "fanfou-sdk": "5.0.0", "form-data": "4.0.2", "googleapis": "148.0.0", - "hono": "4.7.5", + "hono": "4.7.6", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.8", "https-proxy-agent": "7.0.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 119725db0e33..12788a569279 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,10 +25,10 @@ importers: version: 4.2.0 '@hono/node-server': specifier: 1.14.0 - version: 1.14.0(hono@4.7.5) + version: 1.14.0(hono@4.7.6) '@hono/zod-openapi': specifier: 0.19.2 - version: 0.19.2(hono@4.7.5)(zod@3.24.2) + version: 0.19.2(hono@4.7.6)(zod@3.24.2) '@notionhq/client': specifier: 2.3.0 version: 2.3.0 @@ -61,7 +61,7 @@ importers: version: 0.0.25 '@scalar/hono-api-reference': specifier: 0.8.0 - version: 0.8.0(hono@4.7.5) + version: 0.8.0(hono@4.7.6) '@sentry/node': specifier: 9.11.0 version: 9.11.0 @@ -120,8 +120,8 @@ importers: specifier: 148.0.0 version: 148.0.0 hono: - specifier: 4.7.5 - version: 4.7.5 + specifier: 4.7.6 + version: 4.7.6 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3727,8 +3727,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.7.5: - resolution: {integrity: sha512-fDOK5W2C1vZACsgLONigdZTRZxuBqFtcKh7bUQ5cVSbwI2RWjloJDcgFOVzbQrlI6pCmhlTsVYZ7zpLj4m4qMQ==} + hono@4.7.6: + resolution: {integrity: sha512-564rVzELU+9BRqqx5k8sT2NFwGD3I3Vifdb6P7CmM6FiarOSY+fDC+6B+k9wcCb86ReoayteZP2ki0cRLN1jbw==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -7087,20 +7087,20 @@ snapshots: '@eslint/core': 0.13.0 levn: 0.4.1 - '@hono/node-server@1.14.0(hono@4.7.5)': + '@hono/node-server@1.14.0(hono@4.7.6)': dependencies: - hono: 4.7.5 + hono: 4.7.6 - '@hono/zod-openapi@0.19.2(hono@4.7.5)(zod@3.24.2)': + '@hono/zod-openapi@0.19.2(hono@4.7.6)(zod@3.24.2)': dependencies: '@asteasolutions/zod-to-openapi': 7.3.0(zod@3.24.2) - '@hono/zod-validator': 0.4.3(hono@4.7.5)(zod@3.24.2) - hono: 4.7.5 + '@hono/zod-validator': 0.4.3(hono@4.7.6)(zod@3.24.2) + hono: 4.7.6 zod: 3.24.2 - '@hono/zod-validator@0.4.3(hono@4.7.5)(zod@3.24.2)': + '@hono/zod-validator@0.4.3(hono@4.7.6)(zod@3.24.2)': dependencies: - hono: 4.7.5 + hono: 4.7.6 zod: 3.24.2 '@humanfs/core@0.19.1': {} @@ -7799,10 +7799,10 @@ snapshots: dependencies: '@scalar/types': 0.1.6 - '@scalar/hono-api-reference@0.8.0(hono@4.7.5)': + '@scalar/hono-api-reference@0.8.0(hono@4.7.6)': dependencies: '@scalar/core': 0.2.6 - hono: 4.7.5 + hono: 4.7.6 '@scalar/openapi-types@0.2.0': dependencies: @@ -9773,7 +9773,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.7.5: {} + hono@4.7.6: {} hookable@5.5.3: {} From 390099dea30159f16ed2d165588e10983e2728d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:46:35 -0700 Subject: [PATCH 0404/2658] chore(deps): bump ufo from 1.5.4 to 1.6.1 (#18797) Bumps [ufo](https://github.com/unjs/ufo) from 1.5.4 to 1.6.1. - [Release notes](https://github.com/unjs/ufo/releases) - [Changelog](https://github.com/unjs/ufo/blob/main/CHANGELOG.md) - [Commits](https://github.com/unjs/ufo/compare/v1.5.4...v1.6.1) --- updated-dependencies: - dependency-name: ufo dependency-version: 1.6.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 320fac6b9ea1..170c0052e009 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "tough-cookie": "5.1.2", "tsx": "4.19.3", "twitter-api-v2": "1.22.0", - "ufo": "1.5.4", + "ufo": "1.6.1", "undici": "6.21.2", "uuid": "11.1.0", "winston": "3.17.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 12788a569279..96e25c6a36d0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -261,8 +261,8 @@ importers: specifier: 1.22.0 version: 1.22.0 ufo: - specifier: 1.5.4 - version: 1.5.4 + specifier: 1.6.1 + version: 1.6.1 undici: specifier: 6.21.2 version: 6.21.2 @@ -5700,8 +5700,8 @@ packages: uc.micro@2.1.0: resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - ufo@1.5.4: - resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + ufo@1.6.1: + resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} @@ -10798,7 +10798,7 @@ snapshots: dependencies: destr: 2.0.5 node-fetch-native: 1.6.6 - ufo: 1.5.4 + ufo: 1.6.1 on-exit-leak-free@2.1.2: {} @@ -11917,7 +11917,7 @@ snapshots: uc.micro@2.1.0: {} - ufo@1.5.4: {} + ufo@1.6.1: {} uglify-js@3.19.3: {} From cc60fa813b98b842ae815ee9d1bdd721eef5c1fe Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 8 Apr 2025 23:09:21 +0800 Subject: [PATCH 0405/2658] fix(route): first line as title for telegram channel (#18800) --- lib/routes/telegram/channel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index 0ae5be27e45d..c59319c9c93b 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -719,7 +719,7 @@ async function handler(ctx) { if (messageTextObj.length > 0 && !titleCompleteFlag) { const _messageTextObj = $(messageTextObj.toString()); _messageTextObj.find('br').replaceWith('\n'); - const trimmedTitleText = _messageTextObj.text().replaceAll('\n', ' ').trim(); + const trimmedTitleText = _messageTextObj.text().split('\n').at(0)?.trim(); messageTitle += (messageTitle && trimmedTitleText ? ': ' : '') + trimmedTitleText; } From f11f10ca6bb8f8c13de1ee21824b7161206572f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 20:29:08 +0800 Subject: [PATCH 0406/2658] chore(deps): bump @sentry/node from 9.11.0 to 9.12.0 (#18806) Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 9.11.0 to 9.12.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/9.11.0...9.12.0) --- updated-dependencies: - dependency-name: "@sentry/node" dependency-version: 9.12.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 170c0052e009..aaeb3c517639 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", "@scalar/hono-api-reference": "0.8.0", - "@sentry/node": "9.11.0", + "@sentry/node": "9.12.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", "art-template": "4.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 96e25c6a36d0..e105be8bcd6f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,8 +63,8 @@ importers: specifier: 0.8.0 version: 0.8.0(hono@4.7.6) '@sentry/node': - specifier: 9.11.0 - version: 9.11.0 + specifier: 9.12.0 + version: 9.12.0 '@tonyrl/rand-user-agent': specifier: 2.0.83 version: 2.0.83 @@ -2066,16 +2066,16 @@ packages: '@selderee/plugin-htmlparser2@0.11.0': resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==} - '@sentry/core@9.11.0': - resolution: {integrity: sha512-qfb4ahGZubbrNh1MnbEqyHFp87rIwQIZapyQLCaYpudXrP1biEpLOV3mMDvDJWCdX460hoOwQ3SkwipV3We/7w==} + '@sentry/core@9.12.0': + resolution: {integrity: sha512-jOqQK/90uzHmsBvkPTj/DAEFvA5poX4ZRyC7LE1zjg4F5jdOp3+M4W3qCy0CkSTu88Zu5VWBoppCU2Bs34XEqg==} engines: {node: '>=18'} - '@sentry/node@9.11.0': - resolution: {integrity: sha512-luDsNDHsHkoXbL2Rf1cEKijh6hBfjzGQe09iP6kdZr+HB0bO+qoLe+nZLzSIQTWgWSt2XYNQyiLAsaMlbJZhJg==} + '@sentry/node@9.12.0': + resolution: {integrity: sha512-NZHneJovlLOdde85vJAIs7vIki36EfJ234d6YXHUE+874sxKMknB/wrzAZi5XS5nqT3kqIXD5KgjgDTjrhAENQ==} engines: {node: '>=18'} - '@sentry/opentelemetry@9.11.0': - resolution: {integrity: sha512-B6RumUFGb1+Q4MymY7IZbdl1Ayz2srqf46itFr1ohE/IpwY7OWKMntop8fxyccUW3ptmPp9cPkBJOaa9UdJhSg==} + '@sentry/opentelemetry@9.12.0': + resolution: {integrity: sha512-jQfI/UmgDDbcWY439r1Jz0Y4mqNn3a2JwruWfCHWzIqQMOgBzkzcp9lbZMx9iU+x1iZTTp9s80Dy5F9nG4KKMQ==} engines: {node: '>=18'} peerDependencies: '@opentelemetry/api': ^1.9.0 @@ -7823,9 +7823,9 @@ snapshots: domhandler: 5.0.3 selderee: 0.11.0 - '@sentry/core@9.11.0': {} + '@sentry/core@9.12.0': {} - '@sentry/node@9.11.0': + '@sentry/node@9.12.0': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -7858,13 +7858,13 @@ snapshots: '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.30.0 '@prisma/instrumentation': 6.5.0(@opentelemetry/api@1.9.0) - '@sentry/core': 9.11.0 - '@sentry/opentelemetry': 9.11.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0) + '@sentry/core': 9.12.0 + '@sentry/opentelemetry': 9.12.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0) import-in-the-middle: 1.13.1 transitivePeerDependencies: - supports-color - '@sentry/opentelemetry@9.11.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0)': + '@sentry/opentelemetry@9.12.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -7872,7 +7872,7 @@ snapshots: '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.30.0 - '@sentry/core': 9.11.0 + '@sentry/core': 9.12.0 '@sindresorhus/is@5.6.0': {} From eb5e4c609be1b93dd574c5ef60ac1b874f6a6f5b Mon Sep 17 00:00:00 2001 From: User <36217117+123hi123@users.noreply.github.com> Date: Wed, 9 Apr 2025 20:41:28 +0800 Subject: [PATCH 0407/2658] fix: A bug fix ,fix nhentai image link error (#18805) * fix nhentai image link error * bring yml back * fix: add an empty line at the end --------- Co-authored-by: Joe --- lib/routes/nhentai/util.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/nhentai/util.ts b/lib/routes/nhentai/util.ts index 5cdd3478382d..e592454045b4 100644 --- a/lib/routes/nhentai/util.ts +++ b/lib/routes/nhentai/util.ts @@ -133,7 +133,9 @@ const getDetail = async (simple) => { .toArray() .map((ele) => new URL($(ele).attr('data-src'), baseUrl).href) .map((src) => src.replace(/(.+)(\d+)t\.(.+)/, (_, p1, p2, p3) => `${p1}${p2}.${p3}`)) // thumb to high-quality - .map((src) => src.replace(/t(\d+)\.nhentai\.net/, 'i$1.nhentai.net')); + .map((src) => src.replace(/t(\d+)\.nhentai\.net/, 'i$1.nhentai.net')) + .map((src) => src.replace(/\.(jpg|png|gif)\.webp$/, '.$1')) // 移除重複的.webp後綴 + .map((src) => src.replace(/\.webp\.webp$/, '.webp')); // 處理.webp.webp的情況 return { ...simple, From facc6d543c731c0f84ebe5e1e7fdba1ebff92a1d Mon Sep 17 00:00:00 2001 From: Saif Azmi Date: Wed, 9 Apr 2025 14:23:54 +0100 Subject: [PATCH 0408/2658] feat(route): add LinkedIn company posts (#18799) * feat(route): add linkedin company posts - basic setup path: /linkedin/company/google/posts * feat(route): linkedIn company post returns realworld data * fix: InvalidDate issue for pubDate * refactor: to using arrow function for handler * feat: add feed description * chore: update parameter company_id description remove trailing white space * perf: add await to puppeteer page.close() * perf: close puppeteer browser missed this step in previous commits * perf: load response in cheerio only once --- lib/routes/linkedin/posts.ts | 64 ++++++++++++++++++++++++++++++ lib/routes/linkedin/utils.ts | 76 +++++++++++++++++++++++++++++++++++- 2 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 lib/routes/linkedin/posts.ts diff --git a/lib/routes/linkedin/posts.ts b/lib/routes/linkedin/posts.ts new file mode 100644 index 000000000000..c5034fe21e61 --- /dev/null +++ b/lib/routes/linkedin/posts.ts @@ -0,0 +1,64 @@ +import { Route } from '@/types'; +import puppeteer from '@/utils/puppeteer'; +import { load } from 'cheerio'; +import { parseCompanyName, parseCompanyPosts, BASE_URL } from './utils'; +import logger from '@/utils/logger'; + +export const route: Route = { + path: '/company/:company_id/posts', + categories: ['social-media'], + example: '/linkedin/company/google/posts', + parameters: { company_id: "Company's LinkedIn profile ID" }, + description: "Get company's LinkedIn posts by company ID", + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Company Posts', + maintainers: ['saifazmi'], + handler: async (ctx) => { + const company_id = ctx.req.param('company_id'); + + // Puppeteer setup + const browser = await puppeteer(); + const page = await browser.newPage(); + await page.setRequestInterception(true); + + page.on('request', (request) => { + request.resourceType() === 'document' ? request.continue() : request.abort(); + }); + + const url = new URL(`${BASE_URL}/company/${company_id}`); + + logger.http(`Requesting ${url.href}`); + await page.goto(url.href, { + waitUntil: 'domcontentloaded', + }); + + const response = await page.content(); + await page.close(); + + const $ = load(response); + const companyName = parseCompanyName($); + const posts = parseCompanyPosts($); + + await browser.close(); + + return { + title: `LinkedIn - ${companyName}'s Posts`, + link: url.href, + description: `This feed gets ${companyName}'s posts from LinkedIn`, + item: posts.map((post) => ({ + title: post.text, + description: post.text, + link: post.link, + pubDate: post.date, + })), + }; + }, +}; diff --git a/lib/routes/linkedin/utils.ts b/lib/routes/linkedin/utils.ts index a91e390cf63d..33a8bf7ed8e2 100644 --- a/lib/routes/linkedin/utils.ts +++ b/lib/routes/linkedin/utils.ts @@ -1,9 +1,12 @@ import { load } from 'cheerio'; import { Job } from './models'; +import dayjs from 'dayjs'; /** * Constants */ +const BASE_URL = 'https://www.linkedin.com'; + const KEYWORDS_QUERY_KEY = 'keywords'; const JOB_TYPES_QUERY_KEY = 'f_JT'; @@ -123,4 +126,75 @@ const parseRouteParam = (searchParam: string | null): string => { return encodeURIComponent(searchParam.split(',').join('-')); }; -export { parseParamsToSearchParams, parseParamsToString, parseJobDetail, parseJobSearch, parseRouteParam, JOB_TYPES, JOB_TYPES_QUERY_KEY, EXP_LEVELS, EXP_LEVELS_QUERY_KEY, KEYWORDS_QUERY_KEY }; +/** + * Parse company profile page for posts + * Example page: https://www.linkedin.com/company/google/ + * + * @param {Cheerio} $ HTML string of company profile page + * @returns {Array} Array of company posts + */ +function parseCompanyPosts($) { + const posts = $('ul.updates__list > li') + .toArray() // Convert the Cheerio object to a plain array + .map((elem) => { + const elemHtml = $(elem); + const link = elemHtml.find('a.main-feed-card__overlay-link').attr('href'); + const text = elemHtml.find('p.attributed-text-segment-list__content').text().trim(); + const date = parseRelativeShorthandDate(elemHtml.find('time').text().trim()); + + return { link, text, date }; + }); + + return posts; +} + +/** + * Parse company profile page for its name + * Example page: https://www.linkedin.com/company/google/ + * + * @param {Cheerio} $ HTML string of company profile page + * @returns {String} Company name + */ +function parseCompanyName($) { + return $('h1.top-card-layout__title').text().trim(); +} + +/** + * Parse relative date shorthand string into a Date object + * + * @param {String} shorthand The shorthand string representing the date + * @returns {Date|null} The parsed date or null if the format is invalid + */ +function parseRelativeShorthandDate(shorthand) { + const match = shorthand.match(/^(\d+)([wdmyh])$/); + if (!match) { + return null; + } + + const [, amount, unit] = match; + const unitMap = { + w: 'week', + d: 'day', + m: 'month', + y: 'year', + h: 'hour', + }; + + return dayjs().subtract(Number.parseInt(amount), unitMap[unit]); +} + +export { + parseCompanyPosts, + parseCompanyName, + parseParamsToSearchParams, + parseParamsToString, + parseJobDetail, + parseJobSearch, + parseRouteParam, + BASE_URL, + JOB_TYPES, + JOB_TYPES_QUERY_KEY, + EXP_LEVELS, + EXP_LEVELS_QUERY_KEY, + KEYWORDS_QUERY_KEY, +}; From 8508789087d56576430614f6b81de91fdd1f59a7 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Thu, 10 Apr 2025 00:23:09 +0800 Subject: [PATCH 0409/2658] =?UTF-8?q?feat(route):=20add=20=E6=9C=BA?= =?UTF-8?q?=E6=A0=B8=E7=BD=91=E9=A2=84=E5=91=8A=20(#18810)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/gcores/program-previews.ts | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 lib/routes/gcores/program-previews.ts diff --git a/lib/routes/gcores/program-previews.ts b/lib/routes/gcores/program-previews.ts new file mode 100644 index 000000000000..45e8f59a519a --- /dev/null +++ b/lib/routes/gcores/program-previews.ts @@ -0,0 +1,50 @@ +import { type Data, type Route, ViewType } from '@/types'; + +import { getCurrentPath } from '@/utils/helpers'; +import { type Context } from 'hono'; + +import { baseUrl, processItems } from './util'; + +export const __dirname = getCurrentPath(import.meta.url); + +export const handler = async (ctx: Context): Promise => { + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const targetUrl: string = new URL('radios/preview', baseUrl).href; + const apiUrl: string = new URL('gapi/v1/program-previews', baseUrl).href; + + const query = { + 'page[limit]': limit, + include: 'radio.djs,video.djs,radio.category,video.category', + }; + + return await processItems(limit, query, apiUrl, targetUrl); +}; + +export const route: Route = { + path: '/radios/preview', + name: '预告', + url: 'www.gcores.com', + maintainers: ['nczitzk'], + handler, + example: '/gcores/radios/preview', + parameters: undefined, + description: undefined, + categories: ['game'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.gcores.com/radios/preview'], + target: '/gcores/radios/preview', + }, + ], + view: ViewType.Notifications, +}; From f20d5b362020072660727a75431af4c32f9d43e0 Mon Sep 17 00:00:00 2001 From: la3rence Date: Thu, 10 Apr 2025 14:05:45 +0800 Subject: [PATCH 0410/2658] feat(route): tariff docs by chinese gov (#18809) * feat(route): tariff docs by chinese gov * chore: fix example path --- lib/routes/gov/mof/gss.ts | 82 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 lib/routes/gov/mof/gss.ts diff --git a/lib/routes/gov/mof/gss.ts b/lib/routes/gov/mof/gss.ts new file mode 100644 index 000000000000..46a5c40ef497 --- /dev/null +++ b/lib/routes/gov/mof/gss.ts @@ -0,0 +1,82 @@ +import { Data, Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import timezone from '@/utils/timezone'; +import { parseDate } from '@/utils/parse-date'; +import { Context } from 'hono'; + +const DOMAIN = 'gss.mof.gov.cn'; + +const handler = async (ctx: Context): Promise => { + const { category = 'zhengcefabu' } = ctx.req.param(); + const currentUrl = `https://${DOMAIN}/gzdt/${category}/`; + const { data: response } = await got(currentUrl); + const $ = load(response); + const title = $('title').text(); + const author = $('div.zzName').text(); + const siteName = $('meta[name="SiteName"]').prop('content'); + const description = $('meta[name="ColumnDescription"]').prop('content'); + const indexes = $('ul.liBox li') + .toArray() + .map((li) => { + const a = $(li).find('a'); + const pubDate = $(li).find('span').text(); + const href = a.prop('href') as string; + const link = href.startsWith('http') ? href : new URL(href, currentUrl).href; + return { + title: a.prop('title'), + link, + pubDate: timezone(parseDate(pubDate), +8), + }; + }); + + const items = await Promise.all( + indexes.map((item: Data) => + cache.tryGet(item.link!, async () => { + const { data: detailResponse } = await got(item.link); + const content = load(detailResponse); + item.description = content('div.my_doccontent').html() ?? ''; + item.author = author; + return item; + }) + ) + ); + + return { + item: items, + title, + link: currentUrl, + description: `${description} - ${siteName}`, + author, + } as Data; +}; + +export const route: Route = { + path: '/mof/gss/:category?', + categories: ['government'], + example: '/gov/mof/gss', + parameters: { category: '列表标签,默认为政策发布' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '关税政策文件', + maintainers: ['la3rence'], + handler, + description: `#### 关税文件发布 + +| 政策发布 | 政策解读 | +| ------------- | -------------- | +| zhengcefabu | zhengcejiedu |`, + radar: [ + { + source: ['gss.mof.gov.cn/gzdt/:category/'], + target: '/mof/gss/:category', + }, + ], +}; From e4ba55d9b73a23fd3284bcbca07570c3597b4e73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Apr 2025 08:25:40 +0000 Subject: [PATCH 0411/2658] chore(deps): bump @hono/zod-openapi from 0.19.2 to 0.19.4 (#18814) Bumps [@hono/zod-openapi](https://github.com/honojs/middleware/tree/HEAD/packages/zod-openapi) from 0.19.2 to 0.19.4. - [Release notes](https://github.com/honojs/middleware/releases) - [Changelog](https://github.com/honojs/middleware/blob/main/packages/zod-openapi/CHANGELOG.md) - [Commits](https://github.com/honojs/middleware/commits/HEAD/packages/zod-openapi) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-version: 0.19.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index aaeb3c517639..0efc5718cbde 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@bbob/html": "4.2.0", "@bbob/preset-html5": "4.2.0", "@hono/node-server": "1.14.0", - "@hono/zod-openapi": "0.19.2", + "@hono/zod-openapi": "0.19.4", "@notionhq/client": "2.3.0", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.200.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e105be8bcd6f..42a5a25b56cd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: 1.14.0 version: 1.14.0(hono@4.7.6) '@hono/zod-openapi': - specifier: 0.19.2 - version: 0.19.2(hono@4.7.6)(zod@3.24.2) + specifier: 0.19.4 + version: 0.19.4(hono@4.7.6)(zod@3.24.2) '@notionhq/client': specifier: 2.3.0 version: 2.3.0 @@ -1407,8 +1407,8 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.19.2': - resolution: {integrity: sha512-lkFa6wdQVgY7d7/m++Ixr3hvKCF5Y+zjTIPM37fex5ylCfX53A/W28gZRDuFZx3aR+noKob7lHfwdk9dURLzxw==} + '@hono/zod-openapi@0.19.4': + resolution: {integrity: sha512-wt/Hn5TudVLGQxARVBBGDN/ckDOWUQrw9gdZoDBfRb5+G8+AJ/qeRDV8iorKE3SyEeiRkJ5ErKevkjCsAgH69Q==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' @@ -6052,6 +6052,11 @@ packages: engines: {node: '>= 14'} hasBin: true + yaml@2.7.1: + resolution: {integrity: sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==} + engines: {node: '>= 14'} + hasBin: true + yargs-parser@15.0.3: resolution: {integrity: sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==} @@ -7091,7 +7096,7 @@ snapshots: dependencies: hono: 4.7.6 - '@hono/zod-openapi@0.19.2(hono@4.7.6)(zod@3.24.2)': + '@hono/zod-openapi@0.19.4(hono@4.7.6)(zod@3.24.2)': dependencies: '@asteasolutions/zod-to-openapi': 7.3.0(zod@3.24.2) '@hono/zod-validator': 0.4.3(hono@4.7.6)(zod@3.24.2) @@ -10836,7 +10841,7 @@ snapshots: openapi3-ts@4.4.0: dependencies: - yaml: 2.7.0 + yaml: 2.7.1 optionator@0.8.3: dependencies: @@ -12250,6 +12255,8 @@ snapshots: yaml@2.7.0: {} + yaml@2.7.1: {} + yargs-parser@15.0.3: dependencies: camelcase: 5.3.1 From 4de4936faa3f51fde8ad559ef59099e629c487a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:45:50 +0000 Subject: [PATCH 0412/2658] chore(deps-dev): bump eslint-config-prettier from 10.1.1 to 10.1.2 (#18820) Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 10.1.1 to 10.1.2. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v10.1.1...v10.1.2) --- updated-dependencies: - dependency-name: eslint-config-prettier dependency-version: 10.1.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 0efc5718cbde..465777f7bc4d 100644 --- a/package.json +++ b/package.json @@ -174,7 +174,7 @@ "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.37.119", "eslint": "9.24.0", - "eslint-config-prettier": "10.1.1", + "eslint-config-prettier": "10.1.2", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.17.0", "eslint-plugin-prettier": "5.2.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 42a5a25b56cd..b519da8add15 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -385,8 +385,8 @@ importers: specifier: 9.24.0 version: 9.24.0 eslint-config-prettier: - specifier: 10.1.1 - version: 10.1.1(eslint@9.24.0) + specifier: 10.1.2 + version: 10.1.2(eslint@9.24.0) eslint-nibble: specifier: 8.1.0 version: 8.1.0(eslint@9.24.0) @@ -395,7 +395,7 @@ importers: version: 17.17.0(eslint@9.24.0) eslint-plugin-prettier: specifier: 5.2.6 - version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.1(eslint@9.24.0))(eslint@9.24.0)(prettier@3.5.3) + version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.24.0))(eslint@9.24.0)(prettier@3.5.3) eslint-plugin-unicorn: specifier: 58.0.0 version: 58.0.0(eslint@9.24.0) @@ -3240,8 +3240,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-prettier@10.1.1: - resolution: {integrity: sha512-4EQQr6wXwS+ZJSzaR5ZCrYgLxqvUjdXctaEtBqHcbkW944B1NQyO4qpdHQbXBONfwxXdkAY81HH4+LUfrg+zPw==} + eslint-config-prettier@10.1.2: + resolution: {integrity: sha512-Epgp/EofAUeEpIdZkW60MHKvPyru1ruQJxPL+WIycnaPApuseK0Zpkrh/FwL9oIpQvIhJwV7ptOy0DWUjTlCiA==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -9151,7 +9151,7 @@ snapshots: eslint: 9.24.0 semver: 7.7.1 - eslint-config-prettier@10.1.1(eslint@9.24.0): + eslint-config-prettier@10.1.2(eslint@9.24.0): dependencies: eslint: 9.24.0 @@ -9198,7 +9198,7 @@ snapshots: minimatch: 9.0.5 semver: 7.7.1 - eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.1(eslint@9.24.0))(eslint@9.24.0)(prettier@3.5.3): + eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.24.0))(eslint@9.24.0)(prettier@3.5.3): dependencies: eslint: 9.24.0 prettier: 3.5.3 @@ -9206,7 +9206,7 @@ snapshots: synckit: 0.11.1 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.1(eslint@9.24.0) + eslint-config-prettier: 10.1.2(eslint@9.24.0) eslint-plugin-unicorn@58.0.0(eslint@9.24.0): dependencies: From d9103e5de68b5b1c9a732d9257e0d5add1716056 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:48:31 +0000 Subject: [PATCH 0413/2658] chore(deps-dev): bump discord-api-types from 0.37.119 to 0.37.120 (#18822) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.119 to 0.37.120. - [Release notes](https://github.com/discordjs/discord-api-types/releases) - [Changelog](https://github.com/discordjs/discord-api-types/blob/main/CHANGELOG.md) - [Commits](https://github.com/discordjs/discord-api-types/compare/0.37.119...0.37.120) --- updated-dependencies: - dependency-name: discord-api-types dependency-version: 0.37.120 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 465777f7bc4d..5142cb9ab7c7 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ "@typescript-eslint/parser": "8.29.1", "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", - "discord-api-types": "0.37.119", + "discord-api-types": "0.37.120", "eslint": "9.24.0", "eslint-config-prettier": "10.1.2", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b519da8add15..06c5fefb5c82 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,8 +379,8 @@ importers: specifier: 2.1.9 version: 2.1.9(vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) discord-api-types: - specifier: 0.37.119 - version: 0.37.119 + specifier: 0.37.120 + version: 0.37.120 eslint: specifier: 9.24.0 version: 9.24.0 @@ -3058,8 +3058,8 @@ packages: resolution: {integrity: sha512-dSApZXgx29qO/6AVigdsoC6HSvaHWinJ4HTRPKrlMAxX71FgPzn/WEWbgM+aB1PlKD9IfSC3Ir2ouYYQR1uy+g==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.119: - resolution: {integrity: sha512-WasbGFXEB+VQWXlo6IpW3oUv73Yuau1Ig4AZF/m13tXcTKnMpc/mHjpztIlz4+BM9FG9BHQkEXiPto3bKduQUg==} + discord-api-types@0.37.120: + resolution: {integrity: sha512-7xpNK0EiWjjDFp2nAhHXezE4OUWm7s1zhc/UXXN6hnFFU8dfoPHgV0Hx0RPiCa3ILRpdeh152icc68DGCyXYIw==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8917,7 +8917,7 @@ snapshots: directory-import@3.3.2: {} - discord-api-types@0.37.119: {} + discord-api-types@0.37.120: {} doctrine@3.0.0: dependencies: From f0854c7fa8e45f1d4f2457d72d1a2645db1fb5f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 02:45:56 -0700 Subject: [PATCH 0414/2658] chore(deps): bump dotenv from 16.4.7 to 16.5.0 (#18821) Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.4.7 to 16.5.0. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v16.4.7...v16.5.0) --- updated-dependencies: - dependency-name: dotenv dependency-version: 16.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 5142cb9ab7c7..02f2d48948d8 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "dayjs": "1.11.8", "destr": "2.0.5", "directory-import": "3.3.2", - "dotenv": "16.4.7", + "dotenv": "16.5.0", "entities": "6.0.0", "etag": "1.8.1", "fanfou-sdk": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 06c5fefb5c82..800872c5fcea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,8 +102,8 @@ importers: specifier: 3.3.2 version: 3.3.2 dotenv: - specifier: 16.4.7 - version: 16.4.7 + specifier: 16.5.0 + version: 16.5.0 entities: specifier: 6.0.0 version: 6.0.0 @@ -3103,8 +3103,8 @@ packages: domutils@3.2.2: resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} - dotenv@16.4.7: - resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} + dotenv@16.5.0: + resolution: {integrity: sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==} engines: {node: '>=12'} dotenv@6.2.0: @@ -8978,7 +8978,7 @@ snapshots: domelementtype: 2.3.0 domhandler: 5.0.3 - dotenv@16.4.7: {} + dotenv@16.5.0: {} dotenv@6.2.0: {} From d94853dca8f6fea11305d4dfb302611737d11aad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 20:57:31 +0800 Subject: [PATCH 0415/2658] chore(deps): bump @opentelemetry/semantic-conventions (#18813) Bumps the opentelemetry group with 1 update: [@opentelemetry/semantic-conventions](https://github.com/open-telemetry/opentelemetry-js). Updates `@opentelemetry/semantic-conventions` from 1.30.0 to 1.31.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-js/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-js/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-js/compare/v1.30.0...semconv/v1.31.0) --- updated-dependencies: - dependency-name: "@opentelemetry/semantic-conventions" dependency-version: 1.31.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: opentelemetry ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 56 +++++++++++++++++++++++++------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 02f2d48948d8..68318a27bd99 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@opentelemetry/resources": "2.0.0", "@opentelemetry/sdk-metrics": "2.0.0", "@opentelemetry/sdk-trace-base": "2.0.0", - "@opentelemetry/semantic-conventions": "1.30.0", + "@opentelemetry/semantic-conventions": "1.32.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", "@scalar/hono-api-reference": "0.8.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 800872c5fcea..843648ebd517 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: specifier: 2.0.0 version: 2.0.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': - specifier: 1.30.0 - version: 1.30.0 + specifier: 1.32.0 + version: 1.32.0 '@postlight/parser': specifier: 2.2.3 version: 2.2.3 @@ -1827,8 +1827,8 @@ packages: resolution: {integrity: sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==} engines: {node: '>=14'} - '@opentelemetry/semantic-conventions@1.30.0': - resolution: {integrity: sha512-4VlGgo32k2EQ2wcCY3vEU28A0O13aOtHz3Xt2/2U5FAh9EfhD6t6DqL5Z6yAnRCntbTFDU4YfbpyzSlHNWycPw==} + '@opentelemetry/semantic-conventions@1.32.0': + resolution: {integrity: sha512-s0OpmpQFSfMrmedAn9Lhg4KWJELHCU6uU9dtIJ28N8UGhf9Y55im5X8fEzwhwDwiSqN+ZPSNrDJF7ivf/AuRPQ==} engines: {node: '>=14'} '@opentelemetry/sql-common@0.40.1': @@ -7305,7 +7305,7 @@ snapshots: '@opentelemetry/core@2.0.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 '@opentelemetry/exporter-prometheus@0.200.0(@opentelemetry/api@1.9.0)': dependencies: @@ -7328,7 +7328,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7337,7 +7337,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 '@types/connect': 3.4.38 transitivePeerDependencies: - supports-color @@ -7354,7 +7354,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7363,7 +7363,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7394,7 +7394,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7414,7 +7414,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) '@opentelemetry/redis-common': 0.36.2 - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7422,7 +7422,7 @@ snapshots: dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7430,7 +7430,7 @@ snapshots: dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7439,7 +7439,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7454,7 +7454,7 @@ snapshots: dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7463,7 +7463,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7471,7 +7471,7 @@ snapshots: dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 '@opentelemetry/sql-common': 0.40.1(@opentelemetry/api@1.9.0) transitivePeerDependencies: - supports-color @@ -7480,7 +7480,7 @@ snapshots: dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 '@types/mysql': 2.15.26 transitivePeerDependencies: - supports-color @@ -7490,7 +7490,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 '@opentelemetry/sql-common': 0.40.1(@opentelemetry/api@1.9.0) '@types/pg': 8.6.1 '@types/pg-pool': 2.0.6 @@ -7502,7 +7502,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) '@opentelemetry/redis-common': 0.36.2 - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 transitivePeerDependencies: - supports-color @@ -7510,7 +7510,7 @@ snapshots: dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 '@types/tedious': 4.0.14 transitivePeerDependencies: - supports-color @@ -7564,7 +7564,7 @@ snapshots: dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 2.0.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 '@opentelemetry/sdk-logs@0.200.0(@opentelemetry/api@1.9.0)': dependencies: @@ -7591,11 +7591,11 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 2.0.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 2.0.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 '@opentelemetry/semantic-conventions@1.28.0': {} - '@opentelemetry/semantic-conventions@1.30.0': {} + '@opentelemetry/semantic-conventions@1.32.0': {} '@opentelemetry/sql-common@0.40.1(@opentelemetry/api@1.9.0)': dependencies: @@ -7861,22 +7861,22 @@ snapshots: '@opentelemetry/instrumentation-undici': 0.10.1(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 '@prisma/instrumentation': 6.5.0(@opentelemetry/api@1.9.0) '@sentry/core': 9.12.0 - '@sentry/opentelemetry': 9.12.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0) + '@sentry/opentelemetry': 9.12.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0) import-in-the-middle: 1.13.1 transitivePeerDependencies: - supports-color - '@sentry/opentelemetry@9.12.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.30.0)': + '@sentry/opentelemetry@9.12.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.30.0 + '@opentelemetry/semantic-conventions': 1.32.0 '@sentry/core': 9.12.0 '@sindresorhus/is@5.6.0': {} From ac50b9850a429a862f82c4c8320f5e74315ebf9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bean=20Deng=20=E9=82=93=E6=96=8C?= Date: Fri, 11 Apr 2025 21:19:08 +0800 Subject: [PATCH 0416/2658] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20`/readhub?= =?UTF-8?q?/daily`=20=E8=B7=AF=E7=94=B1=20logo=20=E5=92=8C=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98=20(#1882?= =?UTF-8?q?5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: image of readhub daily should be square * fix: 修复标题中重复的 ` - Readhub` --- lib/routes/readhub/daily.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/readhub/daily.ts b/lib/routes/readhub/daily.ts index 2e36c2ed9954..7fd094d7071c 100644 --- a/lib/routes/readhub/daily.ts +++ b/lib/routes/readhub/daily.ts @@ -53,12 +53,12 @@ async function handler(ctx) { const author = $('meta[name="application-name"]').prop('content'); const subtitle = $('meta[property="og:title"]').prop('content'); - const image = 'https://readhub-oss.nocode.com/static/readhub.png'; + const image = 'https://readhub.cn/icons/icon-192x192.png'; const icon = new URL($('link[rel="apple-touch-icon"]').prop('href'), rootUrl); return { item: items, - title: `${author} - ${subtitle}`, + title: `${author} - ${route.name}`, link: currentUrl, description: $('meta[name="description"]').prop('content'), language: 'zh', From 6b681e719836f7ddb1f66498e2144c266487f831 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Sat, 12 Apr 2025 01:45:57 +0800 Subject: [PATCH 0417/2658] =?UTF-8?q?feat(route):=20add=20=E8=A5=BF?= =?UTF-8?q?=E5=AE=89=E4=BA=A4=E9=80=9A=E5=A4=A7=E5=AD=A6=E6=9C=AC=E7=A7=91?= =?UTF-8?q?=E6=8B=9B=E7=94=9F=E7=BD=91=20(#18826)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/xjtu/zs.ts | 170 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 lib/routes/xjtu/zs.ts diff --git a/lib/routes/xjtu/zs.ts b/lib/routes/xjtu/zs.ts new file mode 100644 index 000000000000..2beb8544f591 --- /dev/null +++ b/lib/routes/xjtu/zs.ts @@ -0,0 +1,170 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; + +export const handler = async (ctx: Context): Promise => { + const { category = 'zsxx1/zskx' } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const baseUrl: string = 'https://zs.xjtu.edu.cn'; + const targetUrl: string = new URL(`${category}.htm`, baseUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language = $('html').attr('lang') ?? 'zh'; + + let items: DataItem[] = []; + + items = $('section.TextList ul li') + .slice(0, limit) + .toArray() + .map((el): Element => { + const $el: Cheerio = $(el); + const $aEl: Cheerio = $el.find('a.flex'); + + const title: string = $aEl.text(); + const pubDateStr: string | undefined = $el.find('b').text(); + const linkUrl: string | undefined = $aEl.attr('href'); + const categoryEls: Element[] = $el.find('i.zc').toArray(); + const categories: string[] = [...new Set(categoryEls.map((el) => $(el).text()).filter(Boolean))]; + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + pubDate: pubDateStr ? parseDate(pubDateStr) : undefined, + link: linkUrl ? new URL(linkUrl, targetUrl).href : undefined, + category: categories, + updated: upDatedStr ? parseDate(upDatedStr) : undefined, + language, + }; + + return processedItem; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async (): Promise => { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('div.show01 h5').text(); + const description: string | undefined = $$('div.v_news_content').html(); + const pubDateStr: string | undefined = $$('div.show01 i') + .text() + ?.match(/(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2})/)?.[1]; + const categoryEls: Element[] = $$('div.mianbao a').toArray().slice(1); + const categories: string[] = [...new Set(categoryEls.map((el) => $$(el).text()).filter(Boolean))]; + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? timezone(parseDate(pubDateStr), +8) : item.pubDate, + category: categories, + content: { + html: description, + text: description, + }, + updated: upDatedStr ? timezone(parseDate(upDatedStr), +8) : item.updated, + language, + }; + + return { + ...item, + ...processedItem, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + const title: string = $('title').text(); + + return { + title, + description: title.split(/-/)[0], + link: targetUrl, + item: items, + allowEmpty: true, + image: $('div.logoimg img').attr('src'), + author: $('META[Name="keywords"]').attr('Content'), + language, + id: targetUrl, + }; +}; + +export const route: Route = { + path: '/zs/:category{.+}?', + name: '本科招生网', + url: 'zs.xjtu.edu.cn', + maintainers: ['nczitzk'], + handler, + example: '/xjtu/zs/zsxx1/zskx', + parameters: { + category: { + description: '分类,默认为 zsxx1/zskx,可在对应分类页 URL 中找到', + options: [ + { + label: '招生快讯', + value: 'zsxx1/zskx', + }, + { + label: '招生政策', + value: 'zsxx1/zszc', + }, + { + label: '招生计划', + value: 'zsxx1/zsjh', + }, + { + label: '阳光公告', + value: 'zsxx1/yggg', + }, + { + label: '历年录取', + value: 'zsxx1/lnlq', + }, + ], + }, + }, + description: `:::tip +若订阅 [招生快讯](https://zs.xjtu.edu.cn/zsxx1/zskx.htm),网址为 \`https://zs.xjtu.edu.cn/zsxx1/zskx.htm\`,请截取 \`https://zs.xjtu.edu.cn/\` 到末尾 \`.htm\` 的部分 \`zsxx1/zskx\` 作为 \`category\` 参数填入,此时目标路由为 [\`/xjtu/zs/zsxx1/zskx\`](https://rsshub.app/xjtu/zs/zsxx1/zskx)。 +::: + +| [招生快讯](https://zs.xjtu.edu.cn/zsxx1/zskx.htm) | [招生政策](https://zs.xjtu.edu.cn/zsxx1/zszc.htm) | [招生计划](https://zs.xjtu.edu.cn/zsxx1/zsjh.htm) | [阳光公告](https://zs.xjtu.edu.cn/zsxx1/yggg.htm) | [历年录取](https://zs.xjtu.edu.cn/zsxx1/lnlq.htm) | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| [zsxx1/zskx](https://rsshub.app/xjtu/zs/zsxx1/zskx) | [zsxx1/zszc](https://rsshub.app/xjtu/zs/zsxx1/zszc) | [zsxx1/zsjh](https://rsshub.app/xjtu/zs/zsxx1/zsjh) | [zsxx1/yggg](https://rsshub.app/xjtu/zs/zsxx1/yggg) | [zsxx1/lnlq](https://rsshub.app/xjtu/zs/zsxx1/lnlq) | +`, + categories: ['university'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['zs.xjtu.edu.cn/:category'], + target: (params) => { + const category: string = params.category; + + return `/xjtu/zs${category ? `/${category}` : ''}`; + }, + }, + ], + view: ViewType.Articles, +}; From b0181eeea49b16bac754761150ae5d2b0d0ec013 Mon Sep 17 00:00:00 2001 From: Kjasn Date: Sat, 12 Apr 2025 02:21:03 +0800 Subject: [PATCH 0418/2658] feat(route): add Hanime1 (#18804) * feat(route): add Hanime1 * feat(route): enhance Hanime1 previews, fix UA * fix(route): update puppeteer import to use utility function * fix(route): replace puppeteer with ofetch --- lib/routes/hanime1/namespace.ts | 7 +++ lib/routes/hanime1/previews.ts | 86 +++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 lib/routes/hanime1/namespace.ts create mode 100644 lib/routes/hanime1/previews.ts diff --git a/lib/routes/hanime1/namespace.ts b/lib/routes/hanime1/namespace.ts new file mode 100644 index 000000000000..a64c7c736d4d --- /dev/null +++ b/lib/routes/hanime1/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Hanime1', + url: 'hanime1.me', + description: 'NSFW WARNING!!! It contains adult content. Hanime1 provides adult anime', +}; diff --git a/lib/routes/hanime1/previews.ts b/lib/routes/hanime1/previews.ts new file mode 100644 index 000000000000..3d0b0c5c2c9f --- /dev/null +++ b/lib/routes/hanime1/previews.ts @@ -0,0 +1,86 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { config } from '@/config'; +import { load } from 'cheerio'; + +export const route: Route = { + path: '/previews/:date', + name: '新番预告', + maintainers: ['kjasn'], + example: '/hanime1/previews/202504', + categories: ['anime'], + parameters: { date: { description: 'Date in YYYYMM format' } }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['hanime1.me/previews/:date'], + target: '/previews/:date', + }, + ], + handler: async (ctx) => { + const baseUrl = 'https://hanime1.me'; + const { date } = ctx.req.param(); + const link = `${baseUrl}/previews/${date}`; + + const response = await ofetch(link, { + headers: { + referer: baseUrl, + 'user-agent': config.trueUA, + }, + }); + + const $ = load(response); + + const items = $('.content-padding .row') + .toArray() + .map((el) => { + const row = $(el); + // 中文标题 + const title = row.find('.preview-info-content h4').first().text().trim(); + + // 预览图 + const previewImageSrc = row.find('.preview-info-cover img').attr('src') || ''; + + // 发布时间 MMDD + const rawDate = row.find('.preview-info-cover div').text().trim(); + // 链接 + const modalSelector = row.find('.trailer-modal-trigger').attr('data-target') || ''; + const previewVideoLink = modalSelector ? $(modalSelector).find('video source').attr('src') || '' : ''; + + // 简介 + const description = row.find('.caption').first().text().trim(); + + // 标签 + const tags = row + .find('.single-video-tag a') + .toArray() + .map((tag) => $(tag).text().trim()); + + return { + title, + description: ` +

${description}

+

Tags: [${tags.join(', ')}]

+ `, + // image: previewImageSrc, + enclosure_url: previewImageSrc, + enclosure_type: 'image/jpeg', + link: previewVideoLink, + guid: `hanime1-${rawDate}-${title}`, // 上映时间和标题 + }; + }); + + return { + title: `Hanime1 ${date}新番预告`, + link, + item: items, + }; + }, +}; From d8efe7b4c307bbcf32c6244d934b4d32019e570d Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Sat, 12 Apr 2025 03:17:12 +0800 Subject: [PATCH 0419/2658] feat(apnews): Mobile API (#18819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(apnews): Mobile API * . * 更新 mobile-api.ts * 更新 mobile-api.ts * . --- lib/routes/apnews/api.ts | 77 --------------------------- lib/routes/apnews/mobile-api.ts | 93 +++++++++++++++++++++++++++++++++ lib/routes/apnews/utils.ts | 4 +- 3 files changed, 95 insertions(+), 79 deletions(-) delete mode 100644 lib/routes/apnews/api.ts create mode 100644 lib/routes/apnews/mobile-api.ts diff --git a/lib/routes/apnews/api.ts b/lib/routes/apnews/api.ts deleted file mode 100644 index f0edc8582bb5..000000000000 --- a/lib/routes/apnews/api.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Route, ViewType } from '@/types'; -import { fetchArticle } from './utils'; -import ofetch from '@/utils/ofetch'; -import timezone from '@/utils/timezone'; -import { parseDate } from '@/utils/parse-date'; - -export const route: Route = { - path: '/api/:tags?', - categories: ['traditional-media', 'popular'], - example: '/apnews/api/apf-topnews', - view: ViewType.Articles, - parameters: { - tags: { - description: 'Getting a list of articles from a public API based on tags.', - options: [ - { value: 'apf-topnews', label: 'Top News' }, - { value: 'apf-sports', label: 'Sports' }, - { value: 'apf-politics', label: 'Politics' }, - { value: 'apf-entertainment', label: 'Entertainment' }, - { value: 'apf-usnews', label: 'US News' }, - { value: 'apf-oddities', label: 'Oddities' }, - { value: 'apf-Travel', label: 'Travel' }, - { value: 'apf-technology', label: 'Technology' }, - { value: 'apf-lifestyle', label: 'Lifestyle' }, - { value: 'apf-business', label: 'Business' }, - { value: 'apf-Health', label: 'Health' }, - { value: 'apf-science', label: 'Science' }, - { value: 'apf-intlnews', label: 'International News' }, - ], - default: 'apf-topnews', - }, - }, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['apnews.com/'], - }, - ], - name: 'News', - maintainers: ['dzx-dzx'], - handler, -}; - -async function handler(ctx) { - const { tags = 'apf-topnews' } = ctx.req.param(); - const apiRootUrl = 'https://afs-prod.appspot.com/api/v2/feed/tag'; - const url = `${apiRootUrl}?tags=${tags}`; - const res = await ofetch(url); - - const list = res.cards - .map((e) => ({ - title: e.contents[0]?.headline, - link: e.contents[0]?.localLinkUrl, - pubDate: timezone(parseDate(e.publishedDate), 0), - category: e.tagObjs.map((tag) => tag.name), - updated: timezone(parseDate(e.contents[0]?.updated), 0), - description: e.contents[0]?.storyHTML, - author: e.contents[0]?.reporters.map((author) => ({ name: author.displayName })), - })) - .sort((a, b) => b.pubDate - a.pubDate) - .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20); - - const items = ctx.req.query('fulltext') === 'true' ? await Promise.all(list.map((item) => fetchArticle(item))) : list; - - return { - title: `${res.tagObjs[0].name} - AP News`, - item: items, - link: 'https://apnews.com', - }; -} diff --git a/lib/routes/apnews/mobile-api.ts b/lib/routes/apnews/mobile-api.ts new file mode 100644 index 000000000000..0786885950a1 --- /dev/null +++ b/lib/routes/apnews/mobile-api.ts @@ -0,0 +1,93 @@ +import { Route, ViewType } from '@/types'; +import { asyncPoolAll, fetchArticle } from './utils'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/mobile/:path{.+}?', + categories: ['traditional-media'], + example: '/apnews/mobile/ap-top-news', + view: ViewType.Articles, + parameters: { + path: { + description: 'Corresponding path from AP News website', + default: 'ap-top-news', + }, + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['apnews.com/'], + }, + ], + name: 'News (from mobile client API)', + maintainers: ['dzx-dzx'], + handler, +}; + +async function handler(ctx) { + const path = ctx.req.param('path') ? `/${ctx.req.param('path')}` : '/hub/ap-top-news'; + const apiRootUrl = 'https://apnews.com/graphql/delivery/ap/v1'; + const res = await ofetch(apiRootUrl, { + query: { + operationName: 'ContentPageQuery', + variables: { path }, + extensions: { persistedQuery: { version: 1, sha256Hash: '3bc305abbf62e9e632403a74cc86dc1cba51156d2313f09b3779efec51fc3acb' } }, + }, + }); + + const screen = res.data.Screen; + + const list = [...screen.main.filter((e) => e.__typename === 'ColumnContainer').flatMap((_) => _.columns), ...screen.main.filter((e) => e.__typename !== 'ColumnContainer')] + .filter((e) => e.__typename !== 'GoogleDfPAdModule') + .flatMap((e) => { + switch (e.__typename) { + case 'PageListModule': + return e.items; + case 'VideoPlaylistModule': + return e.playlist; + default: + return; + } + }) + .filter(Boolean) + .map((e) => { + if (e.__typename === 'PagePromo') { + return { + title: e.title, + link: e.url, + pubDate: parseDate(e.publishDateStamp), + category: e.category, + description: e.description, + guid: e.id, + }; + } else if (e.__typename === 'VideoPlaylistItem') { + return { + title: e.title, + link: e.url, + description: e.description, + guid: e.contentId, + }; + } else { + return; + } + }) + .filter(Boolean) + .sort((a, b) => b.pubDate - a.pubDate) + .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20); + + const items = ctx.req.query('fulltext') === 'true' ? await asyncPoolAll(10, list, (item) => fetchArticle(item)) : list; + + return { + title: screen.category ?? screen.title, + item: items, + link: 'https://apnews.com', + }; +} diff --git a/lib/routes/apnews/utils.ts b/lib/routes/apnews/utils.ts index 5db057510ade..ed833750c33b 100644 --- a/lib/routes/apnews/utils.ts +++ b/lib/routes/apnews/utils.ts @@ -38,6 +38,7 @@ export function fetchArticle(item) { $('div.Enhancement').remove(); const section = $("meta[property='article:section']").attr('content'); return { + ...item, title: ldjson.headline, pubDate: parseDate(ldjson.datePublished), updated: parseDate(ldjson.dateModified), @@ -45,7 +46,6 @@ export function fetchArticle(item) { category: [...(section ? [section] : []), ...(ldjson.keywords ?? [])], guid: $("meta[name='brightspot.contentId']").attr('content'), author: ldjson.author, - ...item, }; } else { // Live @@ -56,11 +56,11 @@ export function fetchArticle(item) { const pubDate = url.hash ? parseDate(Number.parseInt($(url.hash).parent().attr('data-posted-date-timestamp'), 10)) : parseDate(ldjson.coverageStartTime); return { + ...item, category: ldjson.keywords, pubDate, description, guid: $("meta[name='brightspot.contentId']").attr('content'), - ...item, }; } }); From a8b2d68228bd19417d56d020071276be6451a8a2 Mon Sep 17 00:00:00 2001 From: Li Fangqiao <124950516+Ch1llNoodle@users.noreply.github.com> Date: Sat, 12 Apr 2025 21:42:01 +0800 Subject: [PATCH 0420/2658] fix(route): resolve issue #18517 by updating headers for Reuters API (#18828) --- lib/routes/reuters/common.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/routes/reuters/common.ts b/lib/routes/reuters/common.ts index 908ea65b2d63..22c9bab3b795 100644 --- a/lib/routes/reuters/common.ts +++ b/lib/routes/reuters/common.ts @@ -6,6 +6,7 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; +import randUserAgent from '@/utils/rand-user-agent'; import { art } from '@/utils/render'; import path from 'node:path'; @@ -91,6 +92,14 @@ async function handler(ctx) { const section_id = `/${category}/${topic ? `${topic}/` : ''}`; + const ua = randUserAgent({ browser: 'chrome', os: 'windows', device: 'desktop' }); + const browserHeaders = { + 'User-Agent': ua, + Accept: 'application/json, text/plain, */*', + 'Accept-Language': 'en-US,en;q=0.9', + Referer: 'https://www.reuters.com/', + }; + try { const { title, description, rootUrl, response } = await (async () => { if (MUST_FETCH_BY_TOPICS.has(category)) { @@ -104,6 +113,7 @@ async function handler(ctx) { website: 'reuters', }), }, + headers: browserHeaders, }); return { @@ -130,6 +140,7 @@ async function handler(ctx) { : {}), }), }, + headers: browserHeaders, }); return { title: response.result.section.title, @@ -157,7 +168,9 @@ async function handler(ctx) { items.map((item) => ctx.req.query('fulltext') === 'true' ? cache.tryGet(item.link, async () => { - const detailResponse = await ofetch(item.link); + const detailResponse = await ofetch(item.link, { + headers: browserHeaders, + }); const content = load(detailResponse.data); if (detailResponse.url.startsWith('https://www.reuters.com/investigates/')) { @@ -220,7 +233,9 @@ async function handler(ctx) { // Fallback to arc outboundfeeds if API fails const arcUrl = topic ? `https://www.reuters.com/arc/outboundfeeds/v4/mobile/section${section_id}?outputType=json` : `https://www.reuters.com/arc/outboundfeeds/v4/mobile/section/${category}/?outputType=json`; - const arcResponse = await ofetch(arcUrl); + const arcResponse = await ofetch(arcUrl, { + headers: browserHeaders, + }); if (arcResponse.wireitems?.length) { const items = arcResponse.wireitems .map((item) => { From edf603fbbe1bd16cbb1599b481bda27b66be8af3 Mon Sep 17 00:00:00 2001 From: SuperJeason <118799372+SuperJeason@users.noreply.github.com> Date: Sat, 12 Apr 2025 22:11:44 +0800 Subject: [PATCH 0421/2658] fix(route): fix swjtu/scai/bks route (#18832) * fix(route): fix swjtu/scai/bks route) * fix(route): fix swjtu/scai/bks route) * fix(route): fix swjtu/scai/bks route) * fix(route): fix swjtu/scai/bks route) * fix(route): fix swjtu/scai/bks route) * fix(route): fix swjtu/scai/bks route) * fix(route): fix swjtu/scai/bks route) --- lib/routes/swjtu/scai.ts | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/lib/routes/swjtu/scai.ts b/lib/routes/swjtu/scai.ts index 2e76f8d936c2..35fc42cf8e08 100644 --- a/lib/routes/swjtu/scai.ts +++ b/lib/routes/swjtu/scai.ts @@ -54,21 +54,36 @@ const partition = { const getItem = (item, cache) => { const title = item.find('a').text(); const link = `${rootURL}${item.find('a').attr('href').slice(2)}`; + // console.log(link); return cache.tryGet(link, async () => { const res = await ofetch(link); const $ = load(res); - + let pubDate: Date; let dateText = $('div.news-info span:nth-of-type(2)').text(); // 转教务通知时的时间获取方法 if (!dateText) { dateText = $('div.news-top-bar span:nth-of-type(1)').text(); } // 'date' may be undefined. and 'parseDate' will return current time. - const date = dateText.match(/\d{4}(-|\/|.)\d{1,2}\1\d{1,2}/)?.[0]; - const pubDate = parseDate(date); + // 转其他院的通知,获取不到具体时间,先从列表页获取具体信息 + if (dateText) { + const dateMatch = dateText.match(/\d{4}(-|\/|.)\d{1,2}\1\d{1,2}/); + if (!dateMatch || !dateMatch[0]) { + return null; + } + pubDate = parseDate(dateMatch[0]); + } else { + const dateItem = item.find('.calendar'); // 注意 .calendar 是 class + const day = dateItem.find('.day').text().trim(); // "31" (文本需 trim 去空格) + const ymd = dateItem.find('.date').text().trim(); // "2025/03" + const [year, month] = ymd.split('/'); // ["2025", "03"] + const dateText = `${year}-${month}-${day.padStart(2, '0')}`; + pubDate = new Date(dateText); + } const description = $('div.content-main').html(); - + // 确实无法获取时间就以当前时间为准 + pubDate ||= new Date('2025-04-12'); // 使用当前时间作为默认值 return { title, pubDate, From 31e16cabcec38c2cae8686ff4f9af959974d7ab1 Mon Sep 17 00:00:00 2001 From: Laam Pui Date: Sun, 13 Apr 2025 03:18:21 +0800 Subject: [PATCH 0422/2658] feat(route): added jin10 category. (#18812) --- lib/routes/jin10/category.ts | 223 +++++++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 lib/routes/jin10/category.ts diff --git a/lib/routes/jin10/category.ts b/lib/routes/jin10/category.ts new file mode 100644 index 000000000000..52ff3c42478c --- /dev/null +++ b/lib/routes/jin10/category.ts @@ -0,0 +1,223 @@ +import { Route, ViewType } from '@/types'; +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; +import { art } from '@/utils/render'; +import path from 'node:path'; +import { config } from '@/config'; + +export const route: Route = { + path: '/category/:id', + categories: ['finance'], + view: ViewType.Notifications, + example: '/jin10/category/36', + parameters: { id: '分类id,见下表' }, + description: ` +| Name | ID | +|----------------|------| +| 贵金属 | 1 | +| 黄金 | 2 | +| 白银 | 3 | +| 钯金 | 4 | +| 铂金 | 5 | +| 石油 | 6 | +| WTI原油 | 7 | +| 布伦特原油 | 8 | +| 欧佩克 | 9 | +| 页岩气 | 10 | +| 原油市场报告 | 11 | +| 外汇 | 12 | +| 欧元 | 13 | +| 英镑 | 14 | +| 日元 | 15 | +| 美元 | 16 | +| 瑞郎 | 17 | +| 人民币 | 18 | +| 期货 | 36 | +| 油脂油料 | 145 | +| 钢矿 | 146 | +| 煤炭 | 147 | +| 化工 | 148 | +| 有色 | 149 | +| 谷物 | 150 | +| 糖棉果蛋 | 151 | +| 生猪 | 152 | +| 碳排放 | 154 | +| 数字货币 | 19 | +| 数字人民币 | 107 | +| 科技 | 22 | +| 手机 | 23 | +| 电动汽车 | 39 | +| 芯片 | 40 | +| 中国突破 | 41 | +| 5G | 42 | +| 量子计算 | 43 | +| 航空航天 | 158 | +| 元宇宙 | 165 | +| 人工智能 | 168 | +| 地缘局势 | 24 | +| 缅甸局势 | 44 | +| 印巴纷争 | 45 | +| 中东风云 | 46 | +| 阿富汗局势 | 155 | +| 俄乌冲突 | 167 | +| 人物 | 25 | +| 鲍威尔 | 47 | +| 马斯克 | 48 | +| 拉加德 | 49 | +| 特朗普 | 50 | +| 拜登 | 51 | +| 巴菲特 | 157 | +| 央行 | 26 | +| 美联储 | 53 | +| 中国央行 | 54 | +| 欧洲央行 | 55 | +| 日本央行 | 56 | +| 货币政策调整 | 137 | +| 英国央行 | 141 | +| 澳洲联储 | 159 | +| 新西兰联储 | 160 | +| 加拿大央行 | 161 | +| 美股 | 27 | +| 财报 | 59 | +| Reddit散户动态 | 60 | +| 个股动态 | 108 | +| 港股 | 28 | +| 美股回港 | 61 | +| 交易所动态 | 62 | +| 指数动态 | 63 | +| 个股动态 | 109 | +| A股 | 29 | +| 美股回A | 64 | +| 券商分析 | 65 | +| 板块异动 | 66 | +| 大盘动态 | 67 | +| 南北资金 | 68 | +| 亚盘动态 | 69 | +| IPO信息 | 70 | +| 个股动态 | 110 | +| 北交所 | 166 | +| 基金 | 30 | +| 投行机构 | 31 | +| 标普、惠誉、穆迪 | 71 | +| 美银 | 72 | +| 高盛 | 112 | +| 疫情 | 32 | +| 疫苗动态 | 73 | +| 确诊数据 | 74 | +| 新冠药物 | 113 | +| 债券 | 33 | +| 政策 | 34 | +| 中国 | 75 | +| 美国 | 76 | +| 欧盟 | 77 | +| 日本 | 78 | +| 贸易、关税 | 79 | +| 碳中和 | 80 | +| 中国香港 | 81 | +| 英国 | 120 | +| 房地产动态 | 156 | +| 经济数据 | 35 | +| 中国 | 82 | +| 美国 | 83 | +| 欧盟 | 84 | +| 日本 | 85 | +| 公司 | 37 | +| 特斯拉 | 86 | +| 苹果 | 90 | +| 独角兽 | 91 | +| 谷歌 | 92 | +| 华为 | 93 | +| 阿里巴巴 | 94 | +| 小米 | 95 | +| 字节跳动 | 116 | +| 腾讯 | 117 | +| 微软 | 118 | +| 百度 | 119 | +| 美团 | 162 | +| 滴滴 | 163 | +| 中国恒大 | 164 | +| 灾害事故 | 38 | +| 地震 | 96 | +| 爆炸 | 97 | +| 海啸 | 98 | +| 寒潮 | 99 | +| 洪涝 | 100 | +| 火灾 | 101 | +| 矿难 | 102 | +| 枪击案 | 103 | +`, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['jin10.com/'], + target: '', + }, + ], + name: '外汇', + maintainers: ['laampui'], + handler, + url: 'jin10.com/', +}; + +async function handler(ctx) { + const id = ctx.req.param('id'); + const data = await cache.tryGet( + 'jin10:aa:${category}', + async () => { + const { data: response } = await got('https://4a735ea38f8146198dc205d2e2d1bd28.z3c.jin10.com/flash', { + headers: { + 'x-app-id': 'bVBF4FyRTn5NJF5n', + 'x-version': '1.0', + }, + searchParams: { + channel: '-8200', + vip: '1', + classify: `[${id}]`, + }, + }); + return response.data.filter((item) => item.type !== 1); + }, + config.cache.routeExpire, + false + ); + + const item = data.map((item) => { + const titleMatch = item.data.content.match(/^【(.*?)】/); + let title; + let content = item.data.content; + if (titleMatch) { + title = titleMatch[1]; + content = content.replace(titleMatch[0], ''); + } else { + title = item.data.vip_title || item.data.content; + } + + return { + title, + description: art(path.join(__dirname, 'templates/description.art'), { + content, + pic: item.data.pic, + }), + pubDate: timezone(parseDate(item.time), 8), + guid: `jin10:category:${item.id}`, + }; + }); + + return { + title: '金十数据', + link: 'https://www.jin10.com/', + item, + }; +} From 1adbdf54eb6ef145a75a7d32e9b6ad7215daa4b7 Mon Sep 17 00:00:00 2001 From: Kjasn Date: Mon, 14 Apr 2025 00:10:32 +0800 Subject: [PATCH 0423/2658] fix(route): fix hanime1 previews video posters not displaying (#18835) --- lib/routes/hanime1/previews.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/routes/hanime1/previews.ts b/lib/routes/hanime1/previews.ts index 3d0b0c5c2c9f..773a27ac5ef4 100644 --- a/lib/routes/hanime1/previews.ts +++ b/lib/routes/hanime1/previews.ts @@ -50,9 +50,9 @@ export const route: Route = { // 发布时间 MMDD const rawDate = row.find('.preview-info-cover div').text().trim(); - // 链接 + // 视频 选中模态框全局查找 const modalSelector = row.find('.trailer-modal-trigger').attr('data-target') || ''; - const previewVideoLink = modalSelector ? $(modalSelector).find('video source').attr('src') || '' : ''; + const previewVideoLink = modalSelector ? $(`${modalSelector} video source`).attr('src') || '' : ''; // 简介 const description = row.find('.caption').first().text().trim(); @@ -68,8 +68,11 @@ export const route: Route = { description: `

${description}

Tags: [${tags.join(', ')}]

+ `, - // image: previewImageSrc, enclosure_url: previewImageSrc, enclosure_type: 'image/jpeg', link: previewVideoLink, From 9847673e925b3dae3cda5fb0bf110ab91cf241e3 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Mon, 14 Apr 2025 00:56:50 +0800 Subject: [PATCH 0424/2658] =?UTF-8?q?feat(route):=20add=20=E5=B9=BF?= =?UTF-8?q?=E5=91=8A=E9=97=A8=E6=9C=80=E6=96=B0=E6=96=87=E7=AB=A0=20(#1883?= =?UTF-8?q?9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/adquan/index.ts | 146 ++++++++++++++++++++ lib/routes/adquan/namespace.ts | 9 ++ lib/routes/adquan/templates/description.art | 7 + 3 files changed, 162 insertions(+) create mode 100644 lib/routes/adquan/index.ts create mode 100644 lib/routes/adquan/namespace.ts create mode 100644 lib/routes/adquan/templates/description.art diff --git a/lib/routes/adquan/index.ts b/lib/routes/adquan/index.ts new file mode 100644 index 000000000000..5725762ebccd --- /dev/null +++ b/lib/routes/adquan/index.ts @@ -0,0 +1,146 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import { art } from '@/utils/render'; +import cache from '@/utils/cache'; +import { getCurrentPath } from '@/utils/helpers'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; +import path from 'node:path'; + +const __dirname = getCurrentPath(import.meta.url); + +export const handler = async (ctx: Context): Promise => { + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const baseUrl: string = 'https://www.adquan.com'; + const targetUrl: string = baseUrl; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language = $('html').attr('lang') ?? 'zh-CN'; + + let items: DataItem[] = []; + + items = $('div.article_1') + .slice(0, limit) + .toArray() + .map((el): Element => { + const $el: Cheerio = $(el); + + const title: string = $el.find('p.article_2_p').text(); + const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + intro: $el.find('div.article_1_fu p').first().text(), + }); + const pubDateStr: string | undefined = $el.find('div.article_1_fu p').last().text(); + const linkUrl: string | undefined = $el.find('a.article_2_href').attr('href'); + const authors: DataItem['author'] = $el.find('div.article_4').text(); + const image: string | undefined = $el.find('img.article_1_img').attr('src'); + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? parseDate(pubDateStr) : undefined, + link: linkUrl, + author: authors, + content: { + html: description, + text: description, + }, + image, + banner: image, + updated: upDatedStr ? parseDate(upDatedStr) : undefined, + language, + }; + + return processedItem; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async (): Promise => { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('p.infoTitle_left').text(); + const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + description: $$('div.articleContent').html(), + }); + const pubDateStr: string | undefined = $$('p.time').text().split(/:/).pop(); + const categoryEls: Element[] = $$('span.article_5').toArray(); + const categories: string[] = [...new Set(categoryEls.map((el) => $$(el).text()).filter(Boolean))]; + const authors: DataItem['author'] = $$('div.infoTitle_right span').text(); + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? timezone(parseDate(pubDateStr), +8) : item.pubDate, + category: categories, + author: authors, + content: { + html: description, + text: description, + }, + updated: upDatedStr ? timezone(parseDate(upDatedStr), +8) : item.updated, + language, + }; + + return { + ...item, + ...processedItem, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + return { + title: $('title').text(), + description: $('meta[name="description"]').attr('content'), + link: targetUrl, + item: items, + allowEmpty: true, + image: $('img.navi_logo').attr('src'), + author: $('meta[name="author"]').attr('content'), + language, + id: targetUrl, + }; +}; + +export const route: Route = { + path: '/', + name: '最新文章', + url: 'www.adquan.com', + maintainers: ['nczitzk'], + handler, + example: '/adquan', + parameters: undefined, + description: undefined, + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.adquan.com'], + target: '/', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/adquan/namespace.ts b/lib/routes/adquan/namespace.ts new file mode 100644 index 000000000000..68736d1fe4e7 --- /dev/null +++ b/lib/routes/adquan/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '广告门', + url: 'adquan.com', + categories: ['new-media'], + description: '一个行业的跌宕起伏', + lang: 'zh-CN', +}; diff --git a/lib/routes/adquan/templates/description.art b/lib/routes/adquan/templates/description.art new file mode 100644 index 000000000000..57498ab45a9d --- /dev/null +++ b/lib/routes/adquan/templates/description.art @@ -0,0 +1,7 @@ +{{ if intro }} +
{{ intro }}
+{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From 5e91602190a729be8de40b961e9f17916264036d Mon Sep 17 00:00:00 2001 From: shunwork <128399189+shunwork@users.noreply.github.com> Date: Mon, 14 Apr 2025 02:55:37 +0900 Subject: [PATCH 0425/2658] =?UTF-8?q?feat(ApplePodcast):=20remove=20seoEpi?= =?UTF-8?q?sode=20check=20because=20it=20is=20removed=20fro=E2=80=A6=20(#1?= =?UTF-8?q?8838)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(ApplePodcast): remove seoEpisode check because it is removed from source * fix(ApplePodcast): parse seoEpisodes from new position rather than removing it --- lib/routes/apple/podcast.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/apple/podcast.ts b/lib/routes/apple/podcast.ts index 6eb313987ec0..ccd264561d10 100644 --- a/lib/routes/apple/podcast.ts +++ b/lib/routes/apple/podcast.ts @@ -40,9 +40,10 @@ async function handler(ctx) { const $ = load(response.data); + const schemaShow = JSON.parse($(String.raw`#schema\:show`).text()); const serializedServerData = JSON.parse($('#serialized-server-data').text()); - const seoEpisodes = serializedServerData[0].data.seoData.schemaContent.workExample; + const seoEpisodes = schemaShow.workExample; const originEpisodes = serializedServerData[0].data.shelves.find((item) => item.contentType === 'episode').items; const header = serializedServerData[0].data.shelves.find((item) => item.contentType === 'showHeaderRegular').items[0]; From 636f8ffff3a6a8202d5bc54fb97c7c25b879072c Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Mon, 14 Apr 2025 16:01:38 +0800 Subject: [PATCH 0426/2658] feat(route/youtube): add `filterShorts` routerParam to make feeds concise --- lib/routes/youtube/channel.ts | 52 ++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/lib/routes/youtube/channel.ts b/lib/routes/youtube/channel.ts index 3a0690a50226..4c04cb81dd0d 100644 --- a/lib/routes/youtube/channel.ts +++ b/lib/routes/youtube/channel.ts @@ -7,10 +7,32 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { - path: '/channel/:id/:embed?', + path: '/channel/:id/:routeParams?', categories: ['social-media'], example: '/youtube/channel/UCDwDMPOZfxVV0x_dz0eQ8KQ', - parameters: { id: 'YouTube channel id', embed: 'Default to embed the video, set to any value to disable embedding' }, + parameters: { + id: 'YouTube channel id', + routeParams: 'Extra parameters, see the table below', + }, + radar: [ + { + source: ['www.youtube.com/channel/:id'], + target: '/channel/:id', + }, + ], + name: 'Channel with id', + maintainers: ['DIYgod', 'pseudoyu'], + handler, + description: `:::tip Parameter +| Name | Description | Default | +| ---------- | ----------------------------------------------------------------------------------- | ------- | +| embed | Whether to embed the video, fill in any value to disable embedding | embed | +| filterShorts | Whether to filter out shorts from the feed, fill in any falsy value to show shorts | true | +::: + +::: tip +YouTube provides official RSS feeds for channels, for instance [https://www.youtube.com/feeds/videos.xml?channel\_id=UCDwDMPOZfxVV0x\_dz0eQ8KQ](https://www.youtube.com/feeds/videos.xml?channel_id=UCDwDMPOZfxVV0x_dz0eQ8KQ). +:::`, features: { requireConfig: [ { @@ -24,18 +46,6 @@ export const route: Route = { supportPodcast: false, supportScihub: false, }, - radar: [ - { - source: ['www.youtube.com/channel/:id'], - target: '/channel/:id', - }, - ], - name: 'Channel with id', - maintainers: ['DIYgod'], - handler, - description: `::: tip -YouTube provides official RSS feeds for channels, for instance [https://www.youtube.com/feeds/videos.xml?channel\_id=UCDwDMPOZfxVV0x\_dz0eQ8KQ](https://www.youtube.com/feeds/videos.xml?channel_id=UCDwDMPOZfxVV0x_dz0eQ8KQ). -:::`, }; async function handler(ctx) { @@ -43,13 +53,23 @@ async function handler(ctx) { throw new ConfigNotFoundError('YouTube RSS is disabled due to the lack of
relevant config'); } const id = ctx.req.param('id'); - const embed = !ctx.req.param('embed'); + + // Parse route parameters + const routeParams = ctx.req.param('routeParams'); + const params = new URLSearchParams(routeParams); + + // Get embed parameter + const embed = !params.get('embed'); + + // Get filterShorts parameter (default to true if not specified) + const filterShortsStr = params.get('filterShorts'); + const filterShorts = filterShortsStr === null || filterShortsStr === '' || filterShortsStr === 'true'; if (!utils.isYouTubeChannelId(id)) { throw new InvalidParameterError(`Invalid YouTube channel ID. \nYou may want to use /youtube/user/:id instead.`); } - const playlistId = (await utils.getChannelWithId(id, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads; + const playlistId = filterShorts ? 'UULF' + id.slice(2) : (await utils.getChannelWithId(id, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads; // Default uploads playlist const data = (await utils.getPlaylistItems(playlistId, 'snippet', cache)).data.items; From b0ab27df928ad7e48d53fc26a5cc7872c77f36a0 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Mon, 14 Apr 2025 16:21:35 +0800 Subject: [PATCH 0427/2658] feat(route/youtube): filter shorts in channel with handle route --- lib/routes/youtube/channel.ts | 6 ++++- lib/routes/youtube/user.ts | 47 ++++++++++++++++++++++++++++------- lib/routes/youtube/utils.ts | 17 +++++++++++++ 3 files changed, 60 insertions(+), 10 deletions(-) diff --git a/lib/routes/youtube/channel.ts b/lib/routes/youtube/channel.ts index 4c04cb81dd0d..386f396e1e73 100644 --- a/lib/routes/youtube/channel.ts +++ b/lib/routes/youtube/channel.ts @@ -69,7 +69,11 @@ async function handler(ctx) { throw new InvalidParameterError(`Invalid YouTube channel ID. \nYou may want to use /youtube/user/:id instead.`); } - const playlistId = filterShorts ? 'UULF' + id.slice(2) : (await utils.getChannelWithId(id, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads; // Default uploads playlist + // Get original uploads playlist ID if needed + const originalPlaylistId = filterShorts ? null : (await utils.getChannelWithId(id, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads; + + // Use the utility function to get the appropriate playlist ID based on filterShorts setting + const playlistId = filterShorts ? utils.getPlaylistWithShortsFilter(id) : originalPlaylistId; const data = (await utils.getPlaylistItems(playlistId, 'snippet', cache)).data.items; diff --git a/lib/routes/youtube/user.ts b/lib/routes/youtube/user.ts index 5d0fe5a111b7..a9efe79b7500 100644 --- a/lib/routes/youtube/user.ts +++ b/lib/routes/youtube/user.ts @@ -9,11 +9,20 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; import NotFoundError from '@/errors/types/not-found'; export const route: Route = { - path: '/user/:username/:embed?', + path: '/user/:username/:routeParams?', categories: ['social-media', 'popular'], view: ViewType.Videos, example: '/youtube/user/@JFlaMusic', - parameters: { username: 'YouTuber handle with @', embed: 'Default to embed the video, set to any value to disable embedding' }, + parameters: { + username: 'YouTuber handle with @', + routeParams: 'Extra parameters, see the table below', + }, + description: `:::tip Parameter +| Name | Description | Default | +| ---------- | ----------------------------------------------------------------------------------- | ------- | +| embed | Whether to embed the video, fill in any value to disable embedding | embed | +| filterShorts | Whether to filter out shorts from the feed, fill in any falsy value to show shorts | true | +:::`, features: { requireConfig: [ { @@ -34,7 +43,7 @@ export const route: Route = { }, ], name: 'Channel with user handle', - maintainers: ['DIYgod'], + maintainers: ['DIYgod', 'pseudoyu'], handler, }; @@ -43,7 +52,17 @@ async function handler(ctx) { throw new ConfigNotFoundError('YouTube RSS is disabled due to the lack of relevant config'); } const username = ctx.req.param('username'); - const embed = !ctx.req.param('embed'); + + // Parse route parameters + const routeParams = ctx.req.param('routeParams'); + const params = new URLSearchParams(routeParams); + + // Get embed parameter + const embed = !params.get('embed'); + + // Get filterShorts parameter (default to true if not specified) + const filterShortsStr = params.get('filterShorts'); + const filterShorts = filterShortsStr === null || filterShortsStr === '' || filterShortsStr === 'true'; let userHandleData; if (username.startsWith('@')) { @@ -72,16 +91,26 @@ async function handler(ctx) { }; }); } - const playlistId = - userHandleData?.playlistId || - (await (async () => { + + // Get the appropriate playlist ID based on filterShorts setting + const playlistId = await (async () => { + if (userHandleData?.playlistId) { + const origPlaylistId = userHandleData.playlistId; + + return utils.getPlaylistWithShortsFilter(origPlaylistId, filterShorts); + } else { const channelData = await utils.getChannelWithUsername(username, 'contentDetails', cache); const items = channelData.data.items; + if (!items) { throw new NotFoundError(`The channel https://www.youtube.com/user/${username} does not exist.`); } - return items[0].contentDetails.relatedPlaylists.uploads; - })()); + + const channelId = items[0].id; + + return filterShorts ? utils.getPlaylistWithShortsFilter(channelId, filterShorts) : items[0].contentDetails.relatedPlaylists.uploads; + } + })(); const playlistItems = await utils.getPlaylistItems(playlistId, 'snippet', cache); if (!playlistItems) { diff --git a/lib/routes/youtube/utils.ts b/lib/routes/youtube/utils.ts index 0b468409a687..d04c2af12b71 100644 --- a/lib/routes/youtube/utils.ts +++ b/lib/routes/youtube/utils.ts @@ -154,6 +154,22 @@ export const getLive = (id, cache) => }); export const getVideoUrl = (id: string) => `https://www.youtube-nocookie.com/embed/${id}?controls=1&autoplay=1&mute=0`; +// Get the appropriate playlist ID with or without shorts +export const getPlaylistWithShortsFilter = (id: string, filterShorts = true): string => { + // If filtering shorts is enabled + if (filterShorts) { + if (id.startsWith('UC')) { + // For channel IDs (UC...), convert to playlist format without shorts (UULF...) + return 'UULF' + id.slice(2); + } else if (id.startsWith('UU')) { + // For playlist IDs (UU...), convert to playlist format without shorts (UULF...) + return 'UULF' + id.slice(2); + } + } + // If filterShorts is false or the ID format doesn't match known patterns, return original ID + return id; +}; + const youtubeUtils = { getPlaylistItems, getPlaylist, @@ -167,5 +183,6 @@ const youtubeUtils = { isYouTubeChannelId, getLive, getVideoUrl, + getPlaylistWithShortsFilter, }; export default youtubeUtils; From a0a226800593272f338da76100097d130331c251 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 01:56:55 -0700 Subject: [PATCH 0428/2658] chore(deps-dev): bump @types/node from 22.14.0 to 22.14.1 (#18847) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.14.0 to 22.14.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.14.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 80 +++++++++++++++++++++++++------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 68318a27bd99..7bea909a7f0d 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.14.0", + "@types/node": "22.14.1", "@types/sanitize-html": "2.15.0", "@types/supertest": "6.0.3", "@types/tiny-async-pool": "2.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 843648ebd517..31c78250ffe5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -349,8 +349,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.14.0 - version: 22.14.0 + specifier: 22.14.1 + version: 22.14.1 '@types/sanitize-html': specifier: 2.15.0 version: 2.15.0 @@ -377,7 +377,7 @@ importers: version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) + version: 2.1.9(vitest@2.1.9(@types/node@22.14.1)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) discord-api-types: specifier: 0.37.120 version: 0.37.120 @@ -446,10 +446,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.14.0)) + version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.14.1)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) + version: 2.1.9(@types/node@22.14.1)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -2218,8 +2218,8 @@ packages: '@types/node-fetch@2.6.12': resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} - '@types/node@22.14.0': - resolution: {integrity: sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==} + '@types/node@22.14.1': + resolution: {integrity: sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -7146,7 +7146,7 @@ snapshots: '@inquirer/figures': 1.0.11 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7915,7 +7915,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/cookie@0.6.0': {} @@ -7938,12 +7938,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/html-to-text@9.0.4': {} @@ -7951,13 +7951,13 @@ snapshots: '@types/imapflow@1.0.20': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7967,7 +7967,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/jsrsasign@10.5.13': {} @@ -7977,7 +7977,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7999,18 +7999,18 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/mysql@2.15.26': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/node-fetch@2.6.12': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 form-data: 4.0.2 - '@types/node@22.14.0': + '@types/node@22.14.1': dependencies: undici-types: 6.21.0 @@ -8022,7 +8022,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 pg-protocol: 1.8.0 pg-types: 2.2.0 @@ -8034,7 +8034,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/tough-cookie': 4.0.5 form-data: 2.5.3 @@ -8050,7 +8050,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.14.0 + '@types/node': 22.14.1 form-data: 4.0.2 '@types/supertest@6.0.3': @@ -8060,7 +8060,7 @@ snapshots: '@types/tedious@4.0.14': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 '@types/tiny-async-pool@2.0.3': {} @@ -8078,7 +8078,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 optional: true '@typescript-eslint/eslint-plugin@8.29.1(@typescript-eslint/parser@8.29.1(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3)': @@ -8221,7 +8221,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.14.1)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8235,7 +8235,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) + vitest: 2.1.9(@types/node@22.14.1)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) transitivePeerDependencies: - supports-color @@ -8246,14 +8246,14 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.14.0))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.14.1))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.3(typescript@5.8.3) - vite: 5.4.15(@types/node@22.14.0) + vite: 5.4.15(@types/node@22.14.1) '@vitest/pretty-format@2.1.9': dependencies: @@ -11095,7 +11095,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.14.0 + '@types/node': 22.14.1 long: 5.3.1 proxy-agent@6.4.0: @@ -12033,13 +12033,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.9(@types/node@22.14.0): + vite-node@2.1.9(@types/node@22.14.1): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.15(@types/node@22.14.0) + vite: 5.4.15(@types/node@22.14.1) transitivePeerDependencies: - '@types/node' - less @@ -12051,30 +12051,30 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.14.0)): + vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.14.1)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.3) optionalDependencies: - vite: 5.4.15(@types/node@22.14.0) + vite: 5.4.15(@types/node@22.14.1) transitivePeerDependencies: - supports-color - typescript - vite@5.4.15(@types/node@22.14.0): + vite@5.4.15(@types/node@22.14.1): dependencies: esbuild: 0.21.5 postcss: 8.5.3 rollup: 4.37.0 optionalDependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 fsevents: 2.3.3 - vitest@2.1.9(@types/node@22.14.0)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)): + vitest@2.1.9(@types/node@22.14.1)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.14.0)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.14.1)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -12090,11 +12090,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.15(@types/node@22.14.0) - vite-node: 2.1.9(@types/node@22.14.0) + vite: 5.4.15(@types/node@22.14.1) + vite-node: 2.1.9(@types/node@22.14.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.14.0 + '@types/node': 22.14.1 jsdom: 26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From b2df8b4d372400b8019587e8b8a372a1333e7e73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 01:57:46 -0700 Subject: [PATCH 0429/2658] chore(deps): bump ioredis from 5.6.0 to 5.6.1 (#18848) Bumps [ioredis](https://github.com/luin/ioredis) from 5.6.0 to 5.6.1. - [Release notes](https://github.com/luin/ioredis/releases) - [Changelog](https://github.com/redis/ioredis/blob/main/CHANGELOG.md) - [Commits](https://github.com/luin/ioredis/compare/v5.6.0...v5.6.1) --- updated-dependencies: - dependency-name: ioredis dependency-version: 5.6.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 7bea909a7f0d..8c0a355c4420 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "iconv-lite": "0.6.3", "imapflow": "1.0.184", "instagram-private-api": "1.46.1", - "ioredis": "5.6.0", + "ioredis": "5.6.1", "ip-regex": "5.0.0", "jsdom": "26.0.0", "json-bigint": "1.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31c78250ffe5..aba8bf179120 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -141,8 +141,8 @@ importers: specifier: 1.46.1 version: 1.46.1 ioredis: - specifier: 5.6.0 - version: 5.6.0 + specifier: 5.6.1 + version: 5.6.1 ip-regex: specifier: 5.0.0 version: 5.0.0 @@ -3877,8 +3877,8 @@ packages: re2: optional: true - ioredis@5.6.0: - resolution: {integrity: sha512-tBZlIIWbndeWBWCXWZiqtOF/yxf6yZX3tAlTJ7nfo5jhd6dctNxF7QnYlZLZ1a0o0pDoen7CgZqO+zjNaFbJAg==} + ioredis@5.6.1: + resolution: {integrity: sha512-UxC0Yv1Y4WRJiGQxQkP0hfdL0/5/6YvdfOOClRgJ0qppSarkhneSa6UvkMkms0AkdGimSH3Ikqm+6mkMmX7vGA==} engines: {node: '>=12.22.0'} ip-address@9.0.5: @@ -9420,7 +9420,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.4.0 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -9985,7 +9985,7 @@ snapshots: transitivePeerDependencies: - supports-color - ioredis@5.6.0: + ioredis@5.6.1: dependencies: '@ioredis/commands': 1.2.0 cluster-key-slot: 1.1.2 @@ -11101,7 +11101,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.3 - debug: 4.3.4 + debug: 4.4.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 From 4d7187e2ff5cad3444c7ae296ce41b4735ee72ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 01:58:09 -0700 Subject: [PATCH 0430/2658] chore(deps): bump city-timezones from 1.3.0 to 1.3.1 (#18846) Bumps [city-timezones](https://github.com/kevinroberts/city-timezones) from 1.3.0 to 1.3.1. - [Release notes](https://github.com/kevinroberts/city-timezones/releases) - [Commits](https://github.com/kevinroberts/city-timezones/compare/v1.3.0...v1.3.1) --- updated-dependencies: - dependency-name: city-timezones dependency-version: 1.3.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 8c0a355c4420..364f74430006 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "art-template": "4.13.2", "cheerio": "1.0.0", "chrono-node": "2.8.0", - "city-timezones": "1.3.0", + "city-timezones": "1.3.1", "cross-env": "7.0.3", "crypto-js": "4.2.0", "currency-symbol-map": "5.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aba8bf179120..f9b48f5f23f2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -81,8 +81,8 @@ importers: specifier: 2.8.0 version: 2.8.0 city-timezones: - specifier: 1.3.0 - version: 1.3.0 + specifier: 1.3.1 + version: 1.3.1 cross-env: specifier: 7.0.3 version: 7.0.3 @@ -2747,8 +2747,8 @@ packages: resolution: {integrity: sha512-cYY9mypksY8NRqgDB1XD1RiJL338v/551niynFTGkZOO2LHuB2OmOYxDIe/ttN9AHwrqdum1360G3ald0W9kCg==} engines: {node: '>=8'} - city-timezones@1.3.0: - resolution: {integrity: sha512-S/FiU8F/1HgMvbd8POvb+8xorp0tp5VJwUfYC/ssnbxykLbwEZ9poZWFMPfBVuh1KlXxP63DGCkdr0D8aFEADQ==} + city-timezones@1.3.1: + resolution: {integrity: sha512-YCeJKGyw3DA+wV/oyuFuJlk4oqN9zkfLP+fz2nEXUBm9sW1xZaXQsKQoc8l8hP+vI45GPOq8OuGrlGXUcnLISA==} cjs-module-lexer@1.4.3: resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} @@ -8647,7 +8647,7 @@ snapshots: ci-info@4.2.0: {} - city-timezones@1.3.0: + city-timezones@1.3.1: dependencies: lodash: 4.17.21 From 7026904563d8103169a40a2c5c0fa834f43d74d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 01:58:40 -0700 Subject: [PATCH 0431/2658] chore(deps): bump @hono/node-server from 1.14.0 to 1.14.1 (#18842) Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.14.0 to 1.14.1. - [Release notes](https://github.com/honojs/node-server/releases) - [Commits](https://github.com/honojs/node-server/compare/v1.14.0...v1.14.1) --- updated-dependencies: - dependency-name: "@hono/node-server" dependency-version: 1.14.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 364f74430006..30c9f2c639a1 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "dependencies": { "@bbob/html": "4.2.0", "@bbob/preset-html5": "4.2.0", - "@hono/node-server": "1.14.0", + "@hono/node-server": "1.14.1", "@hono/zod-openapi": "0.19.4", "@notionhq/client": "2.3.0", "@opentelemetry/api": "1.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f9b48f5f23f2..fe9c5fdad3a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,8 +24,8 @@ importers: specifier: 4.2.0 version: 4.2.0 '@hono/node-server': - specifier: 1.14.0 - version: 1.14.0(hono@4.7.6) + specifier: 1.14.1 + version: 1.14.1(hono@4.7.6) '@hono/zod-openapi': specifier: 0.19.4 version: 0.19.4(hono@4.7.6)(zod@3.24.2) @@ -1401,8 +1401,8 @@ packages: resolution: {integrity: sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@hono/node-server@1.14.0': - resolution: {integrity: sha512-YUCxJwgHRKSqjrdTk9e4VMGKN27MK5r4+MGPyZTgKH+IYbK+KtYbHeOcPGJ91KGGD6RIQiz2dAHxvjauNhOS8g==} + '@hono/node-server@1.14.1': + resolution: {integrity: sha512-vmbuM+HPinjWzPe7FFPWMMQMsbKE9gDPhaH0FFdqbGpkT5lp++tcWDTxwBl5EgS5y6JVgIaCdjeHRfQ4XRBRjQ==} engines: {node: '>=18.14.1'} peerDependencies: hono: ^4 @@ -7092,7 +7092,7 @@ snapshots: '@eslint/core': 0.13.0 levn: 0.4.1 - '@hono/node-server@1.14.0(hono@4.7.6)': + '@hono/node-server@1.14.1(hono@4.7.6)': dependencies: hono: 4.7.6 From 4e49d1b0f1f727ffd0a12a0ec1b1c43aed97faeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 01:59:34 -0700 Subject: [PATCH 0432/2658] chore(deps-dev): bump lint-staged from 15.5.0 to 15.5.1 (#18843) Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 15.5.0 to 15.5.1. - [Release notes](https://github.com/lint-staged/lint-staged/releases) - [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md) - [Commits](https://github.com/lint-staged/lint-staged/compare/v15.5.0...v15.5.1) --- updated-dependencies: - dependency-name: lint-staged dependency-version: 15.5.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 30c9f2c639a1..de1c0db2ba38 100644 --- a/package.json +++ b/package.json @@ -185,7 +185,7 @@ "got": "14.4.7", "husky": "9.1.7", "js-beautify": "1.15.4", - "lint-staged": "15.5.0", + "lint-staged": "15.5.1", "mockdate": "3.0.5", "msw": "2.4.3", "node-network-devtools": "1.0.25", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe9c5fdad3a8..c0f291918bf1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -418,8 +418,8 @@ importers: specifier: 1.15.4 version: 1.15.4 lint-staged: - specifier: 15.5.0 - version: 15.5.0 + specifier: 15.5.1 + version: 15.5.1 mockdate: specifier: 3.0.5 version: 3.0.5 @@ -4194,13 +4194,13 @@ packages: linkify-it@5.0.0: resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - lint-staged@15.5.0: - resolution: {integrity: sha512-WyCzSbfYGhK7cU+UuDDkzUiytbfbi0ZdPy2orwtM75P3WTtQBzmG40cCxIa8Ii2+XjfxzLH6Be46tUfWS85Xfg==} + lint-staged@15.5.1: + resolution: {integrity: sha512-6m7u8mue4Xn6wK6gZvSCQwBvMBR36xfY24nF5bMTf2MHDYG6S3yhJuOgdYVw99hsjyDt2d4z168b3naI8+NWtQ==} engines: {node: '>=18.12.0'} hasBin: true - listr2@8.2.5: - resolution: {integrity: sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ==} + listr2@8.3.2: + resolution: {integrity: sha512-vsBzcU4oE+v0lj4FhVLzr9dBTv4/fHIa57l+GCwovP8MoFNZJTOhGU8PXd4v2VJCbECAaijBiHntiekFMLvo0g==} engines: {node: '>=18.0.0'} locate-path@6.0.0: @@ -10281,22 +10281,22 @@ snapshots: dependencies: uc.micro: 2.1.0 - lint-staged@15.5.0: + lint-staged@15.5.1: dependencies: chalk: 5.4.1 commander: 13.1.0 debug: 4.4.0 execa: 8.0.1 lilconfig: 3.1.3 - listr2: 8.2.5 + listr2: 8.3.2 micromatch: 4.0.8 pidtree: 0.6.0 string-argv: 0.3.2 - yaml: 2.7.0 + yaml: 2.7.1 transitivePeerDependencies: - supports-color - listr2@8.2.5: + listr2@8.3.2: dependencies: cli-truncate: 4.0.0 colorette: 2.0.20 From 9fd53007baab130a2e63d251e5fc8d05e764d817 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 02:03:59 -0700 Subject: [PATCH 0433/2658] chore(deps): bump actions/setup-node from 4.3.0 to 4.4.0 (#18849) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.3.0 to 4.4.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/cdca7365b2dadb8aad0a33bc7601856ffabcc48e...49933ea5288caeca8642d1e84afbd3f7d6820020) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 4.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-assets.yml | 2 +- .github/workflows/comment-on-issue.yml | 2 +- .github/workflows/docker-test-cont.yml | 2 +- .github/workflows/format.yml | 2 +- .github/workflows/issue-command.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/npm-publish.yml | 2 +- .github/workflows/test-full-routes.yml | 2 +- .github/workflows/test.yml | 6 +++--- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-assets.yml b/.github/workflows/build-assets.yml index 9043b0c849f2..d6da6cca8779 100644 --- a/.github/workflows/build-assets.yml +++ b/.github/workflows/build-assets.yml @@ -21,7 +21,7 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - name: Use Node.js Active LTS - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: lts/* cache: 'pnpm' diff --git a/.github/workflows/comment-on-issue.yml b/.github/workflows/comment-on-issue.yml index f4d21656b491..6d2d8555e165 100644 --- a/.github/workflows/comment-on-issue.yml +++ b/.github/workflows/comment-on-issue.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: lts/* cache: 'pnpm' diff --git a/.github/workflows/docker-test-cont.yml b/.github/workflows/docker-test-cont.yml index b173f35b3bfb..8900c1e2b04f 100644 --- a/.github/workflows/docker-test-cont.yml +++ b/.github/workflows/docker-test-cont.yml @@ -75,7 +75,7 @@ jobs: - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 if: (env.TEST_CONTINUE) with: node-version: lts/* diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 53ffc14f573d..1a2c547290e7 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: lts/* cache: 'pnpm' diff --git a/.github/workflows/issue-command.yml b/.github/workflows/issue-command.yml index 12681ce3df2b..f6872b0219d1 100644 --- a/.github/workflows/issue-command.yml +++ b/.github/workflows/issue-command.yml @@ -71,7 +71,7 @@ jobs: uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - name: Use Node.js Active LTS - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: lts/* cache: 'pnpm' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f4d69b3d35d5..ea7cb4e6a4e9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,7 +21,7 @@ jobs: # - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 # with: # version: 9 - # - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + # - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 # with: # node-version: lts/* # cache: 'pnpm' @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: lts/* cache: 'pnpm' diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 8bc356a93117..585e24d94d2e 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: lts/* cache: 'pnpm' diff --git a/.github/workflows/test-full-routes.yml b/.github/workflows/test-full-routes.yml index 5d08e43e90c8..9c12379c9891 100644 --- a/.github/workflows/test-full-routes.yml +++ b/.github/workflows/test-full-routes.yml @@ -18,7 +18,7 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - name: Use Node.js Active LTS - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: lts/* cache: 'pnpm' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9841e57f2260..f12ff1dd57ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' @@ -73,7 +73,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' @@ -120,7 +120,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' From 21a681f035a9291cb25dd752dc513f5f9860cbd9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 20:46:04 +0800 Subject: [PATCH 0434/2658] chore(deps): bump tldts from 6.1.85 to 7.0.0 (#18845) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.85 to 7.0.0. - [Release notes](https://github.com/remusao/tldts/releases) - [Changelog](https://github.com/remusao/tldts/blob/master/CHANGELOG.md) - [Commits](https://github.com/remusao/tldts/compare/v6.1.85...v7.0.0) --- updated-dependencies: - dependency-name: tldts dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 25 +++++++++++++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index de1c0db2ba38..acd528155196 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "telegram": "2.26.22", "tiny-async-pool": "2.1.0", "title": "4.0.1", - "tldts": "6.1.85", + "tldts": "7.0.0", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.1.2", "tsx": "4.19.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c0f291918bf1..bba5cbd9d52a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -246,8 +246,8 @@ importers: specifier: 4.0.1 version: 4.0.1 tldts: - specifier: 6.1.85 - version: 6.1.85 + specifier: 7.0.0 + version: 7.0.0 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5550,13 +5550,20 @@ packages: resolution: {integrity: sha512-ZmyVB9DAw+FFTmLElGYJgdZFsKLYd/I59Bg9NHkCGPwAbVZNRilFWDMAdX8UG+bHuv7kfursd5XGqo/9wi26lA==} hasBin: true - tldts-core@6.1.85: - resolution: {integrity: sha512-DTjUVvxckL1fIoPSb3KE7ISNtkWSawZdpfxGxwiIrZoO6EbHVDXXUIlIuWympPaeS+BLGyggozX/HTMsRAdsoA==} + tldts-core@6.1.86: + resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} + + tldts-core@7.0.0: + resolution: {integrity: sha512-ZDylm+F2UZYtJp3zZj0PRSBTJ1aCQ7SmPr0tcq9UDMPEUfRd1qRBh/n6HL1KxQuV0gmLmSrRgiapMoDs0KllCA==} tldts@6.1.85: resolution: {integrity: sha512-gBdZ1RjCSevRPFix/hpaUWeak2/RNUZB4/8frF1r5uYMHjFptkiT0JXIebWvgI/0ZHXvxaUDDJshiA0j6GdL3w==} hasBin: true + tldts@7.0.0: + resolution: {integrity: sha512-f1DBZcYLK+YVRuiKKSuBS4QbZB5J+gf376pB/4CtJFxYQ3ivAWhQzgBolAmcUH0+zLJybXi2B9lcqHYnumT3yg==} + hasBin: true + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -11803,11 +11810,17 @@ snapshots: tlds@1.256.0: {} - tldts-core@6.1.85: {} + tldts-core@6.1.86: {} + + tldts-core@7.0.0: {} tldts@6.1.85: dependencies: - tldts-core: 6.1.85 + tldts-core: 6.1.86 + + tldts@7.0.0: + dependencies: + tldts-core: 7.0.0 tmp@0.0.33: dependencies: From 9913d8a4eb6eded31d17a493bd2c51bc44ac9460 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 20:47:22 +0800 Subject: [PATCH 0435/2658] chore(deps): bump @scalar/hono-api-reference from 0.8.0 to 0.8.1 (#18844) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.8.0 to 0.8.1. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-version: 0.8.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index acd528155196..59a10b8d180d 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.32.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.8.0", + "@scalar/hono-api-reference": "0.8.1", "@sentry/node": "9.12.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bba5cbd9d52a..791408085777 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.8.0 - version: 0.8.0(hono@4.7.6) + specifier: 0.8.1 + version: 0.8.1(hono@4.7.6) '@sentry/node': specifier: 9.12.0 version: 9.12.0 @@ -2042,12 +2042,12 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/core@0.2.6': - resolution: {integrity: sha512-if8qr0McLFijNvKl3Vtv9CPrMsjijbxbDSlgXErr6Y45h8KsM2kVaVf0pzirh3daBD3y+Yl0sqtTVkpAelsoSw==} + '@scalar/core@0.2.7': + resolution: {integrity: sha512-8BeyxQiTzd3yST43x1w3t47kgkQSBVfR+bpruXaLFxeITWjzOTro5Ojh+enGWnooIfg5wMDpNqfDJCbGOVq1hg==} engines: {node: '>=18'} - '@scalar/hono-api-reference@0.8.0': - resolution: {integrity: sha512-qpDeEj4YeB6+CJHt/ddj1KzDAYZfOmiD3QxOg0/t8IeWB1t4QImYySaWWzxIk9IoZpnOmaH2kq43GA/cfJ2Wfg==} + '@scalar/hono-api-reference@0.8.1': + resolution: {integrity: sha512-bKPJ6QPBOUEGupq4wKF1iUl3upsVkTdhIIkUwtEpEx9ox3CCsp0kxAUykhSUuhZ3Xhy6WcuMdigOlU5PzTY8xA==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -2056,8 +2056,8 @@ packages: resolution: {integrity: sha512-waiKk12cRCqyUCWTOX0K1WEVX46+hVUK+zRPzAahDJ7G0TApvbNkuy5wx7aoUyEk++HHde0XuQnshXnt8jsddA==} engines: {node: '>=18'} - '@scalar/types@0.1.6': - resolution: {integrity: sha512-4GQ9VwyZm5WiOsinCIioGfByQWI+K8cY/jce9EoaJ906mXOyHfwp6lQF/ddnEJ4ptkflKkGdEQ6jm+6PnwlB5w==} + '@scalar/types@0.1.7': + resolution: {integrity: sha512-irIDYzTQG2KLvFbuTI8k2Pz/R4JR+zUUSykVTbEMatkzMmVFnn1VzNSMlODbadycwZunbnL2tA27AXed9URVjw==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7807,20 +7807,20 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/core@0.2.6': + '@scalar/core@0.2.7': dependencies: - '@scalar/types': 0.1.6 + '@scalar/types': 0.1.7 - '@scalar/hono-api-reference@0.8.0(hono@4.7.6)': + '@scalar/hono-api-reference@0.8.1(hono@4.7.6)': dependencies: - '@scalar/core': 0.2.6 + '@scalar/core': 0.2.7 hono: 4.7.6 '@scalar/openapi-types@0.2.0': dependencies: zod: 3.24.2 - '@scalar/types@0.1.6': + '@scalar/types@0.1.7': dependencies: '@scalar/openapi-types': 0.2.0 '@unhead/schema': 1.11.20 From 6079e2e2b5a9721edaed7ec4d6cf4303ef72e755 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 20:47:41 +0800 Subject: [PATCH 0436/2658] chore(deps): bump jsdom from 26.0.0 to 26.1.0 (#18841) Bumps [jsdom](https://github.com/jsdom/jsdom) from 26.0.0 to 26.1.0. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md) - [Commits](https://github.com/jsdom/jsdom/compare/26.0.0...26.1.0) --- updated-dependencies: - dependency-name: jsdom dependency-version: 26.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 31 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 59a10b8d180d..339659d12ae5 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "instagram-private-api": "1.46.1", "ioredis": "5.6.1", "ip-regex": "5.0.0", - "jsdom": "26.0.0", + "jsdom": "26.1.0", "json-bigint": "1.0.0", "jsonpath-plus": "10.3.0", "jsrsasign": "10.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 791408085777..70e207d1def6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -147,8 +147,8 @@ importers: specifier: 5.0.0 version: 5.0.0 jsdom: - specifier: 26.0.0 - version: 26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + specifier: 26.1.0 + version: 26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) json-bigint: specifier: 1.0.0 version: 1.0.0 @@ -377,7 +377,7 @@ importers: version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.14.1)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) + version: 2.1.9(vitest@2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) discord-api-types: specifier: 0.37.120 version: 0.37.120 @@ -449,7 +449,7 @@ importers: version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.14.1)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.14.1)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) + version: 2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -4068,8 +4068,8 @@ packages: resolution: {integrity: sha512-/kmVISmrwVwtyYU40iQUOp3SUPk2dhNCMsZBQX0R1/jZ8maaXJ/oZIzUOiyOqcgtLnETFKYChbJ5iDC/eWmFHg==} engines: {node: '>=0.1.90'} - jsdom@26.0.0: - resolution: {integrity: sha512-BZYDGVAIriBWTpIxYzrXjv3E/4u8+/pSG5bQdIYCbNCGOvsPkDQfTVLAIXAf9ETdCpduCVTkDe2NNZ8NIwUVzw==} + jsdom@26.1.0: + resolution: {integrity: sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==} engines: {node: '>=18'} peerDependencies: canvas: ^3.0.0 @@ -4640,8 +4640,8 @@ packages: nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - nwsapi@2.2.19: - resolution: {integrity: sha512-94bcyI3RsqiZufXjkr3ltkI86iEl+I7uiHVDtcq9wJUTwYQJ5odHDeSzkkrRzi80jJ8MaeZgqKjH1bAWAFw9bA==} + nwsapi@2.2.20: + resolution: {integrity: sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==} oauth-1.0a@2.2.6: resolution: {integrity: sha512-6bkxv3N4Gu5lty4viIcIAnq5GbxECviMBeKR3WX/q87SPQ8E8aursPZUtsXDnxCs787af09WPRBLqYrf/lwoYQ==} @@ -8228,7 +8228,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.14.1)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8242,7 +8242,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.14.1)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) + vitest: 2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) transitivePeerDependencies: - supports-color @@ -10148,17 +10148,16 @@ snapshots: jschardet@3.1.4: {} - jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): + jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): dependencies: cssstyle: 4.3.0 data-urls: 5.0.0 decimal.js: 10.5.0 - form-data: 4.0.2 html-encoding-sniffer: 4.0.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.19 + nwsapi: 2.2.20 parse5: 7.2.1 rrweb-cssom: 0.8.0 saxes: 6.0.0 @@ -10800,7 +10799,7 @@ snapshots: dependencies: boolbase: 1.0.0 - nwsapi@2.2.19: {} + nwsapi@2.2.20: {} oauth-1.0a@2.2.6: {} @@ -12084,7 +12083,7 @@ snapshots: '@types/node': 22.14.1 fsevents: 2.3.3 - vitest@2.1.9(@types/node@22.14.1)(jsdom@26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)): + vitest@2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)): dependencies: '@vitest/expect': 2.1.9 '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.14.1)) @@ -12108,7 +12107,7 @@ snapshots: why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.14.1 - jsdom: 26.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + jsdom: 26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - less - lightningcss From 6b302364e82b9013ffcee6bc17bc6d489ebbbc36 Mon Sep 17 00:00:00 2001 From: Goestav <27970303+goestav@users.noreply.github.com> Date: Mon, 14 Apr 2025 15:30:19 +0000 Subject: [PATCH 0437/2658] feat(route): support different languages for the kurogames (wuthering waves) route (#18781) * feat: add wuthering waves route * refactor: use arrow functions for better readability * refactor: remove redundant nullish fallback * refactor: use Promise.all(...) improve performance * refactor: reduce complexity of limit parameter logic * refactor: extract parse integer parameter to its own function * refactor: add kuro games to namespace name * refactor: make kurogames route for wuthering waves more flexible This commit adds support for different languages. * refactor: remove redundant wuthering waves route * refactor: add language parameter description * refactor: fallback to 30 feed items instead of unlimited * refactor: rename language in description table * refactor: filter articles beforehand and favour map over flatMap * refactor: remove redundant code for article filtering --- lib/routes/kurogames/namespace.ts | 2 +- .../kurogames/wutheringwaves/constants.ts | 34 +++++++ lib/routes/kurogames/wutheringwaves/news.ts | 93 ++++++++++++------- lib/routes/kurogames/wutheringwaves/utils.ts | 79 ++++++++++++++++ 4 files changed, 174 insertions(+), 34 deletions(-) create mode 100644 lib/routes/kurogames/wutheringwaves/constants.ts create mode 100644 lib/routes/kurogames/wutheringwaves/utils.ts diff --git a/lib/routes/kurogames/namespace.ts b/lib/routes/kurogames/namespace.ts index e51551a1d278..ec104a46cd7a 100644 --- a/lib/routes/kurogames/namespace.ts +++ b/lib/routes/kurogames/namespace.ts @@ -1,7 +1,7 @@ import { Namespace } from '@/types'; export const namespace: Namespace = { - name: '库洛游戏', + name: '库洛游戏 | Kuro Games', url: 'www.kurogames.com', categories: ['game'], lang: 'zh-CN', diff --git a/lib/routes/kurogames/wutheringwaves/constants.ts b/lib/routes/kurogames/wutheringwaves/constants.ts new file mode 100644 index 000000000000..9d0ae687c2d8 --- /dev/null +++ b/lib/routes/kurogames/wutheringwaves/constants.ts @@ -0,0 +1,34 @@ +/** The language. */ +export enum Language { + English = 'en', + Japanese = 'jp', + Korean = 'kr', + /** Legacy code to ensure old results don't change. */ + Chinese = 'zh', + ChineseTaiwan = 'zh-tw', + Spanish = 'es', + French = 'fr', + German = 'de', +} + +/** Route parameters. */ +export enum Parameter { + Limit = 'limit', + Language = 'language', +} + +/** The languages supported by the API. */ +export const SUPPORTED_LANGUAGES = Object.values(Language); + +export interface Article { + articleContent: string; + articleDesc: string; + articleId: number; + articleTitle: string; + articleType: number; + createTime: string; + sortingMark: number; + startTime: string; + suggestCover: string; + top: number; +} diff --git a/lib/routes/kurogames/wutheringwaves/news.ts b/lib/routes/kurogames/wutheringwaves/news.ts index 95e161378669..fff5216d6779 100644 --- a/lib/routes/kurogames/wutheringwaves/news.ts +++ b/lib/routes/kurogames/wutheringwaves/news.ts @@ -4,56 +4,83 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import * as cheerio from 'cheerio'; import ofetch from '@/utils/ofetch'; - -interface NewsItem { - articleContent: string; - articleDesc: string; - articleId: number; - articleTitle: string; - articleType: number; - createTime: string; - sortingMark: number; - startTime: string; - suggestCover: string; - top: number; -} +import { Article, Language, Parameter, SUPPORTED_LANGUAGES } from './constants'; +import { fetchArticles, getArticleContentLink, getArticleLink, getHandlerLanguage, isValidLanguage, parseInteger } from './utils'; export const route: Route = { - path: '/wutheringwaves/news', + path: `/wutheringwaves/news/:${Parameter.Language}?`, categories: ['game'], example: '/kurogames/wutheringwaves/news', + parameters: { + [Parameter.Language]: 'The language to use for the content. Default: `zh`.', + }, name: '鸣潮 — 游戏公告、新闻与活动', radar: [ { source: ['mc.kurogames.com/m/main/news', 'mc.kurogames.com/main'], }, + { + title: 'Wuthering Waves — Game announcements, news and events', + source: ['wutheringwaves.kurogames.com/en/main/news', 'wutheringwaves.kurogames.com/en/main'], + }, ], - maintainers: ['enpitsulin'], - description: '', - async handler() { - const res = await ofetch('https://media-cdn-mingchao.kurogame.com/akiwebsite/website2.0/json/G152/zh/ArticleMenu.json', { query: { t: Date.now() } }); + maintainers: ['goestav', 'enpitsulin'], + description: ` +Language codes for the \`${Parameter.Language}\` parameter: + +| Language | Code | +|----------|--------------| +| English | en | +| 日本語 | jp | +| 한국어 | kr | +| 简体中文 | zh (default) | +| 繁體中文 | zh-tw | +| Español | es | +| Français | fr | +| Deutsch | de | + `, + async handler(ctx) { + const limitParam = ctx.req.query(Parameter.Limit); + const languageParam = ctx.req.param(Parameter.Language); + + const limit = parseInteger(limitParam, 30); + const language = languageParam || Language.Chinese; + + if (!isValidLanguage(language)) { + throw new TypeError(`Language parameter is not valid. Please use one of the following: ${SUPPORTED_LANGUAGES.join(', ')}`); + } + + const articles = await fetchArticles(language); + const filteredArticles = articles.filter((a) => a.articleType !== 0).slice(0, limit); + const item = await Promise.all( - res.map((i) => { - const contentUrl = `https://media-cdn-mingchao.kurogame.com/akiwebsite/website2.0/json/G152/zh/article/${i.articleId}.json`; - const item = { - title: i.articleTitle, - pubDate: timezone(parseDate(i.createTime), +8), - link: `https://mc.kurogames.com/main/news/detail/${i.articleId}`, - } as DataItem; - return cache.tryGet(contentUrl, async () => { - const data = await ofetch(contentUrl, { query: { t: Date.now() } }); - const $ = cheerio.load(data.articleContent); - - item.description = $.html() ?? i.articleDesc ?? ''; + filteredArticles.map((article) => { + const contentUrl = getArticleContentLink(language, article.articleId); + const item: DataItem = { + title: article.articleTitle, + pubDate: timezone(parseDate(article.createTime), +8), + link: getArticleLink(language, article.articleId), + }; + + return cache.tryGet(`wutheringwaves:${language}:${article.articleId}`, async () => { + const { articleContent } = await ofetch
(contentUrl, { query: { t: Date.now() } }); + const $ = cheerio.load(articleContent); + + item.description = $.html() ?? article.articleDesc ?? ''; + return item; }) as Promise; }) ); + + const title = language === Language.Chinese ? '《鸣潮》— 游戏公告、新闻和活动' : 'Wuthering Waves - Announcements, News and Events'; + const link = language === Language.Chinese ? 'https://mc.kurogames.com/main#news' : `https://wutheringwaves.kurogames.com/${language}/main/#news`; + return { - title: '《鸣潮》— 游戏公告、新闻和活动', - link: 'https://mc.kurogames.com/main#news', + title, + link, item, - language: 'zh-cn', + language: getHandlerLanguage(language), }; }, }; diff --git a/lib/routes/kurogames/wutheringwaves/utils.ts b/lib/routes/kurogames/wutheringwaves/utils.ts new file mode 100644 index 000000000000..2138b6bcb05f --- /dev/null +++ b/lib/routes/kurogames/wutheringwaves/utils.ts @@ -0,0 +1,79 @@ +import ofetch from '@/utils/ofetch'; +import { Data } from '@/types'; +import { Article, Language, SUPPORTED_LANGUAGES } from './constants'; + +/** + * Parse a number or a number as string.\ + * **NOTE:** this may return `NaN` if the string is not a number or the value is `undefined` and no {@link fallback} is provided. + */ +export const parseInteger = (value?: string | number, fallback?: number): number => { + if (typeof value === 'number') { + return value; + } + + if (value === undefined) { + return fallback === undefined ? Number.NaN : fallback; + } + + const parsed = Number.parseInt(value, 10); + + if (fallback !== undefined && Number.isNaN(parsed)) { + return fallback; + } + + return parsed; +}; + +/** Type-guard to ensure {@link language} is a valid value of {@link SUPPORTED_LANGUAGES}. */ +export const isValidLanguage = (language: string): language is Language => SUPPORTED_LANGUAGES.includes(language as Language); + +/** Fetch the articles for a given language in a given category. */ +export const fetchArticles = (language: Language): Promise => { + if (language === Language.Chinese) { + return ofetch('https://media-cdn-mingchao.kurogame.com/akiwebsite/website2.0/json/G152/zh/ArticleMenu.json', { query: { t: Date.now() } }); + } + + return ofetch<{ article: Article[] }>(`https://hw-media-cdn-mingchao.kurogame.com/akiwebsite/website2.0/json/G152/${language}/MainMenu.json`).then((data) => data.article); +}; + +/** Get the link to the article content. */ +export const getArticleContentLink = (language: Language, articleId: number): string => { + if (language === Language.Chinese) { + return `https://media-cdn-mingchao.kurogame.com/akiwebsite/website2.0/json/G152/zh/article/${articleId}.json`; + } + + return `https://hw-media-cdn-mingchao.kurogame.com/akiwebsite/website2.0/json/G152/${language}/article/${articleId}.json`; +}; + +/** Get the link to an article from its ID. */ +export const getArticleLink = (language: Language, articleId: number): string => { + if (language === Language.Chinese) { + return `https://mc.kurogames.com/main/news/detail/${articleId}`; + } + + return `https://wutheringwaves.kurogames.com/${language}/main/news/detail/${articleId}`; +}; + +/** Resolve the handler language from the {@link Language}. */ +export const getHandlerLanguage = (language: Language): Exclude => { + switch (language) { + case Language.English: + return 'en'; + case Language.Chinese: + return 'zh-CN'; + case Language.ChineseTaiwan: + return 'zh-TW'; + case Language.French: + return 'fr'; + case Language.German: + return 'de'; + case Language.Japanese: + return 'ja'; + case Language.Korean: + return 'ko'; + case Language.Spanish: + return 'es'; + default: + throw new Error(`Could not resolve handler language from "${language}"`); + } +}; From fdb4325226de4be7d6e53c111c03519b6371a9ba Mon Sep 17 00:00:00 2001 From: moppman Date: Mon, 14 Apr 2025 18:58:01 +0200 Subject: [PATCH 0438/2658] fix(route/steam/search): Make hard-coded header image URL dynamic (#18852) The header image isn't always served via the steamstatic CDN any more, resulting in broken images more often than not. That's why we're now displaying the original smaller image from the search result page. --- lib/routes/steam/search.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/routes/steam/search.ts b/lib/routes/steam/search.ts index 88d20a28412b..4bc046e0d4ba 100644 --- a/lib/routes/steam/search.ts +++ b/lib/routes/steam/search.ts @@ -34,7 +34,6 @@ async function handler(ctx) { const isBundle = !!$el.attr('data-ds-bundle-data'); const isDiscounted = $el.find('.discount_original_price').length > 0; const hasReview = $el.find('.search_review_summary').length > 0; - const appID: string | undefined = $el.attr('data-ds-appid'); let desc = ''; if (isBundle) { @@ -61,7 +60,7 @@ async function handler(ctx) { description: desc.replaceAll('\n', '
'), media: { thumbnail: { - url: `https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/${appID}/header.jpg`, + url: $el.find('.search_capsule img').attr('src'), }, }, }; From 63abb081ed8f1604e415b1acf9bc70c127c3d2a0 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Tue, 15 Apr 2025 11:27:37 +0800 Subject: [PATCH 0439/2658] chore(route/sehuatang): forum route name --- lib/routes/sehuatang/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/sehuatang/index.ts b/lib/routes/sehuatang/index.ts index a96efde1fa9d..fa39f5e2de3a 100644 --- a/lib/routes/sehuatang/index.ts +++ b/lib/routes/sehuatang/index.ts @@ -40,7 +40,7 @@ const forumIdMaps = { export const route: Route = { path: ['/bt/:subforumid?', '/picture/:subforumid', '/:subforumid?/:type?', '/:subforumid?', ''], - name: 'Unknown', + name: 'Forum', maintainers: ['qiwihui', 'junfengP', 'nczitzk'], features: { requirePuppeteer: true, From 04c0f056a993a5262b227be82929c3960f775459 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Tue, 15 Apr 2025 14:44:12 +0800 Subject: [PATCH 0440/2658] fix(route/wechat): fetch sogou wechat articles --- .gitignore | 5 + lib/routes/wechat/sogou.ts | 232 +++++++++++++++++++++++++++++-------- 2 files changed, 188 insertions(+), 49 deletions(-) diff --git a/.gitignore b/.gitignore index 368a4c547ba8..ebb6f4c31c88 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,8 @@ package-lock.json # pnpm-lock.yaml yarn.lock yarn-error.log + +# ai ide rules +.roomodes +.cursorrules +.windsurfrules diff --git a/lib/routes/wechat/sogou.ts b/lib/routes/wechat/sogou.ts index 96fef0fa45c1..ded68525db02 100644 --- a/lib/routes/wechat/sogou.ts +++ b/lib/routes/wechat/sogou.ts @@ -1,8 +1,145 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; +import { Route, DataItem } from '@/types'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; -const host = 'https://weixin.sogou.com'; +import { parseDate } from '@/utils/parse-date'; import { finishArticleItem } from '@/utils/wechat-mp'; +import logger from '@/utils/logger'; + +const host = 'https://weixin.sogou.com'; +const hardcodedCookie = 'SNUID=78725B470A0EF2C3F97AA5EB0BBF95C1; ABTEST=0|1680917938|v1; SUID=8F7B1C682B83A20A000000006430C5B2; PHPSESSID=le2lak0vghad5c98ijd3t51ls4; IPLOC=USUS5'; + +interface SogouItemInternal extends DataItem { + _internal: { + isWeChatLink: boolean; + }; +} + +async function fetchAndParsePage(wechatId: string, page: number): Promise { + const searchUrl = `${host}/weixin`; + let response; + try { + const responseHtml = await ofetch(searchUrl, { + query: { + ie: 'utf8', + s_from: 'input', + _sug_: 'n', + _sug_type_: '1', + type: '2', + query: wechatId, + page, + }, + headers: { + Referer: host, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36', + Cookie: hardcodedCookie, + }, + }); + response = { data: responseHtml }; + } catch (error) { + logger.error(`Failed to fetch Sogou search page ${page} for ${wechatId}: ${error instanceof Error ? error.message : String(error)}`); + return []; + } + + const $ = load(response.data); + const list = $('ul.news-list > li').toArray(); + + const pageItemsPromises = list.map(async (li): Promise => { + const $li = $(li); + const title = $li.find('h3 > a').text().trim(); + const sogouLinkHref = $li.find('h3 > a').attr('href'); + if (!sogouLinkHref) { + logger.warn(`Skipping item with missing link for wechatId: ${wechatId} on page ${page}`); + return null; + } + const sogouLink = host + sogouLinkHref; + const description = $li.find('p.txt-info').text().trim(); + + const timeScript = $li.find('span.s2 script').html(); + const timeMatch = timeScript?.match(/timeConvert\('(\d+)'\)/); + const pubDate = timeMatch ? parseDate(Number.parseInt(timeMatch[1]) * 1000) : undefined; + + let realLink = sogouLink; + try { + const linkResponse = await ofetch.raw(sogouLink, { + method: 'GET', + headers: { + Referer: searchUrl, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36', + Cookie: hardcodedCookie, + }, + redirect: 'manual', + ignoreResponseError: true, + }); + + let location = linkResponse.headers?.get('location'); + + if (location) { + if (!location.startsWith('http')) { + try { + location = new URL(location, sogouLink).toString(); + } catch (error) { + logger.warn(`Invalid redirect location "${location}" for title "${title}" (wechatId: ${wechatId}): ${error instanceof Error ? error.message : String(error)}`); + location = null; + } + } + + if (typeof location === 'string' && location) { + if (location.startsWith('http://mp.weixin.qq.com') || location.startsWith('https://mp.weixin.qq.com')) { + realLink = location; + } else { + try { + const intermediateResponse = await ofetch.raw(location, { + method: 'GET', + headers: { + Referer: sogouLink, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36', + Cookie: hardcodedCookie, + }, + redirect: 'manual', + ignoreResponseError: true, + }); + const intermediateLocation = intermediateResponse.headers?.get('location'); + if (intermediateLocation && (intermediateLocation.startsWith('http://mp.weixin.qq.com') || intermediateLocation.startsWith('https://mp.weixin.qq.com'))) { + realLink = intermediateLocation; + } else { + // logger.warn(`Could not resolve final WeChat link for title "${title}" (wechatId: ${wechatId}) after intermediate redirect`); + } + } catch (error) { + logger.warn(`Failed to resolve intermediate redirect for title "${title}" (wechatId: ${wechatId}): ${error instanceof Error ? error.message : String(error)}`); + } + } + } + } else { + logger.debug(`No redirect location found for title "${title}" (wechatId: ${wechatId})`); + } + } catch (error: unknown) { + const errorMsg = error instanceof Error ? error.message : String(error); + if (typeof error === 'object' && error !== null && 'response' in error && typeof error.response === 'object' && error.response !== null && 'status' in error.response) { + logger.debug(`Redirect request failed for "${title}" (wechatId: ${wechatId}) with status ${error.response.status}: ${errorMsg}`); + } else { + logger.debug(`Redirect request failed for "${title}" (wechatId: ${wechatId}): ${errorMsg}`); + } + } + + const isWeChatLink = realLink.startsWith('http://mp.weixin.qq.com') || realLink.startsWith('https://mp.weixin.qq.com'); + const author = $li.find('span.all-time-y2').text().trim(); + + return { + title, + link: realLink, + description, + author, + pubDate, + guid: realLink, + _internal: { + isWeChatLink, + }, + } as SogouItemInternal; + }); + + return (await Promise.all(pageItemsPromises)).filter((item): item is SogouItemInternal => item !== null); +} + export const route: Route = { path: '/sogou/:id', categories: ['new-media'], @@ -11,67 +148,64 @@ export const route: Route = { features: { requireConfig: false, requirePuppeteer: false, - antiCrawler: false, + antiCrawler: true, supportBT: false, supportPodcast: false, supportScihub: false, }, name: '公众号(搜狗来源)', - maintainers: ['EthanWng97'], + maintainers: ['EthanWng97', 'pseudoyu'], handler, }; async function handler(ctx) { const wechatId = ctx.req.param('id'); - let url = `${host}/weixin`; - let response = await got({ - method: 'get', - url, - searchParams: { - query: wechatId, - }, - }); + const pageCount = 3; + const pagePromises: Promise[] = []; - let $ = load(response.data); - const href = $('a[uigs="account_article_0"]').attr('href'); - const title = $('a[uigs="account_name_0"]').text(); - url = `${host}${href}`; - response = await got({ - url, - method: 'get', - headers: { - Cookie: 'SNUID=78725B470A0EF2C3F97AA5EB0BBF95C1; ABTEST=0|1680917938|v1; SUID=8F7B1C682B83A20A000000006430C5B2; PHPSESSID=le2lak0vghad5c98ijd3t51ls4; IPLOC=USUS5', - }, - }); - $ = load(response.data); - const jsCode = $('script').text(); - const regex = /url \+= '([^']+)';/g; - const matches = []; - let match; - - while ((match = regex.exec(jsCode)) !== null) { - matches.push(match[1]); + for (let page = 1; page <= pageCount; page++) { + pagePromises.push(fetchAndParsePage(wechatId, page)); } - let link = ''; - if (matches.length > 0) { - link = matches - .join('') - .replaceAll(/(\r\n|\n|\r)/gm, '') // remove newlines - .replaceAll(' ', ''); // remove spaces - url = url.replace('@', ''); - } - const item = { - link, - guid: link, - }; + const pageResults: SogouItemInternal[][] = await Promise.all(pagePromises); + + const allItems: SogouItemInternal[] = pageResults.flat(); + + const firstPageFirstItem = pageResults[0]?.[0]; + const accountTitle = firstPageFirstItem?.author || wechatId; + + const finalItemsPromises = allItems.map(async (item: SogouItemInternal): Promise => { + let resultItem: DataItem | SogouItemInternal = item; + if (item._internal.isWeChatLink) { + try { + resultItem = await finishArticleItem(item); + } catch (error) { + logger.debug(`finishArticleItem failed for ${item.link}: ${error instanceof Error ? error.message : String(error)}`); + } + } + + if (resultItem && typeof resultItem === 'object') { + const finalItem: DataItem = { + title: resultItem.title, + link: resultItem.link, + description: resultItem.description, + author: resultItem.author, + pubDate: resultItem.pubDate, + guid: resultItem.guid, + ...(resultItem.content && { content: resultItem.content }), + }; + return finalItem; + } + logger.debug(`Unexpected null or non-object item during final processing for link: ${item?.link}`); + return null; + }); - await finishArticleItem(item); + const finalItems: DataItem[] = (await Promise.all(finalItemsPromises)).filter((item): item is DataItem => item !== null); return { - title: `${title} 的微信公众号`, - link: url, - description: `${title} 的微信公众号`, - item: [item], + title: `${accountTitle} 的微信公众号`, + link: `${host}/weixin?query=${wechatId}`, + description: `${accountTitle} 的微信公众号`, + item: finalItems, }; } From 52ae25ab3aeeeb79ff91380a2c781f2649724941 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 16:36:21 +0800 Subject: [PATCH 0441/2658] chore(deps-dev): bump the typescript-eslint group with 2 updates (#18854) Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.29.1 to 8.30.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.30.1/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.29.1 to 8.30.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.30.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.30.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-version: 8.30.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 111 +++++++++++++++++++++++++++---------------------- 2 files changed, 63 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 339659d12ae5..982e0f9e7bc5 100644 --- a/package.json +++ b/package.json @@ -168,8 +168,8 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.29.1", - "@typescript-eslint/parser": "8.29.1", + "@typescript-eslint/eslint-plugin": "8.30.1", + "@typescript-eslint/parser": "8.30.1", "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.37.120", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70e207d1def6..305858bb0379 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -367,11 +367,11 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.29.1 - version: 8.29.1(@typescript-eslint/parser@8.29.1(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3) + specifier: 8.30.1 + version: 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3) '@typescript-eslint/parser': - specifier: 8.29.1 - version: 8.29.1(eslint@9.24.0)(typescript@5.8.3) + specifier: 8.30.1 + version: 8.30.1(eslint@9.24.0)(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -1353,6 +1353,12 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + '@eslint-community/eslint-utils@4.6.0': + resolution: {integrity: sha512-WhCn7Z7TauhBtmzhvKpoQs0Wwb/kBcy4CwpuI0/eEIr2Lx2auxmulAzLr91wVZJaz47iUZdkXOK7WlAfxGKCnA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + '@eslint-community/regexpp@4.12.1': resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -2278,16 +2284,16 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.29.1': - resolution: {integrity: sha512-ba0rr4Wfvg23vERs3eB+P3lfj2E+2g3lhWcCVukUuhtcdUx5lSIFZlGFEBHKr+3zizDa/TvZTptdNHVZWAkSBg==} + '@typescript-eslint/eslint-plugin@8.30.1': + resolution: {integrity: sha512-v+VWphxMjn+1t48/jO4t950D6KR8JaJuNXzi33Ve6P8sEmPr5k6CEXjdGwT6+LodVnEa91EQCtwjWNUCPweo+Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@8.29.1': - resolution: {integrity: sha512-zczrHVEqEaTwh12gWBIJWj8nx+ayDcCJs06yoNMY0kwjMWDM6+kppljY+BxWI06d2Ja+h4+WdufDcwMnnMEWmg==} + '@typescript-eslint/parser@8.30.1': + resolution: {integrity: sha512-H+vqmWwT5xoNrXqWs/fesmssOW70gxFlgcMlYcBaWNPIEWDgLa4W9nkSPmhuOgLnXq9QYgkZ31fhDyLhleCsAg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2297,12 +2303,12 @@ packages: resolution: {integrity: sha512-u2oITX3BJwzWCapoZ/pXw6BCOl8rJP4Ij/3wPoGvY8XwvXflOzd1kLrDUUUAIEdJSFh+ASwdTHqtan9xSg8buw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.29.1': - resolution: {integrity: sha512-2nggXGX5F3YrsGN08pw4XpMLO1Rgtnn4AzTegC2MDesv6q3QaTU5yU7IbS1tf1IwCR0Hv/1EFygLn9ms6LIpDA==} + '@typescript-eslint/scope-manager@8.30.1': + resolution: {integrity: sha512-+C0B6ChFXZkuaNDl73FJxRYT0G7ufVPOSQkqkpM/U198wUwUFOtgo1k/QzFh1KjpBitaK7R1tgjVz6o9HmsRPg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.29.1': - resolution: {integrity: sha512-DkDUSDwZVCYN71xA4wzySqqcZsHKic53A4BLqmrWFFpOpNSoxX233lwGu/2135ymTCR04PoKiEEEvN1gFYg4Tw==} + '@typescript-eslint/type-utils@8.30.1': + resolution: {integrity: sha512-64uBF76bfQiJyHgZISC7vcNz3adqQKIccVoKubyQcOnNcdJBvYOILV1v22Qhsw3tw3VQu5ll8ND6hycgAR5fEA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2312,8 +2318,8 @@ packages: resolution: {integrity: sha512-bn4WS1bkKEjx7HqiwG2JNB3YJdC1q6Ue7GyGlwPHyt0TnVq6TtD/hiOdTZt71sq0s7UzqBFXD8t8o2e63tXgwA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.29.1': - resolution: {integrity: sha512-VT7T1PuJF1hpYC3AGm2rCgJBjHL3nc+A/bhOp9sGMKfi5v0WufsX/sHCFBfNTx2F+zA6qBc/PD0/kLRLjdt8mQ==} + '@typescript-eslint/types@8.30.1': + resolution: {integrity: sha512-81KawPfkuulyWo5QdyG/LOKbspyyiW+p4vpn4bYO7DM/hZImlVnFwrpCTnmNMOt8CvLRr5ojI9nU1Ekpw4RcEw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@8.28.0': @@ -2322,8 +2328,8 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/typescript-estree@8.29.1': - resolution: {integrity: sha512-l1enRoSaUkQxOQnbi0KPUtqeZkSiFlqrx9/3ns2rEDhGKfTa+88RmXqedC1zmVTOWrLc2e6DEJrTA51C9iLH5g==} + '@typescript-eslint/typescript-estree@8.30.1': + resolution: {integrity: sha512-kQQnxymiUy9tTb1F2uep9W6aBiYODgq5EMSk6Nxh4Z+BDUoYUSa029ISs5zTzKBFnexQEh71KqwjKnRz58lusQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' @@ -2335,8 +2341,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.29.1': - resolution: {integrity: sha512-QAkFEbytSaB8wnmB+DflhUPz6CLbFWE2SnSCrRMEa+KnXIzDYbpsn++1HGvnfAsUY44doDXmvRkO5shlM/3UfA==} + '@typescript-eslint/utils@8.30.1': + resolution: {integrity: sha512-T/8q4R9En2tcEsWPQgB5BQ0XJVOtfARcUvOa8yJP3fh9M/mXraLxZrkCfGb6ChrO/V3W+Xbd04RacUEqk1CFEQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2346,8 +2352,8 @@ packages: resolution: {integrity: sha512-hbn8SZ8w4u2pRwgQ1GlUrPKE+t2XvcCW5tTRF7j6SMYIuYG37XuzIW44JCZPa36evi0Oy2SnM664BlIaAuQcvg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.29.1': - resolution: {integrity: sha512-RGLh5CRaUEf02viP5c1Vh1cMGffQscyHe7HPAzGpfmfflFg1wUz2rYxd+OZqwpeypYvZ8UxSxuIpF++fmOzEcg==} + '@typescript-eslint/visitor-keys@8.30.1': + resolution: {integrity: sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.3.0': @@ -7035,6 +7041,11 @@ snapshots: eslint: 9.24.0 eslint-visitor-keys: 3.4.3 + '@eslint-community/eslint-utils@4.6.0(eslint@9.24.0)': + dependencies: + eslint: 9.24.0 + eslint-visitor-keys: 3.4.3 + '@eslint-community/regexpp@4.12.1': {} '@eslint/config-array@0.20.0': @@ -8088,14 +8099,14 @@ snapshots: '@types/node': 22.14.1 optional: true - '@typescript-eslint/eslint-plugin@8.29.1(@typescript-eslint/parser@8.29.1(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.29.1(eslint@9.24.0)(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.29.1 - '@typescript-eslint/type-utils': 8.29.1(eslint@9.24.0)(typescript@5.8.3) - '@typescript-eslint/utils': 8.29.1(eslint@9.24.0)(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.29.1 + '@typescript-eslint/parser': 8.30.1(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.30.1 + '@typescript-eslint/type-utils': 8.30.1(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.30.1 eslint: 9.24.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -8105,12 +8116,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.29.1(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/parser@8.30.1(eslint@9.24.0)(typescript@5.8.3)': dependencies: - '@typescript-eslint/scope-manager': 8.29.1 - '@typescript-eslint/types': 8.29.1 - '@typescript-eslint/typescript-estree': 8.29.1(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.29.1 + '@typescript-eslint/scope-manager': 8.30.1 + '@typescript-eslint/types': 8.30.1 + '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.30.1 debug: 4.4.0 eslint: 9.24.0 typescript: 5.8.3 @@ -8122,15 +8133,15 @@ snapshots: '@typescript-eslint/types': 8.28.0 '@typescript-eslint/visitor-keys': 8.28.0 - '@typescript-eslint/scope-manager@8.29.1': + '@typescript-eslint/scope-manager@8.30.1': dependencies: - '@typescript-eslint/types': 8.29.1 - '@typescript-eslint/visitor-keys': 8.29.1 + '@typescript-eslint/types': 8.30.1 + '@typescript-eslint/visitor-keys': 8.30.1 - '@typescript-eslint/type-utils@8.29.1(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.30.1(eslint@9.24.0)(typescript@5.8.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.29.1(typescript@5.8.3) - '@typescript-eslint/utils': 8.29.1(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.24.0)(typescript@5.8.3) debug: 4.4.0 eslint: 9.24.0 ts-api-utils: 2.1.0(typescript@5.8.3) @@ -8140,7 +8151,7 @@ snapshots: '@typescript-eslint/types@8.28.0': {} - '@typescript-eslint/types@8.29.1': {} + '@typescript-eslint/types@8.30.1': {} '@typescript-eslint/typescript-estree@8.28.0(typescript@5.8.3)': dependencies: @@ -8156,10 +8167,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.29.1(typescript@5.8.3)': + '@typescript-eslint/typescript-estree@8.30.1(typescript@5.8.3)': dependencies: - '@typescript-eslint/types': 8.29.1 - '@typescript-eslint/visitor-keys': 8.29.1 + '@typescript-eslint/types': 8.30.1 + '@typescript-eslint/visitor-keys': 8.30.1 debug: 4.4.0 fast-glob: 3.3.3 is-glob: 4.0.3 @@ -8181,12 +8192,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.29.1(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/utils@8.30.1(eslint@9.24.0)(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) - '@typescript-eslint/scope-manager': 8.29.1 - '@typescript-eslint/types': 8.29.1 - '@typescript-eslint/typescript-estree': 8.29.1(typescript@5.8.3) + '@eslint-community/eslint-utils': 4.6.0(eslint@9.24.0) + '@typescript-eslint/scope-manager': 8.30.1 + '@typescript-eslint/types': 8.30.1 + '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) eslint: 9.24.0 typescript: 5.8.3 transitivePeerDependencies: @@ -8197,9 +8208,9 @@ snapshots: '@typescript-eslint/types': 8.28.0 eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.29.1': + '@typescript-eslint/visitor-keys@8.30.1': dependencies: - '@typescript-eslint/types': 8.29.1 + '@typescript-eslint/types': 8.30.1 eslint-visitor-keys: 4.2.0 '@ungap/structured-clone@1.3.0': {} @@ -9427,7 +9438,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.4.0 + debug: 4.3.4 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -11107,7 +11118,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.3 - debug: 4.4.0 + debug: 4.3.4 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 From f17f16bbc4d4c5777a0f776e4a8c8d1e23454c11 Mon Sep 17 00:00:00 2001 From: Nano Date: Tue, 15 Apr 2025 17:02:44 +0800 Subject: [PATCH 0442/2658] fix(route/geocaching/blogs): handle cases where large size does not exist (#18855) --- lib/routes/geocaching/blogs.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/routes/geocaching/blogs.ts b/lib/routes/geocaching/blogs.ts index 2d730f65768c..7724ea1c2c7d 100644 --- a/lib/routes/geocaching/blogs.ts +++ b/lib/routes/geocaching/blogs.ts @@ -74,6 +74,7 @@ async function handler(ctx) { const items = response.map((item) => { const media = item._embedded['wp:featuredmedia'][0]; const mediaDetails = media?.media_details; + const mediaSize = mediaDetails.sizes.large || mediaDetails.sizes.full; return { title: item.title.rendered.trim(), link: item.link, @@ -93,9 +94,9 @@ async function handler(ctx) { fileSize: mediaDetails.filesize, }, thumbnail: { - url: mediaDetails.sizes.large.source_url, - height: mediaDetails.sizes.large.height, - width: mediaDetails.sizes.large.width, + url: mediaSize.source_url, + height: mediaSize.height, + width: mediaSize.width, }, } : undefined, From 87a679e265db582ae819a008bbb1c1ac2d7e54f8 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Tue, 15 Apr 2025 17:01:46 +0800 Subject: [PATCH 0443/2658] fix(route/nea): fetch ghs items logic --- .gitignore | 1 + lib/routes/gov/nea/ghs.ts | 104 ++++++++++++++++++++++++-------------- 2 files changed, 66 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index ebb6f4c31c88..59a15ea532d4 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ yarn.lock yarn-error.log # ai ide rules +memory-bank/ .roomodes .cursorrules .windsurfrules diff --git a/lib/routes/gov/nea/ghs.ts b/lib/routes/gov/nea/ghs.ts index 0842f12703cc..ca64bf0757e7 100644 --- a/lib/routes/gov/nea/ghs.ts +++ b/lib/routes/gov/nea/ghs.ts @@ -1,9 +1,10 @@ -import { Route } from '@/types'; +import type { Route, DataItem } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; -import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; +import { URL } from 'url'; +import timezone from '@/utils/timezone'; export const route: Route = { path: '/nea/sjzz/ghs', @@ -21,64 +22,89 @@ export const route: Route = { radar: [ { source: ['nea.gov.cn/sjzz/ghs/'], + target: '/nea/sjzz/ghs', }, ], name: '发展规划司', - maintainers: ['nczitzk'], + maintainers: ['nczitzk', 'pseudoyu'], handler, - url: 'nea.gov.cn/sjzz/ghs/', + url: 'www.nea.gov.cn/sjzz/ghs/', }; async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 35; const rootUrl = 'https://www.nea.gov.cn'; - const currentUrl = new URL('sjzz/ghs/', rootUrl).href; - - const { data: response } = await got(currentUrl); + const jsonUrl = new URL('sjzz/ghs/ds_99a01b29f9a24ab58f7d64b36489500e.json', rootUrl).href; - const $ = load(response); + const jsonData: NeaGhsResponse = await ofetch(jsonUrl); - let items = $('div.right_box ul li') - .slice(0, limit) - .toArray() - .map((item) => { - item = $(item); + const list: InternalDataItem[] = jsonData.datasource.slice(0, limit).map((item) => { + const itemLink = new URL(item.publishUrl, rootUrl).href; - const a = item.find('a'); + const $title = load(item.showTitle); + const titleText = $title.text(); - return { - title: a.text(), - link: a.prop('href'), - pubDate: parseDate(item.find('span.date-tex').text()), - }; - }); + return { + title: titleText, + link: itemLink, + pubDate: parseDate(item.publishTime), + description: item.summary?.trim() || titleText, + author: item.sourceText?.trim() || undefined, + category: [] as string[], + }; + }); - items = await Promise.all( - items.map((item) => + const items = await Promise.all( + list.map((item: InternalDataItem) => cache.tryGet(item.link, async () => { - const { data: detailResponse } = await got(item.link); - - const content = load(detailResponse); - - item.title = content('meta[name="ArticleTitle"]').prop('content'); - item.description = content('td.detail').html() || content('div.article-content td').html(); - item.author = content('meta[name="ContentSource"]').prop('content'); - item.category = content('meta[name="keywords"]').prop('content').split(/,/); - item.pubDate = timezone(parseDate(content('meta[name="PubDate"]').prop('content')), +8); + try { + const detailResponse = await ofetch(item.link); + const content = load(detailResponse); + item.title = content('meta[name="ArticleTitle"]').prop('content') || item.title; + item.description = content('td.detail').html() || content('div.article-content td').html() || item.description; + item.author = content('meta[name="ContentSource"]').prop('content') || item.author; + item.category = content('meta[name="keywords"]').prop('content')?.split(/,/) ?? item.category; + const detailPubDate = content('meta[name="PubDate"]').prop('content'); + item.pubDate = detailPubDate ? timezone(parseDate(detailPubDate), +8) : item.pubDate; + } catch { + // logger.error(`Failed to fetch detail for ${item.link}`); + } return item; }) ) ); + const filteredItems: DataItem[] = items.filter(Boolean) as DataItem[]; + return { - item: items, - title: $('title').text(), - link: currentUrl, - description: $('meta[name="ColumnDescription"]').prop('content'), - language: 'zh', - subtitle: $('meta[name="ColumnType"]').prop('content'), - author: $('meta[name="ColumnKeywords"]').prop('content'), + item: filteredItems, + title: '国家能源局 - 发展规划司工作进展', + link: 'https://www.nea.gov.cn/sjzz/ghs/', + description: '国家能源局 - 发展规划司工作进展', }; } + +interface NeaGhsItem { + showTitle: string; + publishUrl: string; + publishTime: string; + summary?: string; + sourceText?: string; +} + +interface NeaGhsResponse { + categoryName?: string; + categoryDesc?: string; + datasource: NeaGhsItem[]; +} + +interface InternalDataItem { + title: string; + link: string; + pubDate: Date; + description: string; + author?: string; + category: string[]; +} From d1122aec022d2b042704ae8951a2c0ddfe78bebc Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 16 Apr 2025 03:59:36 +0800 Subject: [PATCH 0444/2658] chore: sort git ignore --- .gitignore | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 59a15ea532d4..e93d73f4dd31 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,14 @@ .DS_Store +.cursorrules .env* .eslintcache .idea .log .now +.roomodes .vercel .vscode +.windsurfrules .yarn .yarnrc.yml .pnp* @@ -17,6 +20,7 @@ app-minimal/ assets/build/ coverage docs/.vuepress/dist +memory-bank/ node_modules tmp dist @@ -30,9 +34,3 @@ package-lock.json # pnpm-lock.yaml yarn.lock yarn-error.log - -# ai ide rules -memory-bank/ -.roomodes -.cursorrules -.windsurfrules From 14d4d69bf537c0650f37cbecdf3797de0f2fe268 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 16 Apr 2025 04:54:24 +0800 Subject: [PATCH 0445/2658] fix(route/nea): incomplete description (#18858) --- lib/routes/gov/nea/ghs.ts | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/lib/routes/gov/nea/ghs.ts b/lib/routes/gov/nea/ghs.ts index ca64bf0757e7..f7f485c031a1 100644 --- a/lib/routes/gov/nea/ghs.ts +++ b/lib/routes/gov/nea/ghs.ts @@ -35,7 +35,18 @@ async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 35; const rootUrl = 'https://www.nea.gov.cn'; - const jsonUrl = new URL('sjzz/ghs/ds_99a01b29f9a24ab58f7d64b36489500e.json', rootUrl).href; + const targetUrl: string = new URL('sjzz/ghs/', rootUrl).href; + + const response = await ofetch(targetUrl); + const $ = load(response); + + const dataSourceId: string | undefined = $('ul#showData0').attr('data')?.split(/:/).pop(); + + if (!dataSourceId) { + throw new Error('Data source ID not found'); + } + + const jsonUrl = new URL(`ds_${dataSourceId}.json`, targetUrl).href; const jsonData: NeaGhsResponse = await ofetch(jsonUrl); @@ -48,10 +59,12 @@ async function handler(ctx) { return { title: titleText, link: itemLink, - pubDate: parseDate(item.publishTime), + pubDate: item.publishTime ? timezone(parseDate(item.publishTime), +8) : undefined, description: item.summary?.trim() || titleText, - author: item.sourceText?.trim() || undefined, - category: [] as string[], + author: [...new Set([item.sourceText, item.author, item.editor, item.responsibleEditor].filter(Boolean))].map((author) => ({ + name: author, + })), + category: item.keywords.split(/,/), }; }); @@ -63,9 +76,8 @@ async function handler(ctx) { const content = load(detailResponse); item.title = content('meta[name="ArticleTitle"]').prop('content') || item.title; - item.description = content('td.detail').html() || content('div.article-content td').html() || item.description; - item.author = content('meta[name="ContentSource"]').prop('content') || item.author; - item.category = content('meta[name="keywords"]').prop('content')?.split(/,/) ?? item.category; + item.description = content('td.detail').html() || content('div.article-content').html() || item.description; + item.category = [...new Set([...(item.category ?? []), ...(content('meta[name="keywords"]').attr('conetnt')?.split(/,/) ?? [])])]; const detailPubDate = content('meta[name="PubDate"]').prop('content'); item.pubDate = detailPubDate ? timezone(parseDate(detailPubDate), +8) : item.pubDate; } catch { @@ -81,7 +93,7 @@ async function handler(ctx) { return { item: filteredItems, title: '国家能源局 - 发展规划司工作进展', - link: 'https://www.nea.gov.cn/sjzz/ghs/', + link: targetUrl, description: '国家能源局 - 发展规划司工作进展', }; } @@ -92,6 +104,10 @@ interface NeaGhsItem { publishTime: string; summary?: string; sourceText?: string; + author?: string; + editor?: string; + responsibleEditor?: string; + keywords: string; } interface NeaGhsResponse { From fe3416146c41f0726ecad64af015ca2ad895c876 Mon Sep 17 00:00:00 2001 From: Jiahao Lee Date: Wed, 16 Apr 2025 18:24:41 +0800 Subject: [PATCH 0446/2658] feat(route): add JPMC Institute (#18818) * feat(route): add JPMorgan Chase Institute * feat(route/jpmc): fix page content scraping * chore(route/jpmc): remove deprecated routes * fix(route/jpmc): make gh es linter happy * fix(route/jpmc): not caching the items array --- .../jpmorganchase/research.js | 52 --------- lib/routes/jpmorganchase/namespace.ts | 9 ++ lib/routes/jpmorganchase/research.ts | 107 ++++++++++++++++++ 3 files changed, 116 insertions(+), 52 deletions(-) delete mode 100644 lib/routes-deprecated/jpmorganchase/research.js create mode 100644 lib/routes/jpmorganchase/namespace.ts create mode 100644 lib/routes/jpmorganchase/research.ts diff --git a/lib/routes-deprecated/jpmorganchase/research.js b/lib/routes-deprecated/jpmorganchase/research.js deleted file mode 100644 index c2d27540b0c7..000000000000 --- a/lib/routes-deprecated/jpmorganchase/research.js +++ /dev/null @@ -1,52 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { parseDate } = require('@/utils/parse-date'); - -const base = 'https://institute.jpmorganchase.com'; -const url = `${base}/institute/research`; - -const parseDetails = (link, ctx) => { - const fullLink = `${base}${link}`; - return ctx.cache.tryGet(fullLink, async () => { - const response = await got({ - url: fullLink, - }); - const $ = cheerio.load(response.data); - const authors = []; - $('.author-name').each((i, elem) => { - authors.push($(elem).text()); - }); - - return { - category: $('.eyebrow').text(), - author: authors.filter(Boolean).join(', '), - title: $('title').text() + ' | ' + $('.copy-wrap p').text(), - description: $('.jpmc-wrapper').html(), - link: fullLink, - pubDate: parseDate($('.date-field').text(), 'MMMM YYYY'), - }; - }); -}; - -module.exports = async (ctx) => { - const response = await got({ - method: 'get', - url, - }); - - const title = 'All Reports'; - const $ = cheerio.load(response.data); - - const items = $('.item a') - .map((i, item) => { - const link = item.attribs.href; - return parseDetails(link, ctx); - }) - .get(); - ctx.state.data = { - title: `${title} - JPMorgan Chase Institute`, - link: url, - description: `${title} - JPMorgan Chase Institute`, - item: await Promise.all(items), - }; -}; diff --git a/lib/routes/jpmorganchase/namespace.ts b/lib/routes/jpmorganchase/namespace.ts new file mode 100644 index 000000000000..2d6157f63c1e --- /dev/null +++ b/lib/routes/jpmorganchase/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'JPMorgan Chase', + url: 'www.jpmorganchase.com', + zh: { + name: '摩根大通', + }, +}; diff --git a/lib/routes/jpmorganchase/research.ts b/lib/routes/jpmorganchase/research.ts new file mode 100644 index 000000000000..19f93b32920f --- /dev/null +++ b/lib/routes/jpmorganchase/research.ts @@ -0,0 +1,107 @@ +import { Data, DataItem, Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +const base = 'https://www.jpmorganchase.com'; +const frontPageUrl = `${base}/institute/all-topics`; +const indexUrl = `${base}/services/json/v1/dynamic-grid.service/parent=jpmorganchase/global/US/en/home/institute/all-topics&comp=root/content-parsys/dynamic_grid&page=p1.json`; + +export const route: Route = { + path: '/', + example: '/jpmorganchase', + categories: ['finance'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['jpmorganchase.com/institute/all-topics'], + target: '/', + }, + ], + name: 'Research Topics', + maintainers: ['dousha'], + handler, + url: 'www.jpmorganchase.com/institute/all-topics', +}; + +type PartitionMeta = { + 'total-items': number; + page: number; + 'page-size': number; + 'max-pages': number; + 'partition-size': string; +}; + +type IndexEntry = { + title: string; + date: string; + hideDate: boolean; + description: string; + type: string; + link: string; + linkText: string; + image: string; +}; + +async function fetchIndexEntires(): Promise { + const response = await ofetch(indexUrl); + if (!('meta' in response)) { + return []; + } + + const meta = response.meta as PartitionMeta; + const maxItemCount = Number(meta['partition-size']); + + return (response.items as IndexEntry[]).slice(0, maxItemCount); +} + +function fetchDataItem(entry: IndexEntry): Promise { + const url = `${base}${entry.link}`; + + return cache.tryGet(url, async () => { + let authors: string[] = []; + let description: string = ''; + let category: string[] = []; + let articleDate: string = entry.date; + const pageContent: string = await ofetch(url); + + if (pageContent.length > 0) { + const $ = load(pageContent); + + category = [$('.eyebrow').text()]; + authors = $('.author-name') + .toArray() + .map((el) => $(el).text().trim()); + articleDate = $('.date').text().trim() || entry.date; + description = $('.root').children('div').children('div:eq(1)').html() || ''; + } + + return { + category, + author: authors.join(', '), + title: entry.title, + description, + link: url, + pubDate: parseDate(articleDate), + } satisfies DataItem; + }) as Promise; +} + +async function handler(): Promise { + const entires = await fetchIndexEntires(); + const items = await Promise.all(entires.map((it) => fetchDataItem(it))); + + return { + title: 'All Topics - JPMorganChase Institute', + link: frontPageUrl, + item: items, + }; +} From 94cc1c99d23c1f18a6b10cb1a45a0d484bcfb8d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 18:44:22 +0800 Subject: [PATCH 0447/2658] chore(deps): bump hono from 4.7.6 to 4.7.7 (#18866) Bumps [hono](https://github.com/honojs/hono) from 4.7.6 to 4.7.7. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.7.6...v4.7.7) --- updated-dependencies: - dependency-name: hono dependency-version: 4.7.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 982e0f9e7bc5..d43e508e743e 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "fanfou-sdk": "5.0.0", "form-data": "4.0.2", "googleapis": "148.0.0", - "hono": "4.7.6", + "hono": "4.7.7", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.8", "https-proxy-agent": "7.0.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 305858bb0379..32cbbe6419d9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,10 +25,10 @@ importers: version: 4.2.0 '@hono/node-server': specifier: 1.14.1 - version: 1.14.1(hono@4.7.6) + version: 1.14.1(hono@4.7.7) '@hono/zod-openapi': specifier: 0.19.4 - version: 0.19.4(hono@4.7.6)(zod@3.24.2) + version: 0.19.4(hono@4.7.7)(zod@3.24.2) '@notionhq/client': specifier: 2.3.0 version: 2.3.0 @@ -61,7 +61,7 @@ importers: version: 0.0.25 '@scalar/hono-api-reference': specifier: 0.8.1 - version: 0.8.1(hono@4.7.6) + version: 0.8.1(hono@4.7.7) '@sentry/node': specifier: 9.12.0 version: 9.12.0 @@ -120,8 +120,8 @@ importers: specifier: 148.0.0 version: 148.0.0 hono: - specifier: 4.7.6 - version: 4.7.6 + specifier: 4.7.7 + version: 4.7.7 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3733,8 +3733,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.7.6: - resolution: {integrity: sha512-564rVzELU+9BRqqx5k8sT2NFwGD3I3Vifdb6P7CmM6FiarOSY+fDC+6B+k9wcCb86ReoayteZP2ki0cRLN1jbw==} + hono@4.7.7: + resolution: {integrity: sha512-2PCpQRbN87Crty8/L/7akZN3UyZIAopSoRxCwRbJgUuV1+MHNFHzYFxZTg4v/03cXUm+jce/qa2VSBZpKBm3Qw==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -7110,20 +7110,20 @@ snapshots: '@eslint/core': 0.13.0 levn: 0.4.1 - '@hono/node-server@1.14.1(hono@4.7.6)': + '@hono/node-server@1.14.1(hono@4.7.7)': dependencies: - hono: 4.7.6 + hono: 4.7.7 - '@hono/zod-openapi@0.19.4(hono@4.7.6)(zod@3.24.2)': + '@hono/zod-openapi@0.19.4(hono@4.7.7)(zod@3.24.2)': dependencies: '@asteasolutions/zod-to-openapi': 7.3.0(zod@3.24.2) - '@hono/zod-validator': 0.4.3(hono@4.7.6)(zod@3.24.2) - hono: 4.7.6 + '@hono/zod-validator': 0.4.3(hono@4.7.7)(zod@3.24.2) + hono: 4.7.7 zod: 3.24.2 - '@hono/zod-validator@0.4.3(hono@4.7.6)(zod@3.24.2)': + '@hono/zod-validator@0.4.3(hono@4.7.7)(zod@3.24.2)': dependencies: - hono: 4.7.6 + hono: 4.7.7 zod: 3.24.2 '@humanfs/core@0.19.1': {} @@ -7822,10 +7822,10 @@ snapshots: dependencies: '@scalar/types': 0.1.7 - '@scalar/hono-api-reference@0.8.1(hono@4.7.6)': + '@scalar/hono-api-reference@0.8.1(hono@4.7.7)': dependencies: '@scalar/core': 0.2.7 - hono: 4.7.6 + hono: 4.7.7 '@scalar/openapi-types@0.2.0': dependencies: @@ -9796,7 +9796,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.7.6: {} + hono@4.7.7: {} hookable@5.5.3: {} From 5bdef5140724131b097a934a279e1ddab9621cfc Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 17 Apr 2025 01:32:11 +0800 Subject: [PATCH 0448/2658] fix(route/wechat): fetch first page only --- lib/routes/wechat/sogou.ts | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/lib/routes/wechat/sogou.ts b/lib/routes/wechat/sogou.ts index ded68525db02..3940f6acabc5 100644 --- a/lib/routes/wechat/sogou.ts +++ b/lib/routes/wechat/sogou.ts @@ -14,7 +14,7 @@ interface SogouItemInternal extends DataItem { }; } -async function fetchAndParsePage(wechatId: string, page: number): Promise { +async function fetchAndParsePage(wechatId: string): Promise { const searchUrl = `${host}/weixin`; let response; try { @@ -26,17 +26,16 @@ async function fetchAndParsePage(wechatId: string, page: number): Promise a').text().trim(); const sogouLinkHref = $li.find('h3 > a').attr('href'); if (!sogouLinkHref) { - logger.warn(`Skipping item with missing link for wechatId: ${wechatId} on page ${page}`); + logger.warn(`Skipping item with missing link for wechatId: ${wechatId}`); return null; } const sogouLink = host + sogouLinkHref; @@ -61,10 +60,8 @@ async function fetchAndParsePage(wechatId: string, page: number): Promise[] = []; - for (let page = 1; page <= pageCount; page++) { - pagePromises.push(fetchAndParsePage(wechatId, page)); - } - - const pageResults: SogouItemInternal[][] = await Promise.all(pagePromises); - - const allItems: SogouItemInternal[] = pageResults.flat(); + const allItems: SogouItemInternal[] = await fetchAndParsePage(wechatId); - const firstPageFirstItem = pageResults[0]?.[0]; + const firstPageFirstItem = allItems[0]; const accountTitle = firstPageFirstItem?.author || wechatId; const finalItemsPromises = allItems.map(async (item: SogouItemInternal): Promise => { From bb5bef5e9bb22336050e9cd474f58ef0f39a7422 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 17 Apr 2025 01:33:56 +0800 Subject: [PATCH 0449/2658] fix(route/nea): remove vibe types --- lib/routes/gov/nea/ghs.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/routes/gov/nea/ghs.ts b/lib/routes/gov/nea/ghs.ts index f7f485c031a1..8258fad5d166 100644 --- a/lib/routes/gov/nea/ghs.ts +++ b/lib/routes/gov/nea/ghs.ts @@ -50,7 +50,7 @@ async function handler(ctx) { const jsonData: NeaGhsResponse = await ofetch(jsonUrl); - const list: InternalDataItem[] = jsonData.datasource.slice(0, limit).map((item) => { + const list: DataItem[] = jsonData.datasource.slice(0, limit).map((item) => { const itemLink = new URL(item.publishUrl, rootUrl).href; const $title = load(item.showTitle); @@ -69,7 +69,7 @@ async function handler(ctx) { }); const items = await Promise.all( - list.map((item: InternalDataItem) => + list.map((item: DataItem) => cache.tryGet(item.link, async () => { try { const detailResponse = await ofetch(item.link); @@ -115,12 +115,3 @@ interface NeaGhsResponse { categoryDesc?: string; datasource: NeaGhsItem[]; } - -interface InternalDataItem { - title: string; - link: string; - pubDate: Date; - description: string; - author?: string; - category: string[]; -} From 53d6e9ab742324769b2130096c7f8d2be8bfbc63 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Thu, 17 Apr 2025 11:27:32 +0800 Subject: [PATCH 0450/2658] fix(route/jandan): use official APIs in section logics --- lib/routes/jandan/index.ts | 48 +++++-- lib/routes/jandan/section.ts | 146 ++++++++++++++------- lib/routes/jandan/utils.ts | 248 +++++++++++++++++++++++++++++++++++ 3 files changed, 386 insertions(+), 56 deletions(-) create mode 100644 lib/routes/jandan/utils.ts diff --git a/lib/routes/jandan/index.ts b/lib/routes/jandan/index.ts index 892df4379b6a..6fb2638719d9 100644 --- a/lib/routes/jandan/index.ts +++ b/lib/routes/jandan/index.ts @@ -1,24 +1,47 @@ -import { Route } from '@/types'; +import { Route, DataItem } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; +import { ofetch } from 'ofetch'; import { load } from 'cheerio'; import parser from '@/utils/rss-parser'; export const route: Route = { path: '/', - name: 'Unknown', - maintainers: ['nczitzk', 'bigfei'], + example: '/jandan', + name: 'Feed', + maintainers: ['nczitzk', 'bigfei', 'pseudoyu'], + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['i.jandan.net'], + target: '/jandan', + }, + ], handler, }; -async function handler() { +async function handler(): Promise<{ + title: string; + link: string; + item: DataItem[]; +}> { const rootUrl = 'http://i.jandan.net'; const feed = await parser.parseURL(`${rootUrl}/feed/`); const items = await Promise.all( feed.items.map((item) => - cache.tryGet(item.link, async () => { - const response = await got(item.link); - const $ = load(response.data); + cache.tryGet(item.link || '', async () => { + if (!item.link) { + return undefined as unknown as DataItem; + } + const response = await ofetch(item.link); + const $ = load(response); $('.wechat-hide').prev().nextAll().remove(); $('img').replaceWith((i, e) => { const src = $(e).attr('src'); @@ -26,9 +49,9 @@ async function handler() { const newSrc = src?.replace(/https?:\/\/(\w+)\.moyu\.im/, 'https://$1.sinaimg.cn'); return `${alt}`; }); - const single = { - title: item.title, - description: $('.entry').html(), + const single: DataItem = { + title: item.title || '', + description: $('.entry').html() || '', pubDate: item.pubDate, link: item.link, author: item['dc:creator'], @@ -37,7 +60,8 @@ async function handler() { return single; }) ) - ); + ).then((items) => items.filter((item): item is DataItem => item !== undefined)); + return { title: '煎蛋', link: rootUrl, diff --git a/lib/routes/jandan/section.ts b/lib/routes/jandan/section.ts index 6e9d82e10ffa..cb1b6c391050 100644 --- a/lib/routes/jandan/section.ts +++ b/lib/routes/jandan/section.ts @@ -1,59 +1,117 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; -import { load } from 'cheerio'; -import { parseDate } from '@/utils/parse-date'; +import { Route, DataItem } from '@/types'; +import { handleTopSection, handleForumSection, handleCommentSection } from './utils'; export const route: Route = { - path: '/:category', - name: 'Unknown', - maintainers: [], + path: '/:category/:type?', + example: '/jandan/top', + name: 'Section', + maintainers: ['nczitzk', 'pseudoyu'], + parameters: { + category: { + description: '板块', + options: [ + { + label: '热榜', + value: 'top', + }, + { + label: '问答', + value: 'qa', + }, + { + label: '树洞', + value: 'treehole', + }, + { + label: '随手拍', + value: 'ooxx', + }, + { + label: '无聊图', + value: 'pic', + }, + { + label: '鱼塘', + value: 'bbs', + }, + ], + }, + type: { + description: '热榜类型,仅当 category 选择 `top` 时有效', + default: '4hr', + options: [ + { + label: '4小时热门', + value: '4hr', + }, + { + label: '3天内无聊图', + value: 'pic3days', + }, + { + label: '7天内无聊图', + value: 'pic7days', + }, + ], + }, + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['i.jandan.net/:category'], + target: '/jandan/:category?', + }, + ], handler, }; -async function handler(ctx) { - const category = ctx.req.param('category') ?? 'top'; +async function handler(ctx): Promise<{ + title: string; + link: string; + item: DataItem[]; +}> { + let category = ctx.req.param('category') ?? 'top'; + category = category.replace(/#.*$/, ''); + const type = ctx.req.param('type') ?? '4hr'; const rootUrl = 'http://i.jandan.net'; const currentUrl = `${rootUrl}/${category}`; - const response = await got({ - method: 'get', - url: currentUrl, - }); + let result: { title: string; items: DataItem[] }; - const $ = load(response.data); - - const items = $('ol.commentlist li') - .not('.row') - .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50) - .toArray() - .map((item) => { - item = $(item); - - item.find('.commenttext img, .tucao-report').remove(); - - item.find('.commenttext .view_img_link').each(function () { - const url = new URL($(this).attr('href'), rootUrl); - url.protocol = 'https:'; - url.host = url.host.replace('moyu.im', 'sinaimg.cn'); - $(this).replaceWith(``); - }); - - const author = item.find('b').first().text(); - const description = item.find('.commenttext'); - - return { - author, - description: description.html(), - title: `${author}: ${description.text()}`, - pubDate: parseDate(item.find('.time').text()), - link: `${rootUrl}/t/${item.attr('id').split('-').pop()}`, - }; - }); + try { + if (category === 'top') { + result = await handleTopSection(rootUrl, type); + } else if (category === 'bbs') { + result = await handleForumSection(rootUrl); + } else { + result = await handleCommentSection(rootUrl, category); + } + } catch (error: unknown) { + const errorMessage = error instanceof Error ? error.message : String(error); + result = { + title: `煎蛋 - ${category}`, + items: [ + { + title: `抓取出错: ${category}`, + description: `抓取 ${category} 分区时出现错误: ${errorMessage}`, + link: currentUrl, + pubDate: new Date(), + }, + ], + }; + } return { - title: `${$('title').text()} - 煎蛋`, + title: result.title, link: currentUrl, - item: items, + item: result.items, }; } diff --git a/lib/routes/jandan/utils.ts b/lib/routes/jandan/utils.ts new file mode 100644 index 000000000000..7f5d911e25d1 --- /dev/null +++ b/lib/routes/jandan/utils.ts @@ -0,0 +1,248 @@ +import { DataItem } from '@/types'; +import { ofetch } from 'ofetch'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +export const USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36'; + +/** + * Extract page ID from script tags in HTML + */ +export const extractPageId = async (url: string, referer: string): Promise => { + const response = await ofetch(url, { + headers: { + 'User-Agent': USER_AGENT, + Referer: referer, + Accept: 'application/json, text/plain, */*', + }, + }); + + const $ = load(response); + let pageId = ''; + + $('script').each((_, script) => { + const content = $(script).html() || ''; + const match = content.match(/PAGE\s*=\s*{\s*id\s*:\s*(\d+)\s*}/); + if (match) { + pageId = match[1]; + } + }); + + return pageId; +}; + +/** + * Handle the top section (热榜) + */ +export const handleTopSection = async (rootUrl: string, type: string): Promise<{ title: string; items: DataItem[] }> => { + const apiUrl = `${rootUrl}/api/top/${type}`; + const response = await ofetch(apiUrl, { + headers: { + 'User-Agent': USER_AGENT, + Referer: rootUrl, + Accept: 'application/json, text/plain, */*', + }, + }); + + let title = '热榜'; + switch (type) { + case 'pic3days': + title += ' - 3天内无聊图'; + break; + case 'pic7days': + title += ' - 7天内无聊图'; + break; + default: + title += ' - 4小时热门'; + break; + } + + if (response.code === 0 && response.data && Array.isArray(response.data)) { + const items = response.data.map((item) => { + const content = item.content.replaceAll(/img src="(.*?)"/g, (match, src) => match.replace(src, src.replace(/^https?:\/\/(\w+)\.moyu\.im/, 'https://$1.sinaimg.cn'))); + + return { + author: item.author, + title: `${item.author}: ${content.replaceAll(/<[^>]+>/g, '')}`, + description: content, + pubDate: parseDate(item.date), + link: `${rootUrl}/t/${item.id}`, + } as DataItem; + }); + + return { title, items }; + } + + return { + title, + items: [ + { + title: `获取失败: ${title}`, + description: '未能获取热榜数据', + link: `${rootUrl}/top`, + pubDate: new Date(), + }, + ], + }; +}; + +/** + * Handle the forum/bbs section (鱼塘) + */ +export const handleForumSection = async (rootUrl: string): Promise<{ title: string; items: DataItem[] }> => { + const title = '煎蛋 - 鱼塘'; + const currentUrl = `${rootUrl}/bbs`; + + try { + const forumId = await extractPageId(currentUrl, rootUrl); + + if (!forumId) { + return { + title, + items: [ + { + title: `获取失败: ${title}`, + description: '无法获取论坛ID', + link: currentUrl, + pubDate: new Date(), + }, + ], + }; + } + + const apiUrl = `${rootUrl}/api/forum/posts/${forumId}?page=1`; + const forumData = await ofetch(apiUrl, { + headers: { + 'User-Agent': USER_AGENT, + Referer: currentUrl, + Accept: 'application/json, text/plain, */*', + }, + }); + + if (forumData.code === 0 && forumData.data && forumData.data.list && Array.isArray(forumData.data.list)) { + const items = forumData.data.list.map((post) => { + const content = post.content.replaceAll(/img src="(.*?)"/g, (match, src) => match.replace(src, src.replace(/^https?:\/\/(\w+)\.moyu\.im/, 'https://$1.sinaimg.cn'))); + + return { + author: post.author_name, + title: post.title || `${post.author_name}发表了新主题`, + description: content, + pubDate: parseDate(post.update_time || post.create_time), + link: `${rootUrl}/bbs#/topic/${post.post_id}`, + category: post.reply_count > 0 ? [`${post.reply_count}条回复`] : undefined, + } as DataItem; + }); + + return { title, items }; + } + + return { + title, + items: [ + { + title: `获取失败: ${title}`, + description: '未能获取鱼塘数据', + link: currentUrl, + pubDate: new Date(), + }, + ], + }; + } catch (error) { + return { + title, + items: [ + { + title: `解析错误: 鱼塘`, + description: `解析鱼塘页面时出错: ${error instanceof Error ? error.message : String(error)}`, + link: currentUrl, + pubDate: new Date(), + }, + ], + }; + } +}; + +/** + * Handle other sections (问答, 树洞, 随手拍, 无聊图) + */ +export const handleCommentSection = async (rootUrl: string, category: string): Promise<{ title: string; items: DataItem[] }> => { + const currentUrl = `${rootUrl}/${category}`; + + try { + const pageId = await extractPageId(currentUrl, rootUrl); + + const response = await ofetch(currentUrl, { + headers: { + 'User-Agent': USER_AGENT, + Referer: rootUrl, + Accept: 'application/json, text/plain, */*', + }, + }); + + const $ = load(response); + const title = String($('title').text().trim()) || `煎蛋 - ${category}`; + + if (!pageId) { + return { + title, + items: [ + { + title: `无法解析: ${title}`, + description: '无法从页面中获取到帖子ID,可能网站结构已变更', + link: currentUrl, + pubDate: new Date(), + }, + ], + }; + } + + const apiUrl = `${rootUrl}/api/comment/post/${pageId}?order=desc&page=1`; + const commentsData = await ofetch(apiUrl, { + headers: { + 'User-Agent': USER_AGENT, + Referer: currentUrl, + Accept: 'application/json, text/plain, */*', + }, + }); + + if (commentsData.code === 0 && commentsData.data && commentsData.data.list && Array.isArray(commentsData.data.list)) { + const items = commentsData.data.list.map((comment) => { + const content = comment.content.replaceAll(/img src="(.*?)"/g, (match, src) => match.replace(src, src.replace(/^https?:\/\/(\w+)\.moyu\.im/, 'https://$1.sinaimg.cn'))); + + return { + author: comment.author, + title: `${comment.author}: ${content.replaceAll(/<[^>]+>/g, '')}`, + description: content, + pubDate: parseDate(comment.date_gmt || comment.date), + link: `${rootUrl}/t/${comment.id}`, + } as DataItem; + }); + + return { title, items }; + } + + return { + title, + items: [ + { + title: `暂无内容: ${title || category}`, + description: '没有获取到内容,可能需要更新解析规则', + link: currentUrl, + pubDate: new Date(), + }, + ], + }; + } catch { + return { + title: `煎蛋 - ${category}`, + items: [ + { + title: `解析错误: ${category}`, + description: '解析页面时出错', + link: currentUrl, + pubDate: new Date(), + }, + ], + }; + } +}; From 365e641b47dc56f5b37ca3293a5bd4842367a24c Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Thu, 17 Apr 2025 11:49:24 +0800 Subject: [PATCH 0451/2658] chore(route/jandan): import ofetch from utils --- lib/routes/jandan/index.ts | 2 +- lib/routes/jandan/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/jandan/index.ts b/lib/routes/jandan/index.ts index 6fb2638719d9..217da9e60cd7 100644 --- a/lib/routes/jandan/index.ts +++ b/lib/routes/jandan/index.ts @@ -1,6 +1,6 @@ import { Route, DataItem } from '@/types'; import cache from '@/utils/cache'; -import { ofetch } from 'ofetch'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import parser from '@/utils/rss-parser'; diff --git a/lib/routes/jandan/utils.ts b/lib/routes/jandan/utils.ts index 7f5d911e25d1..ecdf9d3c39d0 100644 --- a/lib/routes/jandan/utils.ts +++ b/lib/routes/jandan/utils.ts @@ -1,5 +1,5 @@ import { DataItem } from '@/types'; -import { ofetch } from 'ofetch'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; From 2fde170329e6b8e2459a2070ec2bf4db50cb8dac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 08:54:18 +0000 Subject: [PATCH 0452/2658] chore(deps): bump @scalar/hono-api-reference from 0.8.1 to 0.8.2 (#18872) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.8.1 to 0.8.2. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-version: 0.8.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index d43e508e743e..257f03472f87 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.32.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.8.1", + "@scalar/hono-api-reference": "0.8.2", "@sentry/node": "9.12.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 32cbbe6419d9..4707f21acc94 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.8.1 - version: 0.8.1(hono@4.7.7) + specifier: 0.8.2 + version: 0.8.2(hono@4.7.7) '@sentry/node': specifier: 9.12.0 version: 9.12.0 @@ -2048,12 +2048,12 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/core@0.2.7': - resolution: {integrity: sha512-8BeyxQiTzd3yST43x1w3t47kgkQSBVfR+bpruXaLFxeITWjzOTro5Ojh+enGWnooIfg5wMDpNqfDJCbGOVq1hg==} + '@scalar/core@0.2.8': + resolution: {integrity: sha512-4WjhJl0hJGgPGznmRvMFscY4ZMRbXgfEAsDGWl9eVqE/ZdXFxnoY2LsGhBALSKEYfwgNwLzk3A+0bCv2oU6N7g==} engines: {node: '>=18'} - '@scalar/hono-api-reference@0.8.1': - resolution: {integrity: sha512-bKPJ6QPBOUEGupq4wKF1iUl3upsVkTdhIIkUwtEpEx9ox3CCsp0kxAUykhSUuhZ3Xhy6WcuMdigOlU5PzTY8xA==} + '@scalar/hono-api-reference@0.8.2': + resolution: {integrity: sha512-sgNtRst9KTamZMxE66fuIczgTsG7Yeputoelvxw/O+5dcN4KPeZ8ac67aqFH9sG1t+bbQyxqZ+qn+6ESoZMJQw==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -2062,8 +2062,8 @@ packages: resolution: {integrity: sha512-waiKk12cRCqyUCWTOX0K1WEVX46+hVUK+zRPzAahDJ7G0TApvbNkuy5wx7aoUyEk++HHde0XuQnshXnt8jsddA==} engines: {node: '>=18'} - '@scalar/types@0.1.7': - resolution: {integrity: sha512-irIDYzTQG2KLvFbuTI8k2Pz/R4JR+zUUSykVTbEMatkzMmVFnn1VzNSMlODbadycwZunbnL2tA27AXed9URVjw==} + '@scalar/types@0.1.8': + resolution: {integrity: sha512-VL1dcLB6w7V0htFxIgcdQeQhD5LFW1oqWk9ZWfzd9Ekl0a3bDGc81R5S3fk6qCHahPZR3cVPr4rHVQh0aX+FrQ==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -5695,8 +5695,8 @@ packages: resolution: {integrity: sha512-2dBz5D5ycHIoliLYLi0Q2V7KRaDlH0uWIvmk7TYlAg5slqwiPv1ezJdZm1QEM0xgk29oYWMCbIG7E6gHpvChlg==} engines: {node: '>=16'} - type-fest@4.39.1: - resolution: {integrity: sha512-uW9qzd66uyHYxwyVBYiwS4Oi0qZyUqwjU+Oevr6ZogYiXt99EOYtwvzMSLw1c3lYo2HzJsep/NB23iEVEgjG/w==} + type-fest@4.40.0: + resolution: {integrity: sha512-ABHZ2/tS2JkvH1PEjxFDTUWC8dB5OsIGZP4IFLhR293GqT5Y5qB1WwL2kMPYhQW9DVgVD8Hd7I8gjwPIf5GFkw==} engines: {node: '>=16'} type@2.7.3: @@ -7818,25 +7818,25 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/core@0.2.7': + '@scalar/core@0.2.8': dependencies: - '@scalar/types': 0.1.7 + '@scalar/types': 0.1.8 - '@scalar/hono-api-reference@0.8.1(hono@4.7.7)': + '@scalar/hono-api-reference@0.8.2(hono@4.7.7)': dependencies: - '@scalar/core': 0.2.7 + '@scalar/core': 0.2.8 hono: 4.7.7 '@scalar/openapi-types@0.2.0': dependencies: zod: 3.24.2 - '@scalar/types@0.1.7': + '@scalar/types@0.1.8': dependencies: '@scalar/openapi-types': 0.2.0 '@unhead/schema': 1.11.20 nanoid: 5.1.5 - type-fest: 4.39.1 + type-fest: 4.40.0 zod: 3.24.2 '@sec-ant/readable-stream@0.4.1': {} @@ -11933,7 +11933,7 @@ snapshots: type-fest@4.38.0: {} - type-fest@4.39.1: {} + type-fest@4.40.0: {} type@2.7.3: {} From 4727de90307b0dc9f7ed1b9374dc39c9baee1f0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 08:59:16 +0000 Subject: [PATCH 0453/2658] chore(deps): bump zod from 3.24.2 to 3.24.3 (#18874) Bumps [zod](https://github.com/colinhacks/zod) from 3.24.2 to 3.24.3. - [Release notes](https://github.com/colinhacks/zod/releases) - [Changelog](https://github.com/colinhacks/zod/blob/main/CHANGELOG.md) - [Commits](https://github.com/colinhacks/zod/compare/v3.24.2...v3.24.3) --- updated-dependencies: - dependency-name: zod dependency-version: 3.24.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 257f03472f87..2d789034ae4e 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ "uuid": "11.1.0", "winston": "3.17.0", "xxhash-wasm": "1.1.0", - "zod": "3.24.2" + "zod": "3.24.3" }, "devDependencies": { "@babel/preset-env": "7.26.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4707f21acc94..59a1f2be7679 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,7 +28,7 @@ importers: version: 1.14.1(hono@4.7.7) '@hono/zod-openapi': specifier: 0.19.4 - version: 0.19.4(hono@4.7.7)(zod@3.24.2) + version: 0.19.4(hono@4.7.7)(zod@3.24.3) '@notionhq/client': specifier: 2.3.0 version: 2.3.0 @@ -276,8 +276,8 @@ importers: specifier: 1.1.0 version: 1.1.0 zod: - specifier: 3.24.2 - version: 3.24.2 + specifier: 3.24.3 + version: 3.24.3 devDependencies: '@babel/preset-env': specifier: 7.26.9 @@ -6098,8 +6098,8 @@ packages: zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} - zod@3.24.2: - resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==} + zod@3.24.3: + resolution: {integrity: sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==} snapshots: @@ -6116,10 +6116,10 @@ snapshots: '@csstools/css-tokenizer': 3.0.3 lru-cache: 10.4.3 - '@asteasolutions/zod-to-openapi@7.3.0(zod@3.24.2)': + '@asteasolutions/zod-to-openapi@7.3.0(zod@3.24.3)': dependencies: openapi3-ts: 4.4.0 - zod: 3.24.2 + zod: 3.24.3 '@babel/code-frame@7.0.0': dependencies: @@ -7114,17 +7114,17 @@ snapshots: dependencies: hono: 4.7.7 - '@hono/zod-openapi@0.19.4(hono@4.7.7)(zod@3.24.2)': + '@hono/zod-openapi@0.19.4(hono@4.7.7)(zod@3.24.3)': dependencies: - '@asteasolutions/zod-to-openapi': 7.3.0(zod@3.24.2) - '@hono/zod-validator': 0.4.3(hono@4.7.7)(zod@3.24.2) + '@asteasolutions/zod-to-openapi': 7.3.0(zod@3.24.3) + '@hono/zod-validator': 0.4.3(hono@4.7.7)(zod@3.24.3) hono: 4.7.7 - zod: 3.24.2 + zod: 3.24.3 - '@hono/zod-validator@0.4.3(hono@4.7.7)(zod@3.24.2)': + '@hono/zod-validator@0.4.3(hono@4.7.7)(zod@3.24.3)': dependencies: hono: 4.7.7 - zod: 3.24.2 + zod: 3.24.3 '@humanfs/core@0.19.1': {} @@ -7829,7 +7829,7 @@ snapshots: '@scalar/openapi-types@0.2.0': dependencies: - zod: 3.24.2 + zod: 3.24.3 '@scalar/types@0.1.8': dependencies: @@ -7837,7 +7837,7 @@ snapshots: '@unhead/schema': 1.11.20 nanoid: 5.1.5 type-fest: 4.40.0 - zod: 3.24.2 + zod: 3.24.3 '@sec-ant/readable-stream@0.4.1': {} @@ -12310,4 +12310,4 @@ snapshots: zod@3.22.4: {} - zod@3.24.2: {} + zod@3.24.3: {} From 9cd9c2a895122cad5c0d7e4d737936c744b4c3d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 17:02:09 +0800 Subject: [PATCH 0454/2658] chore(deps): bump sanitize-html from 2.15.0 to 2.16.0 (#18873) Bumps [sanitize-html](https://github.com/apostrophecms/sanitize-html) from 2.15.0 to 2.16.0. - [Changelog](https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md) - [Commits](https://github.com/apostrophecms/sanitize-html/compare/2.15.0...2.16.0) --- updated-dependencies: - dependency-name: sanitize-html dependency-version: 2.16.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2d789034ae4e..4513dada8bbe 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "re2js": "1.1.0", "rfc4648": "1.5.4", "rss-parser": "3.13.0", - "sanitize-html": "2.15.0", + "sanitize-html": "2.16.0", "simplecc-wasm": "1.1.0", "socks-proxy-agent": "8.0.5", "source-map": "0.7.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 59a1f2be7679..11bc84223eef 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -225,8 +225,8 @@ importers: specifier: 3.13.0 version: 3.13.0 sanitize-html: - specifier: 2.15.0 - version: 2.15.0 + specifier: 2.16.0 + version: 2.16.0 simplecc-wasm: specifier: 1.1.0 version: 1.1.0 @@ -5226,8 +5226,8 @@ packages: resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} engines: {node: '>=10'} - sanitize-html@2.15.0: - resolution: {integrity: sha512-wIjst57vJGpLyBP8ioUbg6ThwJie5SuSIjHxJg53v5Fg+kUK+AXlb7bK3RNXpp315MvwM+0OBGCV6h5pPHsVhA==} + sanitize-html@2.16.0: + resolution: {integrity: sha512-0s4caLuHHaZFVxFTG74oW91+j6vW7gKbGD6CD2+miP73CE6z6YtOBN0ArtLd2UGyi4IC7K47v3ENUbQX4jV3Mg==} sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} @@ -11474,7 +11474,7 @@ snapshots: safe-stable-stringify@2.5.0: {} - sanitize-html@2.15.0: + sanitize-html@2.16.0: dependencies: deepmerge: 4.3.1 escape-string-regexp: 4.0.0 From 659aeb11b619f323950595ff093ae6d8a8da779c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 17:29:24 +0800 Subject: [PATCH 0455/2658] chore(deps): bump @sentry/node from 9.12.0 to 9.13.0 (#18875) Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 9.12.0 to 9.13.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/9.12.0...9.13.0) --- updated-dependencies: - dependency-name: "@sentry/node" dependency-version: 9.13.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 4513dada8bbe..cee6c9d084d4 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", "@scalar/hono-api-reference": "0.8.2", - "@sentry/node": "9.12.0", + "@sentry/node": "9.13.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", "art-template": "4.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 11bc84223eef..5dbe4afcb68a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,8 +63,8 @@ importers: specifier: 0.8.2 version: 0.8.2(hono@4.7.7) '@sentry/node': - specifier: 9.12.0 - version: 9.12.0 + specifier: 9.13.0 + version: 9.13.0 '@tonyrl/rand-user-agent': specifier: 2.0.83 version: 2.0.83 @@ -2072,16 +2072,16 @@ packages: '@selderee/plugin-htmlparser2@0.11.0': resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==} - '@sentry/core@9.12.0': - resolution: {integrity: sha512-jOqQK/90uzHmsBvkPTj/DAEFvA5poX4ZRyC7LE1zjg4F5jdOp3+M4W3qCy0CkSTu88Zu5VWBoppCU2Bs34XEqg==} + '@sentry/core@9.13.0': + resolution: {integrity: sha512-Zn1Qec5XNkNRE/M5QjL6YJLghETg6P188G/v2OzdHdHIRf0Y58/SnJilu3louF+ogos6kaSqqdMgzqKgZ8tCdg==} engines: {node: '>=18'} - '@sentry/node@9.12.0': - resolution: {integrity: sha512-NZHneJovlLOdde85vJAIs7vIki36EfJ234d6YXHUE+874sxKMknB/wrzAZi5XS5nqT3kqIXD5KgjgDTjrhAENQ==} + '@sentry/node@9.13.0': + resolution: {integrity: sha512-75UVkrED5b0BaazNQKCmF8NqeqjErxildPojDyC037JN+cVFMPr/kFFGGm7E+eCvA/j2pAPUzqifHp/PjykPcw==} engines: {node: '>=18'} - '@sentry/opentelemetry@9.12.0': - resolution: {integrity: sha512-jQfI/UmgDDbcWY439r1Jz0Y4mqNn3a2JwruWfCHWzIqQMOgBzkzcp9lbZMx9iU+x1iZTTp9s80Dy5F9nG4KKMQ==} + '@sentry/opentelemetry@9.13.0': + resolution: {integrity: sha512-TLSP0n+sXKVcVkAM2ttVmXcAT2K3e9D5gdPfr6aCnW+KIGJuD7wzla/TIcTWFaVwUejbvXAB6IFpZ/qA8HFwyA==} engines: {node: '>=18'} peerDependencies: '@opentelemetry/api': ^1.9.0 @@ -7846,9 +7846,9 @@ snapshots: domhandler: 5.0.3 selderee: 0.11.0 - '@sentry/core@9.12.0': {} + '@sentry/core@9.13.0': {} - '@sentry/node@9.12.0': + '@sentry/node@9.13.0': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -7881,13 +7881,13 @@ snapshots: '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.32.0 '@prisma/instrumentation': 6.5.0(@opentelemetry/api@1.9.0) - '@sentry/core': 9.12.0 - '@sentry/opentelemetry': 9.12.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0) + '@sentry/core': 9.13.0 + '@sentry/opentelemetry': 9.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0) import-in-the-middle: 1.13.1 transitivePeerDependencies: - supports-color - '@sentry/opentelemetry@9.12.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0)': + '@sentry/opentelemetry@9.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -7895,7 +7895,7 @@ snapshots: '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.32.0 - '@sentry/core': 9.12.0 + '@sentry/core': 9.13.0 '@sindresorhus/is@5.6.0': {} From 80449e2832ab0d117af37d01f25f4f0e80355414 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 08:29:25 +0000 Subject: [PATCH 0456/2658] chore(deps): bump notion-to-md from 3.1.7 to 3.1.8 (#18885) Bumps [notion-to-md](https://github.com/souvikinator/notion-to-md) from 3.1.7 to 3.1.8. - [Release notes](https://github.com/souvikinator/notion-to-md/releases) - [Commits](https://github.com/souvikinator/notion-to-md/compare/v3.1.7...v3.1.8) --- updated-dependencies: - dependency-name: notion-to-md dependency-version: 3.1.8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index cee6c9d084d4..f97c2ad5c35c 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "markdown-it": "14.1.0", "module-alias": "2.2.3", "narou": "1.1.0", - "notion-to-md": "3.1.7", + "notion-to-md": "3.1.8", "oauth-1.0a": "2.2.6", "ofetch": "1.4.1", "otplib": "12.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5dbe4afcb68a..433da621a4c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -177,8 +177,8 @@ importers: specifier: 1.1.0 version: 1.1.0 notion-to-md: - specifier: 3.1.7 - version: 3.1.7 + specifier: 3.1.8 + version: 3.1.8 oauth-1.0a: specifier: 2.2.6 version: 2.2.6 @@ -4632,8 +4632,8 @@ packages: resolution: {integrity: sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==} engines: {node: '>=14.16'} - notion-to-md@3.1.7: - resolution: {integrity: sha512-DXW4JzDTXmH8VY9v+3Kv2lEI2jMzN23bUSO9hqqkVkTuI4hgbAhtfkTx3L6vw7M/J7wMdkqdF88Vw5dGKwZBIw==} + notion-to-md@3.1.8: + resolution: {integrity: sha512-DuEslJAbmUG2IRVcoeiCdsE2tI8yXOG6NiHlzxYTcKMmkAtoj2Fgq35Gf5T8s92uzpT2ueVf3aCOq7XuVLVYOA==} engines: {node: '>=12'} npm-run-path@5.3.0: @@ -10791,7 +10791,7 @@ snapshots: normalize-url@8.0.1: {} - notion-to-md@3.1.7: + notion-to-md@3.1.8: dependencies: markdown-table: 2.0.0 node-fetch: 2.7.0 From 0ca628ea19850b708e6802f69413e37d0d1faeea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 08:31:10 +0000 Subject: [PATCH 0457/2658] chore(deps): bump @hono/zod-openapi from 0.19.4 to 0.19.5 (#18886) Bumps [@hono/zod-openapi](https://github.com/honojs/middleware/tree/HEAD/packages/zod-openapi) from 0.19.4 to 0.19.5. - [Release notes](https://github.com/honojs/middleware/releases) - [Changelog](https://github.com/honojs/middleware/blob/main/packages/zod-openapi/CHANGELOG.md) - [Commits](https://github.com/honojs/middleware/commits/HEAD/packages/zod-openapi) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-version: 0.19.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f97c2ad5c35c..7cc148daa110 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@bbob/html": "4.2.0", "@bbob/preset-html5": "4.2.0", "@hono/node-server": "1.14.1", - "@hono/zod-openapi": "0.19.4", + "@hono/zod-openapi": "0.19.5", "@notionhq/client": "2.3.0", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.200.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 433da621a4c2..de96d50bce34 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: 1.14.1 version: 1.14.1(hono@4.7.7) '@hono/zod-openapi': - specifier: 0.19.4 - version: 0.19.4(hono@4.7.7)(zod@3.24.3) + specifier: 0.19.5 + version: 0.19.5(hono@4.7.7)(zod@3.24.3) '@notionhq/client': specifier: 2.3.0 version: 2.3.0 @@ -1413,8 +1413,8 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.19.4': - resolution: {integrity: sha512-wt/Hn5TudVLGQxARVBBGDN/ckDOWUQrw9gdZoDBfRb5+G8+AJ/qeRDV8iorKE3SyEeiRkJ5ErKevkjCsAgH69Q==} + '@hono/zod-openapi@0.19.5': + resolution: {integrity: sha512-n2RqdZL7XIaWPwBNygctG/1eySyRtSBnS7l+pIsP3f2JW5P2l7Smm6SLluscrGwB5l2C2fxbfvhWoC6Ig+SxXw==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' @@ -7114,7 +7114,7 @@ snapshots: dependencies: hono: 4.7.7 - '@hono/zod-openapi@0.19.4(hono@4.7.7)(zod@3.24.3)': + '@hono/zod-openapi@0.19.5(hono@4.7.7)(zod@3.24.3)': dependencies: '@asteasolutions/zod-to-openapi': 7.3.0(zod@3.24.3) '@hono/zod-validator': 0.4.3(hono@4.7.7)(zod@3.24.3) From 9d74d2a4ae472de438811c36e062d8ff429db0ba Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Fri, 18 Apr 2025 22:58:06 +0800 Subject: [PATCH 0458/2658] fix(route/domp4): use new domain and ofetch util --- lib/routes/domp4/detail.ts | 14 ++++++++------ lib/routes/domp4/latest-movie-bt.ts | 20 ++++++++++---------- lib/routes/domp4/latest.ts | 16 ++++++++-------- lib/routes/domp4/namespace.ts | 10 ++-------- lib/routes/domp4/utils.ts | 10 +++++----- 5 files changed, 33 insertions(+), 37 deletions(-) diff --git a/lib/routes/domp4/detail.ts b/lib/routes/domp4/detail.ts index 390a8c5b4314..a67c21bb1e07 100644 --- a/lib/routes/domp4/detail.ts +++ b/lib/routes/domp4/detail.ts @@ -1,6 +1,6 @@ import { Route } from '@/types'; import { load } from 'cheerio'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { decodeCipherText, composeMagnetUrl, getUrlType, ensureDomain } from './utils'; @@ -74,7 +74,7 @@ export const route: Route = { path: '/detail/:id', categories: ['multimedia'], example: '/domp4/detail/LBTANI22222I', - parameters: { id: '从剧集详情页 URL 处获取,如:`https://www.mp4kan.com/html/LBTANI22222I.html`,取 `.html` 前面部分' }, + parameters: { id: '从剧集详情页 URL 处获取,如:`https://www.xlmp4.com/html/LBTANI22222I.html`,取 `.html` 前面部分' }, features: { requireConfig: false, requirePuppeteer: false, @@ -85,16 +85,18 @@ export const route: Route = { }, radar: [ { - source: ['domp4.cc/detail/:id'], + source: ['www.xlmp4.com/detail/:id'], }, ], name: '剧集订阅', - maintainers: ['savokiss'], + maintainers: ['savokiss', 'pseudoyu'], handler, description: `::: tip 由于大部分详情页是 \`/html/xxx.html\`,还有部分是 \`/detail/123.html\`,所以此处做了兼容,id 取 \`xxx\` 或者 \`123\` 都可以。 新增 \`second\` 参数,用于选择下载地址二(地址二不可用或者不填都默认地址一),用法: \`/domp4/detail/LBTANI22222I?second=1\`。 + +域名频繁更换,目前使用 www.xlmp4.com :::`, }; @@ -113,8 +115,8 @@ async function handler(ctx) { } const detailUrl = `${ensureDomain(ctx, domain)}/${detailType}/${pureId}.html`; - const res = await got(detailUrl); - const $ = load(res.data); + const res = await ofetch(detailUrl); + const $ = load(res); const list = getItemList($, detailUrl, second); const meta = getMetaInfo($); diff --git a/lib/routes/domp4/latest-movie-bt.ts b/lib/routes/domp4/latest-movie-bt.ts index b9c38a011339..ad75b11f1b07 100644 --- a/lib/routes/domp4/latest-movie-bt.ts +++ b/lib/routes/domp4/latest-movie-bt.ts @@ -1,9 +1,9 @@ import { Route } from '@/types'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { getItemList as detailItemList } from './detail'; -import { defaultDomain, ensureDomain } from './utils'; +import { ensureDomain } from './utils'; import cache from '@/utils/cache'; function getItemList($) { @@ -14,7 +14,7 @@ function getItemList($) { return { title: item.find('a').text(), publishDate: item.find('b').text(), - link: `https://${defaultDomain}${item.find('a').attr('href')}`, // fixed domain for guid + link: `https://www.xlmp4.com${item.find('a').attr('href')}`, // fixed domain for guid }; }) .filter((item) => !item.title.includes('话') && !item.title.includes('集') && !item.title.includes('更新至')); @@ -36,28 +36,28 @@ export const route: Route = { }, radar: [ { - source: ['domp4.cc/', 'domp4.cc/custom/update.html'], + source: ['www.xlmp4.com/', 'www.xlmp4.com/custom/update.html'], }, ], name: '最近更新的电源BT列表', - maintainers: ['xianghuawe'], + maintainers: ['xianghuawe', 'pseudoyu'], handler, - url: 'domp4.cc/', + url: 'www.xlmp4.com/', }; async function handler(ctx) { const { domain, second } = ctx.req.query(); const hostUrl = ensureDomain(ctx, domain); const latestUrl = `${hostUrl}/custom/update.html`; - const res = await got.get(latestUrl); - const $ = load(res.data); + const res = await ofetch(latestUrl); + const $ = load(res); const list = getItemList($); const process = await Promise.all( list.map( async (item) => await cache.tryGet(item.link, async () => { - const response = await got.get(item.link); - const $ = load(response.data); + const response = await ofetch(item.link); + const $ = load(response); return detailItemList($, item.link, second); }) ) diff --git a/lib/routes/domp4/latest.ts b/lib/routes/domp4/latest.ts index c2e6705c749e..190798333f7b 100644 --- a/lib/routes/domp4/latest.ts +++ b/lib/routes/domp4/latest.ts @@ -1,8 +1,8 @@ import { Route } from '@/types'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; -import { defaultDomain, ensureDomain } from './utils'; +import { ensureDomain } from './utils'; function getItemList($, type) { const list = $(`#${type} .list-group-item`) @@ -11,7 +11,7 @@ function getItemList($, type) { item = $(item); return { title: item.find('a').text(), - link: `https://${defaultDomain}${item.find('a').attr('href')}`, // fixed domain for guid + link: `https://www.xlmp4.com${item.find('a').attr('href')}`, }; }); return list; @@ -32,13 +32,13 @@ export const route: Route = { }, radar: [ { - source: ['domp4.cc/', 'domp4.cc/custom/update.html'], + source: ['www.xlmp4.com/', 'www.xlmp4.com/custom/update.html'], }, ], name: '最近更新', - maintainers: ['savokiss'], + maintainers: ['savokiss', 'pseudoyu'], handler, - url: 'domp4.cc/', + url: 'www.xlmp4.com/', }; async function handler(ctx) { @@ -48,8 +48,8 @@ async function handler(ctx) { const hostUrl = ensureDomain(ctx, domain); const latestUrl = `${hostUrl}/custom/update.html`; - const res = await got.get(latestUrl); - const $ = load(res.data); + const res = await ofetch(latestUrl); + const $ = load(res); const list = getItemList($, type); return { diff --git a/lib/routes/domp4/namespace.ts b/lib/routes/domp4/namespace.ts index dfe00a80f918..0b1f2771c957 100644 --- a/lib/routes/domp4/namespace.ts +++ b/lib/routes/domp4/namespace.ts @@ -2,15 +2,9 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DoMP4 影视', - url: 'domp4.cc', + url: 'www.xlmp4.com', description: `::: tip -由于网站有多个备用域名,默认使用 \`mp4us.com\`,可以通过在路由最后加上 \`?domain=<域名>\` 切换域名。 - -目前可用域名有: - -\`\`\`javascript -['domp4.cc', 'mp4kan.com', 'mp4us.com', 'wemp4.com', 'dbmp4.com'] -\`\`\` + 域名频繁更换,目前使用 www.xlmp4.com :::`, lang: 'zh-CN', }; diff --git a/lib/routes/domp4/utils.ts b/lib/routes/domp4/utils.ts index 8c8c7b22c120..517fb88e298a 100644 --- a/lib/routes/domp4/utils.ts +++ b/lib/routes/domp4/utils.ts @@ -1,9 +1,9 @@ import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; -const defaultDomain = 'mp4us.com'; +const defaultDomain = 'www.xlmp4.com'; -const allowedDomains = new Set(['domp4.cc', 'mp4us.com', 'wemp4.com', 'dbmp4.com']); +const allowedDomains = new Set(['www.xlmp4.com']); /** * trackers from https://www.domp4.cc/Style/2020/js/base.js?v=2 @@ -61,11 +61,11 @@ function getUrlType(url) { */ function decodeCipherText(p, a, c, k, e, d) { e = function (c) { - return (c < a ? '' : e(Number.parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)); + return (c < a ? '' : e(Number.parseInt((c / a).toString()))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)); }; if (!''.replace(/^/, String)) { while (c--) { - d[e(c)] = k[c] || e(c); + d[e(c.toString())] = k[c] || e(c.toString()); } k = [ function (e) { @@ -79,7 +79,7 @@ function decodeCipherText(p, a, c, k, e, d) { } while (c--) { if (k[c]) { - p = p.replaceAll(new RegExp(String.raw`\b` + e(c) + String.raw`\b`, 'g'), k[c]); + p = p.replaceAll(new RegExp(String.raw`\b` + e(c.toString()) + String.raw`\b`, 'g'), k[c]); } } return p; From ec9390d30c46f8294367f65beed18b5dd8d30b2a Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Sat, 19 Apr 2025 00:28:00 +0800 Subject: [PATCH 0459/2658] =?UTF-8?q?feat(route):=20add=20=E5=B9=BF?= =?UTF-8?q?=E5=91=8A=E9=97=A8=E6=A1=88=E4=BE=8B=E5=BA=93=20(#18887)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/adquan/case-library.ts | 146 ++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 lib/routes/adquan/case-library.ts diff --git a/lib/routes/adquan/case-library.ts b/lib/routes/adquan/case-library.ts new file mode 100644 index 000000000000..19514c29e912 --- /dev/null +++ b/lib/routes/adquan/case-library.ts @@ -0,0 +1,146 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import { art } from '@/utils/render'; +import cache from '@/utils/cache'; +import { getCurrentPath } from '@/utils/helpers'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; +import path from 'node:path'; + +const __dirname = getCurrentPath(import.meta.url); + +export const handler = async (ctx: Context): Promise => { + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '24', 10); + + const baseUrl: string = 'https://www.adquan.com'; + const targetUrl: string = new URL('case_library/index', baseUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language = $('html').attr('lang') ?? 'zh-CN'; + + let items: DataItem[] = []; + + items = $('div.article_1') + .slice(0, limit) + .toArray() + .map((el): Element => { + const $el: Cheerio = $(el); + + const title: string = $el.find('p.article_2_p').text(); + const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + intro: $el.find('div.article_1_fu p').first().text(), + }); + const pubDateStr: string | undefined = $el.find('div.article_1_fu p').last().text(); + const linkUrl: string | undefined = $el.find('a.article_2_href').attr('href'); + const authors: DataItem['author'] = $el.find('div.article_4').text(); + const image: string | undefined = $el.find('img.article_1_img').attr('src'); + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? parseDate(pubDateStr) : undefined, + link: linkUrl, + author: authors, + content: { + html: description, + text: description, + }, + image, + banner: image, + updated: upDatedStr ? parseDate(upDatedStr) : undefined, + language, + }; + + return processedItem; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async (): Promise => { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('p.infoTitle_left').text(); + const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + description: $$('div.articleContent').html(), + }); + const pubDateStr: string | undefined = $$('p.time').text().split(/:/).pop(); + const categoryEls: Element[] = $$('span.article_5').toArray(); + const categories: string[] = [...new Set(categoryEls.map((el) => $$(el).text()).filter(Boolean))]; + const authors: DataItem['author'] = $$('div.infoTitle_right span').text(); + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? timezone(parseDate(pubDateStr), +8) : item.pubDate, + category: categories, + author: authors, + content: { + html: description, + text: description, + }, + updated: upDatedStr ? timezone(parseDate(upDatedStr), +8) : item.updated, + language, + }; + + return { + ...item, + ...processedItem, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + return { + title: $('title').text(), + description: $('meta[name="description"]').attr('content'), + link: targetUrl, + item: items, + allowEmpty: true, + image: $('img.navi_logo').attr('src'), + author: $('meta[name="author"]').attr('content'), + language, + id: targetUrl, + }; +}; + +export const route: Route = { + path: '/case_library', + name: '案例库', + url: 'www.adquan.com', + maintainers: ['nczitzk'], + handler, + example: '/adquan/case_library', + parameters: undefined, + description: undefined, + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.adquan.com/case_library/index'], + target: '/case_library', + }, + ], + view: ViewType.Articles, +}; From 7519a06b43cb364a1e40a13c2996200b608859b7 Mon Sep 17 00:00:00 2001 From: david90103 Date: Sat, 19 Apr 2025 22:07:10 +0800 Subject: [PATCH 0460/2658] feat(route): add coolpc (#18859) * feat(route): add coolpc * fix(route): fix pr issues * fix(route): fix coolpc time parsing --- lib/routes/coolpc/namespace.ts | 7 +++++ lib/routes/coolpc/news.ts | 53 ++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 lib/routes/coolpc/namespace.ts create mode 100644 lib/routes/coolpc/news.ts diff --git a/lib/routes/coolpc/namespace.ts b/lib/routes/coolpc/namespace.ts new file mode 100644 index 000000000000..bbbab9d91e24 --- /dev/null +++ b/lib/routes/coolpc/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '原價屋', + url: 'www.coolpc.com.tw', + lang: 'zh-TW', +}; diff --git a/lib/routes/coolpc/news.ts b/lib/routes/coolpc/news.ts new file mode 100644 index 000000000000..3f6383d96fb7 --- /dev/null +++ b/lib/routes/coolpc/news.ts @@ -0,0 +1,53 @@ +import { DataItem, Route } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/news', + categories: ['shopping'], + example: '/coolpc/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.coolpc.com.tw/'], + }, + ], + name: '促銷&開箱', + maintainers: ['david90103'], + handler, + url: 'www.coolpc.com.tw/', +}; + +async function handler() { + const rootUrl = 'https://www.coolpc.com.tw/'; + const currentUrl = rootUrl; + + const response = await got(currentUrl); + + const $ = load(response.data); + + const distinctItems: DataItem[] = $('#content article') + .toArray() + .map((item) => ({ + title: $(item).find('h3 a').text(), + description: $(item).find('.ultimate-layouts-excerpt').text(), + link: $(item).find('h3 a').attr('href'), + pubDate: parseDate($(item).find('.ultimate-layouts-metas-wrap span').eq(1).text(), 'YYYY/MM/DD'), + })) + .filter((item, index, self) => index === self.findIndex((i) => i.title === item.title)); + + return { + title: '原價屋 - 促銷&開箱', + link: currentUrl, + item: distinctItems, + }; +} From cf9cb26ef93bc0cb787913cb23c27cffe21c1ab9 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Mon, 21 Apr 2025 12:22:24 +0800 Subject: [PATCH 0461/2658] feat(route/nytimes): include author information in RSS feed items (#18893) --- lib/routes/nytimes/rss.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/routes/nytimes/rss.ts b/lib/routes/nytimes/rss.ts index 681aaa396010..bd19b95b8871 100644 --- a/lib/routes/nytimes/rss.ts +++ b/lib/routes/nytimes/rss.ts @@ -49,7 +49,11 @@ async function handler(ctx) { const $ = load(res); - return { ...e, description: $("[name='articleBody']").html() }; + return { + ...e, + description: $("[name='articleBody']").html(), + author: $('meta[name="byl"]').attr('content'), + }; }) ) ), From c0fa30977c90a5ef2dc5c335479c252439c129cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Apr 2025 09:30:28 +0000 Subject: [PATCH 0462/2658] chore(deps): bump tldts from 7.0.0 to 7.0.1 (#18899) Bumps [tldts](https://github.com/remusao/tldts) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/remusao/tldts/releases) - [Changelog](https://github.com/remusao/tldts/blob/master/CHANGELOG.md) - [Commits](https://github.com/remusao/tldts/compare/v7.0.0...v7.0.1) --- updated-dependencies: - dependency-name: tldts dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 7cc148daa110..1ffa75047846 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "telegram": "2.26.22", "tiny-async-pool": "2.1.0", "title": "4.0.1", - "tldts": "7.0.0", + "tldts": "7.0.1", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.1.2", "tsx": "4.19.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index de96d50bce34..6cd200e0fb11 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -246,8 +246,8 @@ importers: specifier: 4.0.1 version: 4.0.1 tldts: - specifier: 7.0.0 - version: 7.0.0 + specifier: 7.0.1 + version: 7.0.1 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5559,15 +5559,15 @@ packages: tldts-core@6.1.86: resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} - tldts-core@7.0.0: - resolution: {integrity: sha512-ZDylm+F2UZYtJp3zZj0PRSBTJ1aCQ7SmPr0tcq9UDMPEUfRd1qRBh/n6HL1KxQuV0gmLmSrRgiapMoDs0KllCA==} + tldts-core@7.0.1: + resolution: {integrity: sha512-EwrnW4fkFuTgNBPOI3i/j8168ftqogsIQG2IYz69KfF8XOjPy5O+nzu6Ep7kaugpdZrN2Y951VzAVSt/hbYp2g==} - tldts@6.1.85: - resolution: {integrity: sha512-gBdZ1RjCSevRPFix/hpaUWeak2/RNUZB4/8frF1r5uYMHjFptkiT0JXIebWvgI/0ZHXvxaUDDJshiA0j6GdL3w==} + tldts@6.1.86: + resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} hasBin: true - tldts@7.0.0: - resolution: {integrity: sha512-f1DBZcYLK+YVRuiKKSuBS4QbZB5J+gf376pB/4CtJFxYQ3ivAWhQzgBolAmcUH0+zLJybXi2B9lcqHYnumT3yg==} + tldts@7.0.1: + resolution: {integrity: sha512-C3TdHZKykiDkxPIKUYCDWyYpcLQ8bDYvF/RGfH66UikQX3Kro7ij2/WGNYgp5EfxXB4+Tu5H728uAgYGNE1eaQ==} hasBin: true tmp@0.0.33: @@ -11822,15 +11822,15 @@ snapshots: tldts-core@6.1.86: {} - tldts-core@7.0.0: {} + tldts-core@7.0.1: {} - tldts@6.1.85: + tldts@6.1.86: dependencies: tldts-core: 6.1.86 - tldts@7.0.0: + tldts@7.0.1: dependencies: - tldts-core: 7.0.0 + tldts-core: 7.0.1 tmp@0.0.33: dependencies: @@ -11866,7 +11866,7 @@ snapshots: tough-cookie@5.1.2: dependencies: - tldts: 6.1.85 + tldts: 6.1.86 tr46@0.0.3: {} From 6c5b5782dcb846cf46da6d8f9d02717befdcec11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Apr 2025 10:12:44 +0000 Subject: [PATCH 0463/2658] chore(deps): bump imapflow from 1.0.184 to 1.0.186 (#18900) Bumps [imapflow](https://github.com/postalsys/imapflow) from 1.0.184 to 1.0.186. - [Release notes](https://github.com/postalsys/imapflow/releases) - [Changelog](https://github.com/postalsys/imapflow/blob/master/CHANGELOG.md) - [Commits](https://github.com/postalsys/imapflow/compare/v1.0.184...v1.0.186) --- updated-dependencies: - dependency-name: imapflow dependency-version: 1.0.186 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1ffa75047846..b64041584359 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "http-cookie-agent": "6.0.8", "https-proxy-agent": "7.0.6", "iconv-lite": "0.6.3", - "imapflow": "1.0.184", + "imapflow": "1.0.186", "instagram-private-api": "1.46.1", "ioredis": "5.6.1", "ip-regex": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6cd200e0fb11..16d6b4fbada1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -135,8 +135,8 @@ importers: specifier: 0.6.3 version: 0.6.3 imapflow: - specifier: 1.0.184 - version: 1.0.184 + specifier: 1.0.186 + version: 1.0.186 instagram-private-api: specifier: 1.46.1 version: 1.46.1 @@ -3838,8 +3838,8 @@ packages: engines: {node: '>=6.9.0'} hasBin: true - imapflow@1.0.184: - resolution: {integrity: sha512-GKGyNBe7JWF+vP7TZP5AcGe1XJzw+H2D1MGPqdJc5SZ2KQLvGBF/JIhx/TCp3962oraQwW8CTUDFRtRGcEzkMQ==} + imapflow@1.0.186: + resolution: {integrity: sha512-GrkuGsIJSzpQZvRCZQrGlAHdhaEE5K/0ybyu0lGLyEZLCjYoIQa+cPGCULX6Vf0kbG3sUDJDt46eNf6HG1dM9g==} import-fresh@3.3.1: resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} @@ -9920,7 +9920,7 @@ snapshots: image-size@0.7.5: {} - imapflow@1.0.184: + imapflow@1.0.186: dependencies: encoding-japanese: 2.2.0 iconv-lite: 0.6.3 From ebae0a4b5be3f235d1ce5d9918300fcaeff60e63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Apr 2025 18:40:45 +0800 Subject: [PATCH 0464/2658] chore(deps-dev): bump the eslint group with 2 updates (#18898) Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint). Updates `@eslint/js` from 9.24.0 to 9.25.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.25.0/packages/js) Updates `eslint` from 9.24.0 to 9.25.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.24.0...v9.25.0) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-version: 9.25.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint - dependency-name: eslint dependency-version: 9.25.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 156 ++++++++++++++++++++++++------------------------- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index b64041584359..f8f65f618622 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "@babel/preset-typescript": "7.27.0", "@bbob/types": "4.2.0", "@eslint/eslintrc": "3.3.1", - "@eslint/js": "9.24.0", + "@eslint/js": "9.25.0", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "4.2.0", "@types/aes-js": "3.1.4", @@ -173,7 +173,7 @@ "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.37.120", - "eslint": "9.24.0", + "eslint": "9.25.0", "eslint-config-prettier": "10.1.2", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.17.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16d6b4fbada1..1998f3c19978 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -292,14 +292,14 @@ importers: specifier: 3.3.1 version: 3.3.1 '@eslint/js': - specifier: 9.24.0 - version: 9.24.0 + specifier: 9.25.0 + version: 9.25.0 '@microsoft/eslint-formatter-sarif': specifier: 3.1.0 version: 3.1.0 '@stylistic/eslint-plugin': specifier: 4.2.0 - version: 4.2.0(eslint@9.24.0)(typescript@5.8.3) + version: 4.2.0(eslint@9.25.0)(typescript@5.8.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -368,10 +368,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.30.1 - version: 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3) + version: 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0)(typescript@5.8.3))(eslint@9.25.0)(typescript@5.8.3) '@typescript-eslint/parser': specifier: 8.30.1 - version: 8.30.1(eslint@9.24.0)(typescript@5.8.3) + version: 8.30.1(eslint@9.25.0)(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -382,26 +382,26 @@ importers: specifier: 0.37.120 version: 0.37.120 eslint: - specifier: 9.24.0 - version: 9.24.0 + specifier: 9.25.0 + version: 9.25.0 eslint-config-prettier: specifier: 10.1.2 - version: 10.1.2(eslint@9.24.0) + version: 10.1.2(eslint@9.25.0) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.24.0) + version: 8.1.0(eslint@9.25.0) eslint-plugin-n: specifier: 17.17.0 - version: 17.17.0(eslint@9.24.0) + version: 17.17.0(eslint@9.25.0) eslint-plugin-prettier: specifier: 5.2.6 - version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.24.0))(eslint@9.24.0)(prettier@3.5.3) + version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.0))(eslint@9.25.0)(prettier@3.5.3) eslint-plugin-unicorn: specifier: 58.0.0 - version: 58.0.0(eslint@9.24.0) + version: 58.0.0(eslint@9.25.0) eslint-plugin-yml: specifier: 1.17.0 - version: 1.17.0(eslint@9.24.0) + version: 1.17.0(eslint@9.25.0) fs-extra: specifier: 11.3.0 version: 11.3.0 @@ -1353,8 +1353,8 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/eslint-utils@4.6.0': - resolution: {integrity: sha512-WhCn7Z7TauhBtmzhvKpoQs0Wwb/kBcy4CwpuI0/eEIr2Lx2auxmulAzLr91wVZJaz47iUZdkXOK7WlAfxGKCnA==} + '@eslint-community/eslint-utils@4.6.1': + resolution: {integrity: sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -1391,8 +1391,8 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.24.0': - resolution: {integrity: sha512-uIY/y3z0uvOGX8cp1C2fiC4+ZmBhp6yZWkojtHL1YEMnRt1Y63HB9TM17proGEmeG7HeUY+UP36F0aknKYTpYA==} + '@eslint/js@9.25.0': + resolution: {integrity: sha512-iWhsUS8Wgxz9AXNfvfOPFSW4VfMXdVhp1hjkZVhXCrpgh/aLcc45rX6MPu+tIVUWDw0HfNwth7O28M1xDxNf9w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.6': @@ -3333,8 +3333,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.24.0: - resolution: {integrity: sha512-eh/jxIEJyZrvbWRe4XuVclLPDYSYYYgLy5zXGGxD6j8zjSAxFEzI2fL/8xNq6O2yKqVt+eF2YhV+hxjV6UKXwQ==} + eslint@9.25.0: + resolution: {integrity: sha512-MsBdObhM4cEwkzCiraDv7A6txFXEqtNXOb877TsSp2FCkBNl8JfVQrmiuDqC1IkejT6JLPzYBXx/xAiYhyzgGA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -7031,19 +7031,19 @@ snapshots: '@esbuild/win32-x64@0.25.1': optional: true - '@eslint-community/eslint-utils@4.5.1(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.5.1(eslint@9.25.0)': dependencies: - eslint: 8.57.1 + eslint: 9.25.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.5.1(eslint@9.24.0)': + '@eslint-community/eslint-utils@4.6.1(eslint@8.57.1)': dependencies: - eslint: 9.24.0 + eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.6.0(eslint@9.24.0)': + '@eslint-community/eslint-utils@4.6.1(eslint@9.25.0)': dependencies: - eslint: 9.24.0 + eslint: 9.25.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -7096,7 +7096,7 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.24.0': {} + '@eslint/js@9.25.0': {} '@eslint/object-schema@2.1.6': {} @@ -7901,10 +7901,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@4.2.0(eslint@9.24.0)(typescript@5.8.3)': + '@stylistic/eslint-plugin@4.2.0(eslint@9.25.0)(typescript@5.8.3)': dependencies: - '@typescript-eslint/utils': 8.28.0(eslint@9.24.0)(typescript@5.8.3) - eslint: 9.24.0 + '@typescript-eslint/utils': 8.28.0(eslint@9.25.0)(typescript@5.8.3) + eslint: 9.25.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -8099,15 +8099,15 @@ snapshots: '@types/node': 22.14.1 optional: true - '@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.24.0)(typescript@5.8.3))(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0)(typescript@5.8.3))(eslint@9.25.0)(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.30.1(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/parser': 8.30.1(eslint@9.25.0)(typescript@5.8.3) '@typescript-eslint/scope-manager': 8.30.1 - '@typescript-eslint/type-utils': 8.30.1(eslint@9.24.0)(typescript@5.8.3) - '@typescript-eslint/utils': 8.30.1(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/type-utils': 8.30.1(eslint@9.25.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.25.0)(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.30.1 - eslint: 9.24.0 + eslint: 9.25.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -8116,14 +8116,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.30.1(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/parser@8.30.1(eslint@9.25.0)(typescript@5.8.3)': dependencies: '@typescript-eslint/scope-manager': 8.30.1 '@typescript-eslint/types': 8.30.1 '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.30.1 debug: 4.4.0 - eslint: 9.24.0 + eslint: 9.25.0 typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -8138,12 +8138,12 @@ snapshots: '@typescript-eslint/types': 8.30.1 '@typescript-eslint/visitor-keys': 8.30.1 - '@typescript-eslint/type-utils@8.30.1(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.30.1(eslint@9.25.0)(typescript@5.8.3)': dependencies: '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) - '@typescript-eslint/utils': 8.30.1(eslint@9.24.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.25.0)(typescript@5.8.3) debug: 4.4.0 - eslint: 9.24.0 + eslint: 9.25.0 ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: @@ -8181,24 +8181,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.28.0(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/utils@8.28.0(eslint@9.25.0)(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.0) '@typescript-eslint/scope-manager': 8.28.0 '@typescript-eslint/types': 8.28.0 '@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.3) - eslint: 9.24.0 + eslint: 9.25.0 typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.30.1(eslint@9.24.0)(typescript@5.8.3)': + '@typescript-eslint/utils@8.30.1(eslint@9.25.0)(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.6.0(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.0) '@typescript-eslint/scope-manager': 8.30.1 '@typescript-eslint/types': 8.30.1 '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) - eslint: 9.24.0 + eslint: 9.25.0 typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -9159,23 +9159,23 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.24.0): + eslint-compat-utils@0.5.1(eslint@9.25.0): dependencies: - eslint: 9.24.0 + eslint: 9.25.0 semver: 7.7.1 - eslint-compat-utils@0.6.4(eslint@9.24.0): + eslint-compat-utils@0.6.4(eslint@9.25.0): dependencies: - eslint: 9.24.0 + eslint: 9.25.0 semver: 7.7.1 - eslint-config-prettier@10.1.2(eslint@9.24.0): + eslint-config-prettier@10.1.2(eslint@9.25.0): dependencies: - eslint: 9.24.0 + eslint: 9.25.0 - eslint-filtered-fix@0.3.0(eslint@9.24.0): + eslint-filtered-fix@0.3.0(eslint@9.25.0): dependencies: - eslint: 9.24.0 + eslint: 9.25.0 optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -9186,55 +9186,55 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.24.0): + eslint-nibble@8.1.0(eslint@9.25.0): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.24.0 - eslint-filtered-fix: 0.3.0(eslint@9.24.0) + eslint: 9.25.0 + eslint-filtered-fix: 0.3.0(eslint@9.25.0) eslint-formatter-friendly: 7.0.0 eslint-summary: 1.0.0 inquirer: 8.2.6 optionator: 0.9.4 - eslint-plugin-es-x@7.8.0(eslint@9.24.0): + eslint-plugin-es-x@7.8.0(eslint@9.25.0): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0) '@eslint-community/regexpp': 4.12.1 - eslint: 9.24.0 - eslint-compat-utils: 0.5.1(eslint@9.24.0) + eslint: 9.25.0 + eslint-compat-utils: 0.5.1(eslint@9.25.0) - eslint-plugin-n@17.17.0(eslint@9.24.0): + eslint-plugin-n@17.17.0(eslint@9.25.0): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0) enhanced-resolve: 5.18.1 - eslint: 9.24.0 - eslint-plugin-es-x: 7.8.0(eslint@9.24.0) + eslint: 9.25.0 + eslint-plugin-es-x: 7.8.0(eslint@9.25.0) get-tsconfig: 4.10.0 globals: 15.15.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.7.1 - eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.24.0))(eslint@9.24.0)(prettier@3.5.3): + eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.0))(eslint@9.25.0)(prettier@3.5.3): dependencies: - eslint: 9.24.0 + eslint: 9.25.0 prettier: 3.5.3 prettier-linter-helpers: 1.0.0 synckit: 0.11.1 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.2(eslint@9.24.0) + eslint-config-prettier: 10.1.2(eslint@9.25.0) - eslint-plugin-unicorn@58.0.0(eslint@9.24.0): + eslint-plugin-unicorn@58.0.0(eslint@9.25.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0) '@eslint/plugin-kit': 0.2.7 ci-info: 4.2.0 clean-regexp: 1.0.0 core-js-compat: 3.41.0 - eslint: 9.24.0 + eslint: 9.25.0 esquery: 1.6.0 globals: 16.0.0 indent-string: 5.0.0 @@ -9247,12 +9247,12 @@ snapshots: semver: 7.7.1 strip-indent: 4.0.0 - eslint-plugin-yml@1.17.0(eslint@9.24.0): + eslint-plugin-yml@1.17.0(eslint@9.25.0): dependencies: debug: 4.4.0 escape-string-regexp: 4.0.0 - eslint: 9.24.0 - eslint-compat-utils: 0.6.4(eslint@9.24.0) + eslint: 9.25.0 + eslint-compat-utils: 0.6.4(eslint@9.25.0) natural-compare: 1.4.0 yaml-eslint-parser: 1.3.0 transitivePeerDependencies: @@ -9279,7 +9279,7 @@ snapshots: eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.1) '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.1 @@ -9320,15 +9320,15 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.24.0: + eslint@9.25.0: dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.0) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.20.0 '@eslint/config-helpers': 0.2.1 - '@eslint/core': 0.12.0 + '@eslint/core': 0.13.0 '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.24.0 + '@eslint/js': 9.25.0 '@eslint/plugin-kit': 0.2.8 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 From 83e701b59225f7da356bd66cff56a7ae8aaa3138 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 22 Apr 2025 22:29:11 +0800 Subject: [PATCH 0465/2658] feat: compile ts through tsdown (#18908) * feat: build ts via tsdown * feat: exec tsdown * fix * fix * fix * feat: use tsdown shims * chore: run rolldown lifecycle script * fix: use shims --------- --- .prettierignore | 1 + eslint.config.mjs | 1 + lib/registry.ts | 14 +- lib/routes/005/index.ts | 2 - lib/routes/12306/index.ts | 2 - lib/routes/141jav/index.ts | 2 - lib/routes/141ppv/index.ts | 2 - lib/routes/163/ds.ts | 2 - lib/routes/163/exclusive.ts | 2 - lib/routes/163/music/artist-songs.ts | 2 - lib/routes/163/music/artist.ts | 2 - lib/routes/163/music/djradio.ts | 2 - lib/routes/163/music/playlist.ts | 2 - lib/routes/163/music/userevents.ts | 2 - lib/routes/163/music/userplaylist.ts | 2 - lib/routes/163/music/userplayrecords.ts | 2 - lib/routes/163/open/vip.ts | 2 - lib/routes/163/utils.ts | 3 - lib/routes/18comic/utils.ts | 3 - lib/routes/199it/index.ts | 3 - lib/routes/1point3acres/offer.ts | 2 - lib/routes/1point3acres/utils.ts | 3 - lib/routes/1x/index.ts | 4 +- lib/routes/2048/index.ts | 2 - lib/routes/3kns/index.ts | 2 - lib/routes/423down/index.ts | 14 +- lib/routes/4gamers/utils.ts | 3 - lib/routes/4ksj/forum.ts | 2 - lib/routes/500px/tribe-set.ts | 2 - lib/routes/56kog/util.ts | 3 - lib/routes/591/list.ts | 2 - lib/routes/78dm/index.ts | 2 - lib/routes/7mmtv/index.ts | 2 - lib/routes/8264/list.ts | 2 - lib/routes/91porn/author.ts | 2 - lib/routes/91porn/index.ts | 2 - lib/routes/95mm/utils.ts | 3 - lib/routes/a9vg/index.ts | 2 - lib/routes/abc/index.ts | 2 - lib/routes/accessbriefing/index.ts | 2 - lib/routes/acs/journal.ts | 2 - lib/routes/adquan/case-library.ts | 3 - lib/routes/adquan/index.ts | 3 - lib/routes/aeaweb/index.ts | 2 - lib/routes/aeon/utils.ts | 3 - lib/routes/agri/index.ts | 2 - lib/routes/aibase/util.ts | 3 - lib/routes/aicaijing/index.ts | 2 - lib/routes/aip/utils.ts | 3 - lib/routes/ali213/news.ts | 3 - lib/routes/ali213/zl.ts | 3 - lib/routes/aljazeera/index.ts | 2 - lib/routes/amazon/kindle-software-updates.ts | 2 - lib/routes/app-center/release.ts | 2 - lib/routes/appstorrent/programs.ts | 2 - lib/routes/aqara/post.ts | 2 - lib/routes/arcteryx/new-arrivals.ts | 2 - lib/routes/arcteryx/outlet.ts | 2 - lib/routes/arcteryx/regear-new-arrivals.ts | 2 - lib/routes/artstation/user.ts | 2 - lib/routes/asiafruitchina/categories.ts | 3 - lib/routes/asiafruitchina/news.ts | 3 - lib/routes/asiantolick/index.ts | 2 - lib/routes/asmr-200/index.ts | 3 +- lib/routes/asus/bios.ts | 2 - lib/routes/baidu/gushitong/index.ts | 2 - lib/routes/baidu/search.ts | 2 - lib/routes/baidu/tieba/forum.ts | 2 - lib/routes/baidu/tieba/post.ts | 2 - lib/routes/baidu/tieba/search.ts | 2 - lib/routes/baidu/top.ts | 2 - lib/routes/bandcamp/weekly.ts | 2 - lib/routes/bangumi.online/online.ts | 2 - lib/routes/bangumi.tv/calendar/today.ts | 2 - lib/routes/bangumi.tv/subject/ep.ts | 3 - lib/routes/bangumi.tv/user/collections.ts | 3 - lib/routes/baozimh/index.ts | 2 - lib/routes/bc3ts/list.ts | 5 +- lib/routes/bdys/index.ts | 2 - lib/routes/behance/user.ts | 2 - lib/routes/bgmlist/onair.ts | 2 - lib/routes/bilibili/utils.ts | 3 - lib/routes/bing/search.ts | 4 +- lib/routes/bloomberg/utils.ts | 3 - lib/routes/booru/mmda.ts | 2 - lib/routes/bsky/feeds.ts | 2 - lib/routes/bsky/posts.ts | 2 - lib/routes/btzj/index.ts | 2 - lib/routes/buaa/lib/space/newbook.ts | 2 - lib/routes/caai/utils.ts | 3 - lib/routes/caareviews/utils.ts | 3 - lib/routes/cahkms/index.ts | 2 - lib/routes/caixin/database.ts | 2 - lib/routes/caixin/utils.ts | 3 - lib/routes/cankaoxiaoxi/index.ts | 2 - lib/routes/cara/likes.ts | 3 - lib/routes/cara/timeline.ts | 3 - lib/routes/cartoonmad/comic.ts | 2 - lib/routes/cbaigui/index.ts | 2 - lib/routes/ccf/ccfcv/index.ts | 2 - lib/routes/ccf/tfbd/utils.ts | 3 - lib/routes/ccfa/index.ts | 2 - lib/routes/cctv/xwlb.ts | 2 +- lib/routes/cde/xxgk.ts | 33 +- lib/routes/cdzjryb/project-list.ts | 2 - lib/routes/cebbank/all.ts | 2 - lib/routes/cebbank/history.ts | 2 - lib/routes/chaincatcher/home.ts | 2 - lib/routes/changba/user.ts | 2 - lib/routes/chaoxing/qk.ts | 2 - lib/routes/chinacdc/index.ts | 3 - lib/routes/chinadegrees/province.ts | 2 - lib/routes/chuanliu/nice.ts | 2 - lib/routes/cls/depth.ts | 2 - lib/routes/cls/hot.ts | 2 - lib/routes/cls/subject.ts | 2 - lib/routes/cls/telegraph.ts | 2 - lib/routes/cma/channel.ts | 2 - lib/routes/cngal/entry.ts | 2 - lib/routes/cngal/weekly.ts | 2 - lib/routes/cnjxol/index.ts | 2 - lib/routes/cnki/debut.ts | 2 - lib/routes/cnki/utils.ts | 3 - lib/routes/cntheory/paper.ts | 2 - lib/routes/cntv/column.ts | 2 - lib/routes/codeforces/contests.ts | 10 +- lib/routes/comicskingdom/index.ts | 2 - lib/routes/coomer/index.ts | 4 +- lib/routes/copymanga/comic.ts | 2 - lib/routes/creative-comic/book.ts | 2 - lib/routes/cuilingmag/index.ts | 2 - lib/routes/curius/links.ts | 2 - lib/routes/cztv/daily.ts | 2 - lib/routes/cztv/zjxwlb.ts | 2 - lib/routes/daily/utils.ts | 2 - lib/routes/damai/activity.ts | 2 - lib/routes/dcfever/utils.ts | 3 - lib/routes/deadline/posts.ts | 2 - lib/routes/dedao/knowledge.ts | 2 - lib/routes/dedao/user.ts | 2 - lib/routes/deeplearning/the-batch.ts | 2 - lib/routes/dehenglaw/index.ts | 2 - lib/routes/diershoubing/news.ts | 2 - lib/routes/discord/channel.ts | 2 - lib/routes/discord/search.ts | 3 - lib/routes/dlnews/category.ts | 2 - lib/routes/dlsite/utils.ts | 3 - lib/routes/dn/news.ts | 2 - lib/routes/douban/movie/coming.ts | 3 - lib/routes/douban/other/explore.ts | 2 - lib/routes/douban/other/list.ts | 2 - lib/routes/douban/other/recommended.ts | 2 - lib/routes/douban/other/weekly-best.ts | 2 - lib/routes/douyin/utils.ts | 3 - lib/routes/douyu/group.ts | 2 - lib/routes/douyu/post.ts | 2 - lib/routes/dribbble/utils.ts | 3 - lib/routes/duozhuayu/search.ts | 2 - lib/routes/dushu/fuzhou/index.ts | 2 - lib/routes/dw/utils.ts | 2 - lib/routes/e-hentai/index.ts | 2 - lib/routes/eastmoney/report/index.ts | 3 - lib/routes/ecnu/contest.ts | 2 - lib/routes/elsevier/issue.ts | 2 - lib/routes/elsevier/journal.ts | 2 - lib/routes/epicgames/index.ts | 2 - lib/routes/eprice/rss.ts | 2 - lib/routes/eshukan/academic.ts | 2 - lib/routes/espn/news.ts | 5 +- lib/routes/esquirehk/tag.ts | 5 +- lib/routes/famitsu/category.ts | 4 +- lib/routes/fanbox/utils.ts | 3 - lib/routes/fangchan/list.ts | 3 - lib/routes/fansly/utils.ts | 3 - lib/routes/farmatters/index.ts | 2 - lib/routes/fashionnetwork/index.ts | 2 - lib/routes/fastbull/news.ts | 2 - lib/routes/feng/forum.ts | 2 - lib/routes/ff14/ff14-global.ts | 2 - lib/routes/ff14/ff14-zh.ts | 2 - lib/routes/fffdm/manhua/manhua.ts | 2 - lib/routes/fisher-spb/news.ts | 2 - lib/routes/flyert/util.ts | 3 - lib/routes/focustaiwan/index.ts | 2 - lib/routes/followin/utils.ts | 3 - lib/routes/foresightnews/util.ts | 3 - lib/routes/fosshub/index.ts | 2 - lib/routes/freecomputerbooks/index.ts | 2 - lib/routes/furstar/utils.ts | 3 - lib/routes/futunn/main.ts | 2 - lib/routes/gameapps/index.ts | 2 - lib/routes/gamebase/news.ts | 3 - lib/routes/gcores/articles.ts | 3 - lib/routes/gcores/categories.ts | 3 - lib/routes/gcores/collections.ts | 3 - lib/routes/gcores/news.ts | 3 - lib/routes/gcores/parser.ts | 3 - lib/routes/gcores/program-previews.ts | 3 - lib/routes/gcores/radio.ts | 2 - lib/routes/gcores/tags.ts | 3 - lib/routes/gcores/topics.ts | 3 - lib/routes/gcores/util.ts | 3 - lib/routes/gcores/videos.ts | 3 - lib/routes/geekpark/index.ts | 2 - lib/routes/gelbooru/utils.ts | 3 - lib/routes/gelonghui/live.ts | 2 - lib/routes/gettr/user.ts | 2 - lib/routes/github/pulse.ts | 2 - lib/routes/github/trending.ts | 2 - lib/routes/gitpod/blog.ts | 2 - lib/routes/gofans/index.ts | 2 - lib/routes/google/fonts.ts | 2 - lib/routes/google/news.ts | 2 - lib/routes/google/search.ts | 2 - lib/routes/gov/caac/cjwt.ts | 2 - lib/routes/gov/cmse/fxrw.ts | 2 - lib/routes/gov/cmse/index.ts | 2 - lib/routes/gov/csrc/news.ts | 4 +- lib/routes/gov/forestry/gjlckjdjt.ts | 2 - lib/routes/gov/general/general.ts | 5 +- lib/routes/gov/guangdong/tqyb/sncsyjxh.ts | 2 - lib/routes/gov/guangdong/tqyb/tfxtq.ts | 2 - lib/routes/gov/hangzhou/zwfw.ts | 2 - lib/routes/gov/jiangsu/wlt/index.ts | 3 - lib/routes/gov/safe/util.ts | 3 - lib/routes/gov/samr/xgzlyhd.ts | 2 - lib/routes/gov/sh/fgw/index.ts | 2 - lib/routes/gov/sh/rsj/ksxm.ts | 2 - lib/routes/gov/sh/wgj/wgj.ts | 2 - .../gov/sichuan/deyang/govpublicinfo.ts | 2 - lib/routes/gov/sichuan/deyang/mztoday.ts | 2 - lib/routes/gov/stats/index.ts | 2 - lib/routes/guduodata/daily.ts | 2 - lib/routes/gumroad/index.ts | 2 - lib/routes/gzdaily/app.ts | 2 - lib/routes/hafu/utils.ts | 3 - lib/routes/hashnode/blog.ts | 2 - lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts | 2 - lib/routes/hellogithub/report.ts | 2 - lib/routes/hellogithub/volume.ts | 2 - lib/routes/hiring.cafe/jobs.ts | 3 - lib/routes/hitcon/zeroday.ts | 3 - lib/routes/hk01/utils.ts | 3 - lib/routes/hkej/index.ts | 2 - lib/routes/hket/index.ts | 2 - lib/routes/hostmonit/cloudflareyes.ts | 2 - lib/routes/houxu/events.ts | 2 - lib/routes/houxu/index.ts | 2 - lib/routes/houxu/memory.ts | 2 - lib/routes/hoyolab/news.ts | 2 - lib/routes/hupu/all.ts | 2 - lib/routes/hupu/bbs.ts | 2 - lib/routes/huxiu/util.ts | 3 - lib/routes/i-cable/news.ts | 3 - lib/routes/ianspriggs/index.ts | 2 - lib/routes/idaily/index.ts | 2 - lib/routes/ieee/author.ts | 2 - lib/routes/ieee/journal.ts | 2 - lib/routes/ifeng/news.ts | 2 - lib/routes/ifeng/utils.ts | 3 - lib/routes/ikea/cn/utils.ts | 3 - lib/routes/ikea/gb/new.ts | 2 - lib/routes/ikea/gb/offer.ts | 2 - lib/routes/iknowwhatyoudownload/daily.ts | 3 - lib/routes/imdb/chart.ts | 4 +- lib/routes/imiker/jinghua.ts | 2 - lib/routes/infoq/presentations.ts | 2 - lib/routes/informs/index.ts | 2 - lib/routes/instagram/common-utils.ts | 3 - lib/routes/instagram/web-api/utils.ts | 3 - lib/routes/ipsw.dev/index.ts | 2 - lib/routes/iqilu/program.ts | 2 - lib/routes/iqiyi/album.ts | 2 - lib/routes/iresearch/chart.ts | 3 - lib/routes/iresearch/report.ts | 2 - lib/routes/iresearch/weekly.ts | 2 - lib/routes/itch/devlog.ts | 2 - lib/routes/itch/index.ts | 2 - lib/routes/ithome/zt.ts | 2 - lib/routes/iwara/subscriptions.ts | 2 - lib/routes/ixigua/user-video.ts | 2 - lib/routes/japanpost/track.ts | 3 - lib/routes/japanpost/utils.ts | 6 +- lib/routes/javbus/index.ts | 2 - lib/routes/javlibrary/utils.ts | 3 - lib/routes/javtiful/utils.ts | 3 - lib/routes/javtrailers/utils.ts | 2 - lib/routes/jd/price.ts | 2 - lib/routes/jiemian/lists.ts | 2 - lib/routes/jimmyspa/books.ts | 2 - lib/routes/jimmyspa/news.ts | 2 - lib/routes/jin10/category.ts | 2 - lib/routes/jin10/index.ts | 2 - lib/routes/jinse/catalogue.ts | 2 - lib/routes/jinse/lives.ts | 2 - lib/routes/jinse/timeline.ts | 2 - lib/routes/jiuyangongshe/community.ts | 5 +- lib/routes/jjwxc/author.ts | 2 - lib/routes/jjwxc/book.ts | 2 - lib/routes/joins/chinese.ts | 2 - lib/routes/joneslanglasalle/index.ts | 3 - lib/routes/jpxgmn/utils.ts | 3 - lib/routes/jump/discount.ts | 2 - lib/routes/kadokawa/blog.ts | 2 - lib/routes/kamen-rider-official/news.ts | 2 - lib/routes/kantarworldpanel/index.ts | 2 - lib/routes/kcna/news.ts | 2 - lib/routes/keep/user.ts | 2 - lib/routes/kemono/index.ts | 6 +- lib/routes/kepu/live.ts | 2 - lib/routes/kpmg/insights.ts | 2 - lib/routes/kpopping/kpics.ts | 3 - lib/routes/kpopping/news.ts | 3 - lib/routes/kyodonews/index.ts | 2 - lib/routes/lang/room.ts | 2 - lib/routes/lanqiao/utils.ts | 3 - lib/routes/learnku/topic.ts | 2 - lib/routes/leetcode/dailyquestion-cn.ts | 2 - lib/routes/leetcode/dailyquestion-en.ts | 2 - lib/routes/lfsyd/utils.ts | 3 - lib/routes/linkedin/cn/utils.ts | 3 - lib/routes/linkresearcher/index.ts | 2 - lib/routes/lkong/forum.ts | 2 - lib/routes/lkong/thread.ts | 2 - lib/routes/lmu/jobs.ts | 2 - lib/routes/logclub/index.ts | 2 - lib/routes/logclub/report.ts | 2 - lib/routes/logonews/index.ts | 2 - lib/routes/logrocket/index.ts | 9 +- lib/routes/loltw/news.ts | 2 - lib/routes/lorientlejour/index.ts | 4 +- lib/routes/lovelive-anime/news.ts | 2 - lib/routes/lovelive-anime/schedules.ts | 6 +- lib/routes/lovelive-anime/topics.ts | 2 - lib/routes/lrepacks/index.ts | 2 - lib/routes/ltaaa/article.ts | 3 - lib/routes/luolei/index.ts | 2 - lib/routes/lvv2/news.ts | 2 - lib/routes/lvv2/top.ts | 2 - lib/routes/lxixsxa/discography.ts | 2 - lib/routes/lxixsxa/information.ts | 2 - lib/routes/m4/index.ts | 2 - lib/routes/maccms/index.ts | 3 +- lib/routes/magazinelib/latest-magazine.ts | 2 - lib/routes/manhuagui/subscribe.ts | 2 - lib/routes/manyvids/video.ts | 5 +- lib/routes/mcmod/index.ts | 3 +- lib/routes/mdpi/journal.ts | 2 - lib/routes/mercari/util.ts | 2 - lib/routes/metacritic/index.ts | 2 - lib/routes/meteor/utils.ts | 3 - lib/routes/mi/utils.ts | 11 +- lib/routes/mihoyo/bbs/follow-list.ts | 2 - lib/routes/mihoyo/bbs/official.ts | 2 - lib/routes/mihoyo/bbs/utils.ts | 3 - lib/routes/mihoyo/ys/news.ts | 2 - lib/routes/mindmeister/example.ts | 2 - lib/routes/mingpao/index.ts | 2 - lib/routes/missav/new.ts | 2 - lib/routes/misskey/utils.ts | 3 - lib/routes/mittrchina/index.ts | 2 - lib/routes/modelscope/community.ts | 2 - lib/routes/modelscope/datasets.ts | 2 - lib/routes/modelscope/studios.ts | 2 - lib/routes/modrinth/versions.ts | 3 - lib/routes/mrdx/daily.ts | 2 +- lib/routes/mydrivers/index.ts | 2 - lib/routes/myfans/post.ts | 5 +- lib/routes/myfigurecollection/activity.ts | 2 - lib/routes/myfigurecollection/index.ts | 2 - lib/routes/mymusicsheet/usersheets.ts | 2 - lib/routes/natgeo/dailyphoto.ts | 2 - .../nationalgeographic/latest-stories.ts | 2 - lib/routes/nautil/topics.ts | 2 - lib/routes/nber/common.ts | 3 - lib/routes/ncc-cma/cmdp.ts | 2 - lib/routes/netflav/index.ts | 2 - lib/routes/news/xhsxw.ts | 2 - lib/routes/newzmz/util.ts | 3 - lib/routes/nhentai/util.ts | 3 - lib/routes/nhk/news-web-easy.ts | 2 - lib/routes/nhk/news.ts | 2 - lib/routes/nicovideo/utils.ts | 5 +- lib/routes/nikkei/news.ts | 2 - lib/routes/nintendo/direct.ts | 2 - lib/routes/nintendo/eshop-hk.ts | 2 - lib/routes/nintendo/eshop-jp.ts | 2 - lib/routes/nintendo/eshop-us.ts | 2 - lib/routes/nintendo/utils.ts | 7 +- lib/routes/njnu/jwc/jwc.ts | 4 +- lib/routes/nmtv/column.ts | 2 - lib/routes/notefolio/search.ts | 2 - lib/routes/npm/package.ts | 2 - lib/routes/nytimes/daily-briefing-chinese.ts | 2 - lib/routes/oceanengine/arithmetic-index.ts | 4 +- lib/routes/oeeee/app/channel.ts | 2 - lib/routes/oeeee/app/reporter.ts | 2 - lib/routes/oeeee/web.ts | 2 - lib/routes/oncc/index.ts | 2 - lib/routes/oncc/money18.ts | 2 - lib/routes/onet/news.ts | 2 - lib/routes/onet/utils.ts | 3 - lib/routes/openai/chatgpt.ts | 2 +- lib/routes/openai/common.ts | 3 - lib/routes/openrice/chart.ts | 2 - lib/routes/openrice/offers.ts | 2 - lib/routes/openrice/promos.ts | 2 - lib/routes/orcid/index.ts | 2 - lib/routes/oreno3d/main.ts | 2 - lib/routes/oschina/column.ts | 3 - lib/routes/oschina/event.ts | 3 - lib/routes/oshwhub/explore.ts | 2 - lib/routes/osu/beatmaps/latest-ranked.ts | 2 - lib/routes/otobanana/utils.ts | 3 - lib/routes/oup/index.ts | 2 - lib/routes/papers/category.ts | 3 - lib/routes/papers/query.ts | 2 - lib/routes/parliament.uk/petitions.ts | 3 - lib/routes/patagonia/new-arrivals.ts | 2 - lib/routes/patreon/feed.ts | 3 - lib/routes/penguin-random-house/utils.ts | 3 - lib/routes/phoronix/index.ts | 4 +- lib/routes/picnob/user.ts | 2 - lib/routes/picuki/profile.ts | 2 - lib/routes/pikabu/utils.ts | 3 - lib/routes/pixabay/search.ts | 2 - lib/routes/pnas/index.ts | 4 +- lib/routes/podwise/episodes.ts | 2 +- lib/routes/pornhub/utils.ts | 3 - lib/routes/producthunt/today.ts | 2 - lib/routes/ps/monthly-games.ts | 2 - lib/routes/psyche/utils.ts | 3 - lib/routes/pts/curations.ts | 2 - lib/routes/pts/index.ts | 2 - lib/routes/pts/live.ts | 2 - lib/routes/pts/projects.ts | 2 - lib/routes/pubmed/trending.ts | 2 - lib/routes/qidian/author.ts | 2 - lib/routes/qoo-app/apps/comment.ts | 2 - lib/routes/qoo-app/notes/note.ts | 2 - lib/routes/qoo-app/user/app-comment.ts | 2 - lib/routes/qq/ac/utils.ts | 3 - lib/routes/qq/fact/index.ts | 2 - lib/routes/questmobile/report.ts | 2 - lib/routes/qweather/3days.ts | 2 - lib/routes/qweather/now.ts | 2 - lib/routes/radio/album.ts | 2 - lib/routes/radio/index.ts | 2 - lib/routes/radio/zhibo.ts | 2 - lib/routes/raspberrypi/magazine.ts | 3 - lib/routes/rawkuma/manga.ts | 2 - lib/routes/readhub/index.ts | 2 - lib/routes/readhub/util.ts | 3 - lib/routes/reuters/common.ts | 2 - lib/routes/routledge/book-series.ts | 2 - lib/routes/rsc/journal.ts | 2 - lib/routes/saraba1st/digest.ts | 2 - lib/routes/science/cover.ts | 2 - lib/routes/science/utils.ts | 3 - lib/routes/sciencedirect/call-for-paper.ts | 2 - lib/routes/scientificamerican/podcast.ts | 3 - lib/routes/sctv/programme.ts | 2 - lib/routes/seekingalpha/index.ts | 2 - lib/routes/sensortower/blog.ts | 2 - lib/routes/shcstheatre/programs.ts | 2 - lib/routes/shiep/index.ts | 2 - lib/routes/shmtu/portal.ts | 2 - lib/routes/shoac/recent-show.ts | 2 - lib/routes/shuiguopai/index.ts | 2 - lib/routes/simpleinfo/index.ts | 2 - lib/routes/sina/utils.ts | 3 - lib/routes/sinchew/index.ts | 2 - lib/routes/sjtu/tongqu/activity.ts | 2 - lib/routes/skeb/utils.ts | 3 - lib/routes/snowpeak/us-new-arrivals.ts | 2 - lib/routes/sogou/search.ts | 2 - lib/routes/sohu/mp.ts | 2 - lib/routes/southcn/nfapp/column.ts | 2 - lib/routes/southcn/nfapp/reporter.ts | 2 - lib/routes/spankbang/new-videos.ts | 2 - lib/routes/springer/journal.ts | 2 - lib/routes/sse/inquire.ts | 2 - lib/routes/sse/renewal.ts | 6 +- lib/routes/ssm/news.ts | 2 - lib/routes/stdaily/digitalpaper.ts | 2 - lib/routes/steam/appcommunityfeed.ts | 2 - lib/routes/steam/curator.ts | 3 - lib/routes/steam/workshop-search.ts | 2 - lib/routes/storyfm/episodes.ts | 2 - lib/routes/straitstimes/index.ts | 2 - lib/routes/surfshark/blog.ts | 2 - lib/routes/swjtu/utils.ts | 3 - lib/routes/syosetu/ranking-isekai.ts | 5 +- lib/routes/syosetu/ranking-r18.ts | 5 +- lib/routes/syosetu/ranking.ts | 5 +- lib/routes/syosetu/search.ts | 5 +- lib/routes/szse/inquire.ts | 2 - lib/routes/szse/projectdynamic.ts | 2 - lib/routes/taobao/zhongchou.ts | 2 - lib/routes/taptap/utils.ts | 3 - lib/routes/techcrunch/news.ts | 2 - lib/routes/telegram/channel.ts | 3 - lib/routes/tencent/news/author.ts | 2 - lib/routes/tencent/news/coronavirus/data.ts | 2 - lib/routes/tencent/news/coronavirus/total.ts | 2 - lib/routes/tesla/cx.ts | 2 - lib/routes/tfc-taiwan/utils.ts | 3 - lib/routes/the/index.ts | 2 - lib/routes/theatlantic/utils.ts | 3 - lib/routes/theblockbeats/index.ts | 3 - lib/routes/theinitium/app.ts | 2 - lib/routes/themoviedb/utils.ts | 3 - lib/routes/thenewslens/index.ts | 2 - lib/routes/thepaper/factpaper.ts | 2 - lib/routes/thepaper/utils.ts | 3 - lib/routes/theverge/index.ts | 3 - lib/routes/thoughtco/index.ts | 2 - lib/routes/tiktok/user.ts | 2 - lib/routes/tingshuitz/shenzhen.ts | 2 - lib/routes/tingtingfm/program.ts | 2 - lib/routes/tmtpost/util.ts | 3 - lib/routes/tophub/list.ts | 2 - lib/routes/toutiao/user.ts | 5 +- lib/routes/tradingview/blog.ts | 2 - lib/routes/transcriptforest/index.ts | 2 - lib/routes/transformer-circuits/index.ts | 5 - lib/routes/trending/all-trending.ts | 6 +- lib/routes/tribalfootball/latest.ts | 2 - lib/routes/tvb/news.ts | 2 - lib/routes/tvtropes/featured.ts | 2 - lib/routes/twreporter/fetch-article.ts | 3 - lib/routes/txrjy/fornumtopic.ts | 2 - lib/routes/udn/breaking-news.ts | 2 - lib/routes/uptimerobot/rss.ts | 2 - lib/routes/urbandictionary/random.ts | 2 - lib/routes/utgd/utils.ts | 3 - lib/routes/vcb-s/category.ts | 2 - lib/routes/vcb-s/index.ts | 2 - lib/routes/vice/topic.ts | 4 +- lib/routes/vimeo/category.ts | 2 - lib/routes/vimeo/channel.ts | 2 - lib/routes/vimeo/usr-videos.ts | 2 - lib/routes/visionias/utils.ts | 3 - lib/routes/wainao/topics.ts | 3 - lib/routes/wallpaperhub/index.ts | 2 - lib/routes/wallstreetcn/live.ts | 2 - lib/routes/warthunder/news.ts | 2 - lib/routes/washingtonpost/app.ts | 8 +- lib/routes/weibo/search/hot.ts | 2 - lib/routes/wellcee/rent.ts | 4 +- lib/routes/whu/news.ts | 2 - lib/routes/whu/util.ts | 3 - lib/routes/winstall/update.ts | 2 - lib/routes/wise/pair.ts | 4 +- lib/routes/wmc-bj/publish.ts | 2 - lib/routes/wnacg/common.ts | 3 - lib/routes/wsj/utils.ts | 3 - lib/routes/x-mol/news.ts | 2 - lib/routes/xiaomiyoupin/crowdfunding.ts | 2 - lib/routes/xiaomiyoupin/utils.ts | 3 - lib/routes/xinpianchang/util.ts | 3 - lib/routes/xjtu/job.ts | 2 - lib/routes/xjtu/std.ts | 2 - lib/routes/xkb/index.ts | 2 - lib/routes/xueqiu/stock-comments.ts | 2 - lib/routes/xys/new.ts | 2 - lib/routes/xyzrank/index.ts | 2 - lib/routes/yahoo/news/utils.ts | 3 - lib/routes/ycwb/index.ts | 2 - lib/routes/yenpress/series.ts | 5 +- lib/routes/yicai/dt.ts | 2 - lib/routes/yicai/utils.ts | 3 - lib/routes/ymgal/game.ts | 2 - lib/routes/yoasobi-music/info.ts | 2 - lib/routes/yoasobi-music/live.ts | 2 - lib/routes/yoasobi-music/media.ts | 2 - lib/routes/youku/channel.ts | 2 - lib/routes/youtube/community.ts | 4 +- lib/routes/youtube/utils.ts | 3 - lib/routes/yxdzqb/index.ts | 2 - lib/routes/zagg/new-arrivals.ts | 2 - lib/routes/zaobao/util.ts | 3 - lib/routes/zcool/discover.ts | 2 - lib/routes/zcool/utils.ts | 3 - lib/routes/zhitongcaijing/index.ts | 2 - lib/routes/zhiy/post.ts | 2 - lib/routes/zhonglun/index.ts | 2 - lib/routes/zhubai/top20.ts | 2 - lib/routes/zodgame/forum.ts | 2 - lib/routes/zuvio/utils.ts | 3 - lib/routes/zyshow/index.ts | 2 - lib/utils/parse-date.ts | 8 +- package.json | 7 +- plugins/rollup-plugin-art-templates.ts | 83 ++ pnpm-lock.yaml | 862 ++++++++++++++++-- scripts/workflow/build-routes.ts | 2 + tsdown.config.ts | 10 + 597 files changed, 1001 insertions(+), 1470 deletions(-) create mode 100644 plugins/rollup-plugin-art-templates.ts create mode 100644 tsdown.config.ts diff --git a/.prettierignore b/.prettierignore index b6b684c5ac07..1edc3e478f33 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,3 +2,4 @@ lib/routes-deprecated lib/router.js babel.config.js scripts/docker/minify-docker.js +dist \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs index 9ac9359745c3..844932dc3051 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -29,6 +29,7 @@ export default [{ 'lib/router.js', '**/babel.config.js', 'scripts/docker/minify-docker.js', + 'dist', ], }, ...compat.extends( 'eslint:recommended', diff --git a/lib/registry.ts b/lib/registry.ts index 3a8724d2add3..0fcf7e680f4a 100644 --- a/lib/registry.ts +++ b/lib/registry.ts @@ -27,8 +27,10 @@ let namespaces: Record< > = {}; switch (process.env.NODE_ENV) { - case 'test': case 'production': + namespaces = (await import('../assets/build/routes.js')).default; + break; + case 'test': // @ts-expect-error namespaces = await import('../assets/build/routes.json'); break; @@ -89,6 +91,7 @@ const sortRoutes = ( string, Route & { location: string; + module?: () => Promise<{ route: Route }>; } > ) => @@ -126,8 +129,13 @@ for (const namespace in namespaces) { const wrappedHandler: Handler = async (ctx) => { if (!ctx.get('data')) { if (typeof routeData.handler !== 'function') { - const { route } = await import(`./routes/${namespace}/${routeData.location}`); - routeData.handler = route.handler; + if (process.env.NODE_ENV === 'test') { + const { route } = await import(`./routes/${namespace}/${routeData.location}`); + routeData.handler = route.handler; + } else if (routeData.module) { + const { route } = await routeData.module(); + routeData.handler = route.handler; + } } ctx.set('data', await routeData.handler(ctx)); } diff --git a/lib/routes/005/index.ts b/lib/routes/005/index.ts index af4785a5d47d..f38e0782c55b 100644 --- a/lib/routes/005/index.ts +++ b/lib/routes/005/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/12306/index.ts b/lib/routes/12306/index.ts index 769af199a1d1..c36ea80f2860 100644 --- a/lib/routes/12306/index.ts +++ b/lib/routes/12306/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/141jav/index.ts b/lib/routes/141jav/index.ts index b7f58edad249..c126778a58a4 100644 --- a/lib/routes/141jav/index.ts +++ b/lib/routes/141jav/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; diff --git a/lib/routes/141ppv/index.ts b/lib/routes/141ppv/index.ts index fbf1239b4c71..43a54a0fb457 100644 --- a/lib/routes/141ppv/index.ts +++ b/lib/routes/141ppv/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; diff --git a/lib/routes/163/ds.ts b/lib/routes/163/ds.ts index befe94ab87b8..b35e1d9d27a6 100644 --- a/lib/routes/163/ds.ts +++ b/lib/routes/163/ds.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/163/exclusive.ts b/lib/routes/163/exclusive.ts index 715fbbf05921..77b460133ca6 100644 --- a/lib/routes/163/exclusive.ts +++ b/lib/routes/163/exclusive.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/163/music/artist-songs.ts b/lib/routes/163/music/artist-songs.ts index 8c572ec70380..4f410effeef1 100644 --- a/lib/routes/163/music/artist-songs.ts +++ b/lib/routes/163/music/artist-songs.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/163/music/artist.ts b/lib/routes/163/music/artist.ts index c7c04ad12dfa..fd4e9355a8c6 100644 --- a/lib/routes/163/music/artist.ts +++ b/lib/routes/163/music/artist.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/163/music/djradio.ts b/lib/routes/163/music/djradio.ts index 665cbd3fddab..09efda318e09 100644 --- a/lib/routes/163/music/djradio.ts +++ b/lib/routes/163/music/djradio.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/163/music/playlist.ts b/lib/routes/163/music/playlist.ts index 4c59cb0ca74f..198c4afefa87 100644 --- a/lib/routes/163/music/playlist.ts +++ b/lib/routes/163/music/playlist.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { config } from '@/config'; diff --git a/lib/routes/163/music/userevents.ts b/lib/routes/163/music/userevents.ts index 7971cf011bc6..8ca7a06e5128 100644 --- a/lib/routes/163/music/userevents.ts +++ b/lib/routes/163/music/userevents.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import path from 'node:path'; import got from '@/utils/got'; diff --git a/lib/routes/163/music/userplaylist.ts b/lib/routes/163/music/userplaylist.ts index add9b08e648a..ff7ed8ff2d05 100644 --- a/lib/routes/163/music/userplaylist.ts +++ b/lib/routes/163/music/userplaylist.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/163/music/userplayrecords.ts b/lib/routes/163/music/userplayrecords.ts index 401a5c6cf4f3..f2473d913f0f 100644 --- a/lib/routes/163/music/userplayrecords.ts +++ b/lib/routes/163/music/userplayrecords.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { config } from '@/config'; diff --git a/lib/routes/163/open/vip.ts b/lib/routes/163/open/vip.ts index d30e5992d844..70335db979fd 100644 --- a/lib/routes/163/open/vip.ts +++ b/lib/routes/163/open/vip.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/163/utils.ts b/lib/routes/163/utils.ts index 7a2e95cbab1e..711e37728ff1 100644 --- a/lib/routes/163/utils.ts +++ b/lib/routes/163/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/18comic/utils.ts b/lib/routes/18comic/utils.ts index e4ea27d1b374..b74d0d4e9873 100644 --- a/lib/routes/18comic/utils.ts +++ b/lib/routes/18comic/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/199it/index.ts b/lib/routes/199it/index.ts index be2d8c42496d..97c063fc4b5b 100644 --- a/lib/routes/199it/index.ts +++ b/lib/routes/199it/index.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -10,8 +9,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { category = 'newly' } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/1point3acres/offer.ts b/lib/routes/1point3acres/offer.ts index 8bc81e45975e..2202802ce797 100644 --- a/lib/routes/1point3acres/offer.ts +++ b/lib/routes/1point3acres/offer.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/1point3acres/utils.ts b/lib/routes/1point3acres/utils.ts index c90830d36644..d55fd8c6ed62 100644 --- a/lib/routes/1point3acres/utils.ts +++ b/lib/routes/1point3acres/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/1x/index.ts b/lib/routes/1x/index.ts index 4d08f8a2698d..03f8d81adca1 100644 --- a/lib/routes/1x/index.ts +++ b/lib/routes/1x/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; @@ -98,7 +96,7 @@ export const route: Route = { Fill in the field in the path with the part of the corresponding page URL after \`https://1x.com/gallery/\` or \`https://1x.com/photo/\`. Here are the examples: If you subscribe to [Abstract Awarded](https://1x.com/gallery/abstract/awarded), you should fill in the path with the part \`abstract/awarded\` from the page URL \`https://1x.com/gallery/abstract/awarded\`. In this case, the route will be [\`/1x/abstract/awarded\`](https://rsshub.app/1x/abstract/awarded). - + If you subscribe to [Wildlife Published](https://1x.com/gallery/wildlife/published), you should fill in the path with the part \`wildlife/published\` from the page URL \`https://1x.com/gallery/wildlife/published\`. In this case, the route will be [\`/1x/wildlife/published\`](https://rsshub.app/1x/wildlife/published). :::`, categories: ['design', 'picture'], diff --git a/lib/routes/2048/index.ts b/lib/routes/2048/index.ts index db9644d7ace3..95e51e39cf65 100644 --- a/lib/routes/2048/index.ts +++ b/lib/routes/2048/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/3kns/index.ts b/lib/routes/3kns/index.ts index d897afc1c8e1..88503b317ef4 100644 --- a/lib/routes/3kns/index.ts +++ b/lib/routes/3kns/index.ts @@ -1,12 +1,10 @@ import { Data, DataItem, Route } from '@/types'; import got from '@/utils/got'; -import { getCurrentPath } from '@/utils/helpers'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import { load } from 'cheerio'; import { Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/:filters?/:order?', diff --git a/lib/routes/423down/index.ts b/lib/routes/423down/index.ts index 1d18e5132227..e24c8d9c6661 100644 --- a/lib/routes/423down/index.ts +++ b/lib/routes/423down/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -135,23 +133,23 @@ export const route: Route = { | [安卓软件](https://www.423down.com/apk) | | --------------------------------------- | | [apk](https://rsshub.app/423down/apk) | - + #### 电脑软件 - + | [原创软件](https://www.423down.com/zd423) | [媒体播放](https://www.423down.com/multimedia) | [网页浏览](https://www.423down.com/browser) | [图形图像](https://www.423down.com/image) | [聊天软件](https://www.423down.com/im) | | ----------------------------------------- | --------------------------------------------------- | --------------------------------------------- | ----------------------------------------- | -------------------------------------- | | [zd423](https://rsshub.app/423down/zd423) | [multimedia](https://rsshub.app/423down/multimedia) | [browser](https://rsshub.app/423down/browser) | [image](https://rsshub.app/423down/image) | [im](https://rsshub.app/423down/im) | - + | [办公软件](https://www.423down.com/work) | [上传下载](https://www.423down.com/down) | [实用软件](https://www.423down.com/softtool) | [系统辅助](https://www.423down.com/systemsoft) | [系统必备](https://www.423down.com/systemplus) | | ---------------------------------------- | ---------------------------------------- | ----------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | | [work](https://rsshub.app/423down/work) | [down](https://rsshub.app/423down/down) | [softtool](https://rsshub.app/423down/softtool) | [systemsoft](https://rsshub.app/423down/systemsoft) | [systemplus](https://rsshub.app/423down/systemplus) | - + | [安全软件](https://www.423down.com/security) | [补丁相关](https://www.423down.com/patch) | [硬件相关](https://www.423down.com/hardware) | | ----------------------------------------------- | ----------------------------------------- | ----------------------------------------------- | | [security](https://rsshub.app/423down/security) | [patch](https://rsshub.app/423down/patch) | [hardware](https://rsshub.app/423down/hardware) | - + #### 操作系统 - + | [Windows 11](https://www.423down.com/win11) | [Windows 10](https://www.423down.com/win10) | [Windows 7](https://www.423down.com/win7) | [Windows XP](https://www.423down.com/win7/winxp) | [WinPE](https://www.423down.com/pe-system) | | ------------------------------------------- | ------------------------------------------- | ----------------------------------------- | --------------------------------------------------- | ------------------------------------------------- | | [win11](https://rsshub.app/423down/win11) | [win10](https://rsshub.app/423down/win10) | [win7](https://rsshub.app/423down/win7) | [win7/winxp](https://rsshub.app/423down/win7/winxp) | [pe-system](https://rsshub.app/423down/pe-system) | diff --git a/lib/routes/4gamers/utils.ts b/lib/routes/4gamers/utils.ts index b4a9d06194e5..946ab598f513 100644 --- a/lib/routes/4gamers/utils.ts +++ b/lib/routes/4gamers/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/4ksj/forum.ts b/lib/routes/4ksj/forum.ts index a5584cebe32e..b635e0dd23a9 100644 --- a/lib/routes/4ksj/forum.ts +++ b/lib/routes/4ksj/forum.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/500px/tribe-set.ts b/lib/routes/500px/tribe-set.ts index 72cb646766cb..41fc6b8e83db 100644 --- a/lib/routes/500px/tribe-set.ts +++ b/lib/routes/500px/tribe-set.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/56kog/util.ts b/lib/routes/56kog/util.ts index 784921134975..9eca660581a8 100644 --- a/lib/routes/56kog/util.ts +++ b/lib/routes/56kog/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import iconv from 'iconv-lite'; diff --git a/lib/routes/591/list.ts b/lib/routes/591/list.ts index df20ad6bfc89..8a84bb626557 100644 --- a/lib/routes/591/list.ts +++ b/lib/routes/591/list.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import path from 'node:path'; diff --git a/lib/routes/78dm/index.ts b/lib/routes/78dm/index.ts index 2db355d7e07b..f45d6ebc019c 100644 --- a/lib/routes/78dm/index.ts +++ b/lib/routes/78dm/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/7mmtv/index.ts b/lib/routes/7mmtv/index.ts index 170f74f03038..c013ad22bda7 100644 --- a/lib/routes/7mmtv/index.ts +++ b/lib/routes/7mmtv/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/8264/list.ts b/lib/routes/8264/list.ts index acdb6ff2bc1a..f5782c9c4d6e 100644 --- a/lib/routes/8264/list.ts +++ b/lib/routes/8264/list.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/91porn/author.ts b/lib/routes/91porn/author.ts index fb6837f35fb1..4d9d27e9b861 100644 --- a/lib/routes/91porn/author.ts +++ b/lib/routes/91porn/author.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/91porn/index.ts b/lib/routes/91porn/index.ts index 43548beeb8bf..51ae93bd0dee 100644 --- a/lib/routes/91porn/index.ts +++ b/lib/routes/91porn/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/95mm/utils.ts b/lib/routes/95mm/utils.ts index b374ad0a392e..d07ed4e3a1bd 100644 --- a/lib/routes/95mm/utils.ts +++ b/lib/routes/95mm/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/a9vg/index.ts b/lib/routes/a9vg/index.ts index a8921d6423c5..91b904dde962 100644 --- a/lib/routes/a9vg/index.ts +++ b/lib/routes/a9vg/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/abc/index.ts b/lib/routes/abc/index.ts index 001bb3ddd88b..91910258106c 100644 --- a/lib/routes/abc/index.ts +++ b/lib/routes/abc/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/accessbriefing/index.ts b/lib/routes/accessbriefing/index.ts index 76ffeec9a34e..dcc8c805df69 100644 --- a/lib/routes/accessbriefing/index.ts +++ b/lib/routes/accessbriefing/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/acs/journal.ts b/lib/routes/acs/journal.ts index 5da7ff54ea86..f04f41e49020 100644 --- a/lib/routes/acs/journal.ts +++ b/lib/routes/acs/journal.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; diff --git a/lib/routes/adquan/case-library.ts b/lib/routes/adquan/case-library.ts index 19514c29e912..003043fc7389 100644 --- a/lib/routes/adquan/case-library.ts +++ b/lib/routes/adquan/case-library.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -11,8 +10,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '24', 10); diff --git a/lib/routes/adquan/index.ts b/lib/routes/adquan/index.ts index 5725762ebccd..6f88d983b7d9 100644 --- a/lib/routes/adquan/index.ts +++ b/lib/routes/adquan/index.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -11,8 +10,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/aeaweb/index.ts b/lib/routes/aeaweb/index.ts index 78b8442c9960..a75426e44a7f 100644 --- a/lib/routes/aeaweb/index.ts +++ b/lib/routes/aeaweb/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/aeon/utils.ts b/lib/routes/aeon/utils.ts index e18421579cd4..aed85eb99fe4 100644 --- a/lib/routes/aeon/utils.ts +++ b/lib/routes/aeon/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import { load } from 'cheerio'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/agri/index.ts b/lib/routes/agri/index.ts index e77a8820aef0..bd4d4ef9f1ce 100644 --- a/lib/routes/agri/index.ts +++ b/lib/routes/agri/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/aibase/util.ts b/lib/routes/aibase/util.ts index 066473c8b85d..0e3c98b07422 100644 --- a/lib/routes/aibase/util.ts +++ b/lib/routes/aibase/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import ofetch from '@/utils/ofetch'; import { CheerioAPI } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/aicaijing/index.ts b/lib/routes/aicaijing/index.ts index 6ee739987605..7e58207137b9 100644 --- a/lib/routes/aicaijing/index.ts +++ b/lib/routes/aicaijing/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/aip/utils.ts b/lib/routes/aip/utils.ts index 549378400355..24895b6f6da3 100644 --- a/lib/routes/aip/utils.ts +++ b/lib/routes/aip/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/ali213/news.ts b/lib/routes/ali213/news.ts index 0d0ecba9d92e..e1e112bdf734 100644 --- a/lib/routes/ali213/news.ts +++ b/lib/routes/ali213/news.ts @@ -7,13 +7,10 @@ import { type DataItem, type Route, type Data, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { category = 'new' } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/ali213/zl.ts b/lib/routes/ali213/zl.ts index 47b9aaa39170..43914b722460 100644 --- a/lib/routes/ali213/zl.ts +++ b/lib/routes/ali213/zl.ts @@ -7,12 +7,9 @@ import { type DataItem, type Route, type Data, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { category } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '1', 10); diff --git a/lib/routes/aljazeera/index.ts b/lib/routes/aljazeera/index.ts index 35c6304077b9..b1aa2cd16126 100644 --- a/lib/routes/aljazeera/index.ts +++ b/lib/routes/aljazeera/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; diff --git a/lib/routes/amazon/kindle-software-updates.ts b/lib/routes/amazon/kindle-software-updates.ts index ed497f0fd057..652966f14012 100644 --- a/lib/routes/amazon/kindle-software-updates.ts +++ b/lib/routes/amazon/kindle-software-updates.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/app-center/release.ts b/lib/routes/app-center/release.ts index fa8fcfa277fd..e5f014e908b1 100644 --- a/lib/routes/app-center/release.ts +++ b/lib/routes/app-center/release.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/appstorrent/programs.ts b/lib/routes/appstorrent/programs.ts index 1120e195faa1..75fc01bac5e4 100644 --- a/lib/routes/appstorrent/programs.ts +++ b/lib/routes/appstorrent/programs.ts @@ -1,14 +1,12 @@ import { Data, DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import got, { Options } from '@/utils/got'; -import { getCurrentPath } from '@/utils/helpers'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import { load } from 'cheerio'; import dayjs from 'dayjs'; import { Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/programs', diff --git a/lib/routes/aqara/post.ts b/lib/routes/aqara/post.ts index 6a803e6803c6..326835cbfa7a 100644 --- a/lib/routes/aqara/post.ts +++ b/lib/routes/aqara/post.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; diff --git a/lib/routes/arcteryx/new-arrivals.ts b/lib/routes/arcteryx/new-arrivals.ts index bc7e486091a5..49f15c9b9a67 100644 --- a/lib/routes/arcteryx/new-arrivals.ts +++ b/lib/routes/arcteryx/new-arrivals.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/arcteryx/outlet.ts b/lib/routes/arcteryx/outlet.ts index 897cb35d4afb..4fbc66e79bd8 100644 --- a/lib/routes/arcteryx/outlet.ts +++ b/lib/routes/arcteryx/outlet.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/arcteryx/regear-new-arrivals.ts b/lib/routes/arcteryx/regear-new-arrivals.ts index 6227b1d84212..bdc1dc7a2ffa 100644 --- a/lib/routes/arcteryx/regear-new-arrivals.ts +++ b/lib/routes/arcteryx/regear-new-arrivals.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/artstation/user.ts b/lib/routes/artstation/user.ts index 7f31b768d711..29cb6c8fe032 100644 --- a/lib/routes/artstation/user.ts +++ b/lib/routes/artstation/user.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/asiafruitchina/categories.ts b/lib/routes/asiafruitchina/categories.ts index 2e1c12584b67..34035a9af1b0 100644 --- a/lib/routes/asiafruitchina/categories.ts +++ b/lib/routes/asiafruitchina/categories.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -10,8 +9,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { category = 'all' } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '10', 10); diff --git a/lib/routes/asiafruitchina/news.ts b/lib/routes/asiafruitchina/news.ts index 8cb1dcc994a8..8839f88216c9 100644 --- a/lib/routes/asiafruitchina/news.ts +++ b/lib/routes/asiafruitchina/news.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -10,8 +9,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/asiantolick/index.ts b/lib/routes/asiantolick/index.ts index 1da7355af2d7..27f968b137ba 100644 --- a/lib/routes/asiantolick/index.ts +++ b/lib/routes/asiantolick/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/asmr-200/index.ts b/lib/routes/asmr-200/index.ts index a26b6762c459..e0ffa88fa6de 100644 --- a/lib/routes/asmr-200/index.ts +++ b/lib/routes/asmr-200/index.ts @@ -5,9 +5,8 @@ import path from 'node:path'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; -import { getCurrentPath } from '@/utils/helpers'; -const render = (work: Work, link: string) => art(path.join(getCurrentPath(import.meta.url), 'templates', 'work.art'), { work, link }); +const render = (work: Work, link: string) => art(path.join(__dirname, 'templates/work.art'), { work, link }); export const route: Route = { path: '/works/:order?/:subtitle?/:sort?', diff --git a/lib/routes/asus/bios.ts b/lib/routes/asus/bios.ts index 2bb541dff082..aa74ef54d8e9 100644 --- a/lib/routes/asus/bios.ts +++ b/lib/routes/asus/bios.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/baidu/gushitong/index.ts b/lib/routes/baidu/gushitong/index.ts index 452131d24e17..da8895fed2d8 100644 --- a/lib/routes/baidu/gushitong/index.ts +++ b/lib/routes/baidu/gushitong/index.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/baidu/search.ts b/lib/routes/baidu/search.ts index 1d9bbdeb1478..7c95c0d36e05 100644 --- a/lib/routes/baidu/search.ts +++ b/lib/routes/baidu/search.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/baidu/tieba/forum.ts b/lib/routes/baidu/tieba/forum.ts index 313c2a61bd95..fe432fcd3a14 100644 --- a/lib/routes/baidu/tieba/forum.ts +++ b/lib/routes/baidu/tieba/forum.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/baidu/tieba/post.ts b/lib/routes/baidu/tieba/post.ts index f1aa2cef7402..3007720accdb 100644 --- a/lib/routes/baidu/tieba/post.ts +++ b/lib/routes/baidu/tieba/post.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/baidu/tieba/search.ts b/lib/routes/baidu/tieba/search.ts index a8fc04f9578a..b2356b8eba8d 100644 --- a/lib/routes/baidu/tieba/search.ts +++ b/lib/routes/baidu/tieba/search.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/baidu/top.ts b/lib/routes/baidu/top.ts index 74feafc99d2c..7ff72313bec3 100644 --- a/lib/routes/baidu/top.ts +++ b/lib/routes/baidu/top.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/bandcamp/weekly.ts b/lib/routes/bandcamp/weekly.ts index f070bc21e2d3..687f5e9af0f0 100644 --- a/lib/routes/bandcamp/weekly.ts +++ b/lib/routes/bandcamp/weekly.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/bangumi.online/online.ts b/lib/routes/bangumi.online/online.ts index 9312fc8b5c5f..76ecccb68b12 100644 --- a/lib/routes/bangumi.online/online.ts +++ b/lib/routes/bangumi.online/online.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/bangumi.tv/calendar/today.ts b/lib/routes/bangumi.tv/calendar/today.ts index 2f12eaa9cae9..6055b44ad7c5 100644 --- a/lib/routes/bangumi.tv/calendar/today.ts +++ b/lib/routes/bangumi.tv/calendar/today.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import getData from './_base'; diff --git a/lib/routes/bangumi.tv/subject/ep.ts b/lib/routes/bangumi.tv/subject/ep.ts index 04d41847bc09..503986f0309b 100644 --- a/lib/routes/bangumi.tv/subject/ep.ts +++ b/lib/routes/bangumi.tv/subject/ep.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/bangumi.tv/user/collections.ts b/lib/routes/bangumi.tv/user/collections.ts index dc4676445161..4002c39c45ce 100644 --- a/lib/routes/bangumi.tv/user/collections.ts +++ b/lib/routes/bangumi.tv/user/collections.ts @@ -6,9 +6,6 @@ import { config } from '@/config'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - // 合并不同 subjectType 的 type 映射 const getTypeNames = (subjectType) => { const commonTypeNames = { diff --git a/lib/routes/baozimh/index.ts b/lib/routes/baozimh/index.ts index 9f3f9f22d048..2885de28d79a 100644 --- a/lib/routes/baozimh/index.ts +++ b/lib/routes/baozimh/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/bc3ts/list.ts b/lib/routes/bc3ts/list.ts index 5b497e4c99a2..0325f3380afb 100644 --- a/lib/routes/bc3ts/list.ts +++ b/lib/routes/bc3ts/list.ts @@ -7,9 +7,6 @@ import path from 'node:path'; import { Media, PostResponse } from './types'; import { config } from '@/config'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: '/post/list/:sort?', example: '/bc3ts/post/list', @@ -31,7 +28,7 @@ export const route: Route = { const baseUrl = 'https://web.bc3ts.net'; -const renderMedia = (media: Media[]) => art(path.join(__dirname, 'templates', 'media.art'), { media }); +const renderMedia = (media: Media[]) => art(path.join(__dirname, 'templates/media.art'), { media }); async function handler(ctx) { const { sort = '1' } = ctx.req.param(); diff --git a/lib/routes/bdys/index.ts b/lib/routes/bdys/index.ts index 4b0aa0106bf8..b3082c3fc515 100644 --- a/lib/routes/bdys/index.ts +++ b/lib/routes/bdys/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/behance/user.ts b/lib/routes/behance/user.ts index f8eb132eb0f9..31500fa56775 100644 --- a/lib/routes/behance/user.ts +++ b/lib/routes/behance/user.ts @@ -5,9 +5,7 @@ import { parseDate } from '@/utils/parse-date'; import crypto from 'node:crypto'; import path from 'node:path'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; import { getAppreciatedQuery, getProfileProjectsAndSelectionsQuery, getProjectPageQuery } from './queries'; -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/:user/:type?', diff --git a/lib/routes/bgmlist/onair.ts b/lib/routes/bgmlist/onair.ts index e5c73f0f4422..d44221cb422e 100644 --- a/lib/routes/bgmlist/onair.ts +++ b/lib/routes/bgmlist/onair.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import path from 'node:path'; diff --git a/lib/routes/bilibili/utils.ts b/lib/routes/bilibili/utils.ts index d67213229964..7035716eb2e0 100644 --- a/lib/routes/bilibili/utils.ts +++ b/lib/routes/bilibili/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { config } from '@/config'; import md5 from '@/utils/md5'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/bing/search.ts b/lib/routes/bing/search.ts index fb15bace8fc2..bd7628dc8cff 100644 --- a/lib/routes/bing/search.ts +++ b/lib/routes/bing/search.ts @@ -2,8 +2,8 @@ import { Route } from '@/types'; import parser from '@/utils/rss-parser'; import { parseDate } from '@/utils/parse-date'; import dayjs from 'dayjs'; -import localizedFormat from 'dayjs/plugin/localizedFormat'; -import 'dayjs/locale/zh-cn'; +import localizedFormat from 'dayjs/plugin/localizedFormat.js'; +import 'dayjs/locale/zh-cn.js'; dayjs.extend(localizedFormat); export const route: Route = { diff --git a/lib/routes/bloomberg/utils.ts b/lib/routes/bloomberg/utils.ts index 92daa603c1c5..e9d25a07bcdd 100644 --- a/lib/routes/bloomberg/utils.ts +++ b/lib/routes/bloomberg/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import { load } from 'cheerio'; import path from 'node:path'; diff --git a/lib/routes/booru/mmda.ts b/lib/routes/booru/mmda.ts index f67d45f601ce..02664b7c5741 100644 --- a/lib/routes/booru/mmda.ts +++ b/lib/routes/booru/mmda.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import queryString from 'query-string'; diff --git a/lib/routes/bsky/feeds.ts b/lib/routes/bsky/feeds.ts index 268738f77d84..6480082ccf3a 100644 --- a/lib/routes/bsky/feeds.ts +++ b/lib/routes/bsky/feeds.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index 8beb29b1c460..8f92022e6284 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/btzj/index.ts b/lib/routes/btzj/index.ts index b665838cd533..d18a042b8740 100644 --- a/lib/routes/btzj/index.ts +++ b/lib/routes/btzj/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/buaa/lib/space/newbook.ts b/lib/routes/buaa/lib/space/newbook.ts index 810b8ef3cf58..add51285fb54 100644 --- a/lib/routes/buaa/lib/space/newbook.ts +++ b/lib/routes/buaa/lib/space/newbook.ts @@ -6,8 +6,6 @@ import timezone from '@/utils/timezone'; import cache from '@/utils/cache'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); interface Book { bibId: string; diff --git a/lib/routes/caai/utils.ts b/lib/routes/caai/utils.ts index ebf6671bf0fa..47a57b59354a 100644 --- a/lib/routes/caai/utils.ts +++ b/lib/routes/caai/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { load } from 'cheerio'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/caareviews/utils.ts b/lib/routes/caareviews/utils.ts index 4fa9e2238111..13f263dbb146 100644 --- a/lib/routes/caareviews/utils.ts +++ b/lib/routes/caareviews/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cahkms/index.ts b/lib/routes/cahkms/index.ts index 7f9d8f3fa307..4f0258db7fe5 100644 --- a/lib/routes/cahkms/index.ts +++ b/lib/routes/cahkms/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/caixin/database.ts b/lib/routes/caixin/database.ts index a6a8f6bcdb02..1cc8cfa9fa9c 100644 --- a/lib/routes/caixin/database.ts +++ b/lib/routes/caixin/database.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/caixin/utils.ts b/lib/routes/caixin/utils.ts index 0bd0334e3bb4..fd00ad4c1aa2 100644 --- a/lib/routes/caixin/utils.ts +++ b/lib/routes/caixin/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/cankaoxiaoxi/index.ts b/lib/routes/cankaoxiaoxi/index.ts index 9ed772ea6e48..96388e0d1e6f 100644 --- a/lib/routes/cankaoxiaoxi/index.ts +++ b/lib/routes/cankaoxiaoxi/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/cara/likes.ts b/lib/routes/cara/likes.ts index bee254f5a673..466584990648 100644 --- a/lib/routes/cara/likes.ts +++ b/lib/routes/cara/likes.ts @@ -2,13 +2,10 @@ import type { Data, DataItem, Route } from '@/types'; import type { PostsResponse } from './types'; import { customFetch, parseUserData } from './utils'; import { API_HOST, CDN_HOST, HOST } from './constant'; -import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: ['/likes/:user'], categories: ['social-media', 'popular'], diff --git a/lib/routes/cara/timeline.ts b/lib/routes/cara/timeline.ts index ebdd485801bb..cc2c321b9fdf 100644 --- a/lib/routes/cara/timeline.ts +++ b/lib/routes/cara/timeline.ts @@ -2,13 +2,10 @@ import type { Data, DataItem, Route } from '@/types'; import type { PostsResponse } from './types'; import { customFetch, parseUserData } from './utils'; import { API_HOST, CDN_HOST, HOST } from './constant'; -import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: ['/timeline/:user'], categories: ['social-media', 'popular'], diff --git a/lib/routes/cartoonmad/comic.ts b/lib/routes/cartoonmad/comic.ts index 89e055f6ec1c..a72d7c44a004 100644 --- a/lib/routes/cartoonmad/comic.ts +++ b/lib/routes/cartoonmad/comic.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; diff --git a/lib/routes/cbaigui/index.ts b/lib/routes/cbaigui/index.ts index c9443ef6bcb5..81bc814dc490 100644 --- a/lib/routes/cbaigui/index.ts +++ b/lib/routes/cbaigui/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; diff --git a/lib/routes/ccf/ccfcv/index.ts b/lib/routes/ccf/ccfcv/index.ts index 13f99d4e9150..902d88cfe971 100644 --- a/lib/routes/ccf/ccfcv/index.ts +++ b/lib/routes/ccf/ccfcv/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/ccf/tfbd/utils.ts b/lib/routes/ccf/tfbd/utils.ts index 207e5b772b59..c7e9ddbd94ee 100644 --- a/lib/routes/ccf/tfbd/utils.ts +++ b/lib/routes/ccf/tfbd/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { load } from 'cheerio'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/ccfa/index.ts b/lib/routes/ccfa/index.ts index c52532a8528d..dfb7bf2b44d5 100644 --- a/lib/routes/ccfa/index.ts +++ b/lib/routes/ccfa/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/cctv/xwlb.ts b/lib/routes/cctv/xwlb.ts index 121f94b68166..e7f2fdc54388 100644 --- a/lib/routes/cctv/xwlb.ts +++ b/lib/routes/cctv/xwlb.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { load } from 'cheerio'; import dayjs from 'dayjs'; -import customParseFormat from 'dayjs/plugin/customParseFormat'; +import customParseFormat from 'dayjs/plugin/customParseFormat.js'; dayjs.extend(customParseFormat); export const route: Route = { diff --git a/lib/routes/cde/xxgk.ts b/lib/routes/cde/xxgk.ts index 75208249d4aa..72c5396758a5 100644 --- a/lib/routes/cde/xxgk.ts +++ b/lib/routes/cde/xxgk.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -82,13 +80,30 @@ async function handler(ctx) { }, }); - const items = data.data.records.map((item) => ({ - title: item.drgnamecn, - guid: item.acceptid, - pubDate: item.endNoticeDate ? parseDate(item.endNoticeDate) : null, - description: art(path.join(__dirname, `templates/xxgk/${category}.art`), { item }), - link: xxgkMap.xxgk[category].url, - })); + const items = data.data.records.map((item) => { + let description = ''; + switch (category) { + case 'priorityApproval': + description = art(path.join(__dirname, 'templates/xxgk/priorityApproval.art'), { item }); + break; + case 'breakthroughCure': + description = art(path.join(__dirname, 'templates/xxgk/breakthroughCure.art'), { item }); + break; + case 'cliniCal': + description = art(path.join(__dirname, 'templates/xxgk/cliniCal.art'), { item }); + break; + default: + description = ''; + } + + return { + title: item.drgnamecn, + guid: item.acceptid, + pubDate: item.endNoticeDate ? parseDate(item.endNoticeDate) : null, + description, + link: xxgkMap.xxgk[category].url, + }; + }); return { title: `${xxgkMap.xxgk[category].title} - 国家药品监督管理局药品审评中心`, diff --git a/lib/routes/cdzjryb/project-list.ts b/lib/routes/cdzjryb/project-list.ts index 9096e7c3565d..f9cc192e370d 100644 --- a/lib/routes/cdzjryb/project-list.ts +++ b/lib/routes/cdzjryb/project-list.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/cebbank/all.ts b/lib/routes/cebbank/all.ts index 0f1fe3d1f739..a22258fa1a81 100644 --- a/lib/routes/cebbank/all.ts +++ b/lib/routes/cebbank/all.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cebbank/history.ts b/lib/routes/cebbank/history.ts index 35666f8b836f..4f85036628a0 100644 --- a/lib/routes/cebbank/history.ts +++ b/lib/routes/cebbank/history.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/chaincatcher/home.ts b/lib/routes/chaincatcher/home.ts index ac15c18b7833..199e9543a6fb 100644 --- a/lib/routes/chaincatcher/home.ts +++ b/lib/routes/chaincatcher/home.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/changba/user.ts b/lib/routes/changba/user.ts index 0443cd036909..3d95aae68605 100644 --- a/lib/routes/changba/user.ts +++ b/lib/routes/changba/user.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/chaoxing/qk.ts b/lib/routes/chaoxing/qk.ts index a1caddeb62b2..1790f4b496b0 100644 --- a/lib/routes/chaoxing/qk.ts +++ b/lib/routes/chaoxing/qk.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/chinacdc/index.ts b/lib/routes/chinacdc/index.ts index bdfcf4408eb4..a98d4b2b5a6e 100644 --- a/lib/routes/chinacdc/index.ts +++ b/lib/routes/chinacdc/index.ts @@ -7,12 +7,9 @@ import { type DataItem, type Route, type Data, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { category = 'zxyw' } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '11', 10); diff --git a/lib/routes/chinadegrees/province.ts b/lib/routes/chinadegrees/province.ts index df6ca73efca4..52d7f15f7312 100644 --- a/lib/routes/chinadegrees/province.ts +++ b/lib/routes/chinadegrees/province.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; diff --git a/lib/routes/chuanliu/nice.ts b/lib/routes/chuanliu/nice.ts index a10502359f5a..ed0cc0f8421f 100644 --- a/lib/routes/chuanliu/nice.ts +++ b/lib/routes/chuanliu/nice.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cls/depth.ts b/lib/routes/cls/depth.ts index 9354905de80c..d80754cdbd55 100644 --- a/lib/routes/cls/depth.ts +++ b/lib/routes/cls/depth.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/cls/hot.ts b/lib/routes/cls/hot.ts index bd5356d98a9b..4da407fac2bc 100644 --- a/lib/routes/cls/hot.ts +++ b/lib/routes/cls/hot.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/cls/subject.ts b/lib/routes/cls/subject.ts index a5db95930405..d0eb1f4f3008 100644 --- a/lib/routes/cls/subject.ts +++ b/lib/routes/cls/subject.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/cls/telegraph.ts b/lib/routes/cls/telegraph.ts index d831d75ba5dc..ec0c4d09a7e7 100644 --- a/lib/routes/cls/telegraph.ts +++ b/lib/routes/cls/telegraph.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/cma/channel.ts b/lib/routes/cma/channel.ts index 5b6aec7f372a..dc9a13e5ddbf 100644 --- a/lib/routes/cma/channel.ts +++ b/lib/routes/cma/channel.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cngal/entry.ts b/lib/routes/cngal/entry.ts index 6e3181a77c43..d16a37238c82 100644 --- a/lib/routes/cngal/entry.ts +++ b/lib/routes/cngal/entry.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/cngal/weekly.ts b/lib/routes/cngal/weekly.ts index 487e7e8010b3..c078c842b970 100644 --- a/lib/routes/cngal/weekly.ts +++ b/lib/routes/cngal/weekly.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/cnjxol/index.ts b/lib/routes/cnjxol/index.ts index c28f69a1030c..453b3bf09c9d 100644 --- a/lib/routes/cnjxol/index.ts +++ b/lib/routes/cnjxol/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/cnki/debut.ts b/lib/routes/cnki/debut.ts index ab8c1f67e2b2..fdeaae3333d6 100644 --- a/lib/routes/cnki/debut.ts +++ b/lib/routes/cnki/debut.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/cnki/utils.ts b/lib/routes/cnki/utils.ts index 62c6df3a9bf4..a4676fb26e1d 100644 --- a/lib/routes/cnki/utils.ts +++ b/lib/routes/cnki/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/cntheory/paper.ts b/lib/routes/cntheory/paper.ts index 49dfa4f8f840..b545950f7af1 100644 --- a/lib/routes/cntheory/paper.ts +++ b/lib/routes/cntheory/paper.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/cntv/column.ts b/lib/routes/cntv/column.ts index dcc4002b16cf..8bf2d2d97023 100644 --- a/lib/routes/cntv/column.ts +++ b/lib/routes/cntv/column.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/codeforces/contests.ts b/lib/routes/codeforces/contests.ts index 978ad8a491bc..cabbd8e7ddb5 100644 --- a/lib/routes/codeforces/contests.ts +++ b/lib/routes/codeforces/contests.ts @@ -1,16 +1,14 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import ofetch from '@/utils/ofetch'; import path from 'node:path'; import { art } from '@/utils/render'; import dayjs from 'dayjs'; -import localizedFormat from 'dayjs/plugin/localizedFormat'; -import duration from 'dayjs/plugin/duration'; -import relativeTime from 'dayjs/plugin/relativeTime'; -import 'dayjs/locale/zh-cn'; +import localizedFormat from 'dayjs/plugin/localizedFormat.js'; +import duration from 'dayjs/plugin/duration.js'; +import relativeTime from 'dayjs/plugin/relativeTime.js'; +import 'dayjs/locale/zh-cn.js'; dayjs.extend(localizedFormat); dayjs.extend(duration); diff --git a/lib/routes/comicskingdom/index.ts b/lib/routes/comicskingdom/index.ts index ee4026017f39..ec6264ddfb66 100644 --- a/lib/routes/comicskingdom/index.ts +++ b/lib/routes/comicskingdom/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/coomer/index.ts b/lib/routes/coomer/index.ts index 70a52c830ad3..8bcdf0fcccbc 100644 --- a/lib/routes/coomer/index.ts +++ b/lib/routes/coomer/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; @@ -84,7 +82,7 @@ async function handler(ctx) { extension: attachment.path.replace(/.*\./, '').toLowerCase(), }); } - const filesHTML = art(path.join(__dirname, 'templates', 'source.art'), { i }); + const filesHTML = art(path.join(__dirname, 'templates/source.art'), { i }); let $ = load(filesHTML); const coomerFiles = $('img, a, audio, video').map(function () { return $(this).prop('outerHTML')!; diff --git a/lib/routes/copymanga/comic.ts b/lib/routes/copymanga/comic.ts index eab05f7ce381..58176816dc63 100644 --- a/lib/routes/copymanga/comic.ts +++ b/lib/routes/copymanga/comic.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; diff --git a/lib/routes/creative-comic/book.ts b/lib/routes/creative-comic/book.ts index 5edb198a5dd7..b1fc0ab30a20 100644 --- a/lib/routes/creative-comic/book.ts +++ b/lib/routes/creative-comic/book.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/cuilingmag/index.ts b/lib/routes/cuilingmag/index.ts index 8434b235852c..163236c87e35 100644 --- a/lib/routes/cuilingmag/index.ts +++ b/lib/routes/cuilingmag/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/curius/links.ts b/lib/routes/curius/links.ts index 8da702697764..e491b4ce38e1 100644 --- a/lib/routes/curius/links.ts +++ b/lib/routes/curius/links.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/cztv/daily.ts b/lib/routes/cztv/daily.ts index 16c89e445673..1ab73037cea2 100644 --- a/lib/routes/cztv/daily.ts +++ b/lib/routes/cztv/daily.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/cztv/zjxwlb.ts b/lib/routes/cztv/zjxwlb.ts index ce4d8543510a..3929a9649e4a 100644 --- a/lib/routes/cztv/zjxwlb.ts +++ b/lib/routes/cztv/zjxwlb.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/daily/utils.ts b/lib/routes/daily/utils.ts index eb559762dcb0..548adcca60dd 100644 --- a/lib/routes/daily/utils.ts +++ b/lib/routes/daily/utils.ts @@ -4,9 +4,7 @@ import cache from '@/utils/cache'; import { config } from '@/config'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; import { DataItem } from '@/types'; -const __dirname = getCurrentPath(import.meta.url); export const baseUrl = 'https://app.daily.dev'; const gqlUrl = `https://api.daily.dev/graphql`; diff --git a/lib/routes/damai/activity.ts b/lib/routes/damai/activity.ts index bcf0962bcf92..16036a77b22c 100644 --- a/lib/routes/damai/activity.ts +++ b/lib/routes/damai/activity.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/dcfever/utils.ts b/lib/routes/dcfever/utils.ts index c22231477166..14fc30582bf6 100644 --- a/lib/routes/dcfever/utils.ts +++ b/lib/routes/dcfever/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/deadline/posts.ts b/lib/routes/deadline/posts.ts index a3c5a080863b..71dc880b20b1 100644 --- a/lib/routes/deadline/posts.ts +++ b/lib/routes/deadline/posts.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/dedao/knowledge.ts b/lib/routes/dedao/knowledge.ts index d6c6ca4accc6..b124df12fe5a 100644 --- a/lib/routes/dedao/knowledge.ts +++ b/lib/routes/dedao/knowledge.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/dedao/user.ts b/lib/routes/dedao/user.ts index c2b8fb4d9da2..c37347967c40 100644 --- a/lib/routes/dedao/user.ts +++ b/lib/routes/dedao/user.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/deeplearning/the-batch.ts b/lib/routes/deeplearning/the-batch.ts index 5abe989dc12d..fbdd5fa0e131 100644 --- a/lib/routes/deeplearning/the-batch.ts +++ b/lib/routes/deeplearning/the-batch.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/dehenglaw/index.ts b/lib/routes/dehenglaw/index.ts index 630b9012c119..16289792a384 100644 --- a/lib/routes/dehenglaw/index.ts +++ b/lib/routes/dehenglaw/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/diershoubing/news.ts b/lib/routes/diershoubing/news.ts index 1dfddc1938b2..855f9644f0c2 100644 --- a/lib/routes/diershoubing/news.ts +++ b/lib/routes/diershoubing/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/discord/channel.ts b/lib/routes/discord/channel.ts index 47deff995951..133e90fc20ec 100644 --- a/lib/routes/discord/channel.ts +++ b/lib/routes/discord/channel.ts @@ -1,6 +1,4 @@ import { DataItem, Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { config } from '@/config'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/discord/search.ts b/lib/routes/discord/search.ts index 5e36f35d865b..633539f7d0a3 100644 --- a/lib/routes/discord/search.ts +++ b/lib/routes/discord/search.ts @@ -3,7 +3,6 @@ import path from 'node:path'; import { config } from '@/config'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import ConfigNotFoundError from '@/errors/types/config-not-found'; @@ -11,8 +10,6 @@ import { queryToBoolean } from '@/utils/readable-social'; import { baseUrl, getGuild, searchGuildMessages, SearchGuildMessagesParams, HasType, VALID_HAS_TYPES } from './discord-api'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: '/search/:guildId/:routeParams', categories: ['social-media'], diff --git a/lib/routes/dlnews/category.ts b/lib/routes/dlnews/category.ts index 20f531303228..156db563f266 100644 --- a/lib/routes/dlnews/category.ts +++ b/lib/routes/dlnews/category.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; diff --git a/lib/routes/dlsite/utils.ts b/lib/routes/dlsite/utils.ts index d08bbaa74c36..ecba7731a8ba 100644 --- a/lib/routes/dlsite/utils.ts +++ b/lib/routes/dlsite/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/dn/news.ts b/lib/routes/dn/news.ts index ae9fdfe98f2f..6eba133056a6 100644 --- a/lib/routes/dn/news.ts +++ b/lib/routes/dn/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/douban/movie/coming.ts b/lib/routes/douban/movie/coming.ts index 8c813fafd18e..f42108280003 100644 --- a/lib/routes/douban/movie/coming.ts +++ b/lib/routes/douban/movie/coming.ts @@ -1,11 +1,8 @@ import { Route } from '@/types'; import got from '@/utils/got'; -import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: '/movie/coming', categories: ['social-media'], diff --git a/lib/routes/douban/other/explore.ts b/lib/routes/douban/other/explore.ts index da20f2a5a7f2..99aaf02f3f6c 100644 --- a/lib/routes/douban/other/explore.ts +++ b/lib/routes/douban/other/explore.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/douban/other/list.ts b/lib/routes/douban/other/list.ts index b4c5f237afa8..3c9ac4df48b5 100644 --- a/lib/routes/douban/other/list.ts +++ b/lib/routes/douban/other/list.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import path from 'node:path'; diff --git a/lib/routes/douban/other/recommended.ts b/lib/routes/douban/other/recommended.ts index 840ed1e9164b..b2f534e942b1 100644 --- a/lib/routes/douban/other/recommended.ts +++ b/lib/routes/douban/other/recommended.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import path from 'node:path'; diff --git a/lib/routes/douban/other/weekly-best.ts b/lib/routes/douban/other/weekly-best.ts index fab2d55aac39..04b47f983835 100644 --- a/lib/routes/douban/other/weekly-best.ts +++ b/lib/routes/douban/other/weekly-best.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/douyin/utils.ts b/lib/routes/douyin/utils.ts index 938ae535562c..8a5d6e72f424 100644 --- a/lib/routes/douyin/utils.ts +++ b/lib/routes/douyin/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import path from 'node:path'; const templates = { diff --git a/lib/routes/douyu/group.ts b/lib/routes/douyu/group.ts index 7bd5df62989d..8271054d7bcd 100644 --- a/lib/routes/douyu/group.ts +++ b/lib/routes/douyu/group.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/douyu/post.ts b/lib/routes/douyu/post.ts index e208d539c3f8..b54b0dc30b34 100644 --- a/lib/routes/douyu/post.ts +++ b/lib/routes/douyu/post.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/dribbble/utils.ts b/lib/routes/dribbble/utils.ts index 53435b1701fa..2e9fca4ec321 100644 --- a/lib/routes/dribbble/utils.ts +++ b/lib/routes/dribbble/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; diff --git a/lib/routes/duozhuayu/search.ts b/lib/routes/duozhuayu/search.ts index 84c7a22fd1ec..9f7267039f5b 100644 --- a/lib/routes/duozhuayu/search.ts +++ b/lib/routes/duozhuayu/search.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import aesjs from 'aes-js'; diff --git a/lib/routes/dushu/fuzhou/index.ts b/lib/routes/dushu/fuzhou/index.ts index 50ab8c0e3cb5..1124d1caa047 100644 --- a/lib/routes/dushu/fuzhou/index.ts +++ b/lib/routes/dushu/fuzhou/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import ofetch from '@/utils/ofetch'; import { art } from '@/utils/render'; diff --git a/lib/routes/dw/utils.ts b/lib/routes/dw/utils.ts index 87514c626ed0..83a746dbae1a 100644 --- a/lib/routes/dw/utils.ts +++ b/lib/routes/dw/utils.ts @@ -3,9 +3,7 @@ import got from '@/utils/got'; import { load, type CheerioAPI } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); const formatId = '605'; const i18n = (word: string, lang: string) => { diff --git a/lib/routes/e-hentai/index.ts b/lib/routes/e-hentai/index.ts index 55a1291bf6cf..28abec0a4d0b 100644 --- a/lib/routes/e-hentai/index.ts +++ b/lib/routes/e-hentai/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/eastmoney/report/index.ts b/lib/routes/eastmoney/report/index.ts index a43d5c869537..e9401240712b 100644 --- a/lib/routes/eastmoney/report/index.ts +++ b/lib/routes/eastmoney/report/index.ts @@ -1,5 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,8 +7,6 @@ import { art } from '@/utils/render'; import path from 'node:path'; import { getRatingChangeStr, getEpsOrPeStr } from '../utils'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: '/report/:category', categories: ['finance', 'popular'], diff --git a/lib/routes/ecnu/contest.ts b/lib/routes/ecnu/contest.ts index f3054f80e58c..1bf3e211a0c8 100644 --- a/lib/routes/ecnu/contest.ts +++ b/lib/routes/ecnu/contest.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/elsevier/issue.ts b/lib/routes/elsevier/issue.ts index 1ffe2628a1c6..22af78bdc36c 100644 --- a/lib/routes/elsevier/issue.ts +++ b/lib/routes/elsevier/issue.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/elsevier/journal.ts b/lib/routes/elsevier/journal.ts index 4c09769afc7e..b9cd1609db07 100644 --- a/lib/routes/elsevier/journal.ts +++ b/lib/routes/elsevier/journal.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/epicgames/index.ts b/lib/routes/epicgames/index.ts index f2807f604c3c..5d306ea3dae6 100644 --- a/lib/routes/epicgames/index.ts +++ b/lib/routes/epicgames/index.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/eprice/rss.ts b/lib/routes/eprice/rss.ts index 8a92673ca33b..cc648f1bda2c 100644 --- a/lib/routes/eprice/rss.ts +++ b/lib/routes/eprice/rss.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/eshukan/academic.ts b/lib/routes/eshukan/academic.ts index 3402bb9388ff..9214a6838100 100644 --- a/lib/routes/eshukan/academic.ts +++ b/lib/routes/eshukan/academic.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/espn/news.ts b/lib/routes/espn/news.ts index 0dc8d31db161..51706facfa56 100644 --- a/lib/routes/espn/news.ts +++ b/lib/routes/espn/news.ts @@ -3,13 +3,10 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import * as cheerio from 'cheerio'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; -const __dirname = getCurrentPath(import.meta.url); - const renderMedia = (media) => - art(path.join(__dirname, 'templates', 'media.art'), { + art(path.join(__dirname, 'templates/media.art'), { video: { cover: media.posterImages?.full?.href || media.posterImages?.default?.href, src: media.links?.source.mezzanine?.href || media.links?.source.HD?.href || media.links?.source.full?.href || media.links?.source.href, diff --git a/lib/routes/esquirehk/tag.ts b/lib/routes/esquirehk/tag.ts index 5fdfa3e29f84..f47300b11680 100644 --- a/lib/routes/esquirehk/tag.ts +++ b/lib/routes/esquirehk/tag.ts @@ -8,9 +8,6 @@ import { art } from '@/utils/render'; import path from 'node:path'; import { destr } from 'destr'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - const topics = new Set(['style', 'watches', 'lifestyle', 'health', 'money-investment', 'gear', 'people', 'watch', 'mens-talk']); const handler = async (ctx) => { @@ -65,7 +62,7 @@ const handler = async (ctx) => { item.description = response.intro.raw + - art(path.join(__dirname, 'templates', 'subpages.art'), { + art(path.join(__dirname, 'templates/subpages.art'), { subpages: response.subpages, }); item.pubDate = parseDate(response.date.published, 'X'); diff --git a/lib/routes/famitsu/category.ts b/lib/routes/famitsu/category.ts index 2d16f32d4e78..4cb7ac525fd9 100644 --- a/lib/routes/famitsu/category.ts +++ b/lib/routes/famitsu/category.ts @@ -5,11 +5,9 @@ import * as cheerio from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; import { config } from '@/config'; import { ArticleDetail, Category, CategoryArticle } from './types'; -const __dirname = getCurrentPath(import.meta.url); const baseUrl = 'https://www.famitsu.com'; export const route: Route = { @@ -45,7 +43,7 @@ function getBuildId() { } function render(data) { - return art(path.join(__dirname, 'templates', 'description.art'), data); + return art(path.join(__dirname, 'templates/description.art'), data); } function renderJSON(c) { diff --git a/lib/routes/fanbox/utils.ts b/lib/routes/fanbox/utils.ts index c6fbf83613c0..c7c757d302aa 100644 --- a/lib/routes/fanbox/utils.ts +++ b/lib/routes/fanbox/utils.ts @@ -6,9 +6,6 @@ import { parseDate } from '@/utils/parse-date'; import cache from '@/utils/cache'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; - -const __dirname = getCurrentPath(import.meta.url); export function getHeaders() { const sessionid = config.fanbox.session; diff --git a/lib/routes/fangchan/list.ts b/lib/routes/fangchan/list.ts index 4f6e61bc10d5..8be42fda7b4a 100644 --- a/lib/routes/fangchan/list.ts +++ b/lib/routes/fangchan/list.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -11,8 +10,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { id = 'datalist' } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/fansly/utils.ts b/lib/routes/fansly/utils.ts index f30ec3b56e78..cb58ff59b979 100644 --- a/lib/routes/fansly/utils.ts +++ b/lib/routes/fansly/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/farmatters/index.ts b/lib/routes/farmatters/index.ts index c58071c0c5bd..c69c947974d1 100644 --- a/lib/routes/farmatters/index.ts +++ b/lib/routes/farmatters/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/fashionnetwork/index.ts b/lib/routes/fashionnetwork/index.ts index 628240113fc0..02c9ffc90afb 100644 --- a/lib/routes/fashionnetwork/index.ts +++ b/lib/routes/fashionnetwork/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/fastbull/news.ts b/lib/routes/fastbull/news.ts index d13d24036fd1..85c4b2f75e88 100644 --- a/lib/routes/fastbull/news.ts +++ b/lib/routes/fastbull/news.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/feng/forum.ts b/lib/routes/feng/forum.ts index de49b4e8dc13..1c516c720bbd 100644 --- a/lib/routes/feng/forum.ts +++ b/lib/routes/feng/forum.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { parseDate } from '@/utils/parse-date'; import { baseUrl, getForumMeta, getThreads, getThread } from './utils'; diff --git a/lib/routes/ff14/ff14-global.ts b/lib/routes/ff14/ff14-global.ts index d0a2122b6aa8..b04ea741227a 100644 --- a/lib/routes/ff14/ff14-global.ts +++ b/lib/routes/ff14/ff14-global.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/ff14/ff14-zh.ts b/lib/routes/ff14/ff14-zh.ts index f1f29c2a8f43..26f88cb17be5 100644 --- a/lib/routes/ff14/ff14-zh.ts +++ b/lib/routes/ff14/ff14-zh.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/fffdm/manhua/manhua.ts b/lib/routes/fffdm/manhua/manhua.ts index 4291d1c8cb60..bb48cba17d02 100644 --- a/lib/routes/fffdm/manhua/manhua.ts +++ b/lib/routes/fffdm/manhua/manhua.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/fisher-spb/news.ts b/lib/routes/fisher-spb/news.ts index 732736d2e83c..929896d7d46b 100644 --- a/lib/routes/fisher-spb/news.ts +++ b/lib/routes/fisher-spb/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/flyert/util.ts b/lib/routes/flyert/util.ts index 9538d00550e0..02feb1036ca0 100644 --- a/lib/routes/flyert/util.ts +++ b/lib/routes/flyert/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { CheerioAPI } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/focustaiwan/index.ts b/lib/routes/focustaiwan/index.ts index 2162d09b0ce2..46c8ca5e5527 100644 --- a/lib/routes/focustaiwan/index.ts +++ b/lib/routes/focustaiwan/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/followin/utils.ts b/lib/routes/followin/utils.ts index 6a8875c8b5d4..24e4e21e8d86 100644 --- a/lib/routes/followin/utils.ts +++ b/lib/routes/followin/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/foresightnews/util.ts b/lib/routes/foresightnews/util.ts index 4f22349be14c..be1bdfb1638e 100644 --- a/lib/routes/foresightnews/util.ts +++ b/lib/routes/foresightnews/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/fosshub/index.ts b/lib/routes/fosshub/index.ts index 5c8104d5530c..4870daacdd4e 100644 --- a/lib/routes/fosshub/index.ts +++ b/lib/routes/fosshub/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/freecomputerbooks/index.ts b/lib/routes/freecomputerbooks/index.ts index 60d3667d6225..e8de3825debb 100644 --- a/lib/routes/freecomputerbooks/index.ts +++ b/lib/routes/freecomputerbooks/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; diff --git a/lib/routes/furstar/utils.ts b/lib/routes/furstar/utils.ts index 7c3583b71b42..2d104d27de4e 100644 --- a/lib/routes/furstar/utils.ts +++ b/lib/routes/furstar/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { load } from 'cheerio'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/futunn/main.ts b/lib/routes/futunn/main.ts index f5c553f9ef62..8945fbef06ec 100644 --- a/lib/routes/futunn/main.ts +++ b/lib/routes/futunn/main.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gameapps/index.ts b/lib/routes/gameapps/index.ts index d928123107f7..6a2db63c0e5c 100644 --- a/lib/routes/gameapps/index.ts +++ b/lib/routes/gameapps/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/gamebase/news.ts b/lib/routes/gamebase/news.ts index 3970034c6a1f..23beb4fc094e 100644 --- a/lib/routes/gamebase/news.ts +++ b/lib/routes/gamebase/news.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -12,8 +11,6 @@ import { type CheerioAPI, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - const types = { newslist: 'newsList', r18list: 'newsPornList', diff --git a/lib/routes/gcores/articles.ts b/lib/routes/gcores/articles.ts index 4052c4599df3..bc7a1f48e7cb 100644 --- a/lib/routes/gcores/articles.ts +++ b/lib/routes/gcores/articles.ts @@ -1,12 +1,9 @@ import { type Data, type Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { type Context } from 'hono'; import { baseUrl, processItems } from './util'; -export const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/gcores/categories.ts b/lib/routes/gcores/categories.ts index a095c01ea073..d79dd2b5ed99 100644 --- a/lib/routes/gcores/categories.ts +++ b/lib/routes/gcores/categories.ts @@ -1,12 +1,9 @@ import { type Data, type Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { type Context } from 'hono'; import { baseUrl, processItems } from './util'; -export const __dirname = getCurrentPath(import.meta.url); - let viewType: ViewType = ViewType.Articles; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/gcores/collections.ts b/lib/routes/gcores/collections.ts index ba6237a8b4f2..292f90c4acdf 100644 --- a/lib/routes/gcores/collections.ts +++ b/lib/routes/gcores/collections.ts @@ -1,12 +1,9 @@ import { type Data, type Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { type Context } from 'hono'; import { baseUrl, processItems } from './util'; -export const __dirname = getCurrentPath(import.meta.url); - let viewType: ViewType = ViewType.Articles; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/gcores/news.ts b/lib/routes/gcores/news.ts index ceed6a004f17..2a90bc65542d 100644 --- a/lib/routes/gcores/news.ts +++ b/lib/routes/gcores/news.ts @@ -1,12 +1,9 @@ import { type Data, type Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { type Context } from 'hono'; import { baseUrl, processItems } from './util'; -export const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/gcores/parser.ts b/lib/routes/gcores/parser.ts index 815ba9bb02de..1935cfaa53be 100644 --- a/lib/routes/gcores/parser.ts +++ b/lib/routes/gcores/parser.ts @@ -1,10 +1,7 @@ import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - interface Style { [key: string]: string; } diff --git a/lib/routes/gcores/program-previews.ts b/lib/routes/gcores/program-previews.ts index 45e8f59a519a..f8d571070e24 100644 --- a/lib/routes/gcores/program-previews.ts +++ b/lib/routes/gcores/program-previews.ts @@ -1,12 +1,9 @@ import { type Data, type Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { type Context } from 'hono'; import { baseUrl, processItems } from './util'; -export const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/gcores/radio.ts b/lib/routes/gcores/radio.ts index 82f00763b840..7d43de0308db 100644 --- a/lib/routes/gcores/radio.ts +++ b/lib/routes/gcores/radio.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/gcores/tags.ts b/lib/routes/gcores/tags.ts index 155690c875e2..9d558c4dd98a 100644 --- a/lib/routes/gcores/tags.ts +++ b/lib/routes/gcores/tags.ts @@ -1,12 +1,9 @@ import { type Data, type Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { type Context } from 'hono'; import { baseUrl, processItems } from './util'; -export const __dirname = getCurrentPath(import.meta.url); - let viewType: ViewType = ViewType.Articles; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/gcores/topics.ts b/lib/routes/gcores/topics.ts index cb2bcb6dd3cc..6fbd8f9cbe5b 100644 --- a/lib/routes/gcores/topics.ts +++ b/lib/routes/gcores/topics.ts @@ -1,12 +1,9 @@ import { type Data, type Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { type Context } from 'hono'; import { baseUrl, processItems } from './util'; -export const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { id } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/gcores/util.ts b/lib/routes/gcores/util.ts index c068cf9def0d..85c036fa287b 100644 --- a/lib/routes/gcores/util.ts +++ b/lib/routes/gcores/util.ts @@ -1,15 +1,12 @@ import { type Data, type DataItem } from '@/types'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { type CheerioAPI, load } from 'cheerio'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - import { parseContent } from './parser'; const baseUrl: string = 'https://www.gcores.com'; diff --git a/lib/routes/gcores/videos.ts b/lib/routes/gcores/videos.ts index 6b67ada1de92..92d44b823c9f 100644 --- a/lib/routes/gcores/videos.ts +++ b/lib/routes/gcores/videos.ts @@ -1,12 +1,9 @@ import { type Data, type Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { type Context } from 'hono'; import { baseUrl, processItems } from './util'; -export const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/geekpark/index.ts b/lib/routes/geekpark/index.ts index 99167d881e12..f98bc683ee48 100644 --- a/lib/routes/geekpark/index.ts +++ b/lib/routes/geekpark/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gelbooru/utils.ts b/lib/routes/gelbooru/utils.ts index eb67a61d6089..bf74c2fa6104 100644 --- a/lib/routes/gelbooru/utils.ts +++ b/lib/routes/gelbooru/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import path from 'node:path'; import { art } from '@/utils/render'; import { config } from '@/config'; diff --git a/lib/routes/gelonghui/live.ts b/lib/routes/gelonghui/live.ts index a22c7cdad4b7..df0c24741ef2 100644 --- a/lib/routes/gelonghui/live.ts +++ b/lib/routes/gelonghui/live.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/gettr/user.ts b/lib/routes/gettr/user.ts index b1c9c7726e17..dd8df360dd65 100644 --- a/lib/routes/gettr/user.ts +++ b/lib/routes/gettr/user.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/github/pulse.ts b/lib/routes/github/pulse.ts index e3b640a2a077..fbcf6326c2e0 100644 --- a/lib/routes/github/pulse.ts +++ b/lib/routes/github/pulse.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { load } from 'cheerio'; import path from 'node:path'; diff --git a/lib/routes/github/trending.ts b/lib/routes/github/trending.ts index bb10ea86164c..c4d3ca593e95 100644 --- a/lib/routes/github/trending.ts +++ b/lib/routes/github/trending.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { config } from '@/config'; import got from '@/utils/got'; diff --git a/lib/routes/gitpod/blog.ts b/lib/routes/gitpod/blog.ts index 2adc7618b6e2..4ddf0f0f1d8d 100644 --- a/lib/routes/gitpod/blog.ts +++ b/lib/routes/gitpod/blog.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gofans/index.ts b/lib/routes/gofans/index.ts index a1eb3cd7bca8..bdcf83dd8acf 100644 --- a/lib/routes/gofans/index.ts +++ b/lib/routes/gofans/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/google/fonts.ts b/lib/routes/google/fonts.ts index e678005fb318..edc6a5669ce0 100644 --- a/lib/routes/google/fonts.ts +++ b/lib/routes/google/fonts.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { config } from '@/config'; diff --git a/lib/routes/google/news.ts b/lib/routes/google/news.ts index 457b9e0881ab..f0674a7a56d4 100644 --- a/lib/routes/google/news.ts +++ b/lib/routes/google/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/google/search.ts b/lib/routes/google/search.ts index 2fb7e994fbb4..c3d4bdecdb13 100644 --- a/lib/routes/google/search.ts +++ b/lib/routes/google/search.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gov/caac/cjwt.ts b/lib/routes/gov/caac/cjwt.ts index 9792974708d1..48aba151f8cc 100644 --- a/lib/routes/gov/caac/cjwt.ts +++ b/lib/routes/gov/caac/cjwt.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/gov/cmse/fxrw.ts b/lib/routes/gov/cmse/fxrw.ts index aef607f0c257..d138bd1b0f30 100644 --- a/lib/routes/gov/cmse/fxrw.ts +++ b/lib/routes/gov/cmse/fxrw.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gov/cmse/index.ts b/lib/routes/gov/cmse/index.ts index bffb1fab1291..ef0f085bf85f 100644 --- a/lib/routes/gov/cmse/index.ts +++ b/lib/routes/gov/cmse/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; diff --git a/lib/routes/gov/csrc/news.ts b/lib/routes/gov/csrc/news.ts index 0d9f0f10a95a..f6f2a7757288 100644 --- a/lib/routes/gov/csrc/news.ts +++ b/lib/routes/gov/csrc/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; @@ -43,7 +41,7 @@ async function handler(ctx) { out = data.data.data.results.map((item) => ({ title: item.title, - description: item.contentHtml + art(path.join(__dirname, 'templates', 'attachment.art'), { attachments: item.resList }), + description: item.contentHtml + art(path.join(__dirname, 'templates/attachment.art'), { attachments: item.resList }), pubDate: parseDate(item.publishedTime, 'x'), link: item.url, })); diff --git a/lib/routes/gov/forestry/gjlckjdjt.ts b/lib/routes/gov/forestry/gjlckjdjt.ts index b30e2dd1c874..6fefefdd1445 100644 --- a/lib/routes/gov/forestry/gjlckjdjt.ts +++ b/lib/routes/gov/forestry/gjlckjdjt.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gov/general/general.ts b/lib/routes/gov/general/general.ts index 8df95a3f36b9..d0848c0e9f0c 100644 --- a/lib/routes/gov/general/general.ts +++ b/lib/routes/gov/general/general.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; // 来人拯救一下啊( >﹏<。) @@ -187,7 +184,7 @@ const gdgov = async (info, ctx) => { return { link, title: data.art_title, - description: art(__dirname + '/templates/zcjdpt.art', data), + description: art(path.join(__dirname, 'templates/zcjdpt.art'), data), pubDate: timezone(parseDate(data.pub_time), +8), author: /(本|本网|本站)/.test(data.pub_unite) ? authorisme : data.pub_unite, }; diff --git a/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts b/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts index 0fb81e0b7386..3c7941f17a22 100644 --- a/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts +++ b/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/gov/guangdong/tqyb/tfxtq.ts b/lib/routes/gov/guangdong/tqyb/tfxtq.ts index 8e8549d1199a..d03bb0c2d730 100644 --- a/lib/routes/gov/guangdong/tqyb/tfxtq.ts +++ b/lib/routes/gov/guangdong/tqyb/tfxtq.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/gov/hangzhou/zwfw.ts b/lib/routes/gov/hangzhou/zwfw.ts index 9c2c24eb6d6f..f2adbd7557f4 100644 --- a/lib/routes/gov/hangzhou/zwfw.ts +++ b/lib/routes/gov/hangzhou/zwfw.ts @@ -1,6 +1,5 @@ import { Route } from '@/types'; import { load } from 'cheerio'; -const __dirname = getCurrentPath(import.meta.url); import puppeteer from '@/utils/puppeteer'; import ofetch from '@/utils/ofetch'; @@ -11,7 +10,6 @@ import { crawler, analyzer } from './zjzwfw'; import timezone from '@/utils/timezone'; import path from 'node:path'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; export const route: Route = { path: '/hangzhou/zwfw', diff --git a/lib/routes/gov/jiangsu/wlt/index.ts b/lib/routes/gov/jiangsu/wlt/index.ts index 9bbcd015997b..2b6cc0bf3ee8 100644 --- a/lib/routes/gov/jiangsu/wlt/index.ts +++ b/lib/routes/gov/jiangsu/wlt/index.ts @@ -1,5 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -8,8 +7,6 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: '/jiangsu/wlt/:page?', categories: ['government'], diff --git a/lib/routes/gov/safe/util.ts b/lib/routes/gov/safe/util.ts index 013d59e0c0aa..19eaed7c5300 100644 --- a/lib/routes/gov/safe/util.ts +++ b/lib/routes/gov/safe/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/gov/samr/xgzlyhd.ts b/lib/routes/gov/samr/xgzlyhd.ts index 3eca5ea914b6..b61b0776da6e 100644 --- a/lib/routes/gov/samr/xgzlyhd.ts +++ b/lib/routes/gov/samr/xgzlyhd.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gov/sh/fgw/index.ts b/lib/routes/gov/sh/fgw/index.ts index 39e168a21a84..dbecd5785854 100644 --- a/lib/routes/gov/sh/fgw/index.ts +++ b/lib/routes/gov/sh/fgw/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gov/sh/rsj/ksxm.ts b/lib/routes/gov/sh/rsj/ksxm.ts index 2c4569799192..cb7999803efa 100644 --- a/lib/routes/gov/sh/rsj/ksxm.ts +++ b/lib/routes/gov/sh/rsj/ksxm.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gov/sh/wgj/wgj.ts b/lib/routes/gov/sh/wgj/wgj.ts index 1e7357b31ccf..5cfbc11c3d2a 100644 --- a/lib/routes/gov/sh/wgj/wgj.ts +++ b/lib/routes/gov/sh/wgj/wgj.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gov/sichuan/deyang/govpublicinfo.ts b/lib/routes/gov/sichuan/deyang/govpublicinfo.ts index 2cce6fcfb707..d54da662a4ce 100644 --- a/lib/routes/gov/sichuan/deyang/govpublicinfo.ts +++ b/lib/routes/gov/sichuan/deyang/govpublicinfo.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gov/sichuan/deyang/mztoday.ts b/lib/routes/gov/sichuan/deyang/mztoday.ts index 4dd624782bff..f57aed81c794 100644 --- a/lib/routes/gov/sichuan/deyang/mztoday.ts +++ b/lib/routes/gov/sichuan/deyang/mztoday.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gov/stats/index.ts b/lib/routes/gov/stats/index.ts index b03d1b4a87a3..241cebd6ace3 100644 --- a/lib/routes/gov/stats/index.ts +++ b/lib/routes/gov/stats/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; diff --git a/lib/routes/guduodata/daily.ts b/lib/routes/guduodata/daily.ts index f8dc6986c269..3aa987b51a54 100644 --- a/lib/routes/guduodata/daily.ts +++ b/lib/routes/guduodata/daily.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gumroad/index.ts b/lib/routes/gumroad/index.ts index 052f15bb1eca..bc4789c89d35 100644 --- a/lib/routes/gumroad/index.ts +++ b/lib/routes/gumroad/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gzdaily/app.ts b/lib/routes/gzdaily/app.ts index 2dfaaf02d40c..1ddfd24df815 100644 --- a/lib/routes/gzdaily/app.ts +++ b/lib/routes/gzdaily/app.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/hafu/utils.ts b/lib/routes/hafu/utils.ts index b1521abe3c83..7b7d6a896d16 100644 --- a/lib/routes/hafu/utils.ts +++ b/lib/routes/hafu/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/hashnode/blog.ts b/lib/routes/hashnode/blog.ts index ac5aed8baff9..aa64170c45a4 100644 --- a/lib/routes/hashnode/blog.ts +++ b/lib/routes/hashnode/blog.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts b/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts index e722d893c4ab..232de22e82e2 100644 --- a/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts +++ b/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/hellogithub/report.ts b/lib/routes/hellogithub/report.ts index d639de80eed1..f2949c432d5f 100644 --- a/lib/routes/hellogithub/report.ts +++ b/lib/routes/hellogithub/report.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/hellogithub/volume.ts b/lib/routes/hellogithub/volume.ts index 5e1f41b9b174..ebd751877b66 100644 --- a/lib/routes/hellogithub/volume.ts +++ b/lib/routes/hellogithub/volume.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/hiring.cafe/jobs.ts b/lib/routes/hiring.cafe/jobs.ts index 30d492755f6e..aacd10f58a75 100644 --- a/lib/routes/hiring.cafe/jobs.ts +++ b/lib/routes/hiring.cafe/jobs.ts @@ -2,11 +2,8 @@ import ofetch from '@/utils/ofetch'; import path from 'node:path'; import { art } from '@/utils/render'; import { Context } from 'hono'; -import { getCurrentPath } from '@/utils/helpers'; import { Route } from '@/types'; -const __dirname = getCurrentPath(import.meta.url); - const CONFIG = { DEFAULT_PAGE_SIZE: 20, MAX_PAGE_SIZE: 100, diff --git a/lib/routes/hitcon/zeroday.ts b/lib/routes/hitcon/zeroday.ts index 5cbd771a20f2..bd72639068a1 100644 --- a/lib/routes/hitcon/zeroday.ts +++ b/lib/routes/hitcon/zeroday.ts @@ -6,9 +6,6 @@ import logger from '@/utils/logger'; import { art } from '@/utils/render'; import path from 'node:path'; import { parseDate } from '@/utils/parse-date'; -import { getCurrentPath } from '@/utils/helpers'; - -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { name: '漏洞', diff --git a/lib/routes/hk01/utils.ts b/lib/routes/hk01/utils.ts index a4efa60334a0..cddf434d7d5c 100644 --- a/lib/routes/hk01/utils.ts +++ b/lib/routes/hk01/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/hkej/index.ts b/lib/routes/hkej/index.ts index 08bab035e798..1fd4e4ceffa2 100644 --- a/lib/routes/hkej/index.ts +++ b/lib/routes/hkej/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/hket/index.ts b/lib/routes/hket/index.ts index 7abfa3633090..5b9dad231aaf 100644 --- a/lib/routes/hket/index.ts +++ b/lib/routes/hket/index.ts @@ -1,6 +1,4 @@ import { DataItem, Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/hostmonit/cloudflareyes.ts b/lib/routes/hostmonit/cloudflareyes.ts index ff1ce007e0d8..989dff1cbd44 100644 --- a/lib/routes/hostmonit/cloudflareyes.ts +++ b/lib/routes/hostmonit/cloudflareyes.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/houxu/events.ts b/lib/routes/houxu/events.ts index 9e4d5770c11e..ca37a26ae5ee 100644 --- a/lib/routes/houxu/events.ts +++ b/lib/routes/houxu/events.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/houxu/index.ts b/lib/routes/houxu/index.ts index fcac8b90faee..72cea3991a69 100644 --- a/lib/routes/houxu/index.ts +++ b/lib/routes/houxu/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/houxu/memory.ts b/lib/routes/houxu/memory.ts index 6e108b978be4..2a807f903af1 100644 --- a/lib/routes/houxu/memory.ts +++ b/lib/routes/houxu/memory.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/hoyolab/news.ts b/lib/routes/hoyolab/news.ts index 1411d678dda9..e6ed922e3918 100644 --- a/lib/routes/hoyolab/news.ts +++ b/lib/routes/hoyolab/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/hupu/all.ts b/lib/routes/hupu/all.ts index 08d745195550..2226ae052885 100644 --- a/lib/routes/hupu/all.ts +++ b/lib/routes/hupu/all.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/hupu/bbs.ts b/lib/routes/hupu/bbs.ts index e3cd3aee525b..39ca3d457b8d 100644 --- a/lib/routes/hupu/bbs.ts +++ b/lib/routes/hupu/bbs.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/huxiu/util.ts b/lib/routes/huxiu/util.ts index b69659dfda58..73850e86fde3 100644 --- a/lib/routes/huxiu/util.ts +++ b/lib/routes/huxiu/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/i-cable/news.ts b/lib/routes/i-cable/news.ts index 067dacd8670a..6541ba565469 100644 --- a/lib/routes/i-cable/news.ts +++ b/lib/routes/i-cable/news.ts @@ -1,14 +1,11 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { getCurrentPath } from '@/utils/helpers'; import path from 'node:path'; import { art } from '@/utils/render'; import { config } from '@/config'; import InvalidParameterError from '@/errors/types/invalid-parameter'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: '/news/:category?', categories: ['traditional-media'], diff --git a/lib/routes/ianspriggs/index.ts b/lib/routes/ianspriggs/index.ts index f91b883c3c07..b652cc458cbc 100644 --- a/lib/routes/ianspriggs/index.ts +++ b/lib/routes/ianspriggs/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/idaily/index.ts b/lib/routes/idaily/index.ts index 6845f898c4f2..6fc9c5491d44 100644 --- a/lib/routes/idaily/index.ts +++ b/lib/routes/idaily/index.ts @@ -4,8 +4,6 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: ['/:language?'], diff --git a/lib/routes/ieee/author.ts b/lib/routes/ieee/author.ts index 78f1a8001bee..6afef6535f9f 100644 --- a/lib/routes/ieee/author.ts +++ b/lib/routes/ieee/author.ts @@ -5,8 +5,6 @@ import { load } from 'cheerio'; import path from 'node:path'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { name: 'IEEE Author Articles', diff --git a/lib/routes/ieee/journal.ts b/lib/routes/ieee/journal.ts index c8ffa3471379..a34632daba0b 100644 --- a/lib/routes/ieee/journal.ts +++ b/lib/routes/ieee/journal.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import path from 'node:path'; diff --git a/lib/routes/ifeng/news.ts b/lib/routes/ifeng/news.ts index 515da98683e3..70c8d99abe8b 100644 --- a/lib/routes/ifeng/news.ts +++ b/lib/routes/ifeng/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; diff --git a/lib/routes/ifeng/utils.ts b/lib/routes/ifeng/utils.ts index 9e7e084f3c57..387c7c7d9d12 100644 --- a/lib/routes/ifeng/utils.ts +++ b/lib/routes/ifeng/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import path from 'node:path'; diff --git a/lib/routes/ikea/cn/utils.ts b/lib/routes/ikea/cn/utils.ts index deef19138fd1..75e8af590e91 100644 --- a/lib/routes/ikea/cn/utils.ts +++ b/lib/routes/ikea/cn/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import md5 from '@/utils/md5'; import path from 'node:path'; diff --git a/lib/routes/ikea/gb/new.ts b/lib/routes/ikea/gb/new.ts index cc67adc9d716..8ad4219e8629 100644 --- a/lib/routes/ikea/gb/new.ts +++ b/lib/routes/ikea/gb/new.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/ikea/gb/offer.ts b/lib/routes/ikea/gb/offer.ts index 1032596d1dd4..8634a1066e0b 100644 --- a/lib/routes/ikea/gb/offer.ts +++ b/lib/routes/ikea/gb/offer.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/iknowwhatyoudownload/daily.ts b/lib/routes/iknowwhatyoudownload/daily.ts index 953c64502d35..fda67f153052 100644 --- a/lib/routes/iknowwhatyoudownload/daily.ts +++ b/lib/routes/iknowwhatyoudownload/daily.ts @@ -5,9 +5,6 @@ import dayjs from 'dayjs'; import got from '@/utils/got'; import { art } from '@/utils/render'; import path from 'path'; -import { getCurrentPath } from '@/utils/helpers'; - -const __dirname = getCurrentPath(import.meta.url); interface TableData { key: string; diff --git a/lib/routes/imdb/chart.ts b/lib/routes/imdb/chart.ts index 4619f9a3ac65..5c14dace0994 100644 --- a/lib/routes/imdb/chart.ts +++ b/lib/routes/imdb/chart.ts @@ -4,11 +4,9 @@ import * as cheerio from 'cheerio'; import type { Context } from 'hono'; import { ChartTitleSearchConnection } from './types'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; -const __dirname = getCurrentPath(import.meta.url); -const render = (data) => art(path.join(__dirname, 'templates', 'chart.art'), data); +const render = (data) => art(path.join(__dirname, 'templates/chart.art'), data); export const route: Route = { path: '/chart/:chart?', diff --git a/lib/routes/imiker/jinghua.ts b/lib/routes/imiker/jinghua.ts index 2a4ad34fc2b2..ce2aeca23f03 100644 --- a/lib/routes/imiker/jinghua.ts +++ b/lib/routes/imiker/jinghua.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/infoq/presentations.ts b/lib/routes/infoq/presentations.ts index a7b4c91b59f1..b1aa660411c6 100644 --- a/lib/routes/infoq/presentations.ts +++ b/lib/routes/infoq/presentations.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/informs/index.ts b/lib/routes/informs/index.ts index 73f5ab7ea7ef..d772d88962b3 100644 --- a/lib/routes/informs/index.ts +++ b/lib/routes/informs/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { config } from '@/config'; diff --git a/lib/routes/instagram/common-utils.ts b/lib/routes/instagram/common-utils.ts index d0a25b9c850f..d99466a42059 100644 --- a/lib/routes/instagram/common-utils.ts +++ b/lib/routes/instagram/common-utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; diff --git a/lib/routes/instagram/web-api/utils.ts b/lib/routes/instagram/web-api/utils.ts index 24a3a084579d..cae877ac471a 100644 --- a/lib/routes/instagram/web-api/utils.ts +++ b/lib/routes/instagram/web-api/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; diff --git a/lib/routes/ipsw.dev/index.ts b/lib/routes/ipsw.dev/index.ts index a5ad5fd1be2b..58b66dab29b7 100644 --- a/lib/routes/ipsw.dev/index.ts +++ b/lib/routes/ipsw.dev/index.ts @@ -3,7 +3,6 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; export const route: Route = { path: '/index/:productID', @@ -19,7 +18,6 @@ export const route: Route = { async function handler(ctx) { const { productID } = ctx.req.param(); - const __dirname = getCurrentPath(import.meta.url); const link = `https://ipsw.dev/product/version/${productID}`; const resp = await got({ diff --git a/lib/routes/iqilu/program.ts b/lib/routes/iqilu/program.ts index 5e0046baa381..f6adb066c0ee 100644 --- a/lib/routes/iqilu/program.ts +++ b/lib/routes/iqilu/program.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/iqiyi/album.ts b/lib/routes/iqiyi/album.ts index e2da0f4a2e4a..58a3e233b548 100644 --- a/lib/routes/iqiyi/album.ts +++ b/lib/routes/iqiyi/album.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/iresearch/chart.ts b/lib/routes/iresearch/chart.ts index 0dd82a878652..0f36c40b60a7 100644 --- a/lib/routes/iresearch/chart.ts +++ b/lib/routes/iresearch/chart.ts @@ -6,13 +6,10 @@ import { type Context } from 'hono'; import { type DataItem, type Route, type Data, ViewType } from '@/types'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -const __dirname = getCurrentPath(import.meta.url); - const categoryMap = { 媒体文娱: 59, 广告营销: 89, diff --git a/lib/routes/iresearch/report.ts b/lib/routes/iresearch/report.ts index 094875ddf891..1a16885593a8 100644 --- a/lib/routes/iresearch/report.ts +++ b/lib/routes/iresearch/report.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/iresearch/weekly.ts b/lib/routes/iresearch/weekly.ts index d1668dde072e..5fe4ba5b661f 100644 --- a/lib/routes/iresearch/weekly.ts +++ b/lib/routes/iresearch/weekly.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/itch/devlog.ts b/lib/routes/itch/devlog.ts index 7f2a931bc166..f947d609d2d2 100644 --- a/lib/routes/itch/devlog.ts +++ b/lib/routes/itch/devlog.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/itch/index.ts b/lib/routes/itch/index.ts index 24eace8abc30..539b9f6ffa84 100644 --- a/lib/routes/itch/index.ts +++ b/lib/routes/itch/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; diff --git a/lib/routes/ithome/zt.ts b/lib/routes/ithome/zt.ts index 7c174365e862..ebeb20ae3f65 100644 --- a/lib/routes/ithome/zt.ts +++ b/lib/routes/ithome/zt.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/iwara/subscriptions.ts b/lib/routes/iwara/subscriptions.ts index 5c637ecf9025..83f5cf1cd81d 100644 --- a/lib/routes/iwara/subscriptions.ts +++ b/lib/routes/iwara/subscriptions.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/ixigua/user-video.ts b/lib/routes/ixigua/user-video.ts index d9bed9df03e8..71031fd0b0f5 100644 --- a/lib/routes/ixigua/user-video.ts +++ b/lib/routes/ixigua/user-video.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/japanpost/track.ts b/lib/routes/japanpost/track.ts index 9f44377a0fc9..c1d3c998a636 100644 --- a/lib/routes/japanpost/track.ts +++ b/lib/routes/japanpost/track.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { art } from '@/utils/render'; import { load } from 'cheerio'; diff --git a/lib/routes/japanpost/utils.ts b/lib/routes/japanpost/utils.ts index 92cdd855bf58..2e5d682f35c5 100644 --- a/lib/routes/japanpost/utils.ts +++ b/lib/routes/japanpost/utils.ts @@ -2,9 +2,9 @@ import crypto from 'crypto'; import cityTimezones from 'city-timezones'; import dayjs from 'dayjs'; -import customParseFormat from 'dayjs/plugin/customParseFormat'; -import utc from 'dayjs/plugin/utc'; -import timezone from 'dayjs/plugin/timezone'; +import customParseFormat from 'dayjs/plugin/customParseFormat.js'; +import utc from 'dayjs/plugin/utc.js'; +import timezone from 'dayjs/plugin/timezone.js'; dayjs.extend(customParseFormat); dayjs.extend(utc); dayjs.extend(timezone); diff --git a/lib/routes/javbus/index.ts b/lib/routes/javbus/index.ts index f07d9b3ebcfe..5b0ef2b2b36d 100644 --- a/lib/routes/javbus/index.ts +++ b/lib/routes/javbus/index.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; diff --git a/lib/routes/javlibrary/utils.ts b/lib/routes/javlibrary/utils.ts index 666fa1ee4afa..d26a13388321 100644 --- a/lib/routes/javlibrary/utils.ts +++ b/lib/routes/javlibrary/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/javtiful/utils.ts b/lib/routes/javtiful/utils.ts index e3fe4c5850da..9408224d964f 100644 --- a/lib/routes/javtiful/utils.ts +++ b/lib/routes/javtiful/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import path from 'node:path'; import { parseRelativeDate } from '@/utils/parse-date'; diff --git a/lib/routes/javtrailers/utils.ts b/lib/routes/javtrailers/utils.ts index 5b8037bef242..d4f05430ade5 100644 --- a/lib/routes/javtrailers/utils.ts +++ b/lib/routes/javtrailers/utils.ts @@ -4,8 +4,6 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); export const baseUrl = 'https://javtrailers.com'; export const headers = { diff --git a/lib/routes/jd/price.ts b/lib/routes/jd/price.ts index 4e44573b309b..95e664e2559c 100644 --- a/lib/routes/jd/price.ts +++ b/lib/routes/jd/price.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/jiemian/lists.ts b/lib/routes/jiemian/lists.ts index a92bf991915b..4e0ea0c8ec38 100644 --- a/lib/routes/jiemian/lists.ts +++ b/lib/routes/jiemian/lists.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/jimmyspa/books.ts b/lib/routes/jimmyspa/books.ts index d925acd21681..d404b0d770aa 100644 --- a/lib/routes/jimmyspa/books.ts +++ b/lib/routes/jimmyspa/books.ts @@ -3,11 +3,9 @@ import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; import cache from '@/utils/cache'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/books/:language', categories: ['design'], diff --git a/lib/routes/jimmyspa/news.ts b/lib/routes/jimmyspa/news.ts index 5d7788640f4d..5b6b24cbdac4 100644 --- a/lib/routes/jimmyspa/news.ts +++ b/lib/routes/jimmyspa/news.ts @@ -3,8 +3,6 @@ import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import path from 'node:path'; export const route: Route = { diff --git a/lib/routes/jin10/category.ts b/lib/routes/jin10/category.ts index 52ff3c42478c..752493f1cf1d 100644 --- a/lib/routes/jin10/category.ts +++ b/lib/routes/jin10/category.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/jin10/index.ts b/lib/routes/jin10/index.ts index ff4d02af6ead..6da464b814a1 100644 --- a/lib/routes/jin10/index.ts +++ b/lib/routes/jin10/index.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/jinse/catalogue.ts b/lib/routes/jinse/catalogue.ts index 931dc2b8018b..94c5961d6a43 100644 --- a/lib/routes/jinse/catalogue.ts +++ b/lib/routes/jinse/catalogue.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/jinse/lives.ts b/lib/routes/jinse/lives.ts index 13f8b72952cb..7777b724812f 100644 --- a/lib/routes/jinse/lives.ts +++ b/lib/routes/jinse/lives.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/jinse/timeline.ts b/lib/routes/jinse/timeline.ts index f3d7a41ca1d8..c58b80c59d9c 100644 --- a/lib/routes/jinse/timeline.ts +++ b/lib/routes/jinse/timeline.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/jiuyangongshe/community.ts b/lib/routes/jiuyangongshe/community.ts index d739cd5831ef..dba6cfb9ef4b 100644 --- a/lib/routes/jiuyangongshe/community.ts +++ b/lib/routes/jiuyangongshe/community.ts @@ -5,11 +5,8 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import md5 from '@/utils/md5'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; -const __dirname = getCurrentPath(import.meta.url); - interface User { follow_type: number; investment_style_id: null | string; @@ -93,7 +90,7 @@ interface Community { serverTime: number; } -const render = (data) => art(path.join(__dirname, 'templates', 'community-description.art'), data); +const render = (data) => art(path.join(__dirname, 'templates/community-description.art'), data); export const route: Route = { path: '/community', diff --git a/lib/routes/jjwxc/author.ts b/lib/routes/jjwxc/author.ts index 5cbf9751feb5..99d32e746dfe 100644 --- a/lib/routes/jjwxc/author.ts +++ b/lib/routes/jjwxc/author.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/jjwxc/book.ts b/lib/routes/jjwxc/book.ts index c111a1cfa3d7..d31b1d65aacd 100644 --- a/lib/routes/jjwxc/book.ts +++ b/lib/routes/jjwxc/book.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/joins/chinese.ts b/lib/routes/joins/chinese.ts index 93be06161bc1..de858ad1e3ad 100644 --- a/lib/routes/joins/chinese.ts +++ b/lib/routes/joins/chinese.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/joneslanglasalle/index.ts b/lib/routes/joneslanglasalle/index.ts index 8c73a3eed8ba..343bef215293 100644 --- a/lib/routes/joneslanglasalle/index.ts +++ b/lib/routes/joneslanglasalle/index.ts @@ -7,12 +7,9 @@ import { type DataItem, type Route, type Data, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -const __dirname = getCurrentPath(import.meta.url); - const cleanHtml = (html: string, preservedTags: string[]): string => { const $ = load(html); diff --git a/lib/routes/jpxgmn/utils.ts b/lib/routes/jpxgmn/utils.ts index 3efb133c3bc2..6547a3f2ab9c 100644 --- a/lib/routes/jpxgmn/utils.ts +++ b/lib/routes/jpxgmn/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { art } from '@/utils/render'; import { load } from 'cheerio'; diff --git a/lib/routes/jump/discount.ts b/lib/routes/jump/discount.ts index 9e372cd4a749..da3082dc5fcb 100644 --- a/lib/routes/jump/discount.ts +++ b/lib/routes/jump/discount.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/kadokawa/blog.ts b/lib/routes/kadokawa/blog.ts index b44109db5255..1ea17d02c740 100644 --- a/lib/routes/kadokawa/blog.ts +++ b/lib/routes/kadokawa/blog.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/kamen-rider-official/news.ts b/lib/routes/kamen-rider-official/news.ts index e360f7f6130a..7f2d792417e0 100644 --- a/lib/routes/kamen-rider-official/news.ts +++ b/lib/routes/kamen-rider-official/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/kantarworldpanel/index.ts b/lib/routes/kantarworldpanel/index.ts index 9b9e378c6117..1efe29082426 100644 --- a/lib/routes/kantarworldpanel/index.ts +++ b/lib/routes/kantarworldpanel/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/kcna/news.ts b/lib/routes/kcna/news.ts index f1bd2e6f2a91..7eac72a2ed25 100644 --- a/lib/routes/kcna/news.ts +++ b/lib/routes/kcna/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/keep/user.ts b/lib/routes/keep/user.ts index 0b4a82f0ef26..a02ddb55e98c 100644 --- a/lib/routes/keep/user.ts +++ b/lib/routes/keep/user.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/kemono/index.ts b/lib/routes/kemono/index.ts index 2d92eb5a1365..82d5ffcdca5b 100644 --- a/lib/routes/kemono/index.ts +++ b/lib/routes/kemono/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -82,7 +80,7 @@ async function handler(ctx) { .slice(0, limit) .map((i) => ({ title: i.content, - description: art(path.join(__dirname, 'templates', 'discord.art'), { i }), + description: art(path.join(__dirname, 'templates/discord.art'), { i }), author: `${i.author.username}#${i.author.discriminator}`, pubDate: parseDate(i.published), category: channel.name, @@ -117,7 +115,7 @@ async function handler(ctx) { extension: attachment.path.replace(/.*\./, '').toLowerCase(), }); } - const filesHTML = art(path.join(__dirname, 'templates', 'source.art'), { i }); + const filesHTML = art(path.join(__dirname, 'templates/source.art'), { i }); let $ = load(filesHTML); const kemonoFiles = $('img, a, audio, video').map(function () { return $(this).prop('outerHTML')!; diff --git a/lib/routes/kepu/live.ts b/lib/routes/kepu/live.ts index dfbe66206f85..dad47ff24cc7 100644 --- a/lib/routes/kepu/live.ts +++ b/lib/routes/kepu/live.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/kpmg/insights.ts b/lib/routes/kpmg/insights.ts index f5a87c46f10f..087185af8796 100644 --- a/lib/routes/kpmg/insights.ts +++ b/lib/routes/kpmg/insights.ts @@ -7,8 +7,6 @@ import { Context } from 'hono'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); const baseUrl = 'https://kpmg.com'; const payload = { diff --git a/lib/routes/kpopping/kpics.ts b/lib/routes/kpopping/kpics.ts index 420bfd380f4a..05f36d9ac196 100644 --- a/lib/routes/kpopping/kpics.ts +++ b/lib/routes/kpopping/kpics.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -10,8 +9,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { filter } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/kpopping/news.ts b/lib/routes/kpopping/news.ts index 6c9e0f5bd090..d35f9f37e489 100644 --- a/lib/routes/kpopping/news.ts +++ b/lib/routes/kpopping/news.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -11,8 +10,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { filter } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '2', 10); diff --git a/lib/routes/kyodonews/index.ts b/lib/routes/kyodonews/index.ts index 8277b4b88a4a..f46bd9c6e7ff 100644 --- a/lib/routes/kyodonews/index.ts +++ b/lib/routes/kyodonews/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/lang/room.ts b/lib/routes/lang/room.ts index d368cdd96085..ba0ca0e85d5f 100644 --- a/lib/routes/lang/room.ts +++ b/lib/routes/lang/room.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/lanqiao/utils.ts b/lib/routes/lanqiao/utils.ts index 71cb3e6b62a4..13e34d316359 100644 --- a/lib/routes/lanqiao/utils.ts +++ b/lib/routes/lanqiao/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import path from 'node:path'; diff --git a/lib/routes/learnku/topic.ts b/lib/routes/learnku/topic.ts index 12654175fabd..c53e3936f94d 100644 --- a/lib/routes/learnku/topic.ts +++ b/lib/routes/learnku/topic.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/leetcode/dailyquestion-cn.ts b/lib/routes/leetcode/dailyquestion-cn.ts index 66b018673f9a..34335a1bda54 100644 --- a/lib/routes/leetcode/dailyquestion-cn.ts +++ b/lib/routes/leetcode/dailyquestion-cn.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/leetcode/dailyquestion-en.ts b/lib/routes/leetcode/dailyquestion-en.ts index 3243aef2fab6..f0eddacbc90b 100644 --- a/lib/routes/leetcode/dailyquestion-en.ts +++ b/lib/routes/leetcode/dailyquestion-en.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/lfsyd/utils.ts b/lib/routes/lfsyd/utils.ts index df89c42dda67..d2cf59ae947c 100644 --- a/lib/routes/lfsyd/utils.ts +++ b/lib/routes/lfsyd/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { load } from 'cheerio'; import got from '@/utils/got'; import md5 from '@/utils/md5'; diff --git a/lib/routes/linkedin/cn/utils.ts b/lib/routes/linkedin/cn/utils.ts index 0b62b133b927..ff06b141fc7f 100644 --- a/lib/routes/linkedin/cn/utils.ts +++ b/lib/routes/linkedin/cn/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import crypto from 'crypto'; import path from 'node:path'; diff --git a/lib/routes/linkresearcher/index.ts b/lib/routes/linkresearcher/index.ts index 65da513d2f3c..dcf01ae82fe8 100644 --- a/lib/routes/linkresearcher/index.ts +++ b/lib/routes/linkresearcher/index.ts @@ -6,11 +6,9 @@ import crypto from 'crypto'; import type { Context } from 'hono'; import type { DetailResponse, SearchResultItem } from './types'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); const templatePath = path.join(__dirname, 'templates/bilingual.art'); const baseURL = 'https://www.linkresearcher.com'; diff --git a/lib/routes/lkong/forum.ts b/lib/routes/lkong/forum.ts index 0d811fe1785b..df31bbe15544 100644 --- a/lib/routes/lkong/forum.ts +++ b/lib/routes/lkong/forum.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/lkong/thread.ts b/lib/routes/lkong/thread.ts index 2905f5e079cc..b6ac5717233e 100644 --- a/lib/routes/lkong/thread.ts +++ b/lib/routes/lkong/thread.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/lmu/jobs.ts b/lib/routes/lmu/jobs.ts index a692727c0047..33c38f5982b6 100644 --- a/lib/routes/lmu/jobs.ts +++ b/lib/routes/lmu/jobs.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/logclub/index.ts b/lib/routes/logclub/index.ts index 0fa828af9c98..a3b1147174d7 100644 --- a/lib/routes/logclub/index.ts +++ b/lib/routes/logclub/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/logclub/report.ts b/lib/routes/logclub/report.ts index a93d2a9c88f3..7ee2b49256e0 100644 --- a/lib/routes/logclub/report.ts +++ b/lib/routes/logclub/report.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/logonews/index.ts b/lib/routes/logonews/index.ts index b18e2fac7b09..0302e81b5386 100644 --- a/lib/routes/logonews/index.ts +++ b/lib/routes/logonews/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; diff --git a/lib/routes/logrocket/index.ts b/lib/routes/logrocket/index.ts index 8a1f605b983e..6c90e506cb1a 100644 --- a/lib/routes/logrocket/index.ts +++ b/lib/routes/logrocket/index.ts @@ -3,10 +3,7 @@ import ofetch from '@/utils/ofetch'; // 统一使用的请求库 import { load } from 'cheerio'; // 类似 jQuery 的 API HTML 解析器 import { Route } from '@/types'; import cache from '@/utils/cache'; -// import { getCurrentPath } from '@/utils/helpers'; -// import { art } from '@/utils/render'; -// import path from 'node:path'; -// const __dirname = getCurrentPath(import.meta.url); + export const route: Route = { path: '/:type', categories: ['blog'], @@ -54,10 +51,6 @@ async function handler(ctx) { // $('div.content-max-width .sidebar-container div.code-block').remove(); item.description = $('div.content-max-width .sidebar-container').html(); - // item.description = art(path.join(__dirname, 'templates/description.art'), { - // // header: $('#post-header').html(), - // description: $('div.content-max-width .the-content-container').remove('.lr-content div.code-block.code-block-77').remove('.lr-content .code-block.code-block-57').html(), - // }); return item; }) ) diff --git a/lib/routes/loltw/news.ts b/lib/routes/loltw/news.ts index 45544dd30740..3827a7fe2628 100644 --- a/lib/routes/loltw/news.ts +++ b/lib/routes/loltw/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/lorientlejour/index.ts b/lib/routes/lorientlejour/index.ts index 8a9bb62422cb..4a1a5d4c7ba5 100644 --- a/lib/routes/lorientlejour/index.ts +++ b/lib/routes/lorientlejour/index.ts @@ -5,12 +5,10 @@ import { config } from '@/config'; import { FetchError } from 'ofetch'; import { load } from 'cheerio'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; import path from 'node:path'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -const __dirname = getCurrentPath(import.meta.url); const key = '3d5_f6A(S$G_FD=2S(Dr6%7BW_h37@rE'; export const route: Route = { @@ -48,7 +46,7 @@ export const route: Route = { maintainers: ['quiniapiezoelectricity'], handler, description: ` ::: tip -For example, the path for the sites https://today.lorientlejour.com/section/977-lebanon and https://www.lorientlejour.com/rubrique/1-liban would be /lorientlejour/977-lebanon and /lorientlejour/1-liban respectively. +For example, the path for the sites https://today.lorientlejour.com/section/977-lebanon and https://www.lorientlejour.com/rubrique/1-liban would be /lorientlejour/977-lebanon and /lorientlejour/1-liban respectively. Multiple categories seperated by '|' is also supported, e.g. /lorientlejour/977-lebanon|1-liban. :::`, radar: [ diff --git a/lib/routes/lovelive-anime/news.ts b/lib/routes/lovelive-anime/news.ts index 45af080bf812..744860986303 100644 --- a/lib/routes/lovelive-anime/news.ts +++ b/lib/routes/lovelive-anime/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/lovelive-anime/schedules.ts b/lib/routes/lovelive-anime/schedules.ts index 046111b9ab03..c2ffef8da1b1 100644 --- a/lib/routes/lovelive-anime/schedules.ts +++ b/lib/routes/lovelive-anime/schedules.ts @@ -1,14 +1,12 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import ofetch from '@/utils/ofetch'; import path from 'node:path'; import { art } from '@/utils/render'; const renderDescription = (desc) => art(path.join(__dirname, 'templates/scheduleDesc.art'), desc); import dayjs from 'dayjs'; -import utc from 'dayjs/plugin/utc'; -import timezone from 'dayjs/plugin/timezone'; +import utc from 'dayjs/plugin/utc.js'; +import timezone from 'dayjs/plugin/timezone.js'; dayjs.extend(utc); dayjs.extend(timezone); diff --git a/lib/routes/lovelive-anime/topics.ts b/lib/routes/lovelive-anime/topics.ts index 1b91f2ce194a..e7dfa8b34f9b 100644 --- a/lib/routes/lovelive-anime/topics.ts +++ b/lib/routes/lovelive-anime/topics.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/lrepacks/index.ts b/lib/routes/lrepacks/index.ts index e31a5ddca65b..2d54432c9073 100644 --- a/lib/routes/lrepacks/index.ts +++ b/lib/routes/lrepacks/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/ltaaa/article.ts b/lib/routes/ltaaa/article.ts index 510bd4c0d077..ad7d4755069f 100644 --- a/lib/routes/ltaaa/article.ts +++ b/lib/routes/ltaaa/article.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -10,8 +9,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/luolei/index.ts b/lib/routes/luolei/index.ts index a8fced16a8f9..21ced6a7fab5 100644 --- a/lib/routes/luolei/index.ts +++ b/lib/routes/luolei/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/lvv2/news.ts b/lib/routes/lvv2/news.ts index ab142ade15bc..3aa9fafc3eb8 100644 --- a/lib/routes/lvv2/news.ts +++ b/lib/routes/lvv2/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/lvv2/top.ts b/lib/routes/lvv2/top.ts index 647c13721f94..9d21c9b536be 100644 --- a/lib/routes/lvv2/top.ts +++ b/lib/routes/lvv2/top.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/lxixsxa/discography.ts b/lib/routes/lxixsxa/discography.ts index 2999199baa19..fab9f7d3c5ad 100644 --- a/lib/routes/lxixsxa/discography.ts +++ b/lib/routes/lxixsxa/discography.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/lxixsxa/information.ts b/lib/routes/lxixsxa/information.ts index 74a205c6265c..4967a765830b 100644 --- a/lib/routes/lxixsxa/information.ts +++ b/lib/routes/lxixsxa/information.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/m4/index.ts b/lib/routes/m4/index.ts index 32c3d62a7e30..f10b132ab153 100644 --- a/lib/routes/m4/index.ts +++ b/lib/routes/m4/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/maccms/index.ts b/lib/routes/maccms/index.ts index 8dddd1410996..597448ca8d90 100644 --- a/lib/routes/maccms/index.ts +++ b/lib/routes/maccms/index.ts @@ -5,9 +5,8 @@ import path from 'node:path'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; -import { getCurrentPath } from '@/utils/helpers'; -const render = (vod: Vod, link: string) => art(path.join(getCurrentPath(import.meta.url), 'templates', 'vod.art'), { vod, link }); +const render = (vod: Vod, link: string) => art(path.join(__dirname, 'templates/vod.art'), { vod, link }); export const route: Route = { path: '/:domain/:type?/:size?', diff --git a/lib/routes/magazinelib/latest-magazine.ts b/lib/routes/magazinelib/latest-magazine.ts index 192821d129c6..6f25d157bf71 100644 --- a/lib/routes/magazinelib/latest-magazine.ts +++ b/lib/routes/magazinelib/latest-magazine.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/manhuagui/subscribe.ts b/lib/routes/manhuagui/subscribe.ts index be218a614cdd..c958083fa264 100644 --- a/lib/routes/manhuagui/subscribe.ts +++ b/lib/routes/manhuagui/subscribe.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseRelativeDate } from '@/utils/parse-date'; diff --git a/lib/routes/manyvids/video.ts b/lib/routes/manyvids/video.ts index 51b8e86e630e..cc6d701e3b96 100644 --- a/lib/routes/manyvids/video.ts +++ b/lib/routes/manyvids/video.ts @@ -4,9 +4,6 @@ import cache from '@/utils/cache'; import { UserProfile, Videos } from './types'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; - -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/profile/vids/:uid', @@ -24,7 +21,7 @@ export const route: Route = { const getProfileById = (uid: string) => cache.tryGet(`manyvids:profile:${uid}`, () => ofetch(`https://www.manyvids.com/bff/profile/profiles/${uid}`)) as Promise; -const render = (data) => art(path.join(__dirname, 'templates', 'video.art'), data); +const render = (data) => art(path.join(__dirname, 'templates/video.art'), data); async function handler(ctx) { const { uid } = ctx.req.param(); diff --git a/lib/routes/mcmod/index.ts b/lib/routes/mcmod/index.ts index 91fbef4d962d..ee1bf460b7e1 100644 --- a/lib/routes/mcmod/index.ts +++ b/lib/routes/mcmod/index.ts @@ -6,9 +6,8 @@ import path from 'node:path'; import cache from '@/utils/cache'; import timezone from '@/utils/timezone'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; -const render = (mod) => art(path.join(getCurrentPath(import.meta.url), 'templates', 'mod.art'), { mod }); +const render = (mod) => art(path.join(__dirname, 'templates/mod.art'), { mod }); export const route: Route = { path: '/:type', diff --git a/lib/routes/mdpi/journal.ts b/lib/routes/mdpi/journal.ts index b1621c376d34..382ee41e07a1 100644 --- a/lib/routes/mdpi/journal.ts +++ b/lib/routes/mdpi/journal.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/mercari/util.ts b/lib/routes/mercari/util.ts index b42e722daccd..7efc28692aab 100644 --- a/lib/routes/mercari/util.ts +++ b/lib/routes/mercari/util.ts @@ -8,8 +8,6 @@ import { art } from '@/utils/render'; import path from 'node:path'; import { DataItem } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); const rootURL = 'https://api.mercari.jp/'; const rootProductURL = 'https://jp.mercari.com/item/'; const rootShopProductURL = 'https://jp.mercari.com/shops/product/'; diff --git a/lib/routes/metacritic/index.ts b/lib/routes/metacritic/index.ts index ba17895ac698..4b4db19be1b6 100644 --- a/lib/routes/metacritic/index.ts +++ b/lib/routes/metacritic/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/meteor/utils.ts b/lib/routes/meteor/utils.ts index 121fad291899..55a9529ee605 100644 --- a/lib/routes/meteor/utils.ts +++ b/lib/routes/meteor/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { art } from '@/utils/render'; import path from 'node:path'; diff --git a/lib/routes/mi/utils.ts b/lib/routes/mi/utils.ts index 2fc2c90d2753..99ea22646b99 100644 --- a/lib/routes/mi/utils.ts +++ b/lib/routes/mi/utils.ts @@ -1,14 +1,11 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { art } from '@/utils/render'; import dayjs from 'dayjs'; -import 'dayjs/locale/zh-cn'; -import localizedFormat from 'dayjs/plugin/localizedFormat'; -import timezone from 'dayjs/plugin/timezone'; -import utc from 'dayjs/plugin/utc'; +import 'dayjs/locale/zh-cn.js'; +import localizedFormat from 'dayjs/plugin/localizedFormat.js'; +import timezone from 'dayjs/plugin/timezone.js'; +import utc from 'dayjs/plugin/utc.js'; import path from 'node:path'; import { CrowdfundingData, CrowdfundingDetailData, CrowdfundingDetailInfo, CrowdfundingItem, CrowdfundingList, DataResponse } from './types'; diff --git a/lib/routes/mihoyo/bbs/follow-list.ts b/lib/routes/mihoyo/bbs/follow-list.ts index c1c6c33cadd8..d2d6e5d7b936 100644 --- a/lib/routes/mihoyo/bbs/follow-list.ts +++ b/lib/routes/mihoyo/bbs/follow-list.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/mihoyo/bbs/official.ts b/lib/routes/mihoyo/bbs/official.ts index a3121a2d88b9..48c28e90764e 100644 --- a/lib/routes/mihoyo/bbs/official.ts +++ b/lib/routes/mihoyo/bbs/official.ts @@ -4,9 +4,7 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import path from 'node:path'; import { parseDate } from '@/utils/parse-date'; -import { getCurrentPath } from '@/utils/helpers'; import logger from '@/utils/logger'; -const __dirname = getCurrentPath(import.meta.url); // 游戏id const GITS_MAP = { diff --git a/lib/routes/mihoyo/bbs/utils.ts b/lib/routes/mihoyo/bbs/utils.ts index 1e7a36781611..745c5c46c9a6 100644 --- a/lib/routes/mihoyo/bbs/utils.ts +++ b/lib/routes/mihoyo/bbs/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import path from 'node:path'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/mihoyo/ys/news.ts b/lib/routes/mihoyo/ys/news.ts index 30fb94ccfc8b..cf55c6e77d25 100644 --- a/lib/routes/mihoyo/ys/news.ts +++ b/lib/routes/mihoyo/ys/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/mindmeister/example.ts b/lib/routes/mindmeister/example.ts index 62a45c3f2806..842101642fd6 100644 --- a/lib/routes/mindmeister/example.ts +++ b/lib/routes/mindmeister/example.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/mingpao/index.ts b/lib/routes/mingpao/index.ts index b8f187884f80..f760205c61fc 100644 --- a/lib/routes/mingpao/index.ts +++ b/lib/routes/mingpao/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/missav/new.ts b/lib/routes/missav/new.ts index 45d07898600a..f3268f9e7339 100644 --- a/lib/routes/missav/new.ts +++ b/lib/routes/missav/new.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import ofetch from '@/utils/ofetch'; import * as cheerio from 'cheerio'; diff --git a/lib/routes/misskey/utils.ts b/lib/routes/misskey/utils.ts index e295da0749df..9ad087eb5986 100644 --- a/lib/routes/misskey/utils.ts +++ b/lib/routes/misskey/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/mittrchina/index.ts b/lib/routes/mittrchina/index.ts index 9a39fa15ed69..6f1421cfa240 100644 --- a/lib/routes/mittrchina/index.ts +++ b/lib/routes/mittrchina/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/modelscope/community.ts b/lib/routes/modelscope/community.ts index c48c92dc7759..c0db0a97713d 100644 --- a/lib/routes/modelscope/community.ts +++ b/lib/routes/modelscope/community.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; diff --git a/lib/routes/modelscope/datasets.ts b/lib/routes/modelscope/datasets.ts index 47a265ff9531..eae2c42948af 100644 --- a/lib/routes/modelscope/datasets.ts +++ b/lib/routes/modelscope/datasets.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/modelscope/studios.ts b/lib/routes/modelscope/studios.ts index 72382c389063..5262cf1e9a7f 100644 --- a/lib/routes/modelscope/studios.ts +++ b/lib/routes/modelscope/studios.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/modrinth/versions.ts b/lib/routes/modrinth/versions.ts index 3f851e43b7bb..97880bb29d7e 100644 --- a/lib/routes/modrinth/versions.ts +++ b/lib/routes/modrinth/versions.ts @@ -1,5 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; @@ -9,8 +8,6 @@ import MarkdownIt from 'markdown-it'; import type { Author, Project, Version } from '@/routes/modrinth/api'; import type { Context } from 'hono'; -const __dirname = getCurrentPath(import.meta.url); - const ofetch = _ofetch.create({ headers: { // https://docs.modrinth.com/#section/User-Agents diff --git a/lib/routes/mrdx/daily.ts b/lib/routes/mrdx/daily.ts index 6b63d1b96d12..e5861efe5e12 100644 --- a/lib/routes/mrdx/daily.ts +++ b/lib/routes/mrdx/daily.ts @@ -4,7 +4,7 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { getElementChildrenInnerText } from './utils'; import dayjs from 'dayjs'; -import utc from 'dayjs/plugin/utc'; +import utc from 'dayjs/plugin/utc.js'; dayjs.extend(utc); import got from '@/utils/got'; diff --git a/lib/routes/mydrivers/index.ts b/lib/routes/mydrivers/index.ts index 843e5b65380f..0f2abef41dcf 100644 --- a/lib/routes/mydrivers/index.ts +++ b/lib/routes/mydrivers/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/myfans/post.ts b/lib/routes/myfans/post.ts index fb1b6ea328eb..0a3ebefc15cb 100644 --- a/lib/routes/myfans/post.ts +++ b/lib/routes/myfans/post.ts @@ -3,9 +3,6 @@ import { parseDate } from '@/utils/parse-date'; import { showByUsername, getPostByAccountId, baseUrl } from './utils'; import path from 'node:path'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; - -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/user/:username', @@ -31,7 +28,7 @@ export const route: Route = { }; const render = (postImages, body) => - art(path.join(__dirname, 'templates', 'post.art'), { + art(path.join(__dirname, 'templates/post.art'), { postImages, body, }); diff --git a/lib/routes/myfigurecollection/activity.ts b/lib/routes/myfigurecollection/activity.ts index 6ccad02fac88..f09101c4dbb0 100644 --- a/lib/routes/myfigurecollection/activity.ts +++ b/lib/routes/myfigurecollection/activity.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/myfigurecollection/index.ts b/lib/routes/myfigurecollection/index.ts index 5abdeaad52e1..b2278b663321 100644 --- a/lib/routes/myfigurecollection/index.ts +++ b/lib/routes/myfigurecollection/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/mymusicsheet/usersheets.ts b/lib/routes/mymusicsheet/usersheets.ts index 50a2b8febd45..75d75c30a56f 100644 --- a/lib/routes/mymusicsheet/usersheets.ts +++ b/lib/routes/mymusicsheet/usersheets.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/natgeo/dailyphoto.ts b/lib/routes/natgeo/dailyphoto.ts index 88f2c5792d7b..c87253b2ad2a 100644 --- a/lib/routes/natgeo/dailyphoto.ts +++ b/lib/routes/natgeo/dailyphoto.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/nationalgeographic/latest-stories.ts b/lib/routes/nationalgeographic/latest-stories.ts index b87a60e0156b..fb29acb1e219 100644 --- a/lib/routes/nationalgeographic/latest-stories.ts +++ b/lib/routes/nationalgeographic/latest-stories.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/nautil/topics.ts b/lib/routes/nautil/topics.ts index 82cecd704ef8..ed714242f9dd 100644 --- a/lib/routes/nautil/topics.ts +++ b/lib/routes/nautil/topics.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; diff --git a/lib/routes/nber/common.ts b/lib/routes/nber/common.ts index fcf5c558c679..cf4789970d1e 100644 --- a/lib/routes/nber/common.ts +++ b/lib/routes/nber/common.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/ncc-cma/cmdp.ts b/lib/routes/ncc-cma/cmdp.ts index 9c0571a7d85e..6f38836c63ae 100644 --- a/lib/routes/ncc-cma/cmdp.ts +++ b/lib/routes/ncc-cma/cmdp.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/netflav/index.ts b/lib/routes/netflav/index.ts index e6eeffca1211..4de6e89ea115 100644 --- a/lib/routes/netflav/index.ts +++ b/lib/routes/netflav/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/news/xhsxw.ts b/lib/routes/news/xhsxw.ts index 9866e0c2aa76..bc80aee0e990 100644 --- a/lib/routes/news/xhsxw.ts +++ b/lib/routes/news/xhsxw.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/newzmz/util.ts b/lib/routes/newzmz/util.ts index 64ccce324bd1..a8fadfe2b4bc 100644 --- a/lib/routes/newzmz/util.ts +++ b/lib/routes/newzmz/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/nhentai/util.ts b/lib/routes/nhentai/util.ts index e592454045b4..6c068b9225c0 100644 --- a/lib/routes/nhentai/util.ts +++ b/lib/routes/nhentai/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { load } from 'cheerio'; import got from '@/utils/got'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/nhk/news-web-easy.ts b/lib/routes/nhk/news-web-easy.ts index 682aede4174b..85e3ad12d9af 100644 --- a/lib/routes/nhk/news-web-easy.ts +++ b/lib/routes/nhk/news-web-easy.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/nhk/news.ts b/lib/routes/nhk/news.ts index 7ab05259f447..4a2f8faa7378 100644 --- a/lib/routes/nhk/news.ts +++ b/lib/routes/nhk/news.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/nicovideo/utils.ts b/lib/routes/nicovideo/utils.ts index 10b92a697193..3e6c3f293db4 100644 --- a/lib/routes/nicovideo/utils.ts +++ b/lib/routes/nicovideo/utils.ts @@ -5,9 +5,6 @@ import cache from '@/utils/cache'; import { config } from '@/config'; import path from 'node:path'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; - -const __dirname = getCurrentPath(import.meta.url); export const getUserInfoById = (id: string) => cache.tryGet(`nicovideo:user:${id}`, () => ofetch(`https://embed.nicovideo.jp/users/${id}`)) as Promise; @@ -34,4 +31,4 @@ export const getUserVideosById = (id: string) => false ) as Promise; -export const renderVideo = (video: Essential, embed: boolean) => art(path.join(__dirname, 'templates', 'video.art'), { video, embed }); +export const renderVideo = (video: Essential, embed: boolean) => art(path.join(__dirname, 'templates/video.art'), { video, embed }); diff --git a/lib/routes/nikkei/news.ts b/lib/routes/nikkei/news.ts index c9e8a6722345..5b5fed324398 100644 --- a/lib/routes/nikkei/news.ts +++ b/lib/routes/nikkei/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/nintendo/direct.ts b/lib/routes/nintendo/direct.ts index ae8c7067ab0c..587d71edd137 100644 --- a/lib/routes/nintendo/direct.ts +++ b/lib/routes/nintendo/direct.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/nintendo/eshop-hk.ts b/lib/routes/nintendo/eshop-hk.ts index 5679f927b2e9..3c116630157b 100644 --- a/lib/routes/nintendo/eshop-hk.ts +++ b/lib/routes/nintendo/eshop-hk.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/nintendo/eshop-jp.ts b/lib/routes/nintendo/eshop-jp.ts index 4147d8fad820..70e85451e957 100644 --- a/lib/routes/nintendo/eshop-jp.ts +++ b/lib/routes/nintendo/eshop-jp.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/nintendo/eshop-us.ts b/lib/routes/nintendo/eshop-us.ts index 94fc1683d66f..322ff668bb86 100644 --- a/lib/routes/nintendo/eshop-us.ts +++ b/lib/routes/nintendo/eshop-us.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { art } from '@/utils/render'; import got from '@/utils/got'; diff --git a/lib/routes/nintendo/utils.ts b/lib/routes/nintendo/utils.ts index 7fa07bdddf23..8d87323d0410 100644 --- a/lib/routes/nintendo/utils.ts +++ b/lib/routes/nintendo/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { JSDOM } from 'jsdom'; @@ -8,8 +5,8 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; import dayjs from 'dayjs'; -import localizedFormat from 'dayjs/plugin/localizedFormat'; -import 'dayjs/locale/zh-cn'; +import localizedFormat from 'dayjs/plugin/localizedFormat.js'; +import 'dayjs/locale/zh-cn.js'; dayjs.extend(localizedFormat); function nuxtReader(data) { diff --git a/lib/routes/njnu/jwc/jwc.ts b/lib/routes/njnu/jwc/jwc.ts index 00b65edc37a6..5de9a78d109a 100644 --- a/lib/routes/njnu/jwc/jwc.ts +++ b/lib/routes/njnu/jwc/jwc.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -import util from './utils'; +import { ProcessFeed } from './utils'; export const route: Route = { path: '/jwc/:type', @@ -55,7 +55,7 @@ async function handler(ctx) { const list = $('.list_txt a').get(); - const result = await util.ProcessFeed(list, cache); + const result = await ProcessFeed(list, cache); return { title: '南京师范大学教务处 - ' + title, diff --git a/lib/routes/nmtv/column.ts b/lib/routes/nmtv/column.ts index 5a9c8589a79d..8545e979bf05 100644 --- a/lib/routes/nmtv/column.ts +++ b/lib/routes/nmtv/column.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/notefolio/search.ts b/lib/routes/notefolio/search.ts index f9bcbb70059a..1ce01eac1381 100644 --- a/lib/routes/notefolio/search.ts +++ b/lib/routes/notefolio/search.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); // 导入所需模组 import got from '@/utils/got'; // 自订的 got diff --git a/lib/routes/npm/package.ts b/lib/routes/npm/package.ts index 9f2395ebede5..15b3f1b4aef1 100644 --- a/lib/routes/npm/package.ts +++ b/lib/routes/npm/package.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import ofetch from '@/utils/ofetch'; import { art } from '@/utils/render'; diff --git a/lib/routes/nytimes/daily-briefing-chinese.ts b/lib/routes/nytimes/daily-briefing-chinese.ts index c5f3078ed83d..7c4261d7968c 100644 --- a/lib/routes/nytimes/daily-briefing-chinese.ts +++ b/lib/routes/nytimes/daily-briefing-chinese.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/oceanengine/arithmetic-index.ts b/lib/routes/oceanengine/arithmetic-index.ts index d276793fd3ef..b93e1cf5c303 100644 --- a/lib/routes/oceanengine/arithmetic-index.ts +++ b/lib/routes/oceanengine/arithmetic-index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import dayjs from 'dayjs'; @@ -74,7 +72,7 @@ const searchLinkUrls = (keyword) => [ const searchLinkNames = ['今日热榜', '百度', '谷歌', '知乎', '微博', '抖音', '头条']; const createContent = (keyword, queryList, queryListText) => - art(path.join(__dirname, 'templates', 'content.art'), { + art(path.join(__dirname, 'templates/content.art'), { keyword, queryListText, queries: queryList.map((query) => ({ diff --git a/lib/routes/oeeee/app/channel.ts b/lib/routes/oeeee/app/channel.ts index d08281ea85aa..2c8bd0809d61 100644 --- a/lib/routes/oeeee/app/channel.ts +++ b/lib/routes/oeeee/app/channel.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/oeeee/app/reporter.ts b/lib/routes/oeeee/app/reporter.ts index 66e5f5d0e381..d02180ca01d5 100644 --- a/lib/routes/oeeee/app/reporter.ts +++ b/lib/routes/oeeee/app/reporter.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/oeeee/web.ts b/lib/routes/oeeee/web.ts index 522a38ba2030..1e55e33c0521 100644 --- a/lib/routes/oeeee/web.ts +++ b/lib/routes/oeeee/web.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/oncc/index.ts b/lib/routes/oncc/index.ts index 5e4d2d6b8d69..c93c3f6e2ebf 100644 --- a/lib/routes/oncc/index.ts +++ b/lib/routes/oncc/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/oncc/money18.ts b/lib/routes/oncc/money18.ts index aa0a96c88fac..0894c88f3c43 100644 --- a/lib/routes/oncc/money18.ts +++ b/lib/routes/oncc/money18.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/onet/news.ts b/lib/routes/onet/news.ts index ee2630e80097..45cc597df223 100644 --- a/lib/routes/onet/news.ts +++ b/lib/routes/onet/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import parser from '@/utils/rss-parser'; diff --git a/lib/routes/onet/utils.ts b/lib/routes/onet/utils.ts index c33597d2001a..4188281d0a89 100644 --- a/lib/routes/onet/utils.ts +++ b/lib/routes/onet/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import path from 'node:path'; diff --git a/lib/routes/openai/chatgpt.ts b/lib/routes/openai/chatgpt.ts index 15aba9dde7dd..7a43cae0809b 100644 --- a/lib/routes/openai/chatgpt.ts +++ b/lib/routes/openai/chatgpt.ts @@ -5,7 +5,7 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import { config } from '@/config'; -import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'; +import isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'; dayjs.extend(isSameOrBefore); export const route: Route = { diff --git a/lib/routes/openai/common.ts b/lib/routes/openai/common.ts index 75a1b8906334..d7b7889b6cce 100644 --- a/lib/routes/openai/common.ts +++ b/lib/routes/openai/common.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/openrice/chart.ts b/lib/routes/openrice/chart.ts index 30a4a9377eb0..c56026d3d165 100644 --- a/lib/routes/openrice/chart.ts +++ b/lib/routes/openrice/chart.ts @@ -3,8 +3,6 @@ import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); const baseUrl = 'https://www.openrice.com'; export const route: Route = { diff --git a/lib/routes/openrice/offers.ts b/lib/routes/openrice/offers.ts index 4d9919849180..a41b49290dd9 100644 --- a/lib/routes/openrice/offers.ts +++ b/lib/routes/openrice/offers.ts @@ -2,8 +2,6 @@ import { Route } from '@/types'; import ofetch from '@/utils/ofetch'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); const baseUrl = 'https://www.openrice.com'; export const route: Route = { diff --git a/lib/routes/openrice/promos.ts b/lib/routes/openrice/promos.ts index d0d9b7b2bb47..161fbefab848 100644 --- a/lib/routes/openrice/promos.ts +++ b/lib/routes/openrice/promos.ts @@ -3,8 +3,6 @@ import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); const baseUrl = 'https://www.openrice.com'; export const route: Route = { diff --git a/lib/routes/orcid/index.ts b/lib/routes/orcid/index.ts index 678db278006d..dcad980e6c58 100644 --- a/lib/routes/orcid/index.ts +++ b/lib/routes/orcid/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/oreno3d/main.ts b/lib/routes/oreno3d/main.ts index b43a60c8438a..baf858e2fb0f 100644 --- a/lib/routes/oreno3d/main.ts +++ b/lib/routes/oreno3d/main.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/oschina/column.ts b/lib/routes/oschina/column.ts index 7a72c2881a9d..65c3b7971c9d 100644 --- a/lib/routes/oschina/column.ts +++ b/lib/routes/oschina/column.ts @@ -7,13 +7,10 @@ import { type DataItem, type Route, type Data, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { id } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '10', 10); diff --git a/lib/routes/oschina/event.ts b/lib/routes/oschina/event.ts index 91ddd19bc7fc..755c5e0e5cf8 100644 --- a/lib/routes/oschina/event.ts +++ b/lib/routes/oschina/event.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -10,8 +9,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { category = 'latest' } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/oshwhub/explore.ts b/lib/routes/oshwhub/explore.ts index a962b81c88b7..702e18d669da 100644 --- a/lib/routes/oshwhub/explore.ts +++ b/lib/routes/oshwhub/explore.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/osu/beatmaps/latest-ranked.ts b/lib/routes/osu/beatmaps/latest-ranked.ts index 9462c0fd102e..79c4b38f0306 100644 --- a/lib/routes/osu/beatmaps/latest-ranked.ts +++ b/lib/routes/osu/beatmaps/latest-ranked.ts @@ -6,8 +6,6 @@ import { parseDate } from '@/utils/parse-date'; import cache from '@/utils/cache'; import { config } from '@/config'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); const actualParametersDescTable = ` | Name | Default | Description | diff --git a/lib/routes/otobanana/utils.ts b/lib/routes/otobanana/utils.ts index b27a02aaf712..6138b14ab25a 100644 --- a/lib/routes/otobanana/utils.ts +++ b/lib/routes/otobanana/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/oup/index.ts b/lib/routes/oup/index.ts index 278efc5927b2..4c4ce2b6eec9 100644 --- a/lib/routes/oup/index.ts +++ b/lib/routes/oup/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/papers/category.ts b/lib/routes/papers/category.ts index cac50309da09..9a980e050b41 100644 --- a/lib/routes/papers/category.ts +++ b/lib/routes/papers/category.ts @@ -1,7 +1,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -10,8 +9,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { id } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '50', 10); diff --git a/lib/routes/papers/query.ts b/lib/routes/papers/query.ts index 57eb4be9c094..0212638a41e8 100644 --- a/lib/routes/papers/query.ts +++ b/lib/routes/papers/query.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/parliament.uk/petitions.ts b/lib/routes/parliament.uk/petitions.ts index 95eec47353c9..31110b7cd794 100644 --- a/lib/routes/parliament.uk/petitions.ts +++ b/lib/routes/parliament.uk/petitions.ts @@ -4,13 +4,10 @@ import { type Context } from 'hono'; import { load, type CheerioAPI } from 'cheerio'; import { type DataItem, type Route, type Data, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import ofetch from '@/utils/ofetch'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { state = 'all' } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '50', 10); diff --git a/lib/routes/patagonia/new-arrivals.ts b/lib/routes/patagonia/new-arrivals.ts index 09a1b7a50065..afd57b3526c0 100644 --- a/lib/routes/patagonia/new-arrivals.ts +++ b/lib/routes/patagonia/new-arrivals.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/patreon/feed.ts b/lib/routes/patreon/feed.ts index faf814be539c..286859addd27 100644 --- a/lib/routes/patreon/feed.ts +++ b/lib/routes/patreon/feed.ts @@ -6,12 +6,9 @@ import ofetch from '@/utils/ofetch'; import * as cheerio from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; import { config } from '@/config'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: '/:creator', categories: ['new-media'], diff --git a/lib/routes/penguin-random-house/utils.ts b/lib/routes/penguin-random-house/utils.ts index 9e8c1b45d0ee..e4cb1ab44b46 100644 --- a/lib/routes/penguin-random-house/utils.ts +++ b/lib/routes/penguin-random-house/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/phoronix/index.ts b/lib/routes/phoronix/index.ts index 2893cd06de77..c1978bc78be6 100644 --- a/lib/routes/phoronix/index.ts +++ b/lib/routes/phoronix/index.ts @@ -4,8 +4,8 @@ import parser from '@/utils/rss-parser'; import { load } from 'cheerio'; import got from '@/utils/got'; import dayjs from 'dayjs'; -import utc from 'dayjs/plugin/utc'; -import timezone from 'dayjs/plugin/timezone'; +import utc from 'dayjs/plugin/utc.js'; +import timezone from 'dayjs/plugin/timezone.js'; dayjs.extend(utc); dayjs.extend(timezone); diff --git a/lib/routes/picnob/user.ts b/lib/routes/picnob/user.ts index d3fced83bfa9..d2ae28b244cf 100644 --- a/lib/routes/picnob/user.ts +++ b/lib/routes/picnob/user.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/picuki/profile.ts b/lib/routes/picuki/profile.ts index a19cca234102..c39312358051 100644 --- a/lib/routes/picuki/profile.ts +++ b/lib/routes/picuki/profile.ts @@ -1,6 +1,4 @@ import { DataItem, Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; diff --git a/lib/routes/pikabu/utils.ts b/lib/routes/pikabu/utils.ts index 1173c01b5e3e..4bbb4c2439f8 100644 --- a/lib/routes/pikabu/utils.ts +++ b/lib/routes/pikabu/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import path from 'node:path'; diff --git a/lib/routes/pixabay/search.ts b/lib/routes/pixabay/search.ts index 199287609df6..5a05c17eefa7 100644 --- a/lib/routes/pixabay/search.ts +++ b/lib/routes/pixabay/search.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/pnas/index.ts b/lib/routes/pnas/index.ts index f66160ae02b7..1e3516371c89 100644 --- a/lib/routes/pnas/index.ts +++ b/lib/routes/pnas/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; @@ -90,7 +88,7 @@ async function handler(ctx) { item.category = [...keywords, topic]; item.author = PNASdataLayer.page.pageInfo.author; item.doi = PNASdataLayer.page.pageInfo.DOI; - item.description = art(path.join(__dirname, 'templates', 'article.art'), { + item.description = art(path.join(__dirname, 'templates/article.art'), { access: PNASdataLayer.user.access === 'yes', // abstracts: $('#abstracts .core-container').html(), diff --git a/lib/routes/podwise/episodes.ts b/lib/routes/podwise/episodes.ts index 6066427cd940..5a4ac23a3538 100644 --- a/lib/routes/podwise/episodes.ts +++ b/lib/routes/podwise/episodes.ts @@ -5,7 +5,7 @@ import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import dayjs from 'dayjs'; -import duration from 'dayjs/plugin/duration'; +import duration from 'dayjs/plugin/duration.js'; dayjs.extend(duration); export const route: Route = { diff --git a/lib/routes/pornhub/utils.ts b/lib/routes/pornhub/utils.ts index e94989b2462a..48d996ac25b5 100644 --- a/lib/routes/pornhub/utils.ts +++ b/lib/routes/pornhub/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import path from 'node:path'; import { parseRelativeDate } from '@/utils/parse-date'; diff --git a/lib/routes/producthunt/today.ts b/lib/routes/producthunt/today.ts index 02d59d9720c4..04d8ebc7212a 100644 --- a/lib/routes/producthunt/today.ts +++ b/lib/routes/producthunt/today.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/ps/monthly-games.ts b/lib/routes/ps/monthly-games.ts index 277139be1ef6..175a894f056d 100644 --- a/lib/routes/ps/monthly-games.ts +++ b/lib/routes/ps/monthly-games.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/psyche/utils.ts b/lib/routes/psyche/utils.ts index 61bd61c46e8e..52cba2aa3779 100644 --- a/lib/routes/psyche/utils.ts +++ b/lib/routes/psyche/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; diff --git a/lib/routes/pts/curations.ts b/lib/routes/pts/curations.ts index 07b8a00cc4b6..372090843df6 100644 --- a/lib/routes/pts/curations.ts +++ b/lib/routes/pts/curations.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/pts/index.ts b/lib/routes/pts/index.ts index 9a52bd5aa70f..ddd49bfc3313 100644 --- a/lib/routes/pts/index.ts +++ b/lib/routes/pts/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; diff --git a/lib/routes/pts/live.ts b/lib/routes/pts/live.ts index 26cbd184d18f..5ecc57d8bba0 100644 --- a/lib/routes/pts/live.ts +++ b/lib/routes/pts/live.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/pts/projects.ts b/lib/routes/pts/projects.ts index 012f5dc3ddef..9452b8ac0525 100644 --- a/lib/routes/pts/projects.ts +++ b/lib/routes/pts/projects.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/pubmed/trending.ts b/lib/routes/pubmed/trending.ts index 274bd76a0f12..5f114f74ef21 100644 --- a/lib/routes/pubmed/trending.ts +++ b/lib/routes/pubmed/trending.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/qidian/author.ts b/lib/routes/qidian/author.ts index cb21a69d6ae9..ec9a1a6f14f0 100644 --- a/lib/routes/qidian/author.ts +++ b/lib/routes/qidian/author.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/qoo-app/apps/comment.ts b/lib/routes/qoo-app/apps/comment.ts index a90d74956b59..d8e13ba9259f 100644 --- a/lib/routes/qoo-app/apps/comment.ts +++ b/lib/routes/qoo-app/apps/comment.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/qoo-app/notes/note.ts b/lib/routes/qoo-app/notes/note.ts index d4eaf7feb765..273e5fadc4cd 100644 --- a/lib/routes/qoo-app/notes/note.ts +++ b/lib/routes/qoo-app/notes/note.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/qoo-app/user/app-comment.ts b/lib/routes/qoo-app/user/app-comment.ts index 2034bb2272b9..83ecdfece74e 100644 --- a/lib/routes/qoo-app/user/app-comment.ts +++ b/lib/routes/qoo-app/user/app-comment.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/qq/ac/utils.ts b/lib/routes/qq/ac/utils.ts index ae2aa424586d..62205ac2520a 100644 --- a/lib/routes/qq/ac/utils.ts +++ b/lib/routes/qq/ac/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/qq/fact/index.ts b/lib/routes/qq/fact/index.ts index 00c0dc677509..67c45825e127 100644 --- a/lib/routes/qq/fact/index.ts +++ b/lib/routes/qq/fact/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/questmobile/report.ts b/lib/routes/questmobile/report.ts index 7b5ff1e0eb0a..144766812fd7 100644 --- a/lib/routes/questmobile/report.ts +++ b/lib/routes/questmobile/report.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/qweather/3days.ts b/lib/routes/qweather/3days.ts index 7602d89d4939..19511aab564e 100644 --- a/lib/routes/qweather/3days.ts +++ b/lib/routes/qweather/3days.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/qweather/now.ts b/lib/routes/qweather/now.ts index 4233562d7fcc..9f3a8bf3b3a1 100644 --- a/lib/routes/qweather/now.ts +++ b/lib/routes/qweather/now.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/radio/album.ts b/lib/routes/radio/album.ts index babb63ded8b5..37f6894a7177 100644 --- a/lib/routes/radio/album.ts +++ b/lib/routes/radio/album.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/radio/index.ts b/lib/routes/radio/index.ts index 27135ceee783..a0be7ef160bf 100644 --- a/lib/routes/radio/index.ts +++ b/lib/routes/radio/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/radio/zhibo.ts b/lib/routes/radio/zhibo.ts index f5d271cf81f8..85c17eae8c0f 100644 --- a/lib/routes/radio/zhibo.ts +++ b/lib/routes/radio/zhibo.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/raspberrypi/magazine.ts b/lib/routes/raspberrypi/magazine.ts index 77401ecbc717..39d9264e414c 100644 --- a/lib/routes/raspberrypi/magazine.ts +++ b/lib/routes/raspberrypi/magazine.ts @@ -2,7 +2,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -10,8 +9,6 @@ import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '12', 10); diff --git a/lib/routes/rawkuma/manga.ts b/lib/routes/rawkuma/manga.ts index 1b8d71c8564f..91e7df39727d 100644 --- a/lib/routes/rawkuma/manga.ts +++ b/lib/routes/rawkuma/manga.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/readhub/index.ts b/lib/routes/readhub/index.ts index b6a0c257c3df..459db1f77424 100644 --- a/lib/routes/readhub/index.ts +++ b/lib/routes/readhub/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/readhub/util.ts b/lib/routes/readhub/util.ts index fabad327a88e..a97f45548485 100644 --- a/lib/routes/readhub/util.ts +++ b/lib/routes/readhub/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/reuters/common.ts b/lib/routes/reuters/common.ts index 22c9bab3b795..79f07faa8c04 100644 --- a/lib/routes/reuters/common.ts +++ b/lib/routes/reuters/common.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/routledge/book-series.ts b/lib/routes/routledge/book-series.ts index 61f462a016db..78bb418e6301 100644 --- a/lib/routes/routledge/book-series.ts +++ b/lib/routes/routledge/book-series.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/rsc/journal.ts b/lib/routes/rsc/journal.ts index 7354846d374d..7b1e924d0507 100644 --- a/lib/routes/rsc/journal.ts +++ b/lib/routes/rsc/journal.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/saraba1st/digest.ts b/lib/routes/saraba1st/digest.ts index 56acfd5b6388..3a9e12433cb5 100644 --- a/lib/routes/saraba1st/digest.ts +++ b/lib/routes/saraba1st/digest.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/science/cover.ts b/lib/routes/science/cover.ts index 732d84efa886..bc5c8b5bbae6 100644 --- a/lib/routes/science/cover.ts +++ b/lib/routes/science/cover.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); // journals form AAAS publishing group // diff --git a/lib/routes/science/utils.ts b/lib/routes/science/utils.ts index 686e9b47b4b1..a49e54526da1 100644 --- a/lib/routes/science/utils.ts +++ b/lib/routes/science/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { load } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; diff --git a/lib/routes/sciencedirect/call-for-paper.ts b/lib/routes/sciencedirect/call-for-paper.ts index b63e0df9cff6..290a9eb17c30 100644 --- a/lib/routes/sciencedirect/call-for-paper.ts +++ b/lib/routes/sciencedirect/call-for-paper.ts @@ -1,10 +1,8 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/call-for-paper/:subject', diff --git a/lib/routes/scientificamerican/podcast.ts b/lib/routes/scientificamerican/podcast.ts index c82c1bc214fd..40a95997b8de 100644 --- a/lib/routes/scientificamerican/podcast.ts +++ b/lib/routes/scientificamerican/podcast.ts @@ -7,13 +7,10 @@ import { type DataItem, type Route, type Data, ViewType } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { id } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '12', 10); diff --git a/lib/routes/sctv/programme.ts b/lib/routes/sctv/programme.ts index 4115037f9d6f..e156f8923394 100644 --- a/lib/routes/sctv/programme.ts +++ b/lib/routes/sctv/programme.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/seekingalpha/index.ts b/lib/routes/seekingalpha/index.ts index 291d3ef3cd0f..dbc225a09ede 100644 --- a/lib/routes/seekingalpha/index.ts +++ b/lib/routes/seekingalpha/index.ts @@ -3,9 +3,7 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; -import { getCurrentPath } from '@/utils/helpers'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); const baseUrl = 'https://seekingalpha.com'; diff --git a/lib/routes/sensortower/blog.ts b/lib/routes/sensortower/blog.ts index bec9f9c2c1a5..91778f2800b8 100644 --- a/lib/routes/sensortower/blog.ts +++ b/lib/routes/sensortower/blog.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/shcstheatre/programs.ts b/lib/routes/shcstheatre/programs.ts index 57fc8ff3083d..90ddc22570c2 100644 --- a/lib/routes/shcstheatre/programs.ts +++ b/lib/routes/shcstheatre/programs.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/shiep/index.ts b/lib/routes/shiep/index.ts index a962a7c6522d..83af844bf376 100644 --- a/lib/routes/shiep/index.ts +++ b/lib/routes/shiep/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/shmtu/portal.ts b/lib/routes/shmtu/portal.ts index fd37cf692385..76f2236371fc 100644 --- a/lib/routes/shmtu/portal.ts +++ b/lib/routes/shmtu/portal.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/shoac/recent-show.ts b/lib/routes/shoac/recent-show.ts index 5416a88fdeca..a6b43f4b134b 100644 --- a/lib/routes/shoac/recent-show.ts +++ b/lib/routes/shoac/recent-show.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/shuiguopai/index.ts b/lib/routes/shuiguopai/index.ts index 1e2faa9a3920..e59185fa8379 100644 --- a/lib/routes/shuiguopai/index.ts +++ b/lib/routes/shuiguopai/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/simpleinfo/index.ts b/lib/routes/simpleinfo/index.ts index f091999e41df..414d4b503b11 100644 --- a/lib/routes/simpleinfo/index.ts +++ b/lib/routes/simpleinfo/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/sina/utils.ts b/lib/routes/sina/utils.ts index e1280dabcbbe..2251c8f004e2 100644 --- a/lib/routes/sina/utils.ts +++ b/lib/routes/sina/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/sinchew/index.ts b/lib/routes/sinchew/index.ts index f4c1726ffffb..8e8e611147d9 100644 --- a/lib/routes/sinchew/index.ts +++ b/lib/routes/sinchew/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; diff --git a/lib/routes/sjtu/tongqu/activity.ts b/lib/routes/sjtu/tongqu/activity.ts index 890ffbac93d8..e5f0490bfcb1 100644 --- a/lib/routes/sjtu/tongqu/activity.ts +++ b/lib/routes/sjtu/tongqu/activity.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/skeb/utils.ts b/lib/routes/skeb/utils.ts index bb8275ed2c65..41d822ca4bf4 100644 --- a/lib/routes/skeb/utils.ts +++ b/lib/routes/skeb/utils.ts @@ -4,9 +4,6 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; - -const __dirname = getCurrentPath(import.meta.url); export const baseUrl = 'https://skeb.jp'; diff --git a/lib/routes/snowpeak/us-new-arrivals.ts b/lib/routes/snowpeak/us-new-arrivals.ts index 9ebb56f2c3b9..6b88744d561c 100644 --- a/lib/routes/snowpeak/us-new-arrivals.ts +++ b/lib/routes/snowpeak/us-new-arrivals.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/sogou/search.ts b/lib/routes/sogou/search.ts index 5df85d561205..6b2918069c4f 100644 --- a/lib/routes/sogou/search.ts +++ b/lib/routes/sogou/search.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/sohu/mp.ts b/lib/routes/sohu/mp.ts index 865c0f653cbf..020cef62f6d2 100644 --- a/lib/routes/sohu/mp.ts +++ b/lib/routes/sohu/mp.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/southcn/nfapp/column.ts b/lib/routes/southcn/nfapp/column.ts index 10f4d8cbb7b3..385a3ba63d04 100644 --- a/lib/routes/southcn/nfapp/column.ts +++ b/lib/routes/southcn/nfapp/column.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/southcn/nfapp/reporter.ts b/lib/routes/southcn/nfapp/reporter.ts index 4adb4401d595..2d69ed61dacf 100644 --- a/lib/routes/southcn/nfapp/reporter.ts +++ b/lib/routes/southcn/nfapp/reporter.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/spankbang/new-videos.ts b/lib/routes/spankbang/new-videos.ts index 182de368a2a0..f5cb4dd78135 100644 --- a/lib/routes/spankbang/new-videos.ts +++ b/lib/routes/spankbang/new-videos.ts @@ -1,5 +1,4 @@ import { Data, Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import puppeteer from '@/utils/puppeteer'; import * as cheerio from 'cheerio'; @@ -9,7 +8,6 @@ import { config } from '@/config'; import logger from '@/utils/logger'; import cache from '@/utils/cache'; -const __dirname = getCurrentPath(import.meta.url); const render = (data) => art(path.join(__dirname, 'templates/video.art'), data); const handler = async () => { diff --git a/lib/routes/springer/journal.ts b/lib/routes/springer/journal.ts index e70cf16db584..98e404b6d66d 100644 --- a/lib/routes/springer/journal.ts +++ b/lib/routes/springer/journal.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/sse/inquire.ts b/lib/routes/sse/inquire.ts index 43882c2c37de..fbc2cc9f9973 100644 --- a/lib/routes/sse/inquire.ts +++ b/lib/routes/sse/inquire.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/sse/renewal.ts b/lib/routes/sse/renewal.ts index ab3d6150c081..12155e5544d3 100644 --- a/lib/routes/sse/renewal.ts +++ b/lib/routes/sse/renewal.ts @@ -1,14 +1,12 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; import dayjs from 'dayjs'; -import localizedFormat from 'dayjs/plugin/localizedFormat'; -import 'dayjs/locale/zh-cn'; +import localizedFormat from 'dayjs/plugin/localizedFormat.js'; +import 'dayjs/locale/zh-cn.js'; dayjs.extend(localizedFormat); const currStatusName = ['全部', '已受理', '已询问', '通过', '未通过', '提交注册', '补充审核', '注册结果', '中止', '终止']; diff --git a/lib/routes/ssm/news.ts b/lib/routes/ssm/news.ts index d2da91ffd9bc..5d9b3fc338a0 100644 --- a/lib/routes/ssm/news.ts +++ b/lib/routes/ssm/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/stdaily/digitalpaper.ts b/lib/routes/stdaily/digitalpaper.ts index edc2389f12f0..faf5857035c7 100644 --- a/lib/routes/stdaily/digitalpaper.ts +++ b/lib/routes/stdaily/digitalpaper.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import path from 'node:path'; diff --git a/lib/routes/steam/appcommunityfeed.ts b/lib/routes/steam/appcommunityfeed.ts index 8c16bf0ad29d..44faf44ed038 100644 --- a/lib/routes/steam/appcommunityfeed.ts +++ b/lib/routes/steam/appcommunityfeed.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import ofetch from '@/utils/ofetch'; import { art } from '@/utils/render'; diff --git a/lib/routes/steam/curator.ts b/lib/routes/steam/curator.ts index a99329bc54ed..ef109ff3f483 100644 --- a/lib/routes/steam/curator.ts +++ b/lib/routes/steam/curator.ts @@ -2,12 +2,9 @@ import { Route } from '@/types'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import { getCurrentPath } from '@/utils/helpers'; import path from 'node:path'; import { art } from '@/utils/render'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: '/curator/:id/:routeParams?', categories: ['game'], diff --git a/lib/routes/steam/workshop-search.ts b/lib/routes/steam/workshop-search.ts index e8dee0b01fbd..a4bf9ce8bb41 100644 --- a/lib/routes/steam/workshop-search.ts +++ b/lib/routes/steam/workshop-search.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; diff --git a/lib/routes/storyfm/episodes.ts b/lib/routes/storyfm/episodes.ts index d5bad3cf6c19..d5615e4c0f8b 100644 --- a/lib/routes/storyfm/episodes.ts +++ b/lib/routes/storyfm/episodes.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/straitstimes/index.ts b/lib/routes/straitstimes/index.ts index f0995231902f..a72c26440371 100644 --- a/lib/routes/straitstimes/index.ts +++ b/lib/routes/straitstimes/index.ts @@ -2,7 +2,6 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { getCurrentPath } from '@/utils/helpers'; import path from 'node:path'; import { art } from '@/utils/render'; @@ -62,7 +61,6 @@ async function handler(ctx) { const section = ctx.req.param('section') ? ctx.req.param('section').toLowerCase() : undefined; const apiKey = 'T9XUJM9rAZoLOd2CAx2wCBSTrm3xoyPw'; const platform = 'iosflex'; - const __dirname = getCurrentPath(import.meta.url); let feed; const response = await got({ method: 'get', diff --git a/lib/routes/surfshark/blog.ts b/lib/routes/surfshark/blog.ts index ce381b04a9b3..8122bf07c2c2 100644 --- a/lib/routes/surfshark/blog.ts +++ b/lib/routes/surfshark/blog.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/swjtu/utils.ts b/lib/routes/swjtu/utils.ts index e6ed5e47326b..779f4a7d575b 100644 --- a/lib/routes/swjtu/utils.ts +++ b/lib/routes/swjtu/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/syosetu/ranking-isekai.ts b/lib/routes/syosetu/ranking-isekai.ts index 09f05cd51bed..ddabc2470185 100644 --- a/lib/routes/syosetu/ranking-isekai.ts +++ b/lib/routes/syosetu/ranking-isekai.ts @@ -2,13 +2,10 @@ import { Data, DataItem } from '@/types'; import { NarouNovelFetch, SearchBuilder, SearchParams, BigGenre } from 'narou'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import { Join } from 'narou/util/type'; import { RankingPeriod, NovelType, periodToJapanese, novelTypeToJapanese, periodToOrder, periodToPointField, IsekaiCategory, isekaiCategoryToJapanese } from './types/ranking'; -const __dirname = getCurrentPath(import.meta.url); - export function parseIsekaiRankingType(type: string): { period: RankingPeriod; category: IsekaiCategory; novelType: NovelType } { const [periodStr, categoryStr, novelTypeStr = NovelType.TOTAL] = type.split('_'); @@ -77,7 +74,7 @@ export async function handleIsekaiRanking(type: string, limit: number): Promise< .map((novel, index) => ({ title: `#${index + 1} ${novel.title}`, link: `https://ncode.syosetu.com/${String(novel.ncode).toLowerCase()}`, - description: art(path.join(__dirname, 'templates', 'description.art'), { + description: art(path.join(__dirname, 'templates/description.art'), { novel, }), author: novel.writer, diff --git a/lib/routes/syosetu/ranking-r18.ts b/lib/routes/syosetu/ranking-r18.ts index bae375da5d4c..cc09f0be3823 100644 --- a/lib/routes/syosetu/ranking-r18.ts +++ b/lib/routes/syosetu/ranking-r18.ts @@ -4,11 +4,8 @@ import path from 'node:path'; import { Context } from 'hono'; import { SearchBuilderR18, SearchParams, NarouNovelFetch } from 'narou'; import InvalidParameterError from '@/errors/types/invalid-parameter'; -import { getCurrentPath } from '@/utils/helpers'; import { RankingPeriod, periodToJapanese, novelTypeToJapanese, periodToOrder, NovelType, SyosetuSub, syosetuSubToJapanese, syosetuSubToNocgenre } from './types/ranking-r18'; -const __dirname = getCurrentPath(import.meta.url); - /** * Implementation of "Syosetu" R18 Rankings * @@ -176,7 +173,7 @@ async function handler(ctx: Context): Promise { const items = result.values.map((novel, index) => ({ title: `#${index + 1} ${novel.title}`, link: `https://novel18.syosetu.com/${String(novel.ncode).toLowerCase()}`, - description: art(path.join(__dirname, 'templates', 'description.art'), { + description: art(path.join(__dirname, 'templates/description.art'), { novel, }), author: novel.writer, diff --git a/lib/routes/syosetu/ranking.ts b/lib/routes/syosetu/ranking.ts index 2c91406bfa59..7683a5074d77 100644 --- a/lib/routes/syosetu/ranking.ts +++ b/lib/routes/syosetu/ranking.ts @@ -4,12 +4,9 @@ import path from 'node:path'; import { Context } from 'hono'; import { Genre, SearchBuilder, SearchParams, NarouNovelFetch, GenreNotation } from 'narou'; import InvalidParameterError from '@/errors/types/invalid-parameter'; -import { getCurrentPath } from '@/utils/helpers'; import { handleIsekaiRanking } from './ranking-isekai'; import { RankingPeriod, periodToJapanese, novelTypeToJapanese, periodToOrder, RankingType, NovelType, isekaiCategoryToJapanese, IsekaiCategory } from './types/ranking'; -const __dirname = getCurrentPath(import.meta.url); - const getParameters = () => { // Generate ranking type options const rankingTypeOptions = [ @@ -269,7 +266,7 @@ async function handler(ctx: Context): Promise { const items = result.values.map((novel, index) => ({ title: `#${index + 1} ${novel.title}`, link: `https://ncode.syosetu.com/${String(novel.ncode).toLowerCase()}`, - description: art(path.join(__dirname, 'templates', 'description.art'), { + description: art(path.join(__dirname, 'templates/description.art'), { novel, }), author: novel.writer, diff --git a/lib/routes/syosetu/search.ts b/lib/routes/syosetu/search.ts index 676c601057d1..194f506c925a 100644 --- a/lib/routes/syosetu/search.ts +++ b/lib/routes/syosetu/search.ts @@ -8,9 +8,6 @@ import { Join } from 'narou/util/type'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import { SyosetuSub, NarouSearchParams, syosetuSubToJapanese } from './types/search'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: '/search/:sub/:query', categories: ['reading'], @@ -134,7 +131,7 @@ async function handler(ctx: Context): Promise { const items = result.values.map((novel) => ({ title: novel.title, link: `https://${isGeneral(sub) ? 'ncode' : 'novel18'}.syosetu.com/${String(novel.ncode).toLowerCase()}`, - description: art(path.join(__dirname, 'templates', 'description.art'), { + description: art(path.join(__dirname, 'templates/description.art'), { novel, genreText: GenreNotation[novel.genre], }), diff --git a/lib/routes/szse/inquire.ts b/lib/routes/szse/inquire.ts index f45fe99d126b..70d19387c093 100644 --- a/lib/routes/szse/inquire.ts +++ b/lib/routes/szse/inquire.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/szse/projectdynamic.ts b/lib/routes/szse/projectdynamic.ts index 3ad17deab2b9..3660a9c2b74c 100644 --- a/lib/routes/szse/projectdynamic.ts +++ b/lib/routes/szse/projectdynamic.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/taobao/zhongchou.ts b/lib/routes/taobao/zhongchou.ts index 2573c34d9f7b..9670e8ba834f 100644 --- a/lib/routes/taobao/zhongchou.ts +++ b/lib/routes/taobao/zhongchou.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/taptap/utils.ts b/lib/routes/taptap/utils.ts index 602e91963ada..c020ea560387 100644 --- a/lib/routes/taptap/utils.ts +++ b/lib/routes/taptap/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import path from 'node:path'; diff --git a/lib/routes/techcrunch/news.ts b/lib/routes/techcrunch/news.ts index 604c74d61eab..724c66e45c5c 100644 --- a/lib/routes/techcrunch/news.ts +++ b/lib/routes/techcrunch/news.ts @@ -4,8 +4,6 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); const host = 'https://techcrunch.com'; export const route: Route = { diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index c59319c9c93b..cb43b74370f4 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -1,5 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; import cache from '@/utils/cache'; import { config } from '@/config'; import ofetch from '@/utils/ofetch'; @@ -11,8 +10,6 @@ import querystring from 'querystring'; import { fallback, queryToBoolean } from '@/utils/readable-social'; import tglibchannel from './tglib/channel'; -const __dirname = getCurrentPath(import.meta.url); - /* message types */ const REPLY = 'REPLY'; const FORWARDED = 'FORWARDED'; diff --git a/lib/routes/tencent/news/author.ts b/lib/routes/tencent/news/author.ts index 5d1fae1e6ec1..0b36e938e2b8 100644 --- a/lib/routes/tencent/news/author.ts +++ b/lib/routes/tencent/news/author.ts @@ -1,6 +1,4 @@ import { Route, Data } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/tencent/news/coronavirus/data.ts b/lib/routes/tencent/news/coronavirus/data.ts index bff3ed95f0e1..4564d795ad67 100644 --- a/lib/routes/tencent/news/coronavirus/data.ts +++ b/lib/routes/tencent/news/coronavirus/data.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getData } from './utils'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/tencent/news/coronavirus/total.ts b/lib/routes/tencent/news/coronavirus/total.ts index acacede888a5..8e5b4e47ff42 100644 --- a/lib/routes/tencent/news/coronavirus/total.ts +++ b/lib/routes/tencent/news/coronavirus/total.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getData } from './utils'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/tesla/cx.ts b/lib/routes/tesla/cx.ts index e129181f0df3..0bd9b293d76f 100644 --- a/lib/routes/tesla/cx.ts +++ b/lib/routes/tesla/cx.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/tfc-taiwan/utils.ts b/lib/routes/tfc-taiwan/utils.ts index e2900bde4974..b923fd5ded20 100644 --- a/lib/routes/tfc-taiwan/utils.ts +++ b/lib/routes/tfc-taiwan/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import path from 'node:path'; diff --git a/lib/routes/the/index.ts b/lib/routes/the/index.ts index f7747887575c..ed130546ffcd 100644 --- a/lib/routes/the/index.ts +++ b/lib/routes/the/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/theatlantic/utils.ts b/lib/routes/theatlantic/utils.ts index cba3daa8d28f..3becfb7d9652 100644 --- a/lib/routes/theatlantic/utils.ts +++ b/lib/routes/theatlantic/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import { load } from 'cheerio'; import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/theblockbeats/index.ts b/lib/routes/theblockbeats/index.ts index ad8a0a69969c..ae5482b96569 100644 --- a/lib/routes/theblockbeats/index.ts +++ b/lib/routes/theblockbeats/index.ts @@ -5,9 +5,6 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import path from 'node:path'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; - -const __dirname = getCurrentPath(import.meta.url); const domain = 'theblockbeats.info'; const rootUrl = `https://www.${domain}`; diff --git a/lib/routes/theinitium/app.ts b/lib/routes/theinitium/app.ts index f5b5bdcf19ae..20d7219736da 100644 --- a/lib/routes/theinitium/app.ts +++ b/lib/routes/theinitium/app.ts @@ -5,9 +5,7 @@ import { load, type CheerioAPI, type Element } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; import { config } from '@/config'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); const appUrl = 'https://app.theinitium.com/'; const userAgent = 'PugpigBolt v4.1.8 (iPhone, iOS 18.2.1) on phone (model iPhone15,2)'; diff --git a/lib/routes/themoviedb/utils.ts b/lib/routes/themoviedb/utils.ts index d586870e988b..9d618202c60a 100644 --- a/lib/routes/themoviedb/utils.ts +++ b/lib/routes/themoviedb/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import path from 'node:path'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/thenewslens/index.ts b/lib/routes/thenewslens/index.ts index 73fc3b1332c9..da8779e375ba 100644 --- a/lib/routes/thenewslens/index.ts +++ b/lib/routes/thenewslens/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; diff --git a/lib/routes/thepaper/factpaper.ts b/lib/routes/thepaper/factpaper.ts index e2d59e34f44b..bb5afd27d7fc 100644 --- a/lib/routes/thepaper/factpaper.ts +++ b/lib/routes/thepaper/factpaper.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/thepaper/utils.ts b/lib/routes/thepaper/utils.ts index 177f3ea247f2..4c9d6835f17e 100644 --- a/lib/routes/thepaper/utils.ts +++ b/lib/routes/thepaper/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/theverge/index.ts b/lib/routes/theverge/index.ts index 6d9a6b725ed6..625f939ab5d9 100644 --- a/lib/routes/theverge/index.ts +++ b/lib/routes/theverge/index.ts @@ -5,9 +5,6 @@ import parser from '@/utils/rss-parser'; import { load } from 'cheerio'; import path from 'node:path'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; - -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/:hub?', diff --git a/lib/routes/thoughtco/index.ts b/lib/routes/thoughtco/index.ts index 39dc18e40970..9d6e98341f79 100644 --- a/lib/routes/thoughtco/index.ts +++ b/lib/routes/thoughtco/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/tiktok/user.ts b/lib/routes/tiktok/user.ts index c54bd80f72b9..9c2927ed2ffa 100644 --- a/lib/routes/tiktok/user.ts +++ b/lib/routes/tiktok/user.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { config } from '@/config'; diff --git a/lib/routes/tingshuitz/shenzhen.ts b/lib/routes/tingshuitz/shenzhen.ts index 8d7609ba564a..8f3f5e1aebf2 100644 --- a/lib/routes/tingshuitz/shenzhen.ts +++ b/lib/routes/tingshuitz/shenzhen.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/tingtingfm/program.ts b/lib/routes/tingtingfm/program.ts index d6cb883a7c49..296d5b4b194f 100644 --- a/lib/routes/tingtingfm/program.ts +++ b/lib/routes/tingtingfm/program.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/tmtpost/util.ts b/lib/routes/tmtpost/util.ts index ba28139bb4b2..70a3d446c846 100644 --- a/lib/routes/tmtpost/util.ts +++ b/lib/routes/tmtpost/util.ts @@ -2,15 +2,12 @@ import { type Data, type DataItem } from '@/types'; import { art } from '@/utils/render'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { type CheerioAPI, load } from 'cheerio'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - const baseUrl: string = 'https://www.tmtpost.com'; const apiBaseUrl: string = 'https://api.tmtpost.com'; const postApiUrl: string = new URL('v1/posts/', apiBaseUrl).href; diff --git a/lib/routes/tophub/list.ts b/lib/routes/tophub/list.ts index 48eac902b3bd..4648792f1e75 100644 --- a/lib/routes/tophub/list.ts +++ b/lib/routes/tophub/list.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/toutiao/user.ts b/lib/routes/toutiao/user.ts index 21c66876eec1..636bf7d00ef8 100644 --- a/lib/routes/toutiao/user.ts +++ b/lib/routes/toutiao/user.ts @@ -8,11 +8,8 @@ import { Feed } from './types'; import RejectError from '@/errors/types/reject'; import { config } from '@/config'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; -const __dirname = getCurrentPath(import.meta.url); - export const route: Route = { path: '/user/token/:token', categories: ['new-media'], @@ -63,7 +60,7 @@ async function handler(ctx) { const video = item.video.play_addr_list.sort((a, b) => b.bitrate - a.bitrate)[0]; return { title: item.title, - description: art(path.join(__dirname, 'templates', 'video.art'), { + description: art(path.join(__dirname, 'templates/video.art'), { poster: item.video.origin_cover.url_list[0], url: item.video.play_addr_list.sort((a, b) => b.bitrate - a.bitrate)[0].play_url_list[0], }), diff --git a/lib/routes/tradingview/blog.ts b/lib/routes/tradingview/blog.ts index 622dd83dc372..484f9a92ab87 100644 --- a/lib/routes/tradingview/blog.ts +++ b/lib/routes/tradingview/blog.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/transcriptforest/index.ts b/lib/routes/transcriptforest/index.ts index 144c4209e2bf..3bf8f75d50d9 100644 --- a/lib/routes/transcriptforest/index.ts +++ b/lib/routes/transcriptforest/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/transformer-circuits/index.ts b/lib/routes/transformer-circuits/index.ts index ef5d2aa860e0..f5a40235f066 100644 --- a/lib/routes/transformer-circuits/index.ts +++ b/lib/routes/transformer-circuits/index.ts @@ -5,13 +5,8 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import { fileURLToPath } from 'node:url'; import logger from '@/utils/logger'; -// 为ES模块创建__dirname等价物 -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); - // Define the main route path export const route: Route = { path: '/', diff --git a/lib/routes/trending/all-trending.ts b/lib/routes/trending/all-trending.ts index a6cd7b99c01d..8b6f5fac4fac 100644 --- a/lib/routes/trending/all-trending.ts +++ b/lib/routes/trending/all-trending.ts @@ -1,11 +1,9 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import dayjs from 'dayjs'; -import utc from 'dayjs/plugin/utc'; -import timezone from 'dayjs/plugin/timezone'; +import utc from 'dayjs/plugin/utc.js'; +import timezone from 'dayjs/plugin/timezone.js'; dayjs.extend(utc); dayjs.extend(timezone); import ofetch from '@/utils/ofetch'; diff --git a/lib/routes/tribalfootball/latest.ts b/lib/routes/tribalfootball/latest.ts index 96c022e2b4b4..1b540814ff6d 100644 --- a/lib/routes/tribalfootball/latest.ts +++ b/lib/routes/tribalfootball/latest.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/tvb/news.ts b/lib/routes/tvb/news.ts index 6222fd42a79e..df834931f302 100644 --- a/lib/routes/tvb/news.ts +++ b/lib/routes/tvb/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/tvtropes/featured.ts b/lib/routes/tvtropes/featured.ts index 2b30e1343a00..c1b4cb9de9f7 100644 --- a/lib/routes/tvtropes/featured.ts +++ b/lib/routes/tvtropes/featured.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/twreporter/fetch-article.ts b/lib/routes/twreporter/fetch-article.ts index 28713322fe70..4b3779f8923d 100644 --- a/lib/routes/twreporter/fetch-article.ts +++ b/lib/routes/twreporter/fetch-article.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/txrjy/fornumtopic.ts b/lib/routes/txrjy/fornumtopic.ts index e4e186930d2a..7b7c7d0d16bf 100644 --- a/lib/routes/txrjy/fornumtopic.ts +++ b/lib/routes/txrjy/fornumtopic.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/udn/breaking-news.ts b/lib/routes/udn/breaking-news.ts index 04a007e5f5b9..40fff2abd0c6 100644 --- a/lib/routes/udn/breaking-news.ts +++ b/lib/routes/udn/breaking-news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/uptimerobot/rss.ts b/lib/routes/uptimerobot/rss.ts index 65bd97d94dd0..fdbbe11fa566 100644 --- a/lib/routes/uptimerobot/rss.ts +++ b/lib/routes/uptimerobot/rss.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import Parser from 'rss-parser'; import { art } from '@/utils/render'; diff --git a/lib/routes/urbandictionary/random.ts b/lib/routes/urbandictionary/random.ts index e6ec9a48f57e..0a2fc1360177 100644 --- a/lib/routes/urbandictionary/random.ts +++ b/lib/routes/urbandictionary/random.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/utgd/utils.ts b/lib/routes/utgd/utils.ts index 06dd1acca74a..36a10ea8c9f3 100644 --- a/lib/routes/utgd/utils.ts +++ b/lib/routes/utgd/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/vcb-s/category.ts b/lib/routes/vcb-s/category.ts index c2c84636268d..e2cb4a955534 100644 --- a/lib/routes/vcb-s/category.ts +++ b/lib/routes/vcb-s/category.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/vcb-s/index.ts b/lib/routes/vcb-s/index.ts index 9e9106305cb2..3d638bee8075 100644 --- a/lib/routes/vcb-s/index.ts +++ b/lib/routes/vcb-s/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/vice/topic.ts b/lib/routes/vice/topic.ts index 51b0f977fcd9..9658fdfbd6c1 100644 --- a/lib/routes/vice/topic.ts +++ b/lib/routes/vice/topic.ts @@ -4,11 +4,9 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import cache from '@/utils/cache'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; -const __dirname = getCurrentPath(import.meta.url); -const render = (data) => art(path.join(__dirname, 'templates', 'article.art'), data); +const render = (data) => art(path.join(__dirname, 'templates/article.art'), data); export const route: Route = { path: '/topic/:topic/:language?', diff --git a/lib/routes/vimeo/category.ts b/lib/routes/vimeo/category.ts index c95f098cbad2..6c670d351555 100644 --- a/lib/routes/vimeo/category.ts +++ b/lib/routes/vimeo/category.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/vimeo/channel.ts b/lib/routes/vimeo/channel.ts index 5578c640c54b..79340a289232 100644 --- a/lib/routes/vimeo/channel.ts +++ b/lib/routes/vimeo/channel.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/vimeo/usr-videos.ts b/lib/routes/vimeo/usr-videos.ts index 9588a6fe3845..af63df62f675 100644 --- a/lib/routes/vimeo/usr-videos.ts +++ b/lib/routes/vimeo/usr-videos.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/visionias/utils.ts b/lib/routes/visionias/utils.ts index e9ebec22d51a..7315998756a5 100644 --- a/lib/routes/visionias/utils.ts +++ b/lib/routes/visionias/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { DataItem } from '@/types'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/wainao/topics.ts b/lib/routes/wainao/topics.ts index 00ca95b29fd6..6f98eb69cc32 100644 --- a/lib/routes/wainao/topics.ts +++ b/lib/routes/wainao/topics.ts @@ -1,7 +1,6 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import { art } from '@/utils/render'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -9,8 +8,6 @@ import { type CheerioAPI, load } from 'cheerio'; import { type Context } from 'hono'; import path from 'node:path'; -const __dirname = getCurrentPath(import.meta.url); - export const handler = async (ctx: Context): Promise => { const { id = 'hotspot' } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); diff --git a/lib/routes/wallpaperhub/index.ts b/lib/routes/wallpaperhub/index.ts index ea7371adbc66..67b7c733ce64 100644 --- a/lib/routes/wallpaperhub/index.ts +++ b/lib/routes/wallpaperhub/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/wallstreetcn/live.ts b/lib/routes/wallstreetcn/live.ts index 6044d8f93bf9..dcf90ec96967 100644 --- a/lib/routes/wallstreetcn/live.ts +++ b/lib/routes/wallstreetcn/live.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/warthunder/news.ts b/lib/routes/warthunder/news.ts index f86794648e37..25f266a36a61 100644 --- a/lib/routes/warthunder/news.ts +++ b/lib/routes/warthunder/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; diff --git a/lib/routes/washingtonpost/app.ts b/lib/routes/washingtonpost/app.ts index 40f4d3de3f7c..80fef6ec3916 100644 --- a/lib/routes/washingtonpost/app.ts +++ b/lib/routes/washingtonpost/app.ts @@ -3,12 +3,11 @@ import cache from '@/utils/cache'; import got from '@/utils/got'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; import { FetchError } from 'ofetch'; import dayjs from 'dayjs'; -import utc from 'dayjs/plugin/utc'; -import timezone from 'dayjs/plugin/timezone'; -import advancedFormat from 'dayjs/plugin/advancedFormat'; +import utc from 'dayjs/plugin/utc.js'; +import timezone from 'dayjs/plugin/timezone.js'; +import advancedFormat from 'dayjs/plugin/advancedFormat.js'; export const route: Route = { path: '/app/:category{.+}?', @@ -48,7 +47,6 @@ function handleDuplicates(array) { async function handler(ctx) { const category = ctx.req.param('category') ?? ''; - const __dirname = getCurrentPath(import.meta.url); const headers = { Accept: '*/*', Connection: 'keep-alive', diff --git a/lib/routes/weibo/search/hot.ts b/lib/routes/weibo/search/hot.ts index 833baa82be2e..5665b48381fe 100644 --- a/lib/routes/weibo/search/hot.ts +++ b/lib/routes/weibo/search/hot.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/wellcee/rent.ts b/lib/routes/wellcee/rent.ts index 9c092b40def8..ef84849b52bf 100644 --- a/lib/routes/wellcee/rent.ts +++ b/lib/routes/wellcee/rent.ts @@ -8,10 +8,8 @@ import { baseUrl, getCitys, getDistricts } from './utils'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); -const render = (data) => art(path.join(__dirname, 'templates', 'house.art'), data); +const render = (data) => art(path.join(__dirname, 'templates/house.art'), data); export const route: Route = { path: '/rent/:city/:district?', diff --git a/lib/routes/whu/news.ts b/lib/routes/whu/news.ts index 5830ef4033db..b6fa154c04c3 100644 --- a/lib/routes/whu/news.ts +++ b/lib/routes/whu/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/whu/util.ts b/lib/routes/whu/util.ts index 811a1ace4325..4e7a3c910071 100644 --- a/lib/routes/whu/util.ts +++ b/lib/routes/whu/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/winstall/update.ts b/lib/routes/winstall/update.ts index 6e370c870e36..2269edea5649 100644 --- a/lib/routes/winstall/update.ts +++ b/lib/routes/winstall/update.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/wise/pair.ts b/lib/routes/wise/pair.ts index e5eee6a7ff8e..628a19f63cab 100644 --- a/lib/routes/wise/pair.ts +++ b/lib/routes/wise/pair.ts @@ -1,12 +1,10 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import dayjs from 'dayjs'; -import customParseFormat from 'dayjs/plugin/customParseFormat'; +import customParseFormat from 'dayjs/plugin/customParseFormat.js'; dayjs.extend(customParseFormat); import { art } from '@/utils/render'; import path from 'node:path'; diff --git a/lib/routes/wmc-bj/publish.ts b/lib/routes/wmc-bj/publish.ts index 80f1385ea35a..9bf21090c7ac 100644 --- a/lib/routes/wmc-bj/publish.ts +++ b/lib/routes/wmc-bj/publish.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/wnacg/common.ts b/lib/routes/wnacg/common.ts index 7c88e5d45cc2..4923d1f78964 100644 --- a/lib/routes/wnacg/common.ts +++ b/lib/routes/wnacg/common.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/wsj/utils.ts b/lib/routes/wsj/utils.ts index 8951df13b161..4310695ba292 100644 --- a/lib/routes/wsj/utils.ts +++ b/lib/routes/wsj/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import asyncPool from 'tiny-async-pool'; import { load } from 'cheerio'; diff --git a/lib/routes/x-mol/news.ts b/lib/routes/x-mol/news.ts index 6a920957358a..22ec371da1a9 100644 --- a/lib/routes/x-mol/news.ts +++ b/lib/routes/x-mol/news.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/xiaomiyoupin/crowdfunding.ts b/lib/routes/xiaomiyoupin/crowdfunding.ts index 44a3b88b1f3d..5070b9cd95dc 100644 --- a/lib/routes/xiaomiyoupin/crowdfunding.ts +++ b/lib/routes/xiaomiyoupin/crowdfunding.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/xiaomiyoupin/utils.ts b/lib/routes/xiaomiyoupin/utils.ts index adba9939fd89..c2bf17fcdb98 100644 --- a/lib/routes/xiaomiyoupin/utils.ts +++ b/lib/routes/xiaomiyoupin/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import path from 'node:path'; diff --git a/lib/routes/xinpianchang/util.ts b/lib/routes/xinpianchang/util.ts index 0e4936b285fc..79f38814d60c 100644 --- a/lib/routes/xinpianchang/util.ts +++ b/lib/routes/xinpianchang/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/xjtu/job.ts b/lib/routes/xjtu/job.ts index db1b3461e6e2..b03b00229c4a 100644 --- a/lib/routes/xjtu/job.ts +++ b/lib/routes/xjtu/job.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/xjtu/std.ts b/lib/routes/xjtu/std.ts index 780277af3be6..21a35fef33bc 100644 --- a/lib/routes/xjtu/std.ts +++ b/lib/routes/xjtu/std.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/xkb/index.ts b/lib/routes/xkb/index.ts index 67ac526a3d1f..c5581e9e8a15 100644 --- a/lib/routes/xkb/index.ts +++ b/lib/routes/xkb/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/xueqiu/stock-comments.ts b/lib/routes/xueqiu/stock-comments.ts index 401eca00e576..b05155f0fdb8 100644 --- a/lib/routes/xueqiu/stock-comments.ts +++ b/lib/routes/xueqiu/stock-comments.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/xys/new.ts b/lib/routes/xys/new.ts index 45c49d51cf8c..3927f177271f 100644 --- a/lib/routes/xys/new.ts +++ b/lib/routes/xys/new.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/xyzrank/index.ts b/lib/routes/xyzrank/index.ts index 0f6e0e706e0b..2fd81bc4c695 100644 --- a/lib/routes/xyzrank/index.ts +++ b/lib/routes/xyzrank/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/yahoo/news/utils.ts b/lib/routes/yahoo/news/utils.ts index 760f8ee3d7cf..61955e9d7f07 100644 --- a/lib/routes/yahoo/news/utils.ts +++ b/lib/routes/yahoo/news/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/ycwb/index.ts b/lib/routes/ycwb/index.ts index d0d639fa2d55..09614c3605de 100644 --- a/lib/routes/ycwb/index.ts +++ b/lib/routes/ycwb/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/yenpress/series.ts b/lib/routes/yenpress/series.ts index e953ac205aea..c8c26ed6b695 100644 --- a/lib/routes/yenpress/series.ts +++ b/lib/routes/yenpress/series.ts @@ -8,11 +8,8 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - -const render = (data) => art(path.join(__dirname, 'templates', 'series.art'), data); +const render = (data) => art(path.join(__dirname, 'templates/series.art'), data); export const route: Route = { path: '/series/:name', diff --git a/lib/routes/yicai/dt.ts b/lib/routes/yicai/dt.ts index a43e189df84d..de4b4dda5fa9 100644 --- a/lib/routes/yicai/dt.ts +++ b/lib/routes/yicai/dt.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/yicai/utils.ts b/lib/routes/yicai/utils.ts index d1f58a7be4b2..b74e85e22140 100644 --- a/lib/routes/yicai/utils.ts +++ b/lib/routes/yicai/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/ymgal/game.ts b/lib/routes/ymgal/game.ts index 80df068ba102..3ca4e40309ba 100644 --- a/lib/routes/ymgal/game.ts +++ b/lib/routes/ymgal/game.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/yoasobi-music/info.ts b/lib/routes/yoasobi-music/info.ts index 938b9e9d5ffb..8e9d6e499b59 100644 --- a/lib/routes/yoasobi-music/info.ts +++ b/lib/routes/yoasobi-music/info.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/yoasobi-music/live.ts b/lib/routes/yoasobi-music/live.ts index 0555b451f781..184f3a2ac78f 100644 --- a/lib/routes/yoasobi-music/live.ts +++ b/lib/routes/yoasobi-music/live.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseJSONP } from './jsonp-helper'; diff --git a/lib/routes/yoasobi-music/media.ts b/lib/routes/yoasobi-music/media.ts index 15c907913549..99e71e833945 100644 --- a/lib/routes/yoasobi-music/media.ts +++ b/lib/routes/yoasobi-music/media.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { parseJSONP } from './jsonp-helper'; diff --git a/lib/routes/youku/channel.ts b/lib/routes/youku/channel.ts index 6a21efe6375a..dfb9b7a38860 100644 --- a/lib/routes/youku/channel.ts +++ b/lib/routes/youku/channel.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/youtube/community.ts b/lib/routes/youtube/community.ts index 78e37294835e..6fbebed8241e 100644 --- a/lib/routes/youtube/community.ts +++ b/lib/routes/youtube/community.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; @@ -51,7 +49,7 @@ async function handler(ctx) { const media = post.backstageAttachment?.postMultiImageRenderer?.images.map((i) => i.backstageImageRenderer.image.thumbnails.pop()) ?? [post.backstageAttachment?.backstageImageRenderer?.image.thumbnails.pop()]; return { title: post.contentText.runs[0].text, - description: art(path.join(__dirname, 'templates', 'community.art'), { + description: art(path.join(__dirname, 'templates/community.art'), { runs: post.contentText.runs, media, }), diff --git a/lib/routes/youtube/utils.ts b/lib/routes/youtube/utils.ts index d04c2af12b71..61872eeab9e4 100644 --- a/lib/routes/youtube/utils.ts +++ b/lib/routes/youtube/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { google } from 'googleapis'; const { OAuth2 } = google.auth; import { art } from '@/utils/render'; diff --git a/lib/routes/yxdzqb/index.ts b/lib/routes/yxdzqb/index.ts index 42bdbacfde38..e2c4c4c92232 100644 --- a/lib/routes/yxdzqb/index.ts +++ b/lib/routes/yxdzqb/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/zagg/new-arrivals.ts b/lib/routes/zagg/new-arrivals.ts index 2e179f652374..e14d6a4c5d68 100644 --- a/lib/routes/zagg/new-arrivals.ts +++ b/lib/routes/zagg/new-arrivals.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/zaobao/util.ts b/lib/routes/zaobao/util.ts index bbb0fb653882..c181826781c7 100644 --- a/lib/routes/zaobao/util.ts +++ b/lib/routes/zaobao/util.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/zcool/discover.ts b/lib/routes/zcool/discover.ts index 6e4c653a306c..7e176989fa4c 100644 --- a/lib/routes/zcool/discover.ts +++ b/lib/routes/zcool/discover.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/zcool/utils.ts b/lib/routes/zcool/utils.ts index f9ed05419ab7..a4ed7ec1a15c 100644 --- a/lib/routes/zcool/utils.ts +++ b/lib/routes/zcool/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import path from 'node:path'; diff --git a/lib/routes/zhitongcaijing/index.ts b/lib/routes/zhitongcaijing/index.ts index b9d0e30d8173..53897a344436 100644 --- a/lib/routes/zhitongcaijing/index.ts +++ b/lib/routes/zhitongcaijing/index.ts @@ -1,6 +1,4 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/zhiy/post.ts b/lib/routes/zhiy/post.ts index 9497226466c3..25888e59e2cb 100644 --- a/lib/routes/zhiy/post.ts +++ b/lib/routes/zhiy/post.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/zhonglun/index.ts b/lib/routes/zhonglun/index.ts index 5e62a39e5005..960c6184ba94 100644 --- a/lib/routes/zhonglun/index.ts +++ b/lib/routes/zhonglun/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/zhubai/top20.ts b/lib/routes/zhubai/top20.ts index 275d36c960a1..8aff6dc2a37c 100644 --- a/lib/routes/zhubai/top20.ts +++ b/lib/routes/zhubai/top20.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/zodgame/forum.ts b/lib/routes/zodgame/forum.ts index 4a49c33700dd..eceec172aa10 100644 --- a/lib/routes/zodgame/forum.ts +++ b/lib/routes/zodgame/forum.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/zuvio/utils.ts b/lib/routes/zuvio/utils.ts index 86634e1bbaf6..2644ae8c53dc 100644 --- a/lib/routes/zuvio/utils.ts +++ b/lib/routes/zuvio/utils.ts @@ -1,6 +1,3 @@ -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); - import { art } from '@/utils/render'; import path from 'node:path'; import got from '@/utils/got'; diff --git a/lib/routes/zyshow/index.ts b/lib/routes/zyshow/index.ts index a6a840caee0c..01748bc5c492 100644 --- a/lib/routes/zyshow/index.ts +++ b/lib/routes/zyshow/index.ts @@ -1,6 +1,4 @@ import { Route } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; diff --git a/lib/utils/parse-date.ts b/lib/utils/parse-date.ts index 98b28143f96c..4bc2d2d6c9a6 100644 --- a/lib/utils/parse-date.ts +++ b/lib/utils/parse-date.ts @@ -1,8 +1,8 @@ import dayjs from 'dayjs'; -import customParseFormat from 'dayjs/plugin/customParseFormat'; -import duration from 'dayjs/plugin/duration'; -import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'; -import weekday from 'dayjs/plugin/weekday'; +import customParseFormat from 'dayjs/plugin/customParseFormat.js'; +import duration from 'dayjs/plugin/duration.js'; +import isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'; +import weekday from 'dayjs/plugin/weekday.js'; dayjs.extend(customParseFormat); dayjs.extend(duration); diff --git a/package.json b/package.json index f8f65f618622..0c8db1fc7641 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "lib" ], "scripts": { - "build": "tsx scripts/workflow/build-routes.ts", + "build": "tsx scripts/workflow/build-routes.ts && tsdown", "build:docs": "tsx scripts/workflow/build-docs.ts", "dev": "cross-env NODE_ENV=dev tsx watch --inspect --clear-screen=false lib/index.ts", "dev:cache": "cross-env NODE_ENV=production tsx watch --clear-screen=false lib/index.ts", @@ -31,7 +31,7 @@ "lint": "eslint --cache .", "prepare": "husky || true", "profiling": "cross-env NODE_ENV=production tsx --prof lib/index.ts", - "start": "cross-env NODE_ENV=production tsx lib/index.ts", + "start": "cross-env NODE_ENV=production node dist/index.js", "test": "npm run format:check && npm run vitest:coverage", "vitest": "cross-env NODE_ENV=test vitest", "vitest:coverage": "cross-env NODE_ENV=test vitest --coverage.enabled --reporter=junit", @@ -186,12 +186,14 @@ "husky": "9.1.7", "js-beautify": "1.15.4", "lint-staged": "15.5.1", + "magic-string": "0.30.17", "mockdate": "3.0.5", "msw": "2.4.3", "node-network-devtools": "1.0.25", "prettier": "3.5.3", "remark-parse": "11.0.0", "supertest": "7.1.0", + "tsdown": "0.9.2", "typescript": "5.8.3", "unified": "11.0.5", "vite-tsconfig-paths": "5.1.4", @@ -211,6 +213,7 @@ "msw", "protobufjs", "puppeteer", + "rolldown", "utf-8-validate", "vue-demi" ], diff --git a/plugins/rollup-plugin-art-templates.ts b/plugins/rollup-plugin-art-templates.ts new file mode 100644 index 000000000000..3b9eed9d5c47 --- /dev/null +++ b/plugins/rollup-plugin-art-templates.ts @@ -0,0 +1,83 @@ +// rollup-plugin-art-templates.js +import fs from 'node:fs'; +import path from 'node:path'; +import { createHash } from 'node:crypto'; +import MagicString from 'magic-string'; + +/** + * @param {object} [opts] + * @param {string} [opts.outputDir='templates'] Sub‑folder inside your Rollup output where the + * cloned templates will live (e.g. dist/templates) + */ +export default function artTemplatesPlugin(opts = {}) { + const templatesDir = opts.outputDir || 'templates'; + /** Map */ + const emitted = new Map(); + + return { + name: 'art-template-assets', + + /** + * Scan every JS/TS file for `path.join(...'.art'...)` + * and rewrite it on the fly. + */ + transform(code, id) { + // Skip dependencies + if (id.includes('node_modules')) { + return null; + } + + // Quick pre‑check – bail fast for files with no “.art” + if (!code.includes('.art')) { + return null; + } + + const callRe = /path\.(join|resolve)\s*\(([^)]+)\)/g; // whole call + const strRe = /['"]([^'"]+\.art)['"]/g; // individual string literals + + let match, + mString = null; + + while ((match = callRe.exec(code))) { + const callSrc = match[0]; + + // Extract the **last** '.art' string literal in this call + let strMatch, + relPath = null; + while ((strMatch = strRe.exec(callSrc))) { + relPath = strMatch[1]; + } + if (!relPath) { + continue; + } // nothing to do + + // Resolve & hash the template file + const absPath = path.resolve(path.dirname(id), relPath); + const buf = fs.readFileSync(absPath); + const hash = createHash('sha256').update(buf).digest('hex').slice(0, 8); + const newName = `${path.basename(relPath, '.art')}-${hash}.art`; + const fileName = `${templatesDir}/${newName}`; + + // Emit only once per unique file + if (!emitted.has(absPath)) { + const refId = this.emitFile({ type: 'asset', name: newName, fileName, source: buf }); + emitted.set(absPath, { newName, fileName, refId }); + } + + // Replace the original string inside the call + const replacedCall = callSrc.replaceAll(strRe, `'${templatesDir}/${newName}'`); + mString ||= new MagicString(code); + mString.overwrite(match.index, match.index + callSrc.length, replacedCall); + } + + if (mString) { + return { + code: mString.toString(), + map: mString.generateMap({ hires: true }), + }; + } + + return null; // untouched + }, + }; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1998f3c19978..e8cf946f6130 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -299,7 +299,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 4.2.0 - version: 4.2.0(eslint@9.25.0)(typescript@5.8.3) + version: 4.2.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -368,10 +368,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.30.1 - version: 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0)(typescript@5.8.3))(eslint@9.25.0)(typescript@5.8.3) + version: 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/parser': specifier: 8.30.1 - version: 8.30.1(eslint@9.25.0)(typescript@5.8.3) + version: 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -383,25 +383,25 @@ importers: version: 0.37.120 eslint: specifier: 9.25.0 - version: 9.25.0 + version: 9.25.0(jiti@2.4.2) eslint-config-prettier: specifier: 10.1.2 - version: 10.1.2(eslint@9.25.0) + version: 10.1.2(eslint@9.25.0(jiti@2.4.2)) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.25.0) + version: 8.1.0(eslint@9.25.0(jiti@2.4.2)) eslint-plugin-n: specifier: 17.17.0 - version: 17.17.0(eslint@9.25.0) + version: 17.17.0(eslint@9.25.0(jiti@2.4.2)) eslint-plugin-prettier: specifier: 5.2.6 - version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.0))(eslint@9.25.0)(prettier@3.5.3) + version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.0(jiti@2.4.2)))(eslint@9.25.0(jiti@2.4.2))(prettier@3.5.3) eslint-plugin-unicorn: specifier: 58.0.0 - version: 58.0.0(eslint@9.25.0) + version: 58.0.0(eslint@9.25.0(jiti@2.4.2)) eslint-plugin-yml: specifier: 1.17.0 - version: 1.17.0(eslint@9.25.0) + version: 1.17.0(eslint@9.25.0(jiti@2.4.2)) fs-extra: specifier: 11.3.0 version: 11.3.0 @@ -420,6 +420,9 @@ importers: lint-staged: specifier: 15.5.1 version: 15.5.1 + magic-string: + specifier: 0.30.17 + version: 0.30.17 mockdate: specifier: 3.0.5 version: 3.0.5 @@ -438,6 +441,9 @@ importers: supertest: specifier: 7.1.0 version: 7.1.0 + tsdown: + specifier: 0.9.2 + version: 0.9.2(typescript@5.8.3) typescript: specifier: 5.8.3 version: 5.8.3 @@ -1059,6 +1065,15 @@ packages: '@dabh/diagnostics@2.0.3': resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} + '@emnapi/core@1.4.3': + resolution: {integrity: sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g==} + + '@emnapi/runtime@1.4.3': + resolution: {integrity: sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==} + + '@emnapi/wasi-threads@1.0.2': + resolution: {integrity: sha512-5n3nTJblwRi8LlXkJ9eBzu+kZR8Yxcc7ubakyQTFzPMtIhFpUBRbsnc2Dv88IZDIbCDlBiWrknhB4Lsz7mg6BA==} + '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -1353,8 +1368,8 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/eslint-utils@4.6.1': - resolution: {integrity: sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==} + '@eslint-community/eslint-utils@4.6.0': + resolution: {integrity: sha512-WhCn7Z7TauhBtmzhvKpoQs0Wwb/kBcy4CwpuI0/eEIr2Lx2auxmulAzLr91wVZJaz47iUZdkXOK7WlAfxGKCnA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -1543,6 +1558,9 @@ packages: resolution: {integrity: sha512-3rDakgJZ77+RiQUuSK69t1F0m8BQKA8Vh5DCS5V0DWvNY67zob2JhhQrhCO0AKLGINTRSFd1tBaHcJTkhefoSw==} engines: {node: '>=18'} + '@napi-rs/wasm-runtime@0.2.9': + resolution: {integrity: sha512-OKRBiajrrxB9ATokgEQoG87Z25c67pCpYcCwmXYX8PBftC9pBfN18gnm/fh1wurSLEKIAt+QRFLFCQISrb66Jg==} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1858,6 +1876,195 @@ packages: '@otplib/preset-v11@12.0.1': resolution: {integrity: sha512-9hSetMI7ECqbFiKICrNa4w70deTUfArtwXykPUvSHWOdzOlfa9ajglu7mNCntlvxycTiOAXkQGwjQCzzDEMRMg==} + '@oxc-parser/binding-darwin-arm64@0.65.0': + resolution: {integrity: sha512-bML5ABR5XLYOF/xtIQLVWhus7j+e00DOUZ5enFVDlYlrCD3n72/FTrSodJGuLXRvqQvsZL42zSe5wWsWCAjGzw==} + engines: {node: '>=14.0.0'} + cpu: [arm64] + os: [darwin] + + '@oxc-parser/binding-darwin-x64@0.65.0': + resolution: {integrity: sha512-k6DNe28LjHTem8gjxjMoPye5gTGQQWzQG4oiyiq9qYMhnmAzGFN5m05kymPl3qi2wp0rbwUeWBJglcU9O3AROA==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [darwin] + + '@oxc-parser/binding-linux-arm-gnueabihf@0.65.0': + resolution: {integrity: sha512-VN63Gs/MEdsZ6LZ8vDjp/JY+3i557a/AFny1+z+NWUXSRhrnfsM3OWZBiKcjcKp9kauvDurVlGpAZjYiYKfcTg==} + engines: {node: '>=14.0.0'} + cpu: [arm] + os: [linux] + + '@oxc-parser/binding-linux-arm64-gnu@0.65.0': + resolution: {integrity: sha512-cAs9OGhnRb/bzulGK3BdgNcgOeAQa2lXT42zNgtnysTO9lZnxqNMnvWaCwFCC4tL0YA7lfxn1Uf2rSEvysyP1A==} + engines: {node: '>=14.0.0'} + cpu: [arm64] + os: [linux] + + '@oxc-parser/binding-linux-arm64-musl@0.65.0': + resolution: {integrity: sha512-3Rdg11QOir3YH9f3J0Ydo8zRWqmVAvrkAiIc/chRvozOZA+ajXP8fenfMOyuVks6SHvFvkyXnZWqEmhZ5TkfwA==} + engines: {node: '>=14.0.0'} + cpu: [arm64] + os: [linux] + + '@oxc-parser/binding-linux-x64-gnu@0.65.0': + resolution: {integrity: sha512-eZPtnxBZBe+5wsU3KMHTAnuqwYTIaS+bOX7c0FQZYZBUh00EoAzlgZKiwL2gKuDdTNJ3YEUB735UWs6B7I66uQ==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [linux] + + '@oxc-parser/binding-linux-x64-musl@0.65.0': + resolution: {integrity: sha512-hTsQRUqnbXYTUg+yMfiQ/jMokAW9AtR1jyibrodF4bdF3dYyRJzGpMaLs9TOfHIjWM5xRykZ2br0ajBfgNeZuw==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [linux] + + '@oxc-parser/binding-wasm32-wasi@0.65.0': + resolution: {integrity: sha512-V9WvM3iwgqohuGnNb01+agI+5TbpexZ55hpXfxl6YKhdjnGkCbV2c0qtaAw18enrjRsU0QeDqZ6SBPfjE0pi5g==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@oxc-parser/binding-win32-arm64-msvc@0.65.0': + resolution: {integrity: sha512-Q0GvYjgFOYliEvWkr4FjBtERuXSiv0DwLtv8CtKfMIbLWzzzBSvQBx60PVD8BcZDvZBkTgomaijZ+wHcH2tjaQ==} + engines: {node: '>=14.0.0'} + cpu: [arm64] + os: [win32] + + '@oxc-parser/binding-win32-x64-msvc@0.65.0': + resolution: {integrity: sha512-ymVMrxcsNxj8FNkuizoIwl49r5cv3Rmhvw3G3rOi/WqdlZdHi+nZ1PBYaf4rPPHwpijmIY+XnAs0dy1+ynAWtA==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [win32] + + '@oxc-project/types@0.64.0': + resolution: {integrity: sha512-B0dxuEZFV6M4tXjPFwDSaED5/J55YUhODBaF09xNFNRrEyzQLKZuhKXAw1xYK8bO4K8Jn1d21TZfei3kAIE8dA==} + + '@oxc-project/types@0.65.0': + resolution: {integrity: sha512-7MpMzyXCcwxrTxJ4L0siy63Ds/LA8LAM4szumTFiynxTJkfrIZEV4PyR4Th0CqFZQ+oNi8WvW3Dr1MLy7o9qPQ==} + + '@oxc-resolver/binding-darwin-arm64@5.3.0': + resolution: {integrity: sha512-hXem5ZAguS7IlSiHg/LK0tEfLj4eUo+9U6DaFwwBEGd0L0VIF9LmuiHydRyOrdnnmi9iAAFMAn/wl2cUoiuruA==} + cpu: [arm64] + os: [darwin] + + '@oxc-resolver/binding-darwin-x64@5.3.0': + resolution: {integrity: sha512-wgSwfsZkRbuYCIBLxeg1bYrtKnirAy+IJF0lwfz4z08clgdNBDbfGECJe/cd0csIZPpRcvPFe8317yf31sWhtA==} + cpu: [x64] + os: [darwin] + + '@oxc-resolver/binding-freebsd-x64@5.3.0': + resolution: {integrity: sha512-kzeE2WHgcRMmWjB071RdwEV5Pwke4o0WWslCKoh8if1puvxIxfzu3o7g6P2+v77BP5qop4cri+uvLABSO0WZjg==} + cpu: [x64] + os: [freebsd] + + '@oxc-resolver/binding-linux-arm-gnueabihf@5.3.0': + resolution: {integrity: sha512-I8np34yZP/XfIkZNDbw3rweqVgfjmHYpNX3xnJZWg+f4mgO9/UNWBwetSaqXeDZqvIch/aHak+q4HVrQhQKCqg==} + cpu: [arm] + os: [linux] + + '@oxc-resolver/binding-linux-arm64-gnu@5.3.0': + resolution: {integrity: sha512-u2ndfeEUrW898eXM+qPxIN8TvTPjI90NDQBRgaxxkOfNw3xaotloeiZGz5+Yzlfxgvxr9DY9FdYkqhUhSnGhOw==} + cpu: [arm64] + os: [linux] + + '@oxc-resolver/binding-linux-arm64-musl@5.3.0': + resolution: {integrity: sha512-TzbjmFkcnESGuVItQ2diKacX8vu5G0bH3BHmIlmY4OSRLyoAlrJFwGKAHmh6C9+Amfcjo2rx8vdm7swzmsGC6Q==} + cpu: [arm64] + os: [linux] + + '@oxc-resolver/binding-linux-riscv64-gnu@5.3.0': + resolution: {integrity: sha512-NH3pjAqh8nuN29iRuRfTY42Vn03ctoR9VE8llfoUKUfhHUjFHYOXK5VSkhjj1usG8AeuesvqrQnLptCRQVTi/Q==} + cpu: [riscv64] + os: [linux] + + '@oxc-resolver/binding-linux-s390x-gnu@5.3.0': + resolution: {integrity: sha512-tuZtkK9sJYh2MC2uhol1M/8IMTB6ZQ5jmqP2+k5XNXnOb/im94Y5uV/u2lXwVyIuKHZZHtr+0d1HrOiNahoKpw==} + cpu: [s390x] + os: [linux] + + '@oxc-resolver/binding-linux-x64-gnu@5.3.0': + resolution: {integrity: sha512-VzhPYmZCtoES/ThcPdGSmMop7JlwgqtSvlgtKCW15ByV2JKyl8kHAHnPSBfpIooXb0ehFnRdxFtL9qtAEWy01g==} + cpu: [x64] + os: [linux] + + '@oxc-resolver/binding-linux-x64-musl@5.3.0': + resolution: {integrity: sha512-Hi39cWzul24rGljN4Vf1lxjXzQdCrdxO5oCT7KJP4ndSlqIUODJnfnMAP1YhcnIRvNvk+5E6sZtnEmFUd/4d8Q==} + cpu: [x64] + os: [linux] + + '@oxc-resolver/binding-wasm32-wasi@5.3.0': + resolution: {integrity: sha512-ddujvHhP3chmHnSXRlkPVUeYj4/B7eLZwL4yUid+df3WCbVh6DgoT9RmllZn21AhxgKtMdekDdyVJYKFd8tl4A==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@oxc-resolver/binding-win32-arm64-msvc@5.3.0': + resolution: {integrity: sha512-j1YYPLvUkMVNKmIFQZZJ7q6Do4cI3htUnyxNLwDSBVhSohvPIK2VG+IdtOAlWZGa7v+phEZsHfNbXVwB0oPYFQ==} + cpu: [arm64] + os: [win32] + + '@oxc-resolver/binding-win32-x64-msvc@5.3.0': + resolution: {integrity: sha512-LT9eOPPUqfZscQRd5mc08RBeDWOQf+dnOrKnanMallTGPe6g7+rcAlFTA8SWoJbcD45PV8yArFtCmSQSpzHZmg==} + cpu: [x64] + os: [win32] + + '@oxc-transform/binding-darwin-arm64@0.65.0': + resolution: {integrity: sha512-hHfhOKyH+8DOj0VUmWl6RPLy3F0jCMCUMuKICzfelvSEs5uu8YRJ7fmQSsQD9E0oTrbbdkNVjq/1mcAPHzIBsg==} + engines: {node: '>=14.0.0'} + cpu: [arm64] + os: [darwin] + + '@oxc-transform/binding-darwin-x64@0.65.0': + resolution: {integrity: sha512-MNeaCPBVB1oOdb4kMZnKej8kSoxqf4XqAfFIKgx2mV1gJnW3PfwAbpqhad+XH3QM49dB++Gyaw7SPNwQLpL3YQ==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [darwin] + + '@oxc-transform/binding-linux-arm-gnueabihf@0.65.0': + resolution: {integrity: sha512-YpmBf4AhtAdsLV7XYY9/UxVmgewumgVlNVcPXXXAQ5shMEYhu2K/fCvlWBFe6vYNXFmXAAnDihOjLrq8n+NhnA==} + engines: {node: '>=14.0.0'} + cpu: [arm] + os: [linux] + + '@oxc-transform/binding-linux-arm64-gnu@0.65.0': + resolution: {integrity: sha512-HbGl1QBvxCBVfRJdrcZliOsvjeoyMJQn6UUbYzQR8ud7SY2Ozp0Qf5VG0yjXvt/9BPcmOYMIxVCeKqSSkQ74XA==} + engines: {node: '>=14.0.0'} + cpu: [arm64] + os: [linux] + + '@oxc-transform/binding-linux-arm64-musl@0.65.0': + resolution: {integrity: sha512-80gSeSVY9fm+xoLBkTYdJT2RYCqMy/NAqT6azQoJj3DczoNKU/4GV4F6jpINRWYUqIUAZt3RSvAQtdW3tWAjfw==} + engines: {node: '>=14.0.0'} + cpu: [arm64] + os: [linux] + + '@oxc-transform/binding-linux-x64-gnu@0.65.0': + resolution: {integrity: sha512-Wsl+qLcaC3EeZT/ZjPuGTOtcHYu25HeEO1jCnZmIhFfz+1RWmaEK5P5xVVJbrAgNPMVOfqbUM0EwMCfvNmmPaQ==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [linux] + + '@oxc-transform/binding-linux-x64-musl@0.65.0': + resolution: {integrity: sha512-0kvRnt7EsKeGxxyt90l7yotSH5Ik5G9fbFJxkDCzPT23FzIQC8U4O1GzqNxnSj8VT/lRJGKcCL6KfSa6ttzQRQ==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [linux] + + '@oxc-transform/binding-wasm32-wasi@0.65.0': + resolution: {integrity: sha512-gKfpf5BY28Cq0scUV//oBlzXg+XFbi2tKpKDqE/ee4Z0ySeDQ66pwBUp3nnEG7EsVZjKhE8yksPN4YOCoZhG9g==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@oxc-transform/binding-win32-arm64-msvc@0.65.0': + resolution: {integrity: sha512-InHZNcL6hB2QLaiw3KNe+Aqnk+FRt4vuVmDXUibZ0fZSQorcFw/T267PtVVuWIzFNa6CQPU4ie0rxIdP0sHcFg==} + engines: {node: '>=14.0.0'} + cpu: [arm64] + os: [win32] + + '@oxc-transform/binding-win32-x64-msvc@0.65.0': + resolution: {integrity: sha512-qvLEPowed0OcSEgztGXw1QF53KhLYYYWGxOK2H+9PSXpkNcYaeUQ1XOngR9kO8yIhpBt1/EOrVFeNK8biy0c7g==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [win32] + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -1930,6 +2137,70 @@ packages: engines: {node: '>=18'} hasBin: true + '@quansync/fs@0.1.2': + resolution: {integrity: sha512-ezIadUb1aFhwJLd++WVqVpi9rnlX8vnd4ju7saPhwLHJN1mJgOv0puePTGV+FbtSnWtwoHDT8lAm4kagDZmpCg==} + engines: {node: '>=20.0.0'} + + '@rolldown/binding-darwin-arm64@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-xPPvKH8KNHdFF0yJ7oiUBCbypO7kFHjRMZGO463bLG/BrnOAXSTSYxVrRLrR3RzEw7tNfp6Sd5bLLD0vb+tboQ==} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-66ogat51jFTRLuz0gHx5Idfl+O7XX400iTZJWVBqdyBLccDLODqhuFGyzGHA6L5O1iE/fktUr7eEGSXfkl8vhg==} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-i3n2fXT31WyyJjN7uKbYeBLBBUZl1G9LXINlM7+93kI+4BnqITNNtxZwFrlj87jkrQSvfamfYFrXYb7VP/kIxw==} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-OA6OsIUCRWXuMvD6Y8+ffRXcgYmqbPWoiKhCy28/SzxudPpNE77UbTXt1kL68+5XSJD1cmTujN3OlBN8yoRaXw==} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-Bzfq2bdUb24KvVvke/TS001RAn0Mg6zmvHQTaPaNQw+r2NuX9VsNfttoKcyYv9TMBrzZbgp1uNABClQeOoQ+uA==} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-2fUL+BQas1tXX70hp/a3usMpI7Dm/VsCevU9iSxuJ2tygM/xv2+AEHwUJMZti3rrQSFEKw5QsSC2fphk4NU9bQ==} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-vXMaxGcHudEG/WJyBey85cmmo2LO/KE7WhidU92/2mN7EQiv5dbimm+s7Q4Qa8OJ5YU1/geU329m4gI3CRFO1g==} + cpu: [x64] + os: [linux] + + '@rolldown/binding-linux-x64-musl@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-aLmF2zHrG/yEfH6spsVBYnwnGiUWcaoBp9mzq4r2yXWnJ6YSXB5CSn6Abk/NsyQ15Wdsx5PNCUMchk03AiFa+w==} + cpu: [x64] + os: [linux] + + '@rolldown/binding-wasm32-wasi@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-Y/8aOps6v3ecLqV5GlpCb4RfaKhMBKG2alWJEH+2tP63IspFI17fWK6Q7Xa2ebPmxIAALa2ZtIgyH1SKnI0d9Q==} + engines: {node: '>=14.21.3'} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-syFlEaxhCcsbRnN7Z893OKZbItQUT4XSx4bSEQ6idgMVKGATx0JlHPnKdsO8SRFLZgDgOwQr3koeJO1eGYR0Cw==} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-+F0YfnIeeVgHmkZg1mEqJKRVTz1f8/mYNg0RyiBm1UfsKjLNFatiG+tZRJU1GKxtIJeQzcwggBaqP9mY+k3uQA==} + cpu: [ia32] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.7-commit.c2596d3': + resolution: {integrity: sha512-vl9SiHViixGsreAF5j/B9fDlB02UseGUCrfPXU7hMJgd/xWCZJ3VhRS5X49udacx7sGtOdH20hjr6lVSXDfyIg==} + cpu: [x64] + os: [win32] + '@rollup/pluginutils@5.1.4': resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} engines: {node: '>=14.0.0'} @@ -2116,6 +2387,9 @@ packages: '@tootallnate/quickjs-emscripten@0.23.0': resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} + '@tybys/wasm-util@0.9.0': + resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} + '@types/aes-js@3.1.4': resolution: {integrity: sha512-v3D66IptpUqh+pHKVNRxY8yvp2ESSZXe0rTzsGdzUhEwag7ljVfgCllkWv2YgiYXDhWFBrEywll4A5JToyTNFA==} @@ -2362,6 +2636,11 @@ packages: '@unhead/schema@1.11.20': resolution: {integrity: sha512-0zWykKAaJdm+/Y7yi/Yds20PrUK7XabLe9c3IRcjnwYmSWY6z0Cr19VIs3ozCj8P+GhR+/TI2mwtGlueCEYouA==} + '@valibot/to-json-schema@1.0.0': + resolution: {integrity: sha512-/9crJgPptVsGCL6X+JPDQyaJwkalSZ/52WuF8DiRUxJgcmpNdzYRfZ+gqMEP8W3CTVfuMWPqqvIgfwJ97f9Etw==} + peerDependencies: + valibot: ^1.0.0 + '@vercel/nft@0.29.2': resolution: {integrity: sha512-A/Si4mrTkQqJ6EXJKv5EYCDQ3NL6nJXxG8VGXePsaiQigsomHYQC9xSpX8qGk7AEZk4b1ssbYIqJ0ISQQ7bfcA==} engines: {node: '>=18'} @@ -2483,6 +2762,10 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} + ansis@3.17.0: + resolution: {integrity: sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==} + engines: {node: '>=14'} + arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} @@ -2736,6 +3019,10 @@ packages: resolution: {integrity: sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==} engines: {node: '>=18.17'} + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + chownr@3.0.0: resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} engines: {node: '>=18'} @@ -3024,6 +3311,9 @@ packages: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + degenerator@5.0.1: resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} engines: {node: '>= 14'} @@ -3056,6 +3346,10 @@ packages: dezalgo@1.0.4: resolution: {integrity: sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==} + diff@7.0.0: + resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} + engines: {node: '>=0.3.1'} + difflib@https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed: resolution: {tarball: https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed} version: 0.2.6 @@ -3117,6 +3411,10 @@ packages: resolution: {integrity: sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==} engines: {node: '>=6'} + dts-resolver@1.0.0: + resolution: {integrity: sha512-BTW78HXK66TvRHBRkU91a7CGoD5/PWi8ovMXbKVHjhR5xCqt1dgwl6CVk3wxWLzhNVIGXDbGWPBlRKrgSHMzfw==} + engines: {node: '>=20.18.0'} + eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -3459,6 +3757,14 @@ packages: fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + fdir@6.4.4: + resolution: {integrity: sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fecha@4.2.3: resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} @@ -4045,6 +4351,10 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + hasBin: true + js-beautify@1.15.4: resolution: {integrity: sha512-9/KXeZUKKJwqCXUdBxFJ3vPh467OCckSBmYDwSK/EtV090K+iMJ7zx2S3HLVDIWFQdqMIsZWbnaGiba18aWhaA==} engines: {node: '>=14'} @@ -4309,6 +4619,10 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true + magic-string-ast@0.9.1: + resolution: {integrity: sha512-18dv2ZlSSgJ/jDWlZGKfnDJx56ilNlYq9F7NnwuWTErsmYmqJ2TWE4l1o2zlUHBYUGBy3tIhPCC1gxq8M5HkMA==} + engines: {node: '>=20.18.0'} + magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} @@ -4715,6 +5029,17 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} + oxc-parser@0.65.0: + resolution: {integrity: sha512-2u3iUChO386K2sBBxTPCKweoJfbo4qLGfOJN964yEg6KmHadp4daWklhS56UUaHT2Qj057brG/G7WuyIP10lUg==} + engines: {node: '>=14.0.0'} + + oxc-resolver@5.3.0: + resolution: {integrity: sha512-FHqtZx0idP5QRPSNcI5g2ItmADg7fhR3XIeWg5eRMGfp44xqRpfkdvo+EX4ZceqV9bxvl0Z8vaqMqY0gYaNYNA==} + + oxc-transform@0.65.0: + resolution: {integrity: sha512-TWAMi8zVvORQw545O1/1irpbMPDQGD6ernen5QyY5PCL9nj3RqgR1ULlQiHVDXEl2rW+OtHF8KS0ItAUyOfQ+Q==} + engines: {node: '>=14.0.0'} + p-cancelable@3.0.0: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} engines: {node: '>=12.20'} @@ -4807,6 +5132,9 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} @@ -5022,6 +5350,9 @@ packages: resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} engines: {node: '>=0.6'} + quansync@0.2.10: + resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==} + query-string@7.1.3: resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==} engines: {node: '>=6'} @@ -5061,6 +5392,10 @@ packages: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + real-cancellable-promise@1.2.1: resolution: {integrity: sha512-JwhiWJTMMyzFYfpKsiSb8CyQktCi1MZ8ZBn3wXvq28qXDh8Y5dM7RYzgW3r6SV22JTEcof8pRsvDp4GxLmGIxg==} @@ -5197,6 +5532,25 @@ packages: resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} hasBin: true + rolldown-plugin-dts@0.8.3: + resolution: {integrity: sha512-gxRerZlmo+Rii6k4CeMYdSSvypdx/VJHf7bLnw/6IwbflNkjxRYq4dHYntCuYpdG6Si2n8xJGqnhE+Hh8I1DPQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + rolldown: ^1.0.0-beta.7 + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + + rolldown@1.0.0-beta.7-commit.c2596d3: + resolution: {integrity: sha512-FFjtajrWaIDa9hM+gCSF58ys3scTuMxRNhzwhb6ADGBFzfFARjXOIj+1sPIcN/dTgPkYDjfuWAtIVQxDWTA7hg==} + hasBin: true + peerDependencies: + '@oxc-project/runtime': 0.64.0 + peerDependenciesMeta: + '@oxc-project/runtime': + optional: true + rollup@4.37.0: resolution: {integrity: sha512-iAtQy/L4QFU+rTJ1YUjXqJOJzuwEghqWzCEYD2FEghT7Gsy1VdABntrO4CLopA5IkflTyqNiLNwPcOJ3S7UKLg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -5532,6 +5886,13 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + tinyexec@1.0.1: + resolution: {integrity: sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==} + + tinyglobby@0.2.13: + resolution: {integrity: sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==} + engines: {node: '>=12.0.0'} + tinypool@1.0.2: resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -5562,8 +5923,8 @@ packages: tldts-core@7.0.1: resolution: {integrity: sha512-EwrnW4fkFuTgNBPOI3i/j8168ftqogsIQG2IYz69KfF8XOjPy5O+nzu6Ep7kaugpdZrN2Y951VzAVSt/hbYp2g==} - tldts@6.1.86: - resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} + tldts@6.1.85: + resolution: {integrity: sha512-gBdZ1RjCSevRPFix/hpaUWeak2/RNUZB4/8frF1r5uYMHjFptkiT0JXIebWvgI/0ZHXvxaUDDJshiA0j6GdL3w==} hasBin: true tldts@7.0.1: @@ -5648,6 +6009,19 @@ packages: typescript: optional: true + tsdown@0.9.2: + resolution: {integrity: sha512-B0Vfgsi2Jcpa5MPGtx5z6W+HTj3xv+tPsukS4FfnX5+dwzuQUjgB2fbaM/IIYJGH2YZY2Hjb+TEZoQZ5MrefCw==} + engines: {node: '>=18.0.0'} + hasBin: true + peerDependencies: + publint: ^0.3.0 + unplugin-unused: ^0.4.0 + peerDependenciesMeta: + publint: + optional: true + unplugin-unused: + optional: true + tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} @@ -5724,6 +6098,9 @@ packages: unbzip2-stream@1.4.3: resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} + unconfig@7.3.1: + resolution: {integrity: sha512-LH5WL+un92tGAzWS87k7LkAfwpMdm7V0IXG2FxEjZz/QxiIW5J5LkcrKQThj0aRz6+h/lFmKI9EUXmK/T0bcrw==} + undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} @@ -5826,6 +6203,14 @@ packages: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true + valibot@1.0.0: + resolution: {integrity: sha512-1Hc0ihzWxBar6NGeZv7fPLY0QuxFMyxwYR2sF1Blu7Wq7EnremwY2W02tit2ij2VJT8HcSkHAQqmFfl77f73Yw==} + peerDependencies: + typescript: '>=5' + peerDependenciesMeta: + typescript: + optional: true + valid-url@1.0.9: resolution: {integrity: sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA==} @@ -6887,6 +7272,22 @@ snapshots: enabled: 2.0.0 kuler: 2.0.0 + '@emnapi/core@1.4.3': + dependencies: + '@emnapi/wasi-threads': 1.0.2 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.4.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.0.2': + dependencies: + tslib: 2.8.1 + optional: true + '@esbuild/aix-ppc64@0.21.5': optional: true @@ -7031,19 +7432,19 @@ snapshots: '@esbuild/win32-x64@0.25.1': optional: true - '@eslint-community/eslint-utils@4.5.1(eslint@9.25.0)': + '@eslint-community/eslint-utils@4.5.1(eslint@8.57.1)': dependencies: - eslint: 9.25.0 + eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.6.1(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.5.1(eslint@9.25.0(jiti@2.4.2))': dependencies: - eslint: 8.57.1 + eslint: 9.25.0(jiti@2.4.2) eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.6.1(eslint@9.25.0)': + '@eslint-community/eslint-utils@4.6.0(eslint@9.25.0(jiti@2.4.2))': dependencies: - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -7261,6 +7662,13 @@ snapshots: outvariant: 1.4.3 strict-event-emitter: 0.5.1 + '@napi-rs/wasm-runtime@0.2.9': + dependencies: + '@emnapi/core': 1.4.3 + '@emnapi/runtime': 1.4.3 + '@tybys/wasm-util': 0.9.0 + optional: true + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -7643,6 +8051,115 @@ snapshots: '@otplib/plugin-crypto': 12.0.1 '@otplib/plugin-thirty-two': 12.0.1 + '@oxc-parser/binding-darwin-arm64@0.65.0': + optional: true + + '@oxc-parser/binding-darwin-x64@0.65.0': + optional: true + + '@oxc-parser/binding-linux-arm-gnueabihf@0.65.0': + optional: true + + '@oxc-parser/binding-linux-arm64-gnu@0.65.0': + optional: true + + '@oxc-parser/binding-linux-arm64-musl@0.65.0': + optional: true + + '@oxc-parser/binding-linux-x64-gnu@0.65.0': + optional: true + + '@oxc-parser/binding-linux-x64-musl@0.65.0': + optional: true + + '@oxc-parser/binding-wasm32-wasi@0.65.0': + dependencies: + '@napi-rs/wasm-runtime': 0.2.9 + optional: true + + '@oxc-parser/binding-win32-arm64-msvc@0.65.0': + optional: true + + '@oxc-parser/binding-win32-x64-msvc@0.65.0': + optional: true + + '@oxc-project/types@0.64.0': {} + + '@oxc-project/types@0.65.0': {} + + '@oxc-resolver/binding-darwin-arm64@5.3.0': + optional: true + + '@oxc-resolver/binding-darwin-x64@5.3.0': + optional: true + + '@oxc-resolver/binding-freebsd-x64@5.3.0': + optional: true + + '@oxc-resolver/binding-linux-arm-gnueabihf@5.3.0': + optional: true + + '@oxc-resolver/binding-linux-arm64-gnu@5.3.0': + optional: true + + '@oxc-resolver/binding-linux-arm64-musl@5.3.0': + optional: true + + '@oxc-resolver/binding-linux-riscv64-gnu@5.3.0': + optional: true + + '@oxc-resolver/binding-linux-s390x-gnu@5.3.0': + optional: true + + '@oxc-resolver/binding-linux-x64-gnu@5.3.0': + optional: true + + '@oxc-resolver/binding-linux-x64-musl@5.3.0': + optional: true + + '@oxc-resolver/binding-wasm32-wasi@5.3.0': + dependencies: + '@napi-rs/wasm-runtime': 0.2.9 + optional: true + + '@oxc-resolver/binding-win32-arm64-msvc@5.3.0': + optional: true + + '@oxc-resolver/binding-win32-x64-msvc@5.3.0': + optional: true + + '@oxc-transform/binding-darwin-arm64@0.65.0': + optional: true + + '@oxc-transform/binding-darwin-x64@0.65.0': + optional: true + + '@oxc-transform/binding-linux-arm-gnueabihf@0.65.0': + optional: true + + '@oxc-transform/binding-linux-arm64-gnu@0.65.0': + optional: true + + '@oxc-transform/binding-linux-arm64-musl@0.65.0': + optional: true + + '@oxc-transform/binding-linux-x64-gnu@0.65.0': + optional: true + + '@oxc-transform/binding-linux-x64-musl@0.65.0': + optional: true + + '@oxc-transform/binding-wasm32-wasi@0.65.0': + dependencies: + '@napi-rs/wasm-runtime': 0.2.9 + optional: true + + '@oxc-transform/binding-win32-arm64-msvc@0.65.0': + optional: true + + '@oxc-transform/binding-win32-x64-msvc@0.65.0': + optional: true + '@pkgjs/parseargs@0.11.0': optional: true @@ -7735,6 +8252,48 @@ snapshots: - bare-buffer - supports-color + '@quansync/fs@0.1.2': + dependencies: + quansync: 0.2.10 + + '@rolldown/binding-darwin-arm64@1.0.0-beta.7-commit.c2596d3': + optional: true + + '@rolldown/binding-darwin-x64@1.0.0-beta.7-commit.c2596d3': + optional: true + + '@rolldown/binding-freebsd-x64@1.0.0-beta.7-commit.c2596d3': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.7-commit.c2596d3': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.7-commit.c2596d3': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.7-commit.c2596d3': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.7-commit.c2596d3': + optional: true + + '@rolldown/binding-linux-x64-musl@1.0.0-beta.7-commit.c2596d3': + optional: true + + '@rolldown/binding-wasm32-wasi@1.0.0-beta.7-commit.c2596d3': + dependencies: + '@napi-rs/wasm-runtime': 0.2.9 + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.7-commit.c2596d3': + optional: true + + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.7-commit.c2596d3': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.7-commit.c2596d3': + optional: true + '@rollup/pluginutils@5.1.4(rollup@4.37.0)': dependencies: '@types/estree': 1.0.7 @@ -7901,10 +8460,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@4.2.0(eslint@9.25.0)(typescript@5.8.3)': + '@stylistic/eslint-plugin@4.2.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/utils': 8.28.0(eslint@9.25.0)(typescript@5.8.3) - eslint: 9.25.0 + '@typescript-eslint/utils': 8.28.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) + eslint: 9.25.0(jiti@2.4.2) eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -7921,6 +8480,11 @@ snapshots: '@tootallnate/quickjs-emscripten@0.23.0': {} + '@tybys/wasm-util@0.9.0': + dependencies: + tslib: 2.8.1 + optional: true + '@types/aes-js@3.1.4': {} '@types/babel__preset-env@7.10.0': {} @@ -8099,15 +8663,15 @@ snapshots: '@types/node': 22.14.1 optional: true - '@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0)(typescript@5.8.3))(eslint@9.25.0)(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.30.1(eslint@9.25.0)(typescript@5.8.3) + '@typescript-eslint/parser': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/scope-manager': 8.30.1 - '@typescript-eslint/type-utils': 8.30.1(eslint@9.25.0)(typescript@5.8.3) - '@typescript-eslint/utils': 8.30.1(eslint@9.25.0)(typescript@5.8.3) + '@typescript-eslint/type-utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.30.1 - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -8116,14 +8680,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.30.1(eslint@9.25.0)(typescript@5.8.3)': + '@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@typescript-eslint/scope-manager': 8.30.1 '@typescript-eslint/types': 8.30.1 '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.30.1 debug: 4.4.0 - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -8138,12 +8702,12 @@ snapshots: '@typescript-eslint/types': 8.30.1 '@typescript-eslint/visitor-keys': 8.30.1 - '@typescript-eslint/type-utils@8.30.1(eslint@9.25.0)(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) - '@typescript-eslint/utils': 8.30.1(eslint@9.25.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) debug: 4.4.0 - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: @@ -8181,24 +8745,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.28.0(eslint@9.25.0)(typescript@5.8.3)': + '@typescript-eslint/utils@8.28.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2)) '@typescript-eslint/scope-manager': 8.28.0 '@typescript-eslint/types': 8.28.0 '@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.3) - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.30.1(eslint@9.25.0)(typescript@5.8.3)': + '@typescript-eslint/utils@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.0) + '@eslint-community/eslint-utils': 4.6.0(eslint@9.25.0(jiti@2.4.2)) '@typescript-eslint/scope-manager': 8.30.1 '@typescript-eslint/types': 8.30.1 '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -8220,6 +8784,10 @@ snapshots: hookable: 5.5.3 zhead: 2.2.4 + '@valibot/to-json-schema@1.0.0(valibot@1.0.0(typescript@5.8.3))': + dependencies: + valibot: 1.0.0(typescript@5.8.3) + '@vercel/nft@0.29.2(rollup@4.37.0)': dependencies: '@mapbox/node-pre-gyp': 2.0.0 @@ -8353,6 +8921,8 @@ snapshots: ansi-styles@6.2.1: {} + ansis@3.17.0: {} + arg@5.0.2: {} argparse@2.0.1: {} @@ -8650,6 +9220,10 @@ snapshots: undici: 6.21.2 whatwg-mimetype: 4.0.0 + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + chownr@3.0.0: {} chromium-bidi@0.5.16(devtools-protocol@0.0.1262051): @@ -8902,6 +9476,8 @@ snapshots: define-lazy-prop@2.0.0: {} + defu@6.1.4: {} + degenerator@5.0.1: dependencies: ast-types: 0.13.4 @@ -8929,6 +9505,8 @@ snapshots: asap: 2.0.6 wrappy: 1.0.2 + diff@7.0.0: {} + difflib@https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed: dependencies: heap: 0.2.7 @@ -9000,6 +9578,11 @@ snapshots: dotenv@6.2.0: {} + dts-resolver@1.0.0: + dependencies: + oxc-resolver: 5.3.0 + pathe: 2.0.3 + eastasianwidth@0.2.0: {} ecc-jsbn@0.1.2: @@ -9159,23 +9742,23 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.25.0): + eslint-compat-utils@0.5.1(eslint@9.25.0(jiti@2.4.2)): dependencies: - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) semver: 7.7.1 - eslint-compat-utils@0.6.4(eslint@9.25.0): + eslint-compat-utils@0.6.4(eslint@9.25.0(jiti@2.4.2)): dependencies: - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) semver: 7.7.1 - eslint-config-prettier@10.1.2(eslint@9.25.0): + eslint-config-prettier@10.1.2(eslint@9.25.0(jiti@2.4.2)): dependencies: - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) - eslint-filtered-fix@0.3.0(eslint@9.25.0): + eslint-filtered-fix@0.3.0(eslint@9.25.0(jiti@2.4.2)): dependencies: - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -9186,55 +9769,55 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.25.0): + eslint-nibble@8.1.0(eslint@9.25.0(jiti@2.4.2)): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.25.0 - eslint-filtered-fix: 0.3.0(eslint@9.25.0) + eslint: 9.25.0(jiti@2.4.2) + eslint-filtered-fix: 0.3.0(eslint@9.25.0(jiti@2.4.2)) eslint-formatter-friendly: 7.0.0 eslint-summary: 1.0.0 inquirer: 8.2.6 optionator: 0.9.4 - eslint-plugin-es-x@7.8.0(eslint@9.25.0): + eslint-plugin-es-x@7.8.0(eslint@9.25.0(jiti@2.4.2)): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 - eslint: 9.25.0 - eslint-compat-utils: 0.5.1(eslint@9.25.0) + eslint: 9.25.0(jiti@2.4.2) + eslint-compat-utils: 0.5.1(eslint@9.25.0(jiti@2.4.2)) - eslint-plugin-n@17.17.0(eslint@9.25.0): + eslint-plugin-n@17.17.0(eslint@9.25.0(jiti@2.4.2)): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2)) enhanced-resolve: 5.18.1 - eslint: 9.25.0 - eslint-plugin-es-x: 7.8.0(eslint@9.25.0) + eslint: 9.25.0(jiti@2.4.2) + eslint-plugin-es-x: 7.8.0(eslint@9.25.0(jiti@2.4.2)) get-tsconfig: 4.10.0 globals: 15.15.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.7.1 - eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.0))(eslint@9.25.0)(prettier@3.5.3): + eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.0(jiti@2.4.2)))(eslint@9.25.0(jiti@2.4.2))(prettier@3.5.3): dependencies: - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) prettier: 3.5.3 prettier-linter-helpers: 1.0.0 synckit: 0.11.1 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.2(eslint@9.25.0) + eslint-config-prettier: 10.1.2(eslint@9.25.0(jiti@2.4.2)) - eslint-plugin-unicorn@58.0.0(eslint@9.25.0): + eslint-plugin-unicorn@58.0.0(eslint@9.25.0(jiti@2.4.2)): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2)) '@eslint/plugin-kit': 0.2.7 ci-info: 4.2.0 clean-regexp: 1.0.0 core-js-compat: 3.41.0 - eslint: 9.25.0 + eslint: 9.25.0(jiti@2.4.2) esquery: 1.6.0 globals: 16.0.0 indent-string: 5.0.0 @@ -9247,12 +9830,12 @@ snapshots: semver: 7.7.1 strip-indent: 4.0.0 - eslint-plugin-yml@1.17.0(eslint@9.25.0): + eslint-plugin-yml@1.17.0(eslint@9.25.0(jiti@2.4.2)): dependencies: debug: 4.4.0 escape-string-regexp: 4.0.0 - eslint: 9.25.0 - eslint-compat-utils: 0.6.4(eslint@9.25.0) + eslint: 9.25.0(jiti@2.4.2) + eslint-compat-utils: 0.6.4(eslint@9.25.0(jiti@2.4.2)) natural-compare: 1.4.0 yaml-eslint-parser: 1.3.0 transitivePeerDependencies: @@ -9279,7 +9862,7 @@ snapshots: eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.5.1(eslint@8.57.1) '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.1 @@ -9320,9 +9903,9 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.25.0: + eslint@9.25.0(jiti@2.4.2): dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.0) + '@eslint-community/eslint-utils': 4.6.0(eslint@9.25.0(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.20.0 '@eslint/config-helpers': 0.2.1 @@ -9357,6 +9940,8 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 + optionalDependencies: + jiti: 2.4.2 transitivePeerDependencies: - supports-color @@ -9489,6 +10074,10 @@ snapshots: dependencies: pend: 1.2.0 + fdir@6.4.4(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + fecha@4.2.3: {} figures@3.2.0: @@ -10135,6 +10724,8 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 + jiti@2.4.2: {} + js-beautify@1.15.4: dependencies: config-chain: 1.1.13 @@ -10404,6 +10995,10 @@ snapshots: lz-string@1.5.0: {} + magic-string-ast@0.9.1: + dependencies: + magic-string: 0.30.17 + magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -10900,6 +11495,50 @@ snapshots: outvariant@1.4.3: {} + oxc-parser@0.65.0: + dependencies: + '@oxc-project/types': 0.65.0 + optionalDependencies: + '@oxc-parser/binding-darwin-arm64': 0.65.0 + '@oxc-parser/binding-darwin-x64': 0.65.0 + '@oxc-parser/binding-linux-arm-gnueabihf': 0.65.0 + '@oxc-parser/binding-linux-arm64-gnu': 0.65.0 + '@oxc-parser/binding-linux-arm64-musl': 0.65.0 + '@oxc-parser/binding-linux-x64-gnu': 0.65.0 + '@oxc-parser/binding-linux-x64-musl': 0.65.0 + '@oxc-parser/binding-wasm32-wasi': 0.65.0 + '@oxc-parser/binding-win32-arm64-msvc': 0.65.0 + '@oxc-parser/binding-win32-x64-msvc': 0.65.0 + + oxc-resolver@5.3.0: + optionalDependencies: + '@oxc-resolver/binding-darwin-arm64': 5.3.0 + '@oxc-resolver/binding-darwin-x64': 5.3.0 + '@oxc-resolver/binding-freebsd-x64': 5.3.0 + '@oxc-resolver/binding-linux-arm-gnueabihf': 5.3.0 + '@oxc-resolver/binding-linux-arm64-gnu': 5.3.0 + '@oxc-resolver/binding-linux-arm64-musl': 5.3.0 + '@oxc-resolver/binding-linux-riscv64-gnu': 5.3.0 + '@oxc-resolver/binding-linux-s390x-gnu': 5.3.0 + '@oxc-resolver/binding-linux-x64-gnu': 5.3.0 + '@oxc-resolver/binding-linux-x64-musl': 5.3.0 + '@oxc-resolver/binding-wasm32-wasi': 5.3.0 + '@oxc-resolver/binding-win32-arm64-msvc': 5.3.0 + '@oxc-resolver/binding-win32-x64-msvc': 5.3.0 + + oxc-transform@0.65.0: + optionalDependencies: + '@oxc-transform/binding-darwin-arm64': 0.65.0 + '@oxc-transform/binding-darwin-x64': 0.65.0 + '@oxc-transform/binding-linux-arm-gnueabihf': 0.65.0 + '@oxc-transform/binding-linux-arm64-gnu': 0.65.0 + '@oxc-transform/binding-linux-arm64-musl': 0.65.0 + '@oxc-transform/binding-linux-x64-gnu': 0.65.0 + '@oxc-transform/binding-linux-x64-musl': 0.65.0 + '@oxc-transform/binding-wasm32-wasi': 0.65.0 + '@oxc-transform/binding-win32-arm64-msvc': 0.65.0 + '@oxc-transform/binding-win32-x64-msvc': 0.65.0 + p-cancelable@3.0.0: {} p-cancelable@4.0.1: {} @@ -10996,6 +11635,8 @@ snapshots: pathe@1.1.2: {} + pathe@2.0.3: {} + pathval@2.0.0: {} peberminta@0.9.0: {} @@ -11236,6 +11877,8 @@ snapshots: qs@6.5.3: {} + quansync@0.2.10: {} + query-string@7.1.3: dependencies: decode-uri-component: 0.2.2 @@ -11281,6 +11924,8 @@ snapshots: string_decoder: 1.3.0 util-deprecate: 1.0.2 + readdirp@4.1.2: {} + real-cancellable-promise@1.2.1: {} real-require@0.2.0: {} @@ -11425,6 +12070,42 @@ snapshots: dependencies: glob: 10.4.5 + rolldown-plugin-dts@0.8.3(rolldown@1.0.0-beta.7-commit.c2596d3(typescript@5.8.3))(typescript@5.8.3): + dependencies: + debug: 4.4.0 + dts-resolver: 1.0.0 + get-tsconfig: 4.10.0 + magic-string-ast: 0.9.1 + oxc-parser: 0.65.0 + oxc-transform: 0.65.0 + rolldown: 1.0.0-beta.7-commit.c2596d3(typescript@5.8.3) + optionalDependencies: + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + rolldown@1.0.0-beta.7-commit.c2596d3(typescript@5.8.3): + dependencies: + '@oxc-project/types': 0.64.0 + '@valibot/to-json-schema': 1.0.0(valibot@1.0.0(typescript@5.8.3)) + ansis: 3.17.0 + valibot: 1.0.0(typescript@5.8.3) + optionalDependencies: + '@rolldown/binding-darwin-arm64': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-darwin-x64': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.7-commit.c2596d3 + transitivePeerDependencies: + - typescript + rollup@4.37.0: dependencies: '@types/estree': 1.0.6 @@ -11804,6 +12485,13 @@ snapshots: tinyexec@0.3.2: {} + tinyexec@1.0.1: {} + + tinyglobby@0.2.13: + dependencies: + fdir: 6.4.4(picomatch@4.0.2) + picomatch: 4.0.2 + tinypool@1.0.2: {} tinyrainbow@1.2.0: {} @@ -11824,7 +12512,7 @@ snapshots: tldts-core@7.0.1: {} - tldts@6.1.86: + tldts@6.1.85: dependencies: tldts-core: 6.1.86 @@ -11866,7 +12554,7 @@ snapshots: tough-cookie@5.1.2: dependencies: - tldts: 6.1.86 + tldts: 6.1.85 tr46@0.0.3: {} @@ -11894,6 +12582,25 @@ snapshots: optionalDependencies: typescript: 5.8.3 + tsdown@0.9.2(typescript@5.8.3): + dependencies: + ansis: 3.17.0 + cac: 6.7.14 + chokidar: 4.0.3 + consola: 3.4.2 + debug: 4.4.0 + diff: 7.0.0 + find-up-simple: 1.0.1 + rolldown: 1.0.0-beta.7-commit.c2596d3(typescript@5.8.3) + rolldown-plugin-dts: 0.8.3(rolldown@1.0.0-beta.7-commit.c2596d3(typescript@5.8.3))(typescript@5.8.3) + tinyexec: 1.0.1 + tinyglobby: 0.2.13 + unconfig: 7.3.1 + transitivePeerDependencies: + - '@oxc-project/runtime' + - supports-color + - typescript + tslib@1.14.1: {} tslib@2.8.1: {} @@ -11954,6 +12661,13 @@ snapshots: buffer: 5.7.1 through: 2.3.8 + unconfig@7.3.1: + dependencies: + '@quansync/fs': 0.1.2 + defu: 6.1.4 + jiti: 2.4.2 + quansync: 0.2.10 + undici-types@6.21.0: {} undici@6.21.2: {} @@ -12033,6 +12747,10 @@ snapshots: uuid@9.0.1: {} + valibot@1.0.0(typescript@5.8.3): + optionalDependencies: + typescript: 5.8.3 + valid-url@1.0.9: {} validate-npm-package-license@3.0.4: diff --git a/scripts/workflow/build-routes.ts b/scripts/workflow/build-routes.ts index 9003f73e4a2f..9807cfc4c4ef 100644 --- a/scripts/workflow/build-routes.ts +++ b/scripts/workflow/build-routes.ts @@ -64,6 +64,7 @@ for (const namespace in namespaces) { } } } + data.module = `() => import('@/routes/${namespace}/${data.location}')`; } } @@ -71,3 +72,4 @@ fs.writeFileSync(path.join(__dirname, '../../assets/build/radar-rules.json'), JS fs.writeFileSync(path.join(__dirname, '../../assets/build/radar-rules.js'), `(${toSource(radar)})`); fs.writeFileSync(path.join(__dirname, '../../assets/build/maintainers.json'), JSON.stringify(maintainers, null, 2)); fs.writeFileSync(path.join(__dirname, '../../assets/build/routes.json'), JSON.stringify(namespaces, null, 2)); +fs.writeFileSync(path.join(__dirname, '../../assets/build/routes.js'), `export default ${JSON.stringify(namespaces, null, 2)}`.replaceAll(/"module": "(.*)"\n/g, `"module": $1\n`)); diff --git a/tsdown.config.ts b/tsdown.config.ts new file mode 100644 index 000000000000..ab2fe6a0897a --- /dev/null +++ b/tsdown.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'tsdown'; +import artTemplatesPlugin from './plugins/rollup-plugin-art-templates.ts'; + +export default defineConfig({ + entry: ['./lib/index.ts'], + minify: true, + shims: true, + clean: true, + plugins: [artTemplatesPlugin()], +}); From f4da552cb131ec65e5997f1b37fef80f957c9a41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 14:36:59 +0000 Subject: [PATCH 0466/2658] chore(deps-dev): bump the eslint group with 2 updates (#18910) Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint). Updates `@eslint/js` from 9.25.0 to 9.25.1 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.25.1/packages/js) Updates `eslint` from 9.25.0 to 9.25.1 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.25.0...v9.25.1) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-version: 9.25.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: eslint - dependency-name: eslint dependency-version: 9.25.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 154 ++++++++++++++++++++++++------------------------- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/package.json b/package.json index 0c8db1fc7641..291d16969554 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "@babel/preset-typescript": "7.27.0", "@bbob/types": "4.2.0", "@eslint/eslintrc": "3.3.1", - "@eslint/js": "9.25.0", + "@eslint/js": "9.25.1", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "4.2.0", "@types/aes-js": "3.1.4", @@ -173,7 +173,7 @@ "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.37.120", - "eslint": "9.25.0", + "eslint": "9.25.1", "eslint-config-prettier": "10.1.2", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.17.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8cf946f6130..03e2aae6eb22 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -292,14 +292,14 @@ importers: specifier: 3.3.1 version: 3.3.1 '@eslint/js': - specifier: 9.25.0 - version: 9.25.0 + specifier: 9.25.1 + version: 9.25.1 '@microsoft/eslint-formatter-sarif': specifier: 3.1.0 version: 3.1.0 '@stylistic/eslint-plugin': specifier: 4.2.0 - version: 4.2.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) + version: 4.2.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -368,10 +368,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.30.1 - version: 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) + version: 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/parser': specifier: 8.30.1 - version: 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) + version: 8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -382,26 +382,26 @@ importers: specifier: 0.37.120 version: 0.37.120 eslint: - specifier: 9.25.0 - version: 9.25.0(jiti@2.4.2) + specifier: 9.25.1 + version: 9.25.1(jiti@2.4.2) eslint-config-prettier: specifier: 10.1.2 - version: 10.1.2(eslint@9.25.0(jiti@2.4.2)) + version: 10.1.2(eslint@9.25.1(jiti@2.4.2)) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.25.0(jiti@2.4.2)) + version: 8.1.0(eslint@9.25.1(jiti@2.4.2)) eslint-plugin-n: specifier: 17.17.0 - version: 17.17.0(eslint@9.25.0(jiti@2.4.2)) + version: 17.17.0(eslint@9.25.1(jiti@2.4.2)) eslint-plugin-prettier: specifier: 5.2.6 - version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.0(jiti@2.4.2)))(eslint@9.25.0(jiti@2.4.2))(prettier@3.5.3) + version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(prettier@3.5.3) eslint-plugin-unicorn: specifier: 58.0.0 - version: 58.0.0(eslint@9.25.0(jiti@2.4.2)) + version: 58.0.0(eslint@9.25.1(jiti@2.4.2)) eslint-plugin-yml: specifier: 1.17.0 - version: 1.17.0(eslint@9.25.0(jiti@2.4.2)) + version: 1.17.0(eslint@9.25.1(jiti@2.4.2)) fs-extra: specifier: 11.3.0 version: 11.3.0 @@ -1368,8 +1368,8 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/eslint-utils@4.6.0': - resolution: {integrity: sha512-WhCn7Z7TauhBtmzhvKpoQs0Wwb/kBcy4CwpuI0/eEIr2Lx2auxmulAzLr91wVZJaz47iUZdkXOK7WlAfxGKCnA==} + '@eslint-community/eslint-utils@4.6.1': + resolution: {integrity: sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -1406,8 +1406,8 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.25.0': - resolution: {integrity: sha512-iWhsUS8Wgxz9AXNfvfOPFSW4VfMXdVhp1hjkZVhXCrpgh/aLcc45rX6MPu+tIVUWDw0HfNwth7O28M1xDxNf9w==} + '@eslint/js@9.25.1': + resolution: {integrity: sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.6': @@ -3631,8 +3631,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.25.0: - resolution: {integrity: sha512-MsBdObhM4cEwkzCiraDv7A6txFXEqtNXOb877TsSp2FCkBNl8JfVQrmiuDqC1IkejT6JLPzYBXx/xAiYhyzgGA==} + eslint@9.25.1: + resolution: {integrity: sha512-E6Mtz9oGQWDCpV12319d59n4tx9zOTXSTmc8BLVxBx+G/0RdM5MvEEJLU9c0+aleoePYYgVTOsRblx433qmhWQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -7432,19 +7432,19 @@ snapshots: '@esbuild/win32-x64@0.25.1': optional: true - '@eslint-community/eslint-utils@4.5.1(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.5.1(eslint@9.25.1(jiti@2.4.2))': dependencies: - eslint: 8.57.1 + eslint: 9.25.1(jiti@2.4.2) eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.5.1(eslint@9.25.0(jiti@2.4.2))': + '@eslint-community/eslint-utils@4.6.1(eslint@8.57.1)': dependencies: - eslint: 9.25.0(jiti@2.4.2) + eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.6.0(eslint@9.25.0(jiti@2.4.2))': + '@eslint-community/eslint-utils@4.6.1(eslint@9.25.1(jiti@2.4.2))': dependencies: - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -7497,7 +7497,7 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.25.0': {} + '@eslint/js@9.25.1': {} '@eslint/object-schema@2.1.6': {} @@ -8460,10 +8460,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@4.2.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': + '@stylistic/eslint-plugin@4.2.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/utils': 8.28.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) - eslint: 9.25.0(jiti@2.4.2) + '@typescript-eslint/utils': 8.28.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + eslint: 9.25.1(jiti@2.4.2) eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -8663,15 +8663,15 @@ snapshots: '@types/node': 22.14.1 optional: true - '@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/parser': 8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/scope-manager': 8.30.1 - '@typescript-eslint/type-utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/type-utils': 8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.30.1 - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -8680,14 +8680,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/parser@8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@typescript-eslint/scope-manager': 8.30.1 '@typescript-eslint/types': 8.30.1 '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.30.1 debug: 4.4.0 - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -8702,12 +8702,12 @@ snapshots: '@typescript-eslint/types': 8.30.1 '@typescript-eslint/visitor-keys': 8.30.1 - '@typescript-eslint/type-utils@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) - '@typescript-eslint/utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) debug: 4.4.0 - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: @@ -8745,24 +8745,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.28.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/utils@8.28.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) '@typescript-eslint/scope-manager': 8.28.0 '@typescript-eslint/types': 8.28.0 '@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.3) - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/utils@8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.6.0(eslint@9.25.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) '@typescript-eslint/scope-manager': 8.30.1 '@typescript-eslint/types': 8.30.1 '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -9742,23 +9742,23 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.25.0(jiti@2.4.2)): + eslint-compat-utils@0.5.1(eslint@9.25.1(jiti@2.4.2)): dependencies: - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) semver: 7.7.1 - eslint-compat-utils@0.6.4(eslint@9.25.0(jiti@2.4.2)): + eslint-compat-utils@0.6.4(eslint@9.25.1(jiti@2.4.2)): dependencies: - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) semver: 7.7.1 - eslint-config-prettier@10.1.2(eslint@9.25.0(jiti@2.4.2)): + eslint-config-prettier@10.1.2(eslint@9.25.1(jiti@2.4.2)): dependencies: - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) - eslint-filtered-fix@0.3.0(eslint@9.25.0(jiti@2.4.2)): + eslint-filtered-fix@0.3.0(eslint@9.25.1(jiti@2.4.2)): dependencies: - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -9769,55 +9769,55 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.25.0(jiti@2.4.2)): + eslint-nibble@8.1.0(eslint@9.25.1(jiti@2.4.2)): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.25.0(jiti@2.4.2) - eslint-filtered-fix: 0.3.0(eslint@9.25.0(jiti@2.4.2)) + eslint: 9.25.1(jiti@2.4.2) + eslint-filtered-fix: 0.3.0(eslint@9.25.1(jiti@2.4.2)) eslint-formatter-friendly: 7.0.0 eslint-summary: 1.0.0 inquirer: 8.2.6 optionator: 0.9.4 - eslint-plugin-es-x@7.8.0(eslint@9.25.0(jiti@2.4.2)): + eslint-plugin-es-x@7.8.0(eslint@9.25.1(jiti@2.4.2)): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.1(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 - eslint: 9.25.0(jiti@2.4.2) - eslint-compat-utils: 0.5.1(eslint@9.25.0(jiti@2.4.2)) + eslint: 9.25.1(jiti@2.4.2) + eslint-compat-utils: 0.5.1(eslint@9.25.1(jiti@2.4.2)) - eslint-plugin-n@17.17.0(eslint@9.25.0(jiti@2.4.2)): + eslint-plugin-n@17.17.0(eslint@9.25.1(jiti@2.4.2)): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.1(jiti@2.4.2)) enhanced-resolve: 5.18.1 - eslint: 9.25.0(jiti@2.4.2) - eslint-plugin-es-x: 7.8.0(eslint@9.25.0(jiti@2.4.2)) + eslint: 9.25.1(jiti@2.4.2) + eslint-plugin-es-x: 7.8.0(eslint@9.25.1(jiti@2.4.2)) get-tsconfig: 4.10.0 globals: 15.15.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.7.1 - eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.0(jiti@2.4.2)))(eslint@9.25.0(jiti@2.4.2))(prettier@3.5.3): + eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(prettier@3.5.3): dependencies: - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) prettier: 3.5.3 prettier-linter-helpers: 1.0.0 synckit: 0.11.1 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.2(eslint@9.25.0(jiti@2.4.2)) + eslint-config-prettier: 10.1.2(eslint@9.25.1(jiti@2.4.2)) - eslint-plugin-unicorn@58.0.0(eslint@9.25.0(jiti@2.4.2)): + eslint-plugin-unicorn@58.0.0(eslint@9.25.1(jiti@2.4.2)): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.1(jiti@2.4.2)) '@eslint/plugin-kit': 0.2.7 ci-info: 4.2.0 clean-regexp: 1.0.0 core-js-compat: 3.41.0 - eslint: 9.25.0(jiti@2.4.2) + eslint: 9.25.1(jiti@2.4.2) esquery: 1.6.0 globals: 16.0.0 indent-string: 5.0.0 @@ -9830,12 +9830,12 @@ snapshots: semver: 7.7.1 strip-indent: 4.0.0 - eslint-plugin-yml@1.17.0(eslint@9.25.0(jiti@2.4.2)): + eslint-plugin-yml@1.17.0(eslint@9.25.1(jiti@2.4.2)): dependencies: debug: 4.4.0 escape-string-regexp: 4.0.0 - eslint: 9.25.0(jiti@2.4.2) - eslint-compat-utils: 0.6.4(eslint@9.25.0(jiti@2.4.2)) + eslint: 9.25.1(jiti@2.4.2) + eslint-compat-utils: 0.6.4(eslint@9.25.1(jiti@2.4.2)) natural-compare: 1.4.0 yaml-eslint-parser: 1.3.0 transitivePeerDependencies: @@ -9862,7 +9862,7 @@ snapshots: eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.1) '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.1 @@ -9903,15 +9903,15 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.25.0(jiti@2.4.2): + eslint@9.25.1(jiti@2.4.2): dependencies: - '@eslint-community/eslint-utils': 4.6.0(eslint@9.25.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.20.0 '@eslint/config-helpers': 0.2.1 '@eslint/core': 0.13.0 '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.25.0 + '@eslint/js': 9.25.1 '@eslint/plugin-kit': 0.2.8 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 From 282e5271e4ba660ebe2375f9512d7090b7039a30 Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 22 Apr 2025 23:05:21 +0800 Subject: [PATCH 0467/2658] chore(docker): skip build armv7 --- .github/workflows/docker-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 9e9fbecc854b..afc8069772c8 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -81,7 +81,7 @@ jobs: push: true tags: ${{ steps.meta-ordinary.outputs.tags }} labels: ${{ steps.meta-ordinary.outputs.labels }} - platforms: linux/amd64,linux/arm/v7,linux/arm64 + platforms: linux/amd64,linux/arm64 cache-from: type=gha,scope=docker-release cache-to: type=gha,mode=max,scope=docker-release @@ -113,7 +113,7 @@ jobs: push: true tags: ${{ steps.meta-chromium-bundled.outputs.tags }} labels: ${{ steps.meta-chromium-bundled.outputs.labels }} - platforms: linux/amd64,linux/arm/v7,linux/arm64 + platforms: linux/amd64,linux/arm64 cache-from: | type=registry,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:chromium-bundled cache-to: type=inline,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:chromium-bundled # inline cache is enough From 51d4b4fe04d5d8ff41b485c634cf3fcb0a7f21fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 23:19:27 +0800 Subject: [PATCH 0468/2658] chore(deps-dev): bump the typescript-eslint group with 2 updates (#18911) Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.30.1 to 8.31.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.31.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.30.1 to 8.31.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.31.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.31.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-version: 8.31.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +-- pnpm-lock.yaml | 94 +++++++++++++++++++++++++------------------------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index 291d16969554..9885c5a7d782 100644 --- a/package.json +++ b/package.json @@ -168,8 +168,8 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.30.1", - "@typescript-eslint/parser": "8.30.1", + "@typescript-eslint/eslint-plugin": "8.31.0", + "@typescript-eslint/parser": "8.31.0", "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.37.120", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 03e2aae6eb22..1cda9d1e85f6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -367,11 +367,11 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.30.1 - version: 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + specifier: 8.31.0 + version: 8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/parser': - specifier: 8.30.1 - version: 8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + specifier: 8.31.0 + version: 8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -2558,16 +2558,16 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.30.1': - resolution: {integrity: sha512-v+VWphxMjn+1t48/jO4t950D6KR8JaJuNXzi33Ve6P8sEmPr5k6CEXjdGwT6+LodVnEa91EQCtwjWNUCPweo+Q==} + '@typescript-eslint/eslint-plugin@8.31.0': + resolution: {integrity: sha512-evaQJZ/J/S4wisevDvC1KFZkPzRetH8kYZbkgcTRyql3mcKsf+ZFDV1BVWUGTCAW5pQHoqn5gK5b8kn7ou9aFQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@8.30.1': - resolution: {integrity: sha512-H+vqmWwT5xoNrXqWs/fesmssOW70gxFlgcMlYcBaWNPIEWDgLa4W9nkSPmhuOgLnXq9QYgkZ31fhDyLhleCsAg==} + '@typescript-eslint/parser@8.31.0': + resolution: {integrity: sha512-67kYYShjBR0jNI5vsf/c3WG4u+zDnCTHTPqVMQguffaWWFs7artgwKmfwdifl+r6XyM5LYLas/dInj2T0SgJyw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2577,12 +2577,12 @@ packages: resolution: {integrity: sha512-u2oITX3BJwzWCapoZ/pXw6BCOl8rJP4Ij/3wPoGvY8XwvXflOzd1kLrDUUUAIEdJSFh+ASwdTHqtan9xSg8buw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.30.1': - resolution: {integrity: sha512-+C0B6ChFXZkuaNDl73FJxRYT0G7ufVPOSQkqkpM/U198wUwUFOtgo1k/QzFh1KjpBitaK7R1tgjVz6o9HmsRPg==} + '@typescript-eslint/scope-manager@8.31.0': + resolution: {integrity: sha512-knO8UyF78Nt8O/B64i7TlGXod69ko7z6vJD9uhSlm0qkAbGeRUSudcm0+K/4CrRjrpiHfBCjMWlc08Vav1xwcw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.30.1': - resolution: {integrity: sha512-64uBF76bfQiJyHgZISC7vcNz3adqQKIccVoKubyQcOnNcdJBvYOILV1v22Qhsw3tw3VQu5ll8ND6hycgAR5fEA==} + '@typescript-eslint/type-utils@8.31.0': + resolution: {integrity: sha512-DJ1N1GdjI7IS7uRlzJuEDCgDQix3ZVYVtgeWEyhyn4iaoitpMBX6Ndd488mXSx0xah/cONAkEaYyylDyAeHMHg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2592,8 +2592,8 @@ packages: resolution: {integrity: sha512-bn4WS1bkKEjx7HqiwG2JNB3YJdC1q6Ue7GyGlwPHyt0TnVq6TtD/hiOdTZt71sq0s7UzqBFXD8t8o2e63tXgwA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.30.1': - resolution: {integrity: sha512-81KawPfkuulyWo5QdyG/LOKbspyyiW+p4vpn4bYO7DM/hZImlVnFwrpCTnmNMOt8CvLRr5ojI9nU1Ekpw4RcEw==} + '@typescript-eslint/types@8.31.0': + resolution: {integrity: sha512-Ch8oSjVyYyJxPQk8pMiP2FFGYatqXQfQIaMp+TpuuLlDachRWpUAeEu1u9B/v/8LToehUIWyiKcA/w5hUFRKuQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@8.28.0': @@ -2602,8 +2602,8 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/typescript-estree@8.30.1': - resolution: {integrity: sha512-kQQnxymiUy9tTb1F2uep9W6aBiYODgq5EMSk6Nxh4Z+BDUoYUSa029ISs5zTzKBFnexQEh71KqwjKnRz58lusQ==} + '@typescript-eslint/typescript-estree@8.31.0': + resolution: {integrity: sha512-xLmgn4Yl46xi6aDSZ9KkyfhhtnYI15/CvHbpOy/eR5NWhK/BK8wc709KKwhAR0m4ZKRP7h07bm4BWUYOCuRpQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' @@ -2615,8 +2615,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.30.1': - resolution: {integrity: sha512-T/8q4R9En2tcEsWPQgB5BQ0XJVOtfARcUvOa8yJP3fh9M/mXraLxZrkCfGb6ChrO/V3W+Xbd04RacUEqk1CFEQ==} + '@typescript-eslint/utils@8.31.0': + resolution: {integrity: sha512-qi6uPLt9cjTFxAb1zGNgTob4x9ur7xC6mHQJ8GwEzGMGE9tYniublmJaowOJ9V2jUzxrltTPfdG2nKlWsq0+Ww==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2626,8 +2626,8 @@ packages: resolution: {integrity: sha512-hbn8SZ8w4u2pRwgQ1GlUrPKE+t2XvcCW5tTRF7j6SMYIuYG37XuzIW44JCZPa36evi0Oy2SnM664BlIaAuQcvg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.30.1': - resolution: {integrity: sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==} + '@typescript-eslint/visitor-keys@8.31.0': + resolution: {integrity: sha512-QcGHmlRHWOl93o64ZUMNewCdwKGU6WItOU52H0djgNmn1EOrhVudrDzXz4OycCRSCPwFCDrE2iIt5vmuUdHxuQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.3.0': @@ -8663,14 +8663,14 @@ snapshots: '@types/node': 22.14.1 optional: true - '@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.30.1 - '@typescript-eslint/type-utils': 8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/utils': 8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.30.1 + '@typescript-eslint/parser': 8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.31.0 + '@typescript-eslint/type-utils': 8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.0 eslint: 9.25.1(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 @@ -8680,12 +8680,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/scope-manager': 8.30.1 - '@typescript-eslint/types': 8.30.1 - '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.30.1 + '@typescript-eslint/scope-manager': 8.31.0 + '@typescript-eslint/types': 8.31.0 + '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.0 debug: 4.4.0 eslint: 9.25.1(jiti@2.4.2) typescript: 5.8.3 @@ -8697,15 +8697,15 @@ snapshots: '@typescript-eslint/types': 8.28.0 '@typescript-eslint/visitor-keys': 8.28.0 - '@typescript-eslint/scope-manager@8.30.1': + '@typescript-eslint/scope-manager@8.31.0': dependencies: - '@typescript-eslint/types': 8.30.1 - '@typescript-eslint/visitor-keys': 8.30.1 + '@typescript-eslint/types': 8.31.0 + '@typescript-eslint/visitor-keys': 8.31.0 - '@typescript-eslint/type-utils@8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) - '@typescript-eslint/utils': 8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) debug: 4.4.0 eslint: 9.25.1(jiti@2.4.2) ts-api-utils: 2.1.0(typescript@5.8.3) @@ -8715,7 +8715,7 @@ snapshots: '@typescript-eslint/types@8.28.0': {} - '@typescript-eslint/types@8.30.1': {} + '@typescript-eslint/types@8.31.0': {} '@typescript-eslint/typescript-estree@8.28.0(typescript@5.8.3)': dependencies: @@ -8731,10 +8731,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.30.1(typescript@5.8.3)': + '@typescript-eslint/typescript-estree@8.31.0(typescript@5.8.3)': dependencies: - '@typescript-eslint/types': 8.30.1 - '@typescript-eslint/visitor-keys': 8.30.1 + '@typescript-eslint/types': 8.31.0 + '@typescript-eslint/visitor-keys': 8.31.0 debug: 4.4.0 fast-glob: 3.3.3 is-glob: 4.0.3 @@ -8756,12 +8756,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.30.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) - '@typescript-eslint/scope-manager': 8.30.1 - '@typescript-eslint/types': 8.30.1 - '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.31.0 + '@typescript-eslint/types': 8.31.0 + '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.8.3) eslint: 9.25.1(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: @@ -8772,9 +8772,9 @@ snapshots: '@typescript-eslint/types': 8.28.0 eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.30.1': + '@typescript-eslint/visitor-keys@8.31.0': dependencies: - '@typescript-eslint/types': 8.30.1 + '@typescript-eslint/types': 8.31.0 eslint-visitor-keys: 4.2.0 '@ungap/structured-clone@1.3.0': {} From e9013a23139a692fe93b6a2ad4c5cc85b8020192 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 23 Apr 2025 02:42:25 +0800 Subject: [PATCH 0469/2658] chore: minify docker (#18914) * chore: minify docker * chore: bring back minify script --- Dockerfile | 52 ++++++++++++++++++--------------- scripts/docker/minify-docker.js | 32 ++++++++++---------- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd96cee15034..3b0fa1c49f36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,9 +17,10 @@ RUN \ pnpm config set registry https://registry.npmmirror.com ; \ fi; -COPY ./tsconfig.json /app/ COPY ./pnpm-lock.yaml /app/ COPY ./package.json /app/ +COPY ./tsconfig.json /app/ +COPY ./tsdown.config.ts /app/ # lazy install Chromium to avoid cache miss, only install production dependencies to minimize the image size RUN \ @@ -40,41 +41,44 @@ WORKDIR /ver COPY ./package.json /app/ RUN \ set -ex && \ - grep -Po '(?<="puppeteer": ")[^\s"]*(?=")' /app/package.json | tee /ver/.puppeteer_version - # grep -Po '(?<="@vercel/nft": ")[^\s"]*(?=")' /app/package.json | tee /ver/.nft_version && \ - # grep -Po '(?<="fs-extra": ")[^\s"]*(?=")' /app/package.json | tee /ver/.fs_extra_version + grep -Po '(?<="puppeteer": ")[^\s"]*(?=")' /app/package.json | tee /ver/.puppeteer_version && \ + grep -Po '(?<="@vercel/nft": ")[^\s"]*(?=")' /app/package.json | tee /ver/.nft_version && \ + grep -Po '(?<="fs-extra": ")[^\s"]*(?=")' /app/package.json | tee /ver/.fs_extra_version # --------------------------------------------------------------------------------------------------------------------- FROM node:22-bookworm-slim AS docker-minifier # The stage is used to further reduce the image size by removing unused files. -WORKDIR /app -# COPY --from=dep-version-parser /ver/* /minifier/ - -# ARG USE_CHINA_NPM_REGISTRY=0 -# RUN \ -# set -ex && \ -# if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \ -# npm config set registry https://registry.npmmirror.com && \ -# yarn config set registry https://registry.npmmirror.com && \ -# pnpm config set registry https://registry.npmmirror.com ; \ -# fi; \ -# corepack enable pnpm && \ -# pnpm add @vercel/nft@$(cat .nft_version) fs-extra@$(cat .fs_extra_version) --save-prod +WORKDIR /minifier +COPY --from=dep-version-parser /ver/* /minifier/ + +ARG USE_CHINA_NPM_REGISTRY=0 +RUN \ + set -ex && \ + if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \ + npm config set registry https://registry.npmmirror.com && \ + yarn config set registry https://registry.npmmirror.com && \ + pnpm config set registry https://registry.npmmirror.com ; \ + fi; \ + npm install -g corepack@latest && \ + corepack use pnpm@latest-9 && \ + pnpm add @vercel/nft@$(cat .nft_version) fs-extra@$(cat .fs_extra_version) --save-prod COPY . /app COPY --from=dep-builder /app /app +WORKDIR /app RUN \ set -ex && \ - # cp /app/scripts/docker/minify-docker.js /minifier/ && \ - # export PROJECT_ROOT=/app && \ - # node /minifier/minify-docker.js && \ - # rm -rf /app/node_modules /app/scripts && \ - # mv /app/app-minimal/node_modules /app/ && \ - # rm -rf /app/app-minimal && \ - npm run build && \ + pnpm build && \ + find /app/lib -mindepth 1 -not -path "/app/lib/assets*" -exec rm -rf {} \; 2>/dev/null || true && \ + cp /app/scripts/docker/minify-docker.js /minifier/ && \ + export PROJECT_ROOT=/app && \ + node /minifier/minify-docker.js && \ + rm -rf /app/node_modules /app/scripts && \ + mv /app/app-minimal/node_modules /app/ && \ + rm -rf /app/app-minimal && \ ls -la /app && \ du -hd1 /app diff --git a/scripts/docker/minify-docker.js b/scripts/docker/minify-docker.js index f40d1c81e3df..7890d454917a 100644 --- a/scripts/docker/minify-docker.js +++ b/scripts/docker/minify-docker.js @@ -1,25 +1,23 @@ /* eslint-disable no-console */ -const fs = require('fs-extra'); -const path = require('path'); -const { nodeFileTrace } = require('@vercel/nft'); +import fs from 'fs-extra'; +import path from 'node:path'; +import { nodeFileTrace } from '@vercel/nft'; // !!! if any new dependencies are added, update the Dockerfile !!! -const projectRoot = path.resolve(process.env.PROJECT_ROOT || path.join(__dirname, '../..')); +const projectRoot = path.resolve(process.env.PROJECT_ROOT || path.join(path.dirname(new URL(import.meta.url).pathname), '../..')); const resultFolder = path.join(projectRoot, 'app-minimal'); // no need to resolve, ProjectRoot is always absolute -const files = ['lib/index.ts', 'api/vercel.js'].map((file) => path.join(projectRoot, file)); +const files = ['dist/index.js', 'api/vercel.ts', 'node_modules/cross-env/src/bin/cross-env.js', 'node_modules/.bin/cross-env'].map((file) => path.join(projectRoot, file)); -(async () => { - console.log('Start analyzing, project root:', projectRoot); - const { fileList: fileSet } = await nodeFileTrace(files, { - base: projectRoot, - }); - let fileList = [...fileSet]; - console.log('Total touchable files:', fileList.length); - fileList = fileList.filter((file) => file.startsWith('node_modules/')); // only need node_modules - console.log('Total files need to be copied (touchable files in node_modules/):', fileList.length); - console.log('Start copying files, destination:', resultFolder); - return Promise.all(fileList.map((e) => fs.copy(path.join(projectRoot, e), path.join(resultFolder, e)))); -})().catch((error) => { +console.log('Start analyzing, project root:', projectRoot); +const { fileList: fileSet } = await nodeFileTrace(files, { + base: projectRoot, +}); +let fileList = [...fileSet]; +console.log('Total touchable files:', fileList.length); +fileList = fileList.filter((file) => file.startsWith('node_modules/')); // only need node_modules +console.log('Total files need to be copied (touchable files in node_modules/):', fileList.length); +console.log('Start copying files, destination:', resultFolder); +await Promise.all(fileList.map((e) => fs.copy(path.join(projectRoot, e), path.join(resultFolder, e)))).catch((error) => { // fix unhandled promise rejections console.error(error, error.stack); process.exit(1); From 0426a88fbdf208950c1fb0f995bfe62e8fc7d409 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 23 Apr 2025 03:03:18 +0800 Subject: [PATCH 0470/2658] =?UTF-8?q?feat(route):=20add=2010000=E4=B8=87?= =?UTF-8?q?=E8=81=94=E7=BD=91=20(#18913)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 10000万联网 * fix: remove esm shims --------- --- lib/routes/10000link/info.ts | 250 ++++++++++++++++++ lib/routes/10000link/namespace.ts | 9 + .../10000link/templates/description.art | 7 + 3 files changed, 266 insertions(+) create mode 100644 lib/routes/10000link/info.ts create mode 100644 lib/routes/10000link/namespace.ts create mode 100644 lib/routes/10000link/templates/description.art diff --git a/lib/routes/10000link/info.ts b/lib/routes/10000link/info.ts new file mode 100644 index 000000000000..a1b0b4b33a06 --- /dev/null +++ b/lib/routes/10000link/info.ts @@ -0,0 +1,250 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import { art } from '@/utils/render'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate, parseRelativeDate } from '@/utils/parse-date'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; +import path from 'node:path'; + +export const handler = async (ctx: Context): Promise => { + const { category = 'newslists', id } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const baseUrl: string = 'https://info.10000link.com'; + const targetUrl: string = new URL(`${category}.aspx${id ? `?chid=${id}` : ''}`, baseUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language = $('html').attr('lang') ?? 'zh'; + + let items: DataItem[] = []; + + items = $('ul.l_newshot li dl.lhotnew2') + .slice(0, limit) + .toArray() + .map((el): Element => { + const $el: Cheerio = $(el); + const $aEl: Cheerio = $el.find('dd h1 a'); + + const title: string = $aEl.attr('title') ?? $aEl.text(); + const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + intro: $el.find('dd.title_l').text(), + }); + const pubDateStr: string | undefined = $el.find('span.ymd_w').text(); + const linkUrl: string | undefined = $aEl.attr('href'); + const categoryEls: Element[] = $el.find('dd.day-lx span a').toArray(); + const categories: string[] = [...new Set(categoryEls.map((el) => $(el).text()).filter(Boolean))]; + const authors: DataItem['author'] = $el.find('dd.day-lx span').first().text(); + const image: string | undefined = $el.find('dt.img220 a img').attr('src'); + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? parseRelativeDate(pubDateStr) : undefined, + link: linkUrl ? new URL(linkUrl, baseUrl).href : undefined, + category: categories, + author: authors, + content: { + html: description, + text: description, + }, + image, + banner: image, + updated: upDatedStr ? parseRelativeDate(upDatedStr) : undefined, + language, + }; + + return processedItem; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async (): Promise => { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('div.entity_title h1 a').text(); + const image: string | undefined = $$('div.entity_thumb img.img-responsive').attr('src'); + + const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + images: image + ? [ + { + src: image, + alt: title, + }, + ] + : undefined, + description: $$('div.entity_content').html(), + }); + const pubDateStr: string | undefined = detailResponse.match(/var\stime\s=\s"(.*?)";/)?.[1]; + const categoryEls: Element[] = $$('div.entity_tag span a').toArray(); + const categories: string[] = [...new Set([...categoryEls.map((el) => $$(el).text()), ...(item.category ?? [])].filter(Boolean))]; + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? parseDate(pubDateStr) : item.pubDate, + category: categories, + content: { + html: description, + text: description, + }, + image, + banner: image, + updated: upDatedStr ? parseDate(upDatedStr) : item.updated, + language, + }; + + return { + ...item, + ...processedItem, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + const author: string = '10000万联网'; + const title: string = $('h1').contents().first().text(); + + return { + title: `${author} - ${title}`, + description: title, + link: targetUrl, + item: items, + allowEmpty: true, + image: $('a.navbar-brand img').attr('src') ? new URL($('a.navbar-brand img').attr('src') as string, baseUrl).href : undefined, + author, + language, + id: $('meta[property="og:url"]').attr('content'), + }; +}; + +export const route: Route = { + path: '/info/:category?/:id?', + name: '新闻', + url: 'info.10000link.com', + maintainers: ['nczitzk'], + handler, + example: '/10000link/info/newslists/My01', + parameters: { + category: { + description: '分类,默认为 `newslists`,可在对应分类页 URL 中找到', + options: [ + { + label: '新闻', + value: 'newslists', + }, + { + label: '物流', + value: 'newslogistics', + }, + { + label: '供应链金融风控', + value: 'newsRisk', + }, + { + label: '区块链', + value: 'newsBlockChain', + }, + { + label: 'B2B', + value: 'newsBTwoB', + }, + { + label: '跨境电商', + value: 'newsCrossborder', + }, + { + label: '投融资', + value: 'newsInvestment', + }, + { + label: '供应链管理', + value: 'newsManagement', + }, + { + label: '供应链创新', + value: 'newsInnovation', + }, + { + label: '数据', + value: 'newslists/A02', + }, + { + label: '政策', + value: 'newslists/A03', + }, + { + label: '规划', + value: 'newslists/A04', + }, + { + label: '案例', + value: 'newslists/GL03', + }, + { + label: '职场', + value: 'newslists/ZC', + }, + { + label: '供应链票据', + value: 'newsBill', + }, + ], + }, + id: { + description: 'ID,默认为空,可在对应分类页 URL 中找到', + }, + }, + description: `:::tip +若订阅 [天下大势](https://info.10000link.com/newslists.aspx?chid=My01),网址为 \`https://info.10000link.com/newslists.aspx?chid=My01\`,请截取 \`https://info.10000link.com/\` 到末尾 \`.aspx\` 的部分 \`newslists\` 作为 \`category\` 参数填入,而 \`My01\` 作为 \`id\` 参数填入,此时目标路由为 [\`/10000link/info/newslists/My01\`](https://rsshub.app/10000link/info/newslists/My01)。 +::: + +| 金融科技 | 物流 | 供应链金融风控 | 区块链 | B2B | +| ------------- | ------------- | -------------- | -------------- | --------- | +| newsFinancial | newslogistics | newsRisk | newsBlockChain | newsBTwoB | + +| 跨境电商 | 投融资 | 供应链管理 | 供应链创新 | 数据 | +| --------------- | -------------- | -------------- | -------------- | ------------- | +| newsCrossborder | newsInvestment | newsManagement | newsInnovation | newslists/A02 | + +| 政策 | 规划 | 案例 | 职场 | 供应链票据 | +| ------------- | ------------- | -------------- | ------------ | ---------- | +| newslists/A03 | newslists/A04 | newslists/GL03 | newslists/ZC | newsBill | +`, + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['info.10000link.com/:category'], + target: (params, url) => { + const urlObj: URL = new URL(url); + const id: string | undefined = urlObj.searchParams.get('chid') ?? undefined; + const category: string = params.category; + + return `/10000link/info${category ? `/${category}${id ? `/${id}` : ''}` : ''}`; + }, + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/10000link/namespace.ts b/lib/routes/10000link/namespace.ts new file mode 100644 index 000000000000..ed90dd8038f8 --- /dev/null +++ b/lib/routes/10000link/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '10000万联网', + url: '10000link.com', + categories: ['new-media'], + description: '', + lang: 'zh-CN', +}; diff --git a/lib/routes/10000link/templates/description.art b/lib/routes/10000link/templates/description.art new file mode 100644 index 000000000000..57498ab45a9d --- /dev/null +++ b/lib/routes/10000link/templates/description.art @@ -0,0 +1,7 @@ +{{ if intro }} +
{{ intro }}
+{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From 459760046b18f2bcb886a99623cacd70fa93f3a6 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 23 Apr 2025 03:20:35 +0800 Subject: [PATCH 0471/2658] feat(route): add AFL-CIO Blog (#18905) --- lib/routes/aflcio/blog.ts | 157 +++++++++++++++++++++++++++++++++ lib/routes/aflcio/namespace.ts | 9 ++ 2 files changed, 166 insertions(+) create mode 100644 lib/routes/aflcio/blog.ts create mode 100644 lib/routes/aflcio/namespace.ts diff --git a/lib/routes/aflcio/blog.ts b/lib/routes/aflcio/blog.ts new file mode 100644 index 000000000000..b6dbda09961c --- /dev/null +++ b/lib/routes/aflcio/blog.ts @@ -0,0 +1,157 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; + +export const handler = async (ctx: Context): Promise => { + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '5', 10); + + const baseUrl: string = 'https://aflcio.org'; + const targetUrl: string = new URL('blog', baseUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language = $('html').attr('lang') ?? 'en'; + + let items: DataItem[] = []; + + items = $('article.article') + .slice(0, limit) + .toArray() + .map((el): Element => { + const $el: Cheerio = $(el); + const $aEl: Cheerio = $el.find('header.container h1 a').first(); + + const title: string = $aEl.text(); + const description: string | undefined = $el.find('div.section').html() ?? ''; + const pubDateStr: string | undefined = $el.find('div.date-timeline time').attr('datetime'); + const linkUrl: string | undefined = $aEl.attr('href'); + const authorEls: Element[] = $el.find('div.date-timeline a.user').toArray(); + const authors: DataItem['author'] = authorEls.map((authorEl) => { + const $authorEl: Cheerio = $(authorEl); + + return { + name: $authorEl.text(), + url: $authorEl.attr('href') ? new URL($authorEl.attr('href') as string, baseUrl).href : undefined, + avatar: undefined, + }; + }); + const image: string | undefined = $el.find('div.section img').first().attr('src') ? new URL($el.find('div.section img').first().attr('src') as string, baseUrl).href : undefined; + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? parseDate(pubDateStr) : undefined, + link: linkUrl ? new URL(linkUrl, baseUrl).href : undefined, + author: authors, + content: { + html: description, + text: description, + }, + image, + banner: image, + updated: upDatedStr ? parseDate(upDatedStr) : undefined, + language, + }; + + return processedItem; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async (): Promise => { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('header.article-header h1').text(); + const description: string | undefined = $$('div.section-article-body').html() ?? ''; + const pubDateStr: string | undefined = $$('time').attr('datetime'); + const authorEls: Element[] = $$('div.byline a[property="schema:name"]').toArray(); + const authors: DataItem['author'] = authorEls.map((authorEl) => { + const $$authorEl: Cheerio = $$(authorEl); + + return { + name: $$authorEl.text(), + url: $$authorEl.attr('href') ? new URL($$authorEl.attr('href') as string, baseUrl).href : undefined, + avatar: undefined, + }; + }); + const image: string | undefined = $$('meta[property="og:image"]').attr('content'); + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? parseDate(pubDateStr) : item.pubDate, + author: authors, + content: { + html: description, + text: description, + }, + image, + banner: image, + updated: upDatedStr ? parseDate(upDatedStr) : item.updated, + language, + }; + + return { + ...item, + ...processedItem, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + const title: string = $('title').text(); + + return { + title, + description: title, + link: targetUrl, + item: items, + allowEmpty: true, + image: $('img.main-logo').attr('src') ? new URL($('img.main-logo').attr('src') as string, baseUrl).href : undefined, + author: title.split(/\|/).pop(), + language, + id: targetUrl, + }; +}; + +export const route: Route = { + path: '/blog', + name: 'Blog', + url: 'aflcio.org', + maintainers: ['nczitzk'], + handler, + example: '/aflcio/blog', + parameters: undefined, + description: undefined, + categories: ['other'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['aflcio.org/blog'], + target: '/blog', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/aflcio/namespace.ts b/lib/routes/aflcio/namespace.ts new file mode 100644 index 000000000000..0ac32675699b --- /dev/null +++ b/lib/routes/aflcio/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AFL-CIO', + url: 'aflcio.org', + categories: ['other'], + description: '', + lang: 'en', +}; From 3c8589b80e858f9e8d62d90af08a9b455c3ff2ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 08:14:49 +0000 Subject: [PATCH 0472/2658] chore(deps): bump tldts from 7.0.1 to 7.0.2 (#18919) Bumps [tldts](https://github.com/remusao/tldts) from 7.0.1 to 7.0.2. - [Release notes](https://github.com/remusao/tldts/releases) - [Changelog](https://github.com/remusao/tldts/blob/master/CHANGELOG.md) - [Commits](https://github.com/remusao/tldts/compare/v7.0.1...v7.0.2) --- updated-dependencies: - dependency-name: tldts dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 9885c5a7d782..1f9eb794b077 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "telegram": "2.26.22", "tiny-async-pool": "2.1.0", "title": "4.0.1", - "tldts": "7.0.1", + "tldts": "7.0.2", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.1.2", "tsx": "4.19.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1cda9d1e85f6..fa750565a0ab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -246,8 +246,8 @@ importers: specifier: 4.0.1 version: 4.0.1 tldts: - specifier: 7.0.1 - version: 7.0.1 + specifier: 7.0.2 + version: 7.0.2 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5920,15 +5920,15 @@ packages: tldts-core@6.1.86: resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} - tldts-core@7.0.1: - resolution: {integrity: sha512-EwrnW4fkFuTgNBPOI3i/j8168ftqogsIQG2IYz69KfF8XOjPy5O+nzu6Ep7kaugpdZrN2Y951VzAVSt/hbYp2g==} + tldts-core@7.0.2: + resolution: {integrity: sha512-F1jRaje70QJ03A6UOSNpjs43Jnn5VRb+namtC5UW6lWQ/IHck6EQe9QWRb8NiQMMnejeE5u8kRSPU+lcVArXRw==} - tldts@6.1.85: - resolution: {integrity: sha512-gBdZ1RjCSevRPFix/hpaUWeak2/RNUZB4/8frF1r5uYMHjFptkiT0JXIebWvgI/0ZHXvxaUDDJshiA0j6GdL3w==} + tldts@6.1.86: + resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} hasBin: true - tldts@7.0.1: - resolution: {integrity: sha512-C3TdHZKykiDkxPIKUYCDWyYpcLQ8bDYvF/RGfH66UikQX3Kro7ij2/WGNYgp5EfxXB4+Tu5H728uAgYGNE1eaQ==} + tldts@7.0.2: + resolution: {integrity: sha512-v9XLuX1c2rjgHp7z3QroPN3tJ70STEdB7ngN43kzoEHElswzEmIL9dCo3itEVrI+JFK15IGtUqOcb410z1tBKQ==} hasBin: true tmp@0.0.33: @@ -12510,15 +12510,15 @@ snapshots: tldts-core@6.1.86: {} - tldts-core@7.0.1: {} + tldts-core@7.0.2: {} - tldts@6.1.85: + tldts@6.1.86: dependencies: tldts-core: 6.1.86 - tldts@7.0.1: + tldts@7.0.2: dependencies: - tldts-core: 7.0.1 + tldts-core: 7.0.2 tmp@0.0.33: dependencies: @@ -12554,7 +12554,7 @@ snapshots: tough-cookie@5.1.2: dependencies: - tldts: 6.1.85 + tldts: 6.1.86 tr46@0.0.3: {} From 7584f32f82d138a072e4f55fc024d5234fcfc101 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 08:15:52 +0000 Subject: [PATCH 0473/2658] chore(deps-dev): bump tsdown from 0.9.2 to 0.9.5 (#18920) Bumps [tsdown](https://github.com/rolldown/tsdown) from 0.9.2 to 0.9.5. - [Release notes](https://github.com/rolldown/tsdown/releases) - [Commits](https://github.com/rolldown/tsdown/compare/v0.9.2...v0.9.5) --- updated-dependencies: - dependency-name: tsdown dependency-version: 0.9.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 262 ++++++++++++++++++++++++------------------------- 2 files changed, 130 insertions(+), 134 deletions(-) diff --git a/package.json b/package.json index 1f9eb794b077..c1517746a27d 100644 --- a/package.json +++ b/package.json @@ -193,7 +193,7 @@ "prettier": "3.5.3", "remark-parse": "11.0.0", "supertest": "7.1.0", - "tsdown": "0.9.2", + "tsdown": "0.9.5", "typescript": "5.8.3", "unified": "11.0.5", "vite-tsconfig-paths": "5.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fa750565a0ab..2ca1fa229c61 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -442,8 +442,8 @@ importers: specifier: 7.1.0 version: 7.1.0 tsdown: - specifier: 0.9.2 - version: 0.9.2(typescript@5.8.3) + specifier: 0.9.5 + version: 0.9.5(typescript@5.8.3) typescript: specifier: 5.8.3 version: 5.8.3 @@ -1935,74 +1935,71 @@ packages: cpu: [x64] os: [win32] - '@oxc-project/types@0.64.0': - resolution: {integrity: sha512-B0dxuEZFV6M4tXjPFwDSaED5/J55YUhODBaF09xNFNRrEyzQLKZuhKXAw1xYK8bO4K8Jn1d21TZfei3kAIE8dA==} - '@oxc-project/types@0.65.0': resolution: {integrity: sha512-7MpMzyXCcwxrTxJ4L0siy63Ds/LA8LAM4szumTFiynxTJkfrIZEV4PyR4Th0CqFZQ+oNi8WvW3Dr1MLy7o9qPQ==} - '@oxc-resolver/binding-darwin-arm64@5.3.0': - resolution: {integrity: sha512-hXem5ZAguS7IlSiHg/LK0tEfLj4eUo+9U6DaFwwBEGd0L0VIF9LmuiHydRyOrdnnmi9iAAFMAn/wl2cUoiuruA==} + '@oxc-resolver/binding-darwin-arm64@6.0.0': + resolution: {integrity: sha512-GKsfwUPgo4CjJioksA+DVEILT0aWhrbTBKHTiEvkTNC+bsafttSm0xqrIutCQqfqwuSa+Uj0VHylmL3Vv0F/7g==} cpu: [arm64] os: [darwin] - '@oxc-resolver/binding-darwin-x64@5.3.0': - resolution: {integrity: sha512-wgSwfsZkRbuYCIBLxeg1bYrtKnirAy+IJF0lwfz4z08clgdNBDbfGECJe/cd0csIZPpRcvPFe8317yf31sWhtA==} + '@oxc-resolver/binding-darwin-x64@6.0.0': + resolution: {integrity: sha512-hwKfm4aT4SLuTkdF2NDYqYEnE9+m4emXLfFZ7D1mTIRul8If/fJop4I4YuIDrJfHVLQmSkpbPbI16XrNK3TftA==} cpu: [x64] os: [darwin] - '@oxc-resolver/binding-freebsd-x64@5.3.0': - resolution: {integrity: sha512-kzeE2WHgcRMmWjB071RdwEV5Pwke4o0WWslCKoh8if1puvxIxfzu3o7g6P2+v77BP5qop4cri+uvLABSO0WZjg==} + '@oxc-resolver/binding-freebsd-x64@6.0.0': + resolution: {integrity: sha512-ZxFpS90awfLxWW0JqWFWO71p73SGWKhuocOMNQV30MtKZx5fX4lemnNl92Lr6Hvqg4egeSsPO5SGZbnMD5YShw==} cpu: [x64] os: [freebsd] - '@oxc-resolver/binding-linux-arm-gnueabihf@5.3.0': - resolution: {integrity: sha512-I8np34yZP/XfIkZNDbw3rweqVgfjmHYpNX3xnJZWg+f4mgO9/UNWBwetSaqXeDZqvIch/aHak+q4HVrQhQKCqg==} + '@oxc-resolver/binding-linux-arm-gnueabihf@6.0.0': + resolution: {integrity: sha512-ztc09+LDBxbAfndqTSvzz4KqN2fRRDCjj1eDRBGZMF5zQu/ThasERwh1ZzRp3sGZGRroZLQRCJunstS5OJKpww==} cpu: [arm] os: [linux] - '@oxc-resolver/binding-linux-arm64-gnu@5.3.0': - resolution: {integrity: sha512-u2ndfeEUrW898eXM+qPxIN8TvTPjI90NDQBRgaxxkOfNw3xaotloeiZGz5+Yzlfxgvxr9DY9FdYkqhUhSnGhOw==} + '@oxc-resolver/binding-linux-arm64-gnu@6.0.0': + resolution: {integrity: sha512-+x1xrEm2G/aOlTMzH3p53ayEEOCTFh4+H5EazdA1ljJP8m/ztrhtZGAo95dclYrCsRNP6KuVmIpw0Y4/RZT7EQ==} cpu: [arm64] os: [linux] - '@oxc-resolver/binding-linux-arm64-musl@5.3.0': - resolution: {integrity: sha512-TzbjmFkcnESGuVItQ2diKacX8vu5G0bH3BHmIlmY4OSRLyoAlrJFwGKAHmh6C9+Amfcjo2rx8vdm7swzmsGC6Q==} + '@oxc-resolver/binding-linux-arm64-musl@6.0.0': + resolution: {integrity: sha512-jgo0lz1569+yGpcZCjh0/wzgbvekTAaOB5JaOOWtgh7jvuVDIo6+m884Pf9V5U3Z2VLZts4J+e8hA1urA9Y1lg==} cpu: [arm64] os: [linux] - '@oxc-resolver/binding-linux-riscv64-gnu@5.3.0': - resolution: {integrity: sha512-NH3pjAqh8nuN29iRuRfTY42Vn03ctoR9VE8llfoUKUfhHUjFHYOXK5VSkhjj1usG8AeuesvqrQnLptCRQVTi/Q==} + '@oxc-resolver/binding-linux-riscv64-gnu@6.0.0': + resolution: {integrity: sha512-uEhw/2oSnBp5PNv6sBev1koH4thSy1eH8LA6N3gAklrznqhFNqqvmXjlKZm9ek3bVFG44Hlx9BS5/tT0hXPbqA==} cpu: [riscv64] os: [linux] - '@oxc-resolver/binding-linux-s390x-gnu@5.3.0': - resolution: {integrity: sha512-tuZtkK9sJYh2MC2uhol1M/8IMTB6ZQ5jmqP2+k5XNXnOb/im94Y5uV/u2lXwVyIuKHZZHtr+0d1HrOiNahoKpw==} + '@oxc-resolver/binding-linux-s390x-gnu@6.0.0': + resolution: {integrity: sha512-QR8d1f58XyTlkbATYxo2XhqyBNVT/Ma+z5dDvmjyYMa2S9u5yHKOch10I9fx/kLjRqfHzpl2H32NwwBnkaTzzg==} cpu: [s390x] os: [linux] - '@oxc-resolver/binding-linux-x64-gnu@5.3.0': - resolution: {integrity: sha512-VzhPYmZCtoES/ThcPdGSmMop7JlwgqtSvlgtKCW15ByV2JKyl8kHAHnPSBfpIooXb0ehFnRdxFtL9qtAEWy01g==} + '@oxc-resolver/binding-linux-x64-gnu@6.0.0': + resolution: {integrity: sha512-CBp1yw8/jBhMuJnye1DJNUx1Rvpw4Zur4QqtjXXa+0kzTXr4qSsEsrdZj2p4USBQX/ComtK4UVPX4FqDj6VR0Q==} cpu: [x64] os: [linux] - '@oxc-resolver/binding-linux-x64-musl@5.3.0': - resolution: {integrity: sha512-Hi39cWzul24rGljN4Vf1lxjXzQdCrdxO5oCT7KJP4ndSlqIUODJnfnMAP1YhcnIRvNvk+5E6sZtnEmFUd/4d8Q==} + '@oxc-resolver/binding-linux-x64-musl@6.0.0': + resolution: {integrity: sha512-FM3bdl0ZfjGnHsFLUSPny9H8nsFXYXEVaD5juOnBW+RIcxN6tS9atzmki5ZmeTqgyDLZ68pM//b/UlI4V0GGvA==} cpu: [x64] os: [linux] - '@oxc-resolver/binding-wasm32-wasi@5.3.0': - resolution: {integrity: sha512-ddujvHhP3chmHnSXRlkPVUeYj4/B7eLZwL4yUid+df3WCbVh6DgoT9RmllZn21AhxgKtMdekDdyVJYKFd8tl4A==} + '@oxc-resolver/binding-wasm32-wasi@6.0.0': + resolution: {integrity: sha512-FLk/ip9wCbbeqBJAXCGmmZCMDNa9wT/Kbw1m5xWcMYy88Z65/zuAQs7Gg/okm77X/DE1ZJ766bnC3Cmz6SmWaA==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@oxc-resolver/binding-win32-arm64-msvc@5.3.0': - resolution: {integrity: sha512-j1YYPLvUkMVNKmIFQZZJ7q6Do4cI3htUnyxNLwDSBVhSohvPIK2VG+IdtOAlWZGa7v+phEZsHfNbXVwB0oPYFQ==} + '@oxc-resolver/binding-win32-arm64-msvc@6.0.0': + resolution: {integrity: sha512-WEF2dSpwF5MEN1Zt/+dCCWpWXxsZTPPZPJXARV/1SP0ul9N0oijYyWO+8WYE0qREU8B0Toh/YGkA/wLSui3eRg==} cpu: [arm64] os: [win32] - '@oxc-resolver/binding-win32-x64-msvc@5.3.0': - resolution: {integrity: sha512-LT9eOPPUqfZscQRd5mc08RBeDWOQf+dnOrKnanMallTGPe6g7+rcAlFTA8SWoJbcD45PV8yArFtCmSQSpzHZmg==} + '@oxc-resolver/binding-win32-x64-msvc@6.0.0': + resolution: {integrity: sha512-eTn8RUr6D2C+BGPG0ECtsqvUo8B+HvkhTkBG0Jel/7DqU+WCTNOT64+Ww9ZUhQxPJKa4laR9Zyu5yo/SaF6qPQ==} cpu: [x64] os: [win32] @@ -2141,63 +2138,63 @@ packages: resolution: {integrity: sha512-ezIadUb1aFhwJLd++WVqVpi9rnlX8vnd4ju7saPhwLHJN1mJgOv0puePTGV+FbtSnWtwoHDT8lAm4kagDZmpCg==} engines: {node: '>=20.0.0'} - '@rolldown/binding-darwin-arm64@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-xPPvKH8KNHdFF0yJ7oiUBCbypO7kFHjRMZGO463bLG/BrnOAXSTSYxVrRLrR3RzEw7tNfp6Sd5bLLD0vb+tboQ==} + '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-KiqsE9kggNS4leGcddr//NuRl/JvZM28i7F8M+VhSqY/bZTIWlt3oFXCek6XXEymYl2y0INOLC/CoDwR4+GaXw==} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-66ogat51jFTRLuz0gHx5Idfl+O7XX400iTZJWVBqdyBLccDLODqhuFGyzGHA6L5O1iE/fktUr7eEGSXfkl8vhg==} + '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-WbRbGVBg91UvAbaTEl+Ls5GBy7o+JdUL6sCoLJfswN+BK8Cm9wpt/yWV2wyavDwPKj5XsPGiJz1dycskUQNorA==} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-i3n2fXT31WyyJjN7uKbYeBLBBUZl1G9LXINlM7+93kI+4BnqITNNtxZwFrlj87jkrQSvfamfYFrXYb7VP/kIxw==} + '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-rpj4YX1GQNcgcPgWqlVzeD780+WX8NySFwwcJwtTa01v+mxIaQlKo3ePx8lA4zigxqFJ/l75D5WPnqjeweScbQ==} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-OA6OsIUCRWXuMvD6Y8+ffRXcgYmqbPWoiKhCy28/SzxudPpNE77UbTXt1kL68+5XSJD1cmTujN3OlBN8yoRaXw==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-3T0WAMasPY1UMO5YMw9fEoXC0d3/1YC81vbWYtUZ09x0Vst8fYbKMF1ffcfMxhAusOycnIi3DaxRBYELbGkncQ==} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-Bzfq2bdUb24KvVvke/TS001RAn0Mg6zmvHQTaPaNQw+r2NuX9VsNfttoKcyYv9TMBrzZbgp1uNABClQeOoQ+uA==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-TgXMBw4YjxO07sKxmHN6nWNhKz4YcZwVvy9z1SD47W2XPstlgfVGMknCLizObjYE+J+89vtTf0N1KGTn+EMnVg==} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-2fUL+BQas1tXX70hp/a3usMpI7Dm/VsCevU9iSxuJ2tygM/xv2+AEHwUJMZti3rrQSFEKw5QsSC2fphk4NU9bQ==} + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-9xJlz3mq4YgWm6OgZYOS6uLzOPyzev6J4P02tvCcywOw7+BUvW1Rol/KU1XKh856QBhdpUaDgCeokp2pUQZN7A==} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-vXMaxGcHudEG/WJyBey85cmmo2LO/KE7WhidU92/2mN7EQiv5dbimm+s7Q4Qa8OJ5YU1/geU329m4gI3CRFO1g==} + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-7EaxDAjkHyi8Z7AtMaGrFroK2oppJVWcgc9IFrffUVG3jTr3IFRMAFRA1xYl4LvZalsvAzAeKN+WREEVkLpb5g==} cpu: [x64] os: [linux] - '@rolldown/binding-linux-x64-musl@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-aLmF2zHrG/yEfH6spsVBYnwnGiUWcaoBp9mzq4r2yXWnJ6YSXB5CSn6Abk/NsyQ15Wdsx5PNCUMchk03AiFa+w==} + '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-ncIxlyZQnMUJQrwtHOQa83Qb7fmMHDiq6dKQShMsV3E2aTUVgr3dsdLyn/rgCb6nuAz5QiYq83NuHCrF/REDhg==} cpu: [x64] os: [linux] - '@rolldown/binding-wasm32-wasi@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-Y/8aOps6v3ecLqV5GlpCb4RfaKhMBKG2alWJEH+2tP63IspFI17fWK6Q7Xa2ebPmxIAALa2ZtIgyH1SKnI0d9Q==} + '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-8Fin+3TTrz6+a++rmgLsPEq6iWmyL3hbL7UdcqONmLOsWq5+gAM+2+hXpZRmNFSNLwx5aqBa9OCaix2y2ZYbtA==} engines: {node: '>=14.21.3'} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-syFlEaxhCcsbRnN7Z893OKZbItQUT4XSx4bSEQ6idgMVKGATx0JlHPnKdsO8SRFLZgDgOwQr3koeJO1eGYR0Cw==} + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-vxoQB/FBxOcN8wRGmTU5weShysSb1SXKabUB775bGLKJxM2+nSRYsb6zjmKz4pRTnCRwbkyiKZo/DgImSPjY4g==} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-+F0YfnIeeVgHmkZg1mEqJKRVTz1f8/mYNg0RyiBm1UfsKjLNFatiG+tZRJU1GKxtIJeQzcwggBaqP9mY+k3uQA==} + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-aKyiDD06tEDFXU2aDeShNU3vq/tiQWCXw8JKL8t877qzEb2kq9/hrynClUBXod7cQ7jo3O6fPgoehsTldiwwzQ==} cpu: [ia32] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.7-commit.c2596d3': - resolution: {integrity: sha512-vl9SiHViixGsreAF5j/B9fDlB02UseGUCrfPXU7hMJgd/xWCZJ3VhRS5X49udacx7sGtOdH20hjr6lVSXDfyIg==} + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.d984417': + resolution: {integrity: sha512-83HfjclfBUio2s03OaNCzH+9U238+QHxMSIZrRA6UF0bS1I0MhnGkP6KtygXeseY2zGLOuUYc0GtGJKIq85b3g==} cpu: [x64] os: [win32] @@ -3411,8 +3408,8 @@ packages: resolution: {integrity: sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==} engines: {node: '>=6'} - dts-resolver@1.0.0: - resolution: {integrity: sha512-BTW78HXK66TvRHBRkU91a7CGoD5/PWi8ovMXbKVHjhR5xCqt1dgwl6CVk3wxWLzhNVIGXDbGWPBlRKrgSHMzfw==} + dts-resolver@1.0.1: + resolution: {integrity: sha512-t+NRUvrugV5KfFibjlCmIWT1OBnCoPbl8xvxISGIlJy76IvNXwgTWo2FywUuJTBc6yyUWde9PORHqczyP1GTIA==} engines: {node: '>=20.18.0'} eastasianwidth@0.2.0: @@ -5033,8 +5030,8 @@ packages: resolution: {integrity: sha512-2u3iUChO386K2sBBxTPCKweoJfbo4qLGfOJN964yEg6KmHadp4daWklhS56UUaHT2Qj057brG/G7WuyIP10lUg==} engines: {node: '>=14.0.0'} - oxc-resolver@5.3.0: - resolution: {integrity: sha512-FHqtZx0idP5QRPSNcI5g2ItmADg7fhR3XIeWg5eRMGfp44xqRpfkdvo+EX4ZceqV9bxvl0Z8vaqMqY0gYaNYNA==} + oxc-resolver@6.0.0: + resolution: {integrity: sha512-XbjFKJrpQiVl4XlJE44ly+fNdV5+adm8b/Ax9EIGYpA160PVgYVRUfmdYD1SHOO8z1oZ+CFNZ4/A3EUrNP+/cA==} oxc-transform@0.65.0: resolution: {integrity: sha512-TWAMi8zVvORQw545O1/1irpbMPDQGD6ernen5QyY5PCL9nj3RqgR1ULlQiHVDXEl2rW+OtHF8KS0ItAUyOfQ+Q==} @@ -5542,11 +5539,11 @@ packages: typescript: optional: true - rolldown@1.0.0-beta.7-commit.c2596d3: - resolution: {integrity: sha512-FFjtajrWaIDa9hM+gCSF58ys3scTuMxRNhzwhb6ADGBFzfFARjXOIj+1sPIcN/dTgPkYDjfuWAtIVQxDWTA7hg==} + rolldown@1.0.0-beta.8-commit.d984417: + resolution: {integrity: sha512-bQb5n/r4k5f3pXIc/dVSCpzsSG/s8GIL/01K2ZNriaLpHX/1omU98ttc8dMhe1qvEXTtZKSJXBr+bksn6+BKcA==} hasBin: true peerDependencies: - '@oxc-project/runtime': 0.64.0 + '@oxc-project/runtime': 0.65.0 peerDependenciesMeta: '@oxc-project/runtime': optional: true @@ -6009,8 +6006,8 @@ packages: typescript: optional: true - tsdown@0.9.2: - resolution: {integrity: sha512-B0Vfgsi2Jcpa5MPGtx5z6W+HTj3xv+tPsukS4FfnX5+dwzuQUjgB2fbaM/IIYJGH2YZY2Hjb+TEZoQZ5MrefCw==} + tsdown@0.9.5: + resolution: {integrity: sha512-Bx0A0T0obQ43G/hU/gOayb7mq8jEMQtr4w8wOxxJHl/BmhZ4Wdt5OhgO35pS4G9XLb7jgz1IeUmGsK+ujP0d/Q==} engines: {node: '>=18.0.0'} hasBin: true peerDependencies: @@ -6098,8 +6095,8 @@ packages: unbzip2-stream@1.4.3: resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} - unconfig@7.3.1: - resolution: {integrity: sha512-LH5WL+un92tGAzWS87k7LkAfwpMdm7V0IXG2FxEjZz/QxiIW5J5LkcrKQThj0aRz6+h/lFmKI9EUXmK/T0bcrw==} + unconfig@7.3.2: + resolution: {integrity: sha512-nqG5NNL2wFVGZ0NA/aCFw0oJ2pxSf1lwg4Z5ill8wd7K4KX/rQbHlwbh+bjctXL5Ly1xtzHenHGOK0b+lG6JVg==} undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} @@ -8083,49 +8080,47 @@ snapshots: '@oxc-parser/binding-win32-x64-msvc@0.65.0': optional: true - '@oxc-project/types@0.64.0': {} - '@oxc-project/types@0.65.0': {} - '@oxc-resolver/binding-darwin-arm64@5.3.0': + '@oxc-resolver/binding-darwin-arm64@6.0.0': optional: true - '@oxc-resolver/binding-darwin-x64@5.3.0': + '@oxc-resolver/binding-darwin-x64@6.0.0': optional: true - '@oxc-resolver/binding-freebsd-x64@5.3.0': + '@oxc-resolver/binding-freebsd-x64@6.0.0': optional: true - '@oxc-resolver/binding-linux-arm-gnueabihf@5.3.0': + '@oxc-resolver/binding-linux-arm-gnueabihf@6.0.0': optional: true - '@oxc-resolver/binding-linux-arm64-gnu@5.3.0': + '@oxc-resolver/binding-linux-arm64-gnu@6.0.0': optional: true - '@oxc-resolver/binding-linux-arm64-musl@5.3.0': + '@oxc-resolver/binding-linux-arm64-musl@6.0.0': optional: true - '@oxc-resolver/binding-linux-riscv64-gnu@5.3.0': + '@oxc-resolver/binding-linux-riscv64-gnu@6.0.0': optional: true - '@oxc-resolver/binding-linux-s390x-gnu@5.3.0': + '@oxc-resolver/binding-linux-s390x-gnu@6.0.0': optional: true - '@oxc-resolver/binding-linux-x64-gnu@5.3.0': + '@oxc-resolver/binding-linux-x64-gnu@6.0.0': optional: true - '@oxc-resolver/binding-linux-x64-musl@5.3.0': + '@oxc-resolver/binding-linux-x64-musl@6.0.0': optional: true - '@oxc-resolver/binding-wasm32-wasi@5.3.0': + '@oxc-resolver/binding-wasm32-wasi@6.0.0': dependencies: '@napi-rs/wasm-runtime': 0.2.9 optional: true - '@oxc-resolver/binding-win32-arm64-msvc@5.3.0': + '@oxc-resolver/binding-win32-arm64-msvc@6.0.0': optional: true - '@oxc-resolver/binding-win32-x64-msvc@5.3.0': + '@oxc-resolver/binding-win32-x64-msvc@6.0.0': optional: true '@oxc-transform/binding-darwin-arm64@0.65.0': @@ -8256,42 +8251,42 @@ snapshots: dependencies: quansync: 0.2.10 - '@rolldown/binding-darwin-arm64@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.d984417': optional: true - '@rolldown/binding-darwin-x64@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.d984417': optional: true - '@rolldown/binding-freebsd-x64@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.d984417': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.d984417': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.d984417': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.d984417': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.d984417': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.d984417': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.d984417': dependencies: '@napi-rs/wasm-runtime': 0.2.9 optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.d984417': optional: true - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.d984417': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.7-commit.c2596d3': + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.d984417': optional: true '@rollup/pluginutils@5.1.4(rollup@4.37.0)': @@ -9578,9 +9573,9 @@ snapshots: dotenv@6.2.0: {} - dts-resolver@1.0.0: + dts-resolver@1.0.1: dependencies: - oxc-resolver: 5.3.0 + oxc-resolver: 6.0.0 pathe: 2.0.3 eastasianwidth@0.2.0: {} @@ -10023,7 +10018,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.4.0 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -11510,21 +11505,21 @@ snapshots: '@oxc-parser/binding-win32-arm64-msvc': 0.65.0 '@oxc-parser/binding-win32-x64-msvc': 0.65.0 - oxc-resolver@5.3.0: + oxc-resolver@6.0.0: optionalDependencies: - '@oxc-resolver/binding-darwin-arm64': 5.3.0 - '@oxc-resolver/binding-darwin-x64': 5.3.0 - '@oxc-resolver/binding-freebsd-x64': 5.3.0 - '@oxc-resolver/binding-linux-arm-gnueabihf': 5.3.0 - '@oxc-resolver/binding-linux-arm64-gnu': 5.3.0 - '@oxc-resolver/binding-linux-arm64-musl': 5.3.0 - '@oxc-resolver/binding-linux-riscv64-gnu': 5.3.0 - '@oxc-resolver/binding-linux-s390x-gnu': 5.3.0 - '@oxc-resolver/binding-linux-x64-gnu': 5.3.0 - '@oxc-resolver/binding-linux-x64-musl': 5.3.0 - '@oxc-resolver/binding-wasm32-wasi': 5.3.0 - '@oxc-resolver/binding-win32-arm64-msvc': 5.3.0 - '@oxc-resolver/binding-win32-x64-msvc': 5.3.0 + '@oxc-resolver/binding-darwin-arm64': 6.0.0 + '@oxc-resolver/binding-darwin-x64': 6.0.0 + '@oxc-resolver/binding-freebsd-x64': 6.0.0 + '@oxc-resolver/binding-linux-arm-gnueabihf': 6.0.0 + '@oxc-resolver/binding-linux-arm64-gnu': 6.0.0 + '@oxc-resolver/binding-linux-arm64-musl': 6.0.0 + '@oxc-resolver/binding-linux-riscv64-gnu': 6.0.0 + '@oxc-resolver/binding-linux-s390x-gnu': 6.0.0 + '@oxc-resolver/binding-linux-x64-gnu': 6.0.0 + '@oxc-resolver/binding-linux-x64-musl': 6.0.0 + '@oxc-resolver/binding-wasm32-wasi': 6.0.0 + '@oxc-resolver/binding-win32-arm64-msvc': 6.0.0 + '@oxc-resolver/binding-win32-x64-msvc': 6.0.0 oxc-transform@0.65.0: optionalDependencies: @@ -11759,7 +11754,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.3 - debug: 4.3.4 + debug: 4.4.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 @@ -12070,39 +12065,39 @@ snapshots: dependencies: glob: 10.4.5 - rolldown-plugin-dts@0.8.3(rolldown@1.0.0-beta.7-commit.c2596d3(typescript@5.8.3))(typescript@5.8.3): + rolldown-plugin-dts@0.8.3(rolldown@1.0.0-beta.8-commit.d984417(typescript@5.8.3))(typescript@5.8.3): dependencies: debug: 4.4.0 - dts-resolver: 1.0.0 + dts-resolver: 1.0.1 get-tsconfig: 4.10.0 magic-string-ast: 0.9.1 oxc-parser: 0.65.0 oxc-transform: 0.65.0 - rolldown: 1.0.0-beta.7-commit.c2596d3(typescript@5.8.3) + rolldown: 1.0.0-beta.8-commit.d984417(typescript@5.8.3) optionalDependencies: typescript: 5.8.3 transitivePeerDependencies: - supports-color - rolldown@1.0.0-beta.7-commit.c2596d3(typescript@5.8.3): + rolldown@1.0.0-beta.8-commit.d984417(typescript@5.8.3): dependencies: - '@oxc-project/types': 0.64.0 + '@oxc-project/types': 0.65.0 '@valibot/to-json-schema': 1.0.0(valibot@1.0.0(typescript@5.8.3)) ansis: 3.17.0 valibot: 1.0.0(typescript@5.8.3) optionalDependencies: - '@rolldown/binding-darwin-arm64': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-darwin-x64': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.7-commit.c2596d3 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.7-commit.c2596d3 + '@rolldown/binding-darwin-arm64': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-darwin-x64': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.8-commit.d984417 transitivePeerDependencies: - typescript @@ -12582,7 +12577,7 @@ snapshots: optionalDependencies: typescript: 5.8.3 - tsdown@0.9.2(typescript@5.8.3): + tsdown@0.9.5(typescript@5.8.3): dependencies: ansis: 3.17.0 cac: 6.7.14 @@ -12591,11 +12586,12 @@ snapshots: debug: 4.4.0 diff: 7.0.0 find-up-simple: 1.0.1 - rolldown: 1.0.0-beta.7-commit.c2596d3(typescript@5.8.3) - rolldown-plugin-dts: 0.8.3(rolldown@1.0.0-beta.7-commit.c2596d3(typescript@5.8.3))(typescript@5.8.3) + hookable: 5.5.3 + rolldown: 1.0.0-beta.8-commit.d984417(typescript@5.8.3) + rolldown-plugin-dts: 0.8.3(rolldown@1.0.0-beta.8-commit.d984417(typescript@5.8.3))(typescript@5.8.3) tinyexec: 1.0.1 tinyglobby: 0.2.13 - unconfig: 7.3.1 + unconfig: 7.3.2 transitivePeerDependencies: - '@oxc-project/runtime' - supports-color @@ -12661,7 +12657,7 @@ snapshots: buffer: 5.7.1 through: 2.3.8 - unconfig@7.3.1: + unconfig@7.3.2: dependencies: '@quansync/fs': 0.1.2 defu: 6.1.4 From 3ff7c135cc600fc0a4d94abc0ea5258468e5bdb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 08:17:21 +0000 Subject: [PATCH 0474/2658] chore(deps): bump @scalar/hono-api-reference from 0.8.2 to 0.8.3 (#18921) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.8.2 to 0.8.3. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-version: 0.8.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index c1517746a27d..c6be54aba923 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.32.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.8.2", + "@scalar/hono-api-reference": "0.8.3", "@sentry/node": "9.13.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2ca1fa229c61..877d2fb1eb4f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.8.2 - version: 0.8.2(hono@4.7.7) + specifier: 0.8.3 + version: 0.8.3(hono@4.7.7) '@sentry/node': specifier: 9.13.0 version: 9.13.0 @@ -2316,12 +2316,12 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/core@0.2.8': - resolution: {integrity: sha512-4WjhJl0hJGgPGznmRvMFscY4ZMRbXgfEAsDGWl9eVqE/ZdXFxnoY2LsGhBALSKEYfwgNwLzk3A+0bCv2oU6N7g==} + '@scalar/core@0.2.9': + resolution: {integrity: sha512-jiUVjN2EubmhitkiXdVxqpkuEbo3e4gQLjla4NfIjgvkJFwF5FmMXQQK6m5AQ5SUgvMCK6hskVMeIYx9bhsgaQ==} engines: {node: '>=18'} - '@scalar/hono-api-reference@0.8.2': - resolution: {integrity: sha512-sgNtRst9KTamZMxE66fuIczgTsG7Yeputoelvxw/O+5dcN4KPeZ8ac67aqFH9sG1t+bbQyxqZ+qn+6ESoZMJQw==} + '@scalar/hono-api-reference@0.8.3': + resolution: {integrity: sha512-TIyna7k/b9zq7HR4xN7PPlN+3zKgmbF4zfyMZGS8xMTORIY7r3K9Puta0d30p48ZeTM0Jvwad0hxnaGEZstAsw==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -2330,8 +2330,8 @@ packages: resolution: {integrity: sha512-waiKk12cRCqyUCWTOX0K1WEVX46+hVUK+zRPzAahDJ7G0TApvbNkuy5wx7aoUyEk++HHde0XuQnshXnt8jsddA==} engines: {node: '>=18'} - '@scalar/types@0.1.8': - resolution: {integrity: sha512-VL1dcLB6w7V0htFxIgcdQeQhD5LFW1oqWk9ZWfzd9Ekl0a3bDGc81R5S3fk6qCHahPZR3cVPr4rHVQh0aX+FrQ==} + '@scalar/types@0.1.9': + resolution: {integrity: sha512-VyGZpiPHK3w+8AzypXF0Uj4sTb9n25FjQKgHxNmlnw/q4DMF6Y9m402LSWqu/N7p4fM/1dImkptf75FnKkzIwQ==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -8372,20 +8372,20 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/core@0.2.8': + '@scalar/core@0.2.9': dependencies: - '@scalar/types': 0.1.8 + '@scalar/types': 0.1.9 - '@scalar/hono-api-reference@0.8.2(hono@4.7.7)': + '@scalar/hono-api-reference@0.8.3(hono@4.7.7)': dependencies: - '@scalar/core': 0.2.8 + '@scalar/core': 0.2.9 hono: 4.7.7 '@scalar/openapi-types@0.2.0': dependencies: zod: 3.24.3 - '@scalar/types@0.1.8': + '@scalar/types@0.1.9': dependencies: '@scalar/openapi-types': 0.2.0 '@unhead/schema': 1.11.20 From 5ced7a036b85894472e96f5ae535b2a4f66fe72e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 08:48:56 +0000 Subject: [PATCH 0475/2658] chore(deps): bump sigstore/cosign-installer from 3.8.1 to 3.8.2 (#18923) Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.8.1 to 3.8.2. - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](https://github.com/sigstore/cosign-installer/compare/d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a...3454372f43399081ed03b604cb2d021dabca52bb) --- updated-dependencies: - dependency-name: sigstore/cosign-installer dependency-version: 3.8.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index afc8069772c8..83c42133f67a 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -39,7 +39,7 @@ jobs: - name: Install cosign if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1 + uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2 - name: Set up QEMU uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 From bcc17b7a269d582a3eb36bfd2a7afa9fbb4669e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:46:36 +0800 Subject: [PATCH 0476/2658] chore(deps-dev): bump eslint-plugin-yml from 1.17.0 to 1.18.0 (#18917) Bumps [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) from 1.17.0 to 1.18.0. - [Release notes](https://github.com/ota-meshi/eslint-plugin-yml/releases) - [Changelog](https://github.com/ota-meshi/eslint-plugin-yml/blob/master/CHANGELOG.md) - [Commits](https://github.com/ota-meshi/eslint-plugin-yml/compare/v1.17.0...v1.18.0) --- updated-dependencies: - dependency-name: eslint-plugin-yml dependency-version: 1.18.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index c6be54aba923..c8d5503ed1b6 100644 --- a/package.json +++ b/package.json @@ -179,7 +179,7 @@ "eslint-plugin-n": "17.17.0", "eslint-plugin-prettier": "5.2.6", "eslint-plugin-unicorn": "58.0.0", - "eslint-plugin-yml": "1.17.0", + "eslint-plugin-yml": "1.18.0", "fs-extra": "11.3.0", "globals": "16.0.0", "got": "14.4.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 877d2fb1eb4f..53f519c01500 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -400,8 +400,8 @@ importers: specifier: 58.0.0 version: 58.0.0(eslint@9.25.1(jiti@2.4.2)) eslint-plugin-yml: - specifier: 1.17.0 - version: 1.17.0(eslint@9.25.1(jiti@2.4.2)) + specifier: 1.18.0 + version: 1.18.0(eslint@9.25.1(jiti@2.4.2)) fs-extra: specifier: 11.3.0 version: 11.3.0 @@ -3535,8 +3535,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-compat-utils@0.6.4: - resolution: {integrity: sha512-/u+GQt8NMfXO8w17QendT4gvO5acfxQsAKirAt0LVxDnr2N8YLCVbregaNc/Yhp7NM128DwCaRvr8PLDfeNkQw==} + eslint-compat-utils@0.6.5: + resolution: {integrity: sha512-vAUHYzue4YAa2hNACjB8HvUQj5yehAZgiClyFVVom9cP8z5NSFq3PwB/TtJslN2zAMgRX6FCFCjYBbQh71g5RQ==} engines: {node: '>=12'} peerDependencies: eslint: '>=6.0.0' @@ -3596,8 +3596,8 @@ packages: peerDependencies: eslint: '>=9.22.0' - eslint-plugin-yml@1.17.0: - resolution: {integrity: sha512-Q3LXFRnNpGYAK/PM0BY1Xs0IY1xTLfM0kC986nNQkx1l8tOGz+YS50N6wXkAJkrBpeUN9OxEMB7QJ+9MTDAqIQ==} + eslint-plugin-yml@1.18.0: + resolution: {integrity: sha512-9NtbhHRN2NJa/s3uHchO3qVVZw0vyOIvWlXWGaKCr/6l3Go62wsvJK5byiI6ZoYztDsow4GnS69BZD3GnqH3hA==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' @@ -9742,7 +9742,7 @@ snapshots: eslint: 9.25.1(jiti@2.4.2) semver: 7.7.1 - eslint-compat-utils@0.6.4(eslint@9.25.1(jiti@2.4.2)): + eslint-compat-utils@0.6.5(eslint@9.25.1(jiti@2.4.2)): dependencies: eslint: 9.25.1(jiti@2.4.2) semver: 7.7.1 @@ -9825,12 +9825,12 @@ snapshots: semver: 7.7.1 strip-indent: 4.0.0 - eslint-plugin-yml@1.17.0(eslint@9.25.1(jiti@2.4.2)): + eslint-plugin-yml@1.18.0(eslint@9.25.1(jiti@2.4.2)): dependencies: debug: 4.4.0 escape-string-regexp: 4.0.0 eslint: 9.25.1(jiti@2.4.2) - eslint-compat-utils: 0.6.4(eslint@9.25.1(jiti@2.4.2)) + eslint-compat-utils: 0.6.5(eslint@9.25.1(jiti@2.4.2)) natural-compare: 1.4.0 yaml-eslint-parser: 1.3.0 transitivePeerDependencies: From 71624adf1b84fd6b70886bf35b03894f6e144985 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:46:59 +0800 Subject: [PATCH 0477/2658] chore(deps-dev): bump discord-api-types from 0.37.120 to 0.38.1 (#18918) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.120 to 0.38.1. - [Release notes](https://github.com/discordjs/discord-api-types/releases) - [Changelog](https://github.com/discordjs/discord-api-types/blob/main/CHANGELOG.md) - [Commits](https://github.com/discordjs/discord-api-types/compare/0.37.120...0.38.1) --- updated-dependencies: - dependency-name: discord-api-types dependency-version: 0.38.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c8d5503ed1b6..a8998bf6e3cd 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ "@typescript-eslint/parser": "8.31.0", "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", - "discord-api-types": "0.37.120", + "discord-api-types": "0.38.1", "eslint": "9.25.1", "eslint-config-prettier": "10.1.2", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 53f519c01500..295bf93bb036 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,8 +379,8 @@ importers: specifier: 2.1.9 version: 2.1.9(vitest@2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) discord-api-types: - specifier: 0.37.120 - version: 0.37.120 + specifier: 0.38.1 + version: 0.38.1 eslint: specifier: 9.25.1 version: 9.25.1(jiti@2.4.2) @@ -3355,8 +3355,8 @@ packages: resolution: {integrity: sha512-dSApZXgx29qO/6AVigdsoC6HSvaHWinJ4HTRPKrlMAxX71FgPzn/WEWbgM+aB1PlKD9IfSC3Ir2ouYYQR1uy+g==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.120: - resolution: {integrity: sha512-7xpNK0EiWjjDFp2nAhHXezE4OUWm7s1zhc/UXXN6hnFFU8dfoPHgV0Hx0RPiCa3ILRpdeh152icc68DGCyXYIw==} + discord-api-types@0.38.1: + resolution: {integrity: sha512-vsjsqjAuxsPhiwbPjTBeGQaDPlizFmSkU0mTzFGMgRxqCDIRBR7iTY74HacpzrDV0QtERHRKQEk1tq7drZUtHg==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -9508,7 +9508,7 @@ snapshots: directory-import@3.3.2: {} - discord-api-types@0.37.120: {} + discord-api-types@0.38.1: {} doctrine@3.0.0: dependencies: From 4b0215d29d0dfb7326f4ebcf2c26dbdc530fadee Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 23 Apr 2025 18:54:26 +0800 Subject: [PATCH 0478/2658] fix(route/telegram): fix import style (#18926) --- lib/routes/telegram/tglib/channel.ts | 4 ++-- lib/routes/telegram/tglib/client.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/telegram/tglib/channel.ts b/lib/routes/telegram/tglib/channel.ts index ef8f91fe5c37..00333825b8fe 100644 --- a/lib/routes/telegram/tglib/channel.ts +++ b/lib/routes/telegram/tglib/channel.ts @@ -1,7 +1,7 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; import { client, decodeMedia, getClient, getFilename, getMediaLink, streamDocument, streamThumbnail } from './client'; -import { returnBigInt as bigInt } from 'telegram/Helpers'; -import { HTMLParser } from 'telegram/extensions/html'; +import { returnBigInt as bigInt } from 'telegram/Helpers.js'; +import { HTMLParser } from 'telegram/extensions/html.js'; import { DataItem } from '@/types'; import type { Api } from 'telegram'; diff --git a/lib/routes/telegram/tglib/client.ts b/lib/routes/telegram/tglib/client.ts index 1336f3b07509..4a338f476e19 100644 --- a/lib/routes/telegram/tglib/client.ts +++ b/lib/routes/telegram/tglib/client.ts @@ -1,7 +1,7 @@ import { Api, TelegramClient } from 'telegram'; import { UserAuthParams } from 'telegram/client/auth'; -import { StringSession } from 'telegram/sessions'; -import { getAppropriatedPartSize } from 'telegram/Utils'; +import { StringSession } from 'telegram/sessions/index.js'; +import { getAppropriatedPartSize } from 'telegram/Utils.js'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; From 78757950aa422c438b2f23623432cdb15469d0b0 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 23 Apr 2025 19:28:30 +0800 Subject: [PATCH 0479/2658] fix(route/news): use p-map to limit concurrency (#18927) --- lib/routes/anthropic/news.ts | 10 ++++++---- package.json | 1 + pnpm-lock.yaml | 9 +++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/routes/anthropic/news.ts b/lib/routes/anthropic/news.ts index 3f6371cd9b93..05eb41f011ac 100644 --- a/lib/routes/anthropic/news.ts +++ b/lib/routes/anthropic/news.ts @@ -2,6 +2,7 @@ import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import cache from '@/utils/cache'; import { Route } from '@/types'; +import pMap from 'p-map'; export const route: Route = { path: '/news', @@ -39,8 +40,9 @@ async function handler() { }; }); - const out = await Promise.all( - list.map((item) => + const out = await pMap( + list, + (item) => cache.tryGet(item.link, async () => { const response = await ofetch(item.link); const $ = load(response); @@ -62,8 +64,8 @@ async function handler() { item.description = content.html(); return item; - }) - ) + }), + { concurrency: 5 } ); return { diff --git a/package.json b/package.json index a8998bf6e3cd..af2c24ebb74f 100644 --- a/package.json +++ b/package.json @@ -107,6 +107,7 @@ "oauth-1.0a": "2.2.6", "ofetch": "1.4.1", "otplib": "12.0.1", + "p-map": "7.0.3", "pac-proxy-agent": "7.2.0", "proxy-chain": "2.5.8", "puppeteer": "22.6.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 295bf93bb036..459eee3d7dd6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -188,6 +188,9 @@ importers: otplib: specifier: 12.0.1 version: 12.0.1 + p-map: + specifier: 7.0.3 + version: 7.0.3 pac-proxy-agent: specifier: 7.2.0 version: 7.2.0 @@ -5053,6 +5056,10 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + p-map@7.0.3: + resolution: {integrity: sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==} + engines: {node: '>=18'} + pac-proxy-agent@7.2.0: resolution: {integrity: sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==} engines: {node: '>= 14'} @@ -11546,6 +11553,8 @@ snapshots: dependencies: p-limit: 3.1.0 + p-map@7.0.3: {} + pac-proxy-agent@7.2.0: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 From df320988d0482f19d4e289e1d97a3ea6e0c3c2bf Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 23 Apr 2025 21:02:10 +0800 Subject: [PATCH 0480/2658] refactor: replace tiny-async-pool with p-map (#18928) * refactor: replace tiny-async-pool with p-map * fix: use original concurrency --- lib/routes/agefans/update.ts | 40 +++---- lib/routes/apnews/mobile-api.ts | 5 +- lib/routes/apnews/sitemap.ts | 5 +- lib/routes/apnews/topics.ts | 5 +- lib/routes/apnews/utils.ts | 8 -- lib/routes/bdys/index.ts | 75 ++++++------ lib/routes/bjnews/cat.ts | 11 +- lib/routes/bjx/huanbao.ts | 16 +-- lib/routes/bloomberg/authors.ts | 5 +- lib/routes/bloomberg/index.ts | 11 +- lib/routes/bloomberg/utils.ts | 11 +- lib/routes/cara/utils.ts | 9 -- lib/routes/cfr/index.ts | 5 +- lib/routes/cfr/utils.ts | 9 -- lib/routes/copymanga/comic.ts | 12 +- lib/routes/cpta/handler.ts | 8 +- lib/routes/cts/news.ts | 45 ++++---- lib/routes/dcard/utils.ts | 75 ++++++------ lib/routes/dlnews/category.ts | 7 +- lib/routes/gdut/oa-news.ts | 169 ++++++++++++++-------------- lib/routes/gov/nrta/dsj.ts | 27 +++-- lib/routes/guozaoke/index.ts | 69 ++++++------ lib/routes/kcna/news.ts | 64 +++++------ lib/routes/luogu/contest.ts | 50 ++++---- lib/routes/nextapple/realtime.ts | 55 ++++----- lib/routes/shoppingdesign/posts.ts | 51 +++++---- lib/routes/tfc-taiwan/utils.ts | 53 ++++----- lib/routes/tradingview/blog.ts | 84 +++++++------- lib/routes/wsj/news.ts | 5 +- lib/routes/wsj/utils.ts | 10 +- lib/routes/x-mol/paper.ts | 39 +++---- lib/routes/yamibo/bbs/forum.ts | 9 +- lib/routes/yamibo/utils.ts | 9 -- lib/routes/youtube/subscriptions.ts | 14 +-- lib/routes/zaker/channel.ts | 7 +- lib/routes/zaker/focus.ts | 7 +- package.json | 2 - pnpm-lock.yaml | 16 --- 38 files changed, 494 insertions(+), 608 deletions(-) diff --git a/lib/routes/agefans/update.ts b/lib/routes/agefans/update.ts index 37a853d14eb5..8c987e0fd82e 100644 --- a/lib/routes/agefans/update.ts +++ b/lib/routes/agefans/update.ts @@ -1,9 +1,9 @@ -import { Route } from '@/types'; +import { DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { rootUrl } from './utils'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; export const route: Route = { path: '/update', @@ -47,27 +47,27 @@ async function handler() { }; }); - const items: any[] = []; - for await (const item of asyncPool(3, list, (item) => - cache.tryGet(item.link, async () => { - const detailResponse = await got(item.link); - const content = load(detailResponse.data); + const items: DataItem[] = await pMap( + list, + (item) => + cache.tryGet(item.link, async () => { + const detailResponse = await got(item.link); + const content = load(detailResponse.data); - content('img').each((_, ele) => { - if (ele.attribs['data-original']) { - ele.attribs.src = ele.attribs['data-original']; - delete ele.attribs['data-original']; - } - }); - content('.video_detail_collect').remove(); + content('img').each((_, ele) => { + if (ele.attribs['data-original']) { + ele.attribs.src = ele.attribs['data-original']; + delete ele.attribs['data-original']; + } + }); + content('.video_detail_collect').remove(); - item.description = content('.video_detail_left').html(); + item.description = content('.video_detail_left').html(); - return item; - }) - )) { - items.push(item); - } + return item; + }), + { concurrency: 3 } + ); return { title: $('title').text(), diff --git a/lib/routes/apnews/mobile-api.ts b/lib/routes/apnews/mobile-api.ts index 0786885950a1..34cce0f0c573 100644 --- a/lib/routes/apnews/mobile-api.ts +++ b/lib/routes/apnews/mobile-api.ts @@ -1,5 +1,6 @@ import { Route, ViewType } from '@/types'; -import { asyncPoolAll, fetchArticle } from './utils'; +import { fetchArticle } from './utils'; +import pMap from 'p-map'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -83,7 +84,7 @@ async function handler(ctx) { .sort((a, b) => b.pubDate - a.pubDate) .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20); - const items = ctx.req.query('fulltext') === 'true' ? await asyncPoolAll(10, list, (item) => fetchArticle(item)) : list; + const items = ctx.req.query('fulltext') === 'true' ? await pMap(list, (item) => fetchArticle(item), { concurrency: 10 }) : list; return { title: screen.category ?? screen.title, diff --git a/lib/routes/apnews/sitemap.ts b/lib/routes/apnews/sitemap.ts index 655ab7f088d0..272d12ff076a 100644 --- a/lib/routes/apnews/sitemap.ts +++ b/lib/routes/apnews/sitemap.ts @@ -1,5 +1,6 @@ import { Route, ViewType } from '@/types'; -import { asyncPoolAll, fetchArticle } from './utils'; +import { fetchArticle } from './utils'; +import pMap from 'p-map'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -81,7 +82,7 @@ async function handler(ctx) { .sort((a, b) => (a.pubDate && b.pubDate ? b.pubDate - a.pubDate : b.lastmod - a.lastmod)) .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20); - const items = ctx.req.query('fulltext') === 'true' ? await asyncPoolAll(20, list, (item) => fetchArticle(item)) : list; + const items = ctx.req.query('fulltext') === 'true' ? await pMap(list, (item) => fetchArticle(item), { concurrency: 20 }) : list; return { title: `AP News sitemap:${route}`, diff --git a/lib/routes/apnews/topics.ts b/lib/routes/apnews/topics.ts index a4f65f319d7c..96185f087b85 100644 --- a/lib/routes/apnews/topics.ts +++ b/lib/routes/apnews/topics.ts @@ -1,7 +1,8 @@ import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -import { asyncPoolAll, fetchArticle, removeDuplicateByKey } from './utils'; +import { fetchArticle, removeDuplicateByKey } from './utils'; +import pMap from 'p-map'; const HOME_PAGE = 'https://apnews.com'; export const route: Route = { @@ -50,7 +51,7 @@ async function handler(ctx) { })) .filter((e) => typeof e.link === 'string'); - const items = ctx.req.query('fulltext') === 'true' ? await asyncPoolAll(10, list, (item) => fetchArticle(item)) : list; + const items = ctx.req.query('fulltext') === 'true' ? await pMap(list, (item) => fetchArticle(item), { concurrency: 10 }) : list; return { title: $('title').text(), diff --git a/lib/routes/apnews/utils.ts b/lib/routes/apnews/utils.ts index ed833750c33b..02b462f6239e 100644 --- a/lib/routes/apnews/utils.ts +++ b/lib/routes/apnews/utils.ts @@ -2,7 +2,6 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; -import asyncPool from 'tiny-async-pool'; export function removeDuplicateByKey(items, key: string) { return [...new Map(items.map((x) => [x[key], x])).values()]; @@ -65,10 +64,3 @@ export function fetchArticle(item) { } }); } -export async function asyncPoolAll(poolLimit: number, array: readonly IN[], iteratorFn: (generator: IN) => Promise) { - const results: Awaited = []; - for await (const result of asyncPool(poolLimit, array, iteratorFn)) { - results.push(result); - } - return results; -} diff --git a/lib/routes/bdys/index.ts b/lib/routes/bdys/index.ts index b3082c3fc515..2a0c7527aee3 100644 --- a/lib/routes/bdys/index.ts +++ b/lib/routes/bdys/index.ts @@ -7,7 +7,7 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { art } from '@/utils/render'; import path from 'node:path'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; @@ -139,43 +139,42 @@ async function handler(ctx) { cookie: `JSESSIONID=${jsessionid}`, }; - const items = []; - - for await (const data of asyncPool(1, list, (item) => - cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - headers, - }); - const downloadResponse = await got({ - method: 'get', - url: `${rootUrl}/downloadInfo/list?mid=${item.link.split('/')[4].split('.')[0]}`, - headers, - }); - const content = load(detailResponse.data); - - content('svg').remove(); - const torrents = content('.download-list .list-group'); - - item.description = art(path.join(__dirname, 'templates/desc.art'), { - info: content('.row.mt-3').html(), - synopsis: content('#synopsis').html(), - links: downloadResponse.data, - torrents: torrents.html(), - }); - - item.pubDate = timezone(parseDate(content('.bg-purple-lt').text().replace('更新时间:', '')), +8); - item.guid = `${item.link}#${content('.card h1').text()}`; - - item.enclosure_url = torrents.html() ? `${rootUrl}${torrents.find('a').first().attr('href')}` : downloadResponse.data.pop().url; - item.enclosure_type = 'application/x-bittorrent'; - - return item; - }) - )) { - items.push(data); - } + const items = await pMap( + list, + (item) => + cache.tryGet(item.link, async () => { + const detailResponse = await got({ + method: 'get', + url: item.link, + headers, + }); + const downloadResponse = await got({ + method: 'get', + url: `${rootUrl}/downloadInfo/list?mid=${item.link.split('/')[4].split('.')[0]}`, + headers, + }); + const content = load(detailResponse.data); + + content('svg').remove(); + const torrents = content('.download-list .list-group'); + + item.description = art(path.join(__dirname, 'templates/desc.art'), { + info: content('.row.mt-3').html(), + synopsis: content('#synopsis').html(), + links: downloadResponse.data, + torrents: torrents.html(), + }); + + item.pubDate = timezone(parseDate(content('.bg-purple-lt').text().replace('更新时间:', '')), +8); + item.guid = `${item.link}#${content('.card h1').text()}`; + + item.enclosure_url = torrents.html() ? `${rootUrl}${torrents.find('a').first().attr('href')}` : downloadResponse.data.pop().url; + item.enclosure_type = 'application/x-bittorrent'; + + return item; + }), + { concurrency: 1 } + ); return { title: '哔嘀影视', diff --git a/lib/routes/bjnews/cat.ts b/lib/routes/bjnews/cat.ts index 4ce068e8fc01..c88801b3e6dc 100644 --- a/lib/routes/bjnews/cat.ts +++ b/lib/routes/bjnews/cat.ts @@ -3,7 +3,7 @@ import { load } from 'cheerio'; import ofetch from '@/utils/ofetch'; import { fetchArticle } from './utils'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; export const route: Route = { path: '/cat/:cat', @@ -35,17 +35,10 @@ async function handler(ctx) { category: $(a).parent().find('.source').text().trim(), })); - const out = await asyncPoolAll(2, list, (item) => fetchArticle(item)); + const out = await pMap(list, (item) => fetchArticle(item), { concurrency: 2 }); return { title: `新京报 - 分类 - ${$('.cur').text().trim()}`, link: url, item: out, }; } -async function asyncPoolAll(poolLimit: number, array: readonly IN[], iteratorFn: (generator: IN) => Promise) { - const results: Awaited = []; - for await (const result of asyncPool(poolLimit, array, iteratorFn)) { - results.push(result); - } - return results; -} diff --git a/lib/routes/bjx/huanbao.ts b/lib/routes/bjx/huanbao.ts index 5d53114e1ef6..302471c8df1f 100644 --- a/lib/routes/bjx/huanbao.ts +++ b/lib/routes/bjx/huanbao.ts @@ -4,15 +4,7 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; -import asyncPool from 'tiny-async-pool'; - -const asyncPoolAll = async (...args) => { - const results = []; - for await (const result of asyncPool(...args)) { - results.push(result); - } - return results; -}; +import pMap from 'p-map'; export const route: Route = { path: '/huanbao', @@ -54,11 +46,11 @@ async function handler() { }; }); - items = await asyncPoolAll( + items = await pMap( // 服务器禁止单个IP大并发访问,只能少返回几条 - 3, items, - (items) => fetchPage(items.link) + (item) => fetchPage(item.link), + { concurrency: 3 } ); return { diff --git a/lib/routes/bloomberg/authors.ts b/lib/routes/bloomberg/authors.ts index 83b6eed8586a..8678b6f7b57a 100644 --- a/lib/routes/bloomberg/authors.ts +++ b/lib/routes/bloomberg/authors.ts @@ -2,7 +2,8 @@ import { Route, ViewType } from '@/types'; import { load } from 'cheerio'; import ofetch from '@/utils/ofetch'; import rssParser from '@/utils/rss-parser'; -import { asyncPoolAll, parseArticle } from './utils'; +import { parseArticle } from './utils'; +import pMap from 'p-map'; const parseAuthorNewsList = async (slug) => { const baseURL = `https://www.bloomberg.com/authors/${slug}`; @@ -66,7 +67,7 @@ async function handler(ctx) { list = (await rssParser.parseURL(`${link}.rss`)).items; } - const item = await asyncPoolAll(1, list, (item) => parseArticle(item)); + const item = await pMap(list, (item) => parseArticle(item), { concurrency: 1 }); const authorName = item.find((i) => i.author)?.author ?? slug; return { diff --git a/lib/routes/bloomberg/index.ts b/lib/routes/bloomberg/index.ts index 46f6a7d8d7ab..bedc603c03e8 100644 --- a/lib/routes/bloomberg/index.ts +++ b/lib/routes/bloomberg/index.ts @@ -1,6 +1,7 @@ import { Route, ViewType } from '@/types'; -import { rootUrl, asyncPoolAll, parseNewsList, parseArticle } from './utils'; -const site_title_mapping = { +import { rootUrl, parseNewsList, parseArticle } from './utils'; +import pMap from 'p-map'; +const siteTitleMapping = { '/': 'News', bpol: 'Politics', bbiz: 'Business', @@ -23,7 +24,7 @@ export const route: Route = { parameters: { site: { description: 'Site ID, can be found below', - options: Object.keys(site_title_mapping).map((key) => ({ value: key, label: site_title_mapping[key] })), + options: Object.keys(siteTitleMapping).map((key) => ({ value: key, label: siteTitleMapping[key] })), }, }, features: { @@ -60,9 +61,9 @@ async function handler(ctx) { const currentUrl = site ? `${rootUrl}/${site}/sitemap_news.xml` : `${rootUrl}/sitemap_news.xml`; const list = await parseNewsList(currentUrl, ctx); - const items = await asyncPoolAll(1, list, (item) => parseArticle(item)); + const items = await pMap(list, (item) => parseArticle(item), { concurrency: 1 }); return { - title: `Bloomberg - ${site_title_mapping[site ?? '/']}`, + title: `Bloomberg - ${siteTitleMapping[site ?? '/']}`, link: currentUrl, item: items, }; diff --git a/lib/routes/bloomberg/utils.ts b/lib/routes/bloomberg/utils.ts index e9d25a07bcdd..7736a6703c15 100644 --- a/lib/routes/bloomberg/utils.ts +++ b/lib/routes/bloomberg/utils.ts @@ -1,7 +1,6 @@ import cache from '@/utils/cache'; import { load } from 'cheerio'; import path from 'node:path'; -import asyncPool from 'tiny-async-pool'; import { destr } from 'destr'; import { parseDate } from '@/utils/parse-date'; @@ -604,12 +603,4 @@ const documentToHtmlString = async (document) => { return str; }; -const asyncPoolAll = async (...args) => { - const results = []; - for await (const result of asyncPool(...args)) { - results.push(result); - } - return results; -}; - -export { rootUrl, asyncPoolAll, parseNewsList, parseArticle }; +export { rootUrl, parseNewsList, parseArticle }; diff --git a/lib/routes/cara/utils.ts b/lib/routes/cara/utils.ts index a68bb5f87a41..92d1ce4c4d51 100644 --- a/lib/routes/cara/utils.ts +++ b/lib/routes/cara/utils.ts @@ -1,7 +1,6 @@ import { config } from '@/config'; import ofetch from '@/utils/ofetch'; import type { FetchOptions, FetchRequest, ResponseType } from 'ofetch'; -import asyncPool from 'tiny-async-pool'; import type { PortfolioDetailResponse, PortfolioResponse, UserNextData } from './types'; import type { DataItem } from '@/types'; import { parseDate } from '@/utils/parse-date'; @@ -35,14 +34,6 @@ export async function parseUserData(user: string) { })) as Promise; } -export async function asyncPoolAll(poolLimit: number, array: readonly IN[], iteratorFn: (generator: IN) => Promise) { - const results: Awaited = []; - for await (const result of asyncPool(poolLimit, array, iteratorFn)) { - results.push(result); - } - return results; -} - export async function fetchPortfolioItem(item: PortfolioResponse['data'][number]) { const res = await customFetch(`${API_HOST}/posts/${item.postId}`); diff --git a/lib/routes/cfr/index.ts b/lib/routes/cfr/index.ts index a1d128de4ad3..efcd508044e2 100644 --- a/lib/routes/cfr/index.ts +++ b/lib/routes/cfr/index.ts @@ -2,7 +2,8 @@ import type { Data, Route } from '@/types'; import type { Context } from 'hono'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; -import { asyncPoolAll, getDataItem } from './utils'; +import { getDataItem } from './utils'; +import pMap from 'p-map'; export const route: Route = { path: '/:category/:subCategory?', @@ -48,7 +49,7 @@ async function handler(ctx: Context): Promise { const listSelector = selectorMap[category] ?? '.card-article-large__link'; - const items = await asyncPoolAll(5, $(listSelector).toArray(), async (item) => await getDataItem($(item).attr('href')!)); + const items = await pMap($(listSelector).toArray(), (item) => getDataItem($(item).attr('href')!), { concurrency: 5 }); return { title: $('head title').text().replace(' | Council on Foreign Relations', ''), diff --git a/lib/routes/cfr/utils.ts b/lib/routes/cfr/utils.ts index 7205f690b581..753994413574 100644 --- a/lib/routes/cfr/utils.ts +++ b/lib/routes/cfr/utils.ts @@ -4,7 +4,6 @@ import type { DataItem } from '@/types'; import { parseDate } from '@/utils/parse-date'; import cache from '@/utils/cache'; import type { LinkData, VideoSetup } from './types'; -import asyncPool from 'tiny-async-pool'; export function getDataItem(href: string) { const origin = 'https://www.cfr.org'; @@ -274,11 +273,3 @@ function parseDescription($description: Cheerio, $: CheerioAPI) { return description; } - -export async function asyncPoolAll(poolLimit: number, array: readonly IN[], iteratorFn: (generator: IN) => Promise) { - const results: Awaited = []; - for await (const result of asyncPool(poolLimit, array, iteratorFn)) { - results.push(result); - } - return results; -} diff --git a/lib/routes/copymanga/comic.ts b/lib/routes/copymanga/comic.ts index 58176816dc63..be2093b7c3e3 100644 --- a/lib/routes/copymanga/comic.ts +++ b/lib/routes/copymanga/comic.ts @@ -7,7 +7,7 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; import { config } from '@/config'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; export const route: Route = { path: '/comic/:id/:chapterCnt?', @@ -126,15 +126,7 @@ async function handler(ctx) { }; }; - const asyncPoolAll = async (...args) => { - const results = []; - for await (const result of asyncPool(...args)) { - results.push(result); - } - return results; - }; - - const result = await asyncPoolAll(3, chapterArray.slice(0, chapterCnt), (chapter) => cache.tryGet(chapter.link, () => genResult(chapter))); + const result = await pMap(chapterArray.slice(0, chapterCnt), (chapter) => cache.tryGet(chapter.link, () => genResult(chapter)), { concurrency: 3 }); const items = [...result, ...chapterArray.slice(chapterCnt)]; return { diff --git a/lib/routes/cpta/handler.ts b/lib/routes/cpta/handler.ts index d5f34af89a4a..7902e5e23abf 100644 --- a/lib/routes/cpta/handler.ts +++ b/lib/routes/cpta/handler.ts @@ -2,7 +2,7 @@ import { DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; type NewsCategory = { title: string; @@ -77,11 +77,7 @@ const handler: Route['handler'] = async (ctx) => { } as DataItem; }); - const dataItems: DataItem[] = []; - - for await (const item of await asyncPool(1, contentLinkList, fetchDataItem)) { - dataItems.push(item as DataItem); - } + const dataItems: DataItem[] = await pMap(contentLinkList, fetchDataItem, { concurrency: 1 }); return { title: `中国人事考试网-${NEWS_TYPES[category].title}`, diff --git a/lib/routes/cts/news.ts b/lib/routes/cts/news.ts index c06f49020335..2e9c46511ed3 100644 --- a/lib/routes/cts/news.ts +++ b/lib/routes/cts/news.ts @@ -3,7 +3,7 @@ import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; export const route: Route = { path: '/:category', @@ -36,28 +36,29 @@ async function handler(ctx) { const currentUrl = `https://news.cts.com.tw/${category}/index.html`; const response = await got(currentUrl); const $ = load(response.data); - const items = []; - for await (const data of asyncPool(5, $('#newslist-top a[title]').slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20), (item) => { - item = $(item); - const link = item.attr('href'); - return cache.tryGet(link, async () => { - const response = await got(link); - const $ = load(response.data); - const author = $('.artical-content p:eq(0)').text().trim(); - $('.artical-content p:eq(0), .artical-content .flexbox').remove(); + const items = await pMap( + $('#newslist-top a[title]').slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20), + (item) => { + item = $(item); + const link = item.attr('href'); + return cache.tryGet(link, async () => { + const response = await got(link); + const $ = load(response.data); + const author = $('.artical-content p:eq(0)').text().trim(); + $('.artical-content p:eq(0), .artical-content .flexbox').remove(); - return { - title: item.attr('title'), - author, - description: $('.artical-content').html(), - category: $('meta[property="article:section"]').attr('content'), - pubDate: parseDate($('meta[property="article:published_time"]').attr('content')), - link, - }; - }); - })) { - items.push(data); - } + return { + title: item.attr('title'), + author, + description: $('.artical-content').html(), + category: $('meta[property="article:section"]').attr('content'), + pubDate: parseDate($('meta[property="article:published_time"]').attr('content')), + link, + }; + }); + }, + { concurrency: 5 } + ); return { title: $('title').text(), diff --git a/lib/routes/dcard/utils.ts b/lib/routes/dcard/utils.ts index 3db10ad408bd..083c736d6dd6 100644 --- a/lib/routes/dcard/utils.ts +++ b/lib/routes/dcard/utils.ts @@ -1,46 +1,47 @@ -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; const ProcessFeed = async (items, cookies, browser, limit, cache) => { let newCookies = []; - const result = []; - for await (const item of asyncPool(3, items.slice(0, limit), async (i) => { - const url = `https://www.dcard.tw/service/api/v2/posts/${i.id}`; - const content = await cache.tryGet(`dcard:${i.id}`, async () => { - let response; - // try catch 处理被删除的帖子 - try { - const page = await browser.newPage(); - await page.setRequestInterception(true); - page.on('request', (request) => { - request.resourceType() === 'document' || request.resourceType() === 'script' || request.resourceType() === 'fetch' || request.resourceType() === 'xhr' ? request.continue() : request.abort(); - }); - await page.setExtraHTTPHeaders({ - referer: `https://www.dcard.tw/f/${i.forumAlias}/p/${i.id}`, - }); - await page.setCookie(...cookies); - await page.goto(url); - await page.waitForSelector('body > pre'); - response = await page.evaluate(() => document.querySelector('body > pre').textContent); - newCookies = await page.cookies(); - await page.close(); + const result = await pMap( + items.slice(0, limit), + async (i) => { + const url = `https://www.dcard.tw/service/api/v2/posts/${i.id}`; + const content = await cache.tryGet(`dcard:${i.id}`, async () => { + let response; + // try catch 处理被删除的帖子 + try { + const page = await browser.newPage(); + await page.setRequestInterception(true); + page.on('request', (request) => { + request.resourceType() === 'document' || request.resourceType() === 'script' || request.resourceType() === 'fetch' || request.resourceType() === 'xhr' ? request.continue() : request.abort(); + }); + await page.setExtraHTTPHeaders({ + referer: `https://www.dcard.tw/f/${i.forumAlias}/p/${i.id}`, + }); + await page.setCookie(...cookies); + await page.goto(url); + await page.waitForSelector('body > pre'); + response = await page.evaluate(() => document.querySelector('body > pre').textContent); + newCookies = await page.cookies(); + await page.close(); - const data = JSON.parse(response); - let body = data.content; - body = body.replaceAll(/(?=https?:\/\/).*?(?<=\.(jpe?g|gif|png))/gi, (m) => ``); - body = body.replaceAll(/(?=https?:\/\/).*(??)$/gim, (m) => `${m}`); - body = body.replaceAll('\n', '
'); + const data = JSON.parse(response); + let body = data.content; + body = body.replaceAll(/(?=https?:\/\/).*?(?<=\.(jpe?g|gif|png))/gi, (m) => ``); + body = body.replaceAll(/(?=https?:\/\/).*(??)$/gim, (m) => `${m}`); + body = body.replaceAll('\n', '
'); - return body; - } catch { - return ''; - } - }); + return body; + } catch { + return ''; + } + }); - i.description = content; - return i; - })) { - result.push(item); - } + i.description = content; + return i; + }, + { concurrency: 3 } + ); await cache.set('dcard:cookies', newCookies, 3600); return [...result, ...items.slice(limit)]; }; diff --git a/lib/routes/dlnews/category.ts b/lib/routes/dlnews/category.ts index 156db563f266..3ec34bedc5f9 100644 --- a/lib/routes/dlnews/category.ts +++ b/lib/routes/dlnews/category.ts @@ -6,7 +6,7 @@ import got from '@/utils/got'; import { getData, getList } from './utils'; import { art } from '@/utils/render'; import path from 'node:path'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; const _website = 'dlnews'; const topics = { @@ -91,10 +91,7 @@ async function handler(ctx) { }; const data = await getData(`${baseUrl}${apiPath}?query=${encodeURIComponent(JSON.stringify(query))}&_website=${_website}`); const list = getList(data); - const items = []; - for await (const data of asyncPool(3, list, (item) => extractArticle(item))) { - items.push(data); - } + const items = await pMap(list, (item) => extractArticle(item), { concurrency: 3 }); return { title: Object.hasOwn(topics, category) ? `${topics[category]} : DL News` : 'DL News', diff --git a/lib/routes/gdut/oa-news.ts b/lib/routes/gdut/oa-news.ts index 58c8128b84ee..60d5c3c10adf 100644 --- a/lib/routes/gdut/oa-news.ts +++ b/lib/routes/gdut/oa-news.ts @@ -5,7 +5,7 @@ import { load } from 'cheerio'; import { CookieJar } from 'tough-cookie'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; const site = 'https://oas.gdut.edu.cn/seeyon'; const typeMap = { @@ -123,94 +123,95 @@ async function handler(ctx) { category: item.typeName, })); - const results = []; - // 获取实际的文章内容 - for await (const data of asyncPool(2, articles, async (data) => { - const link = data.link; - data.description = await cache.tryGet(link, async () => { - // 获取数据 - const response = await got(link, { - cookieJar, - }); + const results = await pMap( + articles, + async (data) => { + const link = data.link; + data.description = await cache.tryGet(link, async () => { + // 获取数据 + const response = await got(link, { + cookieJar, + }); - const $ = load(response.data); - const node = $('#content'); - // 清理样式 - node.find('*') - .filter(function () { - return this.type === 'comment' || this.tagName === 'meta' || this.tagName === 'style'; - }) - .remove(); - node.find('*') - .contents() - .filter(function () { - return this.type === 'comment' || this.tagName === 'meta' || this.tagName === 'style'; - }) - .remove(); - node.find('*').each(function () { - if (this.attribs.style !== undefined) { - const newSty = this.attribs.style - .split(';') - .filter((s) => { - const styBlocklist = ['color:rgb(0,0,0)', 'color:black', 'background:rgb(255,255,255)', 'background:white', 'text-align:left', 'text-align:justify', 'font-style:normal', 'font-weight:normal']; - const styPrefixBlocklist = [ - 'font-family', - 'font-size', - 'background', - 'text-autospace', - 'text-transform', - 'letter-spacing', - 'line-height', - 'padding', - 'margin', - 'text-justify', - 'word-break', - 'vertical-align', - 'mso-', - '-ms-', - ]; - const sty = s.trim(); - if (styBlocklist.includes(sty.replaceAll(/\s+/g, ''))) { - return false; - } - for (const prefix of styPrefixBlocklist) { - if (sty.startsWith(prefix)) { + const $ = load(response.data); + const node = $('#content'); + // 清理样式 + node.find('*') + .filter(function () { + return this.type === 'comment' || this.tagName === 'meta' || this.tagName === 'style'; + }) + .remove(); + node.find('*') + .contents() + .filter(function () { + return this.type === 'comment' || this.tagName === 'meta' || this.tagName === 'style'; + }) + .remove(); + node.find('*').each(function () { + if (this.attribs.style !== undefined) { + const newSty = this.attribs.style + .split(';') + .filter((s) => { + const styBlocklist = ['color:rgb(0,0,0)', 'color:black', 'background:rgb(255,255,255)', 'background:white', 'text-align:left', 'text-align:justify', 'font-style:normal', 'font-weight:normal']; + const styPrefixBlocklist = [ + 'font-family', + 'font-size', + 'background', + 'text-autospace', + 'text-transform', + 'letter-spacing', + 'line-height', + 'padding', + 'margin', + 'text-justify', + 'word-break', + 'vertical-align', + 'mso-', + '-ms-', + ]; + const sty = s.trim(); + if (styBlocklist.includes(sty.replaceAll(/\s+/g, ''))) { return false; } - } - return true; - }) - .join(';'); - if (newSty) { - this.attribs.style = newSty; - } else { - delete this.attribs.style; + for (const prefix of styPrefixBlocklist) { + if (sty.startsWith(prefix)) { + return false; + } + } + return true; + }) + .join(';'); + if (newSty) { + this.attribs.style = newSty; + } else { + delete this.attribs.style; + } } - } - if (this.attribs.class && this.attribs.class.trim().startsWith('Mso')) { - delete this.attribs.class; - } - if (this.attribs.lang) { - delete this.attribs.lang; - } - if (this.tagName === 'font' || this.tagName === 'o:p') { - $(this).replaceWith(this.childNodes); - } - if (this.tagName === 'span' && !this.attribs.style) { - $(this).replaceWith(this.childNodes); - } - }); - node.find('span').each(function () { - if (this.childNodes.length === 0) { - $(this).remove(); - } - }); + if (this.attribs.class && this.attribs.class.trim().startsWith('Mso')) { + delete this.attribs.class; + } + if (this.attribs.lang) { + delete this.attribs.lang; + } + if (this.tagName === 'font' || this.tagName === 'o:p') { + $(this).replaceWith(this.childNodes); + } + if (this.tagName === 'span' && !this.attribs.style) { + $(this).replaceWith(this.childNodes); + } + }); + node.find('span').each(function () { + if (this.childNodes.length === 0) { + $(this).remove(); + } + }); - return node.html(); - }); - })) { - results.push(data); - } + return node.html(); + }); + return data; + }, + { concurrency: 2 } + ); return { title: `广东工业大学新闻通知网 - ` + type.name, diff --git a/lib/routes/gov/nrta/dsj.ts b/lib/routes/gov/nrta/dsj.ts index 39ba4c4f00d0..275af3afcff8 100644 --- a/lib/routes/gov/nrta/dsj.ts +++ b/lib/routes/gov/nrta/dsj.ts @@ -3,7 +3,7 @@ import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; export const route: Route = { path: '/nrta/dsj/:category?', @@ -52,23 +52,22 @@ async function handler(ctx) { }; }); - const results = []; + const results = await pMap( + items, + (item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); - for await (const item of asyncPool(5, items, (item) => - cache.tryGet(item.link, async () => { - const { data: detailResponse } = await got(item.link); + const content = load(detailResponse); - const content = load(detailResponse); + content('table').last().remove(); - content('table').last().remove(); + item.description = content('td.newstext').html() || content('table').last().parent().parent().html(); - item.description = content('td.newstext').html() || content('table').last().parent().parent().html(); - - return item; - }) - )) { - results.push(item); - } + return item; + }), + { concurrency: 5 } + ); return { item: results, diff --git a/lib/routes/guozaoke/index.ts b/lib/routes/guozaoke/index.ts index d8fe2c35e0a8..0e71195b493d 100644 --- a/lib/routes/guozaoke/index.ts +++ b/lib/routes/guozaoke/index.ts @@ -4,7 +4,7 @@ import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; import { config } from '@/config'; import cache from '@/utils/cache'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; export const route: Route = { path: '/default', @@ -54,42 +54,41 @@ async function handler() { }) .filter((item) => item !== undefined); - const out = []; - for await (const result of asyncPool(2, items, (item) => - cache.tryGet(item.link, async () => { - const url = `https://www.guozaoke.com${item.link}`; - const res = await got({ - method: 'get', - url, - headers: { - Cookie: config.guozaoke.cookies, - 'User-Agent': config.ua, - }, - }); + const out = await pMap( + items, + (item) => + cache.tryGet(item.link, async () => { + const url = `https://www.guozaoke.com${item.link}`; + const res = await got({ + method: 'get', + url, + headers: { + Cookie: config.guozaoke.cookies, + }, + }); - const $ = load(res.data); - let content = $('div.ui-content').html(); - content = content ? content.trim() : ''; - const comments = $('.reply-item').map((i, el) => { - const $el = $(el); - const comment = $el.find('span.content').text().trim(); - const author = $el.find('span.username').text(); - return { - comment, - author, - }; - }); - if (comments && comments.length > 0) { - for (const item of comments) { - content += '
' + item.author + ': ' + item.comment; + const $ = load(res.data); + let content = $('div.ui-content').html(); + content = content ? content.trim() : ''; + const comments = $('.reply-item').map((i, el) => { + const $el = $(el); + const comment = $el.find('span.content').text().trim(); + const author = $el.find('span.username').text(); + return { + comment, + author, + }; + }); + if (comments && comments.length > 0) { + for (const item of comments) { + content += '
' + item.author + ': ' + item.comment; + } } - } - item.description = content; - return item; - }) - )) { - out.push(result); - } + item.description = content; + return item; + }), + { concurrency: 2 } + ); return { title: '过早客', diff --git a/lib/routes/kcna/news.ts b/lib/routes/kcna/news.ts index 7eac72a2ed25..4239d84db908 100644 --- a/lib/routes/kcna/news.ts +++ b/lib/routes/kcna/news.ts @@ -3,7 +3,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; import { art } from '@/utils/render'; import { fixDesc, fetchPhoto, fetchVideo } from './utils'; import path from 'node:path'; @@ -79,42 +79,42 @@ async function handler(ctx) { // avoid being IP-banned // if being banned, 103.35.255.254 (the last hop before www.kcna.kp - 175.45.176.71) will drop the packet // verify that with `mtr www.kcna.kp -Tz` - const items = []; - for await (const item of asyncPool(3, list, (item) => - cache.tryGet(item.link, async () => { - const response = await got(item.link); - const $ = load(response.data); - item.title = $('article-main-title').text() || item.title; + const items = await pMap( + list, + (item) => + cache.tryGet(item.link, async () => { + const response = await got(item.link); + const $ = load(response.data); + item.title = $('article-main-title').text() || item.title; - const dateElem = $('.publish-time'); - const dateString = dateElem.text().match(/\d+\.\d+\.\d+/); - dateElem.remove(); - item.pubDate = dateString ? timezone(parseDate(dateString[0]), +9) : item.pubDate; + const dateElem = $('.publish-time'); + const dateString = dateElem.text().match(/\d+\.\d+\.\d+/); + dateElem.remove(); + item.pubDate = dateString ? timezone(parseDate(dateString[0]), +9) : item.pubDate; - const description = fixDesc($, $('.article-content-body .content-wrapper')); + const description = fixDesc($, $('.article-content-body .content-wrapper')); - // add picture and video - const media = $('.media-icon a') - .map((_, elem) => rootUrl + elem.attribs.href) - .get(); - let photo, video; - await Promise.all( - media.map(async (medium) => { - if (medium.includes('/photo/')) { - photo = await fetchPhoto(ctx, medium); - } else if (medium.includes('/video/')) { - video = await fetchVideo(ctx, medium); - } - }) - ); + // add picture and video + const media = $('.media-icon a') + .map((_, elem) => rootUrl + elem.attribs.href) + .get(); + let photo, video; + await Promise.all( + media.map(async (medium) => { + if (medium.includes('/photo/')) { + photo = await fetchPhoto(ctx, medium); + } else if (medium.includes('/video/')) { + video = await fetchVideo(ctx, medium); + } + }) + ); - item.description = art(path.join(__dirname, 'templates/news.art'), { description, photo, video }); + item.description = art(path.join(__dirname, 'templates/news.art'), { description, photo, video }); - return item; - }) - )) { - items.push(item); - } + return item; + }), + { concurrency: 3 } + ); return { title, diff --git a/lib/routes/luogu/contest.ts b/lib/routes/luogu/contest.ts index b89629a2d55d..a50f3980158b 100644 --- a/lib/routes/luogu/contest.ts +++ b/lib/routes/luogu/contest.ts @@ -5,7 +5,7 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import MarkdownIt from 'markdown-it'; const md = MarkdownIt(); -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; const baseUrl = 'https://www.luogu.com.cn'; @@ -64,31 +64,31 @@ async function handler() { ) ); - const result = []; - for await (const item of asyncPool(4, data.currentData.contests.result, (item) => - cache.tryGet(`${baseUrl}/contest/${item.id}`, async () => { - const { data: response } = await got(`${baseUrl}/contest/${item.id}`); - const $ = load(response); - const data = JSON.parse( - decodeURIComponent( - $('script') - .text() - .match(/decodeURIComponent\("(.*)"\)/)[1] - ) - ); + const result = await pMap( + data.currentData.contests.result, + (item) => + cache.tryGet(`${baseUrl}/contest/${item.id}`, async () => { + const { data: response } = await got(`${baseUrl}/contest/${item.id}`); + const $ = load(response); + const data = JSON.parse( + decodeURIComponent( + $('script') + .text() + .match(/decodeURIComponent\("(.*)"\)/)[1] + ) + ); - return { - title: item.name, - description: md.render(data.currentData.contest.description), - link: `${baseUrl}/contest/${item.id}`, - author: item.host.name, - pubDate: parseDate(item.startTime, 'X'), - category: [item.rated ? 'Rated' : null, typeMap.ruleType[item.ruleType], typeMap.visibilityType[item.visibilityType]].filter(Boolean), - }; - }) - )) { - result.push(item); - } + return { + title: item.name, + description: md.render(data.currentData.contest.description), + link: `${baseUrl}/contest/${item.id}`, + author: item.host.name, + pubDate: parseDate(item.startTime, 'X'), + category: [item.rated ? 'Rated' : null, typeMap.ruleType[item.ruleType], typeMap.visibilityType[item.visibilityType]].filter(Boolean), + }; + }), + { concurrency: 4 } + ); return { title: $('head title').text(), diff --git a/lib/routes/nextapple/realtime.ts b/lib/routes/nextapple/realtime.ts index 169267ddb6a7..607268152b3f 100644 --- a/lib/routes/nextapple/realtime.ts +++ b/lib/routes/nextapple/realtime.ts @@ -3,7 +3,7 @@ import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; export const route: Route = { path: '/realtime/:category?', @@ -41,33 +41,34 @@ async function handler(ctx) { const currentUrl = `https://tw.nextapple.com/realtime/${category}`; const response = await got(currentUrl); const $ = load(response.data); - const items = []; - for await (const item of asyncPool(5, $('article.infScroll'), (item) => { - const link = $(item).find('.post-title').attr('href'); - return cache.tryGet(link, async () => { - const response = await got(link); - const $ = load(response.data); - const mainContent = $('#main-content'); - const titleElement = mainContent.find('header h1'); - const title = titleElement.text(); - titleElement.remove(); - const postMetaElement = mainContent.find('.post-meta'); - const category = postMetaElement.find('.category').text(); - const pubDate = parseDate(postMetaElement.find('time').attr('datetime')); - postMetaElement.remove(); - $('.post-comments').remove(); + const items = await pMap( + $('article.infScroll').toArray(), + (item) => { + const link = $(item).find('.post-title').attr('href'); + return cache.tryGet(link, async () => { + const response = await got(link); + const $ = load(response.data); + const mainContent = $('#main-content'); + const titleElement = mainContent.find('header h1'); + const title = titleElement.text(); + titleElement.remove(); + const postMetaElement = mainContent.find('.post-meta'); + const category = postMetaElement.find('.category').text(); + const pubDate = parseDate(postMetaElement.find('time').attr('datetime')); + postMetaElement.remove(); + $('.post-comments').remove(); - return { - title, - description: mainContent.html(), - category, - pubDate, - link, - }; - }); - })) { - items.push(item); - } + return { + title, + description: mainContent.html(), + category, + pubDate, + link, + }; + }); + }, + { concurrency: 5 } + ); return { title: $('title').text(), diff --git a/lib/routes/shoppingdesign/posts.ts b/lib/routes/shoppingdesign/posts.ts index f888711808e2..0e8c4beac7d3 100644 --- a/lib/routes/shoppingdesign/posts.ts +++ b/lib/routes/shoppingdesign/posts.ts @@ -3,7 +3,7 @@ import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; export const route: Route = { path: '/posts', @@ -34,31 +34,32 @@ async function handler() { const currentUrl = 'https://www.shoppingdesign.com.tw/post?sn_f=1'; const response = await got(currentUrl); const $ = load(response.data); - const items = []; - // maximum parallel requests on the target website are limited to 11. - for await (const data of asyncPool(10, $('article-item'), (item) => { - item = $(item); - const link = item.attr('url'); - return cache.tryGet(link, async () => { - const response = await got(`${link}?sn_f=1`); - const $ = load(response.data); - const article = $('.left article .htmlview'); - article.find('d-image').each(function () { - $(this).replaceWith(``); - }); + const items = await pMap( + $('article-item').toArray(), + (item) => { + item = $(item); + const link = item.attr('url'); + return cache.tryGet(link, async () => { + const response = await got(`${link}?sn_f=1`); + const $ = load(response.data); + const article = $('.left article .htmlview'); + article.find('d-image').each(function () { + $(this).replaceWith(``); + }); - return { - title: $('.left article .top_info h1').text(), - author: $('meta[name="my:author"]').attr('content'), - description: article.html(), - category: $('meta[name="my:category"]').attr('content'), - pubDate: parseDate($('meta[name="my:publish"]').attr('content')), - link, - }; - }); - })) { - items.push(data); - } + return { + title: $('.left article .top_info h1').text(), + author: $('meta[name="my:author"]').attr('content'), + description: article.html(), + category: $('meta[name="my:category"]').attr('content'), + pubDate: parseDate($('meta[name="my:publish"]').attr('content')), + link, + }; + }); + }, + // maximum parallel requests on the target website are limited to 11. + { concurrency: 10 } + ); return { title: $('meta[property="og:title"]').attr('content'), diff --git a/lib/routes/tfc-taiwan/utils.ts b/lib/routes/tfc-taiwan/utils.ts index b923fd5ded20..58461edcb17e 100644 --- a/lib/routes/tfc-taiwan/utils.ts +++ b/lib/routes/tfc-taiwan/utils.ts @@ -2,17 +2,9 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import path from 'node:path'; import { art } from '@/utils/render'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; import { parseDate } from '@/utils/parse-date'; -const asyncPoolAll = async (...args) => { - const results = []; - for await (const result of asyncPool(...args)) { - results.push(result); - } - return results; -}; - const baseUrl = 'https://tfc-taiwan.org.tw'; const parseList = (item) => { @@ -27,26 +19,29 @@ const parseList = (item) => { }; const parseItems = (list, tryGet) => - asyncPoolAll(10, list, (item) => - tryGet(item.link, async () => { - const { data: response } = await got(item.link); - const $ = load(response); - - $('.field-name-field-addthis, #fb-root, .fb-comments, .likecoin-embed, style[type="text/css"]').remove(); - - item.description = art(path.join(__dirname, 'templates/article.art'), { - headerImage: item.image, - content: $('#block-system-main .node-content').html(), - }); - - item.pubDate = $('meta[property="article:published_time"]').attr('content'); - item.updated = $('meta[property="article:modified_time"]').attr('content'); - item.category = $('.node-tags .field-item') - .toArray() - .map((item) => $(item).text()); - - return item; - }) + pMap( + list, + (item) => + tryGet(item.link, async () => { + const { data: response } = await got(item.link); + const $ = load(response); + + $('.field-name-field-addthis, #fb-root, .fb-comments, .likecoin-embed, style[type="text/css"]').remove(); + + item.description = art(path.join(__dirname, 'templates/article.art'), { + headerImage: item.image, + content: $('#block-system-main .node-content').html(), + }); + + item.pubDate = $('meta[property="article:published_time"]').attr('content'); + item.updated = $('meta[property="article:modified_time"]').attr('content'); + item.category = $('.node-tags .field-item') + .toArray() + .map((item) => $(item).text()); + + return item; + }), + { concurrency: 10 } ); export { baseUrl, parseList, parseItems }; diff --git a/lib/routes/tradingview/blog.ts b/lib/routes/tradingview/blog.ts index 484f9a92ab87..8ffca34d1684 100644 --- a/lib/routes/tradingview/blog.ts +++ b/lib/routes/tradingview/blog.ts @@ -4,7 +4,7 @@ import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; import { art } from '@/utils/render'; import path from 'node:path'; @@ -26,7 +26,7 @@ async function handler(ctx) { const $ = load(response); - const items = $('article[id]') + const list = $('article[id]') .slice(0, limit) .toArray() .map((item) => { @@ -55,48 +55,48 @@ async function handler(ctx) { }; }); - for await (const item of asyncPool(3, items, (item) => - cache.tryGet(item.link, async () => { - const { data: detailResponse } = await got(item.link); - - const content = load(detailResponse); - - content('div.entry-content') - .find('img') - .each((_, e) => { - content(e).replaceWith( - art(path.join(__dirname, 'templates/description.art'), { - image: { - src: content(e) - .prop('src') - .replace(/-\d+x\d+\./, '.'), - width: content(e).prop('width'), - height: content(e).prop('height'), - }, - }) - ); + const items = await pMap( + list, + (item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const content = load(detailResponse); + + content('div.entry-content') + .find('img') + .each((_, e) => { + content(e).replaceWith( + art(path.join(__dirname, 'templates/description.art'), { + image: { + src: content(e) + .prop('src') + .replace(/-\d+x\d+\./, '.'), + width: content(e).prop('width'), + height: content(e).prop('height'), + }, + }) + ); + }); + + item.title = content('meta[property="og:title"]').prop('content'); + item.description = art(path.join(__dirname, 'templates/description.art'), { + image: { + src: content('meta[property="og:image"]').prop('content'), + alt: item.title, + }, + description: content('div.entry-content').html(), }); + item.author = content('meta[property="og:site_name"]').prop('content'); + item.category = content('div.sections a.section') + .toArray() + .map((c) => content(c).text()); + item.pubDate = parseDate(content('div.single-date').text(), 'MMM D, YYYY'); - item.title = content('meta[property="og:title"]').prop('content'); - item.description = art(path.join(__dirname, 'templates/description.art'), { - image: { - src: content('meta[property="og:image"]').prop('content'), - alt: item.title, - }, - description: content('div.entry-content').html(), - }); - item.author = content('meta[property="og:site_name"]').prop('content'); - item.category = content('div.sections a.section') - .toArray() - .map((c) => content(c).text()); - item.pubDate = parseDate(content('div.single-date').text(), 'MMM D, YYYY'); - - return item; - }) - )) { - items.shift(); - items.push(item); - } + return item; + }), + { concurrency: 3 } + ); const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; diff --git a/lib/routes/wsj/news.ts b/lib/routes/wsj/news.ts index 801ccadf43c6..01b7998c9cd3 100644 --- a/lib/routes/wsj/news.ts +++ b/lib/routes/wsj/news.ts @@ -1,7 +1,8 @@ import { Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -import { asyncPoolAll, parseArticle } from './utils'; +import { parseArticle } from './utils'; +import pMap from 'p-map'; const hostMap = { 'en-us': 'https://www.wsj.com', 'zh-cn': 'https://cn.wsj.com/zh-hans', @@ -72,7 +73,7 @@ async function handler(ctx) { item.test = key; return item; }); - const items = await asyncPoolAll(10, list, (item) => parseArticle(item)); + const items = await pMap(list, (item) => parseArticle(item), { concurrency: 10 }); return { title: `WSJ${subTitle}`, diff --git a/lib/routes/wsj/utils.ts b/lib/routes/wsj/utils.ts index 4310695ba292..1e3507878c0a 100644 --- a/lib/routes/wsj/utils.ts +++ b/lib/routes/wsj/utils.ts @@ -1,5 +1,4 @@ import cache from '@/utils/cache'; -import asyncPool from 'tiny-async-pool'; import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -111,11 +110,4 @@ const parseArticle = (item) => }; }); -const asyncPoolAll = async (...args) => { - const results = []; - for await (const result of asyncPool(...args)) { - results.push(result); - } - return results; -}; -export { asyncPoolAll, parseArticle }; +export { parseArticle }; diff --git a/lib/routes/x-mol/paper.ts b/lib/routes/x-mol/paper.ts index 69c01732fb19..079283874b3c 100644 --- a/lib/routes/x-mol/paper.ts +++ b/lib/routes/x-mol/paper.ts @@ -5,7 +5,7 @@ import { load } from 'cheerio'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; export const route: Route = { path: '/paper/:type/:magazine', @@ -57,31 +57,26 @@ async function handler(ctx) { }; }); - const asyncPoolAll = async (...args) => { - const results = []; - for await (const result of asyncPool(...args)) { - results.push(result); - } - return results; - }; - - const item = await asyncPoolAll(2, newsItem, (element) => - cache.tryGet(element.link, async () => { - const response = await got(element.link); - const $ = load(response.data); + const item = await pMap( + newsItem, + (element) => + cache.tryGet(element.link, async () => { + const response = await got(element.link); + const $ = load(response.data); - const description = $('.maga-content'); - element.doi = description.find('.itsmblue').eq(1).text().trim(); + const description = $('.maga-content'); + element.doi = description.find('.itsmblue').eq(1).text().trim(); - description.find('.itgaryfirst').remove(); - description.find('span').eq(0).remove(); - element.author = description.find('span').eq(0).text().trim(); - description.find('span').eq(0).remove(); + description.find('.itgaryfirst').remove(); + description.find('span').eq(0).remove(); + element.author = description.find('span').eq(0).text().trim(); + description.find('span').eq(0).remove(); - element.description = description.html(); + element.description = description.html(); - return element; - }) + return element; + }), + { concurrency: 2 } ); return { diff --git a/lib/routes/yamibo/bbs/forum.ts b/lib/routes/yamibo/bbs/forum.ts index 21820def90d3..802685b77fa3 100644 --- a/lib/routes/yamibo/bbs/forum.ts +++ b/lib/routes/yamibo/bbs/forum.ts @@ -3,7 +3,8 @@ import type { Context } from 'hono'; import { config } from '@/config'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; -import { asyncPoolAll, fetchThread, generateDescription, getDate, bbsOrigin } from '../utils'; +import { fetchThread, generateDescription, getDate, bbsOrigin } from '../utils'; +import pMap from 'p-map'; import cache from '@/utils/cache'; export const route: Route = { @@ -81,8 +82,7 @@ async function handler(ctx: Context): Promise { }; }); - items = await asyncPoolAll( - 5, + items = await pMap( items, async (item) => (await cache.tryGet(item.link!, async () => { @@ -105,7 +105,8 @@ async function handler(ctx: Context): Promise { description, pubDate: item.pubDate, }; - })) as DataItem + })) as DataItem, + { concurrency: 5 } ); return { diff --git a/lib/routes/yamibo/utils.ts b/lib/routes/yamibo/utils.ts index 3e6a7ee0e57e..147887786692 100644 --- a/lib/routes/yamibo/utils.ts +++ b/lib/routes/yamibo/utils.ts @@ -2,7 +2,6 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import ofetch from '@/utils/ofetch'; import { config } from '@/config'; -import asyncPool from 'tiny-async-pool'; import { JSDOM } from 'jsdom'; import type { Cheerio, Element } from 'cheerio'; @@ -104,11 +103,3 @@ export function generateDescription($item: Cheerio, postId: string) { return description; } - -export async function asyncPoolAll(poolLimit: number, array: readonly IN[], iteratorFn: (generator: IN) => Promise) { - const results: Awaited = []; - for await (const result of asyncPool(poolLimit, array, iteratorFn)) { - results.push(result); - } - return results; -} diff --git a/lib/routes/youtube/subscriptions.ts b/lib/routes/youtube/subscriptions.ts index 7455f30be20c..c6497268e79b 100644 --- a/lib/routes/youtube/subscriptions.ts +++ b/lib/routes/youtube/subscriptions.ts @@ -3,7 +3,7 @@ import cache from '@/utils/cache'; import { config } from '@/config'; import utils from './utils'; import { parseDate } from '@/utils/parse-date'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; import ConfigNotFoundError from '@/errors/types/config-not-found'; export const route: Route = { @@ -51,18 +51,10 @@ async function handler(ctx) { const channelIds = (await utils.getSubscriptions('snippet', cache)).data.items.map((item) => item.snippet.resourceId.channelId); - const playlistIds = []; - for await (const playlistId of asyncPool(30, channelIds, async (channelId) => (await utils.getChannelWithId(channelId, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads)) { - playlistIds.push(playlistId); - } + const playlistIds = await pMap(channelIds, async (channelId) => (await utils.getChannelWithId(channelId, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads, { concurrency: 30 }); - let items = []; - for await (const item of asyncPool(30, playlistIds, async (playlistId) => (await utils.getPlaylistItems(playlistId, 'snippet', cache))?.data.items)) { - items.push(item); - } + let items = await pMap(playlistIds, async (playlistId) => (await utils.getPlaylistItems(playlistId, 'snippet', cache))?.data.items, { concurrency: 30 }); - // https://measurethat.net/Benchmarks/Show/7223 - // concat > reduce + concat >>> flat items = items.flat(); items = items diff --git a/lib/routes/zaker/channel.ts b/lib/routes/zaker/channel.ts index e4e6f536fe75..c3e68682aea0 100644 --- a/lib/routes/zaker/channel.ts +++ b/lib/routes/zaker/channel.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import * as cheerio from 'cheerio'; import { baseUrl, fetchItem, getSafeLineCookieWithData, parseList } from './utils'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; export const route: Route = { path: '/channel/:id?', @@ -31,10 +31,7 @@ async function handler(ctx) { const feedTitle = $('head title').text(); const list = parseList($); - const items = []; - for await (const item of asyncPool(2, list, (item) => cache.tryGet(item.link!, () => fetchItem(item, cookie)))) { - items.push(item); - } + const items = await pMap(list, (item) => cache.tryGet(item.link!, () => fetchItem(item, cookie)), { concurrency: 2 }); return { title: feedTitle, diff --git a/lib/routes/zaker/focus.ts b/lib/routes/zaker/focus.ts index 4349f9d2a00d..539b838f26a6 100644 --- a/lib/routes/zaker/focus.ts +++ b/lib/routes/zaker/focus.ts @@ -1,7 +1,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import * as cheerio from 'cheerio'; -import asyncPool from 'tiny-async-pool'; +import pMap from 'p-map'; import { baseUrl, fetchItem, getSafeLineCookieWithData, parseList } from './utils'; export const route: Route = { @@ -26,10 +26,7 @@ async function handler() { const $ = cheerio.load(data); const list = parseList($); - const items = []; - for await (const item of asyncPool(2, list, (item) => cache.tryGet(item.link!, () => fetchItem(item, cookie)))) { - items.push(item); - } + const items = await pMap(list, (item) => cache.tryGet(item.link!, () => fetchItem(item, cookie)), { concurrency: 2 }); return { title: 'ZAKER 精读新闻', diff --git a/package.json b/package.json index af2c24ebb74f..6b3aee5e4b54 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,6 @@ "socks-proxy-agent": "8.0.5", "source-map": "0.7.4", "telegram": "2.26.22", - "tiny-async-pool": "2.1.0", "title": "4.0.1", "tldts": "7.0.2", "tosource": "2.0.0-alpha.3", @@ -166,7 +165,6 @@ "@types/node": "22.14.1", "@types/sanitize-html": "2.15.0", "@types/supertest": "6.0.3", - "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.31.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 459eee3d7dd6..929d683d3472 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -242,9 +242,6 @@ importers: telegram: specifier: 2.26.22 version: 2.26.22 - tiny-async-pool: - specifier: 2.1.0 - version: 2.1.0 title: specifier: 4.0.1 version: 4.0.1 @@ -360,9 +357,6 @@ importers: '@types/supertest': specifier: 6.0.3 version: 6.0.3 - '@types/tiny-async-pool': - specifier: 2.0.3 - version: 2.0.3 '@types/title': specifier: 3.4.3 version: 3.4.3 @@ -2534,9 +2528,6 @@ packages: '@types/tedious@4.0.14': resolution: {integrity: sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw==} - '@types/tiny-async-pool@2.0.3': - resolution: {integrity: sha512-n3l1s538tKo9RBoHs4I3DG/VmD3VYhF5mHcgu1sU4Lq7JCNBtxnpBy3OkWSbZsp5r5QOuplh2UkXXXwufoAuNQ==} - '@types/title@3.4.3': resolution: {integrity: sha512-mjupLOb4kwUuoUFokkacy/VMRVBH2qtqZ5AX7K7iha6+iKIkX80n/Y4EoNVEVRmer8dYJU/ry+fppUaDFVQh7Q==} @@ -5881,9 +5872,6 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - tiny-async-pool@2.1.0: - resolution: {integrity: sha512-ltAHPh/9k0STRQqaoUX52NH4ZQYAJz24ZAEwf1Zm+HYg3l9OXTWeqWKyYsHu40wF/F0rxd2N2bk5sLvX2qlSvg==} - tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -8646,8 +8634,6 @@ snapshots: dependencies: '@types/node': 22.14.1 - '@types/tiny-async-pool@2.0.3': {} - '@types/title@3.4.3': {} '@types/tough-cookie@4.0.5': {} @@ -12483,8 +12469,6 @@ snapshots: through@2.3.8: {} - tiny-async-pool@2.1.0: {} - tinybench@2.9.0: {} tinyexec@0.3.2: {} From 2650ecc1dcf9dd6acaa46c632eb6c908cf036838 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 23 Apr 2025 23:37:20 +0800 Subject: [PATCH 0481/2658] fix(route/tfc-taiwan): rework route (#18930) --- lib/routes/tfc-taiwan/category.ts | 53 ++++++++++++++++++++++ lib/routes/tfc-taiwan/common.ts | 38 ---------------- lib/routes/tfc-taiwan/index.ts | 36 ++++++++++----- lib/routes/tfc-taiwan/namespace.ts | 5 ++- lib/routes/tfc-taiwan/topic.ts | 17 -------- lib/routes/tfc-taiwan/utils.ts | 70 +++++++++++------------------- 6 files changed, 108 insertions(+), 111 deletions(-) create mode 100644 lib/routes/tfc-taiwan/category.ts delete mode 100644 lib/routes/tfc-taiwan/common.ts delete mode 100644 lib/routes/tfc-taiwan/topic.ts diff --git a/lib/routes/tfc-taiwan/category.ts b/lib/routes/tfc-taiwan/category.ts new file mode 100644 index 000000000000..a82c10c6a5c7 --- /dev/null +++ b/lib/routes/tfc-taiwan/category.ts @@ -0,0 +1,53 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { baseUrl, parsePost, parseItem } from './utils'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; + +const handler = async (ctx) => { + const { category } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : undefined; + const isNumericCategory = !Number.isNaN(Number.parseInt(category, 10)); + + const categoryResponse = await ofetch(`${baseUrl}/wp-json/wp/v2/categories${isNumericCategory ? `/${category}` : ''}`, { + query: { + slug: isNumericCategory ? undefined : category, + }, + }); + + if (Array.isArray(categoryResponse) && !categoryResponse.length) { + throw new InvalidParameterError(`Category "${category}" not found`); + } + const categoryInfo = isNumericCategory ? categoryResponse : categoryResponse[0]; + if (!categoryInfo.id) { + throw new InvalidParameterError(`Category "${category}" not found`); + } + + const postsResponse = await parsePost(limit, categoryInfo.id); + const items = parseItem(postsResponse); + + return { + title: categoryInfo.yoast_head_json.title, + description: categoryInfo.yoast_head_json.og_site_name, + image: categoryInfo.yoast_head_json.og_image[0].url, + logo: categoryInfo.yoast_head_json.og_image[0].url, + icon: categoryInfo.yoast_head_json.og_image[0].url, + link: categoryInfo.link, + lang: 'zh-TW', + item: items, + }; +}; + +export const route: Route = { + name: '分類', + maintainers: ['TonyRL'], + example: '/tfc-taiwan/category/weekly-top-ten-rumors', + path: '/category/:category', + parameters: { + category: '分類,見下表,預設為 `weekly-top-ten-rumors`', + }, + handler, + url: 'tfc-taiwan.org.tw/category/rumor-mill/', + description: `| 謠言風向球 | 議題觀察室 | TOP10 | 名家專欄 | 國際視野 | +| ---------- | ----------------- | --------------------- | -------------- | -------------------- | +| rumor-mill | issue-observatory | weekly-top-ten-rumors | expert-columns | research-and-updates |`, +}; diff --git a/lib/routes/tfc-taiwan/common.ts b/lib/routes/tfc-taiwan/common.ts deleted file mode 100644 index 09076850a219..000000000000 --- a/lib/routes/tfc-taiwan/common.ts +++ /dev/null @@ -1,38 +0,0 @@ -import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { load } from 'cheerio'; -import { baseUrl, parseList, parseItems } from './utils'; -import { getSubPath } from '@/utils/common-utils'; - -export async function handler(ctx) { - const requestPath = getSubPath(ctx); - const isTopic = requestPath.startsWith('/topic/'); - let link = baseUrl; - - if (isTopic) { - link += `/topic/${ctx.req.param('id')}`; - } else if (requestPath === '/') { - link += `/articles/report`; - } else { - link += `/articles${requestPath}`; - } - - const { data: response } = await got(link); - const $ = load(response); - - const list = $(`${isTopic ? '.view-grouping' : '.pane-clone-of-article'} .views-row-inner`) - .toArray() - .map((item) => parseList($(item))); - - const items = await parseItems(list, cache.tryGet); - - return { - title: $('head title').text(), - description: $('head meta[name="description"]').attr('content'), - image: $('head meta[property="og:image"]').attr('content'), - logo: $('head link[rel="shortcut icon"]').attr('href'), - icon: $('head link[rel="shortcut icon"]').attr('href'), - link, - item: items, - }; -} diff --git a/lib/routes/tfc-taiwan/index.ts b/lib/routes/tfc-taiwan/index.ts index 4b1653194803..b1516149f1a9 100644 --- a/lib/routes/tfc-taiwan/index.ts +++ b/lib/routes/tfc-taiwan/index.ts @@ -1,17 +1,33 @@ import { Route } from '@/types'; -import { handler } from './common'; +import ofetch from '@/utils/ofetch'; +import { baseUrl, parsePost, parseItem } from './utils'; + +const handler = async (ctx) => { + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : undefined; + + const pageResponse = await ofetch(`${baseUrl}/wp-json/wp/v2/pages/89173`); + const postsResponse = await parsePost(limit, undefined); + + const pageInfo = pageResponse.yoast_head_json; + const items = parseItem(postsResponse); + + return { + title: pageInfo.title, + description: pageInfo.og_site_name, + image: pageInfo.og_image[0].url, + logo: pageInfo.og_image[0].url, + icon: pageInfo.og_image[0].url, + link: pageInfo.canonical, + lang: 'zh-TW', + item: items, + }; +}; export const route: Route = { - name: '最新相關資訊 / 最新查核報告', + name: '最新查核報告', maintainers: ['TonyRL'], example: '/tfc-taiwan', - path: '/:type?', - parameters: { - type: '分類,見下表,預設為 `report`', - }, + path: '/', handler, - url: 'tfc-taiwan.org.tw/articles/report', - description: `| 最新相關資訊 | 最新查核報告 | -| ------------ | ------------ | -| info | report |`, + url: 'tfc-taiwan.org.tw/latest-news/', }; diff --git a/lib/routes/tfc-taiwan/namespace.ts b/lib/routes/tfc-taiwan/namespace.ts index 962c3e3aed7e..721c339cc9b8 100644 --- a/lib/routes/tfc-taiwan/namespace.ts +++ b/lib/routes/tfc-taiwan/namespace.ts @@ -1,7 +1,10 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: '台灣事實查核中心', + name: 'Taiwan FactCheck Center', url: 'tfc-taiwan.org.tw', lang: 'zh-TW', + 'zh-TW': { + name: '台灣事實查核中心', + }, }; diff --git a/lib/routes/tfc-taiwan/topic.ts b/lib/routes/tfc-taiwan/topic.ts deleted file mode 100644 index ba1badc3d5c2..000000000000 --- a/lib/routes/tfc-taiwan/topic.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Route } from '@/types'; -import { handler } from './common'; - -export const route: Route = { - name: '專題 / 重點專區', - maintainers: ['TonyRL'], - example: '/tfc-taiwan/category/242', - path: '/:type/:id{.+}', - parameters: { - type: '分類,見下表,預設為 `report`', - }, - handler, - url: 'tfc-taiwan.org.tw/articles/report', - description: `| 專題 | 重點專區 | -| -------- | -------- | -| category | topic |`, -}; diff --git a/lib/routes/tfc-taiwan/utils.ts b/lib/routes/tfc-taiwan/utils.ts index 58461edcb17e..afdb791ef52b 100644 --- a/lib/routes/tfc-taiwan/utils.ts +++ b/lib/routes/tfc-taiwan/utils.ts @@ -1,47 +1,27 @@ -import got from '@/utils/got'; -import { load } from 'cheerio'; -import path from 'node:path'; -import { art } from '@/utils/render'; -import pMap from 'p-map'; +import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; - -const baseUrl = 'https://tfc-taiwan.org.tw'; - -const parseList = (item) => { - const a = item.find('.entity-list-title a'); - return { - title: a.text(), - description: item.find('.entity-list-body').text(), - link: new URL(a.attr('href'), baseUrl).href, - pubDate: item.find('.post-date').length ? parseDate(item.find('.post-date').text(), 'YYYY-MM-DD') : undefined, - image: item.find('.entity-list-img img').attr('src').split('?')[0], - }; -}; - -const parseItems = (list, tryGet) => - pMap( - list, - (item) => - tryGet(item.link, async () => { - const { data: response } = await got(item.link); - const $ = load(response); - - $('.field-name-field-addthis, #fb-root, .fb-comments, .likecoin-embed, style[type="text/css"]').remove(); - - item.description = art(path.join(__dirname, 'templates/article.art'), { - headerImage: item.image, - content: $('#block-system-main .node-content').html(), - }); - - item.pubDate = $('meta[property="article:published_time"]').attr('content'); - item.updated = $('meta[property="article:modified_time"]').attr('content'); - item.category = $('.node-tags .field-item') - .toArray() - .map((item) => $(item).text()); - - return item; - }), - { concurrency: 10 } +import cache from '@/utils/cache'; + +export const baseUrl = 'https://tfc-taiwan.org.tw'; + +export const parseItem = (postsResponse) => + postsResponse.map((item) => ({ + title: item.title.rendered, + pubDate: parseDate(item.date_gmt), + updated: parseDate(item.modified_gmt), + link: item.link, + description: item.content.rendered, + image: item.yoast_head_json.og_image[0].url, + author: item.author_info.display_name, + category: item.category_info.map((cat) => cat.name), + })); + +export const parsePost = (limit, categoryId) => + cache.tryGet(`tfc-taiwan:posts:${categoryId ?? 'latest'}:${limit ?? 10}`, () => + ofetch(`${baseUrl}/wp-json/wp/v2/posts`, { + query: { + categories: categoryId, + per_page: limit, + }, + }) ); - -export { baseUrl, parseList, parseItems }; From dd96d12ebb255856c3856e5eeb577e70698038f7 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 24 Apr 2025 02:18:02 +0800 Subject: [PATCH 0482/2658] revert: "chore: minify docker (#18914)" (#18931) This reverts commit e9013a23139a692fe93b6a2ad4c5cc85b8020192. --- Dockerfile | 52 +++++++++++++++------------------ scripts/docker/minify-docker.js | 32 ++++++++++---------- 2 files changed, 41 insertions(+), 43 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b0fa1c49f36..bd96cee15034 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,10 +17,9 @@ RUN \ pnpm config set registry https://registry.npmmirror.com ; \ fi; +COPY ./tsconfig.json /app/ COPY ./pnpm-lock.yaml /app/ COPY ./package.json /app/ -COPY ./tsconfig.json /app/ -COPY ./tsdown.config.ts /app/ # lazy install Chromium to avoid cache miss, only install production dependencies to minimize the image size RUN \ @@ -41,44 +40,41 @@ WORKDIR /ver COPY ./package.json /app/ RUN \ set -ex && \ - grep -Po '(?<="puppeteer": ")[^\s"]*(?=")' /app/package.json | tee /ver/.puppeteer_version && \ - grep -Po '(?<="@vercel/nft": ")[^\s"]*(?=")' /app/package.json | tee /ver/.nft_version && \ - grep -Po '(?<="fs-extra": ")[^\s"]*(?=")' /app/package.json | tee /ver/.fs_extra_version + grep -Po '(?<="puppeteer": ")[^\s"]*(?=")' /app/package.json | tee /ver/.puppeteer_version + # grep -Po '(?<="@vercel/nft": ")[^\s"]*(?=")' /app/package.json | tee /ver/.nft_version && \ + # grep -Po '(?<="fs-extra": ")[^\s"]*(?=")' /app/package.json | tee /ver/.fs_extra_version # --------------------------------------------------------------------------------------------------------------------- FROM node:22-bookworm-slim AS docker-minifier # The stage is used to further reduce the image size by removing unused files. -WORKDIR /minifier -COPY --from=dep-version-parser /ver/* /minifier/ - -ARG USE_CHINA_NPM_REGISTRY=0 -RUN \ - set -ex && \ - if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \ - npm config set registry https://registry.npmmirror.com && \ - yarn config set registry https://registry.npmmirror.com && \ - pnpm config set registry https://registry.npmmirror.com ; \ - fi; \ - npm install -g corepack@latest && \ - corepack use pnpm@latest-9 && \ - pnpm add @vercel/nft@$(cat .nft_version) fs-extra@$(cat .fs_extra_version) --save-prod +WORKDIR /app +# COPY --from=dep-version-parser /ver/* /minifier/ + +# ARG USE_CHINA_NPM_REGISTRY=0 +# RUN \ +# set -ex && \ +# if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \ +# npm config set registry https://registry.npmmirror.com && \ +# yarn config set registry https://registry.npmmirror.com && \ +# pnpm config set registry https://registry.npmmirror.com ; \ +# fi; \ +# corepack enable pnpm && \ +# pnpm add @vercel/nft@$(cat .nft_version) fs-extra@$(cat .fs_extra_version) --save-prod COPY . /app COPY --from=dep-builder /app /app -WORKDIR /app RUN \ set -ex && \ - pnpm build && \ - find /app/lib -mindepth 1 -not -path "/app/lib/assets*" -exec rm -rf {} \; 2>/dev/null || true && \ - cp /app/scripts/docker/minify-docker.js /minifier/ && \ - export PROJECT_ROOT=/app && \ - node /minifier/minify-docker.js && \ - rm -rf /app/node_modules /app/scripts && \ - mv /app/app-minimal/node_modules /app/ && \ - rm -rf /app/app-minimal && \ + # cp /app/scripts/docker/minify-docker.js /minifier/ && \ + # export PROJECT_ROOT=/app && \ + # node /minifier/minify-docker.js && \ + # rm -rf /app/node_modules /app/scripts && \ + # mv /app/app-minimal/node_modules /app/ && \ + # rm -rf /app/app-minimal && \ + npm run build && \ ls -la /app && \ du -hd1 /app diff --git a/scripts/docker/minify-docker.js b/scripts/docker/minify-docker.js index 7890d454917a..f40d1c81e3df 100644 --- a/scripts/docker/minify-docker.js +++ b/scripts/docker/minify-docker.js @@ -1,23 +1,25 @@ /* eslint-disable no-console */ -import fs from 'fs-extra'; -import path from 'node:path'; -import { nodeFileTrace } from '@vercel/nft'; +const fs = require('fs-extra'); +const path = require('path'); +const { nodeFileTrace } = require('@vercel/nft'); // !!! if any new dependencies are added, update the Dockerfile !!! -const projectRoot = path.resolve(process.env.PROJECT_ROOT || path.join(path.dirname(new URL(import.meta.url).pathname), '../..')); +const projectRoot = path.resolve(process.env.PROJECT_ROOT || path.join(__dirname, '../..')); const resultFolder = path.join(projectRoot, 'app-minimal'); // no need to resolve, ProjectRoot is always absolute -const files = ['dist/index.js', 'api/vercel.ts', 'node_modules/cross-env/src/bin/cross-env.js', 'node_modules/.bin/cross-env'].map((file) => path.join(projectRoot, file)); +const files = ['lib/index.ts', 'api/vercel.js'].map((file) => path.join(projectRoot, file)); -console.log('Start analyzing, project root:', projectRoot); -const { fileList: fileSet } = await nodeFileTrace(files, { - base: projectRoot, -}); -let fileList = [...fileSet]; -console.log('Total touchable files:', fileList.length); -fileList = fileList.filter((file) => file.startsWith('node_modules/')); // only need node_modules -console.log('Total files need to be copied (touchable files in node_modules/):', fileList.length); -console.log('Start copying files, destination:', resultFolder); -await Promise.all(fileList.map((e) => fs.copy(path.join(projectRoot, e), path.join(resultFolder, e)))).catch((error) => { +(async () => { + console.log('Start analyzing, project root:', projectRoot); + const { fileList: fileSet } = await nodeFileTrace(files, { + base: projectRoot, + }); + let fileList = [...fileSet]; + console.log('Total touchable files:', fileList.length); + fileList = fileList.filter((file) => file.startsWith('node_modules/')); // only need node_modules + console.log('Total files need to be copied (touchable files in node_modules/):', fileList.length); + console.log('Start copying files, destination:', resultFolder); + return Promise.all(fileList.map((e) => fs.copy(path.join(projectRoot, e), path.join(resultFolder, e)))); +})().catch((error) => { // fix unhandled promise rejections console.error(error, error.stack); process.exit(1); From 5a545451a82f4522fcce7240692ffc992eafe080 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 08:49:54 +0000 Subject: [PATCH 0483/2658] chore(deps): bump @scalar/hono-api-reference from 0.8.3 to 0.8.5 (#18934) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.8.3 to 0.8.5. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-version: 0.8.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 6b3aee5e4b54..8f343b3156aa 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.32.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.8.3", + "@scalar/hono-api-reference": "0.8.5", "@sentry/node": "9.13.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 929d683d3472..cdfd0f1a7831 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.8.3 - version: 0.8.3(hono@4.7.7) + specifier: 0.8.5 + version: 0.8.5(hono@4.7.7) '@sentry/node': specifier: 9.13.0 version: 9.13.0 @@ -2313,22 +2313,22 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/core@0.2.9': - resolution: {integrity: sha512-jiUVjN2EubmhitkiXdVxqpkuEbo3e4gQLjla4NfIjgvkJFwF5FmMXQQK6m5AQ5SUgvMCK6hskVMeIYx9bhsgaQ==} + '@scalar/core@0.2.11': + resolution: {integrity: sha512-crakGk7IOWEvlexKdxr+uLW+SzvE/9OLZMYGHn0GNop3jSsHqZRB7a4epZ6MzmOP6L2665M4q8g1IuTKBudYVw==} engines: {node: '>=18'} - '@scalar/hono-api-reference@0.8.3': - resolution: {integrity: sha512-TIyna7k/b9zq7HR4xN7PPlN+3zKgmbF4zfyMZGS8xMTORIY7r3K9Puta0d30p48ZeTM0Jvwad0hxnaGEZstAsw==} + '@scalar/hono-api-reference@0.8.5': + resolution: {integrity: sha512-s9jmP7wQnXNvGR/pFyUxc1BDb7YMbLHJY7czqbMouBjNOhaeutipg2RioiViLOPdyLUoJWeUDxL7h4fUxcZMoA==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 - '@scalar/openapi-types@0.2.0': - resolution: {integrity: sha512-waiKk12cRCqyUCWTOX0K1WEVX46+hVUK+zRPzAahDJ7G0TApvbNkuy5wx7aoUyEk++HHde0XuQnshXnt8jsddA==} + '@scalar/openapi-types@0.2.1': + resolution: {integrity: sha512-UMxX54taQXnEWYEuesbH+pkjlXRVV1u/Wx6YbVeU3QoJdFGqT3Z7si9zsokoG6MXDcdi1LGny7A0KwownmPvUQ==} engines: {node: '>=18'} - '@scalar/types@0.1.9': - resolution: {integrity: sha512-VyGZpiPHK3w+8AzypXF0Uj4sTb9n25FjQKgHxNmlnw/q4DMF6Y9m402LSWqu/N7p4fM/1dImkptf75FnKkzIwQ==} + '@scalar/types@0.1.11': + resolution: {integrity: sha512-fNcaZbZKoZ2PvoW+KJHmk4au8ZukgWlb6qLK3k/SLkfsTggN3DO4PR57ch6cyl2WhwENNbw+iI+ss7fTRcPnOA==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -8367,22 +8367,22 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/core@0.2.9': + '@scalar/core@0.2.11': dependencies: - '@scalar/types': 0.1.9 + '@scalar/types': 0.1.11 - '@scalar/hono-api-reference@0.8.3(hono@4.7.7)': + '@scalar/hono-api-reference@0.8.5(hono@4.7.7)': dependencies: - '@scalar/core': 0.2.9 + '@scalar/core': 0.2.11 hono: 4.7.7 - '@scalar/openapi-types@0.2.0': + '@scalar/openapi-types@0.2.1': dependencies: zod: 3.24.3 - '@scalar/types@0.1.9': + '@scalar/types@0.1.11': dependencies: - '@scalar/openapi-types': 0.2.0 + '@scalar/openapi-types': 0.2.1 '@unhead/schema': 1.11.20 nanoid: 5.1.5 type-fest: 4.40.0 From aa5c70c2cb42698f7719576c1031a7ebef2546a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 08:56:05 +0000 Subject: [PATCH 0484/2658] chore(deps-dev): bump tsdown from 0.9.5 to 0.9.6 (#18935) Bumps [tsdown](https://github.com/rolldown/tsdown) from 0.9.5 to 0.9.6. - [Release notes](https://github.com/rolldown/tsdown/releases) - [Commits](https://github.com/rolldown/tsdown/compare/v0.9.5...v0.9.6) --- updated-dependencies: - dependency-name: tsdown dependency-version: 0.9.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 312 ++++++++++++++++++++++++------------------------- 2 files changed, 157 insertions(+), 157 deletions(-) diff --git a/package.json b/package.json index 8f343b3156aa..0992a62f2a04 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "prettier": "3.5.3", "remark-parse": "11.0.0", "supertest": "7.1.0", - "tsdown": "0.9.5", + "tsdown": "0.9.6", "typescript": "5.8.3", "unified": "11.0.5", "vite-tsconfig-paths": "5.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cdfd0f1a7831..ab24377a00b0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -439,8 +439,8 @@ importers: specifier: 7.1.0 version: 7.1.0 tsdown: - specifier: 0.9.5 - version: 0.9.5(typescript@5.8.3) + specifier: 0.9.6 + version: 0.9.6(typescript@5.8.3) typescript: specifier: 5.8.3 version: 5.8.3 @@ -1873,67 +1873,67 @@ packages: '@otplib/preset-v11@12.0.1': resolution: {integrity: sha512-9hSetMI7ECqbFiKICrNa4w70deTUfArtwXykPUvSHWOdzOlfa9ajglu7mNCntlvxycTiOAXkQGwjQCzzDEMRMg==} - '@oxc-parser/binding-darwin-arm64@0.65.0': - resolution: {integrity: sha512-bML5ABR5XLYOF/xtIQLVWhus7j+e00DOUZ5enFVDlYlrCD3n72/FTrSodJGuLXRvqQvsZL42zSe5wWsWCAjGzw==} + '@oxc-parser/binding-darwin-arm64@0.66.0': + resolution: {integrity: sha512-vu0/j+qQTIguTGxSF7PLnB+2DR8w1GLX4JMk9dlndS2AobkzNuZYAaIfh9XuXKi1Y5SFnWdmCE8bvaqldDYdJg==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [darwin] - '@oxc-parser/binding-darwin-x64@0.65.0': - resolution: {integrity: sha512-k6DNe28LjHTem8gjxjMoPye5gTGQQWzQG4oiyiq9qYMhnmAzGFN5m05kymPl3qi2wp0rbwUeWBJglcU9O3AROA==} + '@oxc-parser/binding-darwin-x64@0.66.0': + resolution: {integrity: sha512-zjStITzysMHDvBmznt4DpxzYQP4p6cBAkKUNqnYCP48uGuTcj5OxGzUayHaVAmeMGa0QovOJNOSZstJtX0OHWw==} engines: {node: '>=14.0.0'} cpu: [x64] os: [darwin] - '@oxc-parser/binding-linux-arm-gnueabihf@0.65.0': - resolution: {integrity: sha512-VN63Gs/MEdsZ6LZ8vDjp/JY+3i557a/AFny1+z+NWUXSRhrnfsM3OWZBiKcjcKp9kauvDurVlGpAZjYiYKfcTg==} + '@oxc-parser/binding-linux-arm-gnueabihf@0.66.0': + resolution: {integrity: sha512-6H5CLALgpGX2q5X7iA9xYrSO+zgKH9bszCa4Yb8atyEOLglTebBjhqKY+aeSLJih+Yta7Nfe/nrjmGT1coQyJQ==} engines: {node: '>=14.0.0'} cpu: [arm] os: [linux] - '@oxc-parser/binding-linux-arm64-gnu@0.65.0': - resolution: {integrity: sha512-cAs9OGhnRb/bzulGK3BdgNcgOeAQa2lXT42zNgtnysTO9lZnxqNMnvWaCwFCC4tL0YA7lfxn1Uf2rSEvysyP1A==} + '@oxc-parser/binding-linux-arm64-gnu@0.66.0': + resolution: {integrity: sha512-uf6q2fOCVZKdw9OYoPQSYt1DMHKXSYV/ESHRaew8knTti5b8k5x9ulCDKVmS3nNEBw78t5gaWHpJJhBIkOy/vQ==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [linux] - '@oxc-parser/binding-linux-arm64-musl@0.65.0': - resolution: {integrity: sha512-3Rdg11QOir3YH9f3J0Ydo8zRWqmVAvrkAiIc/chRvozOZA+ajXP8fenfMOyuVks6SHvFvkyXnZWqEmhZ5TkfwA==} + '@oxc-parser/binding-linux-arm64-musl@0.66.0': + resolution: {integrity: sha512-qpExxhkSyel+7ptl5ZMhKY0Pba0ida7QvyqDmn1UemDXkT5/Zehfv02VCd3Qy+xWSZt5LXWqSypA1UWmTnrgZQ==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [linux] - '@oxc-parser/binding-linux-x64-gnu@0.65.0': - resolution: {integrity: sha512-eZPtnxBZBe+5wsU3KMHTAnuqwYTIaS+bOX7c0FQZYZBUh00EoAzlgZKiwL2gKuDdTNJ3YEUB735UWs6B7I66uQ==} + '@oxc-parser/binding-linux-x64-gnu@0.66.0': + resolution: {integrity: sha512-ltiZA35r80I+dicRswuwBzggJ4wOcx/Nyh/2tNgiZZ1Ds21zu96De5yWspfvh4VLioJJtHkYLfdHyjuWadZdlQ==} engines: {node: '>=14.0.0'} cpu: [x64] os: [linux] - '@oxc-parser/binding-linux-x64-musl@0.65.0': - resolution: {integrity: sha512-hTsQRUqnbXYTUg+yMfiQ/jMokAW9AtR1jyibrodF4bdF3dYyRJzGpMaLs9TOfHIjWM5xRykZ2br0ajBfgNeZuw==} + '@oxc-parser/binding-linux-x64-musl@0.66.0': + resolution: {integrity: sha512-LeQYFU/BDZIFutjBPh6VE6Q0ldXF58/Z8W8+h7ihRPRs+BBzwZq8GeLeILK+lUe/hqGAdfGJWKjsRAzsGW1zMA==} engines: {node: '>=14.0.0'} cpu: [x64] os: [linux] - '@oxc-parser/binding-wasm32-wasi@0.65.0': - resolution: {integrity: sha512-V9WvM3iwgqohuGnNb01+agI+5TbpexZ55hpXfxl6YKhdjnGkCbV2c0qtaAw18enrjRsU0QeDqZ6SBPfjE0pi5g==} + '@oxc-parser/binding-wasm32-wasi@0.66.0': + resolution: {integrity: sha512-4N9C5Ml79IiKCLnTzG/lppTbsXWyo4pEuH5zOMctS6K6KZF/k9XSukY1IEeMiblpqrnUHmVmsm1l3SuPP/50Bw==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@oxc-parser/binding-win32-arm64-msvc@0.65.0': - resolution: {integrity: sha512-Q0GvYjgFOYliEvWkr4FjBtERuXSiv0DwLtv8CtKfMIbLWzzzBSvQBx60PVD8BcZDvZBkTgomaijZ+wHcH2tjaQ==} + '@oxc-parser/binding-win32-arm64-msvc@0.66.0': + resolution: {integrity: sha512-v3B+wUB4s+JlxSUj7tAFF1qOcl8wXY2/m5KQfzU5noqjZ03JdmC4A/CPaHbQkudlQFBrRq1IAAarNGnYfV7DXw==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [win32] - '@oxc-parser/binding-win32-x64-msvc@0.65.0': - resolution: {integrity: sha512-ymVMrxcsNxj8FNkuizoIwl49r5cv3Rmhvw3G3rOi/WqdlZdHi+nZ1PBYaf4rPPHwpijmIY+XnAs0dy1+ynAWtA==} + '@oxc-parser/binding-win32-x64-msvc@0.66.0': + resolution: {integrity: sha512-J8HaFgP17qNyCLMnnqzGeI4NYZDcXDEECj6tMaJTafPJc+ooPF0vkEJhp6TrTOkg09rvf2EKVOkLO2C3OMLKrA==} engines: {node: '>=14.0.0'} cpu: [x64] os: [win32] - '@oxc-project/types@0.65.0': - resolution: {integrity: sha512-7MpMzyXCcwxrTxJ4L0siy63Ds/LA8LAM4szumTFiynxTJkfrIZEV4PyR4Th0CqFZQ+oNi8WvW3Dr1MLy7o9qPQ==} + '@oxc-project/types@0.66.0': + resolution: {integrity: sha512-KF5Wlo2KzQ+jmuCtrGISZoUfdHom7qHavNfPLW2KkeYJfYMGwtiia8KjwtsvNJ49qRiXImOCkPeVPd4bMlbR7w==} '@oxc-resolver/binding-darwin-arm64@6.0.0': resolution: {integrity: sha512-GKsfwUPgo4CjJioksA+DVEILT0aWhrbTBKHTiEvkTNC+bsafttSm0xqrIutCQqfqwuSa+Uj0VHylmL3Vv0F/7g==} @@ -2000,61 +2000,61 @@ packages: cpu: [x64] os: [win32] - '@oxc-transform/binding-darwin-arm64@0.65.0': - resolution: {integrity: sha512-hHfhOKyH+8DOj0VUmWl6RPLy3F0jCMCUMuKICzfelvSEs5uu8YRJ7fmQSsQD9E0oTrbbdkNVjq/1mcAPHzIBsg==} + '@oxc-transform/binding-darwin-arm64@0.66.0': + resolution: {integrity: sha512-EVaarR0u/ohSc66oOsMY+SIhLy0YXRIvVeCEoNKOQe+UCzDrd344YH0qxlfQ3EIGzUhf4NqBWuXvZTWJq4qdTA==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [darwin] - '@oxc-transform/binding-darwin-x64@0.65.0': - resolution: {integrity: sha512-MNeaCPBVB1oOdb4kMZnKej8kSoxqf4XqAfFIKgx2mV1gJnW3PfwAbpqhad+XH3QM49dB++Gyaw7SPNwQLpL3YQ==} + '@oxc-transform/binding-darwin-x64@0.66.0': + resolution: {integrity: sha512-nmvKnIsqkVAHfpQkdEoWYcYFSiPjWc5ioM4UfdJB3RbIdusoyqBJLywDec1PHE770lTfHxHccMy1vk2dr25cVw==} engines: {node: '>=14.0.0'} cpu: [x64] os: [darwin] - '@oxc-transform/binding-linux-arm-gnueabihf@0.65.0': - resolution: {integrity: sha512-YpmBf4AhtAdsLV7XYY9/UxVmgewumgVlNVcPXXXAQ5shMEYhu2K/fCvlWBFe6vYNXFmXAAnDihOjLrq8n+NhnA==} + '@oxc-transform/binding-linux-arm-gnueabihf@0.66.0': + resolution: {integrity: sha512-RX94vb6+8JWylYuW0Restg6Gs7xxzmdZ96nHRSw281XPoHX94wHkGd8VMo7bUrPYsoRn5AmyIjH67gUNvsJiqw==} engines: {node: '>=14.0.0'} cpu: [arm] os: [linux] - '@oxc-transform/binding-linux-arm64-gnu@0.65.0': - resolution: {integrity: sha512-HbGl1QBvxCBVfRJdrcZliOsvjeoyMJQn6UUbYzQR8ud7SY2Ozp0Qf5VG0yjXvt/9BPcmOYMIxVCeKqSSkQ74XA==} + '@oxc-transform/binding-linux-arm64-gnu@0.66.0': + resolution: {integrity: sha512-KX2XLdeEnM8AxlL5IyylR0HkfEMD1z8OgNm3WKMB1CFxdJumni7EAPr1AlLVhvoiHyELk73Rrt6BR3+iVE3kEw==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [linux] - '@oxc-transform/binding-linux-arm64-musl@0.65.0': - resolution: {integrity: sha512-80gSeSVY9fm+xoLBkTYdJT2RYCqMy/NAqT6azQoJj3DczoNKU/4GV4F6jpINRWYUqIUAZt3RSvAQtdW3tWAjfw==} + '@oxc-transform/binding-linux-arm64-musl@0.66.0': + resolution: {integrity: sha512-fIiNlCEJFpVOWeFUVvEpfU06WShfseIsbNYmna9ah69XUYTivKYRelctLp3OGyUZusO0Hux6eA6vXj/K0X4NNA==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [linux] - '@oxc-transform/binding-linux-x64-gnu@0.65.0': - resolution: {integrity: sha512-Wsl+qLcaC3EeZT/ZjPuGTOtcHYu25HeEO1jCnZmIhFfz+1RWmaEK5P5xVVJbrAgNPMVOfqbUM0EwMCfvNmmPaQ==} + '@oxc-transform/binding-linux-x64-gnu@0.66.0': + resolution: {integrity: sha512-RawpLg84jX7EB5RORjPXycOqlYqSHS40oPewrcYrn6uNKmQKBjZZQ99p+hNj7QKoON6GxfAPGKmYxXMgFRNuNg==} engines: {node: '>=14.0.0'} cpu: [x64] os: [linux] - '@oxc-transform/binding-linux-x64-musl@0.65.0': - resolution: {integrity: sha512-0kvRnt7EsKeGxxyt90l7yotSH5Ik5G9fbFJxkDCzPT23FzIQC8U4O1GzqNxnSj8VT/lRJGKcCL6KfSa6ttzQRQ==} + '@oxc-transform/binding-linux-x64-musl@0.66.0': + resolution: {integrity: sha512-L5ftqB+nNVCcWhwfmhhWLVWfjII2WxmF6JbjiSoqJdsDBnb+EzlZKRk3pYhe9ESD2Kl5rhGCPSBcWkdqsmIreQ==} engines: {node: '>=14.0.0'} cpu: [x64] os: [linux] - '@oxc-transform/binding-wasm32-wasi@0.65.0': - resolution: {integrity: sha512-gKfpf5BY28Cq0scUV//oBlzXg+XFbi2tKpKDqE/ee4Z0ySeDQ66pwBUp3nnEG7EsVZjKhE8yksPN4YOCoZhG9g==} + '@oxc-transform/binding-wasm32-wasi@0.66.0': + resolution: {integrity: sha512-8W8iifV4uvXP4n7qbsxHw3QzLib4F4Er3DOWqvjaSj/A0Ipyc4foX8mitVV6kJrh0DwP+Bcx6ohvawh9xN9AzQ==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@oxc-transform/binding-win32-arm64-msvc@0.65.0': - resolution: {integrity: sha512-InHZNcL6hB2QLaiw3KNe+Aqnk+FRt4vuVmDXUibZ0fZSQorcFw/T267PtVVuWIzFNa6CQPU4ie0rxIdP0sHcFg==} + '@oxc-transform/binding-win32-arm64-msvc@0.66.0': + resolution: {integrity: sha512-E+dsoSIb9Ei/YSAZZGg4qLX7jiSbD/SzZEkxTl1pJpBVF9Dbq5D/9FcWe52qe3VegkUG2w8XwGmtaeeLikR/wA==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [win32] - '@oxc-transform/binding-win32-x64-msvc@0.65.0': - resolution: {integrity: sha512-qvLEPowed0OcSEgztGXw1QF53KhLYYYWGxOK2H+9PSXpkNcYaeUQ1XOngR9kO8yIhpBt1/EOrVFeNK8biy0c7g==} + '@oxc-transform/binding-win32-x64-msvc@0.66.0': + resolution: {integrity: sha512-ZsIZeXr4Zexz/Sm4KoRlkjHda56eSCQizCM0E0fSyROwCjSiG+LT+L5czydBxietD1dZ4gSif8nMKzTMQrra7A==} engines: {node: '>=14.0.0'} cpu: [x64] os: [win32] @@ -2135,63 +2135,63 @@ packages: resolution: {integrity: sha512-ezIadUb1aFhwJLd++WVqVpi9rnlX8vnd4ju7saPhwLHJN1mJgOv0puePTGV+FbtSnWtwoHDT8lAm4kagDZmpCg==} engines: {node: '>=20.0.0'} - '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-KiqsE9kggNS4leGcddr//NuRl/JvZM28i7F8M+VhSqY/bZTIWlt3oFXCek6XXEymYl2y0INOLC/CoDwR4+GaXw==} + '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-2GCVymE4qe30/ox/w+3aOOTCsvphbXCW41BxATiYJQzNPXQ7NY3RMTfvuDKUQW5KJSr3rKSj0zxPbjFJYCfGWw==} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-WbRbGVBg91UvAbaTEl+Ls5GBy7o+JdUL6sCoLJfswN+BK8Cm9wpt/yWV2wyavDwPKj5XsPGiJz1dycskUQNorA==} + '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-iiCq6rUyx+BjwAp5keIJnJiaGC8W+rfp6YgtsEjJUTqv+s9+UQxhXyw7qwnp1YkahTKiuyUUSM+CVcecbcrXlw==} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-rpj4YX1GQNcgcPgWqlVzeD780+WX8NySFwwcJwtTa01v+mxIaQlKo3ePx8lA4zigxqFJ/l75D5WPnqjeweScbQ==} + '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-8qkE8ANkELvEiE26Jpdlh7QRw7uOaqLOnbAPAJ9NySo6+VwAWILefQgo+pamXTEsHpAZqSo7DapFWjUtZdkUDg==} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-3T0WAMasPY1UMO5YMw9fEoXC0d3/1YC81vbWYtUZ09x0Vst8fYbKMF1ffcfMxhAusOycnIi3DaxRBYELbGkncQ==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-QCBw+96ZABHtJU3MBbl5DnD18/I+Lg06/MegyCHPI1j0VnqdmK8lDIPuaBzrj52USLYBoABC9HhuXMbIN0OfPA==} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-TgXMBw4YjxO07sKxmHN6nWNhKz4YcZwVvy9z1SD47W2XPstlgfVGMknCLizObjYE+J+89vtTf0N1KGTn+EMnVg==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-bjGStzNXe1hD6vP6g2/T134RU85Mev+o+XEIB8kJT3Z9tq09SqDhN3ONqzUaeF7QQawv2M8XXDUOIdPhsrgmvg==} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-9xJlz3mq4YgWm6OgZYOS6uLzOPyzev6J4P02tvCcywOw7+BUvW1Rol/KU1XKh856QBhdpUaDgCeokp2pUQZN7A==} + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-ZpN8ub+PiDBYjTMcXt3ihoPKpXikAYPfpJXdx1x0IjJmFqlLsSWxU6aqbkHBxALER7SxwQ4e9r5LPZKJnwBr7Q==} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-7EaxDAjkHyi8Z7AtMaGrFroK2oppJVWcgc9IFrffUVG3jTr3IFRMAFRA1xYl4LvZalsvAzAeKN+WREEVkLpb5g==} + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-ysVj17eqf0amHpF9pKOv5JWsW2F89oVql88PD4ldamhBUZq8unZdPqr8fogx+08TmURDtu9ygZlBvSB55VdzJQ==} cpu: [x64] os: [linux] - '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-ncIxlyZQnMUJQrwtHOQa83Qb7fmMHDiq6dKQShMsV3E2aTUVgr3dsdLyn/rgCb6nuAz5QiYq83NuHCrF/REDhg==} + '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-Yob3aIWUdXaCW1aKA0Ypo2ie8p+3uvOSobR9WTabx+aS7NPJuQbjAJP6n3CZHRPoKnJBCeftt3Bh8bFk1SKCMQ==} cpu: [x64] os: [linux] - '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-8Fin+3TTrz6+a++rmgLsPEq6iWmyL3hbL7UdcqONmLOsWq5+gAM+2+hXpZRmNFSNLwx5aqBa9OCaix2y2ZYbtA==} + '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-/tGqIUvsjTMe5h8DAR5XM++IsAMNmxgD2vFN+OzwE3bNAS3qk3w7rq6JyD+hBWwz+6QLgYVCTD7fNDXAYZKgWw==} engines: {node: '>=14.21.3'} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-vxoQB/FBxOcN8wRGmTU5weShysSb1SXKabUB775bGLKJxM2+nSRYsb6zjmKz4pRTnCRwbkyiKZo/DgImSPjY4g==} + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-uIuzY9dNeSLhAL4YW7YDYQ0wlSIDU7fzkhGYsfcH37ItSpOdxisxJLu4tLbl8i0AarLJvfH1+MgMSSGC2ioAtQ==} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-aKyiDD06tEDFXU2aDeShNU3vq/tiQWCXw8JKL8t877qzEb2kq9/hrynClUBXod7cQ7jo3O6fPgoehsTldiwwzQ==} + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-tadc/hpAWQ6TPaF7U1AX6h/BYDm0Ukxg6o4647IfDREvncyf4RaNo99ByBSfoOYxqwlA2nu4llXkXx0rhWCfsQ==} cpu: [ia32] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.d984417': - resolution: {integrity: sha512-83HfjclfBUio2s03OaNCzH+9U238+QHxMSIZrRA6UF0bS1I0MhnGkP6KtygXeseY2zGLOuUYc0GtGJKIq85b3g==} + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.2686eb1': + resolution: {integrity: sha512-8nMcDSZpCR2KuKCkgeA9/Em967VhB1jZys8W0j95tcKMyNva/Bnq9wxNH5CAMtL3AzV/QIT92RrHTWbIt0m1MA==} cpu: [x64] os: [win32] @@ -5020,15 +5020,15 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} - oxc-parser@0.65.0: - resolution: {integrity: sha512-2u3iUChO386K2sBBxTPCKweoJfbo4qLGfOJN964yEg6KmHadp4daWklhS56UUaHT2Qj057brG/G7WuyIP10lUg==} + oxc-parser@0.66.0: + resolution: {integrity: sha512-uNkhp3ZueIqwU/Hm1ccDl/ZuAKAEhVlEj3W9sC6aD66ArxjO0xA6RZ9w85XJ2rugAt4g6R4tWeGvpJOSG3jfKg==} engines: {node: '>=14.0.0'} oxc-resolver@6.0.0: resolution: {integrity: sha512-XbjFKJrpQiVl4XlJE44ly+fNdV5+adm8b/Ax9EIGYpA160PVgYVRUfmdYD1SHOO8z1oZ+CFNZ4/A3EUrNP+/cA==} - oxc-transform@0.65.0: - resolution: {integrity: sha512-TWAMi8zVvORQw545O1/1irpbMPDQGD6ernen5QyY5PCL9nj3RqgR1ULlQiHVDXEl2rW+OtHF8KS0ItAUyOfQ+Q==} + oxc-transform@0.66.0: + resolution: {integrity: sha512-vfs0oVJAAgX8GrZ5jO1sQp29c4HYSZ4MTtievyqawSeNpqF0yj69tpAwpDZ+MxYt3dqZ8lrGh9Ji80YlG0hpoA==} engines: {node: '>=14.0.0'} p-cancelable@3.0.0: @@ -5527,8 +5527,8 @@ packages: resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} hasBin: true - rolldown-plugin-dts@0.8.3: - resolution: {integrity: sha512-gxRerZlmo+Rii6k4CeMYdSSvypdx/VJHf7bLnw/6IwbflNkjxRYq4dHYntCuYpdG6Si2n8xJGqnhE+Hh8I1DPQ==} + rolldown-plugin-dts@0.8.5: + resolution: {integrity: sha512-iiLaGvRyNoiY+Htjou0fvZPwTkGO1Tmj95KQGLWXPEDLXx+iFaxaezPloFYc+10opZ7OkTQkbqqCVO8spJXbIg==} engines: {node: '>=20.18.0'} peerDependencies: rolldown: ^1.0.0-beta.7 @@ -5537,11 +5537,11 @@ packages: typescript: optional: true - rolldown@1.0.0-beta.8-commit.d984417: - resolution: {integrity: sha512-bQb5n/r4k5f3pXIc/dVSCpzsSG/s8GIL/01K2ZNriaLpHX/1omU98ttc8dMhe1qvEXTtZKSJXBr+bksn6+BKcA==} + rolldown@1.0.0-beta.8-commit.2686eb1: + resolution: {integrity: sha512-NIo+n0m7ZVC6VXQ4l2zNYJOQ84lEthihbByZBBHzmyyhH/605jL43n2qFTPNy6W3stDnTCyp8/YYDlw39+fXlA==} hasBin: true peerDependencies: - '@oxc-project/runtime': 0.65.0 + '@oxc-project/runtime': 0.66.0 peerDependenciesMeta: '@oxc-project/runtime': optional: true @@ -6001,8 +6001,8 @@ packages: typescript: optional: true - tsdown@0.9.5: - resolution: {integrity: sha512-Bx0A0T0obQ43G/hU/gOayb7mq8jEMQtr4w8wOxxJHl/BmhZ4Wdt5OhgO35pS4G9XLb7jgz1IeUmGsK+ujP0d/Q==} + tsdown@0.9.6: + resolution: {integrity: sha512-0dGDk1H8REDWWF5PAFS/bIVw/C4LeiJxljLKI0pVRY2e1vx9nUVVhm6WQRRosWLqruAmi7UdoCTQPqvlX0fbnA==} engines: {node: '>=18.0.0'} hasBin: true peerDependencies: @@ -8043,39 +8043,39 @@ snapshots: '@otplib/plugin-crypto': 12.0.1 '@otplib/plugin-thirty-two': 12.0.1 - '@oxc-parser/binding-darwin-arm64@0.65.0': + '@oxc-parser/binding-darwin-arm64@0.66.0': optional: true - '@oxc-parser/binding-darwin-x64@0.65.0': + '@oxc-parser/binding-darwin-x64@0.66.0': optional: true - '@oxc-parser/binding-linux-arm-gnueabihf@0.65.0': + '@oxc-parser/binding-linux-arm-gnueabihf@0.66.0': optional: true - '@oxc-parser/binding-linux-arm64-gnu@0.65.0': + '@oxc-parser/binding-linux-arm64-gnu@0.66.0': optional: true - '@oxc-parser/binding-linux-arm64-musl@0.65.0': + '@oxc-parser/binding-linux-arm64-musl@0.66.0': optional: true - '@oxc-parser/binding-linux-x64-gnu@0.65.0': + '@oxc-parser/binding-linux-x64-gnu@0.66.0': optional: true - '@oxc-parser/binding-linux-x64-musl@0.65.0': + '@oxc-parser/binding-linux-x64-musl@0.66.0': optional: true - '@oxc-parser/binding-wasm32-wasi@0.65.0': + '@oxc-parser/binding-wasm32-wasi@0.66.0': dependencies: '@napi-rs/wasm-runtime': 0.2.9 optional: true - '@oxc-parser/binding-win32-arm64-msvc@0.65.0': + '@oxc-parser/binding-win32-arm64-msvc@0.66.0': optional: true - '@oxc-parser/binding-win32-x64-msvc@0.65.0': + '@oxc-parser/binding-win32-x64-msvc@0.66.0': optional: true - '@oxc-project/types@0.65.0': {} + '@oxc-project/types@0.66.0': {} '@oxc-resolver/binding-darwin-arm64@6.0.0': optional: true @@ -8118,36 +8118,36 @@ snapshots: '@oxc-resolver/binding-win32-x64-msvc@6.0.0': optional: true - '@oxc-transform/binding-darwin-arm64@0.65.0': + '@oxc-transform/binding-darwin-arm64@0.66.0': optional: true - '@oxc-transform/binding-darwin-x64@0.65.0': + '@oxc-transform/binding-darwin-x64@0.66.0': optional: true - '@oxc-transform/binding-linux-arm-gnueabihf@0.65.0': + '@oxc-transform/binding-linux-arm-gnueabihf@0.66.0': optional: true - '@oxc-transform/binding-linux-arm64-gnu@0.65.0': + '@oxc-transform/binding-linux-arm64-gnu@0.66.0': optional: true - '@oxc-transform/binding-linux-arm64-musl@0.65.0': + '@oxc-transform/binding-linux-arm64-musl@0.66.0': optional: true - '@oxc-transform/binding-linux-x64-gnu@0.65.0': + '@oxc-transform/binding-linux-x64-gnu@0.66.0': optional: true - '@oxc-transform/binding-linux-x64-musl@0.65.0': + '@oxc-transform/binding-linux-x64-musl@0.66.0': optional: true - '@oxc-transform/binding-wasm32-wasi@0.65.0': + '@oxc-transform/binding-wasm32-wasi@0.66.0': dependencies: '@napi-rs/wasm-runtime': 0.2.9 optional: true - '@oxc-transform/binding-win32-arm64-msvc@0.65.0': + '@oxc-transform/binding-win32-arm64-msvc@0.66.0': optional: true - '@oxc-transform/binding-win32-x64-msvc@0.65.0': + '@oxc-transform/binding-win32-x64-msvc@0.66.0': optional: true '@pkgjs/parseargs@0.11.0': @@ -8246,42 +8246,42 @@ snapshots: dependencies: quansync: 0.2.10 - '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.2686eb1': optional: true - '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.2686eb1': optional: true - '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.2686eb1': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.2686eb1': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.2686eb1': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.2686eb1': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.2686eb1': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.2686eb1': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.2686eb1': dependencies: '@napi-rs/wasm-runtime': 0.2.9 optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.2686eb1': optional: true - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.2686eb1': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.d984417': + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.2686eb1': optional: true '@rollup/pluginutils@5.1.4(rollup@4.37.0)': @@ -11483,20 +11483,20 @@ snapshots: outvariant@1.4.3: {} - oxc-parser@0.65.0: + oxc-parser@0.66.0: dependencies: - '@oxc-project/types': 0.65.0 + '@oxc-project/types': 0.66.0 optionalDependencies: - '@oxc-parser/binding-darwin-arm64': 0.65.0 - '@oxc-parser/binding-darwin-x64': 0.65.0 - '@oxc-parser/binding-linux-arm-gnueabihf': 0.65.0 - '@oxc-parser/binding-linux-arm64-gnu': 0.65.0 - '@oxc-parser/binding-linux-arm64-musl': 0.65.0 - '@oxc-parser/binding-linux-x64-gnu': 0.65.0 - '@oxc-parser/binding-linux-x64-musl': 0.65.0 - '@oxc-parser/binding-wasm32-wasi': 0.65.0 - '@oxc-parser/binding-win32-arm64-msvc': 0.65.0 - '@oxc-parser/binding-win32-x64-msvc': 0.65.0 + '@oxc-parser/binding-darwin-arm64': 0.66.0 + '@oxc-parser/binding-darwin-x64': 0.66.0 + '@oxc-parser/binding-linux-arm-gnueabihf': 0.66.0 + '@oxc-parser/binding-linux-arm64-gnu': 0.66.0 + '@oxc-parser/binding-linux-arm64-musl': 0.66.0 + '@oxc-parser/binding-linux-x64-gnu': 0.66.0 + '@oxc-parser/binding-linux-x64-musl': 0.66.0 + '@oxc-parser/binding-wasm32-wasi': 0.66.0 + '@oxc-parser/binding-win32-arm64-msvc': 0.66.0 + '@oxc-parser/binding-win32-x64-msvc': 0.66.0 oxc-resolver@6.0.0: optionalDependencies: @@ -11514,18 +11514,18 @@ snapshots: '@oxc-resolver/binding-win32-arm64-msvc': 6.0.0 '@oxc-resolver/binding-win32-x64-msvc': 6.0.0 - oxc-transform@0.65.0: + oxc-transform@0.66.0: optionalDependencies: - '@oxc-transform/binding-darwin-arm64': 0.65.0 - '@oxc-transform/binding-darwin-x64': 0.65.0 - '@oxc-transform/binding-linux-arm-gnueabihf': 0.65.0 - '@oxc-transform/binding-linux-arm64-gnu': 0.65.0 - '@oxc-transform/binding-linux-arm64-musl': 0.65.0 - '@oxc-transform/binding-linux-x64-gnu': 0.65.0 - '@oxc-transform/binding-linux-x64-musl': 0.65.0 - '@oxc-transform/binding-wasm32-wasi': 0.65.0 - '@oxc-transform/binding-win32-arm64-msvc': 0.65.0 - '@oxc-transform/binding-win32-x64-msvc': 0.65.0 + '@oxc-transform/binding-darwin-arm64': 0.66.0 + '@oxc-transform/binding-darwin-x64': 0.66.0 + '@oxc-transform/binding-linux-arm-gnueabihf': 0.66.0 + '@oxc-transform/binding-linux-arm64-gnu': 0.66.0 + '@oxc-transform/binding-linux-arm64-musl': 0.66.0 + '@oxc-transform/binding-linux-x64-gnu': 0.66.0 + '@oxc-transform/binding-linux-x64-musl': 0.66.0 + '@oxc-transform/binding-wasm32-wasi': 0.66.0 + '@oxc-transform/binding-win32-arm64-msvc': 0.66.0 + '@oxc-transform/binding-win32-x64-msvc': 0.66.0 p-cancelable@3.0.0: {} @@ -12060,39 +12060,39 @@ snapshots: dependencies: glob: 10.4.5 - rolldown-plugin-dts@0.8.3(rolldown@1.0.0-beta.8-commit.d984417(typescript@5.8.3))(typescript@5.8.3): + rolldown-plugin-dts@0.8.5(rolldown@1.0.0-beta.8-commit.2686eb1(typescript@5.8.3))(typescript@5.8.3): dependencies: debug: 4.4.0 dts-resolver: 1.0.1 get-tsconfig: 4.10.0 magic-string-ast: 0.9.1 - oxc-parser: 0.65.0 - oxc-transform: 0.65.0 - rolldown: 1.0.0-beta.8-commit.d984417(typescript@5.8.3) + oxc-parser: 0.66.0 + oxc-transform: 0.66.0 + rolldown: 1.0.0-beta.8-commit.2686eb1(typescript@5.8.3) optionalDependencies: typescript: 5.8.3 transitivePeerDependencies: - supports-color - rolldown@1.0.0-beta.8-commit.d984417(typescript@5.8.3): + rolldown@1.0.0-beta.8-commit.2686eb1(typescript@5.8.3): dependencies: - '@oxc-project/types': 0.65.0 + '@oxc-project/types': 0.66.0 '@valibot/to-json-schema': 1.0.0(valibot@1.0.0(typescript@5.8.3)) ansis: 3.17.0 valibot: 1.0.0(typescript@5.8.3) optionalDependencies: - '@rolldown/binding-darwin-arm64': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-darwin-x64': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.8-commit.d984417 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.8-commit.d984417 + '@rolldown/binding-darwin-arm64': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-darwin-x64': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.8-commit.2686eb1 transitivePeerDependencies: - typescript @@ -12570,7 +12570,7 @@ snapshots: optionalDependencies: typescript: 5.8.3 - tsdown@0.9.5(typescript@5.8.3): + tsdown@0.9.6(typescript@5.8.3): dependencies: ansis: 3.17.0 cac: 6.7.14 @@ -12580,8 +12580,8 @@ snapshots: diff: 7.0.0 find-up-simple: 1.0.1 hookable: 5.5.3 - rolldown: 1.0.0-beta.8-commit.d984417(typescript@5.8.3) - rolldown-plugin-dts: 0.8.3(rolldown@1.0.0-beta.8-commit.d984417(typescript@5.8.3))(typescript@5.8.3) + rolldown: 1.0.0-beta.8-commit.2686eb1(typescript@5.8.3) + rolldown-plugin-dts: 0.8.5(rolldown@1.0.0-beta.8-commit.2686eb1(typescript@5.8.3))(typescript@5.8.3) tinyexec: 1.0.1 tinyglobby: 0.2.13 unconfig: 7.3.2 From 40109a7fc63e9345f15a5778b99872546b533fd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 19:45:29 +0800 Subject: [PATCH 0485/2658] chore(deps): bump @sentry/node from 9.13.0 to 9.14.0 (#18937) Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 9.13.0 to 9.14.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/9.13.0...9.14.0) --- updated-dependencies: - dependency-name: "@sentry/node" dependency-version: 9.14.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 0992a62f2a04..d2435e2b1263 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", "@scalar/hono-api-reference": "0.8.5", - "@sentry/node": "9.13.0", + "@sentry/node": "9.14.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", "art-template": "4.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab24377a00b0..c90cc0aae3fb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,8 +63,8 @@ importers: specifier: 0.8.5 version: 0.8.5(hono@4.7.7) '@sentry/node': - specifier: 9.13.0 - version: 9.13.0 + specifier: 9.14.0 + version: 9.14.0 '@tonyrl/rand-user-agent': specifier: 2.0.83 version: 2.0.83 @@ -2091,8 +2091,8 @@ packages: '@postman/tunnel-agent@0.6.4': resolution: {integrity: sha512-CJJlq8V7rNKhAw4sBfjixKpJW00SHqebqNUQKxMoepgeWZIbdPcD+rguRcivGhS4N12PymDcKgUgSD4rVC+RjQ==} - '@prisma/instrumentation@6.5.0': - resolution: {integrity: sha512-morJDtFRoAp5d/KENEm+K6Y3PQcn5bCvpJ5a9y3V3DNMrNy/ZSn2zulPGj+ld+Xj2UYVoaMJ8DpBX/o6iF6OiA==} + '@prisma/instrumentation@6.6.0': + resolution: {integrity: sha512-M/a6njz3hbf2oucwdbjNKrSMLuyMCwgDrmTtkF1pm4Nm7CU45J/Hd6lauF2CDACTUYzu3ymcV7P0ZAhIoj6WRw==} peerDependencies: '@opentelemetry/api': ^1.8 @@ -2337,16 +2337,16 @@ packages: '@selderee/plugin-htmlparser2@0.11.0': resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==} - '@sentry/core@9.13.0': - resolution: {integrity: sha512-Zn1Qec5XNkNRE/M5QjL6YJLghETg6P188G/v2OzdHdHIRf0Y58/SnJilu3louF+ogos6kaSqqdMgzqKgZ8tCdg==} + '@sentry/core@9.14.0': + resolution: {integrity: sha512-OLfucnP3LAL5bxVNWc2RVOHCX7fk9Er5bWPCS+O5cPjqNUUz0HQHhVh2Vhei5C0kYZZM4vy4BQit5T9LrlOaNA==} engines: {node: '>=18'} - '@sentry/node@9.13.0': - resolution: {integrity: sha512-75UVkrED5b0BaazNQKCmF8NqeqjErxildPojDyC037JN+cVFMPr/kFFGGm7E+eCvA/j2pAPUzqifHp/PjykPcw==} + '@sentry/node@9.14.0': + resolution: {integrity: sha512-AWPc6O+zAdSgnsiKm6Nb1txyiKCOIBriJEONdXFSslgZgkm8EWAYRRHyS2Hkmnz0/5bEQ3jEffIw22qJuaHN+Q==} engines: {node: '>=18'} - '@sentry/opentelemetry@9.13.0': - resolution: {integrity: sha512-TLSP0n+sXKVcVkAM2ttVmXcAT2K3e9D5gdPfr6aCnW+KIGJuD7wzla/TIcTWFaVwUejbvXAB6IFpZ/qA8HFwyA==} + '@sentry/opentelemetry@9.14.0': + resolution: {integrity: sha512-NnHJjSQGpWaZ6+0QK9Xn1T3CTOM16Ij07VnSiGmVz3/IMsNC1/jndqc8p9BxEI+67XhZjOUUN0Ogpq1XRY7YeA==} engines: {node: '>=18'} peerDependencies: '@opentelemetry/api': ^1.9.0 @@ -5147,8 +5147,8 @@ packages: resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} engines: {node: '>=4.0.0'} - pg-protocol@1.8.0: - resolution: {integrity: sha512-jvuYlEkL03NRvOoyoRktBK7+qU5kOvlAwvmrH8sr3wbLrOdVWsRxQfz8mMy9sZFsqJ1hEWNfdWKI4SAmoL+j7g==} + pg-protocol@1.9.5: + resolution: {integrity: sha512-DYTWtWpfd5FOro3UnAfwvhD8jh59r2ig8bPtc9H8Ds7MscE/9NYruUQWFAOuraRl29jwcT2kyMFQ3MxeaVjUhg==} pg-types@2.2.0: resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} @@ -8198,7 +8198,7 @@ snapshots: dependencies: safe-buffer: '@nolyfill/safe-buffer@1.0.44' - '@prisma/instrumentation@6.5.0(@opentelemetry/api@1.9.0)': + '@prisma/instrumentation@6.6.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) @@ -8395,9 +8395,9 @@ snapshots: domhandler: 5.0.3 selderee: 0.11.0 - '@sentry/core@9.13.0': {} + '@sentry/core@9.14.0': {} - '@sentry/node@9.13.0': + '@sentry/node@9.14.0': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -8429,14 +8429,14 @@ snapshots: '@opentelemetry/resources': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.32.0 - '@prisma/instrumentation': 6.5.0(@opentelemetry/api@1.9.0) - '@sentry/core': 9.13.0 - '@sentry/opentelemetry': 9.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0) + '@prisma/instrumentation': 6.6.0(@opentelemetry/api@1.9.0) + '@sentry/core': 9.14.0 + '@sentry/opentelemetry': 9.14.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0) import-in-the-middle: 1.13.1 transitivePeerDependencies: - supports-color - '@sentry/opentelemetry@9.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0)': + '@sentry/opentelemetry@9.14.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -8444,7 +8444,7 @@ snapshots: '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.32.0 - '@sentry/core': 9.13.0 + '@sentry/core': 9.14.0 '@sindresorhus/is@5.6.0': {} @@ -8595,7 +8595,7 @@ snapshots: '@types/pg@8.6.1': dependencies: '@types/node': 22.14.1 - pg-protocol: 1.8.0 + pg-protocol: 1.9.5 pg-types: 2.2.0 '@types/request-promise@4.1.51': @@ -11637,7 +11637,7 @@ snapshots: pg-int8@1.0.1: {} - pg-protocol@1.8.0: {} + pg-protocol@1.9.5: {} pg-types@2.2.0: dependencies: From 8ca06ec337d4dbce846f6f7001ab43856e143a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9C=86=E5=A4=B4=E5=9C=86=E8=84=91?= Date: Thu, 24 Apr 2025 21:22:10 +0800 Subject: [PATCH 0486/2658] =?UTF-8?q?feat(route):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=AD=E5=9B=BD=E6=97=A0=E7=BA=BF=E7=94=B5=E5=8D=8F=E4=BC=9A?= =?UTF-8?q?=E4=B8=9A=E4=BD=99=E6=97=A0=E7=BA=BF=E7=94=B5=E5=88=86=E4=BC=9A?= =?UTF-8?q?=E8=80=83=E8=AF=95=E4=BF=A1=E6=81=AF=E8=B7=AF=E7=94=B1=20(#1890?= =?UTF-8?q?3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): 添加中国无线电协会业余无线电分会考试信息路由 * feat(route): 添加中国无线电协会业余无线电分会考试信息路由 --- lib/routes/crac/exam.ts | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 lib/routes/crac/exam.ts diff --git a/lib/routes/crac/exam.ts b/lib/routes/crac/exam.ts new file mode 100644 index 000000000000..084ddf088913 --- /dev/null +++ b/lib/routes/crac/exam.ts @@ -0,0 +1,56 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; + +export const route: Route = { + path: '/exam', + categories: ['government'], + example: '/crac/exam', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '考试信息', + maintainers: ['admxj'], + handler, +}; + +async function handler() { + const baseUrl = 'http://82.157.138.16:8091/CRAC'; + + const response = await got({ + method: 'post', + url: `${baseUrl}/app/exam_advice/examAdviceList`, + body: { req: { type: '0', page_no: '1', page_size: '10' } }, + }); + + const list = response.data.res.list.map((item) => { + const id = Buffer.from(item.id).toString('base64'); + const type = Buffer.from(item.type).toString('base64'); + const link = `${baseUrl}/crac/pages/list_detail.html?id=${id}&type=${type}`; + return { + title: item.name, + link, + id: item.id, + author: item.exam.organizer, + pubDate: item.createDate, + updated: item.updateDate, + startDate: item.exam.signUpStartDate, + category: [item.examType], + image: item.weixin, + content: { + html: item.content, + }, + description: item.exam.signUpStartDate, + }; + }); + + return { + title: '考试信息-中国无线电协会业余无线电分会', + link: 'http://82.157.138.16:8091/CRAC/crac/pages/list_examMsg.html', + item: list, + }; +} From c3d074b4a43c6f6693d6e1d943c5fb75d31e8645 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 18:22:10 +0800 Subject: [PATCH 0487/2658] chore(deps): bump docker/build-push-action from 6.15.0 to 6.16.0 (#18944) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.15.0 to 6.16.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/471d1dc4e07e5cdedd4c2171150001c434f0b7a4...14487ce63c7a62a4a324b0bfb37086795e31c6c1) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: 6.16.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-release.yml | 4 ++-- .github/workflows/docker-test.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 83c42133f67a..4c140f17954d 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -75,7 +75,7 @@ jobs: - name: Build and push Docker image (ordinary version) id: build-and-push - uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: . push: true @@ -106,7 +106,7 @@ jobs: - name: Build and push Docker image (Chromium-bundled version) id: build-and-push-chromium - uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: . build-args: PUPPETEER_SKIP_DOWNLOAD=0 diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index 2b871267406f..e8b2db82fcee 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -40,7 +40,7 @@ jobs: flavor: latest=true - name: Build Docker image - uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: . build-args: PUPPETEER_SKIP_DOWNLOAD=0 # also test bundling Chromium From 2df1200cfe5c3eb750da16b61fc8f0b796ff2f12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 18:22:21 +0800 Subject: [PATCH 0488/2658] chore(deps-dev): bump @types/node from 22.14.1 to 22.15.2 (#18946) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.14.1 to 22.15.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.2 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 80 +++++++++++++++++++++++++------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index d2435e2b1263..95d2938ac282 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.14.1", + "@types/node": "22.15.2", "@types/sanitize-html": "2.15.0", "@types/supertest": "6.0.3", "@types/title": "3.4.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c90cc0aae3fb..2c3df3026c0a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -349,8 +349,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.14.1 - version: 22.14.1 + specifier: 22.15.2 + version: 22.15.2 '@types/sanitize-html': specifier: 2.15.0 version: 2.15.0 @@ -374,7 +374,7 @@ importers: version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) + version: 2.1.9(vitest@2.1.9(@types/node@22.15.2)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) discord-api-types: specifier: 0.38.1 version: 0.38.1 @@ -449,10 +449,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.14.1)) + version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.2)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) + version: 2.1.9(@types/node@22.15.2)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -2492,8 +2492,8 @@ packages: '@types/node-fetch@2.6.12': resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} - '@types/node@22.14.1': - resolution: {integrity: sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==} + '@types/node@22.15.2': + resolution: {integrity: sha512-uKXqKN9beGoMdBfcaTY1ecwz6ctxuJAcUlwE55938g0ZJ8lRxwAZqRz2AJ4pzpt5dHdTPMB863UZ0ESiFUcP7A==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -7557,7 +7557,7 @@ snapshots: '@inquirer/figures': 1.0.11 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -8487,7 +8487,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/cookie@0.6.0': {} @@ -8510,12 +8510,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/html-to-text@9.0.4': {} @@ -8523,13 +8523,13 @@ snapshots: '@types/imapflow@1.0.20': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -8539,7 +8539,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/jsrsasign@10.5.13': {} @@ -8549,7 +8549,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -8571,18 +8571,18 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/mysql@2.15.26': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/node-fetch@2.6.12': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 form-data: 4.0.2 - '@types/node@22.14.1': + '@types/node@22.15.2': dependencies: undici-types: 6.21.0 @@ -8594,7 +8594,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 pg-protocol: 1.9.5 pg-types: 2.2.0 @@ -8606,7 +8606,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/tough-cookie': 4.0.5 form-data: 2.5.3 @@ -8622,7 +8622,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.14.1 + '@types/node': 22.15.2 form-data: 4.0.2 '@types/supertest@6.0.3': @@ -8632,7 +8632,7 @@ snapshots: '@types/tedious@4.0.14': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 '@types/title@3.4.3': {} @@ -8648,7 +8648,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 optional: true '@typescript-eslint/eslint-plugin@8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': @@ -8795,7 +8795,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.15.2)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8809,7 +8809,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) + vitest: 2.1.9(@types/node@22.15.2)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) transitivePeerDependencies: - supports-color @@ -8820,14 +8820,14 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.14.1))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.2))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.3(typescript@5.8.3) - vite: 5.4.15(@types/node@22.14.1) + vite: 5.4.15(@types/node@22.15.2) '@vitest/pretty-format@2.1.9': dependencies: @@ -11743,7 +11743,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.14.1 + '@types/node': 22.15.2 long: 5.3.1 proxy-agent@6.4.0: @@ -12763,13 +12763,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.9(@types/node@22.14.1): + vite-node@2.1.9(@types/node@22.15.2): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.15(@types/node@22.14.1) + vite: 5.4.15(@types/node@22.15.2) transitivePeerDependencies: - '@types/node' - less @@ -12781,30 +12781,30 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.14.1)): + vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.2)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.3) optionalDependencies: - vite: 5.4.15(@types/node@22.14.1) + vite: 5.4.15(@types/node@22.15.2) transitivePeerDependencies: - supports-color - typescript - vite@5.4.15(@types/node@22.14.1): + vite@5.4.15(@types/node@22.15.2): dependencies: esbuild: 0.21.5 postcss: 8.5.3 rollup: 4.37.0 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 fsevents: 2.3.3 - vitest@2.1.9(@types/node@22.14.1)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)): + vitest@2.1.9(@types/node@22.15.2)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.14.1)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.2)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -12820,11 +12820,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.15(@types/node@22.14.1) - vite-node: 2.1.9(@types/node@22.14.1) + vite: 5.4.15(@types/node@22.15.2) + vite-node: 2.1.9(@types/node@22.15.2) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.14.1 + '@types/node': 22.15.2 jsdom: 26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 36c39651a139308e799b85fd11efeee7153ad219 Mon Sep 17 00:00:00 2001 From: yeshan333 Date: Fri, 25 Apr 2025 21:28:28 +0800 Subject: [PATCH 0489/2658] feat(routes): add cline offcial blog route (#18892) * feat: add cline offcial blog route * refactor: try split code * refactor: reduce code and fix some desc --- lib/routes/cline/blog.ts | 80 +++++++++++++++++++++++++++++++++++ lib/routes/cline/namespace.ts | 13 ++++++ 2 files changed, 93 insertions(+) create mode 100644 lib/routes/cline/blog.ts create mode 100644 lib/routes/cline/namespace.ts diff --git a/lib/routes/cline/blog.ts b/lib/routes/cline/blog.ts new file mode 100644 index 000000000000..bcd17015d8e3 --- /dev/null +++ b/lib/routes/cline/blog.ts @@ -0,0 +1,80 @@ +import { load } from 'cheerio'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import { Route, DataItem } from '@/types'; + +const rootUrl = 'https://cline.bot'; +const blogUrl = `${rootUrl}/blog`; + +// Extract article information from DOM +function extractArticlesFromDOM($) { + return $('article') + .toArray() + .map((article) => { + const element = $(article); + const title = element.find('h2').first().text().trim(); + const linkEl = element.find('a').first(); + const link = linkEl.attr('href'); + const fullLink = link ? (link.startsWith('http') ? link : `${rootUrl}${link.startsWith('/') ? link : `/${link}`}`) : ''; + + const metaEl = element.find('.text-xs.text-slate-500'); + const author = metaEl.find('span').first().text().trim(); + const dateStr = metaEl.find('span').eq(2).text().trim(); + const pubDate = dateStr ? parseDate(dateStr) : undefined; + + const summary = element.find('.text-slate-600').text().trim(); + const imgSrc = element.find('img').attr('src') || ''; + + return { + title, + link: fullLink, + pubDate, + author, + description: `

${summary}

`, + }; + }) + .filter((item) => item.title && item.link); +} + +async function handler() { + // Get blog homepage + const response = await got({ + method: 'get', + url: blogUrl, + }); + + const $ = load(response.data); + + const articles: DataItem[] = extractArticlesFromDOM($); + + if (articles.length === 0) { + throw new Error('No articles found.'); + } + + return { + title: 'Cline Official Blog', + link: blogUrl, + item: articles, + description: 'Cline Official Blog - AI Coding Assistant', + }; +} + +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/cline/blog', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Blog', + maintainers: ['yeshan333'], + description: 'Cline Official Blog articles', + handler, + url: 'cline.bot/blog', +}; diff --git a/lib/routes/cline/namespace.ts b/lib/routes/cline/namespace.ts new file mode 100644 index 000000000000..6c47a86e1280 --- /dev/null +++ b/lib/routes/cline/namespace.ts @@ -0,0 +1,13 @@ +export default { + name: 'Cline Offcial Blog', + url: 'cline.bot', + description: ` +Cline Offcial Blog. +Cline is an AI-powered coding assistant that runs in VS Code. It goes beyond simple autocompletion by reading and writing across multiple files, executing commands, and adapting to your workflow—like having a skilled developer pair-programming with you right inside your editor. +Cline understands your codebase context and can help with everything from small code edits to complex refactoring tasks. + `, + zh: { + name: 'Cline Offcial Blog', + description: 'Cline 官方博客', + }, +}; From 48669ac092570fe9ae9a677530078e7dbf3d1b24 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Sat, 26 Apr 2025 11:19:44 +0800 Subject: [PATCH 0490/2658] fix(route/nikkei): Find API for asia edition (#18929) * fix(route/nikkei): Find API for asia edition * Update index.ts * Update index.ts * Update index.ts * . --- lib/routes/nikkei/asia/index.ts | 54 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/lib/routes/nikkei/asia/index.ts b/lib/routes/nikkei/asia/index.ts index 0f36c8b82e1e..0c705551fd58 100644 --- a/lib/routes/nikkei/asia/index.ts +++ b/lib/routes/nikkei/asia/index.ts @@ -20,43 +20,43 @@ export const route: Route = { }; async function handler() { - const currentUrl = 'https://main-asianreview-nikkei.content.pugpig.com/editionfeed/4519/pugpig_atom_contents.json'; + const currentUrl = 'https://asia.nikkei.com/api/__service/next_api/v1/graphql'; const response = await got({ method: 'get', url: currentUrl, + searchParams: { + operationName: 'GetLatestHeadlinesStream', + variables: '{}', + extensions: '{"persistedQuery":{"version":1,"sha256Hash":"287aed8784a3f55ad444bb6b550ebdafb40b0da60c7800081e7343d889975fe8"}}', + }, + headers: { + 'content-type': 'application/json', + }, }); - const stories = response.data.stories.filter((story) => story.type === 'article'); + const list = response.data.data.getLatestHeadlines.items.map((item) => ({ ...item, link: new URL(item.path, 'https://asia.nikkei.com').href })); const items = await Promise.all( - stories.map((item) => - cache.tryGet(item.url, async () => { - const fulltext = await got({ - method: 'get', - url: `https://main-asianreview-nikkei.content.pugpig.com/editionfeed/4519/${item.url}`, - }); + list.map((item) => + cache.tryGet(item.link, async () => { + const title = item.name; + const pubDate = parseDate(item.displayDate * 1000); + const category = item.primaryTag.name; - item.pubDate = parseDate(item.published); - item.link = item.shareurl; - item.category = item.section; + const response = await got(item.link); + const $ = load(response.data); + const description = $('div[class^="NewsArticle_newsArticleContentContainerWrapper"]').html() || ''; - const fulltextcontent = load(fulltext.data); - fulltextcontent('.pp-header-group__headline, .lightbox__control, .o-ads, #AdAsia').remove(); - fulltextcontent('img').each((_, img) => { - if (img.attribs.full) { - img.attribs.src = img.attribs.full; - delete img.attribs.full; - } - }); - item.description = - fulltextcontent('section[class="pp-article__header"]') - .html() - .replaceAll(/(?:\.{2}\/){4}/g, 'https://main-asianreview-nikkei.content.pugpig.com/') + - fulltextcontent('section[class="pp-article__body"]') - .html() - .replaceAll(/(?:\.{2}\/){4}/g, 'https://main-asianreview-nikkei.content.pugpig.com/'); - return item; + const author = $('div[class^="NewsArticleDetails_newsArticleDetailsByline"]').text() || ''; + return { + title, + pubDate, + category, + description, + link: item.link, + author, + }; }) ) ); From 8e158644696a6ded26e081555258247d0420884a Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Sat, 26 Apr 2025 12:25:38 +0800 Subject: [PATCH 0491/2658] fix(route/zhihu): question url --- lib/routes/zhihu/hot.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/routes/zhihu/hot.ts b/lib/routes/zhihu/hot.ts index 5abd8ea2aec5..6b442d844789 100644 --- a/lib/routes/zhihu/hot.ts +++ b/lib/routes/zhihu/hot.ts @@ -82,7 +82,7 @@ export const route: Route = { supportScihub: false, }, name: '知乎热榜', - maintainers: ['nczitzk'], + maintainers: ['nczitzk', 'pseudoyu'], handler, }; @@ -94,12 +94,15 @@ async function handler(ctx) { url: `https://www.zhihu.com/api/v3/feed/topstory/hot-lists/${category}?limit=50`, }); - const items = response.data.data.map((item) => ({ - link: `https://www.zhihu.com/question/${item.target.id}`, - title: item.target.title, - pubDate: parseDate(item.target.created * 1000), - description: item.target.excerpt ? `

${item.target.excerpt}

` : '', - })); + const items = response.data.data.map((item) => { + const questionId = item.target.url ? item.target.url.split('/').pop() : String(item.target.id); + return { + link: `https://www.zhihu.com/question/${questionId}`, + title: item.target.title, + pubDate: parseDate(item.target.created * 1000), + description: item.target.excerpt ? `

${item.target.excerpt}

` : '', + }; + }); return { title: `知乎热榜 - ${titles[category]}`, From 0fc3d5c1bc24b6c303933a0e645af08df5ccf30d Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 26 Apr 2025 13:45:31 +0800 Subject: [PATCH 0492/2658] fix: request rewriter not functioning in transpiled code (#18948) * fix: request rewriter not working in transpiled code * test: add app request-rewriter test case --- lib/{app.tsx => app-bootstrap.tsx} | 2 -- lib/app.test.ts | 16 +++++++++++++++- lib/app.ts | 5 +++++ 3 files changed, 20 insertions(+), 3 deletions(-) rename lib/{app.tsx => app-bootstrap.tsx} (97%) create mode 100644 lib/app.ts diff --git a/lib/app.tsx b/lib/app-bootstrap.tsx similarity index 97% rename from lib/app.tsx rename to lib/app-bootstrap.tsx index 2747dcfd27a3..f8b9215e33d8 100644 --- a/lib/app.tsx +++ b/lib/app-bootstrap.tsx @@ -1,5 +1,3 @@ -import '@/utils/request-rewriter'; - import { Hono } from 'hono'; import { compress } from 'hono/compress'; diff --git a/lib/app.test.ts b/lib/app.test.ts index b81d62ee5538..5e69fc87202a 100644 --- a/lib/app.test.ts +++ b/lib/app.test.ts @@ -1,6 +1,9 @@ -import { describe, expect, it } from 'vitest'; +import { describe, expect, it, vi } from 'vitest'; import app from '@/app'; +import undici from 'undici'; + +const { config } = await import('@/config'); describe('index', () => { it('serve index', async () => { @@ -9,3 +12,14 @@ describe('index', () => { expect(await res.text()).toContain('Welcome to RSSHub!'); }); }); + +describe('request-rewriter', () => { + it('should rewrite request', async () => { + const fetchSpy = vi.spyOn(undici, 'fetch'); + await app.request('/test/httperror'); + + // headers + const headers: Headers = fetchSpy.mock.lastCall?.[0].headers; + expect(headers.get('user-agent')).toBe(config.ua); + }); +}); diff --git a/lib/app.ts b/lib/app.ts new file mode 100644 index 000000000000..84ec9c74193b --- /dev/null +++ b/lib/app.ts @@ -0,0 +1,5 @@ +// This file ensures that the request rewriter runs before the app + +import '@/utils/request-rewriter'; + +export default (await import('./app-bootstrap')).default; From b98b4977ff196efbc1d27b8cf771d5c1e407f935 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Mon, 28 Apr 2025 01:28:07 +0800 Subject: [PATCH 0493/2658] feat(route): add Anytxt Searcher Release Notes (#18953) * feat(route): add Anytxt Searcher Release Notes * fix: use redirected url --------- --- lib/routes/anytxt/namespace.ts | 9 +++ lib/routes/anytxt/release-notes.ts | 91 ++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 lib/routes/anytxt/namespace.ts create mode 100644 lib/routes/anytxt/release-notes.ts diff --git a/lib/routes/anytxt/namespace.ts b/lib/routes/anytxt/namespace.ts new file mode 100644 index 000000000000..294df43f9fed --- /dev/null +++ b/lib/routes/anytxt/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Anytxt Searcher', + url: 'anytxt.net', + categories: ['program-update'], + description: '', + lang: 'zh-CN', +}; diff --git a/lib/routes/anytxt/release-notes.ts b/lib/routes/anytxt/release-notes.ts new file mode 100644 index 000000000000..497bec89f374 --- /dev/null +++ b/lib/routes/anytxt/release-notes.ts @@ -0,0 +1,91 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; + +export const handler = async (ctx: Context): Promise => { + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const baseUrl: string = 'https://anytxt.net'; + const targetUrl: string = new URL('download/', baseUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language = $('html').attr('lang') ?? 'en-US'; + + const image: string | undefined = $('meta[property="og:image"]').attr('content'); + + const items: DataItem[] = $('p.has-medium-font-size') + .slice(0, limit) + .toArray() + .map((el): Element => { + const $el: Cheerio = $(el); + + const title: string = $el.text(); + const description: string | undefined = $el.next().html() ?? ''; + const pubDateStr: string | undefined = title.split(/\s/)[0]; + const linkUrl: string | undefined = targetUrl; + const upDatedStr: string | undefined = pubDateStr; + + const processedItem: DataItem = { + title, + description, + pubDate: pubDateStr ? parseDate(pubDateStr) : undefined, + link: linkUrl, + content: { + html: description, + text: description, + }, + image, + banner: image, + updated: upDatedStr ? parseDate(upDatedStr) : undefined, + language, + }; + + return processedItem; + }) + .filter((_): _ is DataItem => true); + + return { + title: $('title').text(), + description: $('meta[property="og:description"]').attr('content'), + link: targetUrl, + item: items, + allowEmpty: true, + image, + author: $('meta[property="og:site_name"]').attr('content'), + language, + id: $('meta[property="og:url"]').attr('content'), + }; +}; + +export const route: Route = { + path: '/release-notes', + name: 'Release Notes', + url: 'anytxt.net', + maintainers: ['nczitzk'], + handler, + example: '/anytxt/release-notes', + parameters: undefined, + description: undefined, + categories: ['program-update'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['anytxt.net'], + target: '/anytxt/release-notes', + }, + ], + view: ViewType.Articles, +}; From ccb708846d4e3d4a416cd1346d1d6c3eca6b36d8 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Mon, 28 Apr 2025 02:48:18 +0800 Subject: [PATCH 0494/2658] feat(route/copernicium)!: remove route which is no longer valid (#18890) --- lib/routes/copernicium/index.ts | 75 ----------------------------- lib/routes/copernicium/namespace.ts | 7 --- 2 files changed, 82 deletions(-) delete mode 100644 lib/routes/copernicium/index.ts delete mode 100644 lib/routes/copernicium/namespace.ts diff --git a/lib/routes/copernicium/index.ts b/lib/routes/copernicium/index.ts deleted file mode 100644 index d88bc793ccb0..000000000000 --- a/lib/routes/copernicium/index.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Route } from '@/types'; -import ofetch from '@/utils/ofetch'; - -import cache from '@/utils/cache'; -import { load } from 'cheerio'; -import { parseDate } from '@/utils/parse-date'; - -export const route: Route = { - path: '/:category?', - categories: ['new-media'], - radar: [{ source: ['www.copernicium.tw'] }], - name: '分类', - example: '/copernicium/环球视角', - parameters: { category: '分类名' }, - maintainers: ['dzx-dzx'], - handler, -}; - -async function handler(ctx) { - const category = ctx.req.param('category'); - let res; - if (category) { - const CATEGORY_TO_ARG_MAP = new Map([ - ['环球视角', '4_1'], - ['人文叙述', '4_3'], - ['观点评论', '4_5'], - ['专题报道', '4_7'], - ]); - if (!CATEGORY_TO_ARG_MAP.get(category)) { - throw new Error('The requested category does not exist or is not supported.'); - } - const reqArgs = { - args: { - _jcp: CATEGORY_TO_ARG_MAP.get(category), - m31pageno: 1, - }, - type: 0, - }; - res = await ofetch('http://www.copernicium.tw/nr.jsp', { - query: { _reqArgs: reqArgs }, - }); - } else { - res = await ofetch('http://www.copernicium.tw/sys-nr/', { - query: { _reqArgs: { args: {}, type: 15 } }, - }); - } - const $ = load(res); - const list = $('.J_newsResultLine a.mixNewsStyleTitle') - .toArray() - .map((e) => { - e = $(e); - return { - title: e.text(), - link: e.attr('href'), - }; - }); - const items = await Promise.all( - list.map((item) => - cache.tryGet(item.link, async () => { - const detailResponse = await ofetch(item.link); - const content = load(detailResponse); - return { - pubDate: parseDate(content('span.newsInfo').text().substring(5)), - description: content('.richContent').html(), - ...item, - }; - }) - ) - ); - return { - title: `日新说 - ${category ?? '全部文章'}`, - link: 'http://www.copernicium.tw', - item: items, - }; -} diff --git a/lib/routes/copernicium/namespace.ts b/lib/routes/copernicium/namespace.ts deleted file mode 100644 index fe1ccb9acbd5..000000000000 --- a/lib/routes/copernicium/namespace.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Namespace } from '@/types'; - -export const namespace: Namespace = { - name: '日新说', - url: 'www.copernicium.tw', - lang: 'zh-TW', -}; From 10288db67d510d451c82a303eed93b54a1a3a564 Mon Sep 17 00:00:00 2001 From: CrackTC Date: Mon, 28 Apr 2025 03:05:19 +0800 Subject: [PATCH 0495/2658] fix(route/saraba1st): add host config & change default host (#18895) --- lib/config.ts | 2 ++ lib/routes/saraba1st/digest.ts | 12 +++++++----- lib/routes/saraba1st/namespace.ts | 2 +- lib/routes/saraba1st/templates/digest.art | 2 +- lib/routes/saraba1st/thread.ts | 16 ++++++++++------ 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index 735e9614b36c..db9d0d20ee7b 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -292,6 +292,7 @@ export type Config = { }; saraba1st: { cookie?: string; + host?: string; }; sehuatang: { cookie?: string; @@ -729,6 +730,7 @@ const calculateValue = () => { }, saraba1st: { cookie: envs.SARABA1ST_COOKIE, + host: envs.SARABA1ST_HOST || 'https://stage1st.com', }, sehuatang: { cookie: envs.SEHUATANG_COOKIE, diff --git a/lib/routes/saraba1st/digest.ts b/lib/routes/saraba1st/digest.ts index 3a9e12433cb5..94493e4670c5 100644 --- a/lib/routes/saraba1st/digest.ts +++ b/lib/routes/saraba1st/digest.ts @@ -12,7 +12,7 @@ import path from 'node:path'; export const route: Route = { path: '/digest/:tid', categories: ['bbs'], - example: '/saraba1st/digest/forum-75-1', + example: '/saraba1st/digest/forum-6-1', parameters: { tid: '论坛 id' }, features: { requireConfig: false, @@ -25,13 +25,14 @@ export const route: Route = { name: '论坛摘要', maintainers: ['shinemoon'], handler, - description: `版面网址如果为 \`https://bbs.saraba1st.com/2b/forum-75-1.html\` 那么论坛 id 就是 \`forum-75-1\`。`, + description: `版面网址如果为 \`https://stage1st.com/2b/forum-6-1.html\` 那么论坛 id 就是 \`forum-6-1\`。`, }; async function handler(ctx) { const tid = ctx.req.param('tid'); const cookieString = config.saraba1st.cookie ?? ''; - const res = await got('https://bbs.saraba1st.com/2b/' + tid + '.html', { + const host = config.saraba1st.host; + const res = await got(`${host}/2b/${tid}.html`, { headers: { Cookie: cookieString, }, @@ -48,7 +49,7 @@ async function handler(ctx) { const floorUrl = each.find('th.new a.s.xst').attr('href'); return { title: `${title}:${floor}`, - link: new URL(floorUrl, 'https://bbs.saraba1st.com/2b/').href, + link: new URL(floorUrl, `${host}/2b/`).href, author: each.find('td.by cite').text(), pubDate: timezone(parseDate(each.find('td.by em').first().text()), +8), }; @@ -65,7 +66,7 @@ async function handler(ctx) { return { title: `Stage1 论坛 - ${title}`, - link: `https://bbs.saraba1st.com/2b/${tid}.html`, + link: `${host}/2b/${tid}.html`, // item: await resultItems, item: resultItems, }; @@ -92,6 +93,7 @@ async function fetchContent(url) { postinfo: subind(this).find('div.authi em[id*=authorposton]').text(), }, msg: subind(this).find('td[id*="postmessage_"]').html(), + host: config.saraba1st.host, }); stubS.append(section); } diff --git a/lib/routes/saraba1st/namespace.ts b/lib/routes/saraba1st/namespace.ts index 106c418ed9f6..1cc3191b4f5e 100644 --- a/lib/routes/saraba1st/namespace.ts +++ b/lib/routes/saraba1st/namespace.ts @@ -2,6 +2,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Saraba1st', - url: 'bbs.saraba1st.com', + url: 'stage1st.com', lang: 'zh-CN', }; diff --git a/lib/routes/saraba1st/templates/digest.art b/lib/routes/saraba1st/templates/digest.art index 06c8ea37eaec..ef7f64954423 100644 --- a/lib/routes/saraba1st/templates/digest.art +++ b/lib/routes/saraba1st/templates/digest.art @@ -1,5 +1,5 @@
- {{ author.name }} + {{ author.name }} {{ author.postinfo }}
{{@ msg }}
diff --git a/lib/routes/saraba1st/thread.ts b/lib/routes/saraba1st/thread.ts index 5a62efb6e2fb..3c7b3d24c9a2 100644 --- a/lib/routes/saraba1st/thread.ts +++ b/lib/routes/saraba1st/thread.ts @@ -9,7 +9,7 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/thread/:tid', categories: ['bbs'], - example: '/saraba1st/thread/1842868', + example: '/saraba1st/thread/751272', parameters: { tid: '帖子 id' }, features: { requireConfig: false, @@ -22,14 +22,15 @@ export const route: Route = { name: '帖子', maintainers: ['zengxs'], handler, - description: `帖子网址如果为 \`https://bbs.saraba1st.com/2b/thread-1842868-1-1.html\` 那么帖子 id 就是 \`1789863\`。`, + description: `帖子网址如果为 \`https://stage1st.com/2b/thread-751272-1-1.html\` 那么帖子 id 就是 \`751272\`。`, }; async function handler(ctx) { const tid = ctx.req.param('tid'); const cookieString = config.saraba1st.cookie ?? ''; + const host = config.saraba1st.host; - const res = await got('https://bbs.saraba1st.com/2b/forum.php', { + const res = await got(`${host}/2b/forum.php`, { searchParams: queryString.stringify({ mod: 'viewthread', tid, @@ -49,6 +50,9 @@ async function handler(ctx) { for (let i = 0; i < Math.min(list.length, 20); i++) { count.push(i); } + + const staticUrl = new URL('/image/common/none.gif', host); + staticUrl.hostname = `static.${staticUrl.hostname.split('.').slice(-2).join('.')}`; const resultItems = count.map((i) => { const each = $(list[i]); const floor = each.find('td.plc .pi a > em').text(); @@ -56,7 +60,7 @@ async function handler(ctx) { const contentHtml = $(each.find('td.t_f')); const imgsHtml = contentHtml.find('img'); for (const element of imgsHtml) { - if (element.attribs.src === 'https://static.saraba1st.com/image/common/none.gif') { + if (element.attribs.src === staticUrl.href) { element.attribs.src = element.attribs.file; const imgHtml = $(element); imgHtml.removeAttr('zoomfile'); @@ -68,7 +72,7 @@ async function handler(ctx) { contentHtml.find('div.aimg_tip').remove(); return { title: `${title} #${floor}`, - link: new URL(floorUrl, 'https://bbs.saraba1st.com/2b/').href, + link: new URL(floorUrl, `${host}/2b/`).href, description: contentHtml.html(), author: each.find('.authi .xw1').text(), pubDate: timezone(parseDate(each.find('.authi em').text()), +8), @@ -77,7 +81,7 @@ async function handler(ctx) { return { title: `Stage1 论坛 - ${title}`, - link: `https://bbs.saraba1st.com/2b/thread-${tid}-1-1.html`, + link: `${host}/2b/thread-${tid}-1-1.html`, item: resultItems, }; } From e543a92ee68622d0a97960af49d2d33ddebfde4b Mon Sep 17 00:00:00 2001 From: Goestav <27970303+goestav@users.noreply.github.com> Date: Sun, 27 Apr 2025 19:23:19 +0000 Subject: [PATCH 0496/2658] fix(route/openai): fetch OpenAI blog articles through RSS feed (#18952) * fix(route/openai): fetch news through RSS feed * refactor: rename blog route to news * refactor(route/openai): ensure limit parameter works as expected * refactor(route/openai): use user agent from configuration * refactor(route/openai): cache data items * refactor(route/openai): cache individual data items * refactor: read query string parameter instead of path parameter --- lib/routes/openai/blog.ts | 66 ----------------------------------- lib/routes/openai/common.ts | 69 +++++++++++++++++++++++++++++++++++++ lib/routes/openai/news.ts | 32 +++++++++++++++++ 3 files changed, 101 insertions(+), 66 deletions(-) delete mode 100644 lib/routes/openai/blog.ts create mode 100644 lib/routes/openai/news.ts diff --git a/lib/routes/openai/blog.ts b/lib/routes/openai/blog.ts deleted file mode 100644 index 1b1ea68a6f4c..000000000000 --- a/lib/routes/openai/blog.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; -import { toTitleCase } from '@/utils/common-utils'; -import { getApiUrl, parseArticle } from './common'; - -export const route: Route = { - path: '/blog/:tag?', - categories: ['programming'], - example: '/openai/blog', - parameters: { tag: 'Tag, see below, All by default' }, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - name: 'Blog', - maintainers: ['StevenRCE0', 'nczitzk'], - handler, - description: `| All | Announcements | Events | Safety & Alignment | Community | Product | Culture & Careers | Milestones | Research | -| --- | ------------- | ------ | ------------------ | --------- | ------- | ------------------- | ---------- | -------- | -| | announcements | events | safety-alignment | community | product | culture-and-careers | milestones | research |`, -}; - -async function handler(ctx) { - const tag = ctx.req.param('tag') || ''; - - const rootUrl = 'https://openai.com'; - const blogRootUrl = 'https://openai.com/blog'; - const blogOriginUrl = `${rootUrl}/blog${tag === '' ? '' : `?topics=${tag}`}`; - - const apiUrl = new URL('/api/v1/blog-details', await getApiUrl()); - - // Construct API query - apiUrl.searchParams.append('sort', '-publicationDate,-createdAt'); - apiUrl.searchParams.append('page[size]', '20'); - apiUrl.searchParams.append('page[number]', '1'); - apiUrl.searchParams.append('include', 'media,topics,authors'); - if (tag) { - apiUrl.searchParams.append('filter[topics][slugs][0]', tag); - } - - const response = await got({ - method: 'get', - url: apiUrl, - }); - - const list = response.data.data.filter((entry) => entry.type === 'blog-details'); - - const items = await Promise.all( - list.map((item) => { - const attributes = item.attributes; - return parseArticle(ctx, blogRootUrl, attributes); - }) - ); - - const title = `OpenAI Blog${tag ? ` - ${toTitleCase(tag)}` : ''}`; - - return { - title, - link: blogOriginUrl, - item: items, - }; -} diff --git a/lib/routes/openai/common.ts b/lib/routes/openai/common.ts index d7b7889b6cce..30723d3857da 100644 --- a/lib/routes/openai/common.ts +++ b/lib/routes/openai/common.ts @@ -1,8 +1,77 @@ import cache from '@/utils/cache'; import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; +import { DataItem } from '@/types'; import { load } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; +import { config } from '@/config'; + +export const BASE_URL = new URL('https://openai.com'); + +/** Fetch the details of an article. */ +export const fetchArticleDetails = async (url: string) => { + const page = await ofetch(url); + const $ = load(page); + + const $article = $('#main article'); + + const categories = $('h1') + .prev() + .find('a[href]') + .toArray() + .map((element) => $(element).text()); + + // Article header (title, sub title and categories) + $($article.find('h1').parents().get(4)).remove(); + // Related articles (can be the #citations section in some cases, so the last child needs to be removed first) + $article.children().last().remove(); + // Article authors and tags + $article.find('#citations').remove(); + + return { + content: $article.html() ?? undefined, + // Categories can be found on https://openai.com/news/ and https://openai.com/research/index/ + categories, + image: $('meta[property="og:image"]').attr('content'), + }; +}; + +/** Fetch all articles from OpenAI's RSS feed. */ +export const fetchArticles = async (limit: number): Promise => { + const page = await ofetch('https://openai.com/news/rss.xml', { + responseType: 'text', + headers: { 'User-Agent': config.ua }, + }); + + const $ = load(page, { xml: true }); + + return Promise.all( + $('item') + .toArray() + .slice(0, limit) + .map>((element) => { + const id = $(element).find('guid').text(); + + return cache.tryGet(`openai:news:${id}`, async () => { + const title = $(element).find('title').text(); + const pubDate = $(element).find('pubDate').text(); + const link = $(element).find('link').text(); + + const { content, categories } = await fetchArticleDetails(link); + + return { + guid: id, + title, + link, + pubDate, + description: content, + category: categories, + } as DataItem; + }) as Promise; + }) + ); +}; const getApiUrl = async () => { const blogRootUrl = 'https://openai.com/blog'; diff --git a/lib/routes/openai/news.ts b/lib/routes/openai/news.ts new file mode 100644 index 000000000000..2f399bdeb507 --- /dev/null +++ b/lib/routes/openai/news.ts @@ -0,0 +1,32 @@ +import { Route } from '@/types'; +import { fetchArticles, BASE_URL } from './common'; +import { Context } from 'hono'; + +export const route: Route = { + path: '/news', + categories: ['programming'], + example: '/openai/news', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'News', + maintainers: ['goestav', 'StevenRCE0', 'nczitzk'], + handler, +}; + +async function handler(ctx: Context) { + const limit = Number.parseInt(ctx.req.query('limit') || '10'); + + const link = new URL('/news/', BASE_URL).href; + + return { + title: 'OpenAI News', + link, + item: await fetchArticles(limit), + }; +} From 7f8258a6df05591c60db8d795aa32a378cddd32b Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 28 Apr 2025 04:33:07 +0800 Subject: [PATCH 0497/2658] chore: add firebase studio config --- .devcontainer/devcontainer.json | 2 -- .gitpod.yml | 4 +-- .idx/dev.nix | 63 +++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 .idx/dev.nix diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 77026d75ece6..048a2c375c82 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,9 +15,7 @@ "eamodio.gitlens", "EditorConfig.EditorConfig", "esbenp.prettier-vscode", - "deepscan.vscode-deepscan", "SonarSource.sonarlint-vscode", - "unifiedjs.vscode-mdx", "VASubasRaj.flashpost", // Thunder Client is paywalled in WSL/Codespaces/SSH > 2.30.0 "ZihanLi.at-helper" ] diff --git a/.gitpod.yml b/.gitpod.yml index 0ee2c93f22e2..e88bef50a384 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -31,8 +31,6 @@ vscode: - eamodio.gitlens - EditorConfig.EditorConfig - esbenp.prettier-vscode - - deepscan.vscode-deepscan - sonarsource.sonarlint-vscode - # - VASubasRaj.flashpost not available on Open VSX, Thunder Client is paywalled in WSL/Codespaces/SSH > 2.30.0 - - unifiedjs.vscode-mdx + # - VASubasRaj.flashpost and KeyRunner.keyrunner are not available on Open VSX, Thunder Client is paywalled in WSL/Codespaces/SSH > 2.30.0 # - ZihanLi.at-helper not available on Open VSX diff --git a/.idx/dev.nix b/.idx/dev.nix new file mode 100644 index 000000000000..a8e6be8704f7 --- /dev/null +++ b/.idx/dev.nix @@ -0,0 +1,63 @@ +# To learn more about how to use Nix to configure your environment +# see: https://firebase.google.com/docs/studio/customize-workspace +{ pkgs, ... }: { + # Which nixpkgs channel to use. + channel = "unstable"; # or "unstable" + + # Use https://search.nixos.org/packages to find packages + packages = [ + # pkgs.go + # pkgs.python311 + # pkgs.python311Packages.pip + pkgs.nodejs_22 + pkgs.pnpm_9 + # pkgs.nodePackages.nodemon + pkgs.cacert + pkgs.valkey + ]; + + # Sets environment variables in the workspace + env = {}; + idx = { + # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" + extensions = [ + "cweijan.vscode-database-client2" + "dbaeumer.vscode-eslint" + "eamodio.gitlens" + "EditorConfig.EditorConfig" + "esbenp.prettier-vscode" + "sonarsource.sonarlint-vscode" + ]; + + # Enable previews + previews = { + enable = true; + previews = { + # web = { + # # Example: run "npm run dev" with PORT set to IDX's defined port for previews, + # # and show it in IDX's web preview panel + # command = ["npm" "run" "dev"]; + # manager = "web"; + # env = { + # # Environment variables to set for your server + # PORT = "$PORT"; + # }; + # }; + }; + }; + + # Workspace lifecycle hooks + workspace = { + # Runs when a workspace is first created + onCreate = { + # Example: install JS dependencies from NPM + pnpm-install = "pnpm i && pnpm rb"; + }; + # Runs when the workspace is (re)started + onStart = { + # Example: start a background task to watch and re-build backend code + # watch-backend = "npm run watch-backend"; + }; + }; + }; +} From d7169e40435e2ba74ff73496e1743d43fa8b8d37 Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 28 Apr 2025 04:40:10 +0800 Subject: [PATCH 0498/2658] docs: fix visitors count hits.seeyoufarm.com is [dead](https://github.com/gjbae1212/hit-counter) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index defee8667f8d..a6ac9ff0275f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![npm publish](https://img.shields.io/npm/dt/rsshub?label=npm%20downloads&logo=npm&style=flat-square)](https://www.npmjs.com/package/rsshub) [![test](https://img.shields.io/github/actions/workflow/status/DIYgod/RSSHub/test.yml?branch=master&label=test&logo=github&style=flat-square)](https://github.com/DIYgod/RSSHub/actions/workflows/test.yml?query=event%3Apush+branch%3Amaster) [![Test coverage](https://img.shields.io/codecov/c/github/DIYgod/RSSHub.svg?style=flat-square&logo=codecov)](https://app.codecov.io/gh/DIYgod/RSSHub/branch/master) -[![Visitors](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FDIYgod%2FRSSHub&count_bg=%23FF752E&title_bg=%23555555&icon=rss.svg&icon_color=%23FF752E&title=RSS+lovers&edge_flat=true)](https://github.com/DIYgod/RSSHub) +[![Visitors](https://hitscounter.dev/api/hit?url=https%3A%2F%2Fgithub.com%2FDIYgod%2FRSSHub&label=RSS+lovers&icon=rss-fill&color=%23ff752e)](https://github.com/DIYgod/RSSHub) [![Telegram group](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.swo.moe%2Fstats%2Ftelegram%2Frsshub&query=count&color=2CA5E0&label=Telegram%20Group&logo=telegram&cacheSeconds=3600&style=flat-square)](https://t.me/rsshub) [![Telegram channel](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.swo.moe%2Fstats%2Ftelegram%2FawesomeRSSHub&query=count&color=2CA5E0&label=Telegram%20Channel&logo=telegram&cacheSeconds=3600&style=flat-square)](https://t.me/awesomeRSSHub) [![X (Twitter)](https://img.shields.io/badge/any_text-Follow-blue?color=2CA5E0&label=Twitter&logo=X&cacheSeconds=3600&style=flat-square)](https://x.com/intent/follow?screen_name=_RSSHub) From 3a17a76e8e2fdd357cb3a0a7a91cf1ce51c9cd81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 11:04:46 +0000 Subject: [PATCH 0499/2658] chore(deps): bump hono from 4.7.7 to 4.7.8 (#18959) Bumps [hono](https://github.com/honojs/hono) from 4.7.7 to 4.7.8. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.7.7...v4.7.8) --- updated-dependencies: - dependency-name: hono dependency-version: 4.7.8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 95d2938ac282..c198ad81391c 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "fanfou-sdk": "5.0.0", "form-data": "4.0.2", "googleapis": "148.0.0", - "hono": "4.7.7", + "hono": "4.7.8", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.8", "https-proxy-agent": "7.0.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2c3df3026c0a..47ab5b143b48 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,10 +25,10 @@ importers: version: 4.2.0 '@hono/node-server': specifier: 1.14.1 - version: 1.14.1(hono@4.7.7) + version: 1.14.1(hono@4.7.8) '@hono/zod-openapi': specifier: 0.19.5 - version: 0.19.5(hono@4.7.7)(zod@3.24.3) + version: 0.19.5(hono@4.7.8)(zod@3.24.3) '@notionhq/client': specifier: 2.3.0 version: 2.3.0 @@ -61,7 +61,7 @@ importers: version: 0.0.25 '@scalar/hono-api-reference': specifier: 0.8.5 - version: 0.8.5(hono@4.7.7) + version: 0.8.5(hono@4.7.8) '@sentry/node': specifier: 9.14.0 version: 9.14.0 @@ -120,8 +120,8 @@ importers: specifier: 148.0.0 version: 148.0.0 hono: - specifier: 4.7.7 - version: 4.7.7 + specifier: 4.7.8 + version: 4.7.8 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -4030,8 +4030,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.7.7: - resolution: {integrity: sha512-2PCpQRbN87Crty8/L/7akZN3UyZIAopSoRxCwRbJgUuV1+MHNFHzYFxZTg4v/03cXUm+jce/qa2VSBZpKBm3Qw==} + hono@4.7.8: + resolution: {integrity: sha512-PCibtFdxa7/Ldud9yddl1G81GjYaeMYYTq4ywSaNsYbB1Lug4mwtOMJf2WXykL0pntYwmpRJeOI3NmoDgD+Jxw==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -7503,20 +7503,20 @@ snapshots: '@eslint/core': 0.13.0 levn: 0.4.1 - '@hono/node-server@1.14.1(hono@4.7.7)': + '@hono/node-server@1.14.1(hono@4.7.8)': dependencies: - hono: 4.7.7 + hono: 4.7.8 - '@hono/zod-openapi@0.19.5(hono@4.7.7)(zod@3.24.3)': + '@hono/zod-openapi@0.19.5(hono@4.7.8)(zod@3.24.3)': dependencies: '@asteasolutions/zod-to-openapi': 7.3.0(zod@3.24.3) - '@hono/zod-validator': 0.4.3(hono@4.7.7)(zod@3.24.3) - hono: 4.7.7 + '@hono/zod-validator': 0.4.3(hono@4.7.8)(zod@3.24.3) + hono: 4.7.8 zod: 3.24.3 - '@hono/zod-validator@0.4.3(hono@4.7.7)(zod@3.24.3)': + '@hono/zod-validator@0.4.3(hono@4.7.8)(zod@3.24.3)': dependencies: - hono: 4.7.7 + hono: 4.7.8 zod: 3.24.3 '@humanfs/core@0.19.1': {} @@ -8371,10 +8371,10 @@ snapshots: dependencies: '@scalar/types': 0.1.11 - '@scalar/hono-api-reference@0.8.5(hono@4.7.7)': + '@scalar/hono-api-reference@0.8.5(hono@4.7.8)': dependencies: '@scalar/core': 0.2.11 - hono: 4.7.7 + hono: 4.7.8 '@scalar/openapi-types@0.2.1': dependencies: @@ -10373,7 +10373,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.7.7: {} + hono@4.7.8: {} hookable@5.5.3: {} From 38231e359bcb812946c0effbca8142132ef98791 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 11:05:55 +0000 Subject: [PATCH 0500/2658] chore(deps-dev): bump @types/node from 22.15.2 to 22.15.3 (#18960) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.2 to 22.15.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 80 +++++++++++++++++++++++++------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index c198ad81391c..c974275aab0d 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.15.2", + "@types/node": "22.15.3", "@types/sanitize-html": "2.15.0", "@types/supertest": "6.0.3", "@types/title": "3.4.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 47ab5b143b48..7e1b79586a33 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -349,8 +349,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.15.2 - version: 22.15.2 + specifier: 22.15.3 + version: 22.15.3 '@types/sanitize-html': specifier: 2.15.0 version: 2.15.0 @@ -374,7 +374,7 @@ importers: version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.15.2)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) + version: 2.1.9(vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) discord-api-types: specifier: 0.38.1 version: 0.38.1 @@ -449,10 +449,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.2)) + version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.3)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.15.2)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) + version: 2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -2492,8 +2492,8 @@ packages: '@types/node-fetch@2.6.12': resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} - '@types/node@22.15.2': - resolution: {integrity: sha512-uKXqKN9beGoMdBfcaTY1ecwz6ctxuJAcUlwE55938g0ZJ8lRxwAZqRz2AJ4pzpt5dHdTPMB863UZ0ESiFUcP7A==} + '@types/node@22.15.3': + resolution: {integrity: sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -7557,7 +7557,7 @@ snapshots: '@inquirer/figures': 1.0.11 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -8487,7 +8487,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/cookie@0.6.0': {} @@ -8510,12 +8510,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/html-to-text@9.0.4': {} @@ -8523,13 +8523,13 @@ snapshots: '@types/imapflow@1.0.20': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -8539,7 +8539,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/jsrsasign@10.5.13': {} @@ -8549,7 +8549,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -8571,18 +8571,18 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/mysql@2.15.26': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/node-fetch@2.6.12': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 form-data: 4.0.2 - '@types/node@22.15.2': + '@types/node@22.15.3': dependencies: undici-types: 6.21.0 @@ -8594,7 +8594,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 pg-protocol: 1.9.5 pg-types: 2.2.0 @@ -8606,7 +8606,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/tough-cookie': 4.0.5 form-data: 2.5.3 @@ -8622,7 +8622,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.15.2 + '@types/node': 22.15.3 form-data: 4.0.2 '@types/supertest@6.0.3': @@ -8632,7 +8632,7 @@ snapshots: '@types/tedious@4.0.14': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 '@types/title@3.4.3': {} @@ -8648,7 +8648,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 optional: true '@typescript-eslint/eslint-plugin@8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': @@ -8795,7 +8795,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.15.2)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8809,7 +8809,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.15.2)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) + vitest: 2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) transitivePeerDependencies: - supports-color @@ -8820,14 +8820,14 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.2))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.3))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.3(typescript@5.8.3) - vite: 5.4.15(@types/node@22.15.2) + vite: 5.4.15(@types/node@22.15.3) '@vitest/pretty-format@2.1.9': dependencies: @@ -11743,7 +11743,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.15.2 + '@types/node': 22.15.3 long: 5.3.1 proxy-agent@6.4.0: @@ -12763,13 +12763,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.9(@types/node@22.15.2): + vite-node@2.1.9(@types/node@22.15.3): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.15(@types/node@22.15.2) + vite: 5.4.15(@types/node@22.15.3) transitivePeerDependencies: - '@types/node' - less @@ -12781,30 +12781,30 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.2)): + vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.3)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.3) optionalDependencies: - vite: 5.4.15(@types/node@22.15.2) + vite: 5.4.15(@types/node@22.15.3) transitivePeerDependencies: - supports-color - typescript - vite@5.4.15(@types/node@22.15.2): + vite@5.4.15(@types/node@22.15.3): dependencies: esbuild: 0.21.5 postcss: 8.5.3 rollup: 4.37.0 optionalDependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 fsevents: 2.3.3 - vitest@2.1.9(@types/node@22.15.2)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)): + vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.2)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.3)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -12820,11 +12820,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.15(@types/node@22.15.2) - vite-node: 2.1.9(@types/node@22.15.2) + vite: 5.4.15(@types/node@22.15.3) + vite-node: 2.1.9(@types/node@22.15.3) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.15.2 + '@types/node': 22.15.3 jsdom: 26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 3cf89fc08e78d4eb785f5fe26e12b3dc3b7d361e Mon Sep 17 00:00:00 2001 From: Nano Date: Mon, 28 Apr 2025 20:41:29 +0800 Subject: [PATCH 0501/2658] =?UTF-8?q?docs(route/jlpt):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20route=20=E6=A0=87=E9=A2=98=20(#18962)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 不改的话在 docs 搜索 JLPT 显示为空 --- lib/routes/neea/jlpt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/neea/jlpt.ts b/lib/routes/neea/jlpt.ts index ea5214c52c88..47f73b9a2f40 100644 --- a/lib/routes/neea/jlpt.ts +++ b/lib/routes/neea/jlpt.ts @@ -86,7 +86,7 @@ export const handler = async (ctx: Context): Promise => { export const route: Route = { path: '/jlpt', - name: '日本语能力测试JLPT通知', + name: '日本语能力测试 JLPT 通知', url: 'jlpt.neea.cn', maintainers: ['nczitzk'], handler, From 1028cf1f0d9203ec2ed3a3e515ba392658d3d9ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 20:58:53 +0800 Subject: [PATCH 0502/2658] chore(deps): bump tldts from 7.0.2 to 7.0.4 (#18956) Bumps [tldts](https://github.com/remusao/tldts) from 7.0.2 to 7.0.4. - [Release notes](https://github.com/remusao/tldts/releases) - [Changelog](https://github.com/remusao/tldts/blob/master/CHANGELOG.md) - [Commits](https://github.com/remusao/tldts/compare/v7.0.2...v7.0.4) --- updated-dependencies: - dependency-name: tldts dependency-version: 7.0.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index c974275aab0d..d72e7c41ce59 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "source-map": "0.7.4", "telegram": "2.26.22", "title": "4.0.1", - "tldts": "7.0.2", + "tldts": "7.0.4", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.1.2", "tsx": "4.19.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7e1b79586a33..f8a38a514f63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -246,8 +246,8 @@ importers: specifier: 4.0.1 version: 4.0.1 tldts: - specifier: 7.0.2 - version: 7.0.2 + specifier: 7.0.4 + version: 7.0.4 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5912,15 +5912,15 @@ packages: tldts-core@6.1.86: resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} - tldts-core@7.0.2: - resolution: {integrity: sha512-F1jRaje70QJ03A6UOSNpjs43Jnn5VRb+namtC5UW6lWQ/IHck6EQe9QWRb8NiQMMnejeE5u8kRSPU+lcVArXRw==} + tldts-core@7.0.4: + resolution: {integrity: sha512-9/IRbnIvUENGD6rg7m6Q9h/jH5ZL28hwjAhxrJx0AmcBue1FSsc84XZFaV748EsDVflid86aGDR11eSz6sbQjA==} tldts@6.1.86: resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} hasBin: true - tldts@7.0.2: - resolution: {integrity: sha512-v9XLuX1c2rjgHp7z3QroPN3tJ70STEdB7ngN43kzoEHElswzEmIL9dCo3itEVrI+JFK15IGtUqOcb410z1tBKQ==} + tldts@7.0.4: + resolution: {integrity: sha512-QH/CssdxxVNbGP4GtYSBmnsqW040KiBurALbRazuH952NLUFETwCiHHD13pHuG2o1uF8B2D7Os/5u5ejKVr4Vg==} hasBin: true tmp@0.0.33: @@ -12498,15 +12498,15 @@ snapshots: tldts-core@6.1.86: {} - tldts-core@7.0.2: {} + tldts-core@7.0.4: {} tldts@6.1.86: dependencies: tldts-core: 6.1.86 - tldts@7.0.2: + tldts@7.0.4: dependencies: - tldts-core: 7.0.2 + tldts-core: 7.0.4 tmp@0.0.33: dependencies: From 832c1ddcd6f8e8e70c5a09eabb1b699ec248beda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 21:08:54 +0800 Subject: [PATCH 0503/2658] chore(deps): bump @hono/zod-openapi from 0.19.5 to 0.19.6 (#18961) Bumps [@hono/zod-openapi](https://github.com/honojs/middleware/tree/HEAD/packages/zod-openapi) from 0.19.5 to 0.19.6. - [Release notes](https://github.com/honojs/middleware/releases) - [Changelog](https://github.com/honojs/middleware/blob/main/packages/zod-openapi/CHANGELOG.md) - [Commits](https://github.com/honojs/middleware/commits/HEAD/packages/zod-openapi) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-version: 0.19.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index d72e7c41ce59..93782dfdfc21 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@bbob/html": "4.2.0", "@bbob/preset-html5": "4.2.0", "@hono/node-server": "1.14.1", - "@hono/zod-openapi": "0.19.5", + "@hono/zod-openapi": "0.19.6", "@notionhq/client": "2.3.0", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.200.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f8a38a514f63..a562f878f340 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: 1.14.1 version: 1.14.1(hono@4.7.8) '@hono/zod-openapi': - specifier: 0.19.5 - version: 0.19.5(hono@4.7.8)(zod@3.24.3) + specifier: 0.19.6 + version: 0.19.6(hono@4.7.8)(zod@3.24.3) '@notionhq/client': specifier: 2.3.0 version: 2.3.0 @@ -1425,15 +1425,15 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.19.5': - resolution: {integrity: sha512-n2RqdZL7XIaWPwBNygctG/1eySyRtSBnS7l+pIsP3f2JW5P2l7Smm6SLluscrGwB5l2C2fxbfvhWoC6Ig+SxXw==} + '@hono/zod-openapi@0.19.6': + resolution: {integrity: sha512-qD2I0i5Ksry8gf47rXR6tuUAfv5S/wRZPRUNn+y8vOkgArDtIs30Ha3KGHeuGhcMk773D197IlPUppSCbHt6iQ==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' zod: 3.* - '@hono/zod-validator@0.4.3': - resolution: {integrity: sha512-xIgMYXDyJ4Hj6ekm9T9Y27s080Nl9NXHcJkOvkXPhubOLj8hZkOL8pDnnXfvCf5xEE8Q4oMFenQUZZREUY2gqQ==} + '@hono/zod-validator@0.5.0': + resolution: {integrity: sha512-ds5bW6DCgAnNHP33E3ieSbaZFd5dkV52ZjyaXtGoR06APFrCtzAsKZxTHwOrJNBdXsi0e5wNwo5L4nVEVnJUdg==} peerDependencies: hono: '>=3.9.0' zod: ^3.19.1 @@ -7507,14 +7507,14 @@ snapshots: dependencies: hono: 4.7.8 - '@hono/zod-openapi@0.19.5(hono@4.7.8)(zod@3.24.3)': + '@hono/zod-openapi@0.19.6(hono@4.7.8)(zod@3.24.3)': dependencies: '@asteasolutions/zod-to-openapi': 7.3.0(zod@3.24.3) - '@hono/zod-validator': 0.4.3(hono@4.7.8)(zod@3.24.3) + '@hono/zod-validator': 0.5.0(hono@4.7.8)(zod@3.24.3) hono: 4.7.8 zod: 3.24.3 - '@hono/zod-validator@0.4.3(hono@4.7.8)(zod@3.24.3)': + '@hono/zod-validator@0.5.0(hono@4.7.8)(zod@3.24.3)': dependencies: hono: 4.7.8 zod: 3.24.3 From 5a824d3367aca90efd045db885541b90a8a98539 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 21:50:53 +0800 Subject: [PATCH 0504/2658] chore(deps-dev): bump eslint-plugin-unicorn from 58.0.0 to 59.0.0 (#18957) * chore(deps-dev): bump eslint-plugin-unicorn from 58.0.0 to 59.0.0 Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 58.0.0 to 59.0.0. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v58.0.0...v59.0.0) --- updated-dependencies: - dependency-name: eslint-plugin-unicorn dependency-version: 59.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * fix: no-unnecessary-array-flat-depth * fix(eslint): unicorn/prefer-import-meta-properties --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- eslint.config.mjs | 6 +- lib/registry.ts | 3 +- lib/routes/resonac/products.ts | 2 +- package.json | 2 +- pnpm-lock.yaml | 150 ++++----------------------------- 5 files changed, 21 insertions(+), 142 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 844932dc3051..1339160fd0d8 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -6,13 +6,10 @@ import n from 'eslint-plugin-n'; import globals from 'globals'; import tsParser from '@typescript-eslint/parser'; import yamlParser from 'yaml-eslint-parser'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; import js from '@eslint/js'; import { FlatCompat } from '@eslint/eslintrc'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); +const __dirname = import.meta.dirname; const compat = new FlatCompat({ baseDirectory: __dirname, recommendedConfig: js.configs.recommended, @@ -185,6 +182,7 @@ unicorn.configs.recommended, 'unicorn/prefer-code-point': 'warn', 'unicorn/prefer-global-this': 'off', + 'unicorn/prefer-import-meta-properties': 'warn', 'unicorn/prefer-logical-operator-over-ternary': 'warn', 'unicorn/prefer-module': 'off', 'unicorn/prefer-node-protocol': 'off', diff --git a/lib/registry.ts b/lib/registry.ts index 0fcf7e680f4a..9e713aac3775 100644 --- a/lib/registry.ts +++ b/lib/registry.ts @@ -2,7 +2,6 @@ import type { Namespace, Route } from '@/types'; import { directoryImport } from 'directory-import'; import { Hono, type Handler } from 'hono'; import path from 'node:path'; -import { fileURLToPath } from 'node:url'; import { serveStatic } from '@hono/node-server/serve-static'; import { config } from '@/config'; @@ -11,7 +10,7 @@ import healthz from '@/routes/healthz'; import robotstxt from '@/routes/robots.txt'; import metrics from '@/routes/metrics'; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const __dirname = import.meta.dirname; let modules: Record = {}; let namespaces: Record< diff --git a/lib/routes/resonac/products.ts b/lib/routes/resonac/products.ts index 918c8b79ea49..68d0a11dd873 100644 --- a/lib/routes/resonac/products.ts +++ b/lib/routes/resonac/products.ts @@ -56,7 +56,7 @@ async function handler() { ) ); - const fullList = lists.flat(1); // flatten array + const fullList = lists.flat(); // flatten array // fullList = fullList.filter((item) => item.title !== 'Empty'); const items = await Promise.all( diff --git a/package.json b/package.json index 93782dfdfc21..02bddd8b9464 100644 --- a/package.json +++ b/package.json @@ -177,7 +177,7 @@ "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.17.0", "eslint-plugin-prettier": "5.2.6", - "eslint-plugin-unicorn": "58.0.0", + "eslint-plugin-unicorn": "59.0.0", "eslint-plugin-yml": "1.18.0", "fs-extra": "11.3.0", "globals": "16.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a562f878f340..018d6592421f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -394,8 +394,8 @@ importers: specifier: 5.2.6 version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(prettier@3.5.3) eslint-plugin-unicorn: - specifier: 58.0.0 - version: 58.0.0(eslint@9.25.1(jiti@2.4.2)) + specifier: 59.0.0 + version: 59.0.0(eslint@9.25.1(jiti@2.4.2)) eslint-plugin-yml: specifier: 1.18.0 version: 1.18.0(eslint@9.25.1(jiti@2.4.2)) @@ -1383,10 +1383,6 @@ packages: resolution: {integrity: sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.12.0': - resolution: {integrity: sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.13.0': resolution: {integrity: sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1411,10 +1407,6 @@ packages: resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.2.7': - resolution: {integrity: sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.2.8': resolution: {integrity: sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2495,9 +2487,6 @@ packages: '@types/node@22.15.3': resolution: {integrity: sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==} - '@types/normalize-package-data@2.4.4': - resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - '@types/pg-pool@2.0.6': resolution: {integrity: sha512-TaAUE5rq2VQYxab5Ts7WZhKNmuN78Q6PiFonTDdpbx8a1H0M1vhy3rhiMjl+e2iHmogyMw7jZF4FrE6eJUy5HQ==} @@ -2960,8 +2949,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001707: - resolution: {integrity: sha512-3qtRjw/HQSMlDWf+X79N206fepf4SOOU6SQLMaq/0KkZLmSjPxAkBOQQ+FxbHKfHmYLZFfdWsO3KA90ceHPSnw==} + caniuse-lite@1.0.30001715: + resolution: {integrity: sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -3420,8 +3409,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.128: - resolution: {integrity: sha512-bo1A4HH/NS522Ws0QNFIzyPcyUUNV/yyy70Ho1xqfGYzPUme2F/xr4tlEOuM6/A538U1vDA7a4XfCd1CKRegKQ==} + electron-to-chromium@1.5.143: + resolution: {integrity: sha512-QqklJMOFBMqe46k8iIOwA9l2hz57V2OKMmP5eSWcUvwx+mASAsbU+wkF1pHjn9ZVSBPrsYWr4/W/95y5SwYg2g==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -3584,8 +3573,8 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-unicorn@58.0.0: - resolution: {integrity: sha512-fc3iaxCm9chBWOHPVjn+Czb/wHS0D2Mko7wkOdobqo9R2bbFObc4LyZaLTNy0mhZOP84nKkLhTUQxlLOZ7EjKw==} + eslint-plugin-unicorn@59.0.0: + resolution: {integrity: sha512-7IEeqkymGa7tr6wTWS4DolfXnfcE3QjcD0g7I+qCfV5GPMvVsFsLT7zTIYvnudqwAm5nWekdGIOTTXA93Sz9Ow==} engines: {node: ^18.20.0 || ^20.10.0 || >=21.0.0} peerDependencies: eslint: '>=9.22.0' @@ -4037,10 +4026,6 @@ packages: hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} - hosted-git-info@7.0.2: - resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} - engines: {node: ^16.14.0 || >=18.0.0} - html-encoding-sniffer@4.0.0: resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} engines: {node: '>=18'} @@ -4153,10 +4138,6 @@ packages: resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} engines: {node: '>=12'} - index-to-position@1.0.0: - resolution: {integrity: sha512-sCO7uaLVhRJ25vz1o8s9IFM3nVS4DkuQnyjMwiQPKvQuBYBDmb8H7zx8ki7nVh4HJQOdVWebyvLE0qt+clruxA==} - engines: {node: '>=18'} - inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. @@ -4929,10 +4910,6 @@ packages: engines: {node: ^18.17.0 || >=20.5.0} hasBin: true - normalize-package-data@6.0.2: - resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==} - engines: {node: ^16.14.0 || >=18.0.0} - normalize-url@8.0.1: resolution: {integrity: sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==} engines: {node: '>=14.16'} @@ -5076,10 +5053,6 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} - parse-json@8.2.0: - resolution: {integrity: sha512-eONBZy4hm2AgxjNFd8a4nyDJnzUAH0g34xSQAwWEVGCjdZ4ZL7dKZBfq267GWP/JaS9zW62Xs2FeAdDvpHHJGQ==} - engines: {node: '>=18'} - parse-srcset@1.0.2: resolution: {integrity: sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==} @@ -5375,14 +5348,6 @@ packages: re2js@1.1.0: resolution: {integrity: sha512-ovDCIb2ZQR7Do3NzH2XEuXOzqd1q8srvkeaOVMf+EZNt1Z4JoUVvNKCR9qf8EbqoPhvLknkoyiiBzoQtmuzIbQ==} - read-package-up@11.0.0: - resolution: {integrity: sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ==} - engines: {node: '>=18'} - - read-pkg@9.0.1: - resolution: {integrity: sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==} - engines: {node: '>=18'} - readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -5679,18 +5644,6 @@ packages: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} engines: {node: '>= 8'} - spdx-correct@3.2.0: - resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} - - spdx-exceptions@2.5.0: - resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} - - spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - - spdx-license-ids@3.0.21: - resolution: {integrity: sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==} - split-on-first@1.1.0: resolution: {integrity: sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==} engines: {node: '>=6'} @@ -6116,10 +6069,6 @@ packages: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} - unicorn-magic@0.1.0: - resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} - engines: {node: '>=18'} - unified@11.0.5: resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} @@ -6206,9 +6155,6 @@ packages: valid-url@1.0.9: resolution: {integrity: sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA==} - validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - verror@1.10.0: resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} engines: {'0': node >=0.6.0} @@ -7451,10 +7397,6 @@ snapshots: '@eslint/config-helpers@0.2.1': {} - '@eslint/core@0.12.0': - dependencies: - '@types/json-schema': 7.0.15 - '@eslint/core@0.13.0': dependencies: '@types/json-schema': 7.0.15 @@ -7493,11 +7435,6 @@ snapshots: '@eslint/object-schema@2.1.6': {} - '@eslint/plugin-kit@0.2.7': - dependencies: - '@eslint/core': 0.12.0 - levn: 0.4.1 - '@eslint/plugin-kit@0.2.8': dependencies: '@eslint/core': 0.13.0 @@ -8586,8 +8523,6 @@ snapshots: dependencies: undici-types: 6.21.0 - '@types/normalize-package-data@2.4.4': {} - '@types/pg-pool@2.0.6': dependencies: '@types/pg': 8.6.1 @@ -9058,8 +8993,8 @@ snapshots: browserslist@4.24.4: dependencies: - caniuse-lite: 1.0.30001707 - electron-to-chromium: 1.5.128 + caniuse-lite: 1.0.30001715 + electron-to-chromium: 1.5.143 node-releases: 2.0.19 update-browserslist-db: 1.1.3(browserslist@4.24.4) @@ -9125,7 +9060,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001707: {} + caniuse-lite@1.0.30001715: {} caseless@0.12.0: {} @@ -9589,7 +9524,7 @@ snapshots: minimatch: 9.0.1 semver: 7.7.1 - electron-to-chromium@1.5.128: {} + electron-to-chromium@1.5.143: {} ellipsize@0.1.0: {} @@ -9797,22 +9732,22 @@ snapshots: '@types/eslint': 9.6.1 eslint-config-prettier: 10.1.2(eslint@9.25.1(jiti@2.4.2)) - eslint-plugin-unicorn@58.0.0(eslint@9.25.1(jiti@2.4.2)): + eslint-plugin-unicorn@59.0.0(eslint@9.25.1(jiti@2.4.2)): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.1(jiti@2.4.2)) - '@eslint/plugin-kit': 0.2.7 + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) + '@eslint/plugin-kit': 0.2.8 ci-info: 4.2.0 clean-regexp: 1.0.0 core-js-compat: 3.41.0 eslint: 9.25.1(jiti@2.4.2) esquery: 1.6.0 + find-up-simple: 1.0.1 globals: 16.0.0 indent-string: 5.0.0 is-builtin-module: 5.0.0 jsesc: 3.1.0 pluralize: 8.0.0 - read-package-up: 11.0.0 regexp-tree: 0.1.27 regjsparser: 0.12.0 semver: 7.7.1 @@ -10377,10 +10312,6 @@ snapshots: hookable@5.5.3: {} - hosted-git-info@7.0.2: - dependencies: - lru-cache: 10.4.3 - html-encoding-sniffer@4.0.0: dependencies: whatwg-encoding: 3.1.1 @@ -10525,8 +10456,6 @@ snapshots: indent-string@5.0.0: {} - index-to-position@1.0.0: {} - inflight@1.0.6: dependencies: once: 1.4.0 @@ -11366,12 +11295,6 @@ snapshots: dependencies: abbrev: 3.0.0 - normalize-package-data@6.0.2: - dependencies: - hosted-git-info: 7.0.2 - semver: 7.7.1 - validate-npm-package-license: 3.0.4 - normalize-url@8.0.1: {} notion-to-md@3.1.8: @@ -11578,12 +11501,6 @@ snapshots: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 - parse-json@8.2.0: - dependencies: - '@babel/code-frame': 7.26.2 - index-to-position: 1.0.0 - type-fest: 4.38.0 - parse-srcset@1.0.2: {} parse5-htmlparser2-tree-adapter@7.1.0: @@ -11894,20 +11811,6 @@ snapshots: re2js@1.1.0: {} - read-package-up@11.0.0: - dependencies: - find-up-simple: 1.0.1 - read-pkg: 9.0.1 - type-fest: 4.38.0 - - read-pkg@9.0.1: - dependencies: - '@types/normalize-package-data': 2.4.4 - normalize-package-data: 6.0.2 - parse-json: 8.2.0 - type-fest: 4.38.0 - unicorn-magic: 0.1.0 - readable-stream@3.6.2: dependencies: inherits: 2.0.4 @@ -12243,20 +12146,6 @@ snapshots: source-map@0.7.4: {} - spdx-correct@3.2.0: - dependencies: - spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.21 - - spdx-exceptions@2.5.0: {} - - spdx-expression-parse@3.0.1: - dependencies: - spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.21 - - spdx-license-ids@3.0.21: {} - split-on-first@1.1.0: {} split-on-first@3.0.0: {} @@ -12672,8 +12561,6 @@ snapshots: unicode-property-aliases-ecmascript@2.1.0: {} - unicorn-magic@0.1.0: {} - unified@11.0.5: dependencies: '@types/unist': 3.0.3 @@ -12742,11 +12629,6 @@ snapshots: valid-url@1.0.9: {} - validate-npm-package-license@3.0.4: - dependencies: - spdx-correct: 3.2.0 - spdx-expression-parse: 3.0.1 - verror@1.10.0: dependencies: assert-plus: 1.0.0 From 794021a67ebe9bc0d0293a67f9278ff0917fcd0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 22:11:50 +0800 Subject: [PATCH 0505/2658] chore(deps-dev): bump tsdown from 0.9.6 to 0.10.0 (#18958) Bumps [tsdown](https://github.com/rolldown/tsdown) from 0.9.6 to 0.10.0. - [Release notes](https://github.com/rolldown/tsdown/releases) - [Commits](https://github.com/rolldown/tsdown/compare/v0.9.6...v0.10.0) --- updated-dependencies: - dependency-name: tsdown dependency-version: 0.10.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 552 ++++++++++++++++++++++++++----------------------- 2 files changed, 298 insertions(+), 256 deletions(-) diff --git a/package.json b/package.json index 02bddd8b9464..757b4fbc2b25 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "prettier": "3.5.3", "remark-parse": "11.0.0", "supertest": "7.1.0", - "tsdown": "0.9.6", + "tsdown": "0.10.0", "typescript": "5.8.3", "unified": "11.0.5", "vite-tsconfig-paths": "5.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 018d6592421f..1dca3139b9ed 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -374,7 +374,7 @@ importers: version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3))) + version: 2.1.9(vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3))) discord-api-types: specifier: 0.38.1 version: 0.38.1 @@ -439,8 +439,8 @@ importers: specifier: 7.1.0 version: 7.1.0 tsdown: - specifier: 0.9.6 - version: 0.9.6(typescript@5.8.3) + specifier: 0.10.0 + version: 0.10.0(typescript@5.8.3) typescript: specifier: 5.8.3 version: 5.8.3 @@ -449,10 +449,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.3)) + version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.3)(lightningcss@1.29.3)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) + version: 2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -1865,130 +1865,71 @@ packages: '@otplib/preset-v11@12.0.1': resolution: {integrity: sha512-9hSetMI7ECqbFiKICrNa4w70deTUfArtwXykPUvSHWOdzOlfa9ajglu7mNCntlvxycTiOAXkQGwjQCzzDEMRMg==} - '@oxc-parser/binding-darwin-arm64@0.66.0': - resolution: {integrity: sha512-vu0/j+qQTIguTGxSF7PLnB+2DR8w1GLX4JMk9dlndS2AobkzNuZYAaIfh9XuXKi1Y5SFnWdmCE8bvaqldDYdJg==} - engines: {node: '>=14.0.0'} - cpu: [arm64] - os: [darwin] - - '@oxc-parser/binding-darwin-x64@0.66.0': - resolution: {integrity: sha512-zjStITzysMHDvBmznt4DpxzYQP4p6cBAkKUNqnYCP48uGuTcj5OxGzUayHaVAmeMGa0QovOJNOSZstJtX0OHWw==} - engines: {node: '>=14.0.0'} - cpu: [x64] - os: [darwin] - - '@oxc-parser/binding-linux-arm-gnueabihf@0.66.0': - resolution: {integrity: sha512-6H5CLALgpGX2q5X7iA9xYrSO+zgKH9bszCa4Yb8atyEOLglTebBjhqKY+aeSLJih+Yta7Nfe/nrjmGT1coQyJQ==} - engines: {node: '>=14.0.0'} - cpu: [arm] - os: [linux] - - '@oxc-parser/binding-linux-arm64-gnu@0.66.0': - resolution: {integrity: sha512-uf6q2fOCVZKdw9OYoPQSYt1DMHKXSYV/ESHRaew8knTti5b8k5x9ulCDKVmS3nNEBw78t5gaWHpJJhBIkOy/vQ==} - engines: {node: '>=14.0.0'} - cpu: [arm64] - os: [linux] - - '@oxc-parser/binding-linux-arm64-musl@0.66.0': - resolution: {integrity: sha512-qpExxhkSyel+7ptl5ZMhKY0Pba0ida7QvyqDmn1UemDXkT5/Zehfv02VCd3Qy+xWSZt5LXWqSypA1UWmTnrgZQ==} - engines: {node: '>=14.0.0'} - cpu: [arm64] - os: [linux] - - '@oxc-parser/binding-linux-x64-gnu@0.66.0': - resolution: {integrity: sha512-ltiZA35r80I+dicRswuwBzggJ4wOcx/Nyh/2tNgiZZ1Ds21zu96De5yWspfvh4VLioJJtHkYLfdHyjuWadZdlQ==} - engines: {node: '>=14.0.0'} - cpu: [x64] - os: [linux] - - '@oxc-parser/binding-linux-x64-musl@0.66.0': - resolution: {integrity: sha512-LeQYFU/BDZIFutjBPh6VE6Q0ldXF58/Z8W8+h7ihRPRs+BBzwZq8GeLeILK+lUe/hqGAdfGJWKjsRAzsGW1zMA==} - engines: {node: '>=14.0.0'} - cpu: [x64] - os: [linux] - - '@oxc-parser/binding-wasm32-wasi@0.66.0': - resolution: {integrity: sha512-4N9C5Ml79IiKCLnTzG/lppTbsXWyo4pEuH5zOMctS6K6KZF/k9XSukY1IEeMiblpqrnUHmVmsm1l3SuPP/50Bw==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - - '@oxc-parser/binding-win32-arm64-msvc@0.66.0': - resolution: {integrity: sha512-v3B+wUB4s+JlxSUj7tAFF1qOcl8wXY2/m5KQfzU5noqjZ03JdmC4A/CPaHbQkudlQFBrRq1IAAarNGnYfV7DXw==} - engines: {node: '>=14.0.0'} - cpu: [arm64] - os: [win32] - - '@oxc-parser/binding-win32-x64-msvc@0.66.0': - resolution: {integrity: sha512-J8HaFgP17qNyCLMnnqzGeI4NYZDcXDEECj6tMaJTafPJc+ooPF0vkEJhp6TrTOkg09rvf2EKVOkLO2C3OMLKrA==} - engines: {node: '>=14.0.0'} - cpu: [x64] - os: [win32] - '@oxc-project/types@0.66.0': resolution: {integrity: sha512-KF5Wlo2KzQ+jmuCtrGISZoUfdHom7qHavNfPLW2KkeYJfYMGwtiia8KjwtsvNJ49qRiXImOCkPeVPd4bMlbR7w==} - '@oxc-resolver/binding-darwin-arm64@6.0.0': - resolution: {integrity: sha512-GKsfwUPgo4CjJioksA+DVEILT0aWhrbTBKHTiEvkTNC+bsafttSm0xqrIutCQqfqwuSa+Uj0VHylmL3Vv0F/7g==} + '@oxc-resolver/binding-darwin-arm64@6.0.2': + resolution: {integrity: sha512-86IUnBOHrCQknSOGseG5vzzHCaPyPQK4VH4QGFo/Hcd7XloSwTj2oI2ia6+2/9wFNg5ysb9y6/IO+c4XJGGBew==} cpu: [arm64] os: [darwin] - '@oxc-resolver/binding-darwin-x64@6.0.0': - resolution: {integrity: sha512-hwKfm4aT4SLuTkdF2NDYqYEnE9+m4emXLfFZ7D1mTIRul8If/fJop4I4YuIDrJfHVLQmSkpbPbI16XrNK3TftA==} + '@oxc-resolver/binding-darwin-x64@6.0.2': + resolution: {integrity: sha512-KHKUg2Tyz3W1Dugp1mDkUXv0P3+0jyiFHxBER/R/DxKh39XkOk2meTZ3dIc0ysM/0rEFW7H0rmIh5eGyv+0l5w==} cpu: [x64] os: [darwin] - '@oxc-resolver/binding-freebsd-x64@6.0.0': - resolution: {integrity: sha512-ZxFpS90awfLxWW0JqWFWO71p73SGWKhuocOMNQV30MtKZx5fX4lemnNl92Lr6Hvqg4egeSsPO5SGZbnMD5YShw==} + '@oxc-resolver/binding-freebsd-x64@6.0.2': + resolution: {integrity: sha512-Sz2GF9ndHcnWbLq+uGeryJSh06NKqZHnPtwxugOQyeG9gkEDKc+UxG4ngWyxeBO0ZcGoeCQgYnngm1LFgjVLXA==} cpu: [x64] os: [freebsd] - '@oxc-resolver/binding-linux-arm-gnueabihf@6.0.0': - resolution: {integrity: sha512-ztc09+LDBxbAfndqTSvzz4KqN2fRRDCjj1eDRBGZMF5zQu/ThasERwh1ZzRp3sGZGRroZLQRCJunstS5OJKpww==} + '@oxc-resolver/binding-linux-arm-gnueabihf@6.0.2': + resolution: {integrity: sha512-Gq8Jbxru9HS6gv8g7FU6ednkHzH+9yTle5xJyNxuMUYFXkrUuvYBzS1Fysf6BUxlbLwMhVBMBZILhO+HYabdbg==} cpu: [arm] os: [linux] - '@oxc-resolver/binding-linux-arm64-gnu@6.0.0': - resolution: {integrity: sha512-+x1xrEm2G/aOlTMzH3p53ayEEOCTFh4+H5EazdA1ljJP8m/ztrhtZGAo95dclYrCsRNP6KuVmIpw0Y4/RZT7EQ==} + '@oxc-resolver/binding-linux-arm64-gnu@6.0.2': + resolution: {integrity: sha512-5YAv/XmkiZVAnSMIQ+y+0mq43yuJsGwmqOtj3feYPykBeHl3nu0Jje1Ql9pRWmTp9hJr21Ln/tVl1ee4bazlAg==} cpu: [arm64] os: [linux] - '@oxc-resolver/binding-linux-arm64-musl@6.0.0': - resolution: {integrity: sha512-jgo0lz1569+yGpcZCjh0/wzgbvekTAaOB5JaOOWtgh7jvuVDIo6+m884Pf9V5U3Z2VLZts4J+e8hA1urA9Y1lg==} + '@oxc-resolver/binding-linux-arm64-musl@6.0.2': + resolution: {integrity: sha512-zei0sV43KJCODjEyHG2XTeMTyg7Dz+Or3847XIOnq1g+UdcS4WKe2ilLgOmGWO1xE1YImU9cPr9lfSCnGbnbEg==} cpu: [arm64] os: [linux] - '@oxc-resolver/binding-linux-riscv64-gnu@6.0.0': - resolution: {integrity: sha512-uEhw/2oSnBp5PNv6sBev1koH4thSy1eH8LA6N3gAklrznqhFNqqvmXjlKZm9ek3bVFG44Hlx9BS5/tT0hXPbqA==} + '@oxc-resolver/binding-linux-riscv64-gnu@6.0.2': + resolution: {integrity: sha512-z/uHEcgx4AZBq19JLHBNrGSNpKdnQg7GxNEJdKwLNnEDXk6jyV4+aPFACtPGS93aCuSRmwFuGyA5MzKgPcxf3g==} cpu: [riscv64] os: [linux] - '@oxc-resolver/binding-linux-s390x-gnu@6.0.0': - resolution: {integrity: sha512-QR8d1f58XyTlkbATYxo2XhqyBNVT/Ma+z5dDvmjyYMa2S9u5yHKOch10I9fx/kLjRqfHzpl2H32NwwBnkaTzzg==} + '@oxc-resolver/binding-linux-s390x-gnu@6.0.2': + resolution: {integrity: sha512-2qIGQcjYwose7G+sW9NCLNXhGocnsBP5sQzghrUV6BkoNR4i77B4YHyCZA7DgPzbJAC9SJivfZOD35flaqF1Vg==} cpu: [s390x] os: [linux] - '@oxc-resolver/binding-linux-x64-gnu@6.0.0': - resolution: {integrity: sha512-CBp1yw8/jBhMuJnye1DJNUx1Rvpw4Zur4QqtjXXa+0kzTXr4qSsEsrdZj2p4USBQX/ComtK4UVPX4FqDj6VR0Q==} + '@oxc-resolver/binding-linux-x64-gnu@6.0.2': + resolution: {integrity: sha512-c0VSjaGXa//deVhBGx2bd4dgAv3ietmPKQOuLyV0x7qsBJnGtytRLytljdLicBkPVUSBj5nvgLYJvUyXwoeYJw==} cpu: [x64] os: [linux] - '@oxc-resolver/binding-linux-x64-musl@6.0.0': - resolution: {integrity: sha512-FM3bdl0ZfjGnHsFLUSPny9H8nsFXYXEVaD5juOnBW+RIcxN6tS9atzmki5ZmeTqgyDLZ68pM//b/UlI4V0GGvA==} + '@oxc-resolver/binding-linux-x64-musl@6.0.2': + resolution: {integrity: sha512-j6qVZY0WMFcgPlT0iROlbowahY+XcX6sTcoSp7UubiXWo0QHwO8SgJuqe4bX25cH7NOiYvEHj+shALY73ad0Uw==} cpu: [x64] os: [linux] - '@oxc-resolver/binding-wasm32-wasi@6.0.0': - resolution: {integrity: sha512-FLk/ip9wCbbeqBJAXCGmmZCMDNa9wT/Kbw1m5xWcMYy88Z65/zuAQs7Gg/okm77X/DE1ZJ766bnC3Cmz6SmWaA==} + '@oxc-resolver/binding-wasm32-wasi@6.0.2': + resolution: {integrity: sha512-ptlIqfqyBzPEnvP7moGQzYOKRmqbyNyRg+Q2sqU/sqfC4hAkceBQFuzCYwWSb1zOu2Z7rvhx/8ducR6c4+2qtw==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@oxc-resolver/binding-win32-arm64-msvc@6.0.0': - resolution: {integrity: sha512-WEF2dSpwF5MEN1Zt/+dCCWpWXxsZTPPZPJXARV/1SP0ul9N0oijYyWO+8WYE0qREU8B0Toh/YGkA/wLSui3eRg==} + '@oxc-resolver/binding-win32-arm64-msvc@6.0.2': + resolution: {integrity: sha512-w53d0B4PqbpWejFroeTCMwsE+E2k0KxzwTo2OReKdP0zU0pSTkvi/S3EGsUDLfVyQzGSgtIs12AsSLtJDmUMvg==} cpu: [arm64] os: [win32] - '@oxc-resolver/binding-win32-x64-msvc@6.0.0': - resolution: {integrity: sha512-eTn8RUr6D2C+BGPG0ECtsqvUo8B+HvkhTkBG0Jel/7DqU+WCTNOT64+Ww9ZUhQxPJKa4laR9Zyu5yo/SaF6qPQ==} + '@oxc-resolver/binding-win32-x64-msvc@6.0.2': + resolution: {integrity: sha512-VCsWMFEmJJqkasuZC7TngxensVGZ0cDX5xqYigs7SCzM0kNH1Um+Ke+O3U1raHzwUiIdJzevpZCwmaFjE3TItg==} cpu: [x64] os: [win32] @@ -2127,63 +2068,63 @@ packages: resolution: {integrity: sha512-ezIadUb1aFhwJLd++WVqVpi9rnlX8vnd4ju7saPhwLHJN1mJgOv0puePTGV+FbtSnWtwoHDT8lAm4kagDZmpCg==} engines: {node: '>=20.0.0'} - '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-2GCVymE4qe30/ox/w+3aOOTCsvphbXCW41BxATiYJQzNPXQ7NY3RMTfvuDKUQW5KJSr3rKSj0zxPbjFJYCfGWw==} + '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-2F4bhDtV6CHBx7JMiT9xvmxkcZLHFmonfbli36RyfvgThDOAu92bis28zDTdguDY85lN/jBRKX/eOvX+T5hMkg==} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-iiCq6rUyx+BjwAp5keIJnJiaGC8W+rfp6YgtsEjJUTqv+s9+UQxhXyw7qwnp1YkahTKiuyUUSM+CVcecbcrXlw==} + '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-8VMChhFLeD/oOAQUspFtxZaV7ctDob63w626kwvBBIHtlpY2Ohw4rsfjjtGckyrTCI/RROgZv/TVVEsG3GkgLw==} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-8qkE8ANkELvEiE26Jpdlh7QRw7uOaqLOnbAPAJ9NySo6+VwAWILefQgo+pamXTEsHpAZqSo7DapFWjUtZdkUDg==} + '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-4W28EgaIidbWIpwB3hESMBfiOSs7LBFpJGa8JIV488qLEnTR/pqzxDEoOPobhRSJ1lJlv0vUgA8+DKBIldo2gw==} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-QCBw+96ZABHtJU3MBbl5DnD18/I+Lg06/MegyCHPI1j0VnqdmK8lDIPuaBzrj52USLYBoABC9HhuXMbIN0OfPA==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-1ECtyzIKlAHikR7BhS4hk7Hxw8xCH6W3S+Sb74EM0vy5AqPvWSbgLfAwagYC7gNDcMMby3I757X7qih5fIrGiw==} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-bjGStzNXe1hD6vP6g2/T134RU85Mev+o+XEIB8kJT3Z9tq09SqDhN3ONqzUaeF7QQawv2M8XXDUOIdPhsrgmvg==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-wU1kp8qPRUKC8N82dNs3F5+UyKRww9TUEO5dQ5mxCb0cG+y4l5rVaXpMgvL0VuQahPVvTMs577QPhJGb4iDONw==} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-ZpN8ub+PiDBYjTMcXt3ihoPKpXikAYPfpJXdx1x0IjJmFqlLsSWxU6aqbkHBxALER7SxwQ4e9r5LPZKJnwBr7Q==} + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-odDjO2UtEEMAzwmLHEOKylJjQa+em1REAO9H19PA+O+lPu6evVbre5bqu8qCjEtHG1Q034LpZR86imCP2arb/w==} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-ysVj17eqf0amHpF9pKOv5JWsW2F89oVql88PD4ldamhBUZq8unZdPqr8fogx+08TmURDtu9ygZlBvSB55VdzJQ==} + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-Ty2T67t2Oj1lg417ATRENxdk8Jkkksc/YQdCJyvkGqteHe60pSU2GGP/tLWGB+I0Ox+u387bzU/SmfmrHZk9aw==} cpu: [x64] os: [linux] - '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-Yob3aIWUdXaCW1aKA0Ypo2ie8p+3uvOSobR9WTabx+aS7NPJuQbjAJP6n3CZHRPoKnJBCeftt3Bh8bFk1SKCMQ==} + '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-Fm1TxyeVE+gy74HM26CwbEOUndIoWAMgWkVDxYBD64tayvp5JvltpGHaqCg6x5i+X2F5XCDCItqwVlC7/mTxIw==} cpu: [x64] os: [linux] - '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-/tGqIUvsjTMe5h8DAR5XM++IsAMNmxgD2vFN+OzwE3bNAS3qk3w7rq6JyD+hBWwz+6QLgYVCTD7fNDXAYZKgWw==} + '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-AEZzTyGerfkffXmtv7kFJbHWkryNeolk0Br+yhH1wZyN6Tt6aebqICDL8KNRO2iExoEWzyYS6dPxh0QmvNTfUQ==} engines: {node: '>=14.21.3'} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-uIuzY9dNeSLhAL4YW7YDYQ0wlSIDU7fzkhGYsfcH37ItSpOdxisxJLu4tLbl8i0AarLJvfH1+MgMSSGC2ioAtQ==} + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-0lskDFKQwf5PMjl17qHAroU6oVU0Zn8NbAH/PdM9QB1emOzyFDGa20d4kESGeo3Uq7xOKXcTORJV/JwKIBORqw==} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-tadc/hpAWQ6TPaF7U1AX6h/BYDm0Ukxg6o4647IfDREvncyf4RaNo99ByBSfoOYxqwlA2nu4llXkXx0rhWCfsQ==} + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-DfG1S0zGKnUfr95cNCmR4YPiZ/moS7Tob5eV+9r5JGeHZVWFHWwvJdR0jArj6Ty0LbBFDTVVB3iAvqRSji+l0Q==} cpu: [ia32] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.2686eb1': - resolution: {integrity: sha512-8nMcDSZpCR2KuKCkgeA9/Em967VhB1jZys8W0j95tcKMyNva/Bnq9wxNH5CAMtL3AzV/QIT92RrHTWbIt0m1MA==} + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.151352b': + resolution: {integrity: sha512-5HZEtc8U2I1O903hXBynWtWaf+qzAFj66h5B7gOtVcvqIk+lKRVSupA85OdIvR7emrsYU25ikpfiU5Jhg9kTbQ==} cpu: [x64] os: [win32] @@ -2774,6 +2715,10 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} + ast-kit@1.4.3: + resolution: {integrity: sha512-MdJqjpodkS5J149zN0Po+HPshkTdUyrvF7CKTafUgv69vBSPtncrj+3IiUgqdd7ElIEkbeXCsEouBUwLrw9Ilg==} + engines: {node: '>=16.14.0'} + ast-types@0.13.4: resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} engines: {node: '>=4'} @@ -3317,6 +3262,10 @@ packages: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} + detect-libc@2.0.4: + resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==} + engines: {node: '>=8'} + devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} @@ -3424,6 +3373,10 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + empathic@1.0.0: + resolution: {integrity: sha512-qtKgI1Mv8rTacvpaTkh28HM2Lbf+IOjXb7rhpt/42kZxRm8TBb/IVlo5iL2ztT19kc/EHAFN0fZ641avlXAgdg==} + engines: {node: '>=16'} + enabled@2.0.0: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} @@ -4472,6 +4425,70 @@ packages: libqp@2.1.1: resolution: {integrity: sha512-0Wd+GPz1O134cP62YU2GTOPNA7Qgl09XwCqM5zpBv87ERCXdfDtyKXvV7c9U22yWJh44QZqBocFnXN11K96qow==} + lightningcss-darwin-arm64@1.29.3: + resolution: {integrity: sha512-fb7raKO3pXtlNbQbiMeEu8RbBVHnpyqAoxTyTRMEWFQWmscGC2wZxoHzZ+YKAepUuKT9uIW5vL2QbFivTgprZg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.29.3: + resolution: {integrity: sha512-KF2XZ4ZdmDGGtEYmx5wpzn6u8vg7AdBHaEOvDKu8GOs7xDL/vcU2vMKtTeNe1d4dogkDdi3B9zC77jkatWBwEQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.29.3: + resolution: {integrity: sha512-VUWeVf+V1UM54jv9M4wen9vMlIAyT69Krl9XjI8SsRxz4tdNV/7QEPlW6JASev/pYdiynUCW0pwaFquDRYdxMw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.29.3: + resolution: {integrity: sha512-UhgZ/XVNfXQVEJrMIWeK1Laj8KbhjbIz7F4znUk7G4zeGw7TRoJxhb66uWrEsonn1+O45w//0i0Fu0wIovYdYg==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.29.3: + resolution: {integrity: sha512-Pqau7jtgJNmQ/esugfmAT1aCFy/Gxc92FOxI+3n+LbMHBheBnk41xHDhc0HeYlx9G0xP5tK4t0Koy3QGGNqypw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.29.3: + resolution: {integrity: sha512-dxakOk66pf7KLS7VRYFO7B8WOJLecE5OPL2YOk52eriFd/yeyxt2Km5H0BjLfElokIaR+qWi33gB8MQLrdAY3A==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.29.3: + resolution: {integrity: sha512-ySZTNCpbfbK8rqpKJeJR2S0g/8UqqV3QnzcuWvpI60LWxnFN91nxpSSwCbzfOXkzKfar9j5eOuOplf+klKtINg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.29.3: + resolution: {integrity: sha512-3pVZhIzW09nzi10usAXfIGTTSTYQ141dk88vGFNCgawIzayiIzZQxEcxVtIkdvlEq2YuFsL9Wcj/h61JHHzuFQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.29.3: + resolution: {integrity: sha512-VRnkAvtIkeWuoBJeGOTrZxsNp4HogXtcaaLm8agmbYtLDOhQdpgxW6NjZZjDXbvGF+eOehGulXZ3C1TiwHY4QQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.29.3: + resolution: {integrity: sha512-IszwRPu2cPnDQsZpd7/EAr0x2W7jkaWqQ1SwCVIZ/tSbZVXPLt6k8s6FkcyBjViCzvB5CW0We0QbbP7zp2aBjQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.29.3: + resolution: {integrity: sha512-GlOJwTIP6TMIlrTFsxTerwC0W6OpQpCGuX1ECRLBUVRh6fpJH3xTqjCjRgQHTb4ZXexH9rtHou1Lf03GKzmhhQ==} + engines: {node: '>= 12.0.0'} + lilconfig@3.1.3: resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} @@ -4591,10 +4608,6 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true - magic-string-ast@0.9.1: - resolution: {integrity: sha512-18dv2ZlSSgJ/jDWlZGKfnDJx56ilNlYq9F7NnwuWTErsmYmqJ2TWE4l1o2zlUHBYUGBy3tIhPCC1gxq8M5HkMA==} - engines: {node: '>=20.18.0'} - magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} @@ -4997,12 +5010,8 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} - oxc-parser@0.66.0: - resolution: {integrity: sha512-uNkhp3ZueIqwU/Hm1ccDl/ZuAKAEhVlEj3W9sC6aD66ArxjO0xA6RZ9w85XJ2rugAt4g6R4tWeGvpJOSG3jfKg==} - engines: {node: '>=14.0.0'} - - oxc-resolver@6.0.0: - resolution: {integrity: sha512-XbjFKJrpQiVl4XlJE44ly+fNdV5+adm8b/Ax9EIGYpA160PVgYVRUfmdYD1SHOO8z1oZ+CFNZ4/A3EUrNP+/cA==} + oxc-resolver@6.0.2: + resolution: {integrity: sha512-iO4XRuD6GzQpxGCIiW9bjVpIUPVETeH7vnhB0xQpXEq0mal67K3vrTlyB64imPCNV9iwpIjJM5W++ZlgCXII6A==} oxc-transform@0.66.0: resolution: {integrity: sha512-vfs0oVJAAgX8GrZ5jO1sQp29c4HYSZ4MTtievyqawSeNpqF0yj69tpAwpDZ+MxYt3dqZ8lrGh9Ji80YlG0hpoA==} @@ -5492,8 +5501,8 @@ packages: resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} hasBin: true - rolldown-plugin-dts@0.8.5: - resolution: {integrity: sha512-iiLaGvRyNoiY+Htjou0fvZPwTkGO1Tmj95KQGLWXPEDLXx+iFaxaezPloFYc+10opZ7OkTQkbqqCVO8spJXbIg==} + rolldown-plugin-dts@0.9.5: + resolution: {integrity: sha512-p1iJ7v9Rq78xZ3isZrTdtp1PBPsSFO5w5lATicgujmeyo4VjeKqkUmz/eZdDXXTaYQTlg70b0iy6fT8T/9sGEQ==} engines: {node: '>=20.18.0'} peerDependencies: rolldown: ^1.0.0-beta.7 @@ -5502,8 +5511,8 @@ packages: typescript: optional: true - rolldown@1.0.0-beta.8-commit.2686eb1: - resolution: {integrity: sha512-NIo+n0m7ZVC6VXQ4l2zNYJOQ84lEthihbByZBBHzmyyhH/605jL43n2qFTPNy6W3stDnTCyp8/YYDlw39+fXlA==} + rolldown@1.0.0-beta.8-commit.151352b: + resolution: {integrity: sha512-TCb6GVaFBk4wB0LERofFDxTO5X1/Sgahr7Yn5UA9XjuFtCwL1CyEhUHX5lUIstcMxjbkLjn2z4TAGwisr6Blvw==} hasBin: true peerDependencies: '@oxc-project/runtime': 0.66.0 @@ -5954,8 +5963,8 @@ packages: typescript: optional: true - tsdown@0.9.6: - resolution: {integrity: sha512-0dGDk1H8REDWWF5PAFS/bIVw/C4LeiJxljLKI0pVRY2e1vx9nUVVhm6WQRRosWLqruAmi7UdoCTQPqvlX0fbnA==} + tsdown@0.10.0: + resolution: {integrity: sha512-xz995k/78OrbU3hXpADxe/mCXAXBwOJ5lbb4t+C0K11IHfzlW5jHZdO/qvW8N82QR1DZKUk5V0oeu0gTcGLxjQ==} engines: {node: '>=18.0.0'} hasBin: true peerDependencies: @@ -6083,6 +6092,14 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} + unplugin-lightningcss@0.3.3: + resolution: {integrity: sha512-mMNRCNIcxc/3410w7sJdXcPxn0IGZdEpq42OBDyckdGkhOeWYZCG9RkHs72TFyBsS82a4agFDOFU8VrFKF2ZvA==} + engines: {node: '>=18.12.0'} + + unplugin@2.3.2: + resolution: {integrity: sha512-3n7YA46rROb3zSj8fFxtxC/PqoyvYQ0llwz9wtUPUutr9ig09C8gGo5CWCwHrUzlqC1LLR43kxp5vEIyH1ac1w==} + engines: {node: '>=18.12.0'} + update-browserslist-db@1.1.3: resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} hasBin: true @@ -6248,6 +6265,9 @@ packages: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + websocket@1.0.35: resolution: {integrity: sha512-/REy6amwPZl44DDzvRCkaI1q1bIiQB0mEFQLUrhz3z2EK91cp3n72rAjUlrTP0zV22HJIUOVHQGPxhFRjxjt+Q==} engines: {node: '>=4.0.0'} @@ -7980,79 +8000,47 @@ snapshots: '@otplib/plugin-crypto': 12.0.1 '@otplib/plugin-thirty-two': 12.0.1 - '@oxc-parser/binding-darwin-arm64@0.66.0': - optional: true - - '@oxc-parser/binding-darwin-x64@0.66.0': - optional: true - - '@oxc-parser/binding-linux-arm-gnueabihf@0.66.0': - optional: true - - '@oxc-parser/binding-linux-arm64-gnu@0.66.0': - optional: true - - '@oxc-parser/binding-linux-arm64-musl@0.66.0': - optional: true - - '@oxc-parser/binding-linux-x64-gnu@0.66.0': - optional: true - - '@oxc-parser/binding-linux-x64-musl@0.66.0': - optional: true - - '@oxc-parser/binding-wasm32-wasi@0.66.0': - dependencies: - '@napi-rs/wasm-runtime': 0.2.9 - optional: true - - '@oxc-parser/binding-win32-arm64-msvc@0.66.0': - optional: true - - '@oxc-parser/binding-win32-x64-msvc@0.66.0': - optional: true - '@oxc-project/types@0.66.0': {} - '@oxc-resolver/binding-darwin-arm64@6.0.0': + '@oxc-resolver/binding-darwin-arm64@6.0.2': optional: true - '@oxc-resolver/binding-darwin-x64@6.0.0': + '@oxc-resolver/binding-darwin-x64@6.0.2': optional: true - '@oxc-resolver/binding-freebsd-x64@6.0.0': + '@oxc-resolver/binding-freebsd-x64@6.0.2': optional: true - '@oxc-resolver/binding-linux-arm-gnueabihf@6.0.0': + '@oxc-resolver/binding-linux-arm-gnueabihf@6.0.2': optional: true - '@oxc-resolver/binding-linux-arm64-gnu@6.0.0': + '@oxc-resolver/binding-linux-arm64-gnu@6.0.2': optional: true - '@oxc-resolver/binding-linux-arm64-musl@6.0.0': + '@oxc-resolver/binding-linux-arm64-musl@6.0.2': optional: true - '@oxc-resolver/binding-linux-riscv64-gnu@6.0.0': + '@oxc-resolver/binding-linux-riscv64-gnu@6.0.2': optional: true - '@oxc-resolver/binding-linux-s390x-gnu@6.0.0': + '@oxc-resolver/binding-linux-s390x-gnu@6.0.2': optional: true - '@oxc-resolver/binding-linux-x64-gnu@6.0.0': + '@oxc-resolver/binding-linux-x64-gnu@6.0.2': optional: true - '@oxc-resolver/binding-linux-x64-musl@6.0.0': + '@oxc-resolver/binding-linux-x64-musl@6.0.2': optional: true - '@oxc-resolver/binding-wasm32-wasi@6.0.0': + '@oxc-resolver/binding-wasm32-wasi@6.0.2': dependencies: '@napi-rs/wasm-runtime': 0.2.9 optional: true - '@oxc-resolver/binding-win32-arm64-msvc@6.0.0': + '@oxc-resolver/binding-win32-arm64-msvc@6.0.2': optional: true - '@oxc-resolver/binding-win32-x64-msvc@6.0.0': + '@oxc-resolver/binding-win32-x64-msvc@6.0.2': optional: true '@oxc-transform/binding-darwin-arm64@0.66.0': @@ -8183,42 +8171,42 @@ snapshots: dependencies: quansync: 0.2.10 - '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.151352b': optional: true - '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.151352b': optional: true - '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.151352b': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.151352b': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.151352b': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.151352b': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.151352b': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.151352b': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.151352b': dependencies: '@napi-rs/wasm-runtime': 0.2.9 optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.151352b': optional: true - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.151352b': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.2686eb1': + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.151352b': optional: true '@rollup/pluginutils@5.1.4(rollup@4.37.0)': @@ -8730,7 +8718,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8744,7 +8732,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)) + vitest: 2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) transitivePeerDependencies: - supports-color @@ -8755,14 +8743,14 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.3))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.3)(lightningcss@1.29.3))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.3(typescript@5.8.3) - vite: 5.4.15(@types/node@22.15.3) + vite: 5.4.15(@types/node@22.15.3)(lightningcss@1.29.3) '@vitest/pretty-format@2.1.9': dependencies: @@ -8873,6 +8861,11 @@ snapshots: assertion-error@2.0.1: {} + ast-kit@1.4.3: + dependencies: + '@babel/parser': 7.27.0 + pathe: 2.0.3 + ast-types@0.13.4: dependencies: tslib: 2.8.1 @@ -9417,6 +9410,8 @@ snapshots: detect-libc@2.0.3: {} + detect-libc@2.0.4: {} + devlop@1.1.0: dependencies: dequal: 2.0.3 @@ -9503,7 +9498,7 @@ snapshots: dts-resolver@1.0.1: dependencies: - oxc-resolver: 6.0.0 + oxc-resolver: 6.0.2 pathe: 2.0.3 eastasianwidth@0.2.0: {} @@ -9534,6 +9529,8 @@ snapshots: emoji-regex@9.2.2: {} + empathic@1.0.0: {} + enabled@2.0.0: {} encoding-japanese@2.2.0: {} @@ -10798,6 +10795,51 @@ snapshots: libqp@2.1.1: {} + lightningcss-darwin-arm64@1.29.3: + optional: true + + lightningcss-darwin-x64@1.29.3: + optional: true + + lightningcss-freebsd-x64@1.29.3: + optional: true + + lightningcss-linux-arm-gnueabihf@1.29.3: + optional: true + + lightningcss-linux-arm64-gnu@1.29.3: + optional: true + + lightningcss-linux-arm64-musl@1.29.3: + optional: true + + lightningcss-linux-x64-gnu@1.29.3: + optional: true + + lightningcss-linux-x64-musl@1.29.3: + optional: true + + lightningcss-win32-arm64-msvc@1.29.3: + optional: true + + lightningcss-win32-x64-msvc@1.29.3: + optional: true + + lightningcss@1.29.3: + dependencies: + detect-libc: 2.0.4 + optionalDependencies: + lightningcss-darwin-arm64: 1.29.3 + lightningcss-darwin-x64: 1.29.3 + lightningcss-freebsd-x64: 1.29.3 + lightningcss-linux-arm-gnueabihf: 1.29.3 + lightningcss-linux-arm64-gnu: 1.29.3 + lightningcss-linux-arm64-musl: 1.29.3 + lightningcss-linux-x64-gnu: 1.29.3 + lightningcss-linux-x64-musl: 1.29.3 + lightningcss-win32-arm64-msvc: 1.29.3 + lightningcss-win32-x64-msvc: 1.29.3 + lilconfig@3.1.3: {} lines-and-columns@1.2.4: {} @@ -10912,10 +10954,6 @@ snapshots: lz-string@1.5.0: {} - magic-string-ast@0.9.1: - dependencies: - magic-string: 0.30.17 - magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -11406,36 +11444,21 @@ snapshots: outvariant@1.4.3: {} - oxc-parser@0.66.0: - dependencies: - '@oxc-project/types': 0.66.0 - optionalDependencies: - '@oxc-parser/binding-darwin-arm64': 0.66.0 - '@oxc-parser/binding-darwin-x64': 0.66.0 - '@oxc-parser/binding-linux-arm-gnueabihf': 0.66.0 - '@oxc-parser/binding-linux-arm64-gnu': 0.66.0 - '@oxc-parser/binding-linux-arm64-musl': 0.66.0 - '@oxc-parser/binding-linux-x64-gnu': 0.66.0 - '@oxc-parser/binding-linux-x64-musl': 0.66.0 - '@oxc-parser/binding-wasm32-wasi': 0.66.0 - '@oxc-parser/binding-win32-arm64-msvc': 0.66.0 - '@oxc-parser/binding-win32-x64-msvc': 0.66.0 - - oxc-resolver@6.0.0: + oxc-resolver@6.0.2: optionalDependencies: - '@oxc-resolver/binding-darwin-arm64': 6.0.0 - '@oxc-resolver/binding-darwin-x64': 6.0.0 - '@oxc-resolver/binding-freebsd-x64': 6.0.0 - '@oxc-resolver/binding-linux-arm-gnueabihf': 6.0.0 - '@oxc-resolver/binding-linux-arm64-gnu': 6.0.0 - '@oxc-resolver/binding-linux-arm64-musl': 6.0.0 - '@oxc-resolver/binding-linux-riscv64-gnu': 6.0.0 - '@oxc-resolver/binding-linux-s390x-gnu': 6.0.0 - '@oxc-resolver/binding-linux-x64-gnu': 6.0.0 - '@oxc-resolver/binding-linux-x64-musl': 6.0.0 - '@oxc-resolver/binding-wasm32-wasi': 6.0.0 - '@oxc-resolver/binding-win32-arm64-msvc': 6.0.0 - '@oxc-resolver/binding-win32-x64-msvc': 6.0.0 + '@oxc-resolver/binding-darwin-arm64': 6.0.2 + '@oxc-resolver/binding-darwin-x64': 6.0.2 + '@oxc-resolver/binding-freebsd-x64': 6.0.2 + '@oxc-resolver/binding-linux-arm-gnueabihf': 6.0.2 + '@oxc-resolver/binding-linux-arm64-gnu': 6.0.2 + '@oxc-resolver/binding-linux-arm64-musl': 6.0.2 + '@oxc-resolver/binding-linux-riscv64-gnu': 6.0.2 + '@oxc-resolver/binding-linux-s390x-gnu': 6.0.2 + '@oxc-resolver/binding-linux-x64-gnu': 6.0.2 + '@oxc-resolver/binding-linux-x64-musl': 6.0.2 + '@oxc-resolver/binding-wasm32-wasi': 6.0.2 + '@oxc-resolver/binding-win32-arm64-msvc': 6.0.2 + '@oxc-resolver/binding-win32-x64-msvc': 6.0.2 oxc-transform@0.66.0: optionalDependencies: @@ -11963,39 +11986,41 @@ snapshots: dependencies: glob: 10.4.5 - rolldown-plugin-dts@0.8.5(rolldown@1.0.0-beta.8-commit.2686eb1(typescript@5.8.3))(typescript@5.8.3): + rolldown-plugin-dts@0.9.5(rolldown@1.0.0-beta.8-commit.151352b(typescript@5.8.3))(typescript@5.8.3): dependencies: + '@babel/generator': 7.27.0 + '@babel/parser': 7.27.0 + '@babel/types': 7.27.0 + ast-kit: 1.4.3 debug: 4.4.0 dts-resolver: 1.0.1 get-tsconfig: 4.10.0 - magic-string-ast: 0.9.1 - oxc-parser: 0.66.0 oxc-transform: 0.66.0 - rolldown: 1.0.0-beta.8-commit.2686eb1(typescript@5.8.3) + rolldown: 1.0.0-beta.8-commit.151352b(typescript@5.8.3) optionalDependencies: typescript: 5.8.3 transitivePeerDependencies: - supports-color - rolldown@1.0.0-beta.8-commit.2686eb1(typescript@5.8.3): + rolldown@1.0.0-beta.8-commit.151352b(typescript@5.8.3): dependencies: '@oxc-project/types': 0.66.0 '@valibot/to-json-schema': 1.0.0(valibot@1.0.0(typescript@5.8.3)) ansis: 3.17.0 valibot: 1.0.0(typescript@5.8.3) optionalDependencies: - '@rolldown/binding-darwin-arm64': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-darwin-x64': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.8-commit.2686eb1 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.8-commit.2686eb1 + '@rolldown/binding-darwin-arm64': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-darwin-x64': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-freebsd-x64': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.8-commit.151352b transitivePeerDependencies: - typescript @@ -12459,7 +12484,7 @@ snapshots: optionalDependencies: typescript: 5.8.3 - tsdown@0.9.6(typescript@5.8.3): + tsdown@0.10.0(typescript@5.8.3): dependencies: ansis: 3.17.0 cac: 6.7.14 @@ -12467,13 +12492,15 @@ snapshots: consola: 3.4.2 debug: 4.4.0 diff: 7.0.0 - find-up-simple: 1.0.1 + empathic: 1.0.0 hookable: 5.5.3 - rolldown: 1.0.0-beta.8-commit.2686eb1(typescript@5.8.3) - rolldown-plugin-dts: 0.8.5(rolldown@1.0.0-beta.8-commit.2686eb1(typescript@5.8.3))(typescript@5.8.3) + lightningcss: 1.29.3 + rolldown: 1.0.0-beta.8-commit.151352b(typescript@5.8.3) + rolldown-plugin-dts: 0.9.5(rolldown@1.0.0-beta.8-commit.151352b(typescript@5.8.3))(typescript@5.8.3) tinyexec: 1.0.1 tinyglobby: 0.2.13 unconfig: 7.3.2 + unplugin-lightningcss: 0.3.3 transitivePeerDependencies: - '@oxc-project/runtime' - supports-color @@ -12579,6 +12606,18 @@ snapshots: universalify@2.0.1: {} + unplugin-lightningcss@0.3.3: + dependencies: + lightningcss: 1.29.3 + magic-string: 0.30.17 + unplugin: 2.3.2 + + unplugin@2.3.2: + dependencies: + acorn: 8.14.1 + picomatch: 4.0.2 + webpack-virtual-modules: 0.6.2 + update-browserslist-db@1.1.3(browserslist@4.24.4): dependencies: browserslist: 4.24.4 @@ -12645,13 +12684,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.9(@types/node@22.15.3): + vite-node@2.1.9(@types/node@22.15.3)(lightningcss@1.29.3): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.15(@types/node@22.15.3) + vite: 5.4.15(@types/node@22.15.3)(lightningcss@1.29.3) transitivePeerDependencies: - '@types/node' - less @@ -12663,18 +12702,18 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.3)): + vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.3)(lightningcss@1.29.3)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.3) optionalDependencies: - vite: 5.4.15(@types/node@22.15.3) + vite: 5.4.15(@types/node@22.15.3)(lightningcss@1.29.3) transitivePeerDependencies: - supports-color - typescript - vite@5.4.15(@types/node@22.15.3): + vite@5.4.15(@types/node@22.15.3)(lightningcss@1.29.3): dependencies: esbuild: 0.21.5 postcss: 8.5.3 @@ -12682,11 +12721,12 @@ snapshots: optionalDependencies: '@types/node': 22.15.3 fsevents: 2.3.3 + lightningcss: 1.29.3 - vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(msw@2.4.3(typescript@5.8.3)): + vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.3)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.3)(lightningcss@1.29.3)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -12702,8 +12742,8 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.15(@types/node@22.15.3) - vite-node: 2.1.9(@types/node@22.15.3) + vite: 5.4.15(@types/node@22.15.3)(lightningcss@1.29.3) + vite-node: 2.1.9(@types/node@22.15.3)(lightningcss@1.29.3) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.15.3 @@ -12731,6 +12771,8 @@ snapshots: webidl-conversions@7.0.0: {} + webpack-virtual-modules@0.6.2: {} + websocket@1.0.35: dependencies: bufferutil: 4.0.9 From 03969f386786d5e43178be56743a7ce16d1ce75f Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 29 Apr 2025 03:00:16 +0800 Subject: [PATCH 0506/2658] refactor: fix lint issue (#18963) * fix: unicorn/no-empty-file * fix: unicorn/prefer-node-protocol * fix: unicorn/prefer-number-properties * fix: unicorn/consistent-destructuring * fix: unicorn/no-array-callback-reference * fix: unicorn/new-for-builtins * fix: set checkNaN to false in unicorn/prefer-number-properties * fix: unicorn/prefer-string-slice * fix: update eslint ignore --- .puppeteerrc.cjs | 2 +- api/vercel.ts | 2 +- eslint.config.mjs | 14 ++++---------- lib/middleware/parameter.ts | 4 ++-- lib/routes/1point3acres/section.ts | 4 ++-- lib/routes/3dmgame/news-center.ts | 2 +- lib/routes/6park/news.ts | 2 +- lib/routes/abc/index.ts | 2 +- lib/routes/ainvest/utils.ts | 6 +++--- lib/routes/bast/index.ts | 2 +- lib/routes/behance/user.ts | 2 +- lib/routes/bilibili/danmaku.ts | 2 +- lib/routes/bilibili/followings-dynamic.ts | 2 +- lib/routes/bilibili/wasm-exec.ts | 6 +++--- lib/routes/bnu/jwb.ts | 2 +- lib/routes/bsky/posts.ts | 2 +- lib/routes/caixin/blog.ts | 2 +- lib/routes/caixin/utils-fulltext.ts | 2 +- lib/routes/cas/genetics/index.ts | 4 ++-- lib/routes/cebbank/all.ts | 6 +++--- lib/routes/cib/whpj.ts | 6 +++--- lib/routes/ciweimao/chapter.ts | 2 +- lib/routes/clickme/index.ts | 2 +- lib/routes/cntv/column.ts | 2 +- lib/routes/comicskingdom/index.ts | 2 +- lib/routes/creative-comic/utils.ts | 4 ++-- lib/routes/csu/utils.ts | 2 +- lib/routes/dnaindia/category.ts | 0 lib/routes/dockerhub/tag.ts | 2 +- lib/routes/douban/people/status.ts | 2 +- lib/routes/douban/people/wish.ts | 2 +- lib/routes/douyin/hashtag.ts | 2 +- lib/routes/douyin/live.ts | 2 +- lib/routes/dw/rss.ts | 4 ++-- lib/routes/fffdm/manhua/manhua.ts | 2 +- lib/routes/fjksbm/index.ts | 2 +- lib/routes/foresightnews/util.ts | 2 +- lib/routes/furstar/utils.ts | 2 +- lib/routes/gameapps/index.ts | 2 +- lib/routes/gamersky/utils.ts | 2 +- lib/routes/gcores/parser.ts | 2 +- lib/routes/github/comments.ts | 4 ++-- lib/routes/github/contributors.ts | 2 +- lib/routes/gov/nea/ghs.ts | 2 +- lib/routes/guancha/member.ts | 2 +- lib/routes/hackernews/index.ts | 4 ++-- lib/routes/hafu/utils.ts | 2 +- lib/routes/hkej/index.ts | 2 +- lib/routes/hkepc/index.ts | 2 +- lib/routes/hket/index.ts | 2 +- lib/routes/idolmaster/news.ts | 2 +- lib/routes/iknowwhatyoudownload/daily.ts | 2 +- lib/routes/infoq/topic.ts | 2 +- lib/routes/instagram/private-api/index.ts | 2 +- lib/routes/iresearch/report.ts | 2 +- lib/routes/japanpost/utils.ts | 2 +- lib/routes/jingzhengu/utils.ts | 6 +++--- lib/routes/jpxgmn/utils.ts | 2 +- lib/routes/kanxue/topic.ts | 4 ++-- lib/routes/kuaidi100/utils.ts | 2 +- lib/routes/kurogames/wutheringwaves/utils.ts | 2 +- lib/routes/linkedin/cn/renderer.ts | 2 +- lib/routes/linkedin/cn/utils.ts | 2 +- lib/routes/linkresearcher/index.ts | 2 +- lib/routes/mckinsey/cn/index.ts | 2 +- lib/routes/mcmod/index.ts | 2 +- lib/routes/melonbooks/search.ts | 2 +- lib/routes/minecraft/version.ts | 12 ++++++------ lib/routes/mingpao/index.ts | 2 +- lib/routes/miniflux/entry.ts | 10 +++++----- lib/routes/miniflux/subscription.ts | 4 ++-- lib/routes/misskey/home-timeline.ts | 2 +- lib/routes/misskey/user-timeline.ts | 2 +- lib/routes/msn/index.ts | 4 ++-- lib/routes/mymusicsheet/usersheets.ts | 2 +- lib/routes/newzmz/index.ts | 2 +- lib/routes/openai/chatgpt.ts | 2 +- lib/routes/osu/beatmaps/latest-ranked.ts | 4 ++-- lib/routes/pixiv/api/get-ranking.ts | 2 +- lib/routes/pixiv/pixiv-got.ts | 2 +- lib/routes/pornhub/category.ts | 4 ++-- lib/routes/qingting/podcast.ts | 2 +- lib/routes/qoo-app/news.ts | 2 +- lib/routes/rsshub/routes.ts | 2 +- lib/routes/sara/index.ts | 2 +- lib/routes/scut/jwc/news.ts | 2 +- lib/routes/scut/jwc/notice.ts | 2 +- lib/routes/scut/jwc/school.ts | 2 +- lib/routes/shopify/apps/[handle].reviews.ts | 2 +- lib/routes/sicau/jiaowu.ts | 2 +- lib/routes/spotify/saved.ts | 2 +- lib/routes/stheadline/std/realtime.ts | 2 +- lib/routes/swpu/cjxy.ts | 2 +- lib/routes/swpu/dean.ts | 2 +- lib/routes/swpu/dxy.ts | 2 +- lib/routes/swpu/is.ts | 2 +- lib/routes/szftedu/gonggao.ts | 2 +- lib/routes/telegram/channel.ts | 2 +- .../telegram/scripts/get-telegram-session.mjs | 2 +- lib/routes/telegram/tglib/channel.ts | 6 +++--- lib/routes/twitter/api/mobile-api/login.ts | 2 +- lib/routes/twitter/utils.ts | 2 +- lib/routes/uber/blog.ts | 2 +- lib/routes/ustb/tj/news.ts | 2 +- lib/routes/weibo/friends.ts | 2 +- lib/routes/weibo/group.ts | 2 +- lib/routes/weibo/keyword.ts | 2 +- lib/routes/weibo/search/hot.ts | 2 +- lib/routes/weibo/timeline.ts | 2 +- lib/routes/weibo/user-bookmarks.ts | 2 +- lib/routes/weibo/user.ts | 17 +++++++++-------- lib/routes/weibo/utils.ts | 2 +- lib/routes/wtu/job.ts | 6 +++--- lib/routes/wzu/news.ts | 2 +- lib/routes/xiaohongshu/user.ts | 2 +- lib/routes/xiaohongshu/util.ts | 2 +- lib/routes/ximalaya/utils.ts | 4 ++-- lib/routes/yahoo/news/listid.ts | 2 +- lib/routes/yilinzazhi/latest.ts | 2 +- lib/routes/zaobao/util.ts | 4 ++-- lib/routes/zcool/user.ts | 2 +- lib/routes/zhibo8/luxiang.ts | 2 +- lib/routes/zimuxia/portfolio.ts | 2 +- lib/utils/camelcase-keys.spec.ts | 6 +++--- lib/utils/common-utils.ts | 2 +- lib/utils/git-hash.ts | 2 +- lib/utils/helpers.ts | 2 +- lib/utils/md5.ts | 2 +- lib/utils/rand-user-agent.test.ts | 4 ++-- lib/utils/timezone.ts | 2 +- lib/utils/wechat-mp.ts | 2 +- 131 files changed, 181 insertions(+), 186 deletions(-) delete mode 100644 lib/routes/dnaindia/category.ts diff --git a/.puppeteerrc.cjs b/.puppeteerrc.cjs index a4e6d37234ef..af09a79d0cbd 100644 --- a/.puppeteerrc.cjs +++ b/.puppeteerrc.cjs @@ -1,4 +1,4 @@ -const path = require('path'); +const path = require('node:path'); /** * @type {import("puppeteer").Configuration} diff --git a/api/vercel.ts b/api/vercel.ts index 12a2a910b723..93f482567576 100644 --- a/api/vercel.ts +++ b/api/vercel.ts @@ -1,4 +1,4 @@ -const path = require('path'); +const path = require('node:path'); const moduleAlias = require('module-alias'); moduleAlias.addAlias('@', path.join(__dirname, '../lib')); diff --git a/eslint.config.mjs b/eslint.config.mjs index 1339160fd0d8..e1fa7616bcde 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -21,7 +21,7 @@ export default [{ '**/.vscode', '**/docker-compose.yml', '!.github', - 'assets/build/radar-rules.js', + 'assets/build', 'lib/routes-deprecated', 'lib/router.js', '**/babel.config.js', @@ -131,7 +131,6 @@ unicorn.configs.recommended, }], // unicorn - 'unicorn/consistent-destructuring': 'warn', 'unicorn/consistent-function-scoping': 'warn', 'unicorn/explicit-length-check': 'off', @@ -140,7 +139,6 @@ unicorn.configs.recommended, ignore: [String.raw`.*\.(yaml|yml)$`, String.raw`RequestInProgress\.js$`], }], - 'unicorn/new-for-builtins': 'off', 'unicorn/no-array-callback-reference': 'warn', 'unicorn/no-array-reduce': 'warn', 'unicorn/no-await-expression-member': 'off', @@ -183,19 +181,15 @@ unicorn.configs.recommended, 'unicorn/prefer-code-point': 'warn', 'unicorn/prefer-global-this': 'off', 'unicorn/prefer-import-meta-properties': 'warn', - 'unicorn/prefer-logical-operator-over-ternary': 'warn', 'unicorn/prefer-module': 'off', - 'unicorn/prefer-node-protocol': 'off', - 'unicorn/prefer-number-properties': ['warn', { + 'unicorn/prefer-number-properties': ['error', { checkInfinity: false, + checkNaN: false, }], - 'unicorn/prefer-object-from-entries': 'warn', - 'unicorn/prefer-regexp-test': 'warn', 'unicorn/prefer-spread': 'warn', - 'unicorn/prefer-string-replace-all': 'warn', - 'unicorn/prefer-string-slice': 'off', + 'unicorn/prefer-string-slice': 'warn', 'unicorn/prefer-switch': ['warn', { emptyDefaultCase: 'do-nothing-comment', diff --git a/lib/middleware/parameter.ts b/lib/middleware/parameter.ts index 2b84f3e32191..e209578c39aa 100644 --- a/lib/middleware/parameter.ts +++ b/lib/middleware/parameter.ts @@ -400,12 +400,12 @@ const middleware: MiddlewareHandler = async (ctx, next) => { if (ctx.req.query('brief')) { const num = /[1-9]\d{2,}/; if (num.test(ctx.req.query('brief')!)) { - const brief = Number.parseInt(ctx.req.query('brief')!); + const brief: number = Number.parseInt(ctx.req.query('brief')!); for (const item of data.item) { let text; if (item.description) { text = sanitizeHtml(item.description, { allowedTags: [], allowedAttributes: {} }); - item.description = text.length > brief ? `

${text.substring(0, brief)}…

` : `

${text}

`; + item.description = text.length > brief ? `

${text.slice(0, brief)}…

` : `

${text}

`; } } } else { diff --git a/lib/routes/1point3acres/section.ts b/lib/routes/1point3acres/section.ts index 468caafb5168..f51f48206dd8 100644 --- a/lib/routes/1point3acres/section.ts +++ b/lib/routes/1point3acres/section.ts @@ -66,8 +66,8 @@ async function handler(ctx) { const order = ctx.req.param('order') ?? ''; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10; - const currentUrl = `${rootUrl}${id ? (isNaN(id) ? `/category/${id}` : `/section/${id}`) : ''}`; - const apiUrl = `${apiRootUrl}/api${id ? (isNaN(id) ? `/tags/${id}/` : `/forums/${id}/`) : ''}threads?type=${type}&includes=tags,forum_name,summary&ps=${limit}&pg=1&order=${order === '' ? '' : 'time_desc'}&is_groupid=1`; + const currentUrl = `${rootUrl}${id ? (Number.isNaN(id) ? `/category/${id}` : `/section/${id}`) : ''}`; + const apiUrl = `${apiRootUrl}/api${id ? (Number.isNaN(id) ? `/tags/${id}/` : `/forums/${id}/`) : ''}threads?type=${type}&includes=tags,forum_name,summary&ps=${limit}&pg=1&order=${order === '' ? '' : 'time_desc'}&is_groupid=1`; return { title: `一亩三分地 - ${Object.hasOwn(sections, id) ? sections[id] : id}${types[type]}`, diff --git a/lib/routes/3dmgame/news-center.ts b/lib/routes/3dmgame/news-center.ts index 756e10c1583b..781da54b982e 100644 --- a/lib/routes/3dmgame/news-center.ts +++ b/lib/routes/3dmgame/news-center.ts @@ -34,7 +34,7 @@ export const route: Route = { async function handler(ctx) { const { category = '' } = ctx.req.param(); - const isArcPost = category && !isNaN(category); // https://www.3dmgame.com/news/\d+/ + const isArcPost = category && !Number.isNaN(category); // https://www.3dmgame.com/news/\d+/ const url = `https://www.3dmgame.com/${category === 'news_36_1' ? category : 'news/' + category}`; const res = await got(url); const $ = load(res.data); diff --git a/lib/routes/6park/news.ts b/lib/routes/6park/news.ts index 1f65ce6de3ac..f63c0f6eb2f5 100644 --- a/lib/routes/6park/news.ts +++ b/lib/routes/6park/news.ts @@ -38,7 +38,7 @@ async function handler(ctx) { const rootUrl = `https://${isLocal ? site : 'www'}.6parknews.com`; const indexUrl = `${rootUrl}${isLocal ? '' : '/newspark'}/index.php`; - const currentUrl = `${indexUrl}${keyword ? `?act=newssearch&app=news&keywords=${keyword}&submit=查询` : id ? (isNaN(id) ? `?act=${id}` : isLocal ? `?type_id=${id}` : `?type=${id}`) : ''}`; + const currentUrl = `${indexUrl}${keyword ? `?act=newssearch&app=news&keywords=${keyword}&submit=查询` : id ? (Number.isNaN(id) ? `?act=${id}` : isLocal ? `?type_id=${id}` : `?type=${id}`) : ''}`; const response = await got({ method: 'get', diff --git a/lib/routes/abc/index.ts b/lib/routes/abc/index.ts index 91910258106c..ce9b0f1a7890 100644 --- a/lib/routes/abc/index.ts +++ b/lib/routes/abc/index.ts @@ -43,7 +43,7 @@ async function handler(ctx) { let currentUrl = ''; let documentId; - if (isNaN(category)) { + if (Number.isNaN(category)) { currentUrl = new URL(category, rootUrl).href; } else { documentId = category; diff --git a/lib/routes/ainvest/utils.ts b/lib/routes/ainvest/utils.ts index 9eb38ee53f1b..b67e8ea98ce8 100644 --- a/lib/routes/ainvest/utils.ts +++ b/lib/routes/ainvest/utils.ts @@ -1,15 +1,15 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; import CryptoJS from 'crypto-js'; import { KJUR, KEYUTIL, hextob64 } from 'jsrsasign'; const publicKey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCARnxLlrhTK28bEV7s2IROjT73KLSjfqpKIvV8L+Yhe4BrF0Ut4oOH728HZlbSF0C3N0vXZjLAFesoS4v1pYOjVCPXl920Lh2seCv82m0cK78WMGuqZTfA44Nv7JsQMHC3+J6IZm8YD53ft2d8mYBFgKektduucjx8sObe7eRyoQIDAQAB'; -const randomString = (length) => { +const randomString = (length: number) => { if (length > 32) { throw new Error('Max length is 32.'); } - return uuidv4().replaceAll('-', '').substring(0, length); + return uuidv4().replaceAll('-', '').slice(0, length); }; const uuidv4 = () => crypto.randomUUID(); diff --git a/lib/routes/bast/index.ts b/lib/routes/bast/index.ts index 0e92e74becf3..cfa5b946f3c2 100644 --- a/lib/routes/bast/index.ts +++ b/lib/routes/bast/index.ts @@ -18,7 +18,7 @@ async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; const rootUrl = 'https://www.bast.net.cn'; - const currentUrl = `${rootUrl}/${isNaN(colPath) ? colPath : `col/col${colPath}`}/`; + const currentUrl = `${rootUrl}/${Number.isNaN(colPath) ? colPath : `col/col${colPath}`}/`; const response = await got({ method: 'get', diff --git a/lib/routes/behance/user.ts b/lib/routes/behance/user.ts index 31500fa56775..5e6ce92021ae 100644 --- a/lib/routes/behance/user.ts +++ b/lib/routes/behance/user.ts @@ -54,7 +54,7 @@ async function handler(ctx) { const uuid = crypto.randomUUID(); const headers = { - Cookie: `gk_suid=${Math.random().toString().substring(2, 10)}, gki=; originalReferrer=; bcp=${uuid}`, + Cookie: `gk_suid=${Math.random().toString().slice(2, 10)}, gki=; originalReferrer=; bcp=${uuid}`, 'X-BCP': uuid, 'X-Requested-With': 'XMLHttpRequest', }; diff --git a/lib/routes/bilibili/danmaku.ts b/lib/routes/bilibili/danmaku.ts index b89be0d48f7f..1bc137f10645 100644 --- a/lib/routes/bilibili/danmaku.ts +++ b/lib/routes/bilibili/danmaku.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import { load } from 'cheerio'; import cache from './cache'; import got from '@/utils/got'; -import zlib from 'zlib'; +import zlib from 'node:zlib'; const processFloatTime = (time) => { const totalSeconds = Number.parseInt(time); diff --git a/lib/routes/bilibili/followings-dynamic.ts b/lib/routes/bilibili/followings-dynamic.ts index a4ceb81832fb..00b2d7aea68b 100644 --- a/lib/routes/bilibili/followings-dynamic.ts +++ b/lib/routes/bilibili/followings-dynamic.ts @@ -5,7 +5,7 @@ import { config } from '@/config'; import utils from './utils'; import JSONbig from 'json-bigint'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import ConfigNotFoundError from '@/errors/types/config-not-found'; export const route: Route = { diff --git a/lib/routes/bilibili/wasm-exec.ts b/lib/routes/bilibili/wasm-exec.ts index 6081d555ad29..72ab4358caed 100644 --- a/lib/routes/bilibili/wasm-exec.ts +++ b/lib/routes/bilibili/wasm-exec.ts @@ -23,8 +23,8 @@ outputBuf += decoder.decode(buf); const nl = outputBuf.lastIndexOf('\n'); if (nl !== -1) { - console.log(outputBuf.substring(0, nl)); - outputBuf = outputBuf.substring(nl + 1); + console.log(outputBuf.slice(0, nl)); + outputBuf = outputBuf.slice(nl + 1); } return buf.length; }, @@ -552,7 +552,7 @@ this.mem = new DataView(this._inst.exports.mem.buffer); this._values = [ // JS values that Go currently has references to, indexed by reference id - Number.NaN, + NaN, 0, null, true, diff --git a/lib/routes/bnu/jwb.ts b/lib/routes/bnu/jwb.ts index 0f3fc9465ac0..dc728361dbe4 100644 --- a/lib/routes/bnu/jwb.ts +++ b/lib/routes/bnu/jwb.ts @@ -31,7 +31,7 @@ async function handler() { const a = e.find('a'); return { title: e.find('a span').text(), - link: a.attr('href').startsWith('http') ? a.attr('href') : 'https://jwb.bnu.edu.cn' + a.attr('href').substring(2), + link: a.attr('href').startsWith('http') ? a.attr('href') : 'https://jwb.bnu.edu.cn' + a.attr('href').slice(2), pubDate: parseDate(e.find('span.fr.text-muted').text(), 'YYYY-MM-DD'), }; }); diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index 8f92022e6284..d787155c00b2 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; import { resolveHandle, getProfile, getAuthorFeed } from './utils'; import { art } from '@/utils/render'; import path from 'node:path'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; export const route: Route = { path: '/profile/:handle/:routeParams?', diff --git a/lib/routes/caixin/blog.ts b/lib/routes/caixin/blog.ts index 90997606aca5..5a3a789dd4d0 100644 --- a/lib/routes/caixin/blog.ts +++ b/lib/routes/caixin/blog.ts @@ -38,7 +38,7 @@ async function handler(ctx) { const $ = load(response); const user = $('div.indexMainConri > script[type="text/javascript"]') .text() - .substring('window.user = '.length + 1) + .slice('window.user = '.length + 1) .split(';')[0] .replaceAll(/\s/g, ''); const authorId = user.match(/id:"(\d+)"/)[1]; diff --git a/lib/routes/caixin/utils-fulltext.ts b/lib/routes/caixin/utils-fulltext.ts index c866784508e5..74bed5d3d5f1 100644 --- a/lib/routes/caixin/utils-fulltext.ts +++ b/lib/routes/caixin/utils-fulltext.ts @@ -1,4 +1,4 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; import { hextob64, KJUR } from 'jsrsasign'; import ofetch from '@/utils/ofetch'; import { config } from '@/config'; diff --git a/lib/routes/cas/genetics/index.ts b/lib/routes/cas/genetics/index.ts index 25c29be569a1..1f910cf67ee1 100644 --- a/lib/routes/cas/genetics/index.ts +++ b/lib/routes/cas/genetics/index.ts @@ -22,7 +22,7 @@ async function handler(ctx) { let items; - if (path.substring(0, 3) === 'edu') { + if (path.slice(0, 3) === 'edu') { items = $('li.box-s.h16') .toArray() .map((item) => { @@ -35,7 +35,7 @@ async function handler(ctx) { pubDate: parseDate(date.text(), 'YYYY-MM-DD'), }; }); - } else if (path.substring(0, 4) === 'dqyd') { + } else if (path.slice(0, 4) === 'dqyd') { items = $('div.list-tab ul li') .toArray() .map((item) => { diff --git a/lib/routes/cebbank/all.ts b/lib/routes/cebbank/all.ts index a22258fa1a81..8334ebb6c74c 100644 --- a/lib/routes/cebbank/all.ts +++ b/lib/routes/cebbank/all.ts @@ -55,8 +55,8 @@ async function handler(ctx) { exrt: c('td:nth-child(4)').text(), mc: c('td:nth-child(5)').text(), }), - pubDate: timezone(parseDate($('#t_id span').text().substring(5), 'YYYY-MM-DD HH:mm', true), 8), - guid: md5(c('td:nth-child(1)').text() + $('#t_id span').text().substring(5)), + pubDate: timezone(parseDate($('#t_id span').text().slice(5), 'YYYY-MM-DD HH:mm', true), 8), + guid: md5(c('td:nth-child(1)').text() + $('#t_id span').text().slice(5)), }; }) .get(); @@ -70,7 +70,7 @@ async function handler(ctx) { ctx.set('json', { ...ret, - pubDate: timezone(parseDate($('#t_id span').text().substring(5), 'YYYY-MM-DD HH:mm', true), 0), + pubDate: timezone(parseDate($('#t_id span').text().slice(5), 'YYYY-MM-DD HH:mm', true), 0), }); return ret; } diff --git a/lib/routes/cib/whpj.ts b/lib/routes/cib/whpj.ts index 240e462a707c..ed45754177c4 100644 --- a/lib/routes/cib/whpj.ts +++ b/lib/routes/cib/whpj.ts @@ -3,8 +3,8 @@ import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import https from 'https'; -import crypto from 'crypto'; +import https from 'node:https'; +import crypto from 'node:crypto'; import { config } from '@/config'; export const route: Route = { @@ -47,7 +47,7 @@ async function handler(ctx) { const $ = load(response.data); let date = $('div.main-body').find('div.labe_text').text(); date = date.split('\n\t')[1].replace('日期:', '').trim(); - date = date.substring(0, 11) + date.substring(15); + date = date.slice(0, 11) + date.slice(15); const link = 'https://personalbank.cib.com.cn/pers/main/pubinfo/ifxQuotationQuery/list?_search=false&dataSet.rows=80&dataSet.page=1&dataSet.sidx=&dataSet.sord=asc'; const data = await cache.tryGet( diff --git a/lib/routes/ciweimao/chapter.ts b/lib/routes/ciweimao/chapter.ts index eea880e023ac..a6a88675d0b4 100644 --- a/lib/routes/ciweimao/chapter.ts +++ b/lib/routes/ciweimao/chapter.ts @@ -39,7 +39,7 @@ async function handler(ctx) { const $ = load(response); const firstChapterUrl = $('ul.catalogue-list li a').attr('href'); - const firstChapterId = firstChapterUrl.substring(firstChapterUrl.lastIndexOf('/') + 1); + const firstChapterId = firstChapterUrl.slice(firstChapterUrl.lastIndexOf('/') + 1); const { data: chapters } = await got(`${chapterUrl}/chapter/${id}/${firstChapterId}`); const $c = load(chapters); diff --git a/lib/routes/clickme/index.ts b/lib/routes/clickme/index.ts index 6c63501807f5..0bee42418edc 100644 --- a/lib/routes/clickme/index.ts +++ b/lib/routes/clickme/index.ts @@ -27,7 +27,7 @@ async function handler(ctx) { const grouping = ctx.req.param('grouping') === 'tag' ? 'tag' : 'category'; const name = ctx.req.param('name'); - const url = `https://${site ? 'r18.' : ''}clickme.net/${grouping.substring(0, 1)}/${encodeURIComponent(name)}`; + const url = `https://${site ? 'r18.' : ''}clickme.net/${grouping.slice(0, 1)}/${encodeURIComponent(name)}`; const { data: response } = await got.post('https://api.clickme.net/article/list', { headers: { diff --git a/lib/routes/cntv/column.ts b/lib/routes/cntv/column.ts index 8bf2d2d97023..0b1dce06a9e3 100644 --- a/lib/routes/cntv/column.ts +++ b/lib/routes/cntv/column.ts @@ -41,7 +41,7 @@ export const route: Route = { async function handler(ctx) { const id = ctx.req.param('column'); - const limit = isNaN(Number.parseInt(ctx.req.query('limit'))) ? 25 : Number.parseInt(ctx.req.query('limit')); + const limit = Number.isNaN(Number.parseInt(ctx.req.query('limit'))) ? 25 : Number.parseInt(ctx.req.query('limit')); const response = await got({ method: 'get', diff --git a/lib/routes/comicskingdom/index.ts b/lib/routes/comicskingdom/index.ts index ec6264ddfb66..3b18872da294 100644 --- a/lib/routes/comicskingdom/index.ts +++ b/lib/routes/comicskingdom/index.ts @@ -63,7 +63,7 @@ async function handler(ctx) { image, }); // Pull the date out of the URL - const pubDate = parseDate(link.substring(link.lastIndexOf('/') + 1), 'YYYY-MM-DD'); + const pubDate = parseDate(link.slice(link.lastIndexOf('/') + 1), 'YYYY-MM-DD'); return { title, diff --git a/lib/routes/creative-comic/utils.ts b/lib/routes/creative-comic/utils.ts index 14558977dc9e..a68723b5df0e 100644 --- a/lib/routes/creative-comic/utils.ts +++ b/lib/routes/creative-comic/utils.ts @@ -67,8 +67,8 @@ const decrypt = (encrypted, secrets) => const token2Key = (token) => { const t = CryptoJS.SHA512(token).toString(); return { - key: t.substring(0, 64), - iv: t.substring(30, 62), // t.substr(30, 32) + key: t.slice(0, 64), + iv: t.slice(30, 62), // t.substr(30, 32) }; }; diff --git a/lib/routes/csu/utils.ts b/lib/routes/csu/utils.ts index b0cf117fab8f..aefb50aee7ff 100644 --- a/lib/routes/csu/utils.ts +++ b/lib/routes/csu/utils.ts @@ -1,4 +1,4 @@ -import { inflateSync } from 'zlib'; +import { inflateSync } from 'node:zlib'; const unzip = (b64Data) => { const strData = Buffer.from(b64Data, 'base64').toString('binary'); diff --git a/lib/routes/dnaindia/category.ts b/lib/routes/dnaindia/category.ts deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/lib/routes/dockerhub/tag.ts b/lib/routes/dockerhub/tag.ts index b669f6859423..a47c82468748 100644 --- a/lib/routes/dockerhub/tag.ts +++ b/lib/routes/dockerhub/tag.ts @@ -30,7 +30,7 @@ async function handler(ctx) { const namespace = `${owner}/${image}`; const link = `https://hub.docker.com/r/${namespace}`; - const pageSize = isNaN(Number.parseInt(limits)) ? 10 : Number.parseInt(limits); + const pageSize = Number.isNaN(Number.parseInt(limits)) ? 10 : Number.parseInt(limits); const data = await got.get(`https://hub.docker.com/v2/repositories/${namespace}/tags/?page_size=${pageSize}`); const metadata = await got.get(`https://hub.docker.com/v2/repositories/${namespace}/`); diff --git a/lib/routes/douban/people/status.ts b/lib/routes/douban/people/status.ts index 5f127195b3c3..b58dfa47c013 100644 --- a/lib/routes/douban/people/status.ts +++ b/lib/routes/douban/people/status.ts @@ -1,6 +1,6 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import got from '@/utils/got'; import { fallback, queryToBoolean, queryToInteger } from '@/utils/readable-social'; import { config } from '@/config'; diff --git a/lib/routes/douban/people/wish.ts b/lib/routes/douban/people/wish.ts index 9f4cc750970e..857c05f283ef 100644 --- a/lib/routes/douban/people/wish.ts +++ b/lib/routes/douban/people/wish.ts @@ -1,6 +1,6 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import { load } from 'cheerio'; import got from '@/utils/got'; import { config } from '@/config'; diff --git a/lib/routes/douyin/hashtag.ts b/lib/routes/douyin/hashtag.ts index d7ef5538c831..3edfec85c6b2 100644 --- a/lib/routes/douyin/hashtag.ts +++ b/lib/routes/douyin/hashtag.ts @@ -34,7 +34,7 @@ export const route: Route = { async function handler(ctx) { const cid = ctx.req.param('cid'); - if (isNaN(cid)) { + if (Number.isNaN(cid)) { throw new InvalidParameterError('Invalid tag ID. Tag ID should be a number.'); } const routeParams = Object.fromEntries(new URLSearchParams(ctx.req.param('routeParams'))); diff --git a/lib/routes/douyin/live.ts b/lib/routes/douyin/live.ts index 3e1d05ac7dd0..3159461b1f49 100644 --- a/lib/routes/douyin/live.ts +++ b/lib/routes/douyin/live.ts @@ -31,7 +31,7 @@ export const route: Route = { async function handler(ctx) { const rid = ctx.req.param('rid'); - if (isNaN(rid)) { + if (Number.isNaN(rid)) { throw new InvalidParameterError('Invalid room ID. Room ID should be a number.'); } diff --git a/lib/routes/dw/rss.ts b/lib/routes/dw/rss.ts index 835f267a653f..54bd497f1ca3 100644 --- a/lib/routes/dw/rss.ts +++ b/lib/routes/dw/rss.ts @@ -23,7 +23,7 @@ export const route: Route = { handler, description: ` For a full list of RSS Feed Channels in English, please refer to [DW RSS Feeds](https://corporate.dw.com/en/rss-feeds/a-68693346). -RSS Feed Channels in other languages are also available, for example: \`rss-chi-all\` renders the RSS feed in Chinese and \`rss-de-all\` for the RSS Feed in German +RSS Feed Channels in other languages are also available, for example: \`rss-chi-all\` renders the RSS feed in Chinese and \`rss-de-all\` for the RSS Feed in German `, }; @@ -48,7 +48,7 @@ async function handler(ctx) { const link = new URL(item.link); link.search = ''; item.link = link.href; - item.type = link.pathname.substring(link.pathname.lastIndexOf('/') + 1).startsWith('live-') ? 'liveblog' : 'article'; // dw rss feed only includes liveblogs and articles + item.type = link.pathname.slice(link.pathname.lastIndexOf('/') + 1).startsWith('live-') ? 'liveblog' : 'article'; // dw rss feed only includes liveblogs and articles return item; }) ); diff --git a/lib/routes/fffdm/manhua/manhua.ts b/lib/routes/fffdm/manhua/manhua.ts index bb48cba17d02..f5a2b0f56268 100644 --- a/lib/routes/fffdm/manhua/manhua.ts +++ b/lib/routes/fffdm/manhua/manhua.ts @@ -47,7 +47,7 @@ async function handler(ctx) { const id = ctx.req.param('id'); const count = ctx.req.query('limit') || 99999; const cdnNum = ctx.req.param('cdn') || 5; - const cdn = !isNaN(Number.parseInt(cdnNum)) && 1 <= Number.parseInt(cdnNum) && Number.parseInt(cdnNum) <= 5 ? `https://p${cdnNum}.fzacg.com` : `https://p5.fzacg.com`; + const cdn = !Number.isNaN(Number.parseInt(cdnNum)) && 1 <= Number.parseInt(cdnNum) && Number.parseInt(cdnNum) <= 5 ? `https://p${cdnNum}.fzacg.com` : `https://p5.fzacg.com`; // 获取漫画清单 const response = await got(`${host}/api/manhua/${id}`); diff --git a/lib/routes/fjksbm/index.ts b/lib/routes/fjksbm/index.ts index 1ab469dfbf98..da87a6f52d75 100644 --- a/lib/routes/fjksbm/index.ts +++ b/lib/routes/fjksbm/index.ts @@ -35,7 +35,7 @@ async function handler(ctx) { const category = ctx.req.param('category') ?? '0'; const id = Number.parseInt(category); - const isNumber = !isNaN(id); + const isNumber = !Number.isNaN(id); const rootUrl = 'https://fjksbm.com'; const currentUrl = `${rootUrl}/portal${isNumber ? '' : `/${category}`}`; diff --git a/lib/routes/foresightnews/util.ts b/lib/routes/foresightnews/util.ts index be1bdfb1638e..24884e67bdc2 100644 --- a/lib/routes/foresightnews/util.ts +++ b/lib/routes/foresightnews/util.ts @@ -2,7 +2,7 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import zlib from 'zlib'; +import zlib from 'node:zlib'; const constants = { labelHot: '热门', diff --git a/lib/routes/furstar/utils.ts b/lib/routes/furstar/utils.ts index 2d104d27de4e..75bba65c03df 100644 --- a/lib/routes/furstar/utils.ts +++ b/lib/routes/furstar/utils.ts @@ -53,7 +53,7 @@ const detailPage = (link, cache) => .map((i, e) => { const p = load(e); const link = p('a').attr('href').trim(); - return `${base}/${link.substring(2)}`; + return `${base}/${link.slice(2)}`; }) .get(); diff --git a/lib/routes/gameapps/index.ts b/lib/routes/gameapps/index.ts index 6a2db63c0e5c..b46616b8e115 100644 --- a/lib/routes/gameapps/index.ts +++ b/lib/routes/gameapps/index.ts @@ -74,7 +74,7 @@ async function handler() { intro: $('div.introduction.media.news-intro div.media-body').html()?.trim(), desc: content.html()?.trim(), }); - item.guid = item.guid.substring(0, item.link.lastIndexOf('/')); + item.guid = item.guid.slice(0, item.link.lastIndexOf('/')); item.pubDate = parseDate(item.pubDate); item.enclosure_url = $('div.introduction.media.news-intro div.media-left').find('img').attr('src'); item.enclosure_type = 'image/jpeg'; diff --git a/lib/routes/gamersky/utils.ts b/lib/routes/gamersky/utils.ts index b8968fb35ea2..1d0f8b1be52e 100644 --- a/lib/routes/gamersky/utils.ts +++ b/lib/routes/gamersky/utils.ts @@ -89,6 +89,6 @@ export const getArticle = (item) => }) as Promise; export function mdTableBuilder(data: idNameMap[]) { - const table = '|' + data.map((item) => `${item.type}|`).join('') + '\n|' + Array(data.length).fill('---|').join('') + '\n|' + data.map((item) => `${item.name}|`).join('') + '\n'; + const table = '|' + data.map((item) => `${item.type}|`).join('') + '\n|' + Array.from({ length: data.length }).fill('---|').join('') + '\n|' + data.map((item) => `${item.name}|`).join('') + '\n'; return table; } diff --git a/lib/routes/gcores/parser.ts b/lib/routes/gcores/parser.ts index 1935cfaa53be..814c7ee6bbe6 100644 --- a/lib/routes/gcores/parser.ts +++ b/lib/routes/gcores/parser.ts @@ -222,7 +222,7 @@ const parseBlock = (block: Block, entityMap: Readonly>): lastOffset = range.offset + range.length; } - resultParts.push(text.substring(lastOffset)); + resultParts.push(text.slice(lastOffset)); return `${blockType.element ? `<${blockType.element}>` : ''}${resultParts.join('').replaceAll('\n', '
')}${blockType.element ? `` : ''}`; }; diff --git a/lib/routes/github/comments.ts b/lib/routes/github/comments.ts index 8db3aeb3de15..cfc6148bda64 100644 --- a/lib/routes/github/comments.ts +++ b/lib/routes/github/comments.ts @@ -43,7 +43,7 @@ export const route: Route = { async function handler(ctx) { const user = ctx.req.param('user'); const repo = ctx.req.param('repo'); - const number = ctx.req.param('number') && isNaN(Number.parseInt(ctx.req.param('number'))) ? 1 : Number.parseInt(ctx.req.param('number')); + const number = ctx.req.param('number') && Number.isNaN(Number.parseInt(ctx.req.param('number'))) ? 1 : Number.parseInt(ctx.req.param('number')); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 100; const headers = config.github && config.github.access_token @@ -55,7 +55,7 @@ async function handler(ctx) { Accept: 'application/vnd.github.v3+json', }; - return await (isNaN(number) ? allIssues(ctx, user, repo, limit, headers) : singleIssue(ctx, user, repo, number, limit, headers)); + return await (Number.isNaN(number) ? allIssues(ctx, user, repo, limit, headers) : singleIssue(ctx, user, repo, number, limit, headers)); } async function allIssues(ctx, user, repo, limit, headers) { diff --git a/lib/routes/github/contributors.ts b/lib/routes/github/contributors.ts index 6069bd1eae48..5237c6bb519f 100644 --- a/lib/routes/github/contributors.ts +++ b/lib/routes/github/contributors.ts @@ -52,7 +52,7 @@ async function handler(ctx) { const url_base = last_page_link.match(/<(.*)page=\d*/)[1]; const page_count = Number(last_page_link.match(/page=(\d*)/)[1]); - const generate_array = (n) => [...Array(n - 1)].map((_, index) => index + 2); + const generate_array = (n) => Array.from({ length: n - 1 }).map((_, index) => index + 2); const page_array = generate_array(page_count); // Get everypage diff --git a/lib/routes/gov/nea/ghs.ts b/lib/routes/gov/nea/ghs.ts index 8258fad5d166..3de98e980ca8 100644 --- a/lib/routes/gov/nea/ghs.ts +++ b/lib/routes/gov/nea/ghs.ts @@ -3,7 +3,7 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import { URL } from 'url'; +import { URL } from 'node:url'; import timezone from '@/utils/timezone'; export const route: Route = { diff --git a/lib/routes/guancha/member.ts b/lib/routes/guancha/member.ts index dac3eff1a6ac..4f943f3434dc 100644 --- a/lib/routes/guancha/member.ts +++ b/lib/routes/guancha/member.ts @@ -102,7 +102,7 @@ async function handler(ctx) { enclosure_length: item.media_size, itunes_duration, enclosure_type: 'audio/mpeg', - pubDate: isNaN(+item.created_at) ? timezone(parseDate(item.created_at), +8) : parseDate(item.created_at * 1000), + pubDate: Number.isNaN(+item.created_at) ? timezone(parseDate(item.created_at), +8) : parseDate(item.created_at * 1000), }; }); } diff --git a/lib/routes/hackernews/index.ts b/lib/routes/hackernews/index.ts index d62784fa895a..cb3ba7f73317 100644 --- a/lib/routes/hackernews/index.ts +++ b/lib/routes/hackernews/index.ts @@ -72,7 +72,7 @@ async function handler(ctx) { item.link = `${rootUrl}/item?id=${item.guid}`; item.origin = thing.find('.titleline').children('a').attr('href'); - item.onStory = thing.find('.onstory').text().substring(2); + item.onStory = thing.find('.onstory').text().slice(2); item.comments = thing.next().find('a').last().text().split(' comment')[0]; item.upvotes = thing.next().find('.score').text().split(' point')[0]; @@ -128,7 +128,7 @@ async function handler(ctx) { item.description = item.currentComment; } - if (isNaN(item.comments)) { + if (Number.isNaN(item.comments)) { item.comments = 0; } diff --git a/lib/routes/hafu/utils.ts b/lib/routes/hafu/utils.ts index 7b7d6a896d16..f7e499f6f391 100644 --- a/lib/routes/hafu/utils.ts +++ b/lib/routes/hafu/utils.ts @@ -102,7 +102,7 @@ async function ggtzParse(ctx, $) { const header = articleData('h1').next().text(); const index = header.indexOf('日期'); - author = header.substring(0, index - 2) || ''; + author = header.slice(0, index - 2) || ''; const date = header.substring(index + 3, index + 19); pubDate = parseDate(date, 'YYYY-MM-DD HH:mm'); diff --git a/lib/routes/hkej/index.ts b/lib/routes/hkej/index.ts index 1fd4e4ceffa2..4ee74b14d4f4 100644 --- a/lib/routes/hkej/index.ts +++ b/lib/routes/hkej/index.ts @@ -104,7 +104,7 @@ async function handler(ctx) { item = $(item); return { title: item.text().trim(), - link: baseUrl + item.attr('href').substring(0, item.attr('href').lastIndexOf('/')), + link: baseUrl + item.attr('href').slice(0, item.attr('href').lastIndexOf('/')), }; }) .get(); diff --git a/lib/routes/hkepc/index.ts b/lib/routes/hkepc/index.ts index d479cf3a6325..51754ccb5d6e 100644 --- a/lib/routes/hkepc/index.ts +++ b/lib/routes/hkepc/index.ts @@ -110,7 +110,7 @@ async function handler(ctx) { .map((e) => $(e).text().trim()); item.description = content.html(); item.pubDate = timezone(parseDate($('.publishDate').text()), +8); - item.guid = item.link.substring(0, item.link.lastIndexOf('/')); + item.guid = item.link.slice(0, item.link.lastIndexOf('/')); return item; }) diff --git a/lib/routes/hket/index.ts b/lib/routes/hket/index.ts index 5b9dad231aaf..0b5ed9563bdf 100644 --- a/lib/routes/hket/index.ts +++ b/lib/routes/hket/index.ts @@ -125,7 +125,7 @@ export const route: Route = { async function handler(ctx) { const { category = 'sran001' } = ctx.req.param(); - const baseUrl = urlMap[category.substring(0, 4)].baseUrl; + const baseUrl = urlMap[category.slice(0, 4)].baseUrl; const response = await ofetch(`${baseUrl}/${category}`); diff --git a/lib/routes/idolmaster/news.ts b/lib/routes/idolmaster/news.ts index 5df59d2929e6..a2e015a54ea5 100644 --- a/lib/routes/idolmaster/news.ts +++ b/lib/routes/idolmaster/news.ts @@ -1,7 +1,7 @@ import { Route, Data, DataItem } from '@/types'; import type { Context } from 'hono'; import got from '@/utils/got'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import cache from '@/utils/cache'; diff --git a/lib/routes/iknowwhatyoudownload/daily.ts b/lib/routes/iknowwhatyoudownload/daily.ts index fda67f153052..b305f03e4149 100644 --- a/lib/routes/iknowwhatyoudownload/daily.ts +++ b/lib/routes/iknowwhatyoudownload/daily.ts @@ -4,7 +4,7 @@ import { load } from 'cheerio'; import dayjs from 'dayjs'; import got from '@/utils/got'; import { art } from '@/utils/render'; -import path from 'path'; +import path from 'node:path'; interface TableData { key: string; diff --git a/lib/routes/infoq/topic.ts b/lib/routes/infoq/topic.ts index 77d416719631..8f9568e88abd 100644 --- a/lib/routes/infoq/topic.ts +++ b/lib/routes/infoq/topic.ts @@ -32,7 +32,7 @@ async function handler(ctx) { const infoUrl = 'https://www.infoq.cn/public/v1/topic/getInfo'; const pageUrl = `https://www.infoq.cn/topic/${paramId}`; - const infoBody = isNaN(paramId) ? { alias: paramId } : { id: Number.parseInt(paramId) }; + const infoBody = Number.isNaN(paramId) ? { alias: paramId } : { id: Number.parseInt(paramId) }; const info = await got.post(infoUrl, { headers: { diff --git a/lib/routes/instagram/private-api/index.ts b/lib/routes/instagram/private-api/index.ts index bd4bd539dcd9..860c7ad7445c 100644 --- a/lib/routes/instagram/private-api/index.ts +++ b/lib/routes/instagram/private-api/index.ts @@ -14,7 +14,7 @@ async function loadContent(category, nameOrId, tryGet) { switch (category) { case 'user': { let userInfo, username, id; - if (isNaN(nameOrId)) { + if (Number.isNaN(nameOrId)) { username = nameOrId; id = await tryGet(`instagram:getIdByUsername:${username}`, () => ig.user.getIdByUsername(username), 31_536_000); // 1 year since it will never change userInfo = await tryGet(`instagram:userInfo:${id}`, () => ig.user.info(id)); diff --git a/lib/routes/iresearch/report.ts b/lib/routes/iresearch/report.ts index 1a16885593a8..547cfd72e241 100644 --- a/lib/routes/iresearch/report.ts +++ b/lib/routes/iresearch/report.ts @@ -55,7 +55,7 @@ export const route: Route = { }; async function handler(ctx) { - const limit = isNaN(Number.parseInt(ctx.req.query('limit'))) ? 20 : Number.parseInt(ctx.req.query('limit')); + const limit = Number.isNaN(Number.parseInt(ctx.req.query('limit'))) ? 20 : Number.parseInt(ctx.req.query('limit')); const apiUrl = `https://www.iresearch.com.cn/api/products/GetReportList?fee=0&date=&lastId=&pageSize=${limit}`; const pageUrl = 'https://www.iresearch.com.cn/m/report.shtml'; diff --git a/lib/routes/japanpost/utils.ts b/lib/routes/japanpost/utils.ts index 2e5d682f35c5..794b764d276b 100644 --- a/lib/routes/japanpost/utils.ts +++ b/lib/routes/japanpost/utils.ts @@ -1,4 +1,4 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; import cityTimezones from 'city-timezones'; import dayjs from 'dayjs'; diff --git a/lib/routes/jingzhengu/utils.ts b/lib/routes/jingzhengu/utils.ts index 242826a9cdd3..387facd2735b 100644 --- a/lib/routes/jingzhengu/utils.ts +++ b/lib/routes/jingzhengu/utils.ts @@ -3,7 +3,7 @@ import md5 from '@/utils/md5'; function link(str: string, ...args: string[]): string { let result = args.map((arg) => arg + str).join(''); if (result.search('-')) { - result = result.substring(0, result.length - 1); + result = result.slice(0, Math.max(0, result.length - 1)); } return result; } @@ -26,8 +26,8 @@ export function sign(payload: Map) { .sort() .map((key) => key + '=' + map.get(key)) .join(''); - const linkedString = link('--'.substring(0, 1), '#CEAIWER', '892F', 'KB97', 'JKB6', 'HJ7OC7C8', 'GJZG'); - const lastSeparatorIndex = linkedString.lastIndexOf('--'.substring(0, 1)); // 32 + const linkedString = link('--'.slice(0, 1), '#CEAIWER', '892F', 'KB97', 'JKB6', 'HJ7OC7C8', 'GJZG'); + const lastSeparatorIndex = linkedString.lastIndexOf('--'.slice(0, 1)); // 32 const replacedString = replaceCharAt(linkedString, lastSeparatorIndex, ''); // #CEAIWER-892F-KB97-JKB6-HJ7OC7C8GJZG const finalString = (sortedString + replacedString).toLowerCase(); diff --git a/lib/routes/jpxgmn/utils.ts b/lib/routes/jpxgmn/utils.ts index 6547a3f2ab9c..c72ceb35408a 100644 --- a/lib/routes/jpxgmn/utils.ts +++ b/lib/routes/jpxgmn/utils.ts @@ -19,7 +19,7 @@ const getArticleDesc = async (articleUrl) => { } const images = getImages($content); const otherImages = await Promise.all( - [...Array(pageCnt - 1).keys()].map(async (pageIndex) => { + [...Array.from({ length: pageCnt - 1 }).keys()].map(async (pageIndex) => { const pageUrl = articleUrl.replace('.html', `_${pageIndex + 1}.html`); const pageResponse = await got(pageUrl); return getImages(load(pageResponse.data)); diff --git a/lib/routes/kanxue/topic.ts b/lib/routes/kanxue/topic.ts index d4b3de1c85dc..4c26f5184360 100644 --- a/lib/routes/kanxue/topic.ts +++ b/lib/routes/kanxue/topic.ts @@ -101,13 +101,13 @@ async function handler(ctx) { // fix .thread .top_3 .filter((_, elem) => { const timeStr = $('.date', elem).eq(0).text(); - const pubDate = timeStr.endsWith('前') ? parseRelativeDate(timeStr) : parseDate(timeStr.substring(1)); + const pubDate = timeStr.endsWith('前') ? parseRelativeDate(timeStr) : parseDate(timeStr.slice(1)); return !elem.attribs.class.includes('top') || Date.now() - pubDate.valueOf() < timeDiff; }) .map((_, elem) => { const subject = $('.subject a', elem).eq(1); const timeStr = $('.date', elem).eq(0).text(); - const pubDate = timeStr.endsWith('前') ? parseRelativeDate(timeStr) : parseDate(timeStr.substring(1)); + const pubDate = timeStr.endsWith('前') ? parseRelativeDate(timeStr) : parseDate(timeStr.slice(1)); const link = `${baseUrl}${subject.attr('href')}`; const key = `kanxue: ${link}`; diff --git a/lib/routes/kuaidi100/utils.ts b/lib/routes/kuaidi100/utils.ts index 58ca7cc1e345..af1449b66218 100644 --- a/lib/routes/kuaidi100/utils.ts +++ b/lib/routes/kuaidi100/utils.ts @@ -145,7 +145,7 @@ export default { const list = await getCompanyList(); const company = list.find((c) => c.number === number); if (company) { - if (number.includes('shunfeng') && !isNaN(phone) && String(phone).length !== 4) { + if (number.includes('shunfeng') && !Number.isNaN(phone) && String(phone).length !== 4) { return { status: false, message: '顺丰查询需要手机号后四位!', diff --git a/lib/routes/kurogames/wutheringwaves/utils.ts b/lib/routes/kurogames/wutheringwaves/utils.ts index 2138b6bcb05f..0faaa4d17944 100644 --- a/lib/routes/kurogames/wutheringwaves/utils.ts +++ b/lib/routes/kurogames/wutheringwaves/utils.ts @@ -12,7 +12,7 @@ export const parseInteger = (value?: string | number, fallback?: number): number } if (value === undefined) { - return fallback === undefined ? Number.NaN : fallback; + return fallback === undefined ? NaN : fallback; } const parsed = Number.parseInt(value, 10); diff --git a/lib/routes/linkedin/cn/renderer.ts b/lib/routes/linkedin/cn/renderer.ts index 11b79942ee52..d49b3ff732a7 100644 --- a/lib/routes/linkedin/cn/renderer.ts +++ b/lib/routes/linkedin/cn/renderer.ts @@ -60,7 +60,7 @@ class Ucs2Text { if (_end === 0) { return new Ucs2Text(''); } - if (((isNaN(_start) || 0 > _start) && (_start = 0), (isNaN(_end) || 0 > _end) && (_end = _len), _start > _len && (_start = _len), _end > _len && (_end = _len), _end < _start)) { + if (((Number.isNaN(_start) || 0 > _start) && (_start = 0), (Number.isNaN(_end) || 0 > _end) && (_end = _len), _start > _len && (_start = _len), _end > _len && (_end = _len), _end < _start)) { _len = [_start, _end]; _end = _len[0]; _start = _len[1]; diff --git a/lib/routes/linkedin/cn/utils.ts b/lib/routes/linkedin/cn/utils.ts index ff06b141fc7f..db63db02176b 100644 --- a/lib/routes/linkedin/cn/utils.ts +++ b/lib/routes/linkedin/cn/utils.ts @@ -1,5 +1,5 @@ import cache from '@/utils/cache'; -import crypto from 'crypto'; +import crypto from 'node:crypto'; import path from 'node:path'; import { art } from '@/utils/render'; import got from '@/utils/got'; diff --git a/lib/routes/linkresearcher/index.ts b/lib/routes/linkresearcher/index.ts index dcf01ae82fe8..159cfa04efab 100644 --- a/lib/routes/linkresearcher/index.ts +++ b/lib/routes/linkresearcher/index.ts @@ -2,7 +2,7 @@ import { ViewType, type Data, type DataItem, type Route } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import InvalidParameterError from '@/errors/types/invalid-parameter'; -import crypto from 'crypto'; +import crypto from 'node:crypto'; import type { Context } from 'hono'; import type { DetailResponse, SearchResultItem } from './types'; import cache from '@/utils/cache'; diff --git a/lib/routes/mckinsey/cn/index.ts b/lib/routes/mckinsey/cn/index.ts index b095fb4715e3..71e2a067725b 100644 --- a/lib/routes/mckinsey/cn/index.ts +++ b/lib/routes/mckinsey/cn/index.ts @@ -53,7 +53,7 @@ export const route: Route = { async function handler(ctx) { const { category = '25' } = ctx.req.param(); - if (isNaN(category)) { + if (Number.isNaN(category)) { categories.find((c) => c.slug === category); } diff --git a/lib/routes/mcmod/index.ts b/lib/routes/mcmod/index.ts index ee1bf460b7e1..2e1632f87e83 100644 --- a/lib/routes/mcmod/index.ts +++ b/lib/routes/mcmod/index.ts @@ -45,7 +45,7 @@ export const route: Route = { title: each.find('div > .name > a').text(), image: each.find('img').attr('src')?.split('@')[0], link: each.children('a').attr('href'), - pubDate: time.attr('title') && timezone(parseDate(time.attr('title')!.substring(6), 'YYYY-MM-DD HH:mm:ss'), +8), + pubDate: time.attr('title') && timezone(parseDate(time.attr('title')!.slice(6), 'YYYY-MM-DD HH:mm:ss'), +8), }; }); diff --git a/lib/routes/melonbooks/search.ts b/lib/routes/melonbooks/search.ts index 993683588642..c87200d8fcd5 100644 --- a/lib/routes/melonbooks/search.ts +++ b/lib/routes/melonbooks/search.ts @@ -3,7 +3,7 @@ import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseItems } from './parser'; import { Context } from 'hono'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; export const handler = async (ctx: Context): Promise => { const baseUrl = 'https://www.melonbooks.co.jp'; diff --git a/lib/routes/minecraft/version.ts b/lib/routes/minecraft/version.ts index a8c7c279eb24..90105491993b 100644 --- a/lib/routes/minecraft/version.ts +++ b/lib/routes/minecraft/version.ts @@ -63,13 +63,13 @@ const linkFormatter: any = { enwiki: (item: VersionInManifest) => { let id = item.id; if (item.type === 'old_beta' && id.startsWith('b')) { - id = `Beta ${id.substring(1)}`; + id = `Beta ${id.slice(1)}`; } if (item.type === 'old_alpha') { if (id.startsWith('a')) { - id = `Alpha ${id.substring(1)}`; + id = `Alpha ${id.slice(1)}`; } else if (id.startsWith('c')) { - id = `Classic ${id.substring(1)}`; + id = `Classic ${id.slice(1)}`; } else if (id.startsWith('inf-')) { id = `Infdev`; } else if (id.startsWith('rd-')) { @@ -84,13 +84,13 @@ const linkFormatter: any = { id = `Java版${id}`; } if (item.type === 'old_beta' && id.startsWith('b')) { - id = `Java版Beta ${id.substring(1)}`; + id = `Java版Beta ${id.slice(1)}`; } if (item.type === 'old_alpha') { if (id.startsWith('a')) { - id = `Java版Alpha ${id.substring(1)}`; + id = `Java版Alpha ${id.slice(1)}`; } else if (id.startsWith('c')) { - id = `Java版Classic ${id.substring(1)}`; + id = `Java版Classic ${id.slice(1)}`; } else if (id.startsWith('inf-')) { id = `Java版Infdev`; } else if (id.startsWith('rd-')) { diff --git a/lib/routes/mingpao/index.ts b/lib/routes/mingpao/index.ts index f760205c61fc..ab66b7b8437e 100644 --- a/lib/routes/mingpao/index.ts +++ b/lib/routes/mingpao/index.ts @@ -158,7 +158,7 @@ async function handler(ctx) { item.description = renderDesc(fancybox, $('.txt4').html() ?? $('.article_content.line_1_5em').html() ?? $('.txt3').html()); item.pubDate = parseDate(item.pubDate); - item.guid = item.link.includes('?') ? item.link : item.link.substring(0, item.link.lastIndexOf('/')); + item.guid = item.link.includes('?') ? item.link : item.link.slice(0, item.link.lastIndexOf('/')); return item; }) diff --git a/lib/routes/miniflux/entry.ts b/lib/routes/miniflux/entry.ts index 3867c8136ae7..8fffd2c048c6 100644 --- a/lib/routes/miniflux/entry.ts +++ b/lib/routes/miniflux/entry.ts @@ -74,8 +74,8 @@ async function handler(ctx) { return ''; } - const filter = item.substring(0, item.indexOf('=')); - const option = item.substring(item.lastIndexOf('=') + 1); + const filter = item.slice(0, item.indexOf('=')); + const option = item.slice(item.lastIndexOf('=') + 1); switch (filter) { case 'mark': @@ -105,7 +105,7 @@ async function handler(ctx) { break; // If user mistakenly set `category=Int` case 'category': - isNaN(Number.parseInt(option)) ? (item = '') : (item = `category_id=${option}`); + Number.isNaN(Number.parseInt(option)) ? (item = '') : (item = `category_id=${option}`); break; case 'order': if (option !== 'id' && option !== 'category_title' && option !== 'published_at' && option !== 'status' && option !== 'category_id') { @@ -117,7 +117,7 @@ async function handler(ctx) { // parameter, since user may mistakenly input this parameter // several times. case 'limit': - if (!isNaN(option) && !setLimit.length) { + if (!Number.isNaN(option) && !setLimit.length) { limit = option; setLimit.push(1); } @@ -157,7 +157,7 @@ async function handler(ctx) { let queryLimit = ctx.req.query('limit'); let result: Data; - if (feeds.search(/feeds?=/g) !== -1 || !isNaN(Number.parseInt(feeds.split('&').join('')))) { + if (feeds.search(/feeds?=/g) !== -1 || !Number.isNaN(Number.parseInt(feeds.split('&').join('')))) { const feedsID = feeds.replaceAll(/feeds?=/g, ''); const feedsList = [feedsID.split('&')].flat(); diff --git a/lib/routes/miniflux/subscription.ts b/lib/routes/miniflux/subscription.ts index fa89d50fb898..1085bbac19d2 100644 --- a/lib/routes/miniflux/subscription.ts +++ b/lib/routes/miniflux/subscription.ts @@ -51,8 +51,8 @@ async function handler(ctx) { if (item.search('=') === -1) { return ''; } - const filter = item.substring(0, item.indexOf('=')); - const option = item.substring(item.lastIndexOf('=') + 1); + const filter = item.slice(0, item.indexOf('=')); + const option = item.slice(item.lastIndexOf('=') + 1); if (filter.search('categor') !== -1) { option.split(',').map((item) => categories.push(item.toString().toLowerCase())); return filter; diff --git a/lib/routes/misskey/home-timeline.ts b/lib/routes/misskey/home-timeline.ts index 4e389492bdd7..c869e93594a3 100644 --- a/lib/routes/misskey/home-timeline.ts +++ b/lib/routes/misskey/home-timeline.ts @@ -3,7 +3,7 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { queryToBoolean } from '@/utils/readable-social'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import utils from './utils'; export const route: Route = { diff --git a/lib/routes/misskey/user-timeline.ts b/lib/routes/misskey/user-timeline.ts index bd6dcd71c0eb..875a3f2f5203 100644 --- a/lib/routes/misskey/user-timeline.ts +++ b/lib/routes/misskey/user-timeline.ts @@ -3,7 +3,7 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import { Data, Route, ViewType } from '@/types'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import utils from './utils'; export const route: Route = { diff --git a/lib/routes/msn/index.ts b/lib/routes/msn/index.ts index aff863e1330f..edbd542128f2 100644 --- a/lib/routes/msn/index.ts +++ b/lib/routes/msn/index.ts @@ -35,7 +35,7 @@ export const route: Route = { const { market, name, id } = ctx.req.param(); let truncatedId = id; if (truncatedId.startsWith('sr-')) { - truncatedId = truncatedId.substring(3); + truncatedId = truncatedId.slice(3); } const pageData = await ofetch(`https://www.msn.com/${market}/channel/source/${name}/${id}`); @@ -54,7 +54,7 @@ export const route: Route = { const parsedArticleUrl = URL.parse(articleUrl); let articleId = parsedArticleUrl?.pathname.split('/').pop(); if (articleId?.startsWith('ar-')) { - articleId = articleId.substring(3); + articleId = articleId.slice(3); const fetchedArticleContentHtml = (await cache.tryGet(articleId, async () => { const articleData = await ofetch(`https://assets.msn.com/content/view/v2/Detail/${market}/${articleId}`); return articleData.body; diff --git a/lib/routes/mymusicsheet/usersheets.ts b/lib/routes/mymusicsheet/usersheets.ts index 75d75c30a56f..c9464468af5a 100644 --- a/lib/routes/mymusicsheet/usersheets.ts +++ b/lib/routes/mymusicsheet/usersheets.ts @@ -110,7 +110,7 @@ async function handler(ctx) { if (item.price === 0) { finalPrice = 'Free'; - } else if (!isNaN(price) && isFinite(price)) { + } else if (!Number.isNaN(price) && Number.isFinite(price)) { const rate = rates[iso]; if (rate) { finalPrice = `${(price * rate).toFixed(2)} ${iso}`; diff --git a/lib/routes/newzmz/index.ts b/lib/routes/newzmz/index.ts index 8d91f0e1bb2c..647339359363 100644 --- a/lib/routes/newzmz/index.ts +++ b/lib/routes/newzmz/index.ts @@ -41,7 +41,7 @@ async function handler(ctx) { // then consider it as the id of a movie or TV show; // otherwise, consider it as the id for the category. - const isCategory = !isNaN(id); + const isCategory = !Number.isNaN(id); const currentUrl = new URL(isCategory ? 'index.html' : `details-${id}.html`, rootUrl).href; diff --git a/lib/routes/openai/chatgpt.ts b/lib/routes/openai/chatgpt.ts index 7a43cae0809b..2724b9ac2f89 100644 --- a/lib/routes/openai/chatgpt.ts +++ b/lib/routes/openai/chatgpt.ts @@ -81,7 +81,7 @@ async function handler() { const matchesPubDate = heading.match(/\((\w+\s+\d{1,2})\)$/); // 实现:当年度交替时,年份减去 1 if (matchesPubDate !== null) { - const curMonth = 1 + 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(',').indexOf(matchesPubDate[1].substring(0, 3)); + const curMonth = 1 + 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(',').indexOf(matchesPubDate[1].slice(0, 3)); if (prevMonth !== -1 && prevMonth < curMonth) { year--; // 年度交替:上一个月份数小于当前月份数;但排除 prevMonth==-1 的初始化情况 } diff --git a/lib/routes/osu/beatmaps/latest-ranked.ts b/lib/routes/osu/beatmaps/latest-ranked.ts index 79c4b38f0306..29eeb21b1a67 100644 --- a/lib/routes/osu/beatmaps/latest-ranked.ts +++ b/lib/routes/osu/beatmaps/latest-ranked.ts @@ -233,9 +233,9 @@ async function handler(ctx): Promise { if (difficultyLimits && difficultyLimits.length > 0 && difficultyLimits.length < 2) { for (const dfLimit of difficultyLimits) { if (dfLimit.startsWith('U')) { - upperLimit = Number.parseFloat(dfLimit.substring(1)); + upperLimit = Number.parseFloat(dfLimit.slice(1)); } else if (dfLimit.startsWith('L')) { - lowerLimit = Number.parseFloat(dfLimit.substring(1)); + lowerLimit = Number.parseFloat(dfLimit.slice(1)); } } diff --git a/lib/routes/pixiv/api/get-ranking.ts b/lib/routes/pixiv/api/get-ranking.ts index 5c169df44ec3..b7fd154d7b9a 100644 --- a/lib/routes/pixiv/api/get-ranking.ts +++ b/lib/routes/pixiv/api/get-ranking.ts @@ -1,6 +1,6 @@ import got from '../pixiv-got'; import { maskHeader } from '../constants'; -import assert from 'assert'; +import assert from 'node:assert'; import queryString from 'query-string'; const allowMode = new Set(['day', 'week', 'month', 'day_male', 'day_female', 'day_ai', 'week_original', 'week_rookie', 'day_r18', 'day_r18_ai', 'day_male_r18', 'day_female_r18', 'week_r18', 'week_r18g']); diff --git a/lib/routes/pixiv/pixiv-got.ts b/lib/routes/pixiv/pixiv-got.ts index 847439d2a977..a935500c827c 100644 --- a/lib/routes/pixiv/pixiv-got.ts +++ b/lib/routes/pixiv/pixiv-got.ts @@ -1,4 +1,4 @@ -import tls from 'tls'; +import tls from 'node:tls'; import ipRegex from 'ip-regex'; import got from '@/utils/got'; import logger from '@/utils/logger'; diff --git a/lib/routes/pornhub/category.ts b/lib/routes/pornhub/category.ts index c3f8fe392a79..7264f19d99a1 100644 --- a/lib/routes/pornhub/category.ts +++ b/lib/routes/pornhub/category.ts @@ -32,8 +32,8 @@ async function handler(ctx) { return data.categories; }); - const categoryId = isNaN(category) ? categories.find((item) => item.category === category)?.id : category; - const categoryName = isNaN(category) ? category : categories.find((item) => item.id === Number.parseInt(category)).category; + const categoryId = Number.isNaN(category) ? categories.find((item) => item.category === category)?.id : category; + const categoryName = Number.isNaN(category) ? category : categories.find((item) => item.id === Number.parseInt(category)).category; const response = await cache.tryGet( `pornhub:category:${categoryName}`, diff --git a/lib/routes/qingting/podcast.ts b/lib/routes/qingting/podcast.ts index 5df881379fcd..ce4e4be5d1cb 100644 --- a/lib/routes/qingting/podcast.ts +++ b/lib/routes/qingting/podcast.ts @@ -1,6 +1,6 @@ import type { DataItem, Route } from '@/types'; import cache from '@/utils/cache'; -import crypto from 'crypto'; +import crypto from 'node:crypto'; import ofetch from '@/utils/ofetch'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/qoo-app/news.ts b/lib/routes/qoo-app/news.ts index 6c39b1626b1d..81b4e9c03844 100644 --- a/lib/routes/qoo-app/news.ts +++ b/lib/routes/qoo-app/news.ts @@ -43,7 +43,7 @@ async function handler(ctx) { return { title: item.title.rendered, - link: item.link.substring(0, item.link.lastIndexOf('/')), + link: item.link.slice(0, item.link.lastIndexOf('/')), description: $.html(), pubDate: parseDate(item.date_gmt), }; diff --git a/lib/routes/rsshub/routes.ts b/lib/routes/rsshub/routes.ts index 0090d5c0a280..02678d3b7439 100644 --- a/lib/routes/rsshub/routes.ts +++ b/lib/routes/rsshub/routes.ts @@ -97,7 +97,7 @@ async function handler(ctx) { return { title: `${h2Title.text().trim()} - ${h3Title.text().trim()}`, description: $item.html()?.replaceAll(//g, ''), - link: `https://docs.rsshub.app/${lang}routes/${type}#${encodeURIComponent(h2Title.find('.header-anchor').attr('href') && h3Title.find('.header-anchor').attr('href')?.substring(1))}`, + link: `https://docs.rsshub.app/${lang}routes/${type}#${encodeURIComponent(h2Title.find('.header-anchor').attr('href') && h3Title.find('.header-anchor').attr('href')?.slice(1))}`, guid: $item.attr('id'), }; }), diff --git a/lib/routes/sara/index.ts b/lib/routes/sara/index.ts index 53ad1de1812c..27520482ac04 100644 --- a/lib/routes/sara/index.ts +++ b/lib/routes/sara/index.ts @@ -44,7 +44,7 @@ export const route: Route = { title: a.attr('title'), }; }); - const items = (await Promise.all(list.map(getFeedItem))) as DataItem[]; + const items = (await Promise.all(list.map((elem) => getFeedItem(elem)))) as DataItem[]; return { title: typeMap[type], link: url, diff --git a/lib/routes/scut/jwc/news.ts b/lib/routes/scut/jwc/news.ts index 2643f2163e73..f286e805cb76 100644 --- a/lib/routes/scut/jwc/news.ts +++ b/lib/routes/scut/jwc/news.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import * as url from 'node:url'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; const baseUrl = 'http://jw.scut.edu.cn'; const refererUrl = baseUrl + '/dist/'; diff --git a/lib/routes/scut/jwc/notice.ts b/lib/routes/scut/jwc/notice.ts index 0dd85213c7d3..bbd6794ea11b 100644 --- a/lib/routes/scut/jwc/notice.ts +++ b/lib/routes/scut/jwc/notice.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import * as url from 'node:url'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; const baseUrl = 'http://jw.scut.edu.cn'; const refererUrl = baseUrl + '/dist/'; diff --git a/lib/routes/scut/jwc/school.ts b/lib/routes/scut/jwc/school.ts index 8e2c46200586..ad41dc2fbbfb 100644 --- a/lib/routes/scut/jwc/school.ts +++ b/lib/routes/scut/jwc/school.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import * as url from 'node:url'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; const baseUrl = 'http://jw.scut.edu.cn'; const refererUrl = baseUrl + '/dist/'; diff --git a/lib/routes/shopify/apps/[handle].reviews.ts b/lib/routes/shopify/apps/[handle].reviews.ts index c8b37a889bab..91e4ed8619ea 100644 --- a/lib/routes/shopify/apps/[handle].reviews.ts +++ b/lib/routes/shopify/apps/[handle].reviews.ts @@ -59,7 +59,7 @@ async function handler(ctx: Context): Promise { description, _extra: { - ratting_value: Number($review1.find('div[role="img"]').attr('aria-label')?.substring(0, 1)), + ratting_value: Number($review1.find('div[role="img"]').attr('aria-label')?.slice(0, 1)), location: $review2.find('div.tw-text-fg-primary + div').text().trim(), author, }, diff --git a/lib/routes/sicau/jiaowu.ts b/lib/routes/sicau/jiaowu.ts index 565aabbe3010..cffc81544a79 100644 --- a/lib/routes/sicau/jiaowu.ts +++ b/lib/routes/sicau/jiaowu.ts @@ -40,7 +40,7 @@ export const route: Route = { const a = $(item); const href = a.attr('href')!; return { - link: `${baseUrl}/${href.substring(href.lastIndexOf('/') + 1)}`, + link: `${baseUrl}/${href.slice(href.lastIndexOf('/') + 1)}`, } as DataItem; }); diff --git a/lib/routes/spotify/saved.ts b/lib/routes/spotify/saved.ts index a288c36ef0ce..5ff59dae6c4a 100644 --- a/lib/routes/spotify/saved.ts +++ b/lib/routes/spotify/saved.ts @@ -45,7 +45,7 @@ async function handler(ctx) { const token = await utils.getPrivateToken(); const limit = ctx.req.param('limit'); - const pageSize = isNaN(Number.parseInt(limit)) ? 50 : Number.parseInt(limit); + const pageSize = Number.isNaN(Number.parseInt(limit)) ? 50 : Number.parseInt(limit); const itemsResponse = await ofetch(`https://api.spotify.com/v1/me/tracks?limit=${pageSize}`, { method: 'GET', diff --git a/lib/routes/stheadline/std/realtime.ts b/lib/routes/stheadline/std/realtime.ts index 7e5b9155dd5c..b678fad05551 100644 --- a/lib/routes/stheadline/std/realtime.ts +++ b/lib/routes/stheadline/std/realtime.ts @@ -27,7 +27,7 @@ async function handler(ctx) { return { title: item.attr('title'), link: item.attr('href'), - guid: item.attr('href').substring(0, item.attr('href').lastIndexOf('/')), + guid: item.attr('href').slice(0, item.attr('href').lastIndexOf('/')), }; }); diff --git a/lib/routes/swpu/cjxy.ts b/lib/routes/swpu/cjxy.ts index e12ddcbc62ae..0b65c05995f2 100644 --- a/lib/routes/swpu/cjxy.ts +++ b/lib/routes/swpu/cjxy.ts @@ -40,7 +40,7 @@ async function handler(ctx) { const $ = load(res.data); let title = $('title').text(); - title = title.substring(0, title.indexOf('-')); + title = title.slice(0, title.indexOf('-')); const items = $('.main_conRCb > ul > li') .toArray() diff --git a/lib/routes/swpu/dean.ts b/lib/routes/swpu/dean.ts index 3d4ad7c27602..f2c2f4bae776 100644 --- a/lib/routes/swpu/dean.ts +++ b/lib/routes/swpu/dean.ts @@ -41,7 +41,7 @@ async function handler(ctx): Promise { const $ = load(res.data); let title = $('.r_list > h3').text(); - title = title.substring(title.indexOf(':') + 1); + title = title.slice(title.indexOf(':') + 1); // 获取标题、时间及链接 const items: DataItem[] = $('.r_list > ul > li') diff --git a/lib/routes/swpu/dxy.ts b/lib/routes/swpu/dxy.ts index b446be8d6de1..535d6cffb880 100644 --- a/lib/routes/swpu/dxy.ts +++ b/lib/routes/swpu/dxy.ts @@ -43,7 +43,7 @@ async function handler(ctx): Promise { const $ = load(res.data); let title = $('title').text(); - title = title.substring(0, title.indexOf('-')); + title = title.slice(0, title.indexOf('-')); // 获取标题、时间及链接 const items: DataItem[] = $('tr[height="20"]') diff --git a/lib/routes/swpu/is.ts b/lib/routes/swpu/is.ts index 71fba7a77f30..c4baf573388b 100644 --- a/lib/routes/swpu/is.ts +++ b/lib/routes/swpu/is.ts @@ -40,7 +40,7 @@ async function handler(ctx) { const $ = load(res.data); let title = $('title').text(); - title = title.substring(0, title.indexOf('-')); + title = title.slice(0, title.indexOf('-')); const items = $('tr[height="20"]') .toArray() diff --git a/lib/routes/szftedu/gonggao.ts b/lib/routes/szftedu/gonggao.ts index 0cda89550ff0..359451db1fa0 100644 --- a/lib/routes/szftedu/gonggao.ts +++ b/lib/routes/szftedu/gonggao.ts @@ -43,7 +43,7 @@ async function handler() { lists.map((item) => cache.tryGet(item.link, async () => { const thisUrl = item.link; - const trueLink = thisUrl.includes('http') ? thisUrl : host + thisUrl.substring(1); + const trueLink = thisUrl.includes('http') ? thisUrl : host + thisUrl.slice(1); const response = await got(trueLink); const $ = load(response.data); item.description = thisUrl.includes('http') ? $('#page-content').html() : $('div.TRS_Editor').html(); diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index cb43b74370f4..2d812032c0c1 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -6,7 +6,7 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import { fallback, queryToBoolean } from '@/utils/readable-social'; import tglibchannel from './tglib/channel'; diff --git a/lib/routes/telegram/scripts/get-telegram-session.mjs b/lib/routes/telegram/scripts/get-telegram-session.mjs index 9d1a830c14ce..1079a3117669 100644 --- a/lib/routes/telegram/scripts/get-telegram-session.mjs +++ b/lib/routes/telegram/scripts/get-telegram-session.mjs @@ -1,6 +1,6 @@ import { TelegramClient } from 'telegram'; import { StringSession } from 'telegram/sessions/index.js'; -import readline from 'readline'; +import readline from 'node:readline'; import winston from 'winston'; function userInput(question) { diff --git a/lib/routes/telegram/tglib/channel.ts b/lib/routes/telegram/tglib/channel.ts index 00333825b8fe..936872c96f57 100644 --- a/lib/routes/telegram/tglib/channel.ts +++ b/lib/routes/telegram/tglib/channel.ts @@ -1,6 +1,6 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; import { client, decodeMedia, getClient, getFilename, getMediaLink, streamDocument, streamThumbnail } from './client'; -import { returnBigInt as bigInt } from 'telegram/Helpers.js'; +import { returnBigInt } from 'telegram/Helpers.js'; import { HTMLParser } from 'telegram/extensions/html.js'; import { DataItem } from '@/types'; import type { Api } from 'telegram'; @@ -19,7 +19,7 @@ function parseRange(range, length) { const range = seg .split('-', 2) .filter((v) => !!v) - .map(bigInt); + .map((elem) => returnBigInt(elem)); if (range.length < 2) { if (seg.startsWith('-')) { range.unshift(0); @@ -141,7 +141,7 @@ export default async function handler(ctx) { description += `

${HTMLParser.unparse(message.message, message.entities).replaceAll('\n', '
')}

`; } - const title = message.text ? message.text.substring(0, 80) + (message.text.length > 80 ? '...' : '') : new Date(message.date * 1000).toUTCString(); + const title = message.text ? message.text.slice(0, 80) + (message.text.length > 80 ? '...' : '') : new Date(message.date * 1000).toUTCString(); item.push({ title, diff --git a/lib/routes/twitter/api/mobile-api/login.ts b/lib/routes/twitter/api/mobile-api/login.ts index 880ae0b7910a..f266877ec09a 100644 --- a/lib/routes/twitter/api/mobile-api/login.ts +++ b/lib/routes/twitter/api/mobile-api/login.ts @@ -3,7 +3,7 @@ import { bearerToken, guestActivateUrl } from './constants'; import got from '@/utils/got'; import ofetch from '@/utils/ofetch'; -import crypto from 'crypto'; +import crypto from 'node:crypto'; import { v5 as uuidv5 } from 'uuid'; import { authenticator } from 'otplib'; import logger from '@/utils/logger'; diff --git a/lib/routes/twitter/utils.ts b/lib/routes/twitter/utils.ts index bbd983404ddf..b954ae3abbf8 100644 --- a/lib/routes/twitter/utils.ts +++ b/lib/routes/twitter/utils.ts @@ -1,4 +1,4 @@ -import URL from 'url'; +import URL from 'node:url'; import { config } from '@/config'; import { TwitterApi } from 'twitter-api-v2'; import { fallback, queryToBoolean, queryToInteger } from '@/utils/readable-social'; diff --git a/lib/routes/uber/blog.ts b/lib/routes/uber/blog.ts index d282628514e0..1fbb51226c9a 100644 --- a/lib/routes/uber/blog.ts +++ b/lib/routes/uber/blog.ts @@ -38,7 +38,7 @@ async function handler(ctx) { } let pages = await Promise.all( - [...Array(maxPage).keys()].map((pageIdx) => + [...Array.from({ length: maxPage }).keys()].map((pageIdx) => got(`${apiURL}/wp-json/blog/v1/data`, { searchParams: { page: pageIdx + 1, diff --git a/lib/routes/ustb/tj/news.ts b/lib/routes/ustb/tj/news.ts index 294239e35898..96cb77453911 100644 --- a/lib/routes/ustb/tj/news.ts +++ b/lib/routes/ustb/tj/news.ts @@ -27,7 +27,7 @@ function getNews(data) { .map((elem) => ({ link: baseUrl + elem.attribs.href, title: elem.children[0].data, - pubDate: timezone(parseDate(elem.attribs.href.split('/')[3].split('.')[0].substring(0, 14), 'YYYYMMDDHHmmss'), 8), + pubDate: timezone(parseDate(elem.attribs.href.split('/')[3].split('.')[0].slice(0, 14), 'YYYYMMDDHHmmss'), 8), })); } diff --git a/lib/routes/weibo/friends.ts b/lib/routes/weibo/friends.ts index 119615649f63..6f3207ae3696 100644 --- a/lib/routes/weibo/friends.ts +++ b/lib/routes/weibo/friends.ts @@ -1,6 +1,6 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import got from '@/utils/got'; import { config } from '@/config'; import weiboUtils from './utils'; diff --git a/lib/routes/weibo/group.ts b/lib/routes/weibo/group.ts index cfbd988fb1df..bc7963bf31ca 100644 --- a/lib/routes/weibo/group.ts +++ b/lib/routes/weibo/group.ts @@ -1,6 +1,6 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import got from '@/utils/got'; import { config } from '@/config'; import weiboUtils from './utils'; diff --git a/lib/routes/weibo/keyword.ts b/lib/routes/weibo/keyword.ts index 27baeea1aa6e..22a39d750973 100644 --- a/lib/routes/weibo/keyword.ts +++ b/lib/routes/weibo/keyword.ts @@ -1,6 +1,6 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import got from '@/utils/got'; import weiboUtils from './utils'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/weibo/search/hot.ts b/lib/routes/weibo/search/hot.ts index 5665b48381fe..2b2d78f015b4 100644 --- a/lib/routes/weibo/search/hot.ts +++ b/lib/routes/weibo/search/hot.ts @@ -140,7 +140,7 @@ function seekContent(clist) { if (curitem.card_type === 9) { const tbpic = curitem.mblog.thumbnail_pic ?? ''; const index = tbpic.lastIndexOf('/'); - const thumbfolder = tbpic.substring(0, index + 1); + const thumbfolder = tbpic.slice(0, index + 1); const curcontent = load(curitem.mblog.text); if (wpic === 'true') { diff --git a/lib/routes/weibo/timeline.ts b/lib/routes/weibo/timeline.ts index 5303bc23afd2..2bdb2c474a9f 100644 --- a/lib/routes/weibo/timeline.ts +++ b/lib/routes/weibo/timeline.ts @@ -1,6 +1,6 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; diff --git a/lib/routes/weibo/user-bookmarks.ts b/lib/routes/weibo/user-bookmarks.ts index 8ce63c4b6351..55ffccecfa33 100644 --- a/lib/routes/weibo/user-bookmarks.ts +++ b/lib/routes/weibo/user-bookmarks.ts @@ -1,6 +1,6 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import got from '@/utils/got'; import { config } from '@/config'; import weiboUtils from './utils'; diff --git a/lib/routes/weibo/user.ts b/lib/routes/weibo/user.ts index 7a1f68ec1969..21fd03ddea41 100644 --- a/lib/routes/weibo/user.ts +++ b/lib/routes/weibo/user.ts @@ -1,6 +1,6 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import got from '@/utils/got'; import weiboUtils from './utils'; import { config } from '@/config'; @@ -129,6 +129,7 @@ async function handler(ctx) { // TODO: getShowData() on demand? The API seems to return most things we need since 2022/05/21. // Need more investigation, pending for now since the current version works fine. let { bid } = item.mblog; + const { retweeted_status, created_at } = item.mblog; if (bid === '') { const url = new URL(item.scheme); bid = url.searchParams.get('mblogid'); @@ -141,20 +142,20 @@ async function handler(ctx) { item.mblog.text = data.text; item.mblog.created_at = parseDate(data.created_at); item.mblog.pics = data.pics; - if (item.mblog.retweeted_status && data.retweeted_status) { - item.mblog.retweeted_status.created_at = data.retweeted_status.created_at; + if (retweeted_status && data.retweeted_status) { + retweeted_status.created_at = data.retweeted_status.created_at; } } else { - item.mblog.created_at = timezone(item.mblog.created_at, +8); + item.mblog.created_at = timezone(created_at, +8); } // 转发的长微博处理 - const retweet = item.mblog.retweeted_status; + const retweet = retweeted_status; if (retweet && retweet.isLongText) { // TODO: unify cache key and ... const retweetData = await cache.tryGet(`weibo:retweeted:${retweet.user.id}:${retweet.bid}`, () => weiboUtils.getShowData(retweet.user.id, retweet.bid)); if (retweetData !== undefined && retweetData.text) { - item.mblog.retweeted_status.text = retweetData.text; + retweeted_status.text = retweetData.text; } } @@ -164,7 +165,7 @@ async function handler(ctx) { // 视频的处理 if (displayVideo === '1') { // 含被转发微博时需要从被转发微博中获取视频 - description = item.mblog.retweeted_status ? weiboUtils.formatVideo(description, item.mblog.retweeted_status) : weiboUtils.formatVideo(description, item.mblog); + description = retweeted_status ? weiboUtils.formatVideo(description, retweeted_status) : weiboUtils.formatVideo(description, item.mblog); } // 评论的处理 @@ -175,7 +176,7 @@ async function handler(ctx) { // 文章的处理 if (displayArticle === '1') { // 含被转发微博时需要从被转发微博中获取文章 - description = await (item.mblog.retweeted_status ? weiboUtils.formatArticle(ctx, description, item.mblog.retweeted_status) : weiboUtils.formatArticle(ctx, description, item.mblog)); + description = await (retweeted_status ? weiboUtils.formatArticle(ctx, description, retweeted_status) : weiboUtils.formatArticle(ctx, description, item.mblog)); } return { diff --git a/lib/routes/weibo/utils.ts b/lib/routes/weibo/utils.ts index 9de9514dbd5f..9d145388405e 100644 --- a/lib/routes/weibo/utils.ts +++ b/lib/routes/weibo/utils.ts @@ -1,5 +1,5 @@ import cache from '@/utils/cache'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import got from '@/utils/got'; import { load } from 'cheerio'; import { fallback, queryToBoolean, queryToInteger } from '@/utils/readable-social'; diff --git a/lib/routes/wtu/job.ts b/lib/routes/wtu/job.ts index 1b25025af00a..d732edb0129f 100644 --- a/lib/routes/wtu/job.ts +++ b/lib/routes/wtu/job.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import zlib from 'zlib'; +import zlib from 'node:zlib'; import { load } from 'cheerio'; const baseUrl = 'https://wtu.91wllm.com/'; @@ -31,8 +31,8 @@ function decodeData(str) { const substr2Num = Number.parseInt(match[3]); // 解压缩 const unzipContent = zlib.inflateSync(Buffer.from(compressedContent, 'base64')).toString('utf8'); - const content = Buffer.from(unzipContent.substring(substr1Num), 'base64'); - return content.toString('utf8').substring(substr2Num); + const content = Buffer.from(unzipContent.slice(substr1Num), 'base64'); + return content.toString('utf8').slice(substr2Num); } export const route: Route = { diff --git a/lib/routes/wzu/news.ts b/lib/routes/wzu/news.ts index 5a6aca24a143..6221715025e8 100644 --- a/lib/routes/wzu/news.ts +++ b/lib/routes/wzu/news.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; -import { URL } from 'url'; +import { URL } from 'node:url'; import { parseDate } from '@/utils/parse-date'; /* 新闻列表 diff --git a/lib/routes/xiaohongshu/user.ts b/lib/routes/xiaohongshu/user.ts index bf082925f3f3..9a5cb140dcec 100644 --- a/lib/routes/xiaohongshu/user.ts +++ b/lib/routes/xiaohongshu/user.ts @@ -1,6 +1,6 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; -import querystring from 'querystring'; +import querystring from 'node:querystring'; import { getUser, renderNotesFulltext, getUserWithCookie } from './util'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import { config } from '@/config'; diff --git a/lib/routes/xiaohongshu/util.ts b/lib/routes/xiaohongshu/util.ts index d35d48a0193f..b166ee5031f9 100644 --- a/lib/routes/xiaohongshu/util.ts +++ b/lib/routes/xiaohongshu/util.ts @@ -243,7 +243,7 @@ async function getUserWithCookie(url: string, cookie: string) { for (const item of state.user.notes.flat()) { const path = paths[index]; if (path && path.includes('?')) { - item.id = item.id + path?.substring(path.indexOf('?')); + item.id = item.id + path?.slice(path.indexOf('?')); } index = index + 1; } diff --git a/lib/routes/ximalaya/utils.ts b/lib/routes/ximalaya/utils.ts index 142e694dba45..65c42df6be56 100644 --- a/lib/routes/ximalaya/utils.ts +++ b/lib/routes/ximalaya/utils.ts @@ -1,4 +1,4 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; const getParams = (ep) => { const a1 = 'xkt3a41psizxrh9l'; const a = [ @@ -67,7 +67,7 @@ const getParams = (ep) => { a2.push(((3 & e) << 6) | n); } - const r1 = Array.from(Array(256), (v, i) => i); + const r1 = Array.from(Array.from({ length: 256 }), (v, i) => i); let i = ''; o = 0; diff --git a/lib/routes/yahoo/news/listid.ts b/lib/routes/yahoo/news/listid.ts index 76b449238079..2670ed56b59d 100644 --- a/lib/routes/yahoo/news/listid.ts +++ b/lib/routes/yahoo/news/listid.ts @@ -58,7 +58,7 @@ async function handler(ctx) { const author = items[0].author; const atIndex = author.indexOf('@'); // fing '@' - const source = atIndex === -1 ? author : author.substring(atIndex + 1).trim(); + const source = atIndex === -1 ? author : author.slice(atIndex + 1).trim(); // console.log(source); return { diff --git a/lib/routes/yilinzazhi/latest.ts b/lib/routes/yilinzazhi/latest.ts index 828caf48918f..38437e411153 100644 --- a/lib/routes/yilinzazhi/latest.ts +++ b/lib/routes/yilinzazhi/latest.ts @@ -68,7 +68,7 @@ async function handler(): Promise { .toArray() .map((aTag) => { const href = $$(aTag).attr('href')!; - const yearType = currentYear + href.substring(4, 5); + const yearType = currentYear + href.slice(4, 5); return { title: $$(aTag).text(), link: `${baseUrl}${currentYear}/yl${yearType}/${href}`, diff --git a/lib/routes/zaobao/util.ts b/lib/routes/zaobao/util.ts index c181826781c7..eeb86428350e 100644 --- a/lib/routes/zaobao/util.ts +++ b/lib/routes/zaobao/util.ts @@ -143,8 +143,8 @@ const orderContent = (parent) => { .toArray() .sort((a, b) => { const index = Buffer.from(base32.parse('GM======')).toString(); // substring(3) - a = Buffer.from(base32.parse(parent.find(a).data('s').substring(index))).toString(); - b = Buffer.from(base32.parse(parent.find(b).data('s').substring(index))).toString(); + a = Buffer.from(base32.parse(parent.find(a).data('s').slice(index))).toString(); + b = Buffer.from(base32.parse(parent.find(b).data('s').slice(index))).toString(); return a - b; }) .entries()) { diff --git a/lib/routes/zcool/user.ts b/lib/routes/zcool/user.ts index 2b5cc4dd549e..fd559efb9677 100644 --- a/lib/routes/zcool/user.ts +++ b/lib/routes/zcool/user.ts @@ -40,7 +40,7 @@ export const route: Route = { async function handler(ctx) { const uid = ctx.req.param('uid'); let pageUrl = `https://www.zcool.com.cn/u/${uid}`; - if (isNaN(uid)) { + if (Number.isNaN(uid)) { if (!isValidHost(uid)) { throw new InvalidParameterError('Invalid uid'); } diff --git a/lib/routes/zhibo8/luxiang.ts b/lib/routes/zhibo8/luxiang.ts index e2385b3d5cd8..14fd607d3705 100644 --- a/lib/routes/zhibo8/luxiang.ts +++ b/lib/routes/zhibo8/luxiang.ts @@ -38,7 +38,7 @@ async function handler(ctx) { return { title: `${item.previousSibling.data.replace(' | ', '')} ${$(item).text()}`, link: `${rootUrl}${href}`, - pubDate: timezone(parseDate(`${href.replace(`/${category}/`, '').substring(0, 4)} ${dateStr}`, 'YYYY M月D日'), +8), + pubDate: timezone(parseDate(`${href.replace(`/${category}/`, '').slice(0, 4)} ${dateStr}`, 'YYYY M月D日'), +8), }; }); }); diff --git a/lib/routes/zimuxia/portfolio.ts b/lib/routes/zimuxia/portfolio.ts index 7e59141ce281..4a20c1d2a08e 100644 --- a/lib/routes/zimuxia/portfolio.ts +++ b/lib/routes/zimuxia/portfolio.ts @@ -48,7 +48,7 @@ async function handler(ctx) { const $ = load(response.data); const items = $('a') - .filter((_, el) => $(el).attr('href')?.match(RegExp(linktype))) + .filter((_, el) => $(el).attr('href')?.match(new RegExp(linktype))) .toArray() .map((item) => { item = $(item); diff --git a/lib/utils/camelcase-keys.spec.ts b/lib/utils/camelcase-keys.spec.ts index af413905ddb2..35b3d073ee4d 100644 --- a/lib/utils/camelcase-keys.spec.ts +++ b/lib/utils/camelcase-keys.spec.ts @@ -65,7 +65,7 @@ describe('test camelcase keys', () => { value = undefined; expect(camelcaseKeys(value)).toBe(value); - value = Number.NaN; + value = NaN; expect(camelcaseKeys(value)).toBe(value); }); @@ -78,7 +78,7 @@ describe('test camelcase keys', () => { undefined, +0, -0, - Number.POSITIVE_INFINITY, + Infinity, { a_b: 1, }, @@ -92,7 +92,7 @@ describe('test camelcase keys', () => { undefined, +0, -0, - Number.POSITIVE_INFINITY, + Infinity, { aB: 1, }, diff --git a/lib/utils/common-utils.ts b/lib/utils/common-utils.ts index 7072132b999d..a1e44dfeb771 100644 --- a/lib/utils/common-utils.ts +++ b/lib/utils/common-utils.ts @@ -1,6 +1,6 @@ import { parseDate } from '@/utils/parse-date'; import title from 'title'; -import os from 'os'; +import os from 'node:os'; // convert a string into title case const toTitleCase = (str: string) => title(str); diff --git a/lib/utils/git-hash.ts b/lib/utils/git-hash.ts index 9a8131696983..e33b350f3269 100644 --- a/lib/utils/git-hash.ts +++ b/lib/utils/git-hash.ts @@ -1,4 +1,4 @@ -import { execSync } from 'child_process'; +import { execSync } from 'node:child_process'; let gitHash = process.env.HEROKU_SLUG_COMMIT?.slice(0, 8) || process.env.VERCEL_GIT_COMMIT_SHA?.slice(0, 8); let gitDate: Date | undefined; diff --git a/lib/utils/helpers.ts b/lib/utils/helpers.ts index bc222464e970..b8c2f6995aac 100644 --- a/lib/utils/helpers.ts +++ b/lib/utils/helpers.ts @@ -1,4 +1,4 @@ -import { fileURLToPath } from 'url'; +import { fileURLToPath } from 'node:url'; import path from 'node:path'; import { stringifyQuery } from 'ufo'; diff --git a/lib/utils/md5.ts b/lib/utils/md5.ts index 432f25b98bef..752a56885bea 100644 --- a/lib/utils/md5.ts +++ b/lib/utils/md5.ts @@ -1,4 +1,4 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; export default function md5(date: string) { return crypto.createHash('md5').update(date).digest('hex'); diff --git a/lib/utils/rand-user-agent.test.ts b/lib/utils/rand-user-agent.test.ts index c459190dd6f6..e9566d08085f 100644 --- a/lib/utils/rand-user-agent.test.ts +++ b/lib/utils/rand-user-agent.test.ts @@ -7,14 +7,14 @@ const mobileUa = randUserAgent({ browser: 'mobile safari', os: 'ios', device: 'm describe('rand-user-agent', () => { it('chrome should not include headlesschrome', () => { - const uaArr = Array(100) + const uaArr = Array.from({ length: 100 }) .fill(null) .map(() => randUserAgent({ browser: 'chrome', os: 'windows' })); const match = uaArr.find((e) => !!(e.includes('Chrome-Lighthouse') || e.includes('HeadlessChrome'))); expect(match).toBeFalsy(); }); it('chrome should not include electron', () => { - const uaArr = Array(100) + const uaArr = Array.from({ length: 100 }) .fill(null) .map(() => randUserAgent({ browser: 'chrome', os: 'windows' })); const match = uaArr.find((e) => !!e.includes('Electron')); diff --git a/lib/utils/timezone.ts b/lib/utils/timezone.ts index 2e5439fdd1b8..7ed3cb7b1705 100644 --- a/lib/utils/timezone.ts +++ b/lib/utils/timezone.ts @@ -1,4 +1,4 @@ -import { strict as assert } from 'assert'; +import { strict as assert } from 'node:assert'; const millisInAnHour = 60 * 60 * 1000; const serverTimezone = -new Date().getTimezoneOffset() / 60; diff --git a/lib/utils/wechat-mp.ts b/lib/utils/wechat-mp.ts index 24537c33f2db..93545d9390ad 100644 --- a/lib/utils/wechat-mp.ts +++ b/lib/utils/wechat-mp.ts @@ -127,7 +127,7 @@ const showTypeMap = { const showTypeMapReverse = Object.fromEntries(Object.entries(showTypeMap).map(([k, v]) => [v, k])); class ExtractMetadata { - private static genAssignmentRegExp = (varName: string, valuePattern: string, assignPattern: string) => RegExp(`\\b${varName}\\s*${assignPattern}\\s*(?["'])(?${valuePattern})\\k`, 'mg'); + private static genAssignmentRegExp = (varName: string, valuePattern: string, assignPattern: string) => new RegExp(`\\b${varName}\\s*${assignPattern}\\s*(?["'])(?${valuePattern})\\k`, 'mg'); private static genExtractFunc = ( varName: string, From 6a8cdeb6ec14d67ad277b53f618c078e031e26cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 08:31:09 +0000 Subject: [PATCH 0507/2658] chore(deps-dev): bump the typescript-eslint group with 2 updates (#18966) Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.31.0 to 8.31.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.31.1/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.31.0 to 8.31.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.31.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.31.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-version: 8.31.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +-- pnpm-lock.yaml | 98 +++++++++++++++++++++++++------------------------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/package.json b/package.json index 757b4fbc2b25..7df7f8f649e8 100644 --- a/package.json +++ b/package.json @@ -167,8 +167,8 @@ "@types/supertest": "6.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.31.0", - "@typescript-eslint/parser": "8.31.0", + "@typescript-eslint/eslint-plugin": "8.31.1", + "@typescript-eslint/parser": "8.31.1", "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.38.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1dca3139b9ed..f5c7d2a067ca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -364,11 +364,11 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.31.0 - version: 8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + specifier: 8.31.1 + version: 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/parser': - specifier: 8.31.0 - version: 8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + specifier: 8.31.1 + version: 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -2479,16 +2479,16 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.31.0': - resolution: {integrity: sha512-evaQJZ/J/S4wisevDvC1KFZkPzRetH8kYZbkgcTRyql3mcKsf+ZFDV1BVWUGTCAW5pQHoqn5gK5b8kn7ou9aFQ==} + '@typescript-eslint/eslint-plugin@8.31.1': + resolution: {integrity: sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@8.31.0': - resolution: {integrity: sha512-67kYYShjBR0jNI5vsf/c3WG4u+zDnCTHTPqVMQguffaWWFs7artgwKmfwdifl+r6XyM5LYLas/dInj2T0SgJyw==} + '@typescript-eslint/parser@8.31.1': + resolution: {integrity: sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2498,12 +2498,12 @@ packages: resolution: {integrity: sha512-u2oITX3BJwzWCapoZ/pXw6BCOl8rJP4Ij/3wPoGvY8XwvXflOzd1kLrDUUUAIEdJSFh+ASwdTHqtan9xSg8buw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.31.0': - resolution: {integrity: sha512-knO8UyF78Nt8O/B64i7TlGXod69ko7z6vJD9uhSlm0qkAbGeRUSudcm0+K/4CrRjrpiHfBCjMWlc08Vav1xwcw==} + '@typescript-eslint/scope-manager@8.31.1': + resolution: {integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.31.0': - resolution: {integrity: sha512-DJ1N1GdjI7IS7uRlzJuEDCgDQix3ZVYVtgeWEyhyn4iaoitpMBX6Ndd488mXSx0xah/cONAkEaYyylDyAeHMHg==} + '@typescript-eslint/type-utils@8.31.1': + resolution: {integrity: sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2513,8 +2513,8 @@ packages: resolution: {integrity: sha512-bn4WS1bkKEjx7HqiwG2JNB3YJdC1q6Ue7GyGlwPHyt0TnVq6TtD/hiOdTZt71sq0s7UzqBFXD8t8o2e63tXgwA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.31.0': - resolution: {integrity: sha512-Ch8oSjVyYyJxPQk8pMiP2FFGYatqXQfQIaMp+TpuuLlDachRWpUAeEu1u9B/v/8LToehUIWyiKcA/w5hUFRKuQ==} + '@typescript-eslint/types@8.31.1': + resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@8.28.0': @@ -2523,8 +2523,8 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/typescript-estree@8.31.0': - resolution: {integrity: sha512-xLmgn4Yl46xi6aDSZ9KkyfhhtnYI15/CvHbpOy/eR5NWhK/BK8wc709KKwhAR0m4ZKRP7h07bm4BWUYOCuRpQQ==} + '@typescript-eslint/typescript-estree@8.31.1': + resolution: {integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' @@ -2536,8 +2536,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.31.0': - resolution: {integrity: sha512-qi6uPLt9cjTFxAb1zGNgTob4x9ur7xC6mHQJ8GwEzGMGE9tYniublmJaowOJ9V2jUzxrltTPfdG2nKlWsq0+Ww==} + '@typescript-eslint/utils@8.31.1': + resolution: {integrity: sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2547,8 +2547,8 @@ packages: resolution: {integrity: sha512-hbn8SZ8w4u2pRwgQ1GlUrPKE+t2XvcCW5tTRF7j6SMYIuYG37XuzIW44JCZPa36evi0Oy2SnM664BlIaAuQcvg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.31.0': - resolution: {integrity: sha512-QcGHmlRHWOl93o64ZUMNewCdwKGU6WItOU52H0djgNmn1EOrhVudrDzXz4OycCRSCPwFCDrE2iIt5vmuUdHxuQ==} + '@typescript-eslint/visitor-keys@8.31.1': + resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.3.0': @@ -8574,14 +8574,14 @@ snapshots: '@types/node': 22.15.3 optional: true - '@typescript-eslint/eslint-plugin@8.31.0(@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.31.0 - '@typescript-eslint/type-utils': 8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/utils': 8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.31.0 + '@typescript-eslint/parser': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/type-utils': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 eslint: 9.25.1(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 @@ -8591,12 +8591,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/scope-manager': 8.31.0 - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.31.0 + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.4.0 eslint: 9.25.1(jiti@2.4.2) typescript: 5.8.3 @@ -8608,15 +8608,15 @@ snapshots: '@typescript-eslint/types': 8.28.0 '@typescript-eslint/visitor-keys': 8.28.0 - '@typescript-eslint/scope-manager@8.31.0': + '@typescript-eslint/scope-manager@8.31.1': dependencies: - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/visitor-keys': 8.31.0 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 - '@typescript-eslint/type-utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) debug: 4.4.0 eslint: 9.25.1(jiti@2.4.2) ts-api-utils: 2.1.0(typescript@5.8.3) @@ -8626,7 +8626,7 @@ snapshots: '@typescript-eslint/types@8.28.0': {} - '@typescript-eslint/types@8.31.0': {} + '@typescript-eslint/types@8.31.1': {} '@typescript-eslint/typescript-estree@8.28.0(typescript@5.8.3)': dependencies: @@ -8642,10 +8642,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.31.0(typescript@5.8.3)': + '@typescript-eslint/typescript-estree@8.31.1(typescript@5.8.3)': dependencies: - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/visitor-keys': 8.31.0 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.4.0 fast-glob: 3.3.3 is-glob: 4.0.3 @@ -8667,12 +8667,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/utils@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) - '@typescript-eslint/scope-manager': 8.31.0 - '@typescript-eslint/types': 8.31.0 - '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) eslint: 9.25.1(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: @@ -8683,9 +8683,9 @@ snapshots: '@typescript-eslint/types': 8.28.0 eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.31.0': + '@typescript-eslint/visitor-keys@8.31.1': dependencies: - '@typescript-eslint/types': 8.31.0 + '@typescript-eslint/types': 8.31.1 eslint-visitor-keys: 4.2.0 '@ungap/structured-clone@1.3.0': {} @@ -9943,7 +9943,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.4.0 + debug: 4.3.4 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -11689,7 +11689,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.3 - debug: 4.4.0 + debug: 4.3.4 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 From 9e5eef2080dd872b2a7e2858b243f3d38e487c12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 08:34:30 +0000 Subject: [PATCH 0508/2658] chore(deps): bump tsx from 4.19.3 to 4.19.4 (#18968) Bumps [tsx](https://github.com/privatenumber/tsx) from 4.19.3 to 4.19.4. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.19.3...v4.19.4) --- updated-dependencies: - dependency-name: tsx dependency-version: 4.19.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 218 ++++++++++++++++++++++++------------------------- 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/package.json b/package.json index 7df7f8f649e8..1532083e274a 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "tldts": "7.0.4", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.1.2", - "tsx": "4.19.3", + "tsx": "4.19.4", "twitter-api-v2": "1.22.0", "ufo": "1.6.1", "undici": "6.21.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f5c7d2a067ca..cfe8b20ae958 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -255,8 +255,8 @@ importers: specifier: 5.1.2 version: 5.1.2 tsx: - specifier: 4.19.3 - version: 4.19.3 + specifier: 4.19.4 + version: 4.19.4 twitter-api-v2: specifier: 1.22.0 version: 1.22.0 @@ -1077,8 +1077,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.25.1': - resolution: {integrity: sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==} + '@esbuild/aix-ppc64@0.25.3': + resolution: {integrity: sha512-W8bFfPA8DowP8l//sxjJLSLkD8iEjMc7cBVyP+u4cEv9sM7mdUCkgsj+t0n/BWPFtv7WWCN5Yzj0N6FJNUUqBQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -1089,8 +1089,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.25.1': - resolution: {integrity: sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==} + '@esbuild/android-arm64@0.25.3': + resolution: {integrity: sha512-XelR6MzjlZuBM4f5z2IQHK6LkK34Cvv6Rj2EntER3lwCBFdg6h2lKbtRjpTTsdEjD/WSe1q8UyPBXP1x3i/wYQ==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -1101,8 +1101,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.25.1': - resolution: {integrity: sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==} + '@esbuild/android-arm@0.25.3': + resolution: {integrity: sha512-PuwVXbnP87Tcff5I9ngV0lmiSu40xw1At6i3GsU77U7cjDDB4s0X2cyFuBiDa1SBk9DnvWwnGvVaGBqoFWPb7A==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -1113,8 +1113,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.25.1': - resolution: {integrity: sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==} + '@esbuild/android-x64@0.25.3': + resolution: {integrity: sha512-ogtTpYHT/g1GWS/zKM0cc/tIebFjm1F9Aw1boQ2Y0eUQ+J89d0jFY//s9ei9jVIlkYi8AfOjiixcLJSGNSOAdQ==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -1125,8 +1125,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.25.1': - resolution: {integrity: sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==} + '@esbuild/darwin-arm64@0.25.3': + resolution: {integrity: sha512-eESK5yfPNTqpAmDfFWNsOhmIOaQA59tAcF/EfYvo5/QWQCzXn5iUSOnqt3ra3UdzBv073ykTtmeLJZGt3HhA+w==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -1137,8 +1137,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.25.1': - resolution: {integrity: sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==} + '@esbuild/darwin-x64@0.25.3': + resolution: {integrity: sha512-Kd8glo7sIZtwOLcPbW0yLpKmBNWMANZhrC1r6K++uDR2zyzb6AeOYtI6udbtabmQpFaxJ8uduXMAo1gs5ozz8A==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -1149,8 +1149,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.25.1': - resolution: {integrity: sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==} + '@esbuild/freebsd-arm64@0.25.3': + resolution: {integrity: sha512-EJiyS70BYybOBpJth3M0KLOus0n+RRMKTYzhYhFeMwp7e/RaajXvP+BWlmEXNk6uk+KAu46j/kaQzr6au+JcIw==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -1161,8 +1161,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.1': - resolution: {integrity: sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==} + '@esbuild/freebsd-x64@0.25.3': + resolution: {integrity: sha512-Q+wSjaLpGxYf7zC0kL0nDlhsfuFkoN+EXrx2KSB33RhinWzejOd6AvgmP5JbkgXKmjhmpfgKZq24pneodYqE8Q==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -1173,8 +1173,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.25.1': - resolution: {integrity: sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==} + '@esbuild/linux-arm64@0.25.3': + resolution: {integrity: sha512-xCUgnNYhRD5bb1C1nqrDV1PfkwgbswTTBRbAd8aH5PhYzikdf/ddtsYyMXFfGSsb/6t6QaPSzxtbfAZr9uox4A==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -1185,8 +1185,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.25.1': - resolution: {integrity: sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==} + '@esbuild/linux-arm@0.25.3': + resolution: {integrity: sha512-dUOVmAUzuHy2ZOKIHIKHCm58HKzFqd+puLaS424h6I85GlSDRZIA5ycBixb3mFgM0Jdh+ZOSB6KptX30DD8YOQ==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -1197,8 +1197,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.25.1': - resolution: {integrity: sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==} + '@esbuild/linux-ia32@0.25.3': + resolution: {integrity: sha512-yplPOpczHOO4jTYKmuYuANI3WhvIPSVANGcNUeMlxH4twz/TeXuzEP41tGKNGWJjuMhotpGabeFYGAOU2ummBw==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -1209,8 +1209,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.25.1': - resolution: {integrity: sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==} + '@esbuild/linux-loong64@0.25.3': + resolution: {integrity: sha512-P4BLP5/fjyihmXCELRGrLd793q/lBtKMQl8ARGpDxgzgIKJDRJ/u4r1A/HgpBpKpKZelGct2PGI4T+axcedf6g==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -1221,8 +1221,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.25.1': - resolution: {integrity: sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==} + '@esbuild/linux-mips64el@0.25.3': + resolution: {integrity: sha512-eRAOV2ODpu6P5divMEMa26RRqb2yUoYsuQQOuFUexUoQndm4MdpXXDBbUoKIc0iPa4aCO7gIhtnYomkn2x+bag==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -1233,8 +1233,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.25.1': - resolution: {integrity: sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==} + '@esbuild/linux-ppc64@0.25.3': + resolution: {integrity: sha512-ZC4jV2p7VbzTlnl8nZKLcBkfzIf4Yad1SJM4ZMKYnJqZFD4rTI+pBG65u8ev4jk3/MPwY9DvGn50wi3uhdaghg==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -1245,8 +1245,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.25.1': - resolution: {integrity: sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==} + '@esbuild/linux-riscv64@0.25.3': + resolution: {integrity: sha512-LDDODcFzNtECTrUUbVCs6j9/bDVqy7DDRsuIXJg6so+mFksgwG7ZVnTruYi5V+z3eE5y+BJZw7VvUadkbfg7QA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -1257,8 +1257,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.25.1': - resolution: {integrity: sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==} + '@esbuild/linux-s390x@0.25.3': + resolution: {integrity: sha512-s+w/NOY2k0yC2p9SLen+ymflgcpRkvwwa02fqmAwhBRI3SC12uiS10edHHXlVWwfAagYSY5UpmT/zISXPMW3tQ==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -1269,14 +1269,14 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.25.1': - resolution: {integrity: sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==} + '@esbuild/linux-x64@0.25.3': + resolution: {integrity: sha512-nQHDz4pXjSDC6UfOE1Fw9Q8d6GCAd9KdvMZpfVGWSJztYCarRgSDfOVBY5xwhQXseiyxapkiSJi/5/ja8mRFFA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.1': - resolution: {integrity: sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==} + '@esbuild/netbsd-arm64@0.25.3': + resolution: {integrity: sha512-1QaLtOWq0mzK6tzzp0jRN3eccmN3hezey7mhLnzC6oNlJoUJz4nym5ZD7mDnS/LZQgkrhEbEiTn515lPeLpgWA==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] @@ -1287,14 +1287,14 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.1': - resolution: {integrity: sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==} + '@esbuild/netbsd-x64@0.25.3': + resolution: {integrity: sha512-i5Hm68HXHdgv8wkrt+10Bc50zM0/eonPb/a/OFVfB6Qvpiirco5gBA5bz7S2SHuU+Y4LWn/zehzNX14Sp4r27g==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.1': - resolution: {integrity: sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==} + '@esbuild/openbsd-arm64@0.25.3': + resolution: {integrity: sha512-zGAVApJEYTbOC6H/3QBr2mq3upG/LBEXr85/pTtKiv2IXcgKV0RT0QA/hSXZqSvLEpXeIxah7LczB4lkiYhTAQ==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -1305,8 +1305,8 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.1': - resolution: {integrity: sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==} + '@esbuild/openbsd-x64@0.25.3': + resolution: {integrity: sha512-fpqctI45NnCIDKBH5AXQBsD0NDPbEFczK98hk/aa6HJxbl+UtLkJV2+Bvy5hLSLk3LHmqt0NTkKNso1A9y1a4w==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] @@ -1317,8 +1317,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.25.1': - resolution: {integrity: sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==} + '@esbuild/sunos-x64@0.25.3': + resolution: {integrity: sha512-ROJhm7d8bk9dMCUZjkS8fgzsPAZEjtRJqCAmVgB0gMrvG7hfmPmz9k1rwO4jSiblFjYmNvbECL9uhaPzONMfgA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -1329,8 +1329,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.25.1': - resolution: {integrity: sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==} + '@esbuild/win32-arm64@0.25.3': + resolution: {integrity: sha512-YWcow8peiHpNBiIXHwaswPnAXLsLVygFwCB3A7Bh5jRkIBFWHGmNQ48AlX4xDvQNoMZlPYzjVOQDYEzWCqufMQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -1341,8 +1341,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.25.1': - resolution: {integrity: sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==} + '@esbuild/win32-ia32@0.25.3': + resolution: {integrity: sha512-qspTZOIGoXVS4DpNqUYUs9UxVb04khS1Degaw/MnfMe7goQ3lTfQ13Vw4qY/Nj0979BGvMRpAYbs/BAxEvU8ew==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -1353,8 +1353,8 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.25.1': - resolution: {integrity: sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==} + '@esbuild/win32-x64@0.25.3': + resolution: {integrity: sha512-ICgUR+kPimx0vvRzf+N/7L7tVSQeE3BYY+NhHRHXS1kBuPO7z2+7ea2HbhDyZdTephgvNvKrlDDKUexuCVBVvg==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -3438,8 +3438,8 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.25.1: - resolution: {integrity: sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==} + esbuild@0.25.3: + resolution: {integrity: sha512-qKA6Pvai73+M2FtftpNKRxJ78GIjmFXFxd/1DVBqGo/qNhLSfv+G12n9pNoWdytJC8U00TrViOwpjT0zgqQS8Q==} engines: {node: '>=18'} hasBin: true @@ -5982,8 +5982,8 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - tsx@4.19.3: - resolution: {integrity: sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==} + tsx@4.19.4: + resolution: {integrity: sha512-gK5GVzDkJK1SI1zwHf32Mqxf2tSJkNx+eYcNly5+nHvWqXUJYUkWBQtKauoESz3ymezAI++ZwT855x5p5eop+Q==} engines: {node: '>=18.0.0'} hasBin: true @@ -7249,145 +7249,145 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true - '@esbuild/aix-ppc64@0.25.1': + '@esbuild/aix-ppc64@0.25.3': optional: true '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm64@0.25.1': + '@esbuild/android-arm64@0.25.3': optional: true '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-arm@0.25.1': + '@esbuild/android-arm@0.25.3': optional: true '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/android-x64@0.25.1': + '@esbuild/android-x64@0.25.3': optional: true '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.25.1': + '@esbuild/darwin-arm64@0.25.3': optional: true '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/darwin-x64@0.25.1': + '@esbuild/darwin-x64@0.25.3': optional: true '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.25.1': + '@esbuild/freebsd-arm64@0.25.3': optional: true '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.25.1': + '@esbuild/freebsd-x64@0.25.3': optional: true '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm64@0.25.1': + '@esbuild/linux-arm64@0.25.3': optional: true '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-arm@0.25.1': + '@esbuild/linux-arm@0.25.3': optional: true '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-ia32@0.25.1': + '@esbuild/linux-ia32@0.25.3': optional: true '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-loong64@0.25.1': + '@esbuild/linux-loong64@0.25.3': optional: true '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-mips64el@0.25.1': + '@esbuild/linux-mips64el@0.25.3': optional: true '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-ppc64@0.25.1': + '@esbuild/linux-ppc64@0.25.3': optional: true '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.25.1': + '@esbuild/linux-riscv64@0.25.3': optional: true '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-s390x@0.25.1': + '@esbuild/linux-s390x@0.25.3': optional: true '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/linux-x64@0.25.1': + '@esbuild/linux-x64@0.25.3': optional: true - '@esbuild/netbsd-arm64@0.25.1': + '@esbuild/netbsd-arm64@0.25.3': optional: true '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.25.1': + '@esbuild/netbsd-x64@0.25.3': optional: true - '@esbuild/openbsd-arm64@0.25.1': + '@esbuild/openbsd-arm64@0.25.3': optional: true '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.25.1': + '@esbuild/openbsd-x64@0.25.3': optional: true '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.25.1': + '@esbuild/sunos-x64@0.25.3': optional: true '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-arm64@0.25.1': + '@esbuild/win32-arm64@0.25.3': optional: true '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-ia32@0.25.1': + '@esbuild/win32-ia32@0.25.3': optional: true '@esbuild/win32-x64@0.21.5': optional: true - '@esbuild/win32-x64@0.25.1': + '@esbuild/win32-x64@0.25.3': optional: true '@eslint-community/eslint-utils@4.5.1(eslint@9.25.1(jiti@2.4.2))': @@ -9611,33 +9611,33 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - esbuild@0.25.1: + esbuild@0.25.3: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.1 - '@esbuild/android-arm': 0.25.1 - '@esbuild/android-arm64': 0.25.1 - '@esbuild/android-x64': 0.25.1 - '@esbuild/darwin-arm64': 0.25.1 - '@esbuild/darwin-x64': 0.25.1 - '@esbuild/freebsd-arm64': 0.25.1 - '@esbuild/freebsd-x64': 0.25.1 - '@esbuild/linux-arm': 0.25.1 - '@esbuild/linux-arm64': 0.25.1 - '@esbuild/linux-ia32': 0.25.1 - '@esbuild/linux-loong64': 0.25.1 - '@esbuild/linux-mips64el': 0.25.1 - '@esbuild/linux-ppc64': 0.25.1 - '@esbuild/linux-riscv64': 0.25.1 - '@esbuild/linux-s390x': 0.25.1 - '@esbuild/linux-x64': 0.25.1 - '@esbuild/netbsd-arm64': 0.25.1 - '@esbuild/netbsd-x64': 0.25.1 - '@esbuild/openbsd-arm64': 0.25.1 - '@esbuild/openbsd-x64': 0.25.1 - '@esbuild/sunos-x64': 0.25.1 - '@esbuild/win32-arm64': 0.25.1 - '@esbuild/win32-ia32': 0.25.1 - '@esbuild/win32-x64': 0.25.1 + '@esbuild/aix-ppc64': 0.25.3 + '@esbuild/android-arm': 0.25.3 + '@esbuild/android-arm64': 0.25.3 + '@esbuild/android-x64': 0.25.3 + '@esbuild/darwin-arm64': 0.25.3 + '@esbuild/darwin-x64': 0.25.3 + '@esbuild/freebsd-arm64': 0.25.3 + '@esbuild/freebsd-x64': 0.25.3 + '@esbuild/linux-arm': 0.25.3 + '@esbuild/linux-arm64': 0.25.3 + '@esbuild/linux-ia32': 0.25.3 + '@esbuild/linux-loong64': 0.25.3 + '@esbuild/linux-mips64el': 0.25.3 + '@esbuild/linux-ppc64': 0.25.3 + '@esbuild/linux-riscv64': 0.25.3 + '@esbuild/linux-s390x': 0.25.3 + '@esbuild/linux-x64': 0.25.3 + '@esbuild/netbsd-arm64': 0.25.3 + '@esbuild/netbsd-x64': 0.25.3 + '@esbuild/openbsd-arm64': 0.25.3 + '@esbuild/openbsd-x64': 0.25.3 + '@esbuild/sunos-x64': 0.25.3 + '@esbuild/win32-arm64': 0.25.3 + '@esbuild/win32-ia32': 0.25.3 + '@esbuild/win32-x64': 0.25.3 escalade@3.2.0: {} @@ -12510,9 +12510,9 @@ snapshots: tslib@2.8.1: {} - tsx@4.19.3: + tsx@4.19.4: dependencies: - esbuild: 0.25.1 + esbuild: 0.25.3 get-tsconfig: 4.10.0 optionalDependencies: fsevents: 2.3.3 From 15fb907a2798425e7132190cf15742e2439b2b3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 08:35:13 +0000 Subject: [PATCH 0509/2658] chore(deps-dev): bump tsdown from 0.10.0 to 0.10.1 (#18969) Bumps [tsdown](https://github.com/rolldown/tsdown) from 0.10.0 to 0.10.1. - [Release notes](https://github.com/rolldown/tsdown/releases) - [Commits](https://github.com/rolldown/tsdown/compare/v0.10.0...v0.10.1) --- updated-dependencies: - dependency-name: tsdown dependency-version: 0.10.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 134 ++++++++++++++++++++++++------------------------- 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/package.json b/package.json index 1532083e274a..84ed3a3bcdfa 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "prettier": "3.5.3", "remark-parse": "11.0.0", "supertest": "7.1.0", - "tsdown": "0.10.0", + "tsdown": "0.10.1", "typescript": "5.8.3", "unified": "11.0.5", "vite-tsconfig-paths": "5.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cfe8b20ae958..5f898c35a7bd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -439,8 +439,8 @@ importers: specifier: 7.1.0 version: 7.1.0 tsdown: - specifier: 0.10.0 - version: 0.10.0(typescript@5.8.3) + specifier: 0.10.1 + version: 0.10.1(typescript@5.8.3) typescript: specifier: 5.8.3 version: 5.8.3 @@ -1865,8 +1865,8 @@ packages: '@otplib/preset-v11@12.0.1': resolution: {integrity: sha512-9hSetMI7ECqbFiKICrNa4w70deTUfArtwXykPUvSHWOdzOlfa9ajglu7mNCntlvxycTiOAXkQGwjQCzzDEMRMg==} - '@oxc-project/types@0.66.0': - resolution: {integrity: sha512-KF5Wlo2KzQ+jmuCtrGISZoUfdHom7qHavNfPLW2KkeYJfYMGwtiia8KjwtsvNJ49qRiXImOCkPeVPd4bMlbR7w==} + '@oxc-project/types@0.67.0': + resolution: {integrity: sha512-AI7inoYvnVro7b8S2Z+Fxi295xQvNKLP1CM/xzx5il4R3aiGgnFt9qiXaRo9vIutataX8AjHcaPnOsjdcItU0w==} '@oxc-resolver/binding-darwin-arm64@6.0.2': resolution: {integrity: sha512-86IUnBOHrCQknSOGseG5vzzHCaPyPQK4VH4QGFo/Hcd7XloSwTj2oI2ia6+2/9wFNg5ysb9y6/IO+c4XJGGBew==} @@ -2068,63 +2068,63 @@ packages: resolution: {integrity: sha512-ezIadUb1aFhwJLd++WVqVpi9rnlX8vnd4ju7saPhwLHJN1mJgOv0puePTGV+FbtSnWtwoHDT8lAm4kagDZmpCg==} engines: {node: '>=20.0.0'} - '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-2F4bhDtV6CHBx7JMiT9xvmxkcZLHFmonfbli36RyfvgThDOAu92bis28zDTdguDY85lN/jBRKX/eOvX+T5hMkg==} + '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-V0zbNPcyRVZFUUtCiJxXMuOYriszcgzc5wW5DUA5mHDlM0gDc1snsLzM245q5fGlSLmq+Rgerkclv0ZEjgHwDw==} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-8VMChhFLeD/oOAQUspFtxZaV7ctDob63w626kwvBBIHtlpY2Ohw4rsfjjtGckyrTCI/RROgZv/TVVEsG3GkgLw==} + '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-7RXXJo0U52YocMH/Bv829U3ZCXIL/+HhXme165HHflpg2flTk8dkk65Ft1lOtV80JNmUFwgfHYhvWeKz8j7qWQ==} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-4W28EgaIidbWIpwB3hESMBfiOSs7LBFpJGa8JIV488qLEnTR/pqzxDEoOPobhRSJ1lJlv0vUgA8+DKBIldo2gw==} + '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-vQUshBpPMdvQUfERsyjo1iNcV7wwU65mKoCwlX0e2YFI9zqyxq+fOKUEGEVrxpz4dm0kmQ5/rPdDPZQ6TcodUA==} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-1ECtyzIKlAHikR7BhS4hk7Hxw8xCH6W3S+Sb74EM0vy5AqPvWSbgLfAwagYC7gNDcMMby3I757X7qih5fIrGiw==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-MIeNUPb7qHB/X2Lh76Rk5cxXi0O0Cc3hRGPg8Mzwxkr5Ox5fbsJjjPHNE4g3es4VEt1NEjpZmo7XFyi1Szfbww==} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-wU1kp8qPRUKC8N82dNs3F5+UyKRww9TUEO5dQ5mxCb0cG+y4l5rVaXpMgvL0VuQahPVvTMs577QPhJGb4iDONw==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-f9fNXp+yROAAC49aqAeSXMFcoqNlwIsmO5Spsp2ifdFb7XWSnD1EodoCC7xIjjswMvYKnHqfQbr6dP297kN2uw==} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-odDjO2UtEEMAzwmLHEOKylJjQa+em1REAO9H19PA+O+lPu6evVbre5bqu8qCjEtHG1Q034LpZR86imCP2arb/w==} + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-08FSjitC8i7WWBI1DXacfhKZZ/TzjDg5uWi53aeppVWc2oT/x0TdlNVam9coU1Xs4ra6/pMe7wGroYWh/j4Lsg==} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-Ty2T67t2Oj1lg417ATRENxdk8Jkkksc/YQdCJyvkGqteHe60pSU2GGP/tLWGB+I0Ox+u387bzU/SmfmrHZk9aw==} + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-NqoANlbIhYAR8ZnF8v1d8Kw8tsd0ObpVEqNxhELqcV5HKXTtlN9uwMNWWH2G953Yj3sqTdQZWVenwr7e/YchgA==} cpu: [x64] os: [linux] - '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-Fm1TxyeVE+gy74HM26CwbEOUndIoWAMgWkVDxYBD64tayvp5JvltpGHaqCg6x5i+X2F5XCDCItqwVlC7/mTxIw==} + '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-ikpkqqurJsC1ijpY7vRP+qrg+7zP0JbpoMma5PyptfGeK7MQ0hhMUNr/NzMMrI11KJjkpRYJEyJ880pFknj0tQ==} cpu: [x64] os: [linux] - '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-AEZzTyGerfkffXmtv7kFJbHWkryNeolk0Br+yhH1wZyN6Tt6aebqICDL8KNRO2iExoEWzyYS6dPxh0QmvNTfUQ==} + '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-IwMWmxkI/I60iC6M7kIhyv7X1nx61JaaeseNHARXmU3ds0d0+Sck6YuJQH8o8I3AUzWGhltOcnUHwX97qG+KgA==} engines: {node: '>=14.21.3'} cpu: [wasm32] - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-0lskDFKQwf5PMjl17qHAroU6oVU0Zn8NbAH/PdM9QB1emOzyFDGa20d4kESGeo3Uq7xOKXcTORJV/JwKIBORqw==} + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-mgHMApQ9Ygfd70I4tmlENrdf6kot/T1UTA//Z9R3/xbXiPXwVjdw/BnTe+7AXG9t0QHXsocNx/47dj48BDuqOQ==} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-DfG1S0zGKnUfr95cNCmR4YPiZ/moS7Tob5eV+9r5JGeHZVWFHWwvJdR0jArj6Ty0LbBFDTVVB3iAvqRSji+l0Q==} + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-pvv3FLLx2Mw2BL+YSAJeE+DNDjpRgk7oCsqf28e3sr7+zfv+VnOMxHHkJTjFzl3R8BA58OMG3C4J7Fv1SVkqbQ==} cpu: [ia32] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.151352b': - resolution: {integrity: sha512-5HZEtc8U2I1O903hXBynWtWaf+qzAFj66h5B7gOtVcvqIk+lKRVSupA85OdIvR7emrsYU25ikpfiU5Jhg9kTbQ==} + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.852c603': + resolution: {integrity: sha512-4gv06TqlMp3IArfyznTOWopMY1ZBZLkE4QZKY+BnxPh8NuDngXrBoQeOauW6w0ZN/8cuTYqX03N+3Hu7t3dNGw==} cpu: [x64] os: [win32] @@ -5501,8 +5501,8 @@ packages: resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} hasBin: true - rolldown-plugin-dts@0.9.5: - resolution: {integrity: sha512-p1iJ7v9Rq78xZ3isZrTdtp1PBPsSFO5w5lATicgujmeyo4VjeKqkUmz/eZdDXXTaYQTlg70b0iy6fT8T/9sGEQ==} + rolldown-plugin-dts@0.9.6: + resolution: {integrity: sha512-KmF3AU9rw98TY+T+oXucxkupj19ixN4UBXfDPtZGO70BfL14YWzzQ5XHoHIEhPJ8L/mK/hyt52IUvWiy6fHN/A==} engines: {node: '>=20.18.0'} peerDependencies: rolldown: ^1.0.0-beta.7 @@ -5511,11 +5511,11 @@ packages: typescript: optional: true - rolldown@1.0.0-beta.8-commit.151352b: - resolution: {integrity: sha512-TCb6GVaFBk4wB0LERofFDxTO5X1/Sgahr7Yn5UA9XjuFtCwL1CyEhUHX5lUIstcMxjbkLjn2z4TAGwisr6Blvw==} + rolldown@1.0.0-beta.8-commit.852c603: + resolution: {integrity: sha512-5sq8IPiJ8q/IlL084zf8fPhflsdNrKE7gwXma7m820u8oQtkAEmhb8cmHw6jztlidgOe3hpUIm55HevPmVRelQ==} hasBin: true peerDependencies: - '@oxc-project/runtime': 0.66.0 + '@oxc-project/runtime': 0.67.0 peerDependenciesMeta: '@oxc-project/runtime': optional: true @@ -5963,8 +5963,8 @@ packages: typescript: optional: true - tsdown@0.10.0: - resolution: {integrity: sha512-xz995k/78OrbU3hXpADxe/mCXAXBwOJ5lbb4t+C0K11IHfzlW5jHZdO/qvW8N82QR1DZKUk5V0oeu0gTcGLxjQ==} + tsdown@0.10.1: + resolution: {integrity: sha512-NT1XSUDweBpgpiZb3Upfy3DBwAbn8W0aXo3Ecp4kHozTLewWa0UkWUP6nRTvSj2c0NcD/BLLuf0HthqMpbEdkA==} engines: {node: '>=18.0.0'} hasBin: true peerDependencies: @@ -8000,7 +8000,7 @@ snapshots: '@otplib/plugin-crypto': 12.0.1 '@otplib/plugin-thirty-two': 12.0.1 - '@oxc-project/types@0.66.0': {} + '@oxc-project/types@0.67.0': {} '@oxc-resolver/binding-darwin-arm64@6.0.2': optional: true @@ -8171,42 +8171,42 @@ snapshots: dependencies: quansync: 0.2.10 - '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-darwin-arm64@1.0.0-beta.8-commit.852c603': optional: true - '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-darwin-x64@1.0.0-beta.8-commit.852c603': optional: true - '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-freebsd-x64@1.0.0-beta.8-commit.852c603': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.8-commit.852c603': optional: true - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.8-commit.852c603': optional: true - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.8-commit.852c603': optional: true - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.8-commit.852c603': optional: true - '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-linux-x64-musl@1.0.0-beta.8-commit.852c603': optional: true - '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-wasm32-wasi@1.0.0-beta.8-commit.852c603': dependencies: '@napi-rs/wasm-runtime': 0.2.9 optional: true - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.8-commit.852c603': optional: true - '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.8-commit.852c603': optional: true - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.151352b': + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.852c603': optional: true '@rollup/pluginutils@5.1.4(rollup@4.37.0)': @@ -11986,7 +11986,7 @@ snapshots: dependencies: glob: 10.4.5 - rolldown-plugin-dts@0.9.5(rolldown@1.0.0-beta.8-commit.151352b(typescript@5.8.3))(typescript@5.8.3): + rolldown-plugin-dts@0.9.6(rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3))(typescript@5.8.3): dependencies: '@babel/generator': 7.27.0 '@babel/parser': 7.27.0 @@ -11996,31 +11996,31 @@ snapshots: dts-resolver: 1.0.1 get-tsconfig: 4.10.0 oxc-transform: 0.66.0 - rolldown: 1.0.0-beta.8-commit.151352b(typescript@5.8.3) + rolldown: 1.0.0-beta.8-commit.852c603(typescript@5.8.3) optionalDependencies: typescript: 5.8.3 transitivePeerDependencies: - supports-color - rolldown@1.0.0-beta.8-commit.151352b(typescript@5.8.3): + rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3): dependencies: - '@oxc-project/types': 0.66.0 + '@oxc-project/types': 0.67.0 '@valibot/to-json-schema': 1.0.0(valibot@1.0.0(typescript@5.8.3)) ansis: 3.17.0 valibot: 1.0.0(typescript@5.8.3) optionalDependencies: - '@rolldown/binding-darwin-arm64': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-darwin-x64': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-freebsd-x64': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.8-commit.151352b - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.8-commit.151352b + '@rolldown/binding-darwin-arm64': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-darwin-x64': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.8-commit.852c603 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.8-commit.852c603 transitivePeerDependencies: - typescript @@ -12484,7 +12484,7 @@ snapshots: optionalDependencies: typescript: 5.8.3 - tsdown@0.10.0(typescript@5.8.3): + tsdown@0.10.1(typescript@5.8.3): dependencies: ansis: 3.17.0 cac: 6.7.14 @@ -12495,8 +12495,8 @@ snapshots: empathic: 1.0.0 hookable: 5.5.3 lightningcss: 1.29.3 - rolldown: 1.0.0-beta.8-commit.151352b(typescript@5.8.3) - rolldown-plugin-dts: 0.9.5(rolldown@1.0.0-beta.8-commit.151352b(typescript@5.8.3))(typescript@5.8.3) + rolldown: 1.0.0-beta.8-commit.852c603(typescript@5.8.3) + rolldown-plugin-dts: 0.9.6(rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3))(typescript@5.8.3) tinyexec: 1.0.1 tinyglobby: 0.2.13 unconfig: 7.3.2 From 96b110e3fe839a20f0ca24b2db40d147cd8cc01d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 18:37:11 +0800 Subject: [PATCH 0510/2658] chore(deps): bump rate-limiter-flexible from 7.0.0 to 7.1.0 (#18967) Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 7.0.0 to 7.1.0. - [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases) - [Commits](https://github.com/animir/node-rate-limiter-flexible/compare/v7.0.0...v7.1.0) --- updated-dependencies: - dependency-name: rate-limiter-flexible dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 84ed3a3bcdfa..b600ab81e151 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "puppeteer-extra-plugin-user-data-dir": "2.4.1", "puppeteer-extra-plugin-user-preferences": "2.4.1", "query-string": "9.1.1", - "rate-limiter-flexible": "7.0.0", + "rate-limiter-flexible": "7.1.0", "re2js": "1.1.0", "rfc4648": "1.5.4", "rss-parser": "3.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f898c35a7bd..cba4f3c5e209 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -216,8 +216,8 @@ importers: specifier: 9.1.1 version: 9.1.1 rate-limiter-flexible: - specifier: 7.0.0 - version: 7.0.0 + specifier: 7.1.0 + version: 7.1.0 re2js: specifier: 1.1.0 version: 1.1.0 @@ -5351,8 +5351,8 @@ packages: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} - rate-limiter-flexible@7.0.0: - resolution: {integrity: sha512-K1Y7WTh6m/MpgifDkBzexI0PfPYd+LaXRl+Aqq+LkKKIb68KLJxd/cp+Fw3iU1T0h3oQ9TwbR0m2/ksU70ML+g==} + rate-limiter-flexible@7.1.0: + resolution: {integrity: sha512-qXYzKWzlTOf7/BNjz1Jj03AgtTHoJZZAiiJ3hjLf8sqeG+EWZLeQ3xYtMPlMZLonlq+OyJUueHyK/H+q2Zc7Qw==} re2js@1.1.0: resolution: {integrity: sha512-ovDCIb2ZQR7Do3NzH2XEuXOzqd1q8srvkeaOVMf+EZNt1Z4JoUVvNKCR9qf8EbqoPhvLknkoyiiBzoQtmuzIbQ==} @@ -11830,7 +11830,7 @@ snapshots: quick-lru@5.1.1: {} - rate-limiter-flexible@7.0.0: {} + rate-limiter-flexible@7.1.0: {} re2js@1.1.0: {} From f19a725157ff7ea4c0bdd04f7708ff387b2926d8 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 30 Apr 2025 04:16:32 +0800 Subject: [PATCH 0511/2658] refactor: fix all no array reduce (#18973) * refactor: no-array-reduce cleanup * refactor: keep * refactor: nhk * refactor: rattibha * fix: cctv * fix: jiemian * refactor: juejin * refactor: kpopping * refactor: yoasobi-music * refactor: mycard520 * refactor: newrank * refactor: sse * refactor: zhihu * feat!: remove trending https://github.com/huqi-pr/trending-in-one is archived and no longer being updated. https://github.com/huqi-pr/trending-in-one/commit/2ef4cd236fcccb908be7907d5ac9aab6f1f4a188 * refactor: sspai * refactor: sysu * refactor: nikkei * refactor: utils * refactor: mydrivers * refactor: scmp * refactor: gov/moa * refactor: bloomberg * refactor: manhuagui * refactor: twitter --- lib/routes/36kr/hot-list.ts | 10 +- lib/routes/ally/rail.ts | 38 +-- lib/routes/bloomberg/utils.ts | 8 +- lib/routes/cctv/utils/news.ts | 6 +- lib/routes/cyzone/util.ts | 18 +- lib/routes/foresightnews/util.ts | 18 +- lib/routes/gcores/radio.ts | 10 +- lib/routes/gov/moa/zdscxx.ts | 24 +- lib/routes/iguoguo/index.ts | 112 ++++----- lib/routes/jiemian/account.ts | 16 ++ lib/routes/jiemian/common.ts | 101 ++++++++ lib/routes/jiemian/list.ts | 14 -- lib/routes/jiemian/lists.ts | 197 +++++++-------- lib/routes/jiemian/special.ts | 12 + lib/routes/jiemian/video.ts | 19 ++ lib/routes/jiemian/vip.ts | 20 ++ lib/routes/jike/utils.ts | 1 - lib/routes/juejin/pins.ts | 10 +- lib/routes/keep/templates/user.art | 18 +- lib/routes/keep/user.ts | 66 +++-- lib/routes/kpopping/kpics.ts | 17 +- lib/routes/manhuagui/comic.ts | 61 +++-- lib/routes/mycard520/news.ts | 11 +- lib/routes/mydrivers/cid.ts | 198 ++++++++++++++- lib/routes/mydrivers/index.ts | 52 +++- lib/routes/mydrivers/rank.ts | 5 +- lib/routes/mydrivers/util.ts | 23 +- lib/routes/newrank/utils.ts | 12 +- lib/routes/nhk/news-web-easy.ts | 35 ++- lib/routes/nikkei/cn/index.ts | 9 +- lib/routes/rattibha/templates/description.art | 12 + lib/routes/rattibha/user.ts | 57 +++-- lib/routes/scmp/index.ts | 25 +- lib/routes/sse/convert.ts | 16 +- lib/routes/sse/disclosure.ts | 14 +- lib/routes/sspai/series.ts | 44 ++-- lib/routes/sysu/ygafz.ts | 36 +-- lib/routes/trending/all-trending.ts | 226 ------------------ lib/routes/trending/namespace.ts | 7 - lib/routes/trending/templates/content.art | 25 -- lib/routes/twitter/utils.ts | 15 +- lib/routes/yoasobi-music/media.ts | 9 +- lib/routes/zhihu/pin/utils.ts | 10 +- lib/utils/camelcase-keys.ts | 7 +- 44 files changed, 878 insertions(+), 766 deletions(-) create mode 100644 lib/routes/jiemian/account.ts create mode 100644 lib/routes/jiemian/common.ts delete mode 100644 lib/routes/jiemian/list.ts create mode 100644 lib/routes/jiemian/special.ts create mode 100644 lib/routes/jiemian/video.ts create mode 100644 lib/routes/jiemian/vip.ts create mode 100644 lib/routes/rattibha/templates/description.art delete mode 100644 lib/routes/trending/all-trending.ts delete mode 100644 lib/routes/trending/namespace.ts delete mode 100644 lib/routes/trending/templates/content.art diff --git a/lib/routes/36kr/hot-list.ts b/lib/routes/36kr/hot-list.ts index 85c537670d71..cf39f4834613 100644 --- a/lib/routes/36kr/hot-list.ts +++ b/lib/routes/36kr/hot-list.ts @@ -52,6 +52,15 @@ export const route: Route = { | 24 | renqi | zonghe | shoucang |`, }; +const getProperty = (object, key) => { + let result = object; + const keys = key.split('.'); + for (const k of keys) { + result = result && result[k]; + } + return result; +}; + async function handler(ctx) { const category = ctx.req.param('category') ?? '24'; @@ -66,7 +75,6 @@ async function handler(ctx) { url: currentUrl, }); - const getProperty = (object, key) => key.split('.').reduce((o, k) => o && o[k], object); const data = getProperty(JSON.parse(response.data.match(/window.initialState=({.*})/)[1]), categories[category].key); let items = data diff --git a/lib/routes/ally/rail.ts b/lib/routes/ally/rail.ts index 8927ab8f4801..1680fe69aeaf 100644 --- a/lib/routes/ally/rail.ts +++ b/lib/routes/ally/rail.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -8,7 +8,7 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/rail/:category?/:topic?', categories: ['new-media'], - example: '/ally/rail/hyzix/chengguijiaotong/', + example: '/ally/rail/hyzix/chengguijiaotong', parameters: { category: '分类,可在 URL 中找到;略去则抓取首页', topic: '话题,可在 URL 中找到;并非所有页面均有此字段' }, features: { requireConfig: false, @@ -40,26 +40,28 @@ async function handler(ctx) { const response = await got.get(pageUrl); const $ = load(response.data); - let title = $('.container .regsiter a') // what a typo... - .get() - .slice(1) // drop "首页" - .reduce((prev, curr) => (prev ? `${prev} - ${$(curr).text()}` : $(curr).text()), ''); + let title = ''; + const titleLinks = $('.container .regsiter a').toArray().slice(1); // what a typo... drop "首页" + for (const link of titleLinks) { + const linkText = $(link).text(); + title = title ? `${title} - ${linkText}` : linkText; + } title = title || (category && topic ? `${category} - ${topic}` : category) || '首页'; let links = [ // list page: http://rail.ally.net.cn/html/lujuzixun/ - $('.left .hynewsO h2 a').get(), + $('.left .hynewsO h2 a').toArray(), // multi-sub-topic page: http://rail.ally.net.cn/html/hyzix/ - $('.left .list_content_c').find('.new_hy_focus_con_tit a, .new_hy_list_name a').get(), + $('.left .list_content_c').find('.new_hy_focus_con_tit a, .new_hy_list_name a').toArray(), // multi-sub-topic page 2: http://rail.ally.net.cn/html/foster/ - $('.left').find('.nnewslistpic a, .nnewslistinfo dd a').get(), + $('.left').find('.nnewslistpic a, .nnewslistinfo dd a').toArray(), // data list page: http://rail.ally.net.cn/html/tongjigongbao/ - $('.left .list_con .datacountTit a').get(), + $('.left .list_con .datacountTit a').toArray(), // home page: http://rail.ally.net.cn - $('.container_left').find('dd a, h1 a, ul.slideshow li a').get(), + $('.container_left').find('dd a, h1 a, ul.slideshow li a').toArray(), ].flat(); if (!links.length) { // try aggressively sniffing links, e.g. http://rail.ally.net.cn/html/InviteTen/ - links = $('.left a, .container_left a').get(); + links = $('.left a, .container_left a').toArray(); } let items = links @@ -77,10 +79,14 @@ async function handler(ctx) { pubDate: timezone(parseDate(`${urlMatch[1]}${urlMatch[2]}`), 8), }; }) - .filter(Boolean) - .reduce((prev, curr) => (prev.length && prev.at(-1).link === curr.link ? prev : [...prev, curr]), []) - .sort((a, b) => b.pubDate - a.pubDate) - .slice(0, ctx.req.query('limit') || 20); + .filter(Boolean); + const uniqueItems: DataItem[] = []; + for (const item of items) { + if (!uniqueItems.some((uniqueItem) => uniqueItem.link === item?.link)) { + uniqueItems.push(item!); + } + } + items = uniqueItems.sort((a, b) => b.pubDate - a.pubDate).slice(0, ctx.req.query('limit') || 20); items = await Promise.all( items.map((item) => diff --git a/lib/routes/bloomberg/utils.ts b/lib/routes/bloomberg/utils.ts index 7736a6703c15..924e1608312d 100644 --- a/lib/routes/bloomberg/utils.ts +++ b/lib/routes/bloomberg/utils.ts @@ -197,10 +197,10 @@ const parseVideoPage = async (res, api, item) => { const parsePhotoEssaysPage = async (res, api, item) => { const $ = load(res.data.html); - const article_json = $(api.sel) - .toArray() - .map((e) => JSON.parse($(e).html())) - .reduce((pv, cv) => ({ ...pv, ...cv }), {}); + const article_json = {}; + for (const e of $(api.sel).toArray()) { + Object.assign(article_json, JSON.parse($(e).html())); + } const rss_item = { title: article_json.headline || item.title, link: article_json.canonical || item.link, diff --git a/lib/routes/cctv/utils/news.ts b/lib/routes/cctv/utils/news.ts index 69cbc407915e..8e6c8a0c1b41 100644 --- a/lib/routes/cctv/utils/news.ts +++ b/lib/routes/cctv/utils/news.ts @@ -70,14 +70,14 @@ const getNews = async (category) => { break; case 'PHO': - description = data.photo_album_list.reduce((description, { photo_url, photo_name, photo_brief }) => { + description = ''; + for (const { photo_url, photo_name, photo_brief } of data.photo_album_list) { description += `
${photo_name}
${photo_brief}
`; - return description; - }, ''); + } author = data.source; break; diff --git a/lib/routes/cyzone/util.ts b/lib/routes/cyzone/util.ts index dd2d45797a2f..b399c6303c2c 100644 --- a/lib/routes/cyzone/util.ts +++ b/lib/routes/cyzone/util.ts @@ -43,19 +43,17 @@ const getInfo = (url, tryGet) => * @param {...Object} searchParams - The search parameter objects. * @returns {Promise} - The processed item array. */ -const processItems = async (apiUrl, limit, tryGet, ...searchParams) => { +const processItems = async (apiUrl, limit, tryGet, ...params) => { // Merge search parameters - searchParams = { - ...searchParams.reduce( - (result, object) => ({ - ...result, - ...object, - }), - {} - ), - + let searchParams = { size: limit, }; + for (const param of params) { + searchParams = { + ...searchParams, + ...param, + }; + } const { data: response } = await got(apiUrl, { searchParams, diff --git a/lib/routes/foresightnews/util.ts b/lib/routes/foresightnews/util.ts index 24884e67bdc2..2f0c708560fb 100644 --- a/lib/routes/foresightnews/util.ts +++ b/lib/routes/foresightnews/util.ts @@ -23,18 +23,16 @@ const imgRootUrl = 'https://img.foresightnews.pro'; const icon = new URL('foresight.ico', rootUrl).href; const image = new URL('vertical_logo.png', imgRootUrl).href; -const processItems = async (apiUrl, limit, ...searchParams) => { - searchParams = { - ...searchParams.reduce( - (result, object) => ({ - ...result, - ...object, - }), - {} - ), - +const processItems = async (apiUrl, limit, ...parameters) => { + let searchParams = { size: limit, }; + for (const param of parameters) { + searchParams = { + ...searchParams, + ...param, + }; + } const info = { column: '', diff --git a/lib/routes/gcores/radio.ts b/lib/routes/gcores/radio.ts index 7d43de0308db..60af99cd2c2d 100644 --- a/lib/routes/gcores/radio.ts +++ b/lib/routes/gcores/radio.ts @@ -44,17 +44,17 @@ async function handler(ctx) { const api = getApi(category); api.searchParams.set('include', 'media'); - api.searchParams.set('page[limit]', limit); + api.searchParams.set('page[limit]', limit.toString()); api.searchParams.set('sort', '-published-at'); api.searchParams.set('filter[list-all]', '0'); api.searchParams.set('filter[is-require-privilege]', '0'); api.searchParams.set('fields[radios]', 'title,cover,published-at,duration,content,media'); const { data, included } = await get(api); - const audios = included.reduce((result, media) => { - result[media.id] = media.attributes.audio; - return result; - }, {}); + const audios = {}; + for (const media of included) { + audios[media.id] = media.attributes.audio; + } const item = data.map((radio) => { const { id, attributes, relationships } = radio; diff --git a/lib/routes/gov/moa/zdscxx.ts b/lib/routes/gov/moa/zdscxx.ts index 8cec8e4d836a..4a5aafb10527 100644 --- a/lib/routes/gov/moa/zdscxx.ts +++ b/lib/routes/gov/moa/zdscxx.ts @@ -17,7 +17,7 @@ export const handler = async (ctx) => { const currentUrl = new URL('nyb/pc/messageList.jsp', rootUrl).href; const frameUrl = new URL('iframe/top_sj/', rootFrameUrl).href; - let filterForm = {}; + const filterForm = {}; if (category) { const apiFilterUrl = new URL('nyb/getMessageFilters', rootUrl).href; @@ -29,17 +29,19 @@ export const handler = async (ctx) => { }, }); - const filters = filterResponse.result.reduce((filters, f) => { + const filters: Record = {}; + for (const f of filterResponse.result) { filters[f.name.trim()] = f.data.map((d) => d.name.trim()); - return filters; - }, {}); - - filterForm = category.split(/\//).reduce((form, c) => { - for (const key of Object.keys(filters).filter((key) => filters[key].includes(c))) { - form[key] = c; + } + + const categories = category.split(/\//); + for (const c of categories) { + for (const key of Object.keys(filters)) { + if (filters[key].includes(c)) { + filterForm[key] = c; + } } - return form; - }, {}); + } } const { data: response } = await got.post(apiUrl, { @@ -108,7 +110,7 @@ export const route: Route = { parameters: { category: '分类,默认为全部,见下表' }, description: `::: tip 若订阅 [中华人民共和国农业农村部数据](http://zdscxx.moa.gov.cn:8080/nyb/pc/messageList.jsp) 的 \`价格指数\` 报告主题。此时路由为 [\`/gov/moa/zdscxx/价格指数\`](https://rsshub.app/gov/moa/zdscxx/价格指数)。 - + 若订阅 \`央视网\` 报告来源 的 \`蔬菜生产\` 报告主题。此时路由为 [\`/gov/moa/zdscxx/央视网/蔬菜生产\`](https://rsshub.app/gov/moa/zdscxx/央视网/蔬菜生产)。 ::: diff --git a/lib/routes/iguoguo/index.ts b/lib/routes/iguoguo/index.ts index 7003b9804737..bb7686ce8e37 100644 --- a/lib/routes/iguoguo/index.ts +++ b/lib/routes/iguoguo/index.ts @@ -1,27 +1,37 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import timezone from '@/utils/timezone'; +import { config } from '@/config'; +import type { Context } from 'hono'; const rootUrl = 'https://www.iguoguo.net'; -const getChildrenFromCheerioRoot = (cheerioInstance) => { - const root = cheerioInstance.root(); - const rootKeys = Object.keys(root).filter((n) => n % 1 === 0); - const rootChildren = rootKeys.map((key) => root[key].children); - return rootChildren[0]; -}; +const getCategoryIdFromSlug = (slug) => + cache.tryGet(`iguoguo:category:${slug}`, async () => { + const response = await ofetch(`${rootUrl}/wp-json/wp/v2/categories`, { + query: { + slug, + }, + }); + return response[0].id; + }); -const getComments = (a, node) => { - if (node.type === 'comment') { - return [...a, node.data]; - } else if (node.type === 'tag' && node.children && node.children.length > 0) { - return [...a, ...node.children.reduce((accumulator, element) => getComments(accumulator, element), [])]; - } else { - return a; - } -}; +const getPostsByCategory = (categoryId, limit) => + cache.tryGet( + `iguoguo:posts:${categoryId}`, + async () => { + const response = await ofetch(`${rootUrl}/wp-json/wp/v2/posts`, { + query: { + categories: categoryId, + per_page: limit, + }, + }); + return response; + }, + config.cache.routeExpire, + false + ); export const route: Route = { path: '/html5', @@ -41,50 +51,42 @@ export const route: Route = { handler, }; -async function handler() { - const currentUrl = rootUrl.concat('/html5'); - const response = await got({ - method: 'get', - url: currentUrl, - }); - const $ = load(response.data); - const list = $('a', '.post') - .filter((_, x) => $(x).attr('href').endsWith('.html')) - .filter((_, x) => $(x).children().eq(0).attr('src')) - .map((_, item) => ({ - link: $(item).attr('href'), - cover: $(item).children().eq(0).attr('src'), - })) - .get(); +async function handler(ctx: Context) { + const limit = Number.parseInt(ctx.req.query('limit') ?? '10'); + const currentUrl = `${rootUrl}/html5`; + const categorySlug = 'h5'; + + const categoryId = await getCategoryIdFromSlug(categorySlug); + const posts = await getPostsByCategory(categoryId, limit); const mime = { jpg: 'jpeg', png: 'png', }; - const items = await Promise.all( - list.map((item) => - cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - const content = load(detailResponse.data); - item.title = content('h1', '.post-info').text(); - item.description = content('div.clearfix', '.post_content').html(); - const comments = getChildrenFromCheerioRoot(content).reduce((accumulator, element) => getComments(accumulator, element), []); - const date = comments.at(-1).trim().split(' ').slice(9, 11); - item.pubDate = timezone(parseDate(date[0] + date[1], 'YYYY-MM-DDHH:mm:ss'), +8); - item.media = { - content: { - url: item.cover, - type: `image/${mime[item.cover.split('.').pop()]}`, - }, - }; - return item; - }) - ) - ); + const items = posts.map((item) => { + const $ = load(item.content.rendered); + const cover = $('p > img').first().attr('src'); + $('p > img').first().remove(); + $('h4').each((_, el) => { + if ($(el).text().includes('扫码欣赏')) { + $(el).remove(); + } + }); + return { + title: item.title.rendered, + description: $.html(), + link: item.link, + cover, + pubDate: parseDate(item.date_gmt), + media: cover && { + content: { + url: cover, + type: `image/${mime[cover.split('.').pop()]}`, + }, + }, + }; + }); return { title: '爱果果', link: currentUrl, diff --git a/lib/routes/jiemian/account.ts b/lib/routes/jiemian/account.ts new file mode 100644 index 000000000000..641ada837452 --- /dev/null +++ b/lib/routes/jiemian/account.ts @@ -0,0 +1,16 @@ +import { Route } from '@/types'; + +import { handler } from './common'; + +export const route: Route = { + path: '/account/main/1', + parameters: { id: '分类 id,见下表,可在对应分类页 URL 中找到' }, + name: '界面号', + example: '/jiemian/account/main/1', + maintainers: ['nczitzk'], + handler, + description: `| [财经号](https://www.jiemian.com/account/main/1.html) | [城市号](https://www.jiemian.com/account/main/2.html) | [媒体号](https://www.jiemian.com/account/main/3.html) | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| 1 | 2 | 3 | +`, +}; diff --git a/lib/routes/jiemian/common.ts b/lib/routes/jiemian/common.ts new file mode 100644 index 000000000000..8625e44975eb --- /dev/null +++ b/lib/routes/jiemian/common.ts @@ -0,0 +1,101 @@ +import { Data } from '@/types'; + +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import { art } from '@/utils/render'; +import path from 'node:path'; + +export const handler = async (ctx): Promise => { + const { category = '' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; + + const rootUrl = 'https://www.jiemian.com'; + const currentUrl = new URL(category ? `${category}.html` : '', rootUrl).href; + + const response = await ofetch(currentUrl); + + const $ = load(response); + + let items = {}; + const links = $('a').toArray(); + for (const el of links) { + const item = $(el); + const href = item.prop('href'); + const link = href ? (href.startsWith('/') ? new URL(href, rootUrl).href : href) : undefined; + + if (link && /\/(article|video)\/\w+\.html/.test(link)) { + items[link] = { + title: item.text(), + link, + }; + } + } + + items = await Promise.all( + Object.values(items) + .slice(0, limit) + .map((item) => + cache.tryGet(item.link, async () => { + const detailResponse = await ofetch(item.link); + + const content = load(detailResponse); + const image = content('div.article-img img').first(); + const video = content('#video-player').first(); + + item.title = content('div.article-header h1').eq(0).text(); + item.description = art(path.join(__dirname, 'templates/description.art'), { + image: image + ? { + src: image.prop('src'), + alt: image.next('p').text() || item.title, + } + : undefined, + video: video + ? { + src: video.prop('data-url'), + poster: video.prop('data-poster'), + width: video.prop('width'), + height: video.prop('height'), + } + : undefined, + intro: content('div.article-header p').text(), + description: content('div.article-content').html(), + }); + item.author = content('span.author') + .first() + .find('a') + .toArray() + .map((a) => content(a).text()) + .join('/'); + item.category = content('meta.meta-container a') + .toArray() + .map((c) => content(c).text()); + item.pubDate = parseDate(content('div.article-info span[data-article-publish-time]').prop('data-article-publish-time'), 'X'); + item.upvotes = content('span.opt-praise__count').text() ? Number.parseInt(content('span.opt-praise__count').text(), 10) : 0; + item.comments = content('span.opt-comment__count').text() ? Number.parseInt(content('span.opt-comment__count').text(), 10) : 0; + + return item; + }) + ) + ); + + const title = $('title').text(); + const titleSplits = title.split(/_/); + const image = $('div.logo img').prop('src'); + const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; + + return { + item: items, + title, + link: currentUrl, + description: $('meta[name="description"]').prop('content'), + language: $('html').prop('lang'), + image, + icon, + logo: icon, + subtitle: titleSplits[0], + author: titleSplits.pop(), + }; +}; diff --git a/lib/routes/jiemian/list.ts b/lib/routes/jiemian/list.ts deleted file mode 100644 index 95637ee14fd9..000000000000 --- a/lib/routes/jiemian/list.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Route } from '@/types'; -export const route: Route = { - path: '/list/:id', - name: 'Unknown', - maintainers: [], - handler, -}; - -function handler(ctx) { - const id = ctx.req.param('id'); - - const redirectTo = `/jiemian${id ? `/lists/${id}` : ''}`; - ctx.set('redirect', redirectTo); -} diff --git a/lib/routes/jiemian/lists.ts b/lib/routes/jiemian/lists.ts index 4e0ea0c8ec38..638d605f87a0 100644 --- a/lib/routes/jiemian/lists.ts +++ b/lib/routes/jiemian/lists.ts @@ -1,110 +1,99 @@ import { Route } from '@/types'; -import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { load } from 'cheerio'; -import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; -import path from 'node:path'; +import { handler } from './common'; export const route: Route = { - path: '/:category{.+}?', - name: 'Unknown', - maintainers: [], + path: '/lists/:id', + parameters: { id: '分类 id,见下表,可在对应分类页 URL 中找到' }, + name: '栏目', + example: '/jiemian/lists/65', + maintainers: ['WenhuWee', 'nczitzk'], handler, -}; + description: `| [首页](https://www.jiemian.com) | [商业](https://www.jiemian.com/lists/2.html) | [财经](https://www.jiemian.com/lists/800.html) | [新闻](https://www.jiemian.com/lists/801.html) | [文化生活](https://www.jiemian.com/lists/130.html) | [快报](https://www.jiemian.com/lists/4.html) | +| ------------------------------- | -------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- | -------------------------------------------- | +| | 2 | 800 | 801 | 130 | 4 | + +::: details 更多分类 + +#### [首页](https://www.jiemian.com) + +| [科技](https://www.jiemian.com/lists/65.html) | [金融](https://www.jiemian.com/lists/9.html) | [证券](https://www.jiemian.com/lists/112.html) | [地产](https://www.jiemian.com/lists/62.html) | [汽车](https://www.jiemian.com/lists/51.html) | [健康](https://www.jiemian.com/lists/472.html) | +| --------------------------------------------- | -------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | +| 65 | 9 | 112 | 62 | 51 | 472 | + +| [大湾区](https://www.jiemian.com/lists/680.html) | [元宇宙](https://www.jiemian.com/lists/704.html) | [文旅](https://www.jiemian.com/lists/105.html) | [数据](https://www.jiemian.com/lists/154.html) | [ESG](https://www.jiemian.com/lists/712.html) | [双碳](https://www.jiemian.com/lists/877.html) | +| ------------------------------------------------ | ------------------------------------------------ | ---------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | +| 680 | 704 | 105 | 154 | 712 | 877 | + +| [电厂](https://www.jiemian.com/lists/872.html) | +| ---------------------------------------------- | +| 872 | + +#### [商业](https://www.jiemian.com/lists/2.html) + +| [科技](https://www.jiemian.com/lists/65.html) | [地产](https://www.jiemian.com/lists/62.html) | [ 汽车](https://www.jiemian.com/lists/51.html) | [消费](https://www.jiemian.com/lists/31.html) | [工业](https://www.jiemian.com/lists/28.html) | [时尚](https://www.jiemian.com/lists/68.html) | +| --------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| 65 | 62 | 51 | 31 | 28 | 68 | + +| [交通](https://www.jiemian.com/lists/30.html) | [医药](https://www.jiemian.com/lists/472.html) | [互联网](https://www.jiemian.com/lists/851.html) | [创投 ](https://www.jiemian.com/lists/858.html) | [能源](https://www.jiemian.com/lists/856.html) | [数码](https://www.jiemian.com/lists/853.html) | +| --------------------------------------------- | ---------------------------------------------- | ------------------------------------------------ | ----------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| 30 | 472 | 851 | 858 | 856 | 853 | + +| [教育](https://www.jiemian.com/lists/256.html) | [食品](https://www.jiemian.com/lists/845.html) | [新能源](https://www.jiemian.com/lists/857.html) | [家电](https://www.jiemian.com/lists/850.html) | [健康](https://www.jiemian.com/lists/854.html) | [酒业](https://www.jiemian.com/lists/676.html) | +| ---------------------------------------------- | ---------------------------------------------- | ------------------------------------------------ | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| 256 | 845 | 857 | 850 | 854 | 676 | + +| [物流](https://www.jiemian.com/lists/841.html) | [零售](https://www.jiemian.com/lists/847.html) | [美妆](https://www.jiemian.com/lists/838.html) | [楼市](https://www.jiemian.com/city/main/181.html) | [家居](https://www.jiemian.com/lists/694.html) | [餐饮](https://www.jiemian.com/lists/848.html) | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| 841 | 847 | 838 | city/main/181 | 694 | 848 | + +| [日用](https://www.jiemian.com/lists/846.html) | [企服](https://www.jiemian.com/lists/852.html) | [珠宝](https://www.jiemian.com/lists/839.html) | [腕表](https://www.jiemian.com/lists/840.html) | [ 商学院](https://www.jiemian.com/lists/605.html) | [元宇宙](https://www.jiemian.com/lists/704.html) | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ------------------------------------------------- | ------------------------------------------------ | +| 846 | 852 | 839 | 840 | 605 | 704 | + +| [电厂](https://www.jiemian.com/lists/872.html) | [农业](https://www.jiemian.com/lists/883.html) | +| ---------------------------------------------- | ---------------------------------------------- | +| 872 | 883 | -async function handler(ctx) { - const { category = '' } = ctx.req.param(); - const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; - - const rootUrl = 'https://www.jiemian.com'; - const currentUrl = new URL(category ? `${category}.html` : '', rootUrl).href; - - const { data: response } = await got(currentUrl); - - const $ = load(response); - - let items = $('a') - .toArray() - .reduce((acc, item) => { - item = $(item); - - const href = item.prop('href'); - const link = href ? (href.startsWith('/') ? new URL(href, rootUrl).href : href) : undefined; - - if (link && /\/(article|video)\/\w+\.html/.test(link)) { - acc[link] = { - title: item.text(), - link, - }; - } - return acc; - }, {}); - - items = await Promise.all( - Object.values(items) - .slice(0, limit) - .map((item) => - cache.tryGet(item.link, async () => { - const { data: detailResponse } = await got(item.link); - - const content = load(detailResponse); - const image = content('div.article-img img').first(); - const video = content('#video-player').first(); - - item.title = content('div.article-header h1').eq(0).text(); - item.description = art(path.join(__dirname, 'templates/description.art'), { - image: image - ? { - src: image.prop('src'), - alt: image.next('p').text() || item.title, - } - : undefined, - video: video - ? { - src: video.prop('data-url'), - poster: video.prop('data-poster'), - width: video.prop('width'), - height: video.prop('height'), - } - : undefined, - intro: content('div.article-header p').text(), - description: content('div.article-content').html(), - }); - item.author = content('span.author') - .first() - .find('a') - .toArray() - .map((a) => content(a).text()) - .join('/'); - item.category = content('meta.meta-container a') - .toArray() - .map((c) => content(c).text()); - item.pubDate = parseDate(content('div.article-info span[data-article-publish-time]').prop('data-article-publish-time'), 'X'); - item.upvotes = content('span.opt-praise__count').text() ? Number.parseInt(content('span.opt-praise__count').text(), 10) : 0; - item.comments = content('span.opt-comment__count').text() ? Number.parseInt(content('span.opt-comment__count').text(), 10) : 0; - - return item; - }) - ) - ); - - const title = $('title').text(); - const titleSplits = title.split(/_/); - const image = $('div.logo img').prop('src'); - const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl).href; - - return { - item: items, - title, - link: currentUrl, - description: $('meta[name="description"]').prop('content'), - language: $('html').prop('lang'), - image, - icon, - logo: icon, - subtitle: titleSplits[0], - author: titleSplits.pop(), - }; -} +#### [财经](https://www.jiemian.com/lists/800.html) + +| [金融](https://www.jiemian.com/lists/9.html) | [投资](https://www.jiemian.com/lists/86.html) | [证券](https://www.jiemian.com/lists/112.html) | [IPO](https://www.jiemian.com/lists/699.html) | [宏观](https://www.jiemian.com/lists/174.html) | [股市](https://www.jiemian.com/lists/418.html) | +| -------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| 9 | 86 | 112 | 699 | 174 | 418 | + +| [财富](https://www.jiemian.com/lists/410.html) | [有连云](https://www.jiemian.com/lists/889.html) | +| ---------------------------------------------- | ------------------------------------------------ | +| 410 | 889 | + +#### [新闻](https://www.jiemian.com/lists/801.html) + +| [天下](https://www.jiemian.com/lists/32.html) | [中国](https://www.jiemian.com/lists/71.html) | [ 评论](https://www.jiemian.com/lists/8.html) | [数据](https://www.jiemian.com/lists/154.html) | [职场](https://www.jiemian.com/lists/50.html) | [国是](https://www.jiemian.com/lists/422.html) | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | ---------------------------------------------- | +| 32 | 71 | 8 | 154 | 50 | 422 | + +| [体育](https://www.jiemian.com/lists/82.html) | [文娱](https://www.jiemian.com/lists/63.html) | [ 影像](https://www.jiemian.com/lists/225.html) | [营销](https://www.jiemian.com/lists/49.html) | [大 湾区](https://www.jiemian.com/lists/680.html) | [ESG](https://www.jiemian.com/lists/712.html) | +| --------------------------------------------- | --------------------------------------------- | ----------------------------------------------- | --------------------------------------------- | ------------------------------------------------- | --------------------------------------------- | +| 82 | 63 | 225 | 49 | 680 | 712 | + +| [双碳](https://www.jiemian.com/lists/877.html) | [长三角](https://www.jiemian.com/lists/917.html) | +| ---------------------------------------------- | ------------------------------------------------ | +| 877 | 917 | + +#### [文化生活](https://www.jiemian.com/lists/130.html) + +| [文化](https://www.jiemian.com/lists/130.html) | [文旅](https://www.jiemian.com/lists/105.html) | [生活方式](https://www.jiemian.com/lists/135.html) | [美食美酒](https://www.jiemian.com/lists/865.html) | [艺术](https://www.jiemian.com/lists/643.html) | [游戏](https://www.jiemian.com/lists/118.html) | +| ---------------------------------------------- | ---------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| 130 | 105 | 135 | 865 | 643 | 118 | + +| [正午](https://www.jiemian.com/lists/53.html) | [箭厂](https://www.jiemian.com/video/lists/195_1.html) | +| --------------------------------------------- | ------------------------------------------------------ | +| 53 | video/lists/195\_1 | + +#### [快报](https://www.jiemian.com/lists/4.html) + +| [今日热点](https://www.jiemian.com/lists/1324kb.html) | [公司头条](https://www.jiemian.com/lists/1322kb.html) | [股市前沿](https://www.jiemian.com/lists/1327kb.html) | [监管通报](https://www.jiemian.com/lists/1330kb.html) | [财经速览](https://www.jiemian.com/lists/1326kb.html) | [时事追踪](https://www.jiemian.com/lists/1325kb.html) | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| 1324kb | 1322kb | 1327kb | 1330kb | 1326kb | 1325kb | + +:::`, +}; diff --git a/lib/routes/jiemian/special.ts b/lib/routes/jiemian/special.ts new file mode 100644 index 000000000000..0cbb139375f2 --- /dev/null +++ b/lib/routes/jiemian/special.ts @@ -0,0 +1,12 @@ +import { Route } from '@/types'; + +import { handler } from './common'; + +export const route: Route = { + path: '/special/1192', + parameters: { id: '分类 id,见下表,可在对应分类页 URL 中找到' }, + name: '专题', + example: '/jiemian/special/1192', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/jiemian/video.ts b/lib/routes/jiemian/video.ts new file mode 100644 index 000000000000..35799200312b --- /dev/null +++ b/lib/routes/jiemian/video.ts @@ -0,0 +1,19 @@ +import { Route } from '@/types'; + +import { handler } from './common'; + +export const route: Route = { + path: '/video/lists/258_1', + parameters: { id: '分类 id,见下表,可在对应分类页 URL 中找到' }, + name: '视频', + example: '/jiemian/video/lists/258_1', + maintainers: ['nczitzk'], + handler, + description: `| [界面 Vnews](https://www.jiemian.com/video/lists/258_1.html) | [直播](https://www.jiemian.com/videoLive/lists_1.html) | [箭厂](https://www.jiemian.com/video/lists/195_1.html) | [面谈](https://www.jiemian.com/video/lists/111_1.html) | [品牌创酷](https://www.jiemian.com/video/lists/226_1.html) | [番 茄社](https://www.jiemian.com/video/lists/567_1.html) | +| ------------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------------- | --------------------------------------------------------- | +| 258\_1 | videoLive/lists\_1 | 195\_1 | 111\_1 | 226\_1 | 567\_1 | + +| [商业微史记](https://www.jiemian.com/video/lists/882_1.html) | +| ------------------------------------------------------------ | +| 882\_1 |`, +}; diff --git a/lib/routes/jiemian/vip.ts b/lib/routes/jiemian/vip.ts new file mode 100644 index 000000000000..f0a7949c15c3 --- /dev/null +++ b/lib/routes/jiemian/vip.ts @@ -0,0 +1,20 @@ +import { Route } from '@/types'; + +import { handler } from './common'; + +export const route: Route = { + path: '/pro/lists/12', + parameters: { id: '分类 id,见下表,可在对应分类页 URL 中找到' }, + name: 'VIP', + example: '/jiemian/pro/lists/12', + maintainers: ['nczitzk'], + handler, + description: `| [投资早晚报](https://www.jiemian.com/pro/lists/12.html) | [宏观晚 6 点](https://www.jiemian.com/pro/lists/20.html) | [打新早报](https://www.jiemian.com/pro/lists/21.html) | [盘前机会前瞻](https://www.jiemian.com/pro/lists/13.html) | [公告快评](https://www.jiemian.com/pro/lists/14.html) | [盘中必读](https://www.jiemian.com/pro/lists/15.html) | +| ------------------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| 12 | 20 | 21 | 13 | 14 | 15 | + +| [金股挖掘](https://www.jiemian.com/pro/lists/16.html) | [调研早知道](https://www.jiemian.com/pro/lists/17.html) | [研报新知](https://www.jiemian.com/pro/lists/18.html) | [大势侦察](https://www.jiemian.com/pro/lists/1.html) | [市场风向标](https://www.jiemian.com/pro/lists/19.html) | +| ----------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- | +| 16 | 17 | 18 | 1 | 19 | +`, +}; diff --git a/lib/routes/jike/utils.ts b/lib/routes/jike/utils.ts index 6ea6f6b69ce1..747e0deca830 100644 --- a/lib/routes/jike/utils.ts +++ b/lib/routes/jike/utils.ts @@ -178,7 +178,6 @@ const constructTopicEntry = async (ctx, url) => { return { title: '主题 ID 不存在,或该主题暂无内容', }; - return null; } const topic = data.topic; diff --git a/lib/routes/juejin/pins.ts b/lib/routes/juejin/pins.ts index 2f19d2bc7b94..98dbd699ac48 100644 --- a/lib/routes/juejin/pins.ts +++ b/lib/routes/juejin/pins.ts @@ -59,12 +59,10 @@ async function handler(ctx) { const link = `https://juejin.cn/pin/${guid}`; const pubDate = parseDate(item.msg_Info.ctime * 1000); const author = item.author_user_info.user_name; - const imgs = item.msg_Info.pic_list.reduce((imgs, item) => { - imgs += ` -
- `; - return imgs; - }, ''); + let imgs = ''; + for (const img of item.msg_Info.pic_list) { + imgs += `
`; + } const description = ` ${content.replaceAll('\n', '
')}
${imgs}
diff --git a/lib/routes/keep/templates/user.art b/lib/routes/keep/templates/user.art index e40d36baed87..c5c30c4cfbf7 100644 --- a/lib/routes/keep/templates/user.art +++ b/lib/routes/keep/templates/user.art @@ -1,16 +1,18 @@ - 项目: +项目: {{ if item.meta.name === item.meta.workoutName }} -{{ item.meta.name }} + {{ item.meta.name }} {{ else }} -{{ item.meta.name }} - {{ item.meta.workoutName }} + {{ item.meta.name }} - {{ item.meta.workoutName }} {{ /if }}
时长:{{ minute }}分{{ second }}秒 {{ if item.content }} -
-备注:{{ item.content }} +
+ 备注:{{ item.content }} {{ /if }} -{{ if imagesTpl }} -
-{{@ imagesTpl }} +{{ if images }} +
+ {{ each images image }} + + {{ /each }} {{ /if }} diff --git a/lib/routes/keep/user.ts b/lib/routes/keep/user.ts index a02ddb55e98c..e8658ed72fb5 100644 --- a/lib/routes/keep/user.ts +++ b/lib/routes/keep/user.ts @@ -1,6 +1,6 @@ import { Route } from '@/types'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { art } from '@/utils/render'; import path from 'node:path'; @@ -30,53 +30,47 @@ export const route: Route = { async function handler(ctx) { const id = ctx.req.param('id'); - const response = await got({ - method: 'get', - url: `https://api.gotokeep.com/social/v3/people/${id}/home`, + const response = await ofetch(`https://api.gotokeep.com/social/v3/people/${id}/home`, { headers: { Referer: `https://show.gotokeep.com/users/${id}`, }, }); // check user have post or not - if (response.data.data.entries.length === 0) { + if (response.data.entries.length === 0) { throw new Error('该用户运动日记为空'); } - response.data.data.entries[0] = response.data.data.entries[0].entries; - const data = response.data.data.entries.reduce((all, current) => [...all, ...current.entries]); + const items = response.data.entries.flatMap((entry) => + entry.entries.map((item) => { + let images: string[] = []; + if (item.images) { + images = item.meta.picture ? [item.meta.picture, ...item.images] : item.images; + } else if (item.meta.picture) { + images = [item.meta.picture]; + } + + const minute = Math.floor(item.meta.secondDuration / 60); + const second = item.meta.secondDuration - minute * 60; + return { + title: item.meta.title.trim(), + pubDate: item.created, + link: `https://show.gotokeep.com/entries/${item.id}`, + author: item.author.username, + description: art(path.join(__dirname, 'templates/user.art'), { + item, + minute, + second, + images, + }), + }; + }) + ); return { - title: `${data[0].author.username} 的 Keep 动态`, + title: `${items[0].author} 的 Keep 动态`, link: `https://show.gotokeep.com/users/${id}`, language: 'zh-cn', - item: data - .filter((item) => 'title' in item.meta) - .map((item) => { - let images = []; - if (item.images) { - images = item.meta.picture ? [...item.images, ...item.meta.picture] : item.images; - } else if (item.meta.picture) { - images = [item.meta.picture]; - } - let imagesTpl = ''; - for (const item of images) { - imagesTpl += ``; - } - - const minute = Math.floor(item.meta.secondDuration / 60); - const second = item.meta.secondDuration - minute * 60; - return { - title: item.meta.title.trim(), - pubDate: item.created, - link: `https://show.gotokeep.com/entries/${item.id}`, - description: art(path.join(__dirname, 'templates/user.art'), { - item, - minute, - second, - imagesTpl, - }), - }; - }), + item: items, }; } diff --git a/lib/routes/kpopping/kpics.ts b/lib/routes/kpopping/kpics.ts index 05f36d9ac196..e993b2cec800 100644 --- a/lib/routes/kpopping/kpics.ts +++ b/lib/routes/kpopping/kpics.ts @@ -109,30 +109,29 @@ export const handler = async (ctx: Context): Promise => { }; const mediaEls: Element[] = $$('div.pics').first().find('img').toArray(); - const medias: Record> = mediaEls.reduce((acc: Record>, mediaEl) => { + const medias: Record> = {}; + let imageCount = 1; + for (const mediaEl of mediaEls) { const $$mediaEl: Cheerio = $$(mediaEl); const url: string | undefined = $$mediaEl.attr('src') ? new URL($$mediaEl.attr('src') as string, baseUrl).href : undefined; if (!url) { - return acc; + continue; } const medium: string = 'image'; - const count: number = Object.values(acc).filter((m) => m.medium === medium).length + 1; - const key: string = `${medium}${count}`; + const key: string = `${medium}${imageCount++}`; - acc[key] = { + medias[key] = { url, medium, title: $$mediaEl.attr('alt') || title, description: $$mediaEl.attr('alt') || title, thumbnail: url, }; + } - return acc; - }, {}); - - if (medias) { + if (Object.keys(medias).length > 0) { processedItem = { ...processedItem, media: medias, diff --git a/lib/routes/manhuagui/comic.ts b/lib/routes/manhuagui/comic.ts index 32a4dd41a2e4..96418ed240e3 100644 --- a/lib/routes/manhuagui/comic.ts +++ b/lib/routes/manhuagui/comic.ts @@ -10,38 +10,37 @@ const getChapters = ($) => { let time_mark = 100; // 用于一次更新多个新章节的排序 let new_time_mark = 0; - return $('h4') - .toArray() - .map((ele) => { - const categoryName = $(ele).text(); - while (!$(ele.next).hasClass('chapter-list')) { - ele = ele.next; - } - ele = ele.next; - return $(ele) - .children('ul') - .toArray() - .reverse() - .reduce((acc, curr) => [...acc, ...$(curr).children('li').toArray()], []) - .map((ele) => { - const a = $(ele).children('a'); - // 通过操作发布时间来对章节进行排序,如果是刚刚更新的单行本或者番外,保留最新更新时间 - let pDate = new Date(new Date($.pubDate) - time_mark++ * 1000); - if (a.find('em').length > 0) { - // 对更新的章节也进行排序 - pDate = new Date(new Date($.pubDate) - new_time_mark++ * 1000); - $.newChapterCnt++; - } - return { - link: new URL(a.attr('href'), baseUrl).href, - title: a.attr('title'), - pub_date: pDate, - num: a.find('i').text(), - category: categoryName, - }; + const result: DataItem[] = []; + $('h4').each((_, ele) => { + const categoryName = $(ele).text(); + let nextEle = ele.next; + while (nextEle && !$(nextEle).hasClass('chapter-list')) { + nextEle = nextEle.next; + } + if (!nextEle) { + return; + } + for (const ul of $(nextEle).children('ul').toArray().reverse()) { + for (const li of $(ul).children('li').toArray()) { + const a = $(li).children('a'); + // 通过操作发布时间来对章节进行排序,如果是刚刚更新的单行本或者番外,保留最新更新时间 + let pDate = new Date(new Date($.pubDate) - time_mark++ * 1000); + if (a.find('em').length > 0) { + // 对更新的章节也进行排序 + pDate = new Date(new Date($.pubDate) - new_time_mark++ * 1000); + $.newChapterCnt++; + } + result.push({ + link: new URL(a.attr('href'), baseUrl).href, + title: a.attr('title'), + pub_date: pDate, + num: a.find('i').text(), + category: categoryName, }); - }) - .reduce((acc, curr) => [...acc, ...curr]); + } + } + }); + return result; }; export const route: Route = { diff --git a/lib/routes/mycard520/news.ts b/lib/routes/mycard520/news.ts index 02c377ba7930..65c312b3c9a4 100644 --- a/lib/routes/mycard520/news.ts +++ b/lib/routes/mycard520/news.ts @@ -70,16 +70,7 @@ export const handler = async (ctx: Context): Promise => { const pubDateStr: string | undefined = $$('div.date').first().text(); const upDatedStr: string | undefined = pubDateStr; - const clearIndex = $$pageBox - .children() - .toArray() - .map((el, index) => ({ el, index })) - .filter(({ el }) => el.tagName === 'div' && el.attributes.some((attr) => attr.name === 'style' && attr.value.split(';').some((prop) => prop.trim() === 'clear:both'))) - .reduce((_, { index }) => index, -1); - - if (clearIndex !== -1) { - $$pageBox.children().slice(0, clearIndex).remove(); - } + $$pageBox.find('h2, div.date, .the_champ_sharing_container').remove(); const description: string | undefined = $$pageBox.html() ?? item.description; diff --git a/lib/routes/mydrivers/cid.ts b/lib/routes/mydrivers/cid.ts index bd16717e04d8..028dbeb08005 100644 --- a/lib/routes/mydrivers/cid.ts +++ b/lib/routes/mydrivers/cid.ts @@ -1,16 +1,202 @@ import { Route } from '@/types'; -import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import parser from '@/utils/rss-parser'; import { rootUrl, rootRSSUrl, title, categories, getInfo, processItems } from './util'; export const route: Route = { - path: ['/cid/:id?', '/zhibo'], - name: 'Unknown', - maintainers: [], + path: '/cid/:id?', + name: '更多分类', + parameters: { id: '分类,见下表,留空为直播' }, + example: '/mydrivers/cid/2', + maintainers: ['nczitzk'], handler, url: 'm.mydrivers.com/', + radar: [ + { + source: ['m.mydrivers.com/'], + target: '/zhibo', + }, + ], + description: `::: details 更多分类 + +| 电脑配件 | 手机之家 | 家用电器 | 网络设备 | 办公外设 | 游戏之家 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| cid/2 | cid/3 | cid/4 | cid/5 | cid/6 | cid/7 | + +| 电脑软件 | 业内动向 | 品牌整机 | 其它资讯 | 显卡 | CPU | +| -------- | -------- | -------- | -------- | ------ | ------ | +| cid/8 | cid/9 | cid/10 | cid/11 | cid/12 | cid/13 | + +| 主板 | 内存 | 硬盘 | 机箱 | 电源 | 散热器 | +| ------ | ------ | ------ | ------ | ------ | ------ | +| cid/14 | cid/15 | cid/16 | cid/17 | cid/18 | cid/19 | + +| 光驱 | 声卡 | 键鼠 | 音箱 | 手机厂商 | 手机配件 | +| ------ | ------ | ------ | ------ | -------- | -------- | +| cid/20 | cid/21 | cid/22 | cid/23 | cid/24 | cid/25 | + +| PDA | MP3/MP4 | 摄像机 | 数码相机 | 摄像头 | 数码配件 | +| ------ | ------- | ------ | -------- | ------ | -------- | +| cid/26 | cid/27 | cid/29 | cid/30 | cid/31 | cid/32 | + +| 电子书 | 导航产品 | 录音笔 | 交换机 | 路由器 | 防火墙 | +| ------ | -------- | ------ | ------ | ------ | ------ | +| cid/33 | cid/34 | cid/35 | cid/37 | cid/38 | cid/40 | + +| 网卡 | 网络存储 | UPS | 打印机 | 复印机 | 复合机 | +| ------ | -------- | ------ | ------ | ------ | ------ | +| cid/41 | cid/43 | cid/44 | cid/45 | cid/46 | cid/47 | + +| 投影仪 | 扫描仪 | 传真机 | 电脑游戏 | 主机游戏 | 游戏主机 | +| ------ | ------ | ------ | -------- | -------- | -------- | +| cid/48 | cid/49 | cid/51 | cid/52 | cid/53 | cid/54 | + +| 掌机游戏 | 电脑驱动 | 桌面系统 | 视点人物 | 数据报告 | 科技前沿 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| cid/55 | cid/57 | cid/58 | cid/62 | cid/63 | cid/65 | + +| 笔记本 | 台式机 | 服务器 | 一体机 | 其他 | PC硬件 | +| ------ | ------ | ------ | ------ | ------ | ------ | +| cid/66 | cid/67 | cid/68 | cid/69 | cid/73 | cid/74 | + +| 时尚数码 | 软件驱动 | 显示器 | 音箱耳机 | 投影机 | 便携机 | +| -------- | -------- | ------ | -------- | ------- | ------- | +| cid/78 | cid/79 | cid/80 | cid/92 | cid/100 | cid/108 | + +| 手机 | MP3 | MP4 | 闪存盘 | DV摄像机 | U盘 | +| ------- | ------- | ------- | ------- | -------- | ------- | +| cid/109 | cid/112 | cid/113 | cid/114 | cid/115 | cid/116 | + +| GPS | 移动硬盘 | 操作系统 | 驱动 | 软件 | 软件更新 | +| ------- | -------- | -------- | ------- | ------- | -------- | +| cid/117 | cid/119 | cid/120 | cid/121 | cid/122 | cid/123 | + +| 新软推荐 | 业界动态 | 软件评测 | 软件技巧 | 游戏相关 | 驱动研究 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| cid/124 | cid/125 | cid/126 | cid/127 | cid/128 | cid/130 | + +| 游戏试玩 | 硬件学堂 | 实用技巧 | 新软体验 | 资讯教程 | 软件横评 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| cid/131 | cid/132 | cid/133 | cid/134 | cid/135 | cid/136 | + +| Windows | Mac | Linux | 其它 | 使用技巧 | 深入研究 | +| ------- | ------- | ------- | ------- | -------- | -------- | +| cid/137 | cid/138 | cid/139 | cid/140 | cid/141 | cid/142 | + +| 游戏机 | 显示 | 存储 | 音频 | 外设 | 数码 | +| ------- | ------- | ------- | ------- | ------- | ------- | +| cid/144 | cid/145 | cid/146 | cid/147 | cid/148 | cid/151 | + +| 网络 | 办公 | 维修 | 安全 | 聊天 | 影音 | +| ------- | ------- | ------- | ------- | ------- | ------- | +| cid/152 | cid/154 | cid/155 | cid/156 | cid/157 | cid/158 | + +| 国内 | 国外 | 办公应用 | 设计创意 | 基础知识 | 程序 | +| ------- | ------- | -------- | -------- | -------- | ------- | +| cid/159 | cid/160 | cid/161 | cid/162 | cid/163 | cid/164 | + +| 其他硬件 | 电视卡/盒 | 游戏体验 | 平板电视 | 企业动态 | 天文航天 | +| -------- | --------- | -------- | -------- | -------- | -------- | +| cid/166 | cid/170 | cid/172 | cid/173 | cid/174 | cid/175 | + +| MID设备 | 数码相框 | 耳机 | 通讯运营商 | 电视盒 | 线材线缆 | +| ------- | -------- | ------- | ---------- | ------- | -------- | +| cid/176 | cid/177 | cid/179 | cid/180 | cid/182 | cid/183 | + +| 小家电 | 网络游戏 | 行情信息 | 科学动态 | 生物世界 | 历史考古 | +| ------- | -------- | -------- | -------- | -------- | -------- | +| cid/184 | cid/186 | cid/188 | cid/192 | cid/193 | cid/194 | + +| 生科医学 | 地理自然 | 工程建筑 | 苹果手机 | 谷歌Android | 塞班手机 | +| -------- | -------- | -------- | -------- | ----------- | -------- | +| cid/195 | cid/196 | cid/197 | cid/201 | cid/202 | cid/203 | + +| 黑莓手机 | 微软手机 | 移动处理器 | 山寨机 | 手机游戏 | 安卓应用 | +| -------- | -------- | ---------- | ------- | -------- | -------- | +| cid/204 | cid/205 | cid/206 | cid/208 | cid/209 | cid/210 | + +| 娱乐生活 | 明星全接触 | 电影影讯 | 电视节目 | 音乐戏曲 | 国际风云 | +| -------- | ---------- | -------- | -------- | -------- | -------- | +| cid/212 | cid/213 | cid/214 | cid/215 | cid/216 | cid/217 | + +| 国内传真 | 社会民生 | 生活百态 | 医药健康 | 家居尚品 | 星座旅游 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| cid/218 | cid/219 | cid/220 | cid/221 | cid/222 | cid/223 | + +| 评论分析 | 体育竞技 | IT八卦 | 科技动态 | 游戏动态 | 手机系统 | +| -------- | -------- | ------- | -------- | -------- | -------- | +| cid/224 | cid/225 | cid/226 | cid/227 | cid/228 | cid/232 | + +| 智能设备 | 生活电器 | 汽车相关 | 飞机航空 | 手机周边 | 网络运营商 | +| -------- | -------- | -------- | -------- | -------- | ---------- | +| cid/233 | cid/234 | cid/235 | cid/236 | cid/237 | cid/238 | + +| 平板电脑 | 苹果iPad | 安卓平板 | Windows平板 | 创业路上 | 网友热议 | +| -------- | -------- | -------- | ----------- | -------- | -------- | +| cid/239 | cid/240 | cid/241 | cid/242 | cid/243 | cid/244 | + +| IT圈 | 数码周边 | 智能手环 | 智能眼镜 | 智能手表 | iOS应用 | +| ------- | -------- | -------- | -------- | -------- | ------- | +| cid/246 | cid/247 | cid/248 | cid/249 | cid/250 | cid/251 | + +| 壁纸主题 | 游戏厂商 | 数理化学 | 科普知识 | 奇趣探险 | 汽车世界 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| cid/252 | cid/253 | cid/254 | cid/255 | cid/256 | cid/257 | + +| 传统汽车 | 电动汽车 | 新能源汽车 | 无人驾驶汽车 | 车载系统 | 车载配件 | +| -------- | -------- | ---------- | ------------ | -------- | -------- | +| cid/258 | cid/259 | cid/260 | cid/261 | cid/262 | cid/263 | + +| 汽车厂商 | 影音动漫 | 精彩影视 | 电影动画 | 艺术设计 | 摄影达人 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| cid/264 | cid/265 | cid/266 | cid/267 | cid/269 | cid/270 | + +| 固件 | 样张赏析 | 创意摄影 | WP应用 | 教育未来 | 安卓手机 | +| ------- | -------- | -------- | ------- | -------- | -------- | +| cid/272 | cid/273 | cid/274 | cid/284 | cid/285 | cid/288 | + +| 智能穿戴 | 移动应用 | 电子竞技 | 游戏八卦 | 游戏评测 | 生活百科 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| cid/290 | cid/292 | cid/297 | cid/298 | cid/299 | cid/301 | + +| 智能家居 | 智能插座 | 智能摄像头 | 智能路由器 | 智能体重秤 | 智能血压计 | +| -------- | -------- | ---------- | ---------- | ---------- | ---------- | +| cid/302 | cid/303 | cid/304 | cid/305 | cid/306 | cid/307 | + +| 空气净化器 | 智能净水器 | 电动两轮车 | 公司财报 | 智能行车记录仪 | 网络影视 | +| ---------- | ---------- | ---------- | -------- | -------------- | -------- | +| cid/308 | cid/309 | cid/310 | cid/311 | cid/312 | cid/313 | + +| 多轴无人机 | 摩托车 | 自行车 | 共享经济 | 生活周边 | 网络安全 | +| ---------- | ------- | ------- | -------- | -------- | -------- | +| cid/314 | cid/316 | cid/317 | cid/320 | cid/321 | cid/322 | + +| 考勤机 | 网络红人 | 火车高铁 | 机器人 | 其他网络 | 快递物流 | +| ------- | -------- | -------- | ------- | -------- | -------- | +| cid/323 | cid/324 | cid/325 | cid/326 | cid/327 | cid/328 | + +| 科技资讯 | 好货推荐 | 日常用品 | 餐饮零食 | 化妆品 | 运动健康 | +| -------- | -------- | -------- | -------- | ------- | -------- | +| cid/329 | cid/334 | cid/335 | cid/336 | cid/339 | cid/340 | + +| 酒水饮料 | 个人洗护 | 电子产品 | 服装鞋帽 | 会员卡 | 用户投稿 | +| -------- | -------- | -------- | -------- | ------- | -------- | +| cid/341 | cid/342 | cid/343 | cid/345 | cid/346 | cid/351 | + +| APP投稿 | PC投稿 | 视频快讯 | 新品开箱 | 技巧教程 | 科技快讯 | +| ------- | ------- | -------- | -------- | -------- | -------- | +| cid/352 | cid/353 | cid/354 | cid/355 | cid/356 | cid/357 | + +| 产品评测 | 人物专访 | 会议活动 | 数码影音 | 数码影像 | 游戏周边 | +| -------- | -------- | -------- | -------- | -------- | -------- | +| cid/358 | cid/359 | cid/360 | cid/361 | cid/362 | cid/368 | + +| 汽车周边 | 个人交通 | 其他交通 | +| -------- | -------- | -------- | +| cid/369 | cid/370 | cid/371 | + +:::`, }; async function handler(ctx) { @@ -35,11 +221,11 @@ async function handler(ctx) { })); if (id) { - items = await processItems(items, cache.tryGet); + items = await processItems(items); } return { - ...(await getInfo(currentUrl, cache.tryGet)), + ...(await getInfo(currentUrl)), item: items, title: `${title} - ${feed.title.split(/_/).pop() || categories.zhibo}`, diff --git a/lib/routes/mydrivers/index.ts b/lib/routes/mydrivers/index.ts index 0f2abef41dcf..5e7859c7cfa5 100644 --- a/lib/routes/mydrivers/index.ts +++ b/lib/routes/mydrivers/index.ts @@ -1,6 +1,5 @@ import { Route } from '@/types'; -import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; @@ -12,9 +11,44 @@ import { rootUrl, title, categories, convertToQueryString, getInfo, processItems export const route: Route = { path: '/:category{.+}?', - name: 'Unknown', - maintainers: [], + name: '分类', + parameters: { category: '分类,见下表,默认为最新' }, + example: '/mydrivers/bcid/801', + maintainers: ['kt286', 'nczitzk'], handler, + radar: [ + { + source: ['m.mydrivers.com/'], + target: '/zhibo', + }, + ], + description: ` +#### 板块 + +| 电脑 | 手机 | 汽车 | 业界 | 游戏 | +| -------- | -------- | -------- | -------- | -------- | +| bcid/801 | bcid/802 | bcid/807 | bcid/803 | bcid/806 | + +#### 话题 + +| 科学 | 排行 | 评测 | 一图 | +| -------- | -------- | -------- | -------- | +| tid/1000 | tid/1001 | tid/1002 | tid/1003 | + +#### 品牌 + +| 安卓 | 阿里 | 微软 | 百度 | PS5 | Xbox | 华为 | +| -------- | -------- | ------- | ------- | --------- | -------- | -------- | +| icid/121 | icid/270 | icid/90 | icid/67 | icid/6950 | icid/194 | icid/136 | + +| 小米 | VIVO | 三星 | 魅族 | 一加 | 比亚迪 | 小鹏 | +| --------- | -------- | -------- | -------- | -------- | -------- | --------- | +| icid/9355 | icid/288 | icid/154 | icid/140 | icid/385 | icid/770 | icid/7259 | + +| 蔚来 | 理想 | 奔驰 | 宝马 | 大众 | +| --------- | ---------- | -------- | -------- | -------- | +| icid/7318 | icid/12947 | icid/429 | icid/461 | icid/481 | +`, }; async function handler(ctx) { @@ -57,15 +91,11 @@ async function handler(ctx) { }; }); - items = await processItems(items, cache.tryGet); + items = await processItems(items); return { - ...(await getInfo(currentUrl, cache.tryGet)), - ...Object.fromEntries( - Object.entries({ - item: items, - title: newTitle, - }).filter(([value]) => value) - ), + ...(await getInfo(currentUrl)), + ...(newTitle ? { title: newTitle } : {}), + item: items, }; } diff --git a/lib/routes/mydrivers/rank.ts b/lib/routes/mydrivers/rank.ts index e769f6d98b4d..95c3fc081e35 100644 --- a/lib/routes/mydrivers/rank.ts +++ b/lib/routes/mydrivers/rank.ts @@ -1,5 +1,4 @@ import { Route } from '@/types'; -import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -61,10 +60,10 @@ async function handler(ctx) { }; }); - items = await processItems(items, cache.tryGet); + items = await processItems(items); return { item: items, - ...(await getInfo(currentUrl, cache.tryGet, Number.parseInt(range, 10))), + ...(await getInfo(currentUrl, Number.parseInt(range, 10))), }; } diff --git a/lib/routes/mydrivers/util.ts b/lib/routes/mydrivers/util.ts index 48a119063ff4..e24f6a9d7869 100644 --- a/lib/routes/mydrivers/util.ts +++ b/lib/routes/mydrivers/util.ts @@ -2,6 +2,7 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; +import cache from '@/utils/cache'; const domain = 'mydrivers.com'; const rootUrl = `https://m.${domain}`; @@ -25,15 +26,12 @@ const convertToQueryString = (path) => { const parts = path.split('/'); const queryStringParams = []; - for (const [key, value] of parts.reduce((acc, part, index) => { - if (index % 2 === 0) { - acc.push([part]); - } else { - acc.at(-1).push(part); + for (let i = 0; i < parts.length; i += 2) { + const key = parts[i]; + const value = parts[i + 1]; + if (key !== undefined && value !== undefined) { + queryStringParams.push(`${key}=${value}`); } - return acc; - }, [])) { - queryStringParams.push(`${key}=${value}`); } return `?${queryStringParams.join('&')}`; @@ -42,12 +40,11 @@ const convertToQueryString = (path) => { /** * Retrieves information from a given URL using a provided tryGet function. * @param {string} url - The URL to retrieve information from. - * @param {function} tryGet - The tryGet function that handles the retrieval process. * @param {number|undefined} [range] - The index value of the range (optional). * @returns {Promise} - A promise that resolves to an object containing the retrieved information. */ -const getInfo = (url, tryGet, range) => - tryGet(url, async () => { +const getInfo = (url, range) => + cache.tryGet(url, async () => { const { data: response } = await got(url); const $ = load(response); @@ -79,10 +76,10 @@ const getInfo = (url, tryGet, range) => * @param {function} tryGet - The tryGet function that handles the retrieval process. * @returns {Promise>} Returns a Promise that resolves to an array of processed items. */ -const processItems = async (items, tryGet) => +const processItems = async (items) => await Promise.all( items.map((item) => - tryGet(`${domain}#${item.guid}`, async () => { + cache.tryGet(`${domain}#${item.guid}`, async () => { const { data: detailResponse } = await got(`${rootUrl}/newsview/${item.guid}.html`); const { data: voteResponse } = await got.post(apiVoteUrl, { diff --git a/lib/routes/newrank/utils.ts b/lib/routes/newrank/utils.ts index 066cd5b73c52..6abdf1169a29 100644 --- a/lib/routes/newrank/utils.ts +++ b/lib/routes/newrank/utils.ts @@ -42,7 +42,17 @@ const decrypt_douyin_detail_xyz = (nonce) => { return md5(str); }; -const flatten = (arr) => arr.reduce((acc, val) => (Array.isArray(val) ? [...acc, ...flatten(val)] : [...acc, val]), []); +const flatten = (arr) => { + const result = []; + for (const val of arr) { + if (Array.isArray(val)) { + result.push(...flatten(val)); + } else { + result.push(val); + } + } + return result; +}; function shouldUpdateCookie(forcedUpdate = false) { if (forcedUpdate) { diff --git a/lib/routes/nhk/news-web-easy.ts b/lib/routes/nhk/news-web-easy.ts index 85e3ad12d9af..538206bc405e 100644 --- a/lib/routes/nhk/news-web-easy.ts +++ b/lib/routes/nhk/news-web-easy.ts @@ -1,7 +1,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; @@ -33,33 +33,28 @@ export const route: Route = { }; async function handler(ctx) { - const { data } = await got('https://www3.nhk.or.jp/news/easy/news-list.json'); + const data = await ofetch('https://www3.nhk.or.jp/news/easy/news-list.json'); const dates = data[0]; - let items = Object.values(dates).reduce((acc, articles) => { - for (const article of articles) { - const date = timezone(parseDate(article.news_prearranged_time), +9); - - acc.push({ - title: article.title, - description: art(path.join(__dirname, 'templates/news_web_easy.art'), { - title: article.title_with_ruby, - image: article.news_web_image_uri, - }), - guid: article.news_id, - pubDate: date, - link: `https://www3.nhk.or.jp/news/easy/${article.news_id}/${article.news_id}.html`, - }); - } - return acc; - }, []); + let items = Object.values(dates).flatMap((articles) => + articles.map((article) => ({ + title: article.title, + description: art(path.join(__dirname, 'templates/news_web_easy.art'), { + title: article.title_with_ruby, + image: article.news_web_image_uri, + }), + guid: article.news_id, + pubDate: timezone(parseDate(article.news_prearranged_time), +9), + link: `https://www3.nhk.or.jp/news/easy/${article.news_id}/${article.news_id}.html`, + })) + ); items = items.sort((a, b) => b.pubDate - a.pubDate).slice(0, ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 30); items = await Promise.all( items.map((item) => cache.tryGet(item.link, async () => { - const { data } = await got(item.link); + const data = await ofetch(item.link); const $ = load(data); item.description += $('.article-body').html(); return item; diff --git a/lib/routes/nikkei/cn/index.ts b/lib/routes/nikkei/cn/index.ts index 50a96f572d1a..823f19df8e95 100644 --- a/lib/routes/nikkei/cn/index.ts +++ b/lib/routes/nikkei/cn/index.ts @@ -97,6 +97,7 @@ async function handler(ctx) { $ = load(response.data); + const seenLinks = new Set(); items = $('dt a') .toArray() .map((item) => { @@ -107,7 +108,13 @@ async function handler(ctx) { link: new URL(item.attr('href'), currentUrl).href, }; }) - .reduce((prev, cur) => (prev.length && prev.at(-1).link === cur.link ? prev : [...prev, cur]), []) + .filter((item) => { + if (seenLinks.has(item.link)) { + return false; + } + seenLinks.add(item.link); + return true; + }) .slice(0, limit); } diff --git a/lib/routes/rattibha/templates/description.art b/lib/routes/rattibha/templates/description.art new file mode 100644 index 000000000000..e68717eaf5ac --- /dev/null +++ b/lib/routes/rattibha/templates/description.art @@ -0,0 +1,12 @@ +{{ if media }} + {{ if media.type === 1 }} + + {{ else if media.type === 2 }} + + {{ /if }} +
+{{ /if }} + +{{@ text }} diff --git a/lib/routes/rattibha/user.ts b/lib/routes/rattibha/user.ts index ea0e89da886f..77aea5ce7745 100644 --- a/lib/routes/rattibha/user.ts +++ b/lib/routes/rattibha/user.ts @@ -1,7 +1,13 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; +import { config } from '@/config'; import { parseDate } from '@/utils/parse-date'; +import path from 'node:path'; +import { getCurrentPath } from '@/utils/helpers'; +import { art } from '@/utils/render'; + +const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/user/:user', @@ -30,38 +36,41 @@ async function handler(ctx) { const baseUrl = 'https://rattibha.com'; const { user: twitterUser } = ctx.req.param(); - const { - data: { user: userData }, - } = await got(`${baseUrl}/user?id=${twitterUser}`, { - headers: { - accept: 'application/json', - }, + const userData = await cache.tryGet(`rattibha:user:${twitterUser}`, async () => { + const data = await ofetch(`${baseUrl}/user`, { + query: { id: twitterUser }, + }); + return data.user; }); - const { data: userThreads } = await got(`${baseUrl}/u_threads?id=${userData.account_user_id}`, { headers: { accept: 'application/json' } }); + + const userThreads = await cache.tryGet( + `rattibha:userThreads:${twitterUser}`, + () => + ofetch(`${baseUrl}/u_threads`, { + query: { + id: userData.account_user_id, + page: 0, + post_type: 0, + }, + }), + config.cache.routeExpire, + false + ); // extract the relevant data from the API response - const list = userThreads.map((item) => ({ - title: item.thread.t.info.text, + const items = userThreads.map((item) => ({ + title: item.thread.t.info.text.split('\n')[0], link: `${baseUrl}/thread/${item.thread_id}`, pubDate: parseDate(item.thread.created_at), updated: parseDate(item.thread.updated_at), author: userData.name, - threadData1URL: `${baseUrl}/thread?id=${item.thread_id}`, - threadData2URL: `${baseUrl}/threads?id=${item.thread_id}`, + category: item.thread.categories.map((category) => category.tag.name), + description: art(path.join(__dirname, 'templates/description.art'), { + text: item.thread.t.info.text.replaceAll('\n', '
'), + media: item.thread.m, + }), })); - // Get tweet full text - const items = await Promise.all( - list.map((item) => - cache.tryGet(item.link, async () => { - const { data: data1 } = await got(item.threadData1URL, { headers: { accept: 'application/json' } }); - const { data: data2 } = await got(item.threadData2URL, { headers: { accept: 'application/json' } }); - item.description = [...data1.tweets, ...data2].reduce((accumulator, tweet) => `${accumulator}${tweet.tweet_detail.info.text}
`, ''); - return item; - }) - ) - ); - return { title: `سلاسل تغريدات ${twitterUser}`, link: `${baseUrl}/${twitterUser}`, diff --git a/lib/routes/scmp/index.ts b/lib/routes/scmp/index.ts index 98a3a050da38..b3eb8dae46c9 100644 --- a/lib/routes/scmp/index.ts +++ b/lib/routes/scmp/index.ts @@ -29,6 +29,19 @@ export const route: Route = { description: `See the [official RSS page](https://www.scmp.com/rss) to get the ID of each category. This route provides fulltext that the offical feed doesn't.`, }; +const getAttribs = (attribs?: { [key: string]: string }) => { + if (!attribs) { + return; + } + const obj: { [key: string]: string } = {}; + for (const key in attribs) { + if (Object.hasOwn(attribs, key)) { + obj[key] = attribs[key]; + } + } + return obj; +}; + async function handler(ctx) { const categoryId = ctx.req.param('category_id'); const rssUrl = `https://www.scmp.com/rss/${categoryId}/feed`; @@ -54,16 +67,8 @@ async function handler(ctx) { enclosure_length: enclosure?.attr('length'), enclosure_type: enclosure?.attr('type'), media: { - content: Object.keys(mediaContent.attribs).reduce((data, key) => { - data[key] = mediaContent.attribs[key]; - return data; - }, {}), - thumbnail: thumbnail?.attribs - ? Object.keys(thumbnail.attribs).reduce((data, attr) => { - data[attr] = thumbnail.attribs[attr]; - return data; - }, {}) - : undefined, + content: mediaContent ? getAttribs(mediaContent.attribs) : {}, + thumbnail: thumbnail?.attribs ? getAttribs(thumbnail.attribs) : undefined, }, }; }); diff --git a/lib/routes/sse/convert.ts b/lib/routes/sse/convert.ts index 478f76467363..622d55eced96 100644 --- a/lib/routes/sse/convert.ts +++ b/lib/routes/sse/convert.ts @@ -24,6 +24,16 @@ async function handler(ctx) { const query = ctx.req.param('query') ?? ''; // beginDate=2018-08-18&endDate=2019-08-18&companyCode=603283&title=股份 const pageUrl = 'https://bond.sse.com.cn/disclosure/announ/convertible/'; const host = 'https://www.sse.com.cn'; + const queries: Record = {}; + if (query) { + const pairs = query.split('&'); + for (const pair of pairs) { + const [key, value] = pair.split('='); + if (key) { + queries[key] = value; + } + } + } const response = await got('https://query.sse.com.cn/infodisplay/queryBulletinKzzTipsNew.do', { searchParams: { @@ -31,11 +41,7 @@ async function handler(ctx) { 'pageHelp.pageSize': 20, flag: 0, _: Date.now(), - ...query.split('&').reduce((acc, cur) => { - const [key, value] = cur.split('='); - acc[key] = value; - return acc; - }, {}), + ...queries, }, headers: { Referer: pageUrl, diff --git a/lib/routes/sse/disclosure.ts b/lib/routes/sse/disclosure.ts index 3cce8842f00e..5d4dce1fc20c 100644 --- a/lib/routes/sse/disclosure.ts +++ b/lib/routes/sse/disclosure.ts @@ -22,11 +22,15 @@ export const route: Route = { async function handler(ctx) { const query = ctx.req.param('query') ?? ''; // beginDate=2018-08-18&endDate=2020-09-01&productId=600696 - const queries = query.split('&').reduce((acc, cur) => { - const [key, value] = cur.split('='); - acc[key] = value; - return acc; - }, {}); + const queries: Record = {}; + if (query) { + for (const pair of query.split('&')) { + const [key, value] = pair.split('='); + if (key) { + queries[key] = value; + } + } + } const pageUrl = `https://www.sse.com.cn/assortment/stock/list/info/announcement/index.shtml?productId=${queries.productId}`; const response = await got('https://query.sse.com.cn/security/stock/queryCompanyBulletin.do', { diff --git a/lib/routes/sspai/series.ts b/lib/routes/sspai/series.ts index ef1f208a943e..653ab8244942 100644 --- a/lib/routes/sspai/series.ts +++ b/lib/routes/sspai/series.ts @@ -1,6 +1,6 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; export const route: Route = { @@ -29,33 +29,31 @@ export const route: Route = { }; async function handler() { - const response = await got('https://sspai.com/api/v1/series/tag/all/get'); + const response = await ofetch('https://sspai.com/api/v1/series/tag/all/get', { + parseResponse: JSON.parse, + }); - const products = response.data.data.reduce((acc, cate) => { - if (Array.isArray(cate.children)) { - const result = cate.children - .filter((item) => item.sell_status) - .map((item) => { - const price = item.price / 100; - return { - id: item.id, - title: `¥${price} - ${item.title}`, - link: `https://sspai.com/series/${item.id}`, - author: item.author.nickname, - }; - }); - return [...acc, ...result]; - } else { - return acc; - } - }, []); + const products = response.data.flatMap((category) => + category.children + .filter((item) => item.sell_status) + .map((item) => { + const price = item.price / 100; + return { + id: item.id, + title: `¥${price} - ${item.title}`, + link: `https://sspai.com/series/${item.id}`, + author: item.author.nickname, + }; + }) + ); const item = await Promise.all( products.map((item) => cache.tryGet(item.link, async () => { - const res = await got(`https://sspai.com/api/v1/series/info/get?id=${item.id}&view=second`); - const banner = ``; - const description = banner + res.data.data.intro; + const res = await ofetch(`https://sspai.com/api/v1/series/info/get?id=${item.id}&view=second`); + const data = res.data; + const banner = ``; + const description = banner + data.intro; const $ = load(description); $('img').css('max-width', '100%'); item.description = $.html(); diff --git a/lib/routes/sysu/ygafz.ts b/lib/routes/sysu/ygafz.ts index c056329bc5a0..017b52c964aa 100644 --- a/lib/routes/sysu/ygafz.ts +++ b/lib/routes/sysu/ygafz.ts @@ -1,11 +1,8 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import logger from '@/utils/logger'; -import { CookieJar } from 'tough-cookie'; -import puppeteer from '@/utils/puppeteer'; export const route: Route = { path: '/ygafz/:type?', @@ -42,30 +39,9 @@ async function handler(ctx) { const baseUrl = 'https://ygafz.sysu.edu.cn'; const url = `${baseUrl}/${type}`; - const browser = await puppeteer(); - const page = await browser.newPage(); - await page.setRequestInterception(true); - page.on('request', (request) => { - request.resourceType() === 'document' || request.resourceType() === 'script' ? request.continue() : request.abort(); - }); - - logger.http(`Requesting ${url}`); - await page.goto(url, { - waitUntil: 'domcontentloaded', - }); - await page.waitForSelector('[data-block-plugin-id]'); - const response = await page.content(); - - const cookieJar = new CookieJar(); - const cookies = await page.cookies(); - cookies.reduce((jar, cookie) => { - jar.setCookie(`${cookie.name}=${cookie.value}`, url); - return jar; - }, cookieJar); - - await browser.close(); - + const response = await ofetch(url); const $ = load(response); + const list = $('.list-content a') .toArray() .map((item) => { @@ -80,15 +56,13 @@ async function handler(ctx) { const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { - const { data } = await got(item.link, { - cookieJar, - }); + const data = await ofetch(item.link); const $ = load(data); item.author = $('.article-submit') .text() .match(/发布人:(.*)/)[1]; - item.description = $('div[data-block-plugin-id="entity_field:node:body"]').html(); + item.description = $('div[data-block-plugin-id="entity_field:node:body"]').html() + ($('div[data-block-plugin-id="entity_field:node:attachments"]').html() ?? ''); return item; }) ) diff --git a/lib/routes/trending/all-trending.ts b/lib/routes/trending/all-trending.ts deleted file mode 100644 index 8b6f5fac4fac..000000000000 --- a/lib/routes/trending/all-trending.ts +++ /dev/null @@ -1,226 +0,0 @@ -import { Route } from '@/types'; - -import cache from '@/utils/cache'; -import dayjs from 'dayjs'; -import utc from 'dayjs/plugin/utc.js'; -import timezone from 'dayjs/plugin/timezone.js'; -dayjs.extend(utc); -dayjs.extend(timezone); -import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; -import path from 'node:path'; -import { config } from '@/config'; -import md5 from '@/utils/md5'; -import InvalidParameterError from '@/errors/types/invalid-parameter'; - -// Constants -const CACHE_KEY = 'trending-all-in-one'; -const DATA_REPO_BASE_URL = 'https://raw.githubusercontent.com/huqi-pr/trending-in-one/master/raw'; -const DATE_FORMAT = 'YYYY-MM-DD'; -// TODO: support custom data repo urls -const CHANNELS = { - 'toutiao-search': { - baseUrl: 'https://so.toutiao.com/search?keyword=', - name: '今日头条热搜', - }, - 'weibo-search': { - baseUrl: 'https://s.weibo.com/weibo?q=', - name: '微博热搜', - }, - 'zhihu-search': { - baseUrl: 'https://www.zhihu.com/search?q=', - name: '知乎热搜', - }, - 'zhihu-questions': { - baseUrl: 'https://www.zhihu.com/search?type=question&q=', - name: '知乎热门话题', - }, - 'zhihu-video': { - baseUrl: 'https://www.zhihu.com/search?type=video&q=', - name: '知乎热门视频', - }, -}; - -// Helper Functions -const processRawDataByChannel = { - 'toutiao-search': ({ word: title }) => ({ - // 源 url 存在 encoding 问题,暂时不使用 - url: CHANNELS['toutiao-search'].baseUrl + encodeURIComponent(title), - title, - }), - 'weibo-search': ({ title }) => ({ - // 源 url 存在 encoding 问题,暂时不使用 - url: CHANNELS['weibo-search'].baseUrl + encodeURIComponent(title), - title, - }), - 'zhihu-questions': (item) => item, - 'zhihu-search': ({ query }) => { - const title = query.trim(); - return { - // 源 url 存在 encoding 问题,暂时不使用 - url: CHANNELS['zhihu-search'].baseUrl + encodeURIComponent(title), - title, - }; - }, - 'zhihu-video': (item) => item, -}; - -const hasKeyword = (str, keywordList) => keywordList.some((keyword) => str.includes(keyword)); -const toShanghaiTimezone = (date) => dayjs.tz(date, 'Asia/Shanghai'); -const processRawData = (channel) => (res) => res.map((item) => processRawDataByChannel[channel](item)); -const filterKeyword = (keywordList) => (res) => res.filter(({ title }) => hasKeyword(title, keywordList)); - -// Data Fetcher -// TODO: support channel selection -const fetchAllData = async (keywordList = [], dateList = [], cache) => { - const cachedGetData = (url) => cache.tryGet(url, () => ofetch(url), config.cache.contentExpire, false); - - let data = await Promise.all( - dateList.map(async (dateTime) => ({ - dateTime, - data: await Promise.all( - Object.keys(CHANNELS).map(async (channel) => ({ - name: CHANNELS[channel].name, - data: await cachedGetData(`${DATA_REPO_BASE_URL}/${channel}/${dateTime.format(DATE_FORMAT)}.json`) - .then(processRawData(channel)) - .then(filterKeyword(keywordList)), - })) - ), - })) - ); - - for (const i of data) { - i.count = i.data.reduce((acc, { data }) => acc + data.length, 0); - } - - data = data.filter(({ count }) => count > 0); - - if (data.length === 0) { - return data; - } - - const prev = cache.get(CACHE_KEY + ':latest-items'); - - const latest = data[0]; - latest.newItemCount = 0; - if (latest.count > 0 && prev) { - // Mark new items in latest - for (const channel in latest.data) { - for (const i of latest.data[channel].data) { - i.new = !(i.url in prev); - latest.newItemCount += i.new ? 1 : 0; - } - } - // Save latest data to cache - const cachedItems = latest.data.reduce((acc, { data: channel }) => { - for (const item of channel) { - acc[item.url] = true; - } - return acc; - }, {}); - cache.set(CACHE_KEY + ':latest-items', cachedItems, config.cache.contentExpire); - - latest.count = Object.keys(cachedItems).length; - } - - return data; -}; - -// Generate Feed Items -const searchLinkUrls = (keyword) => [ - `https://tophub.today/search?e=tophub&q=${keyword}`, - `https://www.baidu.com/s?wd=${keyword}`, - `https://www.google.com/search?q=${keyword}`, - `https://www.zhihu.com/search?type=content&q=${keyword}`, - `https://s.weibo.com/weibo/${keyword}`, - `https://www.douyin.com/search/${keyword}`, - `https://so.toutiao.com/search?keyword=${keyword}`, -]; - -const searchLinkNames = ['热榜', '百度', '谷歌', '知乎', '微博', '抖音', '头条']; - -const createItem = ({ dateTime, data, count, newItemCount }, keywords, isToday) => { - const EOD = dateTime.endOf('day'); - const pubDate = isToday ? new Date() : EOD.toDate(); - const countStr = isToday && newItemCount ? newItemCount + '🆕' : count; - - return { - title: `${keywords.join(', ')} | ${dateTime.format(DATE_FORMAT)} 热点追踪 (${countStr})`, - author: 'Trending All In One', - pubDate, - description: art(path.join(__dirname, 'templates/content.art'), { - data, - queries: keywords.map((query) => ({ - links: searchLinkUrls(encodeURIComponent(query)).map((url, index) => `${searchLinkNames[index]}`), - key: query, - })), - }), - guid: `trending-all-in-one-${EOD.toISOString()}-${md5(JSON.stringify(data))}-${keywords.join('-')}`, - }; -}; - -// Main -export const route: Route = { - path: '/:keywords/:numberOfDays?', - categories: ['other'], - example: '/trending/唐山,打人/3', - parameters: { keywords: '通过逗号区隔的关键词列表', numberOfDays: '向前追溯的天数,默认为3天' }, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - name: '关键词聚合追踪', - maintainers: ['Jkker'], - handler, - description: `追踪各大热搜榜上包含特定关键词的条目。 - -当前收录榜单:*微博热搜*、*今日头条热搜*、*知乎热搜*、*知乎热门视频*、*知乎热门话题*。 - -数据源: [trending-in-one](https://github.com/huqi-pr/trending-in-one)`, -}; - -async function handler(ctx) { - // Prevent making over 100 requests per invocation - if (ctx.req.param('numberOfDays') > 14) { - throw new InvalidParameterError('days must be less than 14'); - } - const numberOfDays = ctx.req.param('numberOfDays') || 3; - const currentShanghaiDateTime = dayjs(toShanghaiTimezone(new Date())); - const currentShanghaiDateStr = currentShanghaiDateTime.format(DATE_FORMAT); - const dateList = []; - for (let i = 0; i < numberOfDays; i++) { - const d = currentShanghaiDateTime.subtract(i, 'day'); - dateList.push(d); - } - - const keywordList = ctx.req - .param('keywords') - .replace(',', ',') - .split(',') - .map((keyword) => keyword.trim()); - const keywordStr = keywordList.join(', '); - - const data = await fetchAllData(keywordList, dateList, cache).catch(() => []); - const item = - data.length > 0 - ? data.map((i, index) => createItem(i, keywordList, index === 0)) - : [ - { - title: `${keywordStr} | ${currentShanghaiDateStr} 热点追踪 (0)`, - author: 'Trending All In One', - description: `近${numberOfDays}日的热搜都不包含下列关键词:${keywordStr}
请耐心等待,或添加更多关键词试试。`, - guid: `trending-all-in-one-${md5(JSON.stringify(data))}-${keywordList.join('-')}`, - }, - ]; - - return { - title: `${keywordStr} | 热点聚合`, - description: `${keywordStr} | 今日头条热搜,知乎热门视频,知乎热搜榜,知乎热门话题,微博热搜榜聚合追踪`, - language: 'zh-cn', - item, - }; -} diff --git a/lib/routes/trending/namespace.ts b/lib/routes/trending/namespace.ts deleted file mode 100644 index 937478e118e1..000000000000 --- a/lib/routes/trending/namespace.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Namespace } from '@/types'; - -export const namespace: Namespace = { - name: '热搜聚合', - url: 'so.toutiao.com', - lang: 'zh-CN', -}; diff --git a/lib/routes/trending/templates/content.art b/lib/routes/trending/templates/content.art deleted file mode 100644 index 047463438db4..000000000000 --- a/lib/routes/trending/templates/content.art +++ /dev/null @@ -1,25 +0,0 @@ -
-

热榜内容

- {{each data channel}} - {{if channel.data.length !== 0}} -

{{channel.name}}

-
    - {{each channel.data item}} -
  • - {{item.title}} - {{if item.new}}🆕{{/if}} -
  • - {{/each}} -
- {{/if}} - {{/each}} -

搜索关键词

- {{each queries q}} -

{{q.key}}

-

- {{each q.links l}} - {{@l}}   - {{/each}} -

- {{/each}} -
\ No newline at end of file diff --git a/lib/routes/twitter/utils.ts b/lib/routes/twitter/utils.ts index b954ae3abbf8..01aeaac9b40a 100644 --- a/lib/routes/twitter/utils.ts +++ b/lib/routes/twitter/utils.ts @@ -94,19 +94,20 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => { const formatVideo = (media, extraAttrs = '') => { let content = ''; - const video = media.video_info.variants.reduce((video, item) => { - if ((item.bitrate || 0) > (video.bitrate || -Infinity)) { - video = item; + let bestVideo = null; + + for (const item of media.video_info.variants) { + if (!bestVideo || (item.bitrate || 0) > (bestVideo.bitrate || -Infinity)) { + bestVideo = item; } - return video; - }, {}); + } - if (video.url) { + if (bestVideo && bestVideo.url) { const gifAutoPlayAttr = media.type === 'animated_gif' ? `autoplay loop muted webkit-playsinline playsinline` : ''; if (!readable) { content += '
'; } - content += ``; + content += ``; } return content; diff --git a/lib/routes/yoasobi-music/media.ts b/lib/routes/yoasobi-music/media.ts index 99e71e833945..01c87e845d0c 100644 --- a/lib/routes/yoasobi-music/media.ts +++ b/lib/routes/yoasobi-music/media.ts @@ -1,6 +1,6 @@ import { Route } from '@/types'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { parseJSONP } from './jsonp-helper'; import { art } from '@/utils/render'; import path from 'node:path'; @@ -38,13 +38,10 @@ async function handler() { const officialUrl = 'https://www.yoasobi-music.jp/media'; const title = 'LATEST MEDIA'; - const response = await got({ - method: 'get', - url: api, - }); + const response = await ofetch(api); const data = Object.values(parseJSONP(response.data).items) - .reduce((p, c) => [...p, ...c]) + .flat() .sort((a, b) => new Date(b.date) - new Date(a.date)) .map((item) => ({ date: item.date, diff --git a/lib/routes/zhihu/pin/utils.ts b/lib/routes/zhihu/pin/utils.ts index b1ea9329bafd..0709c423b350 100644 --- a/lib/routes/zhihu/pin/utils.ts +++ b/lib/routes/zhihu/pin/utils.ts @@ -1,7 +1,7 @@ import { parseDate } from '@/utils/parse-date'; -const generateDescription = (target, init) => - target.content.reduce((description, item) => { +const generateDescription = (target, description = '') => { + for (const item of target.content) { switch (item.type) { case 'text': description += `
${item.content}
`; @@ -38,9 +38,9 @@ const generateDescription = (target, init) => default: description += '未知类型,请点击链接提交issue'; } - - return description; - }, init); + } + return description; +}; const generateData = (data) => data.map((item) => { diff --git a/lib/utils/camelcase-keys.ts b/lib/utils/camelcase-keys.ts index 9797d698ea1e..ec67f5229bbf 100644 --- a/lib/utils/camelcase-keys.ts +++ b/lib/utils/camelcase-keys.ts @@ -11,11 +11,12 @@ export const camelcaseKeys = (obj: any): T => { } if (isPlainObject(obj)) { - return Object.keys(obj).reduce((result: any, key) => { + const result: any = {}; + for (const key of Object.keys(obj)) { const nextKey = isMongoId(key) ? key : camelcase(key); result[nextKey] = camelcaseKeys(obj[key]); - return result; - }, {}) as any; + } + return result as any; } return obj; From e5df827aeebf4014a3e0028a15ab3cb1fda1a620 Mon Sep 17 00:00:00 2001 From: AiraNadih <128119996+AiraNadih@users.noreply.github.com> Date: Wed, 30 Apr 2025 05:46:54 +0800 Subject: [PATCH 0512/2658] fix(route/cosplaytele): revert to iterative content fetching due to WP JSON API being disabled (#18964) Co-authored-by: AiraNadih --- lib/routes/cosplaytele/article.ts | 20 ++++++++++++++------ lib/routes/cosplaytele/category.ts | 18 ++++++++++++------ lib/routes/cosplaytele/latest.ts | 15 ++++++++++++--- lib/routes/cosplaytele/popular.ts | 6 ++---- lib/routes/cosplaytele/tag.ts | 18 ++++++++++++------ 5 files changed, 52 insertions(+), 25 deletions(-) diff --git a/lib/routes/cosplaytele/article.ts b/lib/routes/cosplaytele/article.ts index c5a534cceb44..00db9197e452 100644 --- a/lib/routes/cosplaytele/article.ts +++ b/lib/routes/cosplaytele/article.ts @@ -1,12 +1,20 @@ +import { load } from 'cheerio'; +import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { WPPost } from './types'; -function loadArticle(item: WPPost) { +async function loadArticle(link) { + const resp = await got(link); + const article = load(resp.body); + + const title = article('h1.entry-title').text().trim(); + const description = article('.entry-content').html() ?? ''; + const pubDate = parseDate(article('time')[0].attribs.datetime); + return { - title: item.title.rendered, - description: item.content.rendered, - pubDate: parseDate(item.date_gmt), - link: item.link, + title, + description, + pubDate, + link, }; } diff --git a/lib/routes/cosplaytele/category.ts b/lib/routes/cosplaytele/category.ts index 755f01fd388d..6062ef26a64d 100644 --- a/lib/routes/cosplaytele/category.ts +++ b/lib/routes/cosplaytele/category.ts @@ -1,8 +1,9 @@ import { Route } from '@/types'; +import cache from '@/utils/cache'; import got from '@/utils/got'; +import { load } from 'cheerio'; import { SUB_NAME_PREFIX, SUB_URL } from './const'; import loadArticle from './article'; -import { WPPost } from './types'; export const route: Route = { path: '/category/:category', @@ -34,14 +35,19 @@ async function handler(ctx) { const category = ctx.req.param('category'); const categoryUrl = `${SUB_URL}category/${category}/`; - const { - data: [{ id: categoryId }], - } = await got(`${SUB_URL}wp-json/wp/v2/categories?slug=${category}`); - const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?categories=${categoryId}&per_page=${limit}`); + const response = await got(categoryUrl); + const $ = load(response.body); + const itemRaw = $('#content .post-item').slice(0, limit).toArray(); return { title: `${SUB_NAME_PREFIX} - Category: ${category}`, link: categoryUrl, - item: posts.map((post) => loadArticle(post as WPPost)), + item: await Promise.all( + itemRaw.map((e) => { + const item = $(e); + const link = item.find('h5.post-title a').attr('href'); + return cache.tryGet(link, () => loadArticle(link)); + }) + ), }; } diff --git a/lib/routes/cosplaytele/latest.ts b/lib/routes/cosplaytele/latest.ts index b986a8d73122..fe5d0b0009b1 100644 --- a/lib/routes/cosplaytele/latest.ts +++ b/lib/routes/cosplaytele/latest.ts @@ -1,8 +1,9 @@ import { Route } from '@/types'; +import cache from '@/utils/cache'; import got from '@/utils/got'; +import { load } from 'cheerio'; import { SUB_NAME_PREFIX, SUB_URL } from './const'; import loadArticle from './article'; -import { WPPost } from './types'; export const route: Route = { path: '/', @@ -31,11 +32,19 @@ export const route: Route = { async function handler(ctx) { const limit = Number.parseInt(ctx.req.query('limit')) || 20; - const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?per_page=${limit}`); + const response = await got(SUB_URL); + const $ = load(response.body); + const itemRaw = $('#content .post-item').slice(0, limit).toArray(); return { title: `${SUB_NAME_PREFIX} - Latest`, link: SUB_URL, - item: posts.map((post) => loadArticle(post as WPPost)), + item: await Promise.all( + itemRaw.map((e) => { + const item = $(e); + const link = item.find('h5.post-title a').attr('href'); + return cache.tryGet(link, () => loadArticle(link)); + }) + ), }; } diff --git a/lib/routes/cosplaytele/popular.ts b/lib/routes/cosplaytele/popular.ts index fe2b20577f73..fc590cc17a10 100644 --- a/lib/routes/cosplaytele/popular.ts +++ b/lib/routes/cosplaytele/popular.ts @@ -1,9 +1,9 @@ import { Route } from '@/types'; +import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { SUB_NAME_PREFIX, SUB_URL } from './const'; import loadArticle from './article'; -import { WPPost } from './types'; export const route: Route = { path: '/popular/:period', @@ -64,12 +64,10 @@ async function handler(ctx) { .toArray() .map((post) => $(post).find('.wpp-post-title').attr('href')) .filter((link) => link !== undefined); - const slugs = links.map((link) => link.split('/').findLast(Boolean)); - const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?slug=${slugs.join(',')}&per_page=${limit}`); return { title, link: url, - item: posts.map((post) => loadArticle(post as WPPost)), + item: await Promise.all(links.map((link) => cache.tryGet(link, () => loadArticle(link)))), }; } diff --git a/lib/routes/cosplaytele/tag.ts b/lib/routes/cosplaytele/tag.ts index 41676a57cfef..a1e11d4673fd 100644 --- a/lib/routes/cosplaytele/tag.ts +++ b/lib/routes/cosplaytele/tag.ts @@ -1,8 +1,9 @@ import { Route } from '@/types'; +import cache from '@/utils/cache'; import got from '@/utils/got'; +import { load } from 'cheerio'; import { SUB_NAME_PREFIX, SUB_URL } from './const'; import loadArticle from './article'; -import { WPPost } from './types'; export const route: Route = { path: '/tag/:tag', @@ -34,14 +35,19 @@ async function handler(ctx) { const tag = ctx.req.param('tag'); const tagUrl = `${SUB_URL}tag/${tag}/`; - const { - data: [{ id: tagId }], - } = await got(`${SUB_URL}wp-json/wp/v2/tags?slug=${tag}`); - const { data: posts } = await got(`${SUB_URL}wp-json/wp/v2/posts?tags=${tagId}&per_page=${limit}`); + const response = await got(tagUrl); + const $ = load(response.body); + const itemRaw = $('#content .post-item').slice(0, limit).toArray(); return { title: `${SUB_NAME_PREFIX} - Tag: ${tag}`, link: tagUrl, - item: posts.map((post) => loadArticle(post as WPPost)), + item: await Promise.all( + itemRaw.map((e) => { + const item = $(e); + const link = item.find('h5.post-title a').attr('href'); + return cache.tryGet(link, () => loadArticle(link)); + }) + ), }; } From 565a30417174e93861ef3fc7a4cf06e4bd2df683 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Apr 2025 08:27:25 +0000 Subject: [PATCH 0513/2658] chore(deps): bump tldts from 7.0.4 to 7.0.5 (#18975) Bumps [tldts](https://github.com/remusao/tldts) from 7.0.4 to 7.0.5. - [Release notes](https://github.com/remusao/tldts/releases) - [Changelog](https://github.com/remusao/tldts/blob/master/CHANGELOG.md) - [Commits](https://github.com/remusao/tldts/compare/v7.0.4...v7.0.5) --- updated-dependencies: - dependency-name: tldts dependency-version: 7.0.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index b600ab81e151..08a203251d39 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "source-map": "0.7.4", "telegram": "2.26.22", "title": "4.0.1", - "tldts": "7.0.4", + "tldts": "7.0.5", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.1.2", "tsx": "4.19.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cba4f3c5e209..89e5a548b33f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -246,8 +246,8 @@ importers: specifier: 4.0.1 version: 4.0.1 tldts: - specifier: 7.0.4 - version: 7.0.4 + specifier: 7.0.5 + version: 7.0.5 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5874,15 +5874,15 @@ packages: tldts-core@6.1.86: resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} - tldts-core@7.0.4: - resolution: {integrity: sha512-9/IRbnIvUENGD6rg7m6Q9h/jH5ZL28hwjAhxrJx0AmcBue1FSsc84XZFaV748EsDVflid86aGDR11eSz6sbQjA==} + tldts-core@7.0.5: + resolution: {integrity: sha512-o+2zicH2+bzj5PHV5M4U8OsRBJDOO0zADiTKZQTGdHSymGQYS21+V/YNrMxAxH9SopzMEXt5JuiRoOIZT5ZU9g==} tldts@6.1.86: resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} hasBin: true - tldts@7.0.4: - resolution: {integrity: sha512-QH/CssdxxVNbGP4GtYSBmnsqW040KiBurALbRazuH952NLUFETwCiHHD13pHuG2o1uF8B2D7Os/5u5ejKVr4Vg==} + tldts@7.0.5: + resolution: {integrity: sha512-Wjn3ZQIBZd3i94Gcw1hTD+BLgrkfeU71PDw7y7QxcUDCfhM5HdlZfNDbSerP4pj+ZbujKvRrlOYNRyRmQCHo0A==} hasBin: true tmp@0.0.33: @@ -12412,15 +12412,15 @@ snapshots: tldts-core@6.1.86: {} - tldts-core@7.0.4: {} + tldts-core@7.0.5: {} tldts@6.1.86: dependencies: tldts-core: 6.1.86 - tldts@7.0.4: + tldts@7.0.5: dependencies: - tldts-core: 7.0.4 + tldts-core: 7.0.5 tmp@0.0.33: dependencies: From ed3b966c871e2f57ee3161c97c9d97d0d14cf26d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Apr 2025 08:33:00 +0000 Subject: [PATCH 0514/2658] chore(deps-dev): bump tsdown from 0.10.1 to 0.10.2 (#18976) Bumps [tsdown](https://github.com/rolldown/tsdown) from 0.10.1 to 0.10.2. - [Release notes](https://github.com/rolldown/tsdown/releases) - [Commits](https://github.com/rolldown/tsdown/compare/v0.10.1...v0.10.2) --- updated-dependencies: - dependency-name: tsdown dependency-version: 0.10.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 08a203251d39..5743dfa16479 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "prettier": "3.5.3", "remark-parse": "11.0.0", "supertest": "7.1.0", - "tsdown": "0.10.1", + "tsdown": "0.10.2", "typescript": "5.8.3", "unified": "11.0.5", "vite-tsconfig-paths": "5.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 89e5a548b33f..8bbd256cadbf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -439,8 +439,8 @@ importers: specifier: 7.1.0 version: 7.1.0 tsdown: - specifier: 0.10.1 - version: 0.10.1(typescript@5.8.3) + specifier: 0.10.2 + version: 0.10.2(typescript@5.8.3) typescript: specifier: 5.8.3 version: 5.8.3 @@ -3373,9 +3373,9 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - empathic@1.0.0: - resolution: {integrity: sha512-qtKgI1Mv8rTacvpaTkh28HM2Lbf+IOjXb7rhpt/42kZxRm8TBb/IVlo5iL2ztT19kc/EHAFN0fZ641avlXAgdg==} - engines: {node: '>=16'} + empathic@1.1.0: + resolution: {integrity: sha512-rsPft6CK3eHtrlp9Y5ALBb+hfK+DWnA4WFebbazxjWyx8vSm3rZeoM3z9irsjcqO3PYRzlfv27XIB4tz2DV7RA==} + engines: {node: '>=14'} enabled@2.0.0: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} @@ -5501,8 +5501,8 @@ packages: resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} hasBin: true - rolldown-plugin-dts@0.9.6: - resolution: {integrity: sha512-KmF3AU9rw98TY+T+oXucxkupj19ixN4UBXfDPtZGO70BfL14YWzzQ5XHoHIEhPJ8L/mK/hyt52IUvWiy6fHN/A==} + rolldown-plugin-dts@0.9.7: + resolution: {integrity: sha512-aAJhyvmlZx/siIDNQ2CahSyLp0Hvp8xAJkiXa8eZmkZ/SPEOdSjB0StGay2VcFetCa0NhUBxr+LkO2BSQgaU/Q==} engines: {node: '>=20.18.0'} peerDependencies: rolldown: ^1.0.0-beta.7 @@ -5963,8 +5963,8 @@ packages: typescript: optional: true - tsdown@0.10.1: - resolution: {integrity: sha512-NT1XSUDweBpgpiZb3Upfy3DBwAbn8W0aXo3Ecp4kHozTLewWa0UkWUP6nRTvSj2c0NcD/BLLuf0HthqMpbEdkA==} + tsdown@0.10.2: + resolution: {integrity: sha512-MhauwcNNVMeW3TTvpADDVPoAC3kfBfwPru3gtQ5pbVvGIF399VtbH3szUuXmw56P+DDlYjtQd0gKGJ8K5xRayQ==} engines: {node: '>=18.0.0'} hasBin: true peerDependencies: @@ -9529,7 +9529,7 @@ snapshots: emoji-regex@9.2.2: {} - empathic@1.0.0: {} + empathic@1.1.0: {} enabled@2.0.0: {} @@ -9943,7 +9943,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.4.0 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -11689,7 +11689,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.3 - debug: 4.3.4 + debug: 4.4.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 @@ -11986,7 +11986,7 @@ snapshots: dependencies: glob: 10.4.5 - rolldown-plugin-dts@0.9.6(rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3))(typescript@5.8.3): + rolldown-plugin-dts@0.9.7(rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3))(typescript@5.8.3): dependencies: '@babel/generator': 7.27.0 '@babel/parser': 7.27.0 @@ -12484,7 +12484,7 @@ snapshots: optionalDependencies: typescript: 5.8.3 - tsdown@0.10.1(typescript@5.8.3): + tsdown@0.10.2(typescript@5.8.3): dependencies: ansis: 3.17.0 cac: 6.7.14 @@ -12492,11 +12492,11 @@ snapshots: consola: 3.4.2 debug: 4.4.0 diff: 7.0.0 - empathic: 1.0.0 + empathic: 1.1.0 hookable: 5.5.3 lightningcss: 1.29.3 rolldown: 1.0.0-beta.8-commit.852c603(typescript@5.8.3) - rolldown-plugin-dts: 0.9.6(rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3))(typescript@5.8.3) + rolldown-plugin-dts: 0.9.7(rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3))(typescript@5.8.3) tinyexec: 1.0.1 tinyglobby: 0.2.13 unconfig: 7.3.2 From 84acc3b8092687df2448824d99c02e404c9179a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Apr 2025 08:33:30 +0000 Subject: [PATCH 0515/2658] chore(deps-dev): bump node-network-devtools from 1.0.25 to 1.0.26 (#18977) Bumps [node-network-devtools](https://github.com/GrinZero/node-network-devtools) from 1.0.25 to 1.0.26. - [Release notes](https://github.com/GrinZero/node-network-devtools/releases) - [Commits](https://github.com/GrinZero/node-network-devtools/compare/v1.0.25...v1.0.26) --- updated-dependencies: - dependency-name: node-network-devtools dependency-version: 1.0.26 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 5743dfa16479..3f80e84c27a4 100644 --- a/package.json +++ b/package.json @@ -188,7 +188,7 @@ "magic-string": "0.30.17", "mockdate": "3.0.5", "msw": "2.4.3", - "node-network-devtools": "1.0.25", + "node-network-devtools": "1.0.26", "prettier": "3.5.3", "remark-parse": "11.0.0", "supertest": "7.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8bbd256cadbf..3c0a0b162c88 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -427,8 +427,8 @@ importers: specifier: 2.4.3 version: 2.4.3(typescript@5.8.3) node-network-devtools: - specifier: 1.0.25 - version: 1.0.25(bufferutil@4.0.9)(undici@6.21.2)(utf-8-validate@5.0.10) + specifier: 1.0.26 + version: 1.0.26(bufferutil@4.0.9)(undici@6.21.2)(utf-8-validate@5.0.10) prettier: specifier: 3.5.3 version: 3.5.3 @@ -4897,8 +4897,8 @@ packages: resolution: {integrity: sha512-vv8fJuOUCCvSPjDjBLlMqYMHob4aGjkmrkaE42/mZr0VT+ZAU10jRF8oTnX9+pgU9/vYJ8P7YT3Vd6ajkmzSCw==} engines: {node: '>=0.12'} - node-network-devtools@1.0.25: - resolution: {integrity: sha512-lPOdXdkh3I6haAUz+dTtfOCdt6/J6tJdQsKXxix9TmHV2wwecEVXLrZuawkkCMfbU4tb6/PJLqfiIO3R/VARiw==} + node-network-devtools@1.0.26: + resolution: {integrity: sha512-brfAQhZ8Tl6X00RWbhAWCdWt9uOTGJm+Er1WD1kBiv97/3h3QIIFQC9DLNVIR4UXH15Goke1qYn689MyuQc78A==} peerDependencies: undici: ^6 @@ -11309,7 +11309,7 @@ snapshots: dependencies: write-file-atomic: 1.3.4 - node-network-devtools@1.0.25(bufferutil@4.0.9)(undici@6.21.2)(utf-8-validate@5.0.10): + node-network-devtools@1.0.26(bufferutil@4.0.9)(undici@6.21.2)(utf-8-validate@5.0.10): dependencies: iconv-lite: 0.6.3 open: 8.4.2 From 5ee2beb5c5a6a342be12ad409697bfd0c8db4129 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Apr 2025 08:34:28 +0000 Subject: [PATCH 0516/2658] chore(deps): bump @scalar/hono-api-reference from 0.8.5 to 0.8.6 (#18978) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.8.5 to 0.8.6. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-version: 0.8.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 3f80e84c27a4..22283cd46d98 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.32.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.8.5", + "@scalar/hono-api-reference": "0.8.6", "@sentry/node": "9.14.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3c0a0b162c88..6df8e1543b35 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.8.5 - version: 0.8.5(hono@4.7.8) + specifier: 0.8.6 + version: 0.8.6(hono@4.7.8) '@sentry/node': specifier: 9.14.0 version: 9.14.0 @@ -2246,12 +2246,12 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/core@0.2.11': - resolution: {integrity: sha512-crakGk7IOWEvlexKdxr+uLW+SzvE/9OLZMYGHn0GNop3jSsHqZRB7a4epZ6MzmOP6L2665M4q8g1IuTKBudYVw==} + '@scalar/core@0.2.12': + resolution: {integrity: sha512-rAgRbHq8g4H1fffJMHrvmsOTqwUU3QNh1UgiOe7H8wy0yIVGN9C5YmduF99Mt+7V43oGposeHdlfs+ECSUk8Fg==} engines: {node: '>=18'} - '@scalar/hono-api-reference@0.8.5': - resolution: {integrity: sha512-s9jmP7wQnXNvGR/pFyUxc1BDb7YMbLHJY7czqbMouBjNOhaeutipg2RioiViLOPdyLUoJWeUDxL7h4fUxcZMoA==} + '@scalar/hono-api-reference@0.8.6': + resolution: {integrity: sha512-aEiaX2DyNfwaYvP6GLWknEmaZJ0aLvx/DcrEvmkmzzx4wQv2UJP9kkHpWkoLVRQrZbLwjeTV7yDmXyVWrwWszg==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -2260,8 +2260,8 @@ packages: resolution: {integrity: sha512-UMxX54taQXnEWYEuesbH+pkjlXRVV1u/Wx6YbVeU3QoJdFGqT3Z7si9zsokoG6MXDcdi1LGny7A0KwownmPvUQ==} engines: {node: '>=18'} - '@scalar/types@0.1.11': - resolution: {integrity: sha512-fNcaZbZKoZ2PvoW+KJHmk4au8ZukgWlb6qLK3k/SLkfsTggN3DO4PR57ch6cyl2WhwENNbw+iI+ss7fTRcPnOA==} + '@scalar/types@0.1.12': + resolution: {integrity: sha512-GSZ/eS94hNu/TkQHhAx96J0PD8tlm303OXRRyp5TPs+1UJ4HCC5LHjSnlz5WTZoi86/fup8R0MIHW9mJw7AoDg==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -6023,8 +6023,8 @@ packages: resolution: {integrity: sha512-2dBz5D5ycHIoliLYLi0Q2V7KRaDlH0uWIvmk7TYlAg5slqwiPv1ezJdZm1QEM0xgk29oYWMCbIG7E6gHpvChlg==} engines: {node: '>=16'} - type-fest@4.40.0: - resolution: {integrity: sha512-ABHZ2/tS2JkvH1PEjxFDTUWC8dB5OsIGZP4IFLhR293GqT5Y5qB1WwL2kMPYhQW9DVgVD8Hd7I8gjwPIf5GFkw==} + type-fest@4.40.1: + resolution: {integrity: sha512-9YvLNnORDpI+vghLU/Nf+zSv0kL47KbVJ1o3sKgoTefl6i+zebxbiDQWoe/oWWqPhIgQdRZRT1KA9sCPL810SA==} engines: {node: '>=16'} type@2.7.3: @@ -8292,25 +8292,25 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/core@0.2.11': + '@scalar/core@0.2.12': dependencies: - '@scalar/types': 0.1.11 + '@scalar/types': 0.1.12 - '@scalar/hono-api-reference@0.8.5(hono@4.7.8)': + '@scalar/hono-api-reference@0.8.6(hono@4.7.8)': dependencies: - '@scalar/core': 0.2.11 + '@scalar/core': 0.2.12 hono: 4.7.8 '@scalar/openapi-types@0.2.1': dependencies: zod: 3.24.3 - '@scalar/types@0.1.11': + '@scalar/types@0.1.12': dependencies: '@scalar/openapi-types': 0.2.1 '@unhead/schema': 1.11.20 nanoid: 5.1.5 - type-fest: 4.40.0 + type-fest: 4.40.1 zod: 3.24.3 '@sec-ant/readable-stream@0.4.1': {} @@ -12545,7 +12545,7 @@ snapshots: type-fest@4.38.0: {} - type-fest@4.40.0: {} + type-fest@4.40.1: {} type@2.7.3: {} From 0b5f9717f6290b4d4c4c9aa5d5d16f7cac242aa1 Mon Sep 17 00:00:00 2001 From: lcdgit <2279707742@qq.com> Date: Wed, 30 Apr 2025 20:11:09 +0800 Subject: [PATCH 0517/2658] =?UTF-8?q?feat(route):=20add=20=E7=9F=A5?= =?UTF-8?q?=E8=BD=A9=E8=97=8F=E4=B9=A6=20(#18950)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add 知轩藏书 * fix:relative URL in image and description remove category * fix:route description change * fix(route/zxcs):remove redundant spaces * fix(route/zxcs):remove redundant content from the description * Update lib/routes/zxcs/novel.ts --------- Co-authored-by: mozhu --- lib/routes/zxcs/namespace.ts | 7 +++ lib/routes/zxcs/novel.ts | 95 ++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 lib/routes/zxcs/namespace.ts create mode 100644 lib/routes/zxcs/novel.ts diff --git a/lib/routes/zxcs/namespace.ts b/lib/routes/zxcs/namespace.ts new file mode 100644 index 000000000000..a604ffcac87d --- /dev/null +++ b/lib/routes/zxcs/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '知轩藏书', + url: 'zxcs.info', + lang: 'zh-CN', +}; diff --git a/lib/routes/zxcs/novel.ts b/lib/routes/zxcs/novel.ts new file mode 100644 index 000000000000..481aeb749655 --- /dev/null +++ b/lib/routes/zxcs/novel.ts @@ -0,0 +1,95 @@ +import { load } from 'cheerio'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import type { Route, DataItem } from '@/types'; + +const types = { + jinqigengxin: '近期更新', + dushi: '都市', + xianxia: '仙侠', + xuanhuan: '玄幻', + qihuan: '奇幻', + lishi: '历史', + youxi: '游戏', + wuxia: '武侠', + kehuan: '科幻', + tiyu: '体育', + lingyi: '灵异', + junshi: '军事', + erciyuan: '轻小说', +}; + +export const route: Route = { + path: '/novel/:type', + name: '小说列表', + url: 'zxcs.info', + maintainers: ['liaochuan'], + example: '/zxcs/novel/jinqigengxin', + parameters: { type: '小说类型, 可在对应类型页 URL 中找到' }, + description: `支持小说类型:${Object.entries(types) + .map(([key, value]) => `${key}-${value}`) + .join(',')}`, + categories: ['reading'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['zxcs.info/:type'], + target: '/novel/:type', + }, + ], + handler, +}; + +async function handler(ctx) { + const { type } = ctx.req.param(); + + const baseUrl = `https://www.zxcs.info`; + const link = `${baseUrl}/${type}`; + const response = await ofetch(link); + const $ = load(response); + + const list: DataItem[] = $('div.book-info') + .toArray() + .map((item) => { + const $item = $(item); + const a = $item.find('a').first(); + return { + title: a.text(), + link: String(a.attr('href')), + pubDate: parseDate($item.find('.update').text()), + category: [], + description: '', + image: '', + author: '', + }; + }); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(String(item.link), async () => { + const response = await ofetch(String(item.link)); + const $ = load(response); + const links = String(item.link).split('/'); + item.category = [types[String(links.at(-2))]]; + item.description = String($('.intro').first().html()); + item.image = baseUrl + String($('.book-cover img').attr('src')); + item.author = $('.author').text(); + return item; + }) + ) + ); + + return { + title: `知轩藏书 - ${types[type]}`, + link, + item: items, + }; +} From 17e557d493713585d5a5ac442fa15e2321f74aae Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Thu, 1 May 2025 00:30:20 +0800 Subject: [PATCH 0518/2658] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD?= =?UTF-8?q?=E5=9B=BD=E6=97=A5=E6=8A=A5=E7=BD=91=E8=8B=B1=E8=AF=AD=E7=82=B9?= =?UTF-8?q?=E6=B4=A5=20(#18972)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 中国日报网英语点津 * fix typo * Update lib/routes/chinadaily/language.ts --------- --- lib/routes/chinadaily/language.ts | 323 ++++++++++++++++++ lib/routes/chinadaily/namespace.ts | 9 + .../chinadaily/templates/description.art | 21 ++ 3 files changed, 353 insertions(+) create mode 100644 lib/routes/chinadaily/language.ts create mode 100644 lib/routes/chinadaily/namespace.ts create mode 100644 lib/routes/chinadaily/templates/description.art diff --git a/lib/routes/chinadaily/language.ts b/lib/routes/chinadaily/language.ts new file mode 100644 index 000000000000..b861b0a70d92 --- /dev/null +++ b/lib/routes/chinadaily/language.ts @@ -0,0 +1,323 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; + +import { art } from '@/utils/render'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; +import path from 'node:path'; + +export const handler = async (ctx: Context): Promise => { + const { category = 'thelatest' } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const baseUrl: string = 'https://language.chinadaily.com.cn'; + const targetUrl: string = new URL(category, baseUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language = $('html').attr('lang') ?? 'zh-CN'; + + let items: DataItem[] = []; + + items = $('div.gy_box, ul.content_list li') + .slice(0, limit) + .toArray() + .map((el): Element => { + const $el: Cheerio = $(el); + + const $aEl: Cheerio = $el.find('a:not(.gy_box_img):not(.a_img)').first(); + + const title: string = $aEl.text(); + const image: string | undefined = $el.find('a.gy_box_img img, a.a_img img').attr('src'); + const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + images: image + ? [ + { + src: image, + alt: title, + }, + ] + : undefined, + intro: $el.find('p.gy_box_txt3 a').text(), + }); + const linkUrl: string | undefined = $aEl.attr('href'); + + const processedItem: DataItem = { + title, + description, + link: linkUrl?.startsWith('//') ? `https:${linkUrl}` : linkUrl, + content: { + html: description, + text: description, + }, + image, + banner: image, + language, + }; + + return processedItem; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async (): Promise => { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('meta[ property="og:title"]').attr('content'); + const pubDateStr: string | undefined = $$('p.main_title3').text().split(/\s/).pop(); + const categories: string[] | undefined = $$('meta[name="keywords"]').attr('content')?.split(/,/); + const authorEls: Element[] = $$('meta[name="source"], meta[name="author"], meta[name="editor"]').toArray(); + const authorNames: string[] = [ + ...new Set( + authorEls + .map((authorEl) => { + const $$authorEl: Cheerio = $$(authorEl); + + return $$authorEl.attr('content'); + }) + .filter((content): content is string => content !== undefined) + ), + ]; + const authors: DataItem['author'] = authorNames.map((name) => ({ + name, + })); + const image: string | undefined = $$('meta[property="og:image"]').attr('content'); + const upDatedStr: string | undefined = pubDateStr; + + let processedItem: DataItem = { + title, + pubDate: pubDateStr ? timezone(parseDate(pubDateStr), +8) : item.pubDate, + category: categories, + author: authors, + image, + banner: image, + updated: upDatedStr ? timezone(parseDate(upDatedStr), +8) : item.updated, + language, + }; + + const $enclosureEl: Cheerio = $$('iframe#playerFrame, audio').first(); + const enclosureUrl: string | undefined = $enclosureEl.attr('src'); + + if (enclosureUrl) { + processedItem = { + ...processedItem, + enclosure_url: enclosureUrl?.startsWith('//') ? `https:${enclosureUrl}` : enclosureUrl, + enclosure_title: title, + enclosure_length: undefined, + itunes_duration: undefined, + itunes_item_image: image, + }; + } + + $$('div.urlShareArea').remove(); + + const description: string | undefined = + item.description + + art(path.join(__dirname, 'templates/description.art'), { + description: $$('div#Content').html(), + }); + + processedItem = { + ...processedItem, + description, + content: { + html: description, + text: description, + }, + }; + + return { + ...item, + ...processedItem, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + const title: string = $('title').text(); + const author: string = title.split(/-\s/).pop(); + + return { + title, + description: $('meta[name="description"]').attr('content'), + link: targetUrl, + item: items, + allowEmpty: true, + image: $('a.header2_logo1 img').attr('src'), + author, + language, + itunes_author: author, + itunes_category: 'Language', + id: targetUrl, + }; +}; + +export const route: Route = { + path: '/language/:category{.+}?', + name: '英语点津', + url: 'language.chinadaily.com.cn', + maintainers: ['nczitzk'], + handler, + example: '/chinadaily/language/thelatest', + parameters: { + category: { + description: '分类,默认为 `thelatest`,即精彩推荐,可在对应分类页 URL 中找到, Category, `thelatest`,即精彩推荐 by default', + options: [ + { + label: '精彩推荐', + value: 'thelatest', + }, + { + label: '每日一词', + value: 'news_hotwords/word_of_the_day', + }, + { + label: '双语新闻', + value: 'news_bilingual', + }, + { + label: '新闻热词', + value: 'news_hotwords', + }, + { + label: '实用口语', + value: 'practice_tongue', + }, + { + label: '译词课堂', + value: 'trans_collect', + }, + { + label: '图片新闻', + value: 'news_photo', + }, + { + label: '视频精选', + value: 'video_links', + }, + { + label: '新闻播报', + value: 'audio_cd', + }, + { + label: '专栏作家', + value: 'columnist', + }, + { + label: '权威发布', + value: '5af95d44a3103f6866ee845c', + }, + ], + }, + }, + description: `:::tip +若订阅 [精彩推荐](https://language.chinadaily.com.cn/thelatest),网址为 \`https://language.chinadaily.com.cn/thelatest\`,请截取 \`https://language.chinadaily.com.cn/\` 到末尾的部分 \`thelatest\` 作为 \`category\` 参数填入,此时目标路由为 [\`/chinadaily/language/thelatest\`](https://rsshub.app/chinadaily/language/thelatest)。 +::: + +
+ 更多分类 + +| 分类 | ID | +| ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| [精彩推荐](https://language.chinadaily.com.cn/thelatest) | [thelatest](https://rsshub.app/chinadaily/language/thelatest) | +| [每日一词](https://language.chinadaily.com.cn/news_hotwords/word_of_the_day) | [news_hotwords/word_of_the_day](https://rsshub.app/chinadaily/language/news_hotwords/word_of_the_day) | +| [双语新闻](https://language.chinadaily.com.cn/news_bilingual) | [news_bilingual](https://rsshub.app/chinadaily/language/news_bilingual) | +| [新闻热词](https://language.chinadaily.com.cn/news_hotwords) | [news_hotwords](https://rsshub.app/chinadaily/language/news_hotwords) | +| [实用口语](https://language.chinadaily.com.cn/practice_tongue) | [practice_tongue](https://rsshub.app/chinadaily/language/practice_tongue) | +| [译词课堂](https://language.chinadaily.com.cn/trans_collect) | [trans_collect](https://rsshub.app/chinadaily/language/trans_collect) | +| [图片新闻](https://language.chinadaily.com.cn/news_photo) | [news_photo](https://rsshub.app/chinadaily/language/news_photo) | +| [视频精选](https://language.chinadaily.com.cn/video_links) | [video_links](https://rsshub.app/chinadaily/language/video_links) | +| [新闻播报](https://language.chinadaily.com.cn/audio_cd) | [audio_cd](https://rsshub.app/chinadaily/language/audio_cd) | +| [专栏作家](https://language.chinadaily.com.cn/columnist) | [audio_cd](https://rsshub.app/chinadaily/language/columnist) | +| [权威发布](https://language.chinadaily.com.cn/5af95d44a3103f6866ee845c) | [5af95d44a3103f6866ee845c](https://rsshub.app/chinadaily/language/5af95d44a3103f6866ee845c) | + +
+`, + categories: ['traditional-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: true, + supportScihub: false, + }, + radar: [ + { + source: ['language.chinadaily.com.cn/:category'], + target: (params) => { + const category: string = params.category; + + return `/chinadaily/language${category ? `/${category}` : ''}`; + }, + }, + { + title: '精彩推荐', + source: ['language.chinadaily.com.cn/thelatest'], + target: '/language/thelatest', + }, + { + title: '每日一词', + source: ['language.chinadaily.com.cn/news_hotwords/word_of_the_day'], + target: '/language/news_hotwords/word_of_the_day', + }, + { + title: '双语新闻', + source: ['language.chinadaily.com.cn/news_bilingual'], + target: '/language/news_bilingual', + }, + { + title: '新闻热词', + source: ['language.chinadaily.com.cn/news_hotwords'], + target: '/language/news_hotwords', + }, + { + title: '实用口语', + source: ['language.chinadaily.com.cn/practice_tongue'], + target: '/language/practice_tongue', + }, + { + title: '译词课堂', + source: ['language.chinadaily.com.cn/trans_collect'], + target: '/language/trans_collect', + }, + { + title: '图片新闻', + source: ['language.chinadaily.com.cn/news_photo'], + target: '/language/news_photo', + }, + { + title: '视频精选', + source: ['language.chinadaily.com.cn/video_links'], + target: '/language/video_links', + }, + { + title: '新闻播报', + source: ['language.chinadaily.com.cn/audio_cd'], + target: '/language/audio_cd', + }, + { + title: '专栏作家', + source: ['language.chinadaily.com.cn/columnist'], + target: '/language/columnist', + }, + { + title: '权威发布', + source: ['language.chinadaily.com.cn/5af95d44a3103f6866ee845c'], + target: '/language/5af95d44a3103f6866ee845c', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/chinadaily/namespace.ts b/lib/routes/chinadaily/namespace.ts new file mode 100644 index 000000000000..44dd9ced3d67 --- /dev/null +++ b/lib/routes/chinadaily/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国日报网', + url: 'chinadaily.com.cn', + categories: ['traditional-media'], + description: '', + lang: 'zh-CN', +}; diff --git a/lib/routes/chinadaily/templates/description.art b/lib/routes/chinadaily/templates/description.art new file mode 100644 index 000000000000..249654e7e618 --- /dev/null +++ b/lib/routes/chinadaily/templates/description.art @@ -0,0 +1,21 @@ +{{ if images }} + {{ each images image }} + {{ if image?.src }} +
+ {{ image.alt }} +
+ {{ /if }} + {{ /each }} +{{ /if }} + +{{ if intro }} +
{{ intro }}
+{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From 9069e35cad1ec5dacc2e9a0441c1903cd4f29525 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 02:13:14 +0800 Subject: [PATCH 0519/2658] chore(deps): bump @sentry/node from 9.14.0 to 9.15.0 (#18979) Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 9.14.0 to 9.15.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/9.14.0...9.15.0) --- updated-dependencies: - dependency-name: "@sentry/node" dependency-version: 9.15.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 22283cd46d98..58e855b4f942 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", "@scalar/hono-api-reference": "0.8.6", - "@sentry/node": "9.14.0", + "@sentry/node": "9.15.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", "art-template": "4.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6df8e1543b35..4670e985d0a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,8 +63,8 @@ importers: specifier: 0.8.6 version: 0.8.6(hono@4.7.8) '@sentry/node': - specifier: 9.14.0 - version: 9.14.0 + specifier: 9.15.0 + version: 9.15.0 '@tonyrl/rand-user-agent': specifier: 2.0.83 version: 2.0.83 @@ -2270,16 +2270,16 @@ packages: '@selderee/plugin-htmlparser2@0.11.0': resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==} - '@sentry/core@9.14.0': - resolution: {integrity: sha512-OLfucnP3LAL5bxVNWc2RVOHCX7fk9Er5bWPCS+O5cPjqNUUz0HQHhVh2Vhei5C0kYZZM4vy4BQit5T9LrlOaNA==} + '@sentry/core@9.15.0': + resolution: {integrity: sha512-lBmo3bzzaYUesdzc2H5K3fajfXyUNuj5koqyFoCAI8rnt9CBl7SUc/P07+E5eipF8mxgiU3QtkI7ALzRQN8pqQ==} engines: {node: '>=18'} - '@sentry/node@9.14.0': - resolution: {integrity: sha512-AWPc6O+zAdSgnsiKm6Nb1txyiKCOIBriJEONdXFSslgZgkm8EWAYRRHyS2Hkmnz0/5bEQ3jEffIw22qJuaHN+Q==} + '@sentry/node@9.15.0': + resolution: {integrity: sha512-K0LdJxIzYbbsbiT+1tKgNq6MUHuDs2DggBDcFEp3T+yXVJYN1AyalUli06Kmxq8yvou6hgLwWL4gjIcB1IQySA==} engines: {node: '>=18'} - '@sentry/opentelemetry@9.14.0': - resolution: {integrity: sha512-NnHJjSQGpWaZ6+0QK9Xn1T3CTOM16Ij07VnSiGmVz3/IMsNC1/jndqc8p9BxEI+67XhZjOUUN0Ogpq1XRY7YeA==} + '@sentry/opentelemetry@9.15.0': + resolution: {integrity: sha512-gGOzgSxbuh4B4SlEonL1LFsazmeqL/fn5CIQqRG0UWWxdt6TKAMlj0ThIlGF3jSHW2eXdpvs+4E73uFEaHIqfg==} engines: {node: '>=18'} peerDependencies: '@opentelemetry/api': ^1.9.0 @@ -4815,8 +4815,8 @@ packages: module-alias@2.2.3: resolution: {integrity: sha512-23g5BFj4zdQL/b6tor7Ji+QY4pEfNH784BMslY9Qb0UnJWRAt+lQGLYmRaM0KDBwIG23ffEBELhZDP2rhi9f/Q==} - module-details-from-path@1.0.3: - resolution: {integrity: sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==} + module-details-from-path@1.0.4: + resolution: {integrity: sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==} moment-parseformat@3.0.0: resolution: {integrity: sha512-dVgXe6b6DLnv4CHG7a1zUe5mSXaIZ3c6lSHm/EKeVeQI2/4pwe0VRde8OyoCE1Ro2lKT5P6uT9JElF7KDLV+jw==} @@ -8320,9 +8320,9 @@ snapshots: domhandler: 5.0.3 selderee: 0.11.0 - '@sentry/core@9.14.0': {} + '@sentry/core@9.15.0': {} - '@sentry/node@9.14.0': + '@sentry/node@9.15.0': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -8355,13 +8355,13 @@ snapshots: '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.32.0 '@prisma/instrumentation': 6.6.0(@opentelemetry/api@1.9.0) - '@sentry/core': 9.14.0 - '@sentry/opentelemetry': 9.14.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0) + '@sentry/core': 9.15.0 + '@sentry/opentelemetry': 9.15.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0) import-in-the-middle: 1.13.1 transitivePeerDependencies: - supports-color - '@sentry/opentelemetry@9.14.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0)': + '@sentry/opentelemetry@9.15.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.32.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -8369,7 +8369,7 @@ snapshots: '@opentelemetry/instrumentation': 0.57.2(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.32.0 - '@sentry/core': 9.14.0 + '@sentry/core': 9.15.0 '@sindresorhus/is@5.6.0': {} @@ -10447,7 +10447,7 @@ snapshots: acorn: 8.14.1 acorn-import-attributes: 1.9.5(acorn@8.14.1) cjs-module-lexer: 1.4.3 - module-details-from-path: 1.0.3 + module-details-from-path: 1.0.4 imurmurhash@0.1.4: {} @@ -11241,7 +11241,7 @@ snapshots: module-alias@2.2.3: {} - module-details-from-path@1.0.3: {} + module-details-from-path@1.0.4: {} moment-parseformat@3.0.0: {} @@ -11937,7 +11937,7 @@ snapshots: require-in-the-middle@7.5.2: dependencies: debug: 4.4.0 - module-details-from-path: 1.0.3 + module-details-from-path: 1.0.4 resolve: 1.22.10 transitivePeerDependencies: - supports-color From c9036e1a0af221623e4eff0172af92422dc32843 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 22:38:20 +0800 Subject: [PATCH 0520/2658] chore(deps-dev): bump @babel/preset-env from 7.26.9 to 7.27.1 (#18983) --- package.json | 2 +- pnpm-lock.yaml | 1021 ++++++++++++++++++++++++++++-------------------- 2 files changed, 603 insertions(+), 420 deletions(-) diff --git a/package.json b/package.json index 58e855b4f942..3b7db3d1c925 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "zod": "3.24.3" }, "devDependencies": { - "@babel/preset-env": "7.26.9", + "@babel/preset-env": "7.27.1", "@babel/preset-typescript": "7.27.0", "@bbob/types": "4.2.0", "@eslint/eslintrc": "3.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4670e985d0a5..c0510baedf62 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -280,8 +280,8 @@ importers: version: 3.24.3 devDependencies: '@babel/preset-env': - specifier: 7.26.9 - version: 7.26.9(@babel/core@7.26.10) + specifier: 7.27.1 + version: 7.27.1(@babel/core@7.26.10) '@babel/preset-typescript': specifier: 7.27.0 version: 7.27.0(@babel/core@7.26.10) @@ -478,8 +478,12 @@ packages: resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.26.8': - resolution: {integrity: sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==} + '@babel/code-frame@7.27.1': + resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.27.1': + resolution: {integrity: sha512-Q+E+rd/yBzNQhXkG+zQnF58e4zoZfBedaxwzPmicKsiK3nt8iJYrSrDbjwFFDGC4f+rPafqRaPH6TsDoSvMf7A==} engines: {node: '>=6.9.0'} '@babel/core@7.26.10': @@ -490,12 +494,20 @@ packages: resolution: {integrity: sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==} engines: {node: '>=6.9.0'} + '@babel/generator@7.27.1': + resolution: {integrity: sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==} + engines: {node: '>=6.9.0'} + '@babel/helper-annotate-as-pure@7.25.9': resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.27.0': - resolution: {integrity: sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA==} + '@babel/helper-annotate-as-pure@7.27.1': + resolution: {integrity: sha512-WnuuDILl9oOBbKnb4L+DyODx7iC47XfzmNCpTttFsSp6hTG7XZxu60+4IO+2/hPfcGOoKbFiwoI/+zwARbNQow==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.27.1': + resolution: {integrity: sha512-2YaDd/Rd9E598B5+WIc8wJPmWETiiJXFYVE60oX8FDohv7rAUU3CQj+A1MgeEmcsk2+dQuEjIe/GDvig0SqL4g==} engines: {node: '>=6.9.0'} '@babel/helper-create-class-features-plugin@7.27.0': @@ -504,8 +516,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-create-regexp-features-plugin@7.27.0': - resolution: {integrity: sha512-fO8l08T76v48BhpNRW/nQ0MxfnSdoSKUJBMjubOAYffsVuGG5qOfMq7N6Es7UJvi7Y8goXXo07EfcHZXDPuELQ==} + '@babel/helper-create-class-features-plugin@7.27.1': + resolution: {integrity: sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-create-regexp-features-plugin@7.27.1': + resolution: {integrity: sha512-uVDC72XVf8UbrH5qQTc18Agb8emwjTiZrQE11Nv3CuBEZmVvTwwE9CBUEvHku06gQCAyYf8Nv6ja1IN+6LMbxQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -519,26 +537,48 @@ packages: resolution: {integrity: sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==} engines: {node: '>=6.9.0'} + '@babel/helper-member-expression-to-functions@7.27.1': + resolution: {integrity: sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==} + engines: {node: '>=6.9.0'} + '@babel/helper-module-imports@7.25.9': resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} engines: {node: '>=6.9.0'} + '@babel/helper-module-imports@7.27.1': + resolution: {integrity: sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==} + engines: {node: '>=6.9.0'} + '@babel/helper-module-transforms@7.26.0': resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-module-transforms@7.27.1': + resolution: {integrity: sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-optimise-call-expression@7.25.9': resolution: {integrity: sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==} engines: {node: '>=6.9.0'} + '@babel/helper-optimise-call-expression@7.27.1': + resolution: {integrity: sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==} + engines: {node: '>=6.9.0'} + '@babel/helper-plugin-utils@7.26.5': resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} engines: {node: '>=6.9.0'} - '@babel/helper-remap-async-to-generator@7.25.9': - resolution: {integrity: sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==} + '@babel/helper-plugin-utils@7.27.1': + resolution: {integrity: sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-remap-async-to-generator@7.27.1': + resolution: {integrity: sha512-7fiA521aVw8lSPeI4ZOD3vRFkoqkJcS+z4hFo82bFSH/2tNd6eJ5qCVMS5OzDmZh/kaHQeBaeyxK6wljcPtveA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -549,28 +589,50 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-replace-supers@7.27.1': + resolution: {integrity: sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-skip-transparent-expression-wrappers@7.25.9': resolution: {integrity: sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==} engines: {node: '>=6.9.0'} + '@babel/helper-skip-transparent-expression-wrappers@7.27.1': + resolution: {integrity: sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==} + engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.25.9': resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.27.1': + resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.25.9': resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.27.1': + resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.25.9': resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} engines: {node: '>=6.9.0'} - '@babel/helper-wrap-function@7.25.9': - resolution: {integrity: sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==} + '@babel/helper-validator-option@7.27.1': + resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-wrap-function@7.27.1': + resolution: {integrity: sha512-NFJK2sHUvrjo8wAU/nQTWU890/zB2jj0qBcCbZbbf+005cAsv6tMjXz31fBign6M5ov1o0Bllu+9nbqkfsjjJQ==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.27.0': - resolution: {integrity: sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==} + '@babel/helpers@7.27.1': + resolution: {integrity: sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ==} engines: {node: '>=6.9.0'} '@babel/highlight@7.25.9': @@ -582,32 +644,37 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9': - resolution: {integrity: sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==} + '@babel/parser@7.27.1': + resolution: {integrity: sha512-I0dZ3ZpCrJ1c04OqlNsQcKiZlsrXf/kkE4FXzID9rIOYICsAbA8mMDzhW/luRNAHdCNt7os/u8wenklZDlUVUQ==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.27.1': + resolution: {integrity: sha512-QPG3C9cCVRQLxAVwmefEmwdTanECuUBMQZ/ym5kiw3XKCGA7qkuQLcjWWHcrD/GKbn/WmJwaezfuuAOcyKlRPA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9': - resolution: {integrity: sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==} + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.27.1': + resolution: {integrity: sha512-qNeq3bCKnGgLkEXUuFry6dPlGfCdQNZbn7yUAPCInwAJHMU7THJfrBSozkcWq5sNM6RcF3S8XyQL2A52KNR9IA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9': - resolution: {integrity: sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==} + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.27.1': + resolution: {integrity: sha512-g4L7OYun04N1WyqMNjldFwlfPCLVkgB54A/YCXICZYBsvJJE3kByKv9c9+R/nAfmIfjl2rKYLNyMHboYbZaWaA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9': - resolution: {integrity: sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==} + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.27.1': + resolution: {integrity: sha512-oO02gcONcD5O1iTLi/6frMJBIwWEHceWGSGqrpCmEL8nogiS6J9PBlE48CaK20/Jx1LuRml9aDftLgdjXT8+Cw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9': - resolution: {integrity: sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==} + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.27.1': + resolution: {integrity: sha512-6BpaYGDavZqkI6yT+KSPdpZFfpnd68UKXbcjI9pJ13pvHhPrCKWOOLp+ysvMeA+DxnhuPpgIaRpxRxo5A9t5jw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -618,14 +685,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-assertions@7.26.0': - resolution: {integrity: sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==} + '@babel/plugin-syntax-import-assertions@7.27.1': + resolution: {integrity: sha512-UT/Jrhw57xg4ILHLFnzFpPDlMbcdEicaAtjPQpbj9wa8T4r5KVWCimHcL/460g8Ht0DMxDyjsLgiWSkVjnwPFg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-attributes@7.26.0': - resolution: {integrity: sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==} + '@babel/plugin-syntax-import-attributes@7.27.1': + resolution: {integrity: sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -648,140 +715,140 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-arrow-functions@7.25.9': - resolution: {integrity: sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==} + '@babel/plugin-transform-arrow-functions@7.27.1': + resolution: {integrity: sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-generator-functions@7.26.8': - resolution: {integrity: sha512-He9Ej2X7tNf2zdKMAGOsmg2MrFc+hfoAhd3po4cWfo/NWjzEAKa0oQruj1ROVUdl0e6fb6/kE/G3SSxE0lRJOg==} + '@babel/plugin-transform-async-generator-functions@7.27.1': + resolution: {integrity: sha512-eST9RrwlpaoJBDHShc+DS2SG4ATTi2MYNb4OxYkf3n+7eb49LWpnS+HSpVfW4x927qQwgk8A2hGNVaajAEw0EA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-to-generator@7.25.9': - resolution: {integrity: sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==} + '@babel/plugin-transform-async-to-generator@7.27.1': + resolution: {integrity: sha512-NREkZsZVJS4xmTr8qzE5y8AfIPqsdQfRuUiLRTEzb7Qii8iFWCyDKaUV2c0rCuh4ljDZ98ALHP/PetiBV2nddA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoped-functions@7.26.5': - resolution: {integrity: sha512-chuTSY+hq09+/f5lMj8ZSYgCFpppV2CbYrhNFJ1BFoXpiWPnnAb7R0MqrafCpN8E1+YRrtM1MXZHJdIx8B6rMQ==} + '@babel/plugin-transform-block-scoped-functions@7.27.1': + resolution: {integrity: sha512-cnqkuOtZLapWYZUYM5rVIdv1nXYuFVIltZ6ZJ7nIj585QsjKM5dhL2Fu/lICXZ1OyIAFc7Qy+bvDAtTXqGrlhg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoping@7.27.0': - resolution: {integrity: sha512-u1jGphZ8uDI2Pj/HJj6YQ6XQLZCNjOlprjxB5SVz6rq2T6SwAR+CdrWK0CP7F+9rDVMXdB0+r6Am5G5aobOjAQ==} + '@babel/plugin-transform-block-scoping@7.27.1': + resolution: {integrity: sha512-QEcFlMl9nGTgh1rn2nIeU5bkfb9BAjaQcWbiP4LvKxUot52ABcTkpcyJ7f2Q2U2RuQ84BNLgts3jRme2dTx6Fw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-properties@7.25.9': - resolution: {integrity: sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==} + '@babel/plugin-transform-class-properties@7.27.1': + resolution: {integrity: sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-static-block@7.26.0': - resolution: {integrity: sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==} + '@babel/plugin-transform-class-static-block@7.27.1': + resolution: {integrity: sha512-s734HmYU78MVzZ++joYM+NkJusItbdRcbm+AGRgJCt3iA+yux0QpD9cBVdz3tKyrjVYWRl7j0mHSmv4lhV0aoA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 - '@babel/plugin-transform-classes@7.25.9': - resolution: {integrity: sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==} + '@babel/plugin-transform-classes@7.27.1': + resolution: {integrity: sha512-7iLhfFAubmpeJe/Wo2TVuDrykh/zlWXLzPNdL0Jqn/Xu8R3QQ8h9ff8FQoISZOsw74/HFqFI7NX63HN7QFIHKA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-computed-properties@7.25.9': - resolution: {integrity: sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==} + '@babel/plugin-transform-computed-properties@7.27.1': + resolution: {integrity: sha512-lj9PGWvMTVksbWiDT2tW68zGS/cyo4AkZ/QTp0sQT0mjPopCmrSkzxeXkznjqBxzDI6TclZhOJbBmbBLjuOZUw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-destructuring@7.25.9': - resolution: {integrity: sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==} + '@babel/plugin-transform-destructuring@7.27.1': + resolution: {integrity: sha512-ttDCqhfvpE9emVkXbPD8vyxxh4TWYACVybGkDj+oReOGwnp066ITEivDlLwe0b1R0+evJ13IXQuLNB5w1fhC5Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-dotall-regex@7.25.9': - resolution: {integrity: sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==} + '@babel/plugin-transform-dotall-regex@7.27.1': + resolution: {integrity: sha512-gEbkDVGRvjj7+T1ivxrfgygpT7GUd4vmODtYpbs0gZATdkX8/iSnOtZSxiZnsgm1YjTgjI6VKBGSJJevkrclzw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-duplicate-keys@7.25.9': - resolution: {integrity: sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==} + '@babel/plugin-transform-duplicate-keys@7.27.1': + resolution: {integrity: sha512-MTyJk98sHvSs+cvZ4nOauwTTG1JeonDjSGvGGUNHreGQns+Mpt6WX/dVzWBHgg+dYZhkC4X+zTDfkTU+Vy9y7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9': - resolution: {integrity: sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==} + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.27.1': + resolution: {integrity: sha512-hkGcueTEzuhB30B3eJCbCYeCaaEQOmQR0AdvzpD4LoN0GXMWzzGSuRrxR2xTnCrvNbVwK9N6/jQ92GSLfiZWoQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-dynamic-import@7.25.9': - resolution: {integrity: sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==} + '@babel/plugin-transform-dynamic-import@7.27.1': + resolution: {integrity: sha512-MHzkWQcEmjzzVW9j2q8LGjwGWpG2mjwaaB0BNQwst3FIjqsg8Ct/mIZlvSPJvfi9y2AC8mi/ktxbFVL9pZ1I4A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-exponentiation-operator@7.26.3': - resolution: {integrity: sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ==} + '@babel/plugin-transform-exponentiation-operator@7.27.1': + resolution: {integrity: sha512-uspvXnhHvGKf2r4VVtBpeFnuDWsJLQ6MF6lGJLC89jBR1uoVeqM416AZtTuhTezOfgHicpJQmoD5YUakO/YmXQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-export-namespace-from@7.25.9': - resolution: {integrity: sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==} + '@babel/plugin-transform-export-namespace-from@7.27.1': + resolution: {integrity: sha512-tQvHWSZ3/jH2xuq/vZDy0jNn+ZdXJeM8gHvX4lnJmsc3+50yPlWdZXIc5ay+umX+2/tJIqHqiEqcJvxlmIvRvQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-for-of@7.26.9': - resolution: {integrity: sha512-Hry8AusVm8LW5BVFgiyUReuoGzPUpdHQQqJY5bZnbbf+ngOHWuCuYFKw/BqaaWlvEUrF91HMhDtEaI1hZzNbLg==} + '@babel/plugin-transform-for-of@7.27.1': + resolution: {integrity: sha512-BfbWFFEJFQzLCQ5N8VocnCtA8J1CLkNTe2Ms2wocj75dd6VpiqS5Z5quTYcUoo4Yq+DN0rtikODccuv7RU81sw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-function-name@7.25.9': - resolution: {integrity: sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==} + '@babel/plugin-transform-function-name@7.27.1': + resolution: {integrity: sha512-1bQeydJF9Nr1eBCMMbC+hdwmRlsv5XYOMu03YSWFwNs0HsAmtSxxF1fyuYPqemVldVyFmlCU7w8UE14LupUSZQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-json-strings@7.25.9': - resolution: {integrity: sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==} + '@babel/plugin-transform-json-strings@7.27.1': + resolution: {integrity: sha512-6WVLVJiTjqcQauBhn1LkICsR2H+zm62I3h9faTDKt1qP4jn2o72tSvqMwtGFKGTpojce0gJs+76eZ2uCHRZh0Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-literals@7.25.9': - resolution: {integrity: sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==} + '@babel/plugin-transform-literals@7.27.1': + resolution: {integrity: sha512-0HCFSepIpLTkLcsi86GG3mTUzxV5jpmbv97hTETW3yzrAij8aqlD36toB1D0daVFJM8NK6GvKO0gslVQmm+zZA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-logical-assignment-operators@7.25.9': - resolution: {integrity: sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==} + '@babel/plugin-transform-logical-assignment-operators@7.27.1': + resolution: {integrity: sha512-SJvDs5dXxiae4FbSL1aBJlG4wvl594N6YEVVn9e3JGulwioy6z3oPjx/sQBO3Y4NwUu5HNix6KJ3wBZoewcdbw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-member-expression-literals@7.25.9': - resolution: {integrity: sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==} + '@babel/plugin-transform-member-expression-literals@7.27.1': + resolution: {integrity: sha512-hqoBX4dcZ1I33jCSWcXrP+1Ku7kdqXf1oeah7ooKOIiAdKQ+uqftgCFNOSzA5AMS2XIHEYeGFg4cKRCdpxzVOQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-amd@7.25.9': - resolution: {integrity: sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==} + '@babel/plugin-transform-modules-amd@7.27.1': + resolution: {integrity: sha512-iCsytMg/N9/oFq6n+gFTvUYDZQOMK5kEdeYxmxt91fcJGycfxVP9CnrxoliM0oumFERba2i8ZtwRUCMhvP1LnA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -792,134 +859,140 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-systemjs@7.25.9': - resolution: {integrity: sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==} + '@babel/plugin-transform-modules-commonjs@7.27.1': + resolution: {integrity: sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-umd@7.25.9': - resolution: {integrity: sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==} + '@babel/plugin-transform-modules-systemjs@7.27.1': + resolution: {integrity: sha512-w5N1XzsRbc0PQStASMksmUeqECuzKuTJer7kFagK8AXgpCMkeDMO5S+aaFb7A51ZYDF7XI34qsTX+fkHiIm5yA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-named-capturing-groups-regex@7.25.9': - resolution: {integrity: sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==} + '@babel/plugin-transform-modules-umd@7.27.1': + resolution: {integrity: sha512-iQBE/xC5BV1OxJbp6WG7jq9IWiD+xxlZhLrdwpPkTX3ydmXdvoCpyfJN7acaIBZaOqTfr76pgzqBJflNbeRK+w==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-named-capturing-groups-regex@7.27.1': + resolution: {integrity: sha512-SstR5JYy8ddZvD6MhV0tM/j16Qds4mIpJTOd1Yu9J9pJjH93bxHECF7pgtc28XvkzTD6Pxcm/0Z73Hvk7kb3Ng==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-new-target@7.25.9': - resolution: {integrity: sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==} + '@babel/plugin-transform-new-target@7.27.1': + resolution: {integrity: sha512-f6PiYeqXQ05lYq3TIfIDu/MtliKUbNwkGApPUvyo6+tc7uaR4cPjPe7DFPr15Uyycg2lZU6btZ575CuQoYh7MQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-nullish-coalescing-operator@7.26.6': - resolution: {integrity: sha512-CKW8Vu+uUZneQCPtXmSBUC6NCAUdya26hWCElAWh5mVSlSRsmiCPUUDKb3Z0szng1hiAJa098Hkhg9o4SE35Qw==} + '@babel/plugin-transform-nullish-coalescing-operator@7.27.1': + resolution: {integrity: sha512-aGZh6xMo6q9vq1JGcw58lZ1Z0+i0xB2x0XaauNIUXd6O1xXc3RwoWEBlsTQrY4KQ9Jf0s5rgD6SiNkaUdJegTA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-numeric-separator@7.25.9': - resolution: {integrity: sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==} + '@babel/plugin-transform-numeric-separator@7.27.1': + resolution: {integrity: sha512-fdPKAcujuvEChxDBJ5c+0BTaS6revLV7CJL08e4m3de8qJfNIuCc2nc7XJYOjBoTMJeqSmwXJ0ypE14RCjLwaw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-rest-spread@7.25.9': - resolution: {integrity: sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==} + '@babel/plugin-transform-object-rest-spread@7.27.1': + resolution: {integrity: sha512-/sSliVc9gHE20/7D5qsdGlq7RG5NCDTWsAhyqzGuq174EtWJoGzIu1BQ7G56eDsTcy1jseBZwv50olSdXOlGuA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-super@7.25.9': - resolution: {integrity: sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==} + '@babel/plugin-transform-object-super@7.27.1': + resolution: {integrity: sha512-SFy8S9plRPbIcxlJ8A6mT/CxFdJx/c04JEctz4jf8YZaVS2px34j7NXRrlGlHkN/M2gnpL37ZpGRGVFLd3l8Ng==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-catch-binding@7.25.9': - resolution: {integrity: sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==} + '@babel/plugin-transform-optional-catch-binding@7.27.1': + resolution: {integrity: sha512-txEAEKzYrHEX4xSZN4kJ+OfKXFVSWKB2ZxM9dpcE3wT7smwkNmXo5ORRlVzMVdJbD+Q8ILTgSD7959uj+3Dm3Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-chaining@7.25.9': - resolution: {integrity: sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==} + '@babel/plugin-transform-optional-chaining@7.27.1': + resolution: {integrity: sha512-BQmKPPIuc8EkZgNKsv0X4bPmOoayeu4F1YCwx2/CfmDSXDbp7GnzlUH+/ul5VGfRg1AoFPsrIThlEBj2xb4CAg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-parameters@7.25.9': - resolution: {integrity: sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==} + '@babel/plugin-transform-parameters@7.27.1': + resolution: {integrity: sha512-018KRk76HWKeZ5l4oTj2zPpSh+NbGdt0st5S6x0pga6HgrjBOJb24mMDHorFopOOd6YHkLgOZ+zaCjZGPO4aKg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-methods@7.25.9': - resolution: {integrity: sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==} + '@babel/plugin-transform-private-methods@7.27.1': + resolution: {integrity: sha512-10FVt+X55AjRAYI9BrdISN9/AQWHqldOeZDUoLyif1Kn05a56xVBXb8ZouL8pZ9jem8QpXaOt8TS7RHUIS+GPA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-property-in-object@7.25.9': - resolution: {integrity: sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==} + '@babel/plugin-transform-private-property-in-object@7.27.1': + resolution: {integrity: sha512-5J+IhqTi1XPa0DXF83jYOaARrX+41gOewWbkPyjMNRDqgOCqdffGh8L3f/Ek5utaEBZExjSAzcyjmV9SSAWObQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-property-literals@7.25.9': - resolution: {integrity: sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==} + '@babel/plugin-transform-property-literals@7.27.1': + resolution: {integrity: sha512-oThy3BCuCha8kDZ8ZkgOg2exvPYUlprMukKQXI1r1pJ47NCvxfkEy8vK+r/hT9nF0Aa4H1WUPZZjHTFtAhGfmQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-regenerator@7.27.0': - resolution: {integrity: sha512-LX/vCajUJQDqE7Aum/ELUMZAY19+cDpghxrnyt5I1tV6X5PyC86AOoWXWFYFeIvauyeSA6/ktn4tQVn/3ZifsA==} + '@babel/plugin-transform-regenerator@7.27.1': + resolution: {integrity: sha512-B19lbbL7PMrKr52BNPjCqg1IyNUIjTcxKj8uX9zHO+PmWN93s19NDr/f69mIkEp2x9nmDJ08a7lgHaTTzvW7mw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-regexp-modifiers@7.26.0': - resolution: {integrity: sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==} + '@babel/plugin-transform-regexp-modifiers@7.27.1': + resolution: {integrity: sha512-TtEciroaiODtXvLZv4rmfMhkCv8jx3wgKpL68PuiPh2M4fvz5jhsA7697N1gMvkvr/JTF13DrFYyEbY9U7cVPA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-reserved-words@7.25.9': - resolution: {integrity: sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==} + '@babel/plugin-transform-reserved-words@7.27.1': + resolution: {integrity: sha512-V2ABPHIJX4kC7HegLkYoDpfg9PVmuWy/i6vUM5eGK22bx4YVFD3M5F0QQnWQoDs6AGsUWTVOopBiMFQgHaSkVw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-shorthand-properties@7.25.9': - resolution: {integrity: sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==} + '@babel/plugin-transform-shorthand-properties@7.27.1': + resolution: {integrity: sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-spread@7.25.9': - resolution: {integrity: sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==} + '@babel/plugin-transform-spread@7.27.1': + resolution: {integrity: sha512-kpb3HUqaILBJcRFVhFUs6Trdd4mkrzcGXss+6/mxUd273PfbWqSDHRzMT2234gIg2QYfAjvXLSquP1xECSg09Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-sticky-regex@7.25.9': - resolution: {integrity: sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==} + '@babel/plugin-transform-sticky-regex@7.27.1': + resolution: {integrity: sha512-lhInBO5bi/Kowe2/aLdBAawijx+q1pQzicSgnkB6dUPc1+RC8QmJHKf2OjvU+NZWitguJHEaEmbV6VWEouT58g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-template-literals@7.26.8': - resolution: {integrity: sha512-OmGDL5/J0CJPJZTHZbi2XpO0tyT2Ia7fzpW5GURwdtp2X3fMmN8au/ej6peC/T33/+CRiIpA8Krse8hFGVmT5Q==} + '@babel/plugin-transform-template-literals@7.27.1': + resolution: {integrity: sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typeof-symbol@7.27.0': - resolution: {integrity: sha512-+LLkxA9rKJpNoGsbLnAgOCdESl73vwYn+V6b+5wHbrE7OGKVDPHIQvbFSzqE6rwqaCw2RE+zdJrlLkcf8YOA0w==} + '@babel/plugin-transform-typeof-symbol@7.27.1': + resolution: {integrity: sha512-RiSILC+nRJM7FY5srIyc4/fGIwUhyDuuBSdWn4y6yT6gm652DpCHZjIipgn6B7MQ1ITOUnAKWixEUjQRIBIcLw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -930,32 +1003,32 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-escapes@7.25.9': - resolution: {integrity: sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==} + '@babel/plugin-transform-unicode-escapes@7.27.1': + resolution: {integrity: sha512-Ysg4v6AmF26k9vpfFuTZg8HRfVWzsh1kVfowA23y9j/Gu6dOuahdUVhkLqpObp3JIv27MLSii6noRnuKN8H0Mg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-property-regex@7.25.9': - resolution: {integrity: sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==} + '@babel/plugin-transform-unicode-property-regex@7.27.1': + resolution: {integrity: sha512-uW20S39PnaTImxp39O5qFlHLS9LJEmANjMG7SxIhap8rCHqu0Ik+tLEPX5DKmHn6CsWQ7j3lix2tFOa5YtL12Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-regex@7.25.9': - resolution: {integrity: sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==} + '@babel/plugin-transform-unicode-regex@7.27.1': + resolution: {integrity: sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-sets-regex@7.25.9': - resolution: {integrity: sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==} + '@babel/plugin-transform-unicode-sets-regex@7.27.1': + resolution: {integrity: sha512-EtkOujbc4cgvb0mlpQefi4NTPBzhSIevblFevACNLUspmrALgmEBdL/XfnyyITfd8fKBZrZys92zOWcik7j9Tw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/preset-env@7.26.9': - resolution: {integrity: sha512-vX3qPGE8sEKEAZCWk05k3cpTAE3/nOYca++JA+Rd0z2NCNzabmYvEiSShKzm10zdquOIAVXsy2Ei/DTW34KlKQ==} + '@babel/preset-env@7.27.1': + resolution: {integrity: sha512-TZ5USxFpLgKDpdEt8YWBR7p6g+bZo6sHaXLqP2BY/U0acaoI8FTVflcYCr/v94twM1C5IWFdZ/hscq9WjUeLXA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -975,22 +1048,26 @@ packages: resolution: {integrity: sha512-89TgomkhiBKJ1QN/zPJbSW6M3T9caLoSDYsHFNlTI2Q+T12w8ehZeEnx54I79gB0kmM+etCC5Lfgv95rYUJPdQ==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.27.0': - resolution: {integrity: sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==} - engines: {node: '>=6.9.0'} - - '@babel/template@7.27.0': - resolution: {integrity: sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==} + '@babel/template@7.27.1': + resolution: {integrity: sha512-Fyo3ghWMqkHHpHQCoBs2VnYjR4iWFFjguTDEqA5WgZDOrFesVjMhMM2FSqTKSoUSDO1VQtavj8NFpdRBEvJTtg==} engines: {node: '>=6.9.0'} '@babel/traverse@7.27.0': resolution: {integrity: sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==} engines: {node: '>=6.9.0'} + '@babel/traverse@7.27.1': + resolution: {integrity: sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==} + engines: {node: '>=6.9.0'} + '@babel/types@7.27.0': resolution: {integrity: sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==} engines: {node: '>=6.9.0'} + '@babel/types@7.27.1': + resolution: {integrity: sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==} + engines: {node: '>=6.9.0'} + '@bbob/core@4.2.0': resolution: {integrity: sha512-i5VUIO6xx+TCrBE8plQF9KpW1z+0QcCh9GawCCWYG9KcZrEsyRy57my5/kem0a2lFxXjh0o+tgjQY9sCP5b3bw==} @@ -2894,8 +2971,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001715: - resolution: {integrity: sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==} + caniuse-lite@1.0.30001716: + resolution: {integrity: sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -3092,6 +3169,9 @@ packages: core-js-compat@3.41.0: resolution: {integrity: sha512-RFsU9LySVue9RTwdDVX/T0e2Y6jRYWXERKElIjpuEOEnxaXffI0X7RUwVzfYLfzuLXSNJDYoRYUAmRUcyln20A==} + core-js-compat@3.42.0: + resolution: {integrity: sha512-bQasjMfyDGyaeWKBIu33lHh9qlSR0MFE/Nmc6nMjf/iU9b3rSMdAYz1Baxrv4lPdGUsTqZudHA4jIGSJy0SWZQ==} + core-js@2.6.12: resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==} deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. @@ -3358,8 +3438,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.143: - resolution: {integrity: sha512-QqklJMOFBMqe46k8iIOwA9l2hz57V2OKMmP5eSWcUvwx+mASAsbU+wkF1pHjn9ZVSBPrsYWr4/W/95y5SwYg2g==} + electron-to-chromium@1.5.148: + resolution: {integrity: sha512-8uc1QXwwqayD4mblcsQYZqoi+cOc97A2XmKSBOIRbEAvbp6vrqmSYs4dHD2qVygUgn7Mi0qdKgPaJ9WC8cv63A==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -5393,9 +5473,6 @@ packages: regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - regenerator-transform@0.15.2: - resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} - regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true @@ -6470,24 +6547,30 @@ snapshots: '@babel/code-frame@7.26.2': dependencies: - '@babel/helper-validator-identifier': 7.25.9 + '@babel/helper-validator-identifier': 7.27.1 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/code-frame@7.27.1': + dependencies: + '@babel/helper-validator-identifier': 7.27.1 js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/compat-data@7.26.8': {} + '@babel/compat-data@7.27.1': {} '@babel/core@7.26.10': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.26.2 - '@babel/generator': 7.27.0 - '@babel/helper-compilation-targets': 7.27.0 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.10) - '@babel/helpers': 7.27.0 - '@babel/parser': 7.27.0 - '@babel/template': 7.27.0 - '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 + '@babel/code-frame': 7.27.1 + '@babel/generator': 7.27.1 + '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) + '@babel/helpers': 7.27.1 + '@babel/parser': 7.27.1 + '@babel/template': 7.27.1 + '@babel/traverse': 7.27.1 + '@babel/types': 7.27.1 convert-source-map: 2.0.0 debug: 4.4.0 gensync: 1.0.0-beta.2 @@ -6499,7 +6582,15 @@ snapshots: '@babel/generator@7.27.0': dependencies: '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.27.1 + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.1.0 + + '@babel/generator@7.27.1': + dependencies: + '@babel/parser': 7.27.1 + '@babel/types': 7.27.1 '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.1.0 @@ -6508,10 +6599,14 @@ snapshots: dependencies: '@babel/types': 7.27.0 - '@babel/helper-compilation-targets@7.27.0': + '@babel/helper-annotate-as-pure@7.27.1': dependencies: - '@babel/compat-data': 7.26.8 - '@babel/helper-validator-option': 7.25.9 + '@babel/types': 7.27.1 + + '@babel/helper-compilation-targets@7.27.1': + dependencies: + '@babel/compat-data': 7.27.1 + '@babel/helper-validator-option': 7.27.1 browserslist: 4.24.4 lru-cache: 5.1.1 semver: 6.3.1 @@ -6529,18 +6624,31 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-create-regexp-features-plugin@7.27.0(@babel/core@7.26.10)': + '@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-annotate-as-pure': 7.27.1 + '@babel/helper-member-expression-to-functions': 7.27.1 + '@babel/helper-optimise-call-expression': 7.27.1 + '@babel/helper-replace-supers': 7.27.1(@babel/core@7.26.10) + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/traverse': 7.27.1 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/helper-create-regexp-features-plugin@7.27.1(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-annotate-as-pure': 7.27.1 regexpu-core: 6.2.0 semver: 6.3.1 '@babel/helper-define-polyfill-provider@0.6.4(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-compilation-targets': 7.27.0 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-plugin-utils': 7.27.1 debug: 4.4.0 lodash.debounce: 4.0.8 resolve: 1.22.10 @@ -6549,15 +6657,29 @@ snapshots: '@babel/helper-member-expression-to-functions@7.25.9': dependencies: - '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 + '@babel/traverse': 7.27.1 + '@babel/types': 7.27.1 + transitivePeerDependencies: + - supports-color + + '@babel/helper-member-expression-to-functions@7.27.1': + dependencies: + '@babel/traverse': 7.27.1 + '@babel/types': 7.27.1 transitivePeerDependencies: - supports-color '@babel/helper-module-imports@7.25.9': dependencies: - '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 + '@babel/traverse': 7.27.1 + '@babel/types': 7.27.1 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-imports@7.27.1': + dependencies: + '@babel/traverse': 7.27.1 + '@babel/types': 7.27.1 transitivePeerDependencies: - supports-color @@ -6570,18 +6692,33 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-module-transforms@7.27.1(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-module-imports': 7.27.1 + '@babel/helper-validator-identifier': 7.27.1 + '@babel/traverse': 7.27.1 + transitivePeerDependencies: + - supports-color + '@babel/helper-optimise-call-expression@7.25.9': dependencies: - '@babel/types': 7.27.0 + '@babel/types': 7.27.1 + + '@babel/helper-optimise-call-expression@7.27.1': + dependencies: + '@babel/types': 7.27.1 '@babel/helper-plugin-utils@7.26.5': {} - '@babel/helper-remap-async-to-generator@7.25.9(@babel/core@7.26.10)': + '@babel/helper-plugin-utils@7.27.1': {} + + '@babel/helper-remap-async-to-generator@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-wrap-function': 7.25.9 - '@babel/traverse': 7.27.0 + '@babel/helper-annotate-as-pure': 7.27.1 + '@babel/helper-wrap-function': 7.27.1 + '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color @@ -6590,7 +6727,16 @@ snapshots: '@babel/core': 7.26.10 '@babel/helper-member-expression-to-functions': 7.25.9 '@babel/helper-optimise-call-expression': 7.25.9 - '@babel/traverse': 7.27.0 + '@babel/traverse': 7.27.1 + transitivePeerDependencies: + - supports-color + + '@babel/helper-replace-supers@7.27.1(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-member-expression-to-functions': 7.27.1 + '@babel/helper-optimise-call-expression': 7.27.1 + '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color @@ -6601,68 +6747,85 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-skip-transparent-expression-wrappers@7.27.1': + dependencies: + '@babel/traverse': 7.27.1 + '@babel/types': 7.27.1 + transitivePeerDependencies: + - supports-color + '@babel/helper-string-parser@7.25.9': {} + '@babel/helper-string-parser@7.27.1': {} + '@babel/helper-validator-identifier@7.25.9': {} + '@babel/helper-validator-identifier@7.27.1': {} + '@babel/helper-validator-option@7.25.9': {} - '@babel/helper-wrap-function@7.25.9': + '@babel/helper-validator-option@7.27.1': {} + + '@babel/helper-wrap-function@7.27.1': dependencies: - '@babel/template': 7.27.0 - '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 + '@babel/template': 7.27.1 + '@babel/traverse': 7.27.1 + '@babel/types': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/helpers@7.27.0': + '@babel/helpers@7.27.1': dependencies: - '@babel/template': 7.27.0 - '@babel/types': 7.27.0 + '@babel/template': 7.27.1 + '@babel/types': 7.27.1 '@babel/highlight@7.25.9': dependencies: - '@babel/helper-validator-identifier': 7.25.9 + '@babel/helper-validator-identifier': 7.27.1 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.1.1 '@babel/parser@7.27.0': dependencies: - '@babel/types': 7.27.0 + '@babel/types': 7.27.1 + + '@babel/parser@7.27.1': + dependencies: + '@babel/types': 7.27.1 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/traverse': 7.27.0 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/plugin-transform-optional-chaining': 7.27.1(@babel/core@7.26.10) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/traverse': 7.27.0 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color @@ -6670,15 +6833,15 @@ snapshots: dependencies: '@babel/core': 7.26.10 - '@babel/plugin-syntax-import-assertions@7.26.0(@babel/core@7.26.10)': + '@babel/plugin-syntax-import-assertions@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.10)': + '@babel/plugin-syntax-import-attributes@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.10)': dependencies: @@ -6688,160 +6851,160 @@ snapshots: '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-arrow-functions@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-arrow-functions@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-async-generator-functions@7.26.8(@babel/core@7.26.10)': + '@babel/plugin-transform-async-generator-functions@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.26.10) - '@babel/traverse': 7.27.0 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-remap-async-to-generator': 7.27.1(@babel/core@7.26.10) + '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-to-generator@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-async-to-generator@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.26.10) + '@babel/helper-module-imports': 7.27.1 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-remap-async-to-generator': 7.27.1(@babel/core@7.26.10) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-block-scoped-functions@7.26.5(@babel/core@7.26.10)': + '@babel/plugin-transform-block-scoped-functions@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-block-scoping@7.27.0(@babel/core@7.26.10)': + '@babel/plugin-transform-block-scoping@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-class-properties@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-class-properties@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-class-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.26.0(@babel/core@7.26.10)': + '@babel/plugin-transform-class-static-block@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-class-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-classes@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-classes@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-compilation-targets': 7.27.0 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-replace-supers': 7.26.5(@babel/core@7.26.10) - '@babel/traverse': 7.27.0 + '@babel/helper-annotate-as-pure': 7.27.1 + '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-replace-supers': 7.27.1(@babel/core@7.26.10) + '@babel/traverse': 7.27.1 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-computed-properties@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-computed-properties@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/template': 7.27.0 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/template': 7.27.1 - '@babel/plugin-transform-destructuring@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-destructuring@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-dotall-regex@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-dotall-regex@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-duplicate-keys@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-duplicate-keys@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-dynamic-import@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-dynamic-import@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-exponentiation-operator@7.26.3(@babel/core@7.26.10)': + '@babel/plugin-transform-exponentiation-operator@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-export-namespace-from@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-export-namespace-from@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-for-of@7.26.9(@babel/core@7.26.10)': + '@babel/plugin-transform-for-of@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-function-name@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-function-name@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-compilation-targets': 7.27.0 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/traverse': 7.27.0 + '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-json-strings@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-json-strings@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-literals@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-literals@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-logical-assignment-operators@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-logical-assignment-operators@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-member-expression-literals@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-member-expression-literals@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-modules-amd@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-modules-amd@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color @@ -6853,144 +7016,151 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-systemjs@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-modules-commonjs@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.27.0 + '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-umd@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-modules-systemjs@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-validator-identifier': 7.27.1 + '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-named-capturing-groups-regex@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-modules-umd@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 + transitivePeerDependencies: + - supports-color - '@babel/plugin-transform-new-target@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-named-capturing-groups-regex@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-nullish-coalescing-operator@7.26.6(@babel/core@7.26.10)': + '@babel/plugin-transform-new-target@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-numeric-separator@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-nullish-coalescing-operator@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-object-rest-spread@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-numeric-separator@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-compilation-targets': 7.27.0 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-object-super@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-object-rest-spread@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-replace-supers': 7.26.5(@babel/core@7.26.10) + '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/plugin-transform-parameters': 7.27.1(@babel/core@7.26.10) + + '@babel/plugin-transform-object-super@7.27.1(@babel/core@7.26.10)': + dependencies: + '@babel/core': 7.26.10 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-replace-supers': 7.27.1(@babel/core@7.26.10) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-optional-catch-binding@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-optional-catch-binding@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-optional-chaining@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-optional-chaining@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-parameters@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-parameters@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-private-methods@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-private-methods@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-class-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-private-property-in-object@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-annotate-as-pure': 7.27.1 + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-property-literals@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-property-literals@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-regenerator@7.27.0(@babel/core@7.26.10)': + '@babel/plugin-transform-regenerator@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - regenerator-transform: 0.15.2 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-regexp-modifiers@7.26.0(@babel/core@7.26.10)': + '@babel/plugin-transform-regexp-modifiers@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-reserved-words@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-reserved-words@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-shorthand-properties@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-shorthand-properties@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-spread@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-spread@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-sticky-regex@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-sticky-regex@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-template-literals@7.26.8(@babel/core@7.26.10)': + '@babel/plugin-transform-template-literals@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-typeof-symbol@7.27.0(@babel/core@7.26.10)': + '@babel/plugin-transform-typeof-symbol@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 '@babel/plugin-transform-typescript@7.27.0(@babel/core@7.26.10)': dependencies: @@ -7003,100 +7173,100 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/plugin-transform-unicode-escapes@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-unicode-escapes@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-unicode-property-regex@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-unicode-property-regex@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-unicode-regex@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-unicode-regex@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-unicode-sets-regex@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-transform-unicode-sets-regex@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 - '@babel/preset-env@7.26.9(@babel/core@7.26.10)': + '@babel/preset-env@7.27.1(@babel/core@7.26.10)': dependencies: - '@babel/compat-data': 7.26.8 + '@babel/compat-data': 7.27.1 '@babel/core': 7.26.10 - '@babel/helper-compilation-targets': 7.27.0 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-validator-option': 7.25.9 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.9(@babel/core@7.26.10) + '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-validator-option': 7.27.1 + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.27.1(@babel/core@7.26.10) '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.26.10) - '@babel/plugin-syntax-import-assertions': 7.26.0(@babel/core@7.26.10) - '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.10) + '@babel/plugin-syntax-import-assertions': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.26.10) '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.26.10) - '@babel/plugin-transform-arrow-functions': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-async-generator-functions': 7.26.8(@babel/core@7.26.10) - '@babel/plugin-transform-async-to-generator': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-block-scoped-functions': 7.26.5(@babel/core@7.26.10) - '@babel/plugin-transform-block-scoping': 7.27.0(@babel/core@7.26.10) - '@babel/plugin-transform-class-properties': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-class-static-block': 7.26.0(@babel/core@7.26.10) - '@babel/plugin-transform-classes': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-computed-properties': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-destructuring': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-dotall-regex': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-duplicate-keys': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-dynamic-import': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-exponentiation-operator': 7.26.3(@babel/core@7.26.10) - '@babel/plugin-transform-export-namespace-from': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-for-of': 7.26.9(@babel/core@7.26.10) - '@babel/plugin-transform-function-name': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-json-strings': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-literals': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-logical-assignment-operators': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-member-expression-literals': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-modules-amd': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-modules-commonjs': 7.26.3(@babel/core@7.26.10) - '@babel/plugin-transform-modules-systemjs': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-modules-umd': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-named-capturing-groups-regex': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-new-target': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-nullish-coalescing-operator': 7.26.6(@babel/core@7.26.10) - '@babel/plugin-transform-numeric-separator': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-object-rest-spread': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-object-super': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-optional-catch-binding': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-private-methods': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-private-property-in-object': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-property-literals': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-regenerator': 7.27.0(@babel/core@7.26.10) - '@babel/plugin-transform-regexp-modifiers': 7.26.0(@babel/core@7.26.10) - '@babel/plugin-transform-reserved-words': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-shorthand-properties': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-spread': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-sticky-regex': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-template-literals': 7.26.8(@babel/core@7.26.10) - '@babel/plugin-transform-typeof-symbol': 7.27.0(@babel/core@7.26.10) - '@babel/plugin-transform-unicode-escapes': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-unicode-property-regex': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-unicode-regex': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-unicode-sets-regex': 7.25.9(@babel/core@7.26.10) + '@babel/plugin-transform-arrow-functions': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-async-generator-functions': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-async-to-generator': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-block-scoped-functions': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-block-scoping': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-class-properties': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-class-static-block': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-classes': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-computed-properties': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-destructuring': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-dotall-regex': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-duplicate-keys': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-dynamic-import': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-exponentiation-operator': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-export-namespace-from': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-for-of': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-function-name': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-json-strings': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-literals': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-logical-assignment-operators': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-member-expression-literals': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-modules-amd': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-modules-systemjs': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-modules-umd': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-named-capturing-groups-regex': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-new-target': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-nullish-coalescing-operator': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-numeric-separator': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-object-rest-spread': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-object-super': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-optional-catch-binding': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-optional-chaining': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-parameters': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-private-methods': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-private-property-in-object': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-property-literals': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-regenerator': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-regexp-modifiers': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-reserved-words': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-shorthand-properties': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-spread': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-sticky-regex': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-template-literals': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-typeof-symbol': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-unicode-escapes': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-unicode-property-regex': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-unicode-regex': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-unicode-sets-regex': 7.27.1(@babel/core@7.26.10) '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.26.10) babel-plugin-polyfill-corejs2: 0.4.13(@babel/core@7.26.10) babel-plugin-polyfill-corejs3: 0.11.1(@babel/core@7.26.10) babel-plugin-polyfill-regenerator: 0.6.4(@babel/core@7.26.10) - core-js-compat: 3.41.0 + core-js-compat: 3.42.0 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -7104,8 +7274,8 @@ snapshots: '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/types': 7.27.0 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/types': 7.27.1 esutils: 2.0.3 '@babel/preset-typescript@7.27.0(@babel/core@7.26.10)': @@ -7124,23 +7294,31 @@ snapshots: core-js: 2.6.12 regenerator-runtime: 0.14.1 - '@babel/runtime@7.27.0': + '@babel/template@7.27.1': dependencies: - regenerator-runtime: 0.14.1 - - '@babel/template@7.27.0': - dependencies: - '@babel/code-frame': 7.26.2 - '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 + '@babel/code-frame': 7.27.1 + '@babel/parser': 7.27.1 + '@babel/types': 7.27.1 '@babel/traverse@7.27.0': dependencies: '@babel/code-frame': 7.26.2 '@babel/generator': 7.27.0 '@babel/parser': 7.27.0 - '@babel/template': 7.27.0 - '@babel/types': 7.27.0 + '@babel/template': 7.27.1 + '@babel/types': 7.27.1 + debug: 4.4.0 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + + '@babel/traverse@7.27.1': + dependencies: + '@babel/code-frame': 7.27.1 + '@babel/generator': 7.27.1 + '@babel/parser': 7.27.1 + '@babel/template': 7.27.1 + '@babel/types': 7.27.1 debug: 4.4.0 globals: 11.12.0 transitivePeerDependencies: @@ -7149,7 +7327,12 @@ snapshots: '@babel/types@7.27.0': dependencies: '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 + '@babel/helper-validator-identifier': 7.27.1 + + '@babel/types@7.27.1': + dependencies: + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.27.1 '@bbob/core@4.2.0': dependencies: @@ -8890,7 +9073,7 @@ snapshots: babel-plugin-polyfill-corejs2@0.4.13(@babel/core@7.26.10): dependencies: - '@babel/compat-data': 7.26.8 + '@babel/compat-data': 7.27.1 '@babel/core': 7.26.10 '@babel/helper-define-polyfill-provider': 0.6.4(@babel/core@7.26.10) semver: 6.3.1 @@ -8901,7 +9084,7 @@ snapshots: dependencies: '@babel/core': 7.26.10 '@babel/helper-define-polyfill-provider': 0.6.4(@babel/core@7.26.10) - core-js-compat: 3.41.0 + core-js-compat: 3.42.0 transitivePeerDependencies: - supports-color @@ -8986,8 +9169,8 @@ snapshots: browserslist@4.24.4: dependencies: - caniuse-lite: 1.0.30001715 - electron-to-chromium: 1.5.143 + caniuse-lite: 1.0.30001716 + electron-to-chromium: 1.5.148 node-releases: 2.0.19 update-browserslist-db: 1.1.3(browserslist@4.24.4) @@ -9053,7 +9236,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001715: {} + caniuse-lite@1.0.30001716: {} caseless@0.12.0: {} @@ -9274,6 +9457,10 @@ snapshots: dependencies: browserslist: 4.24.4 + core-js-compat@3.42.0: + dependencies: + browserslist: 4.24.4 + core-js@2.6.12: {} core-util-is@1.0.2: {} @@ -9519,7 +9706,7 @@ snapshots: minimatch: 9.0.1 semver: 7.7.1 - electron-to-chromium@1.5.143: {} + electron-to-chromium@1.5.148: {} ellipsize@0.1.0: {} @@ -11862,10 +12049,6 @@ snapshots: regenerator-runtime@0.14.1: {} - regenerator-transform@0.15.2: - dependencies: - '@babel/runtime': 7.27.0 - regexp-tree@0.1.27: {} regexpu-core@6.2.0: From c2b248793e29b8ae27b63a38044430611b92ee72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 14:44:35 +0000 Subject: [PATCH 0521/2658] chore(deps-dev): bump @babel/preset-typescript from 7.27.0 to 7.27.1 (#18984) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.27.0 to 7.27.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.27.1/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-version: 7.27.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 190 +++++++------------------------------------------ 2 files changed, 26 insertions(+), 166 deletions(-) diff --git a/package.json b/package.json index 3b7db3d1c925..4e84956b1a40 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ }, "devDependencies": { "@babel/preset-env": "7.27.1", - "@babel/preset-typescript": "7.27.0", + "@babel/preset-typescript": "7.27.1", "@bbob/types": "4.2.0", "@eslint/eslintrc": "3.3.1", "@eslint/js": "9.25.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c0510baedf62..1f5e56ccef3d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -283,8 +283,8 @@ importers: specifier: 7.27.1 version: 7.27.1(@babel/core@7.26.10) '@babel/preset-typescript': - specifier: 7.27.0 - version: 7.27.0(@babel/core@7.26.10) + specifier: 7.27.1 + version: 7.27.1(@babel/core@7.26.10) '@bbob/types': specifier: 4.2.0 version: 4.2.0 @@ -498,10 +498,6 @@ packages: resolution: {integrity: sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==} engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.25.9': - resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} - engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.27.1': resolution: {integrity: sha512-WnuuDILl9oOBbKnb4L+DyODx7iC47XfzmNCpTttFsSp6hTG7XZxu60+4IO+2/hPfcGOoKbFiwoI/+zwARbNQow==} engines: {node: '>=6.9.0'} @@ -510,12 +506,6 @@ packages: resolution: {integrity: sha512-2YaDd/Rd9E598B5+WIc8wJPmWETiiJXFYVE60oX8FDohv7rAUU3CQj+A1MgeEmcsk2+dQuEjIe/GDvig0SqL4g==} engines: {node: '>=6.9.0'} - '@babel/helper-create-class-features-plugin@7.27.0': - resolution: {integrity: sha512-vSGCvMecvFCd/BdpGlhpXYNhhC4ccxyvQWpbGL4CWbvfEoLFWUZuSuf7s9Aw70flgQF+6vptvgK2IfOnKlRmBg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - '@babel/helper-create-class-features-plugin@7.27.1': resolution: {integrity: sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==} engines: {node: '>=6.9.0'} @@ -533,46 +523,24 @@ packages: peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - '@babel/helper-member-expression-to-functions@7.25.9': - resolution: {integrity: sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-member-expression-to-functions@7.27.1': resolution: {integrity: sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.25.9': - resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} - engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.27.1': resolution: {integrity: sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.26.0': - resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - '@babel/helper-module-transforms@7.27.1': resolution: {integrity: sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-optimise-call-expression@7.25.9': - resolution: {integrity: sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-optimise-call-expression@7.27.1': resolution: {integrity: sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==} engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.26.5': - resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} - engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.27.1': resolution: {integrity: sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==} engines: {node: '>=6.9.0'} @@ -583,22 +551,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-replace-supers@7.26.5': - resolution: {integrity: sha512-bJ6iIVdYX1YooY2X7w1q6VITt+LnUILtNk7zT78ykuwStx8BauCzxvFqFaHjOpW1bVnSUM1PN1f0p5P21wHxvg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - '@babel/helper-replace-supers@7.27.1': resolution: {integrity: sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-skip-transparent-expression-wrappers@7.25.9': - resolution: {integrity: sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==} - engines: {node: '>=6.9.0'} - '@babel/helper-skip-transparent-expression-wrappers@7.27.1': resolution: {integrity: sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==} engines: {node: '>=6.9.0'} @@ -619,10 +577,6 @@ packages: resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.25.9': - resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.27.1': resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==} engines: {node: '>=6.9.0'} @@ -697,14 +651,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-jsx@7.25.9': - resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} + '@babel/plugin-syntax-jsx@7.27.1': + resolution: {integrity: sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-typescript@7.25.9': - resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} + '@babel/plugin-syntax-typescript@7.27.1': + resolution: {integrity: sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -853,12 +807,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-commonjs@7.26.3': - resolution: {integrity: sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-commonjs@7.27.1': resolution: {integrity: sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw==} engines: {node: '>=6.9.0'} @@ -997,8 +945,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typescript@7.27.0': - resolution: {integrity: sha512-fRGGjO2UEGPjvEcyAZXRXAS8AfdaQoq7HnxAbJoAoW10B9xOKesmmndJv+Sym2a+9FHWZ9KbyyLCe9s0Sn5jtg==} + '@babel/plugin-transform-typescript@7.27.1': + resolution: {integrity: sha512-Q5sT5+O4QUebHdbwKedFBEwRLb02zJ7r4A5Gg2hUoLuU3FjdMcyqcywqUrLCaDsFCxzokf7u9kuy7qz51YUuAg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1038,8 +986,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 - '@babel/preset-typescript@7.27.0': - resolution: {integrity: sha512-vxaPFfJtHhgeOVXRKuHpHPAOgymmy8V8I65T1q53R7GCZlefKeCaTyDs3zOPHTTbmquvNlQYC5klEvWsBAtrBQ==} + '@babel/preset-typescript@7.27.1': + resolution: {integrity: sha512-l7WfQfX0WK4M0v2RudjuQK4u99BS6yLHYEmdtVPP7lKV013zr9DygFuWNlnbvQ9LR+LS0Egz/XAvGx5U9MX0fQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1052,10 +1000,6 @@ packages: resolution: {integrity: sha512-Fyo3ghWMqkHHpHQCoBs2VnYjR4iWFFjguTDEqA5WgZDOrFesVjMhMM2FSqTKSoUSDO1VQtavj8NFpdRBEvJTtg==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.27.0': - resolution: {integrity: sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==} - engines: {node: '>=6.9.0'} - '@babel/traverse@7.27.1': resolution: {integrity: sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==} engines: {node: '>=6.9.0'} @@ -6595,10 +6539,6 @@ snapshots: '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.1.0 - '@babel/helper-annotate-as-pure@7.25.9': - dependencies: - '@babel/types': 7.27.0 - '@babel/helper-annotate-as-pure@7.27.1': dependencies: '@babel/types': 7.27.1 @@ -6611,19 +6551,6 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.27.0(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-member-expression-to-functions': 7.25.9 - '@babel/helper-optimise-call-expression': 7.25.9 - '@babel/helper-replace-supers': 7.26.5(@babel/core@7.26.10) - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - '@babel/traverse': 7.27.0 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - '@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 @@ -6655,13 +6582,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-member-expression-to-functions@7.25.9': - dependencies: - '@babel/traverse': 7.27.1 - '@babel/types': 7.27.1 - transitivePeerDependencies: - - supports-color - '@babel/helper-member-expression-to-functions@7.27.1': dependencies: '@babel/traverse': 7.27.1 @@ -6669,13 +6589,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-module-imports@7.25.9': - dependencies: - '@babel/traverse': 7.27.1 - '@babel/types': 7.27.1 - transitivePeerDependencies: - - supports-color - '@babel/helper-module-imports@7.27.1': dependencies: '@babel/traverse': 7.27.1 @@ -6683,15 +6596,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.27.0 - transitivePeerDependencies: - - supports-color - '@babel/helper-module-transforms@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 @@ -6701,16 +6605,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-optimise-call-expression@7.25.9': - dependencies: - '@babel/types': 7.27.1 - '@babel/helper-optimise-call-expression@7.27.1': dependencies: '@babel/types': 7.27.1 - '@babel/helper-plugin-utils@7.26.5': {} - '@babel/helper-plugin-utils@7.27.1': {} '@babel/helper-remap-async-to-generator@7.27.1(@babel/core@7.26.10)': @@ -6722,15 +6620,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.26.5(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-member-expression-to-functions': 7.25.9 - '@babel/helper-optimise-call-expression': 7.25.9 - '@babel/traverse': 7.27.1 - transitivePeerDependencies: - - supports-color - '@babel/helper-replace-supers@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 @@ -6740,13 +6629,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.25.9': - dependencies: - '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 - transitivePeerDependencies: - - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.27.1': dependencies: '@babel/traverse': 7.27.1 @@ -6762,8 +6644,6 @@ snapshots: '@babel/helper-validator-identifier@7.27.1': {} - '@babel/helper-validator-option@7.25.9': {} - '@babel/helper-validator-option@7.27.1': {} '@babel/helper-wrap-function@7.27.1': @@ -6843,12 +6723,12 @@ snapshots: '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 + '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.10)': + '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.27.1 @@ -7008,14 +6888,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.26.3(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 - transitivePeerDependencies: - - supports-color - '@babel/plugin-transform-modules-commonjs@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 @@ -7162,14 +7034,14 @@ snapshots: '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-typescript@7.27.0(@babel/core@7.26.10)': + '@babel/plugin-transform-typescript@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.27.0(@babel/core@7.26.10) - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.10) + '@babel/helper-annotate-as-pure': 7.27.1 + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.26.10) transitivePeerDependencies: - supports-color @@ -7278,14 +7150,14 @@ snapshots: '@babel/types': 7.27.1 esutils: 2.0.3 - '@babel/preset-typescript@7.27.0(@babel/core@7.26.10)': + '@babel/preset-typescript@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/helper-validator-option': 7.25.9 - '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-modules-commonjs': 7.26.3(@babel/core@7.26.10) - '@babel/plugin-transform-typescript': 7.27.0(@babel/core@7.26.10) + '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-validator-option': 7.27.1 + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-typescript': 7.27.1(@babel/core@7.26.10) transitivePeerDependencies: - supports-color @@ -7300,18 +7172,6 @@ snapshots: '@babel/parser': 7.27.1 '@babel/types': 7.27.1 - '@babel/traverse@7.27.0': - dependencies: - '@babel/code-frame': 7.26.2 - '@babel/generator': 7.27.0 - '@babel/parser': 7.27.0 - '@babel/template': 7.27.1 - '@babel/types': 7.27.1 - debug: 4.4.0 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - '@babel/traverse@7.27.1': dependencies: '@babel/code-frame': 7.27.1 From 03f5ce91cbd2b04a5ec5f76ae62cd001b1e018e6 Mon Sep 17 00:00:00 2001 From: asqwe1 <40950663+asqwe1@users.noreply.github.com> Date: Thu, 1 May 2025 22:45:49 +0800 Subject: [PATCH 0522/2658] feat(route): add new route m.sohu.com (#18965) * add m.sohu.com route * modify mobiles.ts * modify mobile.ts * modify mobile.ts use WapHomeRenderData * modify mobile.ts * modify mobile.ts * modify mobile.ts * Update lib/routes/sohu/mobile.ts Co-authored-by: Tony * Update lib/routes/sohu/mobile.ts Co-authored-by: Tony * Update lib/routes/sohu/mobile.ts Co-authored-by: Tony * Update lib/routes/sohu/mobile.ts Co-authored-by: Tony * Update lib/routes/sohu/mobile.ts Co-authored-by: Tony * Update lib/routes/sohu/mobile.ts Co-authored-by: Tony * modify process more pubdate, handling video/picture post * fix local variable now is not used * modify ts * Update lib/routes/sohu/mobile.ts Co-authored-by: Tony * Update lib/routes/sohu/mobile.ts Co-authored-by: Tony * Update lib/routes/sohu/mobile.ts Co-authored-by: Tony * Update lib/routes/sohu/mobile.ts Co-authored-by: Tony * Update mobile.ts * Update mobile.ts --------- --- lib/routes/sohu/mobile.ts | 150 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 lib/routes/sohu/mobile.ts diff --git a/lib/routes/sohu/mobile.ts b/lib/routes/sohu/mobile.ts new file mode 100644 index 000000000000..49dc69926323 --- /dev/null +++ b/lib/routes/sohu/mobile.ts @@ -0,0 +1,150 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import * as cheerio from 'cheerio'; +import logger from '@/utils/logger'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/mobile', + categories: ['new-media'], + example: '/sohu/mobile', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['m.sohu.com/limit'], + target: '/mobile', + }, + ], + name: '首页新闻', + maintainers: ['asqwe1'], + handler, + description: '订阅手机搜狐网的首页新闻', +}; + +async function handler() { + const response = await ofetch('https://m.sohu.com/limit'); + // 从HTML中提取JSON数据 + const $ = cheerio.load(response); + const jsonScript = $('script:contains("WapHomeRenderData")').text(); + const jsonMatch = jsonScript?.match(/window\.WapHomeRenderData\s*=\s*({.*})/s); + if (!jsonMatch?.[1]) { + throw new Error('WapHomeRenderData 数据未找到'); + } + const renderData = JSON.parse(jsonMatch[1]); + const list = extractPlateBlockNewsLists(renderData) + .filter((item) => item.id && item.url?.startsWith('//')) + .map((item) => ({ + title: item.title, + link: new URL(item.url.split('?')[0], 'https://m.sohu.com').href, + })); + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + try { + const detailResp = await ofetch(item.link); + const $d = cheerio.load(detailResp); + + let description = ''; + let pubDate = ''; + if (item.link.includes('/xtopic/')) { + const fullArticleUrl = $d('.tpl-top-text-item-content').prop('href')?.split('?')[0]?.replace('www.sohu.com/', 'm.sohu.com/'); + const response = await ofetch(`https:${fullArticleUrl}`); + const $ = cheerio.load(response); + description = getDescription($); + pubDate = extractPubDate($); + } + + return { + ...item, + description: description || getDescription($d) || item.title, + pubDate: pubDate || extractPubDate($d), + }; + } catch (error) { + logger.error(`获取详情失败: ${item.link}`, error); + return item; + } + }) + ) + ); + return { + title: '手机搜狐新闻', + link: 'https://m.sohu.com/limit', + item: items.filter(Boolean), + }; +} + +function extractPlateBlockNewsLists(jsonData: any) { + const result: any[] = []; + for (const key of Object.keys(jsonData)) { + if (key.startsWith('PlateBlock')) { + const plateBlock = jsonData[key]; + // 处理新闻列表 + if (plateBlock?.param?.newsData?.list) { + result.push(...plateBlock.param.newsData.list); + } + // 处理焦点图数据 + if (plateBlock?.param?.focusData?.list) { + result.push(...plateBlock.param.focusData.list); + } + if (plateBlock?.param?.feedData0?.list) { + result.push(...plateBlock.param.feedData0.list); + } + if (plateBlock?.param?.feedData1?.list) { + result.push(...plateBlock.param.feedData1.list); + } + } + } + return result; +} + +function extractPubDate($: cheerio.CheerioAPI): string { + const timeElements = ['.time', '#videoPublicTime']; + let date; + for (const selector of timeElements) { + const text = $(selector).first().text().trim(); + if (!text) { + continue; + } + + date = parseDate(text); + if (date) { + return date; + } + } + + const img = $('meta[name="share_img"]') + .toArray() + .map((i) => $(i).attr('src')) + .find((i) => i.includes('images01')); + date = img ? parseDate(img?.match(/images01\/(\d{8})\//i)?.[1]) : ''; + if (date) { + return date; + } +} + + +function getDescription($: cheerio.CheerioAPI) : string | null { + const content = $('#articleContent'); + if (content.length) { + return content.first().html()?.trim(); + } + const video = $('#videoPlayer div'); + if (video.length) { + return ``; + } + const imageList = $('script:contains("imageList")').text(); + if (imageList) { + const list = JSON.parse(imageList.match(/(\[.*\])/s)?.[1].replaceAll(/("description": ".*"),/g, '$1') || '[]'); + return list.map((item: any) => `${item.description || ''}`).join(''); + } + return ''; +} From 6ff87c7d9c2f21e4047adb98317bdd82e11c59de Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 14:47:51 +0000 Subject: [PATCH 0523/2658] style: auto format --- lib/routes/sohu/mobile.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/routes/sohu/mobile.ts b/lib/routes/sohu/mobile.ts index 49dc69926323..b3db164bee08 100644 --- a/lib/routes/sohu/mobile.ts +++ b/lib/routes/sohu/mobile.ts @@ -131,8 +131,7 @@ function extractPubDate($: cheerio.CheerioAPI): string { } } - -function getDescription($: cheerio.CheerioAPI) : string | null { +function getDescription($: cheerio.CheerioAPI): string | null { const content = $('#articleContent'); if (content.length) { return content.first().html()?.trim(); From 927513d6bec333b4fa2df3eb806caf1a962ff701 Mon Sep 17 00:00:00 2001 From: Zhenyu Qi Date: Thu, 1 May 2025 11:35:56 -0700 Subject: [PATCH 0524/2658] =?UTF-8?q?fix(route/imhcg):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20(#18987)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix imhcg router * Update maintainers --- lib/routes/imhcg/blog.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/routes/imhcg/blog.ts b/lib/routes/imhcg/blog.ts index c365db55d0f2..73cb24f9a717 100644 --- a/lib/routes/imhcg/blog.ts +++ b/lib/routes/imhcg/blog.ts @@ -14,7 +14,7 @@ export const route: Route = { }, ], name: 'Engineering blogs', - maintainers: ['ZiHao256'], + maintainers: ['ZiHao256', 'qzydustin'], handler, url: 'infos.imhcg.cn', }; @@ -25,11 +25,11 @@ async function handler() { const items = $('li') .toArray() .map((item) => { - const title = $(item).find('a.title').text(); - const link = $(item).find('a.title').attr('href'); - const author = $(item).find('p.author').text(); - const time = $(item).find('p.time').text(); - const description = $(item).find('p.text').text(); + const title = $(item).find('a.article-title').text(); + const link = $(item).find('a.article-title').attr('href'); + const author = $(item).find('p.article-author').text(); + const time = $(item).find('p.article-time').text(); + const description = $(item).find('p.article-text').text(); return { title, link, From bcbc7a8c44bce96541aff5160070224210b43d8c Mon Sep 17 00:00:00 2001 From: Zhenyu Qi Date: Thu, 1 May 2025 13:38:21 -0700 Subject: [PATCH 0525/2658] fix(route/4khd): Update domain (#18988) --- lib/routes/4khd/namespace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/4khd/namespace.ts b/lib/routes/4khd/namespace.ts index c5bb29a8c270..54e07d24faf4 100644 --- a/lib/routes/4khd/namespace.ts +++ b/lib/routes/4khd/namespace.ts @@ -2,7 +2,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '4KHD', - url: 'www.4khd.net', + url: 'www.4khd.com', description: '4KHD - HD Beautiful Girls', lang: 'en', }; From 0393f141a0d5539dc65fda08f26ee986c051a475 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 May 2025 08:37:18 +0000 Subject: [PATCH 0526/2658] chore(deps): bump @scalar/hono-api-reference from 0.8.6 to 0.8.7 (#18989) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.8.6 to 0.8.7. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-version: 0.8.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 33 +++++++++++++++++++-------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 4e84956b1a40..0d4cf09589c1 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.32.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.8.6", + "@scalar/hono-api-reference": "0.8.7", "@sentry/node": "9.15.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1f5e56ccef3d..f54fa94e42b8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.8.6 - version: 0.8.6(hono@4.7.8) + specifier: 0.8.7 + version: 0.8.7(hono@4.7.8) '@sentry/node': specifier: 9.15.0 version: 9.15.0 @@ -2267,12 +2267,12 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/core@0.2.12': - resolution: {integrity: sha512-rAgRbHq8g4H1fffJMHrvmsOTqwUU3QNh1UgiOe7H8wy0yIVGN9C5YmduF99Mt+7V43oGposeHdlfs+ECSUk8Fg==} + '@scalar/core@0.2.13': + resolution: {integrity: sha512-d0MjF9hUh1rmK3nS1RkpVYLPO5oCl0pfS2mI6uzXmk7uspu2AE9YATbQ9j7SShM0UTOThKTtkYT8N2DJB3vE6g==} engines: {node: '>=18'} - '@scalar/hono-api-reference@0.8.6': - resolution: {integrity: sha512-aEiaX2DyNfwaYvP6GLWknEmaZJ0aLvx/DcrEvmkmzzx4wQv2UJP9kkHpWkoLVRQrZbLwjeTV7yDmXyVWrwWszg==} + '@scalar/hono-api-reference@0.8.7': + resolution: {integrity: sha512-ZKCzb2nylucwI+/YCL402pMAdq4JEoux4on72aD9rRxTuEsP3R3lVSTNt1rJMCpiXXZXyLk/caMVzvFreCsLgw==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -2281,8 +2281,8 @@ packages: resolution: {integrity: sha512-UMxX54taQXnEWYEuesbH+pkjlXRVV1u/Wx6YbVeU3QoJdFGqT3Z7si9zsokoG6MXDcdi1LGny7A0KwownmPvUQ==} engines: {node: '>=18'} - '@scalar/types@0.1.12': - resolution: {integrity: sha512-GSZ/eS94hNu/TkQHhAx96J0PD8tlm303OXRRyp5TPs+1UJ4HCC5LHjSnlz5WTZoi86/fup8R0MIHW9mJw7AoDg==} + '@scalar/types@0.1.13': + resolution: {integrity: sha512-9PgGX4TSNWUcfuGwE4kHvKypc5VhLS450C0V9IuhIIVLrLsyiz8ZA3X/lxQEPoB1zlFbUBmceLD6Xh9c41P7oQ==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -6462,6 +6462,9 @@ packages: zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} + zod@3.24.1: + resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==} + zod@3.24.3: resolution: {integrity: sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==} @@ -8335,26 +8338,26 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/core@0.2.12': + '@scalar/core@0.2.13': dependencies: - '@scalar/types': 0.1.12 + '@scalar/types': 0.1.13 - '@scalar/hono-api-reference@0.8.6(hono@4.7.8)': + '@scalar/hono-api-reference@0.8.7(hono@4.7.8)': dependencies: - '@scalar/core': 0.2.12 + '@scalar/core': 0.2.13 hono: 4.7.8 '@scalar/openapi-types@0.2.1': dependencies: zod: 3.24.3 - '@scalar/types@0.1.12': + '@scalar/types@0.1.13': dependencies: '@scalar/openapi-types': 0.2.1 '@unhead/schema': 1.11.20 nanoid: 5.1.5 type-fest: 4.40.1 - zod: 3.24.3 + zod: 3.24.1 '@sec-ant/readable-stream@0.4.1': {} @@ -12984,4 +12987,6 @@ snapshots: zod@3.22.4: {} + zod@3.24.1: {} + zod@3.24.3: {} From 9d1c9dba340c40432c721a5fe068f2b55e96cfba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 May 2025 08:38:46 +0000 Subject: [PATCH 0527/2658] chore(deps-dev): bump @types/imapflow from 1.0.20 to 1.0.21 (#18990) Bumps [@types/imapflow](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/imapflow) from 1.0.20 to 1.0.21. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/imapflow) --- updated-dependencies: - dependency-name: "@types/imapflow" dependency-version: 1.0.21 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0d4cf09589c1..988e00c481b0 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "@types/etag": "1.8.3", "@types/fs-extra": "11.0.4", "@types/html-to-text": "9.0.4", - "@types/imapflow": "1.0.20", + "@types/imapflow": "1.0.21", "@types/js-beautify": "1.14.3", "@types/jsdom": "21.1.7", "@types/json-bigint": "1.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f54fa94e42b8..4023c4675e98 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -322,8 +322,8 @@ importers: specifier: 9.0.4 version: 9.0.4 '@types/imapflow': - specifier: 1.0.20 - version: 1.0.20 + specifier: 1.0.21 + version: 1.0.21 '@types/js-beautify': specifier: 1.14.3 version: 1.14.3 @@ -2389,8 +2389,8 @@ packages: '@types/http-cache-semantics@4.0.4': resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==} - '@types/imapflow@1.0.20': - resolution: {integrity: sha512-kmBeiV815byuxYlu2lomAx3VY3SsyOYg4rDsK5vT6CGZ6Sow2AUEZwieql8uAizO6+p4sQchw/g3vQX76XBIpA==} + '@types/imapflow@1.0.21': + resolution: {integrity: sha512-7ZqYx+PX2bKs4DLP/tUlCWjlmIFJh6wBNte+94TTurUzIL2wlldJcXJEwzxMfhP6T6ppKY/XFTIcYoWh/vsrUg==} '@types/js-beautify@1.14.3': resolution: {integrity: sha512-FMbQHz+qd9DoGvgLHxeqqVPaNRffpIu5ZjozwV8hf9JAGpIOzuAf4wGbRSo8LNITHqGjmmVjaMggTT5P4v4IHg==} @@ -8492,7 +8492,7 @@ snapshots: '@types/http-cache-semantics@4.0.4': {} - '@types/imapflow@1.0.20': + '@types/imapflow@1.0.21': dependencies: '@types/node': 22.15.3 From 884c6b09cf0bacd0c4bf7d57fd75933b7dd9200c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 May 2025 08:39:59 +0000 Subject: [PATCH 0528/2658] chore(deps-dev): bump discord-api-types from 0.38.1 to 0.38.2 (#18991) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.38.1 to 0.38.2. - [Release notes](https://github.com/discordjs/discord-api-types/releases) - [Changelog](https://github.com/discordjs/discord-api-types/blob/main/CHANGELOG.md) - [Commits](https://github.com/discordjs/discord-api-types/compare/0.38.1...0.38.2) --- updated-dependencies: - dependency-name: discord-api-types dependency-version: 0.38.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 988e00c481b0..2012aa7f4b7c 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "@typescript-eslint/parser": "8.31.1", "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", - "discord-api-types": "0.38.1", + "discord-api-types": "0.38.2", "eslint": "9.25.1", "eslint-config-prettier": "10.1.2", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4023c4675e98..0c41e30b8cc1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -376,8 +376,8 @@ importers: specifier: 2.1.9 version: 2.1.9(vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3))) discord-api-types: - specifier: 0.38.1 - version: 0.38.1 + specifier: 0.38.2 + version: 0.38.2 eslint: specifier: 9.25.1 version: 9.25.1(jiti@2.4.2) @@ -3311,8 +3311,8 @@ packages: resolution: {integrity: sha512-dSApZXgx29qO/6AVigdsoC6HSvaHWinJ4HTRPKrlMAxX71FgPzn/WEWbgM+aB1PlKD9IfSC3Ir2ouYYQR1uy+g==} engines: {node: '>=18.17.0'} - discord-api-types@0.38.1: - resolution: {integrity: sha512-vsjsqjAuxsPhiwbPjTBeGQaDPlizFmSkU0mTzFGMgRxqCDIRBR7iTY74HacpzrDV0QtERHRKQEk1tq7drZUtHg==} + discord-api-types@0.38.2: + resolution: {integrity: sha512-GAPY1/Kv3aqEoBYgUYXB2tHdWJCZXfytlCzxZ4QMQ1/TIQn1JI+xUOukehl4iEa9m7fCURnMIOpOxpaTWqzX2w==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -9481,7 +9481,7 @@ snapshots: directory-import@3.3.2: {} - discord-api-types@0.38.1: {} + discord-api-types@0.38.2: {} doctrine@3.0.0: dependencies: From ff83e833a65f3ddfa1923a3e58ae940c321340a4 Mon Sep 17 00:00:00 2001 From: Kjasn Date: Fri, 2 May 2025 23:22:10 +0800 Subject: [PATCH 0529/2658] fix(route): update previews route to support current month preview (#18995) --- lib/routes/hanime1/previews.ts | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/routes/hanime1/previews.ts b/lib/routes/hanime1/previews.ts index 773a27ac5ef4..00feafe203d9 100644 --- a/lib/routes/hanime1/previews.ts +++ b/lib/routes/hanime1/previews.ts @@ -4,12 +4,12 @@ import { config } from '@/config'; import { load } from 'cheerio'; export const route: Route = { - path: '/previews/:date', - name: '新番预告', + path: '/previews/:date?', + name: '每月新番', maintainers: ['kjasn'], example: '/hanime1/previews/202504', categories: ['anime'], - parameters: { date: { description: 'Date in YYYYMM format' } }, + parameters: { date: { description: '日期格式为 `YYYYMM`,默认值当月' } }, features: { requireConfig: false, requirePuppeteer: false, @@ -20,13 +20,21 @@ export const route: Route = { }, radar: [ { - source: ['hanime1.me/previews/:date'], + source: ['hanime1.me/previews/:date', 'hanime1.me/previews'], target: '/previews/:date', }, ], handler: async (ctx) => { const baseUrl = 'https://hanime1.me'; - const { date } = ctx.req.param(); + let { date } = ctx.req.param(); + if (!date) { + // 默认使用当前日期 + const now = new Date(); + const year = now.getFullYear(); + const month = now.getMonth() + 1; + date = `${year}${month >= 10 ? month : '0' + month}`; + } + const link = `${baseUrl}/previews/${date}`; const response = await ofetch(link, { @@ -81,7 +89,7 @@ export const route: Route = { }); return { - title: `Hanime1 ${date}新番预告`, + title: `Hanime1 ${date} 新番`, link, item: items, }; From b638c778487cc86e22d52c3692d9511a8b6b2ef1 Mon Sep 17 00:00:00 2001 From: Kjasn Date: Sat, 3 May 2025 00:31:49 +0800 Subject: [PATCH 0530/2658] feat(route): add search route for Hanime1 (#18992) * feat(route): add search route for Hanime1 * fix(route): modify the indents in description * fix(route): delete the unnecessary indent --- lib/routes/hanime1/search.ts | 110 +++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 lib/routes/hanime1/search.ts diff --git a/lib/routes/hanime1/search.ts b/lib/routes/hanime1/search.ts new file mode 100644 index 000000000000..26dad366001d --- /dev/null +++ b/lib/routes/hanime1/search.ts @@ -0,0 +1,110 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { config } from '@/config'; +import { load } from 'cheerio'; + +async function handler(ctx) { + const { params } = ctx.req.param(); + const baseUrl = 'https://hanime1.me'; + + // 提取参数 + const searchParams = new URLSearchParams(params); + const query = searchParams.get('query') || ''; + const genre = searchParams.get('genre') || ''; + const broad = searchParams.get('broad') || ''; + const tags = searchParams.getAll('tags[]'); + const sort = searchParams.get('sort') || ''; + const year = searchParams.get('year') || ''; + const month = searchParams.get('month') || ''; + + let link = `${baseUrl}/search?query=${query}&genre=${genre}&broad=${broad}&sort=${sort}&year=${year}&month=${month}`; + for (const tag of tags) { + link += `&tags[]=${tag}`; + } + + const response = await ofetch(link, { + headers: { + referer: baseUrl, + 'user-agent': config.trueUA, + }, + }); + const $ = load(response); + + const target = '.content-padding-new .row.no-gutter'; + + const items = $(target) + .find('.search-doujin-videos.hidden-xs') // 过滤掉重复的元素 + .toArray() + .map((item) => { + const element = $(item); + const title = element.attr('title'); + const videoLink = element.find('a.overlay').attr('href'); + const imageSrc = element.find('img[style*="object-fit: cover"]').attr('src'); // 选择缩略图 + + return { + title, + videoLink, + description: ``, + }; + }); + + // 最多显示三个标签 + const maxTagsToShow = 3; + const displayedTags = tags.slice(0, maxTagsToShow).join(', ') + (tags.length > maxTagsToShow ? ', ...' : ''); + + const feedTitle = `Hanime1 搜索结果` + (genre ? ` | 类型: ${genre}` : '') + (query ? ` | 关键词: ${query}` : '') + (tags.length ? ` | 标签: ${displayedTags}` : ''); + + return { + title: feedTitle, + link, + item: items, + }; +} + +export const route: Route = { + path: '/search/:params', + name: '搜索结果', + maintainers: ['kjasn'], + example: '/hanime1/search/tags%5B%5D=%E7%B4%94%E6%84%9B&', + categories: ['anime'], + parameters: { + params: { + description: ` +搜索内容: +- 关键字(query),即搜索框输入的内容,例如: \`姐\` +- 影片类型(genre),默认为\`全部\`,可选类型有: + - 全部 + - 裏番 + - 泡麵番 + - Motion+Anime + - 3D動畫 + - 同人作品 + - MMD + - Cosplay +- 标签(tags[]),具体可选标签请查看原网址,不一一列举。例如: \`tags[]=純愛&tags[]=中文字幕\` +- 标签模糊匹配(broad),可选有 \`on\` 和\`off\`,默认为\`off\` +- 排序(sort),默认\`最新上市\`,可选排序有: + - 最新上市 + - 最新上傳 + - 本日排行 + - 本週排行 + - 本月排行 + - 觀看次數 + - 讚好比例 + - 他們在看 +- 发布时间,年份和月份(year, month),例如: \`year=2025&month=5\`,默认为\`全部时间\` + +**Tips**: 如果你不确定标签或类型的具体名字,可以直接去原网址选好筛选条件后,把网址中的参数复制过来使用。例如: \`https://hanime1.me/search?query=&genre=裏番&broad=on&sort=最新上市&tags[]=純愛&tags[]=中文字幕\`,\`/search?\`后面的部分就是参数了,最后得到类似这样的路由 \`https://rsshub.app/hanime1/search/query=&genre=裏番&broad=on&sort=最新上市&tags[]=純愛&tags[]=中文字幕\` +`, + }, + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + handler, +}; From be1a4dc98a7e1971cbce360b9b4e1e26657e20ec Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 3 May 2025 03:48:21 +0800 Subject: [PATCH 0531/2658] fix(deps): pull patch for eslint-nibble@8.1.0 from https://github.com/IanVS/eslint-nibble/pull/117 --- package.json | 3 +++ patches/eslint-nibble@8.1.0.patch | 29 +++++++++++++++++++++++++++++ pnpm-lock.yaml | 9 +++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 patches/eslint-nibble@8.1.0.patch diff --git a/package.json b/package.json index 2012aa7f4b7c..d8ef06f359bb 100644 --- a/package.json +++ b/package.json @@ -224,6 +224,9 @@ "safe-buffer": "npm:@nolyfill/safe-buffer@^1", "safer-buffer": "npm:@nolyfill/safer-buffer@^1", "side-channel": "npm:@nolyfill/side-channel@^1" + }, + "patchedDependencies": { + "eslint-nibble@8.1.0": "patches/eslint-nibble@8.1.0.patch" } } } diff --git a/patches/eslint-nibble@8.1.0.patch b/patches/eslint-nibble@8.1.0.patch new file mode 100644 index 000000000000..7157c232dc38 --- /dev/null +++ b/patches/eslint-nibble@8.1.0.patch @@ -0,0 +1,29 @@ +diff --git a/src/cli.js b/src/cli.js +index 6edfcd23d58a1346a773e5d739d21778be39c941..cbddc609aaa78da04b410b45dddf75980785a062 100644 +--- a/src/cli.js ++++ b/src/cli.js +@@ -54,7 +54,10 @@ const cli = { + // Show help + console.log(options.generateHelp()); + } else { +- const configuration = { extensions }; ++ const configuration = { }; ++ if (extensions) { ++ configuration.extensions = extensions; ++ } + if (configFile) { + configuration.overrideConfigFile = configFile; + } +diff --git a/src/config/options.js b/src/config/options.js +index dac85019bac496b5bae6a0d27f44b92ec91af71b..87e43089afcb0b0ece161a050cc776fae56c5fc2 100644 +--- a/src/config/options.js ++++ b/src/config/options.js +@@ -32,7 +32,7 @@ module.exports = optionator({ + }, { + option : 'ext', + type : '[String]', +- default : '.js', ++ default : '', + description: 'Specify JavaScript file extensions' + }, { + option : 'config', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0c41e30b8cc1..09b9af1e3080 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,6 +13,11 @@ overrides: safer-buffer: npm:@nolyfill/safer-buffer@^1 side-channel: npm:@nolyfill/side-channel@^1 +patchedDependencies: + eslint-nibble@8.1.0: + hash: w5z6jxwjps4t4gxnmmngw67gmm + path: patches/eslint-nibble@8.1.0.patch + importers: .: @@ -386,7 +391,7 @@ importers: version: 10.1.2(eslint@9.25.1(jiti@2.4.2)) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.25.1(jiti@2.4.2)) + version: 8.1.0(patch_hash=w5z6jxwjps4t4gxnmmngw67gmm)(eslint@9.25.1(jiti@2.4.2)) eslint-plugin-n: specifier: 17.17.0 version: 17.17.0(eslint@9.25.1(jiti@2.4.2)) @@ -9739,7 +9744,7 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.25.1(jiti@2.4.2)): + eslint-nibble@8.1.0(patch_hash=w5z6jxwjps4t4gxnmmngw67gmm)(eslint@9.25.1(jiti@2.4.2)): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 From b6d560308485cfb29b4f22bf0a1083b06be7c2fd Mon Sep 17 00:00:00 2001 From: Kjasn Date: Sat, 3 May 2025 11:19:27 +0800 Subject: [PATCH 0532/2658] fix(route): enhance search route parameter descriptions (#18997) --- lib/routes/hanime1/search.ts | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/lib/routes/hanime1/search.ts b/lib/routes/hanime1/search.ts index 26dad366001d..263e000e0bf3 100644 --- a/lib/routes/hanime1/search.ts +++ b/lib/routes/hanime1/search.ts @@ -70,29 +70,14 @@ export const route: Route = { parameters: { params: { description: ` -搜索内容: -- 关键字(query),即搜索框输入的内容,例如: \`姐\` -- 影片类型(genre),默认为\`全部\`,可选类型有: - - 全部 - - 裏番 - - 泡麵番 - - Motion+Anime - - 3D動畫 - - 同人作品 - - MMD - - Cosplay -- 标签(tags[]),具体可选标签请查看原网址,不一一列举。例如: \`tags[]=純愛&tags[]=中文字幕\` -- 标签模糊匹配(broad),可选有 \`on\` 和\`off\`,默认为\`off\` -- 排序(sort),默认\`最新上市\`,可选排序有: - - 最新上市 - - 最新上傳 - - 本日排行 - - 本週排行 - - 本月排行 - - 觀看次數 - - 讚好比例 - - 他們在看 -- 发布时间,年份和月份(year, month),例如: \`year=2025&month=5\`,默认为\`全部时间\` +| 参数 | 说明 | 示例或可选值 | +| ------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| \`query\` | 搜索框输入的内容 | 任意值都可以,例如:\`辣妹\` | +| \`genre\` | 番剧类型,默认为\`全部\` | 可选值有:\`全部\` / \`裏番\` / \`泡麵番\` / \`Motion+Anime\` / \`3D動畫\` / \`同人作品\` / \`MMD\` / \`Cosplay\` | +| \`tags[]\` | 标签 | 可选值过多,不一一列举,详细请查看原网址。例如:\`tags[]=純愛&tags[]=中文字幕\` | +| \`broad\` | 标签模糊匹配,默认为 \`off\` | \`on\`(模糊匹配,包含任一标签) / \`off\`(精确匹配,包含全部标签) | +| \`sort\` | 搜索结果排序,默认 \`最新上市\` | \`最新上市\` / \`最新上傳\` / \`本日排行\` / \`本週排行\` / \`本月排行\` / \`觀看次數\` / \`讚好比例\` / \`他們在看\` | +| \`year\`, \`month\` | 筛选发布时间,默认为 \`全部时间\` | 例如:\`year=2025&month=5\` | **Tips**: 如果你不确定标签或类型的具体名字,可以直接去原网址选好筛选条件后,把网址中的参数复制过来使用。例如: \`https://hanime1.me/search?query=&genre=裏番&broad=on&sort=最新上市&tags[]=純愛&tags[]=中文字幕\`,\`/search?\`后面的部分就是参数了,最后得到类似这样的路由 \`https://rsshub.app/hanime1/search/query=&genre=裏番&broad=on&sort=最新上市&tags[]=純愛&tags[]=中文字幕\` `, From c89c8755482a17bce47914e97f67a61c729a89a1 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 3 May 2025 22:29:44 +0800 Subject: [PATCH 0533/2658] chore: fix docker build fix #18999 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index bd96cee15034..aa9601cde000 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ RUN \ fi; COPY ./tsconfig.json /app/ +COPY ./patches /app/patches COPY ./pnpm-lock.yaml /app/ COPY ./package.json /app/ From 6bbf2f0289727726a729ca9be97d1423278b84da Mon Sep 17 00:00:00 2001 From: AiraNadih <128119996+AiraNadih@users.noreply.github.com> Date: Sat, 3 May 2025 22:47:06 +0800 Subject: [PATCH 0534/2658] fix(route/picnob): update picnob domain (#18998) Co-authored-by: AiraNadih --- lib/routes/picnob/user.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/picnob/user.ts b/lib/routes/picnob/user.ts index d2ae28b244cf..50c7714f0f55 100644 --- a/lib/routes/picnob/user.ts +++ b/lib/routes/picnob/user.ts @@ -28,11 +28,11 @@ export const route: Route = { }, radar: [ { - source: ['pixwox.com/profile/:id'], + source: ['www.pixnoy.com/profile/:id'], target: '/user/:id', }, { - source: ['pixwox.com/profile/:id/tagged'], + source: ['www.pixnoy.com/profile/:id/tagged'], target: '/user/:id/tagged', }, ], @@ -43,8 +43,8 @@ export const route: Route = { }; async function handler(ctx) { - // NOTE: 'picnob' is still available, but all requests to 'picnob' will be redirected to 'pixwox' eventually - const baseUrl = 'https://www.pixwox.com'; + // NOTE: 'picnob' is still available, but all requests to 'picnob' will be redirected to 'pixnoy' eventually + const baseUrl = 'https://www.pixnoy.com'; const id = ctx.req.param('id'); const type = ctx.req.param('type') ?? 'profile'; const profileUrl = `${baseUrl}/profile/${id}/${type === 'tagged' ? 'tagged/' : ''}`; From a5e2e295dc1195780f7af64509e1c983f6b55525 Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 4 May 2025 05:24:53 +0800 Subject: [PATCH 0535/2658] refactor: fix all `get` to `toArray` (#19000) * refactor: fix all get * fix(utils/common-config): charset case compare * Revert "fix(utils/common-config): charset case compare" This reverts commit 3c1880f2fad53ad2cafddcee7741390fd46fa3d2. * fix: nga * fix: notateslaapp * fix: ps * fix: xjtu * fix: enforce error on restricted syntax for get calls * fix: eslint * fix: more eslint --- eslint.config.mjs | 2 +- lib/routes/2cycd/index.ts | 6 +- lib/routes/aamacau/index.ts | 6 +- lib/routes/acfun/video.ts | 2 +- lib/routes/ahjzu/news.ts | 6 +- lib/routes/aip/journal.ts | 56 +- lib/routes/aliyun/database-month.ts | 6 +- lib/routes/aliyun/developer/group.ts | 30 +- lib/routes/aliyun/notice.ts | 6 +- lib/routes/amazon/kindle-software-updates.ts | 14 +- lib/routes/anquanke/vul.ts | 2 +- lib/routes/baidu/tieba/post.ts | 66 +- lib/routes/bbcnewslabs/news.ts | 8 +- lib/routes/bjwxdxh/index.ts | 6 +- lib/routes/bjx/types.ts | 22 +- lib/routes/blogread/index.ts | 7 +- lib/routes/bloomberg/authors.ts | 22 +- lib/routes/bnu/bs.ts | 6 +- lib/routes/bnu/dwxgb.ts | 6 +- lib/routes/bookfere/category.ts | 26 +- lib/routes/bulianglin/rss.ts | 6 +- lib/routes/bupt/jwc.ts | 4 +- lib/routes/bupt/rczp.ts | 6 +- lib/routes/caareviews/utils.ts | 6 +- lib/routes/cas/cg/index.ts | 6 +- lib/routes/ccreports/index.ts | 6 +- lib/routes/cctv/jx.ts | 6 +- lib/routes/cctv/utils/xinwen1j1.ts | 2 +- lib/routes/cebbank/all.ts | 6 +- lib/routes/cebbank/history.ts | 6 +- lib/routes/changba/user.ts | 84 +- lib/routes/china/finance/finance.ts | 4 +- lib/routes/china/news/highlights/news.ts | 26 +- lib/routes/china/news/military/news.ts | 26 +- lib/routes/chinanews/index.ts | 4 +- lib/routes/chinaventure/index.ts | 8 +- lib/routes/ciidbnu/index.ts | 6 +- lib/routes/cna/index.ts | 2 +- lib/routes/cna/web/index.ts | 2 +- lib/routes/cncf/index.ts | 6 +- lib/routes/cncf/reports.ts | 6 +- lib/routes/cnki/debut.ts | 14 +- lib/routes/cnki/journals.ts | 24 +- lib/routes/colamanga/manga.ts | 6 +- lib/routes/cpcey/index.ts | 6 +- lib/routes/crac/index.ts | 6 +- lib/routes/cssn/iolaw.ts | 6 +- lib/routes/csu/cse.ts | 2 +- lib/routes/dapenti/utils.ts | 2 +- lib/routes/dayanzai/index.ts | 40 +- lib/routes/dbaplus/rss.ts | 7 +- lib/routes/ddosi/category.ts | 6 +- lib/routes/ddosi/index.ts | 6 +- lib/routes/disinfo/publications.ts | 6 +- lib/routes/dmzj/news.ts | 10 +- lib/routes/douban/commercialpress/latest.ts | 6 +- lib/routes/douban/other/celebrity.ts | 22 +- lib/routes/douban/other/doulist.ts | 32 +- lib/routes/douban/other/explore-column.ts | 12 +- lib/routes/douban/other/explore.ts | 50 +- lib/routes/douban/other/group.ts | 2 +- lib/routes/douban/other/jobs.ts | 12 +- lib/routes/douban/other/later.ts | 6 +- lib/routes/douban/other/latest-music.ts | 2 +- lib/routes/douban/other/playing.ts | 2 +- lib/routes/douban/other/replied.ts | 6 +- lib/routes/douban/other/replies.ts | 6 +- lib/routes/douban/people/wish.ts | 2 +- lib/routes/dtcj/datainsight.ts | 6 +- lib/routes/dx2025/index.ts | 6 +- lib/routes/eagle/blog.ts | 6 +- lib/routes/eagle/changelog.ts | 54 +- lib/routes/ecnu/jwc.ts | 6 +- lib/routes/ehentai/ehapi.ts | 2 +- lib/routes/elsevier/issue.ts | 6 +- lib/routes/elsevier/journal.ts | 6 +- lib/routes/finviz/quote.ts | 30 +- lib/routes/fisher-spb/news.ts | 6 +- lib/routes/fishshell/index.ts | 6 +- lib/routes/flyert/creditcard.ts | 2 +- lib/routes/flyert/preferential.ts | 6 +- lib/routes/ft/myft.ts | 8 +- lib/routes/furstar/artists.ts | 4 +- lib/routes/furstar/utils.ts | 28 +- lib/routes/fx-markets/channel.ts | 26 +- lib/routes/fx678/kx.ts | 4 +- lib/routes/fzmtr/announcements.ts | 6 +- lib/routes/gamer/gnn-index.ts | 6 +- lib/routes/gamer/hot.ts | 6 +- lib/routes/gihyo/group.ts | 36 +- lib/routes/google/citations.ts | 2 +- lib/routes/google/scholar.ts | 2 +- lib/routes/gov/chinatax/latest.ts | 6 +- lib/routes/gov/huizhou/zwgk/index.ts | 6 +- lib/routes/gov/hunan/changsha/major-email.ts | 6 +- lib/routes/gov/jiangsu/wlt/index.ts | 4 +- .../healthcommission/medical-exam-notice.ts | 34 +- lib/routes/gov/mee/ywdt.ts | 6 +- lib/routes/gov/miit/wjfb.ts | 12 +- lib/routes/gov/miit/yjzj.ts | 12 +- lib/routes/gov/miit/zcwj.ts | 2 +- lib/routes/gov/moa/moa.ts | 6 +- lib/routes/gov/moe/moe.ts | 72 +- lib/routes/gov/nrta/news.ts | 6 +- lib/routes/gov/pbc/goutongjiaoliu.ts | 6 +- lib/routes/gov/pbc/gzlw.ts | 6 +- lib/routes/gov/pbc/trade-announcement.ts | 6 +- lib/routes/gov/pbc/zcyj.ts | 6 +- lib/routes/gov/sh/rsj/ksxm.ts | 6 +- lib/routes/gov/sh/wgj/wgj.ts | 6 +- lib/routes/gov/sh/wsjkw/yqtb/index.ts | 32 +- lib/routes/gov/shenzhen/hrss/szksy/index.ts | 6 +- lib/routes/gov/shenzhen/zzb/index.ts | 6 +- lib/routes/gov/taiyuan/rsj.ts | 6 +- lib/routes/greasyfork/feedback.ts | 2 +- lib/routes/greasyfork/versions.ts | 2 +- lib/routes/guangdiu/cheaps.ts | 6 +- lib/routes/guangdiu/index.ts | 6 +- lib/routes/guangdiu/rank.ts | 6 +- lib/routes/guangdiu/search.ts | 6 +- lib/routes/guangzhoumetro/news.ts | 6 +- lib/routes/hackernews/index.ts | 6 +- lib/routes/hackyournews/index.ts | 10 +- lib/routes/hafu/utils.ts | 186 ++-- lib/routes/hbr/topic.ts | 6 +- lib/routes/hdu/cs/notice.ts | 25 +- lib/routes/hdu/cs/pg.ts | 25 +- lib/routes/hellobtc/information.ts | 6 +- lib/routes/hellobtc/kepu.ts | 6 +- lib/routes/hellobtc/news.ts | 6 +- lib/routes/hicairo/rss.ts | 6 +- lib/routes/hit/hitgs.ts | 6 +- lib/routes/hitwh/today.ts | 6 +- lib/routes/hkej/index.ts | 22 +- lib/routes/hkjunkcall/index.ts | 6 +- lib/routes/hotukdeals/index.ts | 4 +- lib/routes/howtoforge/rss.ts | 6 +- lib/routes/hpoi/banner-item.ts | 6 +- lib/routes/hpoi/info.ts | 6 +- lib/routes/hpoi/user.ts | 6 +- lib/routes/hpoi/utils.ts | 6 +- lib/routes/hrbeu/gx/card.ts | 6 +- lib/routes/hrbeu/gx/list.ts | 6 +- lib/routes/hrbeu/job/bigemploy.ts | 6 +- lib/routes/hrbeu/job/calendar.ts | 6 +- lib/routes/hrbeu/job/list.ts | 6 +- lib/routes/hrbeu/uae/news.ts | 6 +- lib/routes/hrbeu/yjsy/list.ts | 6 +- lib/routes/icac/news.ts | 6 +- lib/routes/ielts/index.ts | 2 +- lib/routes/informs/index.ts | 7 +- lib/routes/inoreader/index.ts | 36 +- lib/routes/ipsw.dev/index.ts | 6 +- lib/routes/ipsw/index.ts | 21 +- lib/routes/iqiyi/video.ts | 16 +- lib/routes/ithome/index.ts | 6 +- lib/routes/ithome/ranking.ts | 10 +- lib/routes/ithome/tag.ts | 6 +- lib/routes/ithome/tw/feeds.ts | 2 +- lib/routes/japanpost/track.ts | 96 +- lib/routes/jianshu/collection.ts | 2 +- lib/routes/jianshu/home.ts | 2 +- lib/routes/jianshu/user.ts | 2 +- lib/routes/kanxue/topic.ts | 6 +- lib/routes/kbs/news.ts | 6 +- lib/routes/kbs/today.ts | 6 +- lib/routes/kcna/news.ts | 10 +- lib/routes/kyodonews/index.ts | 16 +- lib/routes/lala/rss.ts | 6 +- lib/routes/learnblockchain/posts.ts | 26 +- lib/routes/learnku/topic.ts | 2 +- lib/routes/leetcode/articles.ts | 16 +- lib/routes/leiphone/index.ts | 2 +- lib/routes/linovelib/novel.ts | 8 +- lib/routes/liquipedia/cs-matches.ts | 42 +- lib/routes/literotica/category.ts | 6 +- lib/routes/literotica/new.ts | 6 +- lib/routes/lsnu/jiaowc/tzgg.ts | 2 +- lib/routes/lvv2/news.ts | 6 +- lib/routes/lvv2/top.ts | 6 +- lib/routes/manhuagui/subscribe.ts | 16 +- lib/routes/mdpi/journal.ts | 6 +- lib/routes/metacritic/release.ts | 2 +- lib/routes/modian/zhongchou.ts | 6 +- lib/routes/mpaypass/main.ts | 14 +- lib/routes/mpaypass/news.ts | 4 +- lib/routes/nasa/apod-ncku.ts | 6 +- lib/routes/nasa/apod.ts | 6 +- lib/routes/ncepu/master/masterinfo.ts | 6 +- lib/routes/neea/index.ts | 2 +- lib/routes/neu/bmie.ts | 2 +- lib/routes/newsmarket/index.ts | 6 +- lib/routes/nga/post.ts | 5 +- lib/routes/ngocn2/index.ts | 6 +- lib/routes/nifd/research.ts | 6 +- lib/routes/nintendo/system-update.ts | 6 +- lib/routes/njit/jwc.ts | 11 +- lib/routes/njit/tzgg.ts | 12 +- lib/routes/njnu/ceai/ceai.ts | 2 +- lib/routes/njnu/jwc/jwc.ts | 2 +- lib/routes/nju/gra.ts | 4 +- lib/routes/nju/scit.ts | 18 +- lib/routes/nju/zbb.ts | 42 +- lib/routes/njupt/jwc.ts | 12 +- lib/routes/njust/cwc.ts | 14 +- lib/routes/njust/dgxg.ts | 14 +- lib/routes/njust/eo.ts | 14 +- lib/routes/njust/eoe.ts | 14 +- lib/routes/njust/jwc.ts | 14 +- lib/routes/nltimes/news.ts | 10 +- lib/routes/notateslaapp/update.ts | 22 +- lib/routes/now/news.ts | 6 +- lib/routes/nowcoder/discuss.ts | 10 +- lib/routes/nowcoder/jobcenter.ts | 6 +- lib/routes/ntdtv/channel.ts | 4 +- lib/routes/nuaa/college/cae.ts | 12 +- lib/routes/nuaa/college/cs.ts | 12 +- lib/routes/nuaa/jwc/jwc.ts | 12 +- lib/routes/nuaa/yjsy/yjsy.ts | 12 +- lib/routes/nuist/bulletin.ts | 42 +- lib/routes/nwafu/all.ts | 6 +- lib/routes/nytimes/book.ts | 6 +- lib/routes/oilchem/index.ts | 6 +- lib/routes/oncc/index.ts | 6 +- lib/routes/oreno3d/main.ts | 82 +- lib/routes/p-articles/contributors.ts | 10 +- lib/routes/p-articles/section.ts | 10 +- lib/routes/patagonia/new-arrivals.ts | 23 +- lib/routes/penguin-random-house/articles.ts | 12 +- .../penguin-random-house/thereaddown.ts | 12 +- lib/routes/penguin-random-house/utils.ts | 2 +- lib/routes/people/xjpjh.ts | 10 +- lib/routes/pianyuan/app.ts | 2 +- lib/routes/pianyuan/search.ts | 4 +- lib/routes/pincong/hot.ts | 14 +- lib/routes/pincong/index.ts | 12 +- lib/routes/pincong/topic.ts | 12 +- lib/routes/piyao/jrpy.ts | 6 +- lib/routes/pku/bbs/hot.ts | 12 +- lib/routes/pku/cls/lecture.ts | 6 +- lib/routes/pku/hr.ts | 6 +- lib/routes/pku/nsd.ts | 6 +- lib/routes/pku/pkuyjs.ts | 22 +- lib/routes/pku/rccp/mzyt.ts | 6 +- lib/routes/pku/scc/recruit.ts | 6 +- lib/routes/playpcesor/rss.ts | 6 +- lib/routes/priconne-redive/news.ts | 2 +- lib/routes/ps/trophy.ts | 78 +- lib/routes/qidian/free-next.ts | 24 +- lib/routes/qidian/free.ts | 28 +- lib/routes/qipamaijia/index.ts | 6 +- lib/routes/qq88/index.ts | 6 +- lib/routes/qust/jw.ts | 6 +- lib/routes/reuters/investigates.ts | 6 +- lib/routes/ruc/ai.ts | 4 +- lib/routes/rustcc/jobs.ts | 2 +- lib/routes/rustcc/news.ts | 2 +- lib/routes/sdu/cmse.ts | 6 +- lib/routes/sdu/cs/index.ts | 8 +- lib/routes/sdu/epe.ts | 6 +- lib/routes/sdu/mech.ts | 7 +- lib/routes/sdu/sc.ts | 6 +- lib/routes/shmeea/self-study.ts | 2 +- lib/routes/shopback/store.ts | 6 +- lib/routes/sicau/dky.ts | 6 +- lib/routes/sicau/yan.ts | 6 +- lib/routes/sicau/zsjy.ts | 6 +- lib/routes/simpleinfo/index.ts | 6 +- lib/routes/sjtu/gs.ts | 6 +- lib/routes/snowpeak/us-new-arrivals.ts | 8 +- lib/routes/sobooks/utils.ts | 6 +- lib/routes/soundofhope/channel.ts | 6 +- lib/routes/springer/journal.ts | 10 +- lib/routes/sqmc/www.ts | 2 +- lib/routes/ssm/news.ts | 30 +- lib/routes/startuplatte/index.ts | 6 +- lib/routes/stdaily/digitalpaper.ts | 18 +- lib/routes/storm/index.ts | 6 +- lib/routes/storyfm/index.ts | 6 +- lib/routes/telecompaper/news.ts | 6 +- lib/routes/telecompaper/search.ts | 6 +- lib/routes/telegram/blog.ts | 2 +- lib/routes/telegram/channel.ts | 964 +++++++++--------- lib/routes/thecover/channel.ts | 14 +- lib/routes/thepaper/839studio/category.ts | 20 +- lib/routes/thepaper/839studio/studio.ts | 20 +- lib/routes/timednews/news.ts | 6 +- lib/routes/tingshuitz/changsha.ts | 6 +- lib/routes/tingshuitz/dongguan.ts | 22 +- lib/routes/tingshuitz/hangzhou.ts | 22 +- lib/routes/tingshuitz/nanjing.ts | 28 +- lib/routes/tingshuitz/xian.ts | 20 +- lib/routes/tingshuitz/xiaoshan.ts | 22 +- lib/routes/tingshuitz/yangjiang.ts | 22 +- lib/routes/tisi/index.ts | 6 +- lib/routes/tju/cic/index.ts | 6 +- lib/routes/tju/news/index.ts | 2 +- lib/routes/tju/oaa/index.ts | 6 +- lib/routes/tju/yzb/index.ts | 6 +- lib/routes/tribalfootball/latest.ts | 6 +- lib/routes/trow/portal.ts | 26 +- lib/routes/txrjy/fornumtopic.ts | 10 +- lib/routes/ucas/index.ts | 2 +- lib/routes/udn/breaking-news.ts | 2 +- lib/routes/uestc/auto.ts | 6 +- lib/routes/uestc/cqe.ts | 6 +- lib/routes/uestc/news.ts | 6 +- lib/routes/uestc/scse.ts | 6 +- lib/routes/uestc/sice.ts | 6 +- lib/routes/uestc/sise.ts | 6 +- lib/routes/ulapia/index.ts | 8 +- lib/routes/ulapia/research.ts | 6 +- lib/routes/ustb/yjsy/news.ts | 84 +- lib/routes/ustc/index.ts | 8 +- lib/routes/ustc/jwc.ts | 10 +- lib/routes/usts/jwch.ts | 6 +- lib/routes/uw/gix/news.ts | 6 +- lib/routes/verfghbw/press.ts | 6 +- lib/routes/vimeo/channel.ts | 34 +- lib/routes/wallhaven/index.ts | 6 +- lib/routes/wechat/data258.ts | 8 +- lib/routes/wechat/msgalbum.ts | 2 +- lib/routes/wechat/tgchannel.ts | 228 ++--- lib/routes/wenku8/index.ts | 6 +- lib/routes/wfu/jwc.ts | 38 +- lib/routes/wfu/news.ts | 38 +- lib/routes/who/news-room.ts | 18 +- lib/routes/whu/gs/index.ts | 4 +- lib/routes/wizfile/index.ts | 6 +- lib/routes/wsyu/news.ts | 12 +- lib/routes/wzu/news.ts | 28 +- lib/routes/xaut/index.ts | 8 +- lib/routes/xaut/jwc.ts | 6 +- lib/routes/xaut/rsc.ts | 6 +- lib/routes/xjtu/dean.ts | 10 +- lib/routes/xjtu/ee.ts | 6 +- lib/routes/xjtu/gs/tzgg.ts | 6 +- lib/routes/xmanhua/index.ts | 28 +- lib/routes/xmut/jwc/bkjw.ts | 6 +- lib/routes/ygkkk/rss.ts | 6 +- lib/routes/ymgal/game.ts | 2 +- lib/routes/yomujp/level.ts | 4 +- lib/routes/youku/channel.ts | 50 +- lib/routes/yxdown/news.ts | 6 +- lib/routes/yxdown/recommend.ts | 6 +- lib/routes/yxdzqb/index.ts | 36 +- lib/routes/yyets/today.ts | 20 +- lib/routes/zagg/new-arrivals.ts | 14 +- lib/routes/zcmu/jwc/index.ts | 6 +- lib/routes/zcmu/yxy/index.ts | 6 +- lib/routes/zhihu/weekly.ts | 14 +- lib/routes/zhujiceping/rss.ts | 6 +- lib/routes/zju/career/index.ts | 24 +- lib/routes/zju/cst/custom.ts | 27 +- lib/routes/zju/cst/index.ts | 21 +- lib/routes/zju/grs/index.ts | 22 +- lib/routes/zju/list.ts | 12 +- lib/routes/zju/physics/index.ts | 6 +- lib/routes/zjut/da/index.ts | 6 +- lib/routes/zjut/news.ts | 6 +- lib/routes/zotero/versions.ts | 30 +- lib/routes/zrblog/rss.ts | 6 +- lib/utils/common-config.ts | 22 +- 363 files changed, 2628 insertions(+), 2900 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index e1fa7616bcde..b666a661feaf 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -95,7 +95,7 @@ unicorn.configs.recommended, 'no-new-func': 'error', 'no-restricted-imports': 'error', - 'no-restricted-syntax': ['warn', { + 'no-restricted-syntax': ['error', { selector: "CallExpression[callee.property.name='get'][arguments.length=0]", message: "Please use .toArray() instead.", }, { diff --git a/lib/routes/2cycd/index.ts b/lib/routes/2cycd/index.ts index 4cb76df1be92..39538da529f8 100644 --- a/lib/routes/2cycd/index.ts +++ b/lib/routes/2cycd/index.ts @@ -29,7 +29,8 @@ async function handler(ctx) { const $ = load(iconv.decode(response.data, 'gbk')); const list = $('tbody[id^="normalthread_"]') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const xst = item.find('a.s.xst'); const author = item.find('td.by cite a').eq(0).text(); @@ -38,8 +39,7 @@ async function handler(ctx) { link: xst.attr('href'), author, }; - }) - .get(); + }); // console.log(list); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/aamacau/index.ts b/lib/routes/aamacau/index.ts index 23f8821d902d..e60135de14ab 100644 --- a/lib/routes/aamacau/index.ts +++ b/lib/routes/aamacau/index.ts @@ -54,15 +54,15 @@ async function handler(ctx) { const $ = load(response.data); const list = $('post-title a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/acfun/video.ts b/lib/routes/acfun/video.ts index 51dbbd57e9f5..ab4d80c98680 100644 --- a/lib/routes/acfun/video.ts +++ b/lib/routes/acfun/video.ts @@ -36,7 +36,7 @@ async function handler(ctx) { const $ = load(data); const title = $('title').text(); const description = $('.signature .complete').text(); - const list = $('#ac-space-video-list a').get(); + const list = $('#ac-space-video-list a').toArray(); const image = $('head style') .text() .match(/.user-photo{\n\s*background:url\((.*)\) 0% 0% \/ 100% no-repeat;/)[1]; diff --git a/lib/routes/ahjzu/news.ts b/lib/routes/ahjzu/news.ts index c213902356c9..6a82f99b8873 100644 --- a/lib/routes/ahjzu/news.ts +++ b/lib/routes/ahjzu/news.ts @@ -42,7 +42,8 @@ async function handler() { const list = $('#wp_news_w9') .find('li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const date = item.find('.column-news-date').text(); @@ -54,8 +55,7 @@ async function handler() { link, pubDate: timezone(parseDate(date), +8), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/aip/journal.ts b/lib/routes/aip/journal.ts index 688ebc7253fb..4a721ec7c3f9 100644 --- a/lib/routes/aip/journal.ts +++ b/lib/routes/aip/journal.ts @@ -44,36 +44,32 @@ async function handler(ctx) { .match(/(?:[^=]*=)?\s*([^>]+)\s*/)[1]; const publication = $('.al-article-item-wrap.al-normal'); - const list = publication - .map((_, item) => { - const title = $(item).find('.item-title a:first').text(); - const link = $(item).find('.item-title a:first').attr('href'); - const doilink = $(item).find('.citation-label a').attr('href'); - const doi = doilink && doilink.match(/10\.\d+\/\S+/)[0]; - const id = $(item).find('h5[data-resource-id-access]').data('resource-id-access'); - const authors = $(item) - .find('.al-authors-list') - .find('a') - .map(function () { - return $(this).text(); - }) - .get() - .join('; '); - const imgUrl = $(item).find('.issue-featured-image a img').attr('src'); - const img = imgUrl ? imgUrl.replace(/\?.+$/, '') : ''; - const description = renderDesc(title, authors, doi, img); - return { - title, - link, - doilink, - id, - authors, - img, - doi, - description, - }; - }) - .get(); + const list = publication.toArray().map((item) => { + const title = $(item).find('.item-title a:first').text(); + const link = $(item).find('.item-title a:first').attr('href'); + const doilink = $(item).find('.citation-label a').attr('href'); + const doi = doilink && doilink.match(/10\.\d+\/\S+/)[0]; + const id = $(item).find('h5[data-resource-id-access]').data('resource-id-access'); + const authors = $(item) + .find('.al-authors-list') + .find('a') + .toArray() + .map((element) => $(element).text()) + .join('; '); + const imgUrl = $(item).find('.issue-featured-image a img').attr('src'); + const img = imgUrl ? imgUrl.replace(/\?.+$/, '') : ''; + const description = renderDesc(title, authors, doi, img); + return { + title, + link, + doilink, + id, + authors, + img, + doi, + description, + }; + }); return { title: jrnlName, diff --git a/lib/routes/aliyun/database-month.ts b/lib/routes/aliyun/database-month.ts index 735b5446b481..efcb7a67cca3 100644 --- a/lib/routes/aliyun/database-month.ts +++ b/lib/routes/aliyun/database-month.ts @@ -33,7 +33,8 @@ async function handler() { const $ = load(response.data); const list = $("ul[class='posts'] > li") - .map((i, e) => { + .toArray() + .map((e) => { const element = $(e); const title = element.find('a').text().trim(); const link = `http://mysql.taobao.org${element.find('a').attr('href').trim()}/`; @@ -42,8 +43,7 @@ async function handler() { description: '', link, }; - }) - .get(); + }); const result = await Promise.all( list.map((item) => { diff --git a/lib/routes/aliyun/developer/group.ts b/lib/routes/aliyun/developer/group.ts index 23d86f52dbf1..b2f17717778c 100644 --- a/lib/routes/aliyun/developer/group.ts +++ b/lib/routes/aliyun/developer/group.ts @@ -42,9 +42,7 @@ async function handler(ctx) { const $ = load(data); const title = $('div[class="header-information-title"]') .contents() - .filter(function () { - return this.nodeType === 3; - }) + .filter((element) => element.nodeType === 3) .text() .trim(); const desc = $('div[class="header-information"]').find('span').last().text().trim(); @@ -54,20 +52,16 @@ async function handler(ctx) { title: `阿里云开发者社区-${title}`, link, description: desc, - item: - list && - list - .map((index, item) => { - item = $(item); - const desc = item.find('.question-desc'); - const description = item.find('.browse').text() + ' ' + desc.find('.answer').text(); - return { - title: item.find('.question-title').text().trim() || item.find('a p').text().trim(), - link: item.find('a').attr('href'), - pubDate: parseDate(item.find('.time').text()), - description, - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + const desc = item.find('.question-desc'); + const description = item.find('.browse').text() + ' ' + desc.find('.answer').text(); + return { + title: item.find('.question-title').text().trim() || item.find('a p').text().trim(), + link: item.find('a').attr('href'), + pubDate: parseDate(item.find('.time').text()), + description, + }; + }), }; } diff --git a/lib/routes/aliyun/notice.ts b/lib/routes/aliyun/notice.ts index a7f62130a569..7dc3be6a5717 100644 --- a/lib/routes/aliyun/notice.ts +++ b/lib/routes/aliyun/notice.ts @@ -48,7 +48,8 @@ async function handler(ctx) { const response = await got({ method: 'get', url }); const $ = load(response.data); const list = $('ul > li.notice-li') - .map((i, e) => { + .toArray() + .map((e) => { const element = $(e); const title = element.find('a').text().trim(); const link = 'https://help.aliyun.com' + element.find('a').attr('href').trim(); @@ -60,8 +61,7 @@ async function handler(ctx) { link, pubDate, }; - }) - .get(); + }); const result = await Promise.all( list.map((item) => diff --git a/lib/routes/amazon/kindle-software-updates.ts b/lib/routes/amazon/kindle-software-updates.ts index 652966f14012..a7708341550a 100644 --- a/lib/routes/amazon/kindle-software-updates.ts +++ b/lib/routes/amazon/kindle-software-updates.ts @@ -37,19 +37,19 @@ async function handler() { const $ = load(data); const list = $('.a-row.cs-help-landing-section.help-display-cond') - .map(function () { + .toArray() + .map((item) => { const data = {}; - data.title = $(this).find('.sectiontitle').text(); - data.link = $(this).find('a').eq(0).attr('href'); - data.version = $(this).find('li').first().text(); + data.title = $(item).find('.sectiontitle').text(); + data.link = $(item).find('a').eq(0).attr('href'); + data.version = $(item).find('li').first().text(); data.website = `${url}?nodeId=${nodeIdValue}`; - data.description = $(this) + data.description = $(item) .find('.a-column.a-span8') .html() .replaceAll(/[\t\n]/g, ''); return data; - }) - .get(); + }); return { title: 'Kindle E-Reader Software Updates', link: `${url}?nodeId=${nodeIdValue}`, diff --git a/lib/routes/anquanke/vul.ts b/lib/routes/anquanke/vul.ts index 0ccc46618440..e8eea8f71735 100644 --- a/lib/routes/anquanke/vul.ts +++ b/lib/routes/anquanke/vul.ts @@ -7,7 +7,7 @@ const handler = async () => { const response = await got(`${url}/vul`); const $ = load(response.data); - const list = $('table>tbody>tr').get(); + const list = $('table>tbody>tr').toArray(); const items = list.map((i) => { const item = $(i); diff --git a/lib/routes/baidu/tieba/post.ts b/lib/routes/baidu/tieba/post.ts index 3007720accdb..d5e9cd067d71 100644 --- a/lib/routes/baidu/tieba/post.ts +++ b/lib/routes/baidu/tieba/post.ts @@ -66,40 +66,36 @@ async function handler(ctx) { title: lz ? `【只看楼主】${title}` : title, link: `https://tieba.baidu.com/p/${id}?see_lz=${lz}`, description: `${title}的最新回复`, - item: - list && - list - .map((_, element) => { - const item = $(element); - const { author, content } = item.data('field'); - const tempList = item - .find('.post-tail-wrap > .tail-info') - .toArray() - .map((element) => $(element).text()); - let [pubContent, from, num, time] = ['', '', '', '']; - if (0 === tempList.length && 'date' in content) { - num = `${content.post_no}楼`; - time = content.date; - pubContent = item.find('.j_d_post_content').html(); - } else if (2 === tempList.length) { - [num, time] = tempList; - pubContent = content.content; - } else if (3 === tempList.length) { - [from, num, time] = tempList; - pubContent = content.content; - } - return { - title: `${author.user_name}回复了帖子《${title}》`, - description: art(path.join(__dirname, '../templates/post.art'), { - pubContent, - author: author.user_name, - num, - from, - }), - pubDate: timezone(parseDate(time, 'YYYY-MM-DD hh:mm'), +8), - link: `https://tieba.baidu.com/p/${id}?pid=${content.post_id}#${content.post_id}`, - }; - }) - .get(), + item: list.toArray().map((element) => { + const item = $(element); + const { author, content } = item.data('field'); + const tempList = item + .find('.post-tail-wrap > .tail-info') + .toArray() + .map((element) => $(element).text()); + let [pubContent, from, num, time] = ['', '', '', '']; + if (0 === tempList.length && 'date' in content) { + num = `${content.post_no}楼`; + time = content.date; + pubContent = item.find('.j_d_post_content').html(); + } else if (2 === tempList.length) { + [num, time] = tempList; + pubContent = content.content; + } else if (3 === tempList.length) { + [from, num, time] = tempList; + pubContent = content.content; + } + return { + title: `${author.user_name}回复了帖子《${title}》`, + description: art(path.join(__dirname, '../templates/post.art'), { + pubContent, + author: author.user_name, + num, + from, + }), + pubDate: timezone(parseDate(time, 'YYYY-MM-DD hh:mm'), +8), + link: `https://tieba.baidu.com/p/${id}?pid=${content.post_id}#${content.post_id}`, + }; + }), }; } diff --git a/lib/routes/bbcnewslabs/news.ts b/lib/routes/bbcnewslabs/news.ts index cc300de2ab10..894ea0e9318a 100644 --- a/lib/routes/bbcnewslabs/news.ts +++ b/lib/routes/bbcnewslabs/news.ts @@ -36,8 +36,9 @@ async function handler() { const $ = load(response.data); - const items = [...$('a[href^="/news/20"]')] - .map((_, item) => { + const items = $('a[href^="/news/20"]') + .toArray() + .map((item) => { item = $(item); return { title: item.find('h3[class^="thumbnail-module--thumbnailTitle--"]').text(), @@ -45,8 +46,7 @@ async function handler() { pubDate: parseDate(item.find('span[class^="thumbnail-module--thumbnailType--"]').text()), link: rootUrl + item.attr('href'), }; - }) - .get(); + }); return { title: 'News - BBC News Labs', diff --git a/lib/routes/bjwxdxh/index.ts b/lib/routes/bjwxdxh/index.ts index c1c27c1989bf..e01223dc4dd7 100644 --- a/lib/routes/bjwxdxh/index.ts +++ b/lib/routes/bjwxdxh/index.ts @@ -38,15 +38,15 @@ async function handler(ctx) { const $ = load(response.data); const list = $('div#newsquery > ul > li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.find('div.title > a').text(), link: new URL(item.find('div.title > a').attr('href'), baseUrl).href, // pubDate: parseDate(item.find('div.time').text(), 'YYYY-MM-DD'), }; - }) - .get(); + }); await Promise.all( list.map((item) => diff --git a/lib/routes/bjx/types.ts b/lib/routes/bjx/types.ts index e7e36a6016ae..19e062ae4f4b 100644 --- a/lib/routes/bjx/types.ts +++ b/lib/routes/bjx/types.ts @@ -40,18 +40,14 @@ async function handler(ctx) { title: `北极星太阳能光大网${typeName}`, description: $('meta[name="Description"]').attr('content'), link: `https://guangfu.bjx.com.cn/${type}/`, - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('a').attr('title'), - description: item.html(), - link: item.find('a').attr('href'), - pubDate: parseDate(item.find('span').text()), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('a').attr('title'), + description: item.html(), + link: item.find('a').attr('href'), + pubDate: parseDate(item.find('span').text()), + }; + }), }; } diff --git a/lib/routes/blogread/index.ts b/lib/routes/blogread/index.ts index bef75385ca37..e9591a61c03c 100644 --- a/lib/routes/blogread/index.ts +++ b/lib/routes/blogread/index.ts @@ -24,7 +24,8 @@ async function handler() { }); const $ = cheerio.load(response.data); const resultItem = $('.media') - .map((index, elem) => { + .toArray() + .map((elem) => { elem = $(elem); const $link = elem.find('dt a'); return { @@ -34,9 +35,7 @@ async function handler() { author: elem.find('.small a').eq(0).text(), pubDate: elem.find('dd').eq(1).text().split('\n')[2], }; - }) - .get(); - + }); return { title: '技术头条', link: url, diff --git a/lib/routes/bloomberg/authors.ts b/lib/routes/bloomberg/authors.ts index 8678b6f7b57a..f2901772c72e 100644 --- a/lib/routes/bloomberg/authors.ts +++ b/lib/routes/bloomberg/authors.ts @@ -15,18 +15,16 @@ const parseAuthorNewsList = async (slug) => { } const $ = load(resp.html); const articles = $('article.story-list-story'); - return articles - .map((index, item) => { - item = $(item); - const headline = item.find('a.story-list-story__info__headline-link'); - return { - title: headline.text(), - pubDate: item.attr('data-updated-at'), - guid: `bloomberg:${item.attr('data-id')}`, - link: new URL(headline.attr('href'), baseURL).href, - }; - }) - .get(); + return articles.toArray().map((item) => { + item = $(item); + const headline = item.find('a.story-list-story__info__headline-link'); + return { + title: headline.text(), + pubDate: item.attr('data-updated-at'), + guid: `bloomberg:${item.attr('data-id')}`, + link: new URL(headline.attr('href'), baseURL).href, + }; + }); }; export const route: Route = { diff --git a/lib/routes/bnu/bs.ts b/lib/routes/bnu/bs.ts index fa2bcdc9e858..0728c7980cd7 100644 --- a/lib/routes/bnu/bs.ts +++ b/lib/routes/bnu/bs.ts @@ -45,7 +45,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('a[title]') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { @@ -53,8 +54,7 @@ async function handler(ctx) { pubDate: parseDate(item.prev().text()), link: `${rootUrl}/${category}/${item.attr('href')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/bnu/dwxgb.ts b/lib/routes/bnu/dwxgb.ts index cbe7b9efd0e3..aee206c81842 100644 --- a/lib/routes/bnu/dwxgb.ts +++ b/lib/routes/bnu/dwxgb.ts @@ -48,7 +48,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('ul.container.list > li') - .map((_, item) => { + .toArray() + .map((item) => { const link = $(item).find('a').attr('href'); const absoluteLink = new URL(link, currentUrl).href; return { @@ -56,8 +57,7 @@ async function handler(ctx) { pubDate: parseDate($(item).find('span').text()), link: absoluteLink, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/bookfere/category.ts b/lib/routes/bookfere/category.ts index db31ffbe7b08..09243b3dc6c9 100644 --- a/lib/routes/bookfere/category.ts +++ b/lib/routes/bookfere/category.ts @@ -51,20 +51,16 @@ async function handler(ctx) { return { title: $('head title').text(), link: url, - item: - list && - list - .map((index, item) => { - item = $(item); - const date = item.find('time').attr('datetime'); - const pubDate = parseDate(date); - return { - title: item.find('h2 a').text(), - link: item.find('h2 a').attr('href'), - pubDate, - description: item.find('p').text(), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + const date = item.find('time').attr('datetime'); + const pubDate = parseDate(date); + return { + title: item.find('h2 a').text(), + link: item.find('h2 a').attr('href'), + pubDate, + description: item.find('p').text(), + }; + }), }; } diff --git a/lib/routes/bulianglin/rss.ts b/lib/routes/bulianglin/rss.ts index 6d90ef42de07..a69cef1fc132 100644 --- a/lib/routes/bulianglin/rss.ts +++ b/lib/routes/bulianglin/rss.ts @@ -24,7 +24,8 @@ async function handler() { const $ = load(response.data); const list = $('div.single-post') - .map((i, e) => { + .toArray() + .map((e) => { const element = $(e); const title = element.find('h2 > a').text(); const link = element.find('h2 > a').attr('href'); @@ -37,8 +38,7 @@ async function handler() { link, pubDate: parseDate(dateraw, 'YYYY 年 MM 月 DD 日'), }; - }) - .get(); + }); return { title: '不良林', diff --git a/lib/routes/bupt/jwc.ts b/lib/routes/bupt/jwc.ts index b05d15aa8708..db112b71bbc2 100644 --- a/lib/routes/bupt/jwc.ts +++ b/lib/routes/bupt/jwc.ts @@ -68,7 +68,8 @@ async function handler(ctx: Context) { const $ = load(response.data); const list = $('.txt-elise') - .map((_, item) => { + .toArray() + .map((item) => { const $item = $(item); const $link = $item.find('a'); // Skip elements without links or with empty href @@ -80,7 +81,6 @@ async function handler(ctx: Context) { link: rootUrl + '/' + $link.attr('href'), }; }) - .get() .filter(Boolean); const items = await Promise.all( diff --git a/lib/routes/bupt/rczp.ts b/lib/routes/bupt/rczp.ts index e43f008e90ab..bbe4458a57cf 100644 --- a/lib/routes/bupt/rczp.ts +++ b/lib/routes/bupt/rczp.ts @@ -41,15 +41,15 @@ async function handler() { const $ = load(response.data); const list = $('.date-block') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.next().text(), link: `${rootUrl}/${item.next().attr('href')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/caareviews/utils.ts b/lib/routes/caareviews/utils.ts index 13f263dbb146..918fd88f47f4 100644 --- a/lib/routes/caareviews/utils.ts +++ b/lib/routes/caareviews/utils.ts @@ -11,12 +11,12 @@ const getList = async (url) => { const response = await got(url); const $ = load(response.data); const list = $('#infinite-content > div') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('div.title').text().trim(), link: new URL($(item).find('div.title > em > a').attr('href'), rootUrl).href, author: $(item).find('div.contributors').text().trim(), - })) - .get(); + })); return list; }; diff --git a/lib/routes/cas/cg/index.ts b/lib/routes/cas/cg/index.ts index df765efc1d17..714d637bd9d9 100644 --- a/lib/routes/cas/cg/index.ts +++ b/lib/routes/cas/cg/index.ts @@ -45,15 +45,15 @@ async function handler(ctx) { const list = $('#content li') .not('.gl_line') .slice(0, 15) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('a'); return { title: a.text(), link: `${rootUrl}/cg/${caty}${a.attr('href').replace('.', '')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/ccreports/index.ts b/lib/routes/ccreports/index.ts index 3b79c2323a23..76c4914e0dca 100644 --- a/lib/routes/ccreports/index.ts +++ b/lib/routes/ccreports/index.ts @@ -36,15 +36,15 @@ async function handler() { const $ = load(listData.data); const list = $('div.index-four-content > div.article-box') .find('div.new-child') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('p.new-title').text(), link: new URL($(item).find('a').attr('href'), rootUrl).href, author: $(item) .find('p.new-desc') .text() .match(/作者:(.*?)\s/)[1], - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/cctv/jx.ts b/lib/routes/cctv/jx.ts index dc380685320a..bc15e61dc232 100644 --- a/lib/routes/cctv/jx.ts +++ b/lib/routes/cctv/jx.ts @@ -40,14 +40,14 @@ async function handler(ctx) { const list = $('.textr a') .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/cctv/utils/xinwen1j1.ts b/lib/routes/cctv/utils/xinwen1j1.ts index e68a40afa5c4..57a1edf3f5fe 100644 --- a/lib/routes/cctv/utils/xinwen1j1.ts +++ b/lib/routes/cctv/utils/xinwen1j1.ts @@ -9,7 +9,7 @@ import { parseDate } from '@/utils/parse-date'; async function loadContent(link) { const res = await got({ method: 'get', url: link }); const $ = load(res.data); - // console.log($('div.image').get().text()) + // console.log($('div.image').toArray().text()) // console.log('********') const js_txt = '' + $('script'); diff --git a/lib/routes/cebbank/all.ts b/lib/routes/cebbank/all.ts index 8334ebb6c74c..6d9764174248 100644 --- a/lib/routes/cebbank/all.ts +++ b/lib/routes/cebbank/all.ts @@ -42,7 +42,8 @@ async function handler(ctx) { const $ = load(content.data); const items = $('.lczj_box tbody tr') - .map((i, e) => { + .toArray() + .map((e, i) => { if (i < 2) { return null; } @@ -58,8 +59,7 @@ async function handler(ctx) { pubDate: timezone(parseDate($('#t_id span').text().slice(5), 'YYYY-MM-DD HH:mm', true), 8), guid: md5(c('td:nth-child(1)').text() + $('#t_id span').text().slice(5)), }; - }) - .get(); + }); const ret = { title: '中国光大银行', diff --git a/lib/routes/cebbank/history.ts b/lib/routes/cebbank/history.ts index 4f85036628a0..cc68ca0816af 100644 --- a/lib/routes/cebbank/history.ts +++ b/lib/routes/cebbank/history.ts @@ -45,7 +45,8 @@ async function handler(ctx) { const $ = load(res.data); const items = $('.lczj_box tbody tr') - .map((i, e) => { + .toArray() + .map((e, i) => { if (i < 2) { return null; } @@ -60,8 +61,7 @@ async function handler(ctx) { time: c('td:nth-child(6)').text(), }), }; - }) - .get(); + }); items.pop(); const ret = { diff --git a/lib/routes/changba/user.ts b/lib/routes/changba/user.ts index 3d95aae68605..134422ada86f 100644 --- a/lib/routes/changba/user.ts +++ b/lib/routes/changba/user.ts @@ -41,59 +41,55 @@ async function handler(ctx) { }); const data = response.data; const $ = load(data); - const list = $('.user-work .work-info').get(); + const list = $('.user-work .work-info').toArray(); const author = $('div.user-main-info > span.txt-info > a.uname').text(); const authorimg = $('div.user-main-info > .poster > img').attr('data-src'); let items = await Promise.all( - list.map(async (item) => { + list.map((item) => { const $ = load(item); const link = $('a').attr('href'); - const songid = await cache.tryGet( - link, - async () => { - const result = await got({ - method: 'get', - url: link, - headers, - }); + return cache.tryGet(link, async () => { + const result = await got({ + method: 'get', + url: link, + headers, + }); - const re = /workid: '\d+'/; - let workid; - try { - workid = result.data.match(re)[0]; - } catch { - // 没有找到该作品 - // 这可能是由下列原因造成的: - // 该作品已经被原作者删除了 - // 该作品包含了视频,目前正在审核中,在审核没有通过前无法被播放 - // 目前服务器压力太大,刚刚上传成功的作品可能需要半个小时后才能被播放 - return null; - } + const re = /workid: '\d+'/; + let workid; + try { + workid = result.data.match(re)[0]; + } catch { + // 没有找到该作品 + // 这可能是由下列原因造成的: + // 该作品已经被原作者删除了 + // 该作品包含了视频,目前正在审核中,在审核没有通过前无法被播放 + // 目前服务器压力太大,刚刚上传成功的作品可能需要半个小时后才能被播放 + return null; + } - workid = workid.split("'")[1]; - return workid; - }, - 60 * 60 * 24 - ); - if (!songid) { - return null; - } - const mp3 = `https://upscuw.changba.com/${songid}.mp3`; - const description = art(path.join(__dirname, 'templates/work_description.art'), { - desc: $('div.des').text(), - mp3url: mp3, + workid = workid.split("'")[1]; + + if (!workid) { + return null; + } + const mp3 = `https://upscuw.changba.com/${workid}.mp3`; + const description = art(path.join(__dirname, 'templates/work_description.art'), { + desc: $('div.des').text(), + mp3url: mp3, + }); + const itunes_item_image = $('div.work-cover').attr('style').replace(')', '').split('url(')[1]; + return { + title: $('.work-title').text(), + description, + link, + author, + itunes_item_image, + enclosure_url: mp3, + enclosure_type: 'audio/mpeg', + }; }); - const itunes_item_image = $('div.work-cover').attr('style').replace(')', '').split('url(')[1]; - return { - title: $('.work-title').text(), - description, - link, - author, - itunes_item_image, - enclosure_url: mp3, - enclosure_type: 'audio/mpeg', - }; }) ); diff --git a/lib/routes/china/finance/finance.ts b/lib/routes/china/finance/finance.ts index 29e683502a09..f32547a99e7f 100644 --- a/lib/routes/china/finance/finance.ts +++ b/lib/routes/china/finance/finance.ts @@ -57,13 +57,13 @@ async function handler(ctx) { const listCategory = `中华网-财经-${categoryTitle}新闻`; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; const detailsUrls = $('.item-con-inner') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { link: item.find('.tit>a').attr('href'), }; }) - .get() .filter((item) => item.link !== void 0) .slice(0, limit); diff --git a/lib/routes/china/news/highlights/news.ts b/lib/routes/china/news/highlights/news.ts index cda5def54276..a04233028160 100644 --- a/lib/routes/china/news/highlights/news.ts +++ b/lib/routes/china/news/highlights/news.ts @@ -50,20 +50,16 @@ async function handler(ctx) { return { title: `中华网-${categoryTitle}新闻`, link: websiteUrl, - item: - news && - news - .map((_, item) => { - item = $(item); - return { - title: item.find('.item_title a').text(), - author: item.find('.item_source').text(), - category: `${categoryTitle}新闻`, - pubDate: parseDate(item.find('.item_time').text()), - description: item.find('.item_title a').text(), - link: item.find('li a').attr('href'), - }; - }) - .get(), + item: news.toArray().map((item) => { + item = $(item); + return { + title: item.find('.item_title a').text(), + author: item.find('.item_source').text(), + category: `${categoryTitle}新闻`, + pubDate: parseDate(item.find('.item_time').text()), + description: item.find('.item_title a').text(), + link: item.find('li a').attr('href'), + }; + }), }; } diff --git a/lib/routes/china/news/military/news.ts b/lib/routes/china/news/military/news.ts index eb0bd75e3605..a088ad43c295 100644 --- a/lib/routes/china/news/military/news.ts +++ b/lib/routes/china/news/military/news.ts @@ -36,20 +36,16 @@ async function handler() { return { title: '中华网-军事新闻', link: 'https://military.china.com/news/', - item: - commonList && - commonList - .map((_, item) => { - item = $(item); - return { - title: item.find('h3.item_title').text(), - author: '中华网军事', - category: '中华网军事', - pubDate: parseDate(item.find('em.item_time').text()), - description: item.find('.item_source').text(), - link: item.find('h3.item_title a').attr('href'), - }; - }) - .get(), + item: commonList.toArray().map((item) => { + item = $(item); + return { + title: item.find('h3.item_title').text(), + author: '中华网军事', + category: '中华网军事', + pubDate: parseDate(item.find('em.item_time').text()), + description: item.find('.item_source').text(), + link: item.find('h3.item_title a').attr('href'), + }; + }), }; } diff --git a/lib/routes/chinanews/index.ts b/lib/routes/chinanews/index.ts index 3a66077f252f..762247fb878f 100644 --- a/lib/routes/chinanews/index.ts +++ b/lib/routes/chinanews/index.ts @@ -29,11 +29,11 @@ async function handler(ctx) { }); const $ = load(response.data); const list = $('a', '.dd_bt') - .map((_, item) => ({ + .toArray() + .map((item) => ({ link: rootUrl + $(item).attr('href'), title: $(item).text(), })) - .get() .slice(0, ctx.req.query('limit') ? Math.min(Number.parseInt(ctx.req.query('limit')), 125) : 50); const items = await Promise.all( diff --git a/lib/routes/chinaventure/index.ts b/lib/routes/chinaventure/index.ts index 5503dd54aeca..146de6e66d01 100644 --- a/lib/routes/chinaventure/index.ts +++ b/lib/routes/chinaventure/index.ts @@ -57,13 +57,11 @@ async function handler(ctx) { }); const $ = load(response.data); const list = $('a', '.common_newslist_pc') - .filter(function () { - return $(this).attr('href'); - }) - .map((_, item) => ({ + .filter((element) => $(element).attr('href')) + .toArray() + .map((item) => ({ link: rootUrl + $(item).attr('href'), })) - .get() .slice(0, ctx.req.query('limit') ? Math.min(Number.parseInt(ctx.req.query('limit')), 20) : 20); const items = await Promise.all( diff --git a/lib/routes/ciidbnu/index.ts b/lib/routes/ciidbnu/index.ts index 9093f42fb1bd..c4e44fa19503 100644 --- a/lib/routes/ciidbnu/index.ts +++ b/lib/routes/ciidbnu/index.ts @@ -41,14 +41,14 @@ async function handler(ctx) { const list = $('#newsrightlist a') .slice(0, 10) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: `${rootUrl}${item.attr('href').replace('..', '')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/cna/index.ts b/lib/routes/cna/index.ts index d5e219a9eca8..b4647bbc86f1 100644 --- a/lib/routes/cna/index.ts +++ b/lib/routes/cna/index.ts @@ -67,7 +67,7 @@ async function handler(ctx) { item.description = (topImage === null ? '' : topImage) + content('.paragraph').eq(0).html(); item.category = [ ...content("meta[property='article:tag']") - .get() + .toArray() .map((e) => e.attribs.content), content('.active > a').text(), ]; diff --git a/lib/routes/cna/web/index.ts b/lib/routes/cna/web/index.ts index f42d8f261523..764494f88a69 100644 --- a/lib/routes/cna/web/index.ts +++ b/lib/routes/cna/web/index.ts @@ -58,7 +58,7 @@ async function handler(ctx) { item.description = (topImage === null ? '' : topImage) + content('.paragraph').eq(0).html(); item.category = [ ...content("meta[property='article:tag']") - .get() + .toArray() .map((e) => e.attribs.content), content('.active > a').text(), ]; diff --git a/lib/routes/cncf/index.ts b/lib/routes/cncf/index.ts index acffbbf6cf05..3dae0089e46b 100644 --- a/lib/routes/cncf/index.ts +++ b/lib/routes/cncf/index.ts @@ -35,12 +35,12 @@ async function handler(ctx) { const $ = load(response.data); const title = $('h1.is-style-page-title').text(); const list = $('div.post-archive__item') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('span.post-archive__title').text().trim(), link: $(item).find('span.post-archive__title > a').attr('href'), pubDate: parseDate($(item).find('span.post-archive__item_date').text().split('|')[0]), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/cncf/reports.ts b/lib/routes/cncf/reports.ts index de8b69224e1f..08fdf72b4ef1 100644 --- a/lib/routes/cncf/reports.ts +++ b/lib/routes/cncf/reports.ts @@ -25,11 +25,11 @@ async function handler() { const response = await got(url); const $ = load(response.data); const list = $('div.report-item') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a.report-item__link').attr('title'), link: $(item).find('a.report-item__link').attr('href'), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/cnki/debut.ts b/lib/routes/cnki/debut.ts index fdeaae3333d6..67ce6192b981 100644 --- a/lib/routes/cnki/debut.ts +++ b/lib/routes/cnki/debut.ts @@ -51,12 +51,12 @@ async function handler(ctx) { }); const $ = load(response.data); const list = $('dd') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('span.name > a').text().trim(), link: `${rootUrl}/kcms/detail/${new URLSearchParams(new URL(`${rootUrl}/${$(item).find('span.name > a').attr('href')}`).search).get('url')}.html`, pubDate: parseDate($(item).find('span.company').text(), 'YYYY-MM-DD HH:mm:ss'), - })) - .get(); + })); const items = await Promise.all( list.map((item) => @@ -65,12 +65,12 @@ async function handler(ctx) { const $ = load(detailResponse.data); item.description = art(path.join(__dirname, 'templates/desc.art'), { author: $('h3.author > span') - .map((_, item) => $(item).text()) - .get() + .toArray() + .map((item) => $(item).text()) .join(' '), company: $('a.author') - .map((_, item) => $(item).text()) - .get() + .toArray() + .map((item) => $(item).text()) .join(' '), content: $('div.row > span.abstract-text').parent().text(), }); diff --git a/lib/routes/cnki/journals.ts b/lib/routes/cnki/journals.ts index e2034dfdcb49..9e4d7e5ff536 100644 --- a/lib/routes/cnki/journals.ts +++ b/lib/routes/cnki/journals.ts @@ -79,19 +79,17 @@ async function handler(ctx) { const $ = load(response.data); const publications = $('dd'); - const list = publications - .map((_, publication) => { - const title = $(publication).find('a').first().text(); - const filename = $(publication).find('b').attr('id'); - const link = `https://cnki.net/kcms/detail/detail.aspx?filename=${filename}&dbcode=CJFD`; - - return { - title, - link, - pubDate: date, - }; - }) - .get(); + const list = publications.toArray().map((publication) => { + const title = $(publication).find('a').first().text(); + const filename = $(publication).find('b').attr('id'); + const link = `https://cnki.net/kcms/detail/detail.aspx?filename=${filename}&dbcode=CJFD`; + + return { + title, + link, + pubDate: date, + }; + }); const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => ProcessItem(item)))); diff --git a/lib/routes/colamanga/manga.ts b/lib/routes/colamanga/manga.ts index ca391d42f549..be2b600b104d 100644 --- a/lib/routes/colamanga/manga.ts +++ b/lib/routes/colamanga/manga.ts @@ -71,14 +71,14 @@ async function handler(ctx: Context) { const author = $("span:contains('作者')").parent().contents().eq(1).text(); // const cover = $(".fed-deta-images a").attr('data-original'); const items = $('.all_data_list >ul>li>a') - .map((i, elem) => ({ + .toArray() + .map((elem, i) => ({ title: `${book_name} ${$(elem).text()}`, link: elem.attribs.href, description: $('.fed-part-esan').text(), author, pubDate: shift_date(updateDate, -7 * i), - })) - .get(); + })); return { title: book_name || 'Unknown Manga', diff --git a/lib/routes/cpcey/index.ts b/lib/routes/cpcey/index.ts index 251fc0b5da42..14570381f1ef 100644 --- a/lib/routes/cpcey/index.ts +++ b/lib/routes/cpcey/index.ts @@ -45,7 +45,8 @@ async function handler(ctx) { const response = await got.get(url); const $ = load(response.data); const list = $('div.words > ul > li') - .map((_, item) => { + .toArray() + .map((item) => { const date = $(item).find('span').text(); const dateArr = date.split('-'); const dateStr = Number.parseInt(dateArr[0]) + 1911 + '/' + dateArr[1] + '/' + dateArr[2]; @@ -55,8 +56,7 @@ async function handler(ctx) { title: $(item).find('a').attr('title'), pubDate: parseDate(dateStr, 'YYYY/MM/DD'), }; - }) - .get(); + }); const items = await Promise.all( list.map(async (item) => { diff --git a/lib/routes/crac/index.ts b/lib/routes/crac/index.ts index 444d9e30f2ba..89fe13cedf54 100644 --- a/lib/routes/crac/index.ts +++ b/lib/routes/crac/index.ts @@ -37,14 +37,14 @@ async function handler(ctx) { const $ = load(response.data); const list = $('div.InCont_r_d_cont > li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { link: new URL(item.find('a').attr('href'), baseUrl).href, pubDate: parseDate(item.find('span.cont_d').text(), 'YYYY-MM-DD'), }; - }) - .get(); + }); await Promise.all( list.map((item) => diff --git a/lib/routes/cssn/iolaw.ts b/lib/routes/cssn/iolaw.ts index c1f4e701be95..f0a48813c592 100644 --- a/lib/routes/cssn/iolaw.ts +++ b/lib/routes/cssn/iolaw.ts @@ -29,7 +29,8 @@ async function handler(ctx) { const $ = load(data); const list = $('div.notice_right ul li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const url = `http://${domain}` + item.find('a').attr('href').slice(1); const title = item.find('a div.title').text(); @@ -40,8 +41,7 @@ async function handler(ctx) { author: '中国法学网', pubtime: publish_time, }; - }) - .get(); + }); return { title: '中国法学网', diff --git a/lib/routes/csu/cse.ts b/lib/routes/csu/cse.ts index 287ff19c0618..2eb83973931e 100644 --- a/lib/routes/csu/cse.ts +++ b/lib/routes/csu/cse.ts @@ -41,7 +41,7 @@ async function handler(ctx) { const link = url + type + '.htm'; const response = await got.get(link); const $ = load(response.data); - const list = $('.download li').get(); + const list = $('.download li').toArray(); const out = await Promise.all( list.map((item) => { const $ = load(item); diff --git a/lib/routes/dapenti/utils.ts b/lib/routes/dapenti/utils.ts index 20f1983c0603..b53be5a96851 100644 --- a/lib/routes/dapenti/utils.ts +++ b/lib/routes/dapenti/utils.ts @@ -23,7 +23,7 @@ export default { const data = iconv.decode(listRes.data, 'gb2312'); const $ = load(data); // 只取最近的三个,取全文rss - const list = $('li', 'ul').slice(0, 3).get(); + const list = $('li', 'ul').slice(0, 3).toArray(); const result_item = await Promise.all( list.map((item) => diff --git a/lib/routes/dayanzai/index.ts b/lib/routes/dayanzai/index.ts index 7fecbc7b42d0..43039cfa3b28 100644 --- a/lib/routes/dayanzai/index.ts +++ b/lib/routes/dayanzai/index.ts @@ -41,27 +41,25 @@ async function handler(ctx) { const $ = load(response.data); const lists = $('div.c-box > div > div.c-zx-list > ul > li'); const reg = /日期:(.*?(\s\(.*?\))?)\s/; - const list = lists - .map((index, item) => { - item = $(item).find('div'); - let date = reg.exec(item.find('div.r > p.other').text())[1]; - if (date.includes('周') || date.includes('月')) { - date = /\((.*?)\)/.exec(date)[1]; - date = parseDate(date, 'MM-DD'); - } else if (date.includes('年')) { - date = /\((.*?)\)/.exec(date)[1]; - date = parseDate(date, 'YYYY-MM-DD'); - } else { - date = parseRelativeDate(date); - } - return { - title: item.find('div.r > p.r-top > span > a').text(), - pubDate: timezone(date, +8), - description: item.find('div.r > p.desc').text(), - link: item.find('div.r > p.r-top > span > a').attr('href'), - }; - }) - .get(); + const list = lists.toArray().map((item) => { + item = $(item).find('div'); + let date = reg.exec(item.find('div.r > p.other').text())[1]; + if (date.includes('周') || date.includes('月')) { + date = /\((.*?)\)/.exec(date)[1]; + date = parseDate(date, 'MM-DD'); + } else if (date.includes('年')) { + date = /\((.*?)\)/.exec(date)[1]; + date = parseDate(date, 'YYYY-MM-DD'); + } else { + date = parseRelativeDate(date); + } + return { + title: item.find('div.r > p.r-top > span > a').text(), + pubDate: timezone(date, +8), + description: item.find('div.r > p.desc').text(), + link: item.find('div.r > p.r-top > span > a').attr('href'), + }; + }); const items = fulltext === 'y' ? await Promise.all( diff --git a/lib/routes/dbaplus/rss.ts b/lib/routes/dbaplus/rss.ts index f94576c35a81..81922af6b70d 100644 --- a/lib/routes/dbaplus/rss.ts +++ b/lib/routes/dbaplus/rss.ts @@ -24,7 +24,8 @@ async function handler() { const $ = load(response.data); const list = $('div.col-xs-12.col-md-8.pd30 > div.panel.panel-default.categeay > div.panel-body > ul.media-list.clearfix > li.media') - .map((i, e) => { + .toArray() + .map((e) => { const element = $(e); const title = element.find('h3 > a').text(); const link = element.find('h3 > a').attr('href'); @@ -37,9 +38,7 @@ async function handler() { link, pubDate: parseDate(dateraw, 'YYYY年MM月DD日'), }; - }) - .get(); - + }); return { title: 'dbaplus社群', link: url, diff --git a/lib/routes/ddosi/category.ts b/lib/routes/ddosi/category.ts index 48ceb70bb6ba..fd333d39422c 100644 --- a/lib/routes/ddosi/category.ts +++ b/lib/routes/ddosi/category.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -const envs = process.env; +import { config } from '@/config'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -31,7 +31,7 @@ export const route: Route = { async function handler(ctx) { const url = 'https://www.ddosi.org/category'; - const userAgent = envs.UA || 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'; + const userAgent = config.ua || 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'; const category = ctx.req.param('category'); const response = await got({ method: 'get', @@ -42,7 +42,7 @@ async function handler(ctx) { }, }); const $ = load(response.data); - const list = $('main>article').get(); + const list = $('main>article').toArray(); const items = list.map((i) => { const item = $(i); diff --git a/lib/routes/ddosi/index.ts b/lib/routes/ddosi/index.ts index a2dc3c169507..9ea014e15819 100644 --- a/lib/routes/ddosi/index.ts +++ b/lib/routes/ddosi/index.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -const envs = process.env; +import { config } from '@/config'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -20,7 +20,7 @@ export const route: Route = { async function handler() { const url = 'https://www.ddosi.org/'; - const userAgent = envs.UA || 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'; + const userAgent = config.ua || 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'; const response = await got({ method: 'get', url: String(url), @@ -30,7 +30,7 @@ async function handler() { }, }); const $ = load(response.data); - const list = $('main>article').get(); + const list = $('main>article').toArray(); const items = list.map((i) => { const item = $(i); diff --git a/lib/routes/disinfo/publications.ts b/lib/routes/disinfo/publications.ts index bc084c5aa2c0..d20ef56dd40d 100644 --- a/lib/routes/disinfo/publications.ts +++ b/lib/routes/disinfo/publications.ts @@ -39,15 +39,15 @@ async function handler() { const $ = load(response.data); const list = $('.elementor-heading-title a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/dmzj/news.ts b/lib/routes/dmzj/news.ts index 34e2604169b2..84d2b000a39a 100644 --- a/lib/routes/dmzj/news.ts +++ b/lib/routes/dmzj/news.ts @@ -39,7 +39,8 @@ async function handler(ctx) { title: $('title').text(), link: url, item: $('.briefnews_con_li .li_img_de') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('h3 a').text(), link: $(item).find('h3 a').attr('href'), author: $(item).find('.head_con_p_o span:nth-child(3)').text().split(':')[1], @@ -47,9 +48,8 @@ async function handler(ctx) { description: $(item).find('p.com_about').text(), category: $(item) .find('.u_comfoot a .bqwarp') - .map((_, item) => $(item).text()) - .get(), - })) - .get(), + .toArray() + .map((item) => $(item).text()), + })), }; } diff --git a/lib/routes/douban/commercialpress/latest.ts b/lib/routes/douban/commercialpress/latest.ts index 0f0975218ae9..2bfbdc5168fa 100644 --- a/lib/routes/douban/commercialpress/latest.ts +++ b/lib/routes/douban/commercialpress/latest.ts @@ -54,7 +54,8 @@ async function handler() { $ = load(newBookPage.data); const resultItem = $('.doulist-item') - .map((_, item) => { + .toArray() + .map((item) => { const $item = $(item); return { @@ -63,8 +64,7 @@ async function handler() { description: `
${$item.find('.abstract').html()}`, pubDate: new Date($item.find('.time > span').attr('title')).toUTCString(), }; - }) - .get(); + }); return { title: `商务印书馆-${title}`, diff --git a/lib/routes/douban/other/celebrity.ts b/lib/routes/douban/other/celebrity.ts index 333e66b25b9f..8edad45e305e 100644 --- a/lib/routes/douban/other/celebrity.ts +++ b/lib/routes/douban/other/celebrity.ts @@ -43,18 +43,14 @@ async function handler(ctx) { return { title: `豆瓣电影人 - ${person}`, link: `https://movie.douban.com/celebrity/${id}/movies?sortby=${sort}`, - item: - list && - list - .map((index, item) => { - item = $(item); - itemPicUrl = item.find('img').attr('src'); - return { - title: '《' + item.find('h6 > a').text() + '》' + item.find('h6 > span').text().replace('(', '(').replace(')', ')').replace('[', '【').replace(']', '】'), - description: `
主演:${item.find('dl > dd').last().text()}
评分:${item.find('.star > span:nth-child(2)').text()}`, - link: item.find('dt > a').attr('href'), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + itemPicUrl = item.find('img').attr('src'); + return { + title: '《' + item.find('h6 > a').text() + '》' + item.find('h6 > span').text().replace('(', '(').replace(')', ')').replaceAll('[', '【').replaceAll(']', '】'), + description: `
主演:${item.find('dl > dd').last().text()}
评分:${item.find('.star > span:nth-child(2)').text()}`, + link: item.find('dt > a').attr('href'), + }; + }), }; } diff --git a/lib/routes/douban/other/doulist.ts b/lib/routes/douban/other/doulist.ts index 8395cf341e07..e01af8a4689a 100644 --- a/lib/routes/douban/other/doulist.ts +++ b/lib/routes/douban/other/doulist.ts @@ -36,34 +36,35 @@ async function handler(ctx) { const title = $('#content h1').text().trim(); const description = $('div.doulist-about').text().trim(); const out = $('div.doulist-item') - .map(function () { - const type = $(this).find('div.source').text().trim(); + .toArray() + .map((item) => { + const type = $(item).find('div.source').text().trim(); - let title = $(this).find('div.bd.doulist-note div.title a').text().trim(); - let link = $(this).find('div.bd.doulist-note div.title a').attr('href'); - let description = $(this).find('div.bd.doulist-note div.abstract').text().trim(); + let title = $(item).find('div.bd.doulist-note div.title a').text().trim(); + let link = $(item).find('div.bd.doulist-note div.title a').attr('href'); + let description = $(item).find('div.bd.doulist-note div.abstract').text().trim(); if (type === '来自:豆瓣广播') { - title = $(this).find('p.status-content > a').text().trim(); - link = $(this).find('p.status-content a').attr('href'); + title = $(item).find('p.status-content > a').text().trim(); + link = $(item).find('p.status-content a').attr('href'); - description = $(this).find('span.status-recommend-text').text().trim(); + description = $(item).find('span.status-recommend-text').text().trim(); } if (type === '来自:豆瓣电影' || type === '来自:豆瓣' || type === '来自:豆瓣读书' || type === '来自:豆瓣音乐') { - title = $(this).find('div.bd.doulist-subject div.title a').text().trim(); - link = $(this).find('div.bd.doulist-subject div.title a').attr('href'); + title = $(item).find('div.bd.doulist-subject div.title a').text().trim(); + link = $(item).find('div.bd.doulist-subject div.title a').attr('href'); - description = $(this).find('div.bd.doulist-subject div.abstract').text().trim(); + description = $(item).find('div.bd.doulist-subject div.abstract').text().trim(); - const ft = $(this).find('div.ft div.comment-item.content').text().trim(); + const ft = $(item).find('div.ft div.comment-item.content').text().trim(); - const img = $(this).find('div.post a img').attr('src'); + const img = $(item).find('div.post a img').attr('src'); description = '
' + description + '
' + ft + '
'; } - const date = $(this).find('div.ft div.actions time span').attr('title'); + const date = $(item).find('div.ft div.actions time span').attr('title'); const single = { title, @@ -72,8 +73,7 @@ async function handler(ctx) { pubDate: new Date(date).toUTCString(), }; return single; - }) - .get(); + }); return { title, diff --git a/lib/routes/douban/other/explore-column.ts b/lib/routes/douban/other/explore-column.ts index 9debe994364a..b76e27ad2d23 100644 --- a/lib/routes/douban/other/explore-column.ts +++ b/lib/routes/douban/other/explore-column.ts @@ -20,15 +20,15 @@ async function handler(ctx) { const list = $('div.item') .slice(0, 10) - .map(function () { + .toArray() + .map((item) => { const info = { - title: $(this).find('div.title a').text(), - link: $(this).find('div.title a').attr('href'), - author: $(this).find('div.usr-pic a').text(), + title: $(item).find('div.title a').text(), + link: $(item).find('div.title a').attr('href'), + author: $(item).find('div.usr-pic a').text(), }; return info; - }) - .get(); + }); for (let i = list.length - 1; i >= 0; i--) { if (list[i].author === '[已注销]') { diff --git a/lib/routes/douban/other/explore.ts b/lib/routes/douban/other/explore.ts index 99aaf02f3f6c..10dba7bda844 100644 --- a/lib/routes/douban/other/explore.ts +++ b/lib/routes/douban/other/explore.ts @@ -37,34 +37,30 @@ async function handler() { return { title: '豆瓣-浏览发现', link: 'https://www.douban.com/explore', - item: - list && - list - .map((_, item) => { - item = $(item); + item: list.toArray().map((item) => { + item = $(item); - const title = item.find('.title a').first().text() ?? '#' + item.find('.icon-topic').text(); - const desc = item.find('.content p').text(); - const itemPic = item.find('a.cover').attr('style') - ? item - .find('a.cover') - .attr('style') - .match(/\('(.*?)'\)/)[1] - : ''; - const author = item.find('.usr-pic a').last().text(); - const link = item.find('.title a').attr('href') ?? item.find('.icon-topic a').attr('href'); + const title = item.find('.title a').first().text() ?? '#' + item.find('.icon-topic').text(); + const desc = item.find('.content p').text(); + const itemPic = item.find('a.cover').attr('style') + ? item + .find('a.cover') + .attr('style') + .match(/\('(.*?)'\)/)[1] + : ''; + const author = item.find('.usr-pic a').last().text(); + const link = item.find('.title a').attr('href') ?? item.find('.icon-topic a').attr('href'); - return { - title, - author, - description: art(path.join(__dirname, '../templates/explore.art'), { - author, - desc, - itemPic, - }), - link, - }; - }) - .get(), + return { + title, + author, + description: art(path.join(__dirname, '../templates/explore.art'), { + author, + desc, + itemPic, + }), + link, + }; + }), }; } diff --git a/lib/routes/douban/other/group.ts b/lib/routes/douban/other/group.ts index 54798f01ecdb..f7c1f66e3dc1 100644 --- a/lib/routes/douban/other/group.ts +++ b/lib/routes/douban/other/group.ts @@ -59,7 +59,7 @@ async function handler(ctx) { }); const $ = load(response.data); - const list = $('.olt tr:not(.th)').slice(0, 30).get(); + const list = $('.olt tr:not(.th)').slice(0, 30).toArray(); const items = await Promise.all( list.map((item) => { diff --git a/lib/routes/douban/other/jobs.ts b/lib/routes/douban/other/jobs.ts index 8ba037897d4b..0bb203a45fae 100644 --- a/lib/routes/douban/other/jobs.ts +++ b/lib/routes/douban/other/jobs.ts @@ -39,13 +39,11 @@ async function handler(ctx) { const $ = load(response.data); const list = $('div.mod.position'); - const items = list - .map((_, item) => ({ - title: $(item).find('h3').text(), - link: `${url}#${$(item).find('h3').attr('id')}`, - description: $(item).find('div.bd').html(), - })) - .get(); + const items = list.toArray().map((item) => ({ + title: $(item).find('h3').text(), + link: `${url}#${$(item).find('h3').attr('id')}`, + description: $(item).find('div.bd').html(), + })); return { title: `豆瓣${titleMap[type]}`, diff --git a/lib/routes/douban/other/later.ts b/lib/routes/douban/other/later.ts index ebab44f5849e..1fe3cbb5d7ee 100644 --- a/lib/routes/douban/other/later.ts +++ b/lib/routes/douban/other/later.ts @@ -28,7 +28,8 @@ async function handler() { const $ = load(response.data); const item = $('#showing-soon .item') - .map((index, ele) => { + .toArray() + .map((ele) => { const description = $(ele).html(); const name = $('h3', ele).text().trim(); const date = $('ul li', ele).eq(0).text().trim(); @@ -40,8 +41,7 @@ async function handler() { link, description, }; - }) - .get(); + }); return { title: '即将上映的电影', diff --git a/lib/routes/douban/other/latest-music.ts b/lib/routes/douban/other/latest-music.ts index 2715b3505323..06489ad979e8 100644 --- a/lib/routes/douban/other/latest-music.ts +++ b/lib/routes/douban/other/latest-music.ts @@ -32,7 +32,7 @@ async function handler(ctx) { const url = 'https://music.douban.com/latest'; const res = await got.get(url); const $ = load(res.data); - const list = $('.dlist').get(); + const list = $('.dlist').toArray(); data = { title, diff --git a/lib/routes/douban/other/playing.ts b/lib/routes/douban/other/playing.ts index d7d25a097345..13f5434dab9d 100644 --- a/lib/routes/douban/other/playing.ts +++ b/lib/routes/douban/other/playing.ts @@ -32,7 +32,7 @@ async function handler(ctx) { title: `正在上映的${score ? `超过 ${score} 分的` : ''}电影`, link: `https://movie.douban.com/cinema/nowplaying/`, item: $('.list-item') - .get() + .toArray() .map((i) => { const item = $(i); const itemScore = Number.parseFloat(item.attr('data-score')) || 0; diff --git a/lib/routes/douban/other/replied.ts b/lib/routes/douban/other/replied.ts index 4984083604bb..836ecb5c86bf 100644 --- a/lib/routes/douban/other/replied.ts +++ b/lib/routes/douban/other/replied.ts @@ -30,7 +30,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('div.recent-replied-mod ul.comment-list li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const p = item.find('p'); const nid = p @@ -44,8 +45,7 @@ async function handler(ctx) { title: `${item.find('a.lnk-people').text()} - ${title}`, link: `https://www.douban.com/note/${nid}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/douban/other/replies.ts b/lib/routes/douban/other/replies.ts index 4fdd0590c692..63582f6582b1 100644 --- a/lib/routes/douban/other/replies.ts +++ b/lib/routes/douban/other/replies.ts @@ -30,7 +30,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('div.recent-replies-mod ul.comment-list li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const p = item.find('p'); const match = p @@ -43,8 +44,7 @@ async function handler(ctx) { return { link: `https://www.douban.com/note/${nid}/#${cid}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/douban/people/wish.ts b/lib/routes/douban/people/wish.ts index 857c05f283ef..6facc1f1b7fb 100644 --- a/lib/routes/douban/people/wish.ts +++ b/lib/routes/douban/people/wish.ts @@ -64,7 +64,7 @@ async function handler(ctx) { if (list) { return Promise.all( - list.get().map((item) => { + list.toArray().map((item) => { item = $(item); const itemPicUrl = item.find('.pic a img').attr('src'); const info = item.find('.info'); diff --git a/lib/routes/dtcj/datainsight.ts b/lib/routes/dtcj/datainsight.ts index dfe5d9ab785b..a003171b3a0f 100644 --- a/lib/routes/dtcj/datainsight.ts +++ b/lib/routes/dtcj/datainsight.ts @@ -47,15 +47,15 @@ async function handler(ctx) { const list = $('.info-2_P1UM a') .slice(0, 10) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: `${rootUrl}${item.attr('href')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/dx2025/index.ts b/lib/routes/dx2025/index.ts index ac746ef53160..7da82e7c2716 100644 --- a/lib/routes/dx2025/index.ts +++ b/lib/routes/dx2025/index.ts @@ -58,14 +58,14 @@ async function handler(ctx) { const list = $('.entry-title a') .slice(0, 10) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/eagle/blog.ts b/lib/routes/eagle/blog.ts index 79bfd2223580..08cf75b96052 100644 --- a/lib/routes/eagle/blog.ts +++ b/lib/routes/eagle/blog.ts @@ -61,12 +61,12 @@ async function handler(ctx) { const $ = load(response.data); const title = $('div.categories-list > div > div > div > ul > li.active').text(); const list = $('div.post-item') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('div.title').text(), link: new URL($(item).find('a').attr('href'), host).href, pubDate: parseDate($(item).find('div.metas > a > span').text().replace('・', '')), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/eagle/changelog.ts b/lib/routes/eagle/changelog.ts index e07cb89ae101..bcfe5d599e72 100644 --- a/lib/routes/eagle/changelog.ts +++ b/lib/routes/eagle/changelog.ts @@ -66,36 +66,32 @@ async function handler(ctx) { description: `Eagle ${changelog}`, // 遍历此前获取的数据 - item: - list && - list - .map((index, item) => { - item = $(item); - // 对获取的日期进行格式化处理 - function getDate() { - const str = item.find('.date').text(); - let date = ''; - if (language === 'cn' || language === 'tw') { - const patt = /\d+/g; - let result; - while ((result = patt.exec(str)) !== null) { - date += result + '-'; - } - date = date.replaceAll(/-$/g, ''); - } else if (language === 'en') { - date = str.replaceAll('RELEASED', ''); - } - return date; + item: list.toArray().map((item) => { + item = $(item); + // 对获取的日期进行格式化处理 + function getDate() { + const str = item.find('.date').text(); + let date = ''; + if (language === 'cn' || language === 'tw') { + const patt = /\d+/g; + let result; + while ((result = patt.exec(str)) !== null) { + date += result + '-'; } + date = date.replaceAll(/-$/g, ''); + } else if (language === 'en') { + date = str.replaceAll('RELEASED', ''); + } + return date; + } - return { - title: item.find('.ver').text(), - description: item.find('.logs').html(), - link: `https://${language}.eagle.cool/changelog`, - pubDate: parseDate(getDate()), - guid: item.find('.ver').text(), - }; - }) - .get(), + return { + title: item.find('.ver').text(), + description: item.find('.logs').html(), + link: `https://${language}.eagle.cool/changelog`, + pubDate: parseDate(getDate()), + guid: item.find('.ver').text(), + }; + }), }; } diff --git a/lib/routes/ecnu/jwc.ts b/lib/routes/ecnu/jwc.ts index 161f03085b9b..d49e926d49e8 100644 --- a/lib/routes/ecnu/jwc.ts +++ b/lib/routes/ecnu/jwc.ts @@ -29,12 +29,12 @@ export const route: Route = { const response = await got(`${baseUrl}tzggwwxsgg/list.htm`); const $ = load(response.data); const links = $('.col_news_con ul.news_list > li') - .map((_, el) => ({ + .toArray() + .map((el) => ({ pubDate: timezone(parseDate($(el).find('.news_date').text()), 8), link: new URL($(el).find('a').attr('href'), baseUrl).toString(), title: $(el).find('a').text(), - })) - .get(); + })); const items = await Promise.all( links.map((item) => cache.tryGet(item.link, async () => { diff --git a/lib/routes/ehentai/ehapi.ts b/lib/routes/ehentai/ehapi.ts index 55780330ab47..ea93df232b80 100644 --- a/lib/routes/ehentai/ehapi.ts +++ b/lib/routes/ehentai/ehapi.ts @@ -150,7 +150,7 @@ function getBittorrent(cache, bittorrent_page_url) { try { const response = await got({ method: 'get', url: bittorrent_page_url, headers }); const $ = load(response.data); - const el_forms = $('form').get(); + const el_forms = $('form').toArray(); let bittorrent_url; for (const el_form of el_forms) { const el_a = $(el_form).find('a'); diff --git a/lib/routes/elsevier/issue.ts b/lib/routes/elsevier/issue.ts index 22af78bdc36c..9a9ee1b3dc80 100644 --- a/lib/routes/elsevier/issue.ts +++ b/lib/routes/elsevier/issue.ts @@ -34,7 +34,8 @@ async function handler(ctx) { const $ = load(response.data); const jrnlName = $('.anchor.js-title-link').text(); const list = $('.js-article') - .map((_, item) => { + .toArray() + .map((item) => { const title = $(item).find('.js-article-title').text(); const authors = $(item).find('.js-article__item__authors').text(); const link = $(item).find('.article-content-title').attr('href'); @@ -46,8 +47,7 @@ async function handler(ctx) { authors, issue, }; - }) - .get(); + }); const renderDesc = (item) => art(path.join(__dirname, 'templates/description.art'), { diff --git a/lib/routes/elsevier/journal.ts b/lib/routes/elsevier/journal.ts index b9cd1609db07..2784a40c5bfb 100644 --- a/lib/routes/elsevier/journal.ts +++ b/lib/routes/elsevier/journal.ts @@ -45,7 +45,8 @@ async function handler(ctx) { }); const $2 = load(response2.data); const list = $2('.js-article') - .map((_, item) => { + .toArray() + .map((item) => { const title = $2(item).find('.js-article-title').text(); const authors = $2(item).find('.js-article__item__authors').text(); const link = $2(item).find('.article-content-title').attr('href'); @@ -57,8 +58,7 @@ async function handler(ctx) { authors, issue, }; - }) - .get(); + }); const renderDesc = (item) => art(path.join(__dirname, 'templates/description.art'), { diff --git a/lib/routes/finviz/quote.ts b/lib/routes/finviz/quote.ts index ac057e3146d7..b4edc586e81c 100644 --- a/lib/routes/finviz/quote.ts +++ b/lib/routes/finviz/quote.ts @@ -30,22 +30,20 @@ async function handler(ctx) { let dateRow = ''; const item = await Promise.all( - data - .map((i, e) => { - let date = $(e).find('td').first().text().trim(); - if (date.includes('-')) { - dateRow = date.split(' ')[0]; - } else { - date = `${dateRow} ${date}`; - } - return { - title: $(e).find('a').text(), - pubDate: parseDate(date, 'MMM-DD-YY HH:mmA'), - author: $(e).find('span').text(), - link: $(e).find('a').attr('href'), - }; - }) - .get() + data.toArray().map((e) => { + let date = $(e).find('td').first().text().trim(); + if (date.includes('-')) { + dateRow = date.split(' ')[0]; + } else { + date = `${dateRow} ${date}`; + } + return { + title: $(e).find('a').text(), + pubDate: parseDate(date, 'MMM-DD-YY HH:mmA'), + author: $(e).find('span').text(), + link: $(e).find('a').attr('href'), + }; + }) ); const name = $('.fullview-title b').text(); diff --git a/lib/routes/fisher-spb/news.ts b/lib/routes/fisher-spb/news.ts index 929896d7d46b..24278646fd91 100644 --- a/lib/routes/fisher-spb/news.ts +++ b/lib/routes/fisher-spb/news.ts @@ -56,15 +56,15 @@ async function handler() { }; const items = $('.news-message') - .map((_, elem) => ({ + .toArray() + .map((elem) => ({ pubDate: parseDate($('.news-message-date', elem).text().trim(), 'DD.MM.YYYY HH:mm'), title: $('.news-message-location', elem).text().trim(), description: descBuilder(elem).html(), author: $('.news-message-user', elem).text().trim(), guid: $(elem).attr('id'), link: rootUrl + $('.news-message-comments-number > a', elem).attr('href'), - })) - .get(); + })); return { title: $('head > title').text().trim(), diff --git a/lib/routes/fishshell/index.ts b/lib/routes/fishshell/index.ts index 7d3ea368f595..c1a1bbb5efcf 100644 --- a/lib/routes/fishshell/index.ts +++ b/lib/routes/fishshell/index.ts @@ -28,7 +28,8 @@ async function handler() { title: 'Release notes — fish-shell', language: 'en', item: $('#release-notes > section') - .map((_, item) => { + .toArray() + .map((item) => { const title = $(item).find('h2').contents().first().text(); const date = title.match(/\(released (.+?)\)/)?.[1]; return { @@ -37,7 +38,6 @@ async function handler() { pubDate: date ? parseDate(date, 'MMMM D, YYYY') : undefined, description: $(item).html(), }; - }) - .get(), + }), }; } diff --git a/lib/routes/flyert/creditcard.ts b/lib/routes/flyert/creditcard.ts index 57f1415f561a..2d3feb6ce9bc 100644 --- a/lib/routes/flyert/creditcard.ts +++ b/lib/routes/flyert/creditcard.ts @@ -123,7 +123,7 @@ async function handler(ctx) { const $ = load(gbk2utf8(response.data)); - const list = $("[id*='normalthread']").get(); + const list = $("[id*='normalthread']").toArray(); const result = await util.ProcessFeed(list, cache); diff --git a/lib/routes/flyert/preferential.ts b/lib/routes/flyert/preferential.ts index b770970d283c..06f5a151595e 100644 --- a/lib/routes/flyert/preferential.ts +++ b/lib/routes/flyert/preferential.ts @@ -41,12 +41,12 @@ async function handler() { const $ = load(gbk2utf8(response.data)); const list = $('.comiis_wzli') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('.wzbt').text(), link: `${host}/${$(item).find('.wzbt a').attr('href')}`, description: $(item).find('.wznr > div:first-child').text(), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/ft/myft.ts b/lib/routes/ft/myft.ts index 39661d95c659..1d36e2a7fc7a 100644 --- a/lib/routes/ft/myft.ts +++ b/lib/routes/ft/myft.ts @@ -55,12 +55,12 @@ async function handler(ctx) { item.category = [ $('.n-content-tag--with-follow').text(), ...$('.article__right-bottom a.concept-list__concept') - .map((i, e) => $(e).text().trim()) - .get(), + .toArray() + .map((e) => $(e).text().trim()), ]; item.author = $('a.n-content-tag--author') - .map((i, e) => ({ name: $(e).text() })) - .get(); + .toArray() + .map((e) => ({ name: $(e).text() })); return item; }) diff --git a/lib/routes/furstar/artists.ts b/lib/routes/furstar/artists.ts index 39b67242a438..06bd98dedd85 100644 --- a/lib/routes/furstar/artists.ts +++ b/lib/routes/furstar/artists.ts @@ -38,8 +38,8 @@ async function handler(ctx) { }); const $ = load(res.data); const artists = $('.filter-item') - .map((i, e) => utils.authorDetail(e)) - .get(); + .toArray() + .map((e) => utils.authorDetail(e)); artists.shift(); // the first one is "show all" return { diff --git a/lib/routes/furstar/utils.ts b/lib/routes/furstar/utils.ts index 75bba65c03df..c6432ea9faaa 100644 --- a/lib/routes/furstar/utils.ts +++ b/lib/routes/furstar/utils.ts @@ -50,12 +50,12 @@ const detailPage = (link, cache) => const title = $('.row .panel-heading h2').text().trim(); // Get first title const desc = $('.character-description p').text().trim(); const pics = $('.img-gallery .prettyPhoto') - .map((i, e) => { + .toArray() + .map((e) => { const p = load(e); const link = p('a').attr('href').trim(); return `${base}/${link.slice(2)}`; - }) - .get(); + }); return { title, @@ -69,18 +69,16 @@ const fetchAllCharacters = (data, base) => { // All character page const $ = load(data); const characters = $('.character-article'); - const info = characters - .map((i, e) => { - const c = load(e); - const r = { - title: c('.character-headline').text().trim(), - headImage: c('.character-images img').attr('src').trim(), - detailPage: `${base}/${c('.character-images a').attr('href').trim()}`, - author: authorDetail(c('.character-description').html()), - }; - return r; - }) - .get(); + const info = characters.toArray().map((e) => { + const c = load(e); + const r = { + title: c('.character-headline').text().trim(), + headImage: c('.character-images img').attr('src').trim(), + detailPage: `${base}/${c('.character-images a').attr('href').trim()}`, + author: authorDetail(c('.character-description').html()), + }; + return r; + }); return info; }; diff --git a/lib/routes/fx-markets/channel.ts b/lib/routes/fx-markets/channel.ts index a36c6258d966..59702b77de92 100644 --- a/lib/routes/fx-markets/channel.ts +++ b/lib/routes/fx-markets/channel.ts @@ -34,19 +34,17 @@ async function handler(ctx) { const title = `FX-Markets ${pageTitle}`; const items = $('div#listings').children(); - const articles = items - .map((i, el) => { - const $el = $(el); - const $titleEl = $el.find('h5 > a'); - const articleURL = `https://www.fx-markets.com${$titleEl.attr('href')}`; - const articleTitle = $titleEl.attr('title'); - return { - title: articleTitle, - link: articleURL, - pubDate: parseDate($el.find('time').text()), - }; - }) - .get(); + const articles = items.toArray().map((el) => { + const $el = $(el); + const $titleEl = $el.find('h5 > a'); + const articleURL = `https://www.fx-markets.com${$titleEl.attr('href')}`; + const articleTitle = $titleEl.attr('title'); + return { + title: articleTitle, + link: articleURL, + pubDate: parseDate($el.find('time').text()), + }; + }); const result = await Promise.all( articles.map((item) => @@ -54,7 +52,7 @@ async function handler(ctx) { const res = await got(item.link); const doc = load(res.data); // This script holds publish datetime info {"datePublished": "2022-05-12T08:45:04+01:00"} - const dateScript = doc('script[type="application/ld+json"]').get()[0].children[0].data; + const dateScript = doc('script[type="application/ld+json"]').toArray()[0].children[0].data; const re = /"datePublished": "(?.*)"/; const dateStr = re.exec(dateScript).groups.dateTimePub; const pubDateTime = parseDate(dateStr, 'YYYY-MM-DDTHH:mm:ssZ'); diff --git a/lib/routes/fx678/kx.ts b/lib/routes/fx678/kx.ts index 46a957722824..bb8fdaea627a 100644 --- a/lib/routes/fx678/kx.ts +++ b/lib/routes/fx678/kx.ts @@ -37,9 +37,9 @@ async function handler() { // 页面新闻消息列表 const list = $('.body_zb ul .body_zb_li .zb_word') .find('.list_font_pic > a:first-child') - .map((i, e) => $(e).attr('href')) + .toArray() .slice(0, 30) - .get(); + .map((e) => $(e).attr('href')); const out = await Promise.all( list.map((itemUrl) => diff --git a/lib/routes/fzmtr/announcements.ts b/lib/routes/fzmtr/announcements.ts index af62042bffc7..57375ba57c5d 100644 --- a/lib/routes/fzmtr/announcements.ts +++ b/lib/routes/fzmtr/announcements.ts @@ -29,7 +29,8 @@ async function handler() { const $ = load(data); const list = $('span#resources li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const url = `http://${domain}` + item.find('a').attr('href'); const title = item.find('a').text(); @@ -40,8 +41,7 @@ async function handler() { author: '福州地铁', pubtime: publishTime, }; - }) - .get(); + }); return { title: '福州地铁通知公告', diff --git a/lib/routes/gamer/gnn-index.ts b/lib/routes/gamer/gnn-index.ts index 3ac04b3120f5..ec100643e347 100644 --- a/lib/routes/gamer/gnn-index.ts +++ b/lib/routes/gamer/gnn-index.ts @@ -95,7 +95,8 @@ async function handler(ctx) { .children() .not('p,a,img,span') .slice(0, limit) - .map((index, item) => { + .toArray() + .map((item) => { item = $(item); let aLabelNode; let tag; @@ -113,8 +114,7 @@ async function handler(ctx) { title: '[' + tag + ']' + aLabelNode.text(), link: aLabelNode.attr('href').replace('//', 'https://'), }; - }) - .get(); + }); const items = await Promise.all( list.map(async (item) => { diff --git a/lib/routes/gamer/hot.ts b/lib/routes/gamer/hot.ts index ca78feef312f..2b4ce7e8631b 100644 --- a/lib/routes/gamer/hot.ts +++ b/lib/routes/gamer/hot.ts @@ -35,13 +35,13 @@ async function handler(ctx) { const $ = load(response.data); const list = $('div.FM-abox2A a.FM-abox2B') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { link: `https:${item.attr('href')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/gihyo/group.ts b/lib/routes/gihyo/group.ts index c1dd181a6d33..e4a435ad2c9d 100644 --- a/lib/routes/gihyo/group.ts +++ b/lib/routes/gihyo/group.ts @@ -42,25 +42,23 @@ async function handler(ctx) { const description = $('head meta[name=description]').attr('content'); const language = 'ja'; - const item = articles - .map((_, article) => { - const _subtitle = $('p.m-listitem__title span.subtitle', article).text(); - const _title = $('p.m-listitem__title', article) - .contents() - .filter((_, el) => el.nodeType === 3) - .text(); - const title = `${_subtitle} ${_title}`; - const author = $('p.m-listitem__author', article).text(); - const pubDate = timezone(parseDate($('span.date', article).text(), 'YYYY-MM-DD'), +9); - const link = `${baseUrl}${$('a', article).attr('href')}`.replace(/\?summary$/, ''); - return { - title, - author, - pubDate, - link, - }; - }) - .get(); + const item = articles.toArray().map((article) => { + const _subtitle = $('p.m-listitem__title span.subtitle', article).text(); + const _title = $('p.m-listitem__title', article) + .contents() + .filter((_, el) => el.nodeType === 3) + .text(); + const title = `${_subtitle} ${_title}`; + const author = $('p.m-listitem__author', article).text(); + const pubDate = timezone(parseDate($('span.date', article).text(), 'YYYY-MM-DD'), +9); + const link = `${baseUrl}${$('a', article).attr('href')}`.replace(/\?summary$/, ''); + return { + title, + author, + pubDate, + link, + }; + }); return { title, diff --git a/lib/routes/google/citations.ts b/lib/routes/google/citations.ts index bb3a6d722f33..753685be5330 100644 --- a/lib/routes/google/citations.ts +++ b/lib/routes/google/citations.ts @@ -40,7 +40,7 @@ async function handler(ctx) { const name = $('#gsc_prf_in').text(); const description = `Google Scholar Citation Monitor: ${name}; Profile: ${profile}; HomePage: ${homePage}`; - const list = $('#gsc_a_b .gsc_a_tr').get(); + const list = $('#gsc_a_b .gsc_a_tr').toArray(); const out = list.map((item) => { const $ = load(item); diff --git a/lib/routes/google/scholar.ts b/lib/routes/google/scholar.ts index c6bbe8eda062..1c94914561a3 100644 --- a/lib/routes/google/scholar.ts +++ b/lib/routes/google/scholar.ts @@ -48,7 +48,7 @@ async function handler(ctx) { }); const $ = load(response.data); - const list = $('#gs_res_ccl_mid .gs_r.gs_or.gs_scl .gs_ri').get(); + const list = $('#gs_res_ccl_mid .gs_r.gs_or.gs_scl .gs_ri').toArray(); const out = list.map((item) => { const $ = load(item); diff --git a/lib/routes/gov/chinatax/latest.ts b/lib/routes/gov/chinatax/latest.ts index 9999b6e496e0..4e69529abd4d 100644 --- a/lib/routes/gov/chinatax/latest.ts +++ b/lib/routes/gov/chinatax/latest.ts @@ -37,15 +37,15 @@ async function handler() { const $ = load(response.data); const list = $('ul.list.whlist li') .slice(0, 10) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('a'); return { title: a.text(), link: new URL(a.attr('href'), `http://www.chinatax.gov.cn`).toString(), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { diff --git a/lib/routes/gov/huizhou/zwgk/index.ts b/lib/routes/gov/huizhou/zwgk/index.ts index f71c819e6829..e9bbe8ba6dcc 100644 --- a/lib/routes/gov/huizhou/zwgk/index.ts +++ b/lib/routes/gov/huizhou/zwgk/index.ts @@ -34,12 +34,12 @@ async function handler(ctx) { const $ = load(response.data); const title = $('span#navigation').children('a').last().text(); const list = $('ul.ul_art_row') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a').text().trim(), link: $(item).find('a').attr('href'), pubDate: timezone(parseDate($(item).find('li.li_art_date').text().trim()), +8), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/gov/hunan/changsha/major-email.ts b/lib/routes/gov/hunan/changsha/major-email.ts index 33605c42eb90..258bf336e347 100644 --- a/lib/routes/gov/hunan/changsha/major-email.ts +++ b/lib/routes/gov/hunan/changsha/major-email.ts @@ -42,7 +42,8 @@ async function handler() { const $ = load(listPage.data); const list = $('.table1 tbody tr') .slice(1) - .map((_, tr) => { + .toArray() + .map((tr) => { tr = $(tr); return { @@ -50,8 +51,7 @@ async function handler() { link: baseUrl + tr.find('td[title] > a').attr('href'), author: tr.find('td:last').text(), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/gov/jiangsu/wlt/index.ts b/lib/routes/gov/jiangsu/wlt/index.ts index 2b6cc0bf3ee8..14b1957b738b 100644 --- a/lib/routes/gov/jiangsu/wlt/index.ts +++ b/lib/routes/gov/jiangsu/wlt/index.ts @@ -48,7 +48,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.tg_tb1') - .map((_, item) => { + .toArray() + .map((item) => { const i = $(item); const id = i.prop('onclick').match(/openDetail\('(\d+)'\)/)?.[1] || ''; return { @@ -58,7 +59,6 @@ async function handler(ctx) { pubDate: '', }; }) - .get() .filter((e) => e.link); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/gov/jinan/healthcommission/medical-exam-notice.ts b/lib/routes/gov/jinan/healthcommission/medical-exam-notice.ts index 92941c2f7f84..4e8afa8f99e5 100644 --- a/lib/routes/gov/jinan/healthcommission/medical-exam-notice.ts +++ b/lib/routes/gov/jinan/healthcommission/medical-exam-notice.ts @@ -50,25 +50,23 @@ async function handler() { return { title: '济南卫建委-执业考试通知', link: `${baseUrl}/col/col14418/index.html`, - item: list - .map((_, item) => { - // 获取每个item对应的html字符串 - item = $(item).text(); + item: list.toArray().map((item) => { + // 获取每个item对应的html字符串 + item = $(item).text(); - // 解析上一步中的html - const html = load(item); + // 解析上一步中的html + const html = load(item); - const title = html('td[width="620"] a').attr('title'); - const link = html('td[width="620"] a').attr('href'); - const date = timezone(parseDate(html('td[width="100"]').text()), +8); - return { - title, - description: title, - pubDate: date, - link, - author: '济南市卫生健康委员会', - }; - }) - .get(), + const title = html('td[width="620"] a').attr('title'); + const link = html('td[width="620"] a').attr('href'); + const date = timezone(parseDate(html('td[width="100"]').text()), +8); + return { + title, + description: title, + pubDate: date, + link, + author: '济南市卫生健康委员会', + }; + }), }; } diff --git a/lib/routes/gov/mee/ywdt.ts b/lib/routes/gov/mee/ywdt.ts index e9f7fe430451..86570a51ff35 100644 --- a/lib/routes/gov/mee/ywdt.ts +++ b/lib/routes/gov/mee/ywdt.ts @@ -52,7 +52,8 @@ async function handler(ctx) { const list = all .find(`div:nth-child(${columns[cate].order})`) .find('.mobile_none li , .mobile_clear li') - .map((_, item) => { + .toArray() + .map((item) => { const title = $(item).find('a.cjcx_biaob').text().trim(); const href = $(item).find('a').attr('href'); @@ -69,8 +70,7 @@ async function handler(ctx) { title, link, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/gov/miit/wjfb.ts b/lib/routes/gov/miit/wjfb.ts index a3808ea4d53f..282a1054ec17 100644 --- a/lib/routes/gov/miit/wjfb.ts +++ b/lib/routes/gov/miit/wjfb.ts @@ -38,11 +38,11 @@ async function handler(ctx) { const indexContent = load(cookieResponse.data); const title = indexContent('div.dqwz > a:nth-child(4)').text(); const dataRequestUrl = indexContent('div.lmy_main_rb > script:nth-child(2)') - .map((_, item) => ({ + .toArray() + .map((item) => ({ url: `${rootUrl}${indexContent(item).attr('url')}`, queryData: JSON.parse(indexContent(item).attr('querydata').replaceAll('"', '|').replaceAll("'", '"').replaceAll('|', '"')), - })) - .get()[0]; + }))[0]; const dataUrl = `${dataRequestUrl.url}?${Object.keys(dataRequestUrl.queryData) .map((key) => `${key}=${dataRequestUrl.queryData[key]}`) @@ -56,12 +56,12 @@ async function handler(ctx) { }); const $ = load(response.data.data.html); const list = $('ul > li') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a').text(), link: new URL($(item).find('a').attr('href'), rootUrl).href, pubDate: parseDate($(item).find('span').text(), 'YYYY-MM-DD'), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/gov/miit/yjzj.ts b/lib/routes/gov/miit/yjzj.ts index 3477a8684c2e..cd0a90196247 100644 --- a/lib/routes/gov/miit/yjzj.ts +++ b/lib/routes/gov/miit/yjzj.ts @@ -37,11 +37,11 @@ async function handler() { const cookie = cookieResponse.headers['set-cookie'][0].split(';')[0]; const indexContent = load(cookieResponse.data); const dataRequestUrl = indexContent('div.clist_con > script:nth-child(2)') - .map((_, item) => ({ + .toArray() + .map((item) => ({ url: `${rootUrl}${indexContent(item).attr('url')}`, queryData: JSON.parse(indexContent(item).attr('querydata').replaceAll('"', '|').replaceAll("'", '"').replaceAll('|', '"')), - })) - .get()[0]; + }))[0]; const dataUrl = `${dataRequestUrl.url}?${Object.keys(dataRequestUrl.queryData) .map((key) => `${key}=${dataRequestUrl.queryData[key]}`) @@ -55,12 +55,12 @@ async function handler() { }); const $ = load(response.data.data.html); const list = $('ul > li') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a').text(), link: new URL($(item).find('a').attr('href'), rootUrl).href, pubDate: parseDate($(item).find('span').text(), 'YYYY-MM-DD'), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/gov/miit/zcwj.ts b/lib/routes/gov/miit/zcwj.ts index 29a313fb30ab..3aac4d5ccbb0 100644 --- a/lib/routes/gov/miit/zcwj.ts +++ b/lib/routes/gov/miit/zcwj.ts @@ -25,7 +25,7 @@ async function handler() { const base_url = 'http://www.miit.gov.cn/n1146295/n1652858/'; const response = await got.get(base_url); const $ = load(response.data); - const list = $('.clist_con li').get(); + const list = $('.clist_con li').toArray(); const ProcessFeed = (data) => { const $ = load(data); diff --git a/lib/routes/gov/moa/moa.ts b/lib/routes/gov/moa/moa.ts index e1e2e2f4d203..fa5b1cdb2a8c 100644 --- a/lib/routes/gov/moa/moa.ts +++ b/lib/routes/gov/moa/moa.ts @@ -82,7 +82,8 @@ async function dealChannel(suburl, selectors) { const channelTitle = channelTitleText ?? $(channelTitleSelector).text(); const pageInfos = $(listSelector) - .map((i, e) => { + .toArray() + .map((e) => { const element = $(e); const titleElement = element.find(titleSelector); @@ -99,8 +100,7 @@ async function dealChannel(suburl, selectors) { // 如果是公示文章或者站外文章的话只能用这个保底了 pubDate: parseRelativeDate(dateraw), }; - }) - .get(); + }); const items = await Promise.all( pageInfos.map(async (item) => { diff --git a/lib/routes/gov/moe/moe.ts b/lib/routes/gov/moe/moe.ts index 24f8eee761dd..716b8ea2f96b 100644 --- a/lib/routes/gov/moe/moe.ts +++ b/lib/routes/gov/moe/moe.ts @@ -61,48 +61,46 @@ async function handler(ctx) { title: name, link: moeUrl, item: await Promise.all( - newsLis - .map(async (_, item) => { - item = $(item); + newsLis.toArray().map(async (item) => { + item = $(item); - const firstA = item.find('a'); - const itemUrl = new URL(firstA.attr('href'), moeUrl).href; + const firstA = item.find('a'); + const itemUrl = new URL(firstA.attr('href'), moeUrl).href; - // some live pages have no content, just return the liva page url - const infos = itemUrl.includes('/live/') - ? { - description: firstA.html(), - } - : await cache.tryGet(itemUrl, async () => { - const res = {}; - const response = await got({ - method: 'get', - url: itemUrl, - headers: { - Referer: moeUrl, - }, - }); - const data = load(response.data); + // some live pages have no content, just return the liva page url + const infos = itemUrl.includes('/live/') + ? { + description: firstA.html(), + } + : await cache.tryGet(itemUrl, async () => { + const res = {}; + const response = await got({ + method: 'get', + url: itemUrl, + headers: { + Referer: moeUrl, + }, + }); + const data = load(response.data); - if (itemUrl.includes('www.gov.cn')) { - res.description = data('#UCAP-CONTENT').html(); - } else if (itemUrl.includes('srcsite')) { - res.description = data('div#content_body_xxgk').html(); - } else if (itemUrl.includes('jyb_')) { - res.description = data('div.moe-detail-box').html() || data('div#moe-detail-box').html(); - } + if (itemUrl.includes('www.gov.cn')) { + res.description = data('#UCAP-CONTENT').html(); + } else if (itemUrl.includes('srcsite')) { + res.description = data('div#content_body_xxgk').html(); + } else if (itemUrl.includes('jyb_')) { + res.description = data('div.moe-detail-box').html() || data('div#moe-detail-box').html(); + } - return res; - }); + return res; + }); - return { - title: firstA.text(), - description: infos.description, - link: itemUrl, - pubDate: parseDate(item.find('span').text(), 'MM-DD'), - }; - }) - .get() + return { + title: firstA.text(), + description: infos.description, + link: itemUrl, + pubDate: parseDate(item.find('span').text(), 'MM-DD'), + }; + }) ), }; } diff --git a/lib/routes/gov/nrta/news.ts b/lib/routes/gov/nrta/news.ts index 3519b86523ff..8607eeb173a4 100644 --- a/lib/routes/gov/nrta/news.ts +++ b/lib/routes/gov/nrta/news.ts @@ -52,13 +52,13 @@ async function handler(ctx) { }); const list = $('a', 'record') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { diff --git a/lib/routes/gov/pbc/goutongjiaoliu.ts b/lib/routes/gov/pbc/goutongjiaoliu.ts index b8ce305d3d1a..9d906f72544a 100644 --- a/lib/routes/gov/pbc/goutongjiaoliu.ts +++ b/lib/routes/gov/pbc/goutongjiaoliu.ts @@ -45,15 +45,15 @@ async function handler() { const $ = load(html); const list = $('font.newslist_style') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('a[title]'); return { title: a.attr('title'), link: new URL(a.attr('href'), 'http://www.pbc.gov.cn').href, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/gov/pbc/gzlw.ts b/lib/routes/gov/pbc/gzlw.ts index c750d8bdce66..e1dd5bc364fd 100644 --- a/lib/routes/gov/pbc/gzlw.ts +++ b/lib/routes/gov/pbc/gzlw.ts @@ -35,12 +35,12 @@ async function handler() { const response = await got.post(url); const $ = load(response.data); const list = $('li.clearfix') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a').text(), link: new URL($(item).find('a').attr('href'), host).href, author: $(item).find('span.fr').text().replaceAll('…', ''), - })) - .get(); + })); const items = await processItems(list); diff --git a/lib/routes/gov/pbc/trade-announcement.ts b/lib/routes/gov/pbc/trade-announcement.ts index ecdfa4f63305..74e39550f932 100644 --- a/lib/routes/gov/pbc/trade-announcement.ts +++ b/lib/routes/gov/pbc/trade-announcement.ts @@ -38,15 +38,15 @@ async function handler() { const html = await page.evaluate(() => document.documentElement.innerHTML); const $ = load(html); const list = $('font.newslist_style') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('a[title]'); return { title: a.attr('title'), link: new URL(a.attr('href'), 'http://www.pbc.gov.cn').href, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/gov/pbc/zcyj.ts b/lib/routes/gov/pbc/zcyj.ts index a92a46e55713..27936fa2e0aa 100644 --- a/lib/routes/gov/pbc/zcyj.ts +++ b/lib/routes/gov/pbc/zcyj.ts @@ -26,12 +26,12 @@ async function handler() { const response = await got.post(url); const $ = load(response.data); const list = $('li.clearfix') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a').text(), link: new URL($(item).find('a').attr('href'), host).href, pubDate: timezone(parseDate($(item).find('span.fr').text(), 'YYYY-MM-DD'), +8), - })) - .get(); + })); const items = await processItems(list); diff --git a/lib/routes/gov/sh/rsj/ksxm.ts b/lib/routes/gov/sh/rsj/ksxm.ts index cb7999803efa..402b4e4f5cbe 100644 --- a/lib/routes/gov/sh/rsj/ksxm.ts +++ b/lib/routes/gov/sh/rsj/ksxm.ts @@ -44,7 +44,8 @@ async function handler() { const $ = load(dataHtml); const items = $('kwap') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('kaosxmmc').text(), link: `http://www.rsj.sh.gov.cn/ksyzc/index801.jsp`, description: art(path.join(__dirname, './templates/ksxm.art'), { @@ -54,8 +55,7 @@ async function handler() { registrationDeadline: $(item).find('baomksrq_A300').text(), }), guid: `${$(item).find('kaosrq').text()}${$(item).find('kaosxmmc').text()}`, - })) - .get(); + })); return { title: '上海市职业能力考试院 - 考试项目', diff --git a/lib/routes/gov/sh/wgj/wgj.ts b/lib/routes/gov/sh/wgj/wgj.ts index 5cfbc11c3d2a..105efff699bc 100644 --- a/lib/routes/gov/sh/wgj/wgj.ts +++ b/lib/routes/gov/sh/wgj/wgj.ts @@ -48,14 +48,14 @@ async function handler(ctx) { const $ = load(response.data); const list = $('#div_md > table > tbody > tr > td:nth-child(1) > a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.prop('innerText').replaceAll(/\s/g, ''), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { diff --git a/lib/routes/gov/sh/wsjkw/yqtb/index.ts b/lib/routes/gov/sh/wsjkw/yqtb/index.ts index d0739db8c8f7..298476c1ad2c 100644 --- a/lib/routes/gov/sh/wsjkw/yqtb/index.ts +++ b/lib/routes/gov/sh/wsjkw/yqtb/index.ts @@ -36,23 +36,19 @@ async function handler() { return { title: '疫情通报-上海卫健委', link: url, - item: - list && - list - .map((index, item) => { - item = $(item); - const title = item.find('a').text(); - const address = item.find('a').attr('href'); - const host = `https://wsjkw.sh.gov.cn`; - const pubDate = parseDate(item.find('span').text(), 'YYYY-MM-DD'); - return { - title, - description: title, - pubDate, - link: host + address, - guid: host + address, - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + const title = item.find('a').text(); + const address = item.find('a').attr('href'); + const host = `https://wsjkw.sh.gov.cn`; + const pubDate = parseDate(item.find('span').text(), 'YYYY-MM-DD'); + return { + title, + description: title, + pubDate, + link: host + address, + guid: host + address, + }; + }), }; } diff --git a/lib/routes/gov/shenzhen/hrss/szksy/index.ts b/lib/routes/gov/shenzhen/hrss/szksy/index.ts index b9a4a045a406..24653b20e3d5 100644 --- a/lib/routes/gov/shenzhen/hrss/szksy/index.ts +++ b/lib/routes/gov/shenzhen/hrss/szksy/index.ts @@ -50,7 +50,8 @@ async function handler(ctx) { const title = $('.zx_rm_tit span').text().trim(); const list = $('.zx_ml_list ul li') .slice(1) - .map((_, item) => { + .toArray() + .map((item) => { const tag = $(item).find('div.list_name a'); const tag2 = $(item).find('span:eq(1)'); return { @@ -58,8 +59,7 @@ async function handler(ctx) { link: tag.attr('href'), pubDate: timezone(parseDate(tag2.text().trim(), 'YYYY/MM/DD'), 0), }; - }) - .get(); + }); return { title: '深圳市考试院 - ' + title, diff --git a/lib/routes/gov/shenzhen/zzb/index.ts b/lib/routes/gov/shenzhen/zzb/index.ts index f4e8d06a1f80..a3650db5b792 100644 --- a/lib/routes/gov/shenzhen/zzb/index.ts +++ b/lib/routes/gov/shenzhen/zzb/index.ts @@ -49,7 +49,8 @@ async function handler(ctx) { const $ = load(response.data); const title = $('#Title').text().trim(); const list = $('#List tbody tr td table tbody tr td[width="96%"]') - .map((_, item) => { + .toArray() + .map((item) => { const tag = $(item).find('font a'); const tag2 = $(item).find('font[size="2px"]'); return { @@ -57,8 +58,7 @@ async function handler(ctx) { link: tag.attr('href'), pubDate: timezone(parseDate(tag2.text().trim(), 'YYYY/MM/DD'), 0), }; - }) - .get(); + }); return { title: '深圳组工在线 - ' + title, diff --git a/lib/routes/gov/taiyuan/rsj.ts b/lib/routes/gov/taiyuan/rsj.ts index f28f279863e1..7b49178e6a7b 100644 --- a/lib/routes/gov/taiyuan/rsj.ts +++ b/lib/routes/gov/taiyuan/rsj.ts @@ -50,7 +50,8 @@ async function handler(ctx) { const $ = load(response.data, { decodeEntities: false }); const title = $('.tit').find('a:eq(2)').text(); const list = $('.RightSide_con ul li') - .map((_, item) => { + .toArray() + .map((item) => { const link = $(item).find('a'); const date = $(item).find('span.fr'); return { @@ -58,8 +59,7 @@ async function handler(ctx) { link: link.attr('href'), pubDate: timezone(parseDate(date.text(), 'YYYY-MM-DD'), +8), }; - }) - .get(); + }); return { title: '太原市人力资源和社会保障局 - ' + title, diff --git a/lib/routes/greasyfork/feedback.ts b/lib/routes/greasyfork/feedback.ts index 22fcf5dab247..de5bfa5804c4 100644 --- a/lib/routes/greasyfork/feedback.ts +++ b/lib/routes/greasyfork/feedback.ts @@ -38,7 +38,7 @@ async function handler(ctx) { link: currentUrl, description: $('meta[name=description]').attr('content'), item: $('.script-discussion-list .discussion-list-container .discussion-list-item') - .get() + .toArray() .map((item) => { item = $(item); const metaItem = item.find('.discussion-meta .discussion-meta-item').eq(0); diff --git a/lib/routes/greasyfork/versions.ts b/lib/routes/greasyfork/versions.ts index 6384ad4b44b6..5ece426a438c 100644 --- a/lib/routes/greasyfork/versions.ts +++ b/lib/routes/greasyfork/versions.ts @@ -37,7 +37,7 @@ async function handler(ctx) { link: currentUrl, description: $('meta[name=description]').attr('content'), item: $('.history_versions li') - .get() + .toArray() .map((item) => { item = $(item); const versionNumberLink = item.find('.version-number a'); diff --git a/lib/routes/guangdiu/cheaps.ts b/lib/routes/guangdiu/cheaps.ts index e5bfe6d29c57..74ed403dbe9f 100644 --- a/lib/routes/guangdiu/cheaps.ts +++ b/lib/routes/guangdiu/cheaps.ts @@ -31,13 +31,13 @@ async function handler(ctx) { const $ = load(response.data); const items = $('div.cheapitem.rightborder') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('div.cheaptitle').text().trim() + $(item).find('a.cheappriceword').text(), link: $(item).find('a.cheappriceword').attr('href'), description: $(item).find('div.cheapimga').html(), pubDate: parseRelativeDate($(item).find('span.cheapaddtimeword').text()), - })) - .get(); + })); return { title: `逛丢 - 九块九`, diff --git a/lib/routes/guangdiu/index.ts b/lib/routes/guangdiu/index.ts index 29c4fa281edf..cb0f5435811f 100644 --- a/lib/routes/guangdiu/index.ts +++ b/lib/routes/guangdiu/index.ts @@ -34,11 +34,11 @@ async function handler(ctx) { const response = await got(url); const $ = load(response.data); const list = $('#mainleft > div.zkcontent > div.gooditem') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a.goodname').text().trim(), link: new URL($(item).find('div.iteminfoarea > h2 > a').attr('href'), host).href, - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/guangdiu/rank.ts b/lib/routes/guangdiu/rank.ts index 096d99b7e76f..6221763118c3 100644 --- a/lib/routes/guangdiu/rank.ts +++ b/lib/routes/guangdiu/rank.ts @@ -36,11 +36,11 @@ async function handler() { const response = await got(url); const $ = load(response.data); const list = $('div.hourrankitem') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a.hourranktitle').text(), link: new URL($(item).find('a.hourranktitle').attr('href'), host).href, - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/guangdiu/search.ts b/lib/routes/guangdiu/search.ts index 413ca7e20542..b04aa025c82f 100644 --- a/lib/routes/guangdiu/search.ts +++ b/lib/routes/guangdiu/search.ts @@ -30,11 +30,11 @@ async function handler(ctx) { const response = await got(url); const $ = load(response.data); const list = $('#mainleft > div.zkcontent > div.gooditem') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a.goodname').text().trim(), link: `${host}/${$(item).find('a.goodname').attr('href')}`, - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/guangzhoumetro/news.ts b/lib/routes/guangzhoumetro/news.ts index e322907afcdd..025c2cf12d8d 100644 --- a/lib/routes/guangzhoumetro/news.ts +++ b/lib/routes/guangzhoumetro/news.ts @@ -28,7 +28,8 @@ async function handler() { const $ = load(data); const list = $('ul.ag_h_w li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const url = newsUrl + item.find('a').attr('href').slice(2); const title = item.find('a').text(); @@ -39,8 +40,7 @@ async function handler() { author: '广州地铁', pubtime: publishTime, }; - }) - .get(); + }); return { title: '广州地铁新闻', diff --git a/lib/routes/hackernews/index.ts b/lib/routes/hackernews/index.ts index cb3ba7f73317..150a481dbf68 100644 --- a/lib/routes/hackernews/index.ts +++ b/lib/routes/hackernews/index.ts @@ -59,7 +59,8 @@ async function handler(ctx) { const list = $('.athing') .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 30) - .map((_, thing) => { + .toArray() + .map((thing) => { thing = $(thing); const item = {}; @@ -83,8 +84,7 @@ async function handler(ctx) { item.description = `Comments on Hacker News | Source`; return item; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/hackyournews/index.ts b/lib/routes/hackyournews/index.ts index 8096a76c8364..56b0ed6abb41 100644 --- a/lib/routes/hackyournews/index.ts +++ b/lib/routes/hackyournews/index.ts @@ -24,7 +24,8 @@ async function handler() { const $ = load(response); const item = $('tr.story') - .map((_, story) => { + .toArray() + .map((story) => { const title = $(story).find('a').first().text(); const nextRow = $(story).next(); const metas = nextRow.text().trimStart().split('|'); @@ -41,8 +42,8 @@ async function handler() { const comments = Number.parseInt(a.text()); const description = nextRow .find('p') - .map((_, p) => $(p).text()) - .get() + .toArray() + .map((p) => $(p).text()) .join('
'); return { title, @@ -54,8 +55,7 @@ async function handler() { pubDate, description, }; - }) - .get(); + }); return { title: 'Index', diff --git a/lib/routes/hafu/utils.ts b/lib/routes/hafu/utils.ts index f7e499f6f391..34f4fae25d3a 100644 --- a/lib/routes/hafu/utils.ts +++ b/lib/routes/hafu/utils.ts @@ -87,42 +87,40 @@ function tryGetAttachments(articleData, articleBody, type) { async function ggtzParse(ctx, $) { const data = $('a[class=c269582]').parent().slice(0, limit); const resultItems = await Promise.all( - data - .map(async (_, item) => { - // .slice(3) for cut out str '../' in original link - const href = $(item).find('a[class=c269582]').attr('href').slice(3); - const link = typeMap.ggtz.root + href; - const title = $(item).find('a[class=c269582]').attr('title'); - - const result = await cache.tryGet(link, async () => { - const { articleData, description } = await tryGetFullText(href, link, 'ggtz'); - let author = ''; - let pubDate = ''; - if (typeof articleData === 'function') { - const header = articleData('h1').next().text(); - const index = header.indexOf('日期'); - - author = header.slice(0, index - 2) || ''; - - const date = header.substring(index + 3, index + 19); - pubDate = parseDate(date, 'YYYY-MM-DD HH:mm'); - } else { - const date = $(item).find('a[class=c269582_date]').text(); - pubDate = parseDate(date, 'YYYY-MM-DD'); - } - - return { - title, - description, - pubDate: timezone(pubDate, +8), - link, - author, - }; - }); - - return result; - }) - .get() + data.toArray().map(async (item) => { + // .slice(3) for cut out str '../' in original link + const href = $(item).find('a[class=c269582]').attr('href').slice(3); + const link = typeMap.ggtz.root + href; + const title = $(item).find('a[class=c269582]').attr('title'); + + const result = await cache.tryGet(link, async () => { + const { articleData, description } = await tryGetFullText(href, link, 'ggtz'); + let author = ''; + let pubDate = ''; + if (typeof articleData === 'function') { + const header = articleData('h1').next().text(); + const index = header.indexOf('日期'); + + author = header.slice(0, index - 2) || ''; + + const date = header.substring(index + 3, index + 19); + pubDate = parseDate(date, 'YYYY-MM-DD HH:mm'); + } else { + const date = $(item).find('a[class=c269582_date]').text(); + pubDate = parseDate(date, 'YYYY-MM-DD'); + } + + return { + title, + description, + pubDate: timezone(pubDate, +8), + link, + author, + }; + }); + + return result; + }) ); return resultItems; @@ -132,35 +130,33 @@ async function ggtzParse(ctx, $) { async function jwcParse(ctx, $) { const data = $('a[class=c259713]').parent().parent().slice(0, limit); const resultItems = await Promise.all( - data - .map(async (_, item) => { - const href = $(item).find('a[class=c259713]').attr('href'); - const link = typeMap.jwc.root + href; - const title = $(item).find('a[class=c259713]').attr('title'); - - const date = $(item).find('span[class=timestyle259713]').text(); - const pubDate = parseDate(date, 'YYYY/MM/DD'); - - const result = await cache.tryGet(link, async () => { - const { articleData, description } = await tryGetFullText(href, link, 'jwc'); - - let author = ''; - if (typeof articleData === 'function') { - author = articleData('span[class=authorstyle259690]').text(); - } - - return { - title, - description, - pubDate: timezone(pubDate, +8), - link, - author: '供稿单位:' + author, - }; - }); - - return result; - }) - .get() + data.toArray().map(async (item) => { + const href = $(item).find('a[class=c259713]').attr('href'); + const link = typeMap.jwc.root + href; + const title = $(item).find('a[class=c259713]').attr('title'); + + const date = $(item).find('span[class=timestyle259713]').text(); + const pubDate = parseDate(date, 'YYYY/MM/DD'); + + const result = await cache.tryGet(link, async () => { + const { articleData, description } = await tryGetFullText(href, link, 'jwc'); + + let author = ''; + if (typeof articleData === 'function') { + author = articleData('span[class=authorstyle259690]').text(); + } + + return { + title, + description, + pubDate: timezone(pubDate, +8), + link, + author: '供稿单位:' + author, + }; + }); + + return result; + }) ); return resultItems; @@ -170,37 +166,35 @@ async function jwcParse(ctx, $) { async function zsjycParse(ctx, $) { const data = $('a[class=c127701]').parent().parent().slice(0, limit); const resultItems = await Promise.all( - data - .map(async (_, item) => { - const href = $(item).find('a[class=c127701]').attr('href'); - const link = typeMap.zsjyc.root + href; - - const title = $(item).find('a[class=c127701]').attr('title'); - - const result = await cache.tryGet(link, async () => { - const { articleData, description } = await tryGetFullText(href, link, 'zsjyc'); - - let pubDate = ''; - if (typeof articleData === 'function') { - const date = articleData('span[class=timestyle127702]').text(); - pubDate = parseDate(date, 'YYYY-MM-DD HH:mm'); - } else { - const date = $(item).find('a[class=c269582_date]').text(); - pubDate = parseDate(date, 'YYYY-MM-DD'); - } - - return { - title, - description, - pubDate: timezone(pubDate, +8), - link, - author: '供稿单位:招生就业处', - }; - }); - - return result; - }) - .get() + data.toArray().map(async (item) => { + const href = $(item).find('a[class=c127701]').attr('href'); + const link = typeMap.zsjyc.root + href; + + const title = $(item).find('a[class=c127701]').attr('title'); + + const result = await cache.tryGet(link, async () => { + const { articleData, description } = await tryGetFullText(href, link, 'zsjyc'); + + let pubDate = ''; + if (typeof articleData === 'function') { + const date = articleData('span[class=timestyle127702]').text(); + pubDate = parseDate(date, 'YYYY-MM-DD HH:mm'); + } else { + const date = $(item).find('a[class=c269582_date]').text(); + pubDate = parseDate(date, 'YYYY-MM-DD'); + } + + return { + title, + description, + pubDate: timezone(pubDate, +8), + link, + author: '供稿单位:招生就业处', + }; + }); + + return result; + }) ); return resultItems; diff --git a/lib/routes/hbr/topic.ts b/lib/routes/hbr/topic.ts index b40c2bcd2760..d2adb3e6db29 100644 --- a/lib/routes/hbr/topic.ts +++ b/lib/routes/hbr/topic.ts @@ -58,7 +58,8 @@ async function handler(ctx) { const list = $(`stream-content[data-stream-name="${type}"]`) .find('.stream-item') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { @@ -67,8 +68,7 @@ async function handler(ctx) { category: item.attr('data-topic'), link: `${rootUrl}${item.attr('data-url')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/hdu/cs/notice.ts b/lib/routes/hdu/cs/notice.ts index fd300ce83d6c..4686573b2032 100644 --- a/lib/routes/hdu/cs/notice.ts +++ b/lib/routes/hdu/cs/notice.ts @@ -13,21 +13,16 @@ const getSingleRecord = async () => { const $ = load(res.data); const list = $('.posts-list').find('li'); - return ( - list && - list - .map((index, item) => { - item = $(item); - const dateTxt = item.find('.date').text(); - const date = dateTxt.slice(1, -1); - return { - title: item.find('a').text(), - pubDate: parseDate(date), - link: link + item.find('a').attr('href'), - }; - }) - .get() - ); + return list.toArray().map((item) => { + item = $(item); + const dateTxt = item.find('.date').text(); + const date = dateTxt.slice(1, -1); + return { + title: item.find('a').text(), + pubDate: parseDate(date), + link: link + item.find('a').attr('href'), + }; + }); }; export const route: Route = { diff --git a/lib/routes/hdu/cs/pg.ts b/lib/routes/hdu/cs/pg.ts index 9e2772a17646..07ee8af2afbe 100644 --- a/lib/routes/hdu/cs/pg.ts +++ b/lib/routes/hdu/cs/pg.ts @@ -13,21 +13,16 @@ const getSingleRecord = async () => { const $ = load(res.data); const list = $('.posts-list').find('li'); - return ( - list && - list - .map((index, item) => { - item = $(item); - const dateTxt = item.find('.date').text(); - const date = dateTxt.slice(1, -1); - return { - title: item.find('a').text(), - pubDate: parseDate(date), - link: link + item.find('a').attr('href'), - }; - }) - .get() - ); + return list.toArray().map((item) => { + item = $(item); + const dateTxt = item.find('.date').text(); + const date = dateTxt.slice(1, -1); + return { + title: item.find('a').text(), + pubDate: parseDate(date), + link: link + item.find('a').attr('href'), + }; + }); }; export const route: Route = { diff --git a/lib/routes/hellobtc/information.ts b/lib/routes/hellobtc/information.ts index 50b424ba3333..b9b735d60736 100644 --- a/lib/routes/hellobtc/information.ts +++ b/lib/routes/hellobtc/information.ts @@ -43,11 +43,11 @@ async function handler(ctx) { const $ = load(response.data); const list = $(channelSelector[channel]) .find('div.new_item') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('h2').text(), link: $(item).find('a').attr('href'), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/hellobtc/kepu.ts b/lib/routes/hellobtc/kepu.ts index 3f71ce418716..490365ea7754 100644 --- a/lib/routes/hellobtc/kepu.ts +++ b/lib/routes/hellobtc/kepu.ts @@ -58,11 +58,11 @@ async function handler(ctx) { const $ = load(response.data); const list = $(channelSelector[channel]) .find('div.new_item') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a').text(), link: $(item).find('a').attr('href'), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/hellobtc/news.ts b/lib/routes/hellobtc/news.ts index 4e7d0646eb3b..64fd9dc2a7bc 100644 --- a/lib/routes/hellobtc/news.ts +++ b/lib/routes/hellobtc/news.ts @@ -37,14 +37,14 @@ async function handler() { const $ = load(response.data); const items = $('nav.js-nav') .find('div.item') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('h2').text(), link: $(item).find('a').attr('href'), description: $(item).find('div.sub').text(), pubDate: timezone(parseDate($(item).find('span.date').text(), 'MM-DD HH:mm'), +8), })) - .filter(Boolean) - .get(); + .filter(Boolean); return { title: `白话区块链 - 快讯`, diff --git a/lib/routes/hicairo/rss.ts b/lib/routes/hicairo/rss.ts index 8a24a22e0de8..2798fea09a00 100644 --- a/lib/routes/hicairo/rss.ts +++ b/lib/routes/hicairo/rss.ts @@ -24,7 +24,8 @@ async function handler() { const title_main = $('channel > title').text(); const description_main = $('channel > description').text(); const items = $('channel > item') - .map((_, item) => { + .toArray() + .map((item) => { const $item = $(item); const link = $item.find('link').text(); const title = $item.find('title').text(); @@ -36,8 +37,7 @@ async function handler() { title, description, }; - }) - .get(); + }); return { title: title_main, diff --git a/lib/routes/hit/hitgs.ts b/lib/routes/hit/hitgs.ts index 2089234563c1..a38de90b4ee9 100644 --- a/lib/routes/hit/hitgs.ts +++ b/lib/routes/hit/hitgs.ts @@ -39,13 +39,13 @@ async function handler() { const $ = load(response.data); const list = $('.news_list li') - .map((i, e) => ({ + .toArray() + .map((e) => ({ pubDate: parseDate($('span:nth-child(4)', e).text()), title: $('span.Article_BelongCreateOrg.newsfb', e).text() + $('span a', e).attr('title'), category: $('span.Article_BelongCreateOrg.newsfb', e).text().slice(1, -1), link: host + $('span a', e).attr('href'), - })) - .get(); + })); const out = await Promise.all( list.map((item) => diff --git a/lib/routes/hitwh/today.ts b/lib/routes/hitwh/today.ts index 3be5f9a05d78..4433eb45c1c3 100644 --- a/lib/routes/hitwh/today.ts +++ b/lib/routes/hitwh/today.ts @@ -40,12 +40,12 @@ async function handler() { const $ = load(response.data); const type = (filename) => filename.split('.').pop(); const links = $('.list_list_wrap #wp_news_w10002 ul > li') - .map((_, el) => ({ + .toArray() + .map((el) => ({ pubDate: timezone(parseDate($(el).find('.news-time2').text()), 8), link: new URL($(el).find('a').attr('href'), baseUrl).toString(), title: $(el).find('a').text(), - })) - .get(); + })); return { title: '哈尔滨工业大学(威海)通知公告', diff --git a/lib/routes/hkej/index.ts b/lib/routes/hkej/index.ts index 4ee74b14d4f4..909eeb5c9d67 100644 --- a/lib/routes/hkej/index.ts +++ b/lib/routes/hkej/index.ts @@ -100,14 +100,14 @@ async function handler(ctx) { const $ = load(response.data); const list = $('h3.in_news_u_t a, h4.hkej_hl-news_topic_2014 a, div.hkej_toc_listingAll_news2_2014 h3 a, div.hkej_toc_cat_top_detail h3 a, div.allNews div.news h1 a, div#div_listingAll div.news2 h3 a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text().trim(), link: baseUrl + item.attr('href').slice(0, item.attr('href').lastIndexOf('/')), }; - }) - .get(); + }); const renderArticleImg = (pics) => art(path.join(__dirname, 'templates/articleImg.art'), { @@ -142,15 +142,13 @@ async function handler(ctx) { content('.hkej_sub_ex_article_nonsubscriber_ad_2014').remove(); // fix article image - const articleImg = (content('div.hkej_detail_thumb_2014 td a').length ? content('div.hkej_detail_thumb_2014 td a') : content('div.thumb td a')) - .map((_, e) => { - e = $(e); - return { - href: e.attr('href'), - title: e.attr('title'), - }; - }) - .get(); + const articleImg = (content('div.hkej_detail_thumb_2014 td a').length ? content('div.hkej_detail_thumb_2014 td a') : content('div.thumb td a')).toArray().map((e) => { + e = $(e); + return { + href: e.attr('href'), + title: e.attr('title'), + }; + }); const pubDate = content('p.info span.date').text().trim(); diff --git a/lib/routes/hkjunkcall/index.ts b/lib/routes/hkjunkcall/index.ts index 4b0e320c332c..21c3de2daaff 100644 --- a/lib/routes/hkjunkcall/index.ts +++ b/lib/routes/hkjunkcall/index.ts @@ -30,15 +30,15 @@ async function handler() { const $ = load(response.data); const list = $('.hh15') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item).parent(); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/hotukdeals/index.ts b/lib/routes/hotukdeals/index.ts index 4b6bfc43b7f1..ba133432de08 100644 --- a/lib/routes/hotukdeals/index.ts +++ b/lib/routes/hotukdeals/index.ts @@ -39,7 +39,8 @@ async function handler(ctx) { title: `hotukdeals ${type}`, link: `https://www.hotukdeals.com/${type}`, item: list - .map((index, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.find('.cept-tt').text(), @@ -47,7 +48,6 @@ async function handler(ctx) { link: item.find('.cept-tt').attr('href'), }; }) - .get() .reverse(), }; } diff --git a/lib/routes/howtoforge/rss.ts b/lib/routes/howtoforge/rss.ts index 853f26718898..fe189ef4a983 100644 --- a/lib/routes/howtoforge/rss.ts +++ b/lib/routes/howtoforge/rss.ts @@ -24,7 +24,8 @@ async function handler() { const titleMain = $('channel > title').text(); const descriptionMain = $('channel > description').text(); const items = $('channel > item') - .map((_, item) => { + .toArray() + .map((item) => { const $item = $(item); const link = $item.find('link').text(); const title = $item.find('title').text(); @@ -36,8 +37,7 @@ async function handler() { title, description, }; - }) - .get(); + }); return { title: titleMain, diff --git a/lib/routes/hpoi/banner-item.ts b/lib/routes/hpoi/banner-item.ts index e68d9a75d080..8643fce5c75c 100644 --- a/lib/routes/hpoi/banner-item.ts +++ b/lib/routes/hpoi/banner-item.ts @@ -37,7 +37,8 @@ async function handler() { title: `Hpoi 手办维基 - 热门推荐`, link, item: $('#content .item') - .map((_index, _item) => { + .toArray() + .map((_item) => { _item = $(_item); return { title: _item.find('.title').text(), @@ -45,7 +46,6 @@ async function handler() { description: ``, pubDate: new Date(_item.find('.time').text().replace('发布时间:', '')).toUTCString(), }; - }) - .get(), + }), }; } diff --git a/lib/routes/hpoi/info.ts b/lib/routes/hpoi/info.ts index 6d9177f506d0..3af1556191ea 100644 --- a/lib/routes/hpoi/info.ts +++ b/lib/routes/hpoi/info.ts @@ -45,7 +45,8 @@ async function handler(ctx) { const $ = load(response.data); const items = $('.home-info') - .map((_, ele) => { + .toArray() + .map((ele) => { const $item = load(ele); const leftNode = $item('.overlay-container'); const relativeLink = leftNode.find('a').first().attr('href'); @@ -62,8 +63,7 @@ async function handler(ctx) { category: infoType, description: [`类型:${typeName}`, infoTitle, `更新内容: ${infoType}`, ``].join('
'), }; - }) - .get(); + }); const typeToLabel = { all: '全部', diff --git a/lib/routes/hpoi/user.ts b/lib/routes/hpoi/user.ts index 4f11bd557bad..38ee4584ffd2 100644 --- a/lib/routes/hpoi/user.ts +++ b/lib/routes/hpoi/user.ts @@ -56,15 +56,15 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.collect-hobby-list-small') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: titleMap[caty] + ': ' + item.find('.name').text(), link: 'https://www.hpoi.net/' + item.find('.name').attr('href'), description: `
${item.find('.pay').text()}
${item.find('.score').text()}`, }; - }) - .get(); + }); const title = $('.hpoi-collect-head .info p').eq(0).text() + '的手办 - ' + titleMap[caty]; diff --git a/lib/routes/hpoi/utils.ts b/lib/routes/hpoi/utils.ts index 87561fb69cdc..73b8c6c55c04 100644 --- a/lib/routes/hpoi/utils.ts +++ b/lib/routes/hpoi/utils.ts @@ -65,15 +65,15 @@ const ProcessFeed = async (type, id, order) => { title: `Hpoi 手办维基 - ${MAPs[type].title}${id ? ` ${id}` : ''}`, link, item: $('.hpoi-glyphicons-list li') - .map((_index, _item) => { + .toArray() + .map((_item) => { _item = $(_item); return { title: _item.find('.hpoi-detail-grid-title a').text(), link: host + '/' + _item.find('a').attr('href'), description: `${_item.find('.hpoi-detail-grid-info').html().replaceAll('span>', 'p>')}`, }; - }) - .get(), + }), }; }; diff --git a/lib/routes/hrbeu/gx/card.ts b/lib/routes/hrbeu/gx/card.ts index a02b6cfea17c..a854508b8770 100644 --- a/lib/routes/hrbeu/gx/card.ts +++ b/lib/routes/hrbeu/gx/card.ts @@ -29,13 +29,13 @@ async function handler(ctx) { .replaceAll(/[\n\r ]/g, ''); const card = $('li.clearfix') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('div.list-right-tt').text(), pubDate: parseDate($(item).find('.news-date-li').text(), 'DDYYYY-MM'), link: $(item).find('a').attr('href'), description: $(item).find('div.list-right-p').text(), - })) - .get(); + })); return { title: '工学-' + bigTitle, diff --git a/lib/routes/hrbeu/gx/list.ts b/lib/routes/hrbeu/gx/list.ts index b8539ed4a46f..c05b5ea9a92e 100644 --- a/lib/routes/hrbeu/gx/list.ts +++ b/lib/routes/hrbeu/gx/list.ts @@ -30,7 +30,8 @@ async function handler(ctx) { .replaceAll(/[\n\r ]/g, ''); const list = $('li.txt-elise') - .map((_, item) => { + .toArray() + .map((item) => { let link = $(item).find('a').attr('href'); if (link.includes('info') && id !== '') { link = new URL(link, rootUrl).href; @@ -43,8 +44,7 @@ async function handler(ctx) { pubDate: parseDate($(item).find('span').text()), link, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/hrbeu/job/bigemploy.ts b/lib/routes/hrbeu/job/bigemploy.ts index 49105af5db0f..95c53fc7ca05 100644 --- a/lib/routes/hrbeu/job/bigemploy.ts +++ b/lib/routes/hrbeu/job/bigemploy.ts @@ -33,13 +33,13 @@ async function handler() { const $ = load(response.data); const list = $('div.articlecontent') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a.bigTitle').text(), pubDate: parseDate($(item).find('p').eq(1).text().replace('时间:', '').trim()), description: '点击标题,登录查看招聘详情', link: $(item).find('a.bigTitle').attr('href'), - })) - .get(); + })); return { title: '大型招聘会', diff --git a/lib/routes/hrbeu/job/calendar.ts b/lib/routes/hrbeu/job/calendar.ts index fcc61d51363d..2ea0d0cb658f 100644 --- a/lib/routes/hrbeu/job/calendar.ts +++ b/lib/routes/hrbeu/job/calendar.ts @@ -65,12 +65,12 @@ async function handler() { const $ = load(todayResponse); const list = $('li.clearfix') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('span.news_tit.news_tit_s').find('a').attr('title'), description: '点击标题,登录查看招聘详情', link: $(item).find('span.news_tit.news_tit_s').find('a').attr('href'), - })) - .get(); + })); return { title: '今日招聘会', diff --git a/lib/routes/hrbeu/job/list.ts b/lib/routes/hrbeu/job/list.ts index e21e8c185d92..4c02a1eb6e87 100644 --- a/lib/routes/hrbeu/job/list.ts +++ b/lib/routes/hrbeu/job/list.ts @@ -50,7 +50,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('li.list_item.i1') - .map((_, item) => { + .toArray() + .map((item) => { let link = $(item).find('a').attr('href'); if (link.includes('HrbeuJY')) { link = `${rootUrl}${link}`; @@ -60,8 +61,7 @@ async function handler(ctx) { pubDate: parseDate($(item).find('.Article_PublishDate').text()), link, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/hrbeu/uae/news.ts b/lib/routes/hrbeu/uae/news.ts index 413f574fca4d..0f0962088336 100644 --- a/lib/routes/hrbeu/uae/news.ts +++ b/lib/routes/hrbeu/uae/news.ts @@ -45,7 +45,8 @@ async function handler(ctx) { const $ = load(response.data); const title = $('h2').text(); const items = $('li.wow.fadeInUp') - .map((_, item) => { + .toArray() + .map((item) => { const title = $(item).find('a').attr('title'); let link = $(item).find('a').attr('href'); if (!link.startsWith('http')) { @@ -62,8 +63,7 @@ async function handler(ctx) { pubDate, link, }; - }) - .get(); + }); const item = await Promise.all( items.map((item) => diff --git a/lib/routes/hrbeu/yjsy/list.ts b/lib/routes/hrbeu/yjsy/list.ts index c25c806359a4..d101b101b226 100644 --- a/lib/routes/hrbeu/yjsy/list.ts +++ b/lib/routes/hrbeu/yjsy/list.ts @@ -49,7 +49,8 @@ async function handler(ctx) { .trim(); const list = $('li.list_item') - .map((_, item) => { + .toArray() + .map((item) => { let link = $(item).find('a').attr('href'); if (link.includes('page.htm')) { link = `${rootUrl}${link}`; @@ -59,8 +60,7 @@ async function handler(ctx) { pubDate: parseDate($(item).find('span.Article_PublishDate').text()), link, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/icac/news.ts b/lib/routes/icac/news.ts index 68daa5dcdc14..eed96e0c3132 100644 --- a/lib/routes/icac/news.ts +++ b/lib/routes/icac/news.ts @@ -35,14 +35,14 @@ async function handler(ctx) { const $ = load(res.data); const list = $('.pressItem.clearfix') - .map((_, e) => { + .toArray() + .map((e) => { const c = load(e); return { title: c('.hd a').text(), link: `${utils.BASE_URL}${c('.hd a').attr('href')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { diff --git a/lib/routes/ielts/index.ts b/lib/routes/ielts/index.ts index cf025fb9b3aa..8ab94b39117e 100644 --- a/lib/routes/ielts/index.ts +++ b/lib/routes/ielts/index.ts @@ -48,7 +48,7 @@ async function handler() { const $ = load(html); const list = $('#newsListUl li') - .get() + .toArray() .map((elem) => { const $elem = $(elem); return { diff --git a/lib/routes/informs/index.ts b/lib/routes/informs/index.ts index d772d88962b3..3f636a5257b9 100644 --- a/lib/routes/informs/index.ts +++ b/lib/routes/informs/index.ts @@ -59,13 +59,12 @@ async function handler(ctx) { const $ = load(response.data); const list = $('div.issue-item') .slice(0, 10) - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('h5.issue-item__title').text(), link: `${rootUrl}${$(item).find('h5.issue-item__title > a').attr('href')}`, pubDate: parseDate($(item).find('div.rlist--inline.separator.toc-item__detail > p').remove('span').text()), - })) - .get(); - + })); const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { diff --git a/lib/routes/inoreader/index.ts b/lib/routes/inoreader/index.ts index feed3b4308fc..816190254a89 100644 --- a/lib/routes/inoreader/index.ts +++ b/lib/routes/inoreader/index.ts @@ -32,25 +32,23 @@ async function handler(ctx) { return { title: $('.header_text').text().trim(), link: currentUrl, - item: entries - .map((idx, item) => { - const content = $(item).clone(); - const header = $(item).prev(); - const pubDate = $('div.article_author .au1', header) - .contents() - .filter((_, e) => e.nodeType === 3) - .text() - .replace(/posted (on|at) /, '') - .replace(/UTC.*/, ''); - return { - title: $('a.title_link', header).text().trim(), - link: $('a.title_link', header).attr('href'), - author: $('div.article_author span span', header).text().trim() + ' via ' + $('div.article_author a.feed_link', header).text().trim(), - pubDate: parseDate(pubDate, ['MMM DD YYYY HH:mm:ss', 'HH:mm:ss']), - description: $(content).html(), - }; - }) - .get(), + item: entries.toArray().map((item) => { + const content = $(item).clone(); + const header = $(item).prev(); + const pubDate = $('div.article_author .au1', header) + .contents() + .filter((_, e) => e.nodeType === 3) + .text() + .replace(/posted (on|at) /, '') + .replace(/UTC.*/, ''); + return { + title: $('a.title_link', header).text().trim(), + link: $('a.title_link', header).attr('href'), + author: $('div.article_author span span', header).text().trim() + ' via ' + $('div.article_author a.feed_link', header).text().trim(), + pubDate: parseDate(pubDate, ['MMM DD YYYY HH:mm:ss', 'HH:mm:ss']), + description: $(content).html(), + }; + }), allowEmpty: true, }; } diff --git a/lib/routes/ipsw.dev/index.ts b/lib/routes/ipsw.dev/index.ts index 58b66dab29b7..7c8261835691 100644 --- a/lib/routes/ipsw.dev/index.ts +++ b/lib/routes/ipsw.dev/index.ts @@ -33,7 +33,8 @@ async function handler(ctx) { const productName = $('#IdentifierModal > div > div > div.modal-body > p:nth-child(1) > em').text(); const list: Data[] = $('.firmware') - .map((index, element) => { + .toArray() + .map((element) => { const ele = $(element); const version = ele.find('td:nth-child(1) > div > div > strong').text(); const build = ele.find('td:nth-child(1) > div > div > div > code').text(); @@ -51,8 +52,7 @@ async function handler(ctx) { size, }), }; - }) - .get(); + }); return { title: `${productName} Released`, diff --git a/lib/routes/ipsw/index.ts b/lib/routes/ipsw/index.ts index da80bc2b4fdd..fd6bed4d3c67 100644 --- a/lib/routes/ipsw/index.ts +++ b/lib/routes/ipsw/index.ts @@ -49,26 +49,25 @@ async function handler(ctx) { }, }); const $ = load(response.data); - let list = {}; - list = pname.includes(',') + const list = pname.includes(',') ? $('.firmware') - .map(function () { + .toArray() + .map((item) => { const info = { - title: $(this).find('td').eq(1).text(), - link: replaceurl($(this).attr('onclick')), + title: $(item).find('td').eq(1).text(), + link: replaceurl($(item).attr('onclick')), }; return info; }) - .get() : $('.products a') - .map(function () { + .toArray() + .map((item) => { const info = { - title: $(this).find('img').attr('alt'), - link: $(this).attr('href'), + title: $(item).find('img').attr('alt'), + link: $(item).attr('href'), }; return info; - }) - .get(); + }); const out = await Promise.all( list.map((info) => { diff --git a/lib/routes/iqiyi/video.ts b/lib/routes/iqiyi/video.ts index 37f9d62b6be4..218b118cfe1c 100644 --- a/lib/routes/iqiyi/video.ts +++ b/lib/routes/iqiyi/video.ts @@ -58,16 +58,12 @@ async function handler(ctx) { return { title: $('title').text(), link, - item: - list && - list - .map((index, item) => ({ - title: $(item).attr('title'), - // description: ``, - pubDate: parseDate($(item).find('.li-sub span.sub-date').text(), 'YYYY-MM-DD'), - link: $(item).find('.li-dec a').attr('href'), - })) - .get(), + item: list.toArray().map((item) => ({ + title: $(item).attr('title'), + // description: ``, + pubDate: parseDate($(item).find('.li-sub span.sub-date').text(), 'YYYY-MM-DD'), + link: $(item).find('.li-dec a').attr('href'), + })), }; }, config.cache.routeExpire, diff --git a/lib/routes/ithome/index.ts b/lib/routes/ithome/index.ts index 16968647adaf..1064ce216120 100644 --- a/lib/routes/ithome/index.ts +++ b/lib/routes/ithome/index.ts @@ -72,14 +72,14 @@ async function handler(ctx) { const $ = load(response.data); const list = $('#list > div.fl > ul > li > div > h2 > a') .slice(0, 10) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/ithome/ranking.ts b/lib/routes/ithome/ranking.ts index c35b40ebe957..a1b948a21145 100644 --- a/lib/routes/ithome/ranking.ts +++ b/lib/routes/ithome/ranking.ts @@ -54,14 +54,14 @@ async function handler(ctx) { } const list = $(`#${id} > li`) - .map(function () { + .toArray() + .map((item) => { const info = { - title: $(this).find('a').text(), - link: $(this).find('a').attr('href'), + title: $(item).find('a').text(), + link: $(item).find('a').attr('href'), }; return info; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/ithome/tag.ts b/lib/routes/ithome/tag.ts index ab13c936d240..e04e15c680fb 100644 --- a/lib/routes/ithome/tag.ts +++ b/lib/routes/ithome/tag.ts @@ -37,12 +37,12 @@ async function handler(ctx) { const response = await got(url); const $ = load(response.data); const list = $('ul.bl > li') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('h2 > a').text(), link: $(item).find('h2 > a').attr('href'), pubDate: timezone(parseDate($(item).find('div.c').attr('data-ot')), +8), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/ithome/tw/feeds.ts b/lib/routes/ithome/tw/feeds.ts index 4b9efe7d4026..7d4fbd94d060 100644 --- a/lib/routes/ithome/tw/feeds.ts +++ b/lib/routes/ithome/tw/feeds.ts @@ -39,7 +39,7 @@ async function handler(ctx) { const name = $('a.active-trail').text(); const items = await Promise.all( $('.title a') - .get() + .toArray() .map((item) => { const link = baseUrl + $(item).attr('href'); return cache.tryGet(link, async () => { diff --git a/lib/routes/japanpost/track.ts b/lib/routes/japanpost/track.ts index c1d3c998a636..d8d014e9f182 100644 --- a/lib/routes/japanpost/track.ts +++ b/lib/routes/japanpost/track.ts @@ -34,16 +34,14 @@ export async function track(ctx) { let officeItemList; if (officeList.length) { - officeItemList = officeList - .map((i, e) => { - const eTd = $(e).find('td'); - return { - officeType: eTd.eq(0).text().trim(), - officeName: eTd.eq(1).html().trim(), - officeTel: eTd.eq(2).html().trim(), - }; - }) - .get(); + officeItemList = officeList.toArray().map((e) => { + const eTd = $(e).find('td'); + return { + officeType: eTd.eq(0).text().trim(), + officeName: eTd.eq(1).html().trim(), + officeTel: eTd.eq(2).html().trim(), + }; + }); } if (!list.length) { @@ -68,45 +66,43 @@ export async function track(ctx) { language: locale, icon: 'https://www.post.japanpost.jp/favicon.ico', logo: 'https://www.post.japanpost.jp/favicon.ico', - item: listEven - .map((index, item) => { - const itemTd = $(item).find('td'); - const packageStatus = itemTd.eq(1).text().trim(); - const packageRegion = itemTd.eq(4).text().trim(); - const packageOffice = itemTd.eq(3).text().trim(); - const packageOfficeZipCode = listOdd.eq(index).find('td').eq(0).text().trim(); - const itemTitle = `${packageStatus} ${packageOffice} ${packageRegion}`; - const packageTrackRecord = itemTd.eq(2).text().trim(); - const itemDescription = art(path.join(__dirname, 'templates/track_item_desc.art'), { - packageStatus, - packageTrackRecord, - packageOfficeZipCode, - packageOffice, - packageRegion, - index, - officeItemList, - serviceText, - packageService, - }); - - const itemPubDateText = itemTd.eq(0).text().trim(); - const itemGuid = utils.generateGuid(reqCode + itemTitle + itemDescription + itemPubDateText); - - let thisItemTimeStamp; - [thisItemTimeStamp, tz] = utils.parseDatetime(itemPubDateText, packageOffice, packageRegion, tz, locale); - if (lastItemTimeStamp && thisItemTimeStamp <= lastItemTimeStamp) { - thisItemTimeStamp = lastItemTimeStamp + 1000; - } - lastItemTimeStamp = thisItemTimeStamp; - - return { - title: itemTitle, - description: itemDescription, - pubDate: new Date(thisItemTimeStamp), - link, - guid: itemGuid.slice(0, 32), - }; - }) - .get(), + item: listEven.toArray().map((item, index) => { + const itemTd = $(item).find('td'); + const packageStatus = itemTd.eq(1).text().trim(); + const packageRegion = itemTd.eq(4).text().trim(); + const packageOffice = itemTd.eq(3).text().trim(); + const packageOfficeZipCode = listOdd.eq(index).find('td').eq(0).text().trim(); + const itemTitle = `${packageStatus} ${packageOffice} ${packageRegion}`; + const packageTrackRecord = itemTd.eq(2).text().trim(); + const itemDescription = art(path.join(__dirname, 'templates/track_item_desc.art'), { + packageStatus, + packageTrackRecord, + packageOfficeZipCode, + packageOffice, + packageRegion, + index, + officeItemList, + serviceText, + packageService, + }); + + const itemPubDateText = itemTd.eq(0).text().trim(); + const itemGuid = utils.generateGuid(reqCode + itemTitle + itemDescription + itemPubDateText); + + let thisItemTimeStamp; + [thisItemTimeStamp, tz] = utils.parseDatetime(itemPubDateText, packageOffice, packageRegion, tz, locale); + if (lastItemTimeStamp && thisItemTimeStamp <= lastItemTimeStamp) { + thisItemTimeStamp = lastItemTimeStamp + 1000; + } + lastItemTimeStamp = thisItemTimeStamp; + + return { + title: itemTitle, + description: itemDescription, + pubDate: new Date(thisItemTimeStamp), + link, + guid: itemGuid.slice(0, 32), + }; + }), }; } diff --git a/lib/routes/jianshu/collection.ts b/lib/routes/jianshu/collection.ts index 96edd87c04cd..27bb40b118ea 100644 --- a/lib/routes/jianshu/collection.ts +++ b/lib/routes/jianshu/collection.ts @@ -42,7 +42,7 @@ async function handler(ctx) { const data = response.data; const $ = load(data); - const list = $('.note-list li').get(); + const list = $('.note-list li').toArray(); const result = await util.ProcessFeed(list, cache); diff --git a/lib/routes/jianshu/home.ts b/lib/routes/jianshu/home.ts index a2b208a92d26..d90723d37fb4 100644 --- a/lib/routes/jianshu/home.ts +++ b/lib/routes/jianshu/home.ts @@ -41,7 +41,7 @@ async function handler() { const data = response.data; const $ = load(data); - const list = $('.note-list li').get(); + const list = $('.note-list li').toArray(); const result = await util.ProcessFeed(list, cache); diff --git a/lib/routes/jianshu/user.ts b/lib/routes/jianshu/user.ts index 1f3d4228d69c..de705ad31924 100644 --- a/lib/routes/jianshu/user.ts +++ b/lib/routes/jianshu/user.ts @@ -42,7 +42,7 @@ async function handler(ctx) { const data = response.data; const $ = load(data); - const list = $('.note-list li').get(); + const list = $('.note-list li').toArray(); const result = await util.ProcessFeed(list, cache); diff --git a/lib/routes/kanxue/topic.ts b/lib/routes/kanxue/topic.ts index 4c26f5184360..fa7797bbc891 100644 --- a/lib/routes/kanxue/topic.ts +++ b/lib/routes/kanxue/topic.ts @@ -99,12 +99,13 @@ async function handler(ctx) { list ? list // fix .thread .top_3 - .filter((_, elem) => { + .toArray() + .filter((elem) => { const timeStr = $('.date', elem).eq(0).text(); const pubDate = timeStr.endsWith('前') ? parseRelativeDate(timeStr) : parseDate(timeStr.slice(1)); return !elem.attribs.class.includes('top') || Date.now() - pubDate.valueOf() < timeDiff; }) - .map((_, elem) => { + .map((elem) => { const subject = $('.subject a', elem).eq(1); const timeStr = $('.date', elem).eq(0).text(); const pubDate = timeStr.endsWith('前') ? parseRelativeDate(timeStr) : parseDate(timeStr.slice(1)); @@ -140,7 +141,6 @@ async function handler(ctx) { }; }); }) - .get() : [] ); diff --git a/lib/routes/kbs/news.ts b/lib/routes/kbs/news.ts index 6d441fffbf76..690516ba2b6a 100644 --- a/lib/routes/kbs/news.ts +++ b/lib/routes/kbs/news.ts @@ -50,7 +50,8 @@ async function handler(ctx) { $('.comp_pagination').remove(); const list = $('.comp_contents_1x article') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('h2 a'); @@ -69,8 +70,7 @@ async function handler(ctx) { +9 ), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/kbs/today.ts b/lib/routes/kbs/today.ts index 6998cc105570..c1ab171eb6ed 100644 --- a/lib/routes/kbs/today.ts +++ b/lib/routes/kbs/today.ts @@ -47,7 +47,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.comp_text_1x article') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('h2 a'); @@ -58,8 +59,7 @@ async function handler(ctx) { link: `${rootUrl}/service${a.attr('href').replace('./', '/')}`, pubDate: timezone(parseDate(item.find('.date').text()), +9), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/kcna/news.ts b/lib/routes/kcna/news.ts index 4239d84db908..2e0bc0b6cae6 100644 --- a/lib/routes/kcna/news.ts +++ b/lib/routes/kcna/news.ts @@ -63,7 +63,8 @@ async function handler(ctx) { const title = sanitizeHtml($('head > title').text(), { allowedTags: [], allowedAttributes: {} }); const list = $('.article-link li a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const dateElem = item.find('.publish-time'); const dateString = dateElem.text().match(/\d+\.\d+\.\d+/); @@ -73,8 +74,7 @@ async function handler(ctx) { link: rootUrl + item.attr('href'), pubDate: timezone(parseDate(dateString[0]), +9), }; - }) - .get(); + }); // avoid being IP-banned // if being banned, 103.35.255.254 (the last hop before www.kcna.kp - 175.45.176.71) will drop the packet @@ -96,8 +96,8 @@ async function handler(ctx) { // add picture and video const media = $('.media-icon a') - .map((_, elem) => rootUrl + elem.attribs.href) - .get(); + .toArray() + .map((elem) => rootUrl + elem.attribs.href); let photo, video; await Promise.all( media.map(async (medium) => { diff --git a/lib/routes/kyodonews/index.ts b/lib/routes/kyodonews/index.ts index f46bd9c6e7ff..f7a552f36c7e 100644 --- a/lib/routes/kyodonews/index.ts +++ b/lib/routes/kyodonews/index.ts @@ -59,7 +59,8 @@ async function handler(ctx) { title = $('channel > title').text(); description = $('channel > description').text(); items = $('item') - .map((_, item) => { + .toArray() + .map((item) => { const $item = $(item); const link = $item.find('link').text(); // const pubDate = $item.find('pubDate').text(); @@ -67,21 +68,20 @@ async function handler(ctx) { link, // pubDate, // no need to normalize because it's from a valid RSS feed }; - }) - .get(); + }); } else { title = $('head > title').text(); description = $('meta[name="description"]').attr('content'); image = resolveRelativeLink($('head > link[rel="apple-touch-icon"]').attr('href'), rootUrl) || image; items = $('div.sec-latest > ul > li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const link = item.find('a').attr('href'); return { link: resolveRelativeLink(link, rootUrl), }; - }) - .get(); + }); } items = await Promise.all( @@ -130,8 +130,8 @@ async function handler(ctx) { } item.category = $('p.credit > a') - .map((_, a) => $(a).text()) - .get(); + .toArray() + .map((a) => $(a).text()); return item; }) ) diff --git a/lib/routes/lala/rss.ts b/lib/routes/lala/rss.ts index e574b561384b..add332e3f845 100644 --- a/lib/routes/lala/rss.ts +++ b/lib/routes/lala/rss.ts @@ -24,7 +24,8 @@ async function handler() { const titleMain = $('channel > title').text(); const descriptionMain = $('channel > description').text(); const items = $('channel > item') - .map((_, item) => { + .toArray() + .map((item) => { const $item = $(item); const link = $item.find('link').text(); const title = $item.find('title').text(); @@ -36,8 +37,7 @@ async function handler() { title, description, }; - }) - .get(); + }); return { title: titleMain, diff --git a/lib/routes/learnblockchain/posts.ts b/lib/routes/learnblockchain/posts.ts index 7fa084761b99..6498548fe39b 100644 --- a/lib/routes/learnblockchain/posts.ts +++ b/lib/routes/learnblockchain/posts.ts @@ -61,21 +61,17 @@ async function handler(ctx) { title: `登链社区--${cid}`, link: url, description: `登链社区`, - item: - list && - list - .map((idx, ite) => { - const item = $(ite); - const json = { - title: item.find('h2.title').text().trim(), - description: item.find('div.excerpt').text().trim(), - pubDate: parseRelativeDate(item.find('.author li:nth-child(2)').text().replace('发布于', '').trim()), - link: item.find('h2.title a').attr('href').trim(), - author: item.find('.author li:nth-child(1)').text().trim(), - }; + item: list.toArray().map((ite) => { + const item = $(ite); + const json = { + title: item.find('h2.title').text().trim(), + description: item.find('div.excerpt').text().trim(), + pubDate: parseRelativeDate(item.find('.author li:nth-child(2)').text().replace('发布于', '').trim()), + link: item.find('h2.title a').attr('href').trim(), + author: item.find('.author li:nth-child(1)').text().trim(), + }; - return json; - }) - .get(), + return json; + }), }; } diff --git a/lib/routes/learnku/topic.ts b/lib/routes/learnku/topic.ts index c53e3936f94d..938fcb883130 100644 --- a/lib/routes/learnku/topic.ts +++ b/lib/routes/learnku/topic.ts @@ -50,7 +50,7 @@ async function handler(ctx) { const data = response.data; const $ = load(data); - const list = $('.simple-topic').get(); + const list = $('.simple-topic').toArray(); const item = await Promise.all( list.map(async (item) => { const $ = load(item); diff --git a/lib/routes/leetcode/articles.ts b/lib/routes/leetcode/articles.ts index 8bb7e6e49db6..2c6708231d6b 100644 --- a/lib/routes/leetcode/articles.ts +++ b/lib/routes/leetcode/articles.ts @@ -42,17 +42,17 @@ async function handler() { const $ = load(response); const list = $('a.list-group-item') - .filter((i, e) => $(e).find('h4.media-heading i').length === 0) - .map(function () { + .toArray() + .filter((e) => $(e).find('h4.media-heading i').length === 0) + .map((item) => { const info = { - title: $(this).find('h4.media-heading').text().trim(), - author: $(this).find('.text-500').text(), - link: new URL($(this).attr('href'), host).href, - pubDate: $(this).find('p.pull-right.media-date strong').text().trim(), + title: $(item).find('h4.media-heading').text().trim(), + author: $(item).find('.text-500').text(), + link: new URL($(item).attr('href'), host).href, + pubDate: $(item).find('p.pull-right.media-date strong').text().trim(), }; return info; - }) - .get(); + }); const out = await Promise.all( list.map((info) => diff --git a/lib/routes/leiphone/index.ts b/lib/routes/leiphone/index.ts index c633c796bf38..48502a42e508 100644 --- a/lib/routes/leiphone/index.ts +++ b/lib/routes/leiphone/index.ts @@ -28,7 +28,7 @@ async function handler(ctx) { const list = $('.word > h3 > a') .slice(0, 10) - .get() + .toArray() .map((e) => $(e).attr('href')); const items = await utils.ProcessFeed(list, cache); diff --git a/lib/routes/linovelib/novel.ts b/lib/routes/linovelib/novel.ts index 83f8cc070380..e335917f2aeb 100644 --- a/lib/routes/linovelib/novel.ts +++ b/lib/routes/linovelib/novel.ts @@ -32,14 +32,14 @@ async function handler(ctx) { const items = list .find('li') .find('a') - .filter((idx, item) => $(item).attr('href').startsWith('/novel/')) - .map((idx, item) => ({ + .toArray() + .filter((item) => $(item).attr('href').startsWith('/novel/')) + .map((item) => ({ title: $(item).text(), author, description: $(item).text(), link: `https://www.linovelib.com${$(item).attr('href')}`, - })) - .get(); + })); items.reverse(); return { diff --git a/lib/routes/liquipedia/cs-matches.ts b/lib/routes/liquipedia/cs-matches.ts index b4c12d01be63..e72c6a385a5e 100644 --- a/lib/routes/liquipedia/cs-matches.ts +++ b/lib/routes/liquipedia/cs-matches.ts @@ -29,28 +29,26 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.recent-matches-bg-lose, .recent-matches-bg-win'); - const matches = list - .map((_, item) => { - item = $(item); - - const getRes = () => (item.attr('class') === 'recent-matches-bg-lose' ? 'LOSS' : 'WIN'); - const result = getRes(); - - const infoList = item.find('td'); - - const time = infoList.eq(0).text() + ' ' + infoList.eq(1).text(); - const tournament = infoList.eq(6).text(); - const score = infoList.eq(7).text(); - const opponent = infoList.eq(8).text(); - - return { - title: `[${result}] ${team} ${score} ${opponent} on ${tournament}`, - description: `${time}, ${team} ${score} ${opponent} on ${tournament}`, - link: currentUrl, - guid: currentUrl + time, - }; - }) - .get(); + const matches = list.toArray().map((item) => { + item = $(item); + + const getRes = () => (item.attr('class') === 'recent-matches-bg-lose' ? 'LOSS' : 'WIN'); + const result = getRes(); + + const infoList = item.find('td'); + + const time = infoList.eq(0).text() + ' ' + infoList.eq(1).text(); + const tournament = infoList.eq(6).text(); + const score = infoList.eq(7).text(); + const opponent = infoList.eq(8).text(); + + return { + title: `[${result}] ${team} ${score} ${opponent} on ${tournament}`, + description: `${time}, ${team} ${score} ${opponent} on ${tournament}`, + link: currentUrl, + guid: currentUrl + time, + }; + }); return { title: `[Counter-Strike] ${team} Match Results From Liquipedia`, diff --git a/lib/routes/literotica/category.ts b/lib/routes/literotica/category.ts index 2d786f2d3e52..0dbdb457011e 100644 --- a/lib/routes/literotica/category.ts +++ b/lib/routes/literotica/category.ts @@ -30,7 +30,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.b-slb-item') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('h3 a'); @@ -41,8 +42,7 @@ async function handler(ctx) { author: item.find('.b-user-info-name').text(), pubDate: parseDate(item.find('.b-slib-date').text(), 'MM/DD/YY'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/literotica/new.ts b/lib/routes/literotica/new.ts index 1a2a3cb8dd15..6fb57f20f491 100644 --- a/lib/routes/literotica/new.ts +++ b/lib/routes/literotica/new.ts @@ -40,7 +40,8 @@ async function handler() { const $ = load(response.data); const list = $('.b-46t') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('.p-48y'); @@ -57,8 +58,7 @@ async function handler() { .replace(/Submitted by/, '') .trim(), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/lsnu/jiaowc/tzgg.ts b/lib/routes/lsnu/jiaowc/tzgg.ts index ed38e6bf6879..55c72b6f15b0 100644 --- a/lib/routes/lsnu/jiaowc/tzgg.ts +++ b/lib/routes/lsnu/jiaowc/tzgg.ts @@ -43,7 +43,7 @@ async function handler(ctx) { const data = response.data; const $ = load(data); - const list = $('tr[id^="line_u5_"]').get(); + const list = $('tr[id^="line_u5_"]').toArray(); const out = await Promise.all( list.map(async (item) => { diff --git a/lib/routes/lvv2/news.ts b/lib/routes/lvv2/news.ts index 3aa9fafc3eb8..d482697132be 100644 --- a/lib/routes/lvv2/news.ts +++ b/lib/routes/lvv2/news.ts @@ -60,14 +60,14 @@ async function handler(ctx) { const response = await got(url); const $ = load(response.data); const list = $('div.spacer > div') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('h3 > a.title').text().trim(), author: $(item).find('a.author').text().trim(), link: new URL($(item).find('h3.title > a.title').attr('href'), rootUrl).href.replace(/(https:\/\/lvv2\.com.*?)\/title.*/, '$1'), pubDate: timezone(parseDate($(item).find('a.dateline > time').attr('datetime')), +8), })) - .filter((_, item) => item.title !== '') - .get(); + .filter((item) => item.title !== ''); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/lvv2/top.ts b/lib/routes/lvv2/top.ts index 9d21c9b536be..41d791e6bbec 100644 --- a/lib/routes/lvv2/top.ts +++ b/lib/routes/lvv2/top.ts @@ -60,11 +60,11 @@ async function handler(ctx) { const response = await got(url); const $ = load(response.data); const list = $('#top-content-news > div') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('div.md > a').text(), link: new URL($(item).find('div.md > a').attr('href'), rootUrl).href.replace(/(https:\/\/lvv2\.com.*?)\/title.*/, '$1'), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/manhuagui/subscribe.ts b/lib/routes/manhuagui/subscribe.ts index c958083fa264..41208914c8ec 100644 --- a/lib/routes/manhuagui/subscribe.ts +++ b/lib/routes/manhuagui/subscribe.ts @@ -61,16 +61,17 @@ async function handler() { const description = `${user_name} 的 漫画订阅`; const item = $('.dy_content_li') - .map(function () { - const img_src = $(this).find('img').attr('src'); // 漫画的封面 - const manga_title = $(this).find('.co_1.c_space').first().text(); // 最新的一话题目 - const title = $(this).find('img').attr('alt'); // 漫画的名字 - const link = $(this).find('.co_1.c_space').first().children().attr('href'); // 漫画最新的链接 + .toArray() + .map((item) => { + const img_src = $(item).find('img').attr('src'); // 漫画的封面 + const manga_title = $(item).find('.co_1.c_space').first().text(); // 最新的一话题目 + const title = $(item).find('img').attr('alt'); // 漫画的名字 + const link = $(item).find('.co_1.c_space').first().children().attr('href'); // 漫画最新的链接 const description = art(path.join(__dirname, 'templates/manga.art'), { manga_title, img_src, }); - const pubDate = $(this).find('.co_1.c_space').first().next().text(); + const pubDate = $(item).find('.co_1.c_space').first().next().text(); const publishDate = parseRelativeDate(pubDate); // 处理相对时间 const single = { title, @@ -79,8 +80,7 @@ async function handler() { pubDate: publishDate, }; return single; - }) - .get(); // 这里获取数组= = + }); return { title, link, diff --git a/lib/routes/mdpi/journal.ts b/lib/routes/mdpi/journal.ts index 382ee41e07a1..8845b63d8452 100644 --- a/lib/routes/mdpi/journal.ts +++ b/lib/routes/mdpi/journal.ts @@ -49,7 +49,8 @@ async function handler(ctx) { const $2 = load(response2.data); const issue = $2('.content__container').find('h1').text().trim(); const list = $2('.article-item') - .map((_, item) => { + .toArray() + .map((item) => { const title = $2(item).find('.title-link').text(); const link = `${host}${$2(item).find('.title-link').attr('href')}`; const authors = $2(item).find('.authors').find('.inlineblock').text(); @@ -70,8 +71,7 @@ async function handler(ctx) { issue, img, }; - }) - .get(); + }); const renderDesc = (item) => art(path.join(__dirname, 'templates/description.art'), { diff --git a/lib/routes/metacritic/release.ts b/lib/routes/metacritic/release.ts index 2fc2d2dad176..b6e7a0f2b3d7 100644 --- a/lib/routes/metacritic/release.ts +++ b/lib/routes/metacritic/release.ts @@ -28,7 +28,7 @@ const handler = async (ctx) => { const data = response.body; const $ = load(data); - const list = $('.list_products > li').get().slice(0, 10); + const list = $('.list_products > li').toArray().slice(0, 10); const result = list.map((item) => { const $ = load(item); diff --git a/lib/routes/modian/zhongchou.ts b/lib/routes/modian/zhongchou.ts index 701e37ebbc5b..bb5559a857eb 100644 --- a/lib/routes/modian/zhongchou.ts +++ b/lib/routes/modian/zhongchou.ts @@ -62,15 +62,15 @@ async function handler(ctx) { const list = $('.pro_title') .slice(0, 12) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item).parent(); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/mpaypass/main.ts b/lib/routes/mpaypass/main.ts index 1aa36da71c1a..73f069e63de1 100644 --- a/lib/routes/mpaypass/main.ts +++ b/lib/routes/mpaypass/main.ts @@ -38,20 +38,20 @@ async function handler(ctx) { const title_cn = type ? $(`a[href="http://www.mpaypass.com.cn/${type}.html"]`).text() : '最新文章'; const list = $('.newslist') - .map(function () { + .toArray() + .map((item) => { const info = { - title: $(this).find('#title').text(), - link: $(this).find('#title').find('a').attr('href'), - time: $(this).find('#time').text(), - category: $(this) + title: $(item).find('#title').text(), + link: $(item).find('#title').find('a').attr('href'), + time: $(item).find('#time').text(), + category: $(item) .find('#keywords') .find('a') .toArray() .map((e) => $(e).text().trim()), }; return info; - }) - .get(); + }); const out = await Promise.all( list.map((info) => diff --git a/lib/routes/mpaypass/news.ts b/lib/routes/mpaypass/news.ts index d236daa635af..c656f31b8a42 100644 --- a/lib/routes/mpaypass/news.ts +++ b/lib/routes/mpaypass/news.ts @@ -39,7 +39,8 @@ async function handler() { language: 'zh-CN', item: await Promise.all( $list('.Newslist-li') - .map((_, el) => { + .toArray() + .map((el) => { const $el = $list(el); const $a = $el.find('.Newslist-title a'); const href = $a.attr('href'); @@ -59,7 +60,6 @@ async function handler() { }; }); }) - .get() ), }; } diff --git a/lib/routes/nasa/apod-ncku.ts b/lib/routes/nasa/apod-ncku.ts index c2b4279e7a4f..c16e9ed66cd3 100644 --- a/lib/routes/nasa/apod-ncku.ts +++ b/lib/routes/nasa/apod-ncku.ts @@ -40,11 +40,11 @@ async function handler(ctx) { const list = $('body > b > a') .slice(0, limit) - .map((_, el) => ({ + .toArray() + .map((el) => ({ title: $(el).text(), link: `http://sprite.phys.ncku.edu.tw/astrolab/mirrors/apod/${$(el).attr('href')}`, - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/nasa/apod.ts b/lib/routes/nasa/apod.ts index 7f037fdcf44b..b4147919087a 100644 --- a/lib/routes/nasa/apod.ts +++ b/lib/routes/nasa/apod.ts @@ -41,11 +41,11 @@ async function handler(ctx) { const list = $('body > b > a') .slice(0, limit) - .map((_, el) => ({ + .toArray() + .map((el) => ({ title: $(el).text(), link: `https://apod.nasa.gov/apod/${$(el).attr('href')}`, - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/ncepu/master/masterinfo.ts b/lib/routes/ncepu/master/masterinfo.ts index bbc35f9943ac..8e96d26f37cf 100644 --- a/lib/routes/ncepu/master/masterinfo.ts +++ b/lib/routes/ncepu/master/masterinfo.ts @@ -49,7 +49,8 @@ async function handler(ctx) { const $ = load(data); const list = $('.articleList ul li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); // 单篇文章块的信息,其中文字部分是标题,属性是文章链接 const a = item.find('a'); @@ -65,8 +66,7 @@ async function handler(ctx) { link: url, pubDate, }; - }) - .get(); + }); const items = await Promise.all( list.map(async (item) => { diff --git a/lib/routes/neea/index.ts b/lib/routes/neea/index.ts index fa0570ce745f..e3245da0e4c2 100644 --- a/lib/routes/neea/index.ts +++ b/lib/routes/neea/index.ts @@ -33,7 +33,7 @@ async function handler(ctx) { const data = response.data; const $ = load(data); - const list = $(`#ReportIDname > a`).parent().parent().get(); + const list = $(`#ReportIDname > a`).parent().parent().toArray(); const process = await Promise.all( list.map(async (item) => { diff --git a/lib/routes/neu/bmie.ts b/lib/routes/neu/bmie.ts index 0a1df43f0012..1e16b5c6ebc7 100644 --- a/lib/routes/neu/bmie.ts +++ b/lib/routes/neu/bmie.ts @@ -71,7 +71,7 @@ async function handler(ctx) { const $ = load(data); const title = $('title').text(); - const items = $('#subIndex > div.main_frame_sub > div.detail_sub > div > div > div > ul > li').slice(0, 7).get(); + const items = $('#subIndex > div.main_frame_sub > div.detail_sub > div > div > div > ul > li').slice(0, 7).toArray(); const results = await Promise.all( items.map(async (item) => { const $ = load(item); diff --git a/lib/routes/newsmarket/index.ts b/lib/routes/newsmarket/index.ts index ddae997667f8..a8625c628049 100644 --- a/lib/routes/newsmarket/index.ts +++ b/lib/routes/newsmarket/index.ts @@ -49,7 +49,8 @@ async function handler(ctx) { const list = $('.title a') .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { @@ -57,8 +58,7 @@ async function handler(ctx) { link: item.attr('href'), pubDate: parseDate(), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/nga/post.ts b/lib/routes/nga/post.ts index 184dc81318ea..ae4dd72af1e7 100644 --- a/lib/routes/nga/post.ts +++ b/lib/routes/nga/post.ts @@ -107,7 +107,8 @@ async function handler(ctx) { const items = $('#m_posts_c') .children() .filter('table') - .map((ind, post_) => { + .toArray() + .map((post_) => { const post = $(post_); const posterId = post .find('.posterinfo a') @@ -136,6 +137,6 @@ async function handler(ctx) { return { title: rssTitle, link: getPageUrl(tid, authorId, pageId), - item: items.get(), + item: items, }; } diff --git a/lib/routes/ngocn2/index.ts b/lib/routes/ngocn2/index.ts index ec5ed99fafef..1741c30ff27f 100644 --- a/lib/routes/ngocn2/index.ts +++ b/lib/routes/ngocn2/index.ts @@ -45,7 +45,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.articleroll__article a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { @@ -53,8 +54,7 @@ async function handler(ctx) { link: `${rootUrl}${item.attr('href')}`, pubDate: parseDate(item.find('.meta').text()), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/nifd/research.ts b/lib/routes/nifd/research.ts index 48d21b205444..80f307a8ff6b 100644 --- a/lib/routes/nifd/research.ts +++ b/lib/routes/nifd/research.ts @@ -47,13 +47,13 @@ async function handler(ctx) { const response = await got.get(url); const $ = load(response.data); const list = $('div.qr-main-item') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('h2').text(), link: rootUrl + $(item).find('a').attr('href'), author: $(item).find('p > span:nth-child(2)').text(), pubDate: parseDate($(item).find('p > span:nth-child(1)').text(), 'YYYY-MM-DD'), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/nintendo/system-update.ts b/lib/routes/nintendo/system-update.ts index 41ee30b0c535..dff78f753565 100644 --- a/lib/routes/nintendo/system-update.ts +++ b/lib/routes/nintendo/system-update.ts @@ -43,10 +43,8 @@ async function handler() { const matched_date = /(\d+)年(\d+)月(\d+)日/.exec(heading); const update_info = update.nextUntil('.c-heading-lv3'); const update_infos = update_info - .map(function () { - return $(this).html(); - }) - .get() + .toArray() + .map((element) => $(element).html()) .join('\n'); const matched_version = /(\d\.)+\d/.exec(heading); diff --git a/lib/routes/njit/jwc.ts b/lib/routes/njit/jwc.ts index c1a1d1d7f973..9ac34831e6fb 100644 --- a/lib/routes/njit/jwc.ts +++ b/lib/routes/njit/jwc.ts @@ -41,18 +41,17 @@ async function handler(ctx) { const urlList = $('body') .find('ul li span a') - .map((i, e) => $(e).attr('href')) - .get(); + .map((e) => $(e).attr('href')); const titleList = $('body') .find('ul li span a') - .map((i, e) => $(e).attr('title')) - .get(); + .toArray() + .map((e) => $(e).attr('title')); const dateList = $('body') .find('span.date') - .map((i, e) => $(e).text()) - .get(); + .toArray() + .map((e) => $(e).text()); const out = await Promise.all( urlList.map((itemUrl, index) => { diff --git a/lib/routes/njit/tzgg.ts b/lib/routes/njit/tzgg.ts index 83c50a05c169..875110559e39 100644 --- a/lib/routes/njit/tzgg.ts +++ b/lib/routes/njit/tzgg.ts @@ -43,18 +43,18 @@ async function handler() { const urlList = $('body') .find('span.text a') - .map((i, e) => $(e).attr('href')) - .get(); + .toArray() + .map((e) => $(e).attr('href')); const titleList = $('body') .find('span.text a') - .map((i, e) => $(e).attr('title')) - .get(); + .toArray() + .map((e) => $(e).attr('title')); const dateList = $('body') .find('span.date') - .map((i, e) => '20' + $(e).text().slice(1, 9)) - .get(); + .toArray() + .map((e) => '20' + $(e).text().slice(1, 9)); const out = await Promise.all( urlList.map((itemUrl, index) => { diff --git a/lib/routes/njnu/ceai/ceai.ts b/lib/routes/njnu/ceai/ceai.ts index 031be1dd3dea..a7f181296742 100644 --- a/lib/routes/njnu/ceai/ceai.ts +++ b/lib/routes/njnu/ceai/ceai.ts @@ -54,7 +54,7 @@ async function handler(ctx) { const $ = load(response.data); - const list = $('span a').get(); + const list = $('span a').toArray(); const result = await util.ProcessFeed(list, cache); diff --git a/lib/routes/njnu/jwc/jwc.ts b/lib/routes/njnu/jwc/jwc.ts index 5de9a78d109a..e43b68f41cd6 100644 --- a/lib/routes/njnu/jwc/jwc.ts +++ b/lib/routes/njnu/jwc/jwc.ts @@ -53,7 +53,7 @@ async function handler(ctx) { const $ = load(response.data); - const list = $('.list_txt a').get(); + const list = $('.list_txt a').toArray(); const result = await ProcessFeed(list, cache); diff --git a/lib/routes/nju/gra.ts b/lib/routes/nju/gra.ts index be8df1ab62a9..731b788f840e 100644 --- a/lib/routes/nju/gra.ts +++ b/lib/routes/nju/gra.ts @@ -43,7 +43,8 @@ async function handler() { title: '研究生院-动态通知', link: 'https://grawww.nju.edu.cn/905/list.htm', item: list - .map((index, item) => { + .toArray() + .map((item) => { item = $(item); const year = item.find('.news_days').first().text(); @@ -58,7 +59,6 @@ async function handler() { pubDate: timezone(parseDate(year + day, 'YYYYMM-DD'), +8), }; }) - .get() .filter(Boolean), }; } diff --git a/lib/routes/nju/scit.ts b/lib/routes/nju/scit.ts index 9d944dc549c5..8665db756903 100644 --- a/lib/routes/nju/scit.ts +++ b/lib/routes/nju/scit.ts @@ -44,15 +44,13 @@ async function handler(ctx) { return { title: `科学技术处-${type_dict[type][1]}`, link: type_dict[type][0], - item: list - .map((index, item) => { - item = $(item); - return { - title: item.find('a').attr('title'), - link: 'https://scit.nju.edu.cn' + item.find('a').attr('href'), - pubDate: timezone(parseDate(item.find('.Article_PublishDate').first().text(), 'YYYY-MM-DD'), +8), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('a').attr('title'), + link: 'https://scit.nju.edu.cn' + item.find('a').attr('href'), + pubDate: timezone(parseDate(item.find('.Article_PublishDate').first().text(), 'YYYY-MM-DD'), +8), + }; + }), }; } diff --git a/lib/routes/nju/zbb.ts b/lib/routes/nju/zbb.ts index 5ed81ad745a2..f717d601b8e8 100644 --- a/lib/routes/nju/zbb.ts +++ b/lib/routes/nju/zbb.ts @@ -43,17 +43,15 @@ async function handler(ctx) { return { title: '政府采购意向公开', link: url, - item: list - .map((index, item) => { - item = $(item); - return { - title: item.find('a').attr('title'), - description: item.find('a').first().text(), - link: 'https://zbb.nju.edu.cn' + item.find('a').attr('href'), - pubDate: timezone(parseDate(item.find('span').first().text(), 'YYYY-MM-DD'), +8), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('a').attr('title'), + description: item.find('a').first().text(), + link: 'https://zbb.nju.edu.cn' + item.find('a').attr('href'), + pubDate: timezone(parseDate(item.find('span').first().text(), 'YYYY-MM-DD'), +8), + }; + }), }; } else { const title_dict = { @@ -77,18 +75,16 @@ async function handler(ctx) { const $ = load(data); const list = $('dd[cid]'); - return list - .map((index, item) => { - item = $(item); - return { - title: item.find('a').attr('title'), - description: item.find('a').first().text(), - link: 'https://zbb.nju.edu.cn' + item.find('a').attr('href'), - pubDate: timezone(parseDate(item.find('span').first().text(), 'YYYY-MM-DD'), +8), - category: category_dict[c], - }; - }) - .get(); + return list.toArray().map((item) => { + item = $(item); + return { + title: item.find('a').attr('title'), + description: item.find('a').first().text(), + link: 'https://zbb.nju.edu.cn' + item.find('a').attr('href'), + pubDate: timezone(parseDate(item.find('span').first().text(), 'YYYY-MM-DD'), +8), + category: category_dict[c], + }; + }); }) ); diff --git a/lib/routes/njupt/jwc.ts b/lib/routes/njupt/jwc.ts index 4e9cd0329fac..385e6df19dca 100644 --- a/lib/routes/njupt/jwc.ts +++ b/lib/routes/njupt/jwc.ts @@ -47,20 +47,20 @@ async function handler(ctx) { const urlList = $('.content') .find('a') .slice(0, 10) - .map((i, e) => $(e).attr('href')) - .get(); + .toArray() + .map((e) => $(e).attr('href')); const titleList = $('.content') .find('a') .slice(0, 10) - .map((i, e) => $(e).attr('title')) - .get(); + .toArray() + .map((e) => $(e).attr('title')); const dateList = $('.content tr') .find('div') .slice(0, 10) - .map((i, e) => $(e).text().replace('发布时间:', '')) - .get(); + .toArray() + .map((e) => $(e).text().replace('发布时间:', '')); const out = await Promise.all( urlList.map((itemUrl, index) => { diff --git a/lib/routes/njust/cwc.ts b/lib/routes/njust/cwc.ts index 85f80effc1c6..45ac542c378d 100644 --- a/lib/routes/njust/cwc.ts +++ b/lib/routes/njust/cwc.ts @@ -49,14 +49,10 @@ async function handler(ctx) { return { title: info.title, link: siteUrl, - item: - list && - list - .map((index, item) => ({ - title: $(item).find('a').attr('title').trim(), - pubDate: timezone(parseDate($(item).find('span.news_meta').text(), 'YYYY-MM-DD'), +8), - link: $(item).find('a').attr('href'), - })) - .get(), + item: list.toArray().map((item) => ({ + title: $(item).find('a').attr('title').trim(), + pubDate: timezone(parseDate($(item).find('span.news_meta').text(), 'YYYY-MM-DD'), +8), + link: $(item).find('a').attr('href'), + })), }; } diff --git a/lib/routes/njust/dgxg.ts b/lib/routes/njust/dgxg.ts index d93459b3f670..f5db81b53602 100644 --- a/lib/routes/njust/dgxg.ts +++ b/lib/routes/njust/dgxg.ts @@ -50,14 +50,10 @@ async function handler(ctx) { return { title: info.title, link: siteUrl, - item: - list && - list - .map((index, item) => ({ - title: $(item).find('a').attr('title').trim(), - pubDate: timezone(parseDate($(item).find('span.Article_PublishDate').text(), 'YYYY-MM-DD'), +8), - link: $(item).find('a').attr('href'), - })) - .get(), + item: list.toArray().map((item) => ({ + title: $(item).find('a').attr('title').trim(), + pubDate: timezone(parseDate($(item).find('span.Article_PublishDate').text(), 'YYYY-MM-DD'), +8), + link: $(item).find('a').attr('href'), + })), }; } diff --git a/lib/routes/njust/eo.ts b/lib/routes/njust/eo.ts index 3cf4a5205647..828ad5e45536 100644 --- a/lib/routes/njust/eo.ts +++ b/lib/routes/njust/eo.ts @@ -70,14 +70,10 @@ async function handler(ctx) { return { title: info.title, link: siteUrl, - item: - list && - list - .map((index, item) => ({ - title: $(item).find('a').text().trim(), - pubDate: timezone(parseDate($(item).find('span.Article_PublishDate').text(), 'YYYY-MM-DD'), +8), - link: $(item).find('a').attr('href'), - })) - .get(), + item: list.toArray().map((item) => ({ + title: $(item).find('a').text().trim(), + pubDate: timezone(parseDate($(item).find('span.Article_PublishDate').text(), 'YYYY-MM-DD'), +8), + link: $(item).find('a').attr('href'), + })), }; } diff --git a/lib/routes/njust/eoe.ts b/lib/routes/njust/eoe.ts index a20455b93cb4..7f7771a98bd4 100644 --- a/lib/routes/njust/eoe.ts +++ b/lib/routes/njust/eoe.ts @@ -49,14 +49,10 @@ async function handler(ctx) { return { title: info.title, link: siteUrl, - item: - list && - list - .map((index, item) => ({ - title: $(item).find('a').attr('title').trim(), - pubDate: timezone(parseDate($(item).find('span').text(), 'YYYY-MM-DD'), +8), - link: $(item).find('a').attr('href'), - })) - .get(), + item: list.toArray().map((item) => ({ + title: $(item).find('a').attr('title').trim(), + pubDate: timezone(parseDate($(item).find('span').text(), 'YYYY-MM-DD'), +8), + link: $(item).find('a').attr('href'), + })), }; } diff --git a/lib/routes/njust/jwc.ts b/lib/routes/njust/jwc.ts index b09650208062..1df1697cea98 100644 --- a/lib/routes/njust/jwc.ts +++ b/lib/routes/njust/jwc.ts @@ -51,14 +51,10 @@ async function handler(ctx) { return { title: info.title, link: siteUrl, - item: - list && - list - .map((index, item) => ({ - title: $(item).find('a').attr('title').trim(), - pubDate: timezone(parseDate($(item).find('td[width="14%"]').text(), 'YYYY-MM-DD'), +8), - link: $(item).find('a').attr('href'), - })) - .get(), + item: list.toArray().map((item) => ({ + title: $(item).find('a').attr('title').trim(), + pubDate: timezone(parseDate($(item).find('td[width="14%"]').text(), 'YYYY-MM-DD'), +8), + link: $(item).find('a').attr('href'), + })), }; } diff --git a/lib/routes/nltimes/news.ts b/lib/routes/nltimes/news.ts index 6e722a981781..0d361183ee87 100644 --- a/lib/routes/nltimes/news.ts +++ b/lib/routes/nltimes/news.ts @@ -61,7 +61,8 @@ async function handler(ctx) { const list = $('.news-card') .slice(0, 10) - .map((_, elem) => { + .toArray() + .map((elem) => { const item = { link: $(elem).children('.news-card__title').first().children('a').first().attr('href'), title: $(elem).children('.news-card__title').first().children('a').first().text(), @@ -70,12 +71,11 @@ async function handler(ctx) { .children('.news-card__categories') .first() .children('a') - .map((_, elem) => $(elem).text()) - .get(), + .toArray() + .map((elem) => $(elem).text()), }; return item; - }) - .get(); + }); const ProcessFeed = (data) => { const $ = load(data); diff --git a/lib/routes/notateslaapp/update.ts b/lib/routes/notateslaapp/update.ts index c1c77487ee92..8d76ce19901d 100644 --- a/lib/routes/notateslaapp/update.ts +++ b/lib/routes/notateslaapp/update.ts @@ -44,18 +44,14 @@ async function handler() { title: '特斯拉系统更新', link: 'https://www.notateslaapp.com/software-updates/history/', description: '特斯拉系统更新 - 最新发布', - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('.container h1').text(), - description: item.find('.notes-container').text(), - pubDate: null, - link: item.find('.notes-container > .button-container > a').attr('href'), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('.container h1').text(), + description: item.find('.notes-container').text(), + pubDate: null, + link: item.find('.notes-container > .button-container > a').attr('href'), + }; + }), }; } diff --git a/lib/routes/now/news.ts b/lib/routes/now/news.ts index cef675f489a4..1f6b7f05f7ac 100644 --- a/lib/routes/now/news.ts +++ b/lib/routes/now/news.ts @@ -67,15 +67,15 @@ async function handler(ctx) { const $ = load(response.data); const list = $(`${category === '' ? '.homeFeaturedNews ' : '.newsCategoryColLeft '}.newsTitle`) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: `${rootUrl}${item.parent().parent().attr('href')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/nowcoder/discuss.ts b/lib/routes/nowcoder/discuss.ts index 1e9e82040910..9bfe9cede85b 100644 --- a/lib/routes/nowcoder/discuss.ts +++ b/lib/routes/nowcoder/discuss.ts @@ -40,14 +40,14 @@ async function handler(ctx) { const order_name = $('li.selected a').text(); const list = $('li.clearfix') - .map(function () { + .toArray() + .map((element) => { const info = { - title: $(this).find('div.discuss-main.clearfix a:first').text().trim().replace('\n', ' '), - link: $(this).find('div.discuss-main.clearfix a[rel]').attr('href'), + title: $(element).find('div.discuss-main.clearfix a:first').text().trim().replaceAll('\n', ' '), + link: $(element).find('div.discuss-main.clearfix a[rel]').attr('href'), }; return info; - }) - .get(); + }); const out = await Promise.all( list.map((info) => { diff --git a/lib/routes/nowcoder/jobcenter.ts b/lib/routes/nowcoder/jobcenter.ts index 9a7b953f4ec2..8571e9cc172f 100644 --- a/lib/routes/nowcoder/jobcenter.ts +++ b/lib/routes/nowcoder/jobcenter.ts @@ -60,7 +60,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('ul.reco-job-list li') .slice(0, 30) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const title = item.find('a.reco-job-title'); const company = item.find('div.reco-job-com a'); @@ -78,8 +79,7 @@ async function handler(ctx) { link: url.resolve(rootUrl, title.attr('href')), pubDate: date.toUTCString(), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/ntdtv/channel.ts b/lib/routes/ntdtv/channel.ts index ad9b8064166a..f5556390fa96 100644 --- a/lib/routes/ntdtv/channel.ts +++ b/lib/routes/ntdtv/channel.ts @@ -42,12 +42,12 @@ async function handler(ctx) { const $ = load(response.data); const title = $('h1.block_title').text(); const list = $('div.list_wrapper > div') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('div.title').text(), link: $(item).find('div.title > a').attr('href'), description: $(item).find('div.excerpt').text(), })) - .get() .filter((item) => item.link); const items = await Promise.all( diff --git a/lib/routes/nuaa/college/cae.ts b/lib/routes/nuaa/college/cae.ts index 4340975d411d..44469ecc81cf 100644 --- a/lib/routes/nuaa/college/cae.ts +++ b/lib/routes/nuaa/college/cae.ts @@ -41,15 +41,15 @@ async function handler(ctx) { const list = $('#wp_news_w6 ul li') .slice(0, 10) - .map(function () { + .toArray() + .map((element) => { const info = { - title: $(this).find('a').text(), - link: $(this).find('a').attr('href'), - date: $(this).find('span').text(), + title: $(element).find('a').text(), + link: $(element).find('a').attr('href'), + date: $(element).find('span').text(), }; return info; - }) - .get(); + }); const out = await Promise.all( list.map(async (info) => { diff --git a/lib/routes/nuaa/college/cs.ts b/lib/routes/nuaa/college/cs.ts index be076db17b45..f83504bd0674 100644 --- a/lib/routes/nuaa/college/cs.ts +++ b/lib/routes/nuaa/college/cs.ts @@ -54,15 +54,15 @@ async function handler(ctx) { const list = $('#news_list ul li') .slice(0, Math.min(Number.parseInt($('.per_count', '#wp_paging_w6').text()), Number.parseInt($('.all_count', '#wp_paging_w6').slice(1).text()))) - .map(function () { + .toArray() + .map((element) => { const info = { - title: $(this).find('a').attr('title'), - link: $(this).find('a').attr('href'), - date: $(this).find('span').text(), + title: $(element).find('a').attr('title'), + link: $(element).find('a').attr('href'), + date: $(element).find('span').text(), }; return info; - }) - .get(); + }); const out = await Promise.all( list.map(async (info) => { diff --git a/lib/routes/nuaa/jwc/jwc.ts b/lib/routes/nuaa/jwc/jwc.ts index bf856cf9d911..d83b09fd17f8 100644 --- a/lib/routes/nuaa/jwc/jwc.ts +++ b/lib/routes/nuaa/jwc/jwc.ts @@ -52,15 +52,15 @@ async function handler(ctx) { const list = $('#wp_news_w8 ul li') .slice(0, 10) - .map(function () { + .toArray() + .map((element) => { const info = { - title: $(this).find('a').text(), - link: $(this).find('a').attr('href'), - date: $(this).find('span').text(), + title: $(element).find('a').text(), + link: $(element).find('a').attr('href'), + date: $(element).find('span').text(), }; return info; - }) - .get(); + }); const out = await Promise.all( list.map(async (info) => { diff --git a/lib/routes/nuaa/yjsy/yjsy.ts b/lib/routes/nuaa/yjsy/yjsy.ts index 431f4cfe762b..066279f0fe95 100644 --- a/lib/routes/nuaa/yjsy/yjsy.ts +++ b/lib/routes/nuaa/yjsy/yjsy.ts @@ -50,15 +50,15 @@ async function handler(ctx) { const list = $('#wp_news_w6 ul li') .slice(0, 10) - .map(function () { + .toArray() + .map((element) => { const info = { - title: $(this).find('a').text(), - link: $(this).find('a').attr('href'), - date: $(this).find('span').text(), + title: $(element).find('a').text(), + link: $(element).find('a').attr('href'), + date: $(element).find('span').text(), }; return info; - }) - .get(); + }); const out = await Promise.all( list.map(async (info) => { diff --git a/lib/routes/nuist/bulletin.ts b/lib/routes/nuist/bulletin.ts index 21b32605bfa9..86ff307510cb 100644 --- a/lib/routes/nuist/bulletin.ts +++ b/lib/routes/nuist/bulletin.ts @@ -68,30 +68,28 @@ async function handler(ctx) { return { title: baseTitle + (category === '791' ? '' : ':' + map[category]), link, - item: list - .map((_, item) => { - item = $(item); + item: list.toArray().map((item) => { + item = $(item); - if (category === 'xsbgw') { - const itemXsTitle = item.find('.xs_title .btt a'); - return { - title: itemXsTitle.text(), - author: item.find('.xs_bgr').text(), - category: '学术报告', - pubDate: parseDate(item.find('.xs_date').text()), - link: new URL(itemXsTitle.attr('href'), baseUrl).href, - }; - } - - const itemTitle = item.find('.news_title'); + if (category === 'xsbgw') { + const itemXsTitle = item.find('.xs_title .btt a'); return { - title: [itemTitle.find('.zdtb img').length > 0 ? '[顶]' : '', itemTitle.find('.btt').text()].join(' '), - author: item.find('.news_org').text(), - category: itemTitle.find('.wjj').text(), - pubDate: parseDate(item.find('.news_date').text()), - link: new URL(itemTitle.find('.btt a').attr('href'), baseUrl).href, + title: itemXsTitle.text(), + author: item.find('.xs_bgr').text(), + category: '学术报告', + pubDate: parseDate(item.find('.xs_date').text()), + link: new URL(itemXsTitle.attr('href'), baseUrl).href, }; - }) - .get(), + } + + const itemTitle = item.find('.news_title'); + return { + title: [itemTitle.find('.zdtb img').length > 0 ? '[顶]' : '', itemTitle.find('.btt').text()].join(' '), + author: item.find('.news_org').text(), + category: itemTitle.find('.wjj').text(), + pubDate: parseDate(item.find('.news_date').text()), + link: new URL(itemTitle.find('.btt a').attr('href'), baseUrl).href, + }; + }), }; } diff --git a/lib/routes/nwafu/all.ts b/lib/routes/nwafu/all.ts index 4c49e5db9dd4..641ae5d6529b 100644 --- a/lib/routes/nwafu/all.ts +++ b/lib/routes/nwafu/all.ts @@ -33,7 +33,8 @@ async function handler(ctx) { const response = await got.get(nwafuMap.get(type)[0]); const $ = load(response.data); const list = $(nwafuMap.get(type)[1]) - .map((index, ele) => { + .toArray() + .map((ele) => { const itemTitle = $(ele).find(nwafuMap.get(type)[2]).text(); const itemPubDate = parseDate($(ele).find('span').text(), 'YYYY/MM/DD'); const itemLink = new URL($(ele).find(nwafuMap.get(type)[2]).attr('href'), nwafuMap.get(type)[0]).toString(); @@ -42,8 +43,7 @@ async function handler(ctx) { pubDate: itemPubDate, link: itemLink, }; - }) - .get(); + }); const out = await Promise.all( list.map((item) => diff --git a/lib/routes/nytimes/book.ts b/lib/routes/nytimes/book.ts index e1c9cb197b5e..8f31f8089c34 100644 --- a/lib/routes/nytimes/book.ts +++ b/lib/routes/nytimes/book.ts @@ -68,7 +68,8 @@ async function handler(ctx) { dataTitle = $('h1').eq(0).text(); items = $('article[itemprop=itemListElement]') - .map((index, elem) => { + .toArray() + .map((elem, index) => { const $item = $(elem); const firstInfo = $item.find('p').eq(0).text(); const $name = $item.find('h3[itemprop=name]'); @@ -95,8 +96,7 @@ async function handler(ctx) { description: `
test
${description}

${firstInfo}
Author: ${author}
Publisher: ${publisher}`, link: primaryLink, }; - }) - .get(); + }); } return { diff --git a/lib/routes/oilchem/index.ts b/lib/routes/oilchem/index.ts index 8ef61e9668f0..104413d2cfc7 100644 --- a/lib/routes/oilchem/index.ts +++ b/lib/routes/oilchem/index.ts @@ -49,15 +49,15 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.list ul ul li a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/oncc/index.ts b/lib/routes/oncc/index.ts index c93c3f6e2ebf..5416bad8aa44 100644 --- a/lib/routes/oncc/index.ts +++ b/lib/routes/oncc/index.ts @@ -68,7 +68,8 @@ async function handler(ctx) { const response = await got.get(newsUrl); const $ = load(response.data); const list = $('#focusNews > div.focusItem[type=article]') - .map((_, item) => { + .toArray() + .map((item) => { const title = $(item).find('div.focusTitle > span').text(); const link = rootUrl + $(item).find('a:nth-child(1)').attr('href'); const pubDate = parseDate($(item).attr('edittime'), 'YYYYMMDDHHmmss'); @@ -78,8 +79,7 @@ async function handler(ctx) { link, pubDate, }; - }) - .get(); + }); const items = await Promise.all( list.map(async (item) => { diff --git a/lib/routes/oreno3d/main.ts b/lib/routes/oreno3d/main.ts index baf858e2fb0f..9555aa5e2a21 100644 --- a/lib/routes/oreno3d/main.ts +++ b/lib/routes/oreno3d/main.ts @@ -74,48 +74,46 @@ async function handler(ctx) { const title = getLinksTitle(response).title; const list = getLinksTitle(response).list; const items = await Promise.all( - list - .map(async (_, item) => { - // 第一页,获取搜各视频地址 - const link = $(item).attr('href'); - // 第二页数据分析+缓存 - const sec_data = await get_sec_page_data(link); - // 传递 - const raw_pic_link = sec_data.raw_pic_link; - const video_name = sec_data.video_name; - const authors = sec_data.authors; - const origins = sec_data.origins; - const characters = sec_data.characters; - const tags = sec_data.tags; - const desc = sec_data.desc; - const iwara_link = sec_data.iwara_link; - const oreno3d_link = sec_data.oreno3d_link; - // 打包,缓存HTML - const description = art(path.join(__dirname, 'templates/description.art'), { - raw_pic_link, - video_name, - authors, - origins, - characters, - tags, - desc, - iwara_link, - oreno3d_link, - }); - const title = `${video_name} - ${authors}`; - const realData = await cache.tryGet(oreno3d_link, () => { - const result = { - title, - author: authors, - link: oreno3d_link, - category: tags.split(' '), - description, - }; - return result; - }); - return realData; - }) - .get() + list.toArray().map(async (item) => { + // 第一页,获取搜各视频地址 + const link = $(item).attr('href'); + // 第二页数据分析+缓存 + const sec_data = await get_sec_page_data(link); + // 传递 + const raw_pic_link = sec_data.raw_pic_link; + const video_name = sec_data.video_name; + const authors = sec_data.authors; + const origins = sec_data.origins; + const characters = sec_data.characters; + const tags = sec_data.tags; + const desc = sec_data.desc; + const iwara_link = sec_data.iwara_link; + const oreno3d_link = sec_data.oreno3d_link; + // 打包,缓存HTML + const description = art(path.join(__dirname, 'templates/description.art'), { + raw_pic_link, + video_name, + authors, + origins, + characters, + tags, + desc, + iwara_link, + oreno3d_link, + }); + const title = `${video_name} - ${authors}`; + const realData = await cache.tryGet(oreno3d_link, () => { + const result = { + title, + author: authors, + link: oreno3d_link, + category: tags.split(' '), + description, + }; + return result; + }); + return realData; + }) ); return { items, title }; } diff --git a/lib/routes/p-articles/contributors.ts b/lib/routes/p-articles/contributors.ts index 1e5a397bef25..e9bfec6b8ffe 100644 --- a/lib/routes/p-articles/contributors.ts +++ b/lib/routes/p-articles/contributors.ts @@ -26,14 +26,14 @@ async function handler(ctx) { const $ = load(response); const list = $('div.contect_box_05in > a') - .map(function () { + .toArray() + .map((element) => { const info = { - title: $(this).find('h3').text().trim(), - link: new URL($(this).attr('href'), rootUrl).href, + title: $(element).find('h3').text().trim(), + link: new URL($(element).attr('href'), rootUrl).href, }; return info; - }) - .get(); + }); const items = await Promise.all( list.map((info) => diff --git a/lib/routes/p-articles/section.ts b/lib/routes/p-articles/section.ts index dbc3650c36ad..ffd96f3499b6 100644 --- a/lib/routes/p-articles/section.ts +++ b/lib/routes/p-articles/section.ts @@ -32,14 +32,14 @@ async function handler(ctx) { }; const list = $('div.contect_box_04 > a') - .map(function () { + .toArray() + .map((element) => { const info = { - title: $(this).find('h1').text().trim(), - link: new URL($(this).attr('href'), rootUrl).href, + title: $(element).find('h1').text().trim(), + link: new URL($(element).attr('href'), rootUrl).href, }; return info; - }) - .get(); + }); list.unshift(topInfo); const items = await Promise.all( diff --git a/lib/routes/patagonia/new-arrivals.ts b/lib/routes/patagonia/new-arrivals.ts index afd57b3526c0..a2819b8e4fc4 100644 --- a/lib/routes/patagonia/new-arrivals.ts +++ b/lib/routes/patagonia/new-arrivals.ts @@ -53,32 +53,27 @@ async function handler(ctx) { const $ = load(data); const list = $('.product') - .map(function () { + .toArray() + .map((element) => { const data = {}; - data.title = $(this).find('.product-tile').data('tealium').product_name[0]; - let imgUrl = new URL($(this).find('[itemprop="image"]').attr('content')); + data.title = $(element).find('.product-tile').data('tealium').product_name[0]; + let imgUrl = new URL($(element).find('[itemprop="image"]').attr('content')); imgUrl = extractSfrmUrl(imgUrl); - const price = $(this).find('[itemprop="price"]').eq(0).text(); - data.link = host + '/' + $(this).find('[itemprop="url"]').attr('href'); + const price = $(element).find('[itemprop="price"]').eq(0).text(); + data.link = host + '/' + $(element).find('[itemprop="url"]').attr('href'); data.description = price + art(path.join(__dirname, 'templates/product-description.art'), { imgUrl, }); - data.category = $(this).find('[itemprop="category"]').attr('content'); + data.category = $(element).find('[itemprop="category"]').attr('content'); return data; - }) - .get(); + }); return { title: `Patagonia - New Arrivals - ${category.toUpperCase()}`, link: `${host}/shop/${categoryMap[category][1]}`, description: `Patagonia - New Arrivals - ${category.toUpperCase()}`, - item: list.map((item) => ({ - title: item.title, - description: item.description, - link: item.link, - category: item.category, - })), + item: list, }; } diff --git a/lib/routes/penguin-random-house/articles.ts b/lib/routes/penguin-random-house/articles.ts index 3673ab3983bf..26c21b7568e3 100644 --- a/lib/routes/penguin-random-house/articles.ts +++ b/lib/routes/penguin-random-house/articles.ts @@ -33,13 +33,11 @@ async function handler(ctx) { const $ = load(res.data); const itemArray = $('.archive-module-half-container,.archive-module-third-container') - .map(function () { - return { - url: $(this).find('a').attr('href'), - title: $(this).find('.archive-module-text').first().text(), - }; - }) - .get(); + .toArray() + .map((element) => ({ + url: $(element).find('a').attr('href'), + title: $(element).find('.archive-module-text').first().text(), + })); const out = await utils.parseList(itemArray, ctx, utils.parseArticle); diff --git a/lib/routes/penguin-random-house/thereaddown.ts b/lib/routes/penguin-random-house/thereaddown.ts index 8a3321e569ed..d06761e93dc7 100644 --- a/lib/routes/penguin-random-house/thereaddown.ts +++ b/lib/routes/penguin-random-house/thereaddown.ts @@ -33,13 +33,11 @@ async function handler(ctx) { const $ = load(res.data); const itemArray = $('.archive-module-half-container,.archive-module-third-container') - .map(function () { - return { - url: $(this).find('a').attr('href'), - title: $(this).find('.archive-module-text').first().text(), - }; - }) - .get(); + .toArray() + .map((element) => ({ + url: $(element).find('a').attr('href'), + title: $(element).find('.archive-module-text').first().text(), + })); const out = await utils.parseList(itemArray, ctx, utils.parseBooks); diff --git a/lib/routes/penguin-random-house/utils.ts b/lib/routes/penguin-random-house/utils.ts index e4cb1ab44b46..89e274914a74 100644 --- a/lib/routes/penguin-random-house/utils.ts +++ b/lib/routes/penguin-random-house/utils.ts @@ -28,7 +28,7 @@ const parseBookInList = (element) => { const parsePubDate = (data) => { const dateString = data('script') - .get() + .toArray() .find((element) => { const fullString = element.children[0]; if (!fullString || !fullString.data) { diff --git a/lib/routes/people/xjpjh.ts b/lib/routes/people/xjpjh.ts index 21250193c6f4..ed899cf16d44 100644 --- a/lib/routes/people/xjpjh.ts +++ b/lib/routes/people/xjpjh.ts @@ -54,14 +54,14 @@ async function handler(ctx) { const list = $('ul.list_14.p1_2.clearfix li') .slice(0, 10) - .map(function () { + .toArray() + .map((element) => { const info = { - title: $(this).find('a').text(), - link: $(this).find('a').attr('href'), + title: $(element).find('a').text(), + link: $(element).find('a').attr('href'), }; return info; - }) - .get(); + }); const out = await Promise.all( list.map(async (info) => { diff --git a/lib/routes/pianyuan/app.ts b/lib/routes/pianyuan/app.ts index 7047bea63489..c77c3e1f5f04 100644 --- a/lib/routes/pianyuan/app.ts +++ b/lib/routes/pianyuan/app.ts @@ -55,7 +55,7 @@ async function handler(ctx) { const response = await utils.request(link, cache); const $ = load(response.data); const detailLinks = $('#main-container > div > div.col-md-10 > table > tbody > tr') - .get() + .toArray() .map((tr) => $(tr).find('td.dt.prel.nobr > a').attr('href')); detailLinks.shift(); const items = await utils.ProcessFeed(detailLinks, cache); diff --git a/lib/routes/pianyuan/search.ts b/lib/routes/pianyuan/search.ts index f6992168801d..e5612182411d 100644 --- a/lib/routes/pianyuan/search.ts +++ b/lib/routes/pianyuan/search.ts @@ -28,7 +28,7 @@ async function handler(ctx) { const $ = load(response.data); // 只获取第一页的搜索结果 const searchLinks = $('.nomt > a') - .get() + .toArray() .map((a) => $(a).attr('href')); if (searchLinks.length === 0) { throw new Error('pianyuan 搜索失败'); @@ -43,7 +43,7 @@ async function handler(ctx) { const res = await utils.request(link, cache); const content = load(res.data); content('.ico.ico_bt') - .get() + .toArray() .map((a) => detailLinks.push($(a).attr('href'))); }); return single; diff --git a/lib/routes/pincong/hot.ts b/lib/routes/pincong/hot.ts index d1385260c1fe..643577d620f3 100644 --- a/lib/routes/pincong/hot.ts +++ b/lib/routes/pincong/hot.ts @@ -36,13 +36,11 @@ async function handler(ctx) { return { title: '品葱 - 精选', link: `${baseUrl}/hot/${category === '0' ? '' : `category-${category}`}`, - item: list - .map((_, item) => ({ - title: $(item).find('h2 a').text().trim(), - description: $(item).find('div.markitup-box').html(), - link: baseUrl + $(item).find('div.mod-head h2 a').attr('href'), - pubDate: parseDate($(item).find('div.mod-footer .aw-small-text').text()), - })) - .get(), + item: list.toArray().map((item) => ({ + title: $(item).find('h2 a').text().trim(), + description: $(item).find('div.markitup-box').html(), + link: baseUrl + $(item).find('div.mod-head h2 a').attr('href'), + pubDate: parseDate($(item).find('div.mod-footer .aw-small-text').text()), + })), }; } diff --git a/lib/routes/pincong/index.ts b/lib/routes/pincong/index.ts index 17327444cb82..8160dc482352 100644 --- a/lib/routes/pincong/index.ts +++ b/lib/routes/pincong/index.ts @@ -46,12 +46,10 @@ async function handler(ctx) { return { title: '品葱 - 发现', link: url, - item: list - .map((_, item) => ({ - title: $(item).find('h4 a').text().trim(), - link: baseUrl + $(item).find('h4 a').attr('href'), - pubDate: parseDate($(item).attr('data-created-at') * 1000), - })) - .get(), + item: list.toArray().map((item) => ({ + title: $(item).find('h4 a').text().trim(), + link: baseUrl + $(item).find('h4 a').attr('href'), + pubDate: parseDate($(item).attr('data-created-at') * 1000), + })), }; } diff --git a/lib/routes/pincong/topic.ts b/lib/routes/pincong/topic.ts index 9c84da8f6c55..54418ef1d6aa 100644 --- a/lib/routes/pincong/topic.ts +++ b/lib/routes/pincong/topic.ts @@ -28,12 +28,10 @@ async function handler(ctx) { return { title: `品葱 - ${ctx.req.param('topic')}`, link: url, - item: list - .map((_, item) => ({ - title: $(item).find('h4 a').text().trim(), - link: baseUrl + $(item).find('h4 a').attr('href'), - pubDate: parseDate($(item).attr('data-created-at') * 1000), - })) - .get(), + item: list.toArray().map((item) => ({ + title: $(item).find('h4 a').text().trim(), + link: baseUrl + $(item).find('h4 a').attr('href'), + pubDate: parseDate($(item).attr('data-created-at') * 1000), + })), }; } diff --git a/lib/routes/piyao/jrpy.ts b/lib/routes/piyao/jrpy.ts index ec6128538bfe..3774ca096e5d 100644 --- a/lib/routes/piyao/jrpy.ts +++ b/lib/routes/piyao/jrpy.ts @@ -36,11 +36,11 @@ async function handler() { const response = await got(currentUrl); const $ = load(response.data); const list = $('ul#list li') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a').text(), link: new URL($(item).find('a').attr('href'), rootUrl).href, - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/pku/bbs/hot.ts b/lib/routes/pku/bbs/hot.ts index e85f7bbfdb62..d0f57e9d8d88 100644 --- a/lib/routes/pku/bbs/hot.ts +++ b/lib/routes/pku/bbs/hot.ts @@ -42,13 +42,11 @@ async function handler() { const r = await got('https://bbs.pku.edu.cn/v2/hot-topic.php', { headers }); const $ = load(r.body); const listItems = $('#list-content .list-item') - .map(function () { - return { - url: new URL($(this).find('> a.link').attr('href'), 'https://bbs.pku.edu.cn/v2/').href, - title: $(this).find('.title').text(), - }; - }) - .get() + .toArray() + .map((element) => ({ + url: new URL($(element).find('> a.link').attr('href'), 'https://bbs.pku.edu.cn/v2/').href, + title: $(element).find('.title').text(), + })) .slice(0, 10); const item = await Promise.all( diff --git a/lib/routes/pku/cls/lecture.ts b/lib/routes/pku/cls/lecture.ts index 8ce515f93a21..5f31cd64e295 100644 --- a/lib/routes/pku/cls/lecture.ts +++ b/lib/routes/pku/cls/lecture.ts @@ -39,12 +39,12 @@ async function handler() { link: homeUrl, description: `北京大学生命科学学院近期讲座`, item: $('a.clearfix') - .map((index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('p').text().trim(), description: '日期: ' + $(item).find('span'), // ${item.find('.chair_txt div').find('span').second().text()} pubDate: parseDate($(item).find('.date').text()), link: baseUrl + $('a.clearfix').attr('href'), - })) - .get(), + })), }; } diff --git a/lib/routes/pku/hr.ts b/lib/routes/pku/hr.ts index 77700a0706c5..906fedeac747 100644 --- a/lib/routes/pku/hr.ts +++ b/lib/routes/pku/hr.ts @@ -47,15 +47,15 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.item-list li a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text().replace(/\d+、/, ''), link: `${rootUrl}/${category}/${item.attr('href')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/pku/nsd.ts b/lib/routes/pku/nsd.ts index 039ad8868b2e..1bc3011a8491 100644 --- a/lib/routes/pku/nsd.ts +++ b/lib/routes/pku/nsd.ts @@ -50,7 +50,8 @@ async function handler() { const $ = load(response.data); const list = $('div.maincontent > ul > li') - .map((_index, item) => { + .toArray() + .map((item) => { const href = $(item).find('a').attr('href'); const type = pageType(href); return { @@ -59,8 +60,7 @@ async function handler() { pubDate: parseDate($(item).find('span').first().text(), 'YYYY-MM-DD'), type, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => { diff --git a/lib/routes/pku/pkuyjs.ts b/lib/routes/pku/pkuyjs.ts index 5b09196abc13..9b174f7fb070 100644 --- a/lib/routes/pku/pkuyjs.ts +++ b/lib/routes/pku/pkuyjs.ts @@ -37,18 +37,14 @@ async function handler() { title: `${$('.twostage_title_C').text()} - ${$('title').text()}`, link, description: '北京大学研究生院通知公告', - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('li a').text(), - description: item.find('li a').text(), - link: item.find('li a').attr('href'), - pubDate: parseDate(item.find('.zsxxCont_list_time').text()), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('li a').text(), + description: item.find('li a').text(), + link: item.find('li a').attr('href'), + pubDate: parseDate(item.find('.zsxxCont_list_time').text()), + }; + }), }; } diff --git a/lib/routes/pku/rccp/mzyt.ts b/lib/routes/pku/rccp/mzyt.ts index 9b05a588eee9..69af2b0d9d72 100644 --- a/lib/routes/pku/rccp/mzyt.ts +++ b/lib/routes/pku/rccp/mzyt.ts @@ -37,12 +37,12 @@ async function handler() { link: baseUrl, description: $('meta[name="description"]').attr('content'), item: $('li.list') - .map((index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a').text().trim(), description: '', pubDate: parseDate($(item).find('span').first().text(), '[YYYY-MM-DD]'), link: baseUrl + $(item).find('a').attr('href'), - })) - .get(), + })), }; } diff --git a/lib/routes/pku/scc/recruit.ts b/lib/routes/pku/scc/recruit.ts index 94050606740c..1e84556f9836 100644 --- a/lib/routes/pku/scc/recruit.ts +++ b/lib/routes/pku/scc/recruit.ts @@ -44,7 +44,8 @@ async function handler(ctx) { const feed_title = $('h2.category').text(); const list = $('div#articleList-body div.item.clearfix') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('a'); const date = parseDate(item.find('div.item-date').text()); @@ -53,8 +54,7 @@ async function handler(ctx) { link: new URL(a.attr('href'), baseUrl).href, pubDate: date, }; - }) - .get(); + }); const sorted = list.sort((a, b) => b.pubDate.getTime() - a.pubDate.getTime()).slice(0, 10); diff --git a/lib/routes/playpcesor/rss.ts b/lib/routes/playpcesor/rss.ts index 4880747310a3..ce01a3660345 100644 --- a/lib/routes/playpcesor/rss.ts +++ b/lib/routes/playpcesor/rss.ts @@ -24,7 +24,8 @@ async function handler() { const $ = load(response.data); const list = $("article[class='post-outer-container']") - .map((i, e) => { + .toArray() + .map((e) => { const element = $(e); const title = element.find('h3 > a').text(); const link = element.find('h3 > a').attr('href'); @@ -37,8 +38,7 @@ async function handler() { link, pubDate: parseDate(dateraw, 'YYYY-MM-DDTHH:mm:ss+08:00'), }; - }) - .get(); + }); return { title: '电脑玩物', diff --git a/lib/routes/priconne-redive/news.ts b/lib/routes/priconne-redive/news.ts index 1c6b57779183..2da7840083b6 100644 --- a/lib/routes/priconne-redive/news.ts +++ b/lib/routes/priconne-redive/news.ts @@ -115,7 +115,7 @@ async function handler(ctx) { url: 'http://www.princessconnect.so-net.tw/news', }); const $ = load(response.data); - const list = $('.news_con dl dd').get(); + const list = $('.news_con dl dd').toArray(); const items = await Promise.all( list.map((item) => { diff --git a/lib/routes/ps/trophy.ts b/lib/routes/ps/trophy.ts index 4c1d24686cc5..6d8f79139eb8 100644 --- a/lib/routes/ps/trophy.ts +++ b/lib/routes/ps/trophy.ts @@ -30,11 +30,9 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.zebra tr') - .filter(function () { - return $(this).find('.progress-bar span').text() !== '0%'; - }) - .map((i, e) => $(e).find('.title').attr('href')) - .get() + .filter((element) => $(element).find('.progress-bar span').text() !== '0%') + .toArray() + .map((e) => $(e).find('.title').attr('href')) .slice(0, 3); const items = await Promise.all( @@ -49,44 +47,38 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.zebra tr.completed'); - const items = list - .map((i, item) => { - item = $(item); - const classMap = { - Platinum: '白金', - Gold: '金', - Silver: '银', - Bronze: '铜', - }; - return { - title: item.find('.title').text() + ' - ' + $('.page h3').eq(0).text().trim().replace(' Trophies', ''), - description: `
${item - .find('.title') - .parent() - .contents() - .filter(function () { - return this.nodeType === 3; - }) - .text() - .trim()}
等级:${classMap[item.find('td').eq(5).find('img').attr('title')]}
珍贵度:${item.find('.hover-show .typo-top').text()}`, - link: 'https://psnprofiles.com' + item.find('.title').attr('href'), - pubDate: new Date( - +new Date( - item - .find('.typo-top-date nobr') - .contents() - .filter(function () { - return this.nodeType === 3; - }) - .text() + - ' ' + - item.find('.typo-bottom-date').text() - ) + - 8 * 60 * 60 * 1000 - ).toUTCString(), - }; - }) - .get(); + const items = list.toArray().map((item) => { + item = $(item); + const classMap = { + Platinum: '白金', + Gold: '金', + Silver: '银', + Bronze: '铜', + }; + return { + title: item.find('.title').text() + ' - ' + $('.page h3').eq(0).text().trim().replace(' Trophies', ''), + description: `
${item + .find('.title') + .parent() + .contents() + .filter((_, element) => element.nodeType === 3) + .text() + .trim()}
等级:${classMap[item.find('td').eq(5).find('img').attr('title')]}
珍贵度:${item.find('.hover-show .typo-top').text()}`, + link: 'https://psnprofiles.com' + item.find('.title').attr('href'), + pubDate: new Date( + +new Date( + item + .find('.typo-top-date nobr') + .contents() + .filter((_, element) => element.nodeType === 3) + .text() + + ' ' + + item.find('.typo-bottom-date').text() + ) + + 8 * 60 * 60 * 1000 + ).toUTCString(), + }; + }); return items; }) diff --git a/lib/routes/qidian/free-next.ts b/lib/routes/qidian/free-next.ts index 986ad080593c..b19d71d715b3 100644 --- a/lib/routes/qidian/free-next.ts +++ b/lib/routes/qidian/free-next.ts @@ -43,21 +43,19 @@ async function handler(ctx) { const $ = load(response.data); const list = $('div.other-rec-wrap li'); - const out = list - .map((index, item) => { - item = $(item); + const out = list.toArray().map((item) => { + item = $(item); - const img = ``; - const rank = `

评分:${item.find('.img-box span').text()}

`; + const img = ``; + const rank = `

评分:${item.find('.img-box span').text()}

`; - return { - title: item.find('.book-info h4 a').text(), - description: img + rank + item.find('p.intro').html(), - link: 'https:' + item.find('.book-info h4 a').attr('href'), - author: item.find('p.author a').text(), - }; - }) - .get(); + return { + title: item.find('.book-info h4 a').text(), + description: img + rank + item.find('p.intro').html(), + link: 'https:' + item.find('.book-info h4 a').attr('href'), + author: item.find('p.author a').text(), + }; + }); return { title, diff --git a/lib/routes/qidian/free.ts b/lib/routes/qidian/free.ts index 82b64208aeca..a864f61c03b0 100644 --- a/lib/routes/qidian/free.ts +++ b/lib/routes/qidian/free.ts @@ -44,23 +44,21 @@ async function handler(ctx) { const $ = load(response.data); const list = $('#limit-list li'); - const out = list - .map((index, item) => { - item = $(item); + const out = list.toArray().map((item) => { + item = $(item); - const img = ``; - const rank = `

评分:${item.find('.score').text()}

`; - const update = ` a').attr('href')}>${item.find('p.update > a').text()}`; + const img = ``; + const rank = `

评分:${item.find('.score').text()}

`; + const update = ` a').attr('href')}>${item.find('p.update > a').text()}`; - return { - title: item.find('.book-mid-info h4 a').text(), - description: img + rank + update + '
' + item.find('p.intro').html(), - pubDate: parseRelativeDate(item.find('p.update span').text()), - link: 'https:' + item.find('.book-mid-info h4 a').attr('href'), - author: item.find('p.author a.name').text(), - }; - }) - .get(); + return { + title: item.find('.book-mid-info h4 a').text(), + description: img + rank + update + '
' + item.find('p.intro').html(), + pubDate: parseRelativeDate(item.find('p.update span').text()), + link: 'https:' + item.find('.book-mid-info h4 a').attr('href'), + author: item.find('p.author a.name').text(), + }; + }); return { title, diff --git a/lib/routes/qipamaijia/index.ts b/lib/routes/qipamaijia/index.ts index 407d801bf51d..c7168c72e155 100644 --- a/lib/routes/qipamaijia/index.ts +++ b/lib/routes/qipamaijia/index.ts @@ -43,12 +43,12 @@ async function handler(ctx) { const $ = load(response.data); const title = $('#highlight').text(); const items = $('div.col_l > div.block') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('div.content').text(), link: $(item).find('a').attr('href'), description: $(item).find('div.content').html() + $(item).find('div.thumb').html(), - })) - .get(); + })); return { title: `奇葩买家秀 - ${title}`, diff --git a/lib/routes/qq88/index.ts b/lib/routes/qq88/index.ts index e02e1e48ff3f..ef9e1141a1a7 100644 --- a/lib/routes/qq88/index.ts +++ b/lib/routes/qq88/index.ts @@ -40,7 +40,8 @@ async function handler(ctx) { const list = $('.entry-title a') .slice(0, 15) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { @@ -48,8 +49,7 @@ async function handler(ctx) { link: item.attr('href'), pubDate: parseDate(item.parent().next().find('.mh-meta-date').eq(-1).text().split(':')[1]), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/qust/jw.ts b/lib/routes/qust/jw.ts index a6e74cf5312d..12042667aa33 100644 --- a/lib/routes/qust/jw.ts +++ b/lib/routes/qust/jw.ts @@ -35,7 +35,8 @@ async function handler() { }); const $ = load(response.data); const items = $('.winstyle60982 tr a.c60982') - .map((_, element) => { + .toArray() + .map((element) => { const linkElement = $(element); const itemTitle = linkElement.text().trim(); const path = linkElement.attr('href'); @@ -44,8 +45,7 @@ async function handler() { title: itemTitle, link: itemUrl, }; - }) - .get(); + }); return { title: '青岛科技大学 - 教务通知', diff --git a/lib/routes/reuters/investigates.ts b/lib/routes/reuters/investigates.ts index 16204e38197f..22147dcbb222 100644 --- a/lib/routes/reuters/investigates.ts +++ b/lib/routes/reuters/investigates.ts @@ -31,11 +31,11 @@ async function handler() { const $ = load(response.data); const list = $('article.section-article-container.row') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('h2.subtitle').text(), link: $(item).find('a.row.d-flex').prop('href'), - })) - .get(); + })); const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { diff --git a/lib/routes/ruc/ai.ts b/lib/routes/ruc/ai.ts index 349137a8b7eb..c2aca8af9615 100644 --- a/lib/routes/ruc/ai.ts +++ b/lib/routes/ruc/ai.ts @@ -58,8 +58,8 @@ export const route: Route = { item.description = frame .children() .slice(3) - .map((i, el) => $.html(el)) - .get() + .toArray() + .map((el) => $.html(el)) .join(''); } catch { item.description = ''; diff --git a/lib/routes/rustcc/jobs.ts b/lib/routes/rustcc/jobs.ts index 191e67508312..bcb291289be6 100644 --- a/lib/routes/rustcc/jobs.ts +++ b/lib/routes/rustcc/jobs.ts @@ -41,7 +41,7 @@ async function handler() { }); const $ = load(response.data); - const list = $('.article-list li').get(); + const list = $('.article-list li').toArray(); return { title: 'Rust语言中文社区 | 招聘', diff --git a/lib/routes/rustcc/news.ts b/lib/routes/rustcc/news.ts index 22bf1a701e65..cccac9c060d0 100644 --- a/lib/routes/rustcc/news.ts +++ b/lib/routes/rustcc/news.ts @@ -32,7 +32,7 @@ async function handler() { }); const $ = load(response.data); - const list = $('.article-list li').get(); + const list = $('.article-list li').toArray(); return { title: 'Rust语言中文社区 | 新闻/聚合', diff --git a/lib/routes/sdu/cmse.ts b/lib/routes/sdu/cmse.ts index b057db57fb77..8affc159a3c4 100644 --- a/lib/routes/sdu/cmse.ts +++ b/lib/routes/sdu/cmse.ts @@ -37,7 +37,8 @@ async function handler(ctx) { const $ = load(response.data); let item = $('.article_list li') - .map((_, e) => { + .toArray() + .map((e) => { e = $(e); const a = e.find('a'); return { @@ -45,8 +46,7 @@ async function handler(ctx) { link: a.attr('href'), pubDate: parseDate(e.find('.date').text(), 'YYYY/MM/DD'), }; - }) - .get(); + }); item = await Promise.all( item diff --git a/lib/routes/sdu/cs/index.ts b/lib/routes/sdu/cs/index.ts index a471d22b5e2a..63760d348b45 100644 --- a/lib/routes/sdu/cs/index.ts +++ b/lib/routes/sdu/cs/index.ts @@ -59,7 +59,7 @@ export const route: Route = { name: '计算机科学与技术学院通知', maintainers: ['Ji4n1ng', 'wiketool'], handler, - description: `| 学院公告 | 学术报告 | 科技简讯 | 本科教育 | 研究生教育 | + description: `| 学院公告 | 学术报告 | 科技简讯 | 本科教育 | 研究生教育 | | -------- | -------- | -------- | -------- | -------- | | announcement | academic | technology | undergraduate | postgraduate |`, }; @@ -73,7 +73,8 @@ async function handler(ctx) { const $ = load(response.data); let item = $('.dqlb ul li') - .map((_, e) => { + .toArray() + .map((e) => { e = $(e); const a = e.find('a'); return { @@ -81,8 +82,7 @@ async function handler(ctx) { link: a.attr('href').startsWith('info/') ? host + a.attr('href') : a.attr('href'), pubDate: parseDate(e.find('.fr').text().trim(), 'YYYY-MM-DD'), }; - }) - .get(); + }); item = await Promise.all( item.map((item) => diff --git a/lib/routes/sdu/epe.ts b/lib/routes/sdu/epe.ts index d52e5e5001a6..7b5e5af8d767 100644 --- a/lib/routes/sdu/epe.ts +++ b/lib/routes/sdu/epe.ts @@ -38,14 +38,14 @@ async function handler(ctx) { const $ = load(response.data); let item = $('#page_right_main li a') - .map((_, e) => { + .toArray() + .map((e) => { e = $(e); return { title: e.attr('title'), link: e.attr('href'), }; - }) - .get(); + }); item = await Promise.all( item diff --git a/lib/routes/sdu/mech.ts b/lib/routes/sdu/mech.ts index e4be28000ecc..7a9e48ff5b99 100644 --- a/lib/routes/sdu/mech.ts +++ b/lib/routes/sdu/mech.ts @@ -38,15 +38,14 @@ async function handler(ctx) { const $ = load(response.data); let item = $('#page_list li a') - .slice(0, 1) - .map((_, e) => { + .toArray() + .map((e) => { e = $(e); return { title: e.attr('title'), link: e.attr('href'), }; - }) - .get(); + }); item = await Promise.all( item diff --git a/lib/routes/sdu/sc.ts b/lib/routes/sdu/sc.ts index dee998626daa..43732ed64b17 100644 --- a/lib/routes/sdu/sc.ts +++ b/lib/routes/sdu/sc.ts @@ -37,7 +37,8 @@ async function handler(ctx) { const $ = load(response.data); let item = $('.newlist01 li') - .map((_, e) => { + .toArray() + .map((e) => { e = $(e); const a = e.find('a'); let link = a.attr('href'); @@ -47,8 +48,7 @@ async function handler(ctx) { link, pubDate: parseDate(e.find('.date').text().trim()), }; - }) - .get(); + }); item = await Promise.all( item.map((item) => diff --git a/lib/routes/shmeea/self-study.ts b/lib/routes/shmeea/self-study.ts index 4c2a10d8c40f..b5434032b1f1 100644 --- a/lib/routes/shmeea/self-study.ts +++ b/lib/routes/shmeea/self-study.ts @@ -75,7 +75,7 @@ async function handler() { const data = response.data; const $ = load(data); - const list = $('#main > div.container > div > div.span9 > div.page-he > div > ul > li').get(); + const list = $('#main > div.container > div > div.span9 > div.page-he > div > ul > li').toArray(); const detail = await load_detail(list, cache); diff --git a/lib/routes/shopback/store.ts b/lib/routes/shopback/store.ts index 2c9f7776c614..af21e4db6450 100644 --- a/lib/routes/shopback/store.ts +++ b/lib/routes/shopback/store.ts @@ -41,7 +41,8 @@ async function handler(ctx) { $('table').remove(); const items = $('div[data-content-name]') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { @@ -50,8 +51,7 @@ async function handler(ctx) { description: `

${item.find('.mb-3').text()}

`, link: `${rootUrl}/login?redirect=/redirect/alink/${item.attr('data-content-id')}`, }; - }) - .get(); + }); return { title: `${$('h1').text()} - ShopBack`, diff --git a/lib/routes/sicau/dky.ts b/lib/routes/sicau/dky.ts index 9c9f7bf02d7b..d98801a34b53 100644 --- a/lib/routes/sicau/dky.ts +++ b/lib/routes/sicau/dky.ts @@ -46,7 +46,8 @@ async function handler(ctx) { const list = $('a.tit') .slice(0, 10) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { @@ -54,8 +55,7 @@ async function handler(ctx) { link: `${rootUrl}/${item.attr('href')}`, pubDate: timezone(parseDate(item.prev().text(), 'YYYY-MM-DD'), +8), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/sicau/yan.ts b/lib/routes/sicau/yan.ts index 07fd45b48e63..1838df07160c 100644 --- a/lib/routes/sicau/yan.ts +++ b/lib/routes/sicau/yan.ts @@ -46,15 +46,15 @@ async function handler(ctx) { const list = $('.list-4 a[title]') .slice(0, 10) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: `${rootUrl}${item.attr('href').replace(/\.\./, '/')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/sicau/zsjy.ts b/lib/routes/sicau/zsjy.ts index 1e9db002c835..7c07626252ee 100644 --- a/lib/routes/sicau/zsjy.ts +++ b/lib/routes/sicau/zsjy.ts @@ -44,7 +44,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('a.tit') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { @@ -52,8 +53,7 @@ async function handler(ctx) { pubDate: parseDate(item.prev().text()), link: `${rootUrl}${item.attr('href').replace(/\.\./, '/')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/simpleinfo/index.ts b/lib/routes/simpleinfo/index.ts index 414d4b503b11..c2eb6e13876a 100644 --- a/lib/routes/simpleinfo/index.ts +++ b/lib/routes/simpleinfo/index.ts @@ -53,15 +53,15 @@ async function handler(ctx) { $('.-ad').remove(); const list = $('.article-item') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.find('.title').text(), link: item.find('a').first().attr('href'), category: item.find('.category').text(), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/sjtu/gs.ts b/lib/routes/sjtu/gs.ts index 4030d2552096..8d3d9fdb4128 100644 --- a/lib/routes/sjtu/gs.ts +++ b/lib/routes/sjtu/gs.ts @@ -59,7 +59,8 @@ async function handler(ctx) { const $ = load(response.data); const list = $('a.announcement-item') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const day = item.find('.day').text().trim().replace('.', '-'); @@ -70,8 +71,7 @@ async function handler(ctx) { link: `${item.attr('href').startsWith('http') ? '' : rootUrl}${item.attr('href')}`, pubDate: timezone(parseDate(`${year}-${day}`, 'YYYY-MM-DD'), +8), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/snowpeak/us-new-arrivals.ts b/lib/routes/snowpeak/us-new-arrivals.ts index 6b88744d561c..091a39e047fe 100644 --- a/lib/routes/snowpeak/us-new-arrivals.ts +++ b/lib/routes/snowpeak/us-new-arrivals.ts @@ -39,9 +39,10 @@ async function handler() { const $ = load(data); const list = $('.element.product-tile') - .map(function () { + .toArray() + .map((element) => { const data = {}; - const product = $(this).find('.product-data').data('product'); + const product = $(element).find('.product-data').data('product'); data.title = product.title; data.link = `${host}/products/${product.handle}`; data.pubDate = new Date(product.published_at).toUTCString(); @@ -54,8 +55,7 @@ async function handler() { }); return data; - }) - .get(); + }); return { title: 'Snow Peak - New Arrivals', link: `${host}/new-arrivals`, diff --git a/lib/routes/sobooks/utils.ts b/lib/routes/sobooks/utils.ts index 9fb9620c417a..74379781475a 100644 --- a/lib/routes/sobooks/utils.ts +++ b/lib/routes/sobooks/utils.ts @@ -15,14 +15,14 @@ const utils = async (ctx, currentUrl) => { const list = $('.card-item h3 a') .slice(0, 15) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/soundofhope/channel.ts b/lib/routes/soundofhope/channel.ts index f0a030ae5877..d2cc00e3c470 100644 --- a/lib/routes/soundofhope/channel.ts +++ b/lib/routes/soundofhope/channel.ts @@ -42,11 +42,11 @@ async function handler(ctx) { const $ = load(response.data); const title = $('div.left > nav').text().split('/').slice(1).join(''); const list = $('div.item') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('div.title').text(), link: new URL($(item).find('a').attr('href'), host).href, - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/springer/journal.ts b/lib/routes/springer/journal.ts index 98e404b6d66d..d3d0fe66d2c3 100644 --- a/lib/routes/springer/journal.ts +++ b/lib/routes/springer/journal.ts @@ -50,15 +50,16 @@ async function handler(ctx) { const $2 = load(response2.data); const issue = $2('h2.app-journal-latest-issue__heading').text(); const list = $2('ol.u-list-reset > li') - .map((_, item) => { + .toArray() + .map((item) => { const title = $(item).find('h3.app-card-open__heading').find('a').text().trim(); const link = $(item).find('h3.app-card-open__heading').find('a').attr('href'); const doi = link.replace('https://link.springer.com/article/', ''); const img = $(item).find('img').attr('src'); const authors = $(item) .find('li') - .map((_, item) => $(item).text().trim()) - .get() + .toArray() + .map((item) => $(item).text().trim()) .join('; '); return { title, @@ -68,8 +69,7 @@ async function handler(ctx) { img, authors, }; - }) - .get(); + }); const renderDesc = (item) => art(path.join(__dirname, 'templates/description.art'), { diff --git a/lib/routes/sqmc/www.ts b/lib/routes/sqmc/www.ts index 26cc58539fd4..4181edb3820c 100644 --- a/lib/routes/sqmc/www.ts +++ b/lib/routes/sqmc/www.ts @@ -43,7 +43,7 @@ async function handler(ctx) { }); const $ = load(response.data); - const list = $('div#wp_news_w9 ul li').get(); + const list = $('div#wp_news_w9 ul li').toArray(); return { title: `新乡医学院三全学院官网信息${$('title').text()}`, diff --git a/lib/routes/ssm/news.ts b/lib/routes/ssm/news.ts index 5d9b3fc338a0..d2f9bd83925a 100644 --- a/lib/routes/ssm/news.ts +++ b/lib/routes/ssm/news.ts @@ -38,23 +38,21 @@ async function handler() { const $ = load(response.data); const list = $('body > div > div > ul > li'); - const item = list - .map((_, item) => { - const title = $(item).find('a').text(); - const link = $(item).find('a').attr('href'); - const pubDate = parseDate($(item).find('small').text().split(':')[1].trim(), 'DD/MM/YYYY'); - const desc = art(path.join(__dirname, 'templates/news.art'), { - link, - }); + const item = list.toArray().map((item) => { + const title = $(item).find('a').text(); + const link = $(item).find('a').attr('href'); + const pubDate = parseDate($(item).find('small').text().split(':')[1].trim(), 'DD/MM/YYYY'); + const desc = art(path.join(__dirname, 'templates/news.art'), { + link, + }); - return { - title, - link, - description: desc, - pubDate, - }; - }) - .get(); + return { + title, + link, + description: desc, + pubDate, + }; + }); return { title: '澳门卫生局-最新消息', diff --git a/lib/routes/startuplatte/index.ts b/lib/routes/startuplatte/index.ts index 23712e79b182..67b7b53658b9 100644 --- a/lib/routes/startuplatte/index.ts +++ b/lib/routes/startuplatte/index.ts @@ -44,15 +44,15 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.post-header h2 a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/stdaily/digitalpaper.ts b/lib/routes/stdaily/digitalpaper.ts index faf5857035c7..131681aa651a 100644 --- a/lib/routes/stdaily/digitalpaper.ts +++ b/lib/routes/stdaily/digitalpaper.ts @@ -28,7 +28,8 @@ const getPageLength = async (url) => { const getArticleList = ($, paperUrl) => { const pageName = $('.zi .zi-top .banci strong').text(); const list = $('.zi-meat ul>li') - .map((_, item) => { + .toArray() + .map((item) => { const link = $(item).find('a').attr('href'); const title = $(item).find('a div').text(); return { @@ -36,8 +37,7 @@ const getArticleList = ($, paperUrl) => { title: `[${pageName}] ${title}`, // pubDate, }; - }) - .get(); + }); return list; }; @@ -67,11 +67,13 @@ const getListArticles = async (list, cache) => { const subtitle = $('.right-meat .futi').text(); const article = $('.right-meat .tuwen .article #ozoom').html(); const pics = $('.right-meat .tuwen .picture') - .map((_, item) => { + .toArray() + .map((item) => { const pic = {}; $(item) .find('tr') - .map((_, row) => { + .toArray() + .map((row) => { const src = $(row).find('img').attr('src'); if (src) { pic.src = src; @@ -79,11 +81,9 @@ const getListArticles = async (list, cache) => { pic.des = $(row).find('td').text(); } return null; - }) - .get(); + }); return pic; - }) - .get(); + }); item.author = $('.right-meat .author').text(); item.description = renderDescription({ subtitle, quotation, article, pics }); diff --git a/lib/routes/storm/index.ts b/lib/routes/storm/index.ts index 7539331b8bd4..4705f7cb209b 100644 --- a/lib/routes/storm/index.ts +++ b/lib/routes/storm/index.ts @@ -51,15 +51,15 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.link_title') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: item.attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/storyfm/index.ts b/lib/routes/storyfm/index.ts index 286535f6fbfd..1512a7874002 100644 --- a/lib/routes/storyfm/index.ts +++ b/lib/routes/storyfm/index.ts @@ -32,7 +32,8 @@ async function handler() { const $ = load(response.data); const cnMonth = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二']; const items = $('.isotope > .isotope-item') - .map((_, ele) => { + .toArray() + .map((ele) => { const $item = load(ele); const img = $item('.isotope-img-container img').attr('src'); const infoNode = $item('.isotope-index-text').first(); @@ -58,8 +59,7 @@ async function handler() { link, pubDate, }; - }) - .get(); + }); return { title: '故事说FM', description: '故事说FM', diff --git a/lib/routes/telecompaper/news.ts b/lib/routes/telecompaper/news.ts index 6a78f622d3ab..b6c9147c5e46 100644 --- a/lib/routes/telecompaper/news.ts +++ b/lib/routes/telecompaper/news.ts @@ -102,7 +102,8 @@ async function handler(ctx) { const list = $('table.details_rows tbody tr') .slice(0, 10) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('a'); return { @@ -110,8 +111,7 @@ async function handler(ctx) { link: a.attr('href'), pubDate: new Date(item.find('span.source').text().replace('Published ', '').split(' CET | ')[0] + ' GMT+1').toUTCString(), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/telecompaper/search.ts b/lib/routes/telecompaper/search.ts index 54a49caaab49..33cfb928629a 100644 --- a/lib/routes/telecompaper/search.ts +++ b/lib/routes/telecompaper/search.ts @@ -72,7 +72,8 @@ async function handler(ctx) { const list = $('table.details_rows tbody tr') .slice(0, 15) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('a'); return { @@ -80,8 +81,7 @@ async function handler(ctx) { link: a.attr('href'), pubDate: new Date(item.find('span.source').text().split(' | ')[0] + ' GMT+1').toUTCString(), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/telegram/blog.ts b/lib/routes/telegram/blog.ts index dce3188af317..19dffd3c685f 100644 --- a/lib/routes/telegram/blog.ts +++ b/lib/routes/telegram/blog.ts @@ -37,7 +37,7 @@ async function handler() { const items = await Promise.all( $$('.dev_blog_card_link_wrap') - .get() + .toArray() .map((each) => { const $ = $$(each); const link = 'https://telegram.org' + $.attr('href'); diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index 2d812032c0c1..b4c70ba0f1ac 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -238,522 +238,520 @@ async function handler(ctx) { itunes_author: channelName, image: $('.tgme_page_photo_image > img').attr('src'), - item: - list && - list - .map((index, item) => { - item = $(item); - let extra = null; - - /* message types */ - let msgTypes = []; - if (item.find('.service_message').length) { - // service message can have an image (avatar changed) - msgTypes.push(SERVICE); - } - // if (item.find('.tgme_widget_message_video').length) { // fail if video too big - if (item.find('.tgme_widget_message_video_player').length) { - // video and gif cannot be mixed, it's safe to do that - msgTypes.push(item.find('.message_video_play').length ? VIDEO : GIF); - } - if (item.find('.tgme_widget_message_photo,.tgme_widget_message_service_photo').length) { - // video and photo can be mixed - msgTypes.push(PHOTO); - } - // all other types below cannot be mixed - if (item.find('.tgme_widget_message_poll').length) { - msgTypes.push(POLL); - } - if (item.find('.tgme_widget_message_voice').length) { - msgTypes.push(VOICE); - } - if (item.find('.tgme_widget_message_document').length) { - // music and document cannot be mixed, it's safe to do that - msgTypes.push(item.find('.audio').length ? MUSIC : DOCUMENT); - } - if (item.find('.tgme_widget_message_location').length) { - msgTypes.push(LOCATION); - } - if (item.find('.tgme_widget_message_contact').length) { - msgTypes.push(CONTACT); - } - if (item.find('.tgme_widget_message_sticker').length) { - msgTypes.push(STICKER); - } - if (item.find('.tgme_widget_message_tgsticker').length) { - msgTypes.push(ANIMATED_STICKER); - } - if (item.find('.tgme_widget_message_videosticker').length) { - msgTypes.push(VIDEO_STICKER); - } - if (item.find('.message_media_not_supported').length) { - if (item.find('.media_supported_cont').length) { - msgTypes.unshift(PARTIALLY_UNSUPPORTED); - } else { - if (msgTypes.length === 0 && !includeUnsupportedMsg) { - return null; // drop unsupported message - } - msgTypes.unshift(UNSUPPORTED); + item: list + .toArray() + .map((item) => { + item = $(item); + let extra = null; + + /* message types */ + let msgTypes = []; + if (item.find('.service_message').length) { + // service message can have an image (avatar changed) + msgTypes.push(SERVICE); + } + // if (item.find('.tgme_widget_message_video').length) { // fail if video too big + if (item.find('.tgme_widget_message_video_player').length) { + // video and gif cannot be mixed, it's safe to do that + msgTypes.push(item.find('.message_video_play').length ? VIDEO : GIF); + } + if (item.find('.tgme_widget_message_photo,.tgme_widget_message_service_photo').length) { + // video and photo can be mixed + msgTypes.push(PHOTO); + } + // all other types below cannot be mixed + if (item.find('.tgme_widget_message_poll').length) { + msgTypes.push(POLL); + } + if (item.find('.tgme_widget_message_voice').length) { + msgTypes.push(VOICE); + } + if (item.find('.tgme_widget_message_document').length) { + // music and document cannot be mixed, it's safe to do that + msgTypes.push(item.find('.audio').length ? MUSIC : DOCUMENT); + } + if (item.find('.tgme_widget_message_location').length) { + msgTypes.push(LOCATION); + } + if (item.find('.tgme_widget_message_contact').length) { + msgTypes.push(CONTACT); + } + if (item.find('.tgme_widget_message_sticker').length) { + msgTypes.push(STICKER); + } + if (item.find('.tgme_widget_message_tgsticker').length) { + msgTypes.push(ANIMATED_STICKER); + } + if (item.find('.tgme_widget_message_videosticker').length) { + msgTypes.push(VIDEO_STICKER); + } + if (item.find('.message_media_not_supported').length) { + if (item.find('.media_supported_cont').length) { + msgTypes.unshift(PARTIALLY_UNSUPPORTED); + } else { + if (msgTypes.length === 0 && !includeUnsupportedMsg) { + return null; // drop unsupported message } + msgTypes.unshift(UNSUPPORTED); } - // all other types above cannot be mixed - if (item.find('.tgme_widget_message_author .tgme_widget_message_via_bot,.tgme_widget_message_forwarded_from .tgme_widget_message_via_bot').length) { - // can be mixed with other types, excluding service messages - msgTypes.unshift(VIA_BOT); + } + // all other types above cannot be mixed + if (item.find('.tgme_widget_message_author .tgme_widget_message_via_bot,.tgme_widget_message_forwarded_from .tgme_widget_message_via_bot').length) { + // can be mixed with other types, excluding service messages + msgTypes.unshift(VIA_BOT); + } + if (item.find('.tgme_widget_message_forwarded_from').length) { + // can be mixed with other types, excluding service messages and reply messages + msgTypes.unshift(FORWARDED); + if (!includeFwd) { + return null; // drop forwarded message } - if (item.find('.tgme_widget_message_forwarded_from').length) { - // can be mixed with other types, excluding service messages and reply messages - msgTypes.unshift(FORWARDED); - if (!includeFwd) { - return null; // drop forwarded message - } + } + if (item.find('.tgme_widget_message_reply').length) { + // can be mixed with other types, excluding service messages and forwarded messages + msgTypes.unshift(REPLY); + if (!includeReply) { + return null; // drop reply message } - if (item.find('.tgme_widget_message_reply').length) { - // can be mixed with other types, excluding service messages and forwarded messages - msgTypes.unshift(REPLY); - if (!includeReply) { - return null; // drop reply message + } + + /* fix emoji */ + item.find('.emoji').each((_, emoji) => { + emoji = $(emoji); + emoji.replaceWith(`${emoji.text()}`); + }); + + /* "Forwarded From" tag */ + const fwdFrom = () => { + let fwdFrom = ''; + const fwdFromNameObj = item.find('.tgme_widget_message_forwarded_from_name'); + if (fwdFromNameObj.length) { + const userLink = fwdFromNameObj.attr('href'); + const userHtml = userLink ? `${fwdFromNameObj.text()}` : fwdFromNameObj.text(); + fwdFrom += `

Forwarded From ${userHtml}`; + const fwdFromAuthorObj = item.find('.tgme_widget_message_forwarded_from_author'); + if (fwdFromAuthorObj.length && showFwdFromAuthor) { + fwdFrom += ` (${fwdFromAuthorObj.text()})`; } + fwdFrom += '

'; + + extra = { + links: [ + { + type: 'repost', + url: userLink, + }, + ], + }; } - - /* fix emoji */ - item.find('.emoji').each((_, emoji) => { - emoji = $(emoji); - emoji.replaceWith(`${emoji.text()}`); - }); - - /* "Forwarded From" tag */ - const fwdFrom = () => { - let fwdFrom = ''; - const fwdFromNameObj = item.find('.tgme_widget_message_forwarded_from_name'); - if (fwdFromNameObj.length) { - const userLink = fwdFromNameObj.attr('href'); - const userHtml = userLink ? `${fwdFromNameObj.text()}` : fwdFromNameObj.text(); - fwdFrom += `

Forwarded From ${userHtml}`; - const fwdFromAuthorObj = item.find('.tgme_widget_message_forwarded_from_author'); - if (fwdFromAuthorObj.length && showFwdFromAuthor) { - fwdFrom += ` (${fwdFromAuthorObj.text()})`; - } - fwdFrom += '

'; - - extra = { - links: [ - { - type: 'repost', - url: userLink, - }, - ], - }; - } - return fwdFrom; - }; - - /* reply */ - const replyContent = () => { - const replyObj = item.find('.tgme_widget_message_reply'); - if (replyObj.length === 0) { - return ''; - } else { - const replyAuthorObj = replyObj.find('.tgme_widget_message_author_name'); - const replyAuthor = replyAuthorObj.length ? replyAuthorObj.text() : ''; - const viaBotObj = replyObj.find('.tgme_widget_message_via_bot'); - const viaBotText = viaBotObj.length ? ` via ${viaBotObj.text()}` : ''; - const replyLinkHref = replyObj.attr('href'); - const replyLink = replyLinkHref.length ? replyLinkHref : ''; - const replyMetaTextObj = replyObj.find('.tgme_widget_message_metatext'); - const replyMetaText = replyMetaTextObj.length ? `

${replyMetaTextObj.html()}

` : ''; - const replyTextObj = replyObj.find('.tgme_widget_message_text'); - const replyText = replyTextObj.length ? `

${replyTextObj.html()}

` : ''; - - extra = { - links: [ - { - type: 'reply', - url: replyLink, - }, - ], - }; - return replyLink === '' - ? `
+ return fwdFrom; + }; + + /* reply */ + const replyContent = () => { + const replyObj = item.find('.tgme_widget_message_reply'); + if (replyObj.length === 0) { + return ''; + } else { + const replyAuthorObj = replyObj.find('.tgme_widget_message_author_name'); + const replyAuthor = replyAuthorObj.length ? replyAuthorObj.text() : ''; + const viaBotObj = replyObj.find('.tgme_widget_message_via_bot'); + const viaBotText = viaBotObj.length ? ` via ${viaBotObj.text()}` : ''; + const replyLinkHref = replyObj.attr('href'); + const replyLink = replyLinkHref.length ? replyLinkHref : ''; + const replyMetaTextObj = replyObj.find('.tgme_widget_message_metatext'); + const replyMetaText = replyMetaTextObj.length ? `

${replyMetaTextObj.html()}

` : ''; + const replyTextObj = replyObj.find('.tgme_widget_message_text'); + const replyText = replyTextObj.length ? `

${replyTextObj.html()}

` : ''; + + extra = { + links: [ + { + type: 'reply', + url: replyLink, + }, + ], + }; + return replyLink === '' + ? `

${replyAuthor}${viaBotText}:

${replyMetaText} ${replyText}
` - : `
+ : `

${replyAuthor}${viaBotText}:

${replyMetaText} ${replyText}
`; - } - }; - - /* via bot */ - const viaBot = () => { - const viaBotObj = item.find('.tgme_widget_message_author .tgme_widget_message_via_bot,.tgme_widget_message_forwarded_from .tgme_widget_message_via_bot'); - if (viaBotObj.length) { - const userLink = viaBotObj.attr('href'); - const userHtml = userLink ? `${viaBotObj.text()}` : viaBotObj.text(); - return `

via ${userHtml}

`; - } else { - return ''; - } - }; + } + }; + + /* via bot */ + const viaBot = () => { + const viaBotObj = item.find('.tgme_widget_message_author .tgme_widget_message_via_bot,.tgme_widget_message_forwarded_from .tgme_widget_message_via_bot'); + if (viaBotObj.length) { + const userLink = viaBotObj.attr('href'); + const userHtml = userLink ? `${viaBotObj.text()}` : viaBotObj.text(); + return `

via ${userHtml}

`; + } else { + return ''; + } + }; - /* images and videos */ - const generateMedia = (selector) => { - const nodes = item.find(selector); - if (!nodes.length) { - return ''; - } - let tag_media_all = ''; - const pictureNodes = nodes.find('picture'); - const imgNodes = nodes.find('img'); - nodes.each((_, node) => { - const $node = $(node); - let tag_media = ''; - if (node.attribs && node.attribs.class && node.attribs.class.search(/(^|\s)tgme_widget_message_video_player(\s|$)/) !== -1) { - // video - const videoLink = $node.find('.tgme_widget_message_video').attr('src'); - const thumbBackground = $node.find('.tgme_widget_message_video_thumb').css('background-image'); - const thumbBackgroundUrl = thumbBackground && thumbBackground.match(/url\('(.*)'\)/); - const thumbBackgroundUrlSrc = thumbBackgroundUrl && thumbBackgroundUrl[1]; - tag_media += art(path.join(__dirname, 'templates/video.art'), { - source: videoLink, - poster: thumbBackgroundUrlSrc, - }); - } else if ($node.attr('data-webp')) { - // sticker - tag_media += ``; - } else if (node.name === 'picture') { - // animated sticker + /* images and videos */ + const generateMedia = (selector) => { + const nodes = item.find(selector); + if (!nodes.length) { + return ''; + } + let tag_media_all = ''; + const pictureNodes = nodes.find('picture'); + const imgNodes = nodes.find('img'); + nodes.each((_, node) => { + const $node = $(node); + let tag_media = ''; + if (node.attribs && node.attribs.class && node.attribs.class.search(/(^|\s)tgme_widget_message_video_player(\s|$)/) !== -1) { + // video + const videoLink = $node.find('.tgme_widget_message_video').attr('src'); + const thumbBackground = $node.find('.tgme_widget_message_video_thumb').css('background-image'); + const thumbBackgroundUrl = thumbBackground && thumbBackground.match(/url\('(.*)'\)/); + const thumbBackgroundUrlSrc = thumbBackgroundUrl && thumbBackgroundUrl[1]; + tag_media += art(path.join(__dirname, 'templates/video.art'), { + source: videoLink, + poster: thumbBackgroundUrlSrc, + }); + } else if ($node.attr('data-webp')) { + // sticker + tag_media += ``; + } else if (node.name === 'picture') { + // animated sticker + tag_media += ''; + $node.find('source,img').each((_, source) => { + tag_media += $(source).toString(); + }); + tag_media += ''; + } else if (node.attribs && node.attribs.class && node.attribs.class.search(/(^|\s)tgme_widget_message_videosticker(\s|$)/) !== -1) { + // video sticker + const videoLink = $node.find('.js-videosticker_video').attr('src'); + tag_media += art(path.join(__dirname, 'templates/video.art'), { + source: videoLink, + }); + } else if (node.name === 'img') { + // unknown + tag_media += $node.toString(); + } else if (pictureNodes.length) { + // unknown + pictureNodes.each((_, picture) => { tag_media += ''; - $node.find('source,img').each((_, source) => { - tag_media += $(source).toString(); - }); + $(picture) + .find('source,img') + .each((_, source) => { + tag_media += $(source).toString(); + }); tag_media += ''; - } else if (node.attribs && node.attribs.class && node.attribs.class.search(/(^|\s)tgme_widget_message_videosticker(\s|$)/) !== -1) { - // video sticker - const videoLink = $node.find('.js-videosticker_video').attr('src'); - tag_media += art(path.join(__dirname, 'templates/video.art'), { - source: videoLink, - }); - } else if (node.name === 'img') { - // unknown - tag_media += $node.toString(); - } else if (pictureNodes.length) { - // unknown - pictureNodes.each((_, picture) => { - tag_media += ''; - $(picture) - .find('source,img') - .each((_, source) => { - tag_media += $(source).toString(); - }); - tag_media += ''; - }); - } else if (imgNodes.length) { - // service message - imgNodes.each((_, img) => { - tag_media += $(img).toString(); - }); - } else { - // image message, location - const background = $node.css('background-image'); - const backgroundUrl = background && background.match(/url\('(.*)'\)/); - const backgroundUrlSrc = backgroundUrl && backgroundUrl[1]; - const attrs = [`src="${backgroundUrlSrc}"`]; - /* - * If the width is not in px, it is either a percentage (Link Preview/Instant view) - * or absent (ditto). - * Only accept px to prevent images from being invisible or too small. - */ - let width = 0; - const widthStr = $node.css('width'); - if (widthStr && widthStr.endsWith('px')) { - width = Number.parseFloat(widthStr); - } - /* - * Height is present when the message is an album but does not exist in other cases. - * Ditto, only accept px. - * !!!NOTE: images in albums may have smaller width and height. - */ - let height = 0; - const heightStr = $node.css('height'); - if (heightStr && heightStr.endsWith('px')) { - height = Number.parseFloat(heightStr); - } - /* - * Only calculate height when needed. - * The aspect ratio is either a percentage (single image) or absent (Link Preview). - * Only accept percentage to prevent images from being invisible or distorted. - */ - const aspectRatioStr = $node.find('.tgme_widget_message_photo').css('padding-top'); - if (height <= 0 && width > 0 && aspectRatioStr && aspectRatioStr.endsWith('%')) { - height = (Number.parseFloat(aspectRatioStr) / 100) * width; - } - // Only set width/height when >32 to avoid invisible images. - width > 32 && attrs.push(`width="${width}"`); - height > 32 && attrs.push(`height="${height.toFixed(2).replace('.00', '')}"`); - tag_media += backgroundUrlSrc ? `` : ''; + }); + } else if (imgNodes.length) { + // service message + imgNodes.each((_, img) => { + tag_media += $(img).toString(); + }); + } else { + // image message, location + const background = $node.css('background-image'); + const backgroundUrl = background && background.match(/url\('(.*)'\)/); + const backgroundUrlSrc = backgroundUrl && backgroundUrl[1]; + const attrs = [`src="${backgroundUrlSrc}"`]; + /* + * If the width is not in px, it is either a percentage (Link Preview/Instant view) + * or absent (ditto). + * Only accept px to prevent images from being invisible or too small. + */ + let width = 0; + const widthStr = $node.css('width'); + if (widthStr && widthStr.endsWith('px')) { + width = Number.parseFloat(widthStr); } - if (tag_media) { - tag_media_all += tag_media; - $node.find('.message_media_not_supported').remove(); + /* + * Height is present when the message is an album but does not exist in other cases. + * Ditto, only accept px. + * !!!NOTE: images in albums may have smaller width and height. + */ + let height = 0; + const heightStr = $node.css('height'); + if (heightStr && heightStr.endsWith('px')) { + height = Number.parseFloat(heightStr); } - }); - return tag_media_all; - }; - // ordinary message photos, service message photos, stickers, animated stickers, video - const messageMedia = generateMedia( - '.tgme_widget_message_photo_wrap,.tgme_widget_message_service_photo,.tgme_widget_message_sticker,.tgme_widget_message_tgsticker,.tgme_widget_message_videosticker,.tgme_widget_message_video_player' - ); - - /* location */ - const location = () => { - const locationObj = item.find('.tgme_widget_message_location_wrap'); - if (locationObj.length) { - const locationLink = locationObj.attr('href'); - const mapBackground = locationObj.find('.tgme_widget_message_location').css('background-image'); - const mapBackgroundUrl = mapBackground && mapBackground.match(/url\('(.*)'\)/); - const mapBackgroundUrlSrc = mapBackgroundUrl && mapBackgroundUrl[1]; - const mapImgHtml = mapBackgroundUrlSrc ? `` : (showMediaTagAsEmoji ? mediaTagDict[LOCATION][1] : mediaTagDict[LOCATION][0]); - return locationLink ? `${mapImgHtml}` : mapImgHtml; - } else { - return ''; + /* + * Only calculate height when needed. + * The aspect ratio is either a percentage (single image) or absent (Link Preview). + * Only accept percentage to prevent images from being invisible or distorted. + */ + const aspectRatioStr = $node.find('.tgme_widget_message_photo').css('padding-top'); + if (height <= 0 && width > 0 && aspectRatioStr && aspectRatioStr.endsWith('%')) { + height = (Number.parseFloat(aspectRatioStr) / 100) * width; + } + // Only set width/height when >32 to avoid invisible images. + width > 32 && attrs.push(`width="${width}"`); + height > 32 && attrs.push(`height="${height.toFixed(2).replace('.00', '')}"`); + tag_media += backgroundUrlSrc ? `` : ''; } - }; - - /* voice */ - const voiceObj = item.find('audio.tgme_widget_message_voice'); - const durationObj = item.find('.tgme_widget_message_voice_duration'); - const durationInMmss = durationObj.text(); - const voiceUrl = voiceObj.length ? voiceObj.attr('src') : ''; - let voiceTitle = ''; - let voiceHtml = ''; - if (voiceUrl) { - if (showMediaTagInTitle) { - voiceTitle = durationInMmss ? `(${durationInMmss})` : ''; + if (tag_media) { + tag_media_all += tag_media; + $node.find('.message_media_not_supported').remove(); } - voiceHtml += '

'; - voiceHtml += showMediaTagAsEmoji ? mediaTagDict[VOICE][1] : mediaTagDict[VOICE][0]; - voiceHtml += durationInMmss ? ` (${durationInMmss})` : ''; - voiceHtml += '

'; - voiceHtml += ``; + }); + return tag_media_all; + }; + // ordinary message photos, service message photos, stickers, animated stickers, video + const messageMedia = generateMedia( + '.tgme_widget_message_photo_wrap,.tgme_widget_message_service_photo,.tgme_widget_message_sticker,.tgme_widget_message_tgsticker,.tgme_widget_message_videosticker,.tgme_widget_message_video_player' + ); + + /* location */ + const location = () => { + const locationObj = item.find('.tgme_widget_message_location_wrap'); + if (locationObj.length) { + const locationLink = locationObj.attr('href'); + const mapBackground = locationObj.find('.tgme_widget_message_location').css('background-image'); + const mapBackgroundUrl = mapBackground && mapBackground.match(/url\('(.*)'\)/); + const mapBackgroundUrlSrc = mapBackgroundUrl && mapBackgroundUrl[1]; + const mapImgHtml = mapBackgroundUrlSrc ? `` : (showMediaTagAsEmoji ? mediaTagDict[LOCATION][1] : mediaTagDict[LOCATION][0]); + return locationLink ? `${mapImgHtml}` : mapImgHtml; + } else { + return ''; } - const voiceDuration = () => { - if (durationObj.length) { - const p = durationInMmss.split(':'); - let second = 0, - minute = 1; - while (p.length > 0) { - second += minute * Number.parseInt(p.pop(), 10); - minute *= 60; - } - return second.toString(); - } else { - return ''; - } - }; - - /* link preview */ - const linkPreview = () => { - const linkPreviewSiteObj = item.find('.link_preview_site_name'); - const linkPreviewSite = linkPreviewSiteObj.length ? `${linkPreviewSiteObj.text()}
` : ''; - const linkPreviewTitleObj = item.find('.link_preview_title'); - const linkPreviewTitle = linkPreviewTitleObj.length ? `${linkPreviewTitleObj.text()}
` : ''; - const linkPreviewDescriptionObj = item.find('.link_preview_description'); - const linkPreviewDescription = linkPreviewDescriptionObj.length ? `

${linkPreviewDescriptionObj.html()}

` : ''; - const linkPreviewImage = generateMedia('.link_preview_image') + generateMedia('.link_preview_right_image'); - - return linkPreviewSite.length > 0 || linkPreviewTitle.length > 0 || linkPreviewDescription.length > 0 || linkPreviewImage.length > 0 - ? `
${linkPreviewSite}${linkPreviewTitle}${linkPreviewDescription}${linkPreviewImage}
` - : ''; - }; - - /* poll */ - const pollQuestionObj = item.find('.tgme_widget_message_poll_question'); - const pollQuestion = pollQuestionObj.length ? pollQuestionObj.text() : ''; - const poll = () => { - let pollHtml = ''; - const pollTypeObj = item.find('.tgme_widget_message_poll_type'); - const pollType = pollTypeObj.length ? pollTypeObj.text() : ''; - const pollOptions = item.find('.tgme_widget_message_poll_option'); - if (pollQuestion && pollType.length > 0 && pollOptions.length > 0) { - pollHtml += `

${pollQuestion}

`; - pollHtml += `

${pollType}

`; - pollOptions.each((_, option) => { - const $option = $(option); - const percentObj = $option.find('.tgme_widget_message_poll_option_percent'); - const percent = percentObj.length ? percentObj.text() : ''; - const textObj = $option.find('.tgme_widget_message_poll_option_text'); - const text = textObj.length ? textObj.text() : ''; - if (percent && text) { - pollHtml += `

${percent} - ${text}

`; - } - }); + }; + + /* voice */ + const voiceObj = item.find('audio.tgme_widget_message_voice'); + const durationObj = item.find('.tgme_widget_message_voice_duration'); + const durationInMmss = durationObj.text(); + const voiceUrl = voiceObj.length ? voiceObj.attr('src') : ''; + let voiceTitle = ''; + let voiceHtml = ''; + if (voiceUrl) { + if (showMediaTagInTitle) { + voiceTitle = durationInMmss ? `(${durationInMmss})` : ''; + } + voiceHtml += '

'; + voiceHtml += showMediaTagAsEmoji ? mediaTagDict[VOICE][1] : mediaTagDict[VOICE][0]; + voiceHtml += durationInMmss ? ` (${durationInMmss})` : ''; + voiceHtml += '

'; + voiceHtml += ``; + } + const voiceDuration = () => { + if (durationObj.length) { + const p = durationInMmss.split(':'); + let second = 0, + minute = 1; + while (p.length > 0) { + second += minute * Number.parseInt(p.pop(), 10); + minute *= 60; } - return pollHtml ? `
${pollHtml}
` : ''; - }; - - /* attachment (document or music) */ - const documentWrapObj = item.find('.tgme_widget_message_document_wrap'); - let attachmentTitle = ''; - let attachmentHtml = ''; - if (documentWrapObj.length) { - documentWrapObj.each((_, wrap) => { - // a message may have multiple attachments - const $wrap = $(wrap); - const documentTitleObj = $wrap.find('.tgme_widget_message_document_title'); - const documentExtraObj = $wrap.find('.tgme_widget_message_document_extra'); - const documentTitle = documentTitleObj.length ? documentTitleObj.text() : ''; - const documentExtra = documentExtraObj.length ? documentExtraObj.text() : ''; - const _attachmentTitle = `${documentTitle}${documentTitle && documentExtra ? ' - ' : ''}${documentExtra}`; - const _attachmentHtml = (documentTitle ? `

${documentTitle}

` : '') + (documentExtra ? `

${documentExtra}

` : ''); - attachmentTitle += attachmentTitle && _attachmentTitle ? ' | ' : ''; - attachmentTitle += _attachmentTitle; - attachmentHtml += _attachmentHtml ? `
${_attachmentHtml}
` : ''; - const wrapNext = $wrap.next('.tgme_widget_message_text'); - if (wrapNext.length) { - const captionHtml = wrapNext.html(); - if (captionHtml.length) { - attachmentHtml += `

${captionHtml}

`; - } - // remove them, avoid being duplicated - wrapNext.each((_, caption) => { - $(caption).remove(); - }); - } - }); + return second.toString(); + } else { + return ''; } - - /* contact */ - const contactNameObj = item.find('.tgme_widget_message_contact_name'); - const contactName = contactNameObj.length ? contactNameObj.text() : ''; - const contactNameHtml = contactName ? `${contactName}` : ''; - const contactPhoneObj = item.find('.tgme_widget_message_contact_phone'); - const contactPhone = contactPhoneObj.length ? contactPhoneObj.text() : ''; - const contactPhoneHtml = contactPhone ? `${contactPhone}` : ''; - const contactTitle = contactName + (contactName && contactPhone ? ': ' : '') + contactPhone; - const contactHtml = contactNameHtml || contactPhoneHtml ? `

${contactNameHtml}${contactName && contactPhone ? ': ' : ''}${contactPhoneHtml}

` : ''; - - /* inline buttons */ - let inlineButtons = ''; - const inlineButtonNodes = item.find('.tgme_widget_message_inline_button_text'); - if (showInlineButtons && inlineButtonNodes.length) { - inlineButtons += ''; - inlineButtonNodes.each((_, button) => { - const $button = $(button); - const buttonText = $button.text(); - inlineButtons += ``; + }; + + /* link preview */ + const linkPreview = () => { + const linkPreviewSiteObj = item.find('.link_preview_site_name'); + const linkPreviewSite = linkPreviewSiteObj.length ? `${linkPreviewSiteObj.text()}
` : ''; + const linkPreviewTitleObj = item.find('.link_preview_title'); + const linkPreviewTitle = linkPreviewTitleObj.length ? `${linkPreviewTitleObj.text()}
` : ''; + const linkPreviewDescriptionObj = item.find('.link_preview_description'); + const linkPreviewDescription = linkPreviewDescriptionObj.length ? `

${linkPreviewDescriptionObj.html()}

` : ''; + const linkPreviewImage = generateMedia('.link_preview_image') + generateMedia('.link_preview_right_image'); + + return linkPreviewSite.length > 0 || linkPreviewTitle.length > 0 || linkPreviewDescription.length > 0 || linkPreviewImage.length > 0 + ? `
${linkPreviewSite}${linkPreviewTitle}${linkPreviewDescription}${linkPreviewImage}
` + : ''; + }; + + /* poll */ + const pollQuestionObj = item.find('.tgme_widget_message_poll_question'); + const pollQuestion = pollQuestionObj.length ? pollQuestionObj.text() : ''; + const poll = () => { + let pollHtml = ''; + const pollTypeObj = item.find('.tgme_widget_message_poll_type'); + const pollType = pollTypeObj.length ? pollTypeObj.text() : ''; + const pollOptions = item.find('.tgme_widget_message_poll_option'); + if (pollQuestion && pollType.length > 0 && pollOptions.length > 0) { + pollHtml += `

${pollQuestion}

`; + pollHtml += `

${pollType}

`; + pollOptions.each((_, option) => { + const $option = $(option); + const percentObj = $option.find('.tgme_widget_message_poll_option_percent'); + const percent = percentObj.length ? percentObj.text() : ''; + const textObj = $option.find('.tgme_widget_message_poll_option_text'); + const text = textObj.length ? textObj.text() : ''; + if (percent && text) { + pollHtml += `

${percent} - ${text}

`; + } }); - inlineButtons += '
${buttonText}
'; } - - /* unsupported */ - let unsupportedHtml = ''; - let unsupportedTitle = ''; - const unsupportedNodes = item.find('.message_media_not_supported'); - if (msgTypes.includes(UNSUPPORTED)) { - if (unsupportedNodes.length) { - unsupportedHtml += '
'; - unsupportedNodes.find('.message_media_not_supported_label').each(function () { - const $this = $(this); - unsupportedTitle += $this.text(); - unsupportedHtml += `

${$this.text()}

`; - }); - unsupportedNodes.find('.message_media_view_in_telegram').each(function () { - const $this = $(this); - unsupportedHtml += $this.attr('href') ? `

${$this.text()}

` : `

${$this.text()}

`; + return pollHtml ? `
${pollHtml}
` : ''; + }; + + /* attachment (document or music) */ + const documentWrapObj = item.find('.tgme_widget_message_document_wrap'); + let attachmentTitle = ''; + let attachmentHtml = ''; + if (documentWrapObj.length) { + documentWrapObj.each((_, wrap) => { + // a message may have multiple attachments + const $wrap = $(wrap); + const documentTitleObj = $wrap.find('.tgme_widget_message_document_title'); + const documentExtraObj = $wrap.find('.tgme_widget_message_document_extra'); + const documentTitle = documentTitleObj.length ? documentTitleObj.text() : ''; + const documentExtra = documentExtraObj.length ? documentExtraObj.text() : ''; + const _attachmentTitle = `${documentTitle}${documentTitle && documentExtra ? ' - ' : ''}${documentExtra}`; + const _attachmentHtml = (documentTitle ? `

${documentTitle}

` : '') + (documentExtra ? `

${documentExtra}

` : ''); + attachmentTitle += attachmentTitle && _attachmentTitle ? ' | ' : ''; + attachmentTitle += _attachmentTitle; + attachmentHtml += _attachmentHtml ? `
${_attachmentHtml}
` : ''; + const wrapNext = $wrap.next('.tgme_widget_message_text'); + if (wrapNext.length) { + const captionHtml = wrapNext.html(); + if (captionHtml.length) { + attachmentHtml += `

${captionHtml}

`; + } + // remove them, avoid being duplicated + wrapNext.each((_, caption) => { + $(caption).remove(); }); - unsupportedHtml += '
'; - } else { - // remove unsupported type, previous parsing has proved that it is not unsupported - msgTypes = msgTypes.filter((type) => type !== UNSUPPORTED); } + }); + } + + /* contact */ + const contactNameObj = item.find('.tgme_widget_message_contact_name'); + const contactName = contactNameObj.length ? contactNameObj.text() : ''; + const contactNameHtml = contactName ? `${contactName}` : ''; + const contactPhoneObj = item.find('.tgme_widget_message_contact_phone'); + const contactPhone = contactPhoneObj.length ? contactPhoneObj.text() : ''; + const contactPhoneHtml = contactPhone ? `${contactPhone}` : ''; + const contactTitle = contactName + (contactName && contactPhone ? ': ' : '') + contactPhone; + const contactHtml = contactNameHtml || contactPhoneHtml ? `

${contactNameHtml}${contactName && contactPhone ? ': ' : ''}${contactPhoneHtml}

` : ''; + + /* inline buttons */ + let inlineButtons = ''; + const inlineButtonNodes = item.find('.tgme_widget_message_inline_button_text'); + if (showInlineButtons && inlineButtonNodes.length) { + inlineButtons += ''; + inlineButtonNodes.each((_, button) => { + const $button = $(button); + const buttonText = $button.text(); + inlineButtons += ``; + }); + inlineButtons += '
${buttonText}
'; + } + + /* unsupported */ + let unsupportedHtml = ''; + let unsupportedTitle = ''; + const unsupportedNodes = item.find('.message_media_not_supported'); + if (msgTypes.includes(UNSUPPORTED)) { + if (unsupportedNodes.length) { + unsupportedHtml += '
'; + unsupportedNodes.find('.message_media_not_supported_label').each(function () { + const $this = $(this); + unsupportedTitle += $this.text(); + unsupportedHtml += `

${$this.text()}

`; + }); + unsupportedNodes.find('.message_media_view_in_telegram').each(function () { + const $this = $(this); + unsupportedHtml += $this.attr('href') ? `

${$this.text()}

` : `

${$this.text()}

`; + }); + unsupportedHtml += '
'; + } else { + // remove unsupported type, previous parsing has proved that it is not unsupported + msgTypes = msgTypes.filter((type) => type !== UNSUPPORTED); } + } - /* pubDate */ - const pubDate = parseDate(item.find('.tgme_widget_message_date time').attr('datetime')); + /* pubDate */ + const pubDate = parseDate(item.find('.tgme_widget_message_date time').attr('datetime')); - /* ----- finished parsing ----- */ + /* ----- finished parsing ----- */ - /* media tag */ - let mediaTag = ''; - if (showMediaTagInTitle) { - for (const type of msgTypes) { - if (type !== REPLY || type !== FORWARDED || type !== VIA_BOT || (type === REPLY && showReplyTo) || (type === FORWARDED && showFwdFrom) || (type === VIA_BOT && showViaBot)) { - mediaTag += showMediaTagAsEmoji ? mediaTagDict[type][1] : mediaTagDict[type][0]; - } + /* media tag */ + let mediaTag = ''; + if (showMediaTagInTitle) { + for (const type of msgTypes) { + if (type !== REPLY || type !== FORWARDED || type !== VIA_BOT || (type === REPLY && showReplyTo) || (type === FORWARDED && showFwdFrom) || (type === VIA_BOT && showViaBot)) { + mediaTag += showMediaTagAsEmoji ? mediaTagDict[type][1] : mediaTagDict[type][0]; } } - - /* message text & title */ - const messageTextObj = item.find(`.${msgTypes.includes(PARTIALLY_UNSUPPORTED) ? 'media_supported_cont' : 'tgme_widget_message_bubble'} > .tgme_widget_message_text`); - let messageHtml = '', - messageTitle = ''; - - if (messageTextObj.length > 0) { - messageHtml = `

${messageTextObj.html()}

`; - } - - let titleCompleteFlag = false; - if (pollQuestion) { - messageTitle = pollQuestion; - titleCompleteFlag = true; - } else if (attachmentTitle) { - messageTitle = attachmentTitle; - titleCompleteFlag = true; - } else if (contactTitle) { - messageTitle = contactTitle; - titleCompleteFlag = true; - } else if (voiceTitle) { - messageTitle = voiceTitle; - } else if (unsupportedTitle) { - messageTitle = unsupportedTitle; - titleCompleteFlag = true; - } - - if (messageTextObj.length > 0 && !titleCompleteFlag) { - const _messageTextObj = $(messageTextObj.toString()); - _messageTextObj.find('br').replaceWith('\n'); - const trimmedTitleText = _messageTextObj.text().split('\n').at(0)?.trim(); - messageTitle += (messageTitle && trimmedTitleText ? ': ' : '') + trimmedTitleText; - } - - messageTitle = messageTitle === '' ? mediaTag || pubDate.toUTCString() : `${mediaTag}${mediaTag ? ' ' : ''}${messageTitle}`; - - let description = ''; - if (showFwdFrom) { - description += fwdFrom(); - } - if (showReplyTo) { - description += replyContent(); - } - if (showViaBot) { - description += viaBot(); - } - description += location() + poll() + contactHtml + voiceHtml + attachmentHtml + messageHtml + unsupportedHtml; - if (showLinkPreview) { - description += linkPreview(); - } - description += inlineButtons + messageMedia; - - return { - title: messageTitle, - description, - pubDate, - link: item.find('.tgme_widget_message_date').attr('href'), - author: item.find('.tgme_widget_message_from_author').text(), - - enclosure_url: voiceUrl, - itunes_duration: voiceDuration(), - enclosure_type: 'audio/ogg', - - _extra: extra, - }; - }) - .get() - .filter(Boolean) - .reverse(), + } + + /* message text & title */ + const messageTextObj = item.find(`.${msgTypes.includes(PARTIALLY_UNSUPPORTED) ? 'media_supported_cont' : 'tgme_widget_message_bubble'} > .tgme_widget_message_text`); + let messageHtml = '', + messageTitle = ''; + + if (messageTextObj.length > 0) { + messageHtml = `

${messageTextObj.html()}

`; + } + + let titleCompleteFlag = false; + if (pollQuestion) { + messageTitle = pollQuestion; + titleCompleteFlag = true; + } else if (attachmentTitle) { + messageTitle = attachmentTitle; + titleCompleteFlag = true; + } else if (contactTitle) { + messageTitle = contactTitle; + titleCompleteFlag = true; + } else if (voiceTitle) { + messageTitle = voiceTitle; + } else if (unsupportedTitle) { + messageTitle = unsupportedTitle; + titleCompleteFlag = true; + } + + if (messageTextObj.length > 0 && !titleCompleteFlag) { + const _messageTextObj = $(messageTextObj.toString()); + _messageTextObj.find('br').replaceWith('\n'); + const trimmedTitleText = _messageTextObj.text().split('\n').at(0)?.trim(); + messageTitle += (messageTitle && trimmedTitleText ? ': ' : '') + trimmedTitleText; + } + + messageTitle = messageTitle === '' ? mediaTag || pubDate.toUTCString() : `${mediaTag}${mediaTag ? ' ' : ''}${messageTitle}`; + + let description = ''; + if (showFwdFrom) { + description += fwdFrom(); + } + if (showReplyTo) { + description += replyContent(); + } + if (showViaBot) { + description += viaBot(); + } + description += location() + poll() + contactHtml + voiceHtml + attachmentHtml + messageHtml + unsupportedHtml; + if (showLinkPreview) { + description += linkPreview(); + } + description += inlineButtons + messageMedia; + + return { + title: messageTitle, + description, + pubDate, + link: item.find('.tgme_widget_message_date').attr('href'), + author: item.find('.tgme_widget_message_from_author').text(), + + enclosure_url: voiceUrl, + itunes_duration: voiceDuration(), + enclosure_type: 'audio/ogg', + + _extra: extra, + }; + }) + .filter(Boolean) + .reverse(), }; } diff --git a/lib/routes/thecover/channel.ts b/lib/routes/thecover/channel.ts index 210b3ddfee9b..f26a287e8323 100644 --- a/lib/routes/thecover/channel.ts +++ b/lib/routes/thecover/channel.ts @@ -47,20 +47,18 @@ export const route: Route = { async function handler(ctx) { const id = ctx.req.param('id') ?? '3892'; - const targetUrl = rootUrl.concat(`/channel_${id}`); + const targetUrl = rootUrl + `/channel_${id}`; const resp = await got({ method: 'get', url: targetUrl, }); const $ = load(resp.data); const list = $('a.link-to-article') - .filter(function () { - return $(this).attr('href').startsWith('/'); - }) - .map((_, item) => ({ - link: rootUrl.concat($(item).attr('href')), - })) - .get(); + .toArray() + .filter((item) => $(item).attr('href').startsWith('/')) + .map((item) => ({ + link: rootUrl + $(item).attr('href'), + })); const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { diff --git a/lib/routes/thepaper/839studio/category.ts b/lib/routes/thepaper/839studio/category.ts index 5ac38f41122d..1244e1590969 100644 --- a/lib/routes/thepaper/839studio/category.ts +++ b/lib/routes/thepaper/839studio/category.ts @@ -38,17 +38,13 @@ async function handler(ctx) { title: `澎湃美数课作品集-${category}`, link, description: desc, - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('.archive_up a').first().text(), - description: `描述:${item.find('.imgdown p').text()}`, - link: item.find('.archive_up a').attr('href'), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('.archive_up a').first().text(), + description: `描述:${item.find('.imgdown p').text()}`, + link: item.find('.archive_up a').attr('href'), + }; + }), }; } diff --git a/lib/routes/thepaper/839studio/studio.ts b/lib/routes/thepaper/839studio/studio.ts index 9cab082d4d57..ea5639992a5f 100644 --- a/lib/routes/thepaper/839studio/studio.ts +++ b/lib/routes/thepaper/839studio/studio.ts @@ -25,17 +25,13 @@ async function handler() { return { title: '澎湃美数课作品集', link: 'http://projects.thepaper.cn/thepaper-cases/839studio/', - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('.imgup a').first().text(), - description: `描述:${item.find('.imgdown p').text()}`, - link: item.find('.imgup a').attr('href'), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('.imgup a').first().text(), + description: `描述:${item.find('.imgdown p').text()}`, + link: item.find('.imgup a').attr('href'), + }; + }), }; } diff --git a/lib/routes/timednews/news.ts b/lib/routes/timednews/news.ts index da5f2febbbcd..56018646a39e 100644 --- a/lib/routes/timednews/news.ts +++ b/lib/routes/timednews/news.ts @@ -87,14 +87,14 @@ async function handler(ctx) { const $ = load(res.data); const list = $('#content li') - .map((i, e) => { + .toArray() + .map((e) => { const c = load(e); return { title: c('a').text().trim(), link: c('a').attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/tingshuitz/changsha.ts b/lib/routes/tingshuitz/changsha.ts index 98ed6d5b9b6d..1cf041f65ea3 100644 --- a/lib/routes/tingshuitz/changsha.ts +++ b/lib/routes/tingshuitz/changsha.ts @@ -34,15 +34,15 @@ async function handler(ctx) { const $ = load(listPage.data); const pageName = $('.mainRightBox .news-title').text(); const list = $('.mainRightBox .announcements-title a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text().trim(), link: baseUrl + item.attr('href').trim(), }; - }) - .get(); + }); const items = await Promise.all( list.map(async (item) => { diff --git a/lib/routes/tingshuitz/dongguan.ts b/lib/routes/tingshuitz/dongguan.ts index 7dde2ca964bf..ef0e4a53b332 100644 --- a/lib/routes/tingshuitz/dongguan.ts +++ b/lib/routes/tingshuitz/dongguan.ts @@ -36,18 +36,14 @@ async function handler() { title: $('title').text() || '停水通知 - 东莞市东江水务有限公司', link: 'http://www.djsw.com.cn/news/tstz/index.html', description: $('title').text() || '停水通知 - 东莞市东江水务有限公司', - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('a').text(), - description: `东莞市停水通知:${item.find('a').text()}`, - pubDate: parseDate($(item.contents()[1]).text().slice(1, -1)), - link: item.find('a').attr('href'), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('a').text(), + description: `东莞市停水通知:${item.find('a').text()}`, + pubDate: parseDate($(item.contents()[1]).text().slice(1, -1)), + link: item.find('a').attr('href'), + }; + }), }; } diff --git a/lib/routes/tingshuitz/hangzhou.ts b/lib/routes/tingshuitz/hangzhou.ts index a08bc595f2ac..234307b4841b 100644 --- a/lib/routes/tingshuitz/hangzhou.ts +++ b/lib/routes/tingshuitz/hangzhou.ts @@ -42,18 +42,14 @@ async function handler() { title: $('title').text(), link: 'http://www.hzwgc.com/public/stop_the_water/', description: $('meta[name="description"]').attr('content') || $('title').text(), - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('.title').text(), - description: `杭州市停水通知:${item.find('.title').text()}`, - pubDate: new Date(item.find('.published').text()).toUTCString(), - link: `http://www.hzwgc.com${item.find('.btn-read').attr('href')}`, - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('.title').text(), + description: `杭州市停水通知:${item.find('.title').text()}`, + pubDate: new Date(item.find('.published').text()).toUTCString(), + link: `http://www.hzwgc.com${item.find('.btn-read').attr('href')}`, + }; + }), }; } diff --git a/lib/routes/tingshuitz/nanjing.ts b/lib/routes/tingshuitz/nanjing.ts index 6543194e493f..e17dd88d7751 100644 --- a/lib/routes/tingshuitz/nanjing.ts +++ b/lib/routes/tingshuitz/nanjing.ts @@ -39,20 +39,18 @@ async function handler() { return { title: $('head title').text(), link: url, - item: list - .map((index, item) => { - const $item = $(item); - const title = $item.find('a span').text(); - const link = $item.find('a').attr('href'); - const listTime = $item.find('.list-time').text(); - const pubDate = parseDate(listTime); - return { - title: `${title} ${listTime}`, - description: '南京市停水通知', - link: `${HOME_PAGE}${link}`, - pubDate, - }; - }) - .get(), + item: list.toArray().map((item) => { + const $item = $(item); + const title = $item.find('a span').text(); + const link = $item.find('a').attr('href'); + const listTime = $item.find('.list-time').text(); + const pubDate = parseDate(listTime); + return { + title: `${title} ${listTime}`, + description: '南京市停水通知', + link: `${HOME_PAGE}${link}`, + pubDate, + }; + }), }; } diff --git a/lib/routes/tingshuitz/xian.ts b/lib/routes/tingshuitz/xian.ts index 132135bb5f59..560b08f1a862 100644 --- a/lib/routes/tingshuitz/xian.ts +++ b/lib/routes/tingshuitz/xian.ts @@ -34,17 +34,15 @@ async function handler() { return { title: $('title').text() || '停水通知 - 西安市自来水有限公司', link: 'http://www.xazls.com/tsgg/index.htm', - item: list - .map((_, el) => { - const item = $(el); + item: list.toArray().map((el) => { + const item = $(el); - const a = item.find('a'); - return { - title: a.text().trim(), - description: item.text().trim(), - link: 'http://www.xazls.com' + a.attr('href'), - }; - }) - .get(), + const a = item.find('a'); + return { + title: a.text().trim(), + description: item.text().trim(), + link: 'http://www.xazls.com' + a.attr('href'), + }; + }), }; } diff --git a/lib/routes/tingshuitz/xiaoshan.ts b/lib/routes/tingshuitz/xiaoshan.ts index 1b9589a9adb8..444de1cdd067 100644 --- a/lib/routes/tingshuitz/xiaoshan.ts +++ b/lib/routes/tingshuitz/xiaoshan.ts @@ -42,18 +42,14 @@ async function handler() { title: $('title').text(), link: 'https://www.xswater.com/gongshui/channels/227.html', description: $('meta[name="description"]').attr('content') || $('title').text(), - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('a').text(), - description: `萧山区停水通知:${item.find('a').text()}`, - pubDate: new Date(item.find('span').text().slice(1, 11)).toUTCString(), - link: `https://www.xswater.com${item.find('a').attr('href')}`, - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('a').text(), + description: `萧山区停水通知:${item.find('a').text()}`, + pubDate: new Date(item.find('span').text().slice(1, 11)).toUTCString(), + link: `https://www.xswater.com${item.find('a').attr('href')}`, + }; + }), }; } diff --git a/lib/routes/tingshuitz/yangjiang.ts b/lib/routes/tingshuitz/yangjiang.ts index 2fa69129c619..dab09a273cd1 100644 --- a/lib/routes/tingshuitz/yangjiang.ts +++ b/lib/routes/tingshuitz/yangjiang.ts @@ -37,18 +37,16 @@ async function handler() { return { title: '停水通知 - 阳江市水务集团有限公司', link: 'https://www.yjsswjt.com/zxdt_list.jsp?flbz=7', - item: list - .map((_, el) => { - const item = $(el); + item: list.toArray().map((el) => { + const item = $(el); - const id = item.find('a').attr('href').slice(17, -1); - return { - title: item.find('span').text().trim(), - description: item.find('span').text().trim(), - link: 'http://www.yjsswjt.com/list.jsp?id=' + id, - pubDate: parseDate(item.find('.datetime').text(), 'YYYY.MM.DD'), - }; - }) - .get(), + const id = item.find('a').attr('href').slice(17, -1); + return { + title: item.find('span').text().trim(), + description: item.find('span').text().trim(), + link: 'http://www.yjsswjt.com/list.jsp?id=' + id, + pubDate: parseDate(item.find('.datetime').text(), 'YYYY.MM.DD'), + }; + }), }; } diff --git a/lib/routes/tisi/index.ts b/lib/routes/tisi/index.ts index b1f43b847098..5c6427aa412e 100644 --- a/lib/routes/tisi/index.ts +++ b/lib/routes/tisi/index.ts @@ -30,13 +30,13 @@ async function handler() { const response = await got(url); const $ = load(response.data); const list = $('div.new-artice-list-box') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('p.new-article-title > a').text(), link: new URL($(item).find('p.new-article-title > a').attr('href'), rootUrl).href, pubDate: parseDate($(item).find('p.new-article-date > span.left-span').text()), category: $(item).find('p.new-article-date > span:nth-child(1)').text(), - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/tju/cic/index.ts b/lib/routes/tju/cic/index.ts index a96297fa6e3d..bf08e241bad8 100644 --- a/lib/routes/tju/cic/index.ts +++ b/lib/routes/tju/cic/index.ts @@ -86,7 +86,8 @@ async function handler(ctx) { } else { const $ = load(response.data); const list = $('.wenzi_list_ul > li') - .map((_index, item) => { + .toArray() + .map((item) => { const href = $('a', item).attr('href'); const type = pageType(href); return { @@ -94,8 +95,7 @@ async function handler(ctx) { link: type === 'in-site' ? cic_base_url + href : href, type, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => { diff --git a/lib/routes/tju/news/index.ts b/lib/routes/tju/news/index.ts index eb4d5c1efa8b..b2f8a98a4b77 100644 --- a/lib/routes/tju/news/index.ts +++ b/lib/routes/tju/news/index.ts @@ -97,7 +97,7 @@ async function handler(ctx) { const $ = load(response.data); let list; - list = type === 'picture' ? $('.picList > li').get() : $('.indexList > li').get(); + list = type === 'picture' ? $('.picList > li').toArray() : $('.indexList > li').toArray(); list = list.map((item) => { const href = $('h4 > a', item).attr('href'); diff --git a/lib/routes/tju/oaa/index.ts b/lib/routes/tju/oaa/index.ts index 21dc91093cad..923c62ddedec 100644 --- a/lib/routes/tju/oaa/index.ts +++ b/lib/routes/tju/oaa/index.ts @@ -89,7 +89,8 @@ async function handler(ctx) { } else { const $ = load(response.data); const list = $('.notice_l > ul > li > dl > dt') - .map((_index, item) => { + .toArray() + .map((item) => { const href = $('a', item).attr('href'); const type = pageType(href); return { @@ -98,8 +99,7 @@ async function handler(ctx) { pubDate: timezone(parseDate($('.fl_01_r_time', item).text(), 'DDYYYY-MM'), +8), type, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => { diff --git a/lib/routes/tju/yzb/index.ts b/lib/routes/tju/yzb/index.ts index 09e4abadc193..8e8a0282e218 100644 --- a/lib/routes/tju/yzb/index.ts +++ b/lib/routes/tju/yzb/index.ts @@ -95,7 +95,8 @@ async function handler(ctx) { const $ = load(iconv.decode(response.data, 'gbk')); const list = $('body > table:nth-child(3) > tbody > tr > td.table_left_right > table > tbody > tr:nth-child(3) > td > table > tbody > tr:nth-child(1) > td > table > tbody > tr') .slice(1, -1) - .map((_index, item) => { + .toArray() + .map((item) => { const href = $('td > a', item).attr('href'); const type = pageType(href); return { @@ -104,8 +105,7 @@ async function handler(ctx) { pubDate: timezone(parseDate($('.font_10_time', item).text().slice(2, -2), 'YYYY-MM-DD'), +8), type, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => { diff --git a/lib/routes/tribalfootball/latest.ts b/lib/routes/tribalfootball/latest.ts index 1b540814ff6d..11acd4cb5d36 100644 --- a/lib/routes/tribalfootball/latest.ts +++ b/lib/routes/tribalfootball/latest.ts @@ -27,7 +27,8 @@ async function handler() { const rss = await got(rssUrl); const $ = load(rss.data, { xmlMode: true }); const items = $('rss > channel > item') - .map((_, item) => { + .toArray() + .map((item) => { const $item = $(item); let link = $item.find('link').text(); link = new URL(link); @@ -42,8 +43,7 @@ async function handler() { author: $item.find(String.raw`dc\:creator`).text(), _header_image: $item.find('enclosure').attr('url'), }; - }) - .get(); + }); await Promise.all( items.map((item) => diff --git a/lib/routes/trow/portal.ts b/lib/routes/trow/portal.ts index 421f944c94d1..8f086ae82f64 100644 --- a/lib/routes/trow/portal.ts +++ b/lib/routes/trow/portal.ts @@ -52,20 +52,16 @@ async function handler() { title: `The Ring of Wonder - Portal`, link: `https://trow.cc`, description: `The Ring of Wonder 首页更新`, - item: - list && - list - .map((index, item) => { - item = $(item); - const dateraw = item.find('.postdetails').text(); - return { - title: item.find('.maintitle p:nth-child(2) > a').text(), - description: item.find('.portal_news_content .row18').html(), - link: item.find('.maintitle p:nth-child(2) > a').attr('href'), - author: item.find('.postdetails a').text(), - pubDate: timezone(parseDate(dateraw.slice(3), 'YYYY-MM-DD, HH:mm'), +8), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + const dateraw = item.find('.postdetails').text(); + return { + title: item.find('.maintitle p:nth-child(2) > a').text(), + description: item.find('.portal_news_content .row18').html(), + link: item.find('.maintitle p:nth-child(2) > a').attr('href'), + author: item.find('.postdetails a').text(), + pubDate: timezone(parseDate(dateraw.slice(3), 'YYYY-MM-DD, HH:mm'), +8), + }; + }), }; } diff --git a/lib/routes/txrjy/fornumtopic.ts b/lib/routes/txrjy/fornumtopic.ts index 7b7c7d0d16bf..f2e2d88c63c7 100644 --- a/lib/routes/txrjy/fornumtopic.ts +++ b/lib/routes/txrjy/fornumtopic.ts @@ -43,15 +43,15 @@ async function handler(ctx) { const title = $('div.z > a').last().text(); const list = $('tbody > tr') .slice(0, 25) - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('td.title2').text(), link: new URL($(item).find('td.title2 > a').attr('href'), rootUrl).href, author: $(item).find('td.author').text(), pubDate: timezone(parseDate($(item).find('td.dateline').text(), 'YYYY-M-D HH:mm'), +8), category: $(item).find('td.forum').text(), })) - .filter((_, item) => item.title) - .get(); + .filter((item) => item.title); const items = await Promise.all( list.map((item) => @@ -62,7 +62,8 @@ async function handler(ctx) { const content = load(iconv.decode(detailResponse.data, 'gbk')); item.description = content('div.c_table') - .map((_, item) => + .toArray() + .map((item) => art(path.join(__dirname, 'templates/fornumtopic.art'), { content: content(item) .find('td.t_f') @@ -80,7 +81,6 @@ async function handler(ctx) { author: content(item).find('a.xw1').text().trim(), }) ) - .get() .join('\n'); return item; diff --git a/lib/routes/ucas/index.ts b/lib/routes/ucas/index.ts index 38556a613e5b..52a648030b23 100644 --- a/lib/routes/ucas/index.ts +++ b/lib/routes/ucas/index.ts @@ -47,7 +47,7 @@ async function handler(ctx) { const response = await got.get(url); const $ = load(response.data); - const list = $('#col1_content > div.list > ul > li').get(); + const list = $('#col1_content > div.list > ul > li').toArray(); const items = await Promise.all( list.map(async (item) => { diff --git a/lib/routes/udn/breaking-news.ts b/lib/routes/udn/breaking-news.ts index 40fff2abd0c6..f9ffd71022eb 100644 --- a/lib/routes/udn/breaking-news.ts +++ b/lib/routes/udn/breaking-news.ts @@ -118,7 +118,7 @@ const getLinkName = async (link) => { const result = await got(url); const $ = load(result.data); const data = $('.cate-list__subheader a') - .get() + .toArray() .map((item) => { item = $(item); return [item.attr('href'), item.text().trim()]; diff --git a/lib/routes/uestc/auto.ts b/lib/routes/uestc/auto.ts index 99242a23359f..5e73f99580ec 100644 --- a/lib/routes/uestc/auto.ts +++ b/lib/routes/uestc/auto.ts @@ -48,7 +48,8 @@ async function handler() { const items = $('dl.clearfix'); const out = $(items) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const newsTitle = item.find('a').text(); const newsLink = host + item.find('a[href]').attr('href').slice(3); @@ -59,8 +60,7 @@ async function handler() { link: newsLink, pubDate: newsPubDate, }; - }) - .get(); + }); return { title: '电子科技大学自动化学院通知', diff --git a/lib/routes/uestc/cqe.ts b/lib/routes/uestc/cqe.ts index adb9265e95bb..91db7f5a10bd 100644 --- a/lib/routes/uestc/cqe.ts +++ b/lib/routes/uestc/cqe.ts @@ -68,7 +68,8 @@ async function handler(ctx) { const items = $('div.Newslist li'); const out = $(items) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const newsTitle = item.find('a').attr('title'); const newsLink = baseUrl + item.find('a').attr('href').slice(3); @@ -79,8 +80,7 @@ async function handler(ctx) { link: newsLink, pubDate: newsPubDate, }; - }) - .get(); + }); return { title: `大学生文化素质教育中心-${mapTitle[type]}`, diff --git a/lib/routes/uestc/news.ts b/lib/routes/uestc/news.ts index 472c3cc1ab56..c02a64c84d52 100644 --- a/lib/routes/uestc/news.ts +++ b/lib/routes/uestc/news.ts @@ -56,7 +56,8 @@ async function handler(ctx) { const items = $('div.notice-item.clearfix'); const out = $(items) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const newsTitle = item.find('a').text().trim(); const newsLink = baseUrl + item.find('a').attr('href'); @@ -69,8 +70,7 @@ async function handler(ctx) { description: newsDescription, pubDate: newsDate, }; - }) - .get(); + }); return { title: '新闻网通知', diff --git a/lib/routes/uestc/scse.ts b/lib/routes/uestc/scse.ts index 669c6580f23d..9ab3d4496c34 100644 --- a/lib/routes/uestc/scse.ts +++ b/lib/routes/uestc/scse.ts @@ -74,7 +74,8 @@ async function handler() { }); const out = $(items) - .map((index, item) => { + .toArray() + .map((item) => { item = $(item); const now = dayjs(); let date = dayjs(now.year() + '-' + item.find('a span').text()); @@ -104,8 +105,7 @@ async function handler() { link: newsLink, pubDate: newsPubDate, }; - }) - .get(); + }); return { title: '计算机学院通知', diff --git a/lib/routes/uestc/sice.ts b/lib/routes/uestc/sice.ts index e228df07e29e..0ae461e5e8d4 100644 --- a/lib/routes/uestc/sice.ts +++ b/lib/routes/uestc/sice.ts @@ -47,7 +47,8 @@ async function handler() { const $ = load(content); const out = $('.notice p') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const now = dayjs(); let date = dayjs(now.year() + '-' + item.find('a.date').text()); @@ -60,8 +61,7 @@ async function handler() { link: host + item.find('a[href]').attr('href'), pubDate: parseDate(date), }; - }) - .get(); + }); return { title: '信通学院通知', diff --git a/lib/routes/uestc/sise.ts b/lib/routes/uestc/sise.ts index f20454edfb6b..1f139598d6e2 100644 --- a/lib/routes/uestc/sise.ts +++ b/lib/routes/uestc/sise.ts @@ -83,7 +83,8 @@ async function handler(ctx) { const items = $(`div[id="${divId}"] p.news-item`); const out = $(items) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const now = dayjs(); let date = dayjs(now.year() + '-' + item.find('span').text().replace('/', '-')); @@ -99,8 +100,7 @@ async function handler(ctx) { link: newsLink, pubDate: newsPubDate, }; - }) - .get(); + }); return { title: `信软学院通知-${mapTitle[type]}`, diff --git a/lib/routes/ulapia/index.ts b/lib/routes/ulapia/index.ts index b41165a0e346..84c08f80df2f 100644 --- a/lib/routes/ulapia/index.ts +++ b/lib/routes/ulapia/index.ts @@ -51,15 +51,15 @@ async function handler(ctx) { const response = await got.get(url); const $ = load(response.data); const items = $(String(selectorMap[category])) - .filter((_, item) => $(item).find('img').attr('src')) - .map((_, item) => ({ + .toArray() + .filter((item) => $(item).find('img').attr('src')) + .map((item) => ({ title: `${$(item).find('strong').text()} ${$(item).find('h5.mb-1').text()}`, author: $(item).find('div.col.p-8.d-flex.px-3.py-3.flex-column.position-static > div:nth-child(4) > span:nth-child(2)').text(), link: $(item).find('h5.mb-1 > a').attr('href'), description: ``, pubDate: parseDate($(item).find('div.mb-0.text-muted').last().text().split(':')[1], 'YYYY-MM-DD'), - })) - .get(); + })); return { title: ` ulapia - ${titleMap[category]}`, diff --git a/lib/routes/ulapia/research.ts b/lib/routes/ulapia/research.ts index 4147464384d6..70f8e0f750c0 100644 --- a/lib/routes/ulapia/research.ts +++ b/lib/routes/ulapia/research.ts @@ -42,14 +42,14 @@ async function handler() { const $ = load(response.data); const items = $('div.row > div.col-md-6') .slice(0, 6) - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: `${$(item).find('strong').text()} ${$(item).find('h5.mb-1').text()}`, author: $(item).find('div.col.p-8.d-flex.px-3.py-3.flex-column.position-static > div:nth-child(4) > span:nth-child(2)').text(), link: $(item).find('h5.mb-1 > a').attr('href'), description: ``, pubDate: parseDate($(item).find('div.mb-0.text-muted').last().text().split(':')[1], 'YYYY-MM-DD'), - })) - .get(); + })); return items; }); diff --git a/lib/routes/ustb/yjsy/news.ts b/lib/routes/ustb/yjsy/news.ts index 22e3a2aff518..44c9b2414dc0 100644 --- a/lib/routes/ustb/yjsy/news.ts +++ b/lib/routes/ustb/yjsy/news.ts @@ -432,53 +432,49 @@ async function handler(ctx) { title: struct[type].name, link: struct[type].link, description: '北京科技大学研究生院', - item: - list && - list - .map((index, item) => { - item = $(item); - // logger.info("item:" + item); + item: list.toArray().map((item) => { + item = $(item); + // logger.info("item:" + item); - // time - let time = item.find($(struct[type].timeSelector.list)).text(); - let date; - if (time !== '') { - if (time.includes('[')) { - time = time.slice(1, 11); - } - date = parseDate(time); - } - // logger.info("date:" + date); + // time + let time = item.find($(struct[type].timeSelector.list)).text(); + let date; + if (time !== '') { + if (time.includes('[')) { + time = time.slice(1, 11); + } + date = parseDate(time); + } + // logger.info("date:" + date); - // link - let link = item.find($(struct[type].linkSelector.list)).attr('href'); - if (link === undefined) { - link = item.attr('href'); - } - // logger.info("link:" + link); + // link + let link = item.find($(struct[type].linkSelector.list)).attr('href'); + if (link === undefined) { + link = item.attr('href'); + } + // logger.info("link:" + link); - // title - let title = item.find($(struct[type].titleSelector.list)).clone().children().remove().end().text(); - if (title === '') { - title = item.find($(struct[type].titleSelector.list)).text(); - } - // logger.info("title:" + title); - // logger.info("====="); + // title + let title = item.find($(struct[type].titleSelector.list)).clone().children().remove().end().text(); + if (title === '') { + title = item.find($(struct[type].titleSelector.list)).text(); + } + // logger.info("title:" + title); + // logger.info("====="); - // return - return date === undefined - ? { - title, - description: title, - link, - } - : { - title, - description: title, - link, - pubDate: date, - }; - }) - .get(), + // return + return date === undefined + ? { + title, + description: title, + link, + } + : { + title, + description: title, + link, + pubDate: date, + }; + }), }; } diff --git a/lib/routes/ustc/index.ts b/lib/routes/ustc/index.ts index dc9557552639..dda89d45a4a5 100644 --- a/lib/routes/ustc/index.ts +++ b/lib/routes/ustc/index.ts @@ -70,16 +70,16 @@ async function handler(ctx) { const $ = load(response.data); let items = $('table[portletmode=simpleList] > tbody > tr.light') - .map(function () { - const child = $(this).children(); + .toArray() + .map((element) => { + const child = $(element).children(); const info = { title: $(child[1]).find('a').attr('title'), link: $(child[1]).find('a').attr('href').startsWith('../') ? new URL($(child[1]).find('a').attr('href'), notice_type[type].url).href : $(child[1]).find('a').attr('href'), pubDate: timezone(parseDate($(child[2]).text(), 'YYYY-MM-DD'), +8), }; return info; - }) - .get(); + }); items = await Promise.all( items diff --git a/lib/routes/ustc/jwc.ts b/lib/routes/ustc/jwc.ts index 76c9f0ba03de..135cdeced4f5 100644 --- a/lib/routes/ustc/jwc.ts +++ b/lib/routes/ustc/jwc.ts @@ -49,16 +49,16 @@ async function handler(ctx) { const $ = load(response.data); let items = $(type === '' ? 'ul[class="article-list with-tag"] > li' : 'ul[class=article-list] > li') - .map(function () { - const child = $(this).children(); + .toArray() + .map((element) => { + const child = $(element).children(); const info = { title: type === '' ? $(child[0]).find('a').text() + ' - ' + $(child[1]).find('a').text() : $(child[0]).find('a').text(), link: type === '' ? $(child[1]).find('a').attr('href') : $(child[0]).find('a').attr('href'), - pubDate: timezone(parseDate($(this).find('.date').text().trim(), 'YYYY-MM-DD'), +8), + pubDate: timezone(parseDate($(element).find('.date').text().trim(), 'YYYY-MM-DD'), +8), }; return info; - }) - .get(); + }); items = await Promise.all( items diff --git a/lib/routes/usts/jwch.ts b/lib/routes/usts/jwch.ts index 863e16f16ed8..6146bf3099dc 100644 --- a/lib/routes/usts/jwch.ts +++ b/lib/routes/usts/jwch.ts @@ -36,11 +36,11 @@ async function handler(ctx) { const $ = load(response.data); const title = $('div.mainWrap.cleafix > div > div.right.fr > div.local.fl > h3').text(); const list = $('div.list > ul > li') - .map((_index, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a').text(), link: new URL($(item).find('a').attr('href'), rootURL).href, - })) - .get(); + })); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/uw/gix/news.ts b/lib/routes/uw/gix/news.ts index d55cd103abcb..c8125125ab8c 100644 --- a/lib/routes/uw/gix/news.ts +++ b/lib/routes/uw/gix/news.ts @@ -58,7 +58,8 @@ async function handler(ctx) { const $ = load(data); const list = $(listSelector) - .map((index, item) => { + .toArray() + .map((item) => { item = $(item); const content = item.find('header').find('h2').find('a'); const time = item.find('header').find('span.h4').text(); @@ -68,8 +69,7 @@ async function handler(ctx) { time, link: content.attr('href'), }; - }) - .get(); + }); const itemContent = await Promise.all( list.map((item) => diff --git a/lib/routes/verfghbw/press.ts b/lib/routes/verfghbw/press.ts index e664861c2d29..68a003ec0807 100644 --- a/lib/routes/verfghbw/press.ts +++ b/lib/routes/verfghbw/press.ts @@ -58,7 +58,8 @@ async function handler(ctx) { const $ = load(data); const list = $('.pressListItem') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const title = item.find('.pressListItemTeaser > h3').text().trim(); @@ -72,8 +73,7 @@ async function handler(ctx) { description: item.find('.pressListItemTeaser').html(), pubDate: parseDate(item.find('.pressListItemDate > span').text(), 'DD.MM.YYYY'), }; - }) - .get(); + }); return { title: 'Verfassungsgerichtshof Baden-Württemberg - Pressemitteilungen', diff --git a/lib/routes/vimeo/channel.ts b/lib/routes/vimeo/channel.ts index 79340a289232..26a987b36315 100644 --- a/lib/routes/vimeo/channel.ts +++ b/lib/routes/vimeo/channel.ts @@ -55,7 +55,7 @@ async function handler(ctx) { const list = $('ol li.clearfix'); const description = await Promise.all( - list.get().map((item) => { + list.toArray().map((item) => { item = $(item); const link = item.find('.more').attr('href'); return cache.tryGet(link, async () => { @@ -77,22 +77,20 @@ async function handler(ctx) { return { title: `${channel} | Vimeo channel`, link: url, - item: list - .map((index, item) => { - item = $(item); - const title = item.find('.title a').text(); - const author = item.find('.meta a').text(); - return { - title, - description: art(path.join(__dirname, 'templates/description.art'), { - videoUrl: item.find('.more').attr('href'), - vdescription: description[index] || '', - }), - pubDate: parseDate(item.find('time').attr('datetime')), - link: `https://vimeo.com${item.find('.more').attr('href')}`, - author, - }; - }) - .get(), + item: list.toArray().map((item, index) => { + item = $(item); + const title = item.find('.title a').text(); + const author = item.find('.meta a').text(); + return { + title, + description: art(path.join(__dirname, 'templates/description.art'), { + videoUrl: item.find('.more').attr('href'), + vdescription: description[index] || '', + }), + pubDate: parseDate(item.find('time').attr('datetime')), + link: `https://vimeo.com${item.find('.more').attr('href')}`, + author, + }; + }), }; } diff --git a/lib/routes/wallhaven/index.ts b/lib/routes/wallhaven/index.ts index a5ebd52fe0a8..1d6538844702 100644 --- a/lib/routes/wallhaven/index.ts +++ b/lib/routes/wallhaven/index.ts @@ -45,14 +45,14 @@ async function handler(ctx) { let items = $('li > figure.thumb') .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 24) - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('img.lazyload').attr('data-src').split('/').pop(), description: $(item) .html() .match(//)[0], link: $(item).find('a.preview').attr('href'), - })) - .get(); + })); if (needDetails) { items = await Promise.all( items.map((item) => diff --git a/lib/routes/wechat/data258.ts b/lib/routes/wechat/data258.ts index 51142a9a7ae4..fa13cc0a9aac 100644 --- a/lib/routes/wechat/data258.ts +++ b/lib/routes/wechat/data258.ts @@ -60,11 +60,11 @@ async function handler(ctx) { categoryPage && categoryPage.length ? $(categoryPage) .find('li') - .map((_, item) => parsePage($(item), 'h2 a', '.fly-list-info span')) - .get() // got a category page + .toArray() + .map((item) => parsePage($(item), 'h2 a', '.fly-list-info span')) // got a category page : $('ul.jie-row li') - .map((_, item) => parsePage($(item), 'a.jie-title', '.layui-hide-xs')) - .get(); // got an MP page + .toArray() + .map((item) => parsePage($(item), 'a.jie-title', '.layui-hide-xs')); // got an MP page items = items.slice(0, limit); // limit to avoid being anti-crawled diff --git a/lib/routes/wechat/msgalbum.ts b/lib/routes/wechat/msgalbum.ts index b3636b423264..7ef3248241f1 100644 --- a/lib/routes/wechat/msgalbum.ts +++ b/lib/routes/wechat/msgalbum.ts @@ -32,7 +32,7 @@ async function handler(ctx) { url: `https://mp.weixin.qq.com/mp/appmsgalbum?__biz=${biz}&action=getalbum${aidurl}`, }); const $ = load(HTMLresponse.data); - const list = $('li').get(); + const list = $('li').toArray(); const mptitle = $('.album__author-name').text() + `|` + $('.album__label-title').text(); const articledata = await Promise.all( list.map((item) => { diff --git a/lib/routes/wechat/tgchannel.ts b/lib/routes/wechat/tgchannel.ts index f15f8840835f..aad149517fe5 100644 --- a/lib/routes/wechat/tgchannel.ts +++ b/lib/routes/wechat/tgchannel.ts @@ -50,129 +50,127 @@ async function handler(ctx) { const list = $('.tgme_widget_message_wrap').slice(-20); const out = await Promise.all( - list - .map(async (index, item) => { - item = $(item); - - if (searchQuery) { - // 删除关键字高亮 - const highlightMarks = item.find('mark.highlight').get(); - if (highlightMarks) { - for (let mark of highlightMarks) { - mark = $(mark); - const markInnerHtml = mark.html(); - mark.replaceWith(markInnerHtml); - } - item = $(item.html()); // 删除关键字高亮后,相邻的裸文本节点不会被自动合并,重新生成 cheerio 对象以确保后续流程正常运行 + list.toArray().map(async (item) => { + item = $(item); + + if (searchQuery) { + // 删除关键字高亮 + const highlightMarks = item.find('mark.highlight').toArray(); + if (highlightMarks) { + for (let mark of highlightMarks) { + mark = $(mark); + const markInnerHtml = mark.html(); + mark.replaceWith(markInnerHtml); } + item = $(item.html()); // 删除关键字高亮后,相邻的裸文本节点不会被自动合并,重新生成 cheerio 对象以确保后续流程正常运行 } - - // [ div.tgme_widget_message_text 格式简略说明 ] - // 若频道只订阅一个公众号: - // 第 1 个元素: 🔗 - // 第 2 个元素: ${文章标题} - // (余下是文章简介,一般是裸文本,这里用不到) - // - // 若频道订阅多于一个公众号: - // 第 1 个元素: ${emoji(标注消息来源于什么 slave,这里是表示微信的💬)} - // 第 2 个元素: ${emoji(标注对话类型,这里是表示私聊的👤) - // 裸文本: (半角空格)${公众号名}(半角冒号) - // 第 3 个元素:
- // 第 4 个元素: 🔗 - // 第 5 个元素: ${文章标题} - // (余下是文章简介,一般是裸文本,这里用不到) - // - // 若启用 efb-patch-middleware 且频道订阅多于一个公众号: - // 第 1 个元素: ${emoji(标注消息来源于什么 slave,这里是表示微信的💬)} - // 第 2 个元素: ${emoji(标注对话类型,这里是表示私聊的👤) - // 第 3 个元素: #${公众号名} - // 裸文本: ${公众号名余下部分 (若 hashtag 不合法 (遇到空格、标点) 导致被截断才会有)}(半角冒号) - // 第 4 个元素:
- // 第 5 个元素: 🔗 - // 第 6 个元素: ${文章标题} - // (余下是文章简介,一般是裸文本,这里用不到) - - let author = ''; - let titleElemIs3thA = false; - - const brNode = item.find('.tgme_widget_message_text > br:nth-of-type(1)').get(0); // 获取第一个换行 - const authorNode = brNode && brNode.prev; // brNode 不为 undefined 时获取它的前一个节点 - const authorNodePrev = authorNode && authorNode.prev; // authorNode 不为 undefined 时获取它的前一个节点 - if (authorNode && authorNode.type === 'text') { - // 只有这个节点是一个裸文本时它才可能是公众号名,开始找寻公众号名 - if (authorNodePrev && authorNodePrev.type === 'tag' && authorNodePrev.name === 'a' && authorNodePrev.attribs.href && authorNodePrev.attribs.href.startsWith('?q=%23')) { - // authorNode 前一个节点是链接, 且是个 hashtag,表示启用了 efb-patch-middleware,这个节点是公众号名 - // 有两种可能: - // 带 # 的完整公众号名 (efb-patch-middleware 启用,且 hashtag 完全合法) - // 被截断的公众号名前半部分 (efb-patch-middleware 启用,但 hashtag 被空格或标点截断) - // (若 efb-patch-middleware 未启用,或 hashtag 完全不合法,不会进入此流程) - titleElemIs3thA = true; - author += $(authorNodePrev).text(); - } - - const spaceIndex = authorNode.data.indexOf(' '); - const colonIndex = authorNode.data.indexOf(':'); - if (authorNode.data.length > 1 && colonIndex !== -1 && (spaceIndex !== -1 || titleElemIs3thA)) { - // 有三种可能: - // 不带 # 的完整公众号名 (efb-patch-middleware 未启用) - // 带 # 的完整公众号名 (efb-patch-middleware 启用,但 hashtag 完全不合法) - // 被截断的公众号名后半部分 (efb-patch-middleware 启用,但 hashtag 被空格或标点截断,此时空格有意义) - // (若 efb-patch-middleware 启用,且 hashtag 完全合法,不会进入此流程) - const sliceStart = titleElemIs3thA ? 0 : spaceIndex + 1; - author += authorNode.data.slice(sliceStart, colonIndex); // 提取作者 - } - - if (author.startsWith('#')) { - author = author.slice(1); // 去掉开头的 # - } + } + + // [ div.tgme_widget_message_text 格式简略说明 ] + // 若频道只订阅一个公众号: + // 第 1 个元素: 🔗 + // 第 2 个元素: ${文章标题} + // (余下是文章简介,一般是裸文本,这里用不到) + // + // 若频道订阅多于一个公众号: + // 第 1 个元素: ${emoji(标注消息来源于什么 slave,这里是表示微信的💬)} + // 第 2 个元素: ${emoji(标注对话类型,这里是表示私聊的👤) + // 裸文本: (半角空格)${公众号名}(半角冒号) + // 第 3 个元素:
+ // 第 4 个元素: 🔗 + // 第 5 个元素: ${文章标题} + // (余下是文章简介,一般是裸文本,这里用不到) + // + // 若启用 efb-patch-middleware 且频道订阅多于一个公众号: + // 第 1 个元素: ${emoji(标注消息来源于什么 slave,这里是表示微信的💬)} + // 第 2 个元素: ${emoji(标注对话类型,这里是表示私聊的👤) + // 第 3 个元素: #${公众号名} + // 裸文本: ${公众号名余下部分 (若 hashtag 不合法 (遇到空格、标点) 导致被截断才会有)}(半角冒号) + // 第 4 个元素:
+ // 第 5 个元素: 🔗 + // 第 6 个元素: ${文章标题} + // (余下是文章简介,一般是裸文本,这里用不到) + + let author = ''; + let titleElemIs3thA = false; + + const brNode = item.find('.tgme_widget_message_text > br:nth-of-type(1)').get(0); // 获取第一个换行 + const authorNode = brNode && brNode.prev; // brNode 不为 undefined 时获取它的前一个节点 + const authorNodePrev = authorNode && authorNode.prev; // authorNode 不为 undefined 时获取它的前一个节点 + if (authorNode && authorNode.type === 'text') { + // 只有这个节点是一个裸文本时它才可能是公众号名,开始找寻公众号名 + if (authorNodePrev && authorNodePrev.type === 'tag' && authorNodePrev.name === 'a' && authorNodePrev.attribs.href && authorNodePrev.attribs.href.startsWith('?q=%23')) { + // authorNode 前一个节点是链接, 且是个 hashtag,表示启用了 efb-patch-middleware,这个节点是公众号名 + // 有两种可能: + // 带 # 的完整公众号名 (efb-patch-middleware 启用,且 hashtag 完全合法) + // 被截断的公众号名前半部分 (efb-patch-middleware 启用,但 hashtag 被空格或标点截断) + // (若 efb-patch-middleware 未启用,或 hashtag 完全不合法,不会进入此流程) + titleElemIs3thA = true; + author += $(authorNodePrev).text(); } - // 如果启用了 efb-patch-middleware 且 hashtag (部分)合法,第三个 a 元素会是文章链接,否则是第二个 - const titleElemNth = titleElemIs3thA ? 3 : 2; - const titleElem = item.find(`.tgme_widget_message_text > a:nth-of-type(${titleElemNth})`); - - if (titleElem.length === 0) { - // 获取不到标题 a 元素,这可能是公众号发的服务消息,丢弃它 - return; + const spaceIndex = authorNode.data.indexOf(' '); + const colonIndex = authorNode.data.indexOf(':'); + if (authorNode.data.length > 1 && colonIndex !== -1 && (spaceIndex !== -1 || titleElemIs3thA)) { + // 有三种可能: + // 不带 # 的完整公众号名 (efb-patch-middleware 未启用) + // 带 # 的完整公众号名 (efb-patch-middleware 启用,但 hashtag 完全不合法) + // 被截断的公众号名后半部分 (efb-patch-middleware 启用,但 hashtag 被空格或标点截断,此时空格有意义) + // (若 efb-patch-middleware 启用,且 hashtag 完全合法,不会进入此流程) + const sliceStart = titleElemIs3thA ? 0 : spaceIndex + 1; + author += authorNode.data.slice(sliceStart, colonIndex); // 提取作者 } - let title = titleElem.text(); - const link = titleElem.attr('href'); - - if (mpName && author !== mpName) { - // 指定了要筛选的公众号名,且该文章不是该公众号发的 - return; // 丢弃 - } else if (!mpName && author) { - // 没有指定要筛选的公众号名,且匹配到了作者 - title = author + ': ' + title; // 给标题里加上获取到的作者 + if (author.startsWith('#')) { + author = author.slice(1); // 去掉开头的 # } - - const pubDate = new Date(item.find('.tgme_widget_message_date time').attr('datetime')).toUTCString(); - - /* - * Since 2024/4/20, t.me/s/ mistakenly have every '&' in **hyperlinks** replaced by '&'. - * wechat-mp will take care of this, so no need to fix it here. - * However, once the bug is eventually fixed, all guid will be changed again. - * Considering that this is almost certain to happen, let's break guid consistency now by using - * normalized URL from wechat-mp as guid to avoid similar issues in the future. - */ - const single = { - title, - pubDate, - link, - // guid: link, - }; - - if (link !== undefined) { - try { - return await finishArticleItem(single); - } catch { - single.description = item.find('.tgme_widget_message_text').html(); - } + } + + // 如果启用了 efb-patch-middleware 且 hashtag (部分)合法,第三个 a 元素会是文章链接,否则是第二个 + const titleElemNth = titleElemIs3thA ? 3 : 2; + const titleElem = item.find(`.tgme_widget_message_text > a:nth-of-type(${titleElemNth})`); + + if (titleElem.length === 0) { + // 获取不到标题 a 元素,这可能是公众号发的服务消息,丢弃它 + return; + } + + let title = titleElem.text(); + const link = titleElem.attr('href'); + + if (mpName && author !== mpName) { + // 指定了要筛选的公众号名,且该文章不是该公众号发的 + return; // 丢弃 + } else if (!mpName && author) { + // 没有指定要筛选的公众号名,且匹配到了作者 + title = author + ': ' + title; // 给标题里加上获取到的作者 + } + + const pubDate = new Date(item.find('.tgme_widget_message_date time').attr('datetime')).toUTCString(); + + /* + * Since 2024/4/20, t.me/s/ mistakenly have every '&' in **hyperlinks** replaced by '&'. + * wechat-mp will take care of this, so no need to fix it here. + * However, once the bug is eventually fixed, all guid will be changed again. + * Considering that this is almost certain to happen, let's break guid consistency now by using + * normalized URL from wechat-mp as guid to avoid similar issues in the future. + */ + const single = { + title, + pubDate, + link, + // guid: link, + }; + + if (link !== undefined) { + try { + return await finishArticleItem(single); + } catch { + single.description = item.find('.tgme_widget_message_text').html(); } - return single; - }) - .get() + } + return single; + }) ); out.reverse(); diff --git a/lib/routes/wenku8/index.ts b/lib/routes/wenku8/index.ts index 7d6580892239..40267d0adc95 100644 --- a/lib/routes/wenku8/index.ts +++ b/lib/routes/wenku8/index.ts @@ -45,12 +45,12 @@ async function handler(ctx) { const $ = load(responseHtml); const items = $('td > div') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('b > a').text(), link: $(item).find('b > a').attr('href'), description: $(item).find('img').html() + $(item).find('div:nth-child(2)').remove('b').end().html(), - })) - .get(); + })); return { title: `轻小说文库 - ${cateTitleMap[category]}`, diff --git a/lib/routes/wfu/jwc.ts b/lib/routes/wfu/jwc.ts index a57b573f9c69..38100a5a2fb0 100644 --- a/lib/routes/wfu/jwc.ts +++ b/lib/routes/wfu/jwc.ts @@ -46,28 +46,26 @@ async function handler() { const result = await Promise.all( // 遍历每一篇文章 - list - .map((item) => { - const $ = load(list[item]); // 将列表项加载成 html - const $article_title = $('div.pr_fields>span.Article_Title>a'); - const $item_url = 'https://jwc.wfu.edu.cn/' + $article_title.attr('href'); // 获取 每一项的url - const $title = $article_title.text(); // 获取每个的标题 - const $description = $('div.pr_fields>span.Article_Title').html(); + list.toArray().map((item) => { + const $ = load(item); // 将列表项加载成 html + const $article_title = $('div.pr_fields>span.Article_Title>a'); + const $item_url = 'https://jwc.wfu.edu.cn/' + $article_title.attr('href'); // 获取 每一项的url + const $title = $article_title.text(); // 获取每个的标题 + const $description = $('div.pr_fields>span.Article_Title').html(); - // 列表上提取到的信息 - // 教务处通知为文件,直接提供下载链接 - // 标题 链接 - const single = { - title: $title, - link: $item_url, - guid: $item_url, - description: $description, - }; + // 列表上提取到的信息 + // 教务处通知为文件,直接提供下载链接 + // 标题 链接 + const single = { + title: $title, + link: $item_url, + guid: $item_url, + description: $description, + }; - // 合并解析后的结果集作为该篇文章最终的输出结果 - return single; - }) - .get() + // 合并解析后的结果集作为该篇文章最终的输出结果 + return single; + }) ); return { diff --git a/lib/routes/wfu/news.ts b/lib/routes/wfu/news.ts index d90b35bc20d9..c049730df390 100644 --- a/lib/routes/wfu/news.ts +++ b/lib/routes/wfu/news.ts @@ -94,29 +94,27 @@ async function handler(ctx) { const result = await Promise.all( // 遍历每一篇文章 - list - .map(async (item) => { - const $ = load(list[item]); // 将列表项加载成 html - const $item_url = 'https://www.wfu.edu.cn' + $('a').attr('href'); // 获取 每一项的url - const $title = $('a>div.txt>h1').text(); // 获取每个的标题 - const $pubdate = timezone(parseDate($('a>div.txt>span.date').text().split(':')[1]), +8); // 获取发布时间 + list.toArray().map(async (item) => { + const $ = load(item); // 将列表项加载成 html + const $item_url = 'https://www.wfu.edu.cn' + $('a').attr('href'); // 获取 每一项的url + const $title = $('a>div.txt>h1').text(); // 获取每个的标题 + const $pubdate = timezone(parseDate($('a>div.txt>span.date').text().split(':')[1]), +8); // 获取发布时间 - // 列表上提取到的信息 - // 标题 链接 - const single = { - title: $title, - pubDate: $pubdate, - link: $item_url, - guid: $item_url, - }; + // 列表上提取到的信息 + // 标题 链接 + const single = { + title: $title, + pubDate: $pubdate, + link: $item_url, + guid: $item_url, + }; - // 对于列表的每一项, 单独获取 时间与详细内容 + // 对于列表的每一项, 单独获取 时间与详细内容 - const other = await cache.tryGet($item_url, () => loadContent($item_url)); - // 合并解析后的结果集作为该篇文章最终的输出结果 - return { ...single, ...other }; - }) - .get() + const other = await cache.tryGet($item_url, () => loadContent($item_url)); + // 合并解析后的结果集作为该篇文章最终的输出结果 + return { ...single, ...other }; + }) ); return { diff --git a/lib/routes/who/news-room.ts b/lib/routes/who/news-room.ts index bf4575fe805b..6763c3c47cb0 100644 --- a/lib/routes/who/news-room.ts +++ b/lib/routes/who/news-room.ts @@ -68,16 +68,14 @@ async function handler(ctx) { pubDate: parseDate(item.PublicationDateAndTime), })); } else { - list = list - .map((_, item) => { - item = $(item); - const link = item.attr('href'); - - return { - link: `${link.indexOf('http') === 0 ? '' : rootUrl}${item.attr('href')}`, - }; - }) - .get(); + list = list.toArray().map((item) => { + item = $(item); + const link = item.attr('href'); + + return { + link: `${link.indexOf('http') === 0 ? '' : rootUrl}${item.attr('href')}`, + }; + }); } const items = await Promise.all( diff --git a/lib/routes/whu/gs/index.ts b/lib/routes/whu/gs/index.ts index 63b130919b2c..22eb4575f022 100644 --- a/lib/routes/whu/gs/index.ts +++ b/lib/routes/whu/gs/index.ts @@ -53,8 +53,8 @@ async function handler(ctx) { const $ = load(response.data); const feed_title = $('div.location a') .slice(-2) - .map((index, element) => $(element).text()) - .get() + .toArray() + .map((element) => $(element).text()) .join(' > '); let items = $('.list ul li') diff --git a/lib/routes/wizfile/index.ts b/lib/routes/wizfile/index.ts index bcf9b2f72116..4ee9cfe14236 100644 --- a/lib/routes/wizfile/index.ts +++ b/lib/routes/wizfile/index.ts @@ -36,7 +36,8 @@ async function handler() { const $ = load(response.data); const items = $('section.blog-section > div > div > div > h4') - .map((_, item) => { + .toArray() + .map((item) => { const title = $(item) .text() .replace(/\(.*?\)/, ''); @@ -55,8 +56,7 @@ async function handler() { pubDate, guid: `${currentUrl}${title}`, }; - }) - .get(); + }); return { title: `WziFile - 更新日志`, diff --git a/lib/routes/wsyu/news.ts b/lib/routes/wsyu/news.ts index 7ef45144188c..81f8def2ee09 100644 --- a/lib/routes/wsyu/news.ts +++ b/lib/routes/wsyu/news.ts @@ -56,18 +56,18 @@ async function handler(ctx) { const urlList = $('.mainContent li') .slice(0, 10) - .map((i, e) => $('a', e).attr('href')) - .get(); + .toArray() + .map((e) => $('a', e).attr('href')); const titleList = $('.mainContent li') .slice(0, 10) - .map((i, e) => $('a', e).text()) - .get(); + .toArray() + .map((e) => $('a', e).text()); const dateList = $('.mainContent li') .slice(0, 10) - .map((i, e) => $('span', e).text()) - .get(); + .toArray() + .map((e) => $('span', e).text()); const out = await Promise.all( urlList.map(async (itemUrl, index) => { diff --git a/lib/routes/wzu/news.ts b/lib/routes/wzu/news.ts index 6221715025e8..2080b1fe16f4 100644 --- a/lib/routes/wzu/news.ts +++ b/lib/routes/wzu/news.ts @@ -73,21 +73,17 @@ async function handler(ctx) { title: newsTitle, link: newsLink, description: '温州大学' + ' - ' + newsTitle, - item: - list && - list - .map(async (item) => { - const $ = load(list[item]); - const $a1 = $('li>a'); - const $originUrl = $a1.attr('href'); - const $itemUrl = new URL($originUrl, baseUrl).href; - return { - title: $a1.attr('title'), - description: await cache.tryGet($itemUrl, () => loadContent($itemUrl)), - pubDate: parseDate($('li>samp').text(), 'YYYY-MM-DD'), - link: $itemUrl, - }; - }) - .get(), + item: list.toArray().map(async (item) => { + const $ = load(item); + const $a1 = $('li>a'); + const $originUrl = $a1.attr('href'); + const $itemUrl = new URL($originUrl, baseUrl).href; + return { + title: $a1.attr('title'), + description: await cache.tryGet($itemUrl, () => loadContent($itemUrl)), + pubDate: parseDate($('li>samp').text(), 'YYYY-MM-DD'), + link: $itemUrl, + }; + }), }; } diff --git a/lib/routes/xaut/index.ts b/lib/routes/xaut/index.ts index 298ece3e57ab..ff6d9d66eee0 100644 --- a/lib/routes/xaut/index.ts +++ b/lib/routes/xaut/index.ts @@ -44,7 +44,8 @@ async function handler(ctx) { const $ = load(data); const list = $('div.nlist ul li') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); // link原来长这样:'../info/1196/13990.htm' const link = item.find('a').attr('href').replace(/^\.\./, 'http://www.xaut.edu.cn'); @@ -56,8 +57,7 @@ async function handler(ctx) { link, pubDate, }; - }) - .get(); + }); return { // 源标题 @@ -70,7 +70,7 @@ async function handler(ctx) { item: await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { - if (!item.link.match('zhixing.xaut.edu.cn') && !item.link.match('xinwen.xaut.edu.cn')) { + if (!item.link.includes('://zhixing.xaut.edu.cn/') && !item.link.includes('://xinwen.xaut.edu.cn/')) { const res = await got({ method: 'get', url: item.link, diff --git a/lib/routes/xaut/jwc.ts b/lib/routes/xaut/jwc.ts index 80e1a81efd7c..108edf0148c0 100644 --- a/lib/routes/xaut/jwc.ts +++ b/lib/routes/xaut/jwc.ts @@ -49,7 +49,8 @@ async function handler(ctx) { const list = $('.main_conRCb a') .slice(0, 20) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const link = item .attr('href') @@ -60,8 +61,7 @@ async function handler(ctx) { link, pubDate: parseDate(item.find('span').text()), }; - }) - .get(); + }); return { // 源标题 diff --git a/lib/routes/xaut/rsc.ts b/lib/routes/xaut/rsc.ts index b69894b6a0e0..a6be2a12d2bf 100644 --- a/lib/routes/xaut/rsc.ts +++ b/lib/routes/xaut/rsc.ts @@ -49,7 +49,8 @@ async function handler(ctx) { // 这个列表指通知公告详情列表 const list = $('.vsb-space.n_right .list .cleafix') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); // 工作动态栏目里有一些是外链,这里做个判断 const a = item.find('.list_wen a').eq(0).attr('href'); @@ -60,8 +61,7 @@ async function handler(ctx) { title, link, }; - }) - .get(); + }); return { // 源标题 title: '西安理工大学人事处-' + dic_title[category], diff --git a/lib/routes/xjtu/dean.ts b/lib/routes/xjtu/dean.ts index 3f49e36be6b4..1a33098f1ecb 100644 --- a/lib/routes/xjtu/dean.ts +++ b/lib/routes/xjtu/dean.ts @@ -10,13 +10,9 @@ const parseContent = (htmlString) => { const info = $('.detail_main_content > h1') .contents() - .filter(function () { - return this.nodeType === 3; - }) - .map(function () { - return $(this).text().trim(); - }) - .get(); + .filter((_, element) => element.nodeType === 3) + .toArray() + .map((element) => $(element).text().trim()); const content = $('[id^="vsb_content"]'); $('form > div > ul a').each(function () { diff --git a/lib/routes/xjtu/ee.ts b/lib/routes/xjtu/ee.ts index 402e3b49d0e8..1f245ef54f3e 100644 --- a/lib/routes/xjtu/ee.ts +++ b/lib/routes/xjtu/ee.ts @@ -40,7 +40,8 @@ async function handler(ctx) { const feed_title = $('span.windowstyle67278', "div[class='list_right fr']").text().trim(); const list = $("div[class='list_right fr'] ul li") - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('a'); const date = parseDate(item.find('span').text()); @@ -49,8 +50,7 @@ async function handler(ctx) { link: new URL(a.attr('href'), baseUrl).href, pubDate: timezone(date, +8), }; - }) - .get(); + }); return { title: `西安交通大学电气学院 - ${feed_title}`, diff --git a/lib/routes/xjtu/gs/tzgg.ts b/lib/routes/xjtu/gs/tzgg.ts index abaf5099f64e..ac898ca70d7c 100644 --- a/lib/routes/xjtu/gs/tzgg.ts +++ b/lib/routes/xjtu/gs/tzgg.ts @@ -37,7 +37,8 @@ async function handler() { const $ = load(response.data); const list = $('div.list_right_con ul li') .slice(0, 10) - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); const a = item.find('a'); return { @@ -45,8 +46,7 @@ async function handler() { link: new URL(a.attr('href'), 'http://gs.xjtu.edu.cn/').href, pubDate: parseDate(item.find('span.time').text()), }; - }) - .get(); + }); return { title: '西安交通大学研究生院 - 通知公告', diff --git a/lib/routes/xmanhua/index.ts b/lib/routes/xmanhua/index.ts index 2ba263f23105..63c8f766d41f 100644 --- a/lib/routes/xmanhua/index.ts +++ b/lib/routes/xmanhua/index.ts @@ -61,21 +61,19 @@ async function handler(ctx) { } // 最新一话的地址 const updatedOne = $('div.detail-list-form-title span.s a').attr('href'); - const items = list - .map((index, item) => { - item = $(item); - const itemTitle = item.text(); - const itemUrl = item.attr('href'); - const itemDate = itemUrl === updatedOne ? parseDate(newOneDate) : ''; - return { - title: itemTitle, - link: host + itemUrl, - auther: autherName, - pubDate: itemDate, - guid: host + itemUrl, - }; - }) - .get(); + const items = list.toArray().map((item) => { + item = $(item); + const itemTitle = item.text(); + const itemUrl = item.attr('href'); + const itemDate = itemUrl === updatedOne ? parseDate(newOneDate) : ''; + return { + title: itemTitle, + link: host + itemUrl, + auther: autherName, + pubDate: itemDate, + guid: host + itemUrl, + }; + }); const name = $('body > div.detail-info-1 > div > div > p.detail-info-title').text(); const description_ = finished ? '已完结' : '连载中'; return { diff --git a/lib/routes/xmut/jwc/bkjw.ts b/lib/routes/xmut/jwc/bkjw.ts index 06b55e19852d..4d395e72ea66 100644 --- a/lib/routes/xmut/jwc/bkjw.ts +++ b/lib/routes/xmut/jwc/bkjw.ts @@ -25,7 +25,8 @@ async function handler(ctx) { }); const $ = load(res.data); const itemsArray = $('#result_list table tbody tr') - .map((index, row) => { + .toArray() + .map((row) => { const res = $('td', row).eq(0); const resDate = $('td', row).eq(1); const resLink = $('a', res).attr('href'); @@ -43,8 +44,7 @@ async function handler(ctx) { link, pubDate, }; - }) - .get(); + }); const items = await Promise.all( itemsArray.map((item) => cache.tryGet(item.link, async () => { diff --git a/lib/routes/ygkkk/rss.ts b/lib/routes/ygkkk/rss.ts index df65a7eef2b2..dcade796ddff 100644 --- a/lib/routes/ygkkk/rss.ts +++ b/lib/routes/ygkkk/rss.ts @@ -24,7 +24,8 @@ async function handler() { const title_main = $('channel > title').text(); const description_main = $('channel > description').text(); const items = $('channel > item') - .map((_, item) => { + .toArray() + .map((item) => { const $item = $(item); const link = $item.find('link').text(); const title = $item.find('title').text(); @@ -36,8 +37,7 @@ async function handler() { title, description, }; - }) - .get(); + }); return { title: title_main, diff --git a/lib/routes/ymgal/game.ts b/lib/routes/ymgal/game.ts index 3ca4e40309ba..27da24b7bf9c 100644 --- a/lib/routes/ymgal/game.ts +++ b/lib/routes/ymgal/game.ts @@ -50,7 +50,7 @@ async function handler() { item = $(item); const itemPicUrl = item.find('.lazy').first().attr('data-original'); const tags = item.find('.tag-info-list').children(); - const taginfo = tags.map((i, elem) => $(elem).text()).get(); + const taginfo = tags.toArray().map((elem) => $(elem).text()); return { title: item.attr('title'), link: `${host}${item.attr('href')}`, diff --git a/lib/routes/yomujp/level.ts b/lib/routes/yomujp/level.ts index 38ba04712d31..a64088d5a063 100644 --- a/lib/routes/yomujp/level.ts +++ b/lib/routes/yomujp/level.ts @@ -42,7 +42,8 @@ async function handler(ctx) { const description = $('section') .slice(2, -2) .find('.elementor-widget-text-editor>div,.elementor-widget-image>div>img') - .map((_, el) => { + .toArray() + .map((el) => { if (el.tagName === 'img') { return ``; } else if (el.firstChild.tagName === 'p') { @@ -51,7 +52,6 @@ async function handler(ctx) { return `

${$(el).html()}

`; } }) - .get() .join(''); return { diff --git a/lib/routes/youku/channel.ts b/lib/routes/youku/channel.ts index dfb9b7a38860..f28032dda7cb 100644 --- a/lib/routes/youku/channel.ts +++ b/lib/routes/youku/channel.ts @@ -51,32 +51,30 @@ async function handler(ctx) { title: $('.username').text(), link: `https://i.youku.com/i/${channelId}`, description: $('.desc').text(), - item: - list && - list - .map((_, item) => { - item = $(item); - const title = item.find('a.videoitem_videolink').attr('title'); - const cover = item.find('a.videoitem_videolink > img').attr('src'); - const $link = item.find('a.videoitem_videolink'); - const link = $link.length > 0 ? `https:${$link.attr('href')}` : null; - const dateText = item.find('p.videoitem_subtitle').text().split('-').length === 2 ? `${new Date().getFullYear()}-${item.find('p.videoitem_subtitle').text()}` : item.find('p.videoitem_subtitle').text(); - const pubDate = parseDate(dateText); + item: list + .toArray() + .map((item) => { + item = $(item); + const title = item.find('a.videoitem_videolink').attr('title'); + const cover = item.find('a.videoitem_videolink > img').attr('src'); + const $link = item.find('a.videoitem_videolink'); + const link = $link.length > 0 ? `https:${$link.attr('href')}` : null; + const dateText = item.find('p.videoitem_subtitle').text().split('-').length === 2 ? `${new Date().getFullYear()}-${item.find('p.videoitem_subtitle').text()}` : item.find('p.videoitem_subtitle').text(); + const pubDate = parseDate(dateText); - return link - ? { - title, - description: art(path.join(__dirname, 'templates/channel.art'), { - embed, - videoId: path.parse(link).name.replaceAll(/^id_/g, ''), - cover, - }), - link, - pubDate, - } - : null; - }) - .get() - .filter(Boolean), + return link + ? { + title, + description: art(path.join(__dirname, 'templates/channel.art'), { + embed, + videoId: path.parse(link).name.replaceAll(/^id_/g, ''), + cover, + }), + link, + pubDate, + } + : null; + }) + .filter(Boolean), }; } diff --git a/lib/routes/yxdown/news.ts b/lib/routes/yxdown/news.ts index b88acf0785a1..6b76f75c4850 100644 --- a/lib/routes/yxdown/news.ts +++ b/lib/routes/yxdown/news.ts @@ -42,15 +42,15 @@ async function handler(ctx) { const $ = load(response.data); const list = $('.div_zixun h2 a') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: `${rootUrl}${item.attr('href')}`, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/yxdown/recommend.ts b/lib/routes/yxdown/recommend.ts index e80a435f1c25..b0e49fd38cab 100644 --- a/lib/routes/yxdown/recommend.ts +++ b/lib/routes/yxdown/recommend.ts @@ -42,15 +42,15 @@ async function handler() { const $ = load(response.data); const list = $('ul li a b') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.text(), link: item.parent().attr('href'), }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/yxdzqb/index.ts b/lib/routes/yxdzqb/index.ts index e2c4c4c92232..c1589c4fbfa1 100644 --- a/lib/routes/yxdzqb/index.ts +++ b/lib/routes/yxdzqb/index.ts @@ -52,27 +52,25 @@ async function handler(ctx) { const title = $('.btn-primary b').text() || $('.btn-danger b').text() || $('.btn-info b').text(); const list = $('tr.bg-none'); - const out = list - .map((index, item) => { - item = $(item); + const out = list.toArray().map((item) => { + item = $(item); - const title = item.find('div table:nth-child(1) tr td:nth-child(1)').text(); - const description = art(path.join(__dirname, 'templates/description.art'), { - src: item.find('table.cell_tabs > tbody > tr > td:nth-child(1) > img').attr('src'), - description: item.find('div.collapse').html(), - }); - const link = item.find('div.collapse table.cell_tabs > tbody > tr > td:nth-child(1) > a').attr('href'); - const guid = link + item.find('div.cell_price span:nth-child(2)').text(); + const title = item.find('div table:nth-child(1) tr td:nth-child(1)').text(); + const description = art(path.join(__dirname, 'templates/description.art'), { + src: item.find('table.cell_tabs > tbody > tr > td:nth-child(1) > img').attr('src'), + description: item.find('div.collapse').html(), + }); + const link = item.find('div.collapse table.cell_tabs > tbody > tr > td:nth-child(1) > a').attr('href'); + const guid = link + item.find('div.cell_price span:nth-child(2)').text(); - const single = { - title, - description, - link, - guid, - }; - return single; - }) - .get(); + const single = { + title, + description, + link, + guid, + }; + return single; + }); return { title: `${title}-游戏打折情报`, diff --git a/lib/routes/yyets/today.ts b/lib/routes/yyets/today.ts index 1602febfcc7d..d0f906f3c1ed 100644 --- a/lib/routes/yyets/today.ts +++ b/lib/routes/yyets/today.ts @@ -47,17 +47,13 @@ async function handler() { return { title: '人人影视-今日播出', link: 'https://yysub.net', - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('a').first().text(), - link: item.find('a').attr('href'), - guid: item.find('a').first().text(), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + return { + title: item.find('a').first().text(), + link: item.find('a').attr('href'), + guid: item.find('a').first().text(), + }; + }), }; } diff --git a/lib/routes/zagg/new-arrivals.ts b/lib/routes/zagg/new-arrivals.ts index e14d6a4c5d68..44016de39712 100644 --- a/lib/routes/zagg/new-arrivals.ts +++ b/lib/routes/zagg/new-arrivals.ts @@ -46,20 +46,20 @@ async function handler(ctx) { const $ = load(products); const list = $('.item.product.product-item') - .map(function () { + .toArray() + .map((element) => { const data = {}; - const details = $(this).find('.product.details-box').html(); - data.link = $(this).find('.product-item-link').eq(0).attr('href'); - data.title = $(this).find('.product-item-link').text(); + const details = $(element).find('.product.details-box').html(); + data.link = $(element).find('.product-item-link').eq(0).attr('href'); + data.title = $(element).find('.product-item-link').text(); const regex = /(https.*?)\?/; - const imgUrl = $(this).find('img').eq(0).attr('data-src').match(regex)[1]; + const imgUrl = $(element).find('img').eq(0).attr('data-src').match(regex)[1]; const img = art(path.join(__dirname, 'templates/new-arrivals.art'), { imgUrl, }); data.description = details + img; return data; - }) - .get(); + }); return { title: 'Zagg - New Arrivals', link: response.url, diff --git a/lib/routes/zcmu/jwc/index.ts b/lib/routes/zcmu/jwc/index.ts index 3c15935b9e0a..77c55a706dbf 100644 --- a/lib/routes/zcmu/jwc/index.ts +++ b/lib/routes/zcmu/jwc/index.ts @@ -45,15 +45,15 @@ async function handler(ctx) { const $ = load(res.data); const items = $('.winstyle196327 tr:lt(20)') - .map((index, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.find('a').attr('title'), link: `https://jwc.zcmu.edu.cn/${item.find('a').attr('href')}`, pubDate: parseDate(item.find('span.timestyle196327').text().trim()), }; - }) - .get(); + }); return { title: map.get(type).title, diff --git a/lib/routes/zcmu/yxy/index.ts b/lib/routes/zcmu/yxy/index.ts index 502649dbdad9..037a33f9f253 100644 --- a/lib/routes/zcmu/yxy/index.ts +++ b/lib/routes/zcmu/yxy/index.ts @@ -46,15 +46,15 @@ async function handler(ctx) { const $ = load(res.data); const items = $('.lm_list li') - .map((index, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.find('a').text(), link: `https://yxy.zcmu.edu.cn/${item.find('a').attr('href')}`, pubDate: parseDate(item.find('span').text().trim()), }; - }) - .get(); + }); return { title: map.get(type).title, diff --git a/lib/routes/zhihu/weekly.ts b/lib/routes/zhihu/weekly.ts index c216687604e2..371304507cf2 100644 --- a/lib/routes/zhihu/weekly.ts +++ b/lib/routes/zhihu/weekly.ts @@ -36,16 +36,16 @@ async function handler() { const description = $('p.Weekly-description').text(); const out = $('div.Card-section.PubBookListItem') .slice(0, 10) - .map(function () { + .toArray() + .map((element) => { const info = { - title: $(this).find('span.PubBookListItem-title').text(), - link: new URL($(this).find('a.PubBookListItem-buttonWrapper').attr('href'), host).href, - description: $(this).find('div.PubBookListItem-description').text(), - author: $(this).find('span.PubBookListItem-author').text(), + title: $(element).find('span.PubBookListItem-title').text(), + link: new URL($(element).find('a.PubBookListItem-buttonWrapper').attr('href'), host).href, + description: $(element).find('div.PubBookListItem-description').text(), + author: $(element).find('span.PubBookListItem-author').text(), }; return info; - }) - .get(); + }); return { title: '知乎周刊', diff --git a/lib/routes/zhujiceping/rss.ts b/lib/routes/zhujiceping/rss.ts index 1c28d10d5c41..a85f9cd30497 100644 --- a/lib/routes/zhujiceping/rss.ts +++ b/lib/routes/zhujiceping/rss.ts @@ -24,7 +24,8 @@ async function handler() { const $ = load(response.data); const list = $('article.excerpt') - .map((i, e) => { + .toArray() + .map((e) => { const element = $(e); const title = element.find('h2 > a').attr('title'); const link = element.find('h2 > a').attr('href'); @@ -37,8 +38,7 @@ async function handler() { link, pubDate: parseDate(dateraw, 'YYYY-MM-DD'), }; - }) - .get(); + }); return { title: '国外主机测评', diff --git a/lib/routes/zju/career/index.ts b/lib/routes/zju/career/index.ts index ce1a06bc60d5..85cdab347963 100644 --- a/lib/routes/zju/career/index.ts +++ b/lib/routes/zju/career/index.ts @@ -41,21 +41,17 @@ async function handler(ctx) { const $ = load(res.data); const list = $('.com-list li'); - const items = - list && - list - .map((index, item) => { - item = $(item); - const link = item.find('a').eq(0); - return { - // title: item.find('a').attr('title'), - title: item.find('span').eq(0).attr('title'), - pubDate: parseDate(item.find('.news-time').text()), + const items = list.toArray().map((item) => { + item = $(item); + const link = item.find('a').eq(0); + return { + // title: item.find('a').attr('title'), + title: item.find('span').eq(0).attr('title'), + pubDate: parseDate(item.find('.news-time').text()), - link: link.attr('href').startsWith('http') ? link.attr('href') : `${rootUrl}/jyxt${link.attr('data-src')}xwid=${link.attr('data-xwid')}&lmtype=${link.attr('data-lmtype')}`, - }; - }) - .get(); + link: link.attr('href').startsWith('http') ? link.attr('href') : `${rootUrl}/jyxt${link.attr('data-src')}xwid=${link.attr('data-xwid')}&lmtype=${link.attr('data-lmtype')}`, + }; + }); return { title: map.get(type).title, diff --git a/lib/routes/zju/cst/custom.ts b/lib/routes/zju/cst/custom.ts index c2b329e00ae7..8654adb47ce1 100644 --- a/lib/routes/zju/cst/custom.ts +++ b/lib/routes/zju/cst/custom.ts @@ -11,24 +11,19 @@ async function getPage(id) { const $ = load(res.data); const content = $('.lm_new ul li'); - return ( - content && - content - .map((index, item) => { - item = $(item); + return content.toArray().map((item) => { + item = $(item); - const title = item.find('a').text(); - const pubDate = parseDate(item.find('.fr').text()); - const link = item.find('a').attr('href'); + const title = item.find('a').text(); + const pubDate = parseDate(item.find('.fr').text()); + const link = item.find('a').attr('href'); - return { - title, - pubDate, - link, - }; - }) - .get() - ); + return { + title, + pubDate, + link, + }; + }); } export const route: Route = { diff --git a/lib/routes/zju/cst/index.ts b/lib/routes/zju/cst/index.ts index 6d117693e28e..18a24947d75c 100644 --- a/lib/routes/zju/cst/index.ts +++ b/lib/routes/zju/cst/index.ts @@ -29,19 +29,14 @@ async function getPage(id) { const $ = load(res.data); const list = $('.lm_new').find('li'); - return ( - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('a').text(), - pubDate: parseDate(item.find('.fr').text()), - link: new URL(item.find('a').attr('href'), host).href, - }; - }) - .get() - ); + return list.toArray().map((item) => { + item = $(item); + return { + title: item.find('a').text(), + pubDate: parseDate(item.find('.fr').text()), + link: new URL(item.find('a').attr('href'), host).href, + }; + }); } export const route: Route = { diff --git a/lib/routes/zju/grs/index.ts b/lib/routes/zju/grs/index.ts index 3be7ba620068..a8e53dc214ee 100644 --- a/lib/routes/zju/grs/index.ts +++ b/lib/routes/zju/grs/index.ts @@ -44,19 +44,15 @@ async function handler(ctx) { const $ = load(res.data); const list = $('#wp_news_w09').find('.list-item'); - const items = - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('h3').attr('title'), - pubDate: timezone(parseDate(item.find('.date').text().trim(), 'YY-MM-DD'), +8), - link: `http://www.grs.zju.edu.cn${item.find('a').eq(-1).attr('href')}`, - description: item.find('p').text(), - }; - }) - .get(); + const items = list.toArray().map((item) => { + item = $(item); + return { + title: item.find('h3').attr('title'), + pubDate: timezone(parseDate(item.find('.date').text().trim(), 'YY-MM-DD'), +8), + link: `http://www.grs.zju.edu.cn${item.find('a').eq(-1).attr('href')}`, + description: item.find('p').text(), + }; + }); return { title: map.get(type).title, diff --git a/lib/routes/zju/list.ts b/lib/routes/zju/list.ts index d341f6d1427e..27b304a6afd2 100644 --- a/lib/routes/zju/list.ts +++ b/lib/routes/zju/list.ts @@ -38,17 +38,17 @@ async function handler(ctx) { return e.search('redirect') === -1 ? e : link; } const list = $('#wp_news_w7 ul.news li') - .map(function () { + .toArray() + .map((element) => { const info = { - title: $(this).find('a').attr('title'), - link: sortUrl($(this).find('a').attr('href')), - date: $(this) + title: $(element).find('a').attr('title'), + link: sortUrl($(element).find('a').attr('href')), + date: $(element) .text() .match(/\d{4}-\d{2}-\d{2}/)[0], }; return info; - }) - .get(); + }); const out = await Promise.all( list.map((info) => { diff --git a/lib/routes/zju/physics/index.ts b/lib/routes/zju/physics/index.ts index a31aef62e30d..ff37b594dddb 100644 --- a/lib/routes/zju/physics/index.ts +++ b/lib/routes/zju/physics/index.ts @@ -54,7 +54,8 @@ async function handler(ctx) { const $ = load(res.data); const items = $('#arthd li') - .map((index, item) => { + .toArray() + .map((item) => { item = $(item); return { title: item.find('a').attr('title'), @@ -63,8 +64,7 @@ async function handler(ctx) { link: `http://physics.zju.edu.cn/${item.find('a').attr('href')}`, // link: `http://10.14.122.238/${item.find('a').attr('href')}`, }; - }) - .get(); + }); return { title: map.get(type).title, diff --git a/lib/routes/zjut/da/index.ts b/lib/routes/zjut/da/index.ts index 4e6b3a978a22..4869dadcbca7 100644 --- a/lib/routes/zjut/da/index.ts +++ b/lib/routes/zjut/da/index.ts @@ -49,7 +49,8 @@ async function handler(ctx) { const $ = load(listResponse.data); const list = $("td[class='newstd'] .news2") - .map((index, item) => { + .toArray() + .map((item) => { item = $(item); const title = item.find('a').text(); @@ -69,8 +70,7 @@ async function handler(ctx) { pubDate: parseDate(date), link, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/zjut/news.ts b/lib/routes/zjut/news.ts index 982be671c3f0..8529172e8d68 100644 --- a/lib/routes/zjut/news.ts +++ b/lib/routes/zjut/news.ts @@ -41,7 +41,8 @@ async function handler(ctx) { const $ = load(listResponse.data); const list = $('#l-container .news_list > li.news') - .map((index, item) => { + .toArray() + .map((item) => { item = $(item); const title = item.find('a').text(); const link = item.find('a').attr('href'); @@ -54,8 +55,7 @@ async function handler(ctx) { pubDate: parseDate(date), link, }; - }) - .get(); + }); const items = await Promise.all( list.map((item) => { diff --git a/lib/routes/zotero/versions.ts b/lib/routes/zotero/versions.ts index 0966690133db..a291545bc5c0 100644 --- a/lib/routes/zotero/versions.ts +++ b/lib/routes/zotero/versions.ts @@ -36,22 +36,18 @@ async function handler() { return { title: 'Zotero - Version History', link: url, - item: - list && - list - .map((index, item) => { - item = $(item); - let date = $(item) - .text() - .match(/\((.*)\)/); - date = Array.isArray(date) ? date[1] : null; - return { - title: item.text().trim(), - description: $('
').append(item.nextUntil('h2').clone()).html(), - pubDate: date, - link: url + '#' + item.attr('id'), - }; - }) - .get(), + item: list.toArray().map((item) => { + item = $(item); + let date = $(item) + .text() + .match(/\((.*)\)/); + date = Array.isArray(date) ? date[1] : null; + return { + title: item.text().trim(), + description: $('
').append(item.nextUntil('h2').clone()).html(), + pubDate: date, + link: url + '#' + item.attr('id'), + }; + }), }; } diff --git a/lib/routes/zrblog/rss.ts b/lib/routes/zrblog/rss.ts index 6eb16f7a0ab7..4a16d77cd5d2 100644 --- a/lib/routes/zrblog/rss.ts +++ b/lib/routes/zrblog/rss.ts @@ -24,7 +24,8 @@ async function handler() { const $ = load(response.data); const list = $('div.art_img_box') - .map((i, e) => { + .toArray() + .map((e) => { const element = $(e); const title = element.find('h2 > a').attr('title'); const link = element.find('h2 > a').attr('href'); @@ -37,8 +38,7 @@ async function handler() { link, pubDate: parseDate(dateraw, '发布日期:YYYY年MM月DD日'), }; - }) - .get(); + }); return { title: '赵容部落', diff --git a/lib/utils/common-config.ts b/lib/utils/common-config.ts index 74d1b7c2bf3d..4dfe54d16e34 100644 --- a/lib/utils/common-config.ts +++ b/lib/utils/common-config.ts @@ -56,18 +56,16 @@ async function buildData(data) { title: getProp(data, 'title', $), description: getProp(data, 'description', $), allowEmpty: data.allowEmpty || false, - item: $item - .map((_, e) => { - const $elem = (selector) => $(e).find(selector); - return { - title: getProp(data, ['item', 'title'], $elem), - description: getProp(data, ['item', 'description'], $elem), - pubDate: getProp(data, ['item', 'pubDate'], $elem), - link: getProp(data, ['item', 'link'], $elem), - guid: getProp(data, ['item', 'guid'], $elem), - }; - }) - .get(), + item: $item.toArray().map((e) => { + const $elem = (selector) => $(e).find(selector); + return { + title: getProp(data, ['item', 'title'], $elem), + description: getProp(data, ['item', 'description'], $elem), + pubDate: getProp(data, ['item', 'pubDate'], $elem), + link: getProp(data, ['item', 'link'], $elem), + guid: getProp(data, ['item', 'guid'], $elem), + }; + }), }; } From 32e47fb284887805199a7ea6e827525826d1221f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 3 May 2025 21:26:51 +0000 Subject: [PATCH 0536/2658] style: auto format --- lib/routes/penguin-random-house/articles.ts | 6 +++--- lib/routes/penguin-random-house/thereaddown.ts | 6 +++--- lib/routes/pku/bbs/hot.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/routes/penguin-random-house/articles.ts b/lib/routes/penguin-random-house/articles.ts index 26c21b7568e3..05d58bf35b9a 100644 --- a/lib/routes/penguin-random-house/articles.ts +++ b/lib/routes/penguin-random-house/articles.ts @@ -35,9 +35,9 @@ async function handler(ctx) { const itemArray = $('.archive-module-half-container,.archive-module-third-container') .toArray() .map((element) => ({ - url: $(element).find('a').attr('href'), - title: $(element).find('.archive-module-text').first().text(), - })); + url: $(element).find('a').attr('href'), + title: $(element).find('.archive-module-text').first().text(), + })); const out = await utils.parseList(itemArray, ctx, utils.parseArticle); diff --git a/lib/routes/penguin-random-house/thereaddown.ts b/lib/routes/penguin-random-house/thereaddown.ts index d06761e93dc7..fed6056e2fa3 100644 --- a/lib/routes/penguin-random-house/thereaddown.ts +++ b/lib/routes/penguin-random-house/thereaddown.ts @@ -35,9 +35,9 @@ async function handler(ctx) { const itemArray = $('.archive-module-half-container,.archive-module-third-container') .toArray() .map((element) => ({ - url: $(element).find('a').attr('href'), - title: $(element).find('.archive-module-text').first().text(), - })); + url: $(element).find('a').attr('href'), + title: $(element).find('.archive-module-text').first().text(), + })); const out = await utils.parseList(itemArray, ctx, utils.parseBooks); diff --git a/lib/routes/pku/bbs/hot.ts b/lib/routes/pku/bbs/hot.ts index d0f57e9d8d88..c1f29e8e8441 100644 --- a/lib/routes/pku/bbs/hot.ts +++ b/lib/routes/pku/bbs/hot.ts @@ -44,9 +44,9 @@ async function handler() { const listItems = $('#list-content .list-item') .toArray() .map((element) => ({ - url: new URL($(element).find('> a.link').attr('href'), 'https://bbs.pku.edu.cn/v2/').href, - title: $(element).find('.title').text(), - })) + url: new URL($(element).find('> a.link').attr('href'), 'https://bbs.pku.edu.cn/v2/').href, + title: $(element).find('.title').text(), + })) .slice(0, 10); const item = await Promise.all( From 36629942350bb51e488c345a1f3851043c42b031 Mon Sep 17 00:00:00 2001 From: Urabartin <162798205+Urabartin@users.noreply.github.com> Date: Sun, 4 May 2025 18:45:31 +0800 Subject: [PATCH 0537/2658] fix(route/jpxgmn): get source url automatically (#19002) --- lib/routes/jpxgmn/search.ts | 4 ++-- lib/routes/jpxgmn/tab.ts | 6 +++--- lib/routes/jpxgmn/utils.ts | 12 ++++++++++-- lib/routes/jpxgmn/weekly.ts | 6 +++--- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/lib/routes/jpxgmn/search.ts b/lib/routes/jpxgmn/search.ts index e2e6a8f97001..605f8d9f88ca 100644 --- a/lib/routes/jpxgmn/search.ts +++ b/lib/routes/jpxgmn/search.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -import { originUrl, getArticleDesc } from './utils'; +import { getOriginUrl, getArticleDesc } from './utils'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; @@ -17,7 +17,7 @@ export const route: Route = { async function handler(ctx) { const { kw } = ctx.req.param(); - const searchUrl = originUrl + `/plus/search/index.asp?keyword=${kw}`; + const searchUrl = (await getOriginUrl()) + `/plus/search/index.asp?keyword=${kw}`; const response = await ofetch.raw(searchUrl); const baseUrl = new URL(response.url).origin; const $ = load(response._data); diff --git a/lib/routes/jpxgmn/tab.ts b/lib/routes/jpxgmn/tab.ts index a94b334cc401..1349c26c1cc3 100644 --- a/lib/routes/jpxgmn/tab.ts +++ b/lib/routes/jpxgmn/tab.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -import { originUrl, getArticleDesc } from './utils'; +import { getOriginUrl, getArticleDesc } from './utils'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; @@ -12,7 +12,7 @@ export const route: Route = { parameters: { tab: '分类,默认为`top`,包括`top`、`new`、`hot`,以及[源网站](http://www.jpxgmn.com/)所包含的其他相对路径,比如`Xiuren`、`XiaoYu`等' }, radar: [ { - source: ['www.12356782.xyz/:tab'], + source: ['mei5.vip/:tab'], target: '/:tab', }, ], @@ -24,7 +24,7 @@ export const route: Route = { async function handler(ctx) { const { tab = 'top' } = ctx.req.param(); const isSpecial = ['new', 'top', 'hot'].includes(tab); - const tabUrl = `${originUrl}/${tab}` + (isSpecial ? '.html' : '/'); + const tabUrl = `${await getOriginUrl()}/${tab}` + (isSpecial ? '.html' : '/'); const response = await ofetch.raw(tabUrl); const baseUrl = new URL(response.url).origin; const $ = load(response._data); diff --git a/lib/routes/jpxgmn/utils.ts b/lib/routes/jpxgmn/utils.ts index c72ceb35408a..79fde99648f5 100644 --- a/lib/routes/jpxgmn/utils.ts +++ b/lib/routes/jpxgmn/utils.ts @@ -1,10 +1,18 @@ import got from '@/utils/got'; import { art } from '@/utils/render'; import { load } from 'cheerio'; +import cache from '@/utils/cache'; import path from 'node:path'; -const originUrl = 'http://www.jpxgmn.com'; +const indexUrl = 'http://mei8.vip/'; +const getOriginUrl = async () => + await cache.tryGet('jpxgmn:originUrl', async () => { + const response = await got(indexUrl); + const $ = load(response.data); + const entries = $('ul > li > span'); + return 'http://' + $(entries[Math.floor(Math.random() * entries.length)]).text(); + }); const getImages = ($articleContent) => $articleContent('article > p img') .toArray() @@ -30,4 +38,4 @@ const getArticleDesc = async (articleUrl) => { }); }; -export { originUrl, getArticleDesc }; +export { getOriginUrl, getArticleDesc }; diff --git a/lib/routes/jpxgmn/weekly.ts b/lib/routes/jpxgmn/weekly.ts index 71708ae566ed..fcffc9b8c4e3 100644 --- a/lib/routes/jpxgmn/weekly.ts +++ b/lib/routes/jpxgmn/weekly.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -import { originUrl, getArticleDesc } from './utils'; +import { getOriginUrl, getArticleDesc } from './utils'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; @@ -11,7 +11,7 @@ export const route: Route = { example: '/jpxgmn/weekly', radar: [ { - source: ['www.12356782.xyz/'], + source: ['mei5.vip/'], target: '/weekly', }, ], @@ -21,7 +21,7 @@ export const route: Route = { }; async function handler() { - const response = await ofetch.raw(originUrl); + const response = await ofetch.raw(await getOriginUrl()); const baseUrl = new URL(response.url).origin; const $ = load(response._data); const items = $('aside div:nth-child(2) li') From c2a8b724fe13c1bd8e436f52560a28b0ea69218f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 09:34:08 +0000 Subject: [PATCH 0538/2658] chore(deps): bump zod from 3.24.3 to 3.24.4 (#19016) Bumps [zod](https://github.com/colinhacks/zod) from 3.24.3 to 3.24.4. - [Release notes](https://github.com/colinhacks/zod/releases) - [Changelog](https://github.com/colinhacks/zod/blob/main/CHANGELOG.md) - [Commits](https://github.com/colinhacks/zod/compare/v3.24.3...v3.24.4) --- updated-dependencies: - dependency-name: zod dependency-version: 3.24.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index d8ef06f359bb..848126df1b1b 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ "uuid": "11.1.0", "winston": "3.17.0", "xxhash-wasm": "1.1.0", - "zod": "3.24.3" + "zod": "3.24.4" }, "devDependencies": { "@babel/preset-env": "7.27.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 09b9af1e3080..5f20df663185 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,7 +33,7 @@ importers: version: 1.14.1(hono@4.7.8) '@hono/zod-openapi': specifier: 0.19.6 - version: 0.19.6(hono@4.7.8)(zod@3.24.3) + version: 0.19.6(hono@4.7.8)(zod@3.24.4) '@notionhq/client': specifier: 2.3.0 version: 2.3.0 @@ -281,8 +281,8 @@ importers: specifier: 1.1.0 version: 1.1.0 zod: - specifier: 3.24.3 - version: 3.24.3 + specifier: 3.24.4 + version: 3.24.4 devDependencies: '@babel/preset-env': specifier: 7.27.1 @@ -6470,8 +6470,8 @@ packages: zod@3.24.1: resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==} - zod@3.24.3: - resolution: {integrity: sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==} + zod@3.24.4: + resolution: {integrity: sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==} snapshots: @@ -6488,10 +6488,10 @@ snapshots: '@csstools/css-tokenizer': 3.0.3 lru-cache: 10.4.3 - '@asteasolutions/zod-to-openapi@7.3.0(zod@3.24.3)': + '@asteasolutions/zod-to-openapi@7.3.0(zod@3.24.4)': dependencies: openapi3-ts: 4.4.0 - zod: 3.24.3 + zod: 3.24.4 '@babel/code-frame@7.0.0': dependencies: @@ -7515,17 +7515,17 @@ snapshots: dependencies: hono: 4.7.8 - '@hono/zod-openapi@0.19.6(hono@4.7.8)(zod@3.24.3)': + '@hono/zod-openapi@0.19.6(hono@4.7.8)(zod@3.24.4)': dependencies: - '@asteasolutions/zod-to-openapi': 7.3.0(zod@3.24.3) - '@hono/zod-validator': 0.5.0(hono@4.7.8)(zod@3.24.3) + '@asteasolutions/zod-to-openapi': 7.3.0(zod@3.24.4) + '@hono/zod-validator': 0.5.0(hono@4.7.8)(zod@3.24.4) hono: 4.7.8 - zod: 3.24.3 + zod: 3.24.4 - '@hono/zod-validator@0.5.0(hono@4.7.8)(zod@3.24.3)': + '@hono/zod-validator@0.5.0(hono@4.7.8)(zod@3.24.4)': dependencies: hono: 4.7.8 - zod: 3.24.3 + zod: 3.24.4 '@humanfs/core@0.19.1': {} @@ -8354,7 +8354,7 @@ snapshots: '@scalar/openapi-types@0.2.1': dependencies: - zod: 3.24.3 + zod: 3.24.4 '@scalar/types@0.1.13': dependencies: @@ -12994,4 +12994,4 @@ snapshots: zod@3.24.1: {} - zod@3.24.3: {} + zod@3.24.4: {} From 0a66cdda321acd2ad2a10dd671385acf60b43557 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 09:35:12 +0000 Subject: [PATCH 0539/2658] chore(deps): bump tldts from 7.0.5 to 7.0.6 (#19018) Bumps [tldts](https://github.com/remusao/tldts) from 7.0.5 to 7.0.6. - [Release notes](https://github.com/remusao/tldts/releases) - [Changelog](https://github.com/remusao/tldts/blob/master/CHANGELOG.md) - [Commits](https://github.com/remusao/tldts/compare/v7.0.5...v7.0.6) --- updated-dependencies: - dependency-name: tldts dependency-version: 7.0.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 848126df1b1b..33b019ab1f85 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "source-map": "0.7.4", "telegram": "2.26.22", "title": "4.0.1", - "tldts": "7.0.5", + "tldts": "7.0.6", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.1.2", "tsx": "4.19.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f20df663185..6b0e72589af3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -251,8 +251,8 @@ importers: specifier: 4.0.1 version: 4.0.1 tldts: - specifier: 7.0.5 - version: 7.0.5 + specifier: 7.0.6 + version: 7.0.6 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5900,15 +5900,15 @@ packages: tldts-core@6.1.86: resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} - tldts-core@7.0.5: - resolution: {integrity: sha512-o+2zicH2+bzj5PHV5M4U8OsRBJDOO0zADiTKZQTGdHSymGQYS21+V/YNrMxAxH9SopzMEXt5JuiRoOIZT5ZU9g==} + tldts-core@7.0.6: + resolution: {integrity: sha512-HZeeJrplG9y+sJx6VNcMKfbpY9UEq+JI0JRqE66Dm81QmclDgygaKOIwkeX8atmiQraJV2w4JbYI3wfCbw319w==} tldts@6.1.86: resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} hasBin: true - tldts@7.0.5: - resolution: {integrity: sha512-Wjn3ZQIBZd3i94Gcw1hTD+BLgrkfeU71PDw7y7QxcUDCfhM5HdlZfNDbSerP4pj+ZbujKvRrlOYNRyRmQCHo0A==} + tldts@7.0.6: + resolution: {integrity: sha512-LjGkyvtJee7JuRQyjTojg+UKuUppWgdzNsDVtiR8HGnbsjemamHBM+u/AkM7gYtJAg2Ilwk3zJJ8CQtf5sP+8A==} hasBin: true tmp@0.0.33: @@ -12463,15 +12463,15 @@ snapshots: tldts-core@6.1.86: {} - tldts-core@7.0.5: {} + tldts-core@7.0.6: {} tldts@6.1.86: dependencies: tldts-core: 6.1.86 - tldts@7.0.5: + tldts@7.0.6: dependencies: - tldts-core: 7.0.5 + tldts-core: 7.0.6 tmp@0.0.33: dependencies: From fdfa3a1061cd1d502bfe8a0e172ac0fa3a03f31f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 09:37:38 +0000 Subject: [PATCH 0540/2658] chore(deps): bump query-string from 9.1.1 to 9.1.2 (#19019) Bumps [query-string](https://github.com/sindresorhus/query-string) from 9.1.1 to 9.1.2. - [Release notes](https://github.com/sindresorhus/query-string/releases) - [Commits](https://github.com/sindresorhus/query-string/compare/v9.1.1...v9.1.2) --- updated-dependencies: - dependency-name: query-string dependency-version: 9.1.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 33b019ab1f85..28c4dae4ef13 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "puppeteer-extra-plugin-stealth": "2.11.2", "puppeteer-extra-plugin-user-data-dir": "2.4.1", "puppeteer-extra-plugin-user-preferences": "2.4.1", - "query-string": "9.1.1", + "query-string": "9.1.2", "rate-limiter-flexible": "7.1.0", "re2js": "1.1.0", "rfc4648": "1.5.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b0e72589af3..63897a54022a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -218,8 +218,8 @@ importers: specifier: 2.4.1 version: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10))) query-string: - specifier: 9.1.1 - version: 9.1.1 + specifier: 9.1.2 + version: 9.1.2 rate-limiter-flexible: specifier: 7.1.0 version: 7.1.0 @@ -5363,8 +5363,8 @@ packages: resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==} engines: {node: '>=6'} - query-string@9.1.1: - resolution: {integrity: sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==} + query-string@9.1.2: + resolution: {integrity: sha512-s3UlTyjxRux4KjwWaJsjh1Mp8zoCkSGKirbD9H89pEM9UOZsfpRZpdfzvsy2/mGlLfC3NnYVpy2gk7jXITHEtA==} engines: {node: '>=18'} querystringify@2.2.0: @@ -11871,7 +11871,7 @@ snapshots: split-on-first: 1.1.0 strict-uri-encode: 2.0.0 - query-string@9.1.1: + query-string@9.1.2: dependencies: decode-uri-component: 0.4.1 filter-obj: 5.1.0 From 1ad96c6be282e75a00ff2ce1e36646ddb94ee751 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 09:39:16 +0000 Subject: [PATCH 0541/2658] chore(deps): bump @scalar/hono-api-reference from 0.8.7 to 0.8.8 (#19014) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/integrations/hono) from 0.8.7 to 0.8.8. - [Changelog](https://github.com/scalar/scalar/blob/main/integrations/hono/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/integrations/hono) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-version: 0.8.8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 57 ++++++++++++++++---------------------------------- 2 files changed, 19 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index 28c4dae4ef13..aa7534eb930d 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.32.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.25", - "@scalar/hono-api-reference": "0.8.7", + "@scalar/hono-api-reference": "0.8.8", "@sentry/node": "9.15.0", "@tonyrl/rand-user-agent": "2.0.83", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 63897a54022a..253c25b832a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -65,8 +65,8 @@ importers: specifier: 0.0.25 version: 0.0.25 '@scalar/hono-api-reference': - specifier: 0.8.7 - version: 0.8.7(hono@4.7.8) + specifier: 0.8.8 + version: 0.8.8(hono@4.7.8) '@sentry/node': specifier: 9.15.0 version: 9.15.0 @@ -2272,22 +2272,22 @@ packages: '@rss3/sdk@0.0.25': resolution: {integrity: sha512-jyXT4YTwefxxRZ0tt5xjbnw8e7zPg2OGdo/0xb+h/7qWnMNhLtWpc95DsYs/1C/I0rIyiDpZBhLI2DieQ9y+tw==} - '@scalar/core@0.2.13': - resolution: {integrity: sha512-d0MjF9hUh1rmK3nS1RkpVYLPO5oCl0pfS2mI6uzXmk7uspu2AE9YATbQ9j7SShM0UTOThKTtkYT8N2DJB3vE6g==} + '@scalar/core@0.2.14': + resolution: {integrity: sha512-w2oLqUVJt88ed2uHKFgg8UOFeyHDpi3QmSJqqc4CZPjAz/lKj34antHYMEG3A4Iom+06W31XQeqFO9zQ2eNsfA==} engines: {node: '>=18'} - '@scalar/hono-api-reference@0.8.7': - resolution: {integrity: sha512-ZKCzb2nylucwI+/YCL402pMAdq4JEoux4on72aD9rRxTuEsP3R3lVSTNt1rJMCpiXXZXyLk/caMVzvFreCsLgw==} + '@scalar/hono-api-reference@0.8.8': + resolution: {integrity: sha512-VLpgkUOcKg4SSnWwp6/hGF5gNypeL+e791HD4ANmxImU8k+VbsKh53W7ZOivRY1fIMkPcd0TvzQvKm2MqyJDJw==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 - '@scalar/openapi-types@0.2.1': - resolution: {integrity: sha512-UMxX54taQXnEWYEuesbH+pkjlXRVV1u/Wx6YbVeU3QoJdFGqT3Z7si9zsokoG6MXDcdi1LGny7A0KwownmPvUQ==} + '@scalar/openapi-types@0.2.2': + resolution: {integrity: sha512-fwWboUf3W5U4qWU7nj4jrs+KYilnfKyVp0d6LC1ejB2aROgWXIAscRtVaPLPaNLpTZOBsMC8XpiAPm3/SlU+mA==} engines: {node: '>=18'} - '@scalar/types@0.1.13': - resolution: {integrity: sha512-9PgGX4TSNWUcfuGwE4kHvKypc5VhLS450C0V9IuhIIVLrLsyiz8ZA3X/lxQEPoB1zlFbUBmceLD6Xh9c41P7oQ==} + '@scalar/types@0.1.14': + resolution: {integrity: sha512-N7qZ9qARJfi4Gl5MEsRfwPHFWs68qDXWQ+jGi05LGExDqErAJStc4PPkEmxt44uSO4+TVx4ADxWB6xNoGMG/Zg==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -2580,9 +2580,6 @@ packages: '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} - '@unhead/schema@1.11.20': - resolution: {integrity: sha512-0zWykKAaJdm+/Y7yi/Yds20PrUK7XabLe9c3IRcjnwYmSWY6z0Cr19VIs3ozCj8P+GhR+/TI2mwtGlueCEYouA==} - '@valibot/to-json-schema@1.0.0': resolution: {integrity: sha512-/9crJgPptVsGCL6X+JPDQyaJwkalSZ/52WuF8DiRUxJgcmpNdzYRfZ+gqMEP8W3CTVfuMWPqqvIgfwJ97f9Etw==} peerDependencies: @@ -6049,10 +6046,6 @@ packages: resolution: {integrity: sha512-2dBz5D5ycHIoliLYLi0Q2V7KRaDlH0uWIvmk7TYlAg5slqwiPv1ezJdZm1QEM0xgk29oYWMCbIG7E6gHpvChlg==} engines: {node: '>=16'} - type-fest@4.40.1: - resolution: {integrity: sha512-9YvLNnORDpI+vghLU/Nf+zSv0kL47KbVJ1o3sKgoTefl6i+zebxbiDQWoe/oWWqPhIgQdRZRT1KA9sCPL810SA==} - engines: {node: '>=16'} - type@2.7.3: resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} @@ -6461,9 +6454,6 @@ packages: resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} engines: {node: '>=18'} - zhead@2.2.4: - resolution: {integrity: sha512-8F0OI5dpWIA5IGG5NHUg9staDwz/ZPxZtvGVf01j7vHqSyZ0raHY+78atOVxRqb73AotX22uV1pXt3gYSstGag==} - zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} @@ -8343,25 +8333,23 @@ snapshots: '@rss3/api-core': 0.0.25 '@rss3/api-utils': 0.0.25 - '@scalar/core@0.2.13': + '@scalar/core@0.2.14': dependencies: - '@scalar/types': 0.1.13 + '@scalar/types': 0.1.14 - '@scalar/hono-api-reference@0.8.7(hono@4.7.8)': + '@scalar/hono-api-reference@0.8.8(hono@4.7.8)': dependencies: - '@scalar/core': 0.2.13 + '@scalar/core': 0.2.14 hono: 4.7.8 - '@scalar/openapi-types@0.2.1': + '@scalar/openapi-types@0.2.2': dependencies: - zod: 3.24.4 + zod: 3.24.1 - '@scalar/types@0.1.13': + '@scalar/types@0.1.14': dependencies: - '@scalar/openapi-types': 0.2.1 - '@unhead/schema': 1.11.20 + '@scalar/openapi-types': 0.2.2 nanoid: 5.1.5 - type-fest: 4.40.1 zod: 3.24.1 '@sec-ant/readable-stream@0.4.1': {} @@ -8741,11 +8729,6 @@ snapshots: '@ungap/structured-clone@1.3.0': {} - '@unhead/schema@1.11.20': - dependencies: - hookable: 5.5.3 - zhead: 2.2.4 - '@valibot/to-json-schema@1.0.0(valibot@1.0.0(typescript@5.8.3))': dependencies: valibot: 1.0.0(typescript@5.8.3) @@ -12596,8 +12579,6 @@ snapshots: type-fest@4.38.0: {} - type-fest@4.40.1: {} - type@2.7.3: {} typedarray-to-buffer@3.1.5: @@ -12988,8 +12969,6 @@ snapshots: yoctocolors-cjs@2.1.2: {} - zhead@2.2.4: {} - zod@3.22.4: {} zod@3.24.1: {} From 83635bc736b922ac200089a978bc2582dc945a5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 19:24:43 +0800 Subject: [PATCH 0542/2658] chore(deps-dev): bump the eslint group with 2 updates (#19012) --- package.json | 4 +- pnpm-lock.yaml | 565 ++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 487 insertions(+), 82 deletions(-) diff --git a/package.json b/package.json index aa7534eb930d..88d6d8dbf4ea 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "@babel/preset-typescript": "7.27.1", "@bbob/types": "4.2.0", "@eslint/eslintrc": "3.3.1", - "@eslint/js": "9.25.1", + "@eslint/js": "9.26.0", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "4.2.0", "@types/aes-js": "3.1.4", @@ -172,7 +172,7 @@ "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.38.2", - "eslint": "9.25.1", + "eslint": "9.26.0", "eslint-config-prettier": "10.1.2", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.17.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 253c25b832a5..d333ef49fdbb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -297,14 +297,14 @@ importers: specifier: 3.3.1 version: 3.3.1 '@eslint/js': - specifier: 9.25.1 - version: 9.25.1 + specifier: 9.26.0 + version: 9.26.0 '@microsoft/eslint-formatter-sarif': specifier: 3.1.0 version: 3.1.0 '@stylistic/eslint-plugin': specifier: 4.2.0 - version: 4.2.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + version: 4.2.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -370,10 +370,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.31.1 - version: 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + version: 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/parser': specifier: 8.31.1 - version: 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + version: 8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -384,26 +384,26 @@ importers: specifier: 0.38.2 version: 0.38.2 eslint: - specifier: 9.25.1 - version: 9.25.1(jiti@2.4.2) + specifier: 9.26.0 + version: 9.26.0(jiti@2.4.2) eslint-config-prettier: specifier: 10.1.2 - version: 10.1.2(eslint@9.25.1(jiti@2.4.2)) + version: 10.1.2(eslint@9.26.0(jiti@2.4.2)) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(patch_hash=w5z6jxwjps4t4gxnmmngw67gmm)(eslint@9.25.1(jiti@2.4.2)) + version: 8.1.0(patch_hash=w5z6jxwjps4t4gxnmmngw67gmm)(eslint@9.26.0(jiti@2.4.2)) eslint-plugin-n: specifier: 17.17.0 - version: 17.17.0(eslint@9.25.1(jiti@2.4.2)) + version: 17.17.0(eslint@9.26.0(jiti@2.4.2)) eslint-plugin-prettier: specifier: 5.2.6 - version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(prettier@3.5.3) + version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3) eslint-plugin-unicorn: specifier: 59.0.0 - version: 59.0.0(eslint@9.25.1(jiti@2.4.2)) + version: 59.0.0(eslint@9.26.0(jiti@2.4.2)) eslint-plugin-yml: specifier: 1.18.0 - version: 1.18.0(eslint@9.25.1(jiti@2.4.2)) + version: 1.18.0(eslint@9.26.0(jiti@2.4.2)) fs-extra: specifier: 11.3.0 version: 11.3.0 @@ -1397,6 +1397,12 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + '@eslint-community/eslint-utils@4.7.0': + resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + '@eslint-community/regexpp@4.12.1': resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -1405,8 +1411,8 @@ packages: resolution: {integrity: sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/config-helpers@0.2.1': - resolution: {integrity: sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==} + '@eslint/config-helpers@0.2.2': + resolution: {integrity: sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/core@0.13.0': @@ -1425,8 +1431,8 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.25.1': - resolution: {integrity: sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==} + '@eslint/js@9.26.0': + resolution: {integrity: sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.6': @@ -1569,6 +1575,10 @@ packages: '@mixmark-io/domino@2.2.0': resolution: {integrity: sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw==} + '@modelcontextprotocol/sdk@1.11.0': + resolution: {integrity: sha512-k/1pb70eD638anoi0e8wUGAlbMJXyvdV4p62Ko+EZ7eBe1xMx8Uhak1R5DgfoofsK5IBBnRwsYGTaLZl+6/+RQ==} + engines: {node: '>=18'} + '@mswjs/interceptors@0.29.1': resolution: {integrity: sha512-3rDakgJZ77+RiQUuSK69t1F0m8BQKA8Vh5DCS5V0DWvNY67zob2JhhQrhCO0AKLGINTRSFd1tBaHcJTkhefoSw==} engines: {node: '>=18'} @@ -2636,6 +2646,10 @@ packages: resolution: {integrity: sha512-+/kfrslGQ7TNV2ecmQwMJj/B65g5KVq1/L3SGVZ3tCYGqlzFuFCGBZJtMP99wH3NpEUyAjn0zPdPUg0D+DwrOA==} engines: {node: ^18.17.0 || >=20.5.0} + accepts@2.0.0: + resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} + engines: {node: '>= 0.6'} + acorn-import-attributes@1.9.5: resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} peerDependencies: @@ -2844,6 +2858,10 @@ packages: bluebird@3.7.2: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} + body-parser@2.2.0: + resolution: {integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==} + engines: {node: '>=18'} + boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} @@ -2882,6 +2900,10 @@ packages: resolution: {integrity: sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==} engines: {node: '>=18.20'} + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -3102,9 +3124,21 @@ packages: resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} engines: {node: ^14.18.0 || >=16.10.0} + content-disposition@1.0.0: + resolution: {integrity: sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==} + engines: {node: '>= 0.6'} + + content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + cookie-signature@1.2.2: + resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} + engines: {node: '>=6.6.0'} + cookie@0.7.2: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} @@ -3125,6 +3159,10 @@ packages: core-util-is@1.0.2: resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} + cors@2.8.5: + resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} + engines: {node: '>= 0.10'} + cosmiconfig@9.0.0: resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} engines: {node: '>=14'} @@ -3277,6 +3315,10 @@ packages: resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} engines: {node: '>=0.10'} + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -3384,6 +3426,9 @@ packages: engines: {node: '>=14'} hasBin: true + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + electron-to-chromium@1.5.148: resolution: {integrity: sha512-8uc1QXwwqayD4mblcsQYZqoi+cOc97A2XmKSBOIRbEAvbp6vrqmSYs4dHD2qVygUgn7Mi0qdKgPaJ9WC8cv63A==} @@ -3406,6 +3451,10 @@ packages: enabled@2.0.0: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} + encodeurl@2.0.0: + resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} + engines: {node: '>= 0.8'} + encoding-japanese@2.2.0: resolution: {integrity: sha512-EuJWwlHPZ1LbADuKTClvHtwbaFn4rOD+dRAbWysqEOXRc2Uui0hJInNJrsdH0c+OhJA4nrCBdSkW4DD5YxAo6A==} engines: {node: '>=8.10.0'} @@ -3473,6 +3522,9 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -3590,8 +3642,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.25.1: - resolution: {integrity: sha512-E6Mtz9oGQWDCpV12319d59n4tx9zOTXSTmc8BLVxBx+G/0RdM5MvEEJLU9c0+aleoePYYgVTOsRblx433qmhWQ==} + eslint@9.26.0: + resolution: {integrity: sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -3653,6 +3705,14 @@ packages: eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + eventsource-parser@3.0.1: + resolution: {integrity: sha512-VARTJ9CYeuQYb0pZEPbzi740OWFgpHe7AYJ2WFZVnUDUQp5Dk2yJUgF36YsZ81cOyxT0QxmXD2EQpapAouzWVA==} + engines: {node: '>=18.0.0'} + + eventsource@3.0.6: + resolution: {integrity: sha512-l19WpE2m9hSuyP06+FbuUUf1G+R0SFLrtQfbRb9PRr+oimOfxQhgGCbVaXg5IvZyyTThJsxh6L/srkMiCeBPDA==} + engines: {node: '>=18.0.0'} + execa@8.0.1: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} @@ -3661,6 +3721,16 @@ packages: resolution: {integrity: sha512-80F22aiJ3GLyVnS/B3HzgR6RelZVumzj9jkL0Rhz4h0xYbNW9PjlQz5h3J/SShErbXBc295vseR4/MIbVmUbeA==} engines: {node: '>=12.0.0'} + express-rate-limit@7.5.0: + resolution: {integrity: sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==} + engines: {node: '>= 16'} + peerDependencies: + express: ^4.11 || 5 || ^5.0.0-beta.1 + + express@5.1.0: + resolution: {integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==} + engines: {node: '>= 18'} + ext@1.7.0: resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} @@ -3754,6 +3824,10 @@ packages: resolution: {integrity: sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==} engines: {node: '>=14.16'} + finalhandler@2.1.0: + resolution: {integrity: sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==} + engines: {node: '>= 0.8'} + find-up-simple@1.0.1: resolution: {integrity: sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==} engines: {node: '>=18'} @@ -3821,6 +3895,14 @@ packages: forwarded-parse@2.1.2: resolution: {integrity: sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==} + forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + fs-extra@10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} @@ -4046,6 +4128,10 @@ packages: undici: optional: true + http-errors@2.0.0: + resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + engines: {node: '>= 0.8'} + http-proxy-agent@7.0.2: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} @@ -4156,6 +4242,10 @@ packages: resolution: {integrity: sha512-fOCG6lhoKKakwv+C6KdsOnGvgXnmgfmp0myi3bcNwj3qfwPAxRKWEuFhvEFF7ceYIz6+1jRZ+yguLFAmUNPEfw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -4242,6 +4332,9 @@ packages: is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -4677,10 +4770,18 @@ packages: mdurl@2.0.0: resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + media-typer@1.1.0: + resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} + engines: {node: '>= 0.8'} + merge-deep@3.0.3: resolution: {integrity: sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==} engines: {node: '>=0.10.0'} + merge-descriptors@2.0.0: + resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} + engines: {node: '>=18'} + merge-source-map@1.1.0: resolution: {integrity: sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==} @@ -4766,10 +4867,18 @@ packages: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} + mime-types@2.1.35: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} + mime-types@3.0.1: + resolution: {integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==} + engines: {node: '>= 0.6'} + mime@2.6.0: resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} engines: {node: '>=4.0.0'} @@ -4893,6 +5002,10 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + negotiator@1.0.0: + resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} + engines: {node: '>= 0.6'} + netmask@2.0.2: resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} engines: {node: '>= 0.4.0'} @@ -4976,6 +5089,10 @@ packages: oauth-sign@0.9.0: resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==} + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + ofetch@1.4.1: resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} @@ -4983,6 +5100,10 @@ packages: resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} engines: {node: '>=14.0.0'} + on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -5103,6 +5224,10 @@ packages: parseley@0.12.1: resolution: {integrity: sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==} + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} @@ -5132,6 +5257,10 @@ packages: path-to-regexp@6.3.0: resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + path-to-regexp@8.2.0: + resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==} + engines: {node: '>=16'} + pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -5188,6 +5317,10 @@ packages: resolution: {integrity: sha512-i85pKRCt4qMjZ1+L7sy2Ag4t1atFcdbEt76+7iRJn1g2BvsnRMGu9p8pivl9fs63M2kF/A0OacFZhTub+m/qMg==} hasBin: true + pkce-challenge@5.0.0: + resolution: {integrity: sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==} + engines: {node: '>=16.20.0'} + pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} @@ -5247,6 +5380,10 @@ packages: resolution: {integrity: sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==} engines: {node: '>=12.0.0'} + proxy-addr@2.0.7: + resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + engines: {node: '>= 0.10'} + proxy-agent@6.4.0: resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==} engines: {node: '>= 14'} @@ -5377,9 +5514,17 @@ packages: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} + range-parser@1.2.1: + resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} + engines: {node: '>= 0.6'} + rate-limiter-flexible@7.1.0: resolution: {integrity: sha512-qXYzKWzlTOf7/BNjz1Jj03AgtTHoJZZAiiJ3hjLf8sqeG+EWZLeQ3xYtMPlMZLonlq+OyJUueHyK/H+q2Zc7Qw==} + raw-body@3.0.0: + resolution: {integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==} + engines: {node: '>= 0.8'} + re2js@1.1.0: resolution: {integrity: sha512-ovDCIb2ZQR7Do3NzH2XEuXOzqd1q8srvkeaOVMf+EZNt1Z4JoUVvNKCR9qf8EbqoPhvLknkoyiiBzoQtmuzIbQ==} @@ -5548,6 +5693,10 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + router@2.2.0: + resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} + engines: {node: '>= 18'} + rrweb-cssom@0.8.0: resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} @@ -5599,6 +5748,17 @@ packages: engines: {node: '>=10'} hasBin: true + send@1.2.0: + resolution: {integrity: sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==} + engines: {node: '>= 18'} + + serve-static@2.2.0: + resolution: {integrity: sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==} + engines: {node: '>= 18'} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + shallow-clone@0.1.2: resolution: {integrity: sha512-J1zdXCky5GmNnuauESROVu31MQSnLoYvlyEn6j2Ztk6Q5EHFIhxkMhYcv6vuDzl2XEzoRr856QwzMgWM/TmZgw==} engines: {node: '>=0.10.0'} @@ -5925,6 +6085,10 @@ packages: to-space-case@1.0.0: resolution: {integrity: sha512-rLdvwXZ39VOn1IxGL3V6ZstoTbwLRckQmn/U8ZDLuWwIXNpuZDhQ3AiRUlhTbOXFVE9C+dR51wM0CBDhk31VcA==} + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + tosource@2.0.0-alpha.3: resolution: {integrity: sha512-KAB2lrSS48y91MzFPFuDg4hLbvDiyTjOVgaK7Erw+5AmZXNq4sFRVn8r6yxSLuNs15PaokrDRpS61ERY9uZOug==} engines: {node: '>=10'} @@ -6046,6 +6210,10 @@ packages: resolution: {integrity: sha512-2dBz5D5ycHIoliLYLi0Q2V7KRaDlH0uWIvmk7TYlAg5slqwiPv1ezJdZm1QEM0xgk29oYWMCbIG7E6gHpvChlg==} engines: {node: '>=16'} + type-is@2.0.1: + resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} + engines: {node: '>= 0.6'} + type@2.7.3: resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} @@ -6111,6 +6279,10 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + unplugin-lightningcss@0.3.3: resolution: {integrity: sha512-mMNRCNIcxc/3410w7sJdXcPxn0IGZdEpq42OBDyckdGkhOeWYZCG9RkHs72TFyBsS82a4agFDOFU8VrFKF2ZvA==} engines: {node: '>=18.12.0'} @@ -6191,6 +6363,10 @@ packages: valid-url@1.0.9: resolution: {integrity: sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA==} + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + verror@1.10.0: resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} engines: {'0': node >=0.6.0} @@ -6454,6 +6630,11 @@ packages: resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} engines: {node: '>=18'} + zod-to-json-schema@3.24.5: + resolution: {integrity: sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==} + peerDependencies: + zod: ^3.24.1 + zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} @@ -7431,19 +7612,24 @@ snapshots: '@esbuild/win32-x64@0.25.3': optional: true - '@eslint-community/eslint-utils@4.5.1(eslint@9.25.1(jiti@2.4.2))': + '@eslint-community/eslint-utils@4.5.1(eslint@9.26.0(jiti@2.4.2))': + dependencies: + eslint: 9.26.0(jiti@2.4.2) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/eslint-utils@4.6.1(eslint@9.26.0(jiti@2.4.2))': dependencies: - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.6.1(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.7.0(eslint@8.57.1)': dependencies: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.6.1(eslint@9.25.1(jiti@2.4.2))': + '@eslint-community/eslint-utils@4.7.0(eslint@9.26.0(jiti@2.4.2))': dependencies: - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -7456,7 +7642,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.2.1': {} + '@eslint/config-helpers@0.2.2': {} '@eslint/core@0.13.0': dependencies: @@ -7492,7 +7678,7 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.25.1': {} + '@eslint/js@9.26.0': {} '@eslint/object-schema@2.1.6': {} @@ -7643,6 +7829,21 @@ snapshots: '@mixmark-io/domino@2.2.0': {} + '@modelcontextprotocol/sdk@1.11.0': + dependencies: + content-type: 1.0.5 + cors: 2.8.5 + cross-spawn: 7.0.6 + eventsource: 3.0.6 + express: 5.1.0 + express-rate-limit: 7.5.0(express@5.1.0) + pkce-challenge: 5.0.0 + raw-body: 3.0.0 + zod: 3.24.4 + zod-to-json-schema: 3.24.5(zod@3.24.4) + transitivePeerDependencies: + - supports-color + '@mswjs/interceptors@0.29.1': dependencies: '@open-draft/deferred-promise': 2.2.0 @@ -8414,10 +8615,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@4.2.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@stylistic/eslint-plugin@4.2.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/utils': 8.28.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) - eslint: 9.25.1(jiti@2.4.2) + '@typescript-eslint/utils': 8.28.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) + eslint: 9.26.0(jiti@2.4.2) eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -8613,15 +8814,15 @@ snapshots: '@types/node': 22.15.3 optional: true - '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/parser': 8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/scope-manager': 8.31.1 - '@typescript-eslint/type-utils': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/utils': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/type-utils': 8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.31.1 - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -8630,14 +8831,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/parser@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@typescript-eslint/scope-manager': 8.31.1 '@typescript-eslint/types': 8.31.1 '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.4.0 - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -8652,12 +8853,12 @@ snapshots: '@typescript-eslint/types': 8.31.1 '@typescript-eslint/visitor-keys': 8.31.1 - '@typescript-eslint/type-utils@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) - '@typescript-eslint/utils': 8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) debug: 4.4.0 - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: @@ -8695,24 +8896,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.28.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/utils@8.28.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0(jiti@2.4.2)) '@typescript-eslint/scope-manager': 8.28.0 '@typescript-eslint/types': 8.28.0 '@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.3) - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.31.1(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/utils@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0(jiti@2.4.2)) '@typescript-eslint/scope-manager': 8.31.1 '@typescript-eslint/types': 8.31.1 '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -8815,6 +9016,11 @@ snapshots: abbrev@3.0.0: {} + accepts@2.0.0: + dependencies: + mime-types: 3.0.1 + negotiator: 1.0.0 + acorn-import-attributes@1.9.5(acorn@8.14.1): dependencies: acorn: 8.14.1 @@ -9003,6 +9209,20 @@ snapshots: bluebird@3.7.2: {} + body-parser@2.2.0: + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 4.4.0 + http-errors: 2.0.0 + iconv-lite: 0.6.3 + on-finished: 2.4.1 + qs: 6.14.0 + raw-body: 3.0.0 + type-is: 2.0.1 + transitivePeerDependencies: + - supports-color + boolbase@1.0.0: {} brace-expansion@1.1.11: @@ -9045,6 +9265,8 @@ snapshots: builtin-modules@5.0.0: {} + bytes@3.1.2: {} + cac@6.7.14: {} cacheable-lookup@7.0.0: {} @@ -9298,8 +9520,16 @@ snapshots: consola@3.4.2: {} + content-disposition@1.0.0: + dependencies: + safe-buffer: '@nolyfill/safe-buffer@1.0.44' + + content-type@1.0.5: {} + convert-source-map@2.0.0: {} + cookie-signature@1.2.2: {} + cookie@0.7.2: {} cookiejar@2.1.4: {} @@ -9316,6 +9546,11 @@ snapshots: core-util-is@1.0.2: {} + cors@2.8.5: + dependencies: + object-assign: 4.1.1 + vary: 1.1.2 + cosmiconfig@9.0.0(typescript@5.8.3): dependencies: env-paths: 2.2.1 @@ -9442,6 +9677,8 @@ snapshots: denque@2.1.0: {} + depd@2.0.0: {} + dequal@2.0.3: {} destr@2.0.5: {} @@ -9557,6 +9794,8 @@ snapshots: minimatch: 9.0.1 semver: 7.7.1 + ee-first@1.1.1: {} + electron-to-chromium@1.5.148: {} ellipsize@0.1.0: {} @@ -9571,6 +9810,8 @@ snapshots: enabled@2.0.0: {} + encodeurl@2.0.0: {} + encoding-japanese@2.2.0: {} encoding-sniffer@0.2.0: @@ -9679,6 +9920,8 @@ snapshots: escalade@3.2.0: {} + escape-html@1.0.3: {} + escape-string-regexp@1.0.5: {} escape-string-regexp@4.0.0: {} @@ -9700,23 +9943,23 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.25.1(jiti@2.4.2)): + eslint-compat-utils@0.5.1(eslint@9.26.0(jiti@2.4.2)): dependencies: - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) semver: 7.7.1 - eslint-compat-utils@0.6.5(eslint@9.25.1(jiti@2.4.2)): + eslint-compat-utils@0.6.5(eslint@9.26.0(jiti@2.4.2)): dependencies: - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) semver: 7.7.1 - eslint-config-prettier@10.1.2(eslint@9.25.1(jiti@2.4.2)): + eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)): dependencies: - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) - eslint-filtered-fix@0.3.0(eslint@9.25.1(jiti@2.4.2)): + eslint-filtered-fix@0.3.0(eslint@9.26.0(jiti@2.4.2)): dependencies: - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -9727,55 +9970,55 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(patch_hash=w5z6jxwjps4t4gxnmmngw67gmm)(eslint@9.25.1(jiti@2.4.2)): + eslint-nibble@8.1.0(patch_hash=w5z6jxwjps4t4gxnmmngw67gmm)(eslint@9.26.0(jiti@2.4.2)): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.25.1(jiti@2.4.2) - eslint-filtered-fix: 0.3.0(eslint@9.25.1(jiti@2.4.2)) + eslint: 9.26.0(jiti@2.4.2) + eslint-filtered-fix: 0.3.0(eslint@9.26.0(jiti@2.4.2)) eslint-formatter-friendly: 7.0.0 eslint-summary: 1.0.0 inquirer: 8.2.6 optionator: 0.9.4 - eslint-plugin-es-x@7.8.0(eslint@9.25.1(jiti@2.4.2)): + eslint-plugin-es-x@7.8.0(eslint@9.26.0(jiti@2.4.2)): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.1(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.26.0(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 - eslint: 9.25.1(jiti@2.4.2) - eslint-compat-utils: 0.5.1(eslint@9.25.1(jiti@2.4.2)) + eslint: 9.26.0(jiti@2.4.2) + eslint-compat-utils: 0.5.1(eslint@9.26.0(jiti@2.4.2)) - eslint-plugin-n@17.17.0(eslint@9.25.1(jiti@2.4.2)): + eslint-plugin-n@17.17.0(eslint@9.26.0(jiti@2.4.2)): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.1(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.5.1(eslint@9.26.0(jiti@2.4.2)) enhanced-resolve: 5.18.1 - eslint: 9.25.1(jiti@2.4.2) - eslint-plugin-es-x: 7.8.0(eslint@9.25.1(jiti@2.4.2)) + eslint: 9.26.0(jiti@2.4.2) + eslint-plugin-es-x: 7.8.0(eslint@9.26.0(jiti@2.4.2)) get-tsconfig: 4.10.0 globals: 15.15.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.7.1 - eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(prettier@3.5.3): + eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3): dependencies: - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) prettier: 3.5.3 prettier-linter-helpers: 1.0.0 synckit: 0.11.1 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.2(eslint@9.25.1(jiti@2.4.2)) + eslint-config-prettier: 10.1.2(eslint@9.26.0(jiti@2.4.2)) - eslint-plugin-unicorn@59.0.0(eslint@9.25.1(jiti@2.4.2)): + eslint-plugin-unicorn@59.0.0(eslint@9.26.0(jiti@2.4.2)): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.6.1(eslint@9.26.0(jiti@2.4.2)) '@eslint/plugin-kit': 0.2.8 ci-info: 4.2.0 clean-regexp: 1.0.0 core-js-compat: 3.41.0 - eslint: 9.25.1(jiti@2.4.2) + eslint: 9.26.0(jiti@2.4.2) esquery: 1.6.0 find-up-simple: 1.0.1 globals: 16.0.0 @@ -9788,12 +10031,12 @@ snapshots: semver: 7.7.1 strip-indent: 4.0.0 - eslint-plugin-yml@1.18.0(eslint@9.25.1(jiti@2.4.2)): + eslint-plugin-yml@1.18.0(eslint@9.26.0(jiti@2.4.2)): dependencies: debug: 4.4.0 escape-string-regexp: 4.0.0 - eslint: 9.25.1(jiti@2.4.2) - eslint-compat-utils: 0.6.5(eslint@9.25.1(jiti@2.4.2)) + eslint: 9.26.0(jiti@2.4.2) + eslint-compat-utils: 0.6.5(eslint@9.26.0(jiti@2.4.2)) natural-compare: 1.4.0 yaml-eslint-parser: 1.3.0 transitivePeerDependencies: @@ -9820,7 +10063,7 @@ snapshots: eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.1 @@ -9861,19 +10104,20 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.25.1(jiti@2.4.2): + eslint@9.26.0(jiti@2.4.2): dependencies: - '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.20.0 - '@eslint/config-helpers': 0.2.1 + '@eslint/config-helpers': 0.2.2 '@eslint/core': 0.13.0 '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.25.1 + '@eslint/js': 9.26.0 '@eslint/plugin-kit': 0.2.8 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.2 + '@modelcontextprotocol/sdk': 1.11.0 '@types/estree': 1.0.7 '@types/json-schema': 7.0.15 ajv: 6.12.6 @@ -9898,6 +10142,7 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 + zod: 3.24.4 optionalDependencies: jiti: 2.4.2 transitivePeerDependencies: @@ -9953,6 +10198,12 @@ snapshots: eventemitter3@5.0.1: {} + eventsource-parser@3.0.1: {} + + eventsource@3.0.6: + dependencies: + eventsource-parser: 3.0.1 + execa@8.0.1: dependencies: cross-spawn: 7.0.6 @@ -9967,6 +10218,42 @@ snapshots: expect-type@1.2.0: {} + express-rate-limit@7.5.0(express@5.1.0): + dependencies: + express: 5.1.0 + + express@5.1.0: + dependencies: + accepts: 2.0.0 + body-parser: 2.2.0 + content-disposition: 1.0.0 + content-type: 1.0.5 + cookie: 0.7.2 + cookie-signature: 1.2.2 + debug: 4.4.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 2.1.0 + fresh: 2.0.0 + http-errors: 2.0.0 + merge-descriptors: 2.0.0 + mime-types: 3.0.1 + on-finished: 2.4.1 + once: 1.4.0 + parseurl: 1.3.3 + proxy-addr: 2.0.7 + qs: 6.14.0 + range-parser: 1.2.1 + router: 2.2.0 + send: 1.2.0 + serve-static: 2.2.0 + statuses: 2.0.1 + type-is: 2.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + ext@1.7.0: dependencies: type: 2.7.3 @@ -9981,7 +10268,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.4.0 + debug: 4.3.4 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -10060,6 +10347,17 @@ snapshots: filter-obj@5.1.0: {} + finalhandler@2.1.0: + dependencies: + debug: 4.4.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.1 + transitivePeerDependencies: + - supports-color + find-up-simple@1.0.1: {} find-up@5.0.0: @@ -10130,6 +10428,10 @@ snapshots: forwarded-parse@2.1.2: {} + forwarded@0.2.0: {} + + fresh@2.0.0: {} + fs-extra@10.1.0: dependencies: graceful-fs: 4.2.11 @@ -10410,6 +10712,14 @@ snapshots: optionalDependencies: undici: 6.21.2 + http-errors@2.0.0: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.3 @@ -10567,6 +10877,8 @@ snapshots: ip-regex@5.0.0: {} + ipaddr.js@1.9.1: {} + is-arrayish@0.2.1: {} is-arrayish@0.3.2: {} @@ -10621,6 +10933,8 @@ snapshots: is-potential-custom-element-name@1.0.1: {} + is-promise@4.0.0: {} + is-stream@2.0.1: {} is-stream@3.0.0: {} @@ -11071,12 +11385,16 @@ snapshots: mdurl@2.0.0: {} + media-typer@1.1.0: {} + merge-deep@3.0.3: dependencies: arr-union: 3.1.0 clone-deep: 0.2.4 kind-of: 3.2.2 + merge-descriptors@2.0.0: {} + merge-source-map@1.1.0: dependencies: source-map: 0.6.1 @@ -11227,10 +11545,16 @@ snapshots: mime-db@1.52.0: {} + mime-db@1.54.0: {} + mime-types@2.1.35: dependencies: mime-db: 1.52.0 + mime-types@3.0.1: + dependencies: + mime-db: 1.54.0 + mime@2.6.0: {} mime@3.0.0: {} @@ -11327,6 +11651,8 @@ snapshots: natural-compare@1.4.0: {} + negotiator@1.0.0: {} + netmask@2.0.2: {} next-tick@1.1.0: {} @@ -11398,6 +11724,8 @@ snapshots: oauth-sign@0.9.0: {} + object-assign@4.1.1: {} + ofetch@1.4.1: dependencies: destr: 2.0.5 @@ -11406,6 +11734,10 @@ snapshots: on-exit-leak-free@2.1.2: {} + on-finished@2.4.1: + dependencies: + ee-first: 1.1.1 + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -11582,6 +11914,8 @@ snapshots: leac: 0.6.0 peberminta: 0.9.0 + parseurl@1.3.3: {} + path-browserify@1.0.1: {} path-exists@4.0.0: {} @@ -11601,6 +11935,8 @@ snapshots: path-to-regexp@6.3.0: {} + path-to-regexp@8.2.0: {} + pathe@1.1.2: {} pathe@2.0.3: {} @@ -11653,6 +11989,8 @@ snapshots: sonic-boom: 4.2.0 thread-stream: 3.1.0 + pkce-challenge@5.0.0: {} + pluralize@8.0.0: {} postcss@8.5.3: @@ -11724,10 +12062,15 @@ snapshots: '@types/node': 22.15.3 long: 5.3.1 + proxy-addr@2.0.7: + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + proxy-agent@6.4.0: dependencies: agent-base: 7.1.3 - debug: 4.4.0 + debug: 4.3.4 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 @@ -11868,8 +12211,17 @@ snapshots: quick-lru@5.1.1: {} + range-parser@1.2.1: {} + rate-limiter-flexible@7.1.0: {} + raw-body@3.0.0: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.6.3 + unpipe: 1.0.0 + re2js@1.1.0: {} readable-stream@3.6.2: @@ -12084,6 +12436,16 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.37.0 fsevents: 2.3.3 + router@2.2.0: + dependencies: + debug: 4.4.0 + depd: 2.0.0 + is-promise: 4.0.0 + parseurl: 1.3.3 + path-to-regexp: 8.2.0 + transitivePeerDependencies: + - supports-color + rrweb-cssom@0.8.0: {} rss-parser@3.13.0: @@ -12134,6 +12496,33 @@ snapshots: semver@7.7.1: {} + send@1.2.0: + dependencies: + debug: 4.4.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 2.0.0 + http-errors: 2.0.0 + mime-types: 3.0.1 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.1 + transitivePeerDependencies: + - supports-color + + serve-static@2.2.0: + dependencies: + encodeurl: 2.0.0 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 1.2.0 + transitivePeerDependencies: + - supports-color + + setprototypeof@1.2.0: {} + shallow-clone@0.1.2: dependencies: is-extendable: 0.1.1 @@ -12474,6 +12863,8 @@ snapshots: dependencies: to-no-case: 1.0.2 + toidentifier@1.0.1: {} + tosource@2.0.0-alpha.3: {} tough-cookie@2.5.0: @@ -12579,6 +12970,12 @@ snapshots: type-fest@4.38.0: {} + type-is@2.0.1: + dependencies: + content-type: 1.0.5 + media-typer: 1.1.0 + mime-types: 3.0.1 + type@2.7.3: {} typedarray-to-buffer@3.1.5: @@ -12638,6 +13035,8 @@ snapshots: universalify@2.0.1: {} + unpipe@1.0.0: {} + unplugin-lightningcss@0.3.3: dependencies: lightningcss: 1.29.3 @@ -12700,6 +13099,8 @@ snapshots: valid-url@1.0.9: {} + vary@1.1.2: {} + verror@1.10.0: dependencies: assert-plus: 1.0.0 @@ -12969,6 +13370,10 @@ snapshots: yoctocolors-cjs@2.1.2: {} + zod-to-json-schema@3.24.5(zod@3.24.4): + dependencies: + zod: 3.24.4 + zod@3.22.4: {} zod@3.24.1: {} From 0a5206aa47047c6181efc7df00fc408db405de23 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 19:26:37 +0800 Subject: [PATCH 0543/2658] chore(deps): bump narou from 1.1.0 to 1.2.0 (#19013) --- package.json | 2 +- pnpm-lock.yaml | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 88d6d8dbf4ea..ea7672799f12 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "mailparser": "3.7.2", "markdown-it": "14.1.0", "module-alias": "2.2.3", - "narou": "1.1.0", + "narou": "1.2.0", "notion-to-md": "3.1.8", "oauth-1.0a": "2.2.6", "ofetch": "1.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d333ef49fdbb..ea0ebf7fd049 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -179,8 +179,8 @@ importers: specifier: 2.2.3 version: 2.2.3 narou: - specifier: 1.1.0 - version: 1.1.0 + specifier: 1.2.0 + version: 1.2.0 notion-to-md: specifier: 3.1.8 version: 3.1.8 @@ -3220,9 +3220,6 @@ packages: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} - date-fns@4.1.0: - resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} - dayjs@1.11.8: resolution: {integrity: sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==} @@ -4995,8 +4992,8 @@ packages: engines: {node: ^18 || >=20} hasBin: true - narou@1.1.0: - resolution: {integrity: sha512-UwYk9x+5cidHwqiKiklEdsQy4tID0pn6HYYweah+7bamze2hDE7gnFdjaqRCrp2INzptdp3mCiauKV49trTVFg==} + narou@1.2.0: + resolution: {integrity: sha512-J9ju4O3hsTa+TcP4BEYEJ3ED8dNt5ktCwCb+E/zp0EMvmMsagqQ+uJLNtgSvPZBgJZPqB2bfos5AYPeahvEdEA==} engines: {node: '>=16.0.0', pnpm: '>=8'} natural-compare@1.4.0: @@ -9614,8 +9611,6 @@ snapshots: whatwg-mimetype: 4.0.0 whatwg-url: 14.2.0 - date-fns@4.1.0: {} - dayjs@1.11.8: {} debug@2.6.9: @@ -11645,9 +11640,7 @@ snapshots: nanoid@5.1.5: {} - narou@1.1.0: - dependencies: - date-fns: 4.1.0 + narou@1.2.0: {} natural-compare@1.4.0: {} From 1a35908f2d9695d4bea27a2c6b787e48282a3668 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 20:17:24 +0800 Subject: [PATCH 0544/2658] chore(deps-dev): bump eslint-plugin-prettier from 5.2.6 to 5.3.1 (#19011) Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.2.6 to 5.3.1. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.2.6...v5.3.1) --- updated-dependencies: - dependency-name: eslint-plugin-prettier dependency-version: 5.3.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index ea7672799f12..562349749ea5 100644 --- a/package.json +++ b/package.json @@ -176,7 +176,7 @@ "eslint-config-prettier": "10.1.2", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.17.0", - "eslint-plugin-prettier": "5.2.6", + "eslint-plugin-prettier": "5.4.0", "eslint-plugin-unicorn": "59.0.0", "eslint-plugin-yml": "1.18.0", "fs-extra": "11.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ea0ebf7fd049..7d204973829d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -396,8 +396,8 @@ importers: specifier: 17.17.0 version: 17.17.0(eslint@9.26.0(jiti@2.4.2)) eslint-plugin-prettier: - specifier: 5.2.6 - version: 5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3) + specifier: 5.4.0 + version: 5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3) eslint-plugin-unicorn: specifier: 59.0.0 version: 59.0.0(eslint@9.26.0(jiti@2.4.2)) @@ -2032,8 +2032,8 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@pkgr/core@0.2.0': - resolution: {integrity: sha512-vsJDAkYR6qCPu+ioGScGiMYR7LvZYIXh/dlQeviqoTWNCVfKTLYD/LkNWH4Mxsv2a5vpIRc77FN5DnmK1eBggQ==} + '@pkgr/core@0.2.4': + resolution: {integrity: sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} '@postlight/ci-failed-test-reporter@1.0.26': @@ -3587,8 +3587,8 @@ packages: peerDependencies: eslint: '>=8.23.0' - eslint-plugin-prettier@5.2.6: - resolution: {integrity: sha512-mUcf7QG2Tjk7H055Jk0lGBjbgDnfrvqjhXh9t2xLMSCjZVcw9Rb1V6sVNXO0th3jgeO7zllWPTNRil3JW94TnQ==} + eslint-plugin-prettier@5.4.0: + resolution: {integrity: sha512-BvQOvUhkVQM1i63iMETK9Hjud9QhqBnbtT1Zc642p9ynzBuCe5pybkOnvqZIBypXmMlsGcnU4HZ8sCTPfpAexA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: '@types/eslint': '>=8.0.0' @@ -5966,8 +5966,8 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - synckit@0.11.1: - resolution: {integrity: sha512-fWZqNBZNNFp/7mTUy1fSsydhKsAKJ+u90Nk7kOK5Gcq9vObaqLBLjWFDBkyVU9Vvc6Y71VbOevMuGhqv02bT+Q==} + synckit@0.11.4: + resolution: {integrity: sha512-Q/XQKRaJiLiFIBNN+mndW7S/RHxvwzuZS6ZwmRzUBqJBv/5QIKCEwkBC8GBf8EQJKYnaFs0wOZbKTXBPj8L9oQ==} engines: {node: ^14.18.0 || >=16.0.0} system-architecture@0.1.0: @@ -8317,7 +8317,7 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@pkgr/core@0.2.0': {} + '@pkgr/core@0.2.4': {} '@postlight/ci-failed-test-reporter@1.0.26': dependencies: @@ -9995,12 +9995,12 @@ snapshots: minimatch: 9.0.5 semver: 7.7.1 - eslint-plugin-prettier@5.2.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3): + eslint-plugin-prettier@5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3): dependencies: eslint: 9.26.0(jiti@2.4.2) prettier: 3.5.3 prettier-linter-helpers: 1.0.0 - synckit: 0.11.1 + synckit: 0.11.4 optionalDependencies: '@types/eslint': 9.6.1 eslint-config-prettier: 10.1.2(eslint@9.26.0(jiti@2.4.2)) @@ -12721,9 +12721,9 @@ snapshots: symbol-tree@3.2.4: {} - synckit@0.11.1: + synckit@0.11.4: dependencies: - '@pkgr/core': 0.2.0 + '@pkgr/core': 0.2.4 tslib: 2.8.1 system-architecture@0.1.0: {} From 0510d8391e08b2260787ca7955c88fd18ea4d478 Mon Sep 17 00:00:00 2001 From: Kjasn Date: Mon, 5 May 2025 23:57:21 +0800 Subject: [PATCH 0545/2658] feat(route): add Jumeili home route (#19021) --- lib/config.ts | 6 ++ lib/routes/jumeili/home.ts | 98 +++++++++++++++++++++++++++++++++ lib/routes/jumeili/namespace.ts | 7 +++ 3 files changed, 111 insertions(+) create mode 100644 lib/routes/jumeili/home.ts create mode 100644 lib/routes/jumeili/namespace.ts diff --git a/lib/config.ts b/lib/config.ts index db9d0d20ee7b..2d435b5c3fb8 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -204,6 +204,9 @@ export type Config = { javdb: { session?: string; }; + jumeili: { + cookie?: string; + }; keylol: { cookie?: string; }; @@ -642,6 +645,9 @@ const calculateValue = () => { javdb: { session: envs.JAVDB_SESSION, }, + jumeili: { + cookie: envs.JUMEILI_COOKIE, + }, keylol: { cookie: envs.KEYLOL_COOKIE, }, diff --git a/lib/routes/jumeili/home.ts b/lib/routes/jumeili/home.ts new file mode 100644 index 000000000000..b82dbf4edf40 --- /dev/null +++ b/lib/routes/jumeili/home.ts @@ -0,0 +1,98 @@ +import { config } from '@/config'; +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; + +export const route: Route = { + path: '/home/:column?', + categories: ['new-media'], + example: '/jumeili/home', + parameters: { + column: '内容栏, 默认为 `0`(最新)。其他可选:`-1`(头条)、`62073`(精选)、`13243`(年度大会)等。详细可以在开发者工具 Network 面板中找到,如:`https://www.jumeili.cn/ws/AjaxService.ashx?act=index_article&page=1&pageSize=20&column=0`最后的 `column=0` 即为`column` 参数', + }, + features: { + requireConfig: [ + { + name: 'JUMEILI_COOKIE', + optional: true, + description: '用户登录后,可以从浏览器开发者工具 Network 面板中的 jumeili 页面请求获取 Cookie,如:`ASP.NET_SessionId=xxx;jmlweb4=xxx`全部复制并设置为环境变量', + }, + ], + antiCrawler: true, + }, + radar: [ + { + source: ['www.jumeili.cn/', 'jumeili.cn/'], + target: '/home/:column?', + }, + ], + name: '首页资讯', + maintainers: ['kjasn'], + handler, + description: `:::Warning +未登录用户无法获取完整文章内容,只能看到预览内容。想要获取完整文章内容,需要设置\`JUMEILI_COOKIE\`环境变量。 +:::`, +}; + +async function handler(ctx) { + const baseUrl = 'https://www.jumeili.cn'; + const column = ctx.req.param('column') ?? 0; + + const link = `${baseUrl}/ws/AjaxService.ashx?act=index_article&page=1&pageSize=20&column=${column}`; + + const cookie = config.jumeili.cookie; + const response = await ofetch(link, { + headers: { + referer: baseUrl, + 'user-agent': config.trueUA, + accept: 'application/json, text/javascript, */*; q=0.01', + cookie, + }, + }); + + // parse 两次 + let data = JSON.parse(response); + if (data && typeof data === 'string') { + data = JSON.parse(data); + } + + let items = data.items.map((item) => ({ + title: item.title, + link: baseUrl + item.url, + description: item.subject, // 预览内容 + image: item.imgurl, + author: item.author, + // pubDate: parseDate(item.pubTime), + })); + + if (cookie) { + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const article = await ofetch(item.link, { + headers: { + referer: baseUrl, + 'user-agent': config.trueUA, + accept: 'application/json, text/javascript, */*; q=0.01', + cookie, + }, + }); + const $ = load(article); + + const content = $('#Cnt-Main-Article-JML').html(); + if (content) { + item.description = content; // 替换为完整正文 + } + + return item; + }) + ) + ); + } + + return { + title: '聚美丽 - 首页资讯', + item: items, + }; +} diff --git a/lib/routes/jumeili/namespace.ts b/lib/routes/jumeili/namespace.ts new file mode 100644 index 000000000000..6436fc4a8b30 --- /dev/null +++ b/lib/routes/jumeili/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '聚美丽', + url: 'jumeili.cn', + lang: 'zh-CN', +}; From f68f81c49df9ae797f4450cbbbf643c4453535c9 Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 6 May 2025 02:07:35 +0800 Subject: [PATCH 0546/2658] fix(utils/common-config): import parseDate and timezone functions for date handling (#19023) --- lib/routes/jewishmuseum/exhibitions.ts | 4 ++-- lib/setup.test.ts | 2 ++ lib/utils/common-config.test.ts | 5 +++-- lib/utils/common-config.ts | 8 +++++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/routes/jewishmuseum/exhibitions.ts b/lib/routes/jewishmuseum/exhibitions.ts index 2077f35ad8eb..47caa13fdfc6 100644 --- a/lib/routes/jewishmuseum/exhibitions.ts +++ b/lib/routes/jewishmuseum/exhibitions.ts @@ -28,8 +28,8 @@ async function handler() { title: 'Jewish Museums - Exhibitions', item: { item: '#current article.exhibition, #upcoming article, #past article.exhibition', - title: `$('article.exhibition h3').text()`, - link: `$('article.exhibition > a').attr('href')`, + title: `$('h3').text()`, + link: `$('h3').parent().attr('href')`, }, }); } diff --git a/lib/setup.test.ts b/lib/setup.test.ts index d4c65a009f94..b479f4f9a9bb 100644 --- a/lib/setup.test.ts +++ b/lib/setup.test.ts @@ -48,10 +48,12 @@ const server = setupServer(
  • 1
    RSSHub1
    +
    2025-01-01
  • 2
    RSSHub2
    +
    2025-01-02
  • `) diff --git a/lib/utils/common-config.test.ts b/lib/utils/common-config.test.ts index 57839fd38edf..d739ffeb3fca 100644 --- a/lib/utils/common-config.test.ts +++ b/lib/utils/common-config.test.ts @@ -51,6 +51,7 @@ describe('index', () => { title: `$('a').text() + ' - %title%'`, link: `$('a').attr('href')`, description: `$('.description').html()`, + pubDate: `timezone(parseDate($('.date').text(), 'YYYY-MM-DD'), 0)`, }, }); @@ -62,14 +63,14 @@ describe('index', () => { description: 'RSSHub1', guid: undefined, link: '/1', - pubDate: undefined, + pubDate: new Date('2025-01-01T00:00:00Z'), title: '1 - buildData', }, { description: 'RSSHub2', guid: undefined, link: '/2', - pubDate: undefined, + pubDate: new Date('2025-01-02T00:00:00Z'), title: '2 - buildData', }, ], diff --git a/lib/utils/common-config.ts b/lib/utils/common-config.ts index 4dfe54d16e34..d06b2aad86f2 100644 --- a/lib/utils/common-config.ts +++ b/lib/utils/common-config.ts @@ -1,10 +1,16 @@ import { load } from 'cheerio'; import ofetch from '@/utils/ofetch'; import iconv from 'iconv-lite'; +import { parseDate as _parseDate } from '@/utils/parse-date'; +import _timezone from '@/utils/timezone'; function transElemText($, prop) { const regex = /\$\((.*)\)/g; let result = prop; + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const parseDate = _parseDate; + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const timezone = _timezone; if (regex.test(result)) { // eslint-disable-next-line no-eval result = eval(result); @@ -43,7 +49,7 @@ async function buildData(data) { let charset = 'utf-8'; for (const attr of contentType.split(';')) { if (attr.includes('charset=')) { - charset = attr.split('=').pop() || 'utf-8'; + charset = (attr.split('=').pop() || 'utf-8').toLowerCase(); } } // @ts-expect-error custom property From 2e5c24794b29994e27d8f8aa255f945115d9c099 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Tue, 6 May 2025 12:16:13 +0800 Subject: [PATCH 0547/2658] refactor(route/people): use ofetch instead of got --- lib/routes/people/index.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/routes/people/index.ts b/lib/routes/people/index.ts index 2400405f439f..2915b09c99a1 100644 --- a/lib/routes/people/index.ts +++ b/lib/routes/people/index.ts @@ -1,6 +1,6 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import iconv from 'iconv-lite'; import timezone from '@/utils/timezone'; @@ -10,8 +10,9 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { path: '/:site?/:category{.+}?', - name: 'Unknown', - maintainers: [], + name: '首页头条', + maintainers: ['nczitzk', 'pseudoyu'], + example: '/people', handler, }; @@ -28,16 +29,15 @@ async function handler(ctx) { const rootUrl = `http://${site}.people.com.cn`; const currentUrl = new URL(`GB/${category}`, rootUrl).href; - const { data: response } = await got(currentUrl, { - responseType: 'buffer', + const response = await ofetch(currentUrl, { + responseType: 'arrayBuffer', }); - // not seen Content-Type in response headers // try to parse charset from meta tag - let decodedResponse = iconv.decode(response, 'utf-8'); + let decodedResponse = iconv.decode(Buffer.from(response), 'utf-8'); const parsedCharset = decodedResponse.match(/]+)["']?/i); const encoding = parsedCharset ? parsedCharset[1].toLowerCase() : 'utf-8'; - decodedResponse = encoding === 'utf-8' ? decodedResponse : iconv.decode(response, encoding); + decodedResponse = encoding === 'utf-8' ? decodedResponse : iconv.decode(Buffer.from(response), encoding); const $ = load(decodedResponse); $('em').remove(); @@ -66,19 +66,19 @@ async function handler(ctx) { items.map((item) => cache.tryGet(item.link, async () => { try { - const { data: detailResponse } = await got(item.link, { - responseType: 'buffer', + const detailResponse = await ofetch(item.link, { + responseType: 'arrayBuffer', }); - const data = iconv.decode(detailResponse, encoding); + const data = iconv.decode(Buffer.from(detailResponse), encoding); const content = load(data); content('.paper_num, #rwb_tjyd').remove(); item.description = content('#rwb_zw').html(); - item.pubDate = timezone(parseDate(data.match(/(\d{4}年\d{2}月\d{2}日\d{2}:\d{2})/)[1], 'YYYY年MM月DD日 HH:mm'), +8); + item.pubDate = timezone(parseDate(data.match(/(\d{4}年\d{2}月\d{2}日\d{2}:\d{2})/)?.[1] || '', 'YYYY年MM月DD日 HH:mm'), +8); } catch (error) { - item.description = error; + item.description = String(error); } return item; From 58e9e4469a3bae16dba3f9cbc365b49e7cfffe12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 08:47:45 +0000 Subject: [PATCH 0548/2658] chore(deps-dev): bump @types/node from 22.15.3 to 22.15.12 (#19025) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.3 to 22.15.12. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.12 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 80 +++++++++++++++++++++++++------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 562349749ea5..9e1108dc9331 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.15.3", + "@types/node": "22.15.12", "@types/sanitize-html": "2.15.0", "@types/supertest": "6.0.3", "@types/title": "3.4.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7d204973829d..ea857778faba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -354,8 +354,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.15.3 - version: 22.15.3 + specifier: 22.15.12 + version: 22.15.12 '@types/sanitize-html': specifier: 2.15.0 version: 2.15.0 @@ -379,7 +379,7 @@ importers: version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3))) + version: 2.1.9(vitest@2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3))) discord-api-types: specifier: 0.38.2 version: 0.38.2 @@ -454,10 +454,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.3)(lightningcss@1.29.3)) + version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.12)(lightningcss@1.29.3)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) + version: 2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -2461,8 +2461,8 @@ packages: '@types/node-fetch@2.6.12': resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} - '@types/node@22.15.3': - resolution: {integrity: sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==} + '@types/node@22.15.12': + resolution: {integrity: sha512-K0fpC/ZVeb8G9rm7bH7vI0KAec4XHEhBam616nVJCV51bKzJ6oA3luG4WdKoaztxe70QaNjS/xBmcDLmr4PiGw==} '@types/pg-pool@2.0.6': resolution: {integrity: sha512-TaAUE5rq2VQYxab5Ts7WZhKNmuN78Q6PiFonTDdpbx8a1H0M1vhy3rhiMjl+e2iHmogyMw7jZF4FrE6eJUy5HQ==} @@ -7738,7 +7738,7 @@ snapshots: '@inquirer/figures': 1.0.11 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -8649,7 +8649,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/cookie@0.6.0': {} @@ -8672,12 +8672,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/html-to-text@9.0.4': {} @@ -8685,13 +8685,13 @@ snapshots: '@types/imapflow@1.0.21': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -8701,7 +8701,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/jsrsasign@10.5.13': {} @@ -8711,7 +8711,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -8733,18 +8733,18 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/mysql@2.15.26': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/node-fetch@2.6.12': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 form-data: 4.0.2 - '@types/node@22.15.3': + '@types/node@22.15.12': dependencies: undici-types: 6.21.0 @@ -8754,7 +8754,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 pg-protocol: 1.9.5 pg-types: 2.2.0 @@ -8766,7 +8766,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/tough-cookie': 4.0.5 form-data: 2.5.3 @@ -8782,7 +8782,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.15.3 + '@types/node': 22.15.12 form-data: 4.0.2 '@types/supertest@6.0.3': @@ -8792,7 +8792,7 @@ snapshots: '@types/tedious@4.0.14': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 '@types/title@3.4.3': {} @@ -8808,7 +8808,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 optional: true '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': @@ -8950,7 +8950,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8964,7 +8964,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) + vitest: 2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) transitivePeerDependencies: - supports-color @@ -8975,14 +8975,14 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.3)(lightningcss@1.29.3))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.12)(lightningcss@1.29.3))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.3(typescript@5.8.3) - vite: 5.4.15(@types/node@22.15.3)(lightningcss@1.29.3) + vite: 5.4.15(@types/node@22.15.12)(lightningcss@1.29.3) '@vitest/pretty-format@2.1.9': dependencies: @@ -12052,7 +12052,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.15.3 + '@types/node': 22.15.12 long: 5.3.1 proxy-addr@2.0.7: @@ -13110,13 +13110,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.9(@types/node@22.15.3)(lightningcss@1.29.3): + vite-node@2.1.9(@types/node@22.15.12)(lightningcss@1.29.3): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.15(@types/node@22.15.3)(lightningcss@1.29.3) + vite: 5.4.15(@types/node@22.15.12)(lightningcss@1.29.3) transitivePeerDependencies: - '@types/node' - less @@ -13128,31 +13128,31 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.3)(lightningcss@1.29.3)): + vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.12)(lightningcss@1.29.3)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.3) optionalDependencies: - vite: 5.4.15(@types/node@22.15.3)(lightningcss@1.29.3) + vite: 5.4.15(@types/node@22.15.12)(lightningcss@1.29.3) transitivePeerDependencies: - supports-color - typescript - vite@5.4.15(@types/node@22.15.3)(lightningcss@1.29.3): + vite@5.4.15(@types/node@22.15.12)(lightningcss@1.29.3): dependencies: esbuild: 0.21.5 postcss: 8.5.3 rollup: 4.37.0 optionalDependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 fsevents: 2.3.3 lightningcss: 1.29.3 - vitest@2.1.9(@types/node@22.15.3)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)): + vitest@2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.3)(lightningcss@1.29.3)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.12)(lightningcss@1.29.3)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -13168,11 +13168,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.15(@types/node@22.15.3)(lightningcss@1.29.3) - vite-node: 2.1.9(@types/node@22.15.3)(lightningcss@1.29.3) + vite: 5.4.15(@types/node@22.15.12)(lightningcss@1.29.3) + vite-node: 2.1.9(@types/node@22.15.12)(lightningcss@1.29.3) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.15.3 + '@types/node': 22.15.12 jsdom: 26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From e7907d882679d9bf4906a5f5bc85bc89909e3391 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 08:48:40 +0000 Subject: [PATCH 0549/2658] chore(deps-dev): bump eslint-plugin-unicorn from 59.0.0 to 59.0.1 (#19027) Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 59.0.0 to 59.0.1. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v59.0.0...v59.0.1) --- updated-dependencies: - dependency-name: eslint-plugin-unicorn dependency-version: 59.0.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 70 ++++++++++++++++++++++++++------------------------ 2 files changed, 38 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index 9e1108dc9331..95b33b640123 100644 --- a/package.json +++ b/package.json @@ -177,7 +177,7 @@ "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.17.0", "eslint-plugin-prettier": "5.4.0", - "eslint-plugin-unicorn": "59.0.0", + "eslint-plugin-unicorn": "59.0.1", "eslint-plugin-yml": "1.18.0", "fs-extra": "11.3.0", "globals": "16.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ea857778faba..a47a132113bf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -399,8 +399,8 @@ importers: specifier: 5.4.0 version: 5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3) eslint-plugin-unicorn: - specifier: 59.0.0 - version: 59.0.0(eslint@9.26.0(jiti@2.4.2)) + specifier: 59.0.1 + version: 59.0.1(eslint@9.26.0(jiti@2.4.2)) eslint-plugin-yml: specifier: 1.18.0 version: 1.18.0(eslint@9.26.0(jiti@2.4.2)) @@ -574,10 +574,6 @@ packages: resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.9': - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.27.1': resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} @@ -1391,12 +1387,6 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/eslint-utils@4.6.1': - resolution: {integrity: sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/eslint-utils@4.7.0': resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2880,6 +2870,11 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + browserslist@4.24.5: + resolution: {integrity: sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + buffer-crc32@0.2.13: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} @@ -2942,6 +2937,9 @@ packages: caniuse-lite@1.0.30001716: resolution: {integrity: sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==} + caniuse-lite@1.0.30001717: + resolution: {integrity: sha512-auPpttCq6BDEG8ZAuHJIplGw6GODhjw+/11e7IjpnYCxZcW/ONgPs0KVBJ0d1bY3e2+7PRe5RCLyP+PfwVgkYw==} + caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -3146,9 +3144,6 @@ packages: cookiejar@2.1.4: resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} - core-js-compat@3.41.0: - resolution: {integrity: sha512-RFsU9LySVue9RTwdDVX/T0e2Y6jRYWXERKElIjpuEOEnxaXffI0X7RUwVzfYLfzuLXSNJDYoRYUAmRUcyln20A==} - core-js-compat@3.42.0: resolution: {integrity: sha512-bQasjMfyDGyaeWKBIu33lHh9qlSR0MFE/Nmc6nMjf/iU9b3rSMdAYz1Baxrv4lPdGUsTqZudHA4jIGSJy0SWZQ==} @@ -3429,6 +3424,9 @@ packages: electron-to-chromium@1.5.148: resolution: {integrity: sha512-8uc1QXwwqayD4mblcsQYZqoi+cOc97A2XmKSBOIRbEAvbp6vrqmSYs4dHD2qVygUgn7Mi0qdKgPaJ9WC8cv63A==} + electron-to-chromium@1.5.150: + resolution: {integrity: sha512-rOOkP2ZUMx1yL4fCxXQKDHQ8ZXwisb2OycOQVKHgvB3ZI4CvehOd4y2tfnnLDieJ3Zs1RL1Dlp3cMkyIn7nnXA==} + ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -3601,8 +3599,8 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-unicorn@59.0.0: - resolution: {integrity: sha512-7IEeqkymGa7tr6wTWS4DolfXnfcE3QjcD0g7I+qCfV5GPMvVsFsLT7zTIYvnudqwAm5nWekdGIOTTXA93Sz9Ow==} + eslint-plugin-unicorn@59.0.1: + resolution: {integrity: sha512-EtNXYuWPUmkgSU2E7Ttn57LbRREQesIP1BiLn7OZLKodopKfDXfBUkC/0j6mpw2JExwf43Uf3qLSvrSvppgy8Q==} engines: {node: ^18.20.0 || ^20.10.0 || >=21.0.0} peerDependencies: eslint: '>=9.22.0' @@ -6816,8 +6814,6 @@ snapshots: '@babel/helper-string-parser@7.27.1': {} - '@babel/helper-validator-identifier@7.25.9': {} - '@babel/helper-validator-identifier@7.27.1': {} '@babel/helper-validator-option@7.27.1': {} @@ -7614,11 +7610,6 @@ snapshots: eslint: 9.26.0(jiti@2.4.2) eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.6.1(eslint@9.26.0(jiti@2.4.2))': - dependencies: - eslint: 9.26.0(jiti@2.4.2) - eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.7.0(eslint@8.57.1)': dependencies: eslint: 8.57.1 @@ -9242,6 +9233,13 @@ snapshots: node-releases: 2.0.19 update-browserslist-db: 1.1.3(browserslist@4.24.4) + browserslist@4.24.5: + dependencies: + caniuse-lite: 1.0.30001717 + electron-to-chromium: 1.5.150 + node-releases: 2.0.19 + update-browserslist-db: 1.1.3(browserslist@4.24.5) + buffer-crc32@0.2.13: {} buffer-equal-constant-time@1.0.1: {} @@ -9308,6 +9306,8 @@ snapshots: caniuse-lite@1.0.30001716: {} + caniuse-lite@1.0.30001717: {} + caseless@0.12.0: {} chai@5.2.0: @@ -9531,13 +9531,9 @@ snapshots: cookiejar@2.1.4: {} - core-js-compat@3.41.0: - dependencies: - browserslist: 4.24.4 - core-js-compat@3.42.0: dependencies: - browserslist: 4.24.4 + browserslist: 4.24.5 core-js@2.6.12: {} @@ -9793,6 +9789,8 @@ snapshots: electron-to-chromium@1.5.148: {} + electron-to-chromium@1.5.150: {} + ellipsize@0.1.0: {} emoji-regex@10.4.0: {} @@ -10005,14 +10003,14 @@ snapshots: '@types/eslint': 9.6.1 eslint-config-prettier: 10.1.2(eslint@9.26.0(jiti@2.4.2)) - eslint-plugin-unicorn@59.0.0(eslint@9.26.0(jiti@2.4.2)): + eslint-plugin-unicorn@59.0.1(eslint@9.26.0(jiti@2.4.2)): dependencies: - '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.6.1(eslint@9.26.0(jiti@2.4.2)) + '@babel/helper-validator-identifier': 7.27.1 + '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0(jiti@2.4.2)) '@eslint/plugin-kit': 0.2.8 ci-info: 4.2.0 clean-regexp: 1.0.0 - core-js-compat: 3.41.0 + core-js-compat: 3.42.0 eslint: 9.26.0(jiti@2.4.2) esquery: 1.6.0 find-up-simple: 1.0.1 @@ -13048,6 +13046,12 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + update-browserslist-db@1.1.3(browserslist@4.24.5): + dependencies: + browserslist: 4.24.5 + escalade: 3.2.0 + picocolors: 1.1.1 + upper-case@1.1.3: {} uri-js@4.4.1: From 2300a20882953ac9f1f251d1467e313cd59fbea3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 08:58:03 +0000 Subject: [PATCH 0550/2658] chore(deps-dev): bump discord-api-types from 0.38.2 to 0.38.3 (#19031) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.38.2 to 0.38.3. - [Release notes](https://github.com/discordjs/discord-api-types/releases) - [Changelog](https://github.com/discordjs/discord-api-types/blob/main/CHANGELOG.md) - [Commits](https://github.com/discordjs/discord-api-types/compare/0.38.2...0.38.3) --- updated-dependencies: - dependency-name: discord-api-types dependency-version: 0.38.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 95b33b640123..e901598ddf0c 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "@typescript-eslint/parser": "8.31.1", "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", - "discord-api-types": "0.38.2", + "discord-api-types": "0.38.3", "eslint": "9.26.0", "eslint-config-prettier": "10.1.2", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a47a132113bf..54bc52061133 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -381,8 +381,8 @@ importers: specifier: 2.1.9 version: 2.1.9(vitest@2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3))) discord-api-types: - specifier: 0.38.2 - version: 0.38.2 + specifier: 0.38.3 + version: 0.38.3 eslint: specifier: 9.26.0 version: 9.26.0(jiti@2.4.2) @@ -3347,8 +3347,8 @@ packages: resolution: {integrity: sha512-dSApZXgx29qO/6AVigdsoC6HSvaHWinJ4HTRPKrlMAxX71FgPzn/WEWbgM+aB1PlKD9IfSC3Ir2ouYYQR1uy+g==} engines: {node: '>=18.17.0'} - discord-api-types@0.38.2: - resolution: {integrity: sha512-GAPY1/Kv3aqEoBYgUYXB2tHdWJCZXfytlCzxZ4QMQ1/TIQn1JI+xUOukehl4iEa9m7fCURnMIOpOxpaTWqzX2w==} + discord-api-types@0.38.3: + resolution: {integrity: sha512-vijevLh06Gtmex6BQzc9jRrGce6La0qnsF4bKwKM2L1ou0/sbJIOAkg7wz6YLLaodnUwQLljIhtrGxnkMjc1Ew==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -9697,7 +9697,7 @@ snapshots: directory-import@3.3.2: {} - discord-api-types@0.38.2: {} + discord-api-types@0.38.3: {} doctrine@3.0.0: dependencies: From eaa3f8afd964e9c02324aa57c7fdeb6cbfc38337 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 19:21:37 +0800 Subject: [PATCH 0551/2658] chore(deps): bump twitter-api-v2 from 1.22.0 to 1.23.0 (#19026) Bumps [twitter-api-v2](https://github.com/plhery/node-twitter-api-v2) from 1.22.0 to 1.23.0. - [Release notes](https://github.com/plhery/node-twitter-api-v2/releases) - [Changelog](https://github.com/PLhery/node-twitter-api-v2/blob/master/changelog.md) - [Commits](https://github.com/plhery/node-twitter-api-v2/compare/1.22.0...1.23.0) --- updated-dependencies: - dependency-name: twitter-api-v2 dependency-version: 1.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index e901598ddf0c..10dc1a07a3ec 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "tosource": "2.0.0-alpha.3", "tough-cookie": "5.1.2", "tsx": "4.19.4", - "twitter-api-v2": "1.22.0", + "twitter-api-v2": "1.23.0", "ufo": "1.6.1", "undici": "6.21.2", "uuid": "11.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 54bc52061133..c93013a8fff1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -263,8 +263,8 @@ importers: specifier: 4.19.4 version: 4.19.4 twitter-api-v2: - specifier: 1.22.0 - version: 1.22.0 + specifier: 1.23.0 + version: 1.23.0 ufo: specifier: 1.6.1 version: 1.6.1 @@ -6178,8 +6178,8 @@ packages: tweetnacl@0.14.5: resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} - twitter-api-v2@1.22.0: - resolution: {integrity: sha512-KlcRL9vcBzjeS/PwxX33NziP+SHp9n35DOclKtpOmnNes7nNVnK7WG4pKlHfBqGrY5kAz/8J5ERS8DWkYOaiWw==} + twitter-api-v2@1.23.0: + resolution: {integrity: sha512-5i1agETVpTuY68Zuk9i2B3N9wHzc4JIWw0WKyG4CEaFv9mRKmU87roa+U1oYYXTChWb0HMcqfkwoBJHYmLbeDA==} type-check@0.3.2: resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} @@ -12943,7 +12943,7 @@ snapshots: tweetnacl@0.14.5: {} - twitter-api-v2@1.22.0: {} + twitter-api-v2@1.23.0: {} type-check@0.3.2: dependencies: From 0dcd8d76dee0da44516f1de2ede89ef69bfd8d24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 19:21:55 +0800 Subject: [PATCH 0552/2658] chore(deps-dev): bump @types/sanitize-html from 2.15.0 to 2.16.0 (#19030) Bumps [@types/sanitize-html](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sanitize-html) from 2.15.0 to 2.16.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sanitize-html) --- updated-dependencies: - dependency-name: "@types/sanitize-html" dependency-version: 2.16.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 10dc1a07a3ec..8a026b01d2f1 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", "@types/node": "22.15.12", - "@types/sanitize-html": "2.15.0", + "@types/sanitize-html": "2.16.0", "@types/supertest": "6.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c93013a8fff1..c8bb97143f7d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -357,8 +357,8 @@ importers: specifier: 22.15.12 version: 22.15.12 '@types/sanitize-html': - specifier: 2.15.0 - version: 2.15.0 + specifier: 2.16.0 + version: 2.16.0 '@types/supertest': specifier: 6.0.3 version: 6.0.3 @@ -2466,8 +2466,8 @@ packages: '@types/request@2.48.12': resolution: {integrity: sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==} - '@types/sanitize-html@2.15.0': - resolution: {integrity: sha512-71Z6PbYsVKfp4i6Jvr37s5ql6if1Q/iJQT80NbaSi7uGaG8CqBMXP0pk/EsURAOuGdk5IJCd/vnzKrR7S3Txsw==} + '@types/sanitize-html@2.16.0': + resolution: {integrity: sha512-l6rX1MUXje5ztPT0cAFtUayXF06DqPhRyfVXareEN5gGCFaP/iwsxIyKODr9XDhfxPpN6vXUFNfo5kZMXCxBtw==} '@types/shimmer@1.2.0': resolution: {integrity: sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg==} @@ -8761,7 +8761,7 @@ snapshots: '@types/tough-cookie': 4.0.5 form-data: 2.5.3 - '@types/sanitize-html@2.15.0': + '@types/sanitize-html@2.16.0': dependencies: htmlparser2: 8.0.2 From 902a135c85b1b840669b88683fb50816280ea9f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 19:25:07 +0800 Subject: [PATCH 0553/2658] chore(deps-dev): bump the typescript-eslint group with 2 updates (#19024) Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.31.1 to 8.32.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.32.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.31.1 to 8.32.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.32.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.32.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-version: 8.32.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +-- pnpm-lock.yaml | 94 +++++++++++++++++++++++++------------------------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index 8a026b01d2f1..09f6f08499ff 100644 --- a/package.json +++ b/package.json @@ -167,8 +167,8 @@ "@types/supertest": "6.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.31.1", - "@typescript-eslint/parser": "8.31.1", + "@typescript-eslint/eslint-plugin": "8.32.0", + "@typescript-eslint/parser": "8.32.0", "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.38.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8bb97143f7d..ced7e9e9ff39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -369,11 +369,11 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.31.1 - version: 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) + specifier: 8.32.0 + version: 8.32.0(@typescript-eslint/parser@8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) '@typescript-eslint/parser': - specifier: 8.31.1 - version: 8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) + specifier: 8.32.0 + version: 8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 version: 0.29.2(rollup@4.37.0) @@ -2505,16 +2505,16 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.31.1': - resolution: {integrity: sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==} + '@typescript-eslint/eslint-plugin@8.32.0': + resolution: {integrity: sha512-/jU9ettcntkBFmWUzzGgsClEi2ZFiikMX5eEQsmxIAWMOn4H3D4rvHssstmAHGVvrYnaMqdWWWg0b5M6IN/MTQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@8.31.1': - resolution: {integrity: sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==} + '@typescript-eslint/parser@8.32.0': + resolution: {integrity: sha512-B2MdzyWxCE2+SqiZHAjPphft+/2x2FlO9YBx7eKE1BCb+rqBlQdhtAEhzIEdozHd55DXPmxBdpMygFJjfjjA9A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2524,12 +2524,12 @@ packages: resolution: {integrity: sha512-u2oITX3BJwzWCapoZ/pXw6BCOl8rJP4Ij/3wPoGvY8XwvXflOzd1kLrDUUUAIEdJSFh+ASwdTHqtan9xSg8buw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.31.1': - resolution: {integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==} + '@typescript-eslint/scope-manager@8.32.0': + resolution: {integrity: sha512-jc/4IxGNedXkmG4mx4nJTILb6TMjL66D41vyeaPWvDUmeYQzF3lKtN15WsAeTr65ce4mPxwopPSo1yUUAWw0hQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.31.1': - resolution: {integrity: sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==} + '@typescript-eslint/type-utils@8.32.0': + resolution: {integrity: sha512-t2vouuYQKEKSLtJaa5bB4jHeha2HJczQ6E5IXPDPgIty9EqcJxpr1QHQ86YyIPwDwxvUmLfP2YADQ5ZY4qddZg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2539,8 +2539,8 @@ packages: resolution: {integrity: sha512-bn4WS1bkKEjx7HqiwG2JNB3YJdC1q6Ue7GyGlwPHyt0TnVq6TtD/hiOdTZt71sq0s7UzqBFXD8t8o2e63tXgwA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.31.1': - resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} + '@typescript-eslint/types@8.32.0': + resolution: {integrity: sha512-O5Id6tGadAZEMThM6L9HmVf5hQUXNSxLVKeGJYWNhhVseps/0LddMkp7//VDkzwJ69lPL0UmZdcZwggj9akJaA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@8.28.0': @@ -2549,8 +2549,8 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/typescript-estree@8.31.1': - resolution: {integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==} + '@typescript-eslint/typescript-estree@8.32.0': + resolution: {integrity: sha512-pU9VD7anSCOIoBFnhTGfOzlVFQIA1XXiQpH/CezqOBaDppRwTglJzCC6fUQGpfwey4T183NKhF1/mfatYmjRqQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' @@ -2562,8 +2562,8 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.31.1': - resolution: {integrity: sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==} + '@typescript-eslint/utils@8.32.0': + resolution: {integrity: sha512-8S9hXau6nQ/sYVtC3D6ISIDoJzS1NsCK+gluVhLN2YkBPX+/1wkwyUiDKnxRh15579WoOIyVWnoyIf3yGI9REw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2573,8 +2573,8 @@ packages: resolution: {integrity: sha512-hbn8SZ8w4u2pRwgQ1GlUrPKE+t2XvcCW5tTRF7j6SMYIuYG37XuzIW44JCZPa36evi0Oy2SnM664BlIaAuQcvg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.31.1': - resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} + '@typescript-eslint/visitor-keys@8.32.0': + resolution: {integrity: sha512-1rYQTCLFFzOI5Nl0c8LUpJT8HxpwVRn9E4CkMsYfuN6ctmQqExjSTzzSk0Tz2apmXy7WU6/6fyaZVVA/thPN+w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.3.0': @@ -8802,14 +8802,14 @@ snapshots: '@types/node': 22.15.12 optional: true - '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.32.0(@typescript-eslint/parser@8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.31.1 - '@typescript-eslint/type-utils': 8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/utils': 8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.31.1 + '@typescript-eslint/parser': 8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.32.0 + '@typescript-eslint/type-utils': 8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.32.0 eslint: 9.26.0(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 @@ -8819,12 +8819,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/parser@8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/scope-manager': 8.31.1 - '@typescript-eslint/types': 8.31.1 - '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.31.1 + '@typescript-eslint/scope-manager': 8.32.0 + '@typescript-eslint/types': 8.32.0 + '@typescript-eslint/typescript-estree': 8.32.0(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.32.0 debug: 4.4.0 eslint: 9.26.0(jiti@2.4.2) typescript: 5.8.3 @@ -8836,15 +8836,15 @@ snapshots: '@typescript-eslint/types': 8.28.0 '@typescript-eslint/visitor-keys': 8.28.0 - '@typescript-eslint/scope-manager@8.31.1': + '@typescript-eslint/scope-manager@8.32.0': dependencies: - '@typescript-eslint/types': 8.31.1 - '@typescript-eslint/visitor-keys': 8.31.1 + '@typescript-eslint/types': 8.32.0 + '@typescript-eslint/visitor-keys': 8.32.0 - '@typescript-eslint/type-utils@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) - '@typescript-eslint/utils': 8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.32.0(typescript@5.8.3) + '@typescript-eslint/utils': 8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) debug: 4.4.0 eslint: 9.26.0(jiti@2.4.2) ts-api-utils: 2.1.0(typescript@5.8.3) @@ -8854,7 +8854,7 @@ snapshots: '@typescript-eslint/types@8.28.0': {} - '@typescript-eslint/types@8.31.1': {} + '@typescript-eslint/types@8.32.0': {} '@typescript-eslint/typescript-estree@8.28.0(typescript@5.8.3)': dependencies: @@ -8870,10 +8870,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.31.1(typescript@5.8.3)': + '@typescript-eslint/typescript-estree@8.32.0(typescript@5.8.3)': dependencies: - '@typescript-eslint/types': 8.31.1 - '@typescript-eslint/visitor-keys': 8.31.1 + '@typescript-eslint/types': 8.32.0 + '@typescript-eslint/visitor-keys': 8.32.0 debug: 4.4.0 fast-glob: 3.3.3 is-glob: 4.0.3 @@ -8895,12 +8895,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.31.1(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/utils@8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0(jiti@2.4.2)) - '@typescript-eslint/scope-manager': 8.31.1 - '@typescript-eslint/types': 8.31.1 - '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.32.0 + '@typescript-eslint/types': 8.32.0 + '@typescript-eslint/typescript-estree': 8.32.0(typescript@5.8.3) eslint: 9.26.0(jiti@2.4.2) typescript: 5.8.3 transitivePeerDependencies: @@ -8911,9 +8911,9 @@ snapshots: '@typescript-eslint/types': 8.28.0 eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.31.1': + '@typescript-eslint/visitor-keys@8.32.0': dependencies: - '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/types': 8.32.0 eslint-visitor-keys: 4.2.0 '@ungap/structured-clone@1.3.0': {} From 74fd9ee55cdba5c06b9691dc41ca69df792523ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 03:06:44 +0800 Subject: [PATCH 0554/2658] chore(deps): bump @notionhq/client from 2.3.0 to 3.0.0 (#19029) Bumps [@notionhq/client](https://github.com/makenotion/notion-sdk-js) from 2.3.0 to 3.0.0. - [Release notes](https://github.com/makenotion/notion-sdk-js/releases) - [Commits](https://github.com/makenotion/notion-sdk-js/compare/v2.3.0...v3.0.0) --- updated-dependencies: - dependency-name: "@notionhq/client" dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 25 ++++++------------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 09f6f08499ff..cf993d59ddda 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@bbob/preset-html5": "4.2.0", "@hono/node-server": "1.14.1", "@hono/zod-openapi": "0.19.6", - "@notionhq/client": "2.3.0", + "@notionhq/client": "3.0.0", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.200.0", "@opentelemetry/exporter-trace-otlp-http": "0.200.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ced7e9e9ff39..8ba75a56a97d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,8 +35,8 @@ importers: specifier: 0.19.6 version: 0.19.6(hono@4.7.8)(zod@3.24.4) '@notionhq/client': - specifier: 2.3.0 - version: 2.3.0 + specifier: 3.0.0 + version: 3.0.0 '@opentelemetry/api': specifier: 1.9.0 version: 1.9.0 @@ -1608,9 +1608,9 @@ packages: resolution: {integrity: sha512-y3SvzjuY1ygnzWA4Krwx/WaJAsTMP11DN+e21A8Fa8PW1oDtVB5NSRW7LWurAiS2oKRkuCgcjTYMkBuBkcPCRg==} engines: {node: '>=12.4.0'} - '@notionhq/client@2.3.0': - resolution: {integrity: sha512-l7WqTCpQqC+HibkB9chghONQTYcxNQT0/rOJemBfmuKQRTu2vuV8B3yA395iKaUdDo7HI+0KvQaz9687Xskzkw==} - engines: {node: '>=12'} + '@notionhq/client@3.0.0': + resolution: {integrity: sha512-TlWxZT/rsrjGWJOrnVuiLAlWNPXDumHyRMcw81bJcy2RupSyfjjUCYRELDEyZog48sjVK69/hHLIAwOF3C+ECQ==} + engines: {node: '>=18'} '@one-ini/wasm@0.1.1': resolution: {integrity: sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==} @@ -2448,9 +2448,6 @@ packages: '@types/mysql@2.15.26': resolution: {integrity: sha512-DSLCOXhkvfS5WNNPbfn2KdICAmk8lLc+/PNvnPnF7gOdMZCxopXduqv0OQ13y/yA/zXTSikZZqVgybUxOEg6YQ==} - '@types/node-fetch@2.6.12': - resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} - '@types/node@22.15.12': resolution: {integrity: sha512-K0fpC/ZVeb8G9rm7bH7vI0KAec4XHEhBam616nVJCV51bKzJ6oA3luG4WdKoaztxe70QaNjS/xBmcDLmr4PiGw==} @@ -7870,12 +7867,7 @@ snapshots: '@nolyfill/side-channel@1.0.44': {} - '@notionhq/client@2.3.0': - dependencies: - '@types/node-fetch': 2.6.12 - node-fetch: 2.7.0 - transitivePeerDependencies: - - encoding + '@notionhq/client@3.0.0': {} '@one-ini/wasm@0.1.1': {} @@ -8730,11 +8722,6 @@ snapshots: dependencies: '@types/node': 22.15.12 - '@types/node-fetch@2.6.12': - dependencies: - '@types/node': 22.15.12 - form-data: 4.0.2 - '@types/node@22.15.12': dependencies: undici-types: 6.21.0 From 8faec7fbfd652dfeb8416cab7fc9e6abf96f9f97 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 7 May 2025 04:18:23 +0800 Subject: [PATCH 0555/2658] refactor: fix Element type import --- lib/middleware/parameter.ts | 3 ++- lib/routes/10000link/info.ts | 3 ++- lib/routes/199it/index.ts | 3 ++- lib/routes/adquan/case-library.ts | 3 ++- lib/routes/adquan/index.ts | 3 ++- lib/routes/aflcio/blog.ts | 3 ++- lib/routes/ali213/news.ts | 3 ++- lib/routes/ali213/zl.ts | 3 ++- lib/routes/anytxt/release-notes.ts | 3 ++- lib/routes/asiafruitchina/categories.ts | 3 ++- lib/routes/asiafruitchina/news.ts | 3 ++- lib/routes/bullionvault/gold-news.ts | 3 ++- lib/routes/cccmc/index.ts | 3 ++- lib/routes/cfr/utils.ts | 3 ++- lib/routes/chinacdc/index.ts | 3 ++- lib/routes/chinadaily/language.ts | 3 ++- lib/routes/chinaratings/credit-research.ts | 3 ++- lib/routes/cursor/changelog.ts | 3 ++- lib/routes/diariofruticola/filtro.ts | 3 ++- lib/routes/dytt/index.ts | 3 ++- lib/routes/fangchan/list.ts | 3 ++- lib/routes/gov/moa/gjs.ts | 3 ++- lib/routes/grainoil/category.ts | 3 ++- lib/routes/jisilu/util.ts | 3 ++- lib/routes/joneslanglasalle/index.ts | 3 ++- lib/routes/kpopping/kpics.ts | 3 ++- lib/routes/kpopping/news.ts | 3 ++- lib/routes/lhratings/research.ts | 3 ++- lib/routes/ltaaa/article.ts | 3 ++- lib/routes/mycard520/news.ts | 3 ++- lib/routes/neea/jlpt.ts | 3 ++- lib/routes/oschina/column.ts | 3 ++- lib/routes/oschina/event.ts | 3 ++- lib/routes/papers/category.ts | 3 ++- lib/routes/raspberrypi/magazine.ts | 3 ++- lib/routes/stcn/index.ts | 3 ++- lib/routes/theinitium/app.ts | 3 ++- lib/routes/xjtu/zs.ts | 3 ++- lib/utils/wechat-mp.ts | 3 ++- package.json | 1 + pnpm-lock.yaml | 3 +++ 41 files changed, 82 insertions(+), 39 deletions(-) diff --git a/lib/middleware/parameter.ts b/lib/middleware/parameter.ts index e209578c39aa..096c4c64c62b 100644 --- a/lib/middleware/parameter.ts +++ b/lib/middleware/parameter.ts @@ -1,5 +1,6 @@ import * as entities from 'entities'; -import { load, type CheerioAPI, type Element } from 'cheerio'; +import { load, type CheerioAPI } from 'cheerio'; +import type { Element } from 'domhandler'; import { simplecc } from 'simplecc-wasm'; import ofetch from '@/utils/ofetch'; import { config } from '@/config'; diff --git a/lib/routes/10000link/info.ts b/lib/routes/10000link/info.ts index a1b0b4b33a06..6e88ff538353 100644 --- a/lib/routes/10000link/info.ts +++ b/lib/routes/10000link/info.ts @@ -5,7 +5,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/199it/index.ts b/lib/routes/199it/index.ts index 97c063fc4b5b..2816677eb713 100644 --- a/lib/routes/199it/index.ts +++ b/lib/routes/199it/index.ts @@ -5,7 +5,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/adquan/case-library.ts b/lib/routes/adquan/case-library.ts index 003043fc7389..83cf24e5a7a8 100644 --- a/lib/routes/adquan/case-library.ts +++ b/lib/routes/adquan/case-library.ts @@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/adquan/index.ts b/lib/routes/adquan/index.ts index 6f88d983b7d9..443ede0340b0 100644 --- a/lib/routes/adquan/index.ts +++ b/lib/routes/adquan/index.ts @@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/aflcio/blog.ts b/lib/routes/aflcio/blog.ts index b6dbda09961c..1896c88df55e 100644 --- a/lib/routes/aflcio/blog.ts +++ b/lib/routes/aflcio/blog.ts @@ -4,7 +4,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/ali213/news.ts b/lib/routes/ali213/news.ts index e1e112bdf734..c41d832b9fe2 100644 --- a/lib/routes/ali213/news.ts +++ b/lib/routes/ali213/news.ts @@ -1,6 +1,7 @@ import path from 'node:path'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import { type DataItem, type Route, type Data, ViewType } from '@/types'; diff --git a/lib/routes/ali213/zl.ts b/lib/routes/ali213/zl.ts index 43914b722460..ac72236f3615 100644 --- a/lib/routes/ali213/zl.ts +++ b/lib/routes/ali213/zl.ts @@ -1,6 +1,7 @@ import path from 'node:path'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import { type DataItem, type Route, type Data, ViewType } from '@/types'; diff --git a/lib/routes/anytxt/release-notes.ts b/lib/routes/anytxt/release-notes.ts index 497bec89f374..05e7dac65f35 100644 --- a/lib/routes/anytxt/release-notes.ts +++ b/lib/routes/anytxt/release-notes.ts @@ -3,7 +3,8 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/asiafruitchina/categories.ts b/lib/routes/asiafruitchina/categories.ts index 34035a9af1b0..6eaef7fe3c3d 100644 --- a/lib/routes/asiafruitchina/categories.ts +++ b/lib/routes/asiafruitchina/categories.ts @@ -5,7 +5,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/asiafruitchina/news.ts b/lib/routes/asiafruitchina/news.ts index 8839f88216c9..d4d3ef3561d0 100644 --- a/lib/routes/asiafruitchina/news.ts +++ b/lib/routes/asiafruitchina/news.ts @@ -5,7 +5,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/bullionvault/gold-news.ts b/lib/routes/bullionvault/gold-news.ts index ecef8a97ab6f..71e50c1e0ad1 100644 --- a/lib/routes/bullionvault/gold-news.ts +++ b/lib/routes/bullionvault/gold-news.ts @@ -4,7 +4,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/cccmc/index.ts b/lib/routes/cccmc/index.ts index 6670bf10195b..c0dea34949c7 100644 --- a/lib/routes/cccmc/index.ts +++ b/lib/routes/cccmc/index.ts @@ -4,7 +4,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/cfr/utils.ts b/lib/routes/cfr/utils.ts index 753994413574..2c23064c1f4f 100644 --- a/lib/routes/cfr/utils.ts +++ b/lib/routes/cfr/utils.ts @@ -1,4 +1,5 @@ -import { type Cheerio, type CheerioAPI, type Element, load } from 'cheerio'; +import { type Cheerio, type CheerioAPI, load } from 'cheerio'; +import type { Element } from 'domhandler'; import ofetch from '@/utils/ofetch'; import type { DataItem } from '@/types'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/chinacdc/index.ts b/lib/routes/chinacdc/index.ts index a98d4b2b5a6e..9c625f36ca58 100644 --- a/lib/routes/chinacdc/index.ts +++ b/lib/routes/chinacdc/index.ts @@ -1,6 +1,7 @@ import path from 'node:path'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import { type DataItem, type Route, type Data, ViewType } from '@/types'; diff --git a/lib/routes/chinadaily/language.ts b/lib/routes/chinadaily/language.ts index b861b0a70d92..cbd4508e301d 100644 --- a/lib/routes/chinadaily/language.ts +++ b/lib/routes/chinadaily/language.ts @@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/chinaratings/credit-research.ts b/lib/routes/chinaratings/credit-research.ts index 7aa14528b74a..4dd012758f3f 100644 --- a/lib/routes/chinaratings/credit-research.ts +++ b/lib/routes/chinaratings/credit-research.ts @@ -4,7 +4,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/cursor/changelog.ts b/lib/routes/cursor/changelog.ts index fb6dc40f5f5d..02d482ed6f7d 100644 --- a/lib/routes/cursor/changelog.ts +++ b/lib/routes/cursor/changelog.ts @@ -3,7 +3,8 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/diariofruticola/filtro.ts b/lib/routes/diariofruticola/filtro.ts index 8fe19bc253e3..53c0db625f25 100644 --- a/lib/routes/diariofruticola/filtro.ts +++ b/lib/routes/diariofruticola/filtro.ts @@ -5,7 +5,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/dytt/index.ts b/lib/routes/dytt/index.ts index 9d0cc82f0353..cd5be2a0d4ad 100644 --- a/lib/routes/dytt/index.ts +++ b/lib/routes/dytt/index.ts @@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; const domain: string = 'www.dydytt.net'; diff --git a/lib/routes/fangchan/list.ts b/lib/routes/fangchan/list.ts index 8be42fda7b4a..d9b291829f92 100644 --- a/lib/routes/fangchan/list.ts +++ b/lib/routes/fangchan/list.ts @@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/gov/moa/gjs.ts b/lib/routes/gov/moa/gjs.ts index a4ab19b2207c..d0b4a055123a 100644 --- a/lib/routes/gov/moa/gjs.ts +++ b/lib/routes/gov/moa/gjs.ts @@ -5,7 +5,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/grainoil/category.ts b/lib/routes/grainoil/category.ts index 69419e4d5578..d93d754b6d0e 100644 --- a/lib/routes/grainoil/category.ts +++ b/lib/routes/grainoil/category.ts @@ -4,7 +4,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/jisilu/util.ts b/lib/routes/jisilu/util.ts index 7254beb1c86c..fba4e3600f20 100644 --- a/lib/routes/jisilu/util.ts +++ b/lib/routes/jisilu/util.ts @@ -1,4 +1,5 @@ -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type DataItem } from '@/types'; diff --git a/lib/routes/joneslanglasalle/index.ts b/lib/routes/joneslanglasalle/index.ts index 343bef215293..df4e59cd46dc 100644 --- a/lib/routes/joneslanglasalle/index.ts +++ b/lib/routes/joneslanglasalle/index.ts @@ -1,6 +1,7 @@ import path from 'node:path'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import { type DataItem, type Route, type Data, ViewType } from '@/types'; diff --git a/lib/routes/kpopping/kpics.ts b/lib/routes/kpopping/kpics.ts index e993b2cec800..0cf4746bd475 100644 --- a/lib/routes/kpopping/kpics.ts +++ b/lib/routes/kpopping/kpics.ts @@ -5,7 +5,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/kpopping/news.ts b/lib/routes/kpopping/news.ts index d35f9f37e489..37c9c07c5514 100644 --- a/lib/routes/kpopping/news.ts +++ b/lib/routes/kpopping/news.ts @@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/lhratings/research.ts b/lib/routes/lhratings/research.ts index c24b2887db4c..dd8d0ee5b8db 100644 --- a/lib/routes/lhratings/research.ts +++ b/lib/routes/lhratings/research.ts @@ -3,7 +3,8 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/ltaaa/article.ts b/lib/routes/ltaaa/article.ts index ad7d4755069f..54100997b934 100644 --- a/lib/routes/ltaaa/article.ts +++ b/lib/routes/ltaaa/article.ts @@ -5,7 +5,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/mycard520/news.ts b/lib/routes/mycard520/news.ts index 65c312b3c9a4..f020c44960a6 100644 --- a/lib/routes/mycard520/news.ts +++ b/lib/routes/mycard520/news.ts @@ -4,7 +4,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/neea/jlpt.ts b/lib/routes/neea/jlpt.ts index 47f73b9a2f40..27618481e873 100644 --- a/lib/routes/neea/jlpt.ts +++ b/lib/routes/neea/jlpt.ts @@ -4,7 +4,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/oschina/column.ts b/lib/routes/oschina/column.ts index 65c3b7971c9d..2de32318d511 100644 --- a/lib/routes/oschina/column.ts +++ b/lib/routes/oschina/column.ts @@ -1,6 +1,7 @@ import path from 'node:path'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import { type DataItem, type Route, type Data, ViewType } from '@/types'; diff --git a/lib/routes/oschina/event.ts b/lib/routes/oschina/event.ts index 755c5e0e5cf8..ca4d29319724 100644 --- a/lib/routes/oschina/event.ts +++ b/lib/routes/oschina/event.ts @@ -5,7 +5,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/papers/category.ts b/lib/routes/papers/category.ts index 9a980e050b41..9e81da756cec 100644 --- a/lib/routes/papers/category.ts +++ b/lib/routes/papers/category.ts @@ -5,7 +5,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/raspberrypi/magazine.ts b/lib/routes/raspberrypi/magazine.ts index 39d9264e414c..746a166ed262 100644 --- a/lib/routes/raspberrypi/magazine.ts +++ b/lib/routes/raspberrypi/magazine.ts @@ -5,7 +5,8 @@ import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; import path from 'node:path'; diff --git a/lib/routes/stcn/index.ts b/lib/routes/stcn/index.ts index 86c058bf07f3..764a44878f42 100644 --- a/lib/routes/stcn/index.ts +++ b/lib/routes/stcn/index.ts @@ -5,7 +5,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/routes/theinitium/app.ts b/lib/routes/theinitium/app.ts index 20d7219736da..6a4c7a68f67c 100644 --- a/lib/routes/theinitium/app.ts +++ b/lib/routes/theinitium/app.ts @@ -1,7 +1,8 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { load, type CheerioAPI, type Element } from 'cheerio'; +import { load, type CheerioAPI } from 'cheerio'; +import type { Element } from 'domhandler'; import { art } from '@/utils/render'; import path from 'node:path'; import { config } from '@/config'; diff --git a/lib/routes/xjtu/zs.ts b/lib/routes/xjtu/zs.ts index 2beb8544f591..00ec62740267 100644 --- a/lib/routes/xjtu/zs.ts +++ b/lib/routes/xjtu/zs.ts @@ -5,7 +5,8 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type CheerioAPI, type Cheerio, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { type Context } from 'hono'; export const handler = async (ctx: Context): Promise => { diff --git a/lib/utils/wechat-mp.ts b/lib/utils/wechat-mp.ts index 93545d9390ad..a8ab609ad06f 100644 --- a/lib/utils/wechat-mp.ts +++ b/lib/utils/wechat-mp.ts @@ -26,7 +26,8 @@ */ import ofetch from '@/utils/ofetch'; -import { type Cheerio, type CheerioAPI, type Element, load } from 'cheerio'; +import { type Cheerio, type CheerioAPI, load } from 'cheerio'; +import type { Element } from 'domhandler'; import { parseDate } from '@/utils/parse-date'; import cache from '@/utils/cache'; import logger from '@/utils/logger'; diff --git a/package.json b/package.json index cf993d59ddda..bf1c173722e8 100644 --- a/package.json +++ b/package.json @@ -172,6 +172,7 @@ "@vercel/nft": "0.29.2", "@vitest/coverage-v8": "2.1.9", "discord-api-types": "0.38.3", + "domhandler": "5.0.3", "eslint": "9.26.0", "eslint-config-prettier": "10.1.2", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8ba75a56a97d..7cacdbc4ba6a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -383,6 +383,9 @@ importers: discord-api-types: specifier: 0.38.3 version: 0.38.3 + domhandler: + specifier: 5.0.3 + version: 5.0.3 eslint: specifier: 9.26.0 version: 9.26.0(jiti@2.4.2) From 8a394dd9667f131a31e63b97578eb67388a0ce87 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Wed, 7 May 2025 10:19:42 +0800 Subject: [PATCH 0556/2658] chore(route/youtube): add youtube community posts --- lib/routes/youtube/community.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/youtube/community.ts b/lib/routes/youtube/community.ts index 6fbebed8241e..b63c4ab2711d 100644 --- a/lib/routes/youtube/community.ts +++ b/lib/routes/youtube/community.ts @@ -9,7 +9,7 @@ import { isYouTubeChannelId } from './utils'; export const route: Route = { path: '/community/:handle', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/youtube/community/@JFlaMusic', parameters: { handle: 'YouTube handles or channel id' }, name: 'Community', From 05b77deb0f5e64cca0e05a1824ad90d1c4129ab5 Mon Sep 17 00:00:00 2001 From: Unknown <20671600+wakou@users.noreply.github.com> Date: Wed, 7 May 2025 14:52:53 +0800 Subject: [PATCH 0557/2658] =?UTF-8?q?fix(route/hpoi/info):=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BA=86=E9=A1=B5=E9=9D=A2=E8=A7=A3=E6=9E=90=E9=80=BB?= =?UTF-8?q?=E8=BE=91=20(#19009)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(route/hpoi/info): use query param to avoid fetcherror * fix(route/hpoi/info): update site parse function * Update lib/routes/hpoi/info.ts fix variable name which forget modify Co-authored-by: Tony * Update lib/routes/hpoi/info.ts Co-authored-by: Tony --------- --- lib/routes/hpoi/info.ts | 119 +++++++++++++++++++++++++++------------- 1 file changed, 81 insertions(+), 38 deletions(-) diff --git a/lib/routes/hpoi/info.ts b/lib/routes/hpoi/info.ts index 3af1556191ea..fbe7cea5f088 100644 --- a/lib/routes/hpoi/info.ts +++ b/lib/routes/hpoi/info.ts @@ -4,19 +4,29 @@ import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; export const route: Route = { - path: '/info/:type?', + path: '/info/:type?/:catType?', categories: ['anime'], - example: '/hpoi/info/all', + example: '/hpoi/info/all/hobby|model', parameters: { type: { - description: '分类', + description: '情报类型', options: [ { value: 'all', label: '全部' }, - { value: 'hobby', label: '手办' }, - { value: 'model', label: '模型' }, + { value: 'confirm', label: '制作' }, + { value: 'official_pic', label: '官图更新' }, + { value: 'preorder', label: '开订' }, + { value: 'delay', label: '延期' }, + { value: 'release', label: '出荷' }, + { value: 'reorder', label: '再版' }, + { value: 'hobby', label: '手办(拟废弃, 无效果)' }, + { value: 'model', label: '动漫模型(拟废弃, 无效果)' }, ], default: 'all', }, + catType: { + description: '手办分类过滤, 使用|分割, 支持的分类见下表', + default: 'all', + }, }, features: { requireConfig: false, @@ -28,53 +38,86 @@ export const route: Route = { }, name: '情报', maintainers: ['sanmmm DIYgod'], + description: `::: tip + 情报类型中的*手办*、*模型*只是为了兼容, 实际效果等同于**全部**, 如果只需要**手办**类型的情报, 可以使用参数*catType*, e.g. /hpoi/info/all/hobby +::: + +| 手办 | 动漫模型 | 真实模型 | 毛绒布偶 | doll娃娃 | GK/其他 | +| ------ | ------- | ------- | ------- | ------- | ------ | +| hobby | model | real | moppet | doll | gkdiy |`, handler, }; async function handler(ctx) { - const { type = 'all' } = ctx.req.param(); + const { type = 'all', catType = 'all' } = ctx.req.param(); const baseUrl = 'https://www.hpoi.net'; const reqUrl = `${baseUrl}/user/home/ajax`; - const response = await got.post(reqUrl, { - form: { - page: 1, - type: 'info', - catType: type, - }, - }); + + const classMap = { + all: '全部', + hobby: '手办', + model: '动漫模型', + real: '真实模型', + moppet: '毛绒布偶', + doll: 'doll娃娃', + gkdiy: 'GK/其他', + }; + + const filterArr = catType.split('|').sort(); + + const filterSet = new Set(filterArr.map((e: string) => classMap[e])); + if (catType.includes('all')) { + filterSet.clear(); + } + + let finalType = type; + if (['hobby', 'model'].includes(type)) { + finalType = 'all'; + } + + const url = `${reqUrl}?page=1&type=info&subType=${finalType}`; + const response = await got.post(url); + const $ = load(response.data); - const items = $('.home-info') - .toArray() - .map((ele) => { - const $item = load(ele); - const leftNode = $item('.overlay-container'); - const relativeLink = leftNode.find('a').first().attr('href'); - const typeName = leftNode.find('.type-name').first().text(); - const imgUrl = leftNode.find('img').first().attr('src'); - const rightNode = $item('.home-info-content'); - const infoType = rightNode.find('.user-name').contents()[0].data; - const infoTitle = rightNode.find('.user-content').text(); - const infoTime = rightNode.find('.type-time').text(); - return { - title: infoTitle, - pubDate: parseRelativeDate(infoTime), - link: `${baseUrl}/${relativeLink}`, - category: infoType, - description: [`类型:${typeName}`, infoTitle, `更新内容: ${infoType}`, ``].join('
    '), - }; - }); + const items = $('.home-info').toArray().map((ele) => { + const $item = load(ele); + const leftNode = $item('.overlay-container'); + const relativeLink = leftNode.find('a').first().attr('href'); + const typeName = leftNode.find('.type-name').first().text().trim(); + const imgUrl = leftNode.find('img').first().attr('src'); + const rightNode = $item('.home-info-content'); + const infoType = rightNode.find('.user-name').contents()[0].data.trim(); + const infoTitle = rightNode.find('.user-content').text(); + const infoTime = rightNode.find('.type-time').text(); + return { + title: infoTitle, + pubDate: parseRelativeDate(infoTime), + link: `${baseUrl}/${relativeLink}`, + category: infoType, + typeName, + description: [`类型:${typeName}`, infoTitle, `更新内容: ${infoType}`, ``].join('
    '), + }; + }); + + const items2 = filterSet.size > 0 ? items.filter((e) => filterSet.has(e.typeName)) : items; const typeToLabel = { all: '全部', - hobby: '手办', - model: '模型', + confirm: '制作', + official_pic: '官图更新', + preorder: '开订', + delay: '延期', + release: '出荷', + reorder: '再版', }; - const title = `手办维基 - 情报 - ${typeToLabel[type]}`; + const title = `手办维基 - 情报 - ${typeToLabel[finalType]}`; + const catTypeName = filterSet.size > 0 ? filterArr.join('|') : 'all'; return { title, - link: `${baseUrl}/user/home?type=info&catType=${type}`, + link: `${baseUrl}/user/home?type=info&subType=${type}&catType=${catTypeName}`, description: title, - item: items, + item: items2, + allowEmpty: true, }; } From 33a651b6895141fd05d0747d703b5cf74544a2d5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 06:55:15 +0000 Subject: [PATCH 0558/2658] style: auto format --- lib/routes/hpoi/info.ts | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/lib/routes/hpoi/info.ts b/lib/routes/hpoi/info.ts index fbe7cea5f088..a03137311d5e 100644 --- a/lib/routes/hpoi/info.ts +++ b/lib/routes/hpoi/info.ts @@ -80,25 +80,27 @@ async function handler(ctx) { const $ = load(response.data); - const items = $('.home-info').toArray().map((ele) => { - const $item = load(ele); - const leftNode = $item('.overlay-container'); - const relativeLink = leftNode.find('a').first().attr('href'); - const typeName = leftNode.find('.type-name').first().text().trim(); - const imgUrl = leftNode.find('img').first().attr('src'); - const rightNode = $item('.home-info-content'); - const infoType = rightNode.find('.user-name').contents()[0].data.trim(); - const infoTitle = rightNode.find('.user-content').text(); - const infoTime = rightNode.find('.type-time').text(); - return { - title: infoTitle, - pubDate: parseRelativeDate(infoTime), - link: `${baseUrl}/${relativeLink}`, - category: infoType, - typeName, - description: [`类型:${typeName}`, infoTitle, `更新内容: ${infoType}`, ``].join('
    '), - }; - }); + const items = $('.home-info') + .toArray() + .map((ele) => { + const $item = load(ele); + const leftNode = $item('.overlay-container'); + const relativeLink = leftNode.find('a').first().attr('href'); + const typeName = leftNode.find('.type-name').first().text().trim(); + const imgUrl = leftNode.find('img').first().attr('src'); + const rightNode = $item('.home-info-content'); + const infoType = rightNode.find('.user-name').contents()[0].data.trim(); + const infoTitle = rightNode.find('.user-content').text(); + const infoTime = rightNode.find('.type-time').text(); + return { + title: infoTitle, + pubDate: parseRelativeDate(infoTime), + link: `${baseUrl}/${relativeLink}`, + category: infoType, + typeName, + description: [`类型:${typeName}`, infoTitle, `更新内容: ${infoType}`, ``].join('
    '), + }; + }); const items2 = filterSet.size > 0 ? items.filter((e) => filterSet.has(e.typeName)) : items; From 77de90974b8416a6e5ea4f52ef729d49b84f4799 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 18:47:18 +0800 Subject: [PATCH 0559/2658] chore(deps-dev): bump globals from 16.0.0 to 16.1.0 (#19040) Bumps [globals](https://github.com/sindresorhus/globals) from 16.0.0 to 16.1.0. - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v16.0.0...v16.1.0) --- updated-dependencies: - dependency-name: globals dependency-version: 16.1.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 57 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 48 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index bf1c173722e8..4278fc818234 100644 --- a/package.json +++ b/package.json @@ -181,7 +181,7 @@ "eslint-plugin-unicorn": "59.0.1", "eslint-plugin-yml": "1.18.0", "fs-extra": "11.3.0", - "globals": "16.0.0", + "globals": "16.1.0", "got": "14.4.7", "husky": "9.1.7", "js-beautify": "1.15.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7cacdbc4ba6a..a56894c6cb0c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -411,8 +411,8 @@ importers: specifier: 11.3.0 version: 11.3.0 globals: - specifier: 16.0.0 - version: 16.0.0 + specifier: 16.1.0 + version: 16.1.0 got: specifier: 14.4.7 version: 14.4.7 @@ -494,6 +494,10 @@ packages: resolution: {integrity: sha512-Q+E+rd/yBzNQhXkG+zQnF58e4zoZfBedaxwzPmicKsiK3nt8iJYrSrDbjwFFDGC4f+rPafqRaPH6TsDoSvMf7A==} engines: {node: '>=6.9.0'} + '@babel/compat-data@7.27.2': + resolution: {integrity: sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==} + engines: {node: '>=6.9.0'} + '@babel/core@7.26.10': resolution: {integrity: sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==} engines: {node: '>=6.9.0'} @@ -514,6 +518,10 @@ packages: resolution: {integrity: sha512-2YaDd/Rd9E598B5+WIc8wJPmWETiiJXFYVE60oX8FDohv7rAUU3CQj+A1MgeEmcsk2+dQuEjIe/GDvig0SqL4g==} engines: {node: '>=6.9.0'} + '@babel/helper-compilation-targets@7.27.2': + resolution: {integrity: sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-create-class-features-plugin@7.27.1': resolution: {integrity: sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==} engines: {node: '>=6.9.0'} @@ -607,6 +615,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.27.2': + resolution: {integrity: sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.27.1': resolution: {integrity: sha512-QPG3C9cCVRQLxAVwmefEmwdTanECuUBMQZ/ym5kiw3XKCGA7qkuQLcjWWHcrD/GKbn/WmJwaezfuuAOcyKlRPA==} engines: {node: '>=6.9.0'} @@ -1004,6 +1017,10 @@ packages: resolution: {integrity: sha512-Fyo3ghWMqkHHpHQCoBs2VnYjR4iWFFjguTDEqA5WgZDOrFesVjMhMM2FSqTKSoUSDO1VQtavj8NFpdRBEvJTtg==} engines: {node: '>=6.9.0'} + '@babel/template@7.27.2': + resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} + engines: {node: '>=6.9.0'} + '@babel/traverse@7.27.1': resolution: {integrity: sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==} engines: {node: '>=6.9.0'} @@ -3992,8 +4009,8 @@ packages: resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} engines: {node: '>=18'} - globals@16.0.0: - resolution: {integrity: sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==} + globals@16.1.0: + resolution: {integrity: sha512-aibexHNbb/jiUSObBgpHLj+sIuUmJnYcgXBlrfsiDZ9rt4aF2TFRbyLgZ2iFQuVZ1K5Mx3FVkbKRSgKrbK3K2g==} engines: {node: '>=18'} globrex@0.1.2: @@ -6677,16 +6694,18 @@ snapshots: '@babel/compat-data@7.27.1': {} + '@babel/compat-data@7.27.2': {} + '@babel/core@7.26.10': dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.27.1 '@babel/generator': 7.27.1 - '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) '@babel/helpers': 7.27.1 - '@babel/parser': 7.27.1 - '@babel/template': 7.27.1 + '@babel/parser': 7.27.2 + '@babel/template': 7.27.2 '@babel/traverse': 7.27.1 '@babel/types': 7.27.1 convert-source-map: 2.0.0 @@ -6725,6 +6744,14 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 + '@babel/helper-compilation-targets@7.27.2': + dependencies: + '@babel/compat-data': 7.27.2 + '@babel/helper-validator-option': 7.27.1 + browserslist: 4.24.5 + lru-cache: 5.1.1 + semver: 6.3.1 + '@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 @@ -6828,7 +6855,7 @@ snapshots: '@babel/helpers@7.27.1': dependencies: - '@babel/template': 7.27.1 + '@babel/template': 7.27.2 '@babel/types': 7.27.1 '@babel/highlight@7.25.9': @@ -6846,6 +6873,10 @@ snapshots: dependencies: '@babel/types': 7.27.1 + '@babel/parser@7.27.2': + dependencies: + '@babel/types': 7.27.1 + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 @@ -7344,6 +7375,12 @@ snapshots: '@babel/parser': 7.27.1 '@babel/types': 7.27.1 + '@babel/template@7.27.2': + dependencies: + '@babel/code-frame': 7.27.1 + '@babel/parser': 7.27.2 + '@babel/types': 7.27.1 + '@babel/traverse@7.27.1': dependencies: '@babel/code-frame': 7.27.1 @@ -10004,7 +10041,7 @@ snapshots: eslint: 9.26.0(jiti@2.4.2) esquery: 1.6.0 find-up-simple: 1.0.1 - globals: 16.0.0 + globals: 16.1.0 indent-string: 5.0.0 is-builtin-module: 5.0.0 jsesc: 3.1.0 @@ -10523,7 +10560,7 @@ snapshots: globals@15.15.0: {} - globals@16.0.0: {} + globals@16.1.0: {} globrex@0.1.2: {} From 588968b97676a2325bfca36989789bafe1745809 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 18:51:54 +0800 Subject: [PATCH 0560/2658] chore(deps-dev): bump @types/mailparser from 3.4.5 to 3.4.6 (#19036) Bumps [@types/mailparser](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mailparser) from 3.4.5 to 3.4.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mailparser) --- updated-dependencies: - dependency-name: "@types/mailparser" dependency-version: 3.4.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 4278fc818234..3eb14ed78379 100644 --- a/package.json +++ b/package.json @@ -159,7 +159,7 @@ "@types/json-bigint": "1.0.4", "@types/jsrsasign": "10.5.13", "@types/lint-staged": "13.3.0", - "@types/mailparser": "3.4.5", + "@types/mailparser": "3.4.6", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", "@types/node": "22.15.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a56894c6cb0c..5943a7fda376 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -345,8 +345,8 @@ importers: specifier: 13.3.0 version: 13.3.0 '@types/mailparser': - specifier: 3.4.5 - version: 3.4.5 + specifier: 3.4.6 + version: 3.4.6 '@types/markdown-it': specifier: 14.1.2 version: 14.1.2 @@ -2441,8 +2441,8 @@ packages: '@types/lint-staged@13.3.0': resolution: {integrity: sha512-WxGjVP+rA4OJlEdbZdT9MS9PFKQ7kVPhLn26gC+2tnBWBEFEj/KW+IbFfz6sxdxY5U6V7BvyF+3BzCGsAMHhNg==} - '@types/mailparser@3.4.5': - resolution: {integrity: sha512-EPERBp7fLeFZh7tS2X36MF7jawUx3Y6/0rXciZah3CTYgwLi3e0kpGUJ6FOmUabgzis/U1g+3/JzrVWbWIOGjg==} + '@types/mailparser@3.4.6': + resolution: {integrity: sha512-wVV3cnIKzxTffaPH8iRnddX1zahbYB1ZEoAxyhoBo3TBCBuK6nZ8M8JYO/RhsCuuBVOw/DEN/t/ENbruwlxn6Q==} '@types/markdown-it@14.1.2': resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} @@ -8732,7 +8732,7 @@ snapshots: '@types/lint-staged@13.3.0': {} - '@types/mailparser@3.4.5': + '@types/mailparser@3.4.6': dependencies: '@types/node': 22.15.12 iconv-lite: 0.6.3 From ebc3c1a8a37b70a00413f35f5420a66b177c915f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 18:52:18 +0800 Subject: [PATCH 0561/2658] chore(deps-dev): bump @types/node from 22.15.12 to 22.15.14 (#19039) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.12 to 22.15.14. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.15.14 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 78 +++++++++++++++++++++++++------------------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index 3eb14ed78379..cc23a0d66924 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "@types/mailparser": "3.4.6", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.15.12", + "@types/node": "22.15.14", "@types/sanitize-html": "2.16.0", "@types/supertest": "6.0.3", "@types/title": "3.4.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5943a7fda376..abc592f0d5b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -354,8 +354,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.15.12 - version: 22.15.12 + specifier: 22.15.14 + version: 22.15.14 '@types/sanitize-html': specifier: 2.16.0 version: 2.16.0 @@ -379,7 +379,7 @@ importers: version: 0.29.2(rollup@4.37.0) '@vitest/coverage-v8': specifier: 2.1.9 - version: 2.1.9(vitest@2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3))) + version: 2.1.9(vitest@2.1.9(@types/node@22.15.14)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3))) discord-api-types: specifier: 0.38.3 version: 0.38.3 @@ -457,10 +457,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.12)(lightningcss@1.29.3)) + version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.14)(lightningcss@1.29.3)) vitest: specifier: 2.1.9 - version: 2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) + version: 2.1.9(@types/node@22.15.14)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) yaml-eslint-parser: specifier: 1.3.0 version: 1.3.0 @@ -2468,8 +2468,8 @@ packages: '@types/mysql@2.15.26': resolution: {integrity: sha512-DSLCOXhkvfS5WNNPbfn2KdICAmk8lLc+/PNvnPnF7gOdMZCxopXduqv0OQ13y/yA/zXTSikZZqVgybUxOEg6YQ==} - '@types/node@22.15.12': - resolution: {integrity: sha512-K0fpC/ZVeb8G9rm7bH7vI0KAec4XHEhBam616nVJCV51bKzJ6oA3luG4WdKoaztxe70QaNjS/xBmcDLmr4PiGw==} + '@types/node@22.15.14': + resolution: {integrity: sha512-BL1eyu/XWsFGTtDWOYULQEs4KR0qdtYfCxYAUYRoB7JP7h9ETYLgQTww6kH8Sj2C0pFGgrpM0XKv6/kbIzYJ1g==} '@types/pg-pool@2.0.6': resolution: {integrity: sha512-TaAUE5rq2VQYxab5Ts7WZhKNmuN78Q6PiFonTDdpbx8a1H0M1vhy3rhiMjl+e2iHmogyMw7jZF4FrE6eJUy5HQ==} @@ -7766,7 +7766,7 @@ snapshots: '@inquirer/figures': 1.0.11 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.15.12 + '@types/node': 22.15.14 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -8672,7 +8672,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 '@types/cookie@0.6.0': {} @@ -8695,12 +8695,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.15.12 + '@types/node': 22.15.14 '@types/html-to-text@9.0.4': {} @@ -8708,13 +8708,13 @@ snapshots: '@types/imapflow@1.0.21': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -8724,7 +8724,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 '@types/jsrsasign@10.5.13': {} @@ -8734,7 +8734,7 @@ snapshots: '@types/mailparser@3.4.6': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -8756,13 +8756,13 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 '@types/mysql@2.15.26': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 - '@types/node@22.15.12': + '@types/node@22.15.14': dependencies: undici-types: 6.21.0 @@ -8772,7 +8772,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 pg-protocol: 1.9.5 pg-types: 2.2.0 @@ -8784,7 +8784,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.15.12 + '@types/node': 22.15.14 '@types/tough-cookie': 4.0.5 form-data: 2.5.3 @@ -8800,7 +8800,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.15.12 + '@types/node': 22.15.14 form-data: 4.0.2 '@types/supertest@6.0.3': @@ -8810,7 +8810,7 @@ snapshots: '@types/tedious@4.0.14': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 '@types/title@3.4.3': {} @@ -8826,7 +8826,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 optional: true '@typescript-eslint/eslint-plugin@8.32.0(@typescript-eslint/parser@8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': @@ -8968,7 +8968,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)))': + '@vitest/coverage-v8@2.1.9(vitest@2.1.9(@types/node@22.15.14)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -8982,7 +8982,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) + vitest: 2.1.9(@types/node@22.15.14)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) transitivePeerDependencies: - supports-color @@ -8993,14 +8993,14 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.12)(lightningcss@1.29.3))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.14)(lightningcss@1.29.3))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.3(typescript@5.8.3) - vite: 5.4.15(@types/node@22.15.12)(lightningcss@1.29.3) + vite: 5.4.15(@types/node@22.15.14)(lightningcss@1.29.3) '@vitest/pretty-format@2.1.9': dependencies: @@ -12077,7 +12077,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.15.12 + '@types/node': 22.15.14 long: 5.3.1 proxy-addr@2.0.7: @@ -13141,13 +13141,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.9(@types/node@22.15.12)(lightningcss@1.29.3): + vite-node@2.1.9(@types/node@22.15.14)(lightningcss@1.29.3): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.15(@types/node@22.15.12)(lightningcss@1.29.3) + vite: 5.4.15(@types/node@22.15.14)(lightningcss@1.29.3) transitivePeerDependencies: - '@types/node' - less @@ -13159,31 +13159,31 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.12)(lightningcss@1.29.3)): + vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.14)(lightningcss@1.29.3)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.3) optionalDependencies: - vite: 5.4.15(@types/node@22.15.12)(lightningcss@1.29.3) + vite: 5.4.15(@types/node@22.15.14)(lightningcss@1.29.3) transitivePeerDependencies: - supports-color - typescript - vite@5.4.15(@types/node@22.15.12)(lightningcss@1.29.3): + vite@5.4.15(@types/node@22.15.14)(lightningcss@1.29.3): dependencies: esbuild: 0.21.5 postcss: 8.5.3 rollup: 4.37.0 optionalDependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 fsevents: 2.3.3 lightningcss: 1.29.3 - vitest@2.1.9(@types/node@22.15.12)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)): + vitest@2.1.9(@types/node@22.15.14)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.12)(lightningcss@1.29.3)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.14)(lightningcss@1.29.3)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -13199,11 +13199,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.15(@types/node@22.15.12)(lightningcss@1.29.3) - vite-node: 2.1.9(@types/node@22.15.12)(lightningcss@1.29.3) + vite: 5.4.15(@types/node@22.15.14)(lightningcss@1.29.3) + vite-node: 2.1.9(@types/node@22.15.14)(lightningcss@1.29.3) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.15.12 + '@types/node': 22.15.14 jsdom: 26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 2f58f974961a69374364eb1b8fb8b35feea4a7e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 18:52:40 +0800 Subject: [PATCH 0562/2658] chore(deps-dev): bump eslint-config-prettier from 10.1.2 to 10.1.3 (#19038) Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 10.1.2 to 10.1.3. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v10.1.2...v10.1.3) --- updated-dependencies: - dependency-name: eslint-config-prettier dependency-version: 10.1.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index cc23a0d66924..b7bddbdae189 100644 --- a/package.json +++ b/package.json @@ -174,7 +174,7 @@ "discord-api-types": "0.38.3", "domhandler": "5.0.3", "eslint": "9.26.0", - "eslint-config-prettier": "10.1.2", + "eslint-config-prettier": "10.1.3", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.17.0", "eslint-plugin-prettier": "5.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index abc592f0d5b9..425834a0f36b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -390,8 +390,8 @@ importers: specifier: 9.26.0 version: 9.26.0(jiti@2.4.2) eslint-config-prettier: - specifier: 10.1.2 - version: 10.1.2(eslint@9.26.0(jiti@2.4.2)) + specifier: 10.1.3 + version: 10.1.3(eslint@9.26.0(jiti@2.4.2)) eslint-nibble: specifier: 8.1.0 version: 8.1.0(patch_hash=w5z6jxwjps4t4gxnmmngw67gmm)(eslint@9.26.0(jiti@2.4.2)) @@ -400,7 +400,7 @@ importers: version: 17.17.0(eslint@9.26.0(jiti@2.4.2)) eslint-plugin-prettier: specifier: 5.4.0 - version: 5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3) + version: 5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@10.1.3(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3) eslint-plugin-unicorn: specifier: 59.0.1 version: 59.0.1(eslint@9.26.0(jiti@2.4.2)) @@ -3567,8 +3567,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-prettier@10.1.2: - resolution: {integrity: sha512-Epgp/EofAUeEpIdZkW60MHKvPyru1ruQJxPL+WIycnaPApuseK0Zpkrh/FwL9oIpQvIhJwV7ptOy0DWUjTlCiA==} + eslint-config-prettier@10.1.3: + resolution: {integrity: sha512-vDo4d9yQE+cS2tdIT4J02H/16veRvkHgiLDRpej+WL67oCfbOb97itZXn8wMPJ/GsiEBVjrjs//AVNw2Cp1EcA==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -9973,7 +9973,7 @@ snapshots: eslint: 9.26.0(jiti@2.4.2) semver: 7.7.1 - eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)): + eslint-config-prettier@10.1.3(eslint@9.26.0(jiti@2.4.2)): dependencies: eslint: 9.26.0(jiti@2.4.2) @@ -10020,7 +10020,7 @@ snapshots: minimatch: 9.0.5 semver: 7.7.1 - eslint-plugin-prettier@5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@10.1.2(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3): + eslint-plugin-prettier@5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@10.1.3(eslint@9.26.0(jiti@2.4.2)))(eslint@9.26.0(jiti@2.4.2))(prettier@3.5.3): dependencies: eslint: 9.26.0(jiti@2.4.2) prettier: 3.5.3 @@ -10028,7 +10028,7 @@ snapshots: synckit: 0.11.4 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.2(eslint@9.26.0(jiti@2.4.2)) + eslint-config-prettier: 10.1.3(eslint@9.26.0(jiti@2.4.2)) eslint-plugin-unicorn@59.0.1(eslint@9.26.0(jiti@2.4.2)): dependencies: From fc46b94362d15614d4967eca40970c738634bc6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 18:53:39 +0800 Subject: [PATCH 0563/2658] chore(deps-dev): bump @babel/preset-env from 7.27.1 to 7.27.2 (#19041) Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.27.1 to 7.27.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.27.2/packages/babel-preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-version: 7.27.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 101 ++++++++++++++++++------------------------------- 2 files changed, 38 insertions(+), 65 deletions(-) diff --git a/package.json b/package.json index b7bddbdae189..543ddbda1175 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "zod": "3.24.4" }, "devDependencies": { - "@babel/preset-env": "7.27.1", + "@babel/preset-env": "7.27.2", "@babel/preset-typescript": "7.27.1", "@bbob/types": "4.2.0", "@eslint/eslintrc": "3.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 425834a0f36b..e2ef72813a3f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -285,8 +285,8 @@ importers: version: 3.24.4 devDependencies: '@babel/preset-env': - specifier: 7.27.1 - version: 7.27.1(@babel/core@7.26.10) + specifier: 7.27.2 + version: 7.27.2(@babel/core@7.26.10) '@babel/preset-typescript': specifier: 7.27.1 version: 7.27.1(@babel/core@7.26.10) @@ -490,8 +490,8 @@ packages: resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.27.1': - resolution: {integrity: sha512-Q+E+rd/yBzNQhXkG+zQnF58e4zoZfBedaxwzPmicKsiK3nt8iJYrSrDbjwFFDGC4f+rPafqRaPH6TsDoSvMf7A==} + '@babel/compat-data@7.27.2': + resolution: {integrity: sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==} engines: {node: '>=6.9.0'} '@babel/compat-data@7.27.2': @@ -514,8 +514,8 @@ packages: resolution: {integrity: sha512-WnuuDILl9oOBbKnb4L+DyODx7iC47XfzmNCpTttFsSp6hTG7XZxu60+4IO+2/hPfcGOoKbFiwoI/+zwARbNQow==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.27.1': - resolution: {integrity: sha512-2YaDd/Rd9E598B5+WIc8wJPmWETiiJXFYVE60oX8FDohv7rAUU3CQj+A1MgeEmcsk2+dQuEjIe/GDvig0SqL4g==} + '@babel/helper-compilation-targets@7.27.2': + resolution: {integrity: sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==} engines: {node: '>=6.9.0'} '@babel/helper-compilation-targets@7.27.2': @@ -610,8 +610,8 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/parser@7.27.1': - resolution: {integrity: sha512-I0dZ3ZpCrJ1c04OqlNsQcKiZlsrXf/kkE4FXzID9rIOYICsAbA8mMDzhW/luRNAHdCNt7os/u8wenklZDlUVUQ==} + '@babel/parser@7.27.2': + resolution: {integrity: sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==} engines: {node: '>=6.0.0'} hasBin: true @@ -866,8 +866,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-rest-spread@7.27.1': - resolution: {integrity: sha512-/sSliVc9gHE20/7D5qsdGlq7RG5NCDTWsAhyqzGuq174EtWJoGzIu1BQ7G56eDsTcy1jseBZwv50olSdXOlGuA==} + '@babel/plugin-transform-object-rest-spread@7.27.2': + resolution: {integrity: sha512-AIUHD7xJ1mCrj3uPozvtngY3s0xpv7Nu7DoUSnzNY6Xam1Cy4rUznR//pvMHOhQ4AvbCexhbqXCtpxGHOGOO6g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -992,8 +992,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/preset-env@7.27.1': - resolution: {integrity: sha512-TZ5USxFpLgKDpdEt8YWBR7p6g+bZo6sHaXLqP2BY/U0acaoI8FTVflcYCr/v94twM1C5IWFdZ/hscq9WjUeLXA==} + '@babel/preset-env@7.27.2': + resolution: {integrity: sha512-Ma4zSuYSlGNRlCLO+EAzLnCmJK2vdstgv+n7aUP+/IKZrOfWHOJVdSJtuub8RzHTj3ahD37k5OKJWvzf16TQyQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1013,8 +1013,8 @@ packages: resolution: {integrity: sha512-89TgomkhiBKJ1QN/zPJbSW6M3T9caLoSDYsHFNlTI2Q+T12w8ehZeEnx54I79gB0kmM+etCC5Lfgv95rYUJPdQ==} engines: {node: '>=6.9.0'} - '@babel/template@7.27.1': - resolution: {integrity: sha512-Fyo3ghWMqkHHpHQCoBs2VnYjR4iWFFjguTDEqA5WgZDOrFesVjMhMM2FSqTKSoUSDO1VQtavj8NFpdRBEvJTtg==} + '@babel/template@7.27.2': + resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} engines: {node: '>=6.9.0'} '@babel/template@7.27.2': @@ -2882,11 +2882,6 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.24.4: - resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - browserslist@4.24.5: resolution: {integrity: sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -2951,9 +2946,6 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001716: - resolution: {integrity: sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==} - caniuse-lite@1.0.30001717: resolution: {integrity: sha512-auPpttCq6BDEG8ZAuHJIplGw6GODhjw+/11e7IjpnYCxZcW/ONgPs0KVBJ0d1bY3e2+7PRe5RCLyP+PfwVgkYw==} @@ -3438,9 +3430,6 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.148: - resolution: {integrity: sha512-8uc1QXwwqayD4mblcsQYZqoi+cOc97A2XmKSBOIRbEAvbp6vrqmSYs4dHD2qVygUgn7Mi0qdKgPaJ9WC8cv63A==} - electron-to-chromium@1.5.150: resolution: {integrity: sha512-rOOkP2ZUMx1yL4fCxXQKDHQ8ZXwisb2OycOQVKHgvB3ZI4CvehOd4y2tfnnLDieJ3Zs1RL1Dlp3cMkyIn7nnXA==} @@ -6692,7 +6681,7 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/compat-data@7.27.1': {} + '@babel/compat-data@7.27.2': {} '@babel/compat-data@7.27.2': {} @@ -6726,7 +6715,7 @@ snapshots: '@babel/generator@7.27.1': dependencies: - '@babel/parser': 7.27.1 + '@babel/parser': 7.27.2 '@babel/types': 7.27.1 '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 @@ -6736,11 +6725,11 @@ snapshots: dependencies: '@babel/types': 7.27.1 - '@babel/helper-compilation-targets@7.27.1': + '@babel/helper-compilation-targets@7.27.2': dependencies: - '@babel/compat-data': 7.27.1 + '@babel/compat-data': 7.27.2 '@babel/helper-validator-option': 7.27.1 - browserslist: 4.24.4 + browserslist: 4.24.5 lru-cache: 5.1.1 semver: 6.3.1 @@ -6775,7 +6764,7 @@ snapshots: '@babel/helper-define-polyfill-provider@0.6.4(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 debug: 4.4.0 lodash.debounce: 4.0.8 @@ -6847,7 +6836,7 @@ snapshots: '@babel/helper-wrap-function@7.27.1': dependencies: - '@babel/template': 7.27.1 + '@babel/template': 7.27.2 '@babel/traverse': 7.27.1 '@babel/types': 7.27.1 transitivePeerDependencies: @@ -6869,7 +6858,7 @@ snapshots: dependencies: '@babel/types': 7.27.1 - '@babel/parser@7.27.1': + '@babel/parser@7.27.2': dependencies: '@babel/types': 7.27.1 @@ -6995,7 +6984,7 @@ snapshots: dependencies: '@babel/core': 7.26.10 '@babel/helper-annotate-as-pure': 7.27.1 - '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-replace-supers': 7.27.1(@babel/core@7.26.10) '@babel/traverse': 7.27.1 @@ -7007,7 +6996,7 @@ snapshots: dependencies: '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.27.1 - '@babel/template': 7.27.1 + '@babel/template': 7.27.2 '@babel/plugin-transform-destructuring@7.27.1(@babel/core@7.26.10)': dependencies: @@ -7057,7 +7046,7 @@ snapshots: '@babel/plugin-transform-function-name@7.27.1(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 '@babel/traverse': 7.27.1 transitivePeerDependencies: @@ -7138,11 +7127,12 @@ snapshots: '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-object-rest-spread@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-object-rest-spread@7.27.2(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 - '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 + '@babel/plugin-transform-destructuring': 7.27.1(@babel/core@7.26.10) '@babel/plugin-transform-parameters': 7.27.1(@babel/core@7.26.10) '@babel/plugin-transform-object-super@7.27.1(@babel/core@7.26.10)': @@ -7271,11 +7261,11 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) '@babel/helper-plugin-utils': 7.27.1 - '@babel/preset-env@7.27.1(@babel/core@7.26.10)': + '@babel/preset-env@7.27.2(@babel/core@7.26.10)': dependencies: - '@babel/compat-data': 7.27.1 + '@babel/compat-data': 7.27.2 '@babel/core': 7.26.10 - '@babel/helper-compilation-targets': 7.27.1 + '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-validator-option': 7.27.1 '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.27.1(@babel/core@7.26.10) @@ -7317,7 +7307,7 @@ snapshots: '@babel/plugin-transform-new-target': 7.27.1(@babel/core@7.26.10) '@babel/plugin-transform-nullish-coalescing-operator': 7.27.1(@babel/core@7.26.10) '@babel/plugin-transform-numeric-separator': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-object-rest-spread': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-object-rest-spread': 7.27.2(@babel/core@7.26.10) '@babel/plugin-transform-object-super': 7.27.1(@babel/core@7.26.10) '@babel/plugin-transform-optional-catch-binding': 7.27.1(@babel/core@7.26.10) '@babel/plugin-transform-optional-chaining': 7.27.1(@babel/core@7.26.10) @@ -7369,10 +7359,10 @@ snapshots: core-js: 2.6.12 regenerator-runtime: 0.14.1 - '@babel/template@7.27.1': + '@babel/template@7.27.2': dependencies: '@babel/code-frame': 7.27.1 - '@babel/parser': 7.27.1 + '@babel/parser': 7.27.2 '@babel/types': 7.27.1 '@babel/template@7.27.2': @@ -7385,8 +7375,8 @@ snapshots: dependencies: '@babel/code-frame': 7.27.1 '@babel/generator': 7.27.1 - '@babel/parser': 7.27.1 - '@babel/template': 7.27.1 + '@babel/parser': 7.27.2 + '@babel/template': 7.27.2 '@babel/types': 7.27.1 debug: 4.4.0 globals: 11.12.0 @@ -9145,7 +9135,7 @@ snapshots: babel-plugin-polyfill-corejs2@0.4.13(@babel/core@7.26.10): dependencies: - '@babel/compat-data': 7.27.1 + '@babel/compat-data': 7.27.2 '@babel/core': 7.26.10 '@babel/helper-define-polyfill-provider': 0.6.4(@babel/core@7.26.10) semver: 6.3.1 @@ -9253,13 +9243,6 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.24.4: - dependencies: - caniuse-lite: 1.0.30001716 - electron-to-chromium: 1.5.148 - node-releases: 2.0.19 - update-browserslist-db: 1.1.3(browserslist@4.24.4) - browserslist@4.24.5: dependencies: caniuse-lite: 1.0.30001717 @@ -9331,8 +9314,6 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001716: {} - caniuse-lite@1.0.30001717: {} caseless@0.12.0: {} @@ -9814,8 +9795,6 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.148: {} - electron-to-chromium@1.5.150: {} ellipsize@0.1.0: {} @@ -13067,12 +13046,6 @@ snapshots: picomatch: 4.0.2 webpack-virtual-modules: 0.6.2 - update-browserslist-db@1.1.3(browserslist@4.24.4): - dependencies: - browserslist: 4.24.4 - escalade: 3.2.0 - picocolors: 1.1.1 - update-browserslist-db@1.1.3(browserslist@4.24.5): dependencies: browserslist: 4.24.5 From 5a8b9e34ca2aeb1a4be3e2f98bddd0123560a9a5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 10:56:57 +0000 Subject: [PATCH 0564/2658] style: auto format --- pnpm-lock.yaml | 1541 +++++++++++++++++++++--------------------------- 1 file changed, 680 insertions(+), 861 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e2ef72813a3f..8be9bf0127bf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -286,10 +286,10 @@ importers: devDependencies: '@babel/preset-env': specifier: 7.27.2 - version: 7.27.2(@babel/core@7.26.10) + version: 7.27.2(@babel/core@7.27.1) '@babel/preset-typescript': specifier: 7.27.1 - version: 7.27.1(@babel/core@7.26.10) + version: 7.27.1(@babel/core@7.27.1) '@bbob/types': specifier: 4.2.0 version: 4.2.0 @@ -376,7 +376,7 @@ importers: version: 8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) '@vercel/nft': specifier: 0.29.2 - version: 0.29.2(rollup@4.37.0) + version: 0.29.2(rollup@4.40.2) '@vitest/coverage-v8': specifier: 2.1.9 version: 2.1.9(vitest@2.1.9(@types/node@22.15.14)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3))) @@ -457,7 +457,7 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.14)(lightningcss@1.29.3)) + version: 5.1.4(typescript@5.8.3)(vite@5.4.19(@types/node@22.15.14)(lightningcss@1.29.3)) vitest: specifier: 2.1.9 version: 2.1.9(@types/node@22.15.14)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) @@ -471,8 +471,8 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@asamuzakjp/css-color@3.1.1': - resolution: {integrity: sha512-hpRD68SV2OMcZCsrbdkccTw5FXjNDLo5OuqSHyHZfwweGsDWZwDJ2+gONyNAbazZclobMirACLw0lk8WVxIqxA==} + '@asamuzakjp/css-color@3.1.7': + resolution: {integrity: sha512-Ok5fYhtwdyJQmU1PpEv6Si7Y+A4cYb8yNM9oiIJC9TzXPMuN9fvdonKJqcnz9TbFqV6bQ8z0giRq0iaOpGZV2g==} '@asteasolutions/zod-to-openapi@7.3.0': resolution: {integrity: sha512-7tE/r1gXwMIvGnXVUdIqUhCU1RevEFC4Jk6Bussa0fk1ecbnnINkZzj1EOAJyE/M3AI25DnHT/zKQL1/FPFi8Q==} @@ -482,10 +482,6 @@ packages: '@babel/code-frame@7.0.0': resolution: {integrity: sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==} - '@babel/code-frame@7.26.2': - resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} - engines: {node: '>=6.9.0'} - '@babel/code-frame@7.27.1': resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} @@ -494,16 +490,8 @@ packages: resolution: {integrity: sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.27.2': - resolution: {integrity: sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==} - engines: {node: '>=6.9.0'} - - '@babel/core@7.26.10': - resolution: {integrity: sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==} - engines: {node: '>=6.9.0'} - - '@babel/generator@7.27.0': - resolution: {integrity: sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==} + '@babel/core@7.27.1': + resolution: {integrity: sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==} engines: {node: '>=6.9.0'} '@babel/generator@7.27.1': @@ -518,10 +506,6 @@ packages: resolution: {integrity: sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.27.2': - resolution: {integrity: sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-create-class-features-plugin@7.27.1': resolution: {integrity: sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==} engines: {node: '>=6.9.0'} @@ -577,10 +561,6 @@ packages: resolution: {integrity: sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.9': - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} @@ -605,16 +585,6 @@ packages: resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.27.0': - resolution: {integrity: sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==} - engines: {node: '>=6.0.0'} - hasBin: true - - '@babel/parser@7.27.2': - resolution: {integrity: sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==} - engines: {node: '>=6.0.0'} - hasBin: true - '@babel/parser@7.27.2': resolution: {integrity: sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==} engines: {node: '>=6.0.0'} @@ -1009,12 +979,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/runtime-corejs2@7.27.0': - resolution: {integrity: sha512-89TgomkhiBKJ1QN/zPJbSW6M3T9caLoSDYsHFNlTI2Q+T12w8ehZeEnx54I79gB0kmM+etCC5Lfgv95rYUJPdQ==} - engines: {node: '>=6.9.0'} - - '@babel/template@7.27.2': - resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} + '@babel/runtime-corejs2@7.27.1': + resolution: {integrity: sha512-MNwUSFn1d0u9M+i9pP0xNMGyS6Qj/UqZsreCb01Mjk821mMHjwUo+hLqkA34miUBYpYDLk/K3rZo2lysI1WF2A==} engines: {node: '>=6.9.0'} '@babel/template@7.27.2': @@ -1025,10 +991,6 @@ packages: resolution: {integrity: sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==} engines: {node: '>=6.9.0'} - '@babel/types@7.27.0': - resolution: {integrity: sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==} - engines: {node: '>=6.9.0'} - '@babel/types@7.27.1': resolution: {integrity: sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==} engines: {node: '>=6.9.0'} @@ -1077,15 +1039,15 @@ packages: resolution: {integrity: sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==} engines: {node: '>=18'} - '@csstools/css-calc@2.1.2': - resolution: {integrity: sha512-TklMyb3uBB28b5uQdxjReG4L80NxAqgrECqLZFQbyLekwwlcDDS8r3f07DKqeo8C4926Br0gf/ZDe17Zv4wIuw==} + '@csstools/css-calc@2.1.3': + resolution: {integrity: sha512-XBG3talrhid44BY1x3MHzUx/aTG8+x/Zi57M4aTKK9RFB4aLlF3TTSzfzn8nWVHWL3FgAXAxmupmDd6VWww+pw==} engines: {node: '>=18'} peerDependencies: '@csstools/css-parser-algorithms': ^3.0.4 '@csstools/css-tokenizer': ^3.0.3 - '@csstools/css-color-parser@3.0.8': - resolution: {integrity: sha512-pdwotQjCCnRPuNi06jFuP68cykU1f3ZWExLe/8MQ1LOs8Xq+fTkYgd+2V8mWUWMrOn9iS2HftPVaMZDaXzGbhQ==} + '@csstools/css-color-parser@3.0.9': + resolution: {integrity: sha512-wILs5Zk7BU86UArYBJTPy/FMPPKVKHMj1ycCEyf3VUptol0JNRLFU/BZsJ4aiIHJEbSLiizzRrw8Pc1uAEDrXw==} engines: {node: '>=18'} peerDependencies: '@csstools/css-parser-algorithms': ^3.0.4 @@ -1119,8 +1081,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.25.3': - resolution: {integrity: sha512-W8bFfPA8DowP8l//sxjJLSLkD8iEjMc7cBVyP+u4cEv9sM7mdUCkgsj+t0n/BWPFtv7WWCN5Yzj0N6FJNUUqBQ==} + '@esbuild/aix-ppc64@0.25.4': + resolution: {integrity: sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -1131,8 +1093,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.25.3': - resolution: {integrity: sha512-XelR6MzjlZuBM4f5z2IQHK6LkK34Cvv6Rj2EntER3lwCBFdg6h2lKbtRjpTTsdEjD/WSe1q8UyPBXP1x3i/wYQ==} + '@esbuild/android-arm64@0.25.4': + resolution: {integrity: sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -1143,8 +1105,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.25.3': - resolution: {integrity: sha512-PuwVXbnP87Tcff5I9ngV0lmiSu40xw1At6i3GsU77U7cjDDB4s0X2cyFuBiDa1SBk9DnvWwnGvVaGBqoFWPb7A==} + '@esbuild/android-arm@0.25.4': + resolution: {integrity: sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -1155,8 +1117,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.25.3': - resolution: {integrity: sha512-ogtTpYHT/g1GWS/zKM0cc/tIebFjm1F9Aw1boQ2Y0eUQ+J89d0jFY//s9ei9jVIlkYi8AfOjiixcLJSGNSOAdQ==} + '@esbuild/android-x64@0.25.4': + resolution: {integrity: sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -1167,8 +1129,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.25.3': - resolution: {integrity: sha512-eESK5yfPNTqpAmDfFWNsOhmIOaQA59tAcF/EfYvo5/QWQCzXn5iUSOnqt3ra3UdzBv073ykTtmeLJZGt3HhA+w==} + '@esbuild/darwin-arm64@0.25.4': + resolution: {integrity: sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -1179,8 +1141,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.25.3': - resolution: {integrity: sha512-Kd8glo7sIZtwOLcPbW0yLpKmBNWMANZhrC1r6K++uDR2zyzb6AeOYtI6udbtabmQpFaxJ8uduXMAo1gs5ozz8A==} + '@esbuild/darwin-x64@0.25.4': + resolution: {integrity: sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -1191,8 +1153,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.25.3': - resolution: {integrity: sha512-EJiyS70BYybOBpJth3M0KLOus0n+RRMKTYzhYhFeMwp7e/RaajXvP+BWlmEXNk6uk+KAu46j/kaQzr6au+JcIw==} + '@esbuild/freebsd-arm64@0.25.4': + resolution: {integrity: sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -1203,8 +1165,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.3': - resolution: {integrity: sha512-Q+wSjaLpGxYf7zC0kL0nDlhsfuFkoN+EXrx2KSB33RhinWzejOd6AvgmP5JbkgXKmjhmpfgKZq24pneodYqE8Q==} + '@esbuild/freebsd-x64@0.25.4': + resolution: {integrity: sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -1215,8 +1177,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.25.3': - resolution: {integrity: sha512-xCUgnNYhRD5bb1C1nqrDV1PfkwgbswTTBRbAd8aH5PhYzikdf/ddtsYyMXFfGSsb/6t6QaPSzxtbfAZr9uox4A==} + '@esbuild/linux-arm64@0.25.4': + resolution: {integrity: sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -1227,8 +1189,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.25.3': - resolution: {integrity: sha512-dUOVmAUzuHy2ZOKIHIKHCm58HKzFqd+puLaS424h6I85GlSDRZIA5ycBixb3mFgM0Jdh+ZOSB6KptX30DD8YOQ==} + '@esbuild/linux-arm@0.25.4': + resolution: {integrity: sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -1239,8 +1201,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.25.3': - resolution: {integrity: sha512-yplPOpczHOO4jTYKmuYuANI3WhvIPSVANGcNUeMlxH4twz/TeXuzEP41tGKNGWJjuMhotpGabeFYGAOU2ummBw==} + '@esbuild/linux-ia32@0.25.4': + resolution: {integrity: sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -1251,8 +1213,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.25.3': - resolution: {integrity: sha512-P4BLP5/fjyihmXCELRGrLd793q/lBtKMQl8ARGpDxgzgIKJDRJ/u4r1A/HgpBpKpKZelGct2PGI4T+axcedf6g==} + '@esbuild/linux-loong64@0.25.4': + resolution: {integrity: sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -1263,8 +1225,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.25.3': - resolution: {integrity: sha512-eRAOV2ODpu6P5divMEMa26RRqb2yUoYsuQQOuFUexUoQndm4MdpXXDBbUoKIc0iPa4aCO7gIhtnYomkn2x+bag==} + '@esbuild/linux-mips64el@0.25.4': + resolution: {integrity: sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -1275,8 +1237,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.25.3': - resolution: {integrity: sha512-ZC4jV2p7VbzTlnl8nZKLcBkfzIf4Yad1SJM4ZMKYnJqZFD4rTI+pBG65u8ev4jk3/MPwY9DvGn50wi3uhdaghg==} + '@esbuild/linux-ppc64@0.25.4': + resolution: {integrity: sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -1287,8 +1249,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.25.3': - resolution: {integrity: sha512-LDDODcFzNtECTrUUbVCs6j9/bDVqy7DDRsuIXJg6so+mFksgwG7ZVnTruYi5V+z3eE5y+BJZw7VvUadkbfg7QA==} + '@esbuild/linux-riscv64@0.25.4': + resolution: {integrity: sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -1299,8 +1261,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.25.3': - resolution: {integrity: sha512-s+w/NOY2k0yC2p9SLen+ymflgcpRkvwwa02fqmAwhBRI3SC12uiS10edHHXlVWwfAagYSY5UpmT/zISXPMW3tQ==} + '@esbuild/linux-s390x@0.25.4': + resolution: {integrity: sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -1311,14 +1273,14 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.25.3': - resolution: {integrity: sha512-nQHDz4pXjSDC6UfOE1Fw9Q8d6GCAd9KdvMZpfVGWSJztYCarRgSDfOVBY5xwhQXseiyxapkiSJi/5/ja8mRFFA==} + '@esbuild/linux-x64@0.25.4': + resolution: {integrity: sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.3': - resolution: {integrity: sha512-1QaLtOWq0mzK6tzzp0jRN3eccmN3hezey7mhLnzC6oNlJoUJz4nym5ZD7mDnS/LZQgkrhEbEiTn515lPeLpgWA==} + '@esbuild/netbsd-arm64@0.25.4': + resolution: {integrity: sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] @@ -1329,14 +1291,14 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.3': - resolution: {integrity: sha512-i5Hm68HXHdgv8wkrt+10Bc50zM0/eonPb/a/OFVfB6Qvpiirco5gBA5bz7S2SHuU+Y4LWn/zehzNX14Sp4r27g==} + '@esbuild/netbsd-x64@0.25.4': + resolution: {integrity: sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.3': - resolution: {integrity: sha512-zGAVApJEYTbOC6H/3QBr2mq3upG/LBEXr85/pTtKiv2IXcgKV0RT0QA/hSXZqSvLEpXeIxah7LczB4lkiYhTAQ==} + '@esbuild/openbsd-arm64@0.25.4': + resolution: {integrity: sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -1347,8 +1309,8 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.3': - resolution: {integrity: sha512-fpqctI45NnCIDKBH5AXQBsD0NDPbEFczK98hk/aa6HJxbl+UtLkJV2+Bvy5hLSLk3LHmqt0NTkKNso1A9y1a4w==} + '@esbuild/openbsd-x64@0.25.4': + resolution: {integrity: sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] @@ -1359,8 +1321,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.25.3': - resolution: {integrity: sha512-ROJhm7d8bk9dMCUZjkS8fgzsPAZEjtRJqCAmVgB0gMrvG7hfmPmz9k1rwO4jSiblFjYmNvbECL9uhaPzONMfgA==} + '@esbuild/sunos-x64@0.25.4': + resolution: {integrity: sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -1371,8 +1333,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.25.3': - resolution: {integrity: sha512-YWcow8peiHpNBiIXHwaswPnAXLsLVygFwCB3A7Bh5jRkIBFWHGmNQ48AlX4xDvQNoMZlPYzjVOQDYEzWCqufMQ==} + '@esbuild/win32-arm64@0.25.4': + resolution: {integrity: sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -1383,8 +1345,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.25.3': - resolution: {integrity: sha512-qspTZOIGoXVS4DpNqUYUs9UxVb04khS1Degaw/MnfMe7goQ3lTfQ13Vw4qY/Nj0979BGvMRpAYbs/BAxEvU8ew==} + '@esbuild/win32-ia32@0.25.4': + resolution: {integrity: sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -1395,18 +1357,12 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.25.3': - resolution: {integrity: sha512-ICgUR+kPimx0vvRzf+N/7L7tVSQeE3BYY+NhHRHXS1kBuPO7z2+7ea2HbhDyZdTephgvNvKrlDDKUexuCVBVvg==} + '@esbuild/win32-x64@0.25.4': + resolution: {integrity: sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.5.1': - resolution: {integrity: sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/eslint-utils@4.7.0': resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1596,6 +1552,10 @@ packages: '@napi-rs/wasm-runtime@0.2.9': resolution: {integrity: sha512-OKRBiajrrxB9ATokgEQoG87Z25c67pCpYcCwmXYX8PBftC9pBfN18gnm/fh1wurSLEKIAt+QRFLFCQISrb66Jg==} + '@noble/hashes@1.8.0': + resolution: {integrity: sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==} + engines: {node: ^14.21.3 || >=16} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1914,130 +1874,133 @@ packages: '@oxc-project/types@0.67.0': resolution: {integrity: sha512-AI7inoYvnVro7b8S2Z+Fxi295xQvNKLP1CM/xzx5il4R3aiGgnFt9qiXaRo9vIutataX8AjHcaPnOsjdcItU0w==} - '@oxc-resolver/binding-darwin-arm64@6.0.2': - resolution: {integrity: sha512-86IUnBOHrCQknSOGseG5vzzHCaPyPQK4VH4QGFo/Hcd7XloSwTj2oI2ia6+2/9wFNg5ysb9y6/IO+c4XJGGBew==} + '@oxc-resolver/binding-darwin-arm64@7.0.1': + resolution: {integrity: sha512-LpqmYjzY+f4AThJ9oy1DjRfkWoQcwGJtpU1UWRlR5Zm5Q/H86hFqkf8D97aqku1lLjzewi7qFWyo2gR1Fwkhhw==} cpu: [arm64] os: [darwin] - '@oxc-resolver/binding-darwin-x64@6.0.2': - resolution: {integrity: sha512-KHKUg2Tyz3W1Dugp1mDkUXv0P3+0jyiFHxBER/R/DxKh39XkOk2meTZ3dIc0ysM/0rEFW7H0rmIh5eGyv+0l5w==} + '@oxc-resolver/binding-darwin-x64@7.0.1': + resolution: {integrity: sha512-MmVmhkIKD7pd4ChdkYtiTXi5HpK2+tRFMH/G692cYKs3T6SqRciFm6uXFWNreZsavhqfnolJFvGDFAkvpEN6xQ==} cpu: [x64] os: [darwin] - '@oxc-resolver/binding-freebsd-x64@6.0.2': - resolution: {integrity: sha512-Sz2GF9ndHcnWbLq+uGeryJSh06NKqZHnPtwxugOQyeG9gkEDKc+UxG4ngWyxeBO0ZcGoeCQgYnngm1LFgjVLXA==} + '@oxc-resolver/binding-freebsd-x64@7.0.1': + resolution: {integrity: sha512-2+8DMR56iXxj7eZLJteXFM/lmEz1mQI0btCyddREWI8MMgpLY4ORNXZZbBZB/ucaHS3WeBp68PDN6oFyKm1YiA==} cpu: [x64] os: [freebsd] - '@oxc-resolver/binding-linux-arm-gnueabihf@6.0.2': - resolution: {integrity: sha512-Gq8Jbxru9HS6gv8g7FU6ednkHzH+9yTle5xJyNxuMUYFXkrUuvYBzS1Fysf6BUxlbLwMhVBMBZILhO+HYabdbg==} + '@oxc-resolver/binding-linux-arm-gnueabihf@7.0.1': + resolution: {integrity: sha512-EXdtmtbmKVm9H+qhJswUsKC0/AVdm1fIB69DBhzpMUFn6Bf+s6anZmMYUJY70cyAYsOvC0DhYiFw2vHZSl6htQ==} cpu: [arm] os: [linux] - '@oxc-resolver/binding-linux-arm64-gnu@6.0.2': - resolution: {integrity: sha512-5YAv/XmkiZVAnSMIQ+y+0mq43yuJsGwmqOtj3feYPykBeHl3nu0Jje1Ql9pRWmTp9hJr21Ln/tVl1ee4bazlAg==} + '@oxc-resolver/binding-linux-arm64-gnu@7.0.1': + resolution: {integrity: sha512-mU+3n1K9qYpgZQtcwrYqaaM/y5I1j7YX4KdvKONgQLNMM8lHysXuidn35j0MX7grGKh7I1iKC1JxHQHTDzDRSg==} cpu: [arm64] os: [linux] - '@oxc-resolver/binding-linux-arm64-musl@6.0.2': - resolution: {integrity: sha512-zei0sV43KJCODjEyHG2XTeMTyg7Dz+Or3847XIOnq1g+UdcS4WKe2ilLgOmGWO1xE1YImU9cPr9lfSCnGbnbEg==} + '@oxc-resolver/binding-linux-arm64-musl@7.0.1': + resolution: {integrity: sha512-6gqY+pcvAAwKpC1F9adtL8DyrYq7GBcbkTzokeR2M++zB1CSp30SK1WAm50w0lqcUNU0eIlClM1LQUTqLJ5U6g==} cpu: [arm64] os: [linux] - '@oxc-resolver/binding-linux-riscv64-gnu@6.0.2': - resolution: {integrity: sha512-z/uHEcgx4AZBq19JLHBNrGSNpKdnQg7GxNEJdKwLNnEDXk6jyV4+aPFACtPGS93aCuSRmwFuGyA5MzKgPcxf3g==} + '@oxc-resolver/binding-linux-riscv64-gnu@7.0.1': + resolution: {integrity: sha512-zCWDS84aFhPMiZsAkBvNl4MmNCF6V9usPiCnFwRSqAMfbNd9QC6jF96v3frYJZKHUswsBWMveBaZsTa6R2z5bA==} cpu: [riscv64] os: [linux] - '@oxc-resolver/binding-linux-s390x-gnu@6.0.2': - resolution: {integrity: sha512-2qIGQcjYwose7G+sW9NCLNXhGocnsBP5sQzghrUV6BkoNR4i77B4YHyCZA7DgPzbJAC9SJivfZOD35flaqF1Vg==} + '@oxc-resolver/binding-linux-s390x-gnu@7.0.1': + resolution: {integrity: sha512-mP3IN+UPz4KQTUJXsl15l87JcOlex+wCNaL5lUXuwdllC4hTcpcs+t/3zEKRh5qw0ltYKIgGbyol/QDnlZdieg==} cpu: [s390x] os: [linux] - '@oxc-resolver/binding-linux-x64-gnu@6.0.2': - resolution: {integrity: sha512-c0VSjaGXa//deVhBGx2bd4dgAv3ietmPKQOuLyV0x7qsBJnGtytRLytljdLicBkPVUSBj5nvgLYJvUyXwoeYJw==} + '@oxc-resolver/binding-linux-x64-gnu@7.0.1': + resolution: {integrity: sha512-y5Jxb/IihMMkczQ5+R68cdug0ojVNLsNCJxF0NhTBxhy0e7XtpJVmFXlFDxXcN3rjnB+Esub13CSetZ1tirYYg==} cpu: [x64] os: [linux] - '@oxc-resolver/binding-linux-x64-musl@6.0.2': - resolution: {integrity: sha512-j6qVZY0WMFcgPlT0iROlbowahY+XcX6sTcoSp7UubiXWo0QHwO8SgJuqe4bX25cH7NOiYvEHj+shALY73ad0Uw==} + '@oxc-resolver/binding-linux-x64-musl@7.0.1': + resolution: {integrity: sha512-rgtOKJFdFULwPfc2o8b1EmObykBu4V9SpyJjMI717DPbd3zwfUCLBsO0sCDfZiFiH7CHpZDsiStdLrmgjwD5NA==} cpu: [x64] os: [linux] - '@oxc-resolver/binding-wasm32-wasi@6.0.2': - resolution: {integrity: sha512-ptlIqfqyBzPEnvP7moGQzYOKRmqbyNyRg+Q2sqU/sqfC4hAkceBQFuzCYwWSb1zOu2Z7rvhx/8ducR6c4+2qtw==} + '@oxc-resolver/binding-wasm32-wasi@7.0.1': + resolution: {integrity: sha512-lFAGp9yu96S3/hyrCY9Wg6oX/tfCa3NCV40eZFTHJj6YU+cbpNVBeYI0RPIG1EPp4Idw54L1xVjVfQuBBtbcDw==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@oxc-resolver/binding-win32-arm64-msvc@6.0.2': - resolution: {integrity: sha512-w53d0B4PqbpWejFroeTCMwsE+E2k0KxzwTo2OReKdP0zU0pSTkvi/S3EGsUDLfVyQzGSgtIs12AsSLtJDmUMvg==} + '@oxc-resolver/binding-win32-arm64-msvc@7.0.1': + resolution: {integrity: sha512-M2nyfCrIwwEzyJNSBYMCztTzVj7DZPV/IAzBqgZxOPzxKDt6mP/uuKjQYSO/A1SRouPWkbCQZe5sFR4cpCYwDA==} cpu: [arm64] os: [win32] - '@oxc-resolver/binding-win32-x64-msvc@6.0.2': - resolution: {integrity: sha512-VCsWMFEmJJqkasuZC7TngxensVGZ0cDX5xqYigs7SCzM0kNH1Um+Ke+O3U1raHzwUiIdJzevpZCwmaFjE3TItg==} + '@oxc-resolver/binding-win32-x64-msvc@7.0.1': + resolution: {integrity: sha512-CTfcJ9Rp3Lb6YU0smoSEdChHtSY/LriZkuikwHTDVkfl1rtUXhZMt3SwHQq37Mgf/BezUZJh7cSgy5rgM0ARLw==} cpu: [x64] os: [win32] - '@oxc-transform/binding-darwin-arm64@0.66.0': - resolution: {integrity: sha512-EVaarR0u/ohSc66oOsMY+SIhLy0YXRIvVeCEoNKOQe+UCzDrd344YH0qxlfQ3EIGzUhf4NqBWuXvZTWJq4qdTA==} + '@oxc-transform/binding-darwin-arm64@0.67.0': + resolution: {integrity: sha512-P3zBMhpOQceNSys3/ZqvrjuRvcIbVzfGFN/tH34HlVkOjOmfGK1mOWjORsGAZtbgh1muXrF6mQETLzFjfYndXQ==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [darwin] - '@oxc-transform/binding-darwin-x64@0.66.0': - resolution: {integrity: sha512-nmvKnIsqkVAHfpQkdEoWYcYFSiPjWc5ioM4UfdJB3RbIdusoyqBJLywDec1PHE770lTfHxHccMy1vk2dr25cVw==} + '@oxc-transform/binding-darwin-x64@0.67.0': + resolution: {integrity: sha512-B52aeo/C3spYHcwFQ4nAbDkwbMKf0K6ncWM8GrVUgGu8PPECLBhjPCW11kPW/lt9FxwrdgVYVzPYlZ6wmJmpEA==} engines: {node: '>=14.0.0'} cpu: [x64] os: [darwin] - '@oxc-transform/binding-linux-arm-gnueabihf@0.66.0': - resolution: {integrity: sha512-RX94vb6+8JWylYuW0Restg6Gs7xxzmdZ96nHRSw281XPoHX94wHkGd8VMo7bUrPYsoRn5AmyIjH67gUNvsJiqw==} + '@oxc-transform/binding-linux-arm-gnueabihf@0.67.0': + resolution: {integrity: sha512-5Ir1eQrC9lvj/rR1TJVGwOR4yLgXTLmfKHIfpVH7GGSQrzK7VMUfHWX+dAsX1VutaeE8puXIqtYvf9cHLw78dw==} engines: {node: '>=14.0.0'} cpu: [arm] os: [linux] - '@oxc-transform/binding-linux-arm64-gnu@0.66.0': - resolution: {integrity: sha512-KX2XLdeEnM8AxlL5IyylR0HkfEMD1z8OgNm3WKMB1CFxdJumni7EAPr1AlLVhvoiHyELk73Rrt6BR3+iVE3kEw==} + '@oxc-transform/binding-linux-arm64-gnu@0.67.0': + resolution: {integrity: sha512-zTqfPET5+hZfJ3/dMqJboKxrpXMXk+j2HVdvX0wVhW2MI7n7hwELl+In6Yu20nXuEyJkNQlWHbNPCUfpM+cBWw==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [linux] - '@oxc-transform/binding-linux-arm64-musl@0.66.0': - resolution: {integrity: sha512-fIiNlCEJFpVOWeFUVvEpfU06WShfseIsbNYmna9ah69XUYTivKYRelctLp3OGyUZusO0Hux6eA6vXj/K0X4NNA==} + '@oxc-transform/binding-linux-arm64-musl@0.67.0': + resolution: {integrity: sha512-jzz/ATUhZ8wetb4gm5GwzheZns3Qj1CZ+DIMmD8nBxQXszmTS/fqnAPpgzruyLqkXBUuUfF3pHv5f/UmuHReuQ==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [linux] - '@oxc-transform/binding-linux-x64-gnu@0.66.0': - resolution: {integrity: sha512-RawpLg84jX7EB5RORjPXycOqlYqSHS40oPewrcYrn6uNKmQKBjZZQ99p+hNj7QKoON6GxfAPGKmYxXMgFRNuNg==} + '@oxc-transform/binding-linux-x64-gnu@0.67.0': + resolution: {integrity: sha512-Qy2+tfglJ8yX6guC1EDAnuuzRZIXciXO9UwOewxyiahLxwuTpj/wvvZN3Cb1SA3c14zrwb2TNMZvaXS1/OS5Pg==} engines: {node: '>=14.0.0'} cpu: [x64] os: [linux] - '@oxc-transform/binding-linux-x64-musl@0.66.0': - resolution: {integrity: sha512-L5ftqB+nNVCcWhwfmhhWLVWfjII2WxmF6JbjiSoqJdsDBnb+EzlZKRk3pYhe9ESD2Kl5rhGCPSBcWkdqsmIreQ==} + '@oxc-transform/binding-linux-x64-musl@0.67.0': + resolution: {integrity: sha512-tHoYgDIRhgvh+/wIrzAk3cUoj/LSSoJAdsZW9XRlaixFW/TF2puxRyaS1hRco0bcKTwotXl/eDYqZmhIfUyGRQ==} engines: {node: '>=14.0.0'} cpu: [x64] os: [linux] - '@oxc-transform/binding-wasm32-wasi@0.66.0': - resolution: {integrity: sha512-8W8iifV4uvXP4n7qbsxHw3QzLib4F4Er3DOWqvjaSj/A0Ipyc4foX8mitVV6kJrh0DwP+Bcx6ohvawh9xN9AzQ==} + '@oxc-transform/binding-wasm32-wasi@0.67.0': + resolution: {integrity: sha512-ZPT+1HECf7WUnotodIuS8tvSkwaiCdC2DDw8HVRmlerbS6iPYIPKyBCvkSM4RyUx0kljZtB9AciLCkEbwy5/zA==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@oxc-transform/binding-win32-arm64-msvc@0.66.0': - resolution: {integrity: sha512-E+dsoSIb9Ei/YSAZZGg4qLX7jiSbD/SzZEkxTl1pJpBVF9Dbq5D/9FcWe52qe3VegkUG2w8XwGmtaeeLikR/wA==} + '@oxc-transform/binding-win32-arm64-msvc@0.67.0': + resolution: {integrity: sha512-+E3lOHCk4EuIk6IjshBAARknAUpgH+gHTtZxCPqK4AWYA+Tls2J6C0FVM48uZ4m3rZpAq8ZszM9JZVAkOaynBQ==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [win32] - '@oxc-transform/binding-win32-x64-msvc@0.66.0': - resolution: {integrity: sha512-ZsIZeXr4Zexz/Sm4KoRlkjHda56eSCQizCM0E0fSyROwCjSiG+LT+L5czydBxietD1dZ4gSif8nMKzTMQrra7A==} + '@oxc-transform/binding-win32-x64-msvc@0.67.0': + resolution: {integrity: sha512-3pIIFb9g5aFrAODTQVJYitq+ONHgDJ4IYk/7pk+jsG6JpKUkURd0auUlxvriO11fFit5hdwy+wIbU4kBvyRUkg==} engines: {node: '>=14.0.0'} cpu: [x64] os: [win32] + '@paralleldrive/cuid2@2.2.2': + resolution: {integrity: sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==} + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -2183,103 +2146,103 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.37.0': - resolution: {integrity: sha512-l7StVw6WAa8l3vA1ov80jyetOAEo1FtHvZDbzXDO/02Sq/QVvqlHkYoFwDJPIMj0GKiistsBudfx5tGFnwYWDQ==} + '@rollup/rollup-android-arm-eabi@4.40.2': + resolution: {integrity: sha512-JkdNEq+DFxZfUwxvB58tHMHBHVgX23ew41g1OQinthJ+ryhdRk67O31S7sYw8u2lTjHUPFxwar07BBt1KHp/hg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.37.0': - resolution: {integrity: sha512-6U3SlVyMxezt8Y+/iEBcbp945uZjJwjZimu76xoG7tO1av9VO691z8PkhzQ85ith2I8R2RddEPeSfcbyPfD4hA==} + '@rollup/rollup-android-arm64@4.40.2': + resolution: {integrity: sha512-13unNoZ8NzUmnndhPTkWPWbX3vtHodYmy+I9kuLxN+F+l+x3LdVF7UCu8TWVMt1POHLh6oDHhnOA04n8oJZhBw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.37.0': - resolution: {integrity: sha512-+iTQ5YHuGmPt10NTzEyMPbayiNTcOZDWsbxZYR1ZnmLnZxG17ivrPSWFO9j6GalY0+gV3Jtwrrs12DBscxnlYA==} + '@rollup/rollup-darwin-arm64@4.40.2': + resolution: {integrity: sha512-Gzf1Hn2Aoe8VZzevHostPX23U7N5+4D36WJNHK88NZHCJr7aVMG4fadqkIf72eqVPGjGc0HJHNuUaUcxiR+N/w==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.37.0': - resolution: {integrity: sha512-m8W2UbxLDcmRKVjgl5J/k4B8d7qX2EcJve3Sut7YGrQoPtCIQGPH5AMzuFvYRWZi0FVS0zEY4c8uttPfX6bwYQ==} + '@rollup/rollup-darwin-x64@4.40.2': + resolution: {integrity: sha512-47N4hxa01a4x6XnJoskMKTS8XZ0CZMd8YTbINbi+w03A2w4j1RTlnGHOz/P0+Bg1LaVL6ufZyNprSg+fW5nYQQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.37.0': - resolution: {integrity: sha512-FOMXGmH15OmtQWEt174v9P1JqqhlgYge/bUjIbiVD1nI1NeJ30HYT9SJlZMqdo1uQFyt9cz748F1BHghWaDnVA==} + '@rollup/rollup-freebsd-arm64@4.40.2': + resolution: {integrity: sha512-8t6aL4MD+rXSHHZUR1z19+9OFJ2rl1wGKvckN47XFRVO+QL/dUSpKA2SLRo4vMg7ELA8pzGpC+W9OEd1Z/ZqoQ==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.37.0': - resolution: {integrity: sha512-SZMxNttjPKvV14Hjck5t70xS3l63sbVwl98g3FlVVx2YIDmfUIy29jQrsw06ewEYQ8lQSuY9mpAPlmgRD2iSsA==} + '@rollup/rollup-freebsd-x64@4.40.2': + resolution: {integrity: sha512-C+AyHBzfpsOEYRFjztcYUFsH4S7UsE9cDtHCtma5BK8+ydOZYgMmWg1d/4KBytQspJCld8ZIujFMAdKG1xyr4Q==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.37.0': - resolution: {integrity: sha512-hhAALKJPidCwZcj+g+iN+38SIOkhK2a9bqtJR+EtyxrKKSt1ynCBeqrQy31z0oWU6thRZzdx53hVgEbRkuI19w==} + '@rollup/rollup-linux-arm-gnueabihf@4.40.2': + resolution: {integrity: sha512-de6TFZYIvJwRNjmW3+gaXiZ2DaWL5D5yGmSYzkdzjBDS3W+B9JQ48oZEsmMvemqjtAFzE16DIBLqd6IQQRuG9Q==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.37.0': - resolution: {integrity: sha512-jUb/kmn/Gd8epbHKEqkRAxq5c2EwRt0DqhSGWjPFxLeFvldFdHQs/n8lQ9x85oAeVb6bHcS8irhTJX2FCOd8Ag==} + '@rollup/rollup-linux-arm-musleabihf@4.40.2': + resolution: {integrity: sha512-urjaEZubdIkacKc930hUDOfQPysezKla/O9qV+O89enqsqUmQm8Xj8O/vh0gHg4LYfv7Y7UsE3QjzLQzDYN1qg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.37.0': - resolution: {integrity: sha512-oNrJxcQT9IcbcmKlkF+Yz2tmOxZgG9D9GRq+1OE6XCQwCVwxixYAa38Z8qqPzQvzt1FCfmrHX03E0pWoXm1DqA==} + '@rollup/rollup-linux-arm64-gnu@4.40.2': + resolution: {integrity: sha512-KlE8IC0HFOC33taNt1zR8qNlBYHj31qGT1UqWqtvR/+NuCVhfufAq9fxO8BMFC22Wu0rxOwGVWxtCMvZVLmhQg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.37.0': - resolution: {integrity: sha512-pfxLBMls+28Ey2enpX3JvjEjaJMBX5XlPCZNGxj4kdJyHduPBXtxYeb8alo0a7bqOoWZW2uKynhHxF/MWoHaGQ==} + '@rollup/rollup-linux-arm64-musl@4.40.2': + resolution: {integrity: sha512-j8CgxvfM0kbnhu4XgjnCWJQyyBOeBI1Zq91Z850aUddUmPeQvuAy6OiMdPS46gNFgy8gN1xkYyLgwLYZG3rBOg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.37.0': - resolution: {integrity: sha512-yCE0NnutTC/7IGUq/PUHmoeZbIwq3KRh02e9SfFh7Vmc1Z7atuJRYWhRME5fKgT8aS20mwi1RyChA23qSyRGpA==} + '@rollup/rollup-linux-loongarch64-gnu@4.40.2': + resolution: {integrity: sha512-Ybc/1qUampKuRF4tQXc7G7QY9YRyeVSykfK36Y5Qc5dmrIxwFhrOzqaVTNoZygqZ1ZieSWTibfFhQ5qK8jpWxw==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.37.0': - resolution: {integrity: sha512-NxcICptHk06E2Lh3a4Pu+2PEdZ6ahNHuK7o6Np9zcWkrBMuv21j10SQDJW3C9Yf/A/P7cutWoC/DptNLVsZ0VQ==} + '@rollup/rollup-linux-powerpc64le-gnu@4.40.2': + resolution: {integrity: sha512-3FCIrnrt03CCsZqSYAOW/k9n625pjpuMzVfeI+ZBUSDT3MVIFDSPfSUgIl9FqUftxcUXInvFah79hE1c9abD+Q==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.37.0': - resolution: {integrity: sha512-PpWwHMPCVpFZLTfLq7EWJWvrmEuLdGn1GMYcm5MV7PaRgwCEYJAwiN94uBuZev0/J/hFIIJCsYw4nLmXA9J7Pw==} + '@rollup/rollup-linux-riscv64-gnu@4.40.2': + resolution: {integrity: sha512-QNU7BFHEvHMp2ESSY3SozIkBPaPBDTsfVNGx3Xhv+TdvWXFGOSH2NJvhD1zKAT6AyuuErJgbdvaJhYVhVqrWTg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.37.0': - resolution: {integrity: sha512-DTNwl6a3CfhGTAOYZ4KtYbdS8b+275LSLqJVJIrPa5/JuIufWWZ/QFvkxp52gpmguN95eujrM68ZG+zVxa8zHA==} + '@rollup/rollup-linux-riscv64-musl@4.40.2': + resolution: {integrity: sha512-5W6vNYkhgfh7URiXTO1E9a0cy4fSgfE4+Hl5agb/U1sa0kjOLMLC1wObxwKxecE17j0URxuTrYZZME4/VH57Hg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.37.0': - resolution: {integrity: sha512-hZDDU5fgWvDdHFuExN1gBOhCuzo/8TMpidfOR+1cPZJflcEzXdCy1LjnklQdW8/Et9sryOPJAKAQRw8Jq7Tg+A==} + '@rollup/rollup-linux-s390x-gnu@4.40.2': + resolution: {integrity: sha512-B7LKIz+0+p348JoAL4X/YxGx9zOx3sR+o6Hj15Y3aaApNfAshK8+mWZEf759DXfRLeL2vg5LYJBB7DdcleYCoQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.37.0': - resolution: {integrity: sha512-pKivGpgJM5g8dwj0ywBwe/HeVAUSuVVJhUTa/URXjxvoyTT/AxsLTAbkHkDHG7qQxLoW2s3apEIl26uUe08LVQ==} + '@rollup/rollup-linux-x64-gnu@4.40.2': + resolution: {integrity: sha512-lG7Xa+BmBNwpjmVUbmyKxdQJ3Q6whHjMjzQplOs5Z+Gj7mxPtWakGHqzMqNER68G67kmCX9qX57aRsW5V0VOng==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.37.0': - resolution: {integrity: sha512-E2lPrLKE8sQbY/2bEkVTGDEk4/49UYRVWgj90MY8yPjpnGBQ+Xi1Qnr7b7UIWw1NOggdFQFOLZ8+5CzCiz143w==} + '@rollup/rollup-linux-x64-musl@4.40.2': + resolution: {integrity: sha512-tD46wKHd+KJvsmije4bUskNuvWKFcTOIM9tZ/RrmIvcXnbi0YK/cKS9FzFtAm7Oxi2EhV5N2OpfFB348vSQRXA==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.37.0': - resolution: {integrity: sha512-Jm7biMazjNzTU4PrQtr7VS8ibeys9Pn29/1bm4ph7CP2kf21950LgN+BaE2mJ1QujnvOc6p54eWWiVvn05SOBg==} + '@rollup/rollup-win32-arm64-msvc@4.40.2': + resolution: {integrity: sha512-Bjv/HG8RRWLNkXwQQemdsWw4Mg+IJ29LK+bJPW2SCzPKOUaMmPEppQlu/Fqk1d7+DX3V7JbFdbkh/NMmurT6Pg==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.37.0': - resolution: {integrity: sha512-e3/1SFm1OjefWICB2Ucstg2dxYDkDTZGDYgwufcbsxTHyqQps1UQf33dFEChBNmeSsTOyrjw2JJq0zbG5GF6RA==} + '@rollup/rollup-win32-ia32-msvc@4.40.2': + resolution: {integrity: sha512-dt1llVSGEsGKvzeIO76HToiYPNPYPkmjhMHhP00T9S4rDern8P2ZWvWAQUEJ+R1UdMWJ/42i/QqJ2WV765GZcA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.37.0': - resolution: {integrity: sha512-LWbXUBwn/bcLx2sSsqy7pK5o+Nr+VCoRoAohfJ5C/aBio9nfJmGQqHAhU6pwxV/RmyTk5AqdySma7uwWGlmeuA==} + '@rollup/rollup-win32-x64-msvc@4.40.2': + resolution: {integrity: sha512-bwspbWB04XJpeElvsp+DCylKfF4trJDa2Y9Go8O6A7YLX2LIKGcNK/CYImJN6ZP4DcuOHB4Utl3iCbnR62DudA==} cpu: [x64] os: [win32] @@ -2396,9 +2359,6 @@ packages: '@types/eslint@9.6.1': resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} - '@types/estree@1.0.6': - resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} @@ -2537,10 +2497,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/scope-manager@8.28.0': - resolution: {integrity: sha512-u2oITX3BJwzWCapoZ/pXw6BCOl8rJP4Ij/3wPoGvY8XwvXflOzd1kLrDUUUAIEdJSFh+ASwdTHqtan9xSg8buw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.32.0': resolution: {integrity: sha512-jc/4IxGNedXkmG4mx4nJTILb6TMjL66D41vyeaPWvDUmeYQzF3lKtN15WsAeTr65ce4mPxwopPSo1yUUAWw0hQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2552,33 +2508,16 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/types@8.28.0': - resolution: {integrity: sha512-bn4WS1bkKEjx7HqiwG2JNB3YJdC1q6Ue7GyGlwPHyt0TnVq6TtD/hiOdTZt71sq0s7UzqBFXD8t8o2e63tXgwA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.32.0': resolution: {integrity: sha512-O5Id6tGadAZEMThM6L9HmVf5hQUXNSxLVKeGJYWNhhVseps/0LddMkp7//VDkzwJ69lPL0UmZdcZwggj9akJaA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.28.0': - resolution: {integrity: sha512-H74nHEeBGeklctAVUvmDkxB1mk+PAZ9FiOMPFncdqeRBXxk1lWSYraHw8V12b7aa6Sg9HOBNbGdSHobBPuQSuA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/typescript-estree@8.32.0': resolution: {integrity: sha512-pU9VD7anSCOIoBFnhTGfOzlVFQIA1XXiQpH/CezqOBaDppRwTglJzCC6fUQGpfwey4T183NKhF1/mfatYmjRqQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.28.0': - resolution: {integrity: sha512-OELa9hbTYciYITqgurT1u/SzpQVtDLmQMFzy/N8pQE+tefOyCWT79jHsav294aTqV1q1u+VzqDGbuujvRYaeSQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.32.0': resolution: {integrity: sha512-8S9hXau6nQ/sYVtC3D6ISIDoJzS1NsCK+gluVhLN2YkBPX+/1wkwyUiDKnxRh15579WoOIyVWnoyIf3yGI9REw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2586,10 +2525,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/visitor-keys@8.28.0': - resolution: {integrity: sha512-hbn8SZ8w4u2pRwgQ1GlUrPKE+t2XvcCW5tTRF7j6SMYIuYG37XuzIW44JCZPa36evi0Oy2SnM664BlIaAuQcvg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.32.0': resolution: {integrity: sha512-1rYQTCLFFzOI5Nl0c8LUpJT8HxpwVRn9E4CkMsYfuN6ctmQqExjSTzzSk0Tz2apmXy7WU6/6fyaZVVA/thPN+w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2649,8 +2584,8 @@ packages: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - abbrev@3.0.0: - resolution: {integrity: sha512-+/kfrslGQ7TNV2ecmQwMJj/B65g5KVq1/L3SGVZ3tCYGqlzFuFCGBZJtMP99wH3NpEUyAjn0zPdPUg0D+DwrOA==} + abbrev@3.0.1: + resolution: {integrity: sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==} engines: {node: ^18.17.0 || >=20.5.0} accepts@2.0.0: @@ -2850,8 +2785,8 @@ packages: resolution: {integrity: sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==} engines: {node: '>=0.6'} - bignumber.js@9.1.2: - resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} + bignumber.js@9.3.0: + resolution: {integrity: sha512-EM7aMFTXbptt/wZdMlBv2t8IViwQL+h6SLHosp8Yf0dqJMTnY6iL32opnAB6kAdL0SZPuvcAzFr31o0c/R3/RA==} bindings@1.5.0: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} @@ -3201,8 +3136,8 @@ packages: resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} engines: {node: '>= 6'} - cssstyle@4.3.0: - resolution: {integrity: sha512-6r0NiY0xizYqfBvWp1G7WXJ06/bZyrk7Dc6PHql82C/pKGUTKu4yAX4Y8JPamb1ob9nBKuxWzCGTRuGwU3yxJQ==} + cssstyle@4.3.1: + resolution: {integrity: sha512-ZgW+Jgdd7i52AaLYCriF8Mxqft0gD/R9i9wi6RWBhs1pqdPEzPjym7rvRKi397WmQFf3SlyUsszhw+VVCbx79Q==} engines: {node: '>=18'} currency-symbol-map@5.1.0: @@ -3327,10 +3262,6 @@ packages: destr@2.0.5: resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} - detect-libc@2.0.3: - resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} - engines: {node: '>=8'} - detect-libc@2.0.4: resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==} engines: {node: '>=8'} @@ -3409,8 +3340,8 @@ packages: resolution: {integrity: sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==} engines: {node: '>=6'} - dts-resolver@1.0.1: - resolution: {integrity: sha512-t+NRUvrugV5KfFibjlCmIWT1OBnCoPbl8xvxISGIlJy76IvNXwgTWo2FywUuJTBc6yyUWde9PORHqczyP1GTIA==} + dts-resolver@1.1.1: + resolution: {integrity: sha512-slMqHdR+fZFxL2Iud9rZSw7T/YKEX0LkeP907JRglcpRlB3dF9okHuVnxwAV6v0knJot5PA5cn0shKbEAKZaTQ==} engines: {node: '>=20.18.0'} eastasianwidth@0.2.0: @@ -3495,8 +3426,8 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - es-module-lexer@1.6.0: - resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==} + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} es5-ext@0.10.64: resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} @@ -3514,8 +3445,8 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.25.3: - resolution: {integrity: sha512-qKA6Pvai73+M2FtftpNKRxJ78GIjmFXFxd/1DVBqGo/qNhLSfv+G12n9pNoWdytJC8U00TrViOwpjT0zgqQS8Q==} + esbuild@0.25.4: + resolution: {integrity: sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==} engines: {node: '>=18'} hasBin: true @@ -3718,8 +3649,8 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - expect-type@1.2.0: - resolution: {integrity: sha512-80F22aiJ3GLyVnS/B3HzgR6RelZVumzj9jkL0Rhz4h0xYbNW9PjlQz5h3J/SShErbXBc295vseR4/MIbVmUbeA==} + expect-type@1.2.1: + resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} engines: {node: '>=12.0.0'} express-rate-limit@7.5.0: @@ -3890,8 +3821,9 @@ packages: resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} engines: {node: '>= 6'} - formidable@3.5.2: - resolution: {integrity: sha512-Jqc1btCy3QzRbJaICGwKcBfGWuLADRerLzDqi2NwSt/UkXLsHJw2TVResiaoBufHVHy9aSgClOHCeJsSsFLTbg==} + formidable@3.5.4: + resolution: {integrity: sha512-YikH+7CUTOtP44ZTnUhR7Ic2UASBPOqmaRkRKxRbywPTe5VxF7RRCck4af9wutiZ/QKM5nME9Bie2fFaPz5Gug==} + engines: {node: '>=14.0.0'} forwarded-parse@2.1.2: resolution: {integrity: sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==} @@ -4035,8 +3967,8 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - graphql@16.10.0: - resolution: {integrity: sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ==} + graphql@16.11.0: + resolution: {integrity: sha512-mS1lbMsxgQj6hge1XZ6p7GPhbrtFwUFYi3wRzXAC/FmYnyXMTvvI3td3rjmQ2u8ewXueaSvRPWaEcgVVOT9Jnw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} gtoken@7.1.0: @@ -4074,10 +4006,6 @@ packages: heap@0.2.7: resolution: {integrity: sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==} - hexoid@2.0.0: - resolution: {integrity: sha512-qlspKUK7IlSQv2o+5I7yhUd7TxlOG2Vr5LTa3ve2XSNVKAL/n/u/7KLvKmFNimomDIKvZFXWHv0T12mv7rT8Aw==} - engines: {node: '>=8'} - hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} @@ -4624,8 +4552,8 @@ packages: engines: {node: '>=18.12.0'} hasBin: true - listr2@8.3.2: - resolution: {integrity: sha512-vsBzcU4oE+v0lj4FhVLzr9dBTv4/fHIa57l+GCwovP8MoFNZJTOhGU8PXd4v2VJCbECAaijBiHntiekFMLvo0g==} + listr2@8.3.3: + resolution: {integrity: sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==} engines: {node: '>=18.0.0'} locate-path@6.0.0: @@ -4690,8 +4618,8 @@ packages: resolution: {integrity: sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==} engines: {node: '>= 12.0.0'} - long@5.3.1: - resolution: {integrity: sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==} + long@5.3.2: + resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} loupe@3.1.3: resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==} @@ -4929,8 +4857,8 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} - minizlib@3.0.1: - resolution: {integrity: sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==} + minizlib@3.0.2: + resolution: {integrity: sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==} engines: {node: '>= 18'} mitt@3.0.1: @@ -5158,11 +5086,11 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} - oxc-resolver@6.0.2: - resolution: {integrity: sha512-iO4XRuD6GzQpxGCIiW9bjVpIUPVETeH7vnhB0xQpXEq0mal67K3vrTlyB64imPCNV9iwpIjJM5W++ZlgCXII6A==} + oxc-resolver@7.0.1: + resolution: {integrity: sha512-9TrxkeIdlszOtIXZaPPM3ARs2dEVeANL5tmayrAWWowBYJh4ZEBrO1PqFN3wFHiOpx1+50GI4zvqLKpXa7tdfQ==} - oxc-transform@0.66.0: - resolution: {integrity: sha512-vfs0oVJAAgX8GrZ5jO1sQp29c4HYSZ4MTtievyqawSeNpqF0yj69tpAwpDZ+MxYt3dqZ8lrGh9Ji80YlG0hpoA==} + oxc-transform@0.67.0: + resolution: {integrity: sha512-QXwmpLfNrXZoHgIjEtDEf6lhwmvHouNtstNgg/UveczVIjo8VSzd5h25Ea96PoX9KzReJUY/qYa4QSNkJpZGfA==} engines: {node: '>=14.0.0'} p-cancelable@3.0.0: @@ -5219,8 +5147,8 @@ packages: parse5-parser-stream@7.1.2: resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==} - parse5@7.2.1: - resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} + parse5@7.3.0: + resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} parseley@0.12.1: resolution: {integrity: sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==} @@ -5562,9 +5490,6 @@ packages: regenerate@1.4.2: resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} - regenerator-runtime@0.14.1: - resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true @@ -5666,12 +5591,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@5.0.10: - resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} - hasBin: true - - rolldown-plugin-dts@0.9.7: - resolution: {integrity: sha512-aAJhyvmlZx/siIDNQ2CahSyLp0Hvp8xAJkiXa8eZmkZ/SPEOdSjB0StGay2VcFetCa0NhUBxr+LkO2BSQgaU/Q==} + rolldown-plugin-dts@0.9.11: + resolution: {integrity: sha512-iCIRKmvPLwRV4UKSxhaBo+5wDkvc3+MFiqYYvu7sGLSohzxoDn9WEsjN3y7A6xg3aCuxHh6rlRp8xbX98r1rSg==} engines: {node: '>=20.18.0'} peerDependencies: rolldown: ^1.0.0-beta.7 @@ -5689,8 +5610,8 @@ packages: '@oxc-project/runtime': optional: true - rollup@4.37.0: - resolution: {integrity: sha512-iAtQy/L4QFU+rTJ1YUjXqJOJzuwEghqWzCEYD2FEghT7Gsy1VdABntrO4CLopA5IkflTyqNiLNwPcOJ3S7UKLg==} + rollup@4.40.2: + resolution: {integrity: sha512-tfUOg6DTP4rhQ3VjOO6B4wyrJnGOX85requAXvqYTHsOgb2TFJdZ3aWpT8W2kPoypSGP7dZUyzxJ9ee4buM5Fg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -5870,8 +5791,8 @@ packages: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} - std-env@3.8.1: - resolution: {integrity: sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==} + std-env@3.9.0: + resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} stealthy-require@1.1.1: resolution: {integrity: sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==} @@ -6051,8 +5972,8 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tlds@1.256.0: - resolution: {integrity: sha512-ZmyVB9DAw+FFTmLElGYJgdZFsKLYd/I59Bg9NHkCGPwAbVZNRilFWDMAdX8UG+bHuv7kfursd5XGqo/9wi26lA==} + tlds@1.258.0: + resolution: {integrity: sha512-XGhStWuOlBA5D8QnyN2xtgB2cUOdJ3ztisne1DYVWMcVH29qh8eQIpRmP3HnuJLdgyzG0HpdGzRMu1lm/Oictw==} hasBin: true tldts-core@6.1.86: @@ -6109,8 +6030,8 @@ packages: tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - tr46@5.1.0: - resolution: {integrity: sha512-IUWnUK7ADYR5Sl1fZlO1INDUhVhatWl7BtJWsIhwJ0UAK7ilzzIa8uIqOO/aYVWHZPJkKbEL+362wrzoeRF7bw==} + tr46@5.1.1: + resolution: {integrity: sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==} engines: {node: '>=18'} triple-beam@1.4.1: @@ -6207,8 +6128,8 @@ packages: resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} engines: {node: '>=10'} - type-fest@4.38.0: - resolution: {integrity: sha512-2dBz5D5ycHIoliLYLi0Q2V7KRaDlH0uWIvmk7TYlAg5slqwiPv1ezJdZm1QEM0xgk29oYWMCbIG7E6gHpvChlg==} + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} type-is@2.0.1: @@ -6391,8 +6312,8 @@ packages: vite: optional: true - vite@5.4.15: - resolution: {integrity: sha512-6ANcZRivqL/4WtwPGTKNaosuNJr5tWiftOC7liM7G9+rMb8+oeJeyzymDu4rTN93seySBmbjSfsS3Vzr19KNtA==} + vite@5.4.19: + resolution: {integrity: sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -6539,8 +6460,8 @@ packages: utf-8-validate: optional: true - ws@8.18.1: - resolution: {integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==} + ws@8.18.2: + resolution: {integrity: sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -6599,11 +6520,6 @@ packages: resolution: {integrity: sha512-E/+VitOorXSLiAqtTd7Yqax0/pAS3xaYMP+AUUJGOK1OZG3rhcj9fcJOM5HJ2VrP1FrStVCWr1muTfQCdj4tAA==} engines: {node: ^14.17.0 || >=16.0.0} - yaml@2.7.0: - resolution: {integrity: sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==} - engines: {node: '>= 14'} - hasBin: true - yaml@2.7.1: resolution: {integrity: sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==} engines: {node: '>= 14'} @@ -6652,10 +6568,10 @@ snapshots: '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 - '@asamuzakjp/css-color@3.1.1': + '@asamuzakjp/css-color@3.1.7': dependencies: - '@csstools/css-calc': 2.1.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) - '@csstools/css-color-parser': 3.0.8(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-calc': 2.1.3(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-color-parser': 3.0.9(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) '@csstools/css-tokenizer': 3.0.3 lru-cache: 10.4.3 @@ -6669,12 +6585,6 @@ snapshots: dependencies: '@babel/highlight': 7.25.9 - '@babel/code-frame@7.26.2': - dependencies: - '@babel/helper-validator-identifier': 7.27.1 - js-tokens: 4.0.0 - picocolors: 1.1.1 - '@babel/code-frame@7.27.1': dependencies: '@babel/helper-validator-identifier': 7.27.1 @@ -6683,15 +6593,13 @@ snapshots: '@babel/compat-data@7.27.2': {} - '@babel/compat-data@7.27.2': {} - - '@babel/core@7.26.10': + '@babel/core@7.27.1': dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.27.1 '@babel/generator': 7.27.1 '@babel/helper-compilation-targets': 7.27.2 - '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) + '@babel/helper-module-transforms': 7.27.1(@babel/core@7.27.1) '@babel/helpers': 7.27.1 '@babel/parser': 7.27.2 '@babel/template': 7.27.2 @@ -6705,14 +6613,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.27.0': - dependencies: - '@babel/parser': 7.27.0 - '@babel/types': 7.27.1 - '@jridgewell/gen-mapping': 0.3.8 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 3.1.0 - '@babel/generator@7.27.1': dependencies: '@babel/parser': 7.27.2 @@ -6733,37 +6633,29 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-compilation-targets@7.27.2': - dependencies: - '@babel/compat-data': 7.27.2 - '@babel/helper-validator-option': 7.27.1 - browserslist: 4.24.5 - lru-cache: 5.1.1 - semver: 6.3.1 - - '@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.26.10)': + '@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-annotate-as-pure': 7.27.1 '@babel/helper-member-expression-to-functions': 7.27.1 '@babel/helper-optimise-call-expression': 7.27.1 - '@babel/helper-replace-supers': 7.27.1(@babel/core@7.26.10) + '@babel/helper-replace-supers': 7.27.1(@babel/core@7.27.1) '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 '@babel/traverse': 7.27.1 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/helper-create-regexp-features-plugin@7.27.1(@babel/core@7.26.10)': + '@babel/helper-create-regexp-features-plugin@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-annotate-as-pure': 7.27.1 regexpu-core: 6.2.0 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.4(@babel/core@7.26.10)': + '@babel/helper-define-polyfill-provider@0.6.4(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 debug: 4.4.0 @@ -6786,9 +6678,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.27.1(@babel/core@7.26.10)': + '@babel/helper-module-transforms@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-module-imports': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 '@babel/traverse': 7.27.1 @@ -6801,18 +6693,18 @@ snapshots: '@babel/helper-plugin-utils@7.27.1': {} - '@babel/helper-remap-async-to-generator@7.27.1(@babel/core@7.26.10)': + '@babel/helper-remap-async-to-generator@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-annotate-as-pure': 7.27.1 '@babel/helper-wrap-function': 7.27.1 '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.27.1(@babel/core@7.26.10)': + '@babel/helper-replace-supers@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-member-expression-to-functions': 7.27.1 '@babel/helper-optimise-call-expression': 7.27.1 '@babel/traverse': 7.27.1 @@ -6826,8 +6718,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-string-parser@7.25.9': {} - '@babel/helper-string-parser@7.27.1': {} '@babel/helper-validator-identifier@7.27.1': {} @@ -6854,516 +6744,501 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/parser@7.27.0': - dependencies: - '@babel/types': 7.27.1 - '@babel/parser@7.27.2': dependencies: '@babel/types': 7.27.1 - '@babel/parser@7.27.2': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/types': 7.27.1 - - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.27.1(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 - '@babel/plugin-transform-optional-chaining': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-optional-chaining': 7.27.1(@babel/core@7.27.1) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.26.10)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 - '@babel/plugin-syntax-import-assertions@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-syntax-import-assertions@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-import-attributes@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-syntax-import-attributes@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.26.10)': + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-arrow-functions@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-arrow-functions@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-async-generator-functions@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-async-generator-functions@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/helper-remap-async-to-generator': 7.27.1(@babel/core@7.26.10) + '@babel/helper-remap-async-to-generator': 7.27.1(@babel/core@7.27.1) '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-to-generator@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-async-to-generator@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-module-imports': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/helper-remap-async-to-generator': 7.27.1(@babel/core@7.26.10) + '@babel/helper-remap-async-to-generator': 7.27.1(@babel/core@7.27.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-block-scoped-functions@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-block-scoped-functions@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-block-scoping@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-block-scoping@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-class-properties@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-class-properties@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-class-static-block@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-classes@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-classes@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-annotate-as-pure': 7.27.1 '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 - '@babel/helper-replace-supers': 7.27.1(@babel/core@7.26.10) + '@babel/helper-replace-supers': 7.27.1(@babel/core@7.27.1) '@babel/traverse': 7.27.1 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-computed-properties@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-computed-properties@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 '@babel/template': 7.27.2 - '@babel/plugin-transform-destructuring@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-destructuring@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-dotall-regex@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-dotall-regex@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-duplicate-keys@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-duplicate-keys@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-dynamic-import@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-dynamic-import@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-exponentiation-operator@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-exponentiation-operator@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-export-namespace-from@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-export-namespace-from@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-for-of@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-for-of@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-function-name@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-function-name@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-json-strings@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-json-strings@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-literals@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-literals@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-logical-assignment-operators@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-logical-assignment-operators@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-member-expression-literals@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-member-expression-literals@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-modules-amd@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-modules-amd@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-module-transforms': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-modules-commonjs@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-module-transforms': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-systemjs@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-modules-systemjs@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-module-transforms': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 '@babel/traverse': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-umd@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-modules-umd@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-module-transforms': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-module-transforms': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-named-capturing-groups-regex@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-named-capturing-groups-regex@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-new-target@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-new-target@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-nullish-coalescing-operator@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-nullish-coalescing-operator@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-numeric-separator@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-numeric-separator@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-object-rest-spread@7.27.2(@babel/core@7.26.10)': + '@babel/plugin-transform-object-rest-spread@7.27.2(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-destructuring': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-parameters': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-transform-destructuring': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-parameters': 7.27.1(@babel/core@7.27.1) - '@babel/plugin-transform-object-super@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-object-super@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/helper-replace-supers': 7.27.1(@babel/core@7.26.10) + '@babel/helper-replace-supers': 7.27.1(@babel/core@7.27.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-optional-catch-binding@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-optional-catch-binding@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-optional-chaining@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-optional-chaining@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-parameters@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-parameters@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-private-methods@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-private-methods@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-private-property-in-object@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-annotate-as-pure': 7.27.1 - '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-property-literals@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-property-literals@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-regenerator@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-regenerator@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-regexp-modifiers@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-regexp-modifiers@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-reserved-words@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-reserved-words@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-shorthand-properties@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-shorthand-properties@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-spread@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-spread@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-sticky-regex@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-sticky-regex@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-template-literals@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-template-literals@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-typeof-symbol@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-typeof-symbol@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-typescript@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-typescript@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-annotate-as-pure': 7.27.1 - '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.27.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-unicode-escapes@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-unicode-escapes@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-unicode-property-regex@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-unicode-property-regex@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-unicode-regex@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-unicode-regex@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-unicode-sets-regex@7.27.1(@babel/core@7.26.10)': + '@babel/plugin-transform-unicode-sets-regex@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 - '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-create-regexp-features-plugin': 7.27.1(@babel/core@7.27.1) '@babel/helper-plugin-utils': 7.27.1 - '@babel/preset-env@7.27.2(@babel/core@7.26.10)': + '@babel/preset-env@7.27.2(@babel/core@7.27.1)': dependencies: '@babel/compat-data': 7.27.2 - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-validator-option': 7.27.1 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.26.10) - '@babel/plugin-syntax-import-assertions': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.26.10) - '@babel/plugin-transform-arrow-functions': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-async-generator-functions': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-async-to-generator': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-block-scoped-functions': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-block-scoping': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-class-properties': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-class-static-block': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-classes': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-computed-properties': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-destructuring': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-dotall-regex': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-duplicate-keys': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-dynamic-import': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-exponentiation-operator': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-export-namespace-from': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-for-of': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-function-name': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-json-strings': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-literals': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-logical-assignment-operators': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-member-expression-literals': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-modules-amd': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-modules-systemjs': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-modules-umd': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-named-capturing-groups-regex': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-new-target': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-nullish-coalescing-operator': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-numeric-separator': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-object-rest-spread': 7.27.2(@babel/core@7.26.10) - '@babel/plugin-transform-object-super': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-optional-catch-binding': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-optional-chaining': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-parameters': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-private-methods': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-private-property-in-object': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-property-literals': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-regenerator': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-regexp-modifiers': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-reserved-words': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-shorthand-properties': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-spread': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-sticky-regex': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-template-literals': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-typeof-symbol': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-unicode-escapes': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-unicode-property-regex': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-unicode-regex': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-unicode-sets-regex': 7.27.1(@babel/core@7.26.10) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.26.10) - babel-plugin-polyfill-corejs2: 0.4.13(@babel/core@7.26.10) - babel-plugin-polyfill-corejs3: 0.11.1(@babel/core@7.26.10) - babel-plugin-polyfill-regenerator: 0.6.4(@babel/core@7.26.10) + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.27.1) + '@babel/plugin-syntax-import-assertions': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.27.1) + '@babel/plugin-transform-arrow-functions': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-async-generator-functions': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-async-to-generator': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-block-scoped-functions': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-block-scoping': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-class-properties': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-class-static-block': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-classes': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-computed-properties': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-destructuring': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-dotall-regex': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-duplicate-keys': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-dynamic-import': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-exponentiation-operator': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-export-namespace-from': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-for-of': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-function-name': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-json-strings': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-literals': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-logical-assignment-operators': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-member-expression-literals': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-modules-amd': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-modules-systemjs': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-modules-umd': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-named-capturing-groups-regex': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-new-target': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-nullish-coalescing-operator': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-numeric-separator': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-object-rest-spread': 7.27.2(@babel/core@7.27.1) + '@babel/plugin-transform-object-super': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-optional-catch-binding': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-optional-chaining': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-parameters': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-private-methods': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-private-property-in-object': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-property-literals': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-regenerator': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-regexp-modifiers': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-reserved-words': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-shorthand-properties': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-spread': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-sticky-regex': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-template-literals': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-typeof-symbol': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-unicode-escapes': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-unicode-property-regex': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-unicode-regex': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-unicode-sets-regex': 7.27.1(@babel/core@7.27.1) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.27.1) + babel-plugin-polyfill-corejs2: 0.4.13(@babel/core@7.27.1) + babel-plugin-polyfill-corejs3: 0.11.1(@babel/core@7.27.1) + babel-plugin-polyfill-regenerator: 0.6.4(@babel/core@7.27.1) core-js-compat: 3.42.0 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.26.10)': + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 '@babel/types': 7.27.1 esutils: 2.0.3 - '@babel/preset-typescript@7.27.1(@babel/core@7.26.10)': + '@babel/preset-typescript@7.27.1(@babel/core@7.27.1)': dependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-validator-option': 7.27.1 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.26.10) - '@babel/plugin-transform-typescript': 7.27.1(@babel/core@7.26.10) + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.27.1) + '@babel/plugin-transform-typescript': 7.27.1(@babel/core@7.27.1) transitivePeerDependencies: - supports-color - '@babel/runtime-corejs2@7.27.0': + '@babel/runtime-corejs2@7.27.1': dependencies: core-js: 2.6.12 - regenerator-runtime: 0.14.1 - - '@babel/template@7.27.2': - dependencies: - '@babel/code-frame': 7.27.1 - '@babel/parser': 7.27.2 - '@babel/types': 7.27.1 '@babel/template@7.27.2': dependencies: @@ -7383,11 +7258,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/types@7.27.0': - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.27.1 - '@babel/types@7.27.1': dependencies: '@babel/helper-string-parser': 7.27.1 @@ -7448,15 +7318,15 @@ snapshots: '@csstools/color-helpers@5.0.2': {} - '@csstools/css-calc@2.1.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + '@csstools/css-calc@2.1.3(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': dependencies: '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) '@csstools/css-tokenizer': 3.0.3 - '@csstools/css-color-parser@3.0.8(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + '@csstools/css-color-parser@3.0.9(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': dependencies: '@csstools/color-helpers': 5.0.2 - '@csstools/css-calc': 2.1.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-calc': 2.1.3(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) '@csstools/css-tokenizer': 3.0.3 @@ -7491,152 +7361,147 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true - '@esbuild/aix-ppc64@0.25.3': + '@esbuild/aix-ppc64@0.25.4': optional: true '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm64@0.25.3': + '@esbuild/android-arm64@0.25.4': optional: true '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-arm@0.25.3': + '@esbuild/android-arm@0.25.4': optional: true '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/android-x64@0.25.3': + '@esbuild/android-x64@0.25.4': optional: true '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.25.3': + '@esbuild/darwin-arm64@0.25.4': optional: true '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/darwin-x64@0.25.3': + '@esbuild/darwin-x64@0.25.4': optional: true '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.25.3': + '@esbuild/freebsd-arm64@0.25.4': optional: true '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.25.3': + '@esbuild/freebsd-x64@0.25.4': optional: true '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm64@0.25.3': + '@esbuild/linux-arm64@0.25.4': optional: true '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-arm@0.25.3': + '@esbuild/linux-arm@0.25.4': optional: true '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-ia32@0.25.3': + '@esbuild/linux-ia32@0.25.4': optional: true '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-loong64@0.25.3': + '@esbuild/linux-loong64@0.25.4': optional: true '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-mips64el@0.25.3': + '@esbuild/linux-mips64el@0.25.4': optional: true '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-ppc64@0.25.3': + '@esbuild/linux-ppc64@0.25.4': optional: true '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.25.3': + '@esbuild/linux-riscv64@0.25.4': optional: true '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-s390x@0.25.3': + '@esbuild/linux-s390x@0.25.4': optional: true '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/linux-x64@0.25.3': + '@esbuild/linux-x64@0.25.4': optional: true - '@esbuild/netbsd-arm64@0.25.3': + '@esbuild/netbsd-arm64@0.25.4': optional: true '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.25.3': + '@esbuild/netbsd-x64@0.25.4': optional: true - '@esbuild/openbsd-arm64@0.25.3': + '@esbuild/openbsd-arm64@0.25.4': optional: true '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.25.3': + '@esbuild/openbsd-x64@0.25.4': optional: true '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.25.3': + '@esbuild/sunos-x64@0.25.4': optional: true '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-arm64@0.25.3': + '@esbuild/win32-arm64@0.25.4': optional: true '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-ia32@0.25.3': + '@esbuild/win32-ia32@0.25.4': optional: true '@esbuild/win32-x64@0.21.5': optional: true - '@esbuild/win32-x64@0.25.3': + '@esbuild/win32-x64@0.25.4': optional: true - '@eslint-community/eslint-utils@4.5.1(eslint@9.26.0(jiti@2.4.2))': - dependencies: - eslint: 9.26.0(jiti@2.4.2) - eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.7.0(eslint@8.57.1)': dependencies: eslint: 8.57.1 @@ -7823,7 +7688,7 @@ snapshots: '@mapbox/node-pre-gyp@2.0.0': dependencies: consola: 3.4.2 - detect-libc: 2.0.3 + detect-libc: 2.0.4 https-proxy-agent: 7.0.6 node-fetch: 2.7.0 nopt: 8.1.0 @@ -7875,6 +7740,8 @@ snapshots: '@tybys/wasm-util': 0.9.0 optional: true + '@noble/hashes@1.8.0': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -8254,79 +8121,83 @@ snapshots: '@oxc-project/types@0.67.0': {} - '@oxc-resolver/binding-darwin-arm64@6.0.2': + '@oxc-resolver/binding-darwin-arm64@7.0.1': optional: true - '@oxc-resolver/binding-darwin-x64@6.0.2': + '@oxc-resolver/binding-darwin-x64@7.0.1': optional: true - '@oxc-resolver/binding-freebsd-x64@6.0.2': + '@oxc-resolver/binding-freebsd-x64@7.0.1': optional: true - '@oxc-resolver/binding-linux-arm-gnueabihf@6.0.2': + '@oxc-resolver/binding-linux-arm-gnueabihf@7.0.1': optional: true - '@oxc-resolver/binding-linux-arm64-gnu@6.0.2': + '@oxc-resolver/binding-linux-arm64-gnu@7.0.1': optional: true - '@oxc-resolver/binding-linux-arm64-musl@6.0.2': + '@oxc-resolver/binding-linux-arm64-musl@7.0.1': optional: true - '@oxc-resolver/binding-linux-riscv64-gnu@6.0.2': + '@oxc-resolver/binding-linux-riscv64-gnu@7.0.1': optional: true - '@oxc-resolver/binding-linux-s390x-gnu@6.0.2': + '@oxc-resolver/binding-linux-s390x-gnu@7.0.1': optional: true - '@oxc-resolver/binding-linux-x64-gnu@6.0.2': + '@oxc-resolver/binding-linux-x64-gnu@7.0.1': optional: true - '@oxc-resolver/binding-linux-x64-musl@6.0.2': + '@oxc-resolver/binding-linux-x64-musl@7.0.1': optional: true - '@oxc-resolver/binding-wasm32-wasi@6.0.2': + '@oxc-resolver/binding-wasm32-wasi@7.0.1': dependencies: '@napi-rs/wasm-runtime': 0.2.9 optional: true - '@oxc-resolver/binding-win32-arm64-msvc@6.0.2': + '@oxc-resolver/binding-win32-arm64-msvc@7.0.1': optional: true - '@oxc-resolver/binding-win32-x64-msvc@6.0.2': + '@oxc-resolver/binding-win32-x64-msvc@7.0.1': optional: true - '@oxc-transform/binding-darwin-arm64@0.66.0': + '@oxc-transform/binding-darwin-arm64@0.67.0': optional: true - '@oxc-transform/binding-darwin-x64@0.66.0': + '@oxc-transform/binding-darwin-x64@0.67.0': optional: true - '@oxc-transform/binding-linux-arm-gnueabihf@0.66.0': + '@oxc-transform/binding-linux-arm-gnueabihf@0.67.0': optional: true - '@oxc-transform/binding-linux-arm64-gnu@0.66.0': + '@oxc-transform/binding-linux-arm64-gnu@0.67.0': optional: true - '@oxc-transform/binding-linux-arm64-musl@0.66.0': + '@oxc-transform/binding-linux-arm64-musl@0.67.0': optional: true - '@oxc-transform/binding-linux-x64-gnu@0.66.0': + '@oxc-transform/binding-linux-x64-gnu@0.67.0': optional: true - '@oxc-transform/binding-linux-x64-musl@0.66.0': + '@oxc-transform/binding-linux-x64-musl@0.67.0': optional: true - '@oxc-transform/binding-wasm32-wasi@0.66.0': + '@oxc-transform/binding-wasm32-wasi@0.67.0': dependencies: '@napi-rs/wasm-runtime': 0.2.9 optional: true - '@oxc-transform/binding-win32-arm64-msvc@0.66.0': + '@oxc-transform/binding-win32-arm64-msvc@0.67.0': optional: true - '@oxc-transform/binding-win32-x64-msvc@0.66.0': + '@oxc-transform/binding-win32-x64-msvc@0.67.0': optional: true + '@paralleldrive/cuid2@2.2.2': + dependencies: + '@noble/hashes': 1.8.0 + '@pkgjs/parseargs@0.11.0': optional: true @@ -8341,7 +8212,7 @@ snapshots: '@postlight/parser@2.2.3': dependencies: - '@babel/runtime-corejs2': 7.27.0 + '@babel/runtime-corejs2': 7.27.1 '@postlight/ci-failed-test-reporter': 1.0.26 cheerio: 0.22.0 difflib: https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed @@ -8461,79 +8332,79 @@ snapshots: '@rolldown/binding-win32-x64-msvc@1.0.0-beta.8-commit.852c603': optional: true - '@rollup/pluginutils@5.1.4(rollup@4.37.0)': + '@rollup/pluginutils@5.1.4(rollup@4.40.2)': dependencies: '@types/estree': 1.0.7 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.37.0 + rollup: 4.40.2 - '@rollup/rollup-android-arm-eabi@4.37.0': + '@rollup/rollup-android-arm-eabi@4.40.2': optional: true - '@rollup/rollup-android-arm64@4.37.0': + '@rollup/rollup-android-arm64@4.40.2': optional: true - '@rollup/rollup-darwin-arm64@4.37.0': + '@rollup/rollup-darwin-arm64@4.40.2': optional: true - '@rollup/rollup-darwin-x64@4.37.0': + '@rollup/rollup-darwin-x64@4.40.2': optional: true - '@rollup/rollup-freebsd-arm64@4.37.0': + '@rollup/rollup-freebsd-arm64@4.40.2': optional: true - '@rollup/rollup-freebsd-x64@4.37.0': + '@rollup/rollup-freebsd-x64@4.40.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.37.0': + '@rollup/rollup-linux-arm-gnueabihf@4.40.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.37.0': + '@rollup/rollup-linux-arm-musleabihf@4.40.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.37.0': + '@rollup/rollup-linux-arm64-gnu@4.40.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.37.0': + '@rollup/rollup-linux-arm64-musl@4.40.2': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.37.0': + '@rollup/rollup-linux-loongarch64-gnu@4.40.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.37.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.40.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.37.0': + '@rollup/rollup-linux-riscv64-gnu@4.40.2': optional: true - '@rollup/rollup-linux-riscv64-musl@4.37.0': + '@rollup/rollup-linux-riscv64-musl@4.40.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.37.0': + '@rollup/rollup-linux-s390x-gnu@4.40.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.37.0': + '@rollup/rollup-linux-x64-gnu@4.40.2': optional: true - '@rollup/rollup-linux-x64-musl@4.37.0': + '@rollup/rollup-linux-x64-musl@4.40.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.37.0': + '@rollup/rollup-win32-arm64-msvc@4.40.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.37.0': + '@rollup/rollup-win32-ia32-msvc@4.40.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.37.0': + '@rollup/rollup-win32-x64-msvc@4.40.2': optional: true '@rss3/api-core@0.0.25': dependencies: openapi-fetch: 0.11.3 ts-case-convert: 2.1.0 - type-fest: 4.38.0 + type-fest: 4.41.0 '@rss3/api-utils@0.0.25': dependencies: @@ -8627,7 +8498,7 @@ snapshots: '@stylistic/eslint-plugin@4.2.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: - '@typescript-eslint/utils': 8.28.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) + '@typescript-eslint/utils': 8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3) eslint: 9.26.0(jiti@2.4.2) eslint-visitor-keys: 4.2.0 espree: 10.3.0 @@ -8679,8 +8550,6 @@ snapshots: '@types/estree': 1.0.7 '@types/json-schema': 7.0.15 - '@types/estree@1.0.6': {} - '@types/estree@1.0.7': {} '@types/etag@1.8.3': @@ -8706,7 +8575,7 @@ snapshots: dependencies: '@types/node': 22.15.14 '@types/tough-cookie': 4.0.5 - parse5: 7.2.1 + parse5: 7.3.0 '@types/json-bigint@1.0.4': {} @@ -8848,11 +8717,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.28.0': - dependencies: - '@typescript-eslint/types': 8.28.0 - '@typescript-eslint/visitor-keys': 8.28.0 - '@typescript-eslint/scope-manager@8.32.0': dependencies: '@typescript-eslint/types': 8.32.0 @@ -8869,24 +8733,8 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.28.0': {} - '@typescript-eslint/types@8.32.0': {} - '@typescript-eslint/typescript-estree@8.28.0(typescript@5.8.3)': - dependencies: - '@typescript-eslint/types': 8.28.0 - '@typescript-eslint/visitor-keys': 8.28.0 - debug: 4.4.0 - fast-glob: 3.3.3 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.7.1 - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.32.0(typescript@5.8.3)': dependencies: '@typescript-eslint/types': 8.32.0 @@ -8901,17 +8749,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.28.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': - dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0(jiti@2.4.2)) - '@typescript-eslint/scope-manager': 8.28.0 - '@typescript-eslint/types': 8.28.0 - '@typescript-eslint/typescript-estree': 8.28.0(typescript@5.8.3) - eslint: 9.26.0(jiti@2.4.2) - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/utils@8.32.0(eslint@9.26.0(jiti@2.4.2))(typescript@5.8.3)': dependencies: '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0(jiti@2.4.2)) @@ -8923,11 +8760,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.28.0': - dependencies: - '@typescript-eslint/types': 8.28.0 - eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.32.0': dependencies: '@typescript-eslint/types': 8.32.0 @@ -8939,10 +8771,10 @@ snapshots: dependencies: valibot: 1.0.0(typescript@5.8.3) - '@vercel/nft@0.29.2(rollup@4.37.0)': + '@vercel/nft@0.29.2(rollup@4.40.2)': dependencies: '@mapbox/node-pre-gyp': 2.0.0 - '@rollup/pluginutils': 5.1.4(rollup@4.37.0) + '@rollup/pluginutils': 5.1.4(rollup@4.40.2) acorn: 8.14.1 acorn-import-attributes: 1.9.5(acorn@8.14.1) async-sema: 3.1.1 @@ -8969,7 +8801,7 @@ snapshots: istanbul-reports: 3.1.7 magic-string: 0.30.17 magicast: 0.3.5 - std-env: 3.8.1 + std-env: 3.9.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 vitest: 2.1.9(@types/node@22.15.14)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)) @@ -8983,14 +8815,14 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.14)(lightningcss@1.29.3))': + '@vitest/mocker@2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.19(@types/node@22.15.14)(lightningcss@1.29.3))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: msw: 2.4.3(typescript@5.8.3) - vite: 5.4.15(@types/node@22.15.14)(lightningcss@1.29.3) + vite: 5.4.19(@types/node@22.15.14)(lightningcss@1.29.3) '@vitest/pretty-format@2.1.9': dependencies: @@ -9019,7 +8851,7 @@ snapshots: abbrev@2.0.0: {} - abbrev@3.0.0: {} + abbrev@3.0.1: {} accepts@2.0.0: dependencies: @@ -9108,7 +8940,7 @@ snapshots: ast-kit@1.4.3: dependencies: - '@babel/parser': 7.27.0 + '@babel/parser': 7.27.2 pathe: 2.0.3 ast-types@0.13.4: @@ -9133,27 +8965,27 @@ snapshots: b4a@1.6.7: {} - babel-plugin-polyfill-corejs2@0.4.13(@babel/core@7.26.10): + babel-plugin-polyfill-corejs2@0.4.13(@babel/core@7.27.1): dependencies: '@babel/compat-data': 7.27.2 - '@babel/core': 7.26.10 - '@babel/helper-define-polyfill-provider': 0.6.4(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-define-polyfill-provider': 0.6.4(@babel/core@7.27.1) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.11.1(@babel/core@7.26.10): + babel-plugin-polyfill-corejs3@0.11.1(@babel/core@7.27.1): dependencies: - '@babel/core': 7.26.10 - '@babel/helper-define-polyfill-provider': 0.6.4(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-define-polyfill-provider': 0.6.4(@babel/core@7.27.1) core-js-compat: 3.42.0 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.4(@babel/core@7.26.10): + babel-plugin-polyfill-regenerator@0.6.4(@babel/core@7.27.1): dependencies: - '@babel/core': 7.26.10 - '@babel/helper-define-polyfill-provider': 0.6.4(@babel/core@7.26.10) + '@babel/core': 7.27.1 + '@babel/helper-define-polyfill-provider': 0.6.4(@babel/core@7.27.1) transitivePeerDependencies: - supports-color @@ -9198,7 +9030,7 @@ snapshots: big-integer@1.6.52: {} - bignumber.js@9.1.2: {} + bignumber.js@9.3.0: {} bindings@1.5.0: dependencies: @@ -9391,7 +9223,7 @@ snapshots: domutils: 3.2.2 encoding-sniffer: 0.2.0 htmlparser2: 9.1.0 - parse5: 7.2.1 + parse5: 7.3.0 parse5-htmlparser2-tree-adapter: 7.1.0 parse5-parser-stream: 7.1.2 undici: 6.21.2 @@ -9592,9 +9424,9 @@ snapshots: css-what@6.1.0: {} - cssstyle@4.3.0: + cssstyle@4.3.1: dependencies: - '@asamuzakjp/css-color': 3.1.1 + '@asamuzakjp/css-color': 3.1.7 rrweb-cssom: 0.8.0 currency-symbol-map@5.1.0: {} @@ -9682,8 +9514,6 @@ snapshots: destr@2.0.5: {} - detect-libc@2.0.3: {} - detect-libc@2.0.4: {} devlop@1.1.0: @@ -9770,9 +9600,9 @@ snapshots: dotenv@6.2.0: {} - dts-resolver@1.0.1: + dts-resolver@1.1.1: dependencies: - oxc-resolver: 6.0.2 + oxc-resolver: 7.0.1 pathe: 2.0.3 eastasianwidth@0.2.0: {} @@ -9843,7 +9673,7 @@ snapshots: dependencies: is-arrayish: 0.2.1 - es-module-lexer@1.6.0: {} + es-module-lexer@1.7.0: {} es5-ext@0.10.64: dependencies: @@ -9889,33 +9719,33 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - esbuild@0.25.3: + esbuild@0.25.4: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.3 - '@esbuild/android-arm': 0.25.3 - '@esbuild/android-arm64': 0.25.3 - '@esbuild/android-x64': 0.25.3 - '@esbuild/darwin-arm64': 0.25.3 - '@esbuild/darwin-x64': 0.25.3 - '@esbuild/freebsd-arm64': 0.25.3 - '@esbuild/freebsd-x64': 0.25.3 - '@esbuild/linux-arm': 0.25.3 - '@esbuild/linux-arm64': 0.25.3 - '@esbuild/linux-ia32': 0.25.3 - '@esbuild/linux-loong64': 0.25.3 - '@esbuild/linux-mips64el': 0.25.3 - '@esbuild/linux-ppc64': 0.25.3 - '@esbuild/linux-riscv64': 0.25.3 - '@esbuild/linux-s390x': 0.25.3 - '@esbuild/linux-x64': 0.25.3 - '@esbuild/netbsd-arm64': 0.25.3 - '@esbuild/netbsd-x64': 0.25.3 - '@esbuild/openbsd-arm64': 0.25.3 - '@esbuild/openbsd-x64': 0.25.3 - '@esbuild/sunos-x64': 0.25.3 - '@esbuild/win32-arm64': 0.25.3 - '@esbuild/win32-ia32': 0.25.3 - '@esbuild/win32-x64': 0.25.3 + '@esbuild/aix-ppc64': 0.25.4 + '@esbuild/android-arm': 0.25.4 + '@esbuild/android-arm64': 0.25.4 + '@esbuild/android-x64': 0.25.4 + '@esbuild/darwin-arm64': 0.25.4 + '@esbuild/darwin-x64': 0.25.4 + '@esbuild/freebsd-arm64': 0.25.4 + '@esbuild/freebsd-x64': 0.25.4 + '@esbuild/linux-arm': 0.25.4 + '@esbuild/linux-arm64': 0.25.4 + '@esbuild/linux-ia32': 0.25.4 + '@esbuild/linux-loong64': 0.25.4 + '@esbuild/linux-mips64el': 0.25.4 + '@esbuild/linux-ppc64': 0.25.4 + '@esbuild/linux-riscv64': 0.25.4 + '@esbuild/linux-s390x': 0.25.4 + '@esbuild/linux-x64': 0.25.4 + '@esbuild/netbsd-arm64': 0.25.4 + '@esbuild/netbsd-x64': 0.25.4 + '@esbuild/openbsd-arm64': 0.25.4 + '@esbuild/openbsd-x64': 0.25.4 + '@esbuild/sunos-x64': 0.25.4 + '@esbuild/win32-arm64': 0.25.4 + '@esbuild/win32-ia32': 0.25.4 + '@esbuild/win32-x64': 0.25.4 escalade@3.2.0: {} @@ -9982,14 +9812,14 @@ snapshots: eslint-plugin-es-x@7.8.0(eslint@9.26.0(jiti@2.4.2)): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.26.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 eslint: 9.26.0(jiti@2.4.2) eslint-compat-utils: 0.5.1(eslint@9.26.0(jiti@2.4.2)) eslint-plugin-n@17.17.0(eslint@9.26.0(jiti@2.4.2)): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.26.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.26.0(jiti@2.4.2)) enhanced-resolve: 5.18.1 eslint: 9.26.0(jiti@2.4.2) eslint-plugin-es-x: 7.8.0(eslint@9.26.0(jiti@2.4.2)) @@ -10215,7 +10045,7 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - expect-type@1.2.0: {} + expect-type@1.2.1: {} express-rate-limit@7.5.0(express@5.1.0): dependencies: @@ -10419,10 +10249,10 @@ snapshots: es-set-tostringtag: '@nolyfill/es-set-tostringtag@1.0.44' mime-types: 2.1.35 - formidable@3.5.2: + formidable@3.5.4: dependencies: + '@paralleldrive/cuid2': 2.2.2 dezalgo: 1.0.4 - hexoid: 2.0.0 once: 1.4.0 forwarded-parse@2.1.2: {} @@ -10603,13 +10433,13 @@ snapshots: lowercase-keys: 3.0.0 p-cancelable: 4.0.1 responselike: 3.0.0 - type-fest: 4.38.0 + type-fest: 4.41.0 graceful-fs@4.2.11: {} graphemer@1.4.0: {} - graphql@16.10.0: {} + graphql@16.11.0: {} gtoken@7.1.0: dependencies: @@ -10640,8 +10470,6 @@ snapshots: heap@0.2.7: {} - hexoid@2.0.0: {} - hmacsha1@1.0.0: {} hono@4.7.8: {} @@ -11017,7 +10845,7 @@ snapshots: jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): dependencies: - cssstyle: 4.3.0 + cssstyle: 4.3.1 data-urls: 5.0.0 decimal.js: 10.5.0 html-encoding-sniffer: 4.0.0 @@ -11025,7 +10853,7 @@ snapshots: https-proxy-agent: 7.0.6 is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.20 - parse5: 7.2.1 + parse5: 7.3.0 rrweb-cssom: 0.8.0 saxes: 6.0.0 symbol-tree: 3.2.4 @@ -11035,7 +10863,7 @@ snapshots: whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 14.2.0 - ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + ws: 8.18.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil @@ -11050,7 +10878,7 @@ snapshots: json-bigint@1.0.0: dependencies: - bignumber.js: 9.1.2 + bignumber.js: 9.3.0 json-buffer@3.0.1: {} @@ -11206,7 +11034,7 @@ snapshots: debug: 4.4.0 execa: 8.0.1 lilconfig: 3.1.3 - listr2: 8.3.2 + listr2: 8.3.3 micromatch: 4.0.8 pidtree: 0.6.0 string-argv: 0.3.2 @@ -11214,7 +11042,7 @@ snapshots: transitivePeerDependencies: - supports-color - listr2@8.3.2: + listr2@8.3.3: dependencies: cli-truncate: 4.0.0 colorette: 2.0.20 @@ -11279,7 +11107,7 @@ snapshots: safe-stable-stringify: 2.5.0 triple-beam: 1.4.1 - long@5.3.1: {} + long@5.3.2: {} loupe@3.1.3: {} @@ -11311,8 +11139,8 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 + '@babel/parser': 7.27.2 + '@babel/types': 7.27.1 source-map-js: 1.2.1 mailparser@3.7.2: @@ -11584,10 +11412,9 @@ snapshots: minipass@7.1.2: {} - minizlib@3.0.1: + minizlib@3.0.2: dependencies: minipass: 7.1.2 - rimraf: 5.0.10 mitt@3.0.1: {} @@ -11625,13 +11452,13 @@ snapshots: '@types/cookie': 0.6.0 '@types/statuses': 2.0.5 chalk: 4.1.2 - graphql: 16.10.0 + graphql: 16.11.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 path-to-regexp: 6.3.0 strict-event-emitter: 0.5.1 - type-fest: 4.38.0 + type-fest: 4.41.0 yargs: 17.7.2 optionalDependencies: typescript: 5.8.3 @@ -11675,7 +11502,7 @@ snapshots: iconv-lite: 0.6.3 open: 8.4.2 undici: 6.21.2 - ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + ws: 8.18.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -11692,7 +11519,7 @@ snapshots: nopt@8.1.0: dependencies: - abbrev: 3.0.0 + abbrev: 3.0.1 normalize-url@8.0.1: {} @@ -11811,34 +11638,34 @@ snapshots: outvariant@1.4.3: {} - oxc-resolver@6.0.2: + oxc-resolver@7.0.1: optionalDependencies: - '@oxc-resolver/binding-darwin-arm64': 6.0.2 - '@oxc-resolver/binding-darwin-x64': 6.0.2 - '@oxc-resolver/binding-freebsd-x64': 6.0.2 - '@oxc-resolver/binding-linux-arm-gnueabihf': 6.0.2 - '@oxc-resolver/binding-linux-arm64-gnu': 6.0.2 - '@oxc-resolver/binding-linux-arm64-musl': 6.0.2 - '@oxc-resolver/binding-linux-riscv64-gnu': 6.0.2 - '@oxc-resolver/binding-linux-s390x-gnu': 6.0.2 - '@oxc-resolver/binding-linux-x64-gnu': 6.0.2 - '@oxc-resolver/binding-linux-x64-musl': 6.0.2 - '@oxc-resolver/binding-wasm32-wasi': 6.0.2 - '@oxc-resolver/binding-win32-arm64-msvc': 6.0.2 - '@oxc-resolver/binding-win32-x64-msvc': 6.0.2 - - oxc-transform@0.66.0: + '@oxc-resolver/binding-darwin-arm64': 7.0.1 + '@oxc-resolver/binding-darwin-x64': 7.0.1 + '@oxc-resolver/binding-freebsd-x64': 7.0.1 + '@oxc-resolver/binding-linux-arm-gnueabihf': 7.0.1 + '@oxc-resolver/binding-linux-arm64-gnu': 7.0.1 + '@oxc-resolver/binding-linux-arm64-musl': 7.0.1 + '@oxc-resolver/binding-linux-riscv64-gnu': 7.0.1 + '@oxc-resolver/binding-linux-s390x-gnu': 7.0.1 + '@oxc-resolver/binding-linux-x64-gnu': 7.0.1 + '@oxc-resolver/binding-linux-x64-musl': 7.0.1 + '@oxc-resolver/binding-wasm32-wasi': 7.0.1 + '@oxc-resolver/binding-win32-arm64-msvc': 7.0.1 + '@oxc-resolver/binding-win32-x64-msvc': 7.0.1 + + oxc-transform@0.67.0: optionalDependencies: - '@oxc-transform/binding-darwin-arm64': 0.66.0 - '@oxc-transform/binding-darwin-x64': 0.66.0 - '@oxc-transform/binding-linux-arm-gnueabihf': 0.66.0 - '@oxc-transform/binding-linux-arm64-gnu': 0.66.0 - '@oxc-transform/binding-linux-arm64-musl': 0.66.0 - '@oxc-transform/binding-linux-x64-gnu': 0.66.0 - '@oxc-transform/binding-linux-x64-musl': 0.66.0 - '@oxc-transform/binding-wasm32-wasi': 0.66.0 - '@oxc-transform/binding-win32-arm64-msvc': 0.66.0 - '@oxc-transform/binding-win32-x64-msvc': 0.66.0 + '@oxc-transform/binding-darwin-arm64': 0.67.0 + '@oxc-transform/binding-darwin-x64': 0.67.0 + '@oxc-transform/binding-linux-arm-gnueabihf': 0.67.0 + '@oxc-transform/binding-linux-arm64-gnu': 0.67.0 + '@oxc-transform/binding-linux-arm64-musl': 0.67.0 + '@oxc-transform/binding-linux-x64-gnu': 0.67.0 + '@oxc-transform/binding-linux-x64-musl': 0.67.0 + '@oxc-transform/binding-wasm32-wasi': 0.67.0 + '@oxc-transform/binding-win32-arm64-msvc': 0.67.0 + '@oxc-transform/binding-win32-x64-msvc': 0.67.0 p-cancelable@3.0.0: {} @@ -11886,7 +11713,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.26.2 + '@babel/code-frame': 7.27.1 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -11896,15 +11723,15 @@ snapshots: parse5-htmlparser2-tree-adapter@7.1.0: dependencies: domhandler: 5.0.3 - parse5: 7.2.1 + parse5: 7.3.0 parse5-parser-stream@7.1.2: dependencies: - parse5: 7.2.1 + parse5: 7.3.0 - parse5@7.2.1: + parse5@7.3.0: dependencies: - entities: 4.5.0 + entities: 6.0.0 parseley@0.12.1: dependencies: @@ -12057,7 +11884,7 @@ snapshots: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/node': 22.15.14 - long: 5.3.1 + long: 5.3.2 proxy-addr@2.0.7: dependencies: @@ -12247,8 +12074,6 @@ snapshots: regenerate@1.4.2: {} - regenerator-runtime@0.14.1: {} - regexp-tree@0.1.27: {} regexpu-core@6.2.0: @@ -12365,20 +12190,16 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@5.0.10: + rolldown-plugin-dts@0.9.11(rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3))(typescript@5.8.3): dependencies: - glob: 10.4.5 - - rolldown-plugin-dts@0.9.7(rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3))(typescript@5.8.3): - dependencies: - '@babel/generator': 7.27.0 - '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 + '@babel/generator': 7.27.1 + '@babel/parser': 7.27.2 + '@babel/types': 7.27.1 ast-kit: 1.4.3 debug: 4.4.0 - dts-resolver: 1.0.1 + dts-resolver: 1.1.1 get-tsconfig: 4.10.0 - oxc-transform: 0.66.0 + oxc-transform: 0.67.0 rolldown: 1.0.0-beta.8-commit.852c603(typescript@5.8.3) optionalDependencies: typescript: 5.8.3 @@ -12407,30 +12228,30 @@ snapshots: transitivePeerDependencies: - typescript - rollup@4.37.0: + rollup@4.40.2: dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.7 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.37.0 - '@rollup/rollup-android-arm64': 4.37.0 - '@rollup/rollup-darwin-arm64': 4.37.0 - '@rollup/rollup-darwin-x64': 4.37.0 - '@rollup/rollup-freebsd-arm64': 4.37.0 - '@rollup/rollup-freebsd-x64': 4.37.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.37.0 - '@rollup/rollup-linux-arm-musleabihf': 4.37.0 - '@rollup/rollup-linux-arm64-gnu': 4.37.0 - '@rollup/rollup-linux-arm64-musl': 4.37.0 - '@rollup/rollup-linux-loongarch64-gnu': 4.37.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.37.0 - '@rollup/rollup-linux-riscv64-gnu': 4.37.0 - '@rollup/rollup-linux-riscv64-musl': 4.37.0 - '@rollup/rollup-linux-s390x-gnu': 4.37.0 - '@rollup/rollup-linux-x64-gnu': 4.37.0 - '@rollup/rollup-linux-x64-musl': 4.37.0 - '@rollup/rollup-win32-arm64-msvc': 4.37.0 - '@rollup/rollup-win32-ia32-msvc': 4.37.0 - '@rollup/rollup-win32-x64-msvc': 4.37.0 + '@rollup/rollup-android-arm-eabi': 4.40.2 + '@rollup/rollup-android-arm64': 4.40.2 + '@rollup/rollup-darwin-arm64': 4.40.2 + '@rollup/rollup-darwin-x64': 4.40.2 + '@rollup/rollup-freebsd-arm64': 4.40.2 + '@rollup/rollup-freebsd-x64': 4.40.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.40.2 + '@rollup/rollup-linux-arm-musleabihf': 4.40.2 + '@rollup/rollup-linux-arm64-gnu': 4.40.2 + '@rollup/rollup-linux-arm64-musl': 4.40.2 + '@rollup/rollup-linux-loongarch64-gnu': 4.40.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.40.2 + '@rollup/rollup-linux-riscv64-gnu': 4.40.2 + '@rollup/rollup-linux-riscv64-musl': 4.40.2 + '@rollup/rollup-linux-s390x-gnu': 4.40.2 + '@rollup/rollup-linux-x64-gnu': 4.40.2 + '@rollup/rollup-linux-x64-musl': 4.40.2 + '@rollup/rollup-win32-arm64-msvc': 4.40.2 + '@rollup/rollup-win32-ia32-msvc': 4.40.2 + '@rollup/rollup-win32-x64-msvc': 4.40.2 fsevents: 2.3.3 router@2.2.0: @@ -12619,7 +12440,7 @@ snapshots: statuses@2.0.1: {} - std-env@3.8.1: {} + std-env@3.9.0: {} stealthy-require@1.1.1: {} @@ -12697,7 +12518,7 @@ snapshots: debug: 4.4.0 fast-safe-stringify: 2.1.1 form-data: 4.0.2 - formidable: 3.5.2 + formidable: 3.5.4 methods: 1.1.2 mime: 2.6.0 qs: 6.14.0 @@ -12755,7 +12576,7 @@ snapshots: '@isaacs/fs-minipass': 4.0.1 chownr: 3.0.0 minipass: 7.1.2 - minizlib: 3.0.1 + minizlib: 3.0.2 mkdirp: 3.0.1 yallist: 5.0.0 @@ -12828,7 +12649,7 @@ snapshots: tlds@1.255.0: {} - tlds@1.256.0: {} + tlds@1.258.0: {} tldts-core@6.1.86: {} @@ -12882,7 +12703,7 @@ snapshots: tr46@0.0.3: {} - tr46@5.1.0: + tr46@5.1.1: dependencies: punycode: 2.3.1 @@ -12918,7 +12739,7 @@ snapshots: hookable: 5.5.3 lightningcss: 1.29.3 rolldown: 1.0.0-beta.8-commit.852c603(typescript@5.8.3) - rolldown-plugin-dts: 0.9.7(rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3))(typescript@5.8.3) + rolldown-plugin-dts: 0.9.11(rolldown@1.0.0-beta.8-commit.852c603(typescript@5.8.3))(typescript@5.8.3) tinyexec: 1.0.1 tinyglobby: 0.2.13 unconfig: 7.3.2 @@ -12934,7 +12755,7 @@ snapshots: tsx@4.19.4: dependencies: - esbuild: 0.25.3 + esbuild: 0.25.4 get-tsconfig: 4.10.0 optionalDependencies: fsevents: 2.3.3 @@ -12965,7 +12786,7 @@ snapshots: type-fest@1.4.0: {} - type-fest@4.38.0: {} + type-fest@4.41.0: {} type-is@2.0.1: dependencies: @@ -13066,7 +12887,7 @@ snapshots: url-regex-safe@3.0.0: dependencies: ip-regex: 4.3.0 - tlds: 1.256.0 + tlds: 1.258.0 url-template@2.0.8: {} @@ -13118,9 +12939,9 @@ snapshots: dependencies: cac: 6.7.14 debug: 4.4.0 - es-module-lexer: 1.6.0 + es-module-lexer: 1.7.0 pathe: 1.1.2 - vite: 5.4.15(@types/node@22.15.14)(lightningcss@1.29.3) + vite: 5.4.19(@types/node@22.15.14)(lightningcss@1.29.3) transitivePeerDependencies: - '@types/node' - less @@ -13132,22 +12953,22 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.15(@types/node@22.15.14)(lightningcss@1.29.3)): + vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@5.4.19(@types/node@22.15.14)(lightningcss@1.29.3)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.3) optionalDependencies: - vite: 5.4.15(@types/node@22.15.14)(lightningcss@1.29.3) + vite: 5.4.19(@types/node@22.15.14)(lightningcss@1.29.3) transitivePeerDependencies: - supports-color - typescript - vite@5.4.15(@types/node@22.15.14)(lightningcss@1.29.3): + vite@5.4.19(@types/node@22.15.14)(lightningcss@1.29.3): dependencies: esbuild: 0.21.5 postcss: 8.5.3 - rollup: 4.37.0 + rollup: 4.40.2 optionalDependencies: '@types/node': 22.15.14 fsevents: 2.3.3 @@ -13156,7 +12977,7 @@ snapshots: vitest@2.1.9(@types/node@22.15.14)(jsdom@26.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(lightningcss@1.29.3)(msw@2.4.3(typescript@5.8.3)): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.15(@types/node@22.15.14)(lightningcss@1.29.3)) + '@vitest/mocker': 2.1.9(msw@2.4.3(typescript@5.8.3))(vite@5.4.19(@types/node@22.15.14)(lightningcss@1.29.3)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -13164,15 +12985,15 @@ snapshots: '@vitest/utils': 2.1.9 chai: 5.2.0 debug: 4.4.0 - expect-type: 1.2.0 + expect-type: 1.2.1 magic-string: 0.30.17 pathe: 1.1.2 - std-env: 3.8.1 + std-env: 3.9.0 tinybench: 2.9.0 tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.15(@types/node@22.15.14)(lightningcss@1.29.3) + vite: 5.4.19(@types/node@22.15.14)(lightningcss@1.29.3) vite-node: 2.1.9(@types/node@22.15.14)(lightningcss@1.29.3) why-is-node-running: 2.3.0 optionalDependencies: @@ -13222,7 +13043,7 @@ snapshots: whatwg-url@14.2.0: dependencies: - tr46: 5.1.0 + tr46: 5.1.1 webidl-conversions: 7.0.0 whatwg-url@5.0.0: @@ -13298,7 +13119,7 @@ snapshots: bufferutil: 4.0.9 utf-8-validate: 5.0.10 - ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): + ws@8.18.2(bufferutil@4.0.9)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.9 utf-8-validate: 5.0.10 @@ -13335,9 +13156,7 @@ snapshots: yaml-eslint-parser@1.3.0: dependencies: eslint-visitor-keys: 3.4.3 - yaml: 2.7.0 - - yaml@2.7.0: {} + yaml: 2.7.1 yaml@2.7.1: {} From 8e3b9a51257ea4723f01c799b367016e69e4e18a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 19:55:06 +0800 Subject: [PATCH 0565/2658] chore(deps-dev): bump lint-staged from 15.5.1 to 15.5.2 (#19035) Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 15.5.1 to 15.5.2. - [Release notes](https://github.com/lint-staged/lint-staged/releases) - [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md) - [Commits](https://github.com/lint-staged/lint-staged/compare/v15.5.1...v15.5.2) --- updated-dependencies: - dependency-name: lint-staged dependency-version: 15.5.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 543ddbda1175..15d15a5a1966 100644 --- a/package.json +++ b/package.json @@ -185,7 +185,7 @@ "got": "14.4.7", "husky": "9.1.7", "js-beautify": "1.15.4", - "lint-staged": "15.5.1", + "lint-staged": "15.5.2", "magic-string": "0.30.17", "mockdate": "3.0.5", "msw": "2.4.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8be9bf0127bf..6eb22e337965 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -423,8 +423,8 @@ importers: specifier: 1.15.4 version: 1.15.4 lint-staged: - specifier: 15.5.1 - version: 15.5.1 + specifier: 15.5.2 + version: 15.5.2 magic-string: specifier: 0.30.17 version: 0.30.17 @@ -4547,8 +4547,8 @@ packages: linkify-it@5.0.0: resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - lint-staged@15.5.1: - resolution: {integrity: sha512-6m7u8mue4Xn6wK6gZvSCQwBvMBR36xfY24nF5bMTf2MHDYG6S3yhJuOgdYVw99hsjyDt2d4z168b3naI8+NWtQ==} + lint-staged@15.5.2: + resolution: {integrity: sha512-YUSOLq9VeRNAo/CTaVmhGDKG+LBtA8KF1X4K5+ykMSwWST1vDxJRB2kv2COgLb1fvpCo+A/y9A0G0znNVmdx4w==} engines: {node: '>=18.12.0'} hasBin: true @@ -10097,7 +10097,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.4.0 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -11027,7 +11027,7 @@ snapshots: dependencies: uc.micro: 2.1.0 - lint-staged@15.5.1: + lint-staged@15.5.2: dependencies: chalk: 5.4.1 commander: 13.1.0 @@ -11894,7 +11894,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.3 - debug: 4.3.4 + debug: 4.4.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 From f8242fe1668ed98170157fd419530735c5024d16 Mon Sep 17 00:00:00 2001 From: Gabrlie <57052263+Gabrlie@users.noreply.github.com> Date: Wed, 7 May 2025 20:06:37 +0800 Subject: [PATCH 0566/2658] fix(route/cool18): update selectors (#18985) * fix(route/cool18): switch puppeteer content fetching due to HTML being disabled * fix(route/cool18): Cancel the hard coding of the id * fix(route/cool18): Remove puppeteer and use json parse * fix(route/cool18): Add default page size * fix(route/cool18): Change the non-home page to the previous acquisition method * fix(route/cool18): Fix some bugs * fix(route/cool18): Unify network requests with ofetch. Optimize code structure --------- Co-authored-by: Gabrlie --- lib/routes/cool18/index.ts | 112 +++++++++++++++++++++++-------------- 1 file changed, 70 insertions(+), 42 deletions(-) diff --git a/lib/routes/cool18/index.ts b/lib/routes/cool18/index.ts index aee781d1fbda..7321c886e333 100644 --- a/lib/routes/cool18/index.ts +++ b/lib/routes/cool18/index.ts @@ -1,68 +1,96 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; +import type { Context } from 'hono'; +import ofetch from '@/utils/ofetch'; + +type PageDataItem = { + tid: string; + username: string; + subject: string; + dateline: string; + type: string; +}; export const route: Route = { path: '/:id?/:type?/:keyword?', + url: 'cool18.com', + example: 'cool18.com/bbs4', + parameters: { + id: 'the name of the bbs', + type: 'the type of the post. Can be `home`, `gold` or `threadsearch`. Default: `home`', + keyword: 'the keyword to search.', + pageSize: 'the number of posts to fetch. If the type is not in search, you can type any words. Default: 10', + }, + categories: ['bbs'], radar: [ { - source: ['cool18.com/'], + source: ['cool18.com/:id/'], + target: '/:id/:type?/:keyword?', }, ], - name: 'Unknown', - maintainers: ['nczitzk'], + name: '禁忌书屋', + maintainers: ['nczitzk', 'Gabrlie'], handler, - url: 'cool18.com/', }; -async function handler(ctx) { - const id = ctx.req.param('id') ?? 'bbs4'; - const type = ctx.req.param('type') ?? ''; - const keyword = ctx.req.param('keyword') ?? ''; +async function handler(ctx: Context) { + const { id = 'bbs4', type = 'home', keyword } = ctx.req.param(); - const rootUrl = 'https://www.cool18.com'; - const indexUrl = `${rootUrl}/${id}/index.php`; - const currentUrl = `${indexUrl}${keyword ? (type ? (type === 'gold' ? '?app=forum&act=gold' : `?action=search&act=threadsearch&app=forum&${type}=${keyword}&submit=${type === 'type' ? '查询' : '栏目搜索'}`) : '') : ''}`; + const rootUrl = 'https://www.cool18.com/' + id + '/index.php'; + const params = type === 'home' ? '' : (type === 'gold' ? '?app=forum&act=gold' : `?action=search&act=threadsearch&app=forum&keywords=${keyword}&submit=查询`); - const response = await got({ - method: 'get', - url: currentUrl, - }); + const currentUrl = rootUrl + params; - const $ = load(response.data); + const response = await ofetch(currentUrl); - let items = $('#d_list ul li, #thread_list li, .t_l .t_subject') - .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20) - .toArray() - .map((item) => { - item = $(item); + const $ = load(response); - const a = item.find('a').first(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; - return { - link: `${rootUrl}/${id}/${a.attr('href')}`, - }; - }); + const list = + type === 'home' + ? JSON.parse( + $('script:contains("_PageData")') + .text() + .match(/const\s+_PageData\s*=\s*(\[[\s\S]*?]);/)?.[1] || '[]' + ) + .slice(0, limit) + .map((item: PageDataItem) => ({ + title: item.subject, + link: `${rootUrl}?app=forum&act=threadview&tid=${item.tid}`, + pubDate: parseDate(item.dateline, 'MM/DD/YY'), + author: item.username, + category: item.type, + description: '', + })) + : $('#d_list ul li, #thread_list li, .t_l .t_subject') + .slice(0, limit) + .toArray() + .map((item) => { + const a = $(item).find('a').first(); + return { + title: a.text(), + link: `${rootUrl}/${a.attr('href')}`, + pubDate: parseDate($(item).find('i').text(), 'MM/DD/YY'), + author: $(item).find('a').last().text(), + category: a.find('span').first().text(), + description: '', + }; + }); - items = await Promise.all( - items.map((item) => + const items = await Promise.all( + list.map((item) => cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - - const content = load(detailResponse.data); - - item.title = content('title').text().replace(' - cool18.com', ''); - item.author = detailResponse.data.match(/送交者: .*>(.*)<.*\[/)[1]; - item.pubDate = parseDate(detailResponse.data.match(/于 (.*) 已读/)[1]).toUTCString(); - item.description = content('pre') - .html() - .replaceAll(/cool18.com<\/font>/g, ''); + const detailResponse = await ofetch(item.link); + const content = load(detailResponse); + const preElement = content('pre'); + if (preElement.length > 0) { + const htmlContent = preElement.html(); + item.description = htmlContent ? htmlContent.replaceAll(/cool18.com<\/font>/g, '') : ''; + } return item; }) ) From b9ca4467be5a615286f53206e82c8f9edbfe66c6 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Thu, 8 May 2025 00:26:11 +0800 Subject: [PATCH 0567/2658] fix(route/udn): Correct regex (#19033) --- lib/routes/udn/breaking-news.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/udn/breaking-news.ts b/lib/routes/udn/breaking-news.ts index f9ffd71022eb..687a1ceae69d 100644 --- a/lib/routes/udn/breaking-news.ts +++ b/lib/routes/udn/breaking-news.ts @@ -53,7 +53,7 @@ async function handler(ctx) { let result = await got(link); // VIP article requires redirection // e.g. https://udn.com/news/story/7331/6576320 - const vip = result.data.match(/', '') - .replaceAll('', '') - .replaceAll('', '') - .replaceAll('', '') - .replaceAll('', '') - .replaceAll('', ''); - const $ = load(formatted); - - const list = $('li.clearfix') - .toArray() - .map((item: any) => { - item = $(item); - const title = item.find('a').first().text(); - const time = timezone(parseDate(item.find('span').first().text(), 'YYYY-MM-DD'), 8); - const a = item.find('a').first().attr('href'); - const fullUrl = new URL(a, host).href; - - return { - title, - link: fullUrl, - pubDate: time, - }; - }) - .filter((item) => !item.title.includes('置顶')); - const items: any = await Promise.all( - list.map((item: any) => - cache.tryGet(item.link, async () => { - const host = new URL(item.link).hostname; - if (host === 'www.zjzwfw.gov.cn') { - // 来源为浙江政务服务网 - const content = await crawler(item, browser); - const $ = load(content); - item.description = art(path.resolve(__dirname, 'templates/jbxx.art'), analyzer($('.item-left .item .bg_box'))); - item.author = '浙江政务服务网'; - item.category = $('meta[name="ColumnType"]').attr('content'); - } else { - // 其他正常抓取 - const response = await got(item.link); - const $ = load(response.data); - if (host === 'police.hangzhou.gov.cn') { - // 来源为杭州市公安局 - item.description = $('.art-content .wz_con_content').html(); - item.author = $('meta[name="ContentSource"]').attr('content'); - item.category = $('meta[name="ColumnType"]').attr('content'); - } else { - // 缺省:来源为杭州市政府网 - item.description = $('.article').html(); - item.author = $('meta[name="ContentSource"]').attr('content'); - item.category = $('meta[name="ColumnType"]').attr('content'); - } - } - item.pubDate = $('meta[name="PubDate"]').length ? timezone(parseDate($('meta[name="PubDate"]').attr('content') as string, 'YYYY-MM-DD HH:mm'), 8) : item.pubDate; - return item; - }) - ) - ); - - await browser.close(); - return { - allowEmpty: true, - title: '杭州市人民政府-政务服务公开', - link, - item: items, - }; -} diff --git a/lib/routes/gov/hangzhou/zwfw.tsx b/lib/routes/gov/hangzhou/zwfw.tsx new file mode 100644 index 000000000000..52d898934c14 --- /dev/null +++ b/lib/routes/gov/hangzhou/zwfw.tsx @@ -0,0 +1,288 @@ +import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +import type { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import puppeteer from '@/utils/puppeteer'; +import timezone from '@/utils/timezone'; + +import { analyzer, crawler } from './zjzwfw'; + +const renderDescription = ({ serviceInfo, applicationInfo, resultInfo, feeInfo, approvalInfo, deliveryInfo, agentService, otherInfo }) => + renderToString( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {otherInfo.legalPersonThemeClassification ? ( + <> + + + + + + ) : ( + <> + + + + )} + + + + + + + + + + + + + + +
    办事信息
    服务对象{serviceInfo.serviceTarget}办理形式{serviceInfo.processingMethods}
    办理地点{serviceInfo.processingLocation}
    办理时间{serviceInfo.processingTime}
    申请信息
    受理条件{applicationInfo.acceptanceConditions}
    禁止性要求{applicationInfo.prohibitedRequirements}
    数量限制{applicationInfo.quantityRestrictions}
    结果信息
    审批结果名称{resultInfo.approvalResult}
    审批结果样本{resultInfo.approvalSample ? raw(resultInfo.approvalSample) : null}审批结果类型{resultInfo.approvalResultType}
    收费信息
    是否收费{feeInfo.isThereAFee}是否支持网上支付{feeInfo.isOnlinePaymentSupported}
    审批信息
    权力来源{approvalInfo.authoritySource}
    行使层级{approvalInfo.exerciseLevel}实施主体性质{approvalInfo.implementingEntity}
    送达信息
    是否支持物流快递{deliveryInfo.isLogisticsSupported}送达时限{deliveryInfo.deliveryTimeframe}
    送达方式{deliveryInfo.deliveryMethods}
    中介服务信息
    中介服务事项名称{agentService}
    其他信息
    部门名称{otherInfo.departmentName}事项类型{otherInfo.matterType}
    受理机构{otherInfo.acceptingInstitution}
    基本编码{otherInfo.basicCode}实施编码{otherInfo.implementationCode}
    通办范围{otherInfo.scopeOfGeneralHandling}办件类型{otherInfo.documentType}
    决定机构{otherInfo.decisionMakingAuthority}委托部门{otherInfo.delegatedDepartment}
    网上办理深度{otherInfo.onlineProcessingDepth}事项审查类型{otherInfo.reviewType}
    是否进驻政务大厅{otherInfo.isItAvailableInTheGovernmentServiceHall}是否支持自助终端办理{otherInfo.isSelfServiceTerminalProcessingSupported}
    是否实行告知承诺{otherInfo.isACommitmentSystemImplemented}权力属性{otherInfo.authorityAttribute}
    是否支持预约办理{otherInfo.isAppointmentBookingSupported}是否网办{otherInfo.isOnlineProcessingAvailable}
    自然人主题分类{otherInfo.naturalPersonThemeClassification}法人主题分类{otherInfo.legalPersonThemeClassification}法人主题分类{otherInfo.naturalPersonThemeClassification}
    行政相对人权利和义务{otherInfo.rightsAndObligationsOfAdministrativeCounterparties}
    适用对象说明{otherInfo.applicableObjectDescription}
    涉及的内容{otherInfo.contentInvolved}
    + ); + +export const route: Route = { + path: '/hangzhou/zwfw', + categories: ['government'], + example: '/gov/hangzhou/zwfw', + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['hangzhou.gov.cn/col/col1256349/index.html'], + }, + ], + name: '政务服务公开', + maintainers: ['flynncao'], + handler, + url: 'hangzhou.gov.cn/col/col1256349/index.html', +}; + +async function handler() { + const host = 'https://www.hangzhou.gov.cn/col/col1256349/index.html'; + const response = await ofetch(host); + + const browser = await puppeteer(); + const link = host; + const formatted = response + .replace('', '') + .replaceAll('', '') + .replaceAll('', '') + .replaceAll('', '') + .replaceAll('', '') + .replaceAll('', ''); + const $ = load(formatted); + + const list = $('li.clearfix') + .toArray() + .map((item: any) => { + item = $(item); + const title = item.find('a').first().text(); + const time = timezone(parseDate(item.find('span').first().text(), 'YYYY-MM-DD'), 8); + const a = item.find('a').first().attr('href'); + const fullUrl = new URL(a, host).href; + + return { + title, + link: fullUrl, + pubDate: time, + }; + }) + .filter((item) => !item.title.includes('置顶')); + const items: any = await Promise.all( + list.map((item: any) => + cache.tryGet(item.link, async () => { + const host = new URL(item.link).hostname; + if (host === 'www.zjzwfw.gov.cn') { + // 来源为浙江政务服务网 + const content = await crawler(item, browser); + const $ = load(content); + item.description = renderDescription(analyzer($('.item-left .item .bg_box'))); + item.author = '浙江政务服务网'; + item.category = $('meta[name="ColumnType"]').attr('content'); + } else { + // 其他正常抓取 + const response = await got(item.link); + const $ = load(response.data); + if (host === 'police.hangzhou.gov.cn') { + // 来源为杭州市公安局 + item.description = $('.art-content .wz_con_content').html(); + item.author = $('meta[name="ContentSource"]').attr('content'); + item.category = $('meta[name="ColumnType"]').attr('content'); + } else { + // 缺省:来源为杭州市政府网 + item.description = $('.article').html(); + item.author = $('meta[name="ContentSource"]').attr('content'); + item.category = $('meta[name="ColumnType"]').attr('content'); + } + } + item.pubDate = $('meta[name="PubDate"]').length ? timezone(parseDate($('meta[name="PubDate"]').attr('content') as string, 'YYYY-MM-DD HH:mm'), 8) : item.pubDate; + return item; + }) + ) + ); + + await browser.close(); + return { + allowEmpty: true, + title: '杭州市人民政府-政务服务公开', + link, + item: items, + }; +} diff --git a/lib/routes/gov/jiangsu/wlt/index.ts b/lib/routes/gov/jiangsu/wlt/index.tsx similarity index 80% rename from lib/routes/gov/jiangsu/wlt/index.ts rename to lib/routes/gov/jiangsu/wlt/index.tsx index 1b6ad453e13b..c8d35e376551 100644 --- a/lib/routes/gov/jiangsu/wlt/index.ts +++ b/lib/routes/gov/jiangsu/wlt/index.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/jiangsu/wlt/:page?', @@ -75,13 +73,19 @@ async function handler(ctx) { const performanceName = $('td:contains("项目名称")').next().text().trim(); const performanceContent = $('td:contains("许可内容")').next().text().trim(); - item.description = art(path.join(__dirname, './templates/wlt.art'), { - dateText, - hostingUnit, - licenseNumber, - performanceName, - performanceContent, - }); + item.description = renderToString( + <> + 许可日期:{dateText} +
    + 行政名称:{hostingUnit} +
    + 许可编号:{licenseNumber} +
    + 项目名称:{performanceName} +
    + 许可内容:{performanceContent} + + ); item.pubDate = parseDate(dateText); return item; diff --git a/lib/routes/gov/jiangsu/wlt/templates/wlt.art b/lib/routes/gov/jiangsu/wlt/templates/wlt.art deleted file mode 100644 index b39127372cef..000000000000 --- a/lib/routes/gov/jiangsu/wlt/templates/wlt.art +++ /dev/null @@ -1,9 +0,0 @@ -许可日期:{{ dateText }} -
    -行政名称:{{ hostingUnit }} -
    -许可编号:{{ licenseNumber }} -
    -项目名称:{{ performanceName }} -
    -许可内容:{{ performanceContent }} diff --git a/lib/routes/gov/safe/templates/message.art b/lib/routes/gov/safe/templates/message.art deleted file mode 100644 index bb909b2f689a..000000000000 --- a/lib/routes/gov/safe/templates/message.art +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - {{ if message }} - {{ set object = message }} - - - - - - {{ /if }} - {{ if reply }} - {{ set object = reply }} - - - - - - {{ /if }} - -
    留言人留言内容留言时间
    {{ object.author }}{{ object.content }}{{ object.date }}
    {{ object.author }}{{ object.content }}{{ object.date }}
    \ No newline at end of file diff --git a/lib/routes/gov/safe/util.ts b/lib/routes/gov/safe/util.tsx similarity index 68% rename from lib/routes/gov/safe/util.ts rename to lib/routes/gov/safe/util.tsx index ab48c67e1a0e..5fe99857c8ac 100644 --- a/lib/routes/gov/safe/util.ts +++ b/lib/routes/gov/safe/util.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const rootUrl = 'https://www.safe.gov.cn'; @@ -47,10 +45,31 @@ const processZxfkItems = async (site = 'beijing', category = 'ywzx', limit = '3' return { title: `${message.author}: ${message.content}`, link: currentUrl, - description: art(path.join(__dirname, 'templates/message.art'), { - message, - reply, - }), + description: renderToString( + + + + + + + + {message ? ( + + + + + + ) : null} + {reply ? ( + + + + + + ) : null} + +
    留言人留言内容留言时间
    {message.author}{message.content}{message.date}
    {reply.author}{reply.content}{reply.date}
    + ), author: `${message.author}/${reply.author}`, guid: `${currentUrl}#${message.author}(${message.date})/${reply.author}(${reply.date})`, pubDate: parseDate(message.date), diff --git a/lib/routes/gov/samr/templates/description.art b/lib/routes/gov/samr/templates/description.art deleted file mode 100644 index 7ffaaaefea90..000000000000 --- a/lib/routes/gov/samr/templates/description.art +++ /dev/null @@ -1,26 +0,0 @@ -{{ if item }} -
    - - - {{ item.lyr }} - -
    -

    {{ item.lybt }}

    -

    留言日期:{{ item.lysj }}

    -
    - {{ item.lynr }} -
    -
    -
    - - - {{ item.fzsjCn }} - -
    -

    时间:{{ item.pubtime }}

    -
    - {{ item.clyj }} -
    -
    -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/gov/samr/xgzlyhd.ts b/lib/routes/gov/samr/xgzlyhd.tsx similarity index 91% rename from lib/routes/gov/samr/xgzlyhd.ts rename to lib/routes/gov/samr/xgzlyhd.tsx index 70ceb4349ef6..63f24b74fa86 100644 --- a/lib/routes/gov/samr/xgzlyhd.ts +++ b/lib/routes/gov/samr/xgzlyhd.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const rootUrl = 'https://xgzlyhd.samr.gov.cn'; const apiUrl = new URL('gjjly/message/getMessageList', rootUrl).href; @@ -186,9 +184,30 @@ async function handler(ctx) { const items = response.data.data.slice(0, limit).map((item) => ({ title: item.lybt, link: `${currentUrl}#${item.zj}`, - description: art(path.join(__dirname, 'templates/description.art'), { - item, - }), + description: renderToString( + item ? ( +
    + + + {item.lyr} + +
    +

    {item.lybt}

    +

    留言日期:{item.lysj}

    +
    {item.lynr}
    +
    +
    + + + {item.fzsjCn} + +
    +

    时间:{item.pubtime}

    +
    {item.clyj}
    +
    +
    + ) : null + ), author: `${item.lyr} ⇄ ${item.fzsjCn}`, category: [item.fzsjCn], guid: `${currentUrl}#${item.zj}`, diff --git a/lib/routes/gov/sh/fgw/index.ts b/lib/routes/gov/sh/fgw/index.tsx similarity index 89% rename from lib/routes/gov/sh/fgw/index.ts rename to lib/routes/gov/sh/fgw/index.tsx index 93e0c4966209..44d983fd512e 100644 --- a/lib/routes/gov/sh/fgw/index.ts +++ b/lib/routes/gov/sh/fgw/index.tsx @@ -1,14 +1,28 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +const renderDescription = ({ images, description }) => + renderToString( + <> + {images?.length + ? images.map((image) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + ) + : null} + {description ? <>{raw(description)} : null} + + ); export const handler = async (ctx) => { const { category = 'fgw_zxxxgk' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; @@ -53,7 +67,7 @@ export const handler = async (ctx) => { const title = $$('meta[name="ArticleTitle"]').prop('content'); const image = $$('div.pdf-content img').first().prop('src'); - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ images: image ? [ { diff --git a/lib/routes/gov/sh/fgw/templates/description.art b/lib/routes/gov/sh/fgw/templates/description.art deleted file mode 100644 index dfab19230c11..000000000000 --- a/lib/routes/gov/sh/fgw/templates/description.art +++ /dev/null @@ -1,17 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/gov/sh/rsj/ksxm.ts b/lib/routes/gov/sh/rsj/ksxm.tsx similarity index 77% rename from lib/routes/gov/sh/rsj/ksxm.ts rename to lib/routes/gov/sh/rsj/ksxm.tsx index 2ed25946588b..cef610fa7e41 100644 --- a/lib/routes/gov/sh/rsj/ksxm.ts +++ b/lib/routes/gov/sh/rsj/ksxm.tsx @@ -1,14 +1,25 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import iconv from 'iconv-lite'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const rootUrl = 'http://www.rsj.sh.gov.cn'; +const renderDescription = ({ name, type, date, registrationDeadline }) => + renderToString( + <> + 考试项目名称:{name} +
    + 考试类别:{type} +
    + 考试日期:{date} +
    + 报名起止日期:{registrationDeadline} + + ); + export const route: Route = { path: ['/sh/rsj/ksxm', '/shanghai/rsj/ksxm'], categories: ['government'], @@ -49,7 +60,7 @@ async function handler() { .map((item) => ({ title: $(item).find('kaosxmmc').text(), link: `http://www.rsj.sh.gov.cn/ksyzc/index801.jsp`, - description: art(path.join(__dirname, './templates/ksxm.art'), { + description: renderDescription({ name: $(item).find('kaosxmmc').text(), type: $(item).find('kaoslb_dmfy').text(), date: $(item).find('kaosrq').text(), diff --git a/lib/routes/gov/sh/rsj/templates/ksxm.art b/lib/routes/gov/sh/rsj/templates/ksxm.art deleted file mode 100644 index b6f06dc36afa..000000000000 --- a/lib/routes/gov/sh/rsj/templates/ksxm.art +++ /dev/null @@ -1,7 +0,0 @@ -考试项目名称:{{ name }} -
    -考试类别:{{ type }} -
    -考试日期:{{ date }} -
    -报名起止日期:{{ registrationDeadline }} diff --git a/lib/routes/gov/sh/wgj/templates/wgj.art b/lib/routes/gov/sh/wgj/templates/wgj.art deleted file mode 100644 index 6ce7b60634bf..000000000000 --- a/lib/routes/gov/sh/wgj/templates/wgj.art +++ /dev/null @@ -1,15 +0,0 @@ -举办单位:{{ hostingUnit }} -
    -许可证号:{{ licenseNumber }} -
    -演出名称:{{ performanceName }} -
    -演出日期:{{ performanceDate }} -
    -演出场所:{{ performanceVenue }} -
    -主要演员:{{ mainActors }} -
    -演员人数:{{ actorCount }} -
    -场次:{{ showCount }} diff --git a/lib/routes/gov/sh/wgj/wgj.ts b/lib/routes/gov/sh/wgj/wgj.tsx similarity index 76% rename from lib/routes/gov/sh/wgj/wgj.ts rename to lib/routes/gov/sh/wgj/wgj.tsx index c9825764339a..7309eea2aee7 100644 --- a/lib/routes/gov/sh/wgj/wgj.ts +++ b/lib/routes/gov/sh/wgj/wgj.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: ['/sh/wgj/:page?', '/shanghai/wgj/:page?'], @@ -76,16 +74,25 @@ async function handler(ctx) { const actorCount = $('td:contains("演员人数:")').next().text().trim(); const showCount = $('td:contains("场次:")').next().text().trim(); - item.description = art(path.join(__dirname, './templates/wgj.art'), { - hostingUnit, - licenseNumber, - performanceName, - performanceDate, - performanceVenue, - mainActors, - actorCount, - showCount, - }); + item.description = renderToString( + <> + 举办单位:{hostingUnit} +
    + 许可证号:{licenseNumber} +
    + 演出名称:{performanceName} +
    + 演出日期:{performanceDate} +
    + 演出场所:{performanceVenue} +
    + 主要演员:{mainActors} +
    + 演员人数:{actorCount} +
    + 场次:{showCount} + + ); item.pubDate = parseDate(dateText); return item; diff --git a/lib/routes/gov/sichuan/deyang/govpublicinfo.ts b/lib/routes/gov/sichuan/deyang/govpublicinfo.tsx similarity index 64% rename from lib/routes/gov/sichuan/deyang/govpublicinfo.ts rename to lib/routes/gov/sichuan/deyang/govpublicinfo.tsx index 8d968c05899f..89ed1f37ca15 100644 --- a/lib/routes/gov/sichuan/deyang/govpublicinfo.ts +++ b/lib/routes/gov/sichuan/deyang/govpublicinfo.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; // 各地区url信息 @@ -108,7 +107,55 @@ async function handler(ctx) { link: infoBasicUrl, item: items.map((item) => ({ title: item.title, - description: art(path.join(__dirname, './templates/govPublicInfo.art'), { item }), + description: renderToString( + item._isCompleteInfo ? ( + <> + + + + + + + + + + + + + + + + + + + + + + + {item.file?.length ? ( + + + + + ) : null} + +
    索引号{item.id}
    文号{item.infoNum}
    发文日期{item.date}
    关键词{item.keyWord}
    信息来源{item.source}
    附件 + {item.file.map((file) => ( + <> + {file.name} +
    + + ))} +
    +
    +
    {item.content ? raw(item.content) : null}
    + + ) : ( + + ) + ), link: item.link, pubDate: item.pubDate, })), diff --git a/lib/routes/gov/sichuan/deyang/mztoday.ts b/lib/routes/gov/sichuan/deyang/mztoday.tsx similarity index 96% rename from lib/routes/gov/sichuan/deyang/mztoday.ts rename to lib/routes/gov/sichuan/deyang/mztoday.tsx index 0fa37d6c3ad8..c37ceb788658 100644 --- a/lib/routes/gov/sichuan/deyang/mztoday.ts +++ b/lib/routes/gov/sichuan/deyang/mztoday.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const rootUrl = 'http://www.mztoday.gov.cn'; @@ -158,7 +157,7 @@ async function handler(ctx) { link: `${infoBasicUrl}1`, item: items.map((item) => ({ title: item.title, - description: art(path.join(__dirname, './templates/mztoday.art'), { item }), + description: renderToString(
    {item.content ? raw(item.content) : null}
    ), link: item.link, pubDate: item.pubDate, })), diff --git a/lib/routes/gov/sichuan/deyang/templates/govPublicInfo.art b/lib/routes/gov/sichuan/deyang/templates/govPublicInfo.art deleted file mode 100644 index 2df8c9b38357..000000000000 --- a/lib/routes/gov/sichuan/deyang/templates/govPublicInfo.art +++ /dev/null @@ -1,47 +0,0 @@ -{{if item._isCompleteInfo}} - - - - - - - - - - - - - - - - - - - - - - - {{if item.file.length}} - - - - - {{/if}} - -
    索引号{{item.id}}
    文号{{item.infoNum}}
    发文日期{{item.date}}
    关键词{{item.keyWord}}
    信息来源{{item.source}}
    附件 - {{each item.file}} - {{$value.name}}
    - {{/each}} -
    - -
    -
    - {{@ item.content }} -
    -{{else}} - -{{/if}} - - diff --git a/lib/routes/gov/sichuan/deyang/templates/mztoday.art b/lib/routes/gov/sichuan/deyang/templates/mztoday.art deleted file mode 100644 index 9fd19cf2d883..000000000000 --- a/lib/routes/gov/sichuan/deyang/templates/mztoday.art +++ /dev/null @@ -1,6 +0,0 @@ -
    - {{@ item.content}} -
    - - - diff --git a/lib/routes/gov/stats/index.ts b/lib/routes/gov/stats/index.tsx similarity index 83% rename from lib/routes/gov/stats/index.ts rename to lib/routes/gov/stats/index.tsx index 2036997d7d33..c7d31461d507 100644 --- a/lib/routes/gov/stats/index.ts +++ b/lib/routes/gov/stats/index.tsx @@ -1,15 +1,44 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import { getSubPath } from '@/utils/common-utils'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +type Attachment = { + link: string; + name: string; +}; + +type DescriptionProps = { + description?: string; + attachments?: Attachment[]; +}; + +const renderDescription = ({ description, attachments }: DescriptionProps): string => + renderToString( + <> + {description ? raw(description) : null} + {attachments?.length ? ( + <> +
    +

    附件:

    + + + ) : null} + + ); + export const route: Route = { path: '/stats/*', name: '国家统计局 通用', @@ -113,7 +142,7 @@ async function handler(ctx) { item.title = item.title || content('div.detail-title h1').text(); item.pubDate = timezone(parseDate(content('div.detail-title-des h2 p, .info').first().text().trim()), +8); - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ description: content('.TRS_Editor').html() || content('.TRS_UEDITOR').html(), attachments: content('a[oldsrc]') .toArray() diff --git a/lib/routes/gov/stats/templates/description.art b/lib/routes/gov/stats/templates/description.art deleted file mode 100644 index 08297feaf906..000000000000 --- a/lib/routes/gov/stats/templates/description.art +++ /dev/null @@ -1,12 +0,0 @@ -{{@ description }} -{{ if attachments }} -
    -

    附件:

    - -{{ /if }} \ No newline at end of file diff --git a/lib/routes/guduodata/daily.ts b/lib/routes/guduodata/daily.tsx similarity index 69% rename from lib/routes/guduodata/daily.ts rename to lib/routes/guduodata/daily.tsx index ca717ed2669b..dfa3574bbded 100644 --- a/lib/routes/guduodata/daily.ts +++ b/lib/routes/guduodata/daily.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import dayjs from 'dayjs'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const host = 'http://d.guduodata.com'; @@ -58,7 +56,7 @@ async function handler() { const now = dayjs().valueOf(); // yestoday const yestoday = dayjs().subtract(1, 'day').format('YYYY-MM-DD'); - const renderRows = (rows) => art(path.join(__dirname, './templates/daily.art'), { rows }); + const renderRows = (rows) => renderToString(); const items = Object.keys(types).flatMap((key) => Object.keys(types[key].categories).map((category) => ({ type: key, @@ -89,3 +87,32 @@ async function handler() { ), }; } + +const GuduodataDailyTable = ({ rows }: { rows: any[] }) => ( + + + + + + + + + + + + + {rows.map((row, index) => ( + + + + + + + + + + + ))} + +
    排名剧名播放平台上映时间评论数百度指数豆瓣评分全网热度
    {index + 1}{row.name}{row.platforms}{row.release_date}{row.comment || ''}{row.baidu_index || ''}{row.douban || ''}{row.gdi}
    +); diff --git a/lib/routes/guduodata/templates/daily.art b/lib/routes/guduodata/templates/daily.art deleted file mode 100644 index 0c77f57a3f6a..000000000000 --- a/lib/routes/guduodata/templates/daily.art +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - {{each rows}} - - - - - - - - - - - {{/each}} - -
    排名剧名播放平台上映时间评论数百度指数豆瓣评分全网热度
    {{$index + 1}}{{$value.name}}{{$value.platforms}}{{$value.release_date}}{{$value.comment || ''}}{{$value.baidu_index || ''}}{{$value.douban || ''}}{{$value.gdi}}
    \ No newline at end of file diff --git a/lib/routes/gumroad/index.ts b/lib/routes/gumroad/index.tsx similarity index 67% rename from lib/routes/gumroad/index.ts rename to lib/routes/gumroad/index.tsx index 1f348988c53a..4fa10c06b913 100644 --- a/lib/routes/gumroad/index.ts +++ b/lib/routes/gumroad/index.tsx @@ -1,11 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; import { isValidHost } from '@/utils/valid-host'; export const route: Route = { @@ -27,6 +26,18 @@ export const route: Route = { description: `\`https://afkmaster.gumroad.com/l/Eve10\` -> \`/gumroad/afkmaster/Eve10\``, }; +const renderDescription = (img, productsName, price, desc, stack) => + renderToString( + <> + +

    {productsName}

    +

    {price}

    + {desc ? <>{raw(desc)} : null} +
    + {stack ? <>{raw(stack)} : null} + + ); + async function handler(ctx) { const username = ctx.req.param('username'); const products = ctx.req.param('products'); @@ -44,13 +55,13 @@ async function handler(ctx) { { title, link: url, - description: art(path.join(__dirname, 'templates/products.art'), { - img: response.data.match(/data-preview-url="(.*?)"/)[1], - productsName: title, - price: $('div.price').text(), - desc: $('section.product-content.product-content__row > section:nth-child(3) > div').html(), - stack: $('div.product-info').find('ul.stack').html(), - }), + description: renderDescription( + response.data.match(/data-preview-url="(.*?)"/)[1], + title, + $('div.price').text(), + $('section.product-content.product-content__row > section:nth-child(3) > div').html(), + $('div.product-info').find('ul.stack').html() + ), }, ]; diff --git a/lib/routes/gumroad/templates/products.art b/lib/routes/gumroad/templates/products.art deleted file mode 100644 index cece456387cb..000000000000 --- a/lib/routes/gumroad/templates/products.art +++ /dev/null @@ -1,7 +0,0 @@ - -

    {{productsName}}

    -

    {{price}}

    -{{@ desc}} -
    -{{@ stack}} - diff --git a/lib/routes/gzdaily/app.ts b/lib/routes/gzdaily/app.tsx similarity index 87% rename from lib/routes/gzdaily/app.ts rename to lib/routes/gzdaily/app.tsx index f226afddb4b8..372c35d7609b 100644 --- a/lib/routes/gzdaily/app.ts +++ b/lib/routes/gzdaily/app.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -50,9 +48,16 @@ async function handler(ctx) { .filter((i) => i.newstype === 0) // Remove special report (专题) and articles from Guangzhou Converged Media Center (新花城). .map((item) => ({ title: item.title, - description: art(path.join(__dirname, 'templates/description.art'), { - thumb: item.picBig, - }), + description: renderToString( + <> + {item.picBig ? ( + <> + +
    + + ) : null} + + ), pubDate: timezone(parseDate(item.publishtime), +8), link: item.shareUrl, colName: item.colName, diff --git a/lib/routes/gzdaily/templates/description.art b/lib/routes/gzdaily/templates/description.art deleted file mode 100644 index 2113e70635ad..000000000000 --- a/lib/routes/gzdaily/templates/description.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ if thumb }} -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/hafu/templates/hafu.art b/lib/routes/hafu/templates/hafu.art deleted file mode 100644 index 5231e64c4aa7..000000000000 --- a/lib/routes/hafu/templates/hafu.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ if articleBody }} - {{@ articleBody }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/hafu/utils.ts b/lib/routes/hafu/utils.tsx similarity index 97% rename from lib/routes/hafu/utils.ts rename to lib/routes/hafu/utils.tsx index 75827d57acfa..77911f1e0acb 100644 --- a/lib/routes/hafu/utils.ts +++ b/lib/routes/hafu/utils.tsx @@ -1,11 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const typeMap = { @@ -48,7 +47,7 @@ async function tryGetFullText(href, link, type) { articleBody = tryGetAttachments(articleData, articleBody, type); } - description = art(path.join(__dirname, 'templates/hafu.art'), articleBody)(); + description = articleBody ? renderToString(<>{raw(articleBody)}) : ''; } catch { description = href; } diff --git a/lib/routes/hashnode/blog.ts b/lib/routes/hashnode/blog.tsx similarity index 86% rename from lib/routes/hashnode/blog.ts rename to lib/routes/hashnode/blog.tsx index dde13dfe4ded..75ad8c51d612 100644 --- a/lib/routes/hashnode/blog.ts +++ b/lib/routes/hashnode/blog.tsx @@ -1,11 +1,18 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const baseApiUrl = 'https://api.hashnode.com'; +const renderDescription = (image, brief) => + renderToString( + <> + + {brief ? <>{raw(brief)} : null} + + ); export const route: Route = { path: '/blog/:username', @@ -79,10 +86,7 @@ async function handler(ctx) { item: list .map((item) => ({ title: item.title, - description: art(path.join(__dirname, 'templates/description.art'), { - image: item.coverImage, - brief: item.brief, - }), + description: renderDescription(item.coverImage, item.brief), pubDate: parseDate(item.dateAdded), link: `${userUrl}/${item.slug}`, })) diff --git a/lib/routes/hashnode/templates/description.art b/lib/routes/hashnode/templates/description.art deleted file mode 100644 index ad6ebf4679a4..000000000000 --- a/lib/routes/hashnode/templates/description.art +++ /dev/null @@ -1,2 +0,0 @@ - -{{@ brief }} diff --git a/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts b/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.tsx similarity index 85% rename from lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts rename to lib/routes/hebtv/nong-bo-shi-zai-xing-dong.tsx index 2f46b76f2250..ad3cc8fcc933 100644 --- a/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts +++ b/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.tsx @@ -1,16 +1,33 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const baseUrl = 'https://web.cmc.hebtv.com/cms/rmt0336/19/19js/st/ds/nmpd/nbszxd/index.shtml'; +const renderDescription = (image, video) => + renderToString( + <> + {image?.src ? ( +
    + {image.alt} +
    + ) : null} + {video?.src ? ( + + ) : null} + + ); + export const route: Route = { path: '/nbszxd', categories: ['traditional-media'], @@ -100,15 +117,16 @@ async function handler(ctx) { item.enclosure_type = item.enclosure_url ? `video/${item.enclosure_url?.split(/\./)?.pop()}` : undefined; } - item.description = art(path.join(__dirname, 'templates/description.art'), { - video: videoData + item.description = renderDescription( + undefined, + videoData ? { src: item.enclosure_url, type: item.enclosure_type, poster: item.itunes_item_image, } - : undefined, - }); + : undefined + ); return item; }) diff --git a/lib/routes/hebtv/templates/description.art b/lib/routes/hebtv/templates/description.art deleted file mode 100644 index 7acb0d0189f6..000000000000 --- a/lib/routes/hebtv/templates/description.art +++ /dev/null @@ -1,24 +0,0 @@ -{{ if image?.src }} -
    - {{ image.alt }} -
    -{{ /if }} - -{{ if video?.src }} - -{{ /if }} \ No newline at end of file diff --git a/lib/routes/hellogithub/report.ts b/lib/routes/hellogithub/report.ts deleted file mode 100644 index 81a886f17e2d..000000000000 --- a/lib/routes/hellogithub/report.ts +++ /dev/null @@ -1,69 +0,0 @@ -import path from 'node:path'; - -import type { Route } from '@/types'; -import got from '@/utils/got'; -import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; - -const types = { - tiobe: '编程语言', - netcraft: '服务器', - 'db-engines': '数据库', -}; - -export const route: Route = { - path: '/ranking/:type?', - example: '/hellogithub/ranking', - name: '榜单报告', - maintainers: ['moke8', 'nczitzk'], - handler, - description: `| 编程语言 | 服务器 | 数据库 | -| -------- | -------- | ---------- | -| tiobe | netcraft | db-engines |`, -}; - -async function handler(ctx) { - let type = ctx.req.param('type') ?? 'tiobe'; - - type = type === 'webserver' ? 'netcraft' : type === 'db' ? 'db-engines' : type; - - const rootUrl = 'https://hellogithub.com'; - const currentUrl = `${rootUrl}/report/${type}`; - - const buildResponse = await got({ - method: 'get', - url: rootUrl, - }); - - const buildId = buildResponse.data.match(/"buildId":"(.*?)",/)[1]; - - const apiUrl = `${rootUrl}/_next/data/${buildId}/zh/report/${type}.json`; - - const response = await got({ - method: 'get', - url: apiUrl, - }); - - const data = response.data.pageProps; - - const items = [ - { - guid: `${type}:${data.year}${data.month}`, - title: `${data.year}年${data.month}月${types[type]}排行榜`, - link: currentUrl, - pubDate: parseDate(`${data.year}-${data.month}`, 'YYYY-M'), - description: art(path.join(__dirname, 'templates/report.art'), { - tiobe_list: type === 'tiobe' ? data.list : undefined, - active_list: data.active_list, - all_list: data.all_list, - db_list: type === 'db-engines' ? data.list : undefined, - }), - }, - ]; - - return { - title: `HelloGitHub - ${types[type]}排行榜`, - link: currentUrl, - item: items, - }; -} diff --git a/lib/routes/hellogithub/report.tsx b/lib/routes/hellogithub/report.tsx new file mode 100644 index 000000000000..4e2d36f096b0 --- /dev/null +++ b/lib/routes/hellogithub/report.tsx @@ -0,0 +1,179 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +import type { Route } from '@/types'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; + +type ReportListItem = { + position: string | number; + name: string; + rating: string | number; + change?: string | number; + star?: string | number; + total?: string | number; + db_model?: string; +}; + +const renderReport = ({ tiobeList, activeList, allList, dbList }: { tiobeList?: ReportListItem[]; activeList?: ReportListItem[]; allList?: ReportListItem[]; dbList?: ReportListItem[] }) => + renderToString( + <> + {tiobeList?.length ? ( + + + + + + + + + + {tiobeList.map((item) => ( + + + + + + + + ))} + +
    排名编程语言流行度对比上月年度明星语言
    {item.position}{item.name}{item.rating}{item.change || '新上榜'}{item.star}
    + ) : null} + {allList?.length ? ( + <> +

    市场份额排名

    + + + + + + + + + + {allList.map((item) => ( + + + + + + + + ))} + +
    排名服务器占比对比上月总数
    {item.position}{item.name}{item.rating}{item.change || '新上榜'}{item.total}
    +
    + + ) : null} + {activeList?.length ? ( + <> +

    活跃网站排名

    + + + + + + + + + + {activeList.map((item) => ( + + + + + + + + ))} + +
    排名服务器占比对比上月总数
    {item.position}{item.name}{item.rating}{item.change || '新上榜'}{item.total}
    + + ) : null} + {dbList?.length ? ( + + + + + + + + + + {dbList.map((item) => ( + + + + + + + + ))} + +
    排名数据库分数对比上月类型
    {item.position}{item.name}{item.rating}{item.change || '新上榜'}{item.db_model}
    + ) : null} + + ); + +const types = { + tiobe: '编程语言', + netcraft: '服务器', + 'db-engines': '数据库', +}; + +export const route: Route = { + path: '/ranking/:type?', + example: '/hellogithub/ranking', + name: '榜单报告', + maintainers: ['moke8', 'nczitzk'], + handler, + description: `| 编程语言 | 服务器 | 数据库 | +| -------- | -------- | ---------- | +| tiobe | netcraft | db-engines |`, +}; + +async function handler(ctx) { + let type = ctx.req.param('type') ?? 'tiobe'; + + type = type === 'webserver' ? 'netcraft' : type === 'db' ? 'db-engines' : type; + + const rootUrl = 'https://hellogithub.com'; + const currentUrl = `${rootUrl}/report/${type}`; + + const buildResponse = await got({ + method: 'get', + url: rootUrl, + }); + + const buildId = buildResponse.data.match(/"buildId":"(.*?)",/)[1]; + + const apiUrl = `${rootUrl}/_next/data/${buildId}/zh/report/${type}.json`; + + const response = await got({ + method: 'get', + url: apiUrl, + }); + + const data = response.data.pageProps; + + const items = [ + { + guid: `${type}:${data.year}${data.month}`, + title: `${data.year}年${data.month}月${types[type]}排行榜`, + link: currentUrl, + pubDate: parseDate(`${data.year}-${data.month}`, 'YYYY-M'), + description: renderReport({ + tiobeList: type === 'tiobe' ? data.list : undefined, + activeList: data.active_list, + allList: data.all_list, + dbList: type === 'db-engines' ? data.list : undefined, + }), + }, + ]; + + return { + title: `HelloGitHub - ${types[type]}排行榜`, + link: currentUrl, + item: items, + }; +} diff --git a/lib/routes/hellogithub/templates/description.art b/lib/routes/hellogithub/templates/description.art deleted file mode 100644 index 3aac76cafe4a..000000000000 --- a/lib/routes/hellogithub/templates/description.art +++ /dev/null @@ -1,99 +0,0 @@ -{{ if image }} -
    - -
    -{{ /if }} - - - {{ if homepage }} - - - - - {{ /if }} - {{ if name && url }} - - - - - {{ /if }} - {{ if description }} - - - - - {{ /if }} - {{ if summary }} - - - - - {{ /if }} - {{ if stars }} - - - - - {{ /if }} - {{ if forks }} - - - - - {{ /if }} - {{ if subscribers }} - - - - - {{ /if }} - {{ if language }} - - - - - {{ /if }} - {{ if license }} - - - - - {{ /if }} - - - - - - - - - - - - - {{ if openIssues }} - - - - - {{ /if }} - -
    Homepage{{ homepage }}
    GitHub Repo{{ name }}
    Description{{ description }}
    Summary{{ summary }}
    Stars{{ stars }}
    Forks{{ forks }}
    Subscribers{{ subscribers }}
    Language{{ language }}
    License{{ license }}
    Is in Chinese - {{ if isChinese }} - Yes - {{ else }} - No - {{ /if }} -
    Is Organization - {{ if isOrganization }} - Yes - {{ else }} - No - {{ /if }} -
    Is Active - {{ if isActive }} - Yes - {{ else }} - No - {{ /if }} -
    Open Issues{{ openIssues }}
    \ No newline at end of file diff --git a/lib/routes/hellogithub/templates/report.art b/lib/routes/hellogithub/templates/report.art deleted file mode 100644 index 2ce6e4553931..000000000000 --- a/lib/routes/hellogithub/templates/report.art +++ /dev/null @@ -1,118 +0,0 @@ -{{ if tiobe_list }} - - - - - - - - - - {{ each tiobe_list l }} - - - - - - - - {{ /each }} - -
    排名编程语言流行度对比上月年度明星语言
    {{ l.position }}{{ l.name }}{{ l.rating }} - {{ if l.change }} - {{ l.change }} - {{ else }} - 新上榜 - {{ /if }} - {{ l.star }}
    -{{ /if }} - -{{ if all_list }} -

    市场份额排名

    - - - - - - - - - - {{ each all_list l }} - - - - - - - - {{ /each }} - -
    排名服务器占比对比上月总数
    {{ l.position }}{{ l.name }}{{ l.rating }} - {{ if l.change }} - {{ l.change }} - {{ else }} - 新上榜 - {{ /if }} - {{ l.total }}
    -
    -{{ /if }} - -{{ if active_list }} -

    活跃网站排名

    - - - - - - - - - - {{ each active_list l }} - - - - - - - - {{ /each }} - -
    排名服务器占比对比上月总数
    {{ l.position }}{{ l.name }}{{ l.rating }} - {{ if l.change }} - {{ l.change }} - {{ else }} - 新上榜 - {{ /if }} - {{ l.total }}
    -{{ /if }} - -{{ if db_list }} - - - - - - - - - - {{ each db_list l }} - - - - - - - - {{ /each }} - -
    排名数据库分数对比上月类型
    {{ l.position }}{{ l.name }}{{ l.rating }} - {{ if l.change }} - {{ l.change }} - {{ else }} - 新上榜 - {{ /if }} - {{ l.db_model }}
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/hellogithub/templates/volume.art b/lib/routes/hellogithub/templates/volume.art deleted file mode 100644 index 09423133d180..000000000000 --- a/lib/routes/hellogithub/templates/volume.art +++ /dev/null @@ -1,36 +0,0 @@ -{{ if data }} -{{ each data d }} -
    -

    {{ d.category_name }}

    - {{ each d.items item }} -
    -

    - {{ item.name }} -

    - - - - - - - - - - - - - - - -
    Stars{{ item.stars }}
    Forks{{ item.forks }}
    Watch{{ item.watch }}
    -

    {{@ item.description | render }}

    - {{ if item.image_url }} -
    - -
    - {{ /if }} -
    - {{ /each }} -
    -{{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/hellogithub/volume.ts b/lib/routes/hellogithub/volume.tsx similarity index 55% rename from lib/routes/hellogithub/volume.ts rename to lib/routes/hellogithub/volume.tsx index 892577a36a82..4fe4a13a6d6a 100644 --- a/lib/routes/hellogithub/volume.ts +++ b/lib/routes/hellogithub/volume.tsx @@ -1,6 +1,6 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import MarkdownIt from 'markdown-it'; import { config } from '@/config'; @@ -8,15 +8,50 @@ import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const md = MarkdownIt({ html: true, }); -art.defaults.imports.render = function (string) { - return md.render(string); -}; +const renderVolume = (data) => + renderToString( + <> + {data?.map((category) => ( +
    +

    {category.category_name}

    + {category.items?.map((item) => ( +
    +

    + {item.name} +

    + + + + + + + + + + + + + + + +
    Stars{item.stars}
    Forks{item.forks}
    Watch{item.watch}
    +

    {item.description ? raw(md.render(item.description)) : null}

    + {item.image_url ? ( +
    + +
    + ) : null} +
    + ))} +
    + ))} + + ); export const route: Route = { path: '/volume', @@ -60,9 +95,7 @@ async function handler(ctx) { return { title: `《HelloGitHub》第 ${id} 期`, link: `${rootUrl}/periodical/volume/${id}`, - description: art(path.join(__dirname, 'templates/volume.art'), { - data: data.pageProps.volume.data, - }), + description: renderVolume(data.pageProps.volume.data), pubDate: parseDate(lastmod), }; }, diff --git a/lib/routes/hiring.cafe/jobs.ts b/lib/routes/hiring.cafe/jobs.tsx similarity index 71% rename from lib/routes/hiring.cafe/jobs.ts rename to lib/routes/hiring.cafe/jobs.tsx index 518da16fbdd7..f7c0d5bdd3f3 100644 --- a/lib/routes/hiring.cafe/jobs.ts +++ b/lib/routes/hiring.cafe/jobs.tsx @@ -1,10 +1,9 @@ -import path from 'node:path'; - import type { Context } from 'hono'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; const CONFIG = { DEFAULT_PAGE_SIZE: 20, @@ -84,17 +83,40 @@ const fetchJobs = async (searchParams: SearchParams): Promise => { }); }; -const renderJobDescription = (jobInfo: JobInformation, processedData: ProcessedJobData): string => - art(path.join(__dirname, 'templates/jobs.art'), { - company_name: processedData.company_name, - location: processedData.formatted_workplace_location ?? 'Remote/Unspecified', - is_compensation_transparent: Boolean(processedData.is_compensation_transparent && processedData.yearly_min_compensation && processedData.yearly_max_compensation), - yearly_min_compensation_formatted: processedData.yearly_min_compensation?.toLocaleString() ?? '', - yearly_max_compensation_formatted: processedData.yearly_max_compensation?.toLocaleString() ?? '', - workplace_type: processedData.workplace_type ?? 'Not specified', - requirements_summary: processedData.requirements_summary ?? 'No requirements specified', - job_description: jobInfo.description ?? '', - }); +const renderJobDescription = (jobInfo: JobInformation, processedData: ProcessedJobData): string => { + const isCompensationTransparent = Boolean(processedData.is_compensation_transparent && processedData.yearly_min_compensation && processedData.yearly_max_compensation); + const companyInfoDescription = (jobInfo as { company_info_description?: string }).company_info_description; + const hasCompanyInfo = Boolean(companyInfoDescription); + + return renderToString( + <> +

    + Company: {processedData.company_name} +

    +

    + Location: {processedData.formatted_workplace_location ?? 'Remote/Unspecified'} +

    + {isCompensationTransparent ? ( +

    + Compensation: ${processedData.yearly_min_compensation?.toLocaleString()} - ${processedData.yearly_max_compensation?.toLocaleString()} per year +

    + ) : null} +

    + Workplace Type: {processedData.workplace_type ?? 'Not specified'} +

    +

    + Requirements: {processedData.requirements_summary ?? 'No requirements specified'} +

    +
    {jobInfo.description ? raw(jobInfo.description) : null}
    + {hasCompanyInfo ? ( + <> +

    About {processedData.company_name}

    + {raw(companyInfoDescription as string)} + + ) : null} + + ); +}; const transformJobItem = (item: JobResult) => { const { job_information: jobInfo, v5_processed_job_data: processedData, apply_url, id } = item; diff --git a/lib/routes/hiring.cafe/templates/jobs.art b/lib/routes/hiring.cafe/templates/jobs.art deleted file mode 100644 index bdc770463b39..000000000000 --- a/lib/routes/hiring.cafe/templates/jobs.art +++ /dev/null @@ -1,18 +0,0 @@ -

    Company: {{ company_name }}

    -

    Location: {{ location }}

    - -{{if is_compensation_transparent}} -

    Compensation: ${{ yearly_min_compensation_formatted }} - ${{ yearly_max_compensation_formatted }} per year

    -{{/if}} - -

    Workplace Type: {{ workplace_type }}

    -

    Requirements: {{ requirements_summary }}

    - -
    - {{@ job_description }} -
    - -{{if has_company_info}} -

    About {{ company_name }}

    -{{@ company_info_description }} -{{/if}} diff --git a/lib/routes/hit/hitgs.ts b/lib/routes/hit/hitgs.ts index 19c91c28611d..430ee5f0adbc 100644 --- a/lib/routes/hit/hitgs.ts +++ b/lib/routes/hit/hitgs.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const { id = 'tzgg' } = ctx.req.param(); @@ -32,7 +31,7 @@ export const handler = async (ctx: Context): Promise => { const $el: Cheerio = $(el); const title: string = $el.find('div.news_title, span.div.news_title, div.bttb2').text(); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ intro: $el.find('div.news_text, div.jj5').text(), }); const pubDateStr: string | undefined = $('span.news_meta').text() || ($('span.news_days').text() ? `${$('span.news_days').text()}-${$('span.news_year').text()}` : `${$('div.tm-3').text()}-${$('div.tm-1').text()}`); @@ -66,7 +65,7 @@ export const handler = async (ctx: Context): Promise => { const $$: CheerioAPI = load(detailResponse); const title: string = $$('h1.arti_title').text() + $$('h2.arti_title').text(); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ description: $$('div.wp_articlecontent').html(), }); const pubDateStr: string | undefined = $$('span.arti_update').text().split(/:/).pop()?.trim(); diff --git a/lib/routes/hit/templates/description.art b/lib/routes/hit/templates/description.art deleted file mode 100644 index 57498ab45a9d..000000000000 --- a/lib/routes/hit/templates/description.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/hit/templates/description.tsx b/lib/routes/hit/templates/description.tsx new file mode 100644 index 000000000000..a59dd90533d7 --- /dev/null +++ b/lib/routes/hit/templates/description.tsx @@ -0,0 +1,16 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + intro?: string; + description?: string; +}; + +const HitDescription = ({ intro, description }: DescriptionData) => ( + <> + {intro ?
    {intro}
    : null} + {description ? raw(description) : null} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/hitcon/templates/zeroday.art b/lib/routes/hitcon/templates/zeroday.art deleted file mode 100644 index f051ea4fa196..000000000000 --- a/lib/routes/hitcon/templates/zeroday.art +++ /dev/null @@ -1,8 +0,0 @@ -
      -
    • {{ vender }}
    • -
    • ZDID: {{ code }}
    • -
    • 風險: {{ risk }}
    • -
    • 處理狀態: {{ status }}
    • -
    • 通報者: {{ reporter }}
    • -
    • 通報日期: {{ date }}
    • -
    diff --git a/lib/routes/hitcon/zeroday.ts b/lib/routes/hitcon/zeroday.tsx similarity index 87% rename from lib/routes/hitcon/zeroday.ts rename to lib/routes/hitcon/zeroday.tsx index f89505e8f594..a64d341742ce 100644 --- a/lib/routes/hitcon/zeroday.ts +++ b/lib/routes/hitcon/zeroday.tsx @@ -1,13 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, DataItem, Route } from '@/types'; import logger from '@/utils/logger'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; -import { art } from '@/utils/render'; export const route: Route = { name: '漏洞', @@ -82,14 +80,16 @@ async function handler(ctx: Context): Promise { const status = vulData.find('.status').text().replace('Status:', '').trim(); const date = vulData.find('.date').text().replace('Date:', '').trim(); const reporter = vulData.find('.zdui-author-badge').find('a>span').text(); - const description = art(path.join(__dirname, 'templates/zeroday.art'), { - code, - risk, - vender, - status, - date, - reporter, - }); + const description = renderToString( +
      +
    • {vender}
    • +
    • ZDID: {code}
    • +
    • 風險: {risk}
    • +
    • 處理狀態: {status}
    • +
    • 通報者: {reporter}
    • +
    • 通報日期: {date}
    • +
    + ); return { title: title.text(), diff --git a/lib/routes/hk01/templates/description.art b/lib/routes/hk01/templates/description.art deleted file mode 100644 index 8caf17beefba..000000000000 --- a/lib/routes/hk01/templates/description.art +++ /dev/null @@ -1,53 +0,0 @@ -{{ if image }} - -{{ /if }} -{{ if teasers }} - - {{ each teasers teaser }} -

    {{ teaser }}

    - {{ /each }} -
    -{{ /if }} -{{ each blocks block }} - {{ if block.blockType === 'summary' }} - - {{ set summaries = block.summary }} - {{ each summaries summary }} -

    {{ summary }}

    - {{ /each }} -
    - {{ else if block.blockType === 'text' }} - {{ set htmlTokens = block.htmlTokens }} - {{ each htmlTokens tokens }} - {{ each tokens token }} - {{ if token.type === 'text' }} -

    {{ token.content }}

    - {{ else if token.type === 'link' }} - {{ token.content }} - {{ else if token.type === 'boldText' }} - {{ token.content }} - {{ else if token.type === 'boldLink' }} - {{ token.content }} - {{ /if }} - {{ /each }} - {{ /each }} - {{ else if block.blockType === 'quote' }} - {{ set message = block.message }} - {{ set author = block.author }} - {{ message }} —— {{ author }} - {{ else if block.blockType === 'image' }} - {{ set image = block.image }} -
    - {{ image.caption }} - {{ image.caption }} -
    - {{ else if block.blockType === 'gallery' }} - {{ set images = block.images }} - {{ each images image }} -
    - {{ image.caption }} - {{ image.caption }} -
    - {{ /each }} - {{ /if }} -{{ /each }} \ No newline at end of file diff --git a/lib/routes/hk01/utils.ts b/lib/routes/hk01/utils.ts deleted file mode 100644 index 0e47008d4d06..000000000000 --- a/lib/routes/hk01/utils.ts +++ /dev/null @@ -1,42 +0,0 @@ -import path from 'node:path'; - -import got from '@/utils/got'; -import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; - -const rootUrl = 'https://hk01.com'; -const apiRootUrl = 'https://web-data.api.hk01.com'; - -const ProcessItems = (items, limit, tryGet) => - Promise.all( - items - .filter((item) => item.type !== 2) - .slice(0, limit ? Number.parseInt(limit) : 50) - .map((item) => ({ - title: item.data.title, - link: `${rootUrl}/sns/article/${item.data.articleId}`, - pubDate: parseDate(item.data.publishTime * 1000), - category: item.data.tags.map((t) => t.tagName), - author: item.data.authors.map((a) => a.publishName).join(', '), - })) - .map((item) => - tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - - const content = JSON.parse(detailResponse.data.match(/"__NEXT_DATA__" type="application\/json">({"props":.*})<\/script>/)[1]); - - item.description = art(path.join(__dirname, 'templates/description.art'), { - image: content.props.initialProps.pageProps.article.originalImage.cdnUrl, - teasers: content.props.initialProps.pageProps.article.teaser, - blocks: content.props.initialProps.pageProps.article.blocks, - }); - - return item; - }) - ) - ); - -export { apiRootUrl, ProcessItems, rootUrl }; diff --git a/lib/routes/hk01/utils.tsx b/lib/routes/hk01/utils.tsx new file mode 100644 index 000000000000..863be3af21b3 --- /dev/null +++ b/lib/routes/hk01/utils.tsx @@ -0,0 +1,126 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; + +const rootUrl = 'https://hk01.com'; +const apiRootUrl = 'https://web-data.api.hk01.com'; + +const renderDescription = ({ image, teasers, blocks }) => + renderToString( + <> + {image ? : null} + {teasers?.length ? ( + + {teasers.map((teaser) => ( +

    {teaser}

    + ))} +
    + ) : null} + {blocks?.length + ? blocks.map((block) => { + if (block.blockType === 'summary') { + return ( + + {block.summary?.map((summary) => ( +

    {summary}

    + ))} +
    + ); + } + + if (block.blockType === 'text') { + return block.htmlTokens?.map((tokens) => + tokens.map((token) => { + if (token.type === 'text') { + return

    {token.content}

    ; + } + + if (token.type === 'link') { + return {token.content}; + } + + if (token.type === 'boldText') { + return {token.content}; + } + + if (token.type === 'boldLink') { + return ( + + {token.content} + + ); + } + + return null; + }) + ); + } + + if (block.blockType === 'quote') { + return ( + + {block.message} —— {block.author} + + ); + } + + if (block.blockType === 'image') { + const { image: blockImage } = block; + + return blockImage ? ( +
    + {blockImage.caption} + {blockImage.caption} +
    + ) : null; + } + + if (block.blockType === 'gallery') { + return block.images?.map((blockImage) => ( +
    + {blockImage.caption} + {blockImage.caption} +
    + )); + } + + return null; + }) + : null} + + ); + +const ProcessItems = (items, limit, tryGet) => + Promise.all( + items + .filter((item) => item.type !== 2) + .slice(0, limit ? Number.parseInt(limit) : 50) + .map((item) => ({ + title: item.data.title, + link: `${rootUrl}/sns/article/${item.data.articleId}`, + pubDate: parseDate(item.data.publishTime * 1000), + category: item.data.tags.map((t) => t.tagName), + author: item.data.authors.map((a) => a.publishName).join(', '), + })) + .map((item) => + tryGet(item.link, async () => { + const detailResponse = await got({ + method: 'get', + url: item.link, + }); + + const content = JSON.parse(detailResponse.data.match(/"__NEXT_DATA__" type="application\/json">({"props":.*})<\/script>/)[1]); + + item.description = renderDescription({ + image: content.props.initialProps.pageProps.article.originalImage.cdnUrl, + teasers: content.props.initialProps.pageProps.article.teaser, + blocks: content.props.initialProps.pageProps.article.blocks, + }); + + return item; + }) + ) + ); + +export { apiRootUrl, ProcessItems, rootUrl }; diff --git a/lib/routes/hkej/index.ts b/lib/routes/hkej/index.tsx similarity index 93% rename from lib/routes/hkej/index.ts rename to lib/routes/hkej/index.tsx index 1cf2c6fd7e01..eeeacd849e3c 100644 --- a/lib/routes/hkej/index.ts +++ b/lib/routes/hkej/index.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { CookieJar } from 'tough-cookie'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const cookieJar = new CookieJar(); @@ -110,16 +109,18 @@ async function handler(ctx) { }; }); - const renderArticleImg = (pics) => - art(path.join(__dirname, 'templates/articleImg.art'), { - pics, - }); - const renderDesc = (pics, desc) => - art(path.join(__dirname, 'templates/description.art'), { - pics: renderArticleImg(pics), - desc, - }); + renderToString( + <> + {pics.map((pic) => ( +
    + {pic.title} +
    {pic.title}
    +
    + ))} + {raw(desc ?? '')} + + ); const items = await Promise.all( list && diff --git a/lib/routes/hkej/templates/articleImg.art b/lib/routes/hkej/templates/articleImg.art deleted file mode 100644 index 3be1bf3ddae7..000000000000 --- a/lib/routes/hkej/templates/articleImg.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ each pics }} -
    {{ $value.title }}
    {{ $value.title }}
    -{{ /each }} diff --git a/lib/routes/hkej/templates/description.art b/lib/routes/hkej/templates/description.art deleted file mode 100644 index 7a0e7673e9b9..000000000000 --- a/lib/routes/hkej/templates/description.art +++ /dev/null @@ -1,2 +0,0 @@ -{{@ pics }} -{{@ desc }} diff --git a/lib/routes/hket/index.ts b/lib/routes/hket/index.tsx similarity index 96% rename from lib/routes/hket/index.ts rename to lib/routes/hket/index.tsx index f466fa41be1e..cf719bcdf7f9 100644 --- a/lib/routes/hket/index.ts +++ b/lib/routes/hket/index.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import * as cheerio from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const urlMap = { @@ -24,6 +22,14 @@ const urlMap = { }, }; +const renderImage = (alt, src) => + renderToString( +
    + {alt} +
    {alt}
    +
    + ); + export const route: Route = { path: '/:category?', categories: ['traditional-media'], @@ -203,12 +209,7 @@ async function handler(ctx) { // fix lazyload image and caption $('img').each((_, e) => { e = $(e); - e.replaceWith( - art(path.join(__dirname, 'templates/image.art'), { - alt: e.data('alt'), - src: e.data('src') ?? e.attr('src'), - }) - ); + e.replaceWith(renderImage(e.data('alt'), e.data('src') ?? e.attr('src'))); }); const ldJson = JSON.parse( diff --git a/lib/routes/hket/templates/image.art b/lib/routes/hket/templates/image.art deleted file mode 100644 index 6c32921bd460..000000000000 --- a/lib/routes/hket/templates/image.art +++ /dev/null @@ -1,4 +0,0 @@ -
    - {{ alt }} -
    {{ alt }}
    -
    diff --git a/lib/routes/hostmonit/cloudflareyes.ts b/lib/routes/hostmonit/cloudflareyes.tsx similarity index 73% rename from lib/routes/hostmonit/cloudflareyes.ts rename to lib/routes/hostmonit/cloudflareyes.tsx index 5815578b9325..cb4086ab7d6f 100644 --- a/lib/routes/hostmonit/cloudflareyes.ts +++ b/lib/routes/hostmonit/cloudflareyes.tsx @@ -1,13 +1,50 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +const renderTitle = ({ line, latency, loss, speed, node, ip }) => + renderToString( + <> + [{line} | {latency} | {loss} | {speed} | {node}] {ip} + + ); + +const renderDescription = ({ line, latency, loss, speed, node, ip }) => + renderToString( + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Line{line}
    Latency{latency}
    Loss{loss}
    Speed{speed}
    Node{node}
    IP{ip}
    + ); + const lines = { CM: '中国移动', CU: '中国联通', @@ -70,7 +107,7 @@ async function handler(ctx) { const pubDate = timezone(parseDate(item.time), +8); return { - title: art(path.join(__dirname, 'templates/title.art'), { + title: renderTitle({ line, latency, loss, @@ -79,7 +116,7 @@ async function handler(ctx) { ip, }), link: currentUrl, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ line, node, ip, diff --git a/lib/routes/hostmonit/templates/description.art b/lib/routes/hostmonit/templates/description.art deleted file mode 100644 index 52eddc7dd6a6..000000000000 --- a/lib/routes/hostmonit/templates/description.art +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Line{{ line }}
    Latency{{ latency }}
    Loss{{ loss }}
    Speed{{ speed }}
    Node{{ node }}
    IP{{ ip }}
    \ No newline at end of file diff --git a/lib/routes/hostmonit/templates/title.art b/lib/routes/hostmonit/templates/title.art deleted file mode 100644 index 6a4cefa67bcf..000000000000 --- a/lib/routes/hostmonit/templates/title.art +++ /dev/null @@ -1 +0,0 @@ -[{{ line }} | {{ latency }} | {{ loss }} | {{ speed }} | {{ node }}] {{ ip }} \ No newline at end of file diff --git a/lib/routes/houxu/events.ts b/lib/routes/houxu/events.tsx similarity index 72% rename from lib/routes/houxu/events.ts rename to lib/routes/houxu/events.tsx index 5793564b9637..e1debaa6a4aa 100644 --- a/lib/routes/houxu/events.ts +++ b/lib/routes/houxu/events.tsx @@ -1,9 +1,9 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/events', @@ -37,13 +37,15 @@ async function handler(ctx) { author: item.creator.name, category: item.tags, pubDate: parseDate(item.update_at), - description: art(path.join(__dirname, 'templates/events.art'), { - title: item.title, - description: item.description, - linkTitle: item.last_thread.link_title, - content: item.last_thread.title.replaceAll('\r\n', '
    '), - pubDate: item.update_at, - }), + description: renderToString( + <> +

    {item.title}

    +

    {item.description}

    + Latest: {item.last_thread.link_title} +

    {raw(item.last_thread.title.replaceAll('\r\n', '
    '))}

    + {item.update_at} + + ), })); return { diff --git a/lib/routes/houxu/index.ts b/lib/routes/houxu/index.tsx similarity index 59% rename from lib/routes/houxu/index.ts rename to lib/routes/houxu/index.tsx index 17ca07e39b42..f30373cc940e 100644 --- a/lib/routes/houxu/index.ts +++ b/lib/routes/houxu/index.tsx @@ -1,9 +1,9 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { name: '热点', @@ -34,15 +34,18 @@ async function handler(ctx) { link: `${rootUrl}/lives/${item.object.id}`, author: item.object.last.link.source ?? item.object.last.link.media.name, pubDate: parseDate(item.object.news_update_at), - description: art(path.join(__dirname, 'templates/lives.art'), { - title: item.object.title, - description: item.object.summary, - url: item.object.last.link.url, - linkTitle: item.object.last.link.title, - source: item.object.last.link.source ?? item.object.last.link.media.name, - content: item.object.last.link.description.replaceAll('\r\n', '
    '), - pubDate: item.object.news_update_at, - }), + description: renderToString( + <> +

    {item.object.title}

    +

    {item.object.summary}

    + + Latest: {item.object.last.link.title} + {item.object.last.link.source || item.object.last.link.media.name ? <> ({item.object.last.link.source ?? item.object.last.link.media.name}) : null} + +

    {raw(item.object.last.link.description.replaceAll('\r\n', '
    '))}

    + {item.object.news_update_at} + + ), })); return { diff --git a/lib/routes/houxu/memory.ts b/lib/routes/houxu/memory.tsx similarity index 73% rename from lib/routes/houxu/memory.ts rename to lib/routes/houxu/memory.tsx index f0944690c5a1..f60a5fada3f0 100644 --- a/lib/routes/houxu/memory.ts +++ b/lib/routes/houxu/memory.tsx @@ -1,9 +1,8 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/memory', @@ -37,13 +36,16 @@ async function handler(ctx) { author: item.last.link.source, category: [item.title], pubDate: parseDate(item.last.create_at), - description: art(path.join(__dirname, 'templates/memory.art'), { - live: item.title, - url: item.last.link.url, - title: item.last.link.title, - source: item.last.link.source, - description: item.last.link.description, - }), + description: renderToString( + <> +

    {item.title}

    + + {item.last.link.title} + {item.last.link.source ? <> ({item.last.link.source}) : null} + +

    {item.last.link.description}

    + + ), })); return { diff --git a/lib/routes/houxu/templates/events.art b/lib/routes/houxu/templates/events.art deleted file mode 100644 index 0014cd8051b0..000000000000 --- a/lib/routes/houxu/templates/events.art +++ /dev/null @@ -1,5 +0,0 @@ -

    {{ title }}

    -

    {{ description }}

    -Latest: {{ linkTitle }} -

    {{@ content }}

    -{{ pubDate }} \ No newline at end of file diff --git a/lib/routes/houxu/templates/lives.art b/lib/routes/houxu/templates/lives.art deleted file mode 100644 index d2509f5d96c9..000000000000 --- a/lib/routes/houxu/templates/lives.art +++ /dev/null @@ -1,5 +0,0 @@ -

    {{ title }}

    -

    {{ description }}

    -Latest: {{ linkTitle }}{{ if source }} ({{ source }}){{ /if }} -

    {{@ content }}

    -{{ pubDate }} \ No newline at end of file diff --git a/lib/routes/houxu/templates/memory.art b/lib/routes/houxu/templates/memory.art deleted file mode 100644 index 1a209ae7cf8e..000000000000 --- a/lib/routes/houxu/templates/memory.art +++ /dev/null @@ -1,3 +0,0 @@ -

    {{ live }}

    -{{ title }}{{ if source }} ({{ source }}){{ /if }} -

    {{ description }}

    \ No newline at end of file diff --git a/lib/routes/hoyolab/news.ts b/lib/routes/hoyolab/news.tsx similarity index 88% rename from lib/routes/hoyolab/news.ts rename to lib/routes/hoyolab/news.tsx index 5466ae0cb8d6..c525a9636b49 100644 --- a/lib/routes/hoyolab/news.ts +++ b/lib/routes/hoyolab/news.tsx @@ -1,11 +1,11 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import logger from '@/utils/logger'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { HOST, LINK, NEW_LIST, OFFICIAL_PAGE_TYPE, POST_FULL, PRIVATE_IMG, PUBLIC_IMG } from './constant'; import { getI18nGameInfo, getI18nType } from './utils'; @@ -53,7 +53,7 @@ const getPostContent = (list, { language }) => if (content === language || !content) { content = post.content; } - const description = art(path.join(__dirname, 'templates/post.art'), { + const description = renderPostDescription({ hasCover: post.has_cover, coverList: row.cover_list, content: replaceImgDomain(content), @@ -140,3 +140,22 @@ async function handler(ctx) { logger.error(error); } } + +type CoverItem = { + url: string; +}; + +const renderPostDescription = ({ hasCover, coverList, content }: { hasCover: boolean; coverList?: CoverItem[]; content: string }): string => + renderToString( + <> + {hasCover + ? coverList?.map((cover) => ( + <> + +
    + + )) + : null} + {raw(content)} + + ); diff --git a/lib/routes/hoyolab/templates/post.art b/lib/routes/hoyolab/templates/post.art deleted file mode 100644 index 8744cb1e6fa1..000000000000 --- a/lib/routes/hoyolab/templates/post.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if hasCover }} - {{ each coverList c }} -
    - {{ /each }} -{{ /if }} - -{{@ content }} diff --git a/lib/routes/hupu/all.ts b/lib/routes/hupu/all.tsx similarity index 79% rename from lib/routes/hupu/all.ts rename to lib/routes/hupu/all.tsx index a49fc1e7bd57..5bc23807c2e4 100644 --- a/lib/routes/hupu/all.ts +++ b/lib/routes/hupu/all.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -83,10 +82,19 @@ async function handler(ctx) { item.author = content('.bbs-user-wrapper-content-name-span').first().text(); item.pubDate = item.pubDate ?? timezone(parseRelativeDate(content('.second-line-user-info').first().text()), +8); - item.description = art(path.resolve(__dirname, 'templates/description.art'), { - videos, - description: content('.bbs-content').first().html(), - }); + const description = content('.bbs-content').first().html(); + item.description = renderToString( + <> + {videos.length + ? videos.map((video) => ( + + )) + : null} + {description ? raw(description) : null} + + ); } catch { // no-empty } diff --git a/lib/routes/hupu/bbs.ts b/lib/routes/hupu/bbs.tsx similarity index 70% rename from lib/routes/hupu/bbs.ts rename to lib/routes/hupu/bbs.tsx index 2d8661258c0b..010657c40018 100644 --- a/lib/routes/hupu/bbs.ts +++ b/lib/routes/hupu/bbs.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -91,12 +89,31 @@ async function handler(ctx) { const result = detailResponse.data.result; - item.description = art(path.join(__dirname, 'templates/match.art'), { - image: result.img, - description: result.beginContent, - keyEvent: result.keyEvent, - playerImage: result.playerScoreImg, - }); + item.description = renderToString( + <> + {result.img ? : null} + {result.beginContent ?

    {result.beginContent}

    : null} + {result.keyEvent?.length ? ( + <> +

    关键事件

    + {result.keyEvent.map((event) => ( + <> +

    {event.title}

    + {event.gifImgs?.map((gif) => ( + + ))} + + ))} + + ) : null} + {result.playerScoreImg ? ( + <> +

    球员评分

    + + + ) : null} + + ); } } catch { // no-empty diff --git a/lib/routes/hupu/templates/description.art b/lib/routes/hupu/templates/description.art deleted file mode 100644 index fe8a1d64f836..000000000000 --- a/lib/routes/hupu/templates/description.art +++ /dev/null @@ -1,11 +0,0 @@ -{{ if videos }} -{{ each videos video }} - -{{ /each }} -{{ /if }} - -{{ if description }} -{{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/hupu/templates/match.art b/lib/routes/hupu/templates/match.art deleted file mode 100644 index 3d417ad52cc0..000000000000 --- a/lib/routes/hupu/templates/match.art +++ /dev/null @@ -1,22 +0,0 @@ -{{ if image }} - -{{ /if }} - -{{ if description }} -

    {{ description }}

    -{{ /if }} - -{{ if keyEvent }} -

    关键事件

    -{{ each keyEvent event }} -

    {{ event.title }}

    -{{ each event.gifImgs gif }} - -{{ /each }} -{{ /each }} -{{ /if }} - -{{ if playerImage }} -

    球员评分

    - -{{ /if }} \ No newline at end of file diff --git a/lib/routes/huxiu/templates/description.art b/lib/routes/huxiu/templates/description.art deleted file mode 100644 index 298a0053a9db..000000000000 --- a/lib/routes/huxiu/templates/description.art +++ /dev/null @@ -1,46 +0,0 @@ -{{ if (!video || !video.src) && image?.src }} -
    - -
    -{{ /if }} - -{{ if audio?.src }} - -{{ /if }} - -{{ if video?.src }} - -{{ /if }} - -{{ if preface }} - {{@ preface }} -{{ /if }} - -{{ if summary }} - {{@ summary }} -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/huxiu/templates/description.tsx b/lib/routes/huxiu/templates/description.tsx new file mode 100644 index 000000000000..c3d6e51a5d2f --- /dev/null +++ b/lib/routes/huxiu/templates/description.tsx @@ -0,0 +1,55 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type MediaImage = { + src?: string; + width?: string | number; + height?: string | number; +}; + +type MediaAudio = { + src?: string; + type?: string; +}; + +type MediaVideo = { + src?: string; + type?: string; + poster?: string; +}; + +type DescriptionData = { + image?: MediaImage; + audio?: MediaAudio; + video?: MediaVideo; + preface?: string; + summary?: string; + description?: string; +}; + +export const renderDescription = ({ image, audio, video, preface, summary, description }: DescriptionData) => + renderToString( + <> + {!video?.src && image?.src ? ( +
    + +
    + ) : null} + {audio?.src ? ( + + ) : null} + {video?.src ? ( + + ) : null} + {preface ? <>{raw(preface)} : null} + {summary ? <>{raw(summary)} : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/huxiu/util.ts b/lib/routes/huxiu/util.ts index d07a2ee80282..18ef04283e4a 100644 --- a/lib/routes/huxiu/util.ts +++ b/lib/routes/huxiu/util.ts @@ -1,11 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import CryptoJS from 'crypto-js'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const domain = 'huxiu.com'; const rootUrl = `https://www.${domain}`; @@ -31,7 +30,7 @@ const cleanUpHTML = (data) => { e = $(e); if ((e.prop('src') ?? e.prop('_src')) !== undefined) { e.parent().replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ image: { src: (e.prop('src') ?? e.prop('_src')).split(/\?/)[0], width: e.prop('data-w'), @@ -204,7 +203,7 @@ const fetchItem = async (item) => { const { processed: video, processedItem: videoItem = {} } = processVideoInfo(data.video_info); item.title = data.title ?? item.title; - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ image: { src: data.pic_path, }, @@ -367,7 +366,7 @@ const processItems = async (items, limit, tryGet) => { ...videoItem, title: (item.title ?? item.summary ?? item.content)?.replaceAll(/<\/?(?:em|br)?>/g, ''), link, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ image: { src: item.origin_pic_path ?? item.pic_path ?? item.big_pic_path?.split(/\?/)[0] ?? undefined, }, diff --git a/lib/routes/hyperdash/templates/description.art b/lib/routes/hyperdash/templates/description.art deleted file mode 100644 index 76bdc7496a4f..000000000000 --- a/lib/routes/hyperdash/templates/description.art +++ /dev/null @@ -1,34 +0,0 @@ -

    Trader #{{ rank }}

    - -

    Address: {{ address }}

    -

    Account Value: {{ accountValue }}

    - -

    Main Position

    -

    Coin: {{ mainPosition.coin }}

    -

    Position Value: {{ mainPosition.value }}

    -

    Side: {{ mainPosition.side }}

    -

    Direction Bias: {{ directionBias }}

    - -

    PnL Performance

    - - - - - - - - - - - - - - - - - - - - - -
    PeriodPnL
    Day{{ pnl.day.value }}
    Week{{ pnl.week.value }}
    Month{{ pnl.month.value }}
    All-time{{ pnl.alltime.value }}
    diff --git a/lib/routes/hyperdash/top-traders.ts b/lib/routes/hyperdash/top-traders.ts deleted file mode 100644 index 89232f3c8838..000000000000 --- a/lib/routes/hyperdash/top-traders.ts +++ /dev/null @@ -1,86 +0,0 @@ -import path from 'node:path'; - -import type { Route } from '@/types'; -import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; - -import { fetchTopTraders, formatCurrency, formatPnL } from './utils'; - -export const route: Route = { - path: '/top-traders', - categories: ['finance'], - example: '/hyperdash/top-traders', - parameters: {}, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['hyperdash.info/'], - }, - ], - name: 'Top Traders', - maintainers: ['pseudoyu'], - handler, - description: 'Get the latest top traders data from HyperDash', -}; - -async function handler() { - const traders = await fetchTopTraders(); - - const items = traders.map((trader, index) => { - const rank = index + 1; - - const title = trader.address; - - const description = art(path.join(__dirname, 'templates/description.art'), { - rank, - address: trader.address, - accountValue: formatCurrency(trader.account_value), - mainPosition: { - coin: trader.main_position.coin, - value: formatCurrency(trader.main_position.value), - side: trader.main_position.side, - }, - directionBias: trader.direction_bias !== null && trader.direction_bias !== undefined ? trader.direction_bias.toFixed(2) + '%' : 'N/A', - pnl: { - day: { - value: formatPnL(trader.perp_day_pnl), - }, - week: { - value: formatPnL(trader.perp_week_pnl), - }, - month: { - value: formatPnL(trader.perp_month_pnl), - }, - alltime: { - value: formatPnL(trader.perp_alltime_pnl), - }, - }, - }); - - const baseTime = new Date(); - const orderTimestamp = new Date(baseTime.getTime() - index * 1000); // Each item 1 second apart - - return { - title, - description, - link: `https://hyperdash.info/trader/${trader.address}`, - pubDate: parseDate(orderTimestamp.toISOString()), - guid: trader.address, - }; - }); - - return { - title: 'HyperDash Top Traders', - link: 'https://hyperdash.info/', - description: 'Top performing traders on HyperDash - real-time cryptocurrency derivatives trading analytics', - item: items, - language: 'en' as const, - }; -} diff --git a/lib/routes/hyperdash/top-traders.tsx b/lib/routes/hyperdash/top-traders.tsx new file mode 100644 index 000000000000..c50dfaf9d677 --- /dev/null +++ b/lib/routes/hyperdash/top-traders.tsx @@ -0,0 +1,120 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +import type { Route } from '@/types'; +import { parseDate } from '@/utils/parse-date'; + +import { fetchTopTraders, formatCurrency, formatPnL } from './utils'; + +export const route: Route = { + path: '/top-traders', + categories: ['finance'], + example: '/hyperdash/top-traders', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['hyperdash.info/'], + }, + ], + name: 'Top Traders', + maintainers: ['pseudoyu'], + handler, + description: 'Get the latest top traders data from HyperDash', +}; + +async function handler() { + const traders = await fetchTopTraders(); + + const items = traders.map((trader, index) => { + const rank = index + 1; + + const title = trader.address; + + const accountValue = formatCurrency(trader.account_value); + const mainPosition = { + coin: trader.main_position.coin, + value: formatCurrency(trader.main_position.value), + side: trader.main_position.side, + }; + const directionBias = trader.direction_bias !== null && trader.direction_bias !== undefined ? trader.direction_bias.toFixed(2) + '%' : 'N/A'; + const pnl = { + day: formatPnL(trader.perp_day_pnl), + week: formatPnL(trader.perp_week_pnl), + month: formatPnL(trader.perp_month_pnl), + alltime: formatPnL(trader.perp_alltime_pnl), + }; + const description = renderToString( + <> +

    Trader #{rank}

    +

    + Address: {trader.address} +

    +

    + Account Value: {accountValue} +

    +

    Main Position

    +

    + Coin: {mainPosition.coin} +

    +

    + Position Value: {mainPosition.value} +

    +

    + Side: {mainPosition.side} +

    +

    + Direction Bias: {directionBias} +

    +

    PnL Performance

    + + + + + + + + + + + + + + + + + + + + + +
    PeriodPnL
    Day{pnl.day}
    Week{pnl.week}
    Month{pnl.month}
    All-time{pnl.alltime}
    + + ); + + const baseTime = new Date(); + const orderTimestamp = new Date(baseTime.getTime() - index * 1000); // Each item 1 second apart + + return { + title, + description, + link: `https://hyperdash.info/trader/${trader.address}`, + pubDate: parseDate(orderTimestamp.toISOString()), + guid: trader.address, + }; + }); + + return { + title: 'HyperDash Top Traders', + link: 'https://hyperdash.info/', + description: 'Top performing traders on HyperDash - real-time cryptocurrency derivatives trading analytics', + item: items, + language: 'en' as const, + }; +} diff --git a/lib/routes/i-cable/news.ts b/lib/routes/i-cable/news.tsx similarity index 78% rename from lib/routes/i-cable/news.ts rename to lib/routes/i-cable/news.tsx index a75ecc46fe30..8640c8f501e5 100644 --- a/lib/routes/i-cable/news.ts +++ b/lib/routes/i-cable/news.tsx @@ -1,11 +1,11 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; export const route: Route = { path: '/news/:category?', @@ -53,10 +53,18 @@ async function handler(ctx) { const list = await got(`${root}/posts?_embed=1&categories=${metadata.id}&per_page=${limit}`); const items = list.data.map((item) => { - const description = art(path.join(__dirname, 'templates/description.art'), { - media: item._embedded['wp:featuredmedia'] ?? [], - content: item.content.rendered, - }); + const description = renderToString( + <> + {item._embedded['wp:featuredmedia']?.length + ? item._embedded['wp:featuredmedia'].map((media) => ( +
    + +
    + )) + : null} + {item.content.rendered ? raw(item.content.rendered) : null} + + ); return { title: item.title.rendered, link: item.link, diff --git a/lib/routes/i-cable/templates/description.art b/lib/routes/i-cable/templates/description.art deleted file mode 100644 index 1748ab4221bd..000000000000 --- a/lib/routes/i-cable/templates/description.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if media.length > 0 }} - {{ each media }} -
    - {{ /each }} -{{ /if }} -{{ if content }} - {{@ content }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/ianspriggs/index.ts b/lib/routes/ianspriggs/index.ts index f296e83a290f..44cea1e90420 100644 --- a/lib/routes/ianspriggs/index.ts +++ b/lib/routes/ianspriggs/index.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/:category?', @@ -52,7 +51,7 @@ async function handler(ctx) { return { title: item.find('div.work-info').text(), link: item.find('a').prop('href'), - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ images: image?.prop('src') ? [ { @@ -88,7 +87,7 @@ async function handler(ctx) { }); item.title = content('div.project-title').text(); - item.description += art(path.join(__dirname, 'templates/description.art'), { + item.description += renderDescription({ images, description: content('div.nectar-fancy-ul').html(), }); diff --git a/lib/routes/ianspriggs/templates/description.art b/lib/routes/ianspriggs/templates/description.art deleted file mode 100644 index afd87d6b90eb..000000000000 --- a/lib/routes/ianspriggs/templates/description.art +++ /dev/null @@ -1,13 +0,0 @@ -{{ each images image }} -
    - {{ image.alt }} -
    -{{ /each }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/ianspriggs/templates/description.tsx b/lib/routes/ianspriggs/templates/description.tsx new file mode 100644 index 000000000000..b7f32afec6f2 --- /dev/null +++ b/lib/routes/ianspriggs/templates/description.tsx @@ -0,0 +1,28 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionData = { + images?: DescriptionImage[]; + description?: string; +}; + +export const renderDescription = ({ images, description }: DescriptionData) => + renderToString( + <> + {images?.length + ? images.map((image) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + ) + : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/idaily/index.ts b/lib/routes/idaily/index.tsx similarity index 77% rename from lib/routes/idaily/index.ts rename to lib/routes/idaily/index.tsx index 93be08d14764..d8eb7421788c 100644 --- a/lib/routes/idaily/index.ts +++ b/lib/routes/idaily/index.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: ['/:language?'], @@ -43,8 +41,8 @@ async function handler(ctx) { return { title: `${item.ui_sets?.caption_subtitle} - ${item.title}`, link: item.link_share, - description: art(path.join(__dirname, 'templates/description.art'), { - images: image + description: renderDescription( + image ? [ { src: image, @@ -52,8 +50,8 @@ async function handler(ctx) { }, ] : undefined, - intro: item.content, - }), + item.content + ), author: item.location, category: item.tags?.map((c) => c.name), guid: `idaily-${item.guid}`, @@ -83,3 +81,23 @@ async function handler(ctx) { allowEmpty: true, }; } + +type IdailyImage = { + src?: string; + alt?: string; +}; + +const renderDescription = (images: IdailyImage[] | undefined, intro?: string) => renderToString(); + +const IdailyDescription = ({ images, intro }: { images?: IdailyImage[]; intro?: string }) => ( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + )} + {intro ?

    {intro}

    : null} + +); diff --git a/lib/routes/idaily/templates/description.art b/lib/routes/idaily/templates/description.art deleted file mode 100644 index a3f88c9b4dd8..000000000000 --- a/lib/routes/idaily/templates/description.art +++ /dev/null @@ -1,17 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -

    {{ intro }}

    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/ieee/author.ts b/lib/routes/ieee/author.ts index 289e973637b0..2056ca0aa7bb 100644 --- a/lib/routes/ieee/author.ts +++ b/lib/routes/ieee/author.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { name: 'IEEE Author Articles', @@ -87,9 +86,3 @@ async function handler(ctx) { image, }; } - -function renderDescription(item: { title: string; authors: string; abstract: string; doi: string }) { - return art(path.join(__dirname, 'templates/description.art'), { - item, - }); -} diff --git a/lib/routes/ieee/journal.ts b/lib/routes/ieee/journal.ts index 7ef3e00c90d3..e1299e00f8f1 100644 --- a/lib/routes/ieee/journal.ts +++ b/lib/routes/ieee/journal.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const ieeeHost = 'https://ieeexplore.ieee.org'; @@ -51,9 +50,7 @@ async function handler(ctx) { // 捕获等号右侧的 JSON(最小匹配直到紧随的分号) const m = code.match(/xplGlobal\.document\.metadata\s*=\s*(\{[\s\S]*?\})\s*;/); item.abstract = m ? ((JSON.parse(m[1]) as { abstract?: string }).abstract ?? ' ') : ' '; - item.description = art(path.join(__dirname, 'templates/description.art'), { - item, - }); + item.description = renderDescription(item); return item; }) diff --git a/lib/routes/ieee/templates/description.art b/lib/routes/ieee/templates/description.art deleted file mode 100644 index a9e8c5da2221..000000000000 --- a/lib/routes/ieee/templates/description.art +++ /dev/null @@ -1,11 +0,0 @@ -

    - {{ item.title }}
    -

    -

    - {{ item.authors }}
    - https://doi.org/{{ item.doi }}
    - Volume {{ item.volume }}
    -

    -

    - {{ item.abstract }}
    -

    \ No newline at end of file diff --git a/lib/routes/ieee/templates/description.tsx b/lib/routes/ieee/templates/description.tsx new file mode 100644 index 000000000000..9ac864aa6ec9 --- /dev/null +++ b/lib/routes/ieee/templates/description.tsx @@ -0,0 +1,47 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionItem = { + title: string; + authors: string; + doi: string; + volume?: string | number; + abstract: string; +}; + +export const renderDescription = (item: DescriptionItem): string => + renderToString( + <> +

    + + {item.title} + +
    +

    +

    + + + {item.authors} + + +
    + + + + https://doi.org/{item.doi} + + + +
    + + + Volume {item.volume ?? ''} + + +
    +

    +

    + {item.abstract} +
    +

    + + ); diff --git a/lib/routes/ifeng/news.ts b/lib/routes/ifeng/news.tsx similarity index 56% rename from lib/routes/ifeng/news.ts rename to lib/routes/ifeng/news.tsx index 1134771d0e01..b8b86ec9d35a 100644 --- a/lib/routes/ifeng/news.ts +++ b/lib/routes/ifeng/news.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -49,10 +48,28 @@ async function handler(ctx) { item.author = detailResponse.data.match(/"editorName":"(.*?)",/)[1]; item.category = detailResponse.data.match(/},"keywords":"(.*?)",/)[1].split(','); - item.description = art(path.join(__dirname, 'templates/description.art'), { - image: item.description, - description: JSON.parse(detailResponse.data.match(/"contentList":(\[.*?]),/)[1]).map((content) => content.data), - }); + const image = item.description; + const description = JSON.parse(detailResponse.data.match(/"contentList":(\[.*?]),/)[1]).map((content) => content.data); + item.description = renderToString( + <> + {image ? ( +
    + +
    + ) : null} + {description?.length + ? description.map((entry) => + entry?.attachmentType === 'video' ? ( + + ) : typeof entry === 'string' ? ( + <>{raw(entry.replaceAll('data-lazyload=', 'src='))} + ) : null + ) + : null} + + ); return item; }) ) diff --git a/lib/routes/ifeng/templates/description.art b/lib/routes/ifeng/templates/description.art deleted file mode 100644 index 6e8aef870c0b..000000000000 --- a/lib/routes/ifeng/templates/description.art +++ /dev/null @@ -1,16 +0,0 @@ -{{ if image }} -
    - -
    -{{ /if }} -{{ if description }} -{{ each description d }} -{{ if d.attachmentType === 'video' }} - -{{ else }} -{{@ d.replace(/data-lazyload=/g, 'src=') }} -{{ /if }} -{{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/ifeng/templates/video.art b/lib/routes/ifeng/templates/video.art deleted file mode 100644 index 510f5797b831..000000000000 --- a/lib/routes/ifeng/templates/video.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ if videoInfo.mobileUrl }} - -{{ /if }} diff --git a/lib/routes/ifeng/utils.ts b/lib/routes/ifeng/utils.tsx similarity index 61% rename from lib/routes/ifeng/utils.ts rename to lib/routes/ifeng/utils.tsx index 0ef7347f469d..d56a5041d35f 100644 --- a/lib/routes/ifeng/utils.ts +++ b/lib/routes/ifeng/utils.tsx @@ -1,6 +1,4 @@ -import path from 'node:path'; - -import { art } from '@/utils/render'; +import { renderToString } from 'hono/jsx/dom/server'; const extractDoc = (data) => data @@ -17,8 +15,12 @@ const extractDoc = (data) => .join('
    '); const renderVideo = (videoInfo) => - art(path.join(__dirname, 'templates/video.art'), { - videoInfo, - }); + renderToString( + videoInfo.mobileUrl ? ( + + ) : null + ); export { extractDoc, renderVideo }; diff --git a/lib/routes/ikea/cn/utils.ts b/lib/routes/ikea/cn/utils.ts deleted file mode 100644 index 1d067a1901c8..000000000000 --- a/lib/routes/ikea/cn/utils.ts +++ /dev/null @@ -1,40 +0,0 @@ -import path from 'node:path'; - -import md5 from '@/utils/md5'; -import { art } from '@/utils/render'; - -const generateRequestHeaders = () => { - const now = Math.round(Date.now() / 1000); - return { - 'X-Client-Platform': 'WechatMiniprogram', - 'X-Client-DeviceId': md5(now.toString()), - }; -}; - -const generateProductItem = (product) => { - const { - productFullId, - name, - productType, - measureText, - priceDisplay: { currentPrice, originalPrice }, - images, - } = product; - const isFamilyOffer = currentPrice && originalPrice; - - return { - title: `${name} ${productType} - \u{000A5}${currentPrice}`, - description: art(path.join(__dirname, '../templates/cn/product.art'), { - isFamilyOffer, - name, - productType, - measureText, - currentPrice, - originalPrice, - images: images.map((image) => image.url), - }), - link: `https://www.ikea.cn/cn/zh/p/${productFullId}`, - }; -}; - -export { generateProductItem, generateRequestHeaders }; diff --git a/lib/routes/ikea/cn/utils.tsx b/lib/routes/ikea/cn/utils.tsx new file mode 100644 index 000000000000..03c180810dd8 --- /dev/null +++ b/lib/routes/ikea/cn/utils.tsx @@ -0,0 +1,50 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +import md5 from '@/utils/md5'; + +const generateRequestHeaders = () => { + const now = Math.round(Date.now() / 1000); + return { + 'X-Client-Platform': 'WechatMiniprogram', + 'X-Client-DeviceId': md5(now.toString()), + }; +}; + +const generateProductItem = (product) => { + const { + productFullId, + name, + productType, + measureText, + priceDisplay: { currentPrice, originalPrice }, + images, + } = product; + const isFamilyOffer = currentPrice && originalPrice; + + return { + title: `${name} ${productType} - \u{000A5}${currentPrice}`, + description: renderToString( + <> +

    名称:{name}

    +

    类型:{productType}

    +

    尺寸:{measureText}

    + {isFamilyOffer ? ( + <> +

    会员价格:\u00A5{currentPrice}

    +

    非会员价格:\u00A5{originalPrice}

    + + ) : ( +

    价格:\u00A5{currentPrice}

    + )} +

    + {images.map((image) => ( + + ))} +

    + + ), + link: `https://www.ikea.cn/cn/zh/p/${productFullId}`, + }; +}; + +export { generateProductItem, generateRequestHeaders }; diff --git a/lib/routes/ikea/gb/new.ts b/lib/routes/ikea/gb/new.tsx similarity index 81% rename from lib/routes/ikea/gb/new.ts rename to lib/routes/ikea/gb/new.tsx index ea374dbec7c7..082e70bc4b83 100644 --- a/lib/routes/ikea/gb/new.ts +++ b/lib/routes/ikea/gb/new.tsx @@ -1,8 +1,7 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; export const route: Route = { path: '/gb/new', @@ -64,9 +63,17 @@ async function handler() { const items = products.map((p) => ({ title: `${p.name} ${p.typeName}, ${p.itemMeasureReferenceText}`, - description: art(path.join(__dirname, '../templates/new.art'), { - p, - }), + description: renderToString( + <> + {p.mainImageAlt} +
    + {p.name} +
    + {p.typeName}, {p.itemMeasureReferenceText} +
    + {p.salesPrice.current.prefix} {p.salesPrice.current.wholeNumber} + + ), link: p.pipUrl, category: p.categoryPath.map((c) => c.name), })); diff --git a/lib/routes/ikea/gb/offer.ts b/lib/routes/ikea/gb/offer.ts index 10387aae3b3f..c961c96ec963 100644 --- a/lib/routes/ikea/gb/offer.ts +++ b/lib/routes/ikea/gb/offer.ts @@ -1,10 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; + +import { renderOffer } from '../templates/offer'; export const route: Route = { path: '/gb/offer', @@ -51,7 +50,7 @@ async function handler() { searchParams.delete('itm_campaign'); return { title: title.text(), - description: art(path.join(__dirname, '../templates/offer.art'), { + description: renderOffer({ img: img.parent().html(), desc: title.next().parent().html(), }), @@ -78,7 +77,7 @@ async function handler() { searchParams.delete('itm_campaign'); return { title: title.text(), - description: art(path.join(__dirname, '../templates/offer.art'), { + description: renderOffer({ img: img.parent().html(), desc: title.parent().html(), }), diff --git a/lib/routes/ikea/templates/cn/product.art b/lib/routes/ikea/templates/cn/product.art deleted file mode 100644 index 7204bd3a1c7d..000000000000 --- a/lib/routes/ikea/templates/cn/product.art +++ /dev/null @@ -1,14 +0,0 @@ -

    名称:{{name}}

    -

    类型:{{productType}}

    -

    尺寸:{{measureText}}

    -{{if isFamilyOffer}} -

    会员价格:¥{{currentPrice}}

    -

    非会员价格:¥{{originalPrice}}

    -{{else}} -

    价格:¥{{currentPrice}}

    -{{/if}} -

    - {{each images}} - - {{/each}} -

    diff --git a/lib/routes/ikea/templates/new.art b/lib/routes/ikea/templates/new.art deleted file mode 100644 index 114f52d7cc01..000000000000 --- a/lib/routes/ikea/templates/new.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ p.mainImageAlt }} -
    -{{ p.name }} -
    -{{ p.typeName }}, {{ p.itemMeasureReferenceText }} -
    -{{ p.salesPrice.current.prefix }} {{ p.salesPrice.current.wholeNumber }} diff --git a/lib/routes/ikea/templates/offer.art b/lib/routes/ikea/templates/offer.art deleted file mode 100644 index ce79ac73ad75..000000000000 --- a/lib/routes/ikea/templates/offer.art +++ /dev/null @@ -1,3 +0,0 @@ -{{@ img }} -
    -{{@ desc }} diff --git a/lib/routes/ikea/templates/offer.tsx b/lib/routes/ikea/templates/offer.tsx new file mode 100644 index 000000000000..f7627df04129 --- /dev/null +++ b/lib/routes/ikea/templates/offer.tsx @@ -0,0 +1,17 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type OfferData = { + img?: string; + desc?: string; +}; + +const IkeaOffer = ({ img, desc }: OfferData) => ( + <> + {img ? raw(img) : null} +
    + {desc ? raw(desc) : null} + +); + +export const renderOffer = (data: OfferData) => renderToString(); diff --git a/lib/routes/iknowwhatyoudownload/daily.ts b/lib/routes/iknowwhatyoudownload/daily.tsx similarity index 63% rename from lib/routes/iknowwhatyoudownload/daily.ts rename to lib/routes/iknowwhatyoudownload/daily.tsx index 635d910d57b4..f4e360d1913e 100644 --- a/lib/routes/iknowwhatyoudownload/daily.ts +++ b/lib/routes/iknowwhatyoudownload/daily.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import dayjs from 'dayjs'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; interface TableData { key: string; @@ -86,11 +85,48 @@ async function handler(ctx) { content: $(item).find('ul').toString(), })); - const content = art(path.join(__dirname, 'templates/daily.art'), { - numStats, - tableData, - topList, - }); + const content = renderToString( +
    +
    +

    Torrent download statistics

    +
      + {numStats.map((stat) => ( +
    • + {stat.percent} {stat.desc} +
    • + ))} +
    +
    +
    +

    Table View

    + {tableData ? ( + + + + + + + {tableData.map((row) => ( + + + + + + ))} +
    CategoryCountPercent
    {row.key}{row.count}{row.percent}
    + ) : null} +
    +
    +

    Top List

    + {topList.map((entry) => ( + <> +

    {entry.title}

    + {raw(entry.content)} + + ))} +
    +
    + ); return { title: `Daily Torrents Statistics in ${country} for ${dateFormatted}`, diff --git a/lib/routes/iknowwhatyoudownload/templates/daily.art b/lib/routes/iknowwhatyoudownload/templates/daily.art deleted file mode 100644 index 1466aea09c33..000000000000 --- a/lib/routes/iknowwhatyoudownload/templates/daily.art +++ /dev/null @@ -1,34 +0,0 @@ -
    -
    -

    Torrent download statistics

    -
      - {{each numStats}} -
    • {{$value.percent}} {{$value.desc}}
    • - {{/each}} -
    -
    - -
    -

    Table View

    - {{if tableData}} - - - {{each tableData}} - - - - - - {{/each}} -
    CategoryCountPercent
    {{$value.key}}{{$value.count}}{{$value.percent}}
    - {{/if}} -
    - -
    -

    Top List

    - {{each topList}} -

    {{$value.title}}

    - {{@ $value.content}} - {{/each}} -
    -
    diff --git a/lib/routes/imdb/chart.ts b/lib/routes/imdb/chart.tsx similarity index 74% rename from lib/routes/imdb/chart.ts rename to lib/routes/imdb/chart.tsx index 59e9a35b9eec..b33d0e8f164f 100644 --- a/lib/routes/imdb/chart.ts +++ b/lib/routes/imdb/chart.tsx @@ -1,16 +1,34 @@ -import path from 'node:path'; - import * as cheerio from 'cheerio'; import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import { ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; import type { ChartTitleSearchConnection } from './types'; -const render = (data) => art(path.join(__dirname, 'templates/chart.art'), data); +const render = ({ primaryImage, originalTitleText, certificate, ratingsSummary, plot }) => + renderToString( + <> + {primaryImage?.url ? ( + <> +
    + {primaryImage.caption?.plainText} +
    {primaryImage.caption?.plainText}
    +
    +
    + + ) : null} + {`Original title: ${originalTitleText.text}`} +
    + {certificate ? `${certificate.rating} ` : null} + {ratingsSummary?.aggregateRating ? `IMDb RATING: ${ratingsSummary.aggregateRating}/10 (${ratingsSummary.voteCount})` : null} +
    +
    + {plot?.plotText?.plainText} + + ); export const route: Route = { path: '/chart/:chart?', diff --git a/lib/routes/imdb/templates/chart.art b/lib/routes/imdb/templates/chart.art deleted file mode 100644 index 57134175a511..000000000000 --- a/lib/routes/imdb/templates/chart.art +++ /dev/null @@ -1,15 +0,0 @@ -{{ if primaryImage.url }} -
    - {{ primaryImage.caption.plainText }} -
    {{ primaryImage.caption.plainText }}
    -
    -
    -{{ /if }} - -Original title: {{ originalTitleText.text }}
    - -{{ if certificate }}{{ certificate.rating }}{{ /if }} -{{ if ratingsSummary.aggregateRating }}IMDb RATING: {{ ratingsSummary.aggregateRating }}/10 ({{ ratingsSummary.voteCount }}){{ /if }} -

    - -{{ plot.plotText.plainText }} diff --git a/lib/routes/imiker/jinghua.ts b/lib/routes/imiker/jinghua.ts index bbd1f07df009..9ff9586fe95e 100644 --- a/lib/routes/imiker/jinghua.ts +++ b/lib/routes/imiker/jinghua.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/ask/jinghua', @@ -51,7 +50,7 @@ async function handler(ctx) { let items = response.slice(0, limit).map((item) => ({ title: item.question_content, link: new URL(`question/${item.id}`, rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ headImage: item.headimage, author: item.nick_name, question: item.question_detail, @@ -74,7 +73,7 @@ async function handler(ctx) { const image = content(e).find('img'); content(e).replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ image: { src: image.prop('data-original'), alt: image.prop('alt'), @@ -86,7 +85,7 @@ async function handler(ctx) { }); item.title = content('div.title h1').text(); - item.description += art(path.join(__dirname, 'templates/description.art'), { + item.description += renderDescription({ description: content('div#warp').html(), }); item.author = content('div.name').text(); diff --git a/lib/routes/imiker/templates/description.art b/lib/routes/imiker/templates/description.art deleted file mode 100644 index 97303d008510..000000000000 --- a/lib/routes/imiker/templates/description.art +++ /dev/null @@ -1,32 +0,0 @@ -{{ if image?.src }} -
    - {{ image.alt }} -
    -{{ /if }} - -{{ if headImage }} -
    - - {{ if author }} -
    {{ author }}
    - {{ /if }} -
    -{{ /if }} - -{{ if question }} -
    {{ question }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/imiker/templates/description.tsx b/lib/routes/imiker/templates/description.tsx new file mode 100644 index 000000000000..c080ca5a5fdf --- /dev/null +++ b/lib/routes/imiker/templates/description.tsx @@ -0,0 +1,41 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; + width?: string; + height?: string; +}; + +type DescriptionProps = { + image?: DescriptionImage; + headImage?: string; + author?: string; + question?: string; + description?: string; +}; + +const Description = ({ image, headImage, author, question, description }: DescriptionProps) => { + const imageAlt = image?.height ?? image?.width ?? image?.alt; + + return ( + <> + {image?.src ? ( +
    + {imageAlt} +
    + ) : null} + {headImage ? ( +
    + + {author ?
    {author}
    : null} +
    + ) : null} + {question ?
    {question}
    : null} + {description ? <>{raw(description)} : null} + + ); +}; + +export const renderDescription = (props: DescriptionProps): string => renderToString(); diff --git a/lib/routes/infoq/presentations.ts b/lib/routes/infoq/presentations.ts index dd5f1e7c176c..3f1b35a63718 100644 --- a/lib/routes/infoq/presentations.ts +++ b/lib/routes/infoq/presentations.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx) => { const { conference } = ctx.req.param(); @@ -31,7 +30,7 @@ export const handler = async (ctx) => { const title = a.prop('title') || a.text().trim(); const image = item.find('img.card__image').prop('src'); - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ images: image ? [ { @@ -95,7 +94,7 @@ export const handler = async (ctx) => { if (videoSrc) { $$('div.player').replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ videos: [ { src: videoSrc, @@ -121,7 +120,7 @@ export const handler = async (ctx) => { $$('div.article__content').nextAll().remove(); - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ images: image ? [ { diff --git a/lib/routes/infoq/templates/description.art b/lib/routes/infoq/templates/description.art deleted file mode 100644 index 5b807209cc5d..000000000000 --- a/lib/routes/infoq/templates/description.art +++ /dev/null @@ -1,41 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if videos }} - {{ each videos video }} - {{ if video?.src }} - - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/infoq/templates/description.tsx b/lib/routes/infoq/templates/description.tsx new file mode 100644 index 000000000000..6824b89a0aa3 --- /dev/null +++ b/lib/routes/infoq/templates/description.tsx @@ -0,0 +1,50 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionVideo = { + src?: string; + poster?: string; + type?: string; +}; + +type DescriptionProps = { + images?: DescriptionImage[]; + videos?: DescriptionVideo[]; + intro?: string; + description?: string; +}; + +const Description = ({ images, videos, intro, description }: DescriptionProps) => { + const fallbackPoster = images?.[0]?.src; + + return ( + <> + {images?.map((image, index) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + )} + {videos?.map((video, index) => + video?.src ? ( + + ) : null + )} + {intro ?
    {intro}
    : null} + {description ? <>{raw(description)} : null} + + ); +}; + +export const renderDescription = (props: DescriptionProps): string => renderToString(); diff --git a/lib/routes/informs/index.ts b/lib/routes/informs/index.tsx similarity index 84% rename from lib/routes/informs/index.ts rename to lib/routes/informs/index.tsx index cfbb0aa74e08..951753229056 100644 --- a/lib/routes/informs/index.ts +++ b/lib/routes/informs/index.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const rootUrl = 'https://pubsonline.informs.org'; @@ -77,10 +76,7 @@ async function handler(ctx) { }, }); const detail = load(detailResponse.data); - item.description = art(path.join(__dirname, 'templates/content.art'), { - author: detail('div.accordion-tabbed.loa-accordion').text(), - content: detail('div.hlFld-Abstract').find('h2').replaceWith($('

    Abstract

    ')).end().html(), - }); + item.description = renderDescription(detail('div.accordion-tabbed.loa-accordion').text(), detail('div.hlFld-Abstract').find('h2').replaceWith($('

    Abstract

    ')).end().html()); return item; }) @@ -93,3 +89,12 @@ async function handler(ctx) { item: items, }; } + +const renderDescription = (author: string, content: string): string => + renderToString( + <> + {author} +
    + {raw(content)} + + ); diff --git a/lib/routes/informs/templates/content.art b/lib/routes/informs/templates/content.art deleted file mode 100644 index a2009f0f8aef..000000000000 --- a/lib/routes/informs/templates/content.art +++ /dev/null @@ -1,3 +0,0 @@ - {{ author }} -
    -{{@ content }} diff --git a/lib/routes/instagram/common-utils.ts b/lib/routes/instagram/common-utils.ts index d2339c6bc864..d78050061981 100644 --- a/lib/routes/instagram/common-utils.ts +++ b/lib/routes/instagram/common-utils.ts @@ -1,7 +1,7 @@ -import path from 'node:path'; - import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderImages } from './templates/images'; +import { renderVideo } from './templates/video'; const renderItems = (items) => items.map((item) => { @@ -16,7 +16,7 @@ const renderItems = (items) => ...i.image_versions2.candidates.toSorted((a, b) => b.width - a.width)[0], alt: item.accessibility_caption, })); - description = art(path.join(__dirname, 'templates/images.art'), { + description = renderImages({ summary, images, }); @@ -24,15 +24,15 @@ const renderItems = (items) => } case 'clips': case 'igtv': - description = art(path.join(__dirname, 'templates/video.art'), { + description = renderVideo({ summary, - image: item.image_versions2.candidates.toSorted((a, b) => b.width - a.width)[0], + image: item.image_versions2.candidates.toSorted((a, b) => b.width - a.width)[0].url, video: item.video_versions[0], }); break; case 'feed': { const images = [{ ...item.image_versions2.candidates.toSorted((a, b) => b.width - a.width)[0], alt: item.accessibility_caption }]; - description = art(path.join(__dirname, 'templates/images.art'), { + description = renderImages({ summary, images, }); diff --git a/lib/routes/instagram/templates/images.art b/lib/routes/instagram/templates/images.art deleted file mode 100644 index ca6cc69ec0f9..000000000000 --- a/lib/routes/instagram/templates/images.art +++ /dev/null @@ -1,12 +0,0 @@ -{{ if summary }} - {{@ summary.replace(/\n/g, '
    ') }} -
    -{{ /if }} - -{{ each images i }} - {{ i.alt }} -{{ /each }} diff --git a/lib/routes/instagram/templates/images.tsx b/lib/routes/instagram/templates/images.tsx new file mode 100644 index 000000000000..9862827dd106 --- /dev/null +++ b/lib/routes/instagram/templates/images.tsx @@ -0,0 +1,29 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type ImageItem = { + url: string; + height?: number | string; + width?: number | string; + alt?: string; +}; + +type ImagesRenderOptions = { + summary?: string; + images: ImageItem[]; +}; + +export const renderImages = ({ summary, images }: ImagesRenderOptions): string => + renderToString( + <> + {summary ? ( + <> + {raw(summary.replaceAll('\n', '
    '))} +
    + + ) : null} + {images.map((image) => ( + {image.alt + ))} + + ); diff --git a/lib/routes/instagram/templates/video.art b/lib/routes/instagram/templates/video.art deleted file mode 100644 index 9a6d0481f889..000000000000 --- a/lib/routes/instagram/templates/video.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if summary }} - {{@ summary.replace(/\n/g, '
    ') }} -
    -{{ /if }} - - diff --git a/lib/routes/instagram/templates/video.tsx b/lib/routes/instagram/templates/video.tsx new file mode 100644 index 000000000000..bec4126eca92 --- /dev/null +++ b/lib/routes/instagram/templates/video.tsx @@ -0,0 +1,28 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type VideoItem = { + url: string; + width?: number | string; +}; + +type VideoRenderOptions = { + summary?: string; + image?: string; + video: VideoItem; +}; + +export const renderVideo = ({ summary, image, video }: VideoRenderOptions): string => + renderToString( + <> + {summary ? ( + <> + {raw(summary.replaceAll('\n', '
    '))} +
    + + ) : null} + + + ); diff --git a/lib/routes/instagram/web-api/utils.ts b/lib/routes/instagram/web-api/utils.ts index 62b48eba1d9c..560df81725e6 100644 --- a/lib/routes/instagram/web-api/utils.ts +++ b/lib/routes/instagram/web-api/utils.ts @@ -1,11 +1,11 @@ -import path from 'node:path'; - import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderImages } from '../templates/images'; +import { renderVideo } from '../templates/video'; const baseUrl = 'https://www.instagram.com'; const COOKIE_URL = baseUrl; @@ -134,8 +134,8 @@ const getTagsFeed = (tag, cookieJar) => ); const renderGuestItems = (items) => { - const renderVideo = (node, summary) => - art(path.join(__dirname, '../templates/video.art'), { + const renderVideoItem = (node, summary) => + renderVideo({ summary, image: node.display_url, video: { @@ -144,8 +144,8 @@ const renderGuestItems = (items) => { width: node.dimensions.width, }, }); - const renderImages = (node, summary) => - art(path.join(__dirname, '../templates/images.art'), { + const renderImagesItem = (node, summary) => + renderImages({ summary, images: [{ url: node.display_url, height: node.dimensions.height, width: node.dimensions.width }], }); @@ -164,9 +164,9 @@ const renderGuestItems = (items) => { const _type = node.__typename; switch (_type) { case 'GraphVideo': - return renderVideo(node, i === 0 ? summary : ''); + return renderVideoItem(node, i === 0 ? summary : ''); case 'GraphImage': - return renderImages(node, i === 0 ? summary : ''); + return renderImagesItem(node, i === 0 ? summary : ''); default: throw new Error(`Instagram: Unhandled carousel type: ${_type}`); } @@ -175,10 +175,10 @@ const renderGuestItems = (items) => { : renderImages(node, summary); break; case 'GraphVideo': - description = renderVideo(node, summary); + description = renderVideoItem(node, summary); break; case 'GraphImage': - description = renderImages(node, summary); + description = renderImagesItem(node, summary); break; default: throw new Error(`Instagram: Unhandled feed type: ${type}`); diff --git a/lib/routes/ipsw.dev/index.ts b/lib/routes/ipsw.dev/index.tsx similarity index 64% rename from lib/routes/ipsw.dev/index.ts rename to lib/routes/ipsw.dev/index.tsx index d499cde88aba..3a934b787cca 100644 --- a/lib/routes/ipsw.dev/index.ts +++ b/lib/routes/ipsw.dev/index.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; export const route: Route = { path: '/index/:productID', @@ -47,12 +45,28 @@ async function handler(ctx) { link: `https://ipsw.dev/download/${productID}/${build}`, pubDate: new Date(date).toLocaleDateString(), guid: build, - description: art(path.join(__dirname, 'templates/description.art'), { - version, - build, - date, - size, - }), + description: renderToString( + + + + + + + + + + + + + + + + + + + +
    Version{version}
    Build{build}
    Released{date}
    Size{size}
    + ), }; }); diff --git a/lib/routes/ipsw.dev/templates/description.art b/lib/routes/ipsw.dev/templates/description.art deleted file mode 100644 index c0faef7bfac6..000000000000 --- a/lib/routes/ipsw.dev/templates/description.art +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - -
    Version{{ version }}
    Build{{ build }}
    Released{{ released }}
    Size{{ size }}
    \ No newline at end of file diff --git a/lib/routes/iqilu/program.ts b/lib/routes/iqilu/program.ts index 931cee632a39..7d307bbb52d9 100644 --- a/lib/routes/iqilu/program.ts +++ b/lib/routes/iqilu/program.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/v/:category{.+}?', @@ -40,7 +39,7 @@ async function handler(ctx) { return { title: a.prop('title'), link: a.prop('href'), - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ image: { src: image.prop('src'), alt: image.prop('alt'), @@ -68,7 +67,7 @@ async function handler(ctx) { item.enclosure_url = content('#copy_mp4text').prop('value'); item.enclosure_type = item.enclosure_url ? `video/${item.enclosure_url.split(/\./).pop()}` : undefined; - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ image: { src: item.itunes_item_image, alt: item.title, diff --git a/lib/routes/iqilu/templates/description.art b/lib/routes/iqilu/templates/description.art deleted file mode 100644 index df4b1523c6f9..000000000000 --- a/lib/routes/iqilu/templates/description.art +++ /dev/null @@ -1,24 +0,0 @@ -{{ if image && !video }} -
    - {{ image.alt }} -
    -{{ /if }} - -{{ if video }} - -{{ /if }} - -{{ if description }} -

    {{ description }}

    -{{ /if }} diff --git a/lib/routes/iqilu/templates/description.tsx b/lib/routes/iqilu/templates/description.tsx new file mode 100644 index 000000000000..b4af8c6ecf71 --- /dev/null +++ b/lib/routes/iqilu/templates/description.tsx @@ -0,0 +1,37 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type ImageData = { + src?: string; + alt?: string; +}; + +type VideoData = { + src?: string; + type?: string; +}; + +type DescriptionData = { + image?: ImageData; + video?: VideoData; + description?: string; +}; + +export const renderDescription = ({ image, video, description }: DescriptionData) => + renderToString( + <> + {image?.src && !video ? ( +
    + {image.alt} +
    + ) : null} + {video ? ( + + ) : null} + {description ?

    {description}

    : null} + + ); diff --git a/lib/routes/iqiyi/album.ts b/lib/routes/iqiyi/album.tsx similarity index 93% rename from lib/routes/iqiyi/album.ts rename to lib/routes/iqiyi/album.tsx index b3f6393af837..319f78b0aba8 100644 --- a/lib/routes/iqiyi/album.ts +++ b/lib/routes/iqiyi/album.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/album/:id', @@ -69,9 +67,7 @@ async function handler(ctx) { const items = epgs.map((item) => ({ title: item.name, - description: art(path.join(__dirname, 'templates/album.art'), { - item, - }), + description: renderToString(), link: `https://www.iq.com/play/${item.playLocSuffix}`, pubDate: parseDate(item.initIssueTime), })); diff --git a/lib/routes/iqiyi/templates/album.art b/lib/routes/iqiyi/templates/album.art deleted file mode 100644 index 14b1e8dd5e13..000000000000 --- a/lib/routes/iqiyi/templates/album.art +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/routes/iresearch/report.ts b/lib/routes/iresearch/report.ts index f547d5a1c23d..329c44649c40 100644 --- a/lib/routes/iresearch/report.ts +++ b/lib/routes/iresearch/report.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Context } from 'hono'; import type { Data, DataItem, Route } from '@/types'; @@ -7,9 +5,10 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + const types = { 1: { label: '最新报告', @@ -246,7 +245,7 @@ export const handler = async (ctx: Context): Promise => { })(); const images: string[] = [item.BigImg, item.SmallImg, item.reportpic].filter(Boolean) as string[]; - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: images.map((src) => ({ src, alt: title, @@ -350,7 +349,7 @@ export const handler = async (ctx: Context): Promise => { (_, index) => `${imageBaseUrl}/${typeObj.imageSlug}/${item.detailId}/${index + 1}.jpg` ), ].filter(Boolean) as string[]; - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: images.map((src) => ({ src, alt: title, diff --git a/lib/routes/iresearch/templates/description.art b/lib/routes/iresearch/templates/description.art deleted file mode 100644 index 3b8972571f7d..000000000000 --- a/lib/routes/iresearch/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} - -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/iresearch/templates/description.tsx b/lib/routes/iresearch/templates/description.tsx new file mode 100644 index 000000000000..a09691be5d8d --- /dev/null +++ b/lib/routes/iresearch/templates/description.tsx @@ -0,0 +1,28 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionRenderOptions = { + intro?: string; + description?: string; + images?: DescriptionImage[]; +}; + +export const renderDescription = ({ intro, description, images }: DescriptionRenderOptions): string => + renderToString( + <> + {intro ?
    {intro}
    : null} + {description ? <>{raw(description)} : null} + {images?.map((image) => + image?.src ? ( +
    + {image.alt +
    + ) : null + )} + + ); diff --git a/lib/routes/itch/devlog.ts b/lib/routes/itch/devlog.ts index b82cb7136331..3e0c52f2230f 100644 --- a/lib/routes/itch/devlog.ts +++ b/lib/routes/itch/devlog.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import InvalidParameterError from '@/errors/types/invalid-parameter'; @@ -7,10 +5,11 @@ import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; import { isValidHost } from '@/utils/valid-host'; +import { renderDescription } from './templates/description'; + export const route: Route = { path: '/devlog/:user/:id', categories: ['game'], @@ -78,7 +77,7 @@ async function handler(ctx) { const info = JSON.parse(content(infoJson).text()); item.author = info.author.name; item.pubDate = info.datePublished; - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ images: content('.post_image') .toArray() .map((e) => content(e).attr('src')), diff --git a/lib/routes/itch/index.ts b/lib/routes/itch/index.ts index 4dc4bbc71dd6..9ca5eb3ca050 100644 --- a/lib/routes/itch/index.ts +++ b/lib/routes/itch/index.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '*', @@ -48,7 +47,7 @@ async function handler(ctx) { const content = load(detailResponse.data); item.author = content('title').text().split('by ').pop(); - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ images: content('.screenshot') .toArray() .map((i) => content(i).attr('src')), diff --git a/lib/routes/itch/templates/description.art b/lib/routes/itch/templates/description.art deleted file mode 100644 index a71f634fa465..000000000000 --- a/lib/routes/itch/templates/description.art +++ /dev/null @@ -1,4 +0,0 @@ -{{ each images image }} - -{{ /each }} -{{@ description }} \ No newline at end of file diff --git a/lib/routes/itch/templates/description.tsx b/lib/routes/itch/templates/description.tsx new file mode 100644 index 000000000000..7ae6e1763a65 --- /dev/null +++ b/lib/routes/itch/templates/description.tsx @@ -0,0 +1,17 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + images?: string[]; + description?: string; +}; + +export const renderDescription = ({ images, description }: DescriptionData): string => + renderToString( + <> + {images?.map((image) => ( + + ))} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/ithome/templates/description.art b/lib/routes/ithome/templates/description.art deleted file mode 100644 index 0a7f83a6f60f..000000000000 --- a/lib/routes/ithome/templates/description.art +++ /dev/null @@ -1,13 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/ithome/zt.ts b/lib/routes/ithome/zt.tsx similarity index 89% rename from lib/routes/ithome/zt.ts rename to lib/routes/ithome/zt.tsx index 68a44745cacf..766715a11631 100644 --- a/lib/routes/ithome/zt.ts +++ b/lib/routes/ithome/zt.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const handler = async (ctx) => { @@ -66,16 +64,8 @@ export const handler = async (ctx) => { const src = el.prop('data-original'); if (src) { - el.replaceWith( - art(path.join(__dirname, 'templates/description.art'), { - images: [ - { - src, - alt: el.prop('alt'), - }, - ], - }) - ); + const alt = el.prop('alt'); + el.replaceWith(renderToString(
    {alt ? {alt} : }
    )); } }); diff --git a/lib/routes/iwara/subscriptions.ts b/lib/routes/iwara/subscriptions.ts index d45e4a037579..5ad438728ad5 100644 --- a/lib/routes/iwara/subscriptions.ts +++ b/lib/routes/iwara/subscriptions.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import MarkdownIt from 'markdown-it'; import { config } from '@/config'; @@ -8,7 +6,8 @@ import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderSubscriptionImages } from './templates/subscriptions'; const md = MarkdownIt({ html: true, @@ -150,9 +149,7 @@ async function handler() { const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { - let description = art(path.join(__dirname, 'templates/subscriptions.art'), { - images: [item.imageUrl], - }); + let description = renderSubscriptionImages([item.imageUrl]); if (item.private === true) { description += 'private'; @@ -173,9 +170,7 @@ async function handler() { }, }); - description = art(path.join(__dirname, 'templates/subscriptions.art'), { - images: response.files ? response.files.filter((f) => f.type === 'image')?.map((f) => `https://i.iwara.tv/image/original/${f.id}/${f.name}`) : [item.imageUrl], - }); + description = renderSubscriptionImages(response.files ? response.files.filter((f) => f.type === 'image')?.map((f) => `https://i.iwara.tv/image/original/${f.id}/${f.name}`) : [item.imageUrl]); const body = response.body ? md.render(response.body) : ''; description += body; diff --git a/lib/routes/iwara/templates/subscriptions.art b/lib/routes/iwara/templates/subscriptions.art deleted file mode 100644 index 220c2d77420c..000000000000 --- a/lib/routes/iwara/templates/subscriptions.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ each images image }} -
    -{{ /each }} diff --git a/lib/routes/iwara/templates/subscriptions.tsx b/lib/routes/iwara/templates/subscriptions.tsx new file mode 100644 index 000000000000..3f13eae6847a --- /dev/null +++ b/lib/routes/iwara/templates/subscriptions.tsx @@ -0,0 +1,16 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +export const renderSubscriptionImages = (images: Array) => { + const filteredImages = images.filter(Boolean); + + return renderToString( + <> + {filteredImages.map((image) => ( + <> + +
    + + ))} + + ); +}; diff --git a/lib/routes/ixigua/templates/userVideo.art b/lib/routes/ixigua/templates/userVideo.art deleted file mode 100644 index fb0830b0c770..000000000000 --- a/lib/routes/ixigua/templates/userVideo.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ if !disableEmbed }} -
    -{{ /if }} -

    {{ i.abstract }}

    - diff --git a/lib/routes/ixigua/user-video.ts b/lib/routes/ixigua/user-video.tsx similarity index 76% rename from lib/routes/ixigua/user-video.ts rename to lib/routes/ixigua/user-video.tsx index 86af9560fde1..6e87671c00b4 100644 --- a/lib/routes/ixigua/user-video.ts +++ b/lib/routes/ixigua/user-video.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const host = 'https://www.ixigua.com'; @@ -63,13 +61,23 @@ async function handler(ctx) { description: userInfo.introduce, item: videoInfos.map((i) => ({ title: i.title, - description: art(path.join(__dirname, 'templates/userVideo.art'), { - i, - disableEmbed, - }), + description: renderToString(), link: `${host}/${i.groupId}`, pubDate: parseDate(i.publishTime * 1000), author: userInfo.name, })), }; } + +const IxiguaVideoDescription = ({ i, disableEmbed }: { i: any; disableEmbed?: string }) => ( + <> + {disableEmbed ? null : ( + <> + +
    + + )} + +

    {i.abstract}

    + +); diff --git a/lib/routes/jandan/templates/description.art b/lib/routes/jandan/templates/description.art deleted file mode 100644 index fd8506592c8a..000000000000 --- a/lib/routes/jandan/templates/description.art +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    {{ summary }}

    -
    - \ No newline at end of file diff --git a/lib/routes/jandan/templates/description.tsx b/lib/routes/jandan/templates/description.tsx new file mode 100644 index 000000000000..c51018f703a4 --- /dev/null +++ b/lib/routes/jandan/templates/description.tsx @@ -0,0 +1,17 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + summary?: string; + image?: string; +}; + +const JandanDescription = ({ summary, image }: DescriptionData) => ( + <> +
    +

    {summary}

    +
    + + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/japanpost/templates/track_item_desc.art b/lib/routes/japanpost/templates/track_item_desc.art deleted file mode 100644 index 4b44d5d8078f..000000000000 --- a/lib/routes/japanpost/templates/track_item_desc.art +++ /dev/null @@ -1,14 +0,0 @@ -{{ packageStatus }}
    -{{ if packageTrackRecord }}{{ packageTrackRecord }}
    {{ /if }} -{{ if packageOfficeZipCode }}{{ packageOfficeZipCode }} {{ /if }}{{ if packageOffice }}{{ packageOffice }} {{ /if }}{{ packageRegion }} -{{ if index === 0 }} - {{ if officeItemList }} -
    - {{ each officeItemList }} -
    {{ $value.officeType }} {{@ $value.officeName }} {{ $value.officeTel }} - {{ /each }} - {{ /if }} - {{ if packageService }} -
    {{ serviceText }}{{ packageService }} - {{ /if }} -{{ /if }} diff --git a/lib/routes/japanpost/track.ts b/lib/routes/japanpost/track.tsx similarity index 67% rename from lib/routes/japanpost/track.ts rename to lib/routes/japanpost/track.tsx index 0022fcfa3da9..1ff9bea15700 100644 --- a/lib/routes/japanpost/track.ts +++ b/lib/routes/japanpost/track.tsx @@ -1,9 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import got from '@/utils/got'; -import { art } from '@/utils/render'; import utils from './utils'; @@ -77,17 +76,43 @@ export async function track(ctx) { const packageOfficeZipCode = listOdd.eq(index).find('td').eq(0).text().trim(); const itemTitle = `${packageStatus} ${packageOffice} ${packageRegion}`; const packageTrackRecord = itemTd.eq(2).text().trim(); - const itemDescription = art(path.join(__dirname, 'templates/track_item_desc.art'), { - packageStatus, - packageTrackRecord, - packageOfficeZipCode, - packageOffice, - packageRegion, - index, - officeItemList, - serviceText, - packageService, - }); + const itemDescription = renderToString( + <> + {packageStatus} +
    + {packageTrackRecord ? ( + <> + {packageTrackRecord} +
    + + ) : null} + {packageOfficeZipCode ? `${packageOfficeZipCode} ` : ''} + {packageOffice ? `${packageOffice} ` : ''} + {packageRegion} + {index === 0 ? ( + <> + {officeItemList?.length ? ( + <> +
    + {officeItemList.map((officeItem) => ( + <> +
    + {officeItem.officeType} {raw(officeItem.officeName)} {officeItem.officeTel} + + ))} + + ) : null} + {packageService ? ( + <> +
    + {serviceText} + {packageService} + + ) : null} + + ) : null} + + ); const itemPubDateText = itemTd.eq(0).text().trim(); const itemGuid = utils.generateGuid(reqCode + itemTitle + itemDescription + itemPubDateText); diff --git a/lib/routes/javbus/index.ts b/lib/routes/javbus/index.tsx similarity index 84% rename from lib/routes/javbus/index.ts rename to lib/routes/javbus/index.tsx index 2e03ee19636b..2ad8068766bb 100644 --- a/lib/routes/javbus/index.ts +++ b/lib/routes/javbus/index.tsx @@ -1,6 +1,6 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; @@ -10,13 +10,49 @@ import cache from '@/utils/cache'; import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const toSize = (raw) => { const matches = raw.match(/(\d+(\.\d+)?)(\w+)/); return matches[3] === 'GB' ? matches[1] * 1024 : matches[1]; }; +const renderDescription = ({ info, videoSrc, videoPreview, magnets, thumbs }) => + renderToString( + <> + {info ? raw(info) : null} +
    + {videoSrc ? 觀看完整影片 : null} +
    + {videoPreview ? ( + + ) : null} +
    +

    磁力連結投稿

    + + + + + + + {magnets?.map((magnet) => ( + + + + + + ))} +
    磁力名稱檔案大小分享日期
    + {magnet.title} + {magnet.size}{magnet.date}
    +

    樣品圖像

    + {thumbs?.map((thumb) => ( + + ))} + + ); + const allowDomain = new Set(['javbus.com', 'javbus.org', 'javsee.icu', 'javsee.one']); export const route: Route = { @@ -188,7 +224,7 @@ async function handler(ctx) { item.author = cacheIn.author; item.title = cacheIn.title; item.category = cacheIn.category; - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ info: cacheIn.info, thumbs: cacheIn.thumbs, magnets, diff --git a/lib/routes/javbus/templates/description.art b/lib/routes/javbus/templates/description.art deleted file mode 100644 index 8f05fc28ba3a..000000000000 --- a/lib/routes/javbus/templates/description.art +++ /dev/null @@ -1,29 +0,0 @@ -{{@ info }} -
    -{{if videoSrc}} -觀看完整影片 -{{ /if }} -
    -{{if videoPreview}} - -{{/if}} -
    -

    磁力連結投稿

    - - - - - - -{{each magnets magnet}} - - - - - -{{/each}} -
    磁力名稱檔案大小分享日期
    {{ magnet.title }}{{ magnet.size }}{{ magnet.date }}
    -

    樣品圖像

    -{{each thumbs}} - -{{/each}} \ No newline at end of file diff --git a/lib/routes/javlibrary/templates/description.art b/lib/routes/javlibrary/templates/description.art deleted file mode 100644 index dfd46e4a7c2c..000000000000 --- a/lib/routes/javlibrary/templates/description.art +++ /dev/null @@ -1,17 +0,0 @@ - - -{{@ info }} - -{{if comment}} -
    -{{@ comment }} -
    -{{/if}} - -{{each videos}} - -{{/each}} - -{{each thumbs}} - -{{/each}} \ No newline at end of file diff --git a/lib/routes/javlibrary/utils.ts b/lib/routes/javlibrary/utils.tsx similarity index 79% rename from lib/routes/javlibrary/utils.ts rename to lib/routes/javlibrary/utils.tsx index fbd5d8a7669d..e95f7ade665e 100644 --- a/lib/routes/javlibrary/utils.ts +++ b/lib/routes/javlibrary/utils.tsx @@ -1,16 +1,37 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const rootUrl = 'https://www.javlibrary.com'; const defaultMode = '1'; const defaultGenre = 'amjq'; const defaultMaker = 'arlq'; const defaultLanguage = 'ja'; +const renderDescription = ({ cover, info, comment, videos, thumbs }) => + renderToString( + <> + + {info ? <>{raw(info)} : null} + {comment ? ( + <> +
    + {raw(comment)} +
    + + ) : null} + {videos?.length + ? videos.map((video) => ( + + )) + : null} + {thumbs?.length ? thumbs.map((thumb) => ) : null} + + ); const ProcessItems = async (language, currentUrl, tryGet) => { const response = await got({ method: 'get', @@ -67,7 +88,7 @@ const ProcessItems = async (language, currentUrl, tryGet) => { .toArray() .map((tag) => content(tag).text()) .filter((tag) => tag !== ''); - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ cover: content('#video_jacket_img').attr('src'), info: content('#video_info').html().replaceAll('span>'), diff --git a/lib/routes/javtiful/templates/description.art b/lib/routes/javtiful/templates/description.art deleted file mode 100644 index 393036a449aa..000000000000 --- a/lib/routes/javtiful/templates/description.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if previewVideo }} - -{{else if poster}} - -{{ /if }} diff --git a/lib/routes/javtiful/utils.ts b/lib/routes/javtiful/utils.ts deleted file mode 100644 index 01c1ec4dd6b1..000000000000 --- a/lib/routes/javtiful/utils.ts +++ /dev/null @@ -1,16 +0,0 @@ -import path from 'node:path'; - -import { parseRelativeDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; - -const renderDescription = (data) => art(path.join(__dirname, 'templates/description.art'), data); - -export const parseItems = (e) => ({ - title: e.find('a > img').attr('alt')!, - link: e.find('a').attr('href')!, - description: renderDescription({ - poster: e.find('a > img').data('src'), - previewVideo: e.find('a > span').data('trailer'), - }), - pubDate: parseRelativeDate(e.find('.video-addtime').text()), -}); diff --git a/lib/routes/javtiful/utils.tsx b/lib/routes/javtiful/utils.tsx new file mode 100644 index 000000000000..52353e4f53bf --- /dev/null +++ b/lib/routes/javtiful/utils.tsx @@ -0,0 +1,26 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +import { parseRelativeDate } from '@/utils/parse-date'; + +const renderDescription = (data): string => + renderToString( + <> + {data.previewVideo ? ( + + ) : data.poster ? ( + + ) : null} + + ); + +export const parseItems = (e) => ({ + title: e.find('a > img').attr('alt')!, + link: e.find('a').attr('href')!, + description: renderDescription({ + poster: e.find('a > img').data('src'), + previewVideo: e.find('a > span').data('trailer'), + }), + pubDate: parseRelativeDate(e.find('.video-addtime').text()), +}); diff --git a/lib/routes/javtrailers/templates/description.art b/lib/routes/javtrailers/templates/description.art deleted file mode 100644 index 36b47a10240a..000000000000 --- a/lib/routes/javtrailers/templates/description.art +++ /dev/null @@ -1,31 +0,0 @@ -{{ if videoInfo.image }} -
    -{{ /if }} - -{{ if videoInfo.dvdId }}DVD ID: {{ videoInfo.dvdId }}
    {{ /if }} -{{ if videoInfo.contentId }}Content ID: {{ videoInfo.contentId }}
    {{ /if }} -{{ if videoInfo.releaseDate }}Release Date: {{ videoInfo.releaseDate }}
    {{ /if }} -{{ if videoInfo.duration }}Duration: {{ videoInfo.duration }} mins
    {{ /if }} -{{ if videoInfo.director }}Director: {{ videoInfo.director }} {{ videoInfo.jpDirector }}
    {{ /if }} -{{ if videoInfo.studio }}Studio: {{ videoInfo.studio.name }}
    {{ /if }} -{{ if videoInfo.categories }} - Categories: - {{ each videoInfo.categories c }} - {{ c.name }}, - {{ /each }} -
    -{{ /if }} -{{ if videoInfo.casts }} - Cast(s): - {{ each videoInfo.casts c }} - {{ c.name }} {{ c.jpName }} - {{ /each }} -
    -{{ /if }} - - -{{ if videoInfo.gallery }} - {{ each videoInfo.gallery g }} -
    - {{ /each }} -{{ /if }} diff --git a/lib/routes/javtrailers/templates/description.tsx b/lib/routes/javtrailers/templates/description.tsx new file mode 100644 index 000000000000..0f38ebf00bda --- /dev/null +++ b/lib/routes/javtrailers/templates/description.tsx @@ -0,0 +1,78 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +export const renderDescription = (videoInfo) => + renderToString( + <> + {videoInfo.image ? ( + <> + +
    + + ) : null} + {videoInfo.dvdId ? ( + <> + DVD ID: {videoInfo.dvdId} +
    + + ) : null} + {videoInfo.contentId ? ( + <> + Content ID: {videoInfo.contentId} +
    + + ) : null} + {videoInfo.releaseDate ? ( + <> + Release Date: {videoInfo.releaseDate} +
    + + ) : null} + {videoInfo.duration ? ( + <> + Duration: {videoInfo.duration} mins +
    + + ) : null} + {videoInfo.director ? ( + <> + Director: {videoInfo.director} {videoInfo.jpDirector} +
    + + ) : null} + {videoInfo.studio ? ( + <> + Studio: {videoInfo.studio.name} +
    + + ) : null} + {videoInfo.categories?.length ? ( + <> + Categories: + {videoInfo.categories.map((category) => ( + <> {category.name}, + ))} +
    + + ) : null} + {videoInfo.casts?.length ? ( + <> + Cast(s): + {videoInfo.casts.map((cast) => ( + <> + {' '} + {cast.name} {cast.jpName} + + ))} +
    + + ) : null} + {videoInfo.gallery?.length + ? videoInfo.gallery.map((image) => ( + <> + +
    + + )) + : null} + + ); diff --git a/lib/routes/javtrailers/utils.ts b/lib/routes/javtrailers/utils.ts index 528302622250..a33b73ef7fe2 100644 --- a/lib/routes/javtrailers/utils.ts +++ b/lib/routes/javtrailers/utils.ts @@ -1,9 +1,7 @@ -import path from 'node:path'; - import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; +import { renderDescription } from './templates/description'; import type { Video } from './types'; export const baseUrl = 'https://javtrailers.com'; @@ -37,9 +35,7 @@ export const getItem = async (item) => { const videoInfo: Video = response.video; videoInfo.gallery = hdGallery(videoInfo.gallery); - item.description = art(path.join(__dirname, 'templates/description.art'), { - videoInfo, - }); + item.description = renderDescription(videoInfo); item.author = videoInfo.casts.map((cast) => `${cast.name} ${cast.jpName}`).join(', '); item.category = videoInfo.categories.map((category) => `${category.name}/${category.jpName}/${category.zhName}`); diff --git a/lib/routes/jd/price.ts b/lib/routes/jd/price.tsx similarity index 74% rename from lib/routes/jd/price.ts rename to lib/routes/jd/price.tsx index aab4545cfedb..7c8a3d62aef3 100644 --- a/lib/routes/jd/price.ts +++ b/lib/routes/jd/price.tsx @@ -1,8 +1,7 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; export const route: Route = { path: '/price/:id', @@ -54,11 +53,19 @@ async function handler(ctx) { guid: data.p, title: data.p, link: currentUrl, - description: art(path.join(__dirname, 'templates/description.art'), { - p: data.p, - op: data.op, - m: data.m, - }), + description: renderToString( + <> +

    + 目前价格:{data.p} +

    +

    + 指导价:{data.op} +

    +

    + 最高价:{data.m} +

    + + ), }, ], }; diff --git a/lib/routes/jd/templates/description.art b/lib/routes/jd/templates/description.art deleted file mode 100644 index a99951bbde92..000000000000 --- a/lib/routes/jd/templates/description.art +++ /dev/null @@ -1,3 +0,0 @@ -

    目前价格:{{ p }}

    -

    指导价:{{ op }}

    -

    最高价:{{ m }}

    \ No newline at end of file diff --git a/lib/routes/jiemian/common.ts b/lib/routes/jiemian/common.tsx similarity index 76% rename from lib/routes/jiemian/common.ts rename to lib/routes/jiemian/common.tsx index d34a0208cb10..bb18d2540cdd 100644 --- a/lib/routes/jiemian/common.ts +++ b/lib/routes/jiemian/common.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const handler = async (ctx): Promise => { const { category = '' } = ctx.req.param(); @@ -46,7 +45,7 @@ export const handler = async (ctx): Promise => { const video = content('#video-player').first(); item.title = content('div.article-header h1').eq(0).text(); - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ image: image ? { src: image.prop('src'), @@ -100,3 +99,38 @@ export const handler = async (ctx): Promise => { author: titleSplits.pop(), }; }; + +const renderDescription = ({ + image, + intro, + video, + description, +}: { + image?: { src?: string; alt?: string; width?: string; height?: string }; + intro?: string; + video?: { src?: string; poster?: string; type?: string }; + description?: string; +}): string => { + const imageAlt = image?.height ?? image?.width ?? image?.alt; + const videoPoster = video?.poster ?? image?.src; + + return renderToString( + <> + {!video?.src && image?.src ? ( +
    + {imageAlt} +
    + ) : null} + {intro ?

    {intro}

    : null} + {video?.src ? ( + + ) : null} + {description ? <>{raw(description)} : null} + + ); +}; diff --git a/lib/routes/jiemian/templates/description.art b/lib/routes/jiemian/templates/description.art deleted file mode 100644 index 83b5eb0b7f69..000000000000 --- a/lib/routes/jiemian/templates/description.art +++ /dev/null @@ -1,39 +0,0 @@ -{{ if !video?.src && image?.src }} -
    - {{ image.alt }} -
    -{{ /if }} - -{{ if intro }} -

    {{ intro }}

    -{{ /if }} - -{{ if video?.src }} - -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/jimmyspa/books.ts b/lib/routes/jimmyspa/books.ts index eece3e8e7133..b0476a6311d0 100644 --- a/lib/routes/jimmyspa/books.ts +++ b/lib/routes/jimmyspa/books.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; @@ -7,7 +5,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/books/:language', @@ -74,7 +73,7 @@ async function handler(ctx) { const publishDateMatch = bookInfoWrap.match(/(首次出版|First Published|初版)<\/span>\s*([^<]+)<\/span>/); const publishDate = publishDateMatch ? parseDate(publishDateMatch[2] + '-02') : ''; - const renderedDescription = art(path.join(__dirname, 'templates/description.art'), { + const renderedDescription = renderDescription({ images: bookImageUrl ? [ { diff --git a/lib/routes/jimmyspa/news.ts b/lib/routes/jimmyspa/news.ts index 40c22f409a7a..4022a1c9e7bd 100644 --- a/lib/routes/jimmyspa/news.ts +++ b/lib/routes/jimmyspa/news.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import { ViewType } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/news/:language', @@ -60,7 +59,7 @@ async function handler(ctx) { const itemdate = $$('a.news_card div.date').html() || ''; const pubDate = convertHtmlDateToStandardFormat(itemdate.toString()); - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ images: image ? [ { diff --git a/lib/routes/jimmyspa/templates/description.art b/lib/routes/jimmyspa/templates/description.art deleted file mode 100644 index dfab19230c11..000000000000 --- a/lib/routes/jimmyspa/templates/description.art +++ /dev/null @@ -1,17 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/jimmyspa/templates/description.tsx b/lib/routes/jimmyspa/templates/description.tsx new file mode 100644 index 000000000000..528e99d13356 --- /dev/null +++ b/lib/routes/jimmyspa/templates/description.tsx @@ -0,0 +1,27 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionProps = { + images?: DescriptionImage[]; + description?: string; +}; + +const Description = ({ images, description }: DescriptionProps) => ( + <> + {images?.map((image, index) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + )} + {description ? <>{raw(description)} : null} + +); + +export const renderDescription = (props: DescriptionProps): string => renderToString(); diff --git a/lib/routes/jin10/category.ts b/lib/routes/jin10/category.ts index fa77035b47f0..780485c514e4 100644 --- a/lib/routes/jin10/category.ts +++ b/lib/routes/jin10/category.ts @@ -1,14 +1,13 @@ -import path from 'node:path'; - import { config } from '@/config'; import type { Route } from '@/types'; import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + export const route: Route = { path: '/category/:id', categories: ['finance'], @@ -205,10 +204,7 @@ async function handler(ctx) { return { title, - description: art(path.join(__dirname, 'templates/description.art'), { - content, - pic: item.data.pic, - }), + description: renderDescription(content, item.data.pic), pubDate: timezone(parseDate(item.time), 8), guid: `jin10:category:${item.id}`, }; diff --git a/lib/routes/jin10/index.ts b/lib/routes/jin10/index.ts index af613ec2179d..d4fa8cbd92be 100644 --- a/lib/routes/jin10/index.ts +++ b/lib/routes/jin10/index.ts @@ -1,14 +1,13 @@ -import path from 'node:path'; - import { config } from '@/config'; import type { Route } from '@/types'; import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + export const route: Route = { path: '/:important?', categories: ['finance'], @@ -69,10 +68,7 @@ async function handler(ctx) { return { title, - description: art(path.join(__dirname, 'templates/description.art'), { - content, - pic: item.data.pic, - }), + description: renderDescription(content, item.data.pic), pubDate: timezone(parseDate(item.time), 8), link: item.data.link, guid: `jin10:index:${item.id}`, diff --git a/lib/routes/jin10/templates/description.art b/lib/routes/jin10/templates/description.art deleted file mode 100644 index 9ab6a3596d69..000000000000 --- a/lib/routes/jin10/templates/description.art +++ /dev/null @@ -1,2 +0,0 @@ -{{ if content }}{{@ content }}{{ /if }} -{{ if pic }}
    {{ /if }} diff --git a/lib/routes/jin10/templates/description.tsx b/lib/routes/jin10/templates/description.tsx new file mode 100644 index 000000000000..42f45fff5a70 --- /dev/null +++ b/lib/routes/jin10/templates/description.tsx @@ -0,0 +1,15 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +export const renderDescription = (content?: string, pic?: string) => + renderToString( + <> + {content ? <>{raw(content)} : null} + {pic ? ( + <> +
    + + + ) : null} + + ); diff --git a/lib/routes/jinse/catalogue.ts b/lib/routes/jinse/catalogue.ts index 166fceca3d4a..587e5d836e3c 100644 --- a/lib/routes/jinse/catalogue.ts +++ b/lib/routes/jinse/catalogue.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const categories = { zhengce: '政策', @@ -66,7 +65,7 @@ async function handler(ctx) { let items = response.list.slice(0, limit).map((item) => ({ title: item.title, link: item.extra.topic_url, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ images: item.extra.thumbnails_pics.length > 0 ? item.extra.thumbnails_pics.map((p) => ({ @@ -94,7 +93,7 @@ async function handler(ctx) { const content = load(detailResponse); - item.description += art(path.join(__dirname, 'templates/description.art'), { + item.description += renderDescription({ description: content('section.js-article-content').html() || content('div.js-article').html(), }); item.category = content('section.js-article-tag_state_1 a span') diff --git a/lib/routes/jinse/lives.ts b/lib/routes/jinse/lives.ts index a6dc2ad13489..7390ab1887fa 100644 --- a/lib/routes/jinse/lives.ts +++ b/lib/routes/jinse/lives.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import { ViewType } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const categories = { 0: '全部', @@ -72,7 +71,7 @@ async function handler(ctx) { .map((item) => ({ title: item.content_prefix, link: new URL(`lives/${item.id}.html`, rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ images: item.images?.map((i) => ({ src: i.url.replace(/_[^\W_]+(\.\w+)$/, '_true$1'), diff --git a/lib/routes/jinse/templates/description.art b/lib/routes/jinse/templates/description.art deleted file mode 100644 index 210b63ad2dde..000000000000 --- a/lib/routes/jinse/templates/description.art +++ /dev/null @@ -1,34 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} - -{{ if original?.link }} -

    - {{ original.name }}: - {{ original.link }} -

    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/jinse/templates/description.tsx b/lib/routes/jinse/templates/description.tsx new file mode 100644 index 000000000000..9d8593e89810 --- /dev/null +++ b/lib/routes/jinse/templates/description.tsx @@ -0,0 +1,44 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; + width?: string | number; + height?: string | number; +}; + +type DescriptionData = { + images?: DescriptionImage[]; + intro?: string; + description?: string; + original?: { + name?: string; + link?: string; + }; +}; + +const JinseDescription = ({ images, intro, description, original }: DescriptionData) => ( + <> + {images?.map((image) => { + if (!image?.src) { + return null; + } + const altValue = image.height ?? image.width ?? image.alt; + return ( +
    + {altValue +
    + ); + })} + {intro ?
    {intro}
    : null} + {description ? raw(description) : null} + {original?.link ? ( +

    + {original.name}: {original.link} +

    + ) : null} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/jinse/timeline.ts b/lib/routes/jinse/timeline.ts index 9fcaf070c9e2..7be784bb20e8 100644 --- a/lib/routes/jinse/timeline.ts +++ b/lib/routes/jinse/timeline.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; @@ -7,7 +5,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/timeline/:category?', @@ -77,7 +76,7 @@ async function handler(ctx) { return { title: item.title, link: item.jump_url, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ images: item.cover ? [ { @@ -109,7 +108,7 @@ async function handler(ctx) { const content = load(detailResponse); - item.description += art(path.join(__dirname, 'templates/description.art'), { + item.description += renderDescription({ description: content('section.js-article-content').html() || content('div.js-article').html(), }); item.category = content('section.js-article-tag_state_1 a span') diff --git a/lib/routes/jiuyangongshe/community.ts b/lib/routes/jiuyangongshe/community.tsx similarity index 91% rename from lib/routes/jiuyangongshe/community.ts rename to lib/routes/jiuyangongshe/community.tsx index aaed2a28d844..c8dbc44a19ea 100644 --- a/lib/routes/jiuyangongshe/community.ts +++ b/lib/routes/jiuyangongshe/community.tsx @@ -1,13 +1,11 @@ -import path from 'node:path'; - import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, Route } from '@/types'; import { ViewType } from '@/types'; import md5 from '@/utils/md5'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; interface User { @@ -93,7 +91,18 @@ interface Community { serverTime: number; } -const render = (data) => art(path.join(__dirname, 'templates/community-description.art'), data); +const render = (data) => + renderToString( + <> + {data.cover ? ( + <> + +
    + + ) : null} + {data.content} + + ); export const route: Route = { path: '/community', diff --git a/lib/routes/jiuyangongshe/templates/community-description.art b/lib/routes/jiuyangongshe/templates/community-description.art deleted file mode 100644 index 6059320b5122..000000000000 --- a/lib/routes/jiuyangongshe/templates/community-description.art +++ /dev/null @@ -1,4 +0,0 @@ -{{ if cover }} -
    -{{ /if }} -{{ content }} diff --git a/lib/routes/jjwxc/author.ts b/lib/routes/jjwxc/author.tsx similarity index 64% rename from lib/routes/jjwxc/author.ts rename to lib/routes/jjwxc/author.tsx index 161715711e5e..b2f6053bc901 100644 --- a/lib/routes/jjwxc/author.ts +++ b/lib/routes/jjwxc/author.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import iconv from 'iconv-lite'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -56,13 +54,38 @@ async function handler(ctx) { { title, link: bookUrl, - description: art(path.join(__dirname, 'templates/author.art'), { - bookName, - bookUrl, - bookStatus, - bookWords, - bookUpdatedTime, - }), + description: renderToString( + + + {bookName ? ( + + + + + ) : null} + {bookStatus ? ( + + + + + ) : null} + {bookWords ? ( + + + + + ) : null} + {bookUpdatedTime ? ( + + + + + ) : null} + +
    最近更新作品 + {bookName} +
    作品状态{bookStatus}
    作品字数{bookWords}
    最后更新时间{bookUpdatedTime}
    + ), author, category: [bookStatus], guid: `jjwxc-${id}-${bookId}#${bookWords}`, diff --git a/lib/routes/jjwxc/book.ts b/lib/routes/jjwxc/book.ts index 0e3b76fb0d16..61d781b0c358 100644 --- a/lib/routes/jjwxc/book.ts +++ b/lib/routes/jjwxc/book.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import iconv from 'iconv-lite'; @@ -8,9 +6,10 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderBookDescription } from './templates/book'; + export const route: Route = { path: '/book/:id?', categories: ['reading'], @@ -69,7 +68,7 @@ async function handler(ctx) { return { title: `${chapterName} ${chapterIntro}`, link: chapterUrl, - description: art(path.join(__dirname, 'templates/book.art'), { + description: renderBookDescription({ chapterId, chapterName, chapterIntro, @@ -103,8 +102,8 @@ async function handler(ctx) { content('span.favorite_novel').parent().remove(); - item.description += art(path.join(__dirname, 'templates/book.art'), { - description: content('div.novelbody').html(), + item.description += renderBookDescription({ + description: content('div.novelbody').html() || undefined, }); } diff --git a/lib/routes/jjwxc/templates/author.art b/lib/routes/jjwxc/templates/author.art deleted file mode 100644 index ae5a659c1d34..000000000000 --- a/lib/routes/jjwxc/templates/author.art +++ /dev/null @@ -1,28 +0,0 @@ - - - {{ if bookName }} - - - - - {{ /if }} - {{ if bookStatus }} - - - - - {{ /if }} - {{ if bookWords }} - - - - - {{ /if }} - {{ if bookUpdatedTime }} - - - - - {{ /if }} - -
    最近更新作品{{ bookName }}
    作品状态{{ bookStatus }}
    作品字数{{ bookWords }}
    最后更新时间{{ bookUpdatedTime }}
    \ No newline at end of file diff --git a/lib/routes/jjwxc/templates/book.art b/lib/routes/jjwxc/templates/book.art deleted file mode 100644 index 5938bd37d09b..000000000000 --- a/lib/routes/jjwxc/templates/book.art +++ /dev/null @@ -1,44 +0,0 @@ -{{ if description }} - {{@ description }} -{{ else }} - - - {{ if chapterId }} - - - - - {{ /if }} - {{ if chapterName }} - - - - - {{ /if }} - {{ if chapterIntro }} - - - - - {{ /if }} - {{ if chapterWords }} - - - - - {{ /if }} - {{ if chapterClicks }} - - - - - {{ /if }} - {{ if chapterUpdatedTime }} - - - - - {{ /if }} - -
    章节{{ chapterId }}
    标题{{ chapterName }}
    内容提要{{ chapterIntro }}
    字数{{ chapterWords }}
    点击{{ chapterClicks }}
    更新时间{{ chapterUpdatedTime }}
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/jjwxc/templates/book.tsx b/lib/routes/jjwxc/templates/book.tsx new file mode 100644 index 000000000000..93cddb1b7741 --- /dev/null +++ b/lib/routes/jjwxc/templates/book.tsx @@ -0,0 +1,67 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type BookDescriptionProps = { + description?: string; + chapterId?: string; + chapterName?: string; + chapterIntro?: string; + chapterUrl?: string; + chapterWords?: string; + chapterClicks?: string; + chapterUpdatedTime?: string; +}; + +export const renderBookDescription = ({ description, chapterId, chapterName, chapterIntro, chapterUrl, chapterWords, chapterClicks, chapterUpdatedTime }: BookDescriptionProps): string => + renderToString( + description ? ( + <>{raw(description)} + ) : ( + + + {chapterId ? ( + + + + + ) : null} + {chapterName ? ( + + + + + ) : null} + {chapterIntro ? ( + + + + + ) : null} + {chapterWords ? ( + + + + + ) : null} + {chapterClicks ? ( + + + + + ) : null} + {chapterUpdatedTime ? ( + + + + + ) : null} + +
    章节 + {chapterId} +
    标题 + {chapterName} +
    内容提要 + {chapterIntro} +
    字数{chapterWords}
    点击{chapterClicks}
    更新时间{chapterUpdatedTime}
    + ) + ); diff --git a/lib/routes/joins/chinese.ts b/lib/routes/joins/chinese.tsx similarity index 91% rename from lib/routes/joins/chinese.ts rename to lib/routes/joins/chinese.tsx index 330250502edf..745af34c87bb 100644 --- a/lib/routes/joins/chinese.ts +++ b/lib/routes/joins/chinese.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const handler = async (ctx) => { @@ -48,23 +47,25 @@ export const handler = async (ctx) => { $$('div.view-copyright, div.ad-template, div.view-editors, div.tag-group').remove(); const title = $$('div.article-head-title, div.viewer-titles').text(); - const description = art(path.join(__dirname, 'templates/description.art'), { - images: - $$('div.photo-box').length === 0 - ? undefined + const description = renderToString( + <> + {$$('div.photo-box').length === 0 + ? null : $$('div.photo-box') .toArray() .map((i) => { const image = $$(i).find('img'); - - return image.prop('src') - ? { - src: image.prop('src'), - } - : undefined; - }), - description: $$('div#article-view-content-div').html(), - }); + const src = image.prop('src'); + + return src ? ( +
    + +
    + ) : null; + })} + {$$('div#article-view-content-div').html() ? raw($$('div#article-view-content-div').html()) : null} + + ); const image = $$('meta[property="og:image"]').prop('content'); item.title = title; diff --git a/lib/routes/joins/templates/description.art b/lib/routes/joins/templates/description.art deleted file mode 100644 index e8cc00cbc2cc..000000000000 --- a/lib/routes/joins/templates/description.art +++ /dev/null @@ -1,17 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} diff --git a/lib/routes/joneslanglasalle/index.ts b/lib/routes/joneslanglasalle/index.ts index 21278824b62f..f08770056b61 100644 --- a/lib/routes/joneslanglasalle/index.ts +++ b/lib/routes/joneslanglasalle/index.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const cleanHtml = (html: string, preservedTags: string[]): string => { const $ = load(html); @@ -54,7 +53,7 @@ export const handler = async (ctx: Context): Promise => { const title: string = $item.text(); const link: string | undefined = aEl.prop('href'); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ intro: aEl.find('p.ti-teaser').text(), }); @@ -109,7 +108,7 @@ export const handler = async (ctx: Context): Promise => { if (src) { $$el.replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ images: [ { src, @@ -139,7 +138,7 @@ export const handler = async (ctx: Context): Promise => { }) .filter((link): link is { url: string; type: string; content_html: string } => true); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ description: cleanHtml($$('div.page-section').eq(1).html() ?? $$('div.copy-block').html() ?? '', ['div.richtext p', 'h3', 'h4', 'h5', 'h6', 'figure', 'img', 'ul', 'li', 'span', 'b']), }); diff --git a/lib/routes/joneslanglasalle/templates/description.art b/lib/routes/joneslanglasalle/templates/description.art deleted file mode 100644 index aced21ab986b..000000000000 --- a/lib/routes/joneslanglasalle/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if !videos?.[0]?.src && image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/joneslanglasalle/templates/description.tsx b/lib/routes/joneslanglasalle/templates/description.tsx new file mode 100644 index 000000000000..7a40f8331d6c --- /dev/null +++ b/lib/routes/joneslanglasalle/templates/description.tsx @@ -0,0 +1,27 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionVideo = { + src?: string; +}; + +type DescriptionData = { + images?: DescriptionImage[]; + videos?: DescriptionVideo[]; + intro?: string; + description?: string; +}; + +export const renderDescription = ({ images, videos, intro, description }: DescriptionData) => + renderToString( + <> + {images?.length ? images.map((image) => (!videos?.[0]?.src && image?.src ?
    {image.alt ? {image.alt} : }
    : null)) : null} + {intro ?
    {intro}
    : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/jpxgmn/templates/description.art b/lib/routes/jpxgmn/templates/description.art deleted file mode 100644 index f60deb835606..000000000000 --- a/lib/routes/jpxgmn/templates/description.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ each images }} - -{{ /each }} diff --git a/lib/routes/jpxgmn/utils.ts b/lib/routes/jpxgmn/utils.tsx similarity index 83% rename from lib/routes/jpxgmn/utils.ts rename to lib/routes/jpxgmn/utils.tsx index 97e370faf5e2..0eee6553ed91 100644 --- a/lib/routes/jpxgmn/utils.ts +++ b/lib/routes/jpxgmn/utils.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const indexUrl = 'http://mei8.vip/'; @@ -35,9 +33,14 @@ const getArticleDesc = async (articleUrl) => { return getImages(load(pageResponse.data)); }) ); - return art(path.join(__dirname, 'templates/description.art'), { - images: [...images, ...otherImages.flat()], - }); + const allImages = [...images, ...otherImages.flat()]; + return renderToString( + <> + {allImages.map((src) => ( + + ))} + + ); }; export { getArticleDesc, getOriginUrl }; diff --git a/lib/routes/jump/discount.ts b/lib/routes/jump/discount.tsx similarity index 53% rename from lib/routes/jump/discount.ts rename to lib/routes/jump/discount.tsx index 2622c41a3230..db3f72e7e552 100644 --- a/lib/routes/jump/discount.ts +++ b/lib/routes/jump/discount.tsx @@ -1,8 +1,7 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const discountUrl = 'https://switch.jumpvg.com/jump/discount/find4Discount/5/v2'; // const detailUrl = 'https://switch.jumpvg.com/jump/game/detail'; @@ -50,6 +49,67 @@ const filterName = { dl: '独立', }; +const renderDescription = (item) => + renderToString( +
    + + + + + + + {item.subName ? ( + + + + + ) : null} + + + + + {item.lowestPriceCountry ? ( + + + + + ) : null} + + + + + {item.pubDate ? ( + + + + + ) : null} + + + + + + + + + + + + + + + + + {item.mcScore ? ( + + + + + ) : null} +
    名称{item.name}
    别名{item.subName}
    中文支持{item.chinese}
    史低地区{item.lowestPriceCountry}
    史低{item.isLowest ? '是' : '否'}
    发布日期{item.pubDate}
    当前价格¥{item.price}
    原价¥{item.originPrice}
    折扣地区{item.priceCountry}
    折扣{item.cutOff}%
    metacritic评分{item.mcScore}
    +
    + ); + const getDiscountNum = async (platform) => { const response = await got.get(`https://switch.jumpvg.com/jump/platform/order/v2?needCount=1&needFilter=1&version=3`); const data = response.data.data; @@ -147,7 +207,7 @@ async function handler(ctx) { description: 'jump 发现游戏', item: allDiscountItem.map((item) => ({ title: `${item.name}-${item.cutOff}%-¥${item.price}`, - description: art(path.resolve(__dirname, './templates/discount.art'), { item }), + description: renderDescription(item), link: item.banner, guid: `${platform}-${item.oldGameId}-${item.cutOff}`, // 平台-打折id-打折率 })), diff --git a/lib/routes/jump/templates/discount.art b/lib/routes/jump/templates/discount.art deleted file mode 100644 index 919955209b67..000000000000 --- a/lib/routes/jump/templates/discount.art +++ /dev/null @@ -1,111 +0,0 @@ -
    - - - - - - -{{if item.subName}} - - - - -{{/if}} - - - - -{{if item.lowestPriceCountry}} - - - - -{{/if}} -{{if item.isLowest}} - - - - -{{else}} - - - - -{{/if}} -{{if item.pubDate}} - - - - -{{/if}} - - - - - - - - - - - - - - - - -{{if item.mcScore}} - - - - -{{/if}} - \ No newline at end of file diff --git a/lib/routes/kadokawa/blog.ts b/lib/routes/kadokawa/blog.ts index 33b35ba0445c..a2b95da2ccb7 100644 --- a/lib/routes/kadokawa/blog.ts +++ b/lib/routes/kadokawa/blog.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx) => { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; @@ -28,7 +27,7 @@ export const handler = async (ctx) => { const image = item.find('div.List-item-excerpt img').prop('src')?.split(/\?/)[0] ?? undefined; const title = item.find('h2.List-item-title').text(); - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ images: image ? [ { @@ -66,7 +65,7 @@ export const handler = async (ctx) => { const $$ = load(detailResponse); const title = $$('h1.Post-title').text().trim(); - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ description: $$('div.Post-content').html(), }); const image = $$('meta[property="og:image"]').prop('content')?.split(/\?/)[0] ?? undefined; diff --git a/lib/routes/kadokawa/templates/description.art b/lib/routes/kadokawa/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/kadokawa/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/kadokawa/templates/description.tsx b/lib/routes/kadokawa/templates/description.tsx new file mode 100644 index 000000000000..8168cc41b124 --- /dev/null +++ b/lib/routes/kadokawa/templates/description.tsx @@ -0,0 +1,28 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type Image = { + src?: string; + alt?: string; +}; + +type DescriptionData = { + images?: Image[]; + intro?: string; + description?: string; +}; + +export const renderDescription = ({ images, intro, description }: DescriptionData): string => + renderToString( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + )} + {intro ?
    {intro}
    : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/kamen-rider-official/news.ts b/lib/routes/kamen-rider-official/news.ts index d2222b1c1a1f..20ea40e73482 100644 --- a/lib/routes/kamen-rider-official/news.ts +++ b/lib/routes/kamen-rider-official/news.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/news/:category?', @@ -87,14 +86,14 @@ async function handler(ctx) { let items = response.news_articles.slice(0, limit).map((item) => ({ title: item.list_title, link: new URL(item.path, rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { - image: item.list_image_path + description: renderDescription( + item.list_image_path ? { src: new URL(item.list_image_path, rootUrl).href, alt: item.list_title, } - : undefined, - }), + : undefined + ), author: item.author, category: [item.category_name, item.category_2_name].filter(Boolean), guid: `kamen-rider-official-${item.id}`, @@ -114,10 +113,8 @@ async function handler(ctx) { content('img').each(function () { content(this).replaceWith( - art(path.join(__dirname, 'templates/description.art'), { - image: { - src: content(this).prop('src'), - }, + renderDescription({ + src: content(this).prop('src'), }) ); }); diff --git a/lib/routes/kamen-rider-official/templates/description.art b/lib/routes/kamen-rider-official/templates/description.art deleted file mode 100644 index a56b27f6eda4..000000000000 --- a/lib/routes/kamen-rider-official/templates/description.art +++ /dev/null @@ -1,10 +0,0 @@ -{{ if image }} -
    - {{ image.alt }} -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/kamen-rider-official/templates/description.tsx b/lib/routes/kamen-rider-official/templates/description.tsx new file mode 100644 index 000000000000..461a920eefb6 --- /dev/null +++ b/lib/routes/kamen-rider-official/templates/description.tsx @@ -0,0 +1,17 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +export const renderDescription = (image?: DescriptionImage): string => + renderToString( + <> + {image?.src ? ( +
    + {image.alt +
    + ) : null} + + ); diff --git a/lib/routes/kantarworldpanel/index.ts b/lib/routes/kantarworldpanel/index.tsx similarity index 84% rename from lib/routes/kantarworldpanel/index.ts rename to lib/routes/kantarworldpanel/index.tsx index aea7380b71da..afd41718317d 100644 --- a/lib/routes/kantarworldpanel/index.ts +++ b/lib/routes/kantarworldpanel/index.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/:region?/:category{.+}?', @@ -41,18 +40,21 @@ async function handler(ctx) { let link = a.prop('href'); link = link === '#' ? currentUrl : link; + const description = item.find('p.gowhite').text(); + const imageSrc = image.prop('src'); return { title, link, - description: art(path.join(__dirname, 'templates/description.art'), { - description: item.find('p.gowhite').text(), - image: image.prop('src') - ? { - src: image.prop('src'), - alt: image.prop('alt'), - } - : undefined, - }), + description: renderToString( + <> + {description ? raw(description) : null} + {imageSrc ? ( +
    + +
    + ) : null} + + ), guid: link.startsWith(rootUrl) ? `${link}#${title}` : link, pubDate: parseDate(item.find('p.medGrey').text(), 'DD/MM/YYYY'), }; diff --git a/lib/routes/kantarworldpanel/templates/description.art b/lib/routes/kantarworldpanel/templates/description.art deleted file mode 100644 index 67f879084b82..000000000000 --- a/lib/routes/kantarworldpanel/templates/description.art +++ /dev/null @@ -1,9 +0,0 @@ -{{ if description }} - {{@ description }} -{{ /if }} - -{{ if image }} -
    - -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/kcna/news.ts b/lib/routes/kcna/news.tsx similarity index 87% rename from lib/routes/kcna/news.ts rename to lib/routes/kcna/news.tsx index d56b22ab3d29..6f367206d7b4 100644 --- a/lib/routes/kcna/news.ts +++ b/lib/routes/kcna/news.tsx @@ -1,6 +1,6 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import pMap from 'p-map'; import sanitizeHtml from 'sanitize-html'; @@ -8,7 +8,6 @@ import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; import { fetchPhoto, fetchVideo, fixDesc } from './utils'; @@ -111,7 +110,23 @@ async function handler(ctx) { }) ); - item.description = art(path.join(__dirname, 'templates/news.art'), { description, photo, video }); + item.description = renderToString( + <> + {description ? raw(description) : null} + {photo ? ( + <> +
    + {raw(photo)} + + ) : null} + {video ? ( + <> +
    + {raw(video)} + + ) : null} + + ); return item; }), diff --git a/lib/routes/kcna/templates/news.art b/lib/routes/kcna/templates/news.art deleted file mode 100644 index 28ac97d87345..000000000000 --- a/lib/routes/kcna/templates/news.art +++ /dev/null @@ -1,9 +0,0 @@ -{{@ description }} -{{ if photo }} -
    -{{@ photo }} -{{ /if }} -{{ if video }} -
    -{{@ video }} -{{ /if }} diff --git a/lib/routes/keep/templates/user.art b/lib/routes/keep/templates/user.art deleted file mode 100644 index c5c30c4cfbf7..000000000000 --- a/lib/routes/keep/templates/user.art +++ /dev/null @@ -1,18 +0,0 @@ -项目: -{{ if item.meta.name === item.meta.workoutName }} - {{ item.meta.name }} -{{ else }} - {{ item.meta.name }} - {{ item.meta.workoutName }} -{{ /if }} -
    -时长:{{ minute }}分{{ second }}秒 -{{ if item.content }} -
    - 备注:{{ item.content }} -{{ /if }} -{{ if images }} -
    - {{ each images image }} - - {{ /each }} -{{ /if }} diff --git a/lib/routes/keep/user.ts b/lib/routes/keep/user.tsx similarity index 66% rename from lib/routes/keep/user.ts rename to lib/routes/keep/user.tsx index 9255155fafd7..4341b1092814 100644 --- a/lib/routes/keep/user.ts +++ b/lib/routes/keep/user.tsx @@ -1,8 +1,7 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; export const route: Route = { path: '/user/:id', @@ -57,12 +56,7 @@ async function handler(ctx) { pubDate: item.created, link: `https://show.gotokeep.com/entries/${item.id}`, author: item.author.username, - description: art(path.join(__dirname, 'templates/user.art'), { - item, - minute, - second, - images, - }), + description: renderDescription(item, minute, second, images), }; }) ); @@ -74,3 +68,28 @@ async function handler(ctx) { item: items, }; } + +const renderDescription = (item: any, minute: number, second: number, images: string[]) => renderToString(); + +const KeepDescription = ({ item, minute, second, images }: { item: any; minute: number; second: number; images: string[] }) => ( + <> + 项目: + {item.meta.name === item.meta.workoutName ? item.meta.name : `${item.meta.name} - ${item.meta.workoutName}`} +
    + 时长:{minute}分{second}秒 + {item.content ? ( + <> +
    + 备注:{item.content} + + ) : null} + {images ? ( + <> +
    + {images.map((image) => ( + + ))} + + ) : null} + +); diff --git a/lib/routes/kemono/index.ts b/lib/routes/kemono/index.tsx similarity index 79% rename from lib/routes/kemono/index.ts rename to lib/routes/kemono/index.tsx index 81625c629bbd..e6571ad739a9 100644 --- a/lib/routes/kemono/index.ts +++ b/lib/routes/kemono/index.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { KEMONO_API_URL, KEMONO_ROOT_URL, MIME_TYPE_MAP } from './const'; import type { DiscordMessage, KemonoFile, KemonoPost } from './types'; @@ -191,6 +189,79 @@ function generateEnclosureInfo(htmlContent: string): { enclosure_url?: string; e return enclosureInfo; } +const renderDiscordMessage = (message: DiscordMessage) => + renderToString( + <> + {message.content ?

    {message.content}

    : null} + {message.attachments?.map((attachment) => ( + + ))} + {message.embeds?.map((embed) => { + if (embed.type === 'image') { + return ; + } + if (embed.type === 'link') { + return ( + <> + {embed.thumbnail ? ( + + + + ) : null} + {embed.title} + {embed.description ?

    {embed.description}

    : null} + + ); + } + return null; + })} + + ); + +const renderPostFiles = (post: KemonoPost & { files?: KemonoFile[] }) => + renderToString( + <> + {post.files?.map((file) => { + const extension = file.extension; + const typeSuffix = file.extention ?? ''; + + if (['jpg', 'png', 'webp', 'jpeg', 'jfif'].includes(extension)) { + return ; + } + if (['m4a', 'mp3', 'ogg'].includes(extension)) { + return ( + + ); + } + if (['mp4', 'webm'].includes(extension)) { + return ( + + ); + } + return {file.name}; + })} + {post.embed ? ( + post.embed.type === 'image' ? ( + + ) : post.embed.type === 'link' ? ( + <> + {post.embed.thumbnail ? ( + + + + ) : null} + {post.embed.title} + {post.embed.description ?

    {post.embed.description}

    : null} + + ) : null + ) : null} + + ); + async function processDiscordMessages(channels: any[], limit: number) { const items = await Promise.all( channels.map((channel) => @@ -207,7 +278,7 @@ async function processDiscordMessages(channels: any[], limit: number) { .slice(0, limit) .map((message: DiscordMessage) => ({ title: message.content || 'Discord Message', - description: art(path.join(__dirname, 'templates/discord.art'), { i: message }), + description: renderDiscordMessage(message), author: `${message.author.username}#${message.author.discriminator}`, pubDate: parseDate(message.published), category: channel.name, @@ -262,7 +333,7 @@ function processPosts(posts: KemonoPost[], authorName: string, limit: number) { const files = processPostFiles(post); const postWithFiles = { ...post, files }; - const filesHtml = art(path.join(__dirname, 'templates/source.art'), { i: postWithFiles }); + const filesHtml = renderPostFiles(postWithFiles); let description = post.content ? `
    ${post.content}
    ` : ''; const $ = load(description); diff --git a/lib/routes/kemono/templates/discord.art b/lib/routes/kemono/templates/discord.art deleted file mode 100644 index c7da459b3b7d..000000000000 --- a/lib/routes/kemono/templates/discord.art +++ /dev/null @@ -1,22 +0,0 @@ -{{ if i.content }} -

    {{ i.content }}

    -{{ /if }} - -{{ if i.attachments }} - {{ each i.attachments a }} - - {{ /each }} -{{ /if }} - -{{ if i.embeds }} - {{ each i.embeds e }} - {{ if e.type === 'image' }} - - {{ else if e.type === 'link' }} - {{ if e.thumbnail }} - - {{ /if }} - {{ e.title }}{{ if e.description }}

    {{ e.description }}

    {{ /if }} - {{ /if }} - {{ /each }} -{{ /if }} diff --git a/lib/routes/kemono/templates/source.art b/lib/routes/kemono/templates/source.art deleted file mode 100644 index e96e9049f4a6..000000000000 --- a/lib/routes/kemono/templates/source.art +++ /dev/null @@ -1,24 +0,0 @@ -{{ if i.files }} - {{ each i.files file }} - {{ if file.extension === 'jpg' || file.extension === 'png' || file.extension === 'webp' || file.extension === 'jpeg' || file.extension === 'jfif' }} - - {{ else if file.extension === 'm4a' || file.extension === 'mp3' || file.extension === 'ogg' }} - - {{ else if file.extension === 'mp4' || file.extension === 'webm' }} - - {{ else }} - {{file.name}} - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if i.embed }} - {{ if i.embed.type === 'image' }} - - {{ else if i.embed.type === 'link' }} - {{ if i.embed.thumbnail }} - - {{ /if }} - {{ i.embed.title }}{{ if i.embed.description }}

    {{ i.embed.description }}

    {{ /if }} - {{ /if }} -{{ /if }} diff --git a/lib/routes/kepu/live.ts b/lib/routes/kepu/live.tsx similarity index 75% rename from lib/routes/kepu/live.ts rename to lib/routes/kepu/live.tsx index b18531d8b6e9..19439f70f04b 100644 --- a/lib/routes/kepu/live.ts +++ b/lib/routes/kepu/live.tsx @@ -1,10 +1,9 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -77,18 +76,25 @@ async function handler(ctx) { item.enclosure_type = `video/${item.enclosure_url.split(/\./).pop()}`; } - item.description = art(path.join(__dirname, 'templates/description.art'), { - image: { - src: item.itunes_item_image, - alt: item.title, - }, - video: { - src: item.enclosure_url, - type: item.enclosure_type, - poster: item.itunes_item_image, - }, - description: item.description, - }); + const poster = item.itunes_item_image; + item.description = renderToString( + <> + {item.itunes_item_image ? ( +
    + {item.title} +
    + ) : null} + {item.enclosure_url ? ( + + ) : null} + {item.description ?

    {item.description}

    : null} + + ); return item; }) diff --git a/lib/routes/kepu/templates/description.art b/lib/routes/kepu/templates/description.art deleted file mode 100644 index b07f03ccd4e3..000000000000 --- a/lib/routes/kepu/templates/description.art +++ /dev/null @@ -1,33 +0,0 @@ -{{ if image?.src }} -
    - {{ image.alt }} -
    -{{ /if }} - -{{ if intro }} -

    {{ intro }}

    -{{ /if }} - -{{ if video?.src }} - -{{ /if }} - -{{ if description }} -

    {{ description }}

    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/koyso/index.ts b/lib/routes/koyso/index.tsx similarity index 94% rename from lib/routes/koyso/index.ts rename to lib/routes/koyso/index.tsx index 75b4ce9ceb6a..e4acd8bd4771 100644 --- a/lib/routes/koyso/index.ts +++ b/lib/routes/koyso/index.tsx @@ -1,15 +1,31 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, DataItem, Route } from '@/types'; import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +const renderDescription = (images?: DescriptionImage[]) => + renderToString( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt +
    + ) : null + )} + + ); export const handler = async (ctx: Context): Promise => { const { category = '0', sort = 'latest' } = ctx.req.param(); @@ -32,16 +48,16 @@ export const handler = async (ctx: Context): Promise => { const title: string = $el.find('div.game_info').text(); const image: string | undefined = $el.find('div.game_media img').attr('data-src'); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { - images: image + const description: string | undefined = renderDescription( + image ? [ { src: image, alt: title, }, ] - : undefined, - }); + : undefined + ); const linkUrl: string | undefined = $el.attr('href'); const processedItem: DataItem = { diff --git a/lib/routes/koyso/templates/description.art b/lib/routes/koyso/templates/description.art deleted file mode 100644 index 0a7f83a6f60f..000000000000 --- a/lib/routes/koyso/templates/description.art +++ /dev/null @@ -1,13 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/kpmg/insights.ts b/lib/routes/kpmg/insights.tsx similarity index 86% rename from lib/routes/kpmg/insights.ts rename to lib/routes/kpmg/insights.tsx index 07f608dc0d3f..4d97b9e54c45 100644 --- a/lib/routes/kpmg/insights.ts +++ b/lib/routes/kpmg/insights.tsx @@ -1,14 +1,13 @@ -import path from 'node:path'; - import * as cheerio from 'cheerio'; import type { Context } from 'hono'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const baseUrl = 'https://kpmg.com'; const payload = { @@ -58,7 +57,25 @@ const endpoints = { api: `${baseUrl}/esearch/cn-zh`, }, }; -const render = (data) => art(path.join(__dirname, 'templates/description.art'), data); +const render = (data: { image?: string; alt?: string; content?: string; pdf?: string }) => renderToString(); + +const KpmgDescription = ({ image, alt, content, pdf }: { image?: string; alt?: string; content?: string; pdf?: string }) => ( + <> + {image ? {alt} : null} + {content ? ( + <> +
    + {raw(content)} + + ) : null} + {pdf ? ( + <> +
    + {raw(pdf)} + + ) : null} + +); const handler = async (ctx: Context) => { const { lang = 'en' } = ctx.req.param(); diff --git a/lib/routes/kpmg/templates/description.art b/lib/routes/kpmg/templates/description.art deleted file mode 100644 index 78ed654a1a40..000000000000 --- a/lib/routes/kpmg/templates/description.art +++ /dev/null @@ -1,11 +0,0 @@ -{{ if image }} - -{{ /if }} - -{{ if content }} -
    {{@ content }} -{{ /if }} - -{{ if pdf }} -
    {{@ pdf }} -{{ /if }} diff --git a/lib/routes/kpopping/kpics.ts b/lib/routes/kpopping/kpics.ts index 4443544a7aef..55629ebd4145 100644 --- a/lib/routes/kpopping/kpics.ts +++ b/lib/routes/kpopping/kpics.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const { filter } = ctx.req.param(); @@ -32,7 +31,7 @@ export const handler = async (ctx: Context): Promise => { const $el: Cheerio = $(el); const title: string = $el.find('figcaption section').text(); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ images: $el.find('a.picture img').attr('src') ? [ { @@ -75,7 +74,7 @@ export const handler = async (ctx: Context): Promise => { const $$: CheerioAPI = load(detailResponse); const title: string = $$('h1').contents().first().text(); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ description: $$('div.pics').first().html(), }); const pubDateStr: string | undefined = $$('meta[property="article:published_time"]').attr('content'); diff --git a/lib/routes/kpopping/news.ts b/lib/routes/kpopping/news.ts index f5dac14900ba..6ab9e14472fd 100644 --- a/lib/routes/kpopping/news.ts +++ b/lib/routes/kpopping/news.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,9 +8,10 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + export const handler = async (ctx: Context): Promise => { const { filter } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '2', 10); @@ -77,7 +76,7 @@ export const handler = async (ctx: Context): Promise => { const $$: CheerioAPI = load(detailResponse); const title: string = $$('h1').contents().first().text(); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ images: $$('figure.opening img').attr('src') ? [ { diff --git a/lib/routes/kpopping/templates/description.art b/lib/routes/kpopping/templates/description.art deleted file mode 100644 index dfab19230c11..000000000000 --- a/lib/routes/kpopping/templates/description.art +++ /dev/null @@ -1,17 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/kpopping/templates/description.tsx b/lib/routes/kpopping/templates/description.tsx new file mode 100644 index 000000000000..6caa2185273e --- /dev/null +++ b/lib/routes/kpopping/templates/description.tsx @@ -0,0 +1,20 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionData = { + images?: DescriptionImage[]; + description?: string; +}; + +export const renderDescription = ({ images, description }: DescriptionData) => + renderToString( + <> + {images?.length ? images.map((image) => (image?.src ?
    {image.alt ? {image.alt} : }
    : null)) : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/kyodonews/index.ts b/lib/routes/kyodonews/index.tsx similarity index 91% rename from lib/routes/kyodonews/index.ts rename to lib/routes/kyodonews/index.tsx index 328bfb1210e6..070d9d80b38f 100644 --- a/lib/routes/kyodonews/index.ts +++ b/lib/routes/kyodonews/index.tsx @@ -1,6 +1,6 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import ConfigNotFoundError from '@/errors/types/config-not-found'; import InvalidParameterError from '@/errors/types/invalid-parameter'; @@ -8,7 +8,6 @@ import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const resolveRelativeLink = (link, baseUrl) => (link.startsWith('http') ? link : `${baseUrl}${link}`); @@ -115,10 +114,18 @@ async function handler(ctx) { articleBody = articleBody ? articleBody.trim().replace(/(完)(?=<\/p>\s*$)/m, '') : ''; // render description - item.description = art(path.join(__dirname, 'templates/article.art'), { - mainPic, - articleBody, - }); + item.description = renderToString( + <> + {mainPic ? ( + <> + {raw(mainPic)} +
    +
    + + ) : null} + {articleBody ? raw(articleBody) : null} + + ); const ldJson = $('script[type="application/ld+json"]').html(); const pubDate_match = ldJson && ldJson.match(/"datePublished":"([\d\s-:]*?)"/); diff --git a/lib/routes/kyodonews/templates/article.art b/lib/routes/kyodonews/templates/article.art deleted file mode 100644 index ac741750228f..000000000000 --- a/lib/routes/kyodonews/templates/article.art +++ /dev/null @@ -1,4 +0,0 @@ -{{ if mainPic }} -{{@ mainPic }}

    -{{ /if }} -{{@ articleBody }} diff --git a/lib/routes/lang/room.ts b/lib/routes/lang/room.tsx similarity index 87% rename from lib/routes/lang/room.ts rename to lib/routes/lang/room.tsx index 046490eb0523..f67abb5a49f5 100644 --- a/lib/routes/lang/room.ts +++ b/lib/routes/lang/room.tsx @@ -1,8 +1,7 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; export const route: Route = { path: '/live/room/:id', @@ -48,9 +47,7 @@ async function handler(ctx) { title: `${name} 开播了`, link: url, guid: `lang:live:room:${id}:${data.live_info.live_id}`, - description: art(path.join(__dirname, 'templates/room.art'), { - live_info: data.live_info, - }), + description: renderToString(), }, ]; } diff --git a/lib/routes/lang/templates/room.art b/lib/routes/lang/templates/room.art deleted file mode 100644 index ba36695c5206..000000000000 --- a/lib/routes/lang/templates/room.art +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/routes/lanqiao/templates/courseDesc.art b/lib/routes/lanqiao/templates/courseDesc.art deleted file mode 100644 index 702d0e9d5777..000000000000 --- a/lib/routes/lanqiao/templates/courseDesc.art +++ /dev/null @@ -1 +0,0 @@ -
    {{ desc }} \ No newline at end of file diff --git a/lib/routes/lanqiao/utils.ts b/lib/routes/lanqiao/utils.ts deleted file mode 100644 index 2d53043a6bf9..000000000000 --- a/lib/routes/lanqiao/utils.ts +++ /dev/null @@ -1,11 +0,0 @@ -import path from 'node:path'; - -import { art } from '@/utils/render'; - -const courseDesc = (picurl, desc) => - art(path.join(__dirname, 'templates/courseDesc.art'), { - picurl, - desc, - }); - -export default { courseDesc }; diff --git a/lib/routes/lanqiao/utils.tsx b/lib/routes/lanqiao/utils.tsx new file mode 100644 index 000000000000..aea33c95df29 --- /dev/null +++ b/lib/routes/lanqiao/utils.tsx @@ -0,0 +1,12 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +const courseDesc = (picurl, desc) => + renderToString( + <> + +
    + {desc} + + ); + +export default { courseDesc }; diff --git a/lib/routes/learnku/templates/topic.art b/lib/routes/learnku/templates/topic.art deleted file mode 100644 index 0dd3dce47031..000000000000 --- a/lib/routes/learnku/templates/topic.art +++ /dev/null @@ -1,14 +0,0 @@ -
    -

    🦕正文

    -
    -
    - {{@ article }} -
    -
    -{{if comment }} -
    -

    👨‍💻评论

    -
    - {{@ comment }} -
    -{{/if}} diff --git a/lib/routes/learnku/topic.ts b/lib/routes/learnku/topic.tsx similarity index 65% rename from lib/routes/learnku/topic.ts rename to lib/routes/learnku/topic.tsx index 0285d66844fa..a52cdf7016ca 100644 --- a/lib/routes/learnku/topic.ts +++ b/lib/routes/learnku/topic.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/:community/:category?', @@ -73,10 +72,24 @@ async function handler(ctx) { return { title, - description: art(path.join(__dirname, 'templates/topic.art'), { - article, - comment, - }), + description: renderToString( + <> +
    +

    🦕正文

    +
    +
    + {article ? raw(article) : null} +
    +
    + {comment ? ( +
    +

    👨‍💻评论

    +
    + {raw(comment)} +
    + ) : null} + + ), category: categoryName, link: itemLink, pubDate: parseDate($('.timeago').attr('title'), 'YYYY/MM/DD'), diff --git a/lib/routes/leetcode/dailyquestion-cn.ts b/lib/routes/leetcode/dailyquestion-cn.ts index 40632c3b0140..e0ccacbc1e6a 100644 --- a/lib/routes/leetcode/dailyquestion-cn.ts +++ b/lib/routes/leetcode/dailyquestion-cn.ts @@ -1,8 +1,7 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; + +import { renderQuestionDescription } from './templates/question-description'; const host = 'https://leetcode.cn'; @@ -109,7 +108,7 @@ async function handler() { const rssData = { title: question.frontedId + '.' + question.titleSlug, - description: art(path.join(__dirname, 'templates/question-description.art'), { + description: renderQuestionDescription({ question, }), link: question.link, diff --git a/lib/routes/leetcode/dailyquestion-en.ts b/lib/routes/leetcode/dailyquestion-en.ts index 02a014bb4627..cf94c4bf4a62 100644 --- a/lib/routes/leetcode/dailyquestion-en.ts +++ b/lib/routes/leetcode/dailyquestion-en.ts @@ -1,8 +1,7 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; + +import { renderQuestionDescription } from './templates/question-description'; const host = 'https://leetcode.com'; @@ -110,7 +109,7 @@ async function handler() { const rssData = { title: question.frontedId + '.' + question.titleSlug, - description: art(path.join(__dirname, 'templates/question-description.art'), { + description: renderQuestionDescription({ question, }), link: question.link, diff --git a/lib/routes/leetcode/templates/question-description.art b/lib/routes/leetcode/templates/question-description.art deleted file mode 100644 index a2ee543656b1..000000000000 --- a/lib/routes/leetcode/templates/question-description.art +++ /dev/null @@ -1,6 +0,0 @@ -
    - {{question.difficulty}} {{question.date}} -

    - {{question.tags}} -

    -
    diff --git a/lib/routes/leetcode/templates/question-description.tsx b/lib/routes/leetcode/templates/question-description.tsx new file mode 100644 index 000000000000..1e74bb0875a1 --- /dev/null +++ b/lib/routes/leetcode/templates/question-description.tsx @@ -0,0 +1,22 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type QuestionDescriptionProps = { + question: { + difficulty: string; + date: string; + tags: string; + }; +}; + +const QuestionDescription = ({ question }: QuestionDescriptionProps) => ( +
    + {question.difficulty} {question.date} +
    +
    + {question.tags} +
    +
    +
    +); + +export const renderQuestionDescription = (props: QuestionDescriptionProps): string => renderToString(); diff --git a/lib/routes/lenovo/drive.ts b/lib/routes/lenovo/drive.tsx similarity index 60% rename from lib/routes/lenovo/drive.ts rename to lib/routes/lenovo/drive.tsx index cf2cb94fbdd6..9b5a6e2fe8df 100644 --- a/lib/routes/lenovo/drive.ts +++ b/lib/routes/lenovo/drive.tsx @@ -1,10 +1,9 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Data, DataItem, Route } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/drive/:selName', @@ -47,13 +46,7 @@ export async function handler(ctx) { ({ title: `${item.DriverName} ${item.Version}`, link: `https://newsupport.lenovo.com.cn/driveDownloads_detail.html?driveId=${item.DriverEdtionId}`, - description: art(path.join(__dirname, 'templates/drive.art'), { - driveName: item.DriverName, - driveCode: item.DriverCode, - driveVersion: item.Version, - downloadFileName: item.FileName, - downloadFilePath: item.FilePath, - }), + description: renderToString(), pubDate: parseDate(item.CreateTime, +8), }) as DataItem ); @@ -64,3 +57,29 @@ export async function handler(ctx) { language: 'zh-CN', } as Data; } + +const DriveDescription = ({ driveName, driveCode, driveVersion, downloadFileName, downloadFilePath }: { driveName: string; driveCode: string; driveVersion: string; downloadFileName: string; downloadFilePath: string }) => ( +
    +

    驱动信息

    +
      +
    • + 驱动名称: + {driveName} +
    • +
    • + 驱动编码: + {driveCode} +
    • +
    • + 驱动版本: + {driveVersion} +
    • +
    • + 下载地址: + + {downloadFileName} + +
    • +
    +
    +); diff --git a/lib/routes/lenovo/templates/drive.art b/lib/routes/lenovo/templates/drive.art deleted file mode 100644 index 4d53dbd1ef4c..000000000000 --- a/lib/routes/lenovo/templates/drive.art +++ /dev/null @@ -1,9 +0,0 @@ -
    -

    驱动信息

    -
      -
    • 驱动名称:{{ driveName }}
    • -
    • 驱动编码:{{ driveCode }}
    • -
    • 驱动版本:{{ driveVersion }}
    • -
    • 下载地址:{{ downloadFileName }}
    • -
    -
    diff --git a/lib/routes/lfsyd/templates/card.art b/lib/routes/lfsyd/templates/card.art deleted file mode 100644 index 30e812387de5..000000000000 --- a/lib/routes/lfsyd/templates/card.art +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/lib/routes/lfsyd/templates/video.art b/lib/routes/lfsyd/templates/video.art deleted file mode 100644 index 5aab94d67917..000000000000 --- a/lib/routes/lfsyd/templates/video.art +++ /dev/null @@ -1 +0,0 @@ -

    {{ url }}

    \ No newline at end of file diff --git a/lib/routes/lfsyd/utils.ts b/lib/routes/lfsyd/utils.tsx similarity index 91% rename from lib/routes/lfsyd/utils.ts rename to lib/routes/lfsyd/utils.tsx index 0c98e0d15314..160de968bb64 100644 --- a/lib/routes/lfsyd/utils.ts +++ b/lib/routes/lfsyd/utils.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import got from '@/utils/got'; import md5 from '@/utils/md5'; -import { art } from '@/utils/render'; const rootUrl = 'https://www.iyingdi.com'; const infoUrL = 'https://api.iyingdi.com/web/post/info'; @@ -63,7 +61,7 @@ const cleanHtml = (htmlString) => { $(e).find('.card-status').remove(); $(e) .find('.card-info') - .wrap(art(path.join(__dirname, 'templates/card.art'), { url })); + .wrap(renderToString()); }); $('.yingdi-image.gif').each((i, e) => { @@ -82,7 +80,13 @@ const cleanHtml = (htmlString) => { .match(/bvid=(.*?)&/)[1]; if (bvid) { const url = `https://www.bilibili.com/video/${bvid}`; - $(e).after(art(path.join(__dirname, 'templates/video.art'), { url })); + $(e).after( + renderToString( +

    + {url} +

    + ) + ); } }); diff --git a/lib/routes/linkedin/cn/utils.ts b/lib/routes/linkedin/cn/utils.tsx similarity index 73% rename from lib/routes/linkedin/cn/utils.ts rename to lib/routes/linkedin/cn/utils.tsx index 8ed987c56ba9..a72ca4c59aa7 100644 --- a/lib/routes/linkedin/cn/utils.ts +++ b/lib/routes/linkedin/cn/utils.tsx @@ -1,9 +1,10 @@ import crypto from 'node:crypto'; -import path from 'node:path'; + +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; import { parseAttr } from './renderer'; @@ -113,7 +114,28 @@ const parseJobPosting = (ctx, jobPosting) => { title: `${jobPosting.companyName} 正在找 ${jobPosting.title}`, link: `https://www.linkedin.cn/incareer/jobs/view/${entityUrn.split(':').pop()}`, guid: `linkedincn:${entityUrn}`, - description: art(path.join(__dirname, '../templates/cn/posting.art'), job), + description: renderToString( + <> +

    {job.title}

    +

    {job.applyMethod?.instantOffsiteApply ? 点击申请 : null}

    +

    {job.applyMethod?.basicOffsiteApply ? 点击申请 : null}

    +

    + 已有{job.numApplies}人申请此职位, {job.numViews}人查看此职位 +

    + {job.compensationDescription ?

    薪资:{job.compensationDescription || 'N/A'}

    : null} +

    工作地点: {job.geo?.defaultLocalizedName ?? ''}

    + {job.company ? ( + <> +

    公司介绍

    +

    {job.company.name}

    +

    员工人数:{job.company.employeeCount}

    +

    {job.company.localizedDescription}

    + + ) : null} +

    职位介绍

    +
    {job.desc ? raw(job.desc) : null}
    + + ), pubDate: jobPosting.listedAt, }; }); diff --git a/lib/routes/linkedin/templates/cn/posting.art b/lib/routes/linkedin/templates/cn/posting.art deleted file mode 100644 index 441113989552..000000000000 --- a/lib/routes/linkedin/templates/cn/posting.art +++ /dev/null @@ -1,25 +0,0 @@ -

    {{ title }}

    -

    - {{ if (applyMethod.instantOffsiteApply)}} - 点击申请 - {{ /if }} -

    -

    - {{ if (applyMethod.basicOffsiteApply)}} - 点击申请 - {{ /if }} -

    -

    已有{{numApplies}}人申请此职位, {{numViews}}人查看此职位

    -{{ if(compensationDescription) }} -

    薪资:{{ compensationDescription || 'N/A' }}

    -{{ /if }} -

    工作地点: {{ geo.defaultLocalizedName }}

    - -{{ if (company) }} -

    公司介绍

    -

    {{company.name}}

    -

    员工人数:{{company.employeeCount}}

    -

    {{company.localizedDescription}}

    -{{ /if }} -

    职位介绍

    -
    {{@ desc}}
    diff --git a/lib/routes/linkresearcher/index.ts b/lib/routes/linkresearcher/index.tsx similarity index 88% rename from lib/routes/linkresearcher/index.ts rename to lib/routes/linkresearcher/index.tsx index 5cc151f5829a..db96cd9f6dde 100644 --- a/lib/routes/linkresearcher/index.ts +++ b/lib/routes/linkresearcher/index.tsx @@ -1,7 +1,7 @@ import crypto from 'node:crypto'; -import path from 'node:path'; import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Data, DataItem, Route } from '@/types'; @@ -9,11 +9,21 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import type { DetailResponse, SearchResultItem } from './types'; -const templatePath = path.join(__dirname, 'templates/bilingual.art'); +const renderBilingual = (zh, en) => + renderToString( + <> + {en.map((enText, index) => ( + <> + {index === 0 ? null :
    } +

    {enText}

    +

    {zh[index]}

    + + ))} + + ); const baseURL = 'https://www.linkresearcher.com'; const apiURL = `${baseURL}/api`; @@ -108,13 +118,7 @@ async function handler(ctx: Context): Promise { pubDate: parseDate(response.onlineTime), link, image: response.cover, - description: - 'zhTextList' in response && 'enTextList' in response - ? art(templatePath, { - zh: response.zhTextList, - en: response.enTextList, - }) - : response.content, + description: 'zhTextList' in response && 'enTextList' in response ? renderBilingual(response.zhTextList, response.enTextList) : response.content, }; if ('paperList' in response) { diff --git a/lib/routes/linkresearcher/templates/bilingual.art b/lib/routes/linkresearcher/templates/bilingual.art deleted file mode 100644 index be7d6c1ba93f..000000000000 --- a/lib/routes/linkresearcher/templates/bilingual.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ each en }} -{{ if $index !== 0 }} -
    -{{ /if }} -

    {{ $value }}

    -

    {{ zh[$index] }}

    -{{ /each }} diff --git a/lib/routes/lkong/forum.ts b/lib/routes/lkong/forum.ts index d79f313ce704..e41245903637 100644 --- a/lib/routes/lkong/forum.ts +++ b/lib/routes/lkong/forum.ts @@ -1,12 +1,10 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { viewForum, viewThread } from './query'; +import { renderContent } from './templates/content'; export const route: Route = { path: '/forum/:id?/:digest?', @@ -51,9 +49,7 @@ async function handler(ctx) { item.author = detailResponse.data.data.thread?.author.name; item.pubDate = parseDate(detailResponse.data.data.thread?.dateline); - item.description = art(path.join(__dirname, 'templates/content.art'), { - content: JSON.parse(detailResponse.data.data.posts[0].content), - }); + item.description = renderContent(JSON.parse(detailResponse.data.data.posts[0].content)); delete item.guid; return item; diff --git a/lib/routes/lkong/templates/content.art b/lib/routes/lkong/templates/content.art deleted file mode 100644 index fddcdfd7f147..000000000000 --- a/lib/routes/lkong/templates/content.art +++ /dev/null @@ -1,18 +0,0 @@ -{{ each content paragraph }} -{{ if paragraph.type == 'paragraph' }} -

    -{{ each paragraph.children child }} -{{ if child.text }} - -{{ if child.bold }}{{ /if }} -{{ child.text }} -{{ if child.bold }}{{ /if }} - -{{ /if }} -{{ if child.type == 'emotion' }} - -{{ /if }} -{{ /each }} -

    -{{ /if }} -{{ /each }} \ No newline at end of file diff --git a/lib/routes/lkong/templates/content.tsx b/lib/routes/lkong/templates/content.tsx new file mode 100644 index 000000000000..a07aaed13d5a --- /dev/null +++ b/lib/routes/lkong/templates/content.tsx @@ -0,0 +1,36 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type ContentChild = { + text?: string; + color?: string; + bold?: boolean; + type?: string; + id?: string | number; +}; + +type ContentParagraph = { + type?: string; + children?: ContentChild[]; +}; + +const LkongContent = ({ content }: { content: ContentParagraph[] }) => ( + <> + {content?.map((paragraph) => + paragraph.type === 'paragraph' ? ( +

    + {paragraph.children?.map((child) => { + if (child.text) { + return {child.bold ? {child.text} : child.text}; + } + if (child.type === 'emotion') { + return ; + } + return null; + })} +

    + ) : null + )} + +); + +export const renderContent = (content: ContentParagraph[]) => renderToString(); diff --git a/lib/routes/lkong/templates/quote.art b/lib/routes/lkong/templates/quote.art deleted file mode 100644 index 9d4f34a8c950..000000000000 --- a/lib/routes/lkong/templates/quote.art +++ /dev/null @@ -1,23 +0,0 @@ -
    - - -{{ author }}: -{{@ content }} -
    - - \ No newline at end of file diff --git a/lib/routes/lkong/thread.ts b/lib/routes/lkong/thread.tsx similarity index 53% rename from lib/routes/lkong/thread.ts rename to lib/routes/lkong/thread.tsx index ff458c64a220..f85d6e255f96 100644 --- a/lib/routes/lkong/thread.ts +++ b/lib/routes/lkong/thread.tsx @@ -1,11 +1,12 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { countReplies, viewThread } from './query'; +import { renderContent } from './templates/content'; export const route: Route = { path: '/thread/:id', @@ -49,18 +50,8 @@ async function handler(ctx) { link: `${rootUrl}/thread/${id}?pid=${item.pid}`, pubDate: parseDate(item.dateline), description: - (item.quote - ? art(path.join(__dirname, 'templates/quote.art'), { - target: `${rootUrl}/thread/${id}?pid=${item.quote.pid}`, - author: item.quote.author.name, - content: art(path.join(__dirname, 'templates/content.art'), { - content: JSON.parse(item.quote.content), - }), - }) - : '') + - art(path.join(__dirname, 'templates/content.art'), { - content: JSON.parse(item.content), - }), + (item.quote ? renderToString() : '') + + renderContent(JSON.parse(item.content)), })); return { @@ -69,3 +60,35 @@ async function handler(ctx) { item: items, }; } + +const quoteStyles = ` +.quote { + margin: 15px 0px 15px; + width: 100%; + border: 1px solid #eee; + background-color: #f5f5f5; + border-radius: 4px; + padding: 8px 14px; + cursor: pointer; +} + +.quote-link { + color: #1890ff; + text-decoration: none; +} +`; + +const LkongQuote = ({ target, author, content }: { target: string; author: string; content: string }) => ( + <> +
    + + + + + {author} + + :{raw(content)} +
    + + +); diff --git a/lib/routes/lmu/jobs.ts b/lib/routes/lmu/jobs.tsx similarity index 64% rename from lib/routes/lmu/jobs.ts rename to lib/routes/lmu/jobs.tsx index 5d84034076eb..98ac5e77b4ae 100644 --- a/lib/routes/lmu/jobs.ts +++ b/lib/routes/lmu/jobs.tsx @@ -1,16 +1,15 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const apiUrl = 'https://jobs.b-ite.com/api/v1/postings/search'; -// 辅助函数:根据 value 查找对应的 label +// Helper: find the display label for a value. function findLabel(value: string, options: Array<{ value: string; label: string }>): string { const option = options.find((option) => option.value === value); - return option?.label ?? value; // 如果找不到匹配项,返回 value 本身 + return option?.label ?? value; // Fall back to the raw value if no match. } async function handler() { @@ -50,16 +49,11 @@ async function handler() { const items = jobPostings.map((job) => { const pubDate = parseDate(job.createdOn, 'YYYY-MM-DDTHH:mm:ssZ'); - // 获取 Institution 的 label + // Resolve Institution label. const institutionLabel = findLabel(job.custom.bereich, bereichOptions); const RemunerationGroupLabel = findLabel(job.custom.verguetung, verguetungOptions); - // 渲染模板 - const description = art(path.join(__dirname, 'templates/jobPosting.art'), { - institutionLabel, - RemunerationGroupLabel, - job, - }); + const description = renderDescription(institutionLabel, RemunerationGroupLabel, job); return { title: job.title, @@ -76,6 +70,42 @@ async function handler() { }; } +const renderDescription = (institutionLabel: string, RemunerationGroupLabel: string, job): string => + renderToString( + <> +

    + Institution: {institutionLabel} +

    +

    + Remuneration: {RemunerationGroupLabel} +

    +

    + Application deadline: {job.endsOn} +

    +

    + Job Details: +

    +

    + About us: +

    + {job.custom?.das_sind_wir || ''} +
    +

    + Your qualifications: +

    + {job.custom?.das_sind_sie || ''} +
    +

    + Benefits: +

    + {job.custom?.das_ist_unser_angebot || ''} +
    +

    + Contact: {job.custom?.kontakt || ''} +

    + + ); + export const route: Route = { path: '/jobs', name: 'Job Openings', diff --git a/lib/routes/lmu/templates/jobPosting.art b/lib/routes/lmu/templates/jobPosting.art deleted file mode 100644 index b89f75f2cc0b..000000000000 --- a/lib/routes/lmu/templates/jobPosting.art +++ /dev/null @@ -1,11 +0,0 @@ -

    Institution: {{ institutionLabel }}

    -

    Remuneration: {{ RemunerationGroupLabel }}

    -

    Application deadline: {{ job.endsOn }}

    -

    Job Details:

    -

    About us:

    -{{ job.custom.das_sind_wir || '' }}
    -

    Your qualifications:

    -{{ job.custom.das_sind_sie || '' }}
    -

    Benefits:

    -{{ job.custom.das_ist_unser_angebot || '' }}
    -

    Contact: {{ job.custom.kontakt || '' }}

    diff --git a/lib/routes/logclub/index.ts b/lib/routes/logclub/index.ts index 9636f287a0f2..298882f050c6 100644 --- a/lib/routes/logclub/index.ts +++ b/lib/routes/logclub/index.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/:category{.+}?', @@ -38,7 +37,7 @@ async function handler(ctx) { return { title: a.text(), link: new URL(a.prop('href'), rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ image: { src: image, alt: a.text(), @@ -63,7 +62,7 @@ async function handler(ctx) { content('img').each((_, el) => { el = content(el); el.replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ image: { src: el.prop('src')?.split(/\?/)[0] ?? undefined, alt: el.prop('title'), @@ -79,7 +78,7 @@ async function handler(ctx) { item.enclosure_type = `video/${item.enclosure_url.split(/\./).pop()}`; } - item.description += art(path.join(__dirname, 'templates/description.art'), { + item.description += renderDescription({ video: { poster: item.itunes_item_image, src: item.enclosure_url, diff --git a/lib/routes/logclub/report.ts b/lib/routes/logclub/report.ts index 62e1a54f2030..852fec5f48e0 100644 --- a/lib/routes/logclub/report.ts +++ b/lib/routes/logclub/report.ts @@ -1,14 +1,13 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + export const route: Route = { path: ['/lc_report/:id?', '/report/:id?'], categories: ['new-media'], @@ -47,7 +46,7 @@ async function handler(ctx) { let items = response.list.slice(0, limit).map((item) => ({ title: item.title, link: new URL(`front/lc_report/get_report_info/${item.id}`, rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ image: { src: item.img_url?.split(/\?/)[0] ?? undefined, alt: item.title, @@ -69,7 +68,7 @@ async function handler(ctx) { content('img').each((_, el) => { el = content(el); el.replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ image: { src: el.prop('src')?.split(/\?/)[0] ?? undefined, alt: el.prop('title'), @@ -79,7 +78,7 @@ async function handler(ctx) { }); item.title = content('h1').first().text(); - item.description += art(path.join(__dirname, 'templates/description.art'), { + item.description += renderDescription({ description: content('div.article-cont').html(), }); item.author = content('div.lc-infos a') diff --git a/lib/routes/logclub/templates/description.art b/lib/routes/logclub/templates/description.art deleted file mode 100644 index eedb4179b066..000000000000 --- a/lib/routes/logclub/templates/description.art +++ /dev/null @@ -1,33 +0,0 @@ -{{ if image?.src }} -
    - {{ image.alt }} -
    -{{ /if }} - -{{ if intro }} -

    {{ intro }}

    -{{ /if }} - -{{ if video?.src }} - -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/logclub/templates/description.tsx b/lib/routes/logclub/templates/description.tsx new file mode 100644 index 000000000000..dac8d4cbd2dd --- /dev/null +++ b/lib/routes/logclub/templates/description.tsx @@ -0,0 +1,37 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type MediaImage = { + src?: string; + alt?: string; +}; + +type MediaVideo = { + src?: string; + type?: string; + poster?: string; +}; + +type DescriptionData = { + image?: MediaImage; + intro?: string; + video?: MediaVideo; + description?: string; +}; + +export const renderDescription = ({ image, intro, video, description }: DescriptionData) => + renderToString( + <> + {image?.src ?
    {image.alt ? {image.alt} : }
    : null} + {intro ?

    {intro}

    : null} + {video?.src ? ( + + ) : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/logonews/index.ts b/lib/routes/logonews/index.tsx similarity index 83% rename from lib/routes/logonews/index.ts rename to lib/routes/logonews/index.tsx index 1aeafe518e52..853b5c7bca06 100644 --- a/lib/routes/logonews/index.ts +++ b/lib/routes/logonews/index.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: ['/work/tags/:tag', '/tag/:tag', '*'], @@ -76,11 +75,7 @@ async function handler(ctx) { .toArray() .map((c) => content(c).text().replaceAll(' · ', '')); - item.description = art(path.join(__dirname, 'templates/description.art'), { - isWork, - image: content('meta[property="og:image"]').attr('content'), - description: content('.This_Article_content, .w_info').html(), - }); + item.description = renderDescription(isWork, content('meta[property="og:image"]').attr('content'), content('.This_Article_content, .w_info').html()); return item; }) @@ -93,3 +88,11 @@ async function handler(ctx) { item: items, }; } + +const renderDescription = (isWork: boolean, image: string | undefined, description: string | null): string => + renderToString( + <> + {isWork ? : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/logonews/templates/description.art b/lib/routes/logonews/templates/description.art deleted file mode 100644 index 946e8f84ca28..000000000000 --- a/lib/routes/logonews/templates/description.art +++ /dev/null @@ -1,4 +0,0 @@ -{{if isWork}} - -{{/if}} -{{ description }} \ No newline at end of file diff --git a/lib/routes/loltw/news.ts b/lib/routes/loltw/news.tsx similarity index 78% rename from lib/routes/loltw/news.ts rename to lib/routes/loltw/news.tsx index af261ce9f7d1..aeab08b7ea8a 100644 --- a/lib/routes/loltw/news.ts +++ b/lib/routes/loltw/news.tsx @@ -1,10 +1,10 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/news/:category?', @@ -46,7 +46,7 @@ async function handler(ctx) { list.map((item) => cache.tryGet(item.link, async () => { const detailResponse = await got(`${baseUrl}/api/news/detail?news_id=${item.guid}`); - item.description = art(path.join(__dirname, 'templates/news.art'), detailResponse.data.data.news_detail); + item.description = renderToString(); return item; }) ) @@ -58,3 +58,10 @@ async function handler(ctx) { item: items, }; } + +const LoltwNewsDescription = ({ img, content }: { img?: string; content?: string }) => ( +
    + {img ? : null} + {content ? raw(content) : null} +
    +); diff --git a/lib/routes/loltw/templates/news.art b/lib/routes/loltw/templates/news.art deleted file mode 100644 index d009bbd372f5..000000000000 --- a/lib/routes/loltw/templates/news.art +++ /dev/null @@ -1,6 +0,0 @@ -
    -{{if img}} - -{{/if}} -{{@ content }} -
    diff --git a/lib/routes/lorientlejour/index.ts b/lib/routes/lorientlejour/index.tsx similarity index 89% rename from lib/routes/lorientlejour/index.ts rename to lib/routes/lorientlejour/index.tsx index faee8176021d..1bbdf8a4e58d 100644 --- a/lib/routes/lorientlejour/index.ts +++ b/lib/routes/lorientlejour/index.tsx @@ -1,6 +1,6 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { FetchError } from 'ofetch'; import { config } from '@/config'; @@ -8,7 +8,6 @@ import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const key = '3d5_f6A(S$G_FD=2S(Dr6%7BW_h37@rE'; @@ -168,11 +167,22 @@ async function handler(ctx) { } }); } - item.description = art(path.join(__dirname, 'templates/description.art'), { - summary: item.summary, - attachments: item.attachments, - article: article.html(), - }); + item.description = renderToString( + <> + {item.summary ?
    {raw(item.summary)}
    : null} + {item.attachments + ? item.attachments.map((attachment) => + attachment.url ? ( +
    + + {attachment.description ?
    {attachment.description}
    : null} +
    + ) : null + ) + : null} + {article.html() ? raw(article.html()) : null} + + ); return item; }); diff --git a/lib/routes/lorientlejour/templates/description.art b/lib/routes/lorientlejour/templates/description.art deleted file mode 100644 index 3fd2ae9c4627..000000000000 --- a/lib/routes/lorientlejour/templates/description.art +++ /dev/null @@ -1,18 +0,0 @@ -{{ if summary }} -
    {{@ summary }}
    -{{ /if }} -{{ if attachments}} - {{ each attachments }} - {{if $value.url }} -
    - - {{ if $value.description }} -
    {{ $value.description }}
    - {{ /if }} -
    - {{ /if }} - {{ /each }} -{{ /if }} -{{ if article }} - {{@ article }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/lovelive-anime/news.ts b/lib/routes/lovelive-anime/news.tsx similarity index 96% rename from lib/routes/lovelive-anime/news.ts rename to lib/routes/lovelive-anime/news.tsx index 3476b6ab1652..15563ecc95a9 100644 --- a/lib/routes/lovelive-anime/news.ts +++ b/lib/routes/lovelive-anime/news.tsx @@ -1,16 +1,14 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; -const renderDescription = (desc) => art(path.join(__dirname, 'templates/description.art'), desc); +const renderDescription = (desc: { imglink: string }) => renderToString(); export const route: Route = { path: '/news/:abbr?/:category?/:option?', diff --git a/lib/routes/lovelive-anime/templates/description.art b/lib/routes/lovelive-anime/templates/description.art deleted file mode 100644 index 41ce31a1107c..000000000000 --- a/lib/routes/lovelive-anime/templates/description.art +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/routes/lovelive-anime/templates/scheduleDesc.art b/lib/routes/lovelive-anime/templates/scheduleDesc.art deleted file mode 100644 index d512a9b37b2b..000000000000 --- a/lib/routes/lovelive-anime/templates/scheduleDesc.art +++ /dev/null @@ -1,2 +0,0 @@ -{{startTime}}   ~   {{endTime}}

    -{{desc}} diff --git a/lib/routes/lrepacks/index.ts b/lib/routes/lrepacks/index.ts index 220c9ebf7647..3422c54a8853 100644 --- a/lib/routes/lrepacks/index.ts +++ b/lib/routes/lrepacks/index.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx) => { const { category = '' } = ctx.req.param(); @@ -28,7 +27,7 @@ export const handler = async (ctx) => { item = $(item); const title = item.find('h3.entry-title').text(); - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ intro: item.find('div.entry-content').text(), }); @@ -57,7 +56,7 @@ export const handler = async (ctx) => { el = $$(el); el.parent().replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ images: [ { src: el.prop('href'), @@ -71,8 +70,8 @@ export const handler = async (ctx) => { const title = $$('h2.entry-title').text(); const description = item.description + - art(path.join(__dirname, 'templates/description.art'), { - description: $$('div.entry-content').html(), + renderDescription({ + description: $$('div.entry-content').html() ?? undefined, }); const image = $$('meta[property="og:image"]').prop('content'); diff --git a/lib/routes/lrepacks/templates/description.art b/lib/routes/lrepacks/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/lrepacks/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/lrepacks/templates/description.tsx b/lib/routes/lrepacks/templates/description.tsx new file mode 100644 index 000000000000..f7661df1ea9a --- /dev/null +++ b/lib/routes/lrepacks/templates/description.tsx @@ -0,0 +1,28 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionRenderOptions = { + images?: DescriptionImage[]; + intro?: string; + description?: string; +}; + +export const renderDescription = ({ images, intro, description }: DescriptionRenderOptions): string => + renderToString( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt +
    + ) : null + )} + {intro ?
    {intro}
    : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/ltaaa/article.ts b/lib/routes/ltaaa/article.ts index e7487e8f3206..5fb699ce5606 100644 --- a/lib/routes/ltaaa/article.ts +++ b/lib/routes/ltaaa/article.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); @@ -33,7 +32,7 @@ export const handler = async (ctx: Context): Promise => { const $aEl: Cheerio = $el.find('div.li-title a'); const title: string = $aEl.text(); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ intro: $el.find('div.dbody p').first().text(), }); const pubDateStr: string | undefined = $el.find('i.icon-time').next().text().trim(); @@ -109,7 +108,7 @@ export const handler = async (ctx: Context): Promise => { $$('div.post-param, div.post-title, div.post-keywords').remove(); $$('div.attitude, div.clear').remove(); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ description: $$('div.post-body').html(), }); diff --git a/lib/routes/ltaaa/templates/description.art b/lib/routes/ltaaa/templates/description.art deleted file mode 100644 index 57498ab45a9d..000000000000 --- a/lib/routes/ltaaa/templates/description.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/ltaaa/templates/description.tsx b/lib/routes/ltaaa/templates/description.tsx new file mode 100644 index 000000000000..9259435df3bd --- /dev/null +++ b/lib/routes/ltaaa/templates/description.tsx @@ -0,0 +1,16 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionProps = { + intro?: string; + description?: string; +}; + +const Description = ({ intro, description }: DescriptionProps) => ( + <> + {intro ?
    {intro}
    : null} + {description ? <>{raw(description)} : null} + +); + +export const renderDescription = (props: DescriptionProps): string => renderToString(); diff --git a/lib/routes/luolei/index.ts b/lib/routes/luolei/index.tsx similarity index 82% rename from lib/routes/luolei/index.ts rename to lib/routes/luolei/index.tsx index dd76bb7dcb99..49e7a0822c3f 100644 --- a/lib/routes/luolei/index.ts +++ b/lib/routes/luolei/index.tsx @@ -1,20 +1,45 @@ -import path from 'node:path'; - import type { CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +type DescriptionImage = { + src?: string; + alt?: string; + width?: string; + height?: string; +}; + +type DescriptionVideo = { + src?: string; +}; + +const renderDescription = ({ images, videos }: { images?: DescriptionImage[]; videos?: DescriptionVideo[] }) => + renderToString( + <> + {images?.length + ? images.map((image) => { + if (videos?.[0]?.src || !image?.src) { + return null; + } + + const alt = image.height ?? image.width ?? image.alt; + return
    {alt ? {alt} : }
    ; + }) + : null} + + ); const unblurImages = ($: CheerioAPI) => { $('img[data-original-src]').each((_, el) => { el = $(el); el.replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ images: [ { src: el.prop('data-original-src'), diff --git a/lib/routes/luolei/templates/description.art b/lib/routes/luolei/templates/description.art deleted file mode 100644 index baf0f02234ec..000000000000 --- a/lib/routes/luolei/templates/description.art +++ /dev/null @@ -1,19 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if !videos?.[0]?.src && image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/lvv2/news.ts b/lib/routes/lvv2/news.ts index f2c2eb4ca9cc..085c98fb5afe 100644 --- a/lib/routes/lvv2/news.ts +++ b/lib/routes/lvv2/news.ts @@ -1,14 +1,13 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderOutlink } from './templates/outlink'; + const rootUrl = 'https://lvv2.com'; const titleMap = { @@ -86,9 +85,7 @@ async function handler(ctx) { return description; }) - : art(path.join(__dirname, 'templates/outlink.art'), { - outlink: item.link, - }); + : renderOutlink(item.link); return item; }) diff --git a/lib/routes/lvv2/templates/outlink.art b/lib/routes/lvv2/templates/outlink.art deleted file mode 100644 index e89a59ec1571..000000000000 --- a/lib/routes/lvv2/templates/outlink.art +++ /dev/null @@ -1 +0,0 @@ -文章链接 diff --git a/lib/routes/lvv2/templates/outlink.tsx b/lib/routes/lvv2/templates/outlink.tsx new file mode 100644 index 000000000000..76df4aae6223 --- /dev/null +++ b/lib/routes/lvv2/templates/outlink.tsx @@ -0,0 +1,8 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +export const renderOutlink = (outlink: string): string => + renderToString( + + 文章链接 + + ); diff --git a/lib/routes/lvv2/top.ts b/lib/routes/lvv2/top.ts index b1f12b07309f..6e61f31a885d 100644 --- a/lib/routes/lvv2/top.ts +++ b/lib/routes/lvv2/top.ts @@ -1,14 +1,13 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderOutlink } from './templates/outlink'; + const rootUrl = 'https://lvv2.com'; const titleMap = { @@ -88,9 +87,7 @@ async function handler(ctx) { return description; }) - : art(path.join(__dirname, 'templates/outlink.art'), { - outlink: link, - }); + : renderOutlink(link); return item; }) diff --git a/lib/routes/lxixsxa/discography.ts b/lib/routes/lxixsxa/discography.tsx similarity index 81% rename from lib/routes/lxixsxa/discography.ts rename to lib/routes/lxixsxa/discography.tsx index fdba89bb9f17..0e9f646c96cd 100644 --- a/lib/routes/lxixsxa/discography.ts +++ b/lib/routes/lxixsxa/discography.tsx @@ -1,9 +1,9 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { parseJSONP } from './jsonp-helper'; @@ -65,13 +65,15 @@ async function handler() { // the article title title: item.title, // the article content - description: art(path.join(__dirname, 'templates/disco.art'), { - comment: item.comment, - type: item.type, - price: item.price, - image: item.imageLink, - description: item.description, - }), + description: renderToString( + <> + + {item.comment} Type: {item.type} Price: {item.price} + + {item.imageLink ? : null} + {item.description ? raw(item.description) : null} + + ), // the article publish time pubDate: parseDate(item.releaseDate), // the article link diff --git a/lib/routes/lxixsxa/information.ts b/lib/routes/lxixsxa/information.tsx similarity index 83% rename from lib/routes/lxixsxa/information.ts rename to lib/routes/lxixsxa/information.tsx index 761a7fe22c6f..652de8ef9ba1 100644 --- a/lib/routes/lxixsxa/information.ts +++ b/lib/routes/lxixsxa/information.tsx @@ -1,9 +1,9 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { parseJSONP } from './jsonp-helper'; @@ -62,10 +62,12 @@ async function handler() { // the article title title: item.title, // the article content - description: art(path.join(__dirname, 'templates/info.art'), { - category: item.category, - description: item.description.replaceAll('\n', '
    '), - }), + description: renderToString( + <> + {item.category ? Category: {item.category} : null} + {raw(item.description.replaceAll('\n', '
    '))} + + ), // the article publish time pubDate: parseDate(item.date), // the article link diff --git a/lib/routes/lxixsxa/templates/disco.art b/lib/routes/lxixsxa/templates/disco.art deleted file mode 100644 index 0e495a922d72..000000000000 --- a/lib/routes/lxixsxa/templates/disco.art +++ /dev/null @@ -1,5 +0,0 @@ -{{comment}} Type: {{type}} Price: {{price}} -{{ if image }} - -{{ /if }} -{{@ description }} \ No newline at end of file diff --git a/lib/routes/lxixsxa/templates/info.art b/lib/routes/lxixsxa/templates/info.art deleted file mode 100644 index 851917bd8905..000000000000 --- a/lib/routes/lxixsxa/templates/info.art +++ /dev/null @@ -1,4 +0,0 @@ -{{ if category }} - Category: {{category}} -{{ /if }} -{{@ description }} \ No newline at end of file diff --git a/lib/routes/m4/index.ts b/lib/routes/m4/index.ts index 434245e4baea..7fe380128436 100644 --- a/lib/routes/m4/index.ts +++ b/lib/routes/m4/index.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import InvalidParameterError from '@/errors/types/invalid-parameter'; @@ -7,10 +5,11 @@ import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; import { isValidHost } from '@/utils/valid-host'; +import { renderDescription } from './templates/description'; + export const route: Route = { path: '/:id?/:category{.+}?', name: 'Unknown', @@ -43,7 +42,7 @@ async function handler(ctx) { return { title: a.text(), link: a.prop('href'), - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ images: [ { src: item.parent().find('div.aimg0 a img').prop('src'), @@ -67,9 +66,9 @@ async function handler(ctx) { const content = load(detailResponse); item.title = content('h1').first().text(); - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ intro: content('div.aintro1, p.cont-summary').text(), - description: content('div.content0, div.cont-detail').html(), + description: content('div.content0, div.cont-detail').html() ?? undefined, }); item.category = content('span.dd0 a, a[rel="category"]') .toArray() diff --git a/lib/routes/m4/templates/description.art b/lib/routes/m4/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/m4/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/m4/templates/description.tsx b/lib/routes/m4/templates/description.tsx new file mode 100644 index 000000000000..f7661df1ea9a --- /dev/null +++ b/lib/routes/m4/templates/description.tsx @@ -0,0 +1,28 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionRenderOptions = { + images?: DescriptionImage[]; + intro?: string; + description?: string; +}; + +export const renderDescription = ({ images, intro, description }: DescriptionRenderOptions): string => + renderToString( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt +
    + ) : null + )} + {intro ?
    {intro}
    : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/maccms/index.ts b/lib/routes/maccms/index.tsx similarity index 75% rename from lib/routes/maccms/index.ts rename to lib/routes/maccms/index.tsx index ddc794a041de..44c9b06d08f7 100644 --- a/lib/routes/maccms/index.ts +++ b/lib/routes/maccms/index.tsx @@ -1,13 +1,60 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Result, Vod } from '@/routes/maccms/type'; import type { DataItem, Route } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; -const render = (vod: Vod, link: string) => art(path.join(__dirname, 'templates/vod.art'), { vod, link }); +const render = (vod: Vod, link: string) => renderToString(); + +const VodDescription = ({ vod, link }: { vod: Vod; link: string }) => ( + <> + + {vod.vod_name} + +

    + {vod.vod_name} {vod.vod_remarks} +

    +

    + 别名: + {vod.vod_sub} +

    +

    + 导演: + {vod.vod_director} +

    +

    + 主演: + {vod.vod_actor} +

    +

    + 类型: + {vod.vod_class} +

    +

    + 年份: + {vod.vod_year} +

    +

    + 地区: + {vod.vod_area} +

    +

    + 开播时间: + {vod.vod_pubdate} +

    +

    + 更新时间: + {vod.vod_time} +

    +

    + 资源主页: + {link} +

    +

    剧情介绍

    + +); export const route: Route = { path: '/:domain/:type?/:size?', diff --git a/lib/routes/maccms/templates/vod.art b/lib/routes/maccms/templates/vod.art deleted file mode 100644 index cea9457f9dfc..000000000000 --- a/lib/routes/maccms/templates/vod.art +++ /dev/null @@ -1,12 +0,0 @@ -{{ vod.vod_name }} -

    {{ vod.vod_name }} {{ vod.vod_remarks }}

    -

    别名:{{ vod.vod_sub }}

    -

    导演:{{ vod.vod_director }}

    -

    主演:{{ vod.vod_actor }}

    -

    类型:{{ vod.vod_class }}

    -

    年份:{{ vod.vod_year }}

    -

    地区:{{ vod.vod_area }}

    -

    开播时间:{{ vod.vod_pubdate }}

    -

    更新时间:{{ vod.vod_time }}

    -

    资源主页:{{ link }}

    -

    剧情介绍

    \ No newline at end of file diff --git a/lib/routes/magazinelib/latest-magazine.ts b/lib/routes/magazinelib/latest-magazine.tsx similarity index 91% rename from lib/routes/magazinelib/latest-magazine.ts rename to lib/routes/magazinelib/latest-magazine.tsx index 39ddb9d3ac5a..c0fa7afd82fb 100644 --- a/lib/routes/magazinelib/latest-magazine.ts +++ b/lib/routes/magazinelib/latest-magazine.tsx @@ -1,12 +1,16 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const host = 'https://magazinelib.com'; +const renderImage = (imgUrl) => + renderToString( +
    + +
    + ); export const route: Route = { path: '/latest-magazine/:query?', categories: ['reading'], @@ -58,7 +62,7 @@ async function handler(ctx) { content.find('img[src="https://magazinelib.com/wp-includes/images/media/default.png"]').remove(); data.content = content.html(); const imgUrl = obj._embedded['wp:featuredmedia'][0].source_url; - data.description = data.content + art(path.join(__dirname, 'templates/magazine-description.art'), { imgUrl }); + data.description = data.content + renderImage(imgUrl); data.categories = obj._embedded['wp:term'][0].map((item) => item.name); return data; }); diff --git a/lib/routes/magazinelib/templates/magazine-description.art b/lib/routes/magazinelib/templates/magazine-description.art deleted file mode 100644 index 43f9138e6939..000000000000 --- a/lib/routes/magazinelib/templates/magazine-description.art +++ /dev/null @@ -1,3 +0,0 @@ -
    - -
    diff --git a/lib/routes/manhuagui/subscribe.ts b/lib/routes/manhuagui/subscribe.tsx similarity index 91% rename from lib/routes/manhuagui/subscribe.ts rename to lib/routes/manhuagui/subscribe.tsx index efce8d8a9cfd..25834b19673f 100644 --- a/lib/routes/manhuagui/subscribe.ts +++ b/lib/routes/manhuagui/subscribe.tsx @@ -1,13 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseRelativeDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const web_url = 'https://www.manhuagui.com/user/book/shelf/1'; @@ -70,10 +68,12 @@ async function handler() { const manga_title = $(item).find('.co_1.c_space').first().text(); // 最新的一话题目 const title = $(item).find('img').attr('alt'); // 漫画的名字 const link = $(item).find('.co_1.c_space').first().children().attr('href'); // 漫画最新的链接 - const description = art(path.join(__dirname, 'templates/manga.art'), { - manga_title, - img_src, - }); + const description = renderToString( + <> +

    {manga_title}

    + + + ); const pubDate = $(item).find('.co_1.c_space').first().next().text(); const publishDate = parseRelativeDate(pubDate); // 处理相对时间 const single = { diff --git a/lib/routes/manhuagui/templates/manga.art b/lib/routes/manhuagui/templates/manga.art deleted file mode 100644 index a6f0d14d5dcc..000000000000 --- a/lib/routes/manhuagui/templates/manga.art +++ /dev/null @@ -1,2 +0,0 @@ -

    {{manga_title}}

    - diff --git a/lib/routes/manyvids/templates/video.art b/lib/routes/manyvids/templates/video.art deleted file mode 100644 index 63d221442ba9..000000000000 --- a/lib/routes/manyvids/templates/video.art +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/lib/routes/manyvids/video.ts b/lib/routes/manyvids/video.tsx similarity index 85% rename from lib/routes/manyvids/video.ts rename to lib/routes/manyvids/video.tsx index 810f24808995..82516d92ff8b 100644 --- a/lib/routes/manyvids/video.ts +++ b/lib/routes/manyvids/video.tsx @@ -1,9 +1,8 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; import type { UserProfile, Videos } from './types'; @@ -26,7 +25,12 @@ export const route: Route = { const getProfileById = (uid: string) => cache.tryGet(`manyvids:profile:${uid}`, () => ofetch(`https://www.manyvids.com/bff/profile/profiles/${uid}`)) as Promise; -const render = (data) => art(path.join(__dirname, 'templates/video.art'), data); +const render = ({ poster, src }: { poster: string; src: string }) => + renderToString( + + ); async function handler(ctx) { const { uid } = ctx.req.param(); diff --git a/lib/routes/mathpix/blog.ts b/lib/routes/mathpix/blog.tsx similarity index 90% rename from lib/routes/mathpix/blog.ts rename to lib/routes/mathpix/blog.tsx index f441115a1b4c..74b474b260db 100644 --- a/lib/routes/mathpix/blog.ts +++ b/lib/routes/mathpix/blog.tsx @@ -1,16 +1,14 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, DataItem, Route } from '@/types'; import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); @@ -45,17 +43,16 @@ export const handler = async (ctx: Context): Promise => { const title: string = $el.find('a.articles__title').text(); const image: string | undefined = $el.find('div.articles__image img').attr('srcset') ? new URL($el.find('div.articles__image img').attr('srcset') as string, baseUrl).href : undefined; - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { - images: image - ? [ - { - src: image, - alt: title, - }, - ] - : undefined, - intro: $el.find('div.articles__text').text(), - }); + const description: string | undefined = renderToString( + <> + {image ? ( +
    + {title} +
    + ) : null} + {$el.find('div.articles__text').text() ?
    {$el.find('div.articles__text').text()}
    : null} + + ); const pubDateStr: string | undefined = $el.find('time.articles__date').attr('datetime'); const linkUrl: string | undefined = $el.find('a.articles__title').attr('href'); const categoryIds: string[] = diff --git a/lib/routes/mathpix/templates/description.art b/lib/routes/mathpix/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/mathpix/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/mcmod/index.ts b/lib/routes/mcmod/index.tsx similarity index 82% rename from lib/routes/mcmod/index.ts rename to lib/routes/mcmod/index.tsx index f7ab6af52b02..8713a6fcadf4 100644 --- a/lib/routes/mcmod/index.ts +++ b/lib/routes/mcmod/index.tsx @@ -1,15 +1,35 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; -const render = (mod) => art(path.join(__dirname, 'templates/mod.art'), { mod }); +const render = (mod) => + renderToString( + <> + + {mod.label.map((label) => ( +

    {label}

    + ))} + {mod.support?.length ? ( + <> +

    支持的MC版本:

    +
      + {mod.support.map((support) => ( +
    • + {support.label} + {support.versions} +
    • + ))} +
    + + ) : null} +
    + + ); export const route: Route = { path: '/:type', diff --git a/lib/routes/mcmod/templates/mod.art b/lib/routes/mcmod/templates/mod.art deleted file mode 100644 index 90042d547da7..000000000000 --- a/lib/routes/mcmod/templates/mod.art +++ /dev/null @@ -1,13 +0,0 @@ - -{{ each mod.label l }} -

    {{ l }}

    -{{ /each }} -{{ if mod.support.length > 0 }} -

    支持的MC版本:

    -
      - {{ each mod.support s }} -
    • {{ s.label }}{{ s.versions }}
    • - {{ /each }} -
    -{{ /if }} -
    \ No newline at end of file diff --git a/lib/routes/mdpi/journal.ts b/lib/routes/mdpi/journal.tsx similarity index 70% rename from lib/routes/mdpi/journal.ts rename to lib/routes/mdpi/journal.tsx index ff92cbab57c8..b4457c5d9dc6 100644 --- a/lib/routes/mdpi/journal.ts +++ b/lib/routes/mdpi/journal.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import { CookieJar } from 'tough-cookie'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const cookieJar = new CookieJar(); @@ -75,9 +73,41 @@ async function handler(ctx) { }); const renderDesc = (item) => - art(path.join(__dirname, 'templates/description.art'), { - item, - }); + renderToString( + <> +

    + + {item.title} + +
    +

    +

    + + + {item.authors} + + +
    + + + {`https://doi.org/${item.doi}`} + + +
    + + + {item.issue} + + +
    + +

    +

    + {item.abstract} +
    +

    + + ); const items = list.map((item) => { item.description = renderDesc(item); return item; diff --git a/lib/routes/mdpi/templates/description.art b/lib/routes/mdpi/templates/description.art deleted file mode 100755 index 8e9b7767d14a..000000000000 --- a/lib/routes/mdpi/templates/description.art +++ /dev/null @@ -1,12 +0,0 @@ -

    - {{ item.title }}
    -

    -

    - {{ item.authors }}
    - https://doi.org/{{ item.doi }}
    - {{ item.issue }}
    - -

    -

    - {{ item.abstract }}
    -

    \ No newline at end of file diff --git a/lib/routes/mercari/templates/item.art b/lib/routes/mercari/templates/item.art deleted file mode 100644 index 37f102571900..000000000000 --- a/lib/routes/mercari/templates/item.art +++ /dev/null @@ -1,46 +0,0 @@ -

    ¥{{ data.price}}

    - -

    -{{each data.photos}} - -{{/each}} -

    - -

    商品の説明

    -
    <%- data.description.replaceAll(`\n`,'
    ') %>
    -

    商品の情報

    -
    - 名称 - - {{item.name}} -
    - 别名 - - {{item.subName}} -
    - 中文支持 - - {{item.chinese}} -
    - 史低地区 - - {{item.lowestPriceCountry}} -
    - 史低 - - 是 -
    - 史低 - - 否 -
    - 发布日期 - - {{item.pubDate}} -
    - 当前价格 - - ¥{{item.price}} -
    - 原价 - - ¥{{item.originPrice}} -
    - 折扣地区 - - {{item.priceCountry}} -
    - 折扣 - - {{item.cutOff}}% -
    - metacritic评分 - - {{item.mcScore}} -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    カテゴリー{{ data.item_category.root_category_name }} > {{ data.item_category.parent_category_name }} > {{data.item_category.name}}
    商品の状態 {{data.item_condition.name}}
    配送料の負担 {{data.shipping_payer.name}}
    配送の方法 {{data.shipping_method.name}}
    発送元の地域 {{data.shipping_from_area.name}}
    発送までの日数 {{data.shipping_duration.name}}
    - -

    出品者

    -
    - -

    {{data.seller.name}}

    -
    \ No newline at end of file diff --git a/lib/routes/mercari/templates/shopItem.art b/lib/routes/mercari/templates/shopItem.art deleted file mode 100644 index 806e4755d1d3..000000000000 --- a/lib/routes/mercari/templates/shopItem.art +++ /dev/null @@ -1,46 +0,0 @@ -

    ¥{{ price }}

    - -

    -{{each productDetail.photos}} - -{{/each}} -

    - -

    商品の説明

    -
    <%- productDetail.description.replaceAll(`\n`,'
    ') %>
    -

    商品の情報

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    カテゴリー {{productDetail.categories.reverse().map(item => item.displayName).join(" > ")}}
    商品の状態 {{productDetail.condition.displayName}}
    配送料の負担 {{productDetail.shippingPayer.displayName}}
    配送の方法 {{productDetail.shippingMethod.displayName}}
    発送元の地域 {{productDetail.shippingFromArea.displayName}}
    発送までの日数 {{productDetail.shippingDuration.displayName}}
    - -

    出品者

    -
    - -

    {{productDetail.shop.displayName}}

    -
    \ No newline at end of file diff --git a/lib/routes/mercari/util.ts b/lib/routes/mercari/util.tsx similarity index 69% rename from lib/routes/mercari/util.ts rename to lib/routes/mercari/util.tsx index 203b9b9a130a..9de7a2000a8e 100644 --- a/lib/routes/mercari/util.ts +++ b/lib/routes/mercari/util.tsx @@ -1,12 +1,13 @@ import { Buffer } from 'node:buffer'; import crypto from 'node:crypto'; -import path from 'node:path'; + +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { DataItem } from '@/types'; import logger from '@/utils/logger'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import type { ItemDetail, SearchResponse, ShopItemDetail } from './types'; @@ -37,6 +38,106 @@ const MercariOrder = { asc: 'ORDER_ASC', } as const; +const renderItemDescription = (data: ItemDetail['data']) => + renderToString( + <> +

    ¥{data.price}

    +

    + {data.photos?.map((photo) => ( + + ))} +

    +

    商品の説明

    +
    {raw(data.description.replaceAll('\n', '
    '))}
    +

    商品の情報

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    カテゴリー + {data.item_category.root_category_name} > {data.item_category.parent_category_name} > {data.item_category.name} +
    商品の状態 {data.item_condition.name}
    配送料の負担 {data.shipping_payer.name}
    配送の方法 {data.shipping_method.name}
    発送元の地域 {data.shipping_from_area.name}
    発送までの日数 {data.shipping_duration.name}
    +

    出品者

    +
    + +

    {data.seller.name}

    +
    + + ); + +const renderShopItemDescription = (detail: ShopItemDetail) => + renderToString( + <> +

    ¥{detail.price}

    +

    + {detail.productDetail.photos?.map((photo) => ( + + ))} +

    +

    商品の説明

    +
    {raw(detail.productDetail.description.replaceAll('\n', '
    '))}
    +

    商品の情報

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    カテゴリー + {' '} + {[...detail.productDetail.categories] + .toReversed() + .map((item) => item.displayName) + .join(' > ')}{' '} +
    商品の状態 {detail.productDetail.condition.displayName}
    配送料の負担 {detail.productDetail.shippingPayer.displayName}
    配送の方法 {detail.productDetail.shippingMethod.displayName}
    発送元の地域 {detail.productDetail.shippingFromArea.displayName}
    発送までの日数 {detail.productDetail.shippingDuration.displayName}
    +

    出品者

    +
    + +

    {detail.productDetail.shop.displayName}

    +
    + + ); + function bytesToBase64URL(b: Buffer): string { return b.toString('base64').replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', ''); } @@ -160,7 +261,7 @@ function generateDPOP({ uuid, method, url }: { uuid: string; method: string; url return `${signingInput}.${signature}`; } -const fetchFromMercari = async (url: string, data: any, method: 'POST' | 'GET' = 'POST'): Promise => { +const fetchFromMercari = async function fetchFromMercari(url: string, data: any, method: 'POST' | 'GET' = 'POST'): Promise { const DPOP = generateDPOP({ uuid: uuidv4(), method, @@ -296,7 +397,7 @@ const formatItemDetail = (detail: ItemDetail | ShopItemDetail): DataItem => { const shopItemDetail = detail as ShopItemDetail; return { title: shopItemDetail.displayName, - description: art(path.join(__dirname, 'templates/shopItem.art'), shopItemDetail), + description: renderShopItemDescription(shopItemDetail), pubDate: parseDate(shopItemDetail.createTime), guid: shopItemDetail.name, link: `${rootShopProductURL}${shopItemDetail.name}`, @@ -310,7 +411,7 @@ const formatItemDetail = (detail: ItemDetail | ShopItemDetail): DataItem => { const itemDetail = detail as ItemDetail; return { title: itemDetail.data.name, - description: art(path.join(__dirname, 'templates/item.art'), itemDetail), + description: renderItemDescription(itemDetail.data), pubDate: parseDate(itemDetail.data.created * 1000), guid: itemDetail.data.id, link: `${rootProductURL}${itemDetail.data.id}`, diff --git a/lib/routes/metacritic/index.ts b/lib/routes/metacritic/index.tsx similarity index 87% rename from lib/routes/metacritic/index.ts rename to lib/routes/metacritic/index.tsx index 3193d46da671..9f402f8ced1a 100644 --- a/lib/routes/metacritic/index.ts +++ b/lib/routes/metacritic/index.tsx @@ -1,14 +1,30 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { sorts, types } from './util'; +const renderDescription = (image, description, score) => + renderToString( + <> + {image ? ( +
    + {image.alt} +
    + ) : null} + {description ?

    {description}

    : null} + {score ? ( + <> + Metascore: + {score} + + ) : null} + + ); + export const route: Route = { path: '/:type?/:sort?/:filter?', name: 'Unknown', @@ -103,16 +119,16 @@ async function handler(ctx) { const items = response.data.items.slice(0, limit).map((item) => ({ title: item.title, link: new URL(`${type}/${item.slug}`, rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { - image: item.image + description: renderDescription( + item.image ? { src: new URL(`a/img/catalog${item.image.bucketPath}`, rootUrl).href, alt: item.image.alt, } : undefined, - description: item.description, - score: item.criticScoreSummary?.score ?? undefined, - }), + item.description, + item.criticScoreSummary?.score ?? undefined + ), category: item.genres?.map((c) => c.name), guid: `metacritic-${item.id}`, pubDate: parseDate(item.releaseDate), diff --git a/lib/routes/metacritic/templates/description.art b/lib/routes/metacritic/templates/description.art deleted file mode 100644 index 1ee8bd077c45..000000000000 --- a/lib/routes/metacritic/templates/description.art +++ /dev/null @@ -1,19 +0,0 @@ -{{ if image }} -
    - {{ image.alt }} -
    -{{ /if }} - -{{ if description }} -

    {{ description }}

    -{{ /if }} - -{{ if score }} - Metascore: - {{ score }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/meteor/templates/desc.art b/lib/routes/meteor/templates/desc.art deleted file mode 100644 index 96c2464f35ac..000000000000 --- a/lib/routes/meteor/templates/desc.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if youTube }} - -{{ else if img }} - -{{ else if video }} - -{{ /if }} diff --git a/lib/routes/meteor/templates/desc.tsx b/lib/routes/meteor/templates/desc.tsx new file mode 100644 index 000000000000..916b91ea2706 --- /dev/null +++ b/lib/routes/meteor/templates/desc.tsx @@ -0,0 +1,21 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type MediaProps = { + youTube?: string; + img?: string; + video?: string; +}; + +const Media = ({ youTube, img, video }: MediaProps) => ( + <> + {youTube ? ( + + ) : img ? ( + + ) : video ? ( + + ) : null} + +); + +export const renderMedia = (props: MediaProps): string => renderToString(); diff --git a/lib/routes/meteor/utils.ts b/lib/routes/meteor/utils.ts index 4facb1f5423a..8b7de2293589 100644 --- a/lib/routes/meteor/utils.ts +++ b/lib/routes/meteor/utils.ts @@ -1,7 +1,6 @@ -import path from 'node:path'; - import got from '@/utils/got'; -import { art } from '@/utils/render'; + +import { renderMedia } from './templates/desc'; const baseUrl = 'https://meteor.today'; @@ -36,7 +35,7 @@ const renderDesc = (desc) => { if (matchYouTube) { desc = desc.replaceAll( youTube, - art(path.join(__dirname, 'templates/desc.art'), { + renderMedia({ youTube: '$1', }) ); @@ -45,7 +44,7 @@ const renderDesc = (desc) => { for (const img of matchImgur) { desc = desc.replace( img, - art(path.join(__dirname, 'templates/desc.art'), { + renderMedia({ img, }) ); @@ -55,7 +54,7 @@ const renderDesc = (desc) => { for (const video of matchVideo) { desc = desc.replace( video, - art(path.join(__dirname, 'templates/desc.art'), { + renderMedia({ video, }) ); @@ -65,7 +64,7 @@ const renderDesc = (desc) => { for (const sticker of matchSticker) { desc = desc.replace( sticker, - art(path.join(__dirname, 'templates/desc.art'), { + renderMedia({ img: sticker, }) ); @@ -75,7 +74,7 @@ const renderDesc = (desc) => { for (const emoji of matchEmoji) { desc = desc.replace( emoji, - art(path.join(__dirname, 'templates/desc.art'), { + renderMedia({ img: emoji, }) ); diff --git a/lib/routes/mi/templates/crowdfunding.art b/lib/routes/mi/templates/crowdfunding.art deleted file mode 100644 index a58e19aca9a1..000000000000 --- a/lib/routes/mi/templates/crowdfunding.art +++ /dev/null @@ -1,28 +0,0 @@ - -
    -{{ project_name }} -
    -{{ project_desc }} -
    -众筹价:{{ price }} 元,建议零售价:{{ product_market_price }} 元 -
    -众筹开始:{{ start_time_desc }},众筹结束:{{ end_time_desc }} -
    -物流:{{ send_info }} -
    - - - - - - - - {{ each support_list }} - - - - - - {{ /each }} - -
    档位价格描述
    {{ $value.name }}{{ $value.price }} 元{{ $value.support_desc }}
    diff --git a/lib/routes/mi/utils.ts b/lib/routes/mi/utils.tsx similarity index 57% rename from lib/routes/mi/utils.ts rename to lib/routes/mi/utils.tsx index cfe391239eb3..464c60aa6744 100644 --- a/lib/routes/mi/utils.ts +++ b/lib/routes/mi/utils.tsx @@ -1,15 +1,13 @@ import 'dayjs/locale/zh-cn.js'; -import path from 'node:path'; - import dayjs from 'dayjs'; import localizedFormat from 'dayjs/plugin/localizedFormat.js'; import timezone from 'dayjs/plugin/timezone.js'; import utc from 'dayjs/plugin/utc.js'; +import { renderToString } from 'hono/jsx/dom/server'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; import type { CrowdfundingData, CrowdfundingDetailData, CrowdfundingDetailInfo, CrowdfundingItem, CrowdfundingList, DataResponse } from './types'; @@ -18,9 +16,9 @@ dayjs.extend(timezone); dayjs.extend(utc); /** - * 获取众筹项目列表 + * Fetch the list of crowdfunding projects. * - * @returns {Promise} 众筹项目列表。 + * @returns {Promise} The crowdfunding project list. */ export const getCrowdfundingList = async (): Promise => { const response = await ofetch>('https://m.mi.com/v1/crowd/crowd_home', { @@ -33,10 +31,10 @@ export const getCrowdfundingList = async (): Promise => { }; /** - * 获取众筹项目详情并缓存 + * Fetch and cache crowdfunding project details. * - * @param {CrowdfundingItem} item - 众筹项目。 - * @returns {Promise} 众筹项目详情。 + * @param {CrowdfundingItem} item - Crowdfunding item. + * @returns {Promise} Crowdfunding item details. */ export const getCrowdfundingItem = (item: CrowdfundingItem): Promise => cache.tryGet(`mi:crowdfunding:${item.project_id}`, async () => { @@ -49,28 +47,61 @@ export const getCrowdfundingItem = (item: CrowdfundingItem): Promise; +const CrowdfundingDescription = ({ item }: { item: CrowdfundingDetailInfo }) => ( + <> + +
    + {item.project_name} +
    + {item.project_desc} +
    + 众筹价:{item.price} 元,建议零售价:{item.product_market_price} 元 +
    + 众筹开始:{item.start_time_desc},众筹结束:{item.end_time_desc} +
    + 物流:{item.send_info} +
    + + + + + + + + {item.support_list.map((support, index) => ( + + + + + + ))} + +
    档位价格描述
    {support.name}{support.price} 元{support.support_desc}
    + +); + /** - * 渲染众筹项目模板 + * Render the crowdfunding item description. * - * @param {CrowdfundingDetailInfo} item - 众筹项目详情。 - * @returns {string} 渲染后的众筹项目模板字符串。 + * @param {CrowdfundingDetailInfo} item - Crowdfunding item details. + * @returns {string} Rendered description HTML. */ -export const renderCrowdfunding = (item: CrowdfundingDetailInfo): string => art(path.join(__dirname, 'templates/crowdfunding.art'), item); +export const renderCrowdfunding = (item: CrowdfundingDetailInfo): string => renderToString(); const formatDate = (timestamp: number): string => dayjs.unix(timestamp).tz('Asia/Shanghai').locale('zh-cn').format('lll'); diff --git a/lib/routes/mihoyo/bbs/follow-list.ts b/lib/routes/mihoyo/bbs/follow-list.ts index e5e3a86cb921..219f85dc8faf 100644 --- a/lib/routes/mihoyo/bbs/follow-list.ts +++ b/lib/routes/mihoyo/bbs/follow-list.ts @@ -1,13 +1,9 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; +import { renderDescription } from '../templates/description'; import cache from './cache'; -const renderDescription = (description, images) => art(path.join(__dirname, '../templates/description.art'), { description, images }); - export const route: Route = { path: '/bbs/follow-list/:uid', categories: ['game'], diff --git a/lib/routes/mihoyo/bbs/official.ts b/lib/routes/mihoyo/bbs/official.ts index 180f5489c24c..fc3a6c4b0b74 100644 --- a/lib/routes/mihoyo/bbs/official.ts +++ b/lib/routes/mihoyo/bbs/official.ts @@ -1,11 +1,10 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import logger from '@/utils/logger'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderOfficialDescription } from '../templates/official'; // 游戏id const GITS_MAP = { @@ -86,11 +85,7 @@ const getPostContent = async (row, default_gid = '2') => { const author = fullRow?.user?.nickname || ''; const content = fullRow?.post?.content || ''; const tags = fullRow?.topics?.map((item) => item.name) || []; - const description = art(path.join(__dirname, '../templates/official.art'), { - hasCover: post.has_cover, - coverList: row.cover_list, - content, - }); + const description = renderOfficialDescription(post.has_cover, row.cover_list, content); return { // 文章标题 title: post.subject, diff --git a/lib/routes/mihoyo/bbs/utils.ts b/lib/routes/mihoyo/bbs/utils.ts index f170fbe197c7..2f1662a85303 100644 --- a/lib/routes/mihoyo/bbs/utils.ts +++ b/lib/routes/mihoyo/bbs/utils.ts @@ -1,9 +1,6 @@ -import path from 'node:path'; - import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; -const renderDescription = (description, images) => art(path.join(__dirname, '../templates/description.art'), { description, images }); +import { renderDescription } from '../templates/description'; const post2item = (e) => { const author = e.user.nickname; diff --git a/lib/routes/mihoyo/templates/description.art b/lib/routes/mihoyo/templates/description.art deleted file mode 100644 index c195aad3b680..000000000000 --- a/lib/routes/mihoyo/templates/description.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ description }} -{{if images}} - {{each images}} - - {{/each}} -{{/if}} diff --git a/lib/routes/mihoyo/templates/description.tsx b/lib/routes/mihoyo/templates/description.tsx new file mode 100644 index 000000000000..6e31f3bef8f4 --- /dev/null +++ b/lib/routes/mihoyo/templates/description.tsx @@ -0,0 +1,9 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +export const renderDescription = (description: string, images?: string[]) => + renderToString( + <> + {description} + {images?.length ? images.map((image) => ) : null} + + ); diff --git a/lib/routes/mihoyo/templates/official.art b/lib/routes/mihoyo/templates/official.art deleted file mode 100644 index 8744cb1e6fa1..000000000000 --- a/lib/routes/mihoyo/templates/official.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if hasCover }} - {{ each coverList c }} -
    - {{ /each }} -{{ /if }} - -{{@ content }} diff --git a/lib/routes/mihoyo/templates/official.tsx b/lib/routes/mihoyo/templates/official.tsx new file mode 100644 index 000000000000..958957ed4f01 --- /dev/null +++ b/lib/routes/mihoyo/templates/official.tsx @@ -0,0 +1,21 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type CoverItem = { + url?: string; +}; + +export const renderOfficialDescription = (hasCover: boolean, coverList: CoverItem[], content: string) => + renderToString( + <> + {hasCover + ? coverList.map((cover) => ( + <> + +
    + + )) + : null} + {content ? <>{raw(content)} : null} + + ); diff --git a/lib/routes/mindmeister/example.ts b/lib/routes/mindmeister/example.tsx similarity index 89% rename from lib/routes/mindmeister/example.ts rename to lib/routes/mindmeister/example.tsx index 069d6102834e..d5187ab91e6f 100644 --- a/lib/routes/mindmeister/example.ts +++ b/lib/routes/mindmeister/example.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const baseUrl = 'https://www.mindmeister.com'; @@ -73,12 +71,10 @@ async function handler(ctx) { .match(/url\('(.*)'\);/)[1] ).href; + const title = item.find('.title').text(); return { - title: item.find('.title').text(), - description: art(path.join(__dirname, 'templates/image.art'), { - src: imageUrl.split('?')[0], - alt: item.find('.title').text().trim(), - }), + title, + description: renderToString({title.trim()}), link: item.find('.title').attr('href'), author: item.find('.author').text().trim().replace(/^by/, ''), category: item.find('.fw-bold').text(), diff --git a/lib/routes/mindmeister/templates/image.art b/lib/routes/mindmeister/templates/image.art deleted file mode 100644 index 40140a947ed7..000000000000 --- a/lib/routes/mindmeister/templates/image.art +++ /dev/null @@ -1 +0,0 @@ -{{ alt }} diff --git a/lib/routes/mingpao/index.ts b/lib/routes/mingpao/index.tsx similarity index 86% rename from lib/routes/mingpao/index.ts rename to lib/routes/mingpao/index.tsx index b79613afb4fe..b2273ea22f1b 100644 --- a/lib/routes/mingpao/index.ts +++ b/lib/routes/mingpao/index.tsx @@ -1,24 +1,38 @@ -import path from 'node:path'; - import * as cheerio from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import parser from '@/utils/rss-parser'; -const renderFanBox = (media) => - art(path.join(__dirname, 'templates/fancybox.art'), { - media, - }); +const renderFanBox = (media): string => + renderToString( + <> + {media?.map((item, index) => + item.video ? ( + + ) : ( +
    + {item.title} +
    {item.title}
    +
    + ) + )} + + ); -const renderDesc = (media, desc) => - art(path.join(__dirname, 'templates/description.art'), { - media: renderFanBox(media), - desc, - }); +const renderDesc = (media, desc): string => + renderToString( + <> + {raw(renderFanBox(media))} + {raw(desc)} + + ); const fixFancybox = (element, $) => { const $e = $(element); diff --git a/lib/routes/mingpao/templates/description.art b/lib/routes/mingpao/templates/description.art deleted file mode 100644 index 3439085cd5f4..000000000000 --- a/lib/routes/mingpao/templates/description.art +++ /dev/null @@ -1,2 +0,0 @@ -{{@ media }} -{{@ desc }} diff --git a/lib/routes/mingpao/templates/fancybox.art b/lib/routes/mingpao/templates/fancybox.art deleted file mode 100644 index 07e8ce97b2c2..000000000000 --- a/lib/routes/mingpao/templates/fancybox.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ each media }} - {{ if $value.video }} - - {{ else }} -
    {{ $value.title }}
    {{ $value.title }}
    - {{ /if }} -{{ /each }} diff --git a/lib/routes/missav/new.ts b/lib/routes/missav/new.tsx similarity index 88% rename from lib/routes/missav/new.ts rename to lib/routes/missav/new.tsx index d8c17065435c..a023c8d74f07 100644 --- a/lib/routes/missav/new.ts +++ b/lib/routes/missav/new.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - // import ofetch from '@/utils/ofetch'; import * as cheerio from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; // import { config } from '@/config'; import puppeteer from '@/utils/puppeteer'; -import { art } from '@/utils/render'; const urlPath = 'dm514/new'; @@ -72,11 +70,11 @@ async function handler() { return { title: title.text().trim(), link: title.attr('href'), - description: art(path.join(__dirname, 'templates/preview.art'), { - poster: poster.href, - video, - type: video.split('.').pop(), - }), + description: renderToString( + + ), }; }); diff --git a/lib/routes/missav/templates/preview.art b/lib/routes/missav/templates/preview.art deleted file mode 100644 index 5cad91c8d543..000000000000 --- a/lib/routes/missav/templates/preview.art +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/lib/routes/misskey/templates/note.art b/lib/routes/misskey/templates/note.art deleted file mode 100644 index b4922d5acd28..000000000000 --- a/lib/routes/misskey/templates/note.art +++ /dev/null @@ -1,29 +0,0 @@ -{{ if reply }} -
    -

    {{ reply.text }}

    -
    -{{ /if }} - -{{ if text }} -

    {{ text.replace(/\n/g, '
    ') }}

    -{{ /if }} - -{{ each files file }} -
    - {{ if file.type.includes('image') }} - - {{ else if file.type.includes('video') }} - - {{ else if file.type.includes('audio') }} - - {{ else }} - {{ file.name }} - {{ /if }} - {{ if file.comment }} -

    {{ file.comment }}

    - {{ /if }} -{{ /each }} diff --git a/lib/routes/misskey/utils.ts b/lib/routes/misskey/utils.tsx similarity index 75% rename from lib/routes/misskey/utils.ts rename to lib/routes/misskey/utils.tsx index db788ab6dfe2..11b66ae82121 100644 --- a/lib/routes/misskey/utils.ts +++ b/lib/routes/misskey/utils.tsx @@ -1,14 +1,46 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import type { MisskeyNote, MisskeyUser } from './types'; const allowSiteList = ['misskey.io', 'madost.one', 'mk.nixnet.social']; +const renderDescription = ({ reply, text, files }) => + renderToString( + <> + {reply ? ( +
    +

    {reply.text}

    +
    + ) : null} + {text ?

    {text.replaceAll('\n', '
    ')}

    : null} + {(files ?? []).map((file) => ( + <> +
    + {file.type.includes('image') ? ( + + ) : file.type.includes('video') ? ( + + ) : file.type.includes('audio') ? ( + + ) : ( + + {file.name} + + )} + {file.comment ?

    {file.comment}

    : null} + + ))} + + ); + const parseNotes = (data: MisskeyNote[], site: string, simplifyAuthor: boolean = false) => data.map((item: MisskeyNote) => { const isRenote = item.renote && Object.keys(item.renote).length > 0; @@ -18,11 +50,10 @@ const parseNotes = (data: MisskeyNote[], site: string, simplifyAuthor: boolean = const host = noteToUse.user.host ?? site; const author = simplifyAuthor ? String(noteToUse.user.name) : `${noteToUse.user.name} (${noteToUse.user.username}@${host})`; - const description = art(path.join(__dirname, 'templates/note.art'), { + const description = renderDescription({ text: noteToUse.text, files: noteToUse.files, reply: item.reply, - site, }); let title = ''; diff --git a/lib/routes/mittrchina/index.ts b/lib/routes/mittrchina/index.tsx similarity index 84% rename from lib/routes/mittrchina/index.ts rename to lib/routes/mittrchina/index.tsx index b4fba8b5c742..762ce6afa945 100644 --- a/lib/routes/mittrchina/index.ts +++ b/lib/routes/mittrchina/index.tsx @@ -1,10 +1,9 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/:type?', @@ -73,13 +72,15 @@ async function handler(ctx) { category: article.typeName, description: type === 'video' - ? art(path.join(__dirname, 'templates/movie.art'), { - poster: article.img, - video: { - address: article.address, - type: article.address.split('.').pop(), - }, - }) + ? renderToString( + + ) : type === 'breaking' ? article.content : article.summary, @@ -123,3 +124,10 @@ async function handler(ctx) { item: items, }; } + +const VideoDescription = ({ poster, video }: { poster?: string; video?: { address?: string; type?: string } }) => + video ? ( + + ) : null; diff --git a/lib/routes/mittrchina/templates/movie.art b/lib/routes/mittrchina/templates/movie.art deleted file mode 100644 index c0a1384d8933..000000000000 --- a/lib/routes/mittrchina/templates/movie.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ if video }} - -{{ /if }} diff --git a/lib/routes/modelscope/community.ts b/lib/routes/modelscope/community.tsx similarity index 80% rename from lib/routes/modelscope/community.ts rename to lib/routes/modelscope/community.tsx index 5f0db57471e2..341202c55389 100644 --- a/lib/routes/modelscope/community.ts +++ b/lib/routes/modelscope/community.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -33,6 +32,20 @@ export const route: Route = { url: 'community.modelscope.cn/', }; +const renderDescription = (thumb, quote, content) => + renderToString( + <> + {thumb ? ( + <> + +
    + + ) : null} + {quote ?
    {quote}
    : null} + {content ? <>{raw(content)} : null} + + ); + async function handler(ctx) { const baseUrl = 'https://community.modelscope.cn'; @@ -62,11 +75,7 @@ async function handler(ctx) { .match(/window\.__INITIAL_STATE__\s*=\s*({.*?});/)[1] ); - item.description = art(path.join(__dirname, 'templates/community.art'), { - thumb: item.thumb, - quote: item.description, - content: initialData.pageData.detail.ext.content, - }); + item.description = renderDescription(item.thumb, item.description, initialData.pageData.detail.ext.content); return item; }) diff --git a/lib/routes/modelscope/datasets.ts b/lib/routes/modelscope/datasets.ts index e8910596c8a6..ae20dbc931aa 100644 --- a/lib/routes/modelscope/datasets.ts +++ b/lib/routes/modelscope/datasets.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import MarkdownIt from 'markdown-it'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/desc'; const md = MarkdownIt({ html: true, @@ -66,7 +65,7 @@ async function handler(ctx) { const { data } = await got(`${baseUrl}/api/v1/datasets${item.slug}`); const content = data.Data.ReadmeContent.replaceAll(/img src="(?!http)(.*?)"/g, `img src="${baseUrl}/api/v1/datasets${item.slug}/repo?Revision=master&FilePath=$1&View=true"`); - item.description = art(path.join(__dirname, 'templates/desc.art'), { + item.description = renderDescription({ description: item.description, md: md.render(content), }); diff --git a/lib/routes/modelscope/studios.ts b/lib/routes/modelscope/studios.ts index 46b5faacb9b7..496aa85a9169 100644 --- a/lib/routes/modelscope/studios.ts +++ b/lib/routes/modelscope/studios.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import MarkdownIt from 'markdown-it'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/desc'; const md = MarkdownIt({ html: true, @@ -66,7 +65,7 @@ async function handler(ctx) { const { data } = await got(`${baseUrl}/api/v1/studio${item.slug}`); const content = data.Data.ReadMeContent; - item.description = art(path.join(__dirname, 'templates/desc.art'), { + item.description = renderDescription({ coverImage: item.coverImage, description: item.description, md: md.render(content), diff --git a/lib/routes/modelscope/templates/community.art b/lib/routes/modelscope/templates/community.art deleted file mode 100644 index 7dafedaa716f..000000000000 --- a/lib/routes/modelscope/templates/community.art +++ /dev/null @@ -1,11 +0,0 @@ -{{ if thumb }} -
    -{{ /if }} - -{{ if quote }} -
    {{ quote }}
    -{{ /if }} - -{{ if content }} - {{@ content }} -{{ /if }} diff --git a/lib/routes/modelscope/templates/desc.art b/lib/routes/modelscope/templates/desc.art deleted file mode 100644 index 5a0d9d950159..000000000000 --- a/lib/routes/modelscope/templates/desc.art +++ /dev/null @@ -1,9 +0,0 @@ -{{ if coverImage }} -
    -{{ /if }} - -{{ if description }} - {{ description }}
    -{{ /if }} - -{{@ md }} diff --git a/lib/routes/modelscope/templates/desc.tsx b/lib/routes/modelscope/templates/desc.tsx new file mode 100644 index 000000000000..357aa5f60eaf --- /dev/null +++ b/lib/routes/modelscope/templates/desc.tsx @@ -0,0 +1,27 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + coverImage?: string; + description?: string; + md?: string; +}; + +export const renderDescription = ({ coverImage, description, md }: DescriptionData) => + renderToString( + <> + {coverImage ? ( + <> + +
    + + ) : null} + {description ? ( + <> + {description} +
    + + ) : null} + {md ? <>{raw(md)} : null} + + ); diff --git a/lib/routes/modrinth/templates/version.art b/lib/routes/modrinth/templates/version.art deleted file mode 100644 index 6841cd360210..000000000000 --- a/lib/routes/modrinth/templates/version.art +++ /dev/null @@ -1,8 +0,0 @@ -

    {{ name }} - {{ version_number }}

    -

    Loaders: {{ each loaders }}{{ $value }} {{ /each }}

    -

    Game Versions: {{ each game_versions }}{{ $value }} {{ /each }}

    - -{{@ changelog }} - -

    Files:

    -{{ each files }}

    {{ $value.filename }}

    {{ /each }} diff --git a/lib/routes/modrinth/versions.ts b/lib/routes/modrinth/versions.tsx similarity index 79% rename from lib/routes/modrinth/versions.ts rename to lib/routes/modrinth/versions.tsx index 887be99bbd5f..15eab1f3799f 100644 --- a/lib/routes/modrinth/versions.ts +++ b/lib/routes/modrinth/versions.tsx @@ -1,6 +1,6 @@ -import path from 'node:path'; - import type { Context } from 'hono'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import MarkdownIt from 'markdown-it'; import { config } from '@/config'; @@ -8,7 +8,6 @@ import type { Author, Project, Version } from '@/routes/modrinth/api'; import type { Route } from '@/types'; import _ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const ofetch = _ofetch.create({ headers: { @@ -21,6 +20,30 @@ const md = MarkdownIt({ html: true, }); +const renderVersion = (version: Version & { changelog?: string }) => + renderToString( + <> +

    + {version.name} - {version.version_number} +

    +

    + Loaders: + {version.loaders?.map((loader) => `${loader} `)} +

    +

    + Game Versions: + {version.game_versions?.map((gameVersion) => `${gameVersion} `)} +

    + {version.changelog ? raw(version.changelog) : null} +

    Files:

    + {version.files?.map((file) => ( +

    + {file.filename} +

    + ))} + + ); + export const route: Route = { path: '/project/:id/versions/:routeParams?', categories: ['game'], @@ -67,12 +90,10 @@ export const route: Route = { }; async function handler(ctx: Context) { - const { id, routeParams } = < - { - id: string; - routeParams?: string; - } - >ctx.req.param(); + const { id, routeParams } = ctx.req.param() as { + id: string; + routeParams?: string; + }; /** * /@type {{ @@ -96,7 +117,7 @@ async function handler(ctx: Context) { ids: JSON.stringify([...new Set(versions.map((it) => it.author_id))]), }, }); - const groupedAuthors = >{}; + const groupedAuthors: Record = {}; for (const author of authors) { groupedAuthors[author.id] = author; } @@ -109,7 +130,7 @@ async function handler(ctx: Context) { title: `${it.name} for ${it.loaders.join('/')} on ${[...new Set([it.game_versions[0], it.game_versions.at(-1)])].join('-')}`, link: `https://modrinth.com/project/${id}/version/${it.version_number}`, pubDate: parseDate(it.date_published), - description: art(path.join(__dirname, 'templates/version.art'), { + description: renderVersion({ ...it, changelog: md.render(it.changelog), }), diff --git a/lib/routes/musikguru/news.ts b/lib/routes/musikguru/news.ts index 0b8fc652a535..8409768c3bad 100644 --- a/lib/routes/musikguru/news.ts +++ b/lib/routes/musikguru/news.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,9 +8,10 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '10', 10); @@ -35,7 +34,7 @@ export const handler = async (ctx: Context): Promise => { const title: string = $el.find('h5.card-title').text(); const image: string | undefined = $el.find('img').attr('src'); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { @@ -75,11 +74,8 @@ export const handler = async (ctx: Context): Promise => { const $$: CheerioAPI = load(detailResponse); const title: string = $$('div.article h1').text(); - const description: string | undefined = - item.description + - art(path.join(__dirname, 'templates/description.art'), { - description: ($$('p.lead').html() ?? '') + ($$('div.lead').html() ?? ''), - }); + const leadHtml = ($$('p.lead').html() ?? '') + ($$('div.lead').html() ?? ''); + const description: string | undefined = item.description + renderDescription({ description: leadHtml || undefined }); const pubDateStr: string | undefined = $$('div.article div.text-muted').text().split(/\sUhr/)?.[0]; const image: string | undefined = $$('div.article img').first().attr('src'); const upDatedStr: string | undefined = pubDateStr; diff --git a/lib/routes/musikguru/templates/description.art b/lib/routes/musikguru/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/musikguru/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/musikguru/templates/description.tsx b/lib/routes/musikguru/templates/description.tsx new file mode 100644 index 000000000000..f7661df1ea9a --- /dev/null +++ b/lib/routes/musikguru/templates/description.tsx @@ -0,0 +1,28 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionRenderOptions = { + images?: DescriptionImage[]; + intro?: string; + description?: string; +}; + +export const renderDescription = ({ images, intro, description }: DescriptionRenderOptions): string => + renderToString( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt +
    + ) : null + )} + {intro ?
    {intro}
    : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/mydrivers/index.ts b/lib/routes/mydrivers/index.tsx similarity index 88% rename from lib/routes/mydrivers/index.ts rename to lib/routes/mydrivers/index.tsx index ef18a372171b..9611b8fdcfac 100644 --- a/lib/routes/mydrivers/index.ts +++ b/lib/routes/mydrivers/index.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; import { categories, convertToQueryString, getInfo, processItems, rootUrl, title } from './util'; @@ -82,9 +80,15 @@ async function handler(ctx) { return { title: item.find('div.news_title').text(), link: new URL(item.find('div.news_title span.newst a').prop('href'), rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { - image: item.find('a.newsimg img').prop('src'), - }), + description: renderToString( + <> + {item.find('a.newsimg img').prop('src') ? ( +
    + +
    + ) : null} + + ), author: item.find('p.tname').text(), guid: item.prop('data-id'), pubDate: timezone(parseDate(item.find('p.ttime').text()), +8), diff --git a/lib/routes/mydrivers/templates/description.art b/lib/routes/mydrivers/templates/description.art deleted file mode 100644 index 779c2f675fa5..000000000000 --- a/lib/routes/mydrivers/templates/description.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ if image }} -
    - -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/myfans/post.ts b/lib/routes/myfans/post.tsx similarity index 73% rename from lib/routes/myfans/post.ts rename to lib/routes/myfans/post.tsx index 14aafa7c7c21..424abee90956 100644 --- a/lib/routes/myfans/post.ts +++ b/lib/routes/myfans/post.tsx @@ -1,8 +1,8 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { baseUrl, getPostByAccountId, showByUsername } from './utils'; @@ -30,11 +30,20 @@ export const route: Route = { handler, }; -const render = (postImages, body) => - art(path.join(__dirname, 'templates/post.art'), { - postImages, - body, - }); +const renderDescription = (postImages, body: string): string => + renderToString( + <> + {postImages + ? postImages.map((image) => ( + <> + +
    + + )) + : null} + {body ? raw(body) : null} + + ); async function handler(ctx) { const { username } = ctx.req.param(); @@ -44,7 +53,7 @@ async function handler(ctx) { const items = posts.map((p) => ({ title: p.body?.replaceAll('\r\n', ' ').trim().split(' ')[0], - description: render(p.post_images, p.body?.replaceAll('\r\n', '
    ')), + description: renderDescription(p.post_images, p.body?.replaceAll('\r\n', '
    ')), pubDate: parseDate(p.published_at), link: `${baseUrl}/posts/${p.id}`, author: p.user.name, diff --git a/lib/routes/myfans/templates/post.art b/lib/routes/myfans/templates/post.art deleted file mode 100644 index a4a138169478..000000000000 --- a/lib/routes/myfans/templates/post.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if postImages }} - {{ each postImages img }} -
    - {{ /each }} -{{ /if }} -{{ if body }} - {{@ body }} -{{ /if }} diff --git a/lib/routes/myfigurecollection/activity.ts b/lib/routes/myfigurecollection/activity.tsx similarity index 87% rename from lib/routes/myfigurecollection/activity.ts rename to lib/routes/myfigurecollection/activity.tsx index 8a488e60cd14..e80830773278 100644 --- a/lib/routes/myfigurecollection/activity.ts +++ b/lib/routes/myfigurecollection/activity.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; import { isValidHost } from '@/utils/valid-host'; @@ -98,9 +96,9 @@ async function handler(ctx) { link: `${rootUrl}${item.find('.stamp-anchor .tbx-tooltip').attr('href')}`, pubDate: timezone(parseDate(item.find('.activity-time span').attr('title')), +0), author: item.find('.user-anchor').text(), - description: art(path.join(__dirname, 'templates/activity.art'), { - changelog: item.find('.changelog').text(), - pictures: item + description: renderDescription( + item.find('.changelog').text(), + item .find('.picture-icon') .toArray() .map((image) => @@ -108,8 +106,8 @@ async function handler(ctx) { .html() .match(/url\((.*)\)/)[1] .replace(/\/thumbnails/, '') - ), - }), + ) + ), }; }); @@ -121,3 +119,13 @@ async function handler(ctx) { item: items, }; } + +const renderDescription = (changelog: string, pictures: string[]): string => + renderToString( + <> + {changelog ? <>Changed field: {changelog} : null} + {pictures?.map((picture, index) => ( + + ))} + + ); diff --git a/lib/routes/myfigurecollection/index.ts b/lib/routes/myfigurecollection/index.tsx similarity index 71% rename from lib/routes/myfigurecollection/index.ts rename to lib/routes/myfigurecollection/index.tsx index 3c81d92a4ca2..3fc964f952eb 100644 --- a/lib/routes/myfigurecollection/index.ts +++ b/lib/routes/myfigurecollection/index.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; import { isValidHost } from '@/utils/valid-host'; const shortcuts = { @@ -84,17 +82,15 @@ async function handler(ctx) { const content = load(detailResponse.data); item.title = content('.headline').text(); - item.description = art(path.join(__dirname, 'templates/description.art'), { - pictures: /myfigurecollection\.net\/picture\//.test(item.link) - ? [{ src: content('meta[property="og:image"]').attr('content') }] - : JSON.parse(decodeURIComponent(content('meta[name="pictures"]').attr('content'))), - fields: content('.form-field') + item.description = renderDescription( + /myfigurecollection\.net\/picture\//.test(item.link) ? [{ src: content('meta[property="og:image"]').attr('content') }] : JSON.parse(decodeURIComponent(content('meta[name="pictures"]').attr('content'))), + content('.form-field') .toArray() .map((f) => ({ key: content(f).find('.form-label').text(), value: content(f).find('.form-input').text(), - })), - }); + })) + ); } catch { item.title = `Item #${item.link.split('/').pop()}`; } @@ -112,3 +108,24 @@ async function handler(ctx) { item: items, }; } + +const renderDescription = (pictures: Array<{ src?: string; w?: string; h?: string }>, fields: Array<{ key: string; value: string }>): string => + renderToString( + <> + {pictures?.map((picture, index) => ( + + ))} + {fields.length ? ( + + + {fields.map((field, index) => ( + + + + + ))} + +
    {field.key}{field.value}
    + ) : null} + + ); diff --git a/lib/routes/myfigurecollection/templates/activity.art b/lib/routes/myfigurecollection/templates/activity.art deleted file mode 100644 index 5a1870800012..000000000000 --- a/lib/routes/myfigurecollection/templates/activity.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if changelog }} -Changed field: {{ changelog }} -{{ /if }} -{{ if pictures }} -{{ each pictures picture }} - -{{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/myfigurecollection/templates/description.art b/lib/routes/myfigurecollection/templates/description.art deleted file mode 100644 index 19fb4983dca3..000000000000 --- a/lib/routes/myfigurecollection/templates/description.art +++ /dev/null @@ -1,24 +0,0 @@ -{{ if pictures }} -{{ each pictures picture }} - -{{ /each }} -{{ /if }} -{{ if fields.length != 0 }} - - -{{ each fields field }} - - - - -{{ /each }} - -
    {{ field.key }}{{ field.value }}
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/mymusicsheet/templates/description.art b/lib/routes/mymusicsheet/templates/description.art deleted file mode 100644 index ad498e8de189..000000000000 --- a/lib/routes/mymusicsheet/templates/description.art +++ /dev/null @@ -1,40 +0,0 @@ -
    - {{if youtubeId}} - - {{/if}} - - {{if content.musicName}} -

    Music Name: {{content.musicName}}

    - {{/if}} - - {{if content.musicMemo}} -

    Music Memo: {{content.musicMemo}}

    - {{/if}} - - {{if content.musicianName}} -

    Musician Name: {{content.musicianName}}

    - {{/if}} - - {{if content.instruments && content.instruments.length}} -

    Instruments: - {{each content.instruments}}{{$value}} {{/each}} -

    - {{/if}} - - {{if content.status}} -

    Status: {{content.status}}

    - {{/if}} - - {{if content.price}} -

    Price: {{content.price}}

    - {{/if}} -
    diff --git a/lib/routes/mymusicsheet/usersheets.ts b/lib/routes/mymusicsheet/usersheets.tsx similarity index 81% rename from lib/routes/mymusicsheet/usersheets.ts rename to lib/routes/mymusicsheet/usersheets.tsx index caaa5b8f6be3..2de5d3e5ae4a 100644 --- a/lib/routes/mymusicsheet/usersheets.ts +++ b/lib/routes/mymusicsheet/usersheets.tsx @@ -1,10 +1,9 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/user/sheets/:username/:iso?/:freeOnly?', @@ -196,10 +195,7 @@ async function handler(ctx) { link: `${baseUrl}/${username}/${item.sheetId}`, guid: `https://www.mymusicsheet.com/${username}/${item.sheetId}`, itunes_item_image: item.author.profileUrl, - description: art(path.join(__dirname, 'templates/description.art'), { - youtubeId, - content, - }), + description: renderToString(), author: item.author.name, pubDate: parseDate(item.createdAt), }; @@ -213,3 +209,44 @@ async function handler(ctx) { item: items, }; } + +const MymusicSheetDescription = ({ + youtubeId, + content, +}: { + youtubeId?: string; + content: { + musicName?: string; + musicMemo?: string; + musicianName?: string; + instruments?: string[]; + status?: string; + price?: string; + }; +}) => ( +
    + {youtubeId ? ( + + ) : null} + {content.musicName ?

    Music Name: {content.musicName}

    : null} + {content.musicMemo ?

    Music Memo: {content.musicMemo}

    : null} + {content.musicianName ?

    Musician Name: {content.musicianName}

    : null} + {content.instruments && content.instruments.length ? ( +

    + Instruments: + {content.instruments.map((instrument) => ` ${instrument}`)} +

    + ) : null} + {content.status ?

    Status: {content.status}

    : null} + {content.price ?

    Price: {content.price}

    : null} +
    +); diff --git a/lib/routes/natgeo/dailyphoto.ts b/lib/routes/natgeo/dailyphoto.tsx similarity index 78% rename from lib/routes/natgeo/dailyphoto.ts rename to lib/routes/natgeo/dailyphoto.tsx index ac69a00529d3..347b66384799 100644 --- a/lib/routes/natgeo/dailyphoto.ts +++ b/lib/routes/natgeo/dailyphoto.tsx @@ -1,6 +1,6 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; @@ -8,7 +8,17 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +const renderDescription = (img) => + renderToString( + <> + {img?.altText} +
    +

    {img?.ttl ? raw(img.ttl) : null}

    +

    {img?.dsc ? raw(img.dsc) : null}

    +

    {img?.crdt ? raw(img.crdt) : null}

    + + ); export const route: Route = { path: '/dailyphoto', @@ -46,9 +56,7 @@ async function handler() { const items = media.map((item) => ({ title: item.meta.title, - description: art(path.join(__dirname, 'templates/dailyPhoto.art'), { - img: item.img, - }), + description: renderDescription(item.img), link: rootUrl + item.locator, pubDate: parseDate(item.caption.preHeading), author: item.img.crdt, diff --git a/lib/routes/natgeo/templates/dailyPhoto.art b/lib/routes/natgeo/templates/dailyPhoto.art deleted file mode 100644 index 004525a04fd4..000000000000 --- a/lib/routes/natgeo/templates/dailyPhoto.art +++ /dev/null @@ -1,5 +0,0 @@ -{{@ img.altText }} -
    -

    {{@ img.ttl }}

    -

    {{@ img.dsc }}

    -

    {{@ img.crdt }}

    diff --git a/lib/routes/nationalgeographic/latest-stories.ts b/lib/routes/nationalgeographic/latest-stories.ts deleted file mode 100644 index 27bdd379376c..000000000000 --- a/lib/routes/nationalgeographic/latest-stories.ts +++ /dev/null @@ -1,84 +0,0 @@ -import path from 'node:path'; - -import { load } from 'cheerio'; - -import type { Route } from '@/types'; -import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; - -const findNatgeo = ($) => - JSON.parse( - $('script') - .text() - .match(/\['__natgeo__']=({.*?});/)[1] - ); - -export const route: Route = { - path: '/latest-stories', - categories: ['travel'], - example: '/nationalgeographic/latest-stories', - parameters: {}, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['www.nationalgeographic.com/pages/topic/latest-stories'], - }, - ], - name: 'Latest Stories', - maintainers: ['miles170'], - handler, - url: 'www.nationalgeographic.com/pages/topic/latest-stories', -}; - -async function handler() { - const currentUrl = 'https://www.nationalgeographic.com/pages/topic/latest-stories'; - const response = await got(currentUrl); - const $ = load(response.data); - const items = await Promise.all( - findNatgeo($) - .page.content.hub.frms.flatMap((e) => e.mods) - .flatMap((m) => m.tiles?.filter((t) => t.ctas[0]?.text === 'natgeo.ctaText.read')) - .filter(Boolean) - .map((i) => ({ - title: i.title, - link: i.ctas[0].url, - category: i.tags.map((t) => t.name), - })) - .map((item) => - cache.tryGet(item.link, async () => { - const response = await got(item.link); - const $ = load(response.data); - const mods = findNatgeo($).page.content.prismarticle.frms.find((f) => f.cmsType === 'ArticleBodyFrame').mods; - const bodyTile = mods.find((m) => m.edgs[0].cmsType === 'ArticleBodyTile').edgs[0]; - - item.author = bodyTile.cntrbGrp - .flatMap((c) => c.contributors) - .map((c) => c.displayName) - .join(', '); - item.description = art(path.join(__dirname, 'templates/stories.art'), { - ldMda: bodyTile.ldMda, - description: bodyTile.dscrptn, - body: bodyTile.bdy, - }); - item.pubDate = parseDate(bodyTile.pbDt); - - return item; - }) - ) - ); - - return { - title: $('meta[property="og:title"]').attr('content'), - link: currentUrl, - item: items.filter((item) => item !== null), - }; -} diff --git a/lib/routes/nationalgeographic/latest-stories.tsx b/lib/routes/nationalgeographic/latest-stories.tsx new file mode 100644 index 000000000000..afda5cbc60cb --- /dev/null +++ b/lib/routes/nationalgeographic/latest-stories.tsx @@ -0,0 +1,189 @@ +import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +import type { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; + +const findNatgeo = ($) => + JSON.parse( + $('script') + .text() + .match(/\['__natgeo__']=({.*?});/)[1] + ); + +type StoryMedia = { + src?: string; + altText?: string; +}; + +type StoryImage = { + image?: StoryMedia; + altText?: string; + caption?: string; +}; + +type StoryInlineContent = { + cmsType?: string; + image?: StoryMedia; + caption?: string; + images?: StoryImage[]; + note?: string; + text?: string; + quote?: string; + src?: string; + title?: string; + description?: string; +}; + +type StoryBlock = { + type?: string; + cntnt?: { + mrkup?: string; + cmsType?: string; + } & StoryInlineContent; +}; + +type StoryData = { + ldMda?: { + image?: StoryMedia; + caption?: string; + }; + description?: string; + body?: StoryBlock[]; +}; + +const renderStoriesDescription = ({ ldMda, description, body }: StoryData) => + renderToString( + <> + {ldMda?.image?.src ? ( +
    + {ldMda.image.altText} +
    {ldMda.caption}
    +
    + ) : null} + {description ? ( +

    + {description} +

    + ) : null} + {body?.length + ? body.map((block) => { + if (block.type === 'p') { + return

    {block.cntnt?.mrkup ? raw(block.cntnt.mrkup) : null}

    ; + } + if (block.type !== 'inline') { + return null; + } + + const content = block.cntnt; + switch (content?.cmsType) { + case 'image': + return content.image?.src ? ( +
    + {content.image.altText} +
    {content.caption ? raw(content.caption) : null}
    +
    + ) : null; + case 'imagegroup': + return content.images?.map((image) => + image.image?.src ? ( +
    + {image.image.altText} +
    {image.caption ? raw(image.caption) : null}
    +
    + ) : null + ); + case 'editorsNote': + return content.note ?

    {raw(content.note)}

    : null; + case 'listicle': + return content.text ?

    {raw(content.text)}

    : null; + case 'pullquote': + return content.quote ? {raw(content.quote)} : null; + case 'source': + return content.src ? {content.src} : null; + case 'video': + return content.image?.src ? ( +
    + {content.image.altText} + {content.title ?
    {raw(content.title)}
    : null} + {content.description ?
    {raw(content.description)}
    : null} +
    + ) : null; + default: + return null; + } + }) + : null} + + ); + +export const route: Route = { + path: '/latest-stories', + categories: ['travel'], + example: '/nationalgeographic/latest-stories', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.nationalgeographic.com/pages/topic/latest-stories'], + }, + ], + name: 'Latest Stories', + maintainers: ['miles170'], + handler, + url: 'www.nationalgeographic.com/pages/topic/latest-stories', +}; + +async function handler() { + const currentUrl = 'https://www.nationalgeographic.com/pages/topic/latest-stories'; + const response = await got(currentUrl); + const $ = load(response.data); + const items = await Promise.all( + findNatgeo($) + .page.content.hub.frms.flatMap((e) => e.mods) + .flatMap((m) => m.tiles?.filter((t) => t.ctas[0]?.text === 'natgeo.ctaText.read')) + .filter(Boolean) + .map((i) => ({ + title: i.title, + link: i.ctas[0].url, + category: i.tags.map((t) => t.name), + })) + .map((item) => + cache.tryGet(item.link, async () => { + const response = await got(item.link); + const $ = load(response.data); + const mods = findNatgeo($).page.content.prismarticle.frms.find((f) => f.cmsType === 'ArticleBodyFrame').mods; + const bodyTile = mods.find((m) => m.edgs[0].cmsType === 'ArticleBodyTile').edgs[0]; + + item.author = bodyTile.cntrbGrp + .flatMap((c) => c.contributors) + .map((c) => c.displayName) + .join(', '); + item.description = renderStoriesDescription({ + ldMda: bodyTile.ldMda, + description: bodyTile.dscrptn, + body: bodyTile.bdy, + }); + item.pubDate = parseDate(bodyTile.pbDt); + + return item; + }) + ) + ); + + return { + title: $('meta[property="og:title"]').attr('content'), + link: currentUrl, + item: items.filter((item) => item !== null), + }; +} diff --git a/lib/routes/nationalgeographic/templates/stories.art b/lib/routes/nationalgeographic/templates/stories.art deleted file mode 100644 index 039e7304711b..000000000000 --- a/lib/routes/nationalgeographic/templates/stories.art +++ /dev/null @@ -1,44 +0,0 @@ -{{ if ldMda }} -
    - {{ ldMda.image.altText }} -
    {{ ldMda.caption }}
    -
    -{{ /if }} - -{{ if description }} -

    {{ description }}

    -{{ /if }} - -{{ each body b }} - {{ if b.type === 'p' }} -

    {{@ b.cntnt.mrkup }}

    - {{ else if b.type === 'inline' }} - {{ if b.cntnt.cmsType === 'image' && b.cntnt.image?.src }} -
    - {{ b.cntnt.image.altText }} -
    {{@ b.cntnt.caption }}
    -
    - {{ else if b.cntnt.cmsType === 'imagegroup' }} - {{ each b.cntnt.images img }} -
    - {{ img.image.altText }} -
    {{@ img.caption }}
    -
    - {{ /each }} - {{ else if b.cntnt.cmsType === 'editorsNote' }} -

    {{@ b.cntnt.note }}

    - {{ else if b.cntnt.cmsType === 'listicle' }} -

    {{@ b.cntnt.text }}

    - {{ else if b.cntnt.cmsType === 'pullquote' }} - {{@ b.cntnt.quote }} - {{ else if b.cntnt.cmsType === 'source' }} - {{ b.cntnt.src }} - {{ else if b.cntnt.cmsType === 'video' }} -
    - {{ b.cntnt.image.altText }} -
    {{@ b.cntnt.title }}
    -
    {{@ b.cntnt.description }}
    -
    - {{ /if }} - {{ /if }} -{{ /each }} diff --git a/lib/routes/nautil/templates/description.art b/lib/routes/nautil/templates/description.art deleted file mode 100644 index 8f54b3c7a72a..000000000000 --- a/lib/routes/nautil/templates/description.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ if head.og_image }} -{{ each head.og_image img }} - -{{ /each }} -{{ /if }} -{{@ rendered }} diff --git a/lib/routes/nautil/topics.ts b/lib/routes/nautil/topics.tsx similarity index 88% rename from lib/routes/nautil/topics.ts rename to lib/routes/nautil/topics.tsx index 437f8b6e7110..443d46d9936a 100644 --- a/lib/routes/nautil/topics.ts +++ b/lib/routes/nautil/topics.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const baseUrl = 'https://nautil.us'; @@ -69,10 +68,12 @@ async function handler(ctx) { return { title: item.title.rendered, author: item.yoast_head_json.author, - description: art(path.join(__dirname, 'templates/description.art'), { - head, - rendered: $.html(), - }), + description: renderToString( + <> + {head.og_image?.length ? head.og_image.map((image) => ) : null} + {raw($.html())} + + ), link: item.link, pubDate: parseDate(item.date_gmt), }; diff --git a/lib/routes/nber/common.ts b/lib/routes/nber/common.tsx similarity index 82% rename from lib/routes/nber/common.ts rename to lib/routes/nber/common.tsx index dc57d5eef599..821f2c1dc3df 100644 --- a/lib/routes/nber/common.ts +++ b/lib/routes/nber/common.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import cache from '@/utils/cache'; import { getSubPath } from '@/utils/common-utils'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; async function getData(url) { const response = await ofetch(url); @@ -33,10 +32,12 @@ export async function handler(ctx) { pubDate: parseDate($('meta[name="citation_publication_date"]').attr('content'), 'YYYY/MM/DD'), link, doi: $('meta[name="citation_doi"]').attr('content'), - description: art(path.join(__dirname, 'template/description.art'), { - fullAbstract, - downloadLink, - }), + description: renderToString( + <> + {fullAbstract ? raw(fullAbstract) : null} + {downloadLink ? Download PDF : null} + + ), }; }); }) diff --git a/lib/routes/nber/template/description.art b/lib/routes/nber/template/description.art deleted file mode 100644 index c013cb155e4b..000000000000 --- a/lib/routes/nber/template/description.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ if fullAbstract }} -{{@ fullAbstract }} -{{ /if}} -{{ if downloadLink }} -Download PDF -{{ /if }} \ No newline at end of file diff --git a/lib/routes/ncc-cma/cmdp.ts b/lib/routes/ncc-cma/cmdp.tsx similarity index 97% rename from lib/routes/ncc-cma/cmdp.ts rename to lib/routes/ncc-cma/cmdp.tsx index 2dafbe79fab3..39dc973af1a6 100644 --- a/lib/routes/ncc-cma/cmdp.ts +++ b/lib/routes/ncc-cma/cmdp.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import iconv from 'iconv-lite'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const handler = async (ctx) => { const { id = 'RPJQWQYZ' } = ctx.req.param(); @@ -47,16 +45,13 @@ export const handler = async (ctx) => { titles.push(title); } - const description = art(path.join(__dirname, 'templates/description.art'), { - images: image - ? [ - { - src: image, - alt: `${title} ${date}`, - }, - ] - : undefined, - }); + const description = renderToString( + image ? ( +
    + {`${title} +
    + ) : null + ); const guid = `ncc-cma#${id}#${date}`; return { diff --git a/lib/routes/ncc-cma/templates/description.art b/lib/routes/ncc-cma/templates/description.art deleted file mode 100644 index baa09169346d..000000000000 --- a/lib/routes/ncc-cma/templates/description.art +++ /dev/null @@ -1,9 +0,0 @@ -{{ if image?.src }} -
    - {{ image.alt }} -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/netflav/index.ts b/lib/routes/netflav/index.tsx similarity index 75% rename from lib/routes/netflav/index.ts rename to lib/routes/netflav/index.tsx index d8db0403ec33..048f9dbcf8c1 100644 --- a/lib/routes/netflav/index.ts +++ b/lib/routes/netflav/index.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/', @@ -37,10 +35,7 @@ async function handler() { const items = [...initialState.censored.docs, ...initialState.uncensored.docs, ...initialState.chinese.docs, ...initialState.trending.docs].map((item) => ({ title: item.title, - description: art(path.join(__dirname, 'templates/description.art'), { - description: item.description, - images: [...new Set([item.preview_hp, item.preview, item.previewImagesUrl, ...(item.previewImages || [])])].filter(Boolean), - }), + description: renderDescription([...new Set([item.preview_hp, item.preview, item.previewImagesUrl, ...(item.previewImages || [])])].filter(Boolean), item.description), link: `https://netflav.com/video?id=${item.videoId}`, pubDate: parseDate(item.sourceDate), author: [...new Set(item.actors.map((a) => a.replace(/^(\w{2}:)/, '')))].join(', '), @@ -57,3 +52,13 @@ async function handler() { allowEmpty: true, }; } + +const renderDescription = (images: string[], description: string): string => + renderToString( + <> + {images?.map((img, index) => ( + + ))} + {description ?

    {description}

    : null} + + ); diff --git a/lib/routes/netflav/templates/description.art b/lib/routes/netflav/templates/description.art deleted file mode 100644 index 55626c1b22d4..000000000000 --- a/lib/routes/netflav/templates/description.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if images }} - {{ each images img }} - - {{ /each }} -{{ /if }} -{{ if description }} -

    {{ description }}

    -{{ /if }} diff --git a/lib/routes/news/templates/description.art b/lib/routes/news/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/news/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/news/templates/description.tsx b/lib/routes/news/templates/description.tsx new file mode 100644 index 000000000000..e8f5192435a1 --- /dev/null +++ b/lib/routes/news/templates/description.tsx @@ -0,0 +1,22 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionData = { + images?: DescriptionImage[]; + intro?: string; + description?: string; +}; + +export const renderDescription = ({ images, intro, description }: DescriptionData) => + renderToString( + <> + {images?.length ? images.map((image) => (image?.src ?
    {image.alt ? {image.alt} : }
    : null)) : null} + {intro ?
    {intro}
    : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/news/xhsxw.ts b/lib/routes/news/xhsxw.ts index 85d7a074c9e6..94c31207ee1e 100644 --- a/lib/routes/news/xhsxw.ts +++ b/lib/routes/news/xhsxw.ts @@ -1,14 +1,13 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + export const route: Route = { path: ['/xhsxw', '/whxw'], categories: ['new-media'], @@ -56,7 +55,7 @@ async function handler(ctx) { let items = response.slice(0, limit).map((item) => ({ title: item.title, link: new URL(item.publishUrl, rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ images: item.shareImages?.map((i) => ({ src: i.imageUrl, @@ -78,7 +77,7 @@ async function handler(ctx) { const content = load(detailResponse); - item.description += art(path.join(__dirname, 'templates/description.art'), { + item.description += renderDescription({ description: content('#detailContent').html(), }); } catch { diff --git a/lib/routes/newslaundry/templates/description.art b/lib/routes/newslaundry/templates/description.art deleted file mode 100644 index a5126e29bcdb..000000000000 --- a/lib/routes/newslaundry/templates/description.art +++ /dev/null @@ -1,28 +0,0 @@ -{{if subheadline}} -

    {{subheadline}}

    -{{/if}} - -{{if heroImage}} -
    - {{heroAlt}} -
    {{heroCaption}}{{if heroAttribution}} ({{heroAttribution}}){{/if}}
    -
    -{{/if}} - -{{each elements}} - {{if $value.type === 'text'}} - {{@ $value.text}} - {{else if $value.type === 'image'}} -
    - {{$value.alt}} -
    {{$value.title}}
    -
    - {{else if $value.type === 'jsembed'}} - {{@ $value.content}} - {{else if $value.type === 'youtube-video'}} -
    - -
    Watch on YouTube
    -
    - {{/if}} -{{/each}} diff --git a/lib/routes/newslaundry/utils.ts b/lib/routes/newslaundry/utils.tsx similarity index 67% rename from lib/routes/newslaundry/utils.ts rename to lib/routes/newslaundry/utils.tsx index c8843657b445..2e4afb1fb4bb 100644 --- a/lib/routes/newslaundry/utils.ts +++ b/lib/routes/newslaundry/utils.tsx @@ -1,9 +1,9 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, DataItem } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const rootUrl = 'https://www.newslaundry.com'; @@ -80,14 +80,56 @@ function processStory(story: any): DataItem { ) || []; // Render content using template - const content = art(path.join(__dirname, 'templates/description.art'), { - heroImage, - heroAlt: story['hero-image-alt-text'] || '', - heroCaption: story['hero-image-caption'] || '', - heroAttribution: story['hero-image-attribution'], - elements, - subheadline: story.subheadline, - }); + const heroCaption = story['hero-image-caption'] || ''; + const heroAttribution = story['hero-image-attribution']; + const content = renderToString( + <> + {story.subheadline ? ( +

    + {story.subheadline} +

    + ) : null} + {heroImage ? ( +
    + {story['hero-image-alt-text'] +
    {heroAttribution ? `${heroCaption} (${heroAttribution})` : heroCaption}
    +
    + ) : null} + {elements.map((element) => { + if (element.type === 'text') { + return raw(element.text); + } + + if (element.type === 'image') { + return ( +
    + {element.alt} +
    {element.title}
    +
    + ); + } + + if (element.type === 'jsembed') { + return raw(element.content); + } + + if (element.type === 'youtube-video') { + return ( +
    + +
    + + Watch on YouTube + +
    +
    + ); + } + + return null; + })} + + ); // Extract author information const authors = diff --git a/lib/routes/newzmz/templates/description.art b/lib/routes/newzmz/templates/description.art deleted file mode 100644 index 6ea2ee5821c9..000000000000 --- a/lib/routes/newzmz/templates/description.art +++ /dev/null @@ -1,59 +0,0 @@ -{{ if image }} -
    - {{ nameZh }}{{ if nameEn }} - {{ nameEn }}{{ /if }} -
    -{{ /if }} - - - {{ if nameZh }} - - - - - {{ /if }} - {{ if nameEn }} - - - - - {{ /if }} - {{ if alias }} - - - - - {{ /if }} - {{ if update }} - - - - - {{ /if }} - {{ if links }} - {{ each links link }} - - - - - {{ /each }} - {{ /if }} - {{ if categories }} - - - - - {{ /if }} - {{ if downLinks }} - {{ each downLinks link }} - - - - - {{ /each }} - {{ /if }} - -
    中文名{{ nameZh }}
    英文名{{ nameEn }}
    又名{{ alias.join(' / ') }}
    更新频率{{ update }}
    {{ link.title }} - {{ link.link }} -
    标签{{ categories.join(' / ') }}
    {{ link.title }} - {{ link.link }} -
    \ No newline at end of file diff --git a/lib/routes/newzmz/templates/description.tsx b/lib/routes/newzmz/templates/description.tsx new file mode 100644 index 000000000000..13d997c95754 --- /dev/null +++ b/lib/routes/newzmz/templates/description.tsx @@ -0,0 +1,85 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type LinkItem = { + title?: string; + link?: string; +}; + +type DescriptionData = { + image?: string; + nameZh?: string; + nameEn?: string; + alias?: string[]; + update?: string; + links?: LinkItem[]; + categories?: string[]; + downLinks?: LinkItem[]; +}; + +export const renderDescription = ({ image, nameZh, nameEn, alias, update, links, categories, downLinks }: DescriptionData) => { + const alt = `${nameZh ?? ''}${nameEn ? ` - ${nameEn}` : ''}`; + + return renderToString( + <> + {image ? ( +
    + {alt} +
    + ) : null} + + + {nameZh ? ( + + + + + ) : null} + {nameEn ? ( + + + + + ) : null} + {alias?.length ? ( + + + + + ) : null} + {update ? ( + + + + + ) : null} + {links?.length + ? links.map((link) => ( + + + + + )) + : null} + {categories?.length ? ( + + + + + ) : null} + {downLinks?.length + ? downLinks.map((link) => ( + + + + + )) + : null} + +
    中文名{nameZh}
    英文名{nameEn}
    又名{alias.join(' / ')}
    更新频率{update}
    {link.title} + {link.link} +
    标签{categories.join(' / ')}
    {link.title} + {link.link} +
    + + ); +}; diff --git a/lib/routes/newzmz/util.ts b/lib/routes/newzmz/util.ts index 8dfc1405c474..a8fdb810a184 100644 --- a/lib/routes/newzmz/util.ts +++ b/lib/routes/newzmz/util.ts @@ -1,10 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const rootUrl = 'https://nzmz.xyz'; @@ -144,9 +143,8 @@ const processItems = async (i, downLinkType, itemSelector, categorySelector, dow guid, title, link: i.link, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ ...i.description, - categories, downLinks, }), diff --git a/lib/routes/nhentai/templates/desc.art b/lib/routes/nhentai/templates/desc.art deleted file mode 100644 index c8f15fadc9ca..000000000000 --- a/lib/routes/nhentai/templates/desc.art +++ /dev/null @@ -1,4 +0,0 @@ -

    {{ length }} pages


    -{{ each images i }} -
    -{{ /each }} diff --git a/lib/routes/nhentai/util.ts b/lib/routes/nhentai/util.tsx similarity index 90% rename from lib/routes/nhentai/util.ts rename to lib/routes/nhentai/util.tsx index 3bd5d9bb4f8e..3201a4158eb1 100644 --- a/lib/routes/nhentai/util.ts +++ b/lib/routes/nhentai/util.tsx @@ -1,13 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; import got from '@/utils/got'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const baseUrl = 'https://nhentai.net'; @@ -140,11 +138,22 @@ const getDetail = async (simple) => { ...simple, title: $('div#info > h2').text() || $('div#info > h1').text(), pubDate: parseDate($('time').attr('datetime')), - description: art(path.join(__dirname, 'templates/desc.art'), { - length: galleryImgs.length, - images: galleryImgs, - }), + description: renderDescription(galleryImgs.length, galleryImgs), }; }; +const renderDescription = (length: number, images: string[]): string => + renderToString( + <> +

    {length} pages

    +
    + {images.map((image, index) => ( + + +
    +
    + ))} + + ); + export { baseUrl, getDetails, getSimple, getTorrents }; diff --git a/lib/routes/nhk/news-web-easy.ts b/lib/routes/nhk/news-web-easy.tsx similarity index 89% rename from lib/routes/nhk/news-web-easy.ts rename to lib/routes/nhk/news-web-easy.tsx index 7a30870aaef0..8598c03857e8 100644 --- a/lib/routes/nhk/news-web-easy.ts +++ b/lib/routes/nhk/news-web-easy.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -77,10 +76,13 @@ async function handler(ctx) { let items = Object.values(dates).flatMap((articles) => articles.map((article) => ({ title: article.title, - description: art(path.join(__dirname, 'templates/news_web_easy.art'), { - title: article.title_with_ruby, - image: article.news_web_image_uri, - }), + description: renderToString( + <> + {article.title_with_ruby ?

    {raw(article.title_with_ruby)}

    : null} + {article.news_web_image_uri ? : null} +
    + + ), guid: article.news_id, pubDate: timezone(parseDate(article.news_prearranged_time), +9), link: `https://news.web.nhk/news/easy/${article.news_id}/${article.news_id}.html`, diff --git a/lib/routes/nhk/news.ts b/lib/routes/nhk/news.tsx similarity index 82% rename from lib/routes/nhk/news.ts rename to lib/routes/nhk/news.tsx index ddd28b7395ee..018dff62ca6c 100644 --- a/lib/routes/nhk/news.ts +++ b/lib/routes/nhk/news.tsx @@ -1,11 +1,11 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const baseUrl = 'https://www3.nhk.or.jp'; const apiUrl = 'https://api.nhkworld.jp'; @@ -80,10 +80,20 @@ async function handler(ctx) { cache.tryGet(item.link, async () => { const { data } = await got(`${apiUrl}/nwapi/rdnewsweb/v6b/${lang}/detail/${item.id}.json`); item.category = Object.values(data.data.categories); - item.description = art(path.join(__dirname, 'templates/news.art'), { - img: data.data.thumbnails, - description: data.data.detail.replaceAll('\n\n', '

    '), - }); + const img = data.data.thumbnails; + const imageSrc = img?.large || img?.middle || img?.small || img?.min; + const description = data.data.detail.replaceAll('\n\n', '

    '); + item.description = renderToString( + <> + {imageSrc ? ( + <> + {img?.alt} +
    + + ) : null} + {description ? raw(description) : null} + + ); delete item.id; return item; }) diff --git a/lib/routes/nhk/templates/news.art b/lib/routes/nhk/templates/news.art deleted file mode 100644 index e24a33059e0f..000000000000 --- a/lib/routes/nhk/templates/news.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ if img }} -{{ img.alt }} -
    -{{ /if }} -{{@ description }} diff --git a/lib/routes/nhk/templates/news_web_easy.art b/lib/routes/nhk/templates/news_web_easy.art deleted file mode 100644 index 81fa528831fd..000000000000 --- a/lib/routes/nhk/templates/news_web_easy.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if title }} -

    {{@ title }}

    -{{ /if }} -{{ if image }} - -{{ /if }} -
    \ No newline at end of file diff --git a/lib/routes/nicovideo/templates/video.art b/lib/routes/nicovideo/templates/video.art deleted file mode 100644 index 457b2e399a47..000000000000 --- a/lib/routes/nicovideo/templates/video.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if embed }} - -{{ else }} - -{{ /if }} -
    -{{@ video.shortDescription }} diff --git a/lib/routes/nicovideo/utils.ts b/lib/routes/nicovideo/utils.tsx similarity index 77% rename from lib/routes/nicovideo/utils.ts rename to lib/routes/nicovideo/utils.tsx index d23fe8ae0887..7e0d2b4ef8b1 100644 --- a/lib/routes/nicovideo/utils.ts +++ b/lib/routes/nicovideo/utils.tsx @@ -1,9 +1,9 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; import type { Essential, Mylist, UserInfo, VideoItem } from './types'; @@ -58,4 +58,15 @@ export const getMylist = (id: string): Promise => false ); -export const renderVideo = (video: Essential, embed: boolean) => art(path.join(__dirname, 'templates/video.art'), { video, embed }); +export const renderVideo = (video: Essential, embed: boolean) => + renderToString( + <> + {embed ? ( +
    -{{ /if }} diff --git a/lib/routes/npm/package.ts b/lib/routes/npm/package.tsx similarity index 71% rename from lib/routes/npm/package.ts rename to lib/routes/npm/package.tsx index 6afb0fc577f6..b451b4d52627 100644 --- a/lib/routes/npm/package.ts +++ b/lib/routes/npm/package.tsx @@ -1,8 +1,7 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; export const route: Route = { path: '/package/:name{(@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*}', @@ -45,12 +44,21 @@ async function handler(ctx) { item: [ { title: `${name} - npm`, - description: art(path.join(__dirname, 'templates/package.art'), { - packageDownloadCountLastMonth: downloadCountLastMonthRes.downloads, - packageDownloadCountLastWeek: downloadCountLastWeekRes.downloads, - packageDownloadCountLastDay: downloadCountLastDayRes.downloads, - packageVersion: packageVersionList, - }), + description: renderToString( + <> +

    Download

    +

    Last Day: {downloadCountLastDayRes.downloads}

    +

    Last week: {downloadCountLastWeekRes.downloads}

    +

    Last month: {downloadCountLastMonthRes.downloads}

    +
    +

    Version

    + {packageVersionList.map((version) => ( +

    + {version.version}: {version.time} +

    + ))} + + ), link: `https://www.npmjs.com/package/${name}`, guid: `https://www.npmjs.com/package/${name}${packageVersion.modified}`, }, diff --git a/lib/routes/npm/templates/package.art b/lib/routes/npm/templates/package.art deleted file mode 100644 index db7b75a365e7..000000000000 --- a/lib/routes/npm/templates/package.art +++ /dev/null @@ -1,10 +0,0 @@ -

    Download

    -

    Last Day: {{packageDownloadCountLastDay}}

    -

    Last week: {{packageDownloadCountLastWeek}}

    -

    Last month: {{packageDownloadCountLastMonth}}

    -
    -

    Version

    -{{ each packageVersion}} -

    {{$value.version}}: {{$value.time}}

    -{{/each}} - diff --git a/lib/routes/nytimes/daily-briefing-chinese.ts b/lib/routes/nytimes/daily-briefing-chinese.tsx similarity index 91% rename from lib/routes/nytimes/daily-briefing-chinese.ts rename to lib/routes/nytimes/daily-briefing-chinese.tsx index f41dbc03d1fc..45d5e04c07f1 100644 --- a/lib/routes/nytimes/daily-briefing-chinese.ts +++ b/lib/routes/nytimes/daily-briefing-chinese.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/daily_briefing_chinese', @@ -74,9 +72,11 @@ async function handler() { let i = 0; content('figure').each(function () { content(this).html( - art(path.join(__dirname, 'templates/image.art'), { - url: images[i++], - }) + renderToString( +
    + +
    + ) ); }); diff --git a/lib/routes/nytimes/templates/image.art b/lib/routes/nytimes/templates/image.art deleted file mode 100644 index f86c4f723547..000000000000 --- a/lib/routes/nytimes/templates/image.art +++ /dev/null @@ -1,3 +0,0 @@ -
    - -
    \ No newline at end of file diff --git a/lib/routes/oceanengine/arithmetic-index.ts b/lib/routes/oceanengine/arithmetic-index.tsx similarity index 85% rename from lib/routes/oceanengine/arithmetic-index.ts rename to lib/routes/oceanengine/arithmetic-index.tsx index e07116501858..67f24c93daed 100644 --- a/lib/routes/oceanengine/arithmetic-index.ts +++ b/lib/routes/oceanengine/arithmetic-index.tsx @@ -1,7 +1,8 @@ import { createDecipheriv } from 'node:crypto'; -import path from 'node:path'; import dayjs from 'dayjs'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import InvalidParameterError from '@/errors/types/invalid-parameter'; @@ -9,7 +10,6 @@ import type { Route } from '@/types'; import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; // Parameters @@ -73,14 +73,16 @@ const searchLinkUrls = (keyword) => [ const searchLinkNames = ['今日热榜', '百度', '谷歌', '知乎', '微博', '抖音', '头条']; const createContent = (keyword, queryList, queryListText) => - art(path.join(__dirname, 'templates/content.art'), { - keyword, - queryListText, - queries: queryList.map((query) => ({ - links: searchLinkUrls(encodeURIComponent(query)).map((url, index) => `${searchLinkNames[index]}`), - key: query, - })), - }); + renderToString( + ({ + links: searchLinkUrls(encodeURIComponent(query)).map((url, index) => `${searchLinkNames[index]}`), + key: query, + }))} + /> + ); export const route: Route = { path: '/index/:keyword/:channel?', @@ -156,3 +158,22 @@ async function handler(ctx) { item, }; } + +const OceanengineContent = ({ queryListText, queries }: { queryListText: string; queries: { key: string; links: string[] }[] }) => ( +
    +

    关键词:

    + {queryListText} +       +
    + {queries.map((query) => ( + <> +

    {query.key}

    +

    + {query.links.map((link) => ( + <>{raw(link)}   + ))} +

    + + ))} +
    +); diff --git a/lib/routes/oceanengine/templates/content.art b/lib/routes/oceanengine/templates/content.art deleted file mode 100644 index e6bf96c60c2b..000000000000 --- a/lib/routes/oceanengine/templates/content.art +++ /dev/null @@ -1,14 +0,0 @@ -
    -

    关键词:

    - {{queryListText}} -       -
    - {{each queries q}} -

    {{q.key}}

    -

    - {{each q.links l}} - {{@l}}   - {{/each}} -

    - {{/each}} -
    \ No newline at end of file diff --git a/lib/routes/oeeee/app/channel.ts b/lib/routes/oeeee/app/channel.ts index a35932058c27..e8540bd7474a 100644 --- a/lib/routes/oeeee/app/channel.ts +++ b/lib/routes/oeeee/app/channel.ts @@ -1,12 +1,10 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from '../templates/description'; import { parseArticle } from '../utils'; export const route: Route = { @@ -26,7 +24,7 @@ async function handler(ctx) { .filter((i) => i.url) // Remove banner and sticky articles. .map((item) => ({ title: item.title, - description: art(path.join(__dirname, '../templates/description.art'), { + description: renderDescription({ thumb: item.titleimg.replaceAll(/\?x-oss-process=.*/g, ''), description: item.summary, }), diff --git a/lib/routes/oeeee/app/reporter.ts b/lib/routes/oeeee/app/reporter.ts index da2a5f33c1ff..963c0779dc32 100644 --- a/lib/routes/oeeee/app/reporter.ts +++ b/lib/routes/oeeee/app/reporter.ts @@ -1,10 +1,8 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; +import { renderDescription } from '../templates/description'; import { parseArticle } from '../utils'; export const route: Route = { @@ -34,7 +32,7 @@ async function handler(ctx) { const list = response.data.list.map((item) => ({ title: '【' + item.media_nickname + '】' + item.title, - description: art(path.join(__dirname, '../templates/description.art'), { + description: renderDescription({ thumb: item.titleimg, description: item.summary, }), diff --git a/lib/routes/oeeee/templates/description.art b/lib/routes/oeeee/templates/description.art deleted file mode 100644 index 8768b47a59cf..000000000000 --- a/lib/routes/oeeee/templates/description.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if thumb }} -
    -{{ /if }} -{{ if description }} -

    {{ description }}

    -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/oeeee/templates/description.tsx b/lib/routes/oeeee/templates/description.tsx new file mode 100644 index 000000000000..6e828c017a58 --- /dev/null +++ b/lib/routes/oeeee/templates/description.tsx @@ -0,0 +1,27 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + thumb?: string; + description?: string; +}; + +const OeeeeDescription = ({ thumb, description }: DescriptionData) => ( + <> + {thumb ? ( + <> + +
    + + ) : null} + {description ? ( + <> +
    +

    {description}

    +
    +
    + + ) : null} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/oeeee/web.ts b/lib/routes/oeeee/web.ts index 81ee21e0445c..962d33594b23 100644 --- a/lib/routes/oeeee/web.ts +++ b/lib/routes/oeeee/web.ts @@ -1,12 +1,10 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; import { parseArticle } from './utils'; export const route: Route = { @@ -37,7 +35,7 @@ async function handler(ctx) { const list = response.data.map((item) => ({ title: '【' + item.channel_name + '】' + item.title, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ thumb: item.img, description: item.summary, }), diff --git a/lib/routes/oncc/index.ts b/lib/routes/oncc/index.tsx similarity index 88% rename from lib/routes/oncc/index.ts rename to lib/routes/oncc/index.tsx index 07198123d4a6..45f4ec3e5e3b 100644 --- a/lib/routes/oncc/index.ts +++ b/lib/routes/oncc/index.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const rootUrl = 'https://hk.on.cc'; @@ -89,7 +88,7 @@ async function handler(ctx) { const $ = load(detailResponse.data); const imageUrl = rootUrl + $('img').eq(0).attr('src'); const content = $('div.breakingNewsContent').html(); - const description = art(path.join(__dirname, 'templates/article.art'), { + const description = renderArticleDescription({ imageUrl, content, }); @@ -108,3 +107,11 @@ async function handler(ctx) { item: items, }; } + +const renderArticleDescription = ({ imageUrl, content }: { imageUrl: string; content?: string }): string => + renderToString( + <> + + {content ? raw(content) : null} + + ); diff --git a/lib/routes/oncc/money18.ts b/lib/routes/oncc/money18.ts index 436b706432fe..391506af7bb6 100644 --- a/lib/routes/oncc/money18.ts +++ b/lib/routes/oncc/money18.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import dayjs from 'dayjs'; @@ -7,9 +5,10 @@ import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/money18'; + const sections = { exp: '新聞總覽', fov: '全日焦點', @@ -85,7 +84,7 @@ async function handler(ctx) { title: item.title, author: item.authorname, link: `${rootUrl}/finnews/content/${id}/${item.articleId}.html`, - description: art(path.join(__dirname, 'templates/money18.art'), { + description: renderDescription({ images: item.hasHdPhoto ? [`https://hk.on.cc/hk/bkn${item.hdEnlargeThumbnail}`] : undefined, description: item.content, }), @@ -119,7 +118,7 @@ async function handler(ctx) { const content = load(detailResponse.data); - item.description = art(path.join(__dirname, 'templates/money18.art'), { + item.description = renderDescription({ images: content('.photo img') .toArray() .map((i) => content(i).attr('src')), diff --git a/lib/routes/oncc/templates/article.art b/lib/routes/oncc/templates/article.art deleted file mode 100644 index 4fd443f47109..000000000000 --- a/lib/routes/oncc/templates/article.art +++ /dev/null @@ -1,2 +0,0 @@ - -{{@ content }} diff --git a/lib/routes/oncc/templates/money18.art b/lib/routes/oncc/templates/money18.art deleted file mode 100644 index dcb463751826..000000000000 --- a/lib/routes/oncc/templates/money18.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ if images }} -{{ each images image }} - -{{ /each }} -{{ /if }} -{{@ description }} diff --git a/lib/routes/oncc/templates/money18.tsx b/lib/routes/oncc/templates/money18.tsx new file mode 100644 index 000000000000..d7861f66b779 --- /dev/null +++ b/lib/routes/oncc/templates/money18.tsx @@ -0,0 +1,18 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionProps = { + images?: string[]; + description?: string; +}; + +const Description = ({ images, description }: DescriptionProps) => ( + <> + {images?.map((image, index) => ( + + ))} + {description ? <>{raw(description)} : null} + +); + +export const renderDescription = (props: DescriptionProps): string => renderToString(); diff --git a/lib/routes/onet/news.ts b/lib/routes/onet/news.tsx similarity index 81% rename from lib/routes/onet/news.ts rename to lib/routes/onet/news.tsx index fc456648a134..74b5565568e0 100644 --- a/lib/routes/onet/news.ts +++ b/lib/routes/onet/news.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import parser from '@/utils/rss-parser'; import { parseArticleContent, parseMainImage } from './utils'; @@ -53,11 +52,7 @@ async function handler() { const mainImage = parseMainImage($); - const description = art(path.join(__dirname, 'templates/article.art'), { - mainImage, - lead: $('#lead').text()?.trim(), - content: content.html()?.trim(), - }); + const description = renderDescription($('#lead').text()?.trim(), mainImage, content.html()?.trim()); const author = $('.authorNameWrapper span[itemprop="name"]').text()?.trim(); const category = $('span.relatedTopic').text()?.trim(); @@ -84,3 +79,16 @@ async function handler() { image: 'https://ocdn.eu/wiadomosciucs/static/logo2017/onet2017big_dark.png', }; } + +const renderDescription = (lead: string | undefined, mainImage: string, content: string | undefined): string => + renderToString( + <> + {lead ? ( +

    + {lead} +

    + ) : null} + {raw(mainImage)} + {content ? raw(content) : null} + + ); diff --git a/lib/routes/onet/templates/article.art b/lib/routes/onet/templates/article.art deleted file mode 100644 index 36ed5db532ab..000000000000 --- a/lib/routes/onet/templates/article.art +++ /dev/null @@ -1,5 +0,0 @@ -{{if lead }} -

    {{ lead }}

    -{{/if}} -{{@ mainImage }} -{{@ content }} diff --git a/lib/routes/onet/templates/image.art b/lib/routes/onet/templates/image.art deleted file mode 100644 index a4a8c87244e1..000000000000 --- a/lib/routes/onet/templates/image.art +++ /dev/null @@ -1,9 +0,0 @@ -
    - {{ alt }} - - {{if caption }} - {{ caption }} - - {{/if}} - {{ author }} - -
    diff --git a/lib/routes/onet/templates/image.tsx b/lib/routes/onet/templates/image.tsx new file mode 100644 index 000000000000..f32592f74c22 --- /dev/null +++ b/lib/routes/onet/templates/image.tsx @@ -0,0 +1,24 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type ImageProps = { + url?: string; + alt?: string; + caption?: string; + author?: string; +}; + +const ImageFigure = ({ url, alt, caption, author }: ImageProps) => ( +
    + {alt} + + {caption ? ( + <> + {caption} -{' '} + + ) : null} + {author} + +
    +); + +export const renderImage = (props: ImageProps): string => renderToString(); diff --git a/lib/routes/onet/utils.ts b/lib/routes/onet/utils.ts index 3db03167c2cb..d90710018b53 100644 --- a/lib/routes/onet/utils.ts +++ b/lib/routes/onet/utils.ts @@ -1,6 +1,4 @@ -import path from 'node:path'; - -import { art } from '@/utils/render'; +import { renderImage } from './templates/image'; const parseMainImage = ($) => { const mainImage = $('figure.mainPhoto'); @@ -8,7 +6,7 @@ const parseMainImage = ($) => { const author = mainImage.find('span.copyright'); const caption = mainImage.find('span.imageDescription'); - return art(path.join(__dirname, 'templates/image.art'), { + return renderImage({ url: img.attr('src'), alt: img.attr('alt')?.trim(), author: author.text()?.trim(), @@ -34,7 +32,7 @@ const parseArticleContent = ($) => { const img = $(el).find('img'); const author = $(el).find('span.author'); const caption = $(el).find('span.caption'); - const html = art(path.join(__dirname, 'templates/image.art'), { + const html = renderImage({ url: img.attr('src'), alt: img.attr('alt')?.trim(), caption: caption.text()?.trim(), diff --git a/lib/routes/openai/common.ts b/lib/routes/openai/common.tsx similarity index 93% rename from lib/routes/openai/common.ts rename to lib/routes/openai/common.tsx index daf84c9368a5..b3857d6d665a 100644 --- a/lib/routes/openai/common.ts +++ b/lib/routes/openai/common.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { DataItem } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; export const BASE_URL = new URL('https://openai.com'); @@ -119,11 +118,12 @@ const parseArticle = (ctx, rootUrl, attributes) => const imageSrc = attributes.seo.ogImageSrc; const imageAlt = attributes.seo.ogImageAlt; - const article = art(path.join(__dirname, 'templates/article.art'), { - content, - imageSrc, - imageAlt, - }); + const article = renderToString( + <> + {imageAlt + {raw(content.toString())} + + ); // Not all article has tags attributes.tags = attributes.tags || []; diff --git a/lib/routes/openai/templates/article.art b/lib/routes/openai/templates/article.art deleted file mode 100644 index 3d661adfbe90..000000000000 --- a/lib/routes/openai/templates/article.art +++ /dev/null @@ -1,2 +0,0 @@ -{{ imageAlt }} -{{@ content }} diff --git a/lib/routes/openrice/chart.ts b/lib/routes/openrice/chart.tsx similarity index 87% rename from lib/routes/openrice/chart.ts rename to lib/routes/openrice/chart.tsx index 390e8d9c546e..56a5a2cd615d 100644 --- a/lib/routes/openrice/chart.ts +++ b/lib/routes/openrice/chart.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; const baseUrl = 'https://www.openrice.com'; @@ -48,11 +46,13 @@ async function handler(ctx) { const title = $item.find('.pcmgidtr-left-section-poi-info-name .link').text() ?? ''; const link = $item.find('.pcmgidtr-left-section-poi-info-name .link').attr('href') ?? ''; const coverImg = $item.find('.pcmgidtr-left-section-door-photo img').attr('src') ?? null; - const description = art(path.join(__dirname, 'templates/chart.art'), { - description: desTagsArray ?? [], - rankNumber, - image: coverImg, - }); + const description = renderToString( + <> +

    {`Rank: ${rankNumber} / ${title}`}

    +

    {desTagsArray.join(' ')}

    + {coverImg ? : null} + + ); return { title, description, diff --git a/lib/routes/openrice/offers.ts b/lib/routes/openrice/offers.ts index 5eccbff1922c..736898afbe9d 100644 --- a/lib/routes/openrice/offers.ts +++ b/lib/routes/openrice/offers.ts @@ -1,8 +1,7 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const baseUrl = 'https://www.openrice.com'; @@ -60,7 +59,7 @@ async function handler(ctx) { const link = baseUrl + item.urlUI; const coverImg = item.doorPhotoUI.urls.full ?? ''; const descriptionText = item.couponType === 0 ? item.poiNameUI : `${item.desc} (${item.startTimeUI} - ${item.expireTimeUI}) [${item.multiplePoiDistrictName}]`; - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ description: descriptionText, image: coverImg, }); diff --git a/lib/routes/openrice/promos.ts b/lib/routes/openrice/promos.ts index 05f0e1bf5f31..357991aca5c1 100644 --- a/lib/routes/openrice/promos.ts +++ b/lib/routes/openrice/promos.ts @@ -1,10 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const baseUrl = 'https://www.openrice.com'; @@ -55,7 +54,7 @@ async function handler(ctx) { .find('.cover-photo') .attr('style') ?.match(/url\(['"]?(.*?)['"]?\)/)?.[1] ?? null; - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ description: $item.find('.article-details .desc').text() ?? '', image: coverImg, }); diff --git a/lib/routes/openrice/templates/chart.art b/lib/routes/openrice/templates/chart.art deleted file mode 100644 index 7433821a1ddf..000000000000 --- a/lib/routes/openrice/templates/chart.art +++ /dev/null @@ -1,9 +0,0 @@ -

    Rank: {{ rankNumber }} / {{ title }}

    -

    -{{ each description }} -{{ $value }} -{{ /each }} -

    -{{ if image }} - -{{ /if }} \ No newline at end of file diff --git a/lib/routes/openrice/templates/description.art b/lib/routes/openrice/templates/description.art deleted file mode 100644 index 9aa75c6f8c0a..000000000000 --- a/lib/routes/openrice/templates/description.art +++ /dev/null @@ -1,4 +0,0 @@ -{{ description }} -{{ if image }} - -{{ /if }} \ No newline at end of file diff --git a/lib/routes/openrice/templates/description.tsx b/lib/routes/openrice/templates/description.tsx new file mode 100644 index 000000000000..3af15df16e40 --- /dev/null +++ b/lib/routes/openrice/templates/description.tsx @@ -0,0 +1,14 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + description: string; + image?: string | null; +}; + +export const renderDescription = ({ description, image }: DescriptionData): string => + renderToString( + <> + {description} + {image ? : null} + + ); diff --git a/lib/routes/orcid/index.ts b/lib/routes/orcid/index.tsx similarity index 73% rename from lib/routes/orcid/index.ts rename to lib/routes/orcid/index.tsx index 1d928cb0ae63..4889506408f1 100644 --- a/lib/routes/orcid/index.ts +++ b/lib/routes/orcid/index.tsx @@ -1,8 +1,8 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; export const route: Route = { path: '/:id', @@ -50,14 +50,18 @@ async function handler(ctx) { const info = { title: work.title.value, link: work.url, - description: art(path.join(__dirname, 'templates/description.art'), { - title: work.title.value, - journalTitle: work.journalTitle?.value, - publicationDate: work.publicationDate, - workType: work.workType.value, - Str, - sourceName: work.sourceName, - }), + description: renderToString( + <> +

    {work.title.value}

    + {work.journalTitle?.value ?

    {work.journalTitle.value}

    : null} + + {[work.publicationDate?.year, work.publicationDate?.month, work.publicationDate?.day].filter(Boolean).join('-')} | {work.workType.value} + +
    + {raw(Str)} + Source: {work.sourceName} + + ), guid: work.putCode.value, }; out.push(info); diff --git a/lib/routes/orcid/templates/description.art b/lib/routes/orcid/templates/description.art deleted file mode 100644 index 8f6970f4dc4f..000000000000 --- a/lib/routes/orcid/templates/description.art +++ /dev/null @@ -1,3 +0,0 @@ -

    {{ title }}

    {{ if journalTitle }}

    {{ journalTitle }}

    {{ /if }} -{{ if publicationDate.year }}{{ publicationDate.year }}{{ /if }}{{ if publicationDate.month }}-{{ publicationDate.month }}{{ /if }}{{ if publicationDate.day }}-{{ publicationDate.day }}{{ /if }} | {{ workType }}
    -{{@ Str }}Source: {{ sourceName }} diff --git a/lib/routes/oreno3d/main.ts b/lib/routes/oreno3d/main.tsx similarity index 81% rename from lib/routes/oreno3d/main.ts rename to lib/routes/oreno3d/main.tsx index ff3403434429..949b348316ef 100644 --- a/lib/routes/oreno3d/main.ts +++ b/lib/routes/oreno3d/main.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; import get_sec_page_data from './get-sec-page-data'; @@ -93,17 +91,42 @@ async function handler(ctx) { const iwara_link = sec_data.iwara_link; const oreno3d_link = sec_data.oreno3d_link; // 打包,缓存HTML - const description = art(path.join(__dirname, 'templates/description.art'), { - raw_pic_link, - video_name, - authors, - origins, - characters, - tags, - desc, - iwara_link, - oreno3d_link, - }); + const description = renderToString( + <> + +

    + 标题:{video_name} +

    +

    + 作者:{authors} +

    +

    + 原作:{origins} +

    +

    + 角色:{characters} +

    +

    + 标签:{tags} +

    +

    简介:

    +
    + {desc} +
    +

    + iwara链接: + + {iwara_link} + +

    +

    + Oreno3D链接: + + {oreno3d_link} + +

    + + ); const title = `${video_name} - ${authors}`; const realData = await cache.tryGet(oreno3d_link, () => { const result = { diff --git a/lib/routes/oreno3d/templates/description.art b/lib/routes/oreno3d/templates/description.art deleted file mode 100644 index 846d7abc5395..000000000000 --- a/lib/routes/oreno3d/templates/description.art +++ /dev/null @@ -1,13 +0,0 @@ - -

    标题:{{ video_name }}

    -

    作者:{{ authors }}

    -

    原作:{{ origins }}

    -

    角色:{{ characters }}

    -

    标签:{{ tags }}

    -

    简介:

    -
    -{{ desc }} -
    -

    iwara链接:{{ iwara_link }}

    -

    Oreno3D链接:{{ oreno3d_link }}

    - diff --git a/lib/routes/ornl/all-news.ts b/lib/routes/ornl/all-news.ts index ceac0a6b005e..833e94ad187d 100644 --- a/lib/routes/ornl/all-news.ts +++ b/lib/routes/ornl/all-news.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '10', 10); @@ -34,7 +33,7 @@ export const handler = async (ctx: Context): Promise => { const title: string = $aEl.text(); const image: string | undefined = $imgEl.attr('src'); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { @@ -82,7 +81,7 @@ export const handler = async (ctx: Context): Promise => { const title: string = $$('h1.page-title').text(); const image: string | undefined = $$imgEl.attr('src'); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { diff --git a/lib/routes/ornl/templates/description.art b/lib/routes/ornl/templates/description.art deleted file mode 100644 index bfb1a0ff6398..000000000000 --- a/lib/routes/ornl/templates/description.art +++ /dev/null @@ -1,27 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/ornl/templates/description.tsx b/lib/routes/ornl/templates/description.tsx new file mode 100644 index 000000000000..9e931a47f001 --- /dev/null +++ b/lib/routes/ornl/templates/description.tsx @@ -0,0 +1,31 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; + width?: string | number; + height?: string | number; +}; + +type DescriptionData = { + images?: DescriptionImage[]; + intro?: string; + description?: string; +}; + +const OrnlDescription = ({ images, intro, description }: DescriptionData) => ( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + )} + {intro ?
    {intro}
    : null} + {description ? raw(description) : null} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/oschina/column.ts b/lib/routes/oschina/column.ts index 6cd4c0128961..8efe261a00d1 100644 --- a/lib/routes/oschina/column.ts +++ b/lib/routes/oschina/column.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,9 +8,10 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + export const handler = async (ctx: Context): Promise => { const { id } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '10', 10); @@ -34,7 +33,7 @@ export const handler = async (ctx: Context): Promise => { const $el: Cheerio = $(el); const title: string = $el.find('div.title').text(); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ intro: $el.find('div.description p.line-clamp').text(), }); const pubDateStr: string | undefined = $el.find('inddiv.item').contents().last().text().trim(); @@ -84,7 +83,7 @@ export const handler = async (ctx: Context): Promise => { $$('.ad-wrap').remove(); const title: string = $$('h1.article-box__title').text(); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ description: $$('div.content').html(), }); const pubDateEl: Element = $$('div.article-box__meta div.item-list div.item') diff --git a/lib/routes/oschina/event.ts b/lib/routes/oschina/event.ts index 135d5fe77ccf..b25c37558072 100644 --- a/lib/routes/oschina/event.ts +++ b/lib/routes/oschina/event.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const { category = 'latest' } = ctx.req.param(); @@ -42,7 +41,7 @@ export const handler = async (ctx: Context): Promise => { const title: string = $el.find('a.summary').text(); const image: string | undefined = $el.find('header.item-banner img').attr('data-delay'); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ images: image ? [ { @@ -100,7 +99,7 @@ export const handler = async (ctx: Context): Promise => { const title: string = $$('h1').text(); const image: string | undefined = $$('div.event-img img').attr('src'); - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ images: image ? [ { diff --git a/lib/routes/oschina/templates/description.art b/lib/routes/oschina/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/oschina/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/oschina/templates/description.tsx b/lib/routes/oschina/templates/description.tsx new file mode 100644 index 000000000000..f0e2d4a8f49e --- /dev/null +++ b/lib/routes/oschina/templates/description.tsx @@ -0,0 +1,29 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionProps = { + images?: DescriptionImage[]; + intro?: string; + description?: string; +}; + +const Description = ({ images, intro, description }: DescriptionProps) => ( + <> + {images?.map((image, index) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + )} + {intro ?
    {intro}
    : null} + {description ? <>{raw(description)} : null} + +); + +export const renderDescription = (props: DescriptionProps): string => renderToString(); diff --git a/lib/routes/oshwhub/explore.ts b/lib/routes/oshwhub/explore.ts index 01238d37ed6b..f5b81381a428 100644 --- a/lib/routes/oshwhub/explore.ts +++ b/lib/routes/oshwhub/explore.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Context } from 'hono'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const originOptions = [ { @@ -39,44 +38,11 @@ const findNamesByUuids = (data: any[], uuids: string[]): string[] => { return uuids.flatMap((uuid) => allItems.filter((item) => item.uuid === uuid || item.name === uuid).map((item) => item.name)).filter(Boolean); }; -const escapeHTML = (input) => { - if (input === undefined) { - return ''; - } - const str = String(input); - const escapeMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - }; - return str.replaceAll(/[&<>"']/g, (char) => escapeMap[char] || char); -}; - -const formatObject = (obj) => { - if (typeof obj !== 'object' || obj === null) { - return escapeHTML(obj); - } - - let result = ''; - for (const key in obj) { - if (obj[key] !== null && obj[key] !== '') { - result += `
    ${escapeHTML(key)}: ${escapeHTML(obj[key])}
    `; - } - } - - return result || '无数据'; -}; - const md = MarkdownIt({ html: true, linkify: true, }); -art.defaults.imports.escapeHTML = escapeHTML; -art.defaults.imports.formatObject = formatObject; - export const handler = async (ctx: Context): Promise => { const { type = 'new', origin = 'all', projectTag } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '15', 10); @@ -109,7 +75,7 @@ export const handler = async (ctx: Context): Promise => { items = response.result.lists.slice(0, limit).map((item): DataItem => { const title: string = item.name; const image: string | undefined = item.thumb?.startsWith('https:') ? item.thumb : `https:${item.thumb}`; - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { @@ -196,7 +162,7 @@ export const handler = async (ctx: Context): Promise => { const attachments = result.attachments; - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { diff --git a/lib/routes/oshwhub/templates/description.art b/lib/routes/oshwhub/templates/description.art deleted file mode 100644 index 03d8e218fced..000000000000 --- a/lib/routes/oshwhub/templates/description.art +++ /dev/null @@ -1,156 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if title || origin || tags || license || pubDate || upDated || intro }} - - - {{ if title }} - - - - - {{ /if }} - {{ if origin }} - - - - - {{ /if }} - {{ if tags }} - - - - - {{ /if }} - {{ if license }} - - - - - {{ /if }} - {{ if pubDate }} - - - - - {{ /if }} - {{ if upDated }} - - - - - {{ /if }} - {{ if intro }} - - - - - {{ /if }} - -
    名称{{ title }}
    版本{{ origin }}
    标签 - {{ each tags tag }} - {{ if $index !== 0 }}/ {{ /if }}{{ tag }} - {{ /each }} -
    开源协议{{ license }}
    创建时间{{ pubDate }}
    更新时间{{ upDated }}
    简介{{ intro }}
    -{{ /if }} - -{{ if description }} -

    描述

    - {{@ description }} -{{ /if }} - -{{ if documents }} -

    设计图

    -
    -
      - {{ each documents document }} -
    • - {{ if document.title }} -

      {{ document.title }}

      - {{ /if }} - {{ if document.description }} -

      {{ document.description }}

      - {{ /if }} - {{ if document.thumb }} -
      - {{ document.title }} -
      - {{ /if }} -
    • - {{ /each }} -
    -
    -{{ /if }} - -{{ if boms }} -

    BOM

    - - - - {{ set headers = boms[0] }} - {{ each headers header }} - - {{ /each }} - - - - {{ set rows = boms.slice(1) }} - {{ each rows row }} - - {{ each row td }} - {{ if $index === row.length - 1 }} - - {{ else }} - - {{ /if }} - {{ /each }} - - {{ /each }} - -
    {{ header }}
    {{@ formatObject(td) }}{{ td | escapeHTML }}
    -{{ /if }} - -{{ if attachments }} -

    附件

    - - - - - - - - {{ each attachments attachment }} - - - - - - {{ /each }} - -
    序号文件名称文件大小
    - {{ $index + 1 }} - - {{ if attachment.src }} - {{ attachment.name || '下载链接' }} - {{ else }} - {{ attachment.name || '无文件链接' }} - {{ /if }} - - {{ attachment.size }} -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/oshwhub/templates/description.tsx b/lib/routes/oshwhub/templates/description.tsx new file mode 100644 index 000000000000..b7cecc2b0a65 --- /dev/null +++ b/lib/routes/oshwhub/templates/description.tsx @@ -0,0 +1,200 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DocumentItem = { + title?: string; + description?: string; + thumb?: string; +}; + +type AttachmentItem = { + src?: string; + name?: string; + size?: string | number; +}; + +type DescriptionData = { + images?: DescriptionImage[]; + title?: string; + origin?: string; + tags?: string[]; + license?: string; + pubDate?: string; + upDated?: string; + intro?: string; + description?: string; + documents?: DocumentItem[]; + boms?: unknown[]; + attachments?: AttachmentItem[]; +}; + +const escapeHTML = (input: unknown) => { + if (input === undefined) { + return ''; + } + const str = String(input); + const escapeMap: Record = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }; + return str.replaceAll(/[&<>"']/g, (char) => escapeMap[char] || char); +}; + +const formatObject = (obj: unknown) => { + if (typeof obj !== 'object' || obj === null) { + return escapeHTML(obj); + } + + let result = ''; + for (const key in obj as Record) { + if (Object.hasOwn(obj, key)) { + const value = (obj as Record)[key]; + if (value !== null && value !== '') { + result += `
    ${escapeHTML(key)}: ${escapeHTML(value)}
    `; + } + } + } + + return result || '无数据'; +}; + +const OshwhubDescription = ({ images, title, origin, tags, license, pubDate, upDated, intro, description, documents, boms, attachments }: DescriptionData) => { + const headers = Array.isArray(boms) ? (boms[0] as unknown[] | undefined) : undefined; + const rows = Array.isArray(boms) ? boms.slice(1) : []; + + return ( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + )} + {title || origin || tags || license || pubDate || upDated || intro ? ( + + + {title ? ( + + + + + ) : null} + {origin ? ( + + + + + ) : null} + {tags?.length ? ( + + + + + ) : null} + {license ? ( + + + + + ) : null} + {pubDate ? ( + + + + + ) : null} + {upDated ? ( + + + + + ) : null} + {intro ? ( + + + + + ) : null} + +
    名称{title}
    版本{origin}
    标签{tags.join(' / ')}
    开源协议{license}
    创建时间{pubDate}
    更新时间{upDated}
    简介{intro}
    + ) : null} + {description ? ( + <> +

    描述

    + {raw(description)} + + ) : null} + {documents?.length ? ( + <> +

    设计图

    +
    +
      + {documents.map((document) => ( +
    • + {document.title ?

      {document.title}

      : null} + {document.description ?

      {document.description}

      : null} + {document.thumb ? ( +
      + {document.title} +
      + ) : null} +
    • + ))} +
    +
    + + ) : null} + {Array.isArray(boms) ? ( + <> +

    BOM

    + + + + {(headers ?? []).map((header) => ( + + ))} + + + + {rows.map((row) => ( + {(Array.isArray(row) ? row : []).map((td, index, rowValues) => (index === rowValues.length - 1 ? : ))} + ))} + +
    {String(header)}
    {raw(formatObject(td))}{td}
    + + ) : null} + {attachments?.length ? ( + <> +

    附件

    + + + + + + + + {attachments.map((attachment, index) => ( + + + + + + ))} + +
    序号文件名称文件大小
    {index + 1}{attachment.src ? {attachment.name || '下载链接'} : attachment.name || '无文件链接'}{attachment.size}
    + + ) : null} + + ); +}; + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/osu/beatmaps/latest-ranked.ts b/lib/routes/osu/beatmaps/latest-ranked.tsx similarity index 82% rename from lib/routes/osu/beatmaps/latest-ranked.ts rename to lib/routes/osu/beatmaps/latest-ranked.tsx index e860eee780bb..82527d925561 100644 --- a/lib/routes/osu/beatmaps/latest-ranked.ts +++ b/lib/routes/osu/beatmaps/latest-ranked.tsx @@ -1,13 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Data, DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const actualParametersDescTable = ` | Name | Default | Description | @@ -288,7 +286,61 @@ async function handler(ctx): Promise { }; // Create a description with beatmap details and a table of difficulties - const description = art(path.join(__dirname, 'templates/beatmapset.art'), { ...beatmapset, readableTotalLength, modeLiteralToDisplayNameMap }); + const cover = beatmapset.covers['cover@2x'] || beatmapset.covers.cover; + const description = renderToString( + <> + {beatmapset.title} +

    Song Info

    +
      +
    • + English Title: {beatmapset.title} +
    • +
    • + Artist: {`${beatmapset.artist_unicode} (${beatmapset.artist})`} +
    • +
    • + Length: {readableTotalLength} +
    • +
    • + BPM: {beatmapset.bpm} +
    • +
    +

    Beatmapset Info

    +
      +
    • + Mode: {modeLiteralToDisplayNameMap[beatmapset.beatmaps[0].mode]} +
    • +
    • + Creator: {beatmapset.creator} +
    • +
    +

    Difficulties

    + + + + + + + + + + + {beatmapset.beatmaps.map((beatmap) => ( + + + + + + + ))} + +
    VersionRatingARDrain
    + + {beatmap.version} + + {beatmap.difficulty_rating.toFixed(2)}{beatmap.ar.toFixed(1)}{beatmap.drain}
    + + ); return { title: `${modeInTitle === 'true' ? `[${modeLiteralToDisplayNameMap[beatmapset.beatmaps[0].mode]}] ` : ``}${beatmapset.title_unicode ?? beatmapset.title}`, diff --git a/lib/routes/osu/beatmaps/templates/beatmapset.art b/lib/routes/osu/beatmaps/templates/beatmapset.art deleted file mode 100644 index 5d9c50f3daab..000000000000 --- a/lib/routes/osu/beatmaps/templates/beatmapset.art +++ /dev/null @@ -1,37 +0,0 @@ -{{ title }} - -

    Song Info

    -
      -
    • English Title: {{ title }}
    • -
    • Artist: {{ artist_unicode }} ({{ artist }})
    • -
    • Length: {{ readableTotalLength }}
    • -
    • BPM: {{ bpm }}
    • -
    - -

    Beatmapset Info

    -
      -
    • Mode: {{ modeLiteralToDisplayNameMap[beatmaps[0].mode] }}
    • -
    • Creator: {{ creator }}
    • -
    - -

    Difficulties

    - - - - - - - - - - - {{ each beatmaps as beatmap }} - - - - - - - {{ /each }} - -
    VersionRatingARDrain
    {{ beatmap.version }}{{ beatmap.difficulty_rating.toFixed(2) }}{{ beatmap.ar.toFixed(1) }}{{ beatmap.drain }}
    diff --git a/lib/routes/otobanana/templates/description.art b/lib/routes/otobanana/templates/description.art deleted file mode 100644 index 72a6921cff1f..000000000000 --- a/lib/routes/otobanana/templates/description.art +++ /dev/null @@ -1,11 +0,0 @@ -{{ if cast }} - -
    - -
    -💬 {{ cast.comment_count }} ❤️ {{ cast.like_count }} 🍌 {{ cast.gift_banana }} {{ cast.play_count }} 再生 -
    -{{@ cast.text.replace(/\n/g, '
    ') }} -{{ /if }} diff --git a/lib/routes/otobanana/utils.ts b/lib/routes/otobanana/utils.tsx similarity index 77% rename from lib/routes/otobanana/utils.ts rename to lib/routes/otobanana/utils.tsx index b1cb2fc256ce..7601341f704a 100644 --- a/lib/routes/otobanana/utils.ts +++ b/lib/routes/otobanana/utils.tsx @@ -1,8 +1,8 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const domain = 'otobanana.com'; const apiBase = `https://api.${domain}`; @@ -16,7 +16,19 @@ const getUserInfo = (id, tryGet) => const renderCast = (cast) => ({ title: cast.title, - description: art(path.join(__dirname, 'templates/description.art'), { cast }), + description: renderToString( + <> + +
    + +
    + {`💬 ${cast.comment_count} ❤️ ${cast.like_count} 🍌 ${cast.gift_banana} ${cast.play_count} 再生`} +
    + {cast.text ? raw(cast.text.replaceAll('\n', '
    ')) : null} + + ), pubDate: parseDate(cast.created_at), link: `https://otobanana.com/cast/${cast.id}`, author: `${cast.user.name} (@${cast.user.username})`, diff --git a/lib/routes/oup/index.ts b/lib/routes/oup/index.tsx similarity index 88% rename from lib/routes/oup/index.ts rename to lib/routes/oup/index.tsx index 8d76cec88221..6667a34318fb 100644 --- a/lib/routes/oup/index.ts +++ b/lib/routes/oup/index.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const rootUrl = 'https://academic.oup.com'; @@ -62,9 +60,12 @@ async function handler(ctx) { const $ = load(detailResponse); item.author = $('.al-authors-list button').text(); - item.description = art(path.join(__dirname, 'templates/article.art'), { - abstractContent: $('section.abstract > p.chapter-para').text(), - }); + item.description = renderToString( + <> +

    Abstract

    +

    {$('section.abstract > p.chapter-para').text()}

    + + ); item.pubDate = parseDate($('div.citation-date').text()); item.category = $('div.kwd-group > a') .toArray() diff --git a/lib/routes/oup/templates/article.art b/lib/routes/oup/templates/article.art deleted file mode 100644 index 05639ab238ed..000000000000 --- a/lib/routes/oup/templates/article.art +++ /dev/null @@ -1,2 +0,0 @@ -

    Abstract

    -

    {{abstractContent}}

    diff --git a/lib/routes/papers/category.ts b/lib/routes/papers/category.ts index 745a531781f0..9c5fe4ee70ff 100644 --- a/lib/routes/papers/category.ts +++ b/lib/routes/papers/category.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -9,9 +7,10 @@ import type { Data, DataItem, Route } from '@/types'; import { ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + export const handler = async (ctx: Context): Promise => { const { id } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '50', 10); @@ -80,7 +79,7 @@ export const handler = async (ctx: Context): Promise => { }; } - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ pdfUrl: enclosureUrl, kimiUrl: `${targetUrl.replace(/[a-zA-Z0-9.]+$/, 'kimi')}?paper=${doi}`, authors, diff --git a/lib/routes/papers/query.ts b/lib/routes/papers/query.ts index 4adad380a276..ee007da0685c 100644 --- a/lib/routes/papers/query.ts +++ b/lib/routes/papers/query.ts @@ -1,10 +1,9 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import parser from '@/utils/rss-parser'; +import { renderDescription } from './templates/description'; + const pdfUrlGenerators = { arxiv: (id: string) => `https://arxiv.org/pdf/${id}.pdf`, }; @@ -32,11 +31,9 @@ export const handler = async (ctx) => { const pdfUrl = Object.hasOwn(pdfUrlGenerators, site) ? pdfUrlGenerators[site](id) : undefined; const authorString = item.author; - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ pdfUrl, - siteUrl: item.link, kimiUrl, - authorString, summary: item.summary, }); diff --git a/lib/routes/papers/templates/description.art b/lib/routes/papers/templates/description.art deleted file mode 100644 index 93aac7b3c6f5..000000000000 --- a/lib/routes/papers/templates/description.art +++ /dev/null @@ -1,22 +0,0 @@ -{{ if pdfUrl }} - [PDF] -{{ /if }} - -{{ if kimiUrl }} - [Kimi] -{{ /if }} - -{{ if authors }} -

    - Authors: - {{ each authors author }} - - {{ author.name }} - , - {{ /each }} -

    -{{ /if }} - -{{ if summary }} -

    {{ summary }}

    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/papers/templates/description.tsx b/lib/routes/papers/templates/description.tsx new file mode 100644 index 000000000000..46f91712172c --- /dev/null +++ b/lib/routes/papers/templates/description.tsx @@ -0,0 +1,33 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type AuthorData = { + name?: string; + url?: string; +}; + +type DescriptionData = { + pdfUrl?: string; + kimiUrl?: string; + authors?: AuthorData[]; + summary?: string; +}; + +const PapersDescription = ({ pdfUrl, kimiUrl, authors, summary }: DescriptionData) => ( + <> + {pdfUrl ? [PDF] : null} + {kimiUrl ? [Kimi] : null} + {authors?.length ? ( +

    + Authors: + {authors.map((author) => ( + <> + {author.name}, + + ))} +

    + ) : null} + {summary ?

    {summary}

    : null} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/parliament.uk/petitions.ts b/lib/routes/parliament.uk/petitions.tsx similarity index 94% rename from lib/routes/parliament.uk/petitions.ts rename to lib/routes/parliament.uk/petitions.tsx index 15baa23184a3..afae92e78029 100644 --- a/lib/routes/parliament.uk/petitions.ts +++ b/lib/routes/parliament.uk/petitions.tsx @@ -1,14 +1,12 @@ -import path from 'node:path'; - import type { CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, DataItem, Route } from '@/types'; import { ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const handler = async (ctx: Context): Promise => { const { state = 'all' } = ctx.req.param(); @@ -33,10 +31,12 @@ export const handler = async (ctx: Context): Promise => { const attributes = item.attributes; const title = attributes.action; - const description = art(path.join(__dirname, 'templates/description.art'), { - intro: attributes.background, - description: attributes.additional_details, - }); + const description = renderToString( + <> + {attributes.background ?
    {attributes.background}
    : null} + {attributes.additional_details ?

    {attributes.additional_details}

    : null} + + ); const guid = `parliament.uk-petition-${item.id}`; const author: DataItem['author'] = attributes.creator_name; diff --git a/lib/routes/parliament.uk/templates/description.art b/lib/routes/parliament.uk/templates/description.art deleted file mode 100644 index eee77a054258..000000000000 --- a/lib/routes/parliament.uk/templates/description.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} -

    {{ description }}

    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/patagonia/new-arrivals.ts b/lib/routes/patagonia/new-arrivals.tsx similarity index 92% rename from lib/routes/patagonia/new-arrivals.ts rename to lib/routes/patagonia/new-arrivals.tsx index a20cd4b580cd..65c80f57b3ed 100644 --- a/lib/routes/patagonia/new-arrivals.ts +++ b/lib/routes/patagonia/new-arrivals.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const host = 'https://www.patagonia.com'; const categoryMap = { @@ -69,9 +67,11 @@ async function handler(ctx) { const price = $(element).find('[itemprop="price"]').eq(0).text(); data.description = price + - art(path.join(__dirname, 'templates/product-description.art'), { - imgUrl, - }); + renderToString( +

    + +
    + ); return data; }); return { diff --git a/lib/routes/patagonia/templates/product-description.art b/lib/routes/patagonia/templates/product-description.art deleted file mode 100644 index 3ed24c4a476a..000000000000 --- a/lib/routes/patagonia/templates/product-description.art +++ /dev/null @@ -1,4 +0,0 @@ -
    - -
    - diff --git a/lib/routes/patreon/feed.ts b/lib/routes/patreon/feed.tsx similarity index 64% rename from lib/routes/patreon/feed.ts rename to lib/routes/patreon/feed.tsx index 8c9a7ff542e9..cf3bec59dfcf 100644 --- a/lib/routes/patreon/feed.ts +++ b/lib/routes/patreon/feed.tsx @@ -1,16 +1,87 @@ -import path from 'node:path'; - import * as cheerio from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import type { CreatorData, MediaRelation, PostData } from './types'; +const renderDescription = ({ attributes, relationships, included }) => { + const postType = attributes.post_type; + const imageOrder = attributes.post_metadata?.image_order ?? []; + const previewImage = attributes.image?.url ?? attributes.meta_image_url; + const audioUrl = relationships.audio?.attributes?.download_url || relationships.audio_preview?.attributes?.download_url; + const imageItems = imageOrder.map((mediaIdStr) => included.find((item) => item.id === mediaIdStr)).filter(Boolean); + + return renderToString( + <> + {postType === 'image_file' ? ( + <> + {imageItems.map((image) => ( + <> + {image.attributes.file_name} +
    + + ))} + + ) : postType === 'video_external_file' ? ( + attributes.video_preview ? ( + <> + +
    + + ) : null + ) : postType === 'audio_file' || postType === 'podcast' ? ( + <> + {attributes.thumbnail?.url ? ( + <> + +
    + + ) : null} + {audioUrl ? ( + <> + +
    + + ) : null} + + ) : postType === 'video_embed' || postType === 'link' ? ( + previewImage ? ( + <> + +
    + + ) : null + ) : postType === 'text_only' ? null : ( + <> + Post type: "{postType}" is not supported. +
    + + )} + + {attributes.content || attributes.teaser_text ? raw(attributes.content || attributes.teaser_text) : null} + + {relationships.attachments_media?.length + ? relationships.attachments_media.map((media) => ( + <> + {media.attributes.file_name} +
    + + )) + : null} + + ); +}; + export const route: Route = { path: '/:creator', categories: ['new-media'], @@ -102,7 +173,7 @@ async function handler(ctx) { return { title: attributes.title, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ attributes, relationships, included: posts.included, diff --git a/lib/routes/patreon/templates/description.art b/lib/routes/patreon/templates/description.art deleted file mode 100644 index 3d043a13b84a..000000000000 --- a/lib/routes/patreon/templates/description.art +++ /dev/null @@ -1,41 +0,0 @@ -{{ if attributes.post_type === 'image_file' }} - {{ each attributes.post_metadata.image_order mediaIdStr }} - {{ set img = included.find((i) => i.id === mediaIdStr) }} - {{ if img }} - {{ img.attributes.file_name }}
    - {{ /if }} - {{ /each }} - -{{ else if attributes.post_type === 'video_external_file' }} - {{ if attributes.video_preview }} -
    - {{ /if }} - -{{ else if attributes.post_type === 'audio_file' || attributes.post_type === 'podcast' }} -
    - {{ set url = relationships.audio.attributes.download_url || relationships.audio_preview.attributes.download_url }} -
    - -{{ else if attributes.post_type === 'video_embed' || attributes.post_type === 'link' }} -
    - -{{ else if attributes.post_type === 'text_only' }} - -{{ else }} -Post type: "{{ attributes.post_type }}" is not supported.
    - -{{ /if }} - -{{ if attributes.content || attributes.teaser_text }} - {{@ attributes.content || attributes.teaser_text }} -{{ /if }} - -{{ if relationships.attachments_media }} - {{ each relationships.attachments_media media }} - {{ media.attributes.file_name }}
    - {{ /each }} -{{ /if }} diff --git a/lib/routes/penguin-random-house/templates/articleHeader.art b/lib/routes/penguin-random-house/templates/articleHeader.art deleted file mode 100644 index 4d9ece759e06..000000000000 --- a/lib/routes/penguin-random-house/templates/articleHeader.art +++ /dev/null @@ -1,5 +0,0 @@ -

    -{{ imageAlt }} -
    -{{ description }} -

    \ No newline at end of file diff --git a/lib/routes/penguin-random-house/templates/book.art b/lib/routes/penguin-random-house/templates/book.art deleted file mode 100644 index c03b8a134e06..000000000000 --- a/lib/routes/penguin-random-house/templates/book.art +++ /dev/null @@ -1,4 +0,0 @@ -{{ imageAlt }} -

    {{ title }}

    -

    {{ author }}

    -

    {{ description }}

    \ No newline at end of file diff --git a/lib/routes/penguin-random-house/utils.ts b/lib/routes/penguin-random-house/utils.tsx similarity index 78% rename from lib/routes/penguin-random-house/utils.ts rename to lib/routes/penguin-random-house/utils.tsx index a1303943d22a..c6586c7c886a 100644 --- a/lib/routes/penguin-random-house/utils.ts +++ b/lib/routes/penguin-random-house/utils.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const parseBookInList = (element) => { const $ = load(element); @@ -19,13 +17,7 @@ const parseBookInList = (element) => { imageAlt = $('img.img-responsive').attr('alt'); } - return art(path.join(__dirname, 'templates/book.art'), { - title, - author, - description, - imageSrc, - imageAlt, - }); + return renderBookDescription(imageSrc, imageAlt, title, author, description); }; const parsePubDate = (data) => { @@ -75,11 +67,7 @@ const parseArticle = (element) => { const imageAlt = $('div.img-block>img').first().attr('alt'); let mainBlock = ''; - const descriptionBlock = art(path.join(__dirname, 'templates/articleHeader.art'), { - description, - imageSrc, - imageAlt, - }); + const descriptionBlock = renderArticleHeader(imageSrc, imageAlt, description); $('div.main-content>p,div.main-content>ul').map((i, element) => { const appending = load(element); @@ -115,4 +103,23 @@ const parseList = (items, ctx, contentParser) => ) ); +const renderBookDescription = (imageSrc: string, imageAlt: string, title: string, author: string, description: string): string => + renderToString( + <> + {imageAlt} +

    {title}

    +

    {author}

    +

    {description}

    + + ); + +const renderArticleHeader = (imageSrc: string, imageAlt: string, description: string): string => + renderToString( +

    + {imageAlt} +
    + {description} +

    + ); + export default { parseList, parseBooks, parseArticle }; diff --git a/lib/routes/picuki/profile.ts b/lib/routes/picuki/profile.ts index 5525cbf0b650..96b9d32863b9 100644 --- a/lib/routes/picuki/profile.ts +++ b/lib/routes/picuki/profile.ts @@ -1,14 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import { config } from '@/config'; import NotFoundError from '@/errors/types/not-found'; +import { renderUserEmbed } from '@/routes/tiktok/templates/user'; import type { DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { getPuppeteerPage } from '@/utils/puppeteer'; -import { art } from '@/utils/render'; export const route: Route = { path: '/profile/:id/:type?/:functionalFlag?', @@ -159,7 +157,7 @@ async function handler(ctx) { const items: DataItem[] = data.items.map((item) => ({ ...item, - description: art(path.join(__dirname, '../tiktok/templates/user.art'), { + description: renderUserEmbed({ poster: item.renderData.poster, source: item.renderData.source, useIframe, diff --git a/lib/routes/picuki/templates/post.art b/lib/routes/picuki/templates/post.art deleted file mode 100644 index d5ab8cfd3847..000000000000 --- a/lib/routes/picuki/templates/post.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if media }}{{@ media.replace(/\n/g, '') }}{{ /if }} -{{ if desc }}

    {{@ desc.replace(/\n/g, '
    ') }}

    {{ /if }} -{{ if locationLink.length && locationLink.attr('href') }} -

    📍 {{ locationLink.text() }}

    -{{ else if locationLink.length }} -

    📍 {{ locationLink.text() }}

    -{{ /if }} diff --git a/lib/routes/picuki/templates/post.tsx b/lib/routes/picuki/templates/post.tsx new file mode 100644 index 000000000000..1d48d47403de --- /dev/null +++ b/lib/routes/picuki/templates/post.tsx @@ -0,0 +1,37 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type LocationLink = { + length: number; + attr: (key: string) => string | undefined; + text: () => string; +}; + +type PostData = { + media?: string; + desc?: string; + locationLink?: LocationLink; +}; + +const PicukiPost = ({ media, desc, locationLink }: PostData) => ( + <> + {media ? raw(media.replaceAll('\n', '')) : null} + {desc ?

    {raw(desc.replaceAll('\n', '
    '))}

    : null} + {locationLink?.length ? ( + locationLink.attr('href') ? ( +

    + 📍{' '} + + {locationLink.text()} + +

    + ) : ( +

    + 📍 {locationLink.text()} +

    + ) + ) : null} + +); + +export const renderPost = (data: PostData) => renderToString(); diff --git a/lib/routes/picuki/templates/video.art b/lib/routes/picuki/templates/video.art deleted file mode 100644 index 9bd163bb6965..000000000000 --- a/lib/routes/picuki/templates/video.art +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/lib/routes/picuki/templates/video.tsx b/lib/routes/picuki/templates/video.tsx new file mode 100644 index 000000000000..4e781403d760 --- /dev/null +++ b/lib/routes/picuki/templates/video.tsx @@ -0,0 +1,16 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type VideoData = { + videoPoster?: string; + videoSrcs?: string[]; +}; + +const PicukiVideo = ({ videoPoster, videoSrcs }: VideoData) => ( + +); + +export const renderVideo = (data: VideoData) => renderToString(); diff --git a/lib/routes/pikabu/templates/video.art b/lib/routes/pikabu/templates/video.art deleted file mode 100644 index 291266421bae..000000000000 --- a/lib/routes/pikabu/templates/video.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if videoId }} - -{{ else if webm || mp4 }} - -{{ /if }} diff --git a/lib/routes/pikabu/templates/video.tsx b/lib/routes/pikabu/templates/video.tsx new file mode 100644 index 000000000000..20161d460eb5 --- /dev/null +++ b/lib/routes/pikabu/templates/video.tsx @@ -0,0 +1,21 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type VideoData = { + videoId?: string; + preview?: string; + width?: string | number; + mp4?: string; + webm?: string; +}; + +export const renderVideo = ({ videoId, preview, width, mp4, webm }: VideoData): string => + renderToString( + videoId ? ( + + ) : webm || mp4 ? ( + + ) : null + ); diff --git a/lib/routes/pikabu/utils.ts b/lib/routes/pikabu/utils.ts index 6664a291f8d5..db1cc27f5b9e 100644 --- a/lib/routes/pikabu/utils.ts +++ b/lib/routes/pikabu/utils.ts @@ -1,6 +1,4 @@ -import path from 'node:path'; - -import { art } from '@/utils/render'; +import { renderVideo } from './templates/video'; const baseUrl = 'https://pikabu.ru'; @@ -25,12 +23,12 @@ const fixVideo = (element) => { if (dataType === 'video') { const videoId = element.attr('data-source').match(/\/embed\/(.+)$/)[1]; - videoHtml = art(path.join(__dirname, 'templates/video.art'), { videoId }); + videoHtml = renderVideo({ videoId }); } else if (dataType === 'video-file') { const width = element.find('.player__svg-stretch').attr('width'); const mp4 = `${element.attr('data-source')}.mp4`; const webm = element.attr('data-webm'); - videoHtml = art(path.join(__dirname, 'templates/video.art'), { preview, width, mp4, webm }); + videoHtml = renderVideo({ preview, width, mp4, webm }); } else { throw new Error(`Unknown video type: ${dataType}`); } diff --git a/lib/routes/pixabay/search.ts b/lib/routes/pixabay/search.tsx similarity index 89% rename from lib/routes/pixabay/search.ts rename to lib/routes/pixabay/search.tsx index 864e658c2cc4..fb400f24db88 100644 --- a/lib/routes/pixabay/search.ts +++ b/lib/routes/pixabay/search.tsx @@ -1,11 +1,10 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; export const route: Route = { path: '/search/:q/:order?', @@ -77,7 +76,7 @@ async function handler(ctx) { .substring(pageURL.lastIndexOf('/', pageURL.lastIndexOf('/') - 1) + 1, pageURL.lastIndexOf('/')) .replace(/(-\d+)$/, '') .replaceAll('-', ' '), - description: art(path.join(__dirname, 'templates/img.art'), { item }), + description: renderToString(), link: pageURL, category: tags.split(', '), author: user, @@ -93,3 +92,5 @@ async function handler(ctx) { item: items, }; } + +const PixabayImage = ({ item }: { item: { largeImageURL?: string; webformatURL?: string; previewURL?: string } }) => ; diff --git a/lib/routes/pixabay/templates/img.art b/lib/routes/pixabay/templates/img.art deleted file mode 100644 index 6ad14ac3e784..000000000000 --- a/lib/routes/pixabay/templates/img.art +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/routes/pixelstech/index.ts b/lib/routes/pixelstech/index.ts index c2a776f0bed3..ecf8a6962228 100644 --- a/lib/routes/pixelstech/index.ts +++ b/lib/routes/pixelstech/index.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const { topic } = ctx.req.param(); @@ -34,7 +33,7 @@ export const handler = async (ctx: Context): Promise => { const title: string = $aEl.text(); const image: string | undefined = $el.attr('data-bg-image'); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { @@ -86,8 +85,8 @@ export const handler = async (ctx: Context): Promise => { const title: string = $$('h1').text(); const description: string | undefined = (item.description ?? '') + - art(path.join(__dirname, 'templates/description.art'), { - description: $$('article.content-article').html(), + renderDescription({ + description: $$('article.content-article').html() ?? undefined, }); const linkUrl: string | undefined = $$('span.source-text a').attr('href'); diff --git a/lib/routes/pixelstech/templates/description.art b/lib/routes/pixelstech/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/pixelstech/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/pixelstech/templates/description.tsx b/lib/routes/pixelstech/templates/description.tsx new file mode 100644 index 000000000000..f7661df1ea9a --- /dev/null +++ b/lib/routes/pixelstech/templates/description.tsx @@ -0,0 +1,28 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionRenderOptions = { + images?: DescriptionImage[]; + intro?: string; + description?: string; +}; + +export const renderDescription = ({ images, intro, description }: DescriptionRenderOptions): string => + renderToString( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt +
    + ) : null + )} + {intro ?
    {intro}
    : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/pnas/index.ts b/lib/routes/pnas/index.tsx similarity index 74% rename from lib/routes/pnas/index.ts rename to lib/routes/pnas/index.tsx index 28a92fffa1e6..f4a7d2358434 100644 --- a/lib/routes/pnas/index.ts +++ b/lib/routes/pnas/index.tsx @@ -1,6 +1,6 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { CookieJar } from 'tough-cookie'; import type { Route } from '@/types'; @@ -10,7 +10,6 @@ import logger from '@/utils/logger'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; import { setCookies } from '@/utils/puppeteer-utils'; -import { art } from '@/utils/render'; export const route: Route = { path: '/:topicPath{.+}?', @@ -89,18 +88,24 @@ async function handler(ctx) { item.category = [...keywords, topic]; item.author = PNASdataLayer.page.pageInfo.author; item.doi = PNASdataLayer.page.pageInfo.DOI; - item.description = art(path.join(__dirname, 'templates/article.art'), { - access: PNASdataLayer.user.access === 'yes', - // - abstracts: $('#abstracts .core-container').html(), - // - articleBody: $('[property=articleBody]').html(), - // - dataAvailability: $('#data-availability').html(), - acknowledgments: $('#acknowledgments').html(), - supplementaryMaterials: $('#supplementary-materials').html(), - bibliography: $('#bibliography').html(), - }); + const access = PNASdataLayer.user.access === 'yes'; + const abstracts = $('#abstracts .core-container').html(); + const articleBody = $('[property=articleBody]').html(); + const dataAvailability = $('#data-availability').html(); + const acknowledgments = $('#acknowledgments').html(); + const supplementaryMaterials = $('#supplementary-materials').html(); + const bibliography = $('#bibliography').html(); + + item.description = renderToString( + <> + {abstracts ? raw(abstracts) : null} + {access && articleBody ? raw(articleBody) : null} + {dataAvailability ? raw(dataAvailability) : null} + {acknowledgments ? raw(acknowledgments) : null} + {supplementaryMaterials ? raw(supplementaryMaterials) : null} + {bibliography ? raw(bibliography) : null} + + ); return item; }) diff --git a/lib/routes/pnas/templates/article.art b/lib/routes/pnas/templates/article.art deleted file mode 100644 index e947183a9d8c..000000000000 --- a/lib/routes/pnas/templates/article.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if abstracts }}{{@ abstracts }}{{ /if }} - -{{ if access }}{{@ articleBody }}{{ /if }} - -{{ if dataAvailability }}{{@ dataAvailability }}{{ /if }} -{{ if acknowledgments }}{{@ acknowledgments }}{{ /if }} -{{ if supplementaryMaterials }}{{@ supplementaryMaterials }}{{ /if }} -{{ if bibliography }}{{@ bibliography }}{{ /if }} diff --git a/lib/routes/pornhub/templates/description.art b/lib/routes/pornhub/templates/description.art deleted file mode 100644 index 94b9466bd5de..000000000000 --- a/lib/routes/pornhub/templates/description.art +++ /dev/null @@ -1,11 +0,0 @@ -{{ if previewVideo }} - -{{ /if }} - -{{ if thumbs }} - {{ each thumbs t }} - - {{ /each }} -{{ /if }} diff --git a/lib/routes/pornhub/utils.ts b/lib/routes/pornhub/utils.tsx similarity index 72% rename from lib/routes/pornhub/utils.ts rename to lib/routes/pornhub/utils.tsx index 0d65e0ee3aff..51607f38054c 100644 --- a/lib/routes/pornhub/utils.ts +++ b/lib/routes/pornhub/utils.tsx @@ -1,9 +1,7 @@ -import path from 'node:path'; - import dayjs from 'dayjs'; +import { renderToString } from 'hono/jsx/dom/server'; import { parseRelativeDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const defaultDomain = 'https://www.pornhub.com'; @@ -12,7 +10,19 @@ const headers = { hasVisited: 1, }; -const renderDescription = (data) => art(path.join(__dirname, 'templates/description.art'), data); +const renderDescription = (data): string => + renderToString( + <> + {data.previewVideo ? ( + + ) : null} + {data.thumbs?.map((thumb, index) => ( + + ))} + + ); const extractDateFromImageUrl = (imageUrl) => { const matchResult = imageUrl.match(/(\d{6})\/(\d{2})/); return matchResult ? matchResult.slice(1, 3).join('') : null; diff --git a/lib/routes/producereport/index.ts b/lib/routes/producereport/index.ts index ff6746d66e1a..e5aac57e8290 100644 --- a/lib/routes/producereport/index.ts +++ b/lib/routes/producereport/index.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const { category = 'produce/fresh-fruits/apples' } = ctx.req.param(); @@ -39,7 +38,7 @@ export const handler = async (ctx: Context): Promise => { ?.replace(/styles\/thumbnail\/public/, '') ?.split(/\?/)?.[0]; - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { @@ -85,7 +84,7 @@ export const handler = async (ctx: Context): Promise => { const title: string = $$('meta[property="og:title"]').attr('content') ?? item.title; const image: string | undefined = $$('meta[property="og:image"]').attr('content'); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { @@ -94,7 +93,7 @@ export const handler = async (ctx: Context): Promise => { }, ] : undefined, - description: $$('div[property="content:encoded"]').html(), + description: $$('div[property="content:encoded"]').html() ?? undefined, }); const pubDateStr: string | undefined = $$('div.pane-node-created').text()?.trim(); const categoryEls: Element[] = $$('div.pane-node-field-topics a').toArray(); diff --git a/lib/routes/producereport/templates/description.art b/lib/routes/producereport/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/producereport/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/producereport/templates/description.tsx b/lib/routes/producereport/templates/description.tsx new file mode 100644 index 000000000000..f7661df1ea9a --- /dev/null +++ b/lib/routes/producereport/templates/description.tsx @@ -0,0 +1,28 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionRenderOptions = { + images?: DescriptionImage[]; + intro?: string; + description?: string; +}; + +export const renderDescription = ({ images, intro, description }: DescriptionRenderOptions): string => + renderToString( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt +
    + ) : null + )} + {intro ?
    {intro}
    : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/producthunt/templates/description.art b/lib/routes/producthunt/templates/description.art deleted file mode 100644 index d765cf02303b..000000000000 --- a/lib/routes/producthunt/templates/description.art +++ /dev/null @@ -1,19 +0,0 @@ -{{ if tagline }} -
    {{ tagline }}
    -{{ /if }} - -{{ if description }} -
    {{ description }}
    -{{ /if }} - -{{ if media }} - {{ each media m }} - {{ if m.mediaType === 'image' }} -
    - {{ else if m.mediaType === 'video' }} - {{ if m.metadata.platform === 'youtube' }} - - {{ /if }} - {{ /if }} - {{ /each }} -{{ /if }} diff --git a/lib/routes/producthunt/today.ts b/lib/routes/producthunt/today.tsx similarity index 66% rename from lib/routes/producthunt/today.ts rename to lib/routes/producthunt/today.tsx index 75ce3e89d740..4409f7cb9798 100644 --- a/lib/routes/producthunt/today.ts +++ b/lib/routes/producthunt/today.tsx @@ -1,13 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/today', @@ -89,7 +87,7 @@ async function handler() { const post = response.data.post; item.author = post.user.name; - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ tagline: post.tagline, description: post.description, media: post.media, @@ -106,3 +104,53 @@ async function handler() { item: items, }; } + +type MediaItem = { + mediaType?: string; + imageUuid?: string; + metadata?: { + platform?: string; + videoId?: string; + }; +}; + +type DescriptionProps = { + tagline?: string; + description?: string; + media?: MediaItem[]; +}; + +const renderDescription = ({ tagline, description, media }: DescriptionProps): string => + renderToString( + <> + {tagline ?
    {tagline}
    : null} + {description ?
    {description}
    : null} + {media?.map((item) => { + if (item.mediaType === 'image' && item.imageUuid) { + return ( + <> + +
    + + ); + } + + if (item.mediaType === 'video' && item.metadata?.platform === 'youtube' && item.metadata.videoId) { + return ( + + ); + } + + return null; + })} + + ); diff --git a/lib/routes/ps/monthly-games.ts b/lib/routes/ps/monthly-games.tsx similarity index 80% rename from lib/routes/ps/monthly-games.ts rename to lib/routes/ps/monthly-games.tsx index 01dc05c6b87f..ec7bfd4171c2 100644 --- a/lib/routes/ps/monthly-games.ts +++ b/lib/routes/ps/monthly-games.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import { ViewType } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; export const route: Route = { path: '/monthly-games', @@ -32,6 +30,14 @@ export const route: Route = { url: 'www.playstation.com/en-sg/ps-plus/whats-new', }; +const renderDescription = (img, text) => + renderToString( + <> + + {text} + + ); + async function handler() { const baseUrl = 'https://www.playstation.com/en-sg/ps-plus/whats-new/'; @@ -44,10 +50,7 @@ async function handler() { const item = $(e); return { title: item.find('h3').text(), - description: art(path.join(__dirname, 'templates/monthly-games.art'), { - img: item.find('.media-block__img source').attr('srcset'), - text: item.find('h3 + p').text(), - }), + description: renderDescription(item.find('.media-block__img source').attr('srcset'), item.find('h3 + p').text()), link: item.find('.btn--cta').attr('href'), }; }); diff --git a/lib/routes/ps/templates/monthly-games.art b/lib/routes/ps/templates/monthly-games.art deleted file mode 100644 index f14428b9b2f1..000000000000 --- a/lib/routes/ps/templates/monthly-games.art +++ /dev/null @@ -1 +0,0 @@ -{{ text }} diff --git a/lib/routes/psyche/templates/essay.art b/lib/routes/psyche/templates/essay.art deleted file mode 100644 index 5a2fab892134..000000000000 --- a/lib/routes/psyche/templates/essay.art +++ /dev/null @@ -1,3 +0,0 @@ - -{{@ authorsBio }} -{{@ content}} \ No newline at end of file diff --git a/lib/routes/psyche/templates/essay.tsx b/lib/routes/psyche/templates/essay.tsx new file mode 100644 index 000000000000..ced4c8ea6b95 --- /dev/null +++ b/lib/routes/psyche/templates/essay.tsx @@ -0,0 +1,17 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type EssayData = { + banner?: string; + authorsBio?: string; + content?: string; +}; + +export const renderEssay = ({ banner, authorsBio, content }: EssayData) => + renderToString( + <> + + {authorsBio ? raw(authorsBio) : null} + {content ? raw(content) : null} + + ); diff --git a/lib/routes/psyche/templates/video.art b/lib/routes/psyche/templates/video.art deleted file mode 100644 index cd45ad8866c6..000000000000 --- a/lib/routes/psyche/templates/video.art +++ /dev/null @@ -1,10 +0,0 @@ -{{ set video = article.hosterId }} -{{ if article.hoster === 'vimeo' }} - {{ set video = "https://player.vimeo.com/video/" + video + "?dnt=1"}} -{{ else if article.hoster == 'youtube' }} - {{ set video = "https://www.youtube-nocookie.com/embed/" + video }} -{{ /if }} - - -{{@ article.credits}} -{{@ article.description}} diff --git a/lib/routes/psyche/templates/video.tsx b/lib/routes/psyche/templates/video.tsx new file mode 100644 index 000000000000..724727bae200 --- /dev/null +++ b/lib/routes/psyche/templates/video.tsx @@ -0,0 +1,19 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +export const renderVideo = (article) => { + let videoUrl = article.hosterId; + if (article.hoster === 'vimeo') { + videoUrl = `https://player.vimeo.com/video/${videoUrl}?dnt=1`; + } else if (article.hoster === 'youtube') { + videoUrl = `https://www.youtube-nocookie.com/embed/${videoUrl}`; + } + + return renderToString( + <> + + {article.credits ? raw(article.credits) : null} + {article.description ? raw(article.description) : null} + + ); +}; diff --git a/lib/routes/psyche/utils.ts b/lib/routes/psyche/utils.ts index 8e6cdc205744..08f35f6b045e 100644 --- a/lib/routes/psyche/utils.ts +++ b/lib/routes/psyche/utils.ts @@ -1,10 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; + +import { renderEssay } from './templates/essay'; +import { renderVideo } from './templates/video'; const getImageById = async (id) => { const response = await ofetch('https://api.aeonmedia.co/graphql', { @@ -31,7 +31,7 @@ function format(article) { switch (type) { case 'film': - block = art(path.join(__dirname, 'templates/video.art'), { article }); + block = renderVideo(article); break; @@ -50,7 +50,7 @@ function format(article) { }) .join(''); - block = art(path.join(__dirname, 'templates/essay.art'), { banner, authorsBio, content }); + block = renderEssay({ banner, authorsBio, content }); break; } @@ -60,7 +60,7 @@ function format(article) { const capture = load(article.body); capture('p.pullquote').remove(); - block = art(path.join(__dirname, 'templates/essay.art'), { banner, authorsBio, content: capture.html() }); + block = renderEssay({ banner, authorsBio, content: capture.html() }); break; } diff --git a/lib/routes/pts/curations.ts b/lib/routes/pts/curations.ts index 3bdded7237c2..74c4c751d391 100644 --- a/lib/routes/pts/curations.ts +++ b/lib/routes/pts/curations.ts @@ -1,11 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/curations', @@ -55,7 +54,7 @@ async function handler() { title: item.text(), link: item.attr('href'), pubDate: parseDate(projectDiv.find('time').text()), - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ image: projectDiv.parent().find('.cover-fit').attr('src'), }), }; diff --git a/lib/routes/pts/index.ts b/lib/routes/pts/index.ts index d8899e01ca33..55ba5dbd6259 100644 --- a/lib/routes/pts/index.ts +++ b/lib/routes/pts/index.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; @@ -7,9 +5,10 @@ import cache from '@/utils/cache'; import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + export const route: Route = { path: '*', name: 'Unknown', @@ -61,7 +60,7 @@ async function handler(ctx) { .toArray() .map((t) => content(t).text()) .filter((t) => t !== '...'); - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ image: content('meta[property="og:image"]').attr('content'), description: content('.post-article').html(), }); diff --git a/lib/routes/pts/live.ts b/lib/routes/pts/live.ts index bb7bcd4715d4..ac9deb5eee85 100644 --- a/lib/routes/pts/live.ts +++ b/lib/routes/pts/live.ts @@ -1,10 +1,9 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderLive } from './templates/live'; export const route: Route = { path: '/live/:id', @@ -57,7 +56,7 @@ async function handler(ctx) { item.title = data.title; item.pubDate = parseDate(data.updatedDate); - item.description = art(path.join(__dirname, 'templates/live.art'), { + item.description = renderLive({ images: data.content.filter((d) => d.type === 'img').map((i) => `${imageRootUrl}/${i.imgFileUrl}`), texts: data.content.filter((d) => d.type === 'text').map((t) => t.content), }); diff --git a/lib/routes/pts/projects.ts b/lib/routes/pts/projects.ts index fc74e190bf23..419a46a93e44 100644 --- a/lib/routes/pts/projects.ts +++ b/lib/routes/pts/projects.ts @@ -1,11 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/projects', @@ -54,7 +53,7 @@ async function handler() { title: item.text(), link: item.attr('href'), pubDate: parseDate(projectDiv.find('time').text()), - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ image: projectDiv.parent().find('.cover-fit')?.attr('src') ?? projectDiv.parent().parent().find('.cover-fit').attr('src'), description: description ? `

    ${description}

    ` : '', }), diff --git a/lib/routes/pts/templates/description.art b/lib/routes/pts/templates/description.art deleted file mode 100644 index 69e93d20cfd9..000000000000 --- a/lib/routes/pts/templates/description.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ if image }} - -{{ /if }} -{{ if description }} -{{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/pts/templates/description.tsx b/lib/routes/pts/templates/description.tsx new file mode 100644 index 000000000000..7d331d4c40f3 --- /dev/null +++ b/lib/routes/pts/templates/description.tsx @@ -0,0 +1,15 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + image?: string; + description?: string; +}; + +export const renderDescription = ({ image, description }: DescriptionData): string => + renderToString( + <> + {image ? : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/pts/templates/live.art b/lib/routes/pts/templates/live.art deleted file mode 100644 index 2278835f8cf3..000000000000 --- a/lib/routes/pts/templates/live.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ each images image }} - -{{ /each }} -{{ each texts text }} -{{@ text }} -{{ /each }} \ No newline at end of file diff --git a/lib/routes/pts/templates/live.tsx b/lib/routes/pts/templates/live.tsx new file mode 100644 index 000000000000..ec1989c6b03e --- /dev/null +++ b/lib/routes/pts/templates/live.tsx @@ -0,0 +1,19 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type LiveData = { + images: string[]; + texts: string[]; +}; + +export const renderLive = ({ images, texts }: LiveData): string => + renderToString( + <> + {images.map((image) => ( + + ))} + {texts.map((text) => ( + <>{raw(text)} + ))} + + ); diff --git a/lib/routes/pubmed/templates/description.art b/lib/routes/pubmed/templates/description.art deleted file mode 100644 index c4b8e232b997..000000000000 --- a/lib/routes/pubmed/templates/description.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if authors }} -{{@ authors }} -{{ /if}} -
    -{{ if abs }} -{{@ abs }} -{{ /if}} \ No newline at end of file diff --git a/lib/routes/pubmed/trending.ts b/lib/routes/pubmed/trending.tsx similarity index 78% rename from lib/routes/pubmed/trending.ts rename to lib/routes/pubmed/trending.tsx index b9db7b59d849..8897a7aa342b 100644 --- a/lib/routes/pubmed/trending.ts +++ b/lib/routes/pubmed/trending.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/trending/:filters?', @@ -51,10 +50,13 @@ async function handler(ctx) { item.doi = content('meta[name="citation_doi"]').attr('content'); item.pubDate = parseDate(content('meta[name="citation_date"]').attr('content')); - item.description = art(path.join(__dirname, 'templates/description.art'), { - authors: content('.authors-list').html(), - abs: content('#enc-abstract').html(), - }); + item.description = renderToString( + <> + {content('.authors-list').html() ? raw(content('.authors-list').html()) : null} +
    + {content('#enc-abstract').html() ? raw(content('#enc-abstract').html()) : null} + + ); return item; }) diff --git a/lib/routes/qidian/author.ts b/lib/routes/qidian/author.tsx similarity index 76% rename from lib/routes/qidian/author.ts rename to lib/routes/qidian/author.tsx index f7cb6d69738c..f3827d73fc24 100644 --- a/lib/routes/qidian/author.ts +++ b/lib/routes/qidian/author.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -49,10 +47,7 @@ async function handler(ctx) { title: messageItem.find('.author-item-title').text().trim(), author: authorName, category: messageItem.find('.author-item-exp a').first().text().trim(), - description: art(path.join(__dirname, 'templates/description.art'), { - description: messageItem.find('.author-item-update a').attr('title'), - image: item.find('a img').attr('src'), - }), + description: renderDescription(messageItem.find('.author-item-update a').attr('title'), item.find('a img').attr('src')), pubDate: timezone(/(今|昨)/.test(updatedDate) ? parseRelativeDate(updatedDate) : parseDate(updatedDate, 'YYYY-MM-DD HH:mm'), +8), link: messageItem.find('.author-item-update a').attr('href'), }; @@ -65,3 +60,13 @@ async function handler(ctx) { item: items, }; } + +const renderDescription = (description?: string, image?: string, author?: string) => renderToString(); + +const QidianDescription = ({ description, image, author }: { description?: string; image?: string; author?: string }) => ( + <> +

    {description}

    + {image ? : null} + {author ?? null} + +); diff --git a/lib/routes/qidian/templates/description.art b/lib/routes/qidian/templates/description.art deleted file mode 100644 index 33a6ef7e6bfe..000000000000 --- a/lib/routes/qidian/templates/description.art +++ /dev/null @@ -1,5 +0,0 @@ -

    {{ description }}

    -{{ if image }} - -{{ /if }} -{{ author }} \ No newline at end of file diff --git a/lib/routes/qoo-app/apps/comment.ts b/lib/routes/qoo-app/apps/comment.ts index e8db39377b45..253e707b0e60 100644 --- a/lib/routes/qoo-app/apps/comment.ts +++ b/lib/routes/qoo-app/apps/comment.ts @@ -1,13 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderComment } from '../templates/comment'; import { appsUrl } from '../utils'; export const route: Route = { @@ -50,7 +48,7 @@ async function handler(ctx) { return { title: `${author} ▶ ${item.find('.qoo-clearfix .name a').eq(1).text()}`, link: item.find('a.bg-click-wrap').attr('href'), - description: art(path.join(__dirname, '../templates/comment.art'), { + description: renderComment({ rating: item.find('.qoo-rating-bar').text().trim(), text: item.find('.text-view').html(), }), diff --git a/lib/routes/qoo-app/notes/note.ts b/lib/routes/qoo-app/notes/note.ts index d86332157b8f..296586d2544e 100644 --- a/lib/routes/qoo-app/notes/note.ts +++ b/lib/routes/qoo-app/notes/note.ts @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; +import { renderNote } from '../templates/note'; import { notesUrl, ssoUrl } from '../utils'; export const route: Route = { @@ -47,7 +45,7 @@ async function handler(ctx) { const items = data.data.map((item) => ({ title: item.content, - description: art(path.join(__dirname, '../templates/note.art'), { + description: renderNote({ content: item.content, picture: item.picture, }), diff --git a/lib/routes/qoo-app/templates/comment.art b/lib/routes/qoo-app/templates/comment.art deleted file mode 100644 index 6e0b42c6c074..000000000000 --- a/lib/routes/qoo-app/templates/comment.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ rating }}/5.0 -
    -{{@ text }} diff --git a/lib/routes/qoo-app/templates/comment.tsx b/lib/routes/qoo-app/templates/comment.tsx new file mode 100644 index 000000000000..c31010f01570 --- /dev/null +++ b/lib/routes/qoo-app/templates/comment.tsx @@ -0,0 +1,16 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type CommentData = { + rating?: string | number; + text?: string; +}; + +export const renderComment = ({ rating, text }: CommentData) => + renderToString( + <> + {rating}/5.0 +
    + {text ? raw(text) : null} + + ); diff --git a/lib/routes/qoo-app/templates/note.art b/lib/routes/qoo-app/templates/note.art deleted file mode 100644 index db298159c211..000000000000 --- a/lib/routes/qoo-app/templates/note.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ content }} -{{ if picture }} -
    - -{{ /if }} diff --git a/lib/routes/qoo-app/templates/note.tsx b/lib/routes/qoo-app/templates/note.tsx new file mode 100644 index 000000000000..5e190055b854 --- /dev/null +++ b/lib/routes/qoo-app/templates/note.tsx @@ -0,0 +1,19 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type NoteData = { + content?: string; + picture?: string; +}; + +export const renderNote = ({ content, picture }: NoteData) => + renderToString( + <> + {content} + {picture ? ( + <> +
    + + + ) : null} + + ); diff --git a/lib/routes/qoo-app/user/app-comment.ts b/lib/routes/qoo-app/user/app-comment.ts index 9f050ea4490a..d1ba7dc885c9 100644 --- a/lib/routes/qoo-app/user/app-comment.ts +++ b/lib/routes/qoo-app/user/app-comment.ts @@ -1,13 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderComment } from '../templates/comment'; import { appsUrl, userUrl } from '../utils'; export const route: Route = { @@ -45,7 +43,7 @@ async function handler(ctx) { const items = data.list.map((item) => ({ title: `${username} ▶ ${item.app.name}`, link: `${appsUrl}/comment-detail/${item.comment.id}`, - description: art(path.join(__dirname, '../templates/comment.art'), { + description: renderComment({ rating: item.score, text: item.comment.content, }), diff --git a/lib/routes/qq/ac/templates/description.art b/lib/routes/qq/ac/templates/description.art deleted file mode 100644 index eaa42448eb5e..000000000000 --- a/lib/routes/qq/ac/templates/description.art +++ /dev/null @@ -1,9 +0,0 @@ -{{ if image !== '' }} - -{{ /if }} -{{ if description !== '' }} -

    {{ description }}

    -{{ /if }} -{{ each chapters chapter }} - -{{/each}} \ No newline at end of file diff --git a/lib/routes/qq/ac/utils.ts b/lib/routes/qq/ac/utils.tsx similarity index 55% rename from lib/routes/qq/ac/utils.ts rename to lib/routes/qq/ac/utils.tsx index 6499a677fbdf..28cebab54036 100644 --- a/lib/routes/qq/ac/utils.ts +++ b/lib/routes/qq/ac/utils.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const rootUrl = 'https://ac.qq.com'; const mobileRootUrl = 'https://m.ac.qq.com'; @@ -44,17 +42,19 @@ const ProcessItems = async (ctx, currentUrl, time, title) => { .toArray() .map((a) => $(a).text().trim()) .join(', '); - item.description = art(path.join(__dirname, 'templates/description.art'), { - image: content('.head-cover')?.attr('src') ?? '', - description: content('.head-info-desc')?.text() ?? '', - chapters: content('.reverse .bottom-chapter-item .chapter-link') - .toArray() - .map((chapter) => ({ - link: content(chapter).attr('href'), - title: content(chapter).find('.comic-title')?.text() ?? '', - image: content(chapter).find('.cover-image')?.attr('src') ?? '', - })), - }); + item.description = renderToString( + ({ + link: content(chapter).attr('href'), + title: content(chapter).find('.comic-title')?.text() ?? '', + image: content(chapter).find('.cover-image')?.attr('src') ?? '', + }))} + /> + ); return item; }) @@ -69,3 +69,16 @@ const ProcessItems = async (ctx, currentUrl, time, title) => { }; export { mobileRootUrl, ProcessItems, rootUrl }; + +const QqAcDescription = ({ image, description, chapters }: { image: string; description: string; chapters: { link?: string; title?: string; image?: string }[] }) => ( + <> + {image === '' ? null : } + {description === '' ? null :

    {description}

    } + {chapters.map((chapter) => ( + + ))} + +); diff --git a/lib/routes/qq/fact/index.ts b/lib/routes/qq/fact/index.tsx similarity index 69% rename from lib/routes/qq/fact/index.ts rename to lib/routes/qq/fact/index.tsx index 3c79365e3afc..ca93a9689207 100644 --- a/lib/routes/qq/fact/index.ts +++ b/lib/routes/qq/fact/index.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import CryptoJS from 'crypto-js'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const getRequestToken = () => { const e = 'sgn51n6r6q97o6g3'; @@ -71,9 +70,7 @@ async function handler() { const nextData = JSON.parse($('#__NEXT_DATA__').text()); const { initialState } = nextData.props.pageProps; - item.description = art(path.join(__dirname, '../templates/article.art'), { - data: initialState, - }); + item.description = renderToString(); item.pubDate = parseDate(initialState.createdAt); return item; @@ -87,3 +84,25 @@ async function handler() { item: items, }; } + +const QqFactDescription = ({ data }: { data: any }) => { + const cover = data.cover?.startsWith('//') ? `https:${data.cover}` : data.cover?.startsWith('http') ? data.cover : data.cover ? `https://${data.cover}` : undefined; + + return ( + <> + {cover ? : null} + {data.rumor ?
    流传说法:{data.rumor}
    : null} + {data.abstract ? ( + <> + 查证要点: +
      + {data.abstract.map((item) => ( +
    1. {item.content}
    2. + ))} +
    + + ) : null} + {data.content ?
    {raw(data.content)}
    : null} + + ); +}; diff --git a/lib/routes/qq/templates/article.art b/lib/routes/qq/templates/article.art deleted file mode 100644 index 12b6f6163391..000000000000 --- a/lib/routes/qq/templates/article.art +++ /dev/null @@ -1,19 +0,0 @@ -{{ if data.cover }} - -{{ /if }} - -{{ if data.rumor }} -
    流传说法:{{ data.rumor }}
    -{{ /if }} - -{{ if data.abstract }}查证要点: -
      - {{ each data.abstract item }} -
    1. {{ item.content }}
    2. - {{ /each }} -
    -{{ /if }} - -{{ if data.content }} -
    {{@ data.content }}
    -{{ /if }} diff --git a/lib/routes/questmobile/report.ts b/lib/routes/questmobile/report.ts index b34deddaeb06..13da2f4661a6 100644 --- a/lib/routes/questmobile/report.ts +++ b/lib/routes/questmobile/report.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; /** * Parses a tree array and returns an array of objects containing the key-value pairs. @@ -194,7 +193,7 @@ async function handler(ctx) { let items = response.data.slice(0, limit).map((item) => ({ title: item.title, link: new URL(`research/report/${item.id}`, rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ image: { src: item.coverImgUrl, alt: item.title, @@ -217,7 +216,7 @@ async function handler(ctx) { content('div.text div.daoyu').remove(); item.title = content('div.title h1').text(); - item.description += art(path.join(__dirname, 'templates/description.art'), { + item.description += renderDescription({ description: content('div.text').html(), }); item.author = content('div.source') diff --git a/lib/routes/questmobile/templates/description.art b/lib/routes/questmobile/templates/description.art deleted file mode 100644 index dd4ad1216ff8..000000000000 --- a/lib/routes/questmobile/templates/description.art +++ /dev/null @@ -1,17 +0,0 @@ -{{ if image?.src }} -
    - {{ image.alt }} -
    -{{ /if }} - -{{ if introduction }} -
    {{ introduction }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/questmobile/templates/description.tsx b/lib/routes/questmobile/templates/description.tsx new file mode 100644 index 000000000000..8b2b415a4849 --- /dev/null +++ b/lib/routes/questmobile/templates/description.tsx @@ -0,0 +1,25 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + image?: { + src?: string; + alt?: string; + }; + introduction?: string; + description?: string; +}; + +const QuestMobileDescription = ({ image, introduction, description }: DescriptionData) => ( + <> + {image?.src ? ( +
    + {image.alt} +
    + ) : null} + {introduction ?
    {introduction}
    : null} + {description ? raw(description) : null} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/radio/album.ts b/lib/routes/radio/album.ts index daf54a41f49c..4d8113da95f8 100644 --- a/lib/routes/radio/album.ts +++ b/lib/routes/radio/album.ts @@ -1,11 +1,10 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + const audio_types = { m3u8: 'x-mpegURL', mp3: 'mpeg', @@ -83,10 +82,7 @@ async function handler(ctx) { guid: item.id, title: item.name, link: `${rootUrl}/share/albumPlay?correlateId=${item.id}&columnId=${id}`, - description: art(path.join(__dirname, 'templates/description.art'), { - enclosure_url, - enclosure_type, - }), + description: renderDescription({ enclosure_url, enclosure_type }), pubDate: timezone(parseDate(item.createTime), +8), enclosure_url, enclosure_type, diff --git a/lib/routes/radio/index.ts b/lib/routes/radio/index.ts index f09525aa7861..8a646cba574b 100644 --- a/lib/routes/radio/index.ts +++ b/lib/routes/radio/index.ts @@ -1,9 +1,8 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/:id', @@ -60,7 +59,7 @@ async function handler(ctx) { guid: item.id, title: item.name, link: item.streams[0].url, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ description: item.description, enclosure_url, enclosure_type, diff --git a/lib/routes/radio/templates/description.art b/lib/routes/radio/templates/description.art deleted file mode 100644 index 4844f516f963..000000000000 --- a/lib/routes/radio/templates/description.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if description }} -

    {{ description }}

    -{{ /if }} -{{ if enclosure_url && enclosure_type }} - -{{ /if }} diff --git a/lib/routes/radio/templates/description.tsx b/lib/routes/radio/templates/description.tsx new file mode 100644 index 000000000000..e9f633d38287 --- /dev/null +++ b/lib/routes/radio/templates/description.tsx @@ -0,0 +1,20 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + description?: string; + enclosure_url?: string; + enclosure_type?: string; +}; + +const RadioDescription = ({ description, enclosure_url, enclosure_type }: DescriptionData) => ( + <> + {description ?

    {description}

    : null} + {enclosure_url && enclosure_type ? ( + + ) : null} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/radio/zhibo.ts b/lib/routes/radio/zhibo.ts index e53bdd0a689b..9f56c7a14aab 100644 --- a/lib/routes/radio/zhibo.ts +++ b/lib/routes/radio/zhibo.ts @@ -1,11 +1,10 @@ -import path from 'node:path'; - import CryptoJS from 'crypto-js'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const audio_types = { m3u8: 'x-mpegURL', @@ -84,11 +83,7 @@ async function handler(ctx) { guid: item.id, title: `${dateString} ${item.name}`, link: enclosure_url, - description: art(path.join(__dirname, 'templates/description.art'), { - description: item.des, - enclosure_url, - enclosure_type, - }), + description: renderDescription({ description: item.des, enclosure_url, enclosure_type }), pubDate: parseDate(item.startTime), enclosure_url, enclosure_type, diff --git a/lib/routes/raspberrypi/magazine.ts b/lib/routes/raspberrypi/magazine.ts index df8a315e05ce..f17657be0ac9 100644 --- a/lib/routes/raspberrypi/magazine.ts +++ b/lib/routes/raspberrypi/magazine.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '12', 10); @@ -35,7 +34,7 @@ export const handler = async (ctx: Context): Promise => { const title: string = $aEl.text()?.trim(); const image: string | undefined = $el.find('div.o-media__fixed a.c-link img').attr('src'); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { @@ -83,8 +82,8 @@ export const handler = async (ctx: Context): Promise => { const title: string = $$('h1.rspec-issue__heading').text().split(/-/).pop()?.trim() ?? item.title; const description: string | undefined = item.description + - art(path.join(__dirname, 'templates/description.art'), { - description: $$('div.rspec-issue__description').html(), + renderDescription({ + description: $$('div.rspec-issue__description').html() || undefined, }); const pubDateStr: string | undefined = $$('time.rspec-issue__publication-month').attr('datetime'); const image: string | undefined = $$('img.c-figure__image').attr('src'); diff --git a/lib/routes/raspberrypi/templates/description.art b/lib/routes/raspberrypi/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/raspberrypi/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/raspberrypi/templates/description.tsx b/lib/routes/raspberrypi/templates/description.tsx new file mode 100644 index 000000000000..81ceaef91ae7 --- /dev/null +++ b/lib/routes/raspberrypi/templates/description.tsx @@ -0,0 +1,22 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type Image = { + src: string; + alt?: string; +}; + +type DescriptionProps = { + images?: Image[]; + intro?: string; + description?: string; +}; + +export const renderDescription = ({ images, intro, description }: DescriptionProps): string => + renderToString( + <> + {images?.length ? images.map((image) => (image?.src ?
    {image.alt ? {image.alt} : }
    : null)) : null} + {intro ?
    {intro}
    : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/rattibha/templates/description.art b/lib/routes/rattibha/templates/description.art deleted file mode 100644 index e68717eaf5ac..000000000000 --- a/lib/routes/rattibha/templates/description.art +++ /dev/null @@ -1,12 +0,0 @@ -{{ if media }} - {{ if media.type === 1 }} - - {{ else if media.type === 2 }} - - {{ /if }} -
    -{{ /if }} - -{{@ text }} diff --git a/lib/routes/rattibha/user.ts b/lib/routes/rattibha/user.tsx similarity index 71% rename from lib/routes/rattibha/user.ts rename to lib/routes/rattibha/user.tsx index 52be2f03c273..b99b540dbd4f 100644 --- a/lib/routes/rattibha/user.ts +++ b/lib/routes/rattibha/user.tsx @@ -1,14 +1,11 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; import cache from '@/utils/cache'; -import { getCurrentPath } from '@/utils/helpers'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; - -const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/user/:user', @@ -66,10 +63,23 @@ async function handler(ctx) { updated: parseDate(item.thread.updated_at), author: userData.name, category: item.thread.categories.map((category) => category.tag.name), - description: art(path.join(__dirname, 'templates/description.art'), { - text: item.thread.t.info.text.replaceAll('\n', '
    '), - media: item.thread.m, - }), + description: renderToString( + <> + {item.thread.m ? ( + <> + {item.thread.m.type === 1 ? ( + + ) : item.thread.m.type === 2 ? ( + + ) : null} +
    + + ) : null} + {raw(item.thread.t.info.text.replaceAll('\n', '
    '))} + + ), })); return { diff --git a/lib/routes/rawkuma/manga.ts b/lib/routes/rawkuma/manga.tsx similarity index 91% rename from lib/routes/rawkuma/manga.ts rename to lib/routes/rawkuma/manga.tsx index 7daae2cd6461..cbf47ff3bb8c 100644 --- a/lib/routes/rawkuma/manga.ts +++ b/lib/routes/rawkuma/manga.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/manga/:id', @@ -77,9 +75,13 @@ async function handler(ctx) { const images = imageMatches ? JSON.parse(imageMatches[1]) : []; item.title = content('div.chpnw').text().trim(); - item.description = art(path.join(__dirname, 'templates/description.art'), { - images, - }); + item.description = renderToString( + <> + {images.map((image) => ( + + ))} + + ); item.author = author; item.category = category; item.pubDate = parseDate(content('time.entry-date').prop('datetime').replace(/WIB/, 'T')); diff --git a/lib/routes/rawkuma/templates/description.art b/lib/routes/rawkuma/templates/description.art deleted file mode 100644 index 53c7f7b395df..000000000000 --- a/lib/routes/rawkuma/templates/description.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ each images image }} - -{{ /each }} \ No newline at end of file diff --git a/lib/routes/readhub/index.ts b/lib/routes/readhub/index.ts index a405411bc5ed..881568460c8e 100644 --- a/lib/routes/readhub/index.ts +++ b/lib/routes/readhub/index.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; @@ -7,7 +5,8 @@ import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { apiTopicUrl, art, processItems, rootUrl } from './util'; +import { renderDescription } from './templates/description'; +import { apiTopicUrl, processItems, rootUrl } from './util'; export const route: Route = { path: '/:category?', @@ -51,10 +50,11 @@ async function handler(ctx) { let items = response.data.items.slice(0, limit).map((item) => ({ title: item.title, link: item.url ?? new URL(`topic/${item.uid}`, rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ description: item.summary, news: item.newsAggList, timeline: item.timeline, + rootUrl, }), author: item.siteNameDisplay, category: [...(item.entityList.map((c) => c.name) ?? []), ...(item.tagList.map((c) => c.name) ?? [])], diff --git a/lib/routes/readhub/templates/description.art b/lib/routes/readhub/templates/description.art deleted file mode 100644 index a7570ea87c87..000000000000 --- a/lib/routes/readhub/templates/description.art +++ /dev/null @@ -1,40 +0,0 @@ -{{ if description }} -

    {{ description }}

    -{{ /if }} - -{{ if news }} -

    媒体报道

    - - - {{ each news n }} - - - - - {{ /each }} - -
    - {{ n.title }} - - {{ n.siteNameDisplay }} -
    -{{ /if }} - -{{ if timeline }} -

    事件追踪

    - - - {{ set topics = timeline.topics }} - {{ each topics t }} - - - - - {{ /each }} - -
    - {{ t.publishDate | formatDate 'YYYY-MM-DD HH:mm:ss' }} - - {{ t.title }} -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/readhub/templates/description.tsx b/lib/routes/readhub/templates/description.tsx new file mode 100644 index 000000000000..3c716a045169 --- /dev/null +++ b/lib/routes/readhub/templates/description.tsx @@ -0,0 +1,70 @@ +import dayjs from 'dayjs'; +import { renderToString } from 'hono/jsx/dom/server'; + +type NewsItem = { + url?: string; + title?: string; + siteNameDisplay?: string; +}; + +type TimelineTopic = { + publishDate?: string; + uid?: string; + title?: string; +}; + +type TimelineData = { + topics?: TimelineTopic[]; +}; + +type DescriptionData = { + description?: string; + news?: NewsItem[]; + timeline?: TimelineData; + rootUrl: string; +}; + +export const renderDescription = ({ description, news, timeline, rootUrl }: DescriptionData) => + renderToString( + <> + {description ?

    {description}

    : null} + {news ? ( + <> +

    媒体报道

    + + + {news.map((item, index) => ( + + + + + ))} + +
    + {item.title} + + {item.siteNameDisplay} +
    + + ) : null} + {timeline ? ( + <> +

    事件追踪

    + + + {timeline.topics?.map((topic, index) => ( + + + + + ))} + +
    + {topic.publishDate ? dayjs(topic.publishDate).format('YYYY-MM-DD HH:mm:ss') : ''} + + {topic.title} +
    + + ) : null} + + ); diff --git a/lib/routes/readhub/util.ts b/lib/routes/readhub/util.ts index 08e6c9f6207e..2bb28b445f60 100644 --- a/lib/routes/readhub/util.ts +++ b/lib/routes/readhub/util.ts @@ -1,26 +1,13 @@ -import path from 'node:path'; - -import dayjs from 'dayjs'; - import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const domain = 'readhub.cn'; const rootUrl = `https://${domain}`; const apiRootUrl = `https://api.${domain}`; const apiTopicUrl = new URL('topic/list', apiRootUrl).href; -const formatDate = (date, format) => dayjs(date).format(format); -const toTopicUrl = (id) => new URL(`topic/${id}`, rootUrl).href; - -art.defaults.imports = { - ...art.defaults.imports, - - formatDate, - toTopicUrl, -}; - /** * Process items asynchronously. * @@ -43,10 +30,11 @@ const processItems = async (items, tryGet) => item.title = data.title; item.link = data.url ?? new URL(`topic/${data.uid}`, rootUrl).href; - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ description: data.summary, news: data.newsAggList, timeline: data.timeline, + rootUrl, }); item.author = data.siteNameDisplay; item.category = [...(data.entityList.map((c) => c.name) ?? []), ...(data.tagList.map((c) => c.name) ?? [])]; @@ -62,5 +50,3 @@ const processItems = async (items, tryGet) => ); export { apiRootUrl, apiTopicUrl, processItems, rootUrl }; - -export { art } from '@/utils/render'; diff --git a/lib/routes/reuters/common.ts b/lib/routes/reuters/common.tsx similarity index 73% rename from lib/routes/reuters/common.ts rename to lib/routes/reuters/common.tsx index b7489c70744c..d114c0855568 100644 --- a/lib/routes/reuters/common.ts +++ b/lib/routes/reuters/common.tsx @@ -1,13 +1,115 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +type ReutersContent = { + result: { + summary?: Array<{ description?: string }>; + related_content?: { + galleries?: Array<{ + content_elements?: Array<{ + type?: string; + renditions?: { original?: Record }; + alt_text?: string; + caption?: string; + thumbnail?: { url?: string }; + source?: { mp4?: string }; + description?: string; + }>; + }>; + images?: Array<{ + type?: string; + renditions?: { original?: Record }; + alt_text?: string; + caption?: string; + }>; + }; + content_elements?: Array<{ + type?: string; + content?: string; + level?: number; + }>; + sign_off?: string; + title?: string; + display_time?: string; + authors?: Array<{ name: string }>; + taxonomy?: { keywords?: string[] }; + }; +}; + +const renderDescription = ({ result }: ReutersContent): string => { + const contentElements = result.content_elements ?? []; + + const description = ( + <> + {result.summary ? ( + <> + Summary: +
      + {result.summary.map((summary, index) => ( +
    • {summary.description}
    • + ))} +
    + + ) : null} + {result.related_content ? ( + <> + {result.related_content.galleries?.flatMap((gallery, galleryIndex) => + (gallery.content_elements ?? []).map((element, elementIndex) => + element.type === 'image' ? ( +
    + {element.alt_text} +
    {element.caption}
    +
    + ) : null + ) + )} + {result.related_content.images?.map((image, index) => + image.type === 'image' ? ( +
    + {image.alt_text} +
    {image.caption}
    +
    + ) : null + )} + {result.related_content.galleries?.flatMap((gallery, galleryIndex) => + (gallery.content_elements ?? []).map((element, elementIndex) => + element.type === 'video' ? ( +
    + + {element.description} +
    + ) : null + ) + )} + + ) : null} + {contentElements.map((element, index) => { + if (element.type === 'paragraph') { + return

    {element.content ? raw(element.content) : null}

    ; + } + + if (element.type === 'header') { + const HeaderTag = `h${element.level ?? 1}` as keyof JSX.IntrinsicElements; + return {element.content ? raw(element.content) : null}; + } + + return null; + })} + {result.sign_off ? {result.sign_off} : null} + + ); + + return renderToString(description); +}; export const route: Route = { path: '/:category/:topic?', @@ -191,7 +293,7 @@ async function handler(ctx) { const data = JSON.parse(matches[1]); item.title = data.result.title || item.title; - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ result: data.result, }); item.pubDate = parseDate(data.result.display_time); diff --git a/lib/routes/reuters/templates/description.art b/lib/routes/reuters/templates/description.art deleted file mode 100644 index da5686643275..000000000000 --- a/lib/routes/reuters/templates/description.art +++ /dev/null @@ -1,44 +0,0 @@ -{{ if result.summary }} -Summary: -
      {{ each result.summary s }} -
    • {{ s.description }}
    • -{{ /each }}
    -{{ /if }} - -{{ if result.related_content }} -{{ each result.related_content.galleries g }} - {{ each g.content_elements e }} - {{ if e.type === 'image' }} -
    {{ e.alt_text }} -
    {{ e.caption }}
    -
    - {{ /if }} - {{ /each }} -{{ /each }} -{{ each result.related_content.images i }} - {{ if i.type === 'image' }} -
    {{ i.alt_text }} -
    {{ i.caption }}
    -
    - {{ /if }} -{{ /each }} -{{ each result.related_content.galleries v }} - {{ each v.content_elements c }} - {{ if c.type === 'video' }} - - {{ c.description }} - {{ /if }} - {{ /each }} -{{ /each }} -{{ /if }} - -{{ if result.content_elements }} -{{ each result.content_elements e }} - {{ if e.type === 'paragraph' }}

    {{@ e.content }}

    {{ /if }} - {{ if e.type === 'header' }}{{@ e.content }}{{ /if }} -{{ /each }} -{{ /if }} - -{{ if result.sign_off }}{{ result.sign_off }}{{ /if }} diff --git a/lib/routes/rockthejvm/articles.ts b/lib/routes/rockthejvm/articles.ts index 9dd9051684ba..e1844ddabfe4 100644 --- a/lib/routes/rockthejvm/articles.ts +++ b/lib/routes/rockthejvm/articles.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); @@ -34,7 +33,7 @@ export const handler = async (ctx: Context): Promise => { const $aEl: Cheerio = $el.find('h2 a'); const title: string = $aEl.text(); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ intro: $el.find('p.text-content').first().text(), }); const pubDateStr: string | undefined = $el.find('time').attr('datetime'); @@ -84,8 +83,8 @@ export const handler = async (ctx: Context): Promise => { const title: string = $$('meta[property="og:title"]').attr('content') ?? item.title; const description: string | undefined = item.description + - art(path.join(__dirname, 'templates/description.art'), { - description: $$('div.prose').html(), + renderDescription({ + description: $$('div.prose').html() ?? undefined, }); const pubDateStr: string | undefined = $$('meta[property="article:published_time"]').attr('content'); const categoryEls: Element[] = $$('meta[property="article:tag"]').toArray(); diff --git a/lib/routes/rockthejvm/templates/description.art b/lib/routes/rockthejvm/templates/description.art deleted file mode 100644 index 57498ab45a9d..000000000000 --- a/lib/routes/rockthejvm/templates/description.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/rockthejvm/templates/description.tsx b/lib/routes/rockthejvm/templates/description.tsx new file mode 100644 index 000000000000..ca6a8f6d2ca7 --- /dev/null +++ b/lib/routes/rockthejvm/templates/description.tsx @@ -0,0 +1,15 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionRenderOptions = { + intro?: string; + description?: string; +}; + +export const renderDescription = ({ intro, description }: DescriptionRenderOptions): string => + renderToString( + <> + {intro ?
    {intro}
    : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/routledge/book-series.ts b/lib/routes/routledge/book-series.tsx similarity index 84% rename from lib/routes/routledge/book-series.ts rename to lib/routes/routledge/book-series.tsx index 248e85d2c5c9..2385837a7631 100644 --- a/lib/routes/routledge/book-series.ts +++ b/lib/routes/routledge/book-series.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/:bookName/book-series/:bookId', @@ -76,10 +75,7 @@ async function handler(ctx) { description.find('button.accordion-button').contents().unwrap(); description.find('.fa-shopping-cart').parent().parent().remove(); - item.description = art(path.join(__dirname, 'templates/description.art'), { - image, - description: description.html(), - }); + item.description = renderDescription(image, description.html()); return item; }) ) @@ -92,3 +88,16 @@ async function handler(ctx) { item: items, }; } + +const renderDescription = (image: string | undefined, description: string | null): string => + renderToString( + <> + {image ? ( + <> + +
    + + ) : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/routledge/templates/description.art b/lib/routes/routledge/templates/description.art deleted file mode 100644 index d7f9b4d48c93..000000000000 --- a/lib/routes/routledge/templates/description.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if image }} -
    -{{ /if }} - -{{ if description }} -{{@ description }} -{{ /if }} diff --git a/lib/routes/rsc/journal.ts b/lib/routes/rsc/journal.tsx similarity index 94% rename from lib/routes/rsc/journal.ts rename to lib/routes/rsc/journal.tsx index 47ae3828de99..0360471b464d 100644 --- a/lib/routes/rsc/journal.ts +++ b/lib/routes/rsc/journal.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -54,10 +52,15 @@ async function handler(ctx) { let $ = load(response); $('div.capsule__article-image').each(function () { + const image = $(this).find('img').prop('data-original'); $(this).replaceWith( - art(path.join(__dirname, 'templates/image.art'), { - image: $(this).find('img').prop('data-original'), - }) + renderToString( + image ? ( +
    + +
    + ) : null + ) ); }); diff --git a/lib/routes/rsc/templates/image.art b/lib/routes/rsc/templates/image.art deleted file mode 100644 index 779c2f675fa5..000000000000 --- a/lib/routes/rsc/templates/image.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ if image }} -
    - -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/saraba1st/digest.ts b/lib/routes/saraba1st/digest.tsx similarity index 71% rename from lib/routes/saraba1st/digest.ts rename to lib/routes/saraba1st/digest.tsx index 48c849afa441..f208e21e3b5c 100644 --- a/lib/routes/saraba1st/digest.ts +++ b/lib/routes/saraba1st/digest.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -87,15 +86,17 @@ async function fetchContent(url) { .find('div[id*="post_"] ') .each(function () { if (subind(this).find('td[id*="postmessage_"]').length > 0) { - const section = art(path.join(__dirname, 'templates/digest.art'), { - author: { - link: subind(this).find('.pls.favatar div.authi a').attr('href'), - name: subind(this).find('.pls.favatar div.authi').text(), - postinfo: subind(this).find('div.authi em[id*=authorposton]').text(), - }, - msg: subind(this).find('td[id*="postmessage_"]').html(), - host: config.saraba1st.host, - }); + const section = renderToString( + + ); stubS.append(section); } }); @@ -114,3 +115,17 @@ async function fetchContent(url) { return stubS.html(); } + +const DigestSection = ({ author, msg, host }: { author: { link?: string; name: string; postinfo: string }; msg?: string; host: string }) => ( + <> +
    + + {author.name} + + {author.postinfo} +
    +
    + {msg ? raw(msg) : null} +
    + +); diff --git a/lib/routes/saraba1st/templates/digest.art b/lib/routes/saraba1st/templates/digest.art deleted file mode 100644 index ef7f64954423..000000000000 --- a/lib/routes/saraba1st/templates/digest.art +++ /dev/null @@ -1,5 +0,0 @@ -
    - {{ author.name }} - {{ author.postinfo }} -
    -
    {{@ msg }}
    diff --git a/lib/routes/science/cover.ts b/lib/routes/science/cover.tsx similarity index 88% rename from lib/routes/science/cover.ts rename to lib/routes/science/cover.tsx index f8970f06ce26..107b7e897069 100644 --- a/lib/routes/science/cover.ts +++ b/lib/routes/science/cover.tsx @@ -1,6 +1,6 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; // journals form AAAS publishing group @@ -13,7 +13,6 @@ import type { Route } from '@/types'; // stm: Science Translational Medicine import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { baseUrl } from './utils'; @@ -79,10 +78,7 @@ async function handler() { return { title: `${name} | Volume ${volume} Issue ${issue}`, - description: art(path.join(__dirname, 'templates/cover.art'), { - coverUrl, - content, - }), + description: renderDescription(coverUrl, content), link: `${baseUrl}/${link}/${volume}/${issue}`, pubDate: parseDate(date), }; @@ -97,3 +93,11 @@ async function handler() { item: items, }; } + +const renderDescription = (coverUrl: string, content: string | null): string => + renderToString( + <> + + {content ? raw(content) : null} + + ); diff --git a/lib/routes/science/templates/article.art b/lib/routes/science/templates/article.art deleted file mode 100644 index 5ae8004574a6..000000000000 --- a/lib/routes/science/templates/article.art +++ /dev/null @@ -1,2 +0,0 @@ -{{ if abs }}{{@ abs }}{{ /if }} -{{ if content }}
    {{@ content }}{{ /if }} diff --git a/lib/routes/science/templates/cover.art b/lib/routes/science/templates/cover.art deleted file mode 100644 index 80f4e05e94db..000000000000 --- a/lib/routes/science/templates/cover.art +++ /dev/null @@ -1,2 +0,0 @@ - -{{@ content }} diff --git a/lib/routes/science/utils.ts b/lib/routes/science/utils.tsx similarity index 81% rename from lib/routes/science/utils.ts rename to lib/routes/science/utils.tsx index e616d1fb9271..7489961e8d4d 100644 --- a/lib/routes/science/utils.ts +++ b/lib/routes/science/utils.tsx @@ -1,9 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const baseUrl = 'https://www.science.org'; @@ -34,10 +33,7 @@ const fetchDesc = (list, browser, tryGet) => ? '' : $('section#bodymatter').html(); - item.description = art(path.join(__dirname, 'templates/article.art'), { - abs: abstract, - content, - }); + item.description = renderDescription(abstract, content); return item; }) @@ -60,3 +56,16 @@ const getItem = (item, $) => { }; export { baseUrl, fetchDesc, getItem }; + +const renderDescription = (abs: string | null, content: string | null): string => + renderToString( + <> + {abs ? raw(abs) : null} + {content ? ( + <> +
    + {raw(content)} + + ) : null} + + ); diff --git a/lib/routes/sciencedirect/call-for-paper.ts b/lib/routes/sciencedirect/call-for-paper.tsx similarity index 81% rename from lib/routes/sciencedirect/call-for-paper.ts rename to lib/routes/sciencedirect/call-for-paper.tsx index c3954a8691ad..d43200ef0ded 100644 --- a/lib/routes/sciencedirect/call-for-paper.ts +++ b/lib/routes/sciencedirect/call-for-paper.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; export const route: Route = { path: '/call-for-paper/:subject', @@ -54,13 +52,19 @@ async function handler(ctx) { const items = cfpList.map((cfp) => { const link = `https://www.sciencedirect.com/special-issue/${cfp.contentId}/${cfp.url}`; - const description = art(path.join(__dirname, 'templates/description.art'), { - summary: cfp.summary, - submissionDeadline: cfp.submissionDeadline, - displayName: cfp.journal.displayName, - impactFactor: cfp.journal.impactFactor, - citeScore: cfp.journal.citeScore, - }); + const description = renderToString( +
    +

    + Summary: {cfp.summary} +

    +

    + Submission Deadline: {cfp.submissionDeadline} +

    +

    + Journal: {`${cfp.journal.displayName} (IF: ${cfp.journal.impactFactor}, CiteScore: ${cfp.journal.citeScore})`} +

    +
    + ); return { title: cfp.title, diff --git a/lib/routes/sciencedirect/templates/description.art b/lib/routes/sciencedirect/templates/description.art deleted file mode 100644 index d1ecbf0ab98a..000000000000 --- a/lib/routes/sciencedirect/templates/description.art +++ /dev/null @@ -1,5 +0,0 @@ -
    -

    Summary: {{summary}}

    -

    Submission Deadline: {{submissionDeadline}}

    -

    Journal: {{displayName}} (IF: {{impactFactor}}, CiteScore: {{citeScore}})

    -
    diff --git a/lib/routes/scientificamerican/podcast.ts b/lib/routes/scientificamerican/podcast.ts index 07e98a8243da..38a931eb0e66 100644 --- a/lib/routes/scientificamerican/podcast.ts +++ b/lib/routes/scientificamerican/podcast.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Context } from 'hono'; @@ -9,9 +7,10 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + export const handler = async (ctx: Context): Promise => { const { id } = ctx.req.param(); const limit: number = Number.parseInt(ctx.req.query('limit') ?? '12', 10); @@ -31,7 +30,7 @@ export const handler = async (ctx: Context): Promise => { ? parsedData.initialData.props.results.slice(0, limit).map((item): DataItem => { const title: string = item.title; const image: string | undefined = item.image_url; - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ images: image ? [ { @@ -114,7 +113,7 @@ export const handler = async (ctx: Context): Promise => { const title: string = articleData.title; const image: string | undefined = articleData.image_url; - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ images: image ? [ { diff --git a/lib/routes/scientificamerican/templates/description.art b/lib/routes/scientificamerican/templates/description.art deleted file mode 100644 index ec6912ddf580..000000000000 --- a/lib/routes/scientificamerican/templates/description.art +++ /dev/null @@ -1,31 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} - {{@ intro }} -{{ /if }} - -{{ if content }} - {{ each content c }} - <{{ c.tag }}> - {{@ c.content }} - - {{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/scientificamerican/templates/description.tsx b/lib/routes/scientificamerican/templates/description.tsx new file mode 100644 index 000000000000..bc1599bf307a --- /dev/null +++ b/lib/routes/scientificamerican/templates/description.tsx @@ -0,0 +1,43 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; + width?: string | number; + height?: string | number; +}; + +type ContentBlock = { + tag: string; + content: string; +}; + +type DescriptionData = { + images?: DescriptionImage[]; + intro?: string; + content?: ContentBlock[]; +}; + +const ScientificAmericanDescription = ({ images, intro, content }: DescriptionData) => ( + <> + {images?.map((image) => { + if (!image?.src) { + return null; + } + const altValue = image.height ?? image.width ?? image.alt; + return ( +
    + {altValue +
    + ); + })} + {intro ? raw(intro) : null} + {content?.map((block) => { + const Tag = block.tag as keyof JSX.IntrinsicElements; + return {raw(block.content)}; + })} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/scitechvista/index.ts b/lib/routes/scitechvista/index.tsx similarity index 86% rename from lib/routes/scitechvista/index.ts rename to lib/routes/scitechvista/index.tsx index bbcfbba7b2f0..c4805ad8159e 100644 --- a/lib/routes/scitechvista/index.ts +++ b/lib/routes/scitechvista/index.tsx @@ -1,11 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, DataItem, Route } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; import { namespace } from './namespace'; @@ -77,10 +76,16 @@ async function handler(): Promise { const snippet = node.find('div.kf-txt').first().text().trim() || undefined; - const description = art(path.join(__dirname, 'templates/description.art'), { - image, - description: snippet, - }); + const description = renderToString( + <> + {image ? ( +

    + +

    + ) : null} + {snippet ?

    {raw(snippet)}

    : null} + + ); return { title, diff --git a/lib/routes/scitechvista/templates/description.art b/lib/routes/scitechvista/templates/description.art deleted file mode 100644 index 4df64baba2fc..000000000000 --- a/lib/routes/scitechvista/templates/description.art +++ /dev/null @@ -1,6 +0,0 @@ -{{if image}} -

    -{{/if}} -{{if description}} -

    {{@ description }}

    -{{/if}} diff --git a/lib/routes/scoop/apps.ts b/lib/routes/scoop/apps.tsx similarity index 72% rename from lib/routes/scoop/apps.ts rename to lib/routes/scoop/apps.tsx index 8d547483c620..ad554805335f 100644 --- a/lib/routes/scoop/apps.ts +++ b/lib/routes/scoop/apps.tsx @@ -1,14 +1,12 @@ -import path from 'node:path'; - import type { CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, DataItem, Route } from '@/types'; import { ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const orderbys = (desc: string) => { const base = { @@ -100,9 +98,7 @@ export const handler = async (ctx: Context): Promise => { const repositorySplits: string[] = item.Metadata.Repository.split(/\//); const repositoryName: string = repositorySplits.slice(-2).join('/'); const title: string = `${item.Name} ${item.Version} in ${repositoryName}`; - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { - item, - }); + const description: string | undefined = renderToString(); const pubDate: number | string = item.Metadata.Committed; const linkUrl: string | undefined = item.Homepage; const authors: DataItem['author'] = [ @@ -148,6 +144,73 @@ export const handler = async (ctx: Context): Promise => { }; }; +const ScoopDescription = ({ item }: { item: any }) => { + const repositoryName = item.Metadata.Repository.split(/\//).slice(-2).join('/'); + + return ( + + + {item.Name ? ( + + + + + ) : null} + {item.Repository ? ( + + + + + ) : null} + {item.Committed ? ( + + + + + ) : null} + {item.Version ? ( + + + + + ) : null} + {item.Description ? ( + + + + + ) : null} + {item.Homepage ? ( + + + + + ) : null} + {item.License ? ( + + + + + ) : null} + {item.Note ? ( + + + + + ) : null} + +
    Name{item.Name}
    Repository + {repositoryName} +
    Committed + {item.Metadata.Committed} +
    Version + v{item.Version} +
    Description{item.Description}
    Homepage + {item.Homepage} +
    License{item.License}
    Note{item.Note}
    + ); +}; + export const route: Route = { path: '/apps/:query?', name: 'Apps', diff --git a/lib/routes/scoop/templates/description.art b/lib/routes/scoop/templates/description.art deleted file mode 100644 index f0deeaa624a9..000000000000 --- a/lib/routes/scoop/templates/description.art +++ /dev/null @@ -1,56 +0,0 @@ -{{ if item }} - - - {{ if item.Name }} - - - - - {{ /if }} - {{ if item.Repository }} - - - - - {{ /if }} - {{ if item.Committed }} - - - - - {{ /if }} - {{ if item.Version }} - - - - - {{ /if }} - {{ if item.Description }} - - - - - {{ /if }} - {{ if item.Homepage }} - - - - - {{ /if }} - {{ if item.License }} - - - - - {{ /if }} - {{ if item.Note }} - - - - - {{ /if }} - -
    Name{{ item.Name }}
    Repository - {{ item.Metadata.Repository.split(/\//).slice(-2).join('/') }} -
    Committed{{ item.Metadata.Committed }}
    Versionv{{ item.Version }}
    Description{{ item.Description }}
    Homepage{{ item.Homepage }}
    License{{ item.License }}
    Note{{ item.Note }}
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/sctv/programme.ts b/lib/routes/sctv/programme.tsx similarity index 94% rename from lib/routes/sctv/programme.ts rename to lib/routes/sctv/programme.tsx index 3d62e97711e9..379d57e744f6 100644 --- a/lib/routes/sctv/programme.ts +++ b/lib/routes/sctv/programme.tsx @@ -1,10 +1,9 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -114,10 +113,11 @@ async function handler(ctx) { title: item.programmeTitle, link: item.programmeUrl, pubDate: timezone(parseDate(item.pubTime), +8), - description: art(path.join(__dirname, 'templates/description.art'), { - cover: item.programmeImage, - video: item.programmeUrl, - }), + description: renderToString( + + ), })); let currentFullItems = []; diff --git a/lib/routes/sctv/templates/description.art b/lib/routes/sctv/templates/description.art deleted file mode 100644 index d802a1ac6051..000000000000 --- a/lib/routes/sctv/templates/description.art +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/lib/routes/sdo/ff14risingstones/templates/duties-party.art b/lib/routes/sdo/ff14risingstones/templates/duties-party.art deleted file mode 100644 index ccee1b353ed5..000000000000 --- a/lib/routes/sdo/ff14risingstones/templates/duties-party.art +++ /dev/null @@ -1,41 +0,0 @@ -
    -

    进度:{{ progress }}

    -

    攻略:{{ strategy }}

    -

    时间:{{ fb_time }}

    -

    标签:{{ labelInfo.map(i => i.name).join(',') }}

    - {{ if team_composition === '团队' }} -

    队伍构成

    -

    A队:{{ team_position.A }}

    -

    B队:{{ team_position.B }}

    -

    C队:{{ team_position.C }}

    - {{ else if team_composition === '满编小队' }} -

    队伍构成

    -

    MT:{{ MT }}

    -

    ST:{{ ST }}

    -

    H1:{{ H1 }}

    -

    H2:{{ H2 }}

    -

    D1:{{ D1 }}

    -

    D2:{{ D2 }}

    -

    D3:{{ D3 }}

    -

    D4:{{ D4 }}

    - {{ else if team_composition === '轻锐小队' }} -

    队伍构成

    -

    T:{{ T }}

    -

    H:{{ H }}

    -

    D1:{{ D1 }}

    -

    D2:{{ D2 }}

    - {{ /if }} - - {{ if need_job }} -

    需求职业:{{ need_job }}

    - {{ /if }} - {{ if team_detail_mask }} -

    队伍详情:{{ team_detail_mask }}

    - {{ /if }} - {{ if recruit_require_mask }} -

    招募要求:{{ recruit_require_mask }}

    - {{ /if }} - {{ if strategy_desc_mask }} -

    攻略说明:{{ strategy_desc_mask }}

    - {{ /if }} -
    diff --git a/lib/routes/sdo/ff14risingstones/templates/fc-party.art b/lib/routes/sdo/ff14risingstones/templates/fc-party.art deleted file mode 100644 index 812675629543..000000000000 --- a/lib/routes/sdo/ff14risingstones/templates/fc-party.art +++ /dev/null @@ -1,26 +0,0 @@ -{{ if cover_pic }} - -{{ /if }} - -

    部队名称:{{ guild_name }} <{{ guild_tag }}>

    -

    区服:{{ area_name }} {{ group_name }}

    -

    活跃成员:{{ active_member_num }}

    -

    招募人数:{{ target_recruit_num }}

    -

    活跃时间:工作日 {{ weekday_time }}    休息日 {{ weekend_time }}

    -{{ if guild_address }} -

    部队地址:{{ guild_address }}

    -{{ /if }} -{{ if create_time }} -

    成立时间:{{ create_time }}

    -{{ /if }} -

    部队标签:{{ labelInfo.map(i => i.name).join(',') }}

    - -
    -{{@ detail_mask }} -
    - -{{ if foot_pic }} -{{ each foot_pic.split(',') url }} - -{{ /each }} -{{ /if }} diff --git a/lib/routes/sdo/ff14risingstones/templates/novice-network-party.art b/lib/routes/sdo/ff14risingstones/templates/novice-network-party.art deleted file mode 100644 index b0287600cf67..000000000000 --- a/lib/routes/sdo/ff14risingstones/templates/novice-network-party.art +++ /dev/null @@ -1,9 +0,0 @@ -{{@ detail_mask }} - -
    - {{ if weekday_time && weekend_time }} -

    活跃时间:工作日 {{ weekday_time }}    休息日 {{ weekend_time }}

    - {{ /if }} -

    游戏风格:{{ styles }}

    -

    招募区服:{{ target }}

    -
    diff --git a/lib/routes/sdo/ff14risingstones/templates/rp-party.art b/lib/routes/sdo/ff14risingstones/templates/rp-party.art deleted file mode 100644 index 2a450a941c30..000000000000 --- a/lib/routes/sdo/ff14risingstones/templates/rp-party.art +++ /dev/null @@ -1,15 +0,0 @@ -{{ if cover_pic }} - -{{ /if }} - -

    开放时间:{{ open_time }}

    -

    RP 类型:{{ rp_type }}

    -

    创立时间:{{ create_time }}

    -

    区服:{{ area }}

    -

    地址:{{ address }}

    -

    标签:{{ custom_label }}

    -

    简介:{{ profile }}

    - -
    -{{@ detail_mask }} -
    diff --git a/lib/routes/sdo/ff14risingstones/utils.ts b/lib/routes/sdo/ff14risingstones/utils.tsx similarity index 70% rename from lib/routes/sdo/ff14risingstones/utils.ts rename to lib/routes/sdo/ff14risingstones/utils.tsx index dc8b3b1603b3..0d937660a27c 100644 --- a/lib/routes/sdo/ff14risingstones/utils.ts +++ b/lib/routes/sdo/ff14risingstones/utils.tsx @@ -1,17 +1,115 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; import type { DataItem } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; import { getDutiesRecruitDetail, getFreeCompanyRecruitDetail, getNoviceNetworkRecruitDetail, getPostsDetail } from './api'; import { DynamicSource, INDEX_URL, JOB, NoviceNetworkIdentity, PLAY_STYLE } from './constant'; import type { BaseResponse, DutiesPartyDetail, FreeCompanyPartyDetail, NoviceNetworkParty, PostDetail, UserDynamic, UserPost } from './types'; +const renderNoviceNetworkParty = ({ detail_mask, weekday_time, weekend_time, styles, target }) => + renderToString( + <> + {detail_mask ? raw(detail_mask) : null} +
    + {weekday_time && weekend_time ? ( +

    + 活跃时间:工作日 {weekday_time}    休息日 {weekend_time} +

    + ) : null} +

    游戏风格:{styles}

    +

    招募区服:{target}

    +
    + + ); + +const renderDutiesParty = ({ progress, strategy, fb_time, labelInfo, team_composition, team_position, MT, ST, T, H, H1, H2, D1, D2, D3, D4, need_job, team_detail_mask, recruit_require_mask, strategy_desc_mask }) => + renderToString( +
    +

    进度:{progress}

    +

    攻略:{strategy}

    +

    时间:{fb_time}

    +

    标签:{labelInfo.map((i) => i.name).join(',')}

    + {team_composition === '团队' ? ( + <> +

    队伍构成

    +

    A队:{team_position.A}

    +

    B队:{team_position.B}

    +

    C队:{team_position.C}

    + + ) : null} + {team_composition === '满编小队' ? ( + <> +

    队伍构成

    +

    MT:{MT}

    +

    ST:{ST}

    +

    H1:{H1}

    +

    H2:{H2}

    +

    D1:{D1}

    +

    D2:{D2}

    +

    D3:{D3}

    +

    D4:{D4}

    + + ) : null} + {team_composition === '轻锐小队' ? ( + <> +

    队伍构成

    +

    T:{T}

    +

    H:{H}

    +

    D1:{D1}

    +

    D2:{D2}

    + + ) : null} + {need_job ?

    需求职业:{need_job}

    : null} + {team_detail_mask ?

    队伍详情:{team_detail_mask}

    : null} + {recruit_require_mask ?

    招募要求:{recruit_require_mask}

    : null} + {strategy_desc_mask ?

    攻略说明:{strategy_desc_mask}

    : null} +
    + ); + +const renderFreeCompanyParty = ({ cover_pic, guild_name, guild_tag, area_name, group_name, active_member_num, target_recruit_num, weekday_time, weekend_time, guild_address, create_time, labelInfo, detail_mask, foot_pic }) => + renderToString( + <> + {cover_pic ? : null} +

    + 部队名称:{guild_name} <{guild_tag}> +

    +

    + 区服:{area_name} {group_name} +

    +

    活跃成员:{active_member_num}

    +

    招募人数:{target_recruit_num}

    +

    + 活跃时间:工作日 {weekday_time}    休息日 {weekend_time} +

    + {guild_address ?

    部队地址:{guild_address}

    : null} + {create_time ?

    成立时间:{create_time}

    : null} +

    部队标签:{labelInfo.map((i) => i.name).join(',')}

    +
    {detail_mask ? raw(detail_mask) : null}
    + {foot_pic ? foot_pic.split(',').map((url) => ) : null} + + ); + +const renderRolePlayParty = ({ cover_pic, open_time, rp_type, create_time, area, address, custom_label, profile, detail_mask }) => + renderToString( + <> + {cover_pic ? : null} +

    开放时间:{open_time}

    +

    RP 类型:{rp_type}

    +

    创立时间:{create_time}

    +

    区服:{area}

    +

    地址:{address}

    +

    标签:{custom_label}

    +

    简介:{profile}

    +
    {detail_mask ? raw(detail_mask) : null}
    + + ); + export function checkConfig() { if (!config.sdo.ff14risingstones || !config.sdo.ua) { throw new ConfigNotFoundError('ff14risingstones RSS is disabled due to the lack of relevant config'); @@ -82,7 +180,7 @@ export async function generateDynamicFeeds(dynamics: UserDynamic[]) { title += `[找${dynamic.from_info.identity === NoviceNetworkIdentity.Mentor ? '豆芽' : '导师'}] ${dynamic.from_info.title}`; link = `${INDEX_URL}#/recruit/beginner?id=${dynamic.from_info.id}`; detail = await getNoviceNetworkRecruitDetail(dynamic.from_info.id); - description = art(path.join(__dirname, 'templates/novice-network-party.art'), { + description = renderNoviceNetworkParty({ detail_mask: dynamic.from_info.detail_mask, styles: dynamic.from_info.style.map((i) => PLAY_STYLE[i]).join(','), target: `${dynamic.from_info.target_area_name} ${dynamic.from_info.target_group_name ?? '全区'}`, @@ -99,10 +197,9 @@ export async function generateDynamicFeeds(dynamics: UserDynamic[]) { link = `${INDEX_URL}#/recruit/party?id=${dynamic.from_info.id}`; detail = await getDutiesRecruitDetail(dynamic.from_info.id); - description = art(path.join(__dirname, 'templates/duties-party.art'), { + description = renderDutiesParty({ progress: dynamic.from_info.progress, strategy: dynamic.from_info.strategy, - fb_name: dynamic.from_info.fb_name, fb_time: dynamic.from_info.fb_time, labelInfo: dynamic.from_info.labelInfo, team_composition: dynamic.from_info.team_composition, @@ -147,7 +244,7 @@ export async function generateDynamicFeeds(dynamics: UserDynamic[]) { link = `${INDEX_URL}#/recruit/guild/detail/${dynamic.from_info.id}`; detail = await getFreeCompanyRecruitDetail(dynamic.from_info.id); - description = art(path.join(__dirname, 'templates/fc-party.art'), { + description = renderFreeCompanyParty({ cover_pic: dynamic.from_info.cover_pic, guild_name: dynamic.from_info.guild_name, guild_tag: dynamic.from_info.guild_tag, @@ -171,7 +268,7 @@ export async function generateDynamicFeeds(dynamics: UserDynamic[]) { } title += dynamic.from_info.rp_name; link = `${INDEX_URL}#/recruit/roleplay/detail/${dynamic.from_info.id}`; - description = art(path.join(__dirname, 'templates/rp-party.art'), { + description = renderRolePlayParty({ cover_pic: dynamic.from_info.cover_pic, open_time: dynamic.from_info.open_time, rp_type: `${dynamic.from_info.rp_type diff --git a/lib/routes/secretsanfrancisco/rss.ts b/lib/routes/secretsanfrancisco/rss.tsx similarity index 83% rename from lib/routes/secretsanfrancisco/rss.ts rename to lib/routes/secretsanfrancisco/rss.tsx index d50f56fc5c9d..20d069784ef2 100644 --- a/lib/routes/secretsanfrancisco/rss.ts +++ b/lib/routes/secretsanfrancisco/rss.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/:category?', @@ -80,12 +79,17 @@ async function handler(ctx) { const single = { title: item.title.rendered, - description: art(path.join(__dirname, 'templates/description.art'), { - content: item.content.rendered, - image, - altText, - caption: caption?.text() || '', - }), + description: renderToString( + <> + {image ? ( +
    + {altText ? {altText} : } +
    {caption?.text() || ''}
    +
    + ) : null} + {item.content?.rendered ? raw(item.content.rendered) : null} + + ), link: item.link, pubDate: parseDate(item.date_gmt), updated: parseDate(item.modified_gmt), diff --git a/lib/routes/secretsanfrancisco/templates/description.art b/lib/routes/secretsanfrancisco/templates/description.art deleted file mode 100644 index 7b0c2f498f71..000000000000 --- a/lib/routes/secretsanfrancisco/templates/description.art +++ /dev/null @@ -1,9 +0,0 @@ -{{ if image }} -
    - {{ altText }} -
    {{ caption }}
    -
    -{{ /if }} -{{ if content }} -{{@ content }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/seekingalpha/index.ts b/lib/routes/seekingalpha/index.tsx similarity index 84% rename from lib/routes/seekingalpha/index.ts rename to lib/routes/seekingalpha/index.tsx index e99b83d21cf8..1b4f14ec1044 100644 --- a/lib/routes/seekingalpha/index.ts +++ b/lib/routes/seekingalpha/index.tsx @@ -1,10 +1,9 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const baseUrl = 'https://seekingalpha.com'; @@ -93,12 +92,20 @@ async function handler(ctx) { }); item.category = response.included.filter((i) => i.type === 'tag').map((i) => (i.attributes.company ? `${i.attributes.company} (${i.attributes.name})` : i.attributes.name)); - item.description = - (response.data.attributes.summary?.length - ? art(path.join(__dirname, 'templates/summary.art'), { - summary: response.data.attributes.summary, - }) - : '') + response.data.attributes.content; + const summary = response.data.attributes.summary; + const summaryDescription = summary?.length + ? renderToString( + <> +

    Summary

    +
      + {summary.map((entry) => ( +
    • {entry}
    • + ))} +
    + + ) + : ''; + item.description = summaryDescription + response.data.attributes.content; item.updated = parseDate(response.data.attributes.lastModified); return item; diff --git a/lib/routes/seekingalpha/templates/summary.art b/lib/routes/seekingalpha/templates/summary.art deleted file mode 100644 index dd0f1c40880f..000000000000 --- a/lib/routes/seekingalpha/templates/summary.art +++ /dev/null @@ -1,4 +0,0 @@ -

    Summary

    -
      -{{ each summary s }}
    • {{ s }}
    • {{ /each }} -
    diff --git a/lib/routes/semiconductors/index.ts b/lib/routes/semiconductors/index.ts index 54f0baffd303..e442ccb785df 100644 --- a/lib/routes/semiconductors/index.ts +++ b/lib/routes/semiconductors/index.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const { category = 'news-events/latest-news' } = ctx.req.param(); @@ -38,7 +37,7 @@ export const handler = async (ctx: Context): Promise => { .find('img') .attr('src') ?.replace(/-\d+x\d+\./, '.'); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { @@ -94,7 +93,7 @@ export const handler = async (ctx: Context): Promise => { const image: string | undefined = $$('meta[property="og:image"]') .attr('content') ?.replace(/-scaled\./, '.'); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ images: image ? [ { @@ -103,7 +102,7 @@ export const handler = async (ctx: Context): Promise => { }, ] : undefined, - description: $$('main#main').html(), + description: $$('main#main').html() || undefined, }); const pubDateStr: string | undefined = $$('meta[property="article:published_time"]').attr('content'); const authorEls: Element[] = $$('meta[name="author"]').toArray(); diff --git a/lib/routes/semiconductors/templates/description.art b/lib/routes/semiconductors/templates/description.art deleted file mode 100644 index bfb1a0ff6398..000000000000 --- a/lib/routes/semiconductors/templates/description.art +++ /dev/null @@ -1,27 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/semiconductors/templates/description.tsx b/lib/routes/semiconductors/templates/description.tsx new file mode 100644 index 000000000000..510068a30504 --- /dev/null +++ b/lib/routes/semiconductors/templates/description.tsx @@ -0,0 +1,32 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type Image = { + src: string; + alt?: string; + width?: string | number; + height?: string | number; +}; + +type DescriptionProps = { + images?: Image[]; + intro?: string; + description?: string; +}; + +export const renderDescription = ({ images, intro, description }: DescriptionProps): string => + renderToString( + <> + {images?.length + ? images.map((image) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + ) + : null} + {intro ?
    {intro}
    : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/sensortower/blog.ts b/lib/routes/sensortower/blog.ts index 3029779f6476..bf5c6533c371 100644 --- a/lib/routes/sensortower/blog.ts +++ b/lib/routes/sensortower/blog.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/blog/:language?', @@ -71,20 +70,16 @@ async function handler(ctx) { content('img').each(function () { const image = (content(this).attr('srcset') ?? content(this).attr('src')).split('?w=')[0]; - content(this).replaceWith( - art(path.join(__dirname, 'templates/description.art'), { - image, - }) - ); + content(this).replaceWith(renderDescription({ image })); }); item.title = detail.title; item.author = detail.author.name; item.pubDate = parseDate(detail.pubDate, 'MMMM YYYY'); item.category = [...(detail.tags?.map((t) => t.title) ?? []), ...(detail.category?.map((c) => c.title) ?? [])]; - item.description = art(path.join(__dirname, 'templates/description.art'), { - header: content('header[data-csk-entry-type="blog"]').html(), - description: content('div[data-csk-entry-type="blog"] div[data-testid="Text-root"]').html(), + item.description = renderDescription({ + header: content('header[data-csk-entry-type="blog"]').html() ?? undefined, + description: content('div[data-csk-entry-type="blog"] div[data-testid="Text-root"]').html() ?? undefined, }); return item; diff --git a/lib/routes/sensortower/templates/description.art b/lib/routes/sensortower/templates/description.art deleted file mode 100644 index 112e33db71a4..000000000000 --- a/lib/routes/sensortower/templates/description.art +++ /dev/null @@ -1,9 +0,0 @@ -{{ if image }} - -{{ /if }} -{{ if header }} -{{@ header }} -{{ /if }} -{{ if description }} -{{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/sensortower/templates/description.tsx b/lib/routes/sensortower/templates/description.tsx new file mode 100644 index 000000000000..0ae927e29e3f --- /dev/null +++ b/lib/routes/sensortower/templates/description.tsx @@ -0,0 +1,17 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionRenderOptions = { + image?: string; + header?: string; + description?: string; +}; + +export const renderDescription = ({ image, header, description }: DescriptionRenderOptions): string => + renderToString( + <> + {image ? : null} + {header ? <>{raw(header)} : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/shcstheatre/programs.ts b/lib/routes/shcstheatre/programs.ts deleted file mode 100644 index 6d5d6d966b57..000000000000 --- a/lib/routes/shcstheatre/programs.ts +++ /dev/null @@ -1,67 +0,0 @@ -import path from 'node:path'; - -import { load } from 'cheerio'; - -import type { Route } from '@/types'; -import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; -import timezone from '@/utils/timezone'; - -export const route: Route = { - path: '/programs', - categories: ['shopping'], - example: '/shcstheatre/programs', - parameters: {}, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['www.shcstheatre.com/Program/programList.aspx'], - }, - ], - name: '节目列表', - maintainers: ['fuzy112'], - handler, - url: 'www.shcstheatre.com/Program/programList.aspx', -}; - -async function handler() { - const url = 'https://www.shcstheatre.com/Program/programList.aspx'; - const res = await got.get(url); - const $ = load(res.data); - const items = await Promise.all( - $('#datarow .program-name a').map((_, elem) => { - const link = new URL($(elem).attr('href'), url); - return cache.tryGet(link.toString(), async () => { - const id = link.searchParams.get('id'); - const res2 = await got.post('https://www.shcstheatre.com/webapi.ashx?op=GettblprogramCache', { - headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }, - form: { id }, - }); - const data = res2.data.data.tblprogram[0]; - return { - title: data.SCS_WEB_BRIEFNAME, - link: link.toString(), - description: art(path.join(__dirname, 'templates/description.art'), data), - pubDate: timezone(parseDate(data.SJ_DATE_PC), +8), - }; - }); - }) - ); - const image = $('.menu-logo img').attr('src'); - - return { - title: '上海文化广场 - 节目列表', - link: url, - image, - item: items, - }; -} diff --git a/lib/routes/shcstheatre/programs.tsx b/lib/routes/shcstheatre/programs.tsx new file mode 100644 index 000000000000..c3d6eb0a3187 --- /dev/null +++ b/lib/routes/shcstheatre/programs.tsx @@ -0,0 +1,159 @@ +import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +import type { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +export const route: Route = { + path: '/programs', + categories: ['shopping'], + example: '/shcstheatre/programs', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.shcstheatre.com/Program/programList.aspx'], + }, + ], + name: '节目列表', + maintainers: ['fuzy112'], + handler, + url: 'www.shcstheatre.com/Program/programList.aspx', +}; + +async function handler() { + const url = 'https://www.shcstheatre.com/Program/programList.aspx'; + const res = await got.get(url); + const $ = load(res.data); + const baseUrl = 'https://www.shcstheatre.com'; + const splitImages = (value?: string) => + value + ?.split(';') + .map((item) => item.trim()) + .filter(Boolean) ?? []; + const renderDescription = (data) => { + const { + SCS_PC_YMXQ_PIC, + SCS_WEBPERCYCLE, + SCS_EINLASSNAME, + SCS_PERFORMANCE_TYPENAME, + SCS_LENGTH, + SCS_PERLANGUAGENAME, + SCS_PC_LUNBO_YCJS_EDITOR, + SCS_PC_LUNBO_YCJS_PIC, + SCS_PC_LUNBO_ZCTD_EDITOR, + SCS_PC_LUNBO_ZCTD_PIC, + SCS_PC_LUNBO_JQGG_EDITOR, + SCS_PC_LUNBO_JQGG_PIC, + SCS_PC_LUNBO_HJJL_EDITOR, + SCS_PC_LUNBO_HJJL_PIC, + SCS_PC_LUNBO_MTPL_EDITOR, + SCS_PC_LUNBO_MTPL_PIC, + } = data; + + return renderToString( +
    + {splitImages(SCS_PC_YMXQ_PIC).map((src) => ( + + ))} + +
      +
    • 演出日期:{SCS_WEBPERCYCLE}
    • +
    • 入场时间:{SCS_EINLASSNAME}
    • +
    • 演出类型:{SCS_PERFORMANCE_TYPENAME}
    • +
    • 演出时长:{SCS_LENGTH}分钟
    • +
    • 演出语言:{SCS_PERLANGUAGENAME}
    • +
    + + {SCS_PC_LUNBO_YCJS_EDITOR ? ( + <> +

    演出介绍

    + {splitImages(SCS_PC_LUNBO_YCJS_PIC).map((src) => ( + + ))} +
    {raw(SCS_PC_LUNBO_YCJS_EDITOR)}
    + + ) : null} + + {SCS_PC_LUNBO_ZCTD_EDITOR ? ( + <> +

    主创团队

    + {splitImages(SCS_PC_LUNBO_ZCTD_PIC).map((src) => ( + + ))} +
    {raw(SCS_PC_LUNBO_ZCTD_EDITOR)}
    + + ) : null} + + {SCS_PC_LUNBO_JQGG_EDITOR ? ( + <> +

    剧情梗概

    + {splitImages(SCS_PC_LUNBO_JQGG_PIC).map((src) => ( + + ))} +
    {raw(SCS_PC_LUNBO_JQGG_EDITOR)}
    + + ) : null} + + {SCS_PC_LUNBO_HJJL_EDITOR ? ( + <> +

    获奖记录

    + {splitImages(SCS_PC_LUNBO_HJJL_PIC).map((src) => ( + + ))} +
    {raw(SCS_PC_LUNBO_HJJL_EDITOR)}
    + + ) : null} + + {SCS_PC_LUNBO_MTPL_EDITOR ? ( + <> +

    媒体评论

    + {splitImages(SCS_PC_LUNBO_MTPL_PIC).map((src) => ( + + ))} +
    {raw(SCS_PC_LUNBO_MTPL_EDITOR)}
    + + ) : null} +
    + ); + }; + + const items = await Promise.all( + $('#datarow .program-name a').map((_, elem) => { + const link = new URL($(elem).attr('href'), url); + return cache.tryGet(link.toString(), async () => { + const id = link.searchParams.get('id'); + const res2 = await got.post('https://www.shcstheatre.com/webapi.ashx?op=GettblprogramCache', { + headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }, + form: { id }, + }); + const data = res2.data.data.tblprogram[0]; + return { + title: data.SCS_WEB_BRIEFNAME, + link: link.toString(), + description: renderDescription(data), + pubDate: timezone(parseDate(data.SJ_DATE_PC), +8), + }; + }); + }) + ); + const image = $('.menu-logo img').attr('src'); + + return { + title: '上海文化广场 - 节目列表', + link: url, + image, + item: items, + }; +} diff --git a/lib/routes/shcstheatre/templates/description.art b/lib/routes/shcstheatre/templates/description.art deleted file mode 100644 index fc5a21449308..000000000000 --- a/lib/routes/shcstheatre/templates/description.art +++ /dev/null @@ -1,65 +0,0 @@ -
    - {{ if SCS_PC_YMXQ_PIC }} - {{ each SCS_PC_YMXQ_PIC.split(';').map(s => s.trim() )}} - - {{ /each }} - {{ /if }} - -
      -
    • 演出日期:{{ SCS_WEBPERCYCLE }}
    • -
    • 入场时间:{{ SCS_EINLASSNAME }}
    • -
    • 演出类型:{{ SCS_PERFORMANCE_TYPENAME }}
    • -
    • 演出时长:{{ SCS_LENGTH }}分钟
    • -
    • 演出语言:{{ SCS_PERLANGUAGENAME }}
    • -
    - - {{ if SCS_PC_LUNBO_YCJS_EDITOR }} -

    演出介绍

    - {{ if SCS_PC_LUNBO_YCJS_PIC }} - {{ each SCS_PC_LUNBO_YCJS_PIC.split(';').map(s => s.trim()) }} - - {{ /each }} - {{ /if }} -
    {{@ SCS_PC_LUNBO_YCJS_EDITOR }}
    - {{ /if }} - - {{ if SCS_PC_LUNBO_ZCTD_EDITOR }} -

    主创团队

    - {{ if SCS_PC_LUNBO_ZCTD_PIC }} - {{ each SCS_PC_LUNBO_ZCTD_PIC.split(';').map(s => s.trim()) }} - - {{ /each }} - {{ /if }} -
    {{@ SCS_PC_LUNBO_ZCTD_EDITOR }}
    - {{ /if }} - - {{ if SCS_PC_LUNBO_JQGG_EDITOR }} -

    剧情梗概

    - {{ if SCS_PC_LUNBO_JQGG_PIC }} - {{ each SCS_PC_LUNBO_JQGG_PIC.split(';').map(s => s.trim()) }} - - {{ /each }} - {{ /if }} -
    {{@ SCS_PC_LUNBO_JQGG_EDITOR }}
    - {{ /if }} - - {{ if SCS_PC_LUNBO_HJJL_EDITOR }} -

    获奖记录

    - {{ if SCS_PC_LUNBO_HJJL_PIC }} - {{ each SCS_PC_LUNBO_HJJL_PIC.split(';').map(s => s.trim()) }} - - {{ /each }} - {{ /if }} -
    {{@ SCS_PC_LUNBO_HJJL_EDITOR }}
    - {{ /if }} - - {{ if SCS_PC_LUNBO_MTPL_EDITOR }} -

    媒体评论

    - {{ if SCS_PC_LUNBO_MTPL_PIC }} - {{ each SCS_PC_LUNBO_MTPL_PIC.split(';').map(s => s.trim()) }} - - {{ /each }} - {{ /if }} -
    {{@ SCS_PC_LUNBO_MTPL_EDITOR }}
    - {{ /if }} -
    diff --git a/lib/routes/shiep/index.ts b/lib/routes/shiep/index.tsx similarity index 94% rename from lib/routes/shiep/index.ts rename to lib/routes/shiep/index.tsx index 3c95bf790fc9..2abd509f7a2a 100644 --- a/lib/routes/shiep/index.ts +++ b/lib/routes/shiep/index.tsx @@ -1,14 +1,13 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import dayjs from 'dayjs'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { config } from './config'; import { radar } from './radar'; @@ -99,12 +98,7 @@ async function handler(ctx) { const response = await got(item.link); const $ = load(response.data); - item.description = - $(descriptionSelector).length > 0 - ? art(path.resolve(__dirname, 'templates/description.art'), { - description: $(descriptionSelector).html(), - }) - : '请进行统一身份认证后查看内容'; + item.description = $(descriptionSelector).length > 0 ? renderToString(<>{$(descriptionSelector).html() ? raw($(descriptionSelector).html()) : null}) : '请进行统一身份认证后查看内容'; } catch { item.description = '请在校内或通过校园VPN查看内容'; } diff --git a/lib/routes/shiep/templates/description.art b/lib/routes/shiep/templates/description.art deleted file mode 100644 index d1254e8e79f8..000000000000 --- a/lib/routes/shiep/templates/description.art +++ /dev/null @@ -1 +0,0 @@ -{{@ description }} diff --git a/lib/routes/shmtu/portal.ts b/lib/routes/shmtu/portal.tsx similarity index 62% rename from lib/routes/shmtu/portal.ts rename to lib/routes/shmtu/portal.tsx index d520a7a133d0..499d64891ae6 100644 --- a/lib/routes/shmtu/portal.ts +++ b/lib/routes/shmtu/portal.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const bootstrapHost = 'https://weixin.shmtu.edu.cn/dynamic/shmtuHttps'; @@ -23,6 +22,38 @@ const loadDetail = async (link) => { return JSON.parse(response.data); }; +const renderDescription = (body, images, files) => + renderToString( + <> + {body ? <>{raw(body)} : null} + {images?.length ? ( + <> + 图片: + {images.map((image) => ( +
    + {image.filename} +
    {image.alt}
    +
    + ))} + + ) : null} + {files?.length ? ( + <> + 附件: + {files.map((file) => ( +

    + + + {file.filename} + + +

    + ))} + + ) : null} + + ); + const processFeed = (list, caches) => Promise.all( list.map((item) => @@ -30,11 +61,11 @@ const processFeed = (list, caches) => const detail = await loadDetail(item.link); const files = detail.field_file; const images = detail.field_image; - item.description = art(path.join(__dirname, 'templates/portal.art'), { - body: detail.body.und[0].safe_value, - images: images.length !== 0 && Object.keys(images).length !== 0 ? images.und : null, - files: files.length !== 0 && Object.keys(files).length !== 0 ? files.und : null, - }); + item.description = renderDescription( + detail.body.und[0].safe_value, + images.length !== 0 && Object.keys(images).length !== 0 ? images.und : null, + files.length !== 0 && Object.keys(files).length !== 0 ? files.und : null + ); item.link = detail.path; return item; }) diff --git a/lib/routes/shmtu/templates/portal.art b/lib/routes/shmtu/templates/portal.art deleted file mode 100644 index b4bfd91fed34..000000000000 --- a/lib/routes/shmtu/templates/portal.art +++ /dev/null @@ -1,30 +0,0 @@ -{{@ body}} -{{if images}} - - 图片: - - {{each images image}} -
    - {{image.filename}} -
    - {{image.alt}} -
    -
    - {{/each}} -{{/if}} -{{if files}} - - 附件: - - {{each files file}} -

    - - - {{file.filename}} - - -

    - {{/each}} -{{/if}} diff --git a/lib/routes/shoac/recent-show.ts b/lib/routes/shoac/recent-show.tsx similarity index 63% rename from lib/routes/shoac/recent-show.ts rename to lib/routes/shoac/recent-show.tsx index 61d7308c1485..b29cfc193a8b 100644 --- a/lib/routes/shoac/recent-show.ts +++ b/lib/routes/shoac/recent-show.tsx @@ -1,10 +1,10 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/recent-show', @@ -79,11 +79,40 @@ async function handler() { }, }); - item.description = art(path.join(__dirname, 'templates/detail.art'), { - item, - detail: detail.data, - show: show.data, - }); + item.description = renderToString( + <> + {detail.data.img ? ( + <> + +
    + + ) : null} + + + + + + + + + + + + + + + + + +
    类型:{detail.data.productSubtypeName}
    时间:{detail.data.showStartToEndTime}
    地点: + {detail.data.showPlaceName}-{item.placeCname} +
    + {item.minPrice}-{item.maxPrice} +
    +
    + {detail.data.projectDesp ? raw(detail.data.projectDesp) : null} + + ); item.pubDate = show.data.showInfoDetailList ? parseDate(show.data.showInfoDetailList[0].saleBeginTime, 'x') : null; return item; diff --git a/lib/routes/shoac/templates/detail.art b/lib/routes/shoac/templates/detail.art deleted file mode 100644 index 4cf80a6eef16..000000000000 --- a/lib/routes/shoac/templates/detail.art +++ /dev/null @@ -1,25 +0,0 @@ -{{ if detail.img }} -
    -{{ /if }} - - - - - - - - - - - - - - - - - -
    类型:{{ detail.productSubtypeName }}
    时间:{{ detail.showStartToEndTime }}
    地点:{{ detail.showPlaceName }}-{{ item.placeCname }}
    {{ item.minPrice }}-{{ item.maxPrice }}
    -
    -{{ if detail.projectDesp }} -{{@ detail.projectDesp }} -{{ /if }} diff --git a/lib/routes/shuiguopai/index.ts b/lib/routes/shuiguopai/index.tsx similarity index 84% rename from lib/routes/shuiguopai/index.ts rename to lib/routes/shuiguopai/index.tsx index c4f00defe741..4813401b2e31 100644 --- a/lib/routes/shuiguopai/index.ts +++ b/lib/routes/shuiguopai/index.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -89,10 +88,16 @@ async function handler(ctx) { item.author = data.map((d) => d.actor).join(' '); } - item.description = art(path.join(__dirname, 'templates/description.art'), { - videos, - description: content('.content').html(), - }); + item.description = renderToString( + <> + {videos?.map((video) => ( + + ))} + {raw(content('.content').html())} + + ); return item; }) diff --git a/lib/routes/shuiguopai/templates/description.art b/lib/routes/shuiguopai/templates/description.art deleted file mode 100644 index 4d4411a43751..000000000000 --- a/lib/routes/shuiguopai/templates/description.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if videos }} -{{ each videos video }} - -{{ /each }} -{{ /if }} -{{@ description }} diff --git a/lib/routes/simpleinfo/index.ts b/lib/routes/simpleinfo/index.tsx similarity index 87% rename from lib/routes/simpleinfo/index.ts rename to lib/routes/simpleinfo/index.tsx index 8130f2c7804b..3240e25516d7 100644 --- a/lib/routes/simpleinfo/index.ts +++ b/lib/routes/simpleinfo/index.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -71,7 +70,7 @@ async function handler(ctx) { const content = load(result.data); item.author = content('meta[property="article:author"]').attr('content'); item.pubDate = timezone(parseDate(content('meta[property="article:published_time"]').attr('content')), +8); - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ image: content('meta[property="og:image"]').attr('content'), description: content('.article-content').first().html(), }); @@ -87,3 +86,11 @@ async function handler(ctx) { item: items, }; } + +const renderDescription = ({ image, description }: { image?: string; description?: string }): string => + renderToString( + <> + {image ? : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/simpleinfo/templates/description.art b/lib/routes/simpleinfo/templates/description.art deleted file mode 100644 index 78c9f99df863..000000000000 --- a/lib/routes/simpleinfo/templates/description.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ if image }} - -{{ /if }} -{{ if description }} -{{@ description }} -{{ /if }} diff --git a/lib/routes/sina/templates/slide.art b/lib/routes/sina/templates/slide.art deleted file mode 100644 index 235e1526a2fa..000000000000 --- a/lib/routes/sina/templates/slide.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ each slideData.images img }} - {{ img.intro }} -{{ /each }} diff --git a/lib/routes/sina/templates/video.art b/lib/routes/sina/templates/video.art deleted file mode 100644 index c86a810b5bba..000000000000 --- a/lib/routes/sina/templates/video.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ if videoUrl }} - -{{ /if }} diff --git a/lib/routes/sina/utils.ts b/lib/routes/sina/utils.tsx similarity index 85% rename from lib/routes/sina/utils.ts rename to lib/routes/sina/utils.tsx index 977510e5f72b..e1a7c302596a 100644 --- a/lib/routes/sina/utils.ts +++ b/lib/routes/sina/utils.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const getRollNewsList = (pageid, lid, limit) => @@ -52,7 +50,13 @@ const parseArticle = (item, tryGet) => .text() .match(/var slide_data = ({.*?})\s/)[1] ); - item.description = art(path.join(__dirname, 'templates/slide.art'), { slideData }); + item.description = renderToString( + <> + {slideData.images.map((img) => ( + {img.intro} + ))} + + ); } else if (item.link.startsWith('https://video.sina.com.cn/')) { const videoId = $('script') .text() @@ -83,7 +87,15 @@ const parseArticle = (item, tryGet) => const videoData = videoResponse.data; const poster = videoData.image; const videoUrl = videoData.videos.find((v) => v.type === 'mp4').dispatch_result.url; - item.description = art(path.join(__dirname, 'templates/video.art'), { poster, videoUrl }); + item.description = renderToString( + <> + {videoUrl ? ( + + ) : null} + + ); item.pubDate = parseDate(videoData.create_time, 'X'); } else if (item.link.startsWith('https://news.sina.com.cn/') || item.link.startsWith('https://mil.news.sina.com.cn/')) { item.description = $('#article').html(); diff --git a/lib/routes/sinchew/index.ts b/lib/routes/sinchew/index.tsx similarity index 85% rename from lib/routes/sinchew/index.ts rename to lib/routes/sinchew/index.tsx index 200c7b77a285..e14e767cb692 100644 --- a/lib/routes/sinchew/index.ts +++ b/lib/routes/sinchew/index.tsx @@ -1,13 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -64,10 +62,12 @@ async function handler(ctx) { content('figure').each(function () { content(this).replaceWith( - art(path.join(__dirname, 'templates/images.art'), { - image: content(this).find('img').attr('src'), - caption: content(this).find('figcaption').text(), - }) + renderToString( +
    + +
    {content(this).find('figcaption').text()}
    +
    + ) ); }); diff --git a/lib/routes/sinchew/templates/images.art b/lib/routes/sinchew/templates/images.art deleted file mode 100644 index 4e53d434020c..000000000000 --- a/lib/routes/sinchew/templates/images.art +++ /dev/null @@ -1,4 +0,0 @@ -
    - -
    {{ caption }}
    -
    \ No newline at end of file diff --git a/lib/routes/sjtu/templates/activity.art b/lib/routes/sjtu/templates/activity.art deleted file mode 100644 index edf60c75032e..000000000000 --- a/lib/routes/sjtu/templates/activity.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ e.name }}
    -开始时间: {{ e.sign_start_time }}
    -结束时间: {{ e.sign_end_time }}
    -地点: {{ e.location }}
    -报名人数: {{ e.member_count }}/{{ e.max_member }}
    -来自{{ e.source }} diff --git a/lib/routes/sjtu/tongqu/activity.ts b/lib/routes/sjtu/tongqu/activity.tsx similarity index 79% rename from lib/routes/sjtu/tongqu/activity.ts rename to lib/routes/sjtu/tongqu/activity.tsx index 3290b1eef75d..dc2d1fca78ff 100644 --- a/lib/routes/sjtu/tongqu/activity.ts +++ b/lib/routes/sjtu/tongqu/activity.tsx @@ -1,8 +1,7 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const urlRoot = 'https://tongqu.sjtu.edu.cn'; @@ -56,7 +55,7 @@ async function handler(ctx) { title: e.name, link: new URL(`/act/${e.actid}`, urlRoot).href, category: e.typename, - description: art(path.join(__dirname, '../templates/activity.art'), { e }), + description: renderDescription(e), })); return { @@ -65,3 +64,20 @@ async function handler(ctx) { item: feeds, }; } + +const renderDescription = (e): string => + renderToString( + <> + {e.name} +
    + 开始时间: {e.sign_start_time} +
    + 结束时间: {e.sign_end_time} +
    + 地点: {e.location} +
    + 报名人数: {e.member_count}/{e.max_member} +
    + 来自{e.source} + + ); diff --git a/lib/routes/skeb/templates/creator.art b/lib/routes/skeb/templates/creator.art deleted file mode 100644 index bb64c9a1b962..000000000000 --- a/lib/routes/skeb/templates/creator.art +++ /dev/null @@ -1,8 +0,0 @@ -{{ if avatarUrl }} - -{{ /if }} -

    委託狀況(Accepting Commissions):{{ acceptingCommissions }}

    -

    NSFW:{{ nsfwAcceptable }}

    -{{ if skills }} -

    類型(Genre):{{ skills }}

    -{{ /if }} diff --git a/lib/routes/skeb/templates/work.art b/lib/routes/skeb/templates/work.art deleted file mode 100644 index 6c0903453d75..000000000000 --- a/lib/routes/skeb/templates/work.art +++ /dev/null @@ -1,10 +0,0 @@ -{{ if imageUrl }} -
    -{{ /if }} -{{ if audioUrl }} -
    -{{ /if }} -{{ body }} diff --git a/lib/routes/skeb/utils.ts b/lib/routes/skeb/utils.tsx similarity index 73% rename from lib/routes/skeb/utils.ts rename to lib/routes/skeb/utils.tsx index 3d03bc9e31ca..5d99818eab42 100644 --- a/lib/routes/skeb/utils.ts +++ b/lib/routes/skeb/utils.tsx @@ -1,10 +1,9 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { DataItem } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; export const baseUrl = 'https://skeb.jp'; @@ -66,11 +65,7 @@ export function processWork(work: Work): DataItem | null { const audioUrl = work.genre === 'music' || work.genre === 'voice' ? work.preview_url : null; - const renderedHtml = art(path.join(__dirname, 'templates/work.art'), { - imageUrl, - body, - audioUrl, - }); + const renderedHtml = renderToString(); return { title: work.path || '', @@ -110,12 +105,7 @@ export function processCreator(creator: Creator): DataItem | null { .join(', '); } - renderedHtml = art(path.join(__dirname, 'templates/creator.art'), { - avatarUrl, - acceptingCommissions, - nsfwAcceptable, - skills, - }); + renderedHtml = renderToString(); } return { @@ -151,3 +141,33 @@ export async function getFollowingsItems(username: string, path: 'friend_works' } return followings_data[path].map((item) => processWork(item)).filter(Boolean) as DataItem[]; } + +const SkebWorkDescription = ({ imageUrl, body, audioUrl }: { imageUrl?: string; body: string; audioUrl?: string | null }) => ( + <> + {imageUrl ? ( + <> + +
    + + ) : null} + {audioUrl ? ( + <> + +
    + + ) : null} + {body} + +); + +const SkebCreatorDescription = ({ avatarUrl, acceptingCommissions, nsfwAcceptable, skills }: { avatarUrl?: string; acceptingCommissions: string; nsfwAcceptable: string; skills?: string }) => ( + <> + {avatarUrl ? : null} +

    委託狀況(Accepting Commissions):{acceptingCommissions}

    +

    NSFW:{nsfwAcceptable}

    + {skills ?

    類型(Genre):{skills}

    : null} + +); diff --git a/lib/routes/snowpeak/templates/new-arrivals.art b/lib/routes/snowpeak/templates/new-arrivals.art deleted file mode 100644 index d1b610e5b71e..000000000000 --- a/lib/routes/snowpeak/templates/new-arrivals.art +++ /dev/null @@ -1,11 +0,0 @@ -
    - Variant: -
    - {{each product.variants}} - {{$value.name}} -
    - {{/each}} - {{each product.images}} - - {{/each}} -
    diff --git a/lib/routes/snowpeak/us-new-arrivals.ts b/lib/routes/snowpeak/us-new-arrivals.tsx similarity index 76% rename from lib/routes/snowpeak/us-new-arrivals.ts rename to lib/routes/snowpeak/us-new-arrivals.tsx index 782636929374..93f700df5b3b 100644 --- a/lib/routes/snowpeak/us-new-arrivals.ts +++ b/lib/routes/snowpeak/us-new-arrivals.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const host = 'https://www.snowpeak.com'; export const route: Route = { @@ -52,9 +50,21 @@ async function handler() { data.variants = product.variants.map((item) => item.name); data.description = product.description + - art(path.join(__dirname, 'templates/new-arrivals.art'), { - product, - }); + renderToString( +
    + Variant: +
    + {product.variants.map((variant) => ( + <> + {variant.name} +
    + + ))} + {product.images.map((image) => ( + + ))} +
    + ); return data; }); diff --git a/lib/routes/sogou/search.ts b/lib/routes/sogou/search.tsx similarity index 88% rename from lib/routes/sogou/search.ts rename to lib/routes/sogou/search.tsx index 9ed582c81a42..b51cbc100af4 100644 --- a/lib/routes/sogou/search.ts +++ b/lib/routes/sogou/search.tsx @@ -1,15 +1,22 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; -const renderDescription = (description, images) => art(path.join(__dirname, './templates/description.art'), { description, images }); +const renderDescription = (description, images) => + renderToString( + <> + {description ? raw(description) : null} + {images?.map((src) => ( + + ))} + + ); export const route: Route = { path: '/search/:keyword', diff --git a/lib/routes/sogou/templates/description.art b/lib/routes/sogou/templates/description.art deleted file mode 100644 index 5f98f4ca33ce..000000000000 --- a/lib/routes/sogou/templates/description.art +++ /dev/null @@ -1,6 +0,0 @@ -{{@ description }} -{{if images}} - {{each images}} - - {{/each}} -{{/if}} diff --git a/lib/routes/sohu/mp.ts b/lib/routes/sohu/mp.tsx similarity index 92% rename from lib/routes/sohu/mp.ts rename to lib/routes/sohu/mp.tsx index f01cdc54aa99..a99761c50e67 100644 --- a/lib/routes/sohu/mp.ts +++ b/lib/routes/sohu/mp.tsx @@ -1,13 +1,11 @@ -import path from 'node:path'; - import * as cheerio from 'cheerio'; import CryptoJS from 'crypto-js'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -68,13 +66,20 @@ function fetchArticle(item) { const videoSrc = $('script') .text() .match(/\s*url: "(.*?)",/)?.[1]; - item.description = art(path.join(__dirname, 'templates/video.art'), { - poster: $('script') - .text() - .match(/cover: "(.*?)",/)?.[1], - src: videoSrc, - type: videoSrc?.split('.').pop()?.toLowerCase(), - }); + const poster = $('script') + .text() + .match(/cover: "(.*?)",/)?.[1]; + const type = videoSrc?.split('.').pop()?.toLowerCase(); + const source = type ? : ; + item.description = renderToString( + poster ? ( + + ) : ( + + ) + ); } else { const article = $('#mp-editor'); diff --git a/lib/routes/sohu/templates/video.art b/lib/routes/sohu/templates/video.art deleted file mode 100644 index d6e27f87c32c..000000000000 --- a/lib/routes/sohu/templates/video.art +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/lib/routes/sony/templates/software-description.art b/lib/routes/sony/templates/software-description.art deleted file mode 100644 index 1538d42cf414..000000000000 --- a/lib/routes/sony/templates/software-description.art +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    - Release Date: {{ item.pubDate }} -
    diff --git a/lib/routes/southcn/nfapp/column.ts b/lib/routes/southcn/nfapp/column.ts index 17743309ca1b..853488f28ee8 100644 --- a/lib/routes/southcn/nfapp/column.ts +++ b/lib/routes/southcn/nfapp/column.ts @@ -1,12 +1,10 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from '../templates/description'; import { parseArticle } from './utils'; export const route: Route = { @@ -54,7 +52,7 @@ async function handler(ctx) { .filter((i) => i.articleType === 0) .map((item) => ({ title: '【' + item.columnName + '】' + item.title, - description: art(path.join(__dirname, '../templates/description.art'), { + description: renderDescription({ thumb: item.picMiddle, description: item.summary === '详见内文' ? '' : item.summary, }), diff --git a/lib/routes/southcn/nfapp/reporter.ts b/lib/routes/southcn/nfapp/reporter.ts index b6934b94b39b..2a740f01e8bd 100644 --- a/lib/routes/southcn/nfapp/reporter.ts +++ b/lib/routes/southcn/nfapp/reporter.ts @@ -1,12 +1,10 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from '../templates/description'; import { parseArticle } from './utils'; export const route: Route = { @@ -36,7 +34,7 @@ async function handler(ctx) { const list = response.data.reportInfo.articleInfo.map((item) => ({ title: '【' + item.releaseColName + '】' + item.title, - description: art(path.join(__dirname, '../templates/description.art'), { + description: renderDescription({ thumb: item.picMiddle, description: item.attAbstract, }), diff --git a/lib/routes/southcn/templates/description.art b/lib/routes/southcn/templates/description.art deleted file mode 100644 index e94386a3673d..000000000000 --- a/lib/routes/southcn/templates/description.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ if thumb }} - -{{ /if }} -{{ if description }} -

    {{ description }}

    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/southcn/templates/description.tsx b/lib/routes/southcn/templates/description.tsx new file mode 100644 index 000000000000..0e9adff5b1f7 --- /dev/null +++ b/lib/routes/southcn/templates/description.tsx @@ -0,0 +1,19 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + thumb?: string; + description?: string; +}; + +const SouthcnDescription = ({ thumb, description }: DescriptionData) => ( + <> + {thumb ? : null} + {description ? ( +
    +

    {description}

    +
    + ) : null} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/spankbang/new-videos.ts b/lib/routes/spankbang/new-videos.tsx similarity index 87% rename from lib/routes/spankbang/new-videos.ts rename to lib/routes/spankbang/new-videos.tsx index 57ff9b14631d..a0ef0dcba9f4 100644 --- a/lib/routes/spankbang/new-videos.ts +++ b/lib/routes/spankbang/new-videos.tsx @@ -1,15 +1,22 @@ -import path from 'node:path'; - import * as cheerio from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Data, Route } from '@/types'; import cache from '@/utils/cache'; import logger from '@/utils/logger'; import puppeteer from '@/utils/puppeteer'; -import { art } from '@/utils/render'; -const render = (data) => art(path.join(__dirname, 'templates/video.art'), data); +const render = ({ preview, cover }) => + renderToString( + <> + {preview ? ( + + ) : null} + + ); const handler = async () => { const baseUrl = 'https://spankbang.com'; diff --git a/lib/routes/spankbang/templates/video.art b/lib/routes/spankbang/templates/video.art deleted file mode 100644 index c30942421bef..000000000000 --- a/lib/routes/spankbang/templates/video.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if preview }} - -{{ /if }} diff --git a/lib/routes/springer/journal.ts b/lib/routes/springer/journal.tsx similarity index 76% rename from lib/routes/springer/journal.ts rename to lib/routes/springer/journal.tsx index 93cbd1952a16..18ece1901f46 100644 --- a/lib/routes/springer/journal.ts +++ b/lib/routes/springer/journal.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; export const route: Route = { path: '/journal/:journal', @@ -94,9 +92,41 @@ async function handler(ctx) { }); const renderDesc = (item) => - art(path.join(__dirname, 'templates/description.art'), { - item, - }); + renderToString( + <> +

    + + {item.title} + +
    +

    +

    + + + {item.authors} + + +
    + + + https://doi.org/{item.doi} + + +
    + + + {item.issue} + + +
    + +

    +

    + {item.abstract} +
    +

    + + ); const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { diff --git a/lib/routes/springer/templates/description.art b/lib/routes/springer/templates/description.art deleted file mode 100755 index 8e9b7767d14a..000000000000 --- a/lib/routes/springer/templates/description.art +++ /dev/null @@ -1,12 +0,0 @@ -

    - {{ item.title }}
    -

    -

    - {{ item.authors }}
    - https://doi.org/{{ item.doi }}
    - {{ item.issue }}
    - -

    -

    - {{ item.abstract }}
    -

    \ No newline at end of file diff --git a/lib/routes/sse/inquire.ts b/lib/routes/sse/inquire.tsx similarity index 69% rename from lib/routes/sse/inquire.ts rename to lib/routes/sse/inquire.tsx index 2e404426ed2e..8dc4b5009c7e 100644 --- a/lib/routes/sse/inquire.ts +++ b/lib/routes/sse/inquire.tsx @@ -1,9 +1,8 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/inquire', @@ -55,9 +54,7 @@ async function handler() { const items = response.data.result.map((item) => ({ title: item.extGSJC, - description: art(path.resolve(__dirname, 'templates/inquire.art'), { - item, - }), + description: renderToString(), pubDate: parseDate(item.createTime), link: `https://${item.docURL}`, author: item.extGSJC, @@ -69,3 +66,30 @@ async function handler() { item: items, }; } + +const SseInquireDescription = ({ item }: { item: any }) => ( + + + + + + + + + + + + + + + + + + + + + +
    公司代码 : {item.stockcode}
    公司简称 : {item.extGSJC}
    发函日期 : {item.createTime}
    监管问询类型 : {item.extWTFL}
    标题 : + {item.docTitle} +
    +); diff --git a/lib/routes/sse/renewal.ts b/lib/routes/sse/renewal.ts deleted file mode 100644 index 053a54c5dda7..000000000000 --- a/lib/routes/sse/renewal.ts +++ /dev/null @@ -1,86 +0,0 @@ -import 'dayjs/locale/zh-cn.js'; - -import path from 'node:path'; - -import dayjs from 'dayjs'; -import localizedFormat from 'dayjs/plugin/localizedFormat.js'; - -import type { Route } from '@/types'; -import got from '@/utils/got'; -import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; - -dayjs.extend(localizedFormat); - -const currStatusName = ['全部', '已受理', '已询问', '通过', '未通过', '提交注册', '补充审核', '注册结果', '中止', '终止']; - -export const route: Route = { - path: '/renewal', - categories: ['finance'], - example: '/sse/renewal', - parameters: {}, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['kcb.sse.com.cn/home', 'kcb.sse.com.cn/'], - }, - ], - name: '科创板项目动态', - maintainers: ['Jeason0228'], - handler, - url: 'kcb.sse.com.cn/home', -}; - -async function handler() { - const pageUrl = 'https://kcb.sse.com.cn/renewal/'; - const host = `https://kcb.sse.com.cn`; - - const response = await got('https://query.sse.com.cn/statusAction.do', { - searchParams: { - isPagination: true, - sqlId: 'SH_XM_LB', - 'pageHelp.pageSize': 20, - offerType: '', - commitiResult: '', - registeResult: '', - province: '', - csrcCode: '', - currStatus: '', - order: 'updateDate|desc,stockAuditNum|desc', - keyword: '', - auditApplyDateBegin: '', - auditApplyDateEnd: '', - _: Date.now(), - }, - headers: { - Referer: pageUrl, - }, - }); - - // console.log(response.data.result); - const items = response.data.result.map((item) => ({ - title: `【${currStatusName[item.currStatus]}】${item.stockAuditName}`, - description: art(path.resolve(__dirname, 'templates/renewal.art'), { - item, - currStatus: currStatusName[item.currStatus], - updateDate: dayjs(item.updateDate, 'YYYYMMDDHHmmss').locale('zh-cn').format('lll'), - auditApplyDate: dayjs(item.auditApplyDate, 'YYYYMMDDHHmmss').locale('zh-cn').format('lll'), - }), - pubDate: parseDate(item.updateDate, 'YYYYMMDDHHmmss'), - link: `${host}/renewal/xmxq/index.shtml?auditId=${item.stockAuditNum}`, - author: item.stockAuditName, - })); - - return { - title: '上海证券交易所 - 科创板项目动态', - link: pageUrl, - item: items, - }; -} diff --git a/lib/routes/sse/renewal.tsx b/lib/routes/sse/renewal.tsx new file mode 100644 index 000000000000..be4e0d3ec04d --- /dev/null +++ b/lib/routes/sse/renewal.tsx @@ -0,0 +1,159 @@ +import 'dayjs/locale/zh-cn.js'; + +import dayjs from 'dayjs'; +import localizedFormat from 'dayjs/plugin/localizedFormat.js'; +import { renderToString } from 'hono/jsx/dom/server'; + +import type { Route } from '@/types'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; + +dayjs.extend(localizedFormat); + +const currStatusName = ['全部', '已受理', '已询问', '通过', '未通过', '提交注册', '补充审核', '注册结果', '中止', '终止']; + +export const route: Route = { + path: '/renewal', + categories: ['finance'], + example: '/sse/renewal', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['kcb.sse.com.cn/home', 'kcb.sse.com.cn/'], + }, + ], + name: '科创板项目动态', + maintainers: ['Jeason0228'], + handler, + url: 'kcb.sse.com.cn/home', +}; + +async function handler() { + const pageUrl = 'https://kcb.sse.com.cn/renewal/'; + const host = `https://kcb.sse.com.cn`; + + const response = await got('https://query.sse.com.cn/statusAction.do', { + searchParams: { + isPagination: true, + sqlId: 'SH_XM_LB', + 'pageHelp.pageSize': 20, + offerType: '', + commitiResult: '', + registeResult: '', + province: '', + csrcCode: '', + currStatus: '', + order: 'updateDate|desc,stockAuditNum|desc', + keyword: '', + auditApplyDateBegin: '', + auditApplyDateEnd: '', + _: Date.now(), + }, + headers: { + Referer: pageUrl, + }, + }); + + // console.log(response.data.result); + const items = response.data.result.map((item) => ({ + title: `【${currStatusName[item.currStatus]}】${item.stockAuditName}`, + description: renderToString( + + ), + pubDate: parseDate(item.updateDate, 'YYYYMMDDHHmmss'), + link: `${host}/renewal/xmxq/index.shtml?auditId=${item.stockAuditNum}`, + author: item.stockAuditName, + })); + + return { + title: '上海证券交易所 - 科创板项目动态', + link: pageUrl, + item: items, + }; +} + +const SseRenewalDescription = ({ item, currStatus, updateDate, auditApplyDate }: { item: any; currStatus: string; updateDate: string; auditApplyDate: string }) => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {item.intermediary[3] ? ( + + + + + ) : null} + + + + + + + + + + + + +
    + 发行人全称 + {item.stockAuditName}
    + 审核状态 + {currStatus}
    + 注册地 + {item.stockIssuer[0].s_province}
    + 证监会行业 + {item.stockIssuer[0].s_csrcCodeDesc}
    + 保荐机构 + {item.intermediary[0].i_intermediaryName}
    + 律师事务所 + {item.intermediary[2].i_intermediaryName}
    + 会计师事务所 + {item.intermediary[1].i_intermediaryName}
    + 评估机构 + {item.intermediary[3].i_intermediaryName}
    + 更新日期 + {updateDate}
    + 受理日期 + {auditApplyDate}
    详细链接 + 查看详情 +
    +); diff --git a/lib/routes/sse/templates/inquire.art b/lib/routes/sse/templates/inquire.art deleted file mode 100644 index a857dd03cbe5..000000000000 --- a/lib/routes/sse/templates/inquire.art +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -
    公司代码 : {{ item.stockcode }}
    公司简称 : {{ item.extGSJC }}
    发函日期 : {{ item.createTime }}
    监管问询类型 : {{ item.extWTFL }}
    标题 : {{ item.docTitle }}
    diff --git a/lib/routes/sse/templates/renewal.art b/lib/routes/sse/templates/renewal.art deleted file mode 100644 index 23f639432959..000000000000 --- a/lib/routes/sse/templates/renewal.art +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - -{{ if item.intermediary[3] }}{{ /if }} - - - -
    发行人全称{{ item.stockAuditName }}
    审核状态{{ currStatus }}
    注册地{{ item.stockIssuer[0].s_province }}
    证监会行业{{ item.stockIssuer[0].s_csrcCodeDesc }}
    保荐机构{{ item.intermediary[0].i_intermediaryName }}
    律师事务所{{ item.intermediary[2].i_intermediaryName }}
    会计师事务所{{ item.intermediary[1].i_intermediaryName }}
    评估机构{{ item.intermediary[3].i_intermediaryName }}
    更新日期{{ updateDate }}
    受理日期{{ auditApplyDate }}
    详细链接查看详情
    diff --git a/lib/routes/ssm/news.ts b/lib/routes/ssm/news.tsx similarity index 86% rename from lib/routes/ssm/news.ts rename to lib/routes/ssm/news.tsx index 8a5160c98f33..23b74638bc15 100644 --- a/lib/routes/ssm/news.ts +++ b/lib/routes/ssm/news.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const rootUrl = `https://www.ssm.gov.mo`; const newsUrl = `${rootUrl}/apps1/content/ch/973/itemlist.aspx?defaultcss=false&dlimit=20&showdate=true&dorder=cridate%20desc,displaydate%20desc&withattach=true`; @@ -43,9 +41,7 @@ async function handler() { const title = $(item).find('a').text(); const link = $(item).find('a').attr('href'); const pubDate = parseDate($(item).find('small').text().split(':')[1].trim(), 'DD/MM/YYYY'); - const desc = art(path.join(__dirname, 'templates/news.art'), { - link, - }); + const desc = renderToString(); return { title, @@ -61,3 +57,5 @@ async function handler() { item, }; } + +const SsmNewsDescription = ({ link }: { link?: string }) => - {{ /if }} -{{ /if }} diff --git a/lib/routes/theverge/templates/header.tsx b/lib/routes/theverge/templates/header.tsx new file mode 100644 index 000000000000..c8351f967bf2 --- /dev/null +++ b/lib/routes/theverge/templates/header.tsx @@ -0,0 +1,55 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type HeaderRenderOptions = { + featuredImage?: { + image?: { + originalUrl?: string; + title?: string; + alt?: string; + }; + }; + ledeMediaData?: { + __typename?: string; + embedHtml?: string; + image?: { + thumbnails?: { + horizontal?: { + url?: string; + }; + }; + title?: string; + credit?: { + plaintext?: string; + }; + }; + video?: { + volumeUuid?: string; + }; + }; +}; + +export const renderHeader = ({ featuredImage, ledeMediaData }: HeaderRenderOptions): string => + renderToString( + <> + {featuredImage?.image?.originalUrl ? ( +
    + {featuredImage.image.alt +
    {featuredImage.image.title}
    +
    + ) : null} + + {ledeMediaData ? ( + ledeMediaData.__typename === 'LedeMediaEmbedType' ? ( + <>{ledeMediaData.embedHtml ? raw(ledeMediaData.embedHtml) : null} + ) : ledeMediaData.__typename === 'LedeMediaImageType' && !featuredImage ? ( +
    + {ledeMediaData.image?.title +
    {ledeMediaData.image?.credit?.plaintext || ledeMediaData.image?.title}
    +
    + ) : ledeMediaData.__typename === 'LedeMediaVideoType' ? ( + + ) : null + ) : null} + + ); diff --git a/lib/routes/thewirehindi/templates/description.art b/lib/routes/thewirehindi/templates/description.art deleted file mode 100644 index 43cb44900ef2..000000000000 --- a/lib/routes/thewirehindi/templates/description.art +++ /dev/null @@ -1,9 +0,0 @@ -{{@ excerpt }} -

    -{{ if image }} -{{ altText }} -

    -{{ /if }} -{{ if content }} -{{@ content }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/thewirehindi/utils.ts b/lib/routes/thewirehindi/utils.tsx similarity index 60% rename from lib/routes/thewirehindi/utils.ts rename to lib/routes/thewirehindi/utils.tsx index 730ded2bc90f..30a5335edbdb 100644 --- a/lib/routes/thewirehindi/utils.ts +++ b/lib/routes/thewirehindi/utils.tsx @@ -1,8 +1,25 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { DataItem } from '@/types'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +const renderDescription = (excerpt, image, altText, content) => + renderToString( + <> + {excerpt ? <>{raw(excerpt)} : null} +
    +
    + {image ? ( + <> + {altText} +
    +
    + + ) : null} + {content ? <>{raw(content)} : null} + + ); export function mapPostToItem(post): DataItem { const featuredMedia = post._embedded?.['wp:featuredmedia']?.find((v) => v.id === post.featured_media); @@ -10,12 +27,7 @@ export function mapPostToItem(post): DataItem { const altText = featuredMedia?.alt_text || featuredMedia?.title?.rendered || 'Featured Image'; return { title: post.title.rendered, - description: art(path.join(__dirname, 'templates/description.art'), { - excerpt: post.excerpt.rendered, - content: post.content.rendered, - image, - altText, - }), + description: renderDescription(post.excerpt.rendered, image, altText, post.content.rendered), link: post.link, pubDate: parseDate(post.date_gmt), updated: parseDate(post.modified_gmt), diff --git a/lib/routes/thoughtco/index.ts b/lib/routes/thoughtco/index.ts index f3bbe0458656..531046f149eb 100644 --- a/lib/routes/thoughtco/index.ts +++ b/lib/routes/thoughtco/index.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/:category?', @@ -359,7 +358,7 @@ async function handler(ctx) { const image = e.find('img'); e.replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ image: { src: image.prop('data-src'), width: image.prop('width'), @@ -370,7 +369,7 @@ async function handler(ctx) { }); item.title = content('meta[property="og:title"]').prop('content'); - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ image: { src: content('meta[property="og:image"]').prop('content'), }, diff --git a/lib/routes/thoughtco/templates/description.art b/lib/routes/thoughtco/templates/description.art deleted file mode 100644 index 1eac078aef91..000000000000 --- a/lib/routes/thoughtco/templates/description.art +++ /dev/null @@ -1,16 +0,0 @@ -{{ if image }} -
    - -
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/thoughtco/templates/description.tsx b/lib/routes/thoughtco/templates/description.tsx new file mode 100644 index 000000000000..28ce68e1c399 --- /dev/null +++ b/lib/routes/thoughtco/templates/description.tsx @@ -0,0 +1,25 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type ImageData = { + src?: string; + width?: string | number; + height?: string | number; +}; + +type DescriptionData = { + image?: ImageData; + description?: string; +}; + +export const renderDescription = ({ image, description }: DescriptionData) => + renderToString( + <> + {image ? ( +
    + +
    + ) : null} + {description ? <>{raw(description)} : null} + + ); diff --git a/lib/routes/tiktok/templates/user.art b/lib/routes/tiktok/templates/user.art deleted file mode 100644 index 0c582bfaed35..000000000000 --- a/lib/routes/tiktok/templates/user.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if useIframe }} - -{{ else }} - -{{ /if }} diff --git a/lib/routes/tiktok/templates/user.tsx b/lib/routes/tiktok/templates/user.tsx new file mode 100644 index 000000000000..36fb4772c97e --- /dev/null +++ b/lib/routes/tiktok/templates/user.tsx @@ -0,0 +1,21 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type UserEmbedProps = { + useIframe?: boolean; + id: string; + poster: string; + source: string; +}; + +export const renderUserEmbed = ({ useIframe, id, poster, source }: UserEmbedProps): string => + renderToString( + <> + {useIframe ? ( + + ) : ( + + )} + + ); diff --git a/lib/routes/tiktok/user.ts b/lib/routes/tiktok/user.ts index 463d833cc0b6..8f87788c6ee1 100644 --- a/lib/routes/tiktok/user.ts +++ b/lib/routes/tiktok/user.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import { config } from '@/config'; @@ -8,8 +6,8 @@ import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; import { queryToBoolean } from '@/utils/readable-social'; -import { art } from '@/utils/render'; +import { renderUserEmbed } from './templates/user'; import type { Item } from './types'; const baseUrl = 'https://www.tiktok.com'; @@ -79,7 +77,7 @@ async function handler(ctx) { const items = itemList.itemList.map((item: Item) => ({ title: item.desc, - description: art(path.join(__dirname, 'templates/user.art'), { + description: renderUserEmbed({ poster: item.video.cover, source: item.video.playAddr, useIframe, diff --git a/lib/routes/tingshuitz/shenzhen.ts b/lib/routes/tingshuitz/shenzhen.tsx similarity index 71% rename from lib/routes/tingshuitz/shenzhen.ts rename to lib/routes/tingshuitz/shenzhen.tsx index 6bc5792b8092..3e3420a3d72e 100644 --- a/lib/routes/tingshuitz/shenzhen.ts +++ b/lib/routes/tingshuitz/shenzhen.tsx @@ -1,9 +1,8 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -45,9 +44,17 @@ async function handler() { link: 'https://www.sz-water.com.cn/', item: data.map((item) => ({ title: `${item.position}${item.stoptime}`, - description: art(path.join(__dirname, 'templates/shenzhen.art'), { - item, - }), + description: renderToString( + <> +

    {item.title}

    +

    + {item.reginName ? `【${item.reginName}】` : null} + (影响用户{item.affectUser}), + {item.stopwaterType ? ` [${item.stopwaterType}]` : null} + 原因:{item.reason},停水开始时间{item.stopStartTime},停水结束时间{item.stopEndTime} +

    + + ), pubDate: timezone(parseDate(item.createdOn, 'YYYY-MM-DD HH:mm:ss'), +8), link: 'https://szgk.sz-water.com.cn/wechat_web/Water_stop.html', guid: `${item.position}${item.stopStartTime}`, diff --git a/lib/routes/tingshuitz/templates/shenzhen.art b/lib/routes/tingshuitz/templates/shenzhen.art deleted file mode 100644 index 7fabd864fd64..000000000000 --- a/lib/routes/tingshuitz/templates/shenzhen.art +++ /dev/null @@ -1,8 +0,0 @@ -

    {{ item.title }}

    -

    {{if item.reginName }} - 【{{ item.reginName }}】 -{{ /if }} -(影响用户{{ item.affectUser }}), -{{if item.stopwaterType }} - [{{ item.stopwaterType }}] -{{ /if }}原因:{{ item.reason }},停水开始时间{{ item.stopStartTime }},停水结束时间{{ item.stopEndTime }}

    \ No newline at end of file diff --git a/lib/routes/tingtingfm/program.ts b/lib/routes/tingtingfm/program.tsx similarity index 92% rename from lib/routes/tingtingfm/program.ts rename to lib/routes/tingtingfm/program.tsx index f2cfdfdc6b85..2ce5038d10f8 100644 --- a/lib/routes/tingtingfm/program.ts +++ b/lib/routes/tingtingfm/program.tsx @@ -1,4 +1,4 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; @@ -6,10 +6,20 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { getClientVal, sign } from './utils'; +const renderAudio = (url) => + renderToString( + <> + {url ? ( + + ) : null} + + ); + export const route: Route = { path: '/program/:programId', categories: ['multimedia'], @@ -110,9 +120,7 @@ async function handler(ctx) { const items = list.map((audio) => ({ title: audio.title, link: `${mobileBaseUrl}/v3/vod/2/${audio.h_audio_id}`, - description: art(path.join(__dirname, 'templates/audio.art'), { - url: audio.play_url, - }), + description: renderAudio(audio.play_url), pubDate: parseDate(audio.add_time, 'X'), itunes_item_image: radioCover, itunes_duration: audio.duration, diff --git a/lib/routes/tingtingfm/templates/audio.art b/lib/routes/tingtingfm/templates/audio.art deleted file mode 100644 index b6c8e4e2aff0..000000000000 --- a/lib/routes/tingtingfm/templates/audio.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ if url }} - -{{ /if }} diff --git a/lib/routes/tmtpost/templates/description.art b/lib/routes/tmtpost/templates/description.art deleted file mode 100644 index 57498ab45a9d..000000000000 --- a/lib/routes/tmtpost/templates/description.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/tmtpost/templates/description.tsx b/lib/routes/tmtpost/templates/description.tsx new file mode 100644 index 000000000000..dd257fcfe524 --- /dev/null +++ b/lib/routes/tmtpost/templates/description.tsx @@ -0,0 +1,16 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionData = { + intro?: string; + description?: string; +}; + +const TmtpostDescription = ({ intro, description }: DescriptionData) => ( + <> + {intro ?
    {intro}
    : null} + {description ? raw(description) : null} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/tmtpost/util.ts b/lib/routes/tmtpost/util.ts index 8f90440060e2..2a3b2f281e92 100644 --- a/lib/routes/tmtpost/util.ts +++ b/lib/routes/tmtpost/util.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; @@ -7,7 +5,8 @@ import type { Data, DataItem } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const baseUrl: string = 'https://www.tmtpost.com'; const apiBaseUrl: string = 'https://api.tmtpost.com'; @@ -34,7 +33,7 @@ const processItems = async (limit: number, query: Record, apiUrl: s items = response.data.slice(0, limit).map((item): DataItem => { const title: string = item.title; - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ intro: item.summary, }); const pubDate: number | string = item.time_published; @@ -86,7 +85,7 @@ const processItems = async (limit: number, query: Record, apiUrl: s } const title: string = data.title; - const description: string = art(path.join(__dirname, 'templates/description.art'), { + const description: string = renderDescription({ intro: data.summary, description: data.main, }); diff --git a/lib/routes/tophub/list.ts b/lib/routes/tophub/list.tsx similarity index 74% rename from lib/routes/tophub/list.ts rename to lib/routes/tophub/list.tsx index 14dd039fedf1..8a4c60db6956 100644 --- a/lib/routes/tophub/list.ts +++ b/lib/routes/tophub/list.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import xxhash from 'xxhash-wasm'; import { config } from '@/config'; import type { Route } from '@/types'; import ofetch from '@/utils/ofetch'; -import { art } from '@/utils/render'; export const route: Route = { path: '/list/:id', @@ -60,7 +58,28 @@ async function handler(ctx) { heatRate: $(e).find('td:nth-child(3)').text().trim(), })); const combinedTitles = items.map((item) => item.title).join(''); - const renderRank = art(path.join(__dirname, 'templates/rank.art'), { items }); + const renderRank = renderToString( + + + + + + + + + + {items.map((item, index) => ( + + + + + + ))} + +
    排名标题热度
    {index + 1} + {item.title} + {item.heatRate}
    + ); return { title, diff --git a/lib/routes/tophub/templates/rank.art b/lib/routes/tophub/templates/rank.art deleted file mode 100644 index 59e87d79da01..000000000000 --- a/lib/routes/tophub/templates/rank.art +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - {{each items}} - - - - - - {{/each}} - -
    排名标题热度
    {{ $index + 1 }} - - {{ $value.title }} - - {{ $value.heatRate }}
    \ No newline at end of file diff --git a/lib/routes/toutiao/templates/video.art b/lib/routes/toutiao/templates/video.art deleted file mode 100644 index 1b007c35c256..000000000000 --- a/lib/routes/toutiao/templates/video.art +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/lib/routes/toutiao/user.ts b/lib/routes/toutiao/user.tsx similarity index 91% rename from lib/routes/toutiao/user.ts rename to lib/routes/toutiao/user.tsx index c72224bd6118..6b63a0e76c5b 100644 --- a/lib/routes/toutiao/user.ts +++ b/lib/routes/toutiao/user.tsx @@ -1,4 +1,4 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import RejectError from '@/errors/types/reject'; @@ -7,11 +7,17 @@ import cache from '@/utils/cache'; import { generateHeaders, PRESETS } from '@/utils/header-generator'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import { generate_a_bogus } from './a-bogus'; import type { Feed } from './types'; +const renderVideo = (url, poster) => + renderToString( + + ); + export const route: Route = { path: '/user/token/:token', categories: ['new-media'], @@ -62,10 +68,7 @@ async function handler(ctx) { const video = item.video.play_addr_list.toSorted((a, b) => b.bitrate - a.bitrate)[0]; return { title: item.title, - description: art(path.join(__dirname, 'templates/video.art'), { - poster: item.video.origin_cover.url_list[0], - url: item.video.play_addr_list.toSorted((a, b) => b.bitrate - a.bitrate)[0].play_url_list[0], - }), + description: renderVideo(item.video.play_addr_list.toSorted((a, b) => b.bitrate - a.bitrate)[0].play_url_list[0], item.video.origin_cover.url_list[0]), link: `https://www.toutiao.com/video/${item.id}/`, pubDate: parseDate(item.publish_time, 'X'), author: item.user?.info.name ?? item.source, diff --git a/lib/routes/tradingview/blog.ts b/lib/routes/tradingview/blog.ts index 02d3b62c9fc9..d935ae0c5c3c 100644 --- a/lib/routes/tradingview/blog.ts +++ b/lib/routes/tradingview/blog.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import pMap from 'p-map'; @@ -7,7 +5,8 @@ import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/blog/:category{.+}?', @@ -38,7 +37,7 @@ async function handler(ctx) { return { title, link: item.find('a.articles-grid-link').prop('href'), - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ image: { src: item .find('div.articles-grid-img img') @@ -68,20 +67,18 @@ async function handler(ctx) { .find('img') .each((_, e) => { content(e).replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ image: { src: content(e) .prop('src') .replace(/-\d+x\d+\./, '.'), - width: content(e).prop('width'), - height: content(e).prop('height'), }, }) ); }); item.title = content('meta[property="og:title"]').prop('content'); - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ image: { src: content('meta[property="og:image"]').prop('content'), alt: item.title, diff --git a/lib/routes/tradingview/templates/description.art b/lib/routes/tradingview/templates/description.art deleted file mode 100644 index a89e118b25e3..000000000000 --- a/lib/routes/tradingview/templates/description.art +++ /dev/null @@ -1,13 +0,0 @@ -{{ if image?.src }} -
    - {{ image.alt }} -
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/tradingview/templates/description.tsx b/lib/routes/tradingview/templates/description.tsx new file mode 100644 index 000000000000..2ee44ff49712 --- /dev/null +++ b/lib/routes/tradingview/templates/description.tsx @@ -0,0 +1,20 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionImage = { + src?: string; + alt?: string; +}; + +type DescriptionData = { + image?: DescriptionImage; + description?: string; +}; + +export const renderDescription = ({ image, description }: DescriptionData) => + renderToString( + <> + {image?.src ?
    {image.alt ? {image.alt} : }
    : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/transcriptforest/index.ts b/lib/routes/transcriptforest/index.ts index 7fcea4d0ee68..254f5492c5d9 100644 --- a/lib/routes/transcriptforest/index.ts +++ b/lib/routes/transcriptforest/index.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; const bakeTimestamp = (seconds) => { const hours = Math.floor(seconds / 3600); @@ -63,7 +62,7 @@ async function handler(ctx) { title: item.episode_name, link: new URL(`${defaultLocale}/${item.channel_id}/${item.episode_id}`, rootUrl).href, detailUrl: new URL(`_next/data/${buildId}/${defaultLocale}/${item.channel_id}/${item.episode_id}.json`, rootUrl).href, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ texts: item.episode_description.split(/\n\n/).map((text) => ({ text, })), @@ -85,7 +84,7 @@ async function handler(ctx) { const { data: textResponse } = await got(detailResponse.pageProps.currentEpisode.ps4_url); item.description = - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ audios: [ { src: detailResponse.pageProps.currentEpisode.media, @@ -94,7 +93,7 @@ async function handler(ctx) { ], }) + item.description + - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ texts: textResponse.map((t) => ({ startTime: bakeTimestamp(t.startTime), endTime: bakeTimestamp(t.endTime), diff --git a/lib/routes/transcriptforest/templates/description.art b/lib/routes/transcriptforest/templates/description.art deleted file mode 100644 index c62849a7683c..000000000000 --- a/lib/routes/transcriptforest/templates/description.art +++ /dev/null @@ -1,23 +0,0 @@ -{{ if audios }} - {{ each audios audio }} - {{ if audio?.src }} - - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if texts }} - {{ each texts t }} - {{ if t.startTime && t.endTime }} - {{ t.startTime }} - {{ t.endTime }} - {{ /if }} -

    {{ t.text }}

    - {{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/transcriptforest/templates/description.tsx b/lib/routes/transcriptforest/templates/description.tsx new file mode 100644 index 000000000000..4e3faf752464 --- /dev/null +++ b/lib/routes/transcriptforest/templates/description.tsx @@ -0,0 +1,44 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type AudioData = { + src?: string; + type?: string; +}; + +type TextData = { + startTime?: string; + endTime?: string; + text?: string; +}; + +type DescriptionData = { + audios?: AudioData[]; + texts?: TextData[]; +}; + +const TranscriptForestDescription = ({ audios, texts }: DescriptionData) => ( + <> + {audios?.map((audio) => + audio?.src ? ( + + ) : null + )} + {texts?.map((text) => ( + <> + {text.startTime && text.endTime ? ( + + {text.startTime} - {text.endTime} + + ) : null} +

    {text.text}

    + + ))} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/transformer-circuits/index.ts b/lib/routes/transformer-circuits/index.tsx similarity index 71% rename from lib/routes/transformer-circuits/index.ts rename to lib/routes/transformer-circuits/index.tsx index 1586228b9aa7..67619f04b2d0 100644 --- a/lib/routes/transformer-circuits/index.ts +++ b/lib/routes/transformer-circuits/index.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import logger from '@/utils/logger'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; // Define the main route path export const route: Route = { @@ -109,13 +108,79 @@ async function fetchArticleContent(url) { } // Create an HTML fragment (not a full document) for the RSS description - return art(path.join(__dirname, 'templates/article.art'), { - content, - link: url, - }); + return renderToString(); } catch (error: unknown) { const errorMessage = error instanceof Error ? error.message : String(error); logger.error(`Error fetching article content from ${url}: ${errorMessage}`); return null; // Return null on error, we'll fall back to description } } + +const articleStyles = ` + .content-wrapper { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + line-height: 1.6; + color: #333; + } + img { + max-width: 100%; + height: auto; + } + pre, code { + background-color: #f5f5f5; + border-radius: 3px; + padding: 0.2em 0.4em; + overflow-x: auto; + } + a { + color: #0366d6; + text-decoration: none; + } + a:hover { + text-decoration: underline; + } + h1, h2, h3, h4, h5, h6 { + margin-top: 24px; + margin-bottom: 16px; + font-weight: 600; + line-height: 1.25; + } + p, ul, ol { + margin-bottom: 16px; + } + .read-original { + margin-top: 30px; + margin-bottom: 30px; + text-align: center; + padding: 10px; + background-color: #f7f7f7; + border-radius: 4px; + } + /* Support for custom elements used on transformer-circuits website */ + d-figure, figure { + margin: 20px 0; + text-align: center; + } + d-byline { + font-size: 0.9em; + color: #666; + margin: 15px 0; + } + .gdoc-image img { + max-width: 100%; + display: block; + margin: 0 auto; + } +`; + +const TransformerCircuitsArticle = ({ content, link }: { content: string; link: string }) => ( + <> + +
    {raw(content)}
    + + +); diff --git a/lib/routes/transformer-circuits/templates/article.art b/lib/routes/transformer-circuits/templates/article.art deleted file mode 100644 index 80de0e0b3480..000000000000 --- a/lib/routes/transformer-circuits/templates/article.art +++ /dev/null @@ -1,62 +0,0 @@ - -
    - {{@ content }} -
    - \ No newline at end of file diff --git a/lib/routes/tribalfootball/latest.ts b/lib/routes/tribalfootball/latest.tsx similarity index 85% rename from lib/routes/tribalfootball/latest.ts rename to lib/routes/tribalfootball/latest.tsx index 149f87e89657..6a20aff5285d 100644 --- a/lib/routes/tribalfootball/latest.ts +++ b/lib/routes/tribalfootball/latest.tsx @@ -1,15 +1,26 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const rssUrl = 'https://www.tribalfootball.com/rss/mediafed/general/rss.xml'; +const renderDescription = (desc, headerImage) => + renderToString( + <> + {headerImage ? ( +

    + +

    + ) : null} + {desc ? <>{raw(desc)} : null} + + ); + export const route: Route = { path: '/', radar: [ @@ -63,10 +74,7 @@ async function handler() { ad.parent().remove(); } desc = desc.html(); - desc = art(path.join(__dirname, 'templates/plus_header.art'), { - desc, - header_image: item._header_image, - }); + desc = renderDescription(desc, item._header_image); item.title = title || item.title; item.description = desc || item.description; diff --git a/lib/routes/tribalfootball/templates/plus_header.art b/lib/routes/tribalfootball/templates/plus_header.art deleted file mode 100644 index dceaf586871f..000000000000 --- a/lib/routes/tribalfootball/templates/plus_header.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ if header_image }} -

    - -

    -{{ /if }} -{{@ desc }} diff --git a/lib/routes/tvb/news.ts b/lib/routes/tvb/news.tsx similarity index 89% rename from lib/routes/tvb/news.ts rename to lib/routes/tvb/news.tsx index f610bea1dfa6..749c69dacc6a 100644 --- a/lib/routes/tvb/news.ts +++ b/lib/routes/tvb/news.tsx @@ -1,9 +1,9 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const titles = { focus: { @@ -104,10 +104,12 @@ async function handler(ctx) { link: `${linkRootUrl}/${language}/${category}/${item.id}`, pubDate: parseDate(item.publish_datetime), category: [...item.category.map((c) => c.title), ...item.tags], - description: art(path.join(__dirname, 'templates/description.art'), { - description: item.desc, - images: item.media.image?.map((i) => i.thumbnail.replace(/_\d+x\d+\./, '.')) ?? [], - }), + description: renderToString( + <> + {item.desc ? raw(item.desc) : null} + {item.media.image?.map((image) => ) ?? null} + + ), })); return { diff --git a/lib/routes/tvb/templates/description.art b/lib/routes/tvb/templates/description.art deleted file mode 100644 index cbe2c57fef90..000000000000 --- a/lib/routes/tvb/templates/description.art +++ /dev/null @@ -1,6 +0,0 @@ -{{@ description }} -{{ if images }} -{{ each images image }} - -{{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/tvtropes/featured.ts b/lib/routes/tvtropes/featured.tsx similarity index 83% rename from lib/routes/tvtropes/featured.ts rename to lib/routes/tvtropes/featured.tsx index 9e9677f5b2c5..062fb629ffb9 100644 --- a/lib/routes/tvtropes/featured.ts +++ b/lib/routes/tvtropes/featured.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; const categories = { today: 'left', @@ -57,16 +55,11 @@ async function handler(ctx) { const image = el.find('img'); el.replaceWith( - art(path.join(__dirname, 'templates/description.art'), { - images: [ - { - src: image.prop('src'), - alt: image.prop('alt'), - width: image.prop('width'), - height: image.prop('height'), - }, - ], - }) + renderToString( +
    + {image.prop('alt')} +
    + ) ); }); diff --git a/lib/routes/tvtropes/templates/description.art b/lib/routes/tvtropes/templates/description.art deleted file mode 100644 index 48df396d72fd..000000000000 --- a/lib/routes/tvtropes/templates/description.art +++ /dev/null @@ -1,23 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/twreporter/fetch-article.ts b/lib/routes/twreporter/fetch-article.ts index fa1d40c510ae..450407635b3e 100644 --- a/lib/routes/twreporter/fetch-article.ts +++ b/lib/routes/twreporter/fetch-article.ts @@ -1,8 +1,8 @@ -import path from 'node:path'; - import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderImage } from './templates/image'; +import { renderYouTube } from './templates/youtube'; export default async function fetch(slug: string) { const url = `https://go-api.twreporter.org/v2/posts/${slug}?full=true`; @@ -38,7 +38,7 @@ export default async function fetch(slug: string) { const bannerDescription = imageSource?.description ?? ''; const ogDescription = post.og_description; // Only render the banner if we successfully found an image URL - const banner = imageSource ? art(path.join(__dirname, 'templates/image.art'), { image: bannerImage, description: bannerDescription, caption }) : ''; + const banner = imageSource ? renderImage({ image: bannerImage, description: bannerDescription, caption }) : ''; function format(type, content) { let block = ''; @@ -46,7 +46,7 @@ export default async function fetch(slug: string) { switch (type) { case 'image': case 'slideshow': - block = content.map((image) => art(path.join(__dirname, 'templates/image.art'), { image: image.desktop.url, description: image.description, caption: image.description })).join('
    '); + block = content.map((image) => renderImage({ image: image.desktop.url, description: image.description, caption: image.description })).join('
    '); break; @@ -74,7 +74,7 @@ export default async function fetch(slug: string) { case 'youtube': { const video = content[0].youtubeId; const id = video.split('?')[0]; - block = art(path.join(__dirname, 'templates/youtube.art'), { video: id }); + block = renderYouTube({ video: id }); break; } diff --git a/lib/routes/twreporter/templates/image.art b/lib/routes/twreporter/templates/image.art deleted file mode 100644 index 74fd8bd73288..000000000000 --- a/lib/routes/twreporter/templates/image.art +++ /dev/null @@ -1,3 +0,0 @@ - -{{ description }} -
    {{ caption }}
    \ No newline at end of file diff --git a/lib/routes/twreporter/templates/image.tsx b/lib/routes/twreporter/templates/image.tsx new file mode 100644 index 000000000000..d535ef7c4701 --- /dev/null +++ b/lib/routes/twreporter/templates/image.tsx @@ -0,0 +1,16 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type ImageProps = { + image: string; + description?: string; + caption?: string; +}; + +const ImageBlock = ({ image, description, caption }: ImageProps) => ( + <> + {description} +
    {caption}
    + +); + +export const renderImage = (props: ImageProps): string => renderToString(); diff --git a/lib/routes/twreporter/templates/youtube.art b/lib/routes/twreporter/templates/youtube.art deleted file mode 100644 index 5e2aefb3186d..000000000000 --- a/lib/routes/twreporter/templates/youtube.art +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/routes/twreporter/templates/youtube.tsx b/lib/routes/twreporter/templates/youtube.tsx new file mode 100644 index 000000000000..d0558ef8c652 --- /dev/null +++ b/lib/routes/twreporter/templates/youtube.tsx @@ -0,0 +1,11 @@ +import { renderToString } from 'hono/jsx/dom/server'; + +type YoutubeProps = { + video: string; +}; + +const YoutubeEmbed = ({ video }: YoutubeProps) => ( + +); + +export const renderYouTube = (props: YoutubeProps): string => renderToString(); diff --git a/lib/routes/txrjy/fornumtopic.ts b/lib/routes/txrjy/fornumtopic.tsx similarity index 66% rename from lib/routes/txrjy/fornumtopic.ts rename to lib/routes/txrjy/fornumtopic.tsx index 11032984010b..18ecdd6896bc 100644 --- a/lib/routes/txrjy/fornumtopic.ts +++ b/lib/routes/txrjy/fornumtopic.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import iconv from 'iconv-lite'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const rootUrl = 'https://www.txrjy.com'; @@ -64,24 +63,31 @@ async function handler(ctx) { item.description = content('div.c_table') .toArray() - .map((item) => - art(path.join(__dirname, 'templates/fornumtopic.art'), { - content: content(item) - .find('td.t_f') - .find('div.a_pr') - .remove() - .end() - .html() - ?.replaceAll(/()/g, '$1$2') - .replaceAll(/()/g, '$1src$2'), - pattl: content(item) - .find('div.pattl') - .html() - ?.replaceAll(/()/g, '$1$2') - .replaceAll(/()/g, '$1src$2'), - author: content(item).find('a.xw1').text().trim(), - }) - ) + .map((item) => { + const contentHtml = content(item) + .find('td.t_f') + .find('div.a_pr') + .remove() + .end() + .html() + ?.replaceAll(/()/g, '$1$2') + .replaceAll(/()/g, '$1src$2'); + const pattlHtml = content(item) + .find('div.pattl') + .html() + ?.replaceAll(/()/g, '$1$2') + .replaceAll(/()/g, '$1src$2'); + const author = content(item).find('a.xw1').text().trim(); + + return renderToString( + <> +

    {author}

    + {contentHtml ? raw(contentHtml) : null} + {pattlHtml ? raw(pattlHtml) : null} +
    + + ); + }) .join('\n'); return item; diff --git a/lib/routes/txrjy/templates/fornumtopic.art b/lib/routes/txrjy/templates/fornumtopic.art deleted file mode 100644 index f75b8b69551b..000000000000 --- a/lib/routes/txrjy/templates/fornumtopic.art +++ /dev/null @@ -1,6 +0,0 @@ -

    {{ author }}

    -{{@ content }} -{{ if pattl }} -{{@ pattl }} -{{ /if }} -
    diff --git a/lib/routes/udn/breaking-news.ts b/lib/routes/udn/breaking-news.tsx similarity index 92% rename from lib/routes/udn/breaking-news.ts rename to lib/routes/udn/breaking-news.tsx index a8a2cb104bf8..871602aafced 100644 --- a/lib/routes/udn/breaking-news.ts +++ b/lib/routes/udn/breaking-news.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -73,10 +71,14 @@ async function handler(ctx) { let description = ''; if (data.image) { - description += art(path.join(__dirname, 'templates/figure.art'), { - src: data.image.contentUrl, - alt: data.image.name, - }); + description += renderToString( +
    + + {data.image.name} + + {data.image.name} +
    + ); } if (content.length) { description += content.html(); diff --git a/lib/routes/udn/templates/figure.art b/lib/routes/udn/templates/figure.art deleted file mode 100644 index b6b596dff19d..000000000000 --- a/lib/routes/udn/templates/figure.art +++ /dev/null @@ -1,4 +0,0 @@ -
    -{{ -{{ alt }} -
    \ No newline at end of file diff --git a/lib/routes/uptimerobot/rss.ts b/lib/routes/uptimerobot/rss.tsx similarity index 77% rename from lib/routes/uptimerobot/rss.ts rename to lib/routes/uptimerobot/rss.tsx index ad7d4ff1a6b5..6b1afae07eb9 100644 --- a/lib/routes/uptimerobot/rss.ts +++ b/lib/routes/uptimerobot/rss.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import dayjs from 'dayjs'; +import { renderToString } from 'hono/jsx/dom/server'; import Parser from 'rss-parser'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -import { art } from '@/utils/render'; const titleRegex = /(.+)\s+is\s+([A-Z]+)\s+\((.+)\)/; @@ -128,19 +126,43 @@ async function handler(ctx) { throw new InvalidParameterError('Unexpected status, please open an issue.'); } - const desc = art(path.join(__dirname, 'templates/rss.art'), { - status, - link, - id: showID ? id : null, - duration: formatTime(duration), - uptime: formatTime(monitor.uptime), - downtime: formatTime(monitor.downtime), - uptime_ratio: Number(monitor.uptimeRatio()).toLocaleString(undefined, { - style: 'percent', - minimumFractionDigits: 2, - }), - details: item.content, - }); + const desc = renderToString( + <> + Already {status} for {formatTime(duration)} +
    +
    + {showID && id ? ( + <> + Monitor ID:{' '} + {link ? ( + + {id} + + ) : ( + id + )} +
    +
    + + ) : null} + Uptime: {formatTime(monitor.uptime)} +
    + Downtime: {formatTime(monitor.downtime)} +
    + Availability:{' '} + {Number(monitor.uptimeRatio()).toLocaleString(undefined, { + style: 'percent', + minimumFractionDigits: 2, + })} + {item.content && item.content.trim() !== 'Alert Details:' ? ( + <> +
    +
    + {item.content} + + ) : null} + + ); return { ...item, diff --git a/lib/routes/uptimerobot/templates/rss.art b/lib/routes/uptimerobot/templates/rss.art deleted file mode 100644 index 856b346c090f..000000000000 --- a/lib/routes/uptimerobot/templates/rss.art +++ /dev/null @@ -1,20 +0,0 @@ -Already {{ status }} for {{ duration }} -

    -{{ if id }} - Monitor ID: - {{ if link }} - {{ id }} - {{ else }} - {{ id }} - {{ /if }} -

    -{{ /if }} -Uptime: {{ uptime }} -
    -Downtime: {{ downtime }} -
    -Availability: {{ uptime_ratio }} -{{ if details && details.trim() !== 'Alert Details:' }} -

    - {{ details }} -{{ /if }} diff --git a/lib/routes/urbandictionary/random.ts b/lib/routes/urbandictionary/random.tsx similarity index 62% rename from lib/routes/urbandictionary/random.ts rename to lib/routes/urbandictionary/random.tsx index 405ba1d69836..52c54c887d95 100644 --- a/lib/routes/urbandictionary/random.ts +++ b/lib/routes/urbandictionary/random.tsx @@ -1,9 +1,8 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/random', @@ -35,7 +34,27 @@ async function handler() { const items = data.list.map((item) => ({ title: item.word, - description: art(path.join(__dirname, 'templates/definition.art'), { item }), + description: renderToString( + <> + {item.definition ? ( + <> + {item.definition} +
    + + ) : null} + {item.example ? ( + <> + {item.example} +
    + + ) : null} + {item.author ? ( + <> + by {item.author} + + ) : null} + + ), link: `${baseUrl}/define.php?term=${item.word}`, guid: item.permalink, pubDate: parseDate(item.written_on), diff --git a/lib/routes/urbandictionary/templates/definition.art b/lib/routes/urbandictionary/templates/definition.art deleted file mode 100644 index 9b3285f08aea..000000000000 --- a/lib/routes/urbandictionary/templates/definition.art +++ /dev/null @@ -1,11 +0,0 @@ -{{ if item.definition }} - {{ item.definition }}
    -{{ /if }} - -{{ if item.example }} - {{ item.example }}
    -{{ /if }} - -{{ if item.author }} - by {{ item.author }} -{{ /if }} diff --git a/lib/routes/utgd/templates/description.art b/lib/routes/utgd/templates/description.art deleted file mode 100644 index 8ce3b4866995..000000000000 --- a/lib/routes/utgd/templates/description.art +++ /dev/null @@ -1,11 +0,0 @@ -{{ if image }} - -
    -{{ /if }} -{{ if membership }} -
    -UNTAG Premium -{{ /if }} -{{ if description }} -{{@ description }} -{{ /if }} diff --git a/lib/routes/utgd/utils.ts b/lib/routes/utgd/utils.tsx similarity index 59% rename from lib/routes/utgd/utils.ts rename to lib/routes/utgd/utils.tsx index 85223d93a546..94fb3f6ad857 100644 --- a/lib/routes/utgd/utils.ts +++ b/lib/routes/utgd/utils.tsx @@ -1,11 +1,10 @@ -import path from 'node:path'; - +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import MarkdownIt from 'markdown-it'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const md = MarkdownIt({ @@ -29,13 +28,28 @@ export const parseArticle = (item) => cache.tryGet(`untag-${item.id}`, async () => { const data = await ofetch(`${apiRootUrl}/api/v2/article/${item.id}/`); - item.description = art(path.join(__dirname, 'templates/description.art'), { - membership: data.article_for_membership, - image: data.article_image, - description: md.render(data.article_content), - }); + item.description = renderDescription(data.article_image, data.article_for_membership, md.render(data.article_content)); item.category = [...data.article_category.map((c) => c.category_name), ...data.article_tag.map((t) => t.tag_name)]; return item; }); + +const renderDescription = (image: string | undefined, membership: boolean, description: string): string => + renderToString( + <> + {image ? ( + <> + +
    + + ) : null} + {membership ? ( + <> +
    + UNTAG Premium + + ) : null} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/vcb-s/category.ts b/lib/routes/vcb-s/category.ts index 83d90138f86d..bfd8880b927c 100644 --- a/lib/routes/vcb-s/category.ts +++ b/lib/routes/vcb-s/category.ts @@ -1,10 +1,9 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/post'; const rootUrl = 'https://vcb-s.com'; const cateAPIUrl = `${rootUrl}/wp-json/wp/v2/categories`; @@ -59,7 +58,7 @@ async function handler(ctx) { const data = response.data; const items = data.map((item) => { - const description = art(path.join(__dirname, 'templates/post.art'), { + const description = renderDescription({ post: item.content.rendered.replaceAll(/
    (.*?)<\/pre>/gs, '
    $1
    ').replaceAll(/(.*?)<\/div>/gs, '
    $1
    '), medias: item._embedded['wp:featuredmedia'], }); diff --git a/lib/routes/vcb-s/templates/post.art b/lib/routes/vcb-s/templates/post.art deleted file mode 100644 index 2f026e84c5b6..000000000000 --- a/lib/routes/vcb-s/templates/post.art +++ /dev/null @@ -1,9 +0,0 @@ - -{{ if medias }} -{{ each medias media }} -
    -{{ /each }} -{{ /if }} -{{ if post }} -{{@ post }} -{{ /if }} diff --git a/lib/routes/vcb-s/templates/post.tsx b/lib/routes/vcb-s/templates/post.tsx new file mode 100644 index 000000000000..2c1288666501 --- /dev/null +++ b/lib/routes/vcb-s/templates/post.tsx @@ -0,0 +1,28 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type Media = { + media_details?: { + width?: string | number; + height?: string | number; + }; + source_url?: string; +}; + +type DescriptionData = { + medias?: Media[]; + post?: string; +}; + +const VcbPostDescription = ({ medias, post }: DescriptionData) => ( + <> + {medias?.map((media) => ( +
    + +
    + ))} + {post ? raw(post) : null} + +); + +export const renderDescription = (data: DescriptionData) => renderToString(); diff --git a/lib/routes/vice/templates/article.art b/lib/routes/vice/templates/article.art deleted file mode 100644 index 0bfa7bf84169..000000000000 --- a/lib/routes/vice/templates/article.art +++ /dev/null @@ -1,19 +0,0 @@ -{{ if image }} -
    - {{ image.alt }} -
    {{ image.caption || image.credit || image.alt }}
    -
    -{{ /if }} - -{{ if body }} -

    {{@ body.html }}

    -{{ /if }} - -{{ if heading2 }} -
    -

    {{@ heading2.html }}

    -{{ /if }} - -{{ if oembed }} -{{@ oembed.html }} -{{ /if }} diff --git a/lib/routes/vice/topic.ts b/lib/routes/vice/topic.tsx similarity index 83% rename from lib/routes/vice/topic.ts rename to lib/routes/vice/topic.tsx index 43110228f4ae..0c0da7f3c97e 100644 --- a/lib/routes/vice/topic.ts +++ b/lib/routes/vice/topic.tsx @@ -1,14 +1,31 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; -const render = (data) => art(path.join(__dirname, 'templates/article.art'), data); +const render = (data) => + renderToString( + <> + {data.image ? ( +
    + {data.image.alt} +
    {data.image.caption || data.image.credit || data.image.alt}
    +
    + ) : null} + {data.body ?

    {raw(data.body.html)}

    : null} + {data.heading2 ? ( + <> +
    +

    {raw(data.heading2.html)}

    + + ) : null} + {data.oembed ? raw(data.oembed.html) : null} + + ); export const route: Route = { path: '/topic/:topic/:language?', diff --git a/lib/routes/vimeo/category.ts b/lib/routes/vimeo/category.ts index a36ada8abb34..f590fdab456e 100644 --- a/lib/routes/vimeo/category.ts +++ b/lib/routes/vimeo/category.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; @@ -7,7 +5,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/category/:category/:staffpicks?', @@ -79,7 +78,7 @@ async function handler(ctx) { description: feedDescription, item: vimeojs.map((item) => ({ title: item.name, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ videoUrl: item.uri.replace(`/videos`, ''), vdescription: item.description || '', }), diff --git a/lib/routes/vimeo/channel.ts b/lib/routes/vimeo/channel.ts index 606632a27830..8d6d169f52ff 100644 --- a/lib/routes/vimeo/channel.ts +++ b/lib/routes/vimeo/channel.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/channel/:channel', @@ -84,7 +83,7 @@ async function handler(ctx) { const author = item.find('.meta a').text(); return { title, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ videoUrl: item.find('.more').attr('href'), vdescription: description[index] || '', }), diff --git a/lib/routes/vimeo/templates/description.art b/lib/routes/vimeo/templates/description.art deleted file mode 100644 index 91ed43dafea6..000000000000 --- a/lib/routes/vimeo/templates/description.art +++ /dev/null @@ -1,4 +0,0 @@ - -{{ if vdescription }} -

    {{@ vdescription }}

    -{{ /if }} diff --git a/lib/routes/vimeo/templates/description.tsx b/lib/routes/vimeo/templates/description.tsx new file mode 100644 index 000000000000..3b092c953215 --- /dev/null +++ b/lib/routes/vimeo/templates/description.tsx @@ -0,0 +1,16 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionProps = { + videoUrl: string; + vdescription?: string; +}; + +const Description = ({ videoUrl, vdescription }: DescriptionProps) => ( + <> + + {vdescription ?

    {raw(vdescription)}

    : null} + +); + +export const renderDescription = (props: DescriptionProps): string => renderToString(); diff --git a/lib/routes/vimeo/usr-videos.ts b/lib/routes/vimeo/usr-videos.ts index 13fab5bea736..00bb7db86906 100644 --- a/lib/routes/vimeo/usr-videos.ts +++ b/lib/routes/vimeo/usr-videos.ts @@ -1,10 +1,9 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import { ViewType } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const route: Route = { path: '/user/:username/:cat?', @@ -91,7 +90,7 @@ async function handler(ctx) { return { title: picked ? item.clip.name : item.name, - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ videoUrl: picked ? item.clip.uri.replace('/videos', '') : item.uri.replace('/videos', ''), vdescription: vdescription ? vdescription.replaceAll('\n', '
    ') : '', }), diff --git a/lib/routes/visionias/templates/description-sub.art b/lib/routes/visionias/templates/description-sub.art deleted file mode 100644 index e947d6315aa2..000000000000 --- a/lib/routes/visionias/templates/description-sub.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ if heading }} -

    {{ heading }}

    -{{ /if }} -{{ if articleContent }} - {{@ articleContent }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/visionias/templates/description-sub.tsx b/lib/routes/visionias/templates/description-sub.tsx new file mode 100644 index 000000000000..115e3df7da2e --- /dev/null +++ b/lib/routes/visionias/templates/description-sub.tsx @@ -0,0 +1,16 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionSubProps = { + heading?: string; + articleContent?: string; +}; + +const DescriptionSub = ({ heading, articleContent }: DescriptionSubProps) => ( + <> + {heading ?

    {heading}

    : null} + {articleContent ? raw(articleContent) : null} + +); + +export const renderDescriptionSub = (props: DescriptionSubProps): string => renderToString(); diff --git a/lib/routes/visionias/templates/description.art b/lib/routes/visionias/templates/description.art deleted file mode 100644 index 2f92e6a1c8d1..000000000000 --- a/lib/routes/visionias/templates/description.art +++ /dev/null @@ -1,12 +0,0 @@ -{{ if heading }} -

    {{ heading }}

    -{{ /if }} -{{ if subItems }} - {{ each subItems item }} - {{ if item?.description }} - {{@ item.description }} - {{ /if }} - {{ /each }} -{{else}} - {{@ articleContent }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/visionias/templates/description.tsx b/lib/routes/visionias/templates/description.tsx new file mode 100644 index 000000000000..b3ae2e271abd --- /dev/null +++ b/lib/routes/visionias/templates/description.tsx @@ -0,0 +1,17 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type DescriptionProps = { + heading?: string; + subItems?: Array<{ description?: string }>; + articleContent?: string; +}; + +const Description = ({ heading, subItems, articleContent }: DescriptionProps) => ( + <> + {heading ?

    {heading}

    : null} + {subItems ? <>{subItems.map((item, index) => (item?.description ? {raw(item.description)} : null))} : <>{articleContent ? raw(articleContent) : null}} + +); + +export const renderDescription = (props: DescriptionProps): string => renderToString(); diff --git a/lib/routes/visionias/utils.ts b/lib/routes/visionias/utils.ts index 411e489c2a80..ea0d1d13329e 100644 --- a/lib/routes/visionias/utils.ts +++ b/lib/routes/visionias/utils.ts @@ -1,12 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { DataItem } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; +import { renderDescriptionSub } from './templates/description-sub'; export const baseUrl = 'https://visionias.in'; @@ -39,7 +39,7 @@ export async function extractNews(item, selector) { ?.nextAll('li') .toArray() .map((tag) => $$(tag).text()); - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ heading: title, articleContent: htmlContent, }); @@ -55,7 +55,7 @@ export async function extractNews(item, selector) { return items; } else if (sections.length === 0) { const htmlContent = extractArticle(mainGroup.html()); - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ heading, articleContent: htmlContent, }); @@ -73,13 +73,13 @@ export async function extractNews(item, selector) { const mainDiv = $$(element); const title = mainDiv.find('a > div > h2').text().trim(); const htmlContent = extractArticle(mainDiv.html(), 'div.ck-content'); - const description = art(path.join(__dirname, 'templates/description-sub.art'), { + const description = renderDescriptionSub({ heading: title, articleContent: htmlContent, }); return { description }; }); - const description = art(path.join(__dirname, 'templates/description.art'), { + const description = renderDescription({ heading, subItems: items, }); diff --git a/lib/routes/wainao/templates/description.art b/lib/routes/wainao/templates/description.art deleted file mode 100644 index 1cb5fc8fa6d1..000000000000 --- a/lib/routes/wainao/templates/description.art +++ /dev/null @@ -1,9 +0,0 @@ -{{ if elements.length > 0 }} - {{ each elements element }} - {{ if element.type === 'text' }} -

    {{ element.content }}

    - {{ else if element.type === 'raw_html' }} - {{@ element.content }} - {{ /if }} - {{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/wainao/topics.ts b/lib/routes/wainao/topics.tsx similarity index 91% rename from lib/routes/wainao/topics.ts rename to lib/routes/wainao/topics.tsx index 2aba40e01e24..5ae9aaacbdb3 100644 --- a/lib/routes/wainao/topics.ts +++ b/lib/routes/wainao/topics.tsx @@ -1,14 +1,30 @@ -import path from 'node:path'; - import type { CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Context } from 'hono'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, DataItem, Route } from '@/types'; import { ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +const renderDescription = (elements) => + renderToString( + <> + {elements?.length + ? elements.map((element) => { + if (element.type === 'text') { + return

    {element.content}

    ; + } + if (element.type === 'raw_html') { + return <>{raw(element.content ?? '')}; + } + return null; + }) + : null} + + ); export const handler = async (ctx: Context): Promise => { const { id = 'hotspot' } = ctx.req.param(); @@ -40,9 +56,7 @@ export const handler = async (ctx: Context): Promise => { .slice(0, limit) .map((item): DataItem => { const title: string = item.headlines.basic; - const description: string = art(path.join(__dirname, 'templates/description.art'), { - elements: item.content_elements, - }); + const description: string = renderDescription(item.content_elements); const pubDate: number | string = item.publish_date; const linkUrl: string | undefined = item.website_url; const categories: string[] = [item.taxonomy?.primary_section?.name].filter(Boolean); diff --git a/lib/routes/wallpaperhub/index.ts b/lib/routes/wallpaperhub/index.tsx similarity index 76% rename from lib/routes/wallpaperhub/index.ts rename to lib/routes/wallpaperhub/index.tsx index a7cc669b20e7..7093c47feb79 100644 --- a/lib/routes/wallpaperhub/index.ts +++ b/lib/routes/wallpaperhub/index.tsx @@ -1,9 +1,8 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/', @@ -28,10 +27,12 @@ async function handler() { const list = response.data.entities.map((item) => ({ title: item.entity.title, - description: art(path.join(__dirname, 'templates/description.art'), { - description: item.entity.description, - img: item.entity.variations[0].resolutions[0].url || item.entity.thumbnail, - }), + description: renderToString( + <> +

    {item.entity.description}

    + + + ), pubDate: parseDate(item.entity.created), link: `https://wallpaperhub.app/wallpapers/${item.entity.id}`, })); diff --git a/lib/routes/wallpaperhub/templates/description.art b/lib/routes/wallpaperhub/templates/description.art deleted file mode 100644 index 8afb4dab3685..000000000000 --- a/lib/routes/wallpaperhub/templates/description.art +++ /dev/null @@ -1 +0,0 @@ -

    {{ description }}

    diff --git a/lib/routes/wallstreetcn/live.ts b/lib/routes/wallstreetcn/live.tsx similarity index 83% rename from lib/routes/wallstreetcn/live.ts rename to lib/routes/wallstreetcn/live.tsx index 3ccdc4a47bf1..bad5797546c6 100644 --- a/lib/routes/wallstreetcn/live.ts +++ b/lib/routes/wallstreetcn/live.tsx @@ -1,9 +1,9 @@ -import path from 'node:path'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const titles = { global: '要闻', @@ -63,11 +63,13 @@ async function handler(ctx) { title: item.title || item.content_text, pubDate: parseDate(item.display_time * 1000), author: item.author?.display_name ?? '', - description: art(path.join(__dirname, 'templates/description.art'), { - description: item.content, - more: item.content_more, - images: item.images, - }), + description: renderToString( + <> + {item.content ? raw(item.content) : null} + {item.content_more ? raw(item.content_more) : null} + {item.images?.length ? item.images.map((image) => ) : null} + + ), })); return { diff --git a/lib/routes/wallstreetcn/templates/description.art b/lib/routes/wallstreetcn/templates/description.art deleted file mode 100644 index ee1f9e6f2283..000000000000 --- a/lib/routes/wallstreetcn/templates/description.art +++ /dev/null @@ -1,11 +0,0 @@ -{{ if description }} -{{@ description }} -{{ /if }} -{{ if more }} -{{@ more }} -{{ /if }} -{{ if images }} -{{ each images image }} - -{{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/warthunder/news.ts b/lib/routes/warthunder/news.tsx similarity index 85% rename from lib/routes/warthunder/news.ts rename to lib/routes/warthunder/news.tsx index e92685166d7f..3a452a9c51d3 100644 --- a/lib/routes/warthunder/news.ts +++ b/lib/routes/warthunder/news.tsx @@ -1,14 +1,20 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; -const renderDescription = (desc) => art(path.join(__dirname, 'templates/description.art'), desc); +const renderDescription = (desc: { description?: string; imglink?: string }) => renderToString(); + +const WarthunderDescription = ({ description, imglink }: { description?: string; imglink?: string }) => ( + <> + {description} +
    + + +); export const route: Route = { path: '/news', diff --git a/lib/routes/warthunder/templates/description.art b/lib/routes/warthunder/templates/description.art deleted file mode 100644 index 48f2982380f6..000000000000 --- a/lib/routes/warthunder/templates/description.art +++ /dev/null @@ -1 +0,0 @@ -{{description}}
    \ No newline at end of file diff --git a/lib/routes/washingtonpost/app.ts b/lib/routes/washingtonpost/app.ts deleted file mode 100644 index dc443a9aa37e..000000000000 --- a/lib/routes/washingtonpost/app.ts +++ /dev/null @@ -1,118 +0,0 @@ -import path from 'node:path'; - -import dayjs from 'dayjs'; -import advancedFormat from 'dayjs/plugin/advancedFormat.js'; -import timezone from 'dayjs/plugin/timezone.js'; -import utc from 'dayjs/plugin/utc.js'; -import { FetchError } from 'ofetch'; - -import type { Route } from '@/types'; -import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { art } from '@/utils/render'; - -export const route: Route = { - path: '/app/:category{.+}?', - categories: ['traditional-media'], - example: '/washingtonpost/app/national', - parameters: { - category: 'Category from the path of the URL of the corresponding site, see below', - }, - features: { - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - name: 'App', - maintainers: ['quiniapiezoelectricity'], - radar: [ - { - source: ['www.washingtonpost.com/:category'], - target: '/app/:category', - }, - ], - handler, - description: `::: tip -For example, the category for https://www.washingtonpost.com/national/investigations would be /national/investigations. -:::`, -}; - -function handleDuplicates(array) { - const objects = {}; - for (const obj of array) { - objects[obj.id] = objects[obj.id] ? Object.assign(objects[obj.id], obj) : obj; - } - return Object.values(objects); -} - -async function handler(ctx) { - const category = ctx.req.param('category') ?? ''; - const headers = { - Accept: '*/*', - Connection: 'keep-alive', - 'User-Agent': 'Classic/6.70.0', - }; - dayjs.extend(utc); - dayjs.extend(timezone); - dayjs.extend(advancedFormat); - art.defaults.imports.dayjs = dayjs; - - const url = `https://jsonapp1.washingtonpost.com/fusion_prod/v2/${category}`; - const response = await got.get(url, { headers }); - const title = response.data.tracking.page_title.includes('Washington Post') ? response.data.tracking.page_title : `The Washington Post - ${response.data.tracking.page_title}`; - const link = 'https://washingtonpost.com' + response.data.tracking.page_path; - const mains = response.data.regions[0].items.filter((item) => item.items); - const list = mains.flatMap((main) => - main.items[0].items - .filter((item) => item.is_from_feed === true) - .map((item) => { - const object = { - id: item.id, - title: item.headline.text, - link: item.link.url, - pubDate: item.link.display_date, - updated: item.link.last_modified, - }; - if (item.blurbs?.items[0]?.text) { - object.description = item.blurbs?.items[0]?.text; - } - return object; - }) - ); - const feed = handleDuplicates(list); - const items = await Promise.all( - feed.map((item) => - cache.tryGet(item.link, async () => { - let response; - try { - response = await got(`https://rainbowapi-a.wpdigital.net/rainbow-data-service/rainbow/content-by-url.json?followLinks=false&url=${item.link}`, { headers }); - } catch (error) { - if (error instanceof FetchError && error.statusCode === 415) { - // Interactive or podcast contents will return 415 Unsupported Media Type. Keep calm and carry on. - return item; - } else { - throw error; - } - } - item.title = response.data.title ?? item.title; - item.author = - response.data.items - .filter((entry) => entry.type === 'byline') - ?.flatMap((entry) => entry.authors.map((author) => author.name)) - ?.join(', ') ?? ''; - item.description = art(path.join(__dirname, 'templates/description.art'), { - content: response.data.items, - }); - return item; - }) - ) - ); - - return { - title, - link, - item: items, - }; -} diff --git a/lib/routes/washingtonpost/app.tsx b/lib/routes/washingtonpost/app.tsx new file mode 100644 index 000000000000..7fca7dbd18cd --- /dev/null +++ b/lib/routes/washingtonpost/app.tsx @@ -0,0 +1,220 @@ +import dayjs from 'dayjs'; +import advancedFormat from 'dayjs/plugin/advancedFormat.js'; +import timezone from 'dayjs/plugin/timezone.js'; +import utc from 'dayjs/plugin/utc.js'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; +import { FetchError } from 'ofetch'; + +import type { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; + +export const route: Route = { + path: '/app/:category{.+}?', + categories: ['traditional-media'], + example: '/washingtonpost/app/national', + parameters: { + category: 'Category from the path of the URL of the corresponding site, see below', + }, + features: { + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'App', + maintainers: ['quiniapiezoelectricity'], + radar: [ + { + source: ['www.washingtonpost.com/:category'], + target: '/app/:category', + }, + ], + handler, + description: `::: tip +For example, the category for https://www.washingtonpost.com/national/investigations would be /national/investigations. +:::`, +}; + +function handleDuplicates(array) { + const objects = {}; + for (const obj of array) { + objects[obj.id] = objects[obj.id] ? Object.assign(objects[obj.id], obj) : obj; + } + return Object.values(objects); +} + +async function handler(ctx) { + const category = ctx.req.param('category') ?? ''; + const headers = { + Accept: '*/*', + Connection: 'keep-alive', + 'User-Agent': 'Classic/6.70.0', + }; + dayjs.extend(utc); + dayjs.extend(timezone); + dayjs.extend(advancedFormat); + + const url = `https://jsonapp1.washingtonpost.com/fusion_prod/v2/${category}`; + const response = await got.get(url, { headers }); + const title = response.data.tracking.page_title.includes('Washington Post') ? response.data.tracking.page_title : `The Washington Post - ${response.data.tracking.page_title}`; + const link = 'https://washingtonpost.com' + response.data.tracking.page_path; + const mains = response.data.regions[0].items.filter((item) => item.items); + const list = mains.flatMap((main) => + main.items[0].items + .filter((item) => item.is_from_feed === true) + .map((item) => { + const object = { + id: item.id, + title: item.headline.text, + link: item.link.url, + pubDate: item.link.display_date, + updated: item.link.last_modified, + }; + if (item.blurbs?.items[0]?.text) { + object.description = item.blurbs?.items[0]?.text; + } + return object; + }) + ); + const feed = handleDuplicates(list); + const items = await Promise.all( + feed.map((item) => + cache.tryGet(item.link, async () => { + let response; + try { + response = await got(`https://rainbowapi-a.wpdigital.net/rainbow-data-service/rainbow/content-by-url.json?followLinks=false&url=${item.link}`, { headers }); + } catch (error) { + if (error instanceof FetchError && error.statusCode === 415) { + // Interactive or podcast contents will return 415 Unsupported Media Type. Keep calm and carry on. + return item; + } else { + throw error; + } + } + item.title = response.data.title ?? item.title; + item.author = + response.data.items + .filter((entry) => entry.type === 'byline') + ?.flatMap((entry) => entry.authors.map((author) => author.name)) + ?.join(', ') ?? ''; + item.description = renderDescription(response.data.items); + return item; + }) + ) + ); + + return { + title, + link, + item: items, + }; +} + +const renderDescription = (content): string => + renderToString( + <> + {content?.map((entry, index) => { + if (!entry) { + return null; + } + + if (entry.type === 'title' && entry.subtype !== 'h1') { + const TitleTag = (entry.subtype || 'h2') as keyof JSX.IntrinsicElements; + return {entry.mime === 'text/html' ? raw(entry.content) : entry.content}; + } + + if (entry.type === 'sanitized_html') { + if (entry.subtype === 'paragraph') { + return ( +

    + {entry.mime === 'text/html' ? raw(entry.content) : entry.content} + {entry.oembed ? raw(entry.oembed) : null} +

    + ); + } + + if (entry.subtype === 'subhead') { + const SubheadTag = `h${entry.subhead_level || 4}` as keyof JSX.IntrinsicElements; + return ( + + {entry.mime === 'text/html' ? raw(entry.content) : entry.content} + {entry.oembed ? raw(entry.oembed) : null} + + ); + } + } + + if (entry.type === 'deck') { + return ( +
    +

    {entry.mime === 'text/html' ? raw(entry.content) : entry.content}

    +
    + ); + } + + if (entry.type === 'image') { + return ( +
    + {entry.blurb} +
    {entry.fullcaption}
    +
    + ); + } + + if (entry.type === 'video') { + if (entry.content?.html) { + return {raw(entry.content.html)}; + } + + if (entry.mediaURL) { + return ( +
    + + {entry.fullcaption ?
    {entry.fullcaption}
    : null} +
    + ); + } + } + + if (entry.type === 'list') { + const ListTag = entry.subtype === 'ordered' ? 'ol' : 'ul'; + return ( + + {(entry.content ?? []).map((listItem, itemIndex) => ( +
  • {entry.mime === 'text/html' ? raw(listItem) : listItem}
  • + ))} +
    + ); + } + + if (entry.type === 'divider') { + return ( + +
    +
    +
    +
    + ); + } + + if (entry.type === 'byline' && (entry.subtype === 'live-update' || entry.subtype === 'live-reporter-insight')) { + return ( +

    + {entry.mime === 'text/html' ? raw(entry.content) : entry.content} +

    + ); + } + + if (entry.type === 'date' && entry.subtype === 'live-update') { + return entry.content ? {dayjs.tz(entry.content, 'America/New_York').locale('en').format('dddd, MMMM D, YYYY h:mm A z')} : null; + } + + return null; + })} + + ); diff --git a/lib/routes/washingtonpost/templates/description.art b/lib/routes/washingtonpost/templates/description.art deleted file mode 100644 index fc7382329a7e..000000000000 --- a/lib/routes/washingtonpost/templates/description.art +++ /dev/null @@ -1,59 +0,0 @@ -{{ if content }} -{{ each content }} - {{ if $value.type == 'title' && $value.subtype != 'h1'}} - <{{ if $value.subtype }}{{ $value.subtype }}{{ else }}h2{{ /if }}> - {{ if $value.mime == 'text/html' }}{{@ $value.content }}{{ /if }} - {{ if $value.mime == 'text/plain' }}{{ $value.content }}{{ /if }} - - {{ /if }} - {{ if $value.type == 'sanitized_html' }} - {{ if $value.subtype == 'paragraph' }}

    {{ else if $value.subtype == 'subhead' }}{{ /if }} - {{ if $value.mime == 'text/html' }}{{@ $value.content }}{{ /if }} - {{ if $value.mime == 'text/plain' }}{{ $value.content }}{{ /if }} - {{ if $value.oembed }}{{@ $value.oembed }}{{ /if }} - {{ if $value.subtype == 'paragraph' }}

    {{ else if $value.subtype == 'subhead' }}{{ /if }} - {{ /if }} - {{ if $value.type == 'deck' }} -

    - {{ if $value.mime == 'text/html' }}{{@ $value.content }}{{ /if }} - {{ if $value.mime == 'text/plain' }}{{ $value.content }}{{ /if }} -

    - {{ /if }} - {{ if $value.type == 'image' }} -
    {{ $value.blurb }}
    {{ $value.fullcaption }}
    - {{ /if }} - {{ if $value.type == 'video' }} - {{ if $value.content && $value.content.html }}{{@ $value.content.html }} - {{ else if $value.mediaURL }} -
    - - {{ if $value.fullcaption }}
    {{ $value.fullcaption }}
    {{ /if }} -
    - {{ /if }} - {{ /if }} - {{ if $value.type == 'list' }} - {{ if $value.subtype == 'ordered' }}
      {{ else }}
        {{ /if }} - {{ if $value.mime == 'text/html' }}{{ each $value.content }}
      • {{@ $value }}
      • {{ /each }}{{ /if }} - {{ if $value.mime == 'text/plain' }}{{ each $value.content }}
      • {{ $value }}
      • {{ /each }}{{ /if }} - {{ if $value.subtype == 'ordered' }}
    {{ else }}{{ /if }} - {{ /if }} - {{ if $value.type == 'divider' }}


    {{ /if }} - {{ if $value.type == 'byline' }} - {{ if $value.subtype == 'live-update' || $value.subtype == 'live-reporter-insight' }} -

    - {{ if $value.mime == 'text/html' }}{{@ $value.content }}{{ /if }} - {{ if $value.mime == 'text/plain' }}{{ $value.content }}{{ /if }} -

    - {{ /if}} - {{ /if }} - {{ if $value.type == 'date' }} - {{ if $value.subtype == 'live-update'}} - {{ if $value.content }}{{ $imports.dayjs.tz($value.content,"America/New_York").locale('en').format('dddd, MMMM D, YYYY h:mm A z') }}{{ /if }} - {{ /if }} - {{ /if }} -{{ /each }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/wdfxw/bookfree.ts b/lib/routes/wdfxw/bookfree.tsx similarity index 95% rename from lib/routes/wdfxw/bookfree.ts rename to lib/routes/wdfxw/bookfree.tsx index 26ebe02b0144..f6a6e2b53995 100644 --- a/lib/routes/wdfxw/bookfree.ts +++ b/lib/routes/wdfxw/bookfree.tsx @@ -1,16 +1,14 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, DataItem, Route } from '@/types'; import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const handler = async (ctx: Context): Promise => { const { id } = ctx.req.param(); @@ -34,16 +32,20 @@ export const handler = async (ctx: Context): Promise => { const title: string = $aEl.attr('title') ?? $aEl.text(); const image: string | undefined = $el.find('div.img img').attr('data-original') ?? $el.find('div.img img').attr('src'); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { - images: image - ? [ - { - src: image, - alt: title, - }, - ] - : undefined, - }); + const description: string | undefined = renderToString( + + ); const linkUrl: string | undefined = $aEl.attr('href'); const processedItem: DataItem = { @@ -528,3 +530,20 @@ export const route: Route = { ], view: ViewType.Articles, }; + +type WdfxwImage = { + src?: string; + alt?: string; +}; + +const WdfxwDescription = ({ images }: { images?: WdfxwImage[] }) => ( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + )} + +); diff --git a/lib/routes/wdfxw/templates/description.art b/lib/routes/wdfxw/templates/description.art deleted file mode 100644 index b6263ea05ba4..000000000000 --- a/lib/routes/wdfxw/templates/description.art +++ /dev/null @@ -1,13 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} diff --git a/lib/routes/weibo/search/hot.ts b/lib/routes/weibo/search/hot.tsx similarity index 85% rename from lib/routes/weibo/search/hot.ts rename to lib/routes/weibo/search/hot.tsx index b39308b99ee1..f2b1042ab37a 100644 --- a/lib/routes/weibo/search/hot.ts +++ b/lib/routes/weibo/search/hot.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; import { ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; import weiboUtils from '../utils'; @@ -146,6 +145,34 @@ function seekContent(clist) { const $ = load('
    '); const stub = $('#wbcontent'); + const renderDigest = ({ author, msg, link, postinfo, pics }) => + renderToString( + <> + +
    {msg ? raw(msg) : null}
    + {pics.length ? ( + <> +
    +
    + {pics.map((pic) => ( + + + + ))} +
    + + ) : null} +
    + + ); + // To for..of per reviewers comment // Need to find one clist with 'type ==9' for (const curitem of clist) { @@ -160,7 +187,7 @@ function seekContent(clist) { } else { curcontent('img').remove(); } - const section = art(path.join(__dirname, 'template/digest.art'), { + const section = renderDigest({ author: { link: curitem.mblog.user.profile_url, name: curitem.mblog.user.screen_name, @@ -168,7 +195,6 @@ function seekContent(clist) { msg: curcontent.html(), link: curitem.scheme, postinfo: curitem.mblog.created_at, - picnum: wpic === 'true' ? curitem.mblog.pic_num : 0, pics: wpic === 'true' && curitem.mblog.pic_num > 0 ? curitem.mblog.pics.map((item) => { diff --git a/lib/routes/weibo/search/template/digest.art b/lib/routes/weibo/search/template/digest.art deleted file mode 100644 index 065bd12f6ff1..000000000000 --- a/lib/routes/weibo/search/template/digest.art +++ /dev/null @@ -1,17 +0,0 @@ - -
    -{{@ msg }} -
    - -{{if picnum > 0 }} -
    -
    - {{each pics}} - - {{/each}} -
    -{{/if}} -
    diff --git a/lib/routes/wellcee/rent.ts b/lib/routes/wellcee/rent.tsx similarity index 71% rename from lib/routes/wellcee/rent.ts rename to lib/routes/wellcee/rent.tsx index 612f40a499e6..c7b00f5197bd 100644 --- a/lib/routes/wellcee/rent.ts +++ b/lib/routes/wellcee/rent.tsx @@ -1,17 +1,44 @@ -import path from 'node:path'; - import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import type { District, House } from './types'; import { baseUrl, getCitys, getDistricts } from './utils'; -const render = (data) => art(path.join(__dirname, 'templates/house.art'), data); +const render = (item: House) => + renderToString( + <> + 租金: {item.rent} +
    + {item.dailyRent ? ( + <> + 日租: {item.dailyRent} +
    + + ) : null} +
    + {item.video ? ( + <> + +
    + + ) : null} + {item.imgs?.length + ? item.imgs.map((img) => ( + <> + +
    + + )) + : null} + + ); export const route: Route = { path: '/rent/:city/:district?', @@ -63,7 +90,7 @@ async function handler(ctx: Context) { const items = (response.data.list as House[]).map((item) => ({ title: item.address, link: `${baseUrl}/rent-apartment/${item.id}`, - description: render({ item }), + description: render(item), pubDate: parseDate(item.loginTime, 'X'), author: item.userInfo.name, category: [...item.tags, ...item.typeTags], diff --git a/lib/routes/wellcee/templates/house.art b/lib/routes/wellcee/templates/house.art deleted file mode 100644 index 2fb3b737931d..000000000000 --- a/lib/routes/wellcee/templates/house.art +++ /dev/null @@ -1,18 +0,0 @@ -租金: {{ item.rent }}
    -{{ if item.dailyRent }} -日租: {{ item.dailyRent }}
    -{{ /if }} -
    - -{{ if item.video }} - -
    -{{ /if }} - -{{ if item.imgs }} - {{ each item.imgs img }} -
    - {{ /each }} -{{ /if }} diff --git a/lib/routes/whu/news.ts b/lib/routes/whu/news.ts index dd2c9461c729..66bd1c861717 100644 --- a/lib/routes/whu/news.ts +++ b/lib/routes/whu/news.ts @@ -1,13 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; +import { renderDescription } from './templates/description'; import { domain, getMeta, processItems, processMeta } from './util'; export const route: Route = { @@ -70,7 +68,7 @@ async function handler(ctx) { title: item.prop('title') ?? item.find('h4.eclips').text(), link: new URL(item.prop('href'), rootUrl).href, pubDate: parseDate(item.find('time').text(), ['YYYY.MM.DD', 'DDYYYY.MM']), - description: art(path.join(__dirname, 'templates/description.art'), { + description: renderDescription({ description: item.find('div.txt p').html(), image: image.prop('src') ? { diff --git a/lib/routes/whu/templates/description.art b/lib/routes/whu/templates/description.art deleted file mode 100644 index 2de99c2920ad..000000000000 --- a/lib/routes/whu/templates/description.art +++ /dev/null @@ -1,39 +0,0 @@ -{{ if description }} - {{@ description }} -{{ /if }} - -{{ if image }} -
    - {{ -
    -{{ /if }} - -{{ if video }} - -{{ /if }} - -{{ if attachments && attachments.length > 0 }} - 附件 - -{{ /if }} \ No newline at end of file diff --git a/lib/routes/whu/templates/description.tsx b/lib/routes/whu/templates/description.tsx new file mode 100644 index 000000000000..729e37837827 --- /dev/null +++ b/lib/routes/whu/templates/description.tsx @@ -0,0 +1,55 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type ImageData = { + src: string; + alt?: string; + width?: string | number; +}; + +type VideoData = { + src: string; + width?: string | number; + height?: string | number; +}; + +type Attachment = { + link: string; + title: string; +}; + +type DescriptionData = { + description?: string; + image?: ImageData; + video?: VideoData; + attachments?: Attachment[]; +}; + +export const renderDescription = ({ description, image, video, attachments }: DescriptionData): string => + renderToString( + <> + {description ? raw(description) : null} + {image ? ( +
    + {image.alt} +
    + ) : null} + {video ? ( + + ) : null} + {attachments?.length ? ( + <> + 附件 + + + ) : null} + + ); diff --git a/lib/routes/whu/util.ts b/lib/routes/whu/util.ts index b7557c8400fa..12e5ca908f94 100644 --- a/lib/routes/whu/util.ts +++ b/lib/routes/whu/util.ts @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; +import { renderDescription } from './templates/description'; + const domain = 'whu.edu.cn'; /** @@ -48,11 +47,11 @@ const getItemDetail = async (item, rootUrl) => { // Missing the `src` properties for the images. // The `src` property should be replaced with the value of `orisrc` to show the image. - // Replace images in the content with custom art template. + // Replace images in the content with custom JSX template. content('p.vsbcontent_img').each(function () { const image = content(this).find('img'); content(this).replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ image: { src: new URL(image.prop('orisrc'), rootUrl).href, width: image.prop('width'), @@ -63,11 +62,11 @@ const getItemDetail = async (item, rootUrl) => { // Missing the `src` properties for the videos. // The `src` property should be replaced with the value of `vurl` to play the video. - // Replace videos in the content with custom art template. + // Replace videos in the content with custom JSX template. content('script[name="_videourl"]').each(function () { const video = content(this); video.replaceWith( - art(path.join(__dirname, 'templates/description.art'), { + renderDescription({ video: { src: new URL(video.prop('vurl').split('?')[0], rootUrl).href, width: content(video).prop('vwidth'), @@ -99,7 +98,7 @@ const getItemDetail = async (item, rootUrl) => { const meta = processMeta(detailResponse); item.title = getMeta(meta, 'ArticleTitle') ?? item.title; - item.description = art(path.join(__dirname, 'templates/description.art'), { + item.description = renderDescription({ description, attachments, }); diff --git a/lib/routes/wikipedia/current-events.ts b/lib/routes/wikipedia/current-events.ts index 427e1e9316e4..c10ec147f5b2 100644 --- a/lib/routes/wikipedia/current-events.ts +++ b/lib/routes/wikipedia/current-events.ts @@ -71,7 +71,7 @@ function parseCurrentEventsTemplate(wikitext: string): string | null { function stripTemplates(wikitext: string): string { // Remove MediaWiki template delimiters {{...}} but keep the content - // This prevents conflicts with art-template's {{ }} delimiters in RSS generation + // This prevents conflicts with template delimiters during JSX-based rendering return wikitext.replaceAll(/\{\{([^}]+)\}\}/g, '$1'); } @@ -228,7 +228,7 @@ export function wikiToHtml(wikitext: string): string { let html = wikitext; // Apply transformations in order - html = stripTemplates(html); // Must be first to prevent art-template conflicts + html = stripTemplates(html); // Must be first to prevent template delimiter conflicts html = convertWikiLinks(html); html = convertExternalLinks(html); html = convertTextFormatting(html); diff --git a/lib/routes/windsurf/blog.ts b/lib/routes/windsurf/blog.tsx similarity index 88% rename from lib/routes/windsurf/blog.ts rename to lib/routes/windsurf/blog.tsx index 0a18baa48171..9efdd4cf1176 100644 --- a/lib/routes/windsurf/blog.ts +++ b/lib/routes/windsurf/blog.tsx @@ -1,14 +1,12 @@ -import path from 'node:path'; - import type { CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Context } from 'hono'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Data, DataItem, Route } from '@/types'; import { ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '10', 10); @@ -34,17 +32,16 @@ export const handler = async (ctx: Context): Promise => { const items: DataItem[] = response.posts.slice(0, limit).map((item): DataItem => { const title: string = item.title; const image: string | undefined = item.images?.[0]; - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { - images: image - ? [ - { - src: image, - alt: title, - }, - ] - : undefined, - intro: item.summary, - }); + const description: string | undefined = renderToString( + <> + {image ? ( +
    + {title} +
    + ) : null} + {item.summary ?
    {item.summary}
    : null} + + ); const pubDate: number | string = item.date; const linkUrl: string | undefined = item.slug; const categories: string[] = item.tags; diff --git a/lib/routes/windsurf/templates/description.art b/lib/routes/windsurf/templates/description.art deleted file mode 100644 index 249654e7e618..000000000000 --- a/lib/routes/windsurf/templates/description.art +++ /dev/null @@ -1,21 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if intro }} -
    {{ intro }}
    -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/winstall/templates/desc.art b/lib/routes/winstall/templates/desc.art deleted file mode 100644 index 998a2ff2cb0c..000000000000 --- a/lib/routes/winstall/templates/desc.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ if installers }} - {{ each installers installer }} - {{ installer }}
    - {{ /each }} -{{ /if }} diff --git a/lib/routes/winstall/update.ts b/lib/routes/winstall/update.tsx similarity index 81% rename from lib/routes/winstall/update.ts rename to lib/routes/winstall/update.tsx index 49320057ba77..8b7778d60e10 100644 --- a/lib/routes/winstall/update.ts +++ b/lib/routes/winstall/update.tsx @@ -1,12 +1,22 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import { config } from '@/config'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { art } from '@/utils/render'; + +const renderDesc = (installers?: string[]) => + renderToString( + <> + {installers?.map((installer) => ( + <> + {installer} +
    + + ))} + + ); export const route: Route = { path: '/:appId', @@ -51,9 +61,7 @@ async function handler(ctx) { const { app } = response.pageProps; const items = app.versions.map((item) => ({ title: `${app.name} ${item.version}`, - description: art(path.join(__dirname, 'templates/desc.art'), { - installers: item.installers, - }), + description: renderDesc(item.installers), author: app.publisher, category: app.tags, guid: `winstall:${appId}:${item.version}`, diff --git a/lib/routes/wise/pair.ts b/lib/routes/wise/pair.tsx similarity index 71% rename from lib/routes/wise/pair.ts rename to lib/routes/wise/pair.tsx index 352b4adc8ffa..0338a02cc980 100644 --- a/lib/routes/wise/pair.ts +++ b/lib/routes/wise/pair.tsx @@ -1,16 +1,41 @@ -import path from 'node:path'; - import dayjs from 'dayjs'; import customParseFormat from 'dayjs/plugin/customParseFormat.js'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; dayjs.extend(customParseFormat); -const renderDesc = (content) => art(path.join(__dirname, 'templates/description.art'), content); +const renderDesc = (content) => + renderToString( + <> +

    + {content.source} to {content.target} +

    + + + + + + + + + + + + + + + +
    + Date + + Rate +
    {content.yesterday}{content.yRate}
    {content.dayBefore}{content.byRate}
    + + ); export const route: Route = { path: '/pair/:source/:target', diff --git a/lib/routes/wise/templates/description.art b/lib/routes/wise/templates/description.art deleted file mode 100644 index 7a49bce5ff9a..000000000000 --- a/lib/routes/wise/templates/description.art +++ /dev/null @@ -1,17 +0,0 @@ -

    {{ source }} to {{ target }}

    - - - - - - - - - - - - - - - -
    DateRate
    {{ yesterday }}{{ yRate }}
    {{ dayBefore }}{{ byRate }}
    diff --git a/lib/routes/wmc-bj/publish.ts b/lib/routes/wmc-bj/publish.tsx similarity index 84% rename from lib/routes/wmc-bj/publish.ts rename to lib/routes/wmc-bj/publish.tsx index ec56268ddf1d..e16afd07207e 100644 --- a/lib/routes/wmc-bj/publish.ts +++ b/lib/routes/wmc-bj/publish.tsx @@ -1,11 +1,9 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -39,11 +37,13 @@ async function handler(ctx) { { title: `${datetime} ${title}`, link: currentUrl, - description: art(path.join(__dirname, 'templates/description.art'), { - image: { - src: img.prop('src').replace(/\/medium\//, '/'), - }, - }), + description: renderToString( + img.prop('src') ? ( +
    + +
    + ) : null + ), category: categories, guid: `${currentUrl}#${datetime}`, pubDate: timezone(parseDate(/^[A-Za-z]{3}/.test(datetime) ? datetime.replace(/^\w+/, '') : datetime, ['DD MMM HH:mm', 'MM/DD HH:mm']), +0), diff --git a/lib/routes/wmc-bj/templates/description.art b/lib/routes/wmc-bj/templates/description.art deleted file mode 100644 index f287a97998fc..000000000000 --- a/lib/routes/wmc-bj/templates/description.art +++ /dev/null @@ -1,5 +0,0 @@ -{{ if image?.src }} -
    - -
    -{{ /if }} diff --git a/lib/routes/wnacg/common.ts b/lib/routes/wnacg/common.tsx similarity index 88% rename from lib/routes/wnacg/common.ts rename to lib/routes/wnacg/common.tsx index 600a615ea7be..16cf18bfbce6 100644 --- a/lib/routes/wnacg/common.ts +++ b/lib/routes/wnacg/common.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const categories = { 1: '同人誌 漢化', @@ -92,10 +91,13 @@ export async function handler(ctx) { item.author = author; item.category = category; - item.description = art(path.join(__dirname, 'templates/manga.art'), { - description, - imgList, - }); + item.description = renderToString( + <> + {description ? raw(description) : null} +
    + {imgList ? imgList.map((img) => {img.caption}) : null} + + ); return item; }) diff --git a/lib/routes/wnacg/templates/manga.art b/lib/routes/wnacg/templates/manga.art deleted file mode 100644 index b3ae22822978..000000000000 --- a/lib/routes/wnacg/templates/manga.art +++ /dev/null @@ -1,9 +0,0 @@ -{{ if description }} - {{@ description }} -{{ /if }} -
    -{{ if imgList }} - {{ each imgList img }} - {{ img.caption }} - {{ /each }} -{{ /if }} diff --git a/lib/routes/wsj/templates/article-description.art b/lib/routes/wsj/templates/article-description.art deleted file mode 100644 index 53569ee56d76..000000000000 --- a/lib/routes/wsj/templates/article-description.art +++ /dev/null @@ -1,6 +0,0 @@ -
    - {{@ item.subTitle}} - {{@ item.article}} - -
    - diff --git a/lib/routes/wsj/utils.ts b/lib/routes/wsj/utils.tsx similarity index 90% rename from lib/routes/wsj/utils.ts rename to lib/routes/wsj/utils.tsx index 37fdee0116d6..109c3a785968 100644 --- a/lib/routes/wsj/utils.ts +++ b/lib/routes/wsj/utils.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { PRESETS } from '@/utils/header-generator'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const parseArticle = (item) => cache.tryGet(item.link, async () => { @@ -89,9 +88,7 @@ const parseArticle = (item) => $(e).remove(); }); item.article = article.html(); - item.description = art(path.join(__dirname, 'templates/article-description.art'), { - item, - }); + item.description = renderToString(); return { title: item.title, @@ -108,3 +105,10 @@ const parseArticle = (item) => }); export { parseArticle }; + +const WsjDescription = ({ subTitle, article }: { subTitle?: string; article?: string }) => ( +
    + {subTitle ? raw(subTitle) : null} + {article ? raw(article) : null} +
    +); diff --git a/lib/routes/x-mol/news.ts b/lib/routes/x-mol/news.tsx similarity index 80% rename from lib/routes/x-mol/news.ts rename to lib/routes/x-mol/news.tsx index a05e06d32811..7280daceae89 100644 --- a/lib/routes/x-mol/news.ts +++ b/lib/routes/x-mol/news.tsx @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; import utils from './utils'; @@ -55,10 +53,17 @@ async function handler(ctx) { return { title: a.text(), link: new URL(a.attr('href'), utils.host).href, - description: art(path.join(__dirname, 'templates/description.art'), { - image: element.find('img').attr('src').split('?')[0], - text: element.find('.thsis-div a').text().trim(), - }), + description: renderToString( + <> + {element.find('img').attr('src') ? ( + <> + +
    + + ) : null} + {element.find('.thsis-div a').text().trim() ?

    {element.find('.thsis-div a').text().trim()}

    : null} + + ), author, pubDate: span.next().length ? timezone(parseDate(span.next().text().trim()), 8) : undefined, }; diff --git a/lib/routes/x-mol/templates/description.art b/lib/routes/x-mol/templates/description.art deleted file mode 100644 index e18d50115472..000000000000 --- a/lib/routes/x-mol/templates/description.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ if image }} -
    -{{ /if }} -{{ if text }} -

    {{ text }}

    -{{ /if }} diff --git a/lib/routes/x410/news.ts b/lib/routes/x410/news.ts index 0b81a9f8d310..457377d79ceb 100644 --- a/lib/routes/x410/news.ts +++ b/lib/routes/x410/news.ts @@ -1,5 +1,3 @@ -import path from 'node:path'; - import type { Cheerio, CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; import type { Element } from 'domhandler'; @@ -10,7 +8,8 @@ import { ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; + +import { renderDescription } from './templates/description'; export const handler = async (ctx: Context): Promise => { const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); @@ -32,7 +31,7 @@ export const handler = async (ctx: Context): Promise => { const $aEl: Cheerio = $el.find('h4 a'); const title: string = $aEl.text(); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ description: $el.find('div#cookbook').html(), }); const pubDateStr: string | undefined = $el.find('span.updated').text(); @@ -81,7 +80,7 @@ export const handler = async (ctx: Context): Promise => { }); const title: string = $$('.title').text(); - const description: string | undefined = art(path.join(__dirname, 'templates/description.art'), { + const description: string | undefined = renderDescription({ description: $$('div#cookbook').html(), }); const pubDateStr: string | undefined = $$('meta[property="article:published_time"]').attr('content'); diff --git a/lib/routes/x410/templates/description.art b/lib/routes/x410/templates/description.art deleted file mode 100644 index dfab19230c11..000000000000 --- a/lib/routes/x410/templates/description.art +++ /dev/null @@ -1,17 +0,0 @@ -{{ if images }} - {{ each images image }} - {{ if image?.src }} -
    - {{ image.alt }} -
    - {{ /if }} - {{ /each }} -{{ /if }} - -{{ if description }} - {{@ description }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/x410/templates/description.tsx b/lib/routes/x410/templates/description.tsx new file mode 100644 index 000000000000..590c3f4542fa --- /dev/null +++ b/lib/routes/x410/templates/description.tsx @@ -0,0 +1,26 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type Image = { + src?: string; + alt?: string; +}; + +type DescriptionData = { + images?: Image[]; + description?: string; +}; + +export const renderDescription = ({ images, description }: DescriptionData): string => + renderToString( + <> + {images?.map((image) => + image?.src ? ( +
    + {image.alt} +
    + ) : null + )} + {description ? raw(description) : null} + + ); diff --git a/lib/routes/xiaomiyoupin/crowdfunding.ts b/lib/routes/xiaomiyoupin/crowdfunding.ts index 54178e4fb7e5..ae5f4dbc4c72 100644 --- a/lib/routes/xiaomiyoupin/crowdfunding.ts +++ b/lib/routes/xiaomiyoupin/crowdfunding.ts @@ -1,8 +1,7 @@ -import path from 'node:path'; - import type { Route } from '@/types'; import got from '@/utils/got'; -import { art } from '@/utils/render'; + +import { renderGoods } from './templates/goods'; const base_url = 'https://m.xiaomiyoupin.com'; export const route: Route = { @@ -55,7 +54,7 @@ async function handler() { return { title: goods.name, guid: `xiaomiyoupin:${goods.gid}`, - description: art(path.join(__dirname, 'templates/goods.art'), goods), + description: renderGoods(goods), link: goods.jump_url, pubDate: new Date(goods.fist_release_time * 1000).toUTCString(), }; diff --git a/lib/routes/xiaomiyoupin/templates/goods.art b/lib/routes/xiaomiyoupin/templates/goods.art deleted file mode 100644 index f19b082e0b4b..000000000000 --- a/lib/routes/xiaomiyoupin/templates/goods.art +++ /dev/null @@ -1,27 +0,0 @@ -
    - {{ alt }} - {{ if videos_url }} - - {{/if}} - - {{ if name }} -
    -
    {{@ name }}
    -
    {{@ summary }}
    -
    原始价格:{{@ market_price / 100 }}元
    -
    实际价格:{{@ (price_min || flash_price) / 100 }}元
    -
    - {{/if}} - -
    diff --git a/lib/routes/xiaomiyoupin/templates/goods.tsx b/lib/routes/xiaomiyoupin/templates/goods.tsx new file mode 100644 index 000000000000..fa183d670299 --- /dev/null +++ b/lib/routes/xiaomiyoupin/templates/goods.tsx @@ -0,0 +1,54 @@ +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; + +type Goods = { + pic_url?: string; + img_square?: string; + imgs?: { img800?: string }; + alt?: string; + videos_url?: string[]; + name?: string; + summary?: string; + market_price?: number; + price_min?: number; + flash_price?: number; +}; + +const GoodsFigure = (goods: Goods) => { + const imageUrl = goods.pic_url || goods.img_square || goods.imgs?.img800; + const marketPrice = goods.market_price ? goods.market_price / 100 : undefined; + const salePrice = goods.price_min ?? goods.flash_price; + const finalPrice = salePrice ? salePrice / 100 : undefined; + + return ( +
    + {goods.alt} + {goods.videos_url ? ( + + ) : null} + {goods.name ? ( +
    +
    {raw(goods.name)}
    +
    {raw(goods.summary ?? '')}
    +
    原始价格:{marketPrice}元
    +
    实际价格:{finalPrice}元
    +
    + ) : null} +
    + ); +}; + +export const renderGoods = (goods: Goods): string => renderToString(); diff --git a/lib/routes/xiaomiyoupin/utils.ts b/lib/routes/xiaomiyoupin/utils.ts index 903f45abf638..79a5e399b40a 100644 --- a/lib/routes/xiaomiyoupin/utils.ts +++ b/lib/routes/xiaomiyoupin/utils.ts @@ -1,6 +1,4 @@ -import path from 'node:path'; - -import { art } from '@/utils/render'; +import { renderGoods } from './templates/goods'; const parseModule = (floors, module_key) => floors.find((floor) => floor.module_key === module_key); @@ -11,7 +9,7 @@ const parseFloorItem = (floor) => title: i.name, link: i.jump_url, guid: `xiaomiyoupin:${i.gid}`, - description: art(path.join(__dirname, 'templates/goods.art'), i), + description: renderGoods(i), pubDate: (i.start || i.start_time) * 1000, }; }); diff --git a/lib/routes/xinpianchang/templates/description.art b/lib/routes/xinpianchang/templates/description.art deleted file mode 100644 index 3a8645dbadd0..000000000000 --- a/lib/routes/xinpianchang/templates/description.art +++ /dev/null @@ -1,13 +0,0 @@ -{{ if content }} -

    {{ content }}

    -{{ /if }} - -{{ if enclousure }} - -{{ /if }} \ No newline at end of file diff --git a/lib/routes/xinpianchang/util.ts b/lib/routes/xinpianchang/util.tsx similarity index 87% rename from lib/routes/xinpianchang/util.ts rename to lib/routes/xinpianchang/util.tsx index 894b9d68e300..4e568cc01274 100644 --- a/lib/routes/xinpianchang/util.ts +++ b/lib/routes/xinpianchang/util.tsx @@ -1,10 +1,8 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; const appKey = '61a2f329348b3bf77'; @@ -12,6 +10,18 @@ const domain = 'xinpianchang.com'; const rootUrl = `https://www.${domain}`; const rootApiUrl = `https://mod-api.${domain}`; +const renderDescription = (content, cover, enclousure) => + renderToString( + <> + {content ?

    {content}

    : null} + {enclousure ? ( + + ) : null} + + ); + /** * Retrieves information from a given URL using a provided tryGet function. * @@ -81,11 +91,7 @@ const processItems = async (items, tryGet) => { const enclousure = data.resource?.progressive ? data.resource.progressive[0] : undefined; item.title = data.title ?? item.title; - item.description = art(path.join(__dirname, 'templates/description.art'), { - content: item.description, - cover: data.cover ?? item.itunes_item_image, - enclousure, - }); + item.description = renderDescription(item.description, data.cover ?? item.itunes_item_image, enclousure); item.author = data.owner.username ?? item.author; item.category = [...new Set([...item.category, ...(data.categories ?? []), ...(data.keywords ?? [])])]; diff --git a/lib/routes/xjtu/job.ts b/lib/routes/xjtu/job.tsx similarity index 87% rename from lib/routes/xjtu/job.ts rename to lib/routes/xjtu/job.tsx index 0e64986f87c6..99e7e13e9088 100644 --- a/lib/routes/xjtu/job.ts +++ b/lib/routes/xjtu/job.tsx @@ -1,10 +1,9 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; const baseUrl = 'https://job.xjtu.edu.cn'; @@ -87,9 +86,7 @@ async function handler(ctx) { rejectUnauthorized: false, }, }); - attachments = art(path.join(__dirname, 'templates/attachments.art'), { - items: attachmentData.data.items, - }); + attachments = renderToString(); } item.author = response.data.data[0].CZZXM; @@ -105,3 +102,16 @@ async function handler(ctx) { item: items, }; } + +const XjtuAttachments = ({ items }: { items: { fileUrl: string; name: string }[] }) => ( + <> + {items.map((item) => ( + <> + + {item.name} + +
    + + ))} + +); diff --git a/lib/routes/xjtu/std.ts b/lib/routes/xjtu/std.tsx similarity index 80% rename from lib/routes/xjtu/std.ts rename to lib/routes/xjtu/std.tsx index 74f3bb3a3e99..994bcc1e2cf1 100644 --- a/lib/routes/xjtu/std.ts +++ b/lib/routes/xjtu/std.tsx @@ -1,12 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -64,10 +63,7 @@ async function handler(ctx) { const content = load(detailResponse.data); - item.description = art(path.join(__dirname, 'templates/std.art'), { - description: content('#vsb_newscontent').html(), - attachments: content('#vsb_newscontent').parent().next().next().next().html(), - }); + item.description = renderToString(); item.pubDate = timezone(parseDate(content('#vsb_newscontent').parent().prev().prev().text().split(' ')[0], 'YYYY年MM月DD日 HH:mm'), +8); return item; @@ -81,3 +77,10 @@ async function handler(ctx) { item: items, }; } + +const XjtuStdDescription = ({ description, attachments }: { description?: string; attachments?: string }) => ( + <> + {description ? raw(description) : null} + {attachments ? raw(attachments) : null} + +); diff --git a/lib/routes/xjtu/templates/attachments.art b/lib/routes/xjtu/templates/attachments.art deleted file mode 100644 index 8211878e9222..000000000000 --- a/lib/routes/xjtu/templates/attachments.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ each items }} -{{ $value.name }}
    -{{ /each }} diff --git a/lib/routes/xjtu/templates/std.art b/lib/routes/xjtu/templates/std.art deleted file mode 100644 index 1e4e0a5f7f7e..000000000000 --- a/lib/routes/xjtu/templates/std.art +++ /dev/null @@ -1,4 +0,0 @@ -{{@ description }} -{{ if attachments }} -{{@ attachments }} -{{ /if }} \ No newline at end of file diff --git a/lib/routes/xkb/index.ts b/lib/routes/xkb/index.tsx similarity index 86% rename from lib/routes/xkb/index.ts rename to lib/routes/xkb/index.tsx index 653aebffd746..0d41be767ffc 100644 --- a/lib/routes/xkb/index.ts +++ b/lib/routes/xkb/index.tsx @@ -1,10 +1,9 @@ -import path from 'node:path'; +import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; import timezone from '@/utils/timezone'; export const route: Route = { @@ -50,9 +49,16 @@ async function handler(ctx) { .filter((i) => i.contentUrl) // Remove "专题报道" (special report) .map((item) => ({ title: item.listTitle, - description: art(path.join(__dirname, 'templates/description.art'), { - thumb: item.shareImg, - }), + description: renderToString( + <> + {item.shareImg ? ( + <> + +
    + + ) : null} + + ), pubDate: timezone(parseDate(item.operTime), +8), link: 'https://www.xkb.com.cn/detail?id=' + item.id, contentUrl: item.contentUrl, diff --git a/lib/routes/xkb/templates/description.art b/lib/routes/xkb/templates/description.art deleted file mode 100644 index 2113e70635ad..000000000000 --- a/lib/routes/xkb/templates/description.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ if thumb }} -
    -{{ /if }} \ No newline at end of file diff --git a/lib/routes/xueqiu/stock-comments.ts b/lib/routes/xueqiu/stock-comments.tsx similarity index 69% rename from lib/routes/xueqiu/stock-comments.ts rename to lib/routes/xueqiu/stock-comments.tsx index 9bcdf1fed9ab..031b253e17c3 100644 --- a/lib/routes/xueqiu/stock-comments.ts +++ b/lib/routes/xueqiu/stock-comments.tsx @@ -1,13 +1,12 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { raw } from 'hono/html'; +import { renderToString } from 'hono/jsx/dom/server'; import sanitizeHtml from 'sanitize-html'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/stock_comments/:id', @@ -60,7 +59,25 @@ async function handler(ctx) { if (item.quote_cards) { link = item.quote_cards[0].target_url; } - const description = art(path.join(__dirname, 'templates/comments_description.art'), { item }); + const description = renderToString( + <> + +
    {item.user.screen_name}:
    +
    +
    + {item.text ? raw(item.text) : null} +
    + {item.retweeted_status ? ( + <> +
    + {raw(item.retweeted_status.text)} + + ) : ( +
    + )} +
    ----来源于:{item.source}
    + + ); return { title: item.title || sanitizeHtml(item.text, { allowedTags: [], allowedAttributes: {} }), description, diff --git a/lib/routes/xueqiu/templates/comments_description.art b/lib/routes/xueqiu/templates/comments_description.art deleted file mode 100644 index 69352716c3f6..000000000000 --- a/lib/routes/xueqiu/templates/comments_description.art +++ /dev/null @@ -1,10 +0,0 @@ -
    {{ item.user.screen_name }}:
    -
    -{{@ item.text }} -
    -{{ if item.retweeted_status }} -
    {{@ item.retweeted_status.text }} -{{ else }} -
    -{{ /if }} -
    ----来源于:{{ item.source }}
    diff --git a/lib/routes/xys/new.ts b/lib/routes/xys/new.tsx similarity index 86% rename from lib/routes/xys/new.ts rename to lib/routes/xys/new.tsx index 51816aee3b2c..921714e76537 100644 --- a/lib/routes/xys/new.ts +++ b/lib/routes/xys/new.tsx @@ -1,13 +1,11 @@ -import path from 'node:path'; - import { load } from 'cheerio'; +import { renderToString } from 'hono/jsx/dom/server'; import iconv from 'iconv-lite'; import type { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; export const route: Route = { path: '/new', @@ -73,7 +71,7 @@ async function handler(ctx) { const matchYoutube = item.link.match(youTube); if (matchYoutube) { - item.description = art(path.join(__dirname, 'templates/desc.art'), { youTube: item.link.slice(32) }); + item.description = renderDescription(item.link.slice(32)); } else { const detailResponse = await got({ method: 'get', @@ -100,3 +98,6 @@ async function handler(ctx) { item: items, }; } + +const renderDescription = (youTube: string): string => + renderToString(<>{youTube ? : null}); diff --git a/lib/routes/xys/templates/desc.art b/lib/routes/xys/templates/desc.art deleted file mode 100644 index eef799519a63..000000000000 --- a/lib/routes/xys/templates/desc.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ if youTube }} - -{{ /if }} diff --git a/lib/routes/xyzrank/index.ts b/lib/routes/xyzrank/index.ts deleted file mode 100644 index 117823fbd48e..000000000000 --- a/lib/routes/xyzrank/index.ts +++ /dev/null @@ -1,128 +0,0 @@ -import path from 'node:path'; - -import { load } from 'cheerio'; - -import type { Route } from '@/types'; -import got from '@/utils/got'; -import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; - -export const route: Route = { - path: '/:category?', - radar: [ - { - source: ['xyzrank.com/'], - target: '', - }, - ], - name: 'Unknown', - maintainers: [], - handler, - url: 'xyzrank.com/', -}; - -async function handler(ctx) { - const category = ctx.req.param('category') ?? ''; - - const rootUrl = 'https://xyzrank.com'; - const currentUrl = `${rootUrl}/#/${category}`; - - let response = await got({ - method: 'get', - url: rootUrl, - }); - - const $ = load(response.data); - - response = await got({ - method: 'get', - url: response.data.match(/` + ) + ), + http.get(`https://mp.weixin.qq.com/rsshub_test/original_source`, () => + HttpResponse.text( + genWeChatMpPage( + `original content`, + ` +var item_show_type = "0"; +var real_item_show_type = "0"; +var appmsg_type = "9"; +var ct = "${1_636_626_300}"; +var msg_source_url = "https://mp.weixin.qq.com/rsshub_test/fake";` + ) + ) + ), + http.get(`https://mp.weixin.qq.com/rsshub_test/original_long`, () => + HttpResponse.text( + genWeChatMpPage( + 'long-content-'.repeat(10), + ` +var item_show_type = "0"; +var real_item_show_type = "0"; +var appmsg_type = "9"; +var ct = "${1_636_626_300}"; +var msg_source_url = "https://mp.weixin.qq.com/rsshub_test/fake";` + ) + ) + ), http.get(`https://mp.weixin.qq.com/rsshub_test/img`, () => HttpResponse.text( genWeChatMpPage('fake_description', [ diff --git a/lib/utils/cache.test.ts b/lib/utils/cache.test.ts index 204457d252d4..877e031647d1 100644 --- a/lib/utils/cache.test.ts +++ b/lib/utils/cache.test.ts @@ -34,6 +34,11 @@ describe('cache', () => { expect(await cache.globalCache.get('mock')).toBe('{"mock":1}'); }, 10000); + it('memory get returns null before init', async () => { + const memory = (await import('@/utils/cache/memory')).default; + expect(await memory.get('missing')).toBeNull(); + }); + it('redis', async () => { process.env.CACHE_TYPE = 'redis'; const cache = (await import('@/utils/cache')).default; @@ -67,14 +72,17 @@ describe('cache', () => { const cache = (await import('@/utils/cache')).default; await cache.set('mock2', '2'); expect(await cache.get('mock2')).toBe(null); - await cache.clients.redisClient?.quit(); + cache.clients.redisClient?.disconnect(); }); it('no cache', async () => { process.env.CACHE_TYPE = 'NO'; const cache = (await import('@/utils/cache')).default; + await cache.init(); await cache.set('mock2', '2'); expect(await cache.get('mock2')).toBe(null); + expect(await cache.globalCache.get('mock2')).toBeNull(); + expect(cache.globalCache.set('mock2', '2')).toBeNull(); }); it('throws TTL key', async () => { diff --git a/lib/utils/cache/redis.test.ts b/lib/utils/cache/redis.test.ts new file mode 100644 index 000000000000..9e34e832ea29 --- /dev/null +++ b/lib/utils/cache/redis.test.ts @@ -0,0 +1,69 @@ +import { describe, expect, it, vi } from 'vitest'; + +const errorSpy = vi.fn(); +const infoSpy = vi.fn(); + +vi.mock('@/utils/logger', () => ({ + default: { + error: errorSpy, + info: infoSpy, + }, +})); + +class RedisMock extends EventTarget { + mget = vi.fn(); + expire = vi.fn(); + set = vi.fn(); + + on(event: string, listener: (...args: any[]) => void) { + this.addEventListener(event, (evt) => { + listener((evt as Event & { detail?: unknown }).detail); + }); + return this; + } + + emit(event: string, detail?: unknown) { + const evt = new Event(event) as Event & { detail?: unknown }; + evt.detail = detail; + this.dispatchEvent(evt); + return true; + } +} + +vi.mock('ioredis', () => ({ + default: RedisMock, +})); + +describe('redis cache module', () => { + it('throws on reserved cache ttl key', async () => { + const redisCache = (await import('@/utils/cache/redis')).default; + redisCache.status.available = true; + redisCache.clients.redisClient = new RedisMock() as any; + + await expect(redisCache.get('rsshub:cacheTtl:bad')).rejects.toThrow('reserved for the internal usage'); + }); + + it('expires cache ttl key when present', async () => { + const redisCache = (await import('@/utils/cache/redis')).default; + const client = new RedisMock() as any; + client.mget.mockResolvedValue(['value', '30']); + redisCache.status.available = true; + redisCache.clients.redisClient = client; + + const value = await redisCache.get('mock', true); + expect(value).toBe('value'); + expect(client.expire).toHaveBeenCalledWith('rsshub:cacheTtl:mock', '30'); + expect(client.expire).toHaveBeenCalledWith('mock', '30'); + }); + + it('marks redis unavailable on error', async () => { + const redisCache = (await import('@/utils/cache/redis')).default; + redisCache.init(); + const client = redisCache.clients.redisClient as RedisMock; + + client.emit('error', new Error('boom')); + + expect(redisCache.status.available).toBe(false); + expect(errorSpy).toHaveBeenCalled(); + }); +}); diff --git a/lib/utils/common-config.charset.test.ts b/lib/utils/common-config.charset.test.ts new file mode 100644 index 000000000000..29b02d9b2fa7 --- /dev/null +++ b/lib/utils/common-config.charset.test.ts @@ -0,0 +1,49 @@ +import { describe, expect, it, vi } from 'vitest'; + +const html = `
    +
      +
    • + 1 +
      RSSHub1
      +
      2025-01-01
      +
    • +
    +
    `; + +const rawSpy = vi.fn(() => + Promise.resolve({ + headers: new Headers({ + 'content-type': 'text/html; charset=gbk', + }), + _data: html, + }) +); +const ofetchSpy = vi.fn(() => Promise.resolve(Buffer.from(html))); + +vi.mock('@/utils/ofetch', () => ({ + default: Object.assign(ofetchSpy, { raw: rawSpy }), +})); + +describe('common-config charset', () => { + it('parses charset from content-type', async () => { + const buildData = (await import('@/utils/common-config')).default; + const data = await buildData({ + link: 'http://rsshub.test/buildData', + url: 'http://rsshub.test/buildData', + title: `%title%`, + params: { + title: 'buildData', + }, + item: { + item: '.content li', + title: `$('a').text() + ' - %title%'`, + link: `$('a').attr('href')`, + description: `$('.description').html()`, + pubDate: `timezone(parseDate($('.date').text(), 'YYYY-MM-DD'), 0)`, + }, + }); + + expect(data.title).toBe('buildData'); + expect(data.item[0].title).toBe('1 - buildData'); + }); +}); diff --git a/lib/utils/common-utils.test.ts b/lib/utils/common-utils.test.ts index d496b190831c..26a982ac9334 100644 --- a/lib/utils/common-utils.test.ts +++ b/lib/utils/common-utils.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; -import { collapseWhitespace, convertDateToISO8601, getLocalhostAddress, toTitleCase } from '@/utils/common-utils'; +import { collapseWhitespace, convertDateToISO8601, getLocalhostAddress, getSubPath, toTitleCase } from '@/utils/common-utils'; describe('common-utils', () => { it('toTitleCase', () => { @@ -39,4 +39,9 @@ describe('common-utils', () => { it('getLocalhostAddress', () => { expect(getLocalhostAddress()).toBeInstanceOf(Array); }); + + it('getSubPath', () => { + expect(getSubPath({ req: { path: '/test/abc' } })).toBe('/abc'); + expect(getSubPath({ req: { path: '/test' } })).toBe('/'); + }); }); diff --git a/lib/utils/directory-import.test.ts b/lib/utils/directory-import.test.ts new file mode 100644 index 000000000000..d08ec0cc2626 --- /dev/null +++ b/lib/utils/directory-import.test.ts @@ -0,0 +1,68 @@ +import fs from 'node:fs'; +import os from 'node:os'; +import path from 'node:path'; + +import { afterEach, describe, expect, it } from 'vitest'; + +import { directoryImport } from '@/utils/directory-import'; + +const createTempDir = () => fs.mkdtempSync(path.join(os.tmpdir(), 'rsshub-dir-import-')); + +const writeFile = (filePath: string, content: string) => { + fs.mkdirSync(path.dirname(filePath), { recursive: true }); + fs.writeFileSync(filePath, content, 'utf8'); +}; + +describe('directory-import', () => { + let tempDir = ''; + + afterEach(() => { + if (tempDir) { + fs.rmSync(tempDir, { recursive: true, force: true }); + tempDir = ''; + } + }); + + it('imports valid files and skips invalid ones', () => { + tempDir = createTempDir(); + const rootModule = path.join(tempDir, 'valid.cjs'); + const jsonModule = path.join(tempDir, 'data.json'); + const ignoredText = path.join(tempDir, 'note.txt'); + const declaration = path.join(tempDir, 'types.d.ts'); + const nestedModule = path.join(tempDir, 'sub', 'child.cjs'); + + writeFile(rootModule, "module.exports = { value: 'root' };"); + writeFile(jsonModule, JSON.stringify({ value: 'json' })); + writeFile(ignoredText, 'ignore'); + writeFile(declaration, 'export {};'); + writeFile(nestedModule, "module.exports = { value: 'child' };"); + + const modules = directoryImport({ targetDirectoryPath: tempDir }); + const keyFor = (filePath: string) => filePath.slice(tempDir.length); + + expect(modules).toHaveProperty(keyFor(rootModule)); + expect(modules).toHaveProperty(keyFor(jsonModule)); + expect(modules).toHaveProperty(keyFor(nestedModule)); + expect(modules).not.toHaveProperty(keyFor(ignoredText)); + expect(modules).not.toHaveProperty(keyFor(declaration)); + }); + + it('can skip subdirectories and apply patterns', () => { + tempDir = createTempDir(); + const rootModule = path.join(tempDir, 'keep.cjs'); + const nestedModule = path.join(tempDir, 'sub', 'skip.cjs'); + + writeFile(rootModule, "module.exports = { value: 'keep' };"); + writeFile(nestedModule, "module.exports = { value: 'skip' };"); + + const modules = directoryImport({ + targetDirectoryPath: tempDir, + includeSubdirectories: false, + importPattern: /keep/, + }); + const keyFor = (filePath: string) => filePath.slice(tempDir.length); + + expect(modules).toHaveProperty(keyFor(rootModule)); + expect(modules).not.toHaveProperty(keyFor(nestedModule)); + }); +}); diff --git a/lib/utils/git-hash.test.ts b/lib/utils/git-hash.test.ts new file mode 100644 index 000000000000..02a5a4306842 --- /dev/null +++ b/lib/utils/git-hash.test.ts @@ -0,0 +1,39 @@ +import { afterEach, describe, expect, it, vi } from 'vitest'; + +const originalEnv = { + HEROKU_SLUG_COMMIT: process.env.HEROKU_SLUG_COMMIT, + VERCEL_GIT_COMMIT_SHA: process.env.VERCEL_GIT_COMMIT_SHA, +}; + +afterEach(() => { + vi.resetModules(); + vi.clearAllMocks(); + vi.unmock('node:child_process'); + + if (originalEnv.HEROKU_SLUG_COMMIT === undefined) { + delete process.env.HEROKU_SLUG_COMMIT; + } else { + process.env.HEROKU_SLUG_COMMIT = originalEnv.HEROKU_SLUG_COMMIT; + } + if (originalEnv.VERCEL_GIT_COMMIT_SHA === undefined) { + delete process.env.VERCEL_GIT_COMMIT_SHA; + } else { + process.env.VERCEL_GIT_COMMIT_SHA = originalEnv.VERCEL_GIT_COMMIT_SHA; + } +}); + +describe('git-hash', () => { + it('falls back to unknown when git commands fail', async () => { + delete process.env.HEROKU_SLUG_COMMIT; + delete process.env.VERCEL_GIT_COMMIT_SHA; + + vi.doMock('node:child_process', () => ({ + execSync: () => { + throw new Error('git failure'); + }, + })); + + const { gitHash } = await import('@/utils/git-hash'); + expect(gitHash).toBe('unknown'); + }); +}); diff --git a/lib/utils/got-deprecated.ts b/lib/utils/got-deprecated.ts deleted file mode 100644 index 7d8fc55d919c..000000000000 --- a/lib/utils/got-deprecated.ts +++ /dev/null @@ -1,81 +0,0 @@ -import type { CancelableRequest, Got, Options, OptionsInit, Response as GotResponse } from 'got'; -import got from 'got'; - -import { config } from '@/config'; -import logger from '@/utils/logger'; - -type Response = GotResponse & { - data: T; - status: number; -}; - -type GotRequestFunction = { - (url: string | URL, options?: Options): CancelableRequest>>; - (url: string | URL, options?: Options): CancelableRequest>; - (options: Options): CancelableRequest>>; - (options: Options): CancelableRequest>; -}; - -// @ts-expect-error got instance with custom response type -const custom: { - all?: (list: Array>) => Promise>; - get: GotRequestFunction; - post: GotRequestFunction; - put: GotRequestFunction; - patch: GotRequestFunction; - head: GotRequestFunction; - delete: GotRequestFunction; -} & GotRequestFunction & - Got = got.extend({ - retry: { - limit: config.requestRetry, - statusCodes: [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 421, 422, 423, 424, 426, 428, 429, 431, 451, 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511, 521, 522, 524], - }, - hooks: { - beforeRetry: [ - (err, count) => { - logger.error(`Request ${err.options.url} fail, retry attempt #${count}: ${err}`); - }, - ], - beforeRedirect: [ - (options, response) => { - logger.http(`Redirecting to ${options.url} for ${response.requestUrl}`); - }, - ], - afterResponse: [ - // @ts-expect-error custom response type - (response: Response>) => { - try { - response.data = typeof response.body === 'string' ? JSON.parse(response.body) : response.body; - } catch { - // @ts-expect-error for compatibility - response.data = response.body; - } - response.status = response.statusCode; - return response; - }, - ], - init: [ - ( - options: OptionsInit & { - data?: string; - } - ) => { - // compatible with axios api - if (options && options.data) { - options.body = options.body || options.data; - } - }, - ], - }, - headers: { - 'user-agent': config.ua, - }, - timeout: { - request: config.requestTimeout, - }, -}); -custom.all = (list) => Promise.all(list); - -export default custom; -export type { Options, Response } from 'got'; diff --git a/lib/utils/got.test.ts b/lib/utils/got.test.ts index 4882fea817d3..9f6a891b6f24 100644 --- a/lib/utils/got.test.ts +++ b/lib/utils/got.test.ts @@ -75,4 +75,79 @@ describe('got', () => { expect(data.cookie).toBe('cookie=test; Domain=rsshub.test; Path=/'); }); + + it('runs beforeRequest hooks', async () => { + const hook = vi.fn((options) => { + options.headers = { + ...options.headers, + 'x-before-request': '1', + }; + }); + + const { data } = await got('http://rsshub.test/headers', { + hooks: { + beforeRequest: [hook], + }, + }); + + expect(hook).toHaveBeenCalledTimes(1); + expect(data['x-before-request']).toBe('1'); + }); + + it('appends search params', async () => { + const { default: server } = await import('@/setup.test'); + server.use( + http.get('http://rsshub.test/query', ({ request }) => { + const url = new URL(request.url); + return HttpResponse.json({ + query: Object.fromEntries(url.searchParams.entries()), + }); + }) + ); + + const { data } = await got('http://rsshub.test/query', { + searchParams: { + foo: 'bar', + baz: 'qux', + }, + }); + + expect(data.query).toEqual({ + foo: 'bar', + baz: 'qux', + }); + }); + + it('supports additional http verbs and extend', async () => { + const { default: server } = await import('@/setup.test'); + server.use( + http.all('http://rsshub.test/method', ({ request }) => + HttpResponse.json({ + method: request.method, + }) + ) + ); + + const putResponse = await got.put('http://rsshub.test/method'); + expect(putResponse.data.method).toBe('PUT'); + + const patchResponse = await got.patch('http://rsshub.test/method'); + expect(patchResponse.data.method).toBe('PATCH'); + + const deleteResponse = await got.delete('http://rsshub.test/method'); + expect(deleteResponse.data.method).toBe('DELETE'); + + const headResponse = await got.head('http://rsshub.test/method', { + responseType: 'text', + }); + expect(headResponse).toBeUndefined(); + + const extended = got.extend({ + headers: { + 'x-extended': '1', + }, + }); + const extendedResponse = await extended.get('http://rsshub.test/headers'); + expect(extendedResponse.data['x-extended']).toBe('1'); + }); }); diff --git a/lib/utils/header-generator.mock.test.ts b/lib/utils/header-generator.mock.test.ts new file mode 100644 index 000000000000..ec554191c08e --- /dev/null +++ b/lib/utils/header-generator.mock.test.ts @@ -0,0 +1,50 @@ +import { afterEach, describe, expect, it, vi } from 'vitest'; + +afterEach(() => { + vi.resetModules(); + vi.clearAllMocks(); + vi.unmock('header-generator'); +}); + +describe('header-generator (mocked)', () => { + it('retries invalid safari user agents', async () => { + const headersQueue = [{ 'user-agent': 'Mozilla/5.0 Applebot Safari' }, { 'user-agent': 'Mozilla/5.0 Safari' }]; + + vi.doMock('header-generator', () => ({ + HeaderGenerator: class { + getHeaders() { + return headersQueue.shift() ?? { 'user-agent': 'Mozilla/5.0 Safari' }; + } + }, + PRESETS: { + MODERN_MACOS_CHROME: { mock: true }, + }, + })); + + const { generateHeaders } = await import('@/utils/header-generator'); + const headers = generateHeaders({ preset: 'safari' } as any); + + expect(headers['user-agent']).toContain('Safari'); + expect(headersQueue.length).toBe(0); + }); + + it('accepts firefox user agents', async () => { + const headersQueue = [{ 'user-agent': 'Mozilla/5.0 Firefox' }]; + + vi.doMock('header-generator', () => ({ + HeaderGenerator: class { + getHeaders() { + return headersQueue.shift() ?? { 'user-agent': 'Mozilla/5.0 Firefox' }; + } + }, + PRESETS: { + MODERN_MACOS_CHROME: { mock: true }, + }, + })); + + const { generateHeaders } = await import('@/utils/header-generator'); + const headers = generateHeaders(); + + expect(headers['user-agent']).toContain('Firefox'); + }); +}); diff --git a/lib/utils/helpers.test.ts b/lib/utils/helpers.test.ts index 8a8fd4adbeb4..a92c1fa4b459 100644 --- a/lib/utils/helpers.test.ts +++ b/lib/utils/helpers.test.ts @@ -1,10 +1,16 @@ import { describe, expect, it } from 'vitest'; -import { getRouteNameFromPath, getSearchParamsString, parseDuration } from '@/utils/helpers'; +import { getCurrentPath, getRouteNameFromPath, getSearchParamsString, parseDuration } from '@/utils/helpers'; describe('helpers', () => { it('getRouteNameFromPath', () => { expect(getRouteNameFromPath('/test/1')).toBe('test'); + expect(getRouteNameFromPath('/')).toBeNull(); + }); + + it('getCurrentPath', () => { + const expected = import.meta.dirname; + expect(getCurrentPath(import.meta.url)).toBe(expected); }); it('getSearchParamsString', () => { @@ -24,5 +30,13 @@ describe('helpers', () => { expect(parseDuration('01:01')).toBe(61); expect(parseDuration('00:01')).toBe(1); expect(parseDuration('59')).toBe(59); + expect(parseDuration(null)).toBeUndefined(); + expect(parseDuration('1:xx')).toBe(60); + const invalid: any = { + trim: () => ({ + replaceAll: () => 'NaN:1', + }), + }; + expect(() => parseDuration(invalid)).toThrow('Invalid segment'); }); }); diff --git a/lib/utils/logger.test.ts b/lib/utils/logger.test.ts new file mode 100644 index 000000000000..2f4045679f2c --- /dev/null +++ b/lib/utils/logger.test.ts @@ -0,0 +1,27 @@ +import { describe, expect, it, vi } from 'vitest'; + +describe('logger', () => { + it('formats console transport output', async () => { + const originalEnv = process.env.NODE_ENV; + process.env.NODE_ENV = 'development'; + process.env.SHOW_LOGGER_TIMESTAMP = 'true'; + + vi.resetModules(); + const logger = (await import('@/utils/logger')).default; + const consoleTransport = logger.transports.find((transport) => transport.constructor.name === 'Console') as any; + const format = consoleTransport?.format; + + const info = { + level: 'info', + message: 'hello', + timestamp: '2024-01-01 00:00:00.000', + }; + const transformed = format?.transform ? format.transform(info) : info; + + expect(transformed).toBeDefined(); + expect(transformed.message).toBe('hello'); + + process.env.NODE_ENV = originalEnv; + delete process.env.SHOW_LOGGER_TIMESTAMP; + }); +}); diff --git a/lib/utils/ofetch.test.ts b/lib/utils/ofetch.test.ts index 7b52c2752f80..bbd5e0eba085 100644 --- a/lib/utils/ofetch.test.ts +++ b/lib/utils/ofetch.test.ts @@ -1,52 +1,66 @@ -import { http, HttpResponse } from 'msw'; -import { describe, expect, it, vi } from 'vitest'; +import http from 'node:http'; -import { config } from '@/config'; -import ofetch from '@/utils/ofetch'; +import { http as mswHttp, HttpResponse } from 'msw'; +import { afterEach, describe, expect, it, vi } from 'vitest'; -describe('ofetch', () => { - it('headers', async () => { - const data = await ofetch('http://rsshub.test/headers'); - expect(data['user-agent']).toBeUndefined(); - }); +const loadOfetchWithLogger = async () => { + vi.resetModules(); + const { default: logger } = await import('@/utils/logger'); + const { default: ofetch } = await import('@/utils/ofetch'); + return { logger, ofetch }; +}; - it('retry', async () => { - const requestRun = vi.fn(); +afterEach(() => { + vi.restoreAllMocks(); + vi.unstubAllGlobals(); +}); + +describe('ofetch', () => { + it('marks prefer-proxy header on retryable responses', async () => { const { default: server } = await import('@/setup.test'); - server.use( - http.get(`http://rsshub.test/retry-test`, () => { - requestRun(); - return HttpResponse.error(); - }) - ); + server.use(mswHttp.get('http://rsshub.test/fail-500', () => HttpResponse.text('fail', { status: 500 }))); - try { - await ofetch('http://rsshub.test/retry-test'); - } catch (error: any) { - expect(error.name).toBe('FetchError'); - } + const { logger, ofetch } = await loadOfetchWithLogger(); + const warnSpy = vi.spyOn(logger, 'warn').mockImplementation(() => logger); - // retries - expect(requestRun).toHaveBeenCalledTimes(config.requestRetry + 1); - }); + await expect( + ofetch('http://rsshub.test/fail-500', { + retry: 1, + retryDelay: 0, + onResponse({ options }) { + options.headers = null as unknown as Headers; + }, + }) + ).rejects.toBeDefined(); - it('form-post', async () => { - const body = new FormData(); - body.append('test', 'rsshub'); - const response = await ofetch('http://rsshub.test/form-post', { - method: 'POST', - body, - }); - expect(response.test).toBe('rsshub'); + expect(warnSpy).toHaveBeenCalled(); }); - it('json-post', async () => { - const response = await ofetch('http://rsshub.test/json-post', { - method: 'POST', - body: { - test: 'rsshub', - }, + it('logs redirected responses', async () => { + const { logger, ofetch } = await loadOfetchWithLogger(); + const httpSpy = vi.spyOn(logger, 'http').mockImplementation(() => logger); + + const server = http.createServer((req, res) => { + if (req.url === '/redirect') { + res.statusCode = 302; + res.setHeader('Location', '/target'); + res.end(); + return; + } + res.statusCode = 200; + res.end('ok'); }); - expect(response.test).toBe('rsshub'); + + await new Promise((resolve) => server.listen(0, resolve)); + const address = server.address(); + const port = typeof address === 'object' && address ? address.port : 0; + + try { + await ofetch(`http://127.0.0.1:${port}/redirect`); + } finally { + server.close(); + } + + expect(httpSpy).toHaveBeenCalled(); }); }); diff --git a/lib/utils/otel/metric.test.ts b/lib/utils/otel/metric.test.ts new file mode 100644 index 000000000000..719bea628b31 --- /dev/null +++ b/lib/utils/otel/metric.test.ts @@ -0,0 +1,23 @@ +import { describe, expect, it } from 'vitest'; + +import { getContext, requestMetric } from '@/utils/otel/metric'; + +describe('otel metrics', () => { + it('serializes prometheus metrics', async () => { + requestMetric.success(150, { + method: 'GET', + path: '/test', + status: 200, + }); + requestMetric.error({ + method: 'GET', + path: '/test', + status: 500, + }); + + const output = await getContext(); + + expect(output).toContain('rsshub_request_total'); + expect(output).toContain('rsshub_request_error_total'); + }); +}); diff --git a/lib/utils/proxy/index.test.ts b/lib/utils/proxy/index.test.ts new file mode 100644 index 000000000000..1bc918f0abf3 --- /dev/null +++ b/lib/utils/proxy/index.test.ts @@ -0,0 +1,89 @@ +import { PacProxyAgent } from 'pac-proxy-agent'; +import { SocksProxyAgent } from 'socks-proxy-agent'; +import { ProxyAgent } from 'undici'; +import { afterEach, describe, expect, it, vi } from 'vitest'; + +const loadProxy = async (env: Record) => { + vi.resetModules(); + for (const [key, value] of Object.entries(env)) { + vi.stubEnv(key, value); + } + return (await import('@/utils/proxy')).default; +}; + +describe('proxy', () => { + afterEach(() => { + vi.clearAllTimers(); + vi.useRealTimers(); + vi.unstubAllEnvs(); + }); + + it('uses PAC proxy when PAC_URI is set', async () => { + const proxy = await loadProxy({ + PAC_URI: 'http://example.com/proxy.pac', + PROXY_URIS: '', + PROXY_URI: '', + }); + + expect(proxy.agent).toBeInstanceOf(PacProxyAgent); + expect(proxy.dispatcher).toBeNull(); + expect(proxy.proxyUri).toBe('http://example.com/proxy.pac'); + + const current = proxy.getCurrentProxy(); + expect(current?.uri).toBe('http://example.com/proxy.pac'); + }); + + it('handles multi-proxy selection and updates after failures', async () => { + const proxy = await loadProxy({ + PROXY_URIS: 'http://proxy1.local:8080,http://proxy2.local:8081', + PAC_URI: '', + PROXY_URI: '', + }); + + expect(proxy.multiProxy).toBeDefined(); + const current = proxy.getCurrentProxy(); + expect(current).not.toBeNull(); + expect(proxy.getDispatcherForProxy(current!)).toBeInstanceOf(ProxyAgent); + expect(proxy.getAgentForProxy({ uri: 'socks5://proxy.local:1080' } as any)).toBeInstanceOf(SocksProxyAgent); + + proxy.markProxyFailed(current!.uri); + const next = proxy.getCurrentProxy(); + expect(next).not.toBeNull(); + }); + + it('clears proxy when multi-proxy has no valid entries', async () => { + const proxy = await loadProxy({ + PROXY_URIS: 'http://inv lid.test', + PAC_URI: '', + PROXY_URI: '', + }); + + expect(proxy.getCurrentProxy()).toBeNull(); + proxy.markProxyFailed('http://inv lid.test'); + expect(proxy.agent).toBeNull(); + expect(proxy.dispatcher).toBeNull(); + expect(proxy.proxyUri).toBeUndefined(); + }); + + it('creates a socks proxy agent for single proxy settings', async () => { + const proxy = await loadProxy({ + PROXY_URI: 'socks5://proxy.local:1080', + PROXY_URIS: '', + PAC_URI: '', + }); + + expect(proxy.agent).toBeInstanceOf(SocksProxyAgent); + expect(proxy.dispatcher).toBeNull(); + expect(proxy.getCurrentProxy()?.uri).toBe('socks5://proxy.local:1080'); + }); + + it('returns null agent for unsupported proxy protocol', async () => { + const proxy = await loadProxy({ + PROXY_URI: '', + PROXY_URIS: '', + PAC_URI: '', + }); + + expect(proxy.getAgentForProxy({ uri: 'ftp://proxy.local:21' } as any)).toBeNull(); + }); +}); diff --git a/lib/utils/proxy/multi-proxy.test.ts b/lib/utils/proxy/multi-proxy.test.ts new file mode 100644 index 000000000000..fc618790e17a --- /dev/null +++ b/lib/utils/proxy/multi-proxy.test.ts @@ -0,0 +1,76 @@ +import { describe, expect, it, vi } from 'vitest'; + +import createMultiProxy from '@/utils/proxy/multi-proxy'; + +const baseProxyObj = { + protocol: undefined, + host: undefined, + port: undefined, + auth: undefined, + url_regex: '.*', + strategy: 'all', +}; + +describe('multi-proxy', () => { + it('returns empty results when no valid proxy is provided', () => { + const result = createMultiProxy(['http://inv lid.test'], baseProxyObj); + + expect(result.allProxies).toHaveLength(0); + expect(result.getNextProxy()).toBeNull(); + expect(() => result.resetProxy('http://inv lid.test')).not.toThrow(); + }); + + it('rotates proxies, marks inactive, and reactivates after health checks', () => { + vi.useFakeTimers(); + try { + const result = createMultiProxy(['http://proxy1.local:8080', 'http://proxy2.local:8081'], { + ...baseProxyObj, + healthCheckInterval: 20, + }); + + const first = result.getNextProxy(); + expect(first).not.toBeNull(); + + const firstUri = first!.uri; + const secondUri = result.allProxies.find((proxy) => proxy.uri !== firstUri)!.uri; + + result.markProxyFailed(firstUri); + result.markProxyFailed(firstUri); + result.markProxyFailed(firstUri); + + const firstState = result.allProxies.find((proxy) => proxy.uri === firstUri)!; + expect(firstState.isActive).toBe(false); + + result.markProxyFailed(secondUri); + result.markProxyFailed(secondUri); + result.markProxyFailed(secondUri); + expect(result.getNextProxy()).toBeNull(); + + vi.advanceTimersByTime(45); + expect(firstState.isActive).toBe(true); + + result.resetProxy(firstUri); + expect(firstState.failureCount).toBe(0); + } finally { + vi.clearAllTimers(); + vi.useRealTimers(); + } + }); + + it('returns null when proxies become inactive during selection', () => { + const result = createMultiProxy(['http://proxy1.local:8080', 'http://proxy2.local:8081'], baseProxyObj); + + for (const proxy of result.allProxies) { + let calls = 0; + Object.defineProperty(proxy, 'isActive', { + configurable: true, + get() { + calls += 1; + return calls === 1; + }, + }); + } + + expect(result.getNextProxy()).toBeNull(); + }); +}); diff --git a/lib/utils/proxy/pac-proxy-error.test.ts b/lib/utils/proxy/pac-proxy-error.test.ts new file mode 100644 index 000000000000..51224fe0a7b6 --- /dev/null +++ b/lib/utils/proxy/pac-proxy-error.test.ts @@ -0,0 +1,22 @@ +import { describe, expect, it, vi } from 'vitest'; + +const errorSpy = vi.fn(); +const warnSpy = vi.fn(); +const infoSpy = vi.fn(); + +vi.mock('@/utils/logger', () => ({ + default: { + error: errorSpy, + warn: warnSpy, + info: infoSpy, + }, +})); + +describe('pac-proxy', () => { + it('logs error when PAC_SCRIPT is not a string', async () => { + const pacProxy = (await import('@/utils/proxy/pac-proxy')).default; + pacProxy(undefined, { invalid: true } as any, {}); + + expect(errorSpy).toHaveBeenCalledWith('Invalid PAC_SCRIPT, use PAC_URI instead'); + }); +}); diff --git a/lib/utils/proxy/unify-proxy.test.ts b/lib/utils/proxy/unify-proxy.test.ts index 28b1e92c18b2..88bba8364fdf 100644 --- a/lib/utils/proxy/unify-proxy.test.ts +++ b/lib/utils/proxy/unify-proxy.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; -import unifyProxy from '@/utils/proxy/unify-proxy'; +import unifyProxy, { unifyProxies } from '@/utils/proxy/unify-proxy'; const emptyProxyObj = { protocol: undefined, @@ -139,4 +139,10 @@ describe('unify-proxy', () => { it('proxy-uri user@pass override proxy-obj auth', () => { effectiveExpect(unifyProxy(httpsAuthUri, httpsAuthObj), httpsAuthUri, httpsObj); }); + + it('unifyProxies filters invalid proxy uris', () => { + const results = unifyProxies(['http://rsshub.proxy:2333', 'http://inv lid.test'], emptyProxyObj); + expect(results).toHaveLength(1); + expect(results[0].proxyUri).toBe('http://rsshub.proxy:2333'); + }); }); diff --git a/lib/utils/puppeteer.mock.test.ts b/lib/utils/puppeteer.mock.test.ts new file mode 100644 index 000000000000..713347ff3af0 --- /dev/null +++ b/lib/utils/puppeteer.mock.test.ts @@ -0,0 +1,108 @@ +import { describe, expect, it, vi } from 'vitest'; + +const connect = vi.fn(); +const launch = vi.fn(); + +const page = { + goto: vi.fn(), + authenticate: vi.fn(), +}; + +const browser = { + newPage: vi.fn(() => Promise.resolve(page)), + close: vi.fn(), +}; + +const proxyMock = { + proxyObj: { url_regex: '.*' }, + proxyUrlHandler: new URL('http://proxy.local'), + multiProxy: undefined as any, + getCurrentProxy: vi.fn(), + markProxyFailed: vi.fn(), + getDispatcherForProxy: vi.fn(), +}; + +vi.mock('rebrowser-puppeteer', () => ({ + default: { + connect, + launch, + }, +})); + +vi.mock('@/utils/proxy', () => ({ + default: proxyMock, +})); + +vi.mock('@/utils/logger', () => ({ + default: { + warn: vi.fn(), + debug: vi.fn(), + }, +})); + +const loadPuppeteer = async () => { + vi.resetModules(); + const mod = await import('@/utils/puppeteer'); + return mod.getPuppeteerPage; +}; + +describe('getPuppeteerPage (mocked)', () => { + it('connects via ws endpoint and runs onBeforeLoad', async () => { + connect.mockResolvedValue(browser); + launch.mockResolvedValue(browser); + page.goto.mockResolvedValue(undefined); + page.authenticate.mockResolvedValue(undefined); + browser.close.mockResolvedValue(undefined); + + process.env.PUPPETEER_WS_ENDPOINT = 'ws://localhost:3000/?token=abc'; + proxyMock.getCurrentProxy.mockReturnValue(null); + + const getPuppeteerPage = await loadPuppeteer(); + const onBeforeLoad = vi.fn(); + const result = await getPuppeteerPage('https://example.com', { + noGoto: true, + onBeforeLoad, + }); + + const endpoint = connect.mock.calls[0][0].browserWSEndpoint as string; + expect(endpoint).toContain('launch='); + expect(endpoint).toContain('stealth=true'); + expect(onBeforeLoad).toHaveBeenCalled(); + + await result.destory(); + expect(browser.close).toHaveBeenCalled(); + + delete process.env.PUPPETEER_WS_ENDPOINT; + }); + + it('marks proxy failed when navigation throws with multi-proxy', async () => { + connect.mockResolvedValue(browser); + launch.mockResolvedValue(browser); + page.goto.mockRejectedValueOnce(new Error('fail')); + page.authenticate.mockResolvedValue(undefined); + + const currentProxy = { + uri: 'http://user:pass@proxy.local:8080', + urlHandler: new URL('http://user:pass@proxy.local:8080'), + }; + proxyMock.multiProxy = {}; + proxyMock.getCurrentProxy.mockReturnValue(currentProxy); + + const getPuppeteerPage = await loadPuppeteer(); + await expect(getPuppeteerPage('https://example.com')).rejects.toThrow('fail'); + + expect(proxyMock.markProxyFailed).toHaveBeenCalledWith(currentProxy.uri); + }); + + it('rethrows navigation errors without multi-proxy', async () => { + connect.mockResolvedValue(browser); + launch.mockResolvedValue(browser); + page.goto.mockRejectedValueOnce(new Error('fail')); + + proxyMock.multiProxy = undefined; + proxyMock.getCurrentProxy.mockReturnValue(null); + + const getPuppeteerPage = await loadPuppeteer(); + await expect(getPuppeteerPage('https://example.com')).rejects.toThrow('fail'); + }); +}); diff --git a/lib/utils/readable-social.test.ts b/lib/utils/readable-social.test.ts index 4efc7b445fb0..07759c463d6d 100644 --- a/lib/utils/readable-social.test.ts +++ b/lib/utils/readable-social.test.ts @@ -25,6 +25,12 @@ describe('queryToBoolean', () => { expect(queryToBoolean('0')).toBe(false); expect(queryToBoolean('false')).toBe(false); }); + + test('should handle undefined and array inputs', () => { + expect(queryToBoolean(undefined)).toBeUndefined(); + expect(queryToBoolean([])).toBeUndefined(); + expect(queryToBoolean(['false', 'true'])).toBe(false); + }); }); describe('queryToInteger', () => { @@ -37,6 +43,11 @@ describe('queryToInteger', () => { expect(queryToInteger(null)).toBeNull(); expect(queryToInteger('abc')).toBeNaN(); }); + + test('should handle array inputs', () => { + expect(queryToInteger([])).toBeUndefined(); + expect(queryToInteger(['7'])).toBe(7); + }); }); describe('queryToFloat', () => { @@ -56,6 +67,10 @@ describe('queryToFloat', () => { expect(queryToFloat(['3.14'])).toBe(3.14); }); + test('should handle empty array', () => { + expect(queryToFloat([])).toBeUndefined(); + }); + test('should convert numeric string', () => { expect(queryToFloat('9.8')).toBe(9.8); }); diff --git a/lib/utils/request-rewriter.test.ts b/lib/utils/request-rewriter.test.ts index ab09b3cd106b..0407fbfef8e9 100644 --- a/lib/utils/request-rewriter.test.ts +++ b/lib/utils/request-rewriter.test.ts @@ -1,11 +1,33 @@ import http from 'node:http'; +import https from 'node:https'; import got from 'got'; import undici from 'undici'; -import { describe, expect, it, vi } from 'vitest'; +import { afterAll, afterEach, describe, expect, it, vi } from 'vitest'; import { PRESETS } from '@/utils/header-generator'; +const originalGlobals = { + fetch: globalThis.fetch, + Headers: globalThis.Headers, + FormData: globalThis.FormData, + Request: globalThis.Request, + Response: globalThis.Response, +}; +const originalHttp = { + get: http.get, + request: http.request, +}; +const originalHttps = { + get: https.get, + request: https.request, +}; +const originalEnv = { + PROXY_URI: process.env.PROXY_URI, + PROXY_AUTH: process.env.PROXY_AUTH, + PROXY_URL_REGEX: process.env.PROXY_URL_REGEX, +}; + process.env.PROXY_URI = 'http://rsshub.proxy:2333/'; process.env.PROXY_AUTH = 'rsshubtest'; process.env.PROXY_URL_REGEX = 'headers'; @@ -14,9 +36,52 @@ await import('@/utils/request-rewriter'); const { config } = await import('@/config'); const { default: ofetch } = await import('@/utils/ofetch'); +const createJsonResponse = () => + Response.json( + { ok: true }, + { + headers: { + 'content-type': 'application/json', + }, + } + ); + describe('request-rewriter', () => { + afterAll(() => { + globalThis.fetch = originalGlobals.fetch; + globalThis.Headers = originalGlobals.Headers; + globalThis.FormData = originalGlobals.FormData; + globalThis.Request = originalGlobals.Request; + globalThis.Response = originalGlobals.Response; + + http.get = originalHttp.get; + http.request = originalHttp.request; + https.get = originalHttps.get; + https.request = originalHttps.request; + + if (originalEnv.PROXY_URI === undefined) { + delete process.env.PROXY_URI; + } else { + process.env.PROXY_URI = originalEnv.PROXY_URI; + } + if (originalEnv.PROXY_AUTH === undefined) { + delete process.env.PROXY_AUTH; + } else { + process.env.PROXY_AUTH = originalEnv.PROXY_AUTH; + } + if (originalEnv.PROXY_URL_REGEX === undefined) { + delete process.env.PROXY_URL_REGEX; + } else { + process.env.PROXY_URL_REGEX = originalEnv.PROXY_URL_REGEX; + } + }); + + afterEach(() => { + vi.restoreAllMocks(); + }); + it('fetch', async () => { - const fetchSpy = vi.spyOn(undici, 'fetch'); + const fetchSpy = vi.spyOn(undici, 'fetch').mockImplementation(() => Promise.resolve(createJsonResponse())); try { await (await fetch('http://rsshub.test/headers')).json(); @@ -61,7 +126,7 @@ describe('request-rewriter', () => { }); it('ofetch', async () => { - const fetchSpy = vi.spyOn(undici, 'fetch'); + const fetchSpy = vi.spyOn(undici, 'fetch').mockImplementation(() => Promise.resolve(createJsonResponse())); try { await ofetch('http://rsshub.test/headers', { @@ -110,7 +175,7 @@ describe('request-rewriter', () => { }); it('ofetch custom ua', async () => { - const fetchSpy = vi.spyOn(undici, 'fetch'); + const fetchSpy = vi.spyOn(undici, 'fetch').mockImplementation(() => Promise.resolve(createJsonResponse())); const userAgent = config.trueUA; try { @@ -130,7 +195,7 @@ describe('request-rewriter', () => { }); it('ofetch header preset', async () => { - const fetchSpy = vi.spyOn(undici, 'fetch'); + const fetchSpy = vi.spyOn(undici, 'fetch').mockImplementation(() => Promise.resolve(createJsonResponse())); try { await ofetch('http://rsshub.test/headers', { @@ -199,16 +264,22 @@ describe('request-rewriter', () => { }); it('rate limiter', async () => { - const time = Date.now(); - await Promise.all( - Array.from({ length: 20 }).map(async () => { - try { - await fetch('http://rsshub.test/headers'); - } catch { - // ignore - } - }) - ); - expect(Date.now() - time).toBeGreaterThan(1500); - }); + vi.useFakeTimers(); + const fetchSpy = vi.spyOn(undici, 'fetch').mockImplementation(() => Promise.resolve(createJsonResponse())); + + try { + const { default: wrappedFetch } = await import('@/utils/request-rewriter/fetch'); + const time = Date.now(); + const tasks = Array.from({ length: 20 }).map(() => wrappedFetch('http://rsshub.test/headers')); + + await vi.advanceTimersByTimeAsync(3000); + await Promise.all(tasks); + + expect(fetchSpy).toHaveBeenCalledTimes(20); + expect(Date.now() - time).toBeGreaterThan(1500); + } finally { + vi.useRealTimers(); + fetchSpy.mockRestore(); + } + }, 20000); }); diff --git a/lib/utils/request-rewriter/fetch-retry.test.ts b/lib/utils/request-rewriter/fetch-retry.test.ts new file mode 100644 index 000000000000..fcd8c382a695 --- /dev/null +++ b/lib/utils/request-rewriter/fetch-retry.test.ts @@ -0,0 +1,118 @@ +import undici from 'undici'; +import { afterEach, describe, expect, it, vi } from 'vitest'; + +const buildProxyState = () => [ + { + uri: 'http://proxy1.test', + isActive: true, + failureCount: 0, + urlHandler: new URL('http://proxy1.test'), + }, + { + uri: 'http://proxy2.test', + isActive: true, + failureCount: 0, + urlHandler: new URL('http://proxy2.test'), + }, +]; + +const loadWrappedFetch = async (proxyMock: any) => { + vi.resetModules(); + vi.doMock('@/utils/logger', () => ({ + default: { + debug: vi.fn(), + warn: vi.fn(), + info: vi.fn(), + error: vi.fn(), + http: vi.fn(), + }, + })); + vi.doMock('@/utils/proxy', () => ({ + default: proxyMock, + })); + + return (await import('@/utils/request-rewriter/fetch')).default; +}; + +afterEach(() => { + vi.restoreAllMocks(); + vi.resetModules(); + vi.unmock('@/utils/logger'); + vi.unmock('@/utils/proxy'); +}); + +describe('request-rewriter fetch retry', () => { + it('retries with the next proxy when prefer-proxy header is set', async () => { + const proxies = buildProxyState(); + let index = 0; + const proxyMock = { + proxyObj: { + strategy: 'on_retry', + url_regex: 'example.com', + }, + proxyUrlHandler: null, + multiProxy: { + allProxies: proxies, + }, + getCurrentProxy: vi.fn(() => proxies[index]), + markProxyFailed: vi.fn(() => { + index = 1; + }), + getDispatcherForProxy: vi.fn((proxyState) => ({ + proxy: proxyState.uri, + })), + }; + + const wrappedFetch = await loadWrappedFetch(proxyMock); + const fetchSpy = vi.spyOn(undici, 'fetch'); + fetchSpy.mockRejectedValueOnce(new Error('boom')); + fetchSpy.mockResolvedValueOnce(new Response('ok')); + + const response = await wrappedFetch('http://example.com/resource', { + headers: new Headers({ + 'x-prefer-proxy': '1', + }), + }); + + expect(response).toBeInstanceOf(Response); + expect(fetchSpy).toHaveBeenCalledTimes(2); + expect(proxyMock.markProxyFailed).toHaveBeenCalledWith('http://proxy1.test'); + expect(proxyMock.getDispatcherForProxy).toHaveBeenCalledWith(proxies[1]); + + const requestArg = fetchSpy.mock.calls[0][0] as Request; + expect(requestArg.headers.get('x-prefer-proxy')).toBeNull(); + }); + + it('drops dispatcher when no next proxy is available', async () => { + const proxies = buildProxyState(); + const proxyMock = { + proxyObj: { + strategy: 'on_retry', + url_regex: 'example.com', + }, + proxyUrlHandler: null, + multiProxy: { + allProxies: proxies, + }, + getCurrentProxy: vi.fn(() => proxies[0]), + markProxyFailed: vi.fn(), + getDispatcherForProxy: vi.fn((proxyState) => ({ + proxy: proxyState.uri, + })), + }; + + const wrappedFetch = await loadWrappedFetch(proxyMock); + const fetchSpy = vi.spyOn(undici, 'fetch'); + fetchSpy.mockRejectedValueOnce(new Error('boom')); + fetchSpy.mockResolvedValueOnce(new Response('ok')); + + await wrappedFetch('http://example.com/resource', { + headers: { + 'x-prefer-proxy': '1', + }, + }); + + expect(fetchSpy).toHaveBeenCalledTimes(2); + expect(fetchSpy.mock.calls[1][1]?.dispatcher).toBeUndefined(); + }); +}); diff --git a/lib/utils/request-rewriter/fetch.test.ts b/lib/utils/request-rewriter/fetch.test.ts index f27851bea7bf..7108e80d03c4 100644 --- a/lib/utils/request-rewriter/fetch.test.ts +++ b/lib/utils/request-rewriter/fetch.test.ts @@ -1,5 +1,6 @@ import { getCurrentCell, setCurrentCell } from 'node-network-devtools'; -import { afterEach, beforeEach, describe, expect, test } from 'vitest'; +import undici from 'undici'; +import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; import { useCustomHeader } from './fetch'; @@ -93,3 +94,14 @@ describe('useCustomHeader', () => { expect(req.requestHeaders[headerText]).toBeUndefined(); }); }); + +describe('wrappedFetch', () => { + test('throws when fetch fails without proxy retry', async () => { + const fetchSpy = vi.spyOn(undici, 'fetch').mockRejectedValueOnce(new Error('boom')); + const { default: wrappedFetch } = await import('./fetch'); + + await expect(wrappedFetch('http://example.com')).rejects.toThrow('boom'); + + fetchSpy.mockRestore(); + }); +}); diff --git a/lib/utils/request-rewriter/get.test.ts b/lib/utils/request-rewriter/get.test.ts new file mode 100644 index 000000000000..2326f7408a8d --- /dev/null +++ b/lib/utils/request-rewriter/get.test.ts @@ -0,0 +1,29 @@ +import { describe, expect, it, vi } from 'vitest'; + +import getWrappedGet from '@/utils/request-rewriter/get'; + +describe('request-rewriter get wrapper', () => { + it('passes callback when url and callback are provided', () => { + const origin = vi.fn(() => 'ok'); + const wrapped = getWrappedGet(origin as any); + const callback = vi.fn(); + + const result = wrapped('http://example.com/test', callback); + + expect(result).toBe('ok'); + expect(origin).toHaveBeenCalledTimes(1); + expect(origin.mock.calls[0][2]).toBe(callback); + }); + + it('falls back to origin when url parsing fails', () => { + const origin = vi.fn(() => 'fallback'); + const wrapped = getWrappedGet(origin as any); + const callback = vi.fn(); + const options = { href: 'http://' } as any; + + const result = wrapped(options, callback); + + expect(result).toBe('fallback'); + expect(origin).toHaveBeenCalledWith(options, callback); + }); +}); diff --git a/lib/utils/request-rewriter/index.ts b/lib/utils/request-rewriter/index.ts index 626b4927d98f..2c0f44880cd0 100644 --- a/lib/utils/request-rewriter/index.ts +++ b/lib/utils/request-rewriter/index.ts @@ -7,11 +7,11 @@ import fetch from '@/utils/request-rewriter/fetch'; import getWrappedGet from '@/utils/request-rewriter/get'; Object.defineProperties(globalThis, { - fetch: { value: fetch }, - Headers: { value: Headers }, - FormData: { value: FormData }, - Request: { value: Request }, - Response: { value: Response }, + fetch: { value: fetch, writable: true, configurable: true }, + Headers: { value: Headers, writable: true, configurable: true }, + FormData: { value: FormData, writable: true, configurable: true }, + Request: { value: Request, writable: true, configurable: true }, + Response: { value: Response, writable: true, configurable: true }, }); http.get = getWrappedGet(http.get); diff --git a/lib/utils/timezone.test.ts b/lib/utils/timezone.test.ts index 4efec5bbe080..49b6ce2d0630 100644 --- a/lib/utils/timezone.test.ts +++ b/lib/utils/timezone.test.ts @@ -7,4 +7,9 @@ describe('timezone', () => { const serverTimezone = -new Date().getTimezoneOffset() / 60; expect(timezone(new Date('2024-01-01T01:01:01Z'), serverTimezone - 1).toISOString()).toEqual('2024-01-01T02:01:01.000Z'); }); + + it('timezone with string input', () => { + const serverTimezone = -new Date().getTimezoneOffset() / 60; + expect(timezone('2024-01-01T01:01:01Z', serverTimezone).toISOString()).toEqual('2024-01-01T01:01:01.000Z'); + }); }); diff --git a/lib/utils/wechat-mp.test.ts b/lib/utils/wechat-mp.test.ts index e22cc7bed3a4..fac02bd8f1de 100644 --- a/lib/utils/wechat-mp.test.ts +++ b/lib/utils/wechat-mp.test.ts @@ -135,6 +135,10 @@ describe('wechat-mp', () => { createTime: '1713009660', }); }); + + it('ExtractMetadata.common rethrows unexpected errors', () => { + expect(() => ExtractMetadata.common('not-cheerio' as any)).toThrow(TypeError); + }); it('ExtractMetadata.img', () => { expect(ExtractMetadata.img(load(''))).toStrictEqual({}); @@ -370,6 +374,16 @@ describe('wechat-mp', () => { expect(fetchArticleItem.description).toContain('🔗️ 阅读原文'); }); + it('fetches original article when content is empty', async () => { + const item = await fetchArticle('https://mp.weixin.qq.com/rsshub_test/original_empty'); + expect(item.description).toContain('original content'); + }); + + it('skips original article when content is long', async () => { + const item = await fetchArticle('https://mp.weixin.qq.com/rsshub_test/original_long'); + expect(item.description).toContain('long-content-'); + }); + it('fetchArticle_&_finishArticleItem_img', async () => { const fetchArticleItem = await testFetchArticleFinishArticleItem('/img'); const $ = load(fetchArticleItem.description); @@ -473,9 +487,9 @@ describe('wechat-mp', () => { } }); - it('redirect', () => { - expect(fetchArticle('https://mp.weixin.qq.com/s/rsshub_test_redirect_no_location')).rejects.toThrow('redirect without location'); - expect(fetchArticle('https://mp.weixin.qq.com/s/rsshub_test_recursive_redirect')).rejects.toThrow('too many redirects'); + it('redirect', async () => { + await expect(fetchArticle('https://mp.weixin.qq.com/s/rsshub_test_redirect_no_location')).rejects.toThrow('redirect without location'); + await expect(fetchArticle('https://mp.weixin.qq.com/s/rsshub_test_recursive_redirect')).rejects.toThrow('too many redirects'); }); it('route_test', async () => { diff --git a/lib/utils/wechat-mp.ts b/lib/utils/wechat-mp.ts index 238fbe179ac1..ae10f2643540 100644 --- a/lib/utils/wechat-mp.ts +++ b/lib/utils/wechat-mp.ts @@ -543,6 +543,7 @@ class PageParsers { } else { error('unknown page, probably due to WAF', pageTextShort, url); } + /* v8 ignore next */ return {}; // just to make TypeScript happy, actually UNREACHABLE default: warn('new showType, trying fallback method', `showType=${commonMetadata.showType}`, url); diff --git a/lib/views/rss3.test.ts b/lib/views/rss3.test.ts index 693e809eccd7..45d2e7bf6585 100644 --- a/lib/views/rss3.test.ts +++ b/lib/views/rss3.test.ts @@ -98,4 +98,25 @@ describe('rss3', () => { }; expect(result).toStrictEqual(expected); }); + + it('falls back to raw link when URL parsing fails', () => { + const data = { + item: [ + { + link: 'not-a-url', + author: 'Author', + description: 'Desc', + pubDate: '2024-01-01T00:00:00Z', + category: 'Category', + title: 'Title', + updated: '2024-01-02T00:00:00Z', + }, + ], + }; + + const result = rss3(data); + expect(result.data[0].owner).toBe('not-a-url'); + expect(result.data[0].from).toBe('not-a-url'); + expect(result.data[0].to).toBe('not-a-url'); + }); }); diff --git a/lib/views/views.test.tsx b/lib/views/views.test.tsx new file mode 100644 index 000000000000..6070440ed077 --- /dev/null +++ b/lib/views/views.test.tsx @@ -0,0 +1,205 @@ +import { renderToString } from 'hono/jsx/dom/server'; +import { afterEach, describe, expect, it, vi } from 'vitest'; + +import { Atom as RenderAtom, json as renderJson, RSS as RenderRSS, rss3 as renderRss3 } from '@/utils/render'; +import Atom from '@/views/atom'; +import jsonView from '@/views/json'; +import RSS from '@/views/rss'; +import rss3View from '@/views/rss3'; + +afterEach(() => { + vi.resetModules(); + vi.unmock('@/config'); + vi.unmock('@/utils/debug-info'); + vi.unmock('@/utils/git-hash'); +}); + +describe('view exports', () => { + it('re-exports view helpers from render', () => { + expect(RenderAtom).toBe(Atom); + expect(RenderRSS).toBe(RSS); + expect(renderJson).toBe(jsonView); + expect(renderRss3).toBe(rss3View); + }); +}); + +describe('Atom view', () => { + it('renders optional fields and media extensions', () => { + const html = renderToString( + + ); + + expect(html).toContain('https://example.com/icon.png'); + expect(html).toContain('https://example.com/logo.png'); + expect(html).toContain('media:content'); + expect(html).toContain('term="News"'); + expect(html).toContain('term="Tech"'); + expect(html).toContain('rsshub:upvotes'); + expect(html).toContain('rsshub:downvotes'); + expect(html).toContain('rsshub:comments'); + }); +}); + +describe('RSS view', () => { + it('renders itunes, media, and telegram image variants', () => { + const html = renderToString( + + ); + + expect(html).toContain('xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"'); + expect(html).toContain('xmlns:media="http://search.yahoo.com/mrss/"'); + expect(html).toContain('Podcast Author'); + expect(html).toContain('itunes:category text="Tech"'); + expect(html).toContain('true'); + expect(html).toContain('31'); + expect(html).toContain('88'); + expect(html).toContain('media:content'); + expect(html).toContain('Podcast'); + expect(html).toContain('News'); + }); +}); + +describe('Index view', () => { + const renderIndex = async (debugInfo: string | undefined, debugQuery: string | undefined) => { + const debugData = { + hitCache: 2, + request: 10, + etag: 3, + error: 1, + routes: { + '/foo': 5, + '/bar': 2, + }, + paths: { + '/foo?x=1': 4, + '/bar?x=2': 1, + }, + errorRoutes: { + '/error': 2, + '/fail': 1, + }, + errorPaths: { + '/error?x=1': 1, + '/fail?x=2': 1, + }, + }; + + vi.doMock('@/config', () => ({ + config: { + debugInfo, + disallowRobot: true, + nodeName: 'TestNode', + cache: { + routeExpire: 120, + }, + }, + })); + vi.doMock('@/utils/debug-info', () => ({ + getDebugInfo: () => debugData, + })); + vi.doMock('@/utils/git-hash', () => ({ + gitHash: 'abc123', + gitDate: new Date('2020-01-01T00:00:00Z'), + })); + + const { default: Index } = await import('@/views/index'); + + return renderToString(); + }; + + it('shows debug info when enabled', async () => { + const html = await renderIndex('secret', 'secret'); + + expect(html).toContain('Debug Info'); + expect(html).toContain('TestNode'); + expect(html).toContain('abc123'); + expect(html).toContain('5 /foo'); + expect(html).toContain('2 /error'); + }); + + it('hides debug info when disabled', async () => { + const html = await renderIndex('false', 'secret'); + + expect(html).not.toContain('Debug Info'); + }); +}); From 687e818a7357fa63d554d78835481ed8568fb775 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 29 Dec 2025 17:31:51 +0800 Subject: [PATCH 1979/2658] docs: add review guidelines for codex --- AGENTS.md | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000000..4576664659db --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,127 @@ +## Review guidelines + +### Route Configuration + +1. **Example Format**: The `example` field must start with `/` and be a working RSSHub route path (e.g., `/example/route`), not a full URL or source website URL. + +2. **Route Name**: Do NOT repeat the namespace name in the route name. The namespace is already defined in `namespace.ts`. + +3. **Radar Source Format**: Use relative paths without `https://` prefix in `radar[]. source`. Example: `source: ['www.example.com/path']` instead of `source: ['https://www.example.com/path']`. + +4. **Radar Target**: The `radar[].target` must match the route path. If the source URL does not contain a path parameter, do not include it in the target. + +5. **Namespace URL**: In `namespace.ts`, the `url` field should NOT include the `https://` protocol prefix. + +6. **Single Category**: Provide only ONE category in the `categories` array, not multiple. + +7. **Unnecessary Files**: Do NOT create separate `README.md` or `radar.ts` files. Put descriptions in `Route['description']` and radar rules in `Route['radar']`. + +8. **Legacy Router**: Do NOT add routes to `lib/router.js` - this file is deprecated. + +9. **Features Accuracy**: Set `requirePuppeteer: true` only if your route actually uses Puppeteer. Do not mismatch feature flags. + +10. **Maintainer GitHub ID**: The `maintainers` field must contain valid GitHub usernames. Verify that the username exists before adding it. + +### Code Style + +11. **Naming Convention**: Use `camelCase` for variable names in JavaScript/TypeScript. Avoid `snake_case` (e.g., use `videoUrl` instead of `video_url`). + +12. **Type Imports**: Use `import type { ... }` for type-only imports instead of `import { ... }`. + +13. **Import Sorting**: Keep imports sorted. Run autofix if linter reports import order issues. + +14. **Unnecessary Template Literals**: Do not use template literals when simple strings suffice (e.g., use `'plain string'` instead of `` `plain string` ``). + +15. **Avoid Loading HTML Twice**: Do not call `load()` from cheerio multiple times on the same content. Reuse the initial `$` object. + +16. **Async/Await in Close**: When closing Puppeteer pages/browsers, use `await page.close()` and `await browser.close()` instead of non-awaited calls. + +17. **No Explicit Null**: No need to explicitly set a property to `null` if it does not exist - just omit it. + +18. **Valid Item Properties**: Only use properties defined in [lib/types. ts](https://github.com/DIYgod/RSSHub/blob/master/lib/types.ts). Custom properties like `avatar`, `bio` will be ignored by RSSHub. + +19. **String Methods**: Use `startsWith()` instead of `includes()` when checking if a string begins with a specific prefix. + +20. **Simplify Code**: Combine multiple conditional assignments into single expressions using `||` or `??` operators when appropriate. + +### Data Handling + +21. **Use Cache**: Always [cache](https://docs.rsshub.app/joinus/advanced/use-cache) the returned results when fetching article details in a loop using `cache.tryGet()`. + +22. **Description Content**: The `description` field should contain ONLY the main article content. Do NOT include `title`, `author`, `pubDate`, or tags in `description` - they have their own dedicated fields. + +23. **Category Field**: Extract tags/categories from articles and place them in the `category` field, not in `description`. + +24. **pubDate Field**: Always include `pubDate` when the source provides date/time information. Use the `parseDate` utility function. + +25. **No Fake Dates**: Do NOT use `new Date()` as a fallback for `pubDate`. If no date is available, leave it undefined. See [No Date documentation](https://docs.rsshub.app/joinus/advanced/pub-date#no-date). + +26. **No Title Trimming**: Do not manually trim or truncate titles. RSSHub core handles title processing automatically. + +27. **Unique Links**: Ensure each item's `link` is unique as it will be used as `guid`. Avoid fallback URLs that could cause duplicate `guid` values. + +28. **Human-Readable Links**: The feed `link` field should point to a human-readable webpage URL, NOT an API endpoint URL. + +### API and Data Fetching + +29. **Prefer APIs Over Scraping**: When the target website has an API (often found by scrolling pages or checking network requests), use the API endpoint instead of HTML scraping. + +30. **JSON Parsing**: When using `ofetch`, `JSON.parse` is automatically applied. Do not manually decode JSON escape sequences like `\u003C`. + +31. **No Page Turning**: RSS feeds should only request the first page of content. Do not implement pagination parameters for users. + +32. **Use Common Parameters**: Use RSSHub's built-in common parameters like [`limit`](https://docs.rsshub.app/guide/parameters#limit-entries) instead of implementing custom query parameters for limiting entries. + +33. **No Custom Query Parameters**: Avoid using querystring parameters for route configuration. Use path parameters (`:param`) instead. + +34. **No Custom Filtering**: Do not implement custom tag/category filtering in routes. Users can apply filtering using [common parameters](https://docs.rsshub.app/guide/parameters). + +35. **Avoid Dynamic Hashes**: If an API requires a hash that changes across builds, extract it dynamically from the webpage rather than hardcoding it. + +36. **User-Agent**: Use RSSHub's built-in [User-Agent](https://github.com/DIYgod/RSSHub/blob/master/lib/config.ts#L494) (`config.trueUA`) when making requests that need realistic browser headers. + +### Media and Enclosures + +37. **Valid MIME Types**: The `enclosure_type` must be a valid MIME type as defined in RFC specifications. For example, `video/youtube` is NOT valid - use actual video file URLs with proper types like `video/mp4`. + +38. **Direct Media URLs**: `enclosure_url` must point directly to downloadable media files (e.g., `.mp4`, `.mp3`), not to web pages containing media. + +39. **Video Poster**: Use the HTML5 `